antd.js 4.4 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312
  1. /*!
  2. *
  3. * antd v5.27.4
  4. *
  5. * Copyright 2015-present, Alipay, Inc.
  6. * All rights reserved.
  7. *
  8. */
  9. (function webpackUniversalModuleDefinition(root, factory) {
  10. if(typeof exports === 'object' && typeof module === 'object')
  11. module.exports = factory(require("react"), require("react-dom"), require("dayjs"));
  12. else if(typeof define === 'function' && define.amd)
  13. define(["react", "react-dom", "dayjs"], factory);
  14. else if(typeof exports === 'object')
  15. exports["antd"] = factory(require("react"), require("react-dom"), require("dayjs"));
  16. else
  17. root["antd"] = factory(root["React"], root["ReactDOM"], root["dayjs"]);
  18. })(this, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_dayjs__) {
  19. return /******/ (function() { // webpackBootstrap
  20. /******/ var __webpack_modules__ = ({
  21. /***/ "./alias/cssinjs.js":
  22. /*!**************************!*\
  23. !*** ./alias/cssinjs.js ***!
  24. \**************************/
  25. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  26. /* eslint-disable no-restricted-globals */
  27. // This is a alias proxy, which will use global `@ant-design/cssinjs` first.
  28. // Use local if global not found.
  29. let cssinjs;
  30. if (typeof window !== 'undefined' && window.antdCssinjs) {
  31. // Use window UMD version
  32. cssinjs = window.antdCssinjs;
  33. } else if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.antdCssinjs) {
  34. // Use global UMD version
  35. cssinjs = __webpack_require__.g.antdCssinjs;
  36. } else {
  37. // Use local version.
  38. // Use relative path since webpack will also replace module here.
  39. // eslint-disable-next-line antfu/no-import-node-modules-by-path
  40. cssinjs = __webpack_require__(/*! ../node_modules/@ant-design/cssinjs */ "./node_modules/@ant-design/cssinjs/es/index.js");
  41. }
  42. module.exports = cssinjs;
  43. /***/ }),
  44. /***/ "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$":
  45. /*!***************************************************************!*\
  46. !*** ./components/ sync ^\.\/[^_][\w-]+\/style\/index\.tsx?$ ***!
  47. \***************************************************************/
  48. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  49. var map = {
  50. "./affix/style/index.ts": "./components/affix/style/index.ts",
  51. "./alert/style/index.ts": "./components/alert/style/index.ts",
  52. "./anchor/style/index.ts": "./components/anchor/style/index.ts",
  53. "./app/style/index.ts": "./components/app/style/index.ts",
  54. "./avatar/style/index.ts": "./components/avatar/style/index.ts",
  55. "./back-top/style/index.ts": "./components/back-top/style/index.ts",
  56. "./badge/style/index.ts": "./components/badge/style/index.ts",
  57. "./breadcrumb/style/index.ts": "./components/breadcrumb/style/index.ts",
  58. "./button/style/index.ts": "./components/button/style/index.ts",
  59. "./calendar/style/index.ts": "./components/calendar/style/index.ts",
  60. "./card/style/index.ts": "./components/card/style/index.ts",
  61. "./carousel/style/index.ts": "./components/carousel/style/index.ts",
  62. "./cascader/style/index.ts": "./components/cascader/style/index.ts",
  63. "./checkbox/style/index.ts": "./components/checkbox/style/index.ts",
  64. "./col/style/index.ts": "./components/col/style/index.ts",
  65. "./collapse/style/index.ts": "./components/collapse/style/index.ts",
  66. "./color-picker/style/index.ts": "./components/color-picker/style/index.ts",
  67. "./config-provider/style/index.ts": "./components/config-provider/style/index.ts",
  68. "./date-picker/style/index.ts": "./components/date-picker/style/index.ts",
  69. "./descriptions/style/index.ts": "./components/descriptions/style/index.ts",
  70. "./divider/style/index.ts": "./components/divider/style/index.ts",
  71. "./drawer/style/index.ts": "./components/drawer/style/index.ts",
  72. "./dropdown/style/index.ts": "./components/dropdown/style/index.ts",
  73. "./empty/style/index.ts": "./components/empty/style/index.ts",
  74. "./flex/style/index.ts": "./components/flex/style/index.ts",
  75. "./float-button/style/index.ts": "./components/float-button/style/index.ts",
  76. "./form/style/index.ts": "./components/form/style/index.ts",
  77. "./grid/style/index.ts": "./components/grid/style/index.ts",
  78. "./image/style/index.ts": "./components/image/style/index.ts",
  79. "./input-number/style/index.ts": "./components/input-number/style/index.ts",
  80. "./input/style/index.ts": "./components/input/style/index.ts",
  81. "./layout/style/index.ts": "./components/layout/style/index.ts",
  82. "./list/style/index.ts": "./components/list/style/index.ts",
  83. "./mentions/style/index.ts": "./components/mentions/style/index.ts",
  84. "./menu/style/index.ts": "./components/menu/style/index.ts",
  85. "./message/style/index.ts": "./components/message/style/index.ts",
  86. "./modal/style/index.ts": "./components/modal/style/index.ts",
  87. "./notification/style/index.ts": "./components/notification/style/index.ts",
  88. "./pagination/style/index.ts": "./components/pagination/style/index.ts",
  89. "./popconfirm/style/index.ts": "./components/popconfirm/style/index.ts",
  90. "./popover/style/index.ts": "./components/popover/style/index.ts",
  91. "./progress/style/index.ts": "./components/progress/style/index.ts",
  92. "./qr-code/style/index.ts": "./components/qr-code/style/index.ts",
  93. "./qrcode/style/index.ts": "./components/qrcode/style/index.ts",
  94. "./radio/style/index.ts": "./components/radio/style/index.ts",
  95. "./rate/style/index.ts": "./components/rate/style/index.ts",
  96. "./result/style/index.ts": "./components/result/style/index.ts",
  97. "./row/style/index.ts": "./components/row/style/index.ts",
  98. "./segmented/style/index.ts": "./components/segmented/style/index.ts",
  99. "./select/style/index.ts": "./components/select/style/index.ts",
  100. "./skeleton/style/index.ts": "./components/skeleton/style/index.ts",
  101. "./slider/style/index.ts": "./components/slider/style/index.ts",
  102. "./space/style/index.ts": "./components/space/style/index.ts",
  103. "./spin/style/index.ts": "./components/spin/style/index.ts",
  104. "./splitter/style/index.ts": "./components/splitter/style/index.ts",
  105. "./statistic/style/index.ts": "./components/statistic/style/index.ts",
  106. "./steps/style/index.ts": "./components/steps/style/index.ts",
  107. "./switch/style/index.ts": "./components/switch/style/index.ts",
  108. "./table/style/index.ts": "./components/table/style/index.ts",
  109. "./tabs/style/index.ts": "./components/tabs/style/index.ts",
  110. "./tag/style/index.ts": "./components/tag/style/index.ts",
  111. "./timeline/style/index.ts": "./components/timeline/style/index.ts",
  112. "./tooltip/style/index.ts": "./components/tooltip/style/index.ts",
  113. "./tour/style/index.ts": "./components/tour/style/index.ts",
  114. "./transfer/style/index.ts": "./components/transfer/style/index.ts",
  115. "./tree-select/style/index.ts": "./components/tree-select/style/index.ts",
  116. "./tree/style/index.ts": "./components/tree/style/index.ts",
  117. "./typography/style/index.ts": "./components/typography/style/index.ts",
  118. "./upload/style/index.ts": "./components/upload/style/index.ts"
  119. };
  120. function webpackContext(req) {
  121. var id = webpackContextResolve(req);
  122. return __webpack_require__(id);
  123. }
  124. function webpackContextResolve(req) {
  125. if(!__webpack_require__.o(map, req)) {
  126. var e = new Error("Cannot find module '" + req + "'");
  127. e.code = 'MODULE_NOT_FOUND';
  128. throw e;
  129. }
  130. return map[req];
  131. }
  132. webpackContext.keys = function webpackContextKeys() {
  133. return Object.keys(map);
  134. };
  135. webpackContext.resolve = webpackContextResolve;
  136. module.exports = webpackContext;
  137. webpackContext.id = "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$";
  138. /***/ }),
  139. /***/ "./components/_util/hooks/useZIndex.ts":
  140. /*!*********************************************!*\
  141. !*** ./components/_util/hooks/useZIndex.ts ***!
  142. \*********************************************/
  143. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  144. "use strict";
  145. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  146. /* harmony export */ CONTAINER_MAX_OFFSET: function() { return /* binding */ CONTAINER_MAX_OFFSET; },
  147. /* harmony export */ useZIndex: function() { return /* binding */ useZIndex; }
  148. /* harmony export */ });
  149. /* unused harmony exports containerBaseZIndexOffset, consumerBaseZIndexOffset */
  150. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  151. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  152. /* harmony import */ var _theme_useToken__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/useToken */ "./components/theme/useToken.ts");
  153. /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../warning */ "./components/_util/warning.ts");
  154. /* harmony import */ var _zindexContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../zindexContext */ "./components/_util/zindexContext.ts");
  155. // Z-Index control range
  156. // Container: 1000 + offset 100 (max base + 10 * offset = 2000)
  157. // Popover: offset 50
  158. // Notification: Container Max zIndex + componentOffset
  159. const CONTAINER_OFFSET = 100;
  160. const CONTAINER_OFFSET_MAX_COUNT = 10;
  161. const CONTAINER_MAX_OFFSET = CONTAINER_OFFSET * CONTAINER_OFFSET_MAX_COUNT;
  162. /**
  163. * Static function will default be the `CONTAINER_MAX_OFFSET`.
  164. * But it still may have children component like Select, Dropdown.
  165. * So the warning zIndex should exceed the `CONTAINER_MAX_OFFSET`.
  166. */
  167. const CONTAINER_MAX_OFFSET_WITH_CHILDREN = CONTAINER_MAX_OFFSET + CONTAINER_OFFSET;
  168. const containerBaseZIndexOffset = {
  169. Modal: CONTAINER_OFFSET,
  170. Drawer: CONTAINER_OFFSET,
  171. Popover: CONTAINER_OFFSET,
  172. Popconfirm: CONTAINER_OFFSET,
  173. Tooltip: CONTAINER_OFFSET,
  174. Tour: CONTAINER_OFFSET,
  175. FloatButton: CONTAINER_OFFSET
  176. };
  177. const consumerBaseZIndexOffset = {
  178. SelectLike: 50,
  179. Dropdown: 50,
  180. DatePicker: 50,
  181. Menu: 50,
  182. ImagePreview: 1
  183. };
  184. function isContainerType(type) {
  185. return type in containerBaseZIndexOffset;
  186. }
  187. const useZIndex = (componentType, customZIndex) => {
  188. const [, token] = (0,_theme_useToken__WEBPACK_IMPORTED_MODULE_1__["default"])();
  189. const parentZIndex = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_zindexContext__WEBPACK_IMPORTED_MODULE_3__["default"]);
  190. const isContainer = isContainerType(componentType);
  191. let result;
  192. if (customZIndex !== undefined) {
  193. result = [customZIndex, customZIndex];
  194. } else {
  195. let zIndex = parentZIndex !== null && parentZIndex !== void 0 ? parentZIndex : 0;
  196. if (isContainer) {
  197. zIndex +=
  198. // Use preset token zIndex by default but not stack when has parent container
  199. (parentZIndex ? 0 : token.zIndexPopupBase) +
  200. // Container offset
  201. containerBaseZIndexOffset[componentType];
  202. } else {
  203. zIndex += consumerBaseZIndexOffset[componentType];
  204. }
  205. result = [parentZIndex === undefined ? customZIndex : zIndex, zIndex];
  206. }
  207. if (true) {
  208. const warning = (0,_warning__WEBPACK_IMPORTED_MODULE_2__.devUseWarning)(componentType);
  209. const maxZIndex = token.zIndexPopupBase + CONTAINER_MAX_OFFSET_WITH_CHILDREN;
  210. const currentZIndex = result[0] || 0;
  211. true ? warning(customZIndex !== undefined || currentZIndex <= maxZIndex, 'usage', '`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.') : 0;
  212. }
  213. return result;
  214. };
  215. /***/ }),
  216. /***/ "./components/_util/motion.ts":
  217. /*!************************************!*\
  218. !*** ./components/_util/motion.ts ***!
  219. \************************************/
  220. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  221. "use strict";
  222. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  223. /* harmony export */ getTransitionName: function() { return /* binding */ getTransitionName; }
  224. /* harmony export */ });
  225. /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/context.ts");
  226. // ================== Collapse Motion ==================
  227. const getCollapsedHeight = () => ({
  228. height: 0,
  229. opacity: 0
  230. });
  231. const getRealHeight = node => {
  232. const {
  233. scrollHeight
  234. } = node;
  235. return {
  236. height: scrollHeight,
  237. opacity: 1
  238. };
  239. };
  240. const getCurrentHeight = node => ({
  241. height: node ? node.offsetHeight : 0
  242. });
  243. const skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
  244. const initCollapseMotion = (rootCls = _config_provider__WEBPACK_IMPORTED_MODULE_0__.defaultPrefixCls) => ({
  245. motionName: `${rootCls}-motion-collapse`,
  246. onAppearStart: getCollapsedHeight,
  247. onEnterStart: getCollapsedHeight,
  248. onAppearActive: getRealHeight,
  249. onEnterActive: getRealHeight,
  250. onLeaveStart: getCurrentHeight,
  251. onLeaveActive: getCollapsedHeight,
  252. onAppearEnd: skipOpacityTransition,
  253. onEnterEnd: skipOpacityTransition,
  254. onLeaveEnd: skipOpacityTransition,
  255. motionDeadline: 500
  256. });
  257. const _SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];
  258. const getTransitionName = (rootPrefixCls, motion, transitionName) => {
  259. if (transitionName !== undefined) {
  260. return transitionName;
  261. }
  262. return `${rootPrefixCls}-${motion}`;
  263. };
  264. /* harmony default export */ __webpack_exports__["default"] = (initCollapseMotion);
  265. /***/ }),
  266. /***/ "./components/_util/reactNode.ts":
  267. /*!***************************************!*\
  268. !*** ./components/_util/reactNode.ts ***!
  269. \***************************************/
  270. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  271. "use strict";
  272. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  273. /* harmony export */ cloneElement: function() { return /* binding */ cloneElement; },
  274. /* harmony export */ isFragment: function() { return /* binding */ isFragment; },
  275. /* harmony export */ replaceElement: function() { return /* binding */ replaceElement; }
  276. /* harmony export */ });
  277. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  278. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  279. function isFragment(child) {
  280. return child && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(child) && child.type === (react__WEBPACK_IMPORTED_MODULE_0___default().Fragment);
  281. }
  282. const replaceElement = (element, replacement, props) => {
  283. if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(element)) {
  284. return replacement;
  285. }
  286. return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
  287. };
  288. function cloneElement(element, props) {
  289. return replaceElement(element, element, props);
  290. }
  291. /***/ }),
  292. /***/ "./components/_util/warning.ts":
  293. /*!*************************************!*\
  294. !*** ./components/_util/warning.ts ***!
  295. \*************************************/
  296. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  297. "use strict";
  298. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  299. /* harmony export */ WarningContext: function() { return /* binding */ WarningContext; },
  300. /* harmony export */ devUseWarning: function() { return /* binding */ devUseWarning; }
  301. /* harmony export */ });
  302. /* unused harmony exports noop, resetWarned */
  303. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  304. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  305. /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/rc-util/es/warning.js");
  306. function noop() {}
  307. let deprecatedWarnList = null;
  308. function resetWarned() {
  309. deprecatedWarnList = null;
  310. (0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__.resetWarned)();
  311. }
  312. let _warning = noop;
  313. if (true) {
  314. _warning = (valid, component, message) => {
  315. (0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(valid, `[antd: ${component}] ${message}`);
  316. // StrictMode will inject console which will not throw warning in React 17.
  317. if (false) // removed by dead control flow
  318. {}
  319. };
  320. }
  321. const warning = _warning;
  322. const WarningContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});
  323. /**
  324. * This is a hook but we not named as `useWarning`
  325. * since this is only used in development.
  326. * We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition
  327. */
  328. const devUseWarning = true ? component => {
  329. const {
  330. strict
  331. } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(WarningContext);
  332. const typeWarning = (valid, type, message) => {
  333. if (!valid) {
  334. if (strict === false && type === 'deprecated') {
  335. const existWarning = deprecatedWarnList;
  336. if (!deprecatedWarnList) {
  337. deprecatedWarnList = {};
  338. }
  339. deprecatedWarnList[component] = deprecatedWarnList[component] || [];
  340. if (!deprecatedWarnList[component].includes(message || '')) {
  341. deprecatedWarnList[component].push(message || '');
  342. }
  343. // Warning for the first time
  344. if (!existWarning) {
  345. console.warn('[antd] There exists deprecated usage in your code:', deprecatedWarnList);
  346. }
  347. } else {
  348. true ? warning(valid, component, message) : 0;
  349. }
  350. }
  351. };
  352. typeWarning.deprecated = (valid, oldProp, newProp, message) => {
  353. typeWarning(valid, 'deprecated', `\`${oldProp}\` is deprecated. Please use \`${newProp}\` instead.${message ? ` ${message}` : ''}`);
  354. };
  355. return typeWarning;
  356. } : 0;
  357. /* harmony default export */ __webpack_exports__["default"] = (warning);
  358. /***/ }),
  359. /***/ "./components/_util/zindexContext.ts":
  360. /*!*******************************************!*\
  361. !*** ./components/_util/zindexContext.ts ***!
  362. \*******************************************/
  363. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  364. "use strict";
  365. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  366. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  367. const zIndexContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(undefined);
  368. if (true) {
  369. zIndexContext.displayName = 'zIndexContext';
  370. }
  371. /* harmony default export */ __webpack_exports__["default"] = (zIndexContext);
  372. /***/ }),
  373. /***/ "./components/affix/style/index.ts":
  374. /*!*****************************************!*\
  375. !*** ./components/affix/style/index.ts ***!
  376. \*****************************************/
  377. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  378. "use strict";
  379. __webpack_require__.r(__webpack_exports__);
  380. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  381. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  382. /* harmony export */ });
  383. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  384. // ============================== Shared ==============================
  385. const genSharedAffixStyle = token => {
  386. const {
  387. componentCls
  388. } = token;
  389. return {
  390. [componentCls]: {
  391. position: 'fixed',
  392. zIndex: token.zIndexPopup
  393. }
  394. };
  395. };
  396. const prepareComponentToken = token => ({
  397. zIndexPopup: token.zIndexBase + 10
  398. });
  399. // ============================== Export ==============================
  400. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('Affix', genSharedAffixStyle, prepareComponentToken));
  401. /***/ }),
  402. /***/ "./components/alert/style/index.ts":
  403. /*!*****************************************!*\
  404. !*** ./components/alert/style/index.ts ***!
  405. \*****************************************/
  406. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  407. "use strict";
  408. __webpack_require__.r(__webpack_exports__);
  409. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  410. /* harmony export */ genActionStyle: function() { return /* binding */ genActionStyle; },
  411. /* harmony export */ genBaseStyle: function() { return /* binding */ genBaseStyle; },
  412. /* harmony export */ genTypeStyle: function() { return /* binding */ genTypeStyle; },
  413. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  414. /* harmony export */ });
  415. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  416. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  417. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  418. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  419. const genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({
  420. background: bgColor,
  421. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${borderColor}`,
  422. [`${alertCls}-icon`]: {
  423. color: iconColor
  424. }
  425. });
  426. const genBaseStyle = token => {
  427. const {
  428. componentCls,
  429. motionDurationSlow: duration,
  430. marginXS,
  431. marginSM,
  432. fontSize,
  433. fontSizeLG,
  434. lineHeight,
  435. borderRadiusLG: borderRadius,
  436. motionEaseInOutCirc,
  437. withDescriptionIconSize,
  438. colorText,
  439. colorTextHeading,
  440. withDescriptionPadding,
  441. defaultPadding
  442. } = token;
  443. return {
  444. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  445. position: 'relative',
  446. display: 'flex',
  447. alignItems: 'center',
  448. padding: defaultPadding,
  449. wordWrap: 'break-word',
  450. borderRadius,
  451. [`&${componentCls}-rtl`]: {
  452. direction: 'rtl'
  453. },
  454. [`${componentCls}-content`]: {
  455. flex: 1,
  456. minWidth: 0
  457. },
  458. [`${componentCls}-icon`]: {
  459. marginInlineEnd: marginXS,
  460. lineHeight: 0
  461. },
  462. '&-description': {
  463. display: 'none',
  464. fontSize,
  465. lineHeight
  466. },
  467. '&-message': {
  468. color: colorTextHeading
  469. },
  470. [`&${componentCls}-motion-leave`]: {
  471. overflow: 'hidden',
  472. opacity: 1,
  473. transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
  474. padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
  475. margin-bottom ${duration} ${motionEaseInOutCirc}`
  476. },
  477. [`&${componentCls}-motion-leave-active`]: {
  478. maxHeight: 0,
  479. marginBottom: '0 !important',
  480. paddingTop: 0,
  481. paddingBottom: 0,
  482. opacity: 0
  483. }
  484. }),
  485. [`${componentCls}-with-description`]: {
  486. alignItems: 'flex-start',
  487. padding: withDescriptionPadding,
  488. [`${componentCls}-icon`]: {
  489. marginInlineEnd: marginSM,
  490. fontSize: withDescriptionIconSize,
  491. lineHeight: 0
  492. },
  493. [`${componentCls}-message`]: {
  494. display: 'block',
  495. marginBottom: marginXS,
  496. color: colorTextHeading,
  497. fontSize: fontSizeLG
  498. },
  499. [`${componentCls}-description`]: {
  500. display: 'block',
  501. color: colorText
  502. }
  503. },
  504. [`${componentCls}-banner`]: {
  505. marginBottom: 0,
  506. border: '0 !important',
  507. borderRadius: 0
  508. }
  509. };
  510. };
  511. const genTypeStyle = token => {
  512. const {
  513. componentCls,
  514. colorSuccess,
  515. colorSuccessBorder,
  516. colorSuccessBg,
  517. colorWarning,
  518. colorWarningBorder,
  519. colorWarningBg,
  520. colorError,
  521. colorErrorBorder,
  522. colorErrorBg,
  523. colorInfo,
  524. colorInfoBorder,
  525. colorInfoBg
  526. } = token;
  527. return {
  528. [componentCls]: {
  529. '&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),
  530. '&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),
  531. '&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),
  532. '&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {
  533. [`${componentCls}-description > pre`]: {
  534. margin: 0,
  535. padding: 0
  536. }
  537. })
  538. }
  539. };
  540. };
  541. const genActionStyle = token => {
  542. const {
  543. componentCls,
  544. iconCls,
  545. motionDurationMid,
  546. marginXS,
  547. fontSizeIcon,
  548. colorIcon,
  549. colorIconHover
  550. } = token;
  551. return {
  552. [componentCls]: {
  553. '&-action': {
  554. marginInlineStart: marginXS
  555. },
  556. [`${componentCls}-close-icon`]: {
  557. marginInlineStart: marginXS,
  558. padding: 0,
  559. overflow: 'hidden',
  560. fontSize: fontSizeIcon,
  561. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(fontSizeIcon),
  562. backgroundColor: 'transparent',
  563. border: 'none',
  564. outline: 'none',
  565. cursor: 'pointer',
  566. [`${iconCls}-close`]: {
  567. color: colorIcon,
  568. transition: `color ${motionDurationMid}`,
  569. '&:hover': {
  570. color: colorIconHover
  571. }
  572. }
  573. },
  574. '&-close-text': {
  575. color: colorIcon,
  576. transition: `color ${motionDurationMid}`,
  577. '&:hover': {
  578. color: colorIconHover
  579. }
  580. }
  581. }
  582. };
  583. };
  584. const prepareComponentToken = token => {
  585. const paddingHorizontal = 12; // Fixed value here.
  586. return {
  587. withDescriptionIconSize: token.fontSizeHeading3,
  588. defaultPadding: `${token.paddingContentVerticalSM}px ${paddingHorizontal}px`,
  589. withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
  590. };
  591. };
  592. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Alert', token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)], prepareComponentToken));
  593. /***/ }),
  594. /***/ "./components/anchor/style/index.ts":
  595. /*!******************************************!*\
  596. !*** ./components/anchor/style/index.ts ***!
  597. \******************************************/
  598. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  599. "use strict";
  600. __webpack_require__.r(__webpack_exports__);
  601. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  602. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  603. /* harmony export */ });
  604. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  605. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  606. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  607. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  608. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  609. // ============================== Shared ==============================
  610. const genSharedAnchorStyle = token => {
  611. const {
  612. componentCls,
  613. holderOffsetBlock,
  614. motionDurationSlow,
  615. lineWidthBold,
  616. colorPrimary,
  617. lineType,
  618. colorSplit,
  619. calc
  620. } = token;
  621. return {
  622. [`${componentCls}-wrapper`]: {
  623. marginBlockStart: calc(holderOffsetBlock).mul(-1).equal(),
  624. paddingBlockStart: holderOffsetBlock,
  625. // delete overflow: auto
  626. // overflow: 'auto',
  627. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  628. position: 'relative',
  629. paddingInlineStart: lineWidthBold,
  630. [`${componentCls}-link`]: {
  631. paddingBlock: token.linkPaddingBlock,
  632. paddingInline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.linkPaddingInlineStart)} 0`,
  633. '&-title': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
  634. position: 'relative',
  635. display: 'block',
  636. marginBlockEnd: token.anchorTitleBlock,
  637. color: token.colorText,
  638. transition: `all ${token.motionDurationSlow}`,
  639. '&:only-child': {
  640. marginBlockEnd: 0
  641. }
  642. }),
  643. [`&-active > ${componentCls}-link-title`]: {
  644. color: token.colorPrimary
  645. },
  646. // link link
  647. [`${componentCls}-link`]: {
  648. paddingBlock: token.anchorPaddingBlockSecondary
  649. }
  650. }
  651. }),
  652. [`&:not(${componentCls}-wrapper-horizontal)`]: {
  653. [componentCls]: {
  654. '&::before': {
  655. position: 'absolute',
  656. insetInlineStart: 0,
  657. top: 0,
  658. height: '100%',
  659. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidthBold)} ${lineType} ${colorSplit}`,
  660. content: '" "'
  661. },
  662. [`${componentCls}-ink`]: {
  663. position: 'absolute',
  664. insetInlineStart: 0,
  665. display: 'none',
  666. transform: 'translateY(-50%)',
  667. transition: `top ${motionDurationSlow} ease-in-out`,
  668. width: lineWidthBold,
  669. backgroundColor: colorPrimary,
  670. [`&${componentCls}-ink-visible`]: {
  671. display: 'inline-block'
  672. }
  673. }
  674. }
  675. },
  676. [`${componentCls}-fixed ${componentCls}-ink ${componentCls}-ink`]: {
  677. display: 'none'
  678. }
  679. }
  680. };
  681. };
  682. const genSharedAnchorHorizontalStyle = token => {
  683. const {
  684. componentCls,
  685. motionDurationSlow,
  686. lineWidthBold,
  687. colorPrimary
  688. } = token;
  689. return {
  690. [`${componentCls}-wrapper-horizontal`]: {
  691. position: 'relative',
  692. '&::before': {
  693. position: 'absolute',
  694. left: {
  695. _skip_check_: true,
  696. value: 0
  697. },
  698. right: {
  699. _skip_check_: true,
  700. value: 0
  701. },
  702. bottom: 0,
  703. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  704. content: '" "'
  705. },
  706. [componentCls]: {
  707. overflowX: 'scroll',
  708. position: 'relative',
  709. display: 'flex',
  710. scrollbarWidth: 'none' /* Firefox */,
  711. '&::-webkit-scrollbar': {
  712. display: 'none' /* Safari and Chrome */
  713. },
  714. [`${componentCls}-link:first-of-type`]: {
  715. paddingInline: 0
  716. },
  717. [`${componentCls}-ink`]: {
  718. position: 'absolute',
  719. bottom: 0,
  720. transition: `left ${motionDurationSlow} ease-in-out, width ${motionDurationSlow} ease-in-out`,
  721. height: lineWidthBold,
  722. backgroundColor: colorPrimary
  723. }
  724. }
  725. }
  726. };
  727. };
  728. const prepareComponentToken = token => ({
  729. linkPaddingBlock: token.paddingXXS,
  730. linkPaddingInlineStart: token.padding
  731. });
  732. // ============================== Export ==============================
  733. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Anchor', token => {
  734. const {
  735. fontSize,
  736. fontSizeLG,
  737. paddingXXS,
  738. calc
  739. } = token;
  740. const anchorToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  741. holderOffsetBlock: paddingXXS,
  742. anchorPaddingBlockSecondary: calc(paddingXXS).div(2).equal(),
  743. anchorTitleBlock: calc(fontSize).div(14).mul(3).equal(),
  744. anchorBallSize: calc(fontSizeLG).div(2).equal()
  745. });
  746. return [genSharedAnchorStyle(anchorToken), genSharedAnchorHorizontalStyle(anchorToken)];
  747. }, prepareComponentToken));
  748. /***/ }),
  749. /***/ "./components/app/style/index.ts":
  750. /*!***************************************!*\
  751. !*** ./components/app/style/index.ts ***!
  752. \***************************************/
  753. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  754. "use strict";
  755. __webpack_require__.r(__webpack_exports__);
  756. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  757. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  758. /* harmony export */ });
  759. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  760. // =============================== Base ===============================
  761. const genBaseStyle = token => {
  762. const {
  763. componentCls,
  764. colorText,
  765. fontSize,
  766. lineHeight,
  767. fontFamily
  768. } = token;
  769. return {
  770. [componentCls]: {
  771. color: colorText,
  772. fontSize,
  773. lineHeight,
  774. fontFamily,
  775. [`&${componentCls}-rtl`]: {
  776. direction: 'rtl'
  777. }
  778. }
  779. };
  780. };
  781. const prepareComponentToken = () => ({});
  782. // ============================== Export ==============================
  783. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('App', genBaseStyle, prepareComponentToken));
  784. /***/ }),
  785. /***/ "./components/avatar/style/index.ts":
  786. /*!******************************************!*\
  787. !*** ./components/avatar/style/index.ts ***!
  788. \******************************************/
  789. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  790. "use strict";
  791. __webpack_require__.r(__webpack_exports__);
  792. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  793. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  794. /* harmony export */ });
  795. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  796. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  797. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  798. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  799. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  800. const genBaseStyle = token => {
  801. const {
  802. antCls,
  803. componentCls,
  804. iconCls,
  805. avatarBg,
  806. avatarColor,
  807. containerSize,
  808. containerSizeLG,
  809. containerSizeSM,
  810. textFontSize,
  811. textFontSizeLG,
  812. textFontSizeSM,
  813. iconFontSize,
  814. iconFontSizeLG,
  815. iconFontSizeSM,
  816. borderRadius,
  817. borderRadiusLG,
  818. borderRadiusSM,
  819. lineWidth,
  820. lineType
  821. } = token;
  822. // Avatar size style
  823. const avatarSizeStyle = (size, fontSize, iconFontSize, radius) => ({
  824. width: size,
  825. height: size,
  826. borderRadius: '50%',
  827. fontSize,
  828. [`&${componentCls}-square`]: {
  829. borderRadius: radius
  830. },
  831. [`&${componentCls}-icon`]: {
  832. fontSize: iconFontSize,
  833. [`> ${iconCls}`]: {
  834. margin: 0
  835. }
  836. }
  837. });
  838. return {
  839. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  840. position: 'relative',
  841. display: 'inline-flex',
  842. justifyContent: 'center',
  843. alignItems: 'center',
  844. overflow: 'hidden',
  845. color: avatarColor,
  846. whiteSpace: 'nowrap',
  847. textAlign: 'center',
  848. verticalAlign: 'middle',
  849. background: avatarBg,
  850. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} transparent`,
  851. '&-image': {
  852. background: 'transparent'
  853. },
  854. [`${antCls}-image-img`]: {
  855. display: 'block'
  856. }
  857. }), avatarSizeStyle(containerSize, textFontSize, iconFontSize, borderRadius)), {
  858. '&-lg': Object.assign({}, avatarSizeStyle(containerSizeLG, textFontSizeLG, iconFontSizeLG, borderRadiusLG)),
  859. '&-sm': Object.assign({}, avatarSizeStyle(containerSizeSM, textFontSizeSM, iconFontSizeSM, borderRadiusSM)),
  860. '> img': {
  861. display: 'block',
  862. width: '100%',
  863. height: '100%',
  864. objectFit: 'cover'
  865. }
  866. })
  867. };
  868. };
  869. const genGroupStyle = token => {
  870. const {
  871. componentCls,
  872. groupBorderColor,
  873. groupOverlapping,
  874. groupSpace
  875. } = token;
  876. return {
  877. [`${componentCls}-group`]: {
  878. display: 'inline-flex',
  879. [componentCls]: {
  880. borderColor: groupBorderColor
  881. },
  882. '> *:not(:first-child)': {
  883. marginInlineStart: groupOverlapping
  884. }
  885. },
  886. [`${componentCls}-group-popover`]: {
  887. [`${componentCls} + ${componentCls}`]: {
  888. marginInlineStart: groupSpace
  889. }
  890. }
  891. };
  892. };
  893. const prepareComponentToken = token => {
  894. const {
  895. controlHeight,
  896. controlHeightLG,
  897. controlHeightSM,
  898. fontSize,
  899. fontSizeLG,
  900. fontSizeXL,
  901. fontSizeHeading3,
  902. marginXS,
  903. marginXXS,
  904. colorBorderBg
  905. } = token;
  906. return {
  907. containerSize: controlHeight,
  908. containerSizeLG: controlHeightLG,
  909. containerSizeSM: controlHeightSM,
  910. textFontSize: fontSize,
  911. textFontSizeLG: fontSize,
  912. textFontSizeSM: fontSize,
  913. iconFontSize: Math.round((fontSizeLG + fontSizeXL) / 2),
  914. iconFontSizeLG: fontSizeHeading3,
  915. iconFontSizeSM: fontSize,
  916. groupSpace: marginXXS,
  917. groupOverlapping: -marginXS,
  918. groupBorderColor: colorBorderBg
  919. };
  920. };
  921. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Avatar', token => {
  922. const {
  923. colorTextLightSolid,
  924. colorTextPlaceholder
  925. } = token;
  926. const avatarToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  927. avatarBg: colorTextPlaceholder,
  928. avatarColor: colorTextLightSolid
  929. });
  930. return [genBaseStyle(avatarToken), genGroupStyle(avatarToken)];
  931. }, prepareComponentToken));
  932. /***/ }),
  933. /***/ "./components/back-top/style/index.ts":
  934. /*!********************************************!*\
  935. !*** ./components/back-top/style/index.ts ***!
  936. \********************************************/
  937. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  938. "use strict";
  939. __webpack_require__.r(__webpack_exports__);
  940. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  941. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  942. /* harmony export */ });
  943. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  944. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  945. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  946. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  947. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  948. // ============================== Shared ==============================
  949. const genSharedBackTopStyle = token => {
  950. const {
  951. componentCls,
  952. backTopFontSize,
  953. backTopSize,
  954. zIndexPopup
  955. } = token;
  956. return {
  957. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  958. position: 'fixed',
  959. insetInlineEnd: token.backTopInlineEnd,
  960. insetBlockEnd: token.backTopBlockEnd,
  961. zIndex: zIndexPopup,
  962. width: 40,
  963. height: 40,
  964. cursor: 'pointer',
  965. '&:empty': {
  966. display: 'none'
  967. },
  968. [`${componentCls}-content`]: {
  969. width: backTopSize,
  970. height: backTopSize,
  971. overflow: 'hidden',
  972. color: token.backTopColor,
  973. textAlign: 'center',
  974. backgroundColor: token.backTopBackground,
  975. borderRadius: backTopSize,
  976. transition: `all ${token.motionDurationMid}`,
  977. '&:hover': {
  978. backgroundColor: token.backTopHoverBackground,
  979. transition: `all ${token.motionDurationMid}`
  980. }
  981. },
  982. // change to .backtop .backtop-icon
  983. [`${componentCls}-icon`]: {
  984. fontSize: backTopFontSize,
  985. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(backTopSize)
  986. }
  987. })
  988. };
  989. };
  990. const genMediaBackTopStyle = token => {
  991. const {
  992. componentCls,
  993. screenMD,
  994. screenXS,
  995. backTopInlineEndMD,
  996. backTopInlineEndXS
  997. } = token;
  998. return {
  999. [`@media (max-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(screenMD)})`]: {
  1000. [componentCls]: {
  1001. insetInlineEnd: backTopInlineEndMD
  1002. }
  1003. },
  1004. [`@media (max-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(screenXS)})`]: {
  1005. [componentCls]: {
  1006. insetInlineEnd: backTopInlineEndXS
  1007. }
  1008. }
  1009. };
  1010. };
  1011. const prepareComponentToken = token => ({
  1012. zIndexPopup: token.zIndexBase + 10
  1013. });
  1014. // ============================== Export ==============================
  1015. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('BackTop', token => {
  1016. const {
  1017. fontSizeHeading3,
  1018. colorTextDescription,
  1019. colorTextLightSolid,
  1020. colorText,
  1021. controlHeightLG,
  1022. calc
  1023. } = token;
  1024. const backTopToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  1025. backTopBackground: colorTextDescription,
  1026. backTopColor: colorTextLightSolid,
  1027. backTopHoverBackground: colorText,
  1028. backTopFontSize: fontSizeHeading3,
  1029. backTopSize: controlHeightLG,
  1030. backTopBlockEnd: calc(controlHeightLG).mul(1.25).equal(),
  1031. backTopInlineEnd: calc(controlHeightLG).mul(2.5).equal(),
  1032. backTopInlineEndMD: calc(controlHeightLG).mul(1.5).equal(),
  1033. backTopInlineEndXS: calc(controlHeightLG).mul(0.5).equal()
  1034. });
  1035. return [genSharedBackTopStyle(backTopToken), genMediaBackTopStyle(backTopToken)];
  1036. }, prepareComponentToken));
  1037. /***/ }),
  1038. /***/ "./components/badge/style/index.ts":
  1039. /*!*****************************************!*\
  1040. !*** ./components/badge/style/index.ts ***!
  1041. \*****************************************/
  1042. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  1043. "use strict";
  1044. __webpack_require__.r(__webpack_exports__);
  1045. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1046. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  1047. /* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
  1048. /* harmony export */ });
  1049. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  1050. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  1051. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  1052. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  1053. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  1054. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genPresetColor.ts");
  1055. const antStatusProcessing = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antStatusProcessing', {
  1056. '0%': {
  1057. transform: 'scale(0.8)',
  1058. opacity: 0.5
  1059. },
  1060. '100%': {
  1061. transform: 'scale(2.4)',
  1062. opacity: 0
  1063. }
  1064. });
  1065. const antZoomBadgeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBadgeIn', {
  1066. '0%': {
  1067. transform: 'scale(0) translate(50%, -50%)',
  1068. opacity: 0
  1069. },
  1070. '100%': {
  1071. transform: 'scale(1) translate(50%, -50%)'
  1072. }
  1073. });
  1074. const antZoomBadgeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBadgeOut', {
  1075. '0%': {
  1076. transform: 'scale(1) translate(50%, -50%)'
  1077. },
  1078. '100%': {
  1079. transform: 'scale(0) translate(50%, -50%)',
  1080. opacity: 0
  1081. }
  1082. });
  1083. const antNoWrapperZoomBadgeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antNoWrapperZoomBadgeIn', {
  1084. '0%': {
  1085. transform: 'scale(0)',
  1086. opacity: 0
  1087. },
  1088. '100%': {
  1089. transform: 'scale(1)'
  1090. }
  1091. });
  1092. const antNoWrapperZoomBadgeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antNoWrapperZoomBadgeOut', {
  1093. '0%': {
  1094. transform: 'scale(1)'
  1095. },
  1096. '100%': {
  1097. transform: 'scale(0)',
  1098. opacity: 0
  1099. }
  1100. });
  1101. const antBadgeLoadingCircle = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antBadgeLoadingCircle', {
  1102. '0%': {
  1103. transformOrigin: '50%'
  1104. },
  1105. '100%': {
  1106. transform: 'translate(50%, -50%) rotate(360deg)',
  1107. transformOrigin: '50%'
  1108. }
  1109. });
  1110. const genSharedBadgeStyle = token => {
  1111. const {
  1112. componentCls,
  1113. iconCls,
  1114. antCls,
  1115. badgeShadowSize,
  1116. textFontSize,
  1117. textFontSizeSM,
  1118. statusSize,
  1119. dotSize,
  1120. textFontWeight,
  1121. indicatorHeight,
  1122. indicatorHeightSM,
  1123. marginXS,
  1124. calc
  1125. } = token;
  1126. const numberPrefixCls = `${antCls}-scroll-number`;
  1127. const colorPreset = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__["default"])(token, (colorKey, {
  1128. darkColor
  1129. }) => ({
  1130. [`&${componentCls} ${componentCls}-color-${colorKey}`]: {
  1131. background: darkColor,
  1132. [`&:not(${componentCls}-count)`]: {
  1133. color: darkColor
  1134. },
  1135. 'a:hover &': {
  1136. background: darkColor
  1137. }
  1138. }
  1139. }));
  1140. return {
  1141. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  1142. position: 'relative',
  1143. display: 'inline-block',
  1144. width: 'fit-content',
  1145. lineHeight: 1,
  1146. [`${componentCls}-count`]: {
  1147. display: 'inline-flex',
  1148. justifyContent: 'center',
  1149. zIndex: token.indicatorZIndex,
  1150. minWidth: indicatorHeight,
  1151. height: indicatorHeight,
  1152. color: token.badgeTextColor,
  1153. fontWeight: textFontWeight,
  1154. fontSize: textFontSize,
  1155. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(indicatorHeight),
  1156. whiteSpace: 'nowrap',
  1157. textAlign: 'center',
  1158. background: token.badgeColor,
  1159. borderRadius: calc(indicatorHeight).div(2).equal(),
  1160. boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(badgeShadowSize)} ${token.badgeShadowColor}`,
  1161. transition: `background ${token.motionDurationMid}`,
  1162. a: {
  1163. color: token.badgeTextColor
  1164. },
  1165. 'a:hover': {
  1166. color: token.badgeTextColor
  1167. },
  1168. 'a:hover &': {
  1169. background: token.badgeColorHover
  1170. }
  1171. },
  1172. [`${componentCls}-count-sm`]: {
  1173. minWidth: indicatorHeightSM,
  1174. height: indicatorHeightSM,
  1175. fontSize: textFontSizeSM,
  1176. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(indicatorHeightSM),
  1177. borderRadius: calc(indicatorHeightSM).div(2).equal()
  1178. },
  1179. [`${componentCls}-multiple-words`]: {
  1180. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)}`,
  1181. bdi: {
  1182. unicodeBidi: 'plaintext'
  1183. }
  1184. },
  1185. [`${componentCls}-dot`]: {
  1186. zIndex: token.indicatorZIndex,
  1187. width: dotSize,
  1188. minWidth: dotSize,
  1189. height: dotSize,
  1190. background: token.badgeColor,
  1191. borderRadius: '100%',
  1192. boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(badgeShadowSize)} ${token.badgeShadowColor}`
  1193. },
  1194. [`${componentCls}-count, ${componentCls}-dot, ${numberPrefixCls}-custom-component`]: {
  1195. position: 'absolute',
  1196. top: 0,
  1197. insetInlineEnd: 0,
  1198. transform: 'translate(50%, -50%)',
  1199. transformOrigin: '100% 0%',
  1200. [`&${iconCls}-spin`]: {
  1201. animationName: antBadgeLoadingCircle,
  1202. animationDuration: '1s',
  1203. animationIterationCount: 'infinite',
  1204. animationTimingFunction: 'linear'
  1205. }
  1206. },
  1207. [`&${componentCls}-status`]: {
  1208. lineHeight: 'inherit',
  1209. verticalAlign: 'baseline',
  1210. [`${componentCls}-status-dot`]: {
  1211. position: 'relative',
  1212. top: -1,
  1213. // Magic number, but seems better experience
  1214. display: 'inline-block',
  1215. width: statusSize,
  1216. height: statusSize,
  1217. verticalAlign: 'middle',
  1218. borderRadius: '50%'
  1219. },
  1220. [`${componentCls}-status-success`]: {
  1221. backgroundColor: token.colorSuccess
  1222. },
  1223. [`${componentCls}-status-processing`]: {
  1224. overflow: 'visible',
  1225. color: token.colorInfo,
  1226. backgroundColor: token.colorInfo,
  1227. borderColor: 'currentcolor',
  1228. '&::after': {
  1229. position: 'absolute',
  1230. top: 0,
  1231. insetInlineStart: 0,
  1232. width: '100%',
  1233. height: '100%',
  1234. borderWidth: badgeShadowSize,
  1235. borderStyle: 'solid',
  1236. borderColor: 'inherit',
  1237. borderRadius: '50%',
  1238. animationName: antStatusProcessing,
  1239. animationDuration: token.badgeProcessingDuration,
  1240. animationIterationCount: 'infinite',
  1241. animationTimingFunction: 'ease-in-out',
  1242. content: '""'
  1243. }
  1244. },
  1245. [`${componentCls}-status-default`]: {
  1246. backgroundColor: token.colorTextPlaceholder
  1247. },
  1248. [`${componentCls}-status-error`]: {
  1249. backgroundColor: token.colorError
  1250. },
  1251. [`${componentCls}-status-warning`]: {
  1252. backgroundColor: token.colorWarning
  1253. },
  1254. [`${componentCls}-status-text`]: {
  1255. marginInlineStart: marginXS,
  1256. color: token.colorText,
  1257. fontSize: token.fontSize
  1258. }
  1259. }
  1260. }), colorPreset), {
  1261. [`${componentCls}-zoom-appear, ${componentCls}-zoom-enter`]: {
  1262. animationName: antZoomBadgeIn,
  1263. animationDuration: token.motionDurationSlow,
  1264. animationTimingFunction: token.motionEaseOutBack,
  1265. animationFillMode: 'both'
  1266. },
  1267. [`${componentCls}-zoom-leave`]: {
  1268. animationName: antZoomBadgeOut,
  1269. animationDuration: token.motionDurationSlow,
  1270. animationTimingFunction: token.motionEaseOutBack,
  1271. animationFillMode: 'both'
  1272. },
  1273. [`&${componentCls}-not-a-wrapper`]: {
  1274. [`${componentCls}-zoom-appear, ${componentCls}-zoom-enter`]: {
  1275. animationName: antNoWrapperZoomBadgeIn,
  1276. animationDuration: token.motionDurationSlow,
  1277. animationTimingFunction: token.motionEaseOutBack
  1278. },
  1279. [`${componentCls}-zoom-leave`]: {
  1280. animationName: antNoWrapperZoomBadgeOut,
  1281. animationDuration: token.motionDurationSlow,
  1282. animationTimingFunction: token.motionEaseOutBack
  1283. },
  1284. [`&:not(${componentCls}-status)`]: {
  1285. verticalAlign: 'middle'
  1286. },
  1287. [`${numberPrefixCls}-custom-component, ${componentCls}-count`]: {
  1288. transform: 'none'
  1289. },
  1290. [`${numberPrefixCls}-custom-component, ${numberPrefixCls}`]: {
  1291. position: 'relative',
  1292. top: 'auto',
  1293. display: 'block',
  1294. transformOrigin: '50% 50%'
  1295. }
  1296. },
  1297. [numberPrefixCls]: {
  1298. overflow: 'hidden',
  1299. transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack}`,
  1300. [`${numberPrefixCls}-only`]: {
  1301. position: 'relative',
  1302. display: 'inline-block',
  1303. height: indicatorHeight,
  1304. transition: `all ${token.motionDurationSlow} ${token.motionEaseOutBack}`,
  1305. WebkitTransformStyle: 'preserve-3d',
  1306. WebkitBackfaceVisibility: 'hidden',
  1307. [`> p${numberPrefixCls}-only-unit`]: {
  1308. height: indicatorHeight,
  1309. margin: 0,
  1310. WebkitTransformStyle: 'preserve-3d',
  1311. WebkitBackfaceVisibility: 'hidden'
  1312. }
  1313. },
  1314. [`${numberPrefixCls}-symbol`]: {
  1315. verticalAlign: 'top'
  1316. }
  1317. },
  1318. // ====================== RTL =======================
  1319. '&-rtl': {
  1320. direction: 'rtl',
  1321. [`${componentCls}-count, ${componentCls}-dot, ${numberPrefixCls}-custom-component`]: {
  1322. transform: 'translate(-50%, -50%)'
  1323. }
  1324. }
  1325. })
  1326. };
  1327. };
  1328. // ============================== Export ==============================
  1329. const prepareToken = token => {
  1330. const {
  1331. fontHeight,
  1332. lineWidth,
  1333. marginXS,
  1334. colorBorderBg
  1335. } = token;
  1336. const badgeFontHeight = fontHeight;
  1337. const badgeShadowSize = lineWidth;
  1338. const badgeTextColor = token.colorTextLightSolid;
  1339. const badgeColor = token.colorError;
  1340. const badgeColorHover = token.colorErrorHover;
  1341. const badgeToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  1342. badgeFontHeight,
  1343. badgeShadowSize,
  1344. badgeTextColor,
  1345. badgeColor,
  1346. badgeColorHover,
  1347. badgeShadowColor: colorBorderBg,
  1348. badgeProcessingDuration: '1.2s',
  1349. badgeRibbonOffset: marginXS,
  1350. // Follow token just by Design. Not related with token
  1351. badgeRibbonCornerTransform: 'scaleY(0.75)',
  1352. badgeRibbonCornerFilter: `brightness(75%)`
  1353. });
  1354. return badgeToken;
  1355. };
  1356. const prepareComponentToken = token => {
  1357. const {
  1358. fontSize,
  1359. lineHeight,
  1360. fontSizeSM,
  1361. lineWidth
  1362. } = token;
  1363. return {
  1364. indicatorZIndex: 'auto',
  1365. indicatorHeight: Math.round(fontSize * lineHeight) - 2 * lineWidth,
  1366. indicatorHeightSM: fontSize,
  1367. dotSize: fontSizeSM / 2,
  1368. textFontSize: fontSizeSM,
  1369. textFontSizeSM: fontSizeSM,
  1370. textFontWeight: 'normal',
  1371. statusSize: fontSizeSM / 2
  1372. };
  1373. };
  1374. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Badge', token => {
  1375. const badgeToken = prepareToken(token);
  1376. return genSharedBadgeStyle(badgeToken);
  1377. }, prepareComponentToken));
  1378. /***/ }),
  1379. /***/ "./components/breadcrumb/style/index.ts":
  1380. /*!**********************************************!*\
  1381. !*** ./components/breadcrumb/style/index.ts ***!
  1382. \**********************************************/
  1383. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  1384. "use strict";
  1385. __webpack_require__.r(__webpack_exports__);
  1386. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1387. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  1388. /* harmony export */ });
  1389. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  1390. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  1391. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  1392. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  1393. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  1394. const genBreadcrumbStyle = token => {
  1395. const {
  1396. componentCls,
  1397. iconCls,
  1398. calc
  1399. } = token;
  1400. return {
  1401. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  1402. color: token.itemColor,
  1403. fontSize: token.fontSize,
  1404. [iconCls]: {
  1405. fontSize: token.iconFontSize
  1406. },
  1407. ol: {
  1408. display: 'flex',
  1409. flexWrap: 'wrap',
  1410. margin: 0,
  1411. padding: 0,
  1412. listStyle: 'none'
  1413. },
  1414. a: Object.assign({
  1415. color: token.linkColor,
  1416. transition: `color ${token.motionDurationMid}`,
  1417. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXXS)}`,
  1418. borderRadius: token.borderRadiusSM,
  1419. height: token.fontHeight,
  1420. display: 'inline-block',
  1421. marginInline: calc(token.marginXXS).mul(-1).equal(),
  1422. '&:hover': {
  1423. color: token.linkHoverColor,
  1424. backgroundColor: token.colorBgTextHover
  1425. }
  1426. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusStyle)(token)),
  1427. 'li:last-child': {
  1428. color: token.lastItemColor
  1429. },
  1430. [`${componentCls}-separator`]: {
  1431. marginInline: token.separatorMargin,
  1432. color: token.separatorColor
  1433. },
  1434. [`${componentCls}-link`]: {
  1435. [`
  1436. > ${iconCls} + span,
  1437. > ${iconCls} + a
  1438. `]: {
  1439. marginInlineStart: token.marginXXS
  1440. }
  1441. },
  1442. [`${componentCls}-overlay-link`]: {
  1443. borderRadius: token.borderRadiusSM,
  1444. height: token.fontHeight,
  1445. display: 'inline-block',
  1446. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXXS)}`,
  1447. marginInline: calc(token.marginXXS).mul(-1).equal(),
  1448. [`> ${iconCls}`]: {
  1449. marginInlineStart: token.marginXXS,
  1450. fontSize: token.fontSizeIcon
  1451. },
  1452. '&:hover': {
  1453. color: token.linkHoverColor,
  1454. backgroundColor: token.colorBgTextHover,
  1455. a: {
  1456. color: token.linkHoverColor
  1457. }
  1458. },
  1459. a: {
  1460. '&:hover': {
  1461. backgroundColor: 'transparent'
  1462. }
  1463. }
  1464. },
  1465. // rtl style
  1466. [`&${token.componentCls}-rtl`]: {
  1467. direction: 'rtl'
  1468. }
  1469. })
  1470. };
  1471. };
  1472. const prepareComponentToken = token => ({
  1473. itemColor: token.colorTextDescription,
  1474. lastItemColor: token.colorText,
  1475. iconFontSize: token.fontSize,
  1476. linkColor: token.colorTextDescription,
  1477. linkHoverColor: token.colorText,
  1478. separatorColor: token.colorTextDescription,
  1479. separatorMargin: token.marginXS
  1480. });
  1481. // ============================== Export ==============================
  1482. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Breadcrumb', token => {
  1483. const breadcrumbToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {});
  1484. return genBreadcrumbStyle(breadcrumbToken);
  1485. }, prepareComponentToken));
  1486. /***/ }),
  1487. /***/ "./components/button/style/index.ts":
  1488. /*!******************************************************!*\
  1489. !*** ./components/button/style/index.ts + 1 modules ***!
  1490. \******************************************************/
  1491. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  1492. "use strict";
  1493. // ESM COMPAT FLAG
  1494. __webpack_require__.r(__webpack_exports__);
  1495. // EXPORTS
  1496. __webpack_require__.d(__webpack_exports__, {
  1497. "default": function() { return /* binding */ button_style; }
  1498. });
  1499. // EXTERNAL MODULE: ./alias/cssinjs.js
  1500. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  1501. // EXTERNAL MODULE: ./components/style/index.tsx
  1502. var style = __webpack_require__("./components/style/index.tsx");
  1503. // EXTERNAL MODULE: ./components/theme/interface/presetColors.ts
  1504. var presetColors = __webpack_require__("./components/theme/interface/presetColors.ts");
  1505. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  1506. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  1507. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  1508. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  1509. ;// ./components/button/style/group.ts
  1510. const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
  1511. // Border
  1512. [`> span, > ${buttonTypeCls}`]: {
  1513. '&:not(:last-child)': {
  1514. [`&, & > ${buttonTypeCls}`]: {
  1515. '&:not(:disabled)': {
  1516. borderInlineEndColor: borderColor
  1517. }
  1518. }
  1519. },
  1520. '&:not(:first-child)': {
  1521. [`&, & > ${buttonTypeCls}`]: {
  1522. '&:not(:disabled)': {
  1523. borderInlineStartColor: borderColor
  1524. }
  1525. }
  1526. }
  1527. }
  1528. });
  1529. const genGroupStyle = token => {
  1530. const {
  1531. componentCls,
  1532. fontSize,
  1533. lineWidth,
  1534. groupBorderColor,
  1535. colorErrorHover
  1536. } = token;
  1537. return {
  1538. [`${componentCls}-group`]: [{
  1539. position: 'relative',
  1540. display: 'inline-flex',
  1541. // Border
  1542. [`> span, > ${componentCls}`]: {
  1543. '&:not(:last-child)': {
  1544. [`&, & > ${componentCls}`]: {
  1545. borderStartEndRadius: 0,
  1546. borderEndEndRadius: 0
  1547. }
  1548. },
  1549. '&:not(:first-child)': {
  1550. marginInlineStart: token.calc(lineWidth).mul(-1).equal(),
  1551. [`&, & > ${componentCls}`]: {
  1552. borderStartStartRadius: 0,
  1553. borderEndStartRadius: 0
  1554. }
  1555. }
  1556. },
  1557. [componentCls]: {
  1558. position: 'relative',
  1559. zIndex: 1,
  1560. '&:hover, &:focus, &:active': {
  1561. zIndex: 2
  1562. },
  1563. '&[disabled]': {
  1564. zIndex: 0
  1565. }
  1566. },
  1567. [`${componentCls}-icon-only`]: {
  1568. fontSize
  1569. }
  1570. },
  1571. // Border Color
  1572. genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
  1573. };
  1574. };
  1575. /* harmony default export */ var group = (genGroupStyle);
  1576. // EXTERNAL MODULE: ./components/button/style/token.ts
  1577. var style_token = __webpack_require__("./components/button/style/token.ts");
  1578. ;// ./components/button/style/index.ts
  1579. // ============================== Shared ==============================
  1580. const genSharedButtonStyle = token => {
  1581. const {
  1582. componentCls,
  1583. iconCls,
  1584. fontWeight,
  1585. opacityLoading,
  1586. motionDurationSlow,
  1587. motionEaseInOut,
  1588. iconGap,
  1589. calc
  1590. } = token;
  1591. return {
  1592. [componentCls]: {
  1593. outline: 'none',
  1594. position: 'relative',
  1595. display: 'inline-flex',
  1596. gap: iconGap,
  1597. alignItems: 'center',
  1598. justifyContent: 'center',
  1599. fontWeight,
  1600. whiteSpace: 'nowrap',
  1601. textAlign: 'center',
  1602. backgroundImage: 'none',
  1603. background: 'transparent',
  1604. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
  1605. cursor: 'pointer',
  1606. transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
  1607. userSelect: 'none',
  1608. touchAction: 'manipulation',
  1609. color: token.colorText,
  1610. '&:disabled > *': {
  1611. pointerEvents: 'none'
  1612. },
  1613. // https://github.com/ant-design/ant-design/issues/51380
  1614. [`${componentCls}-icon > svg`]: (0,style.resetIcon)(),
  1615. '> a': {
  1616. color: 'currentColor'
  1617. },
  1618. '&:not(:disabled)': (0,style.genFocusStyle)(token),
  1619. [`&${componentCls}-two-chinese-chars::first-letter`]: {
  1620. letterSpacing: '0.34em'
  1621. },
  1622. [`&${componentCls}-two-chinese-chars > *:not(${iconCls})`]: {
  1623. marginInlineEnd: '-0.34em',
  1624. letterSpacing: '0.34em'
  1625. },
  1626. [`&${componentCls}-icon-only`]: {
  1627. paddingInline: 0,
  1628. // make `btn-icon-only` not too narrow
  1629. [`&${componentCls}-compact-item`]: {
  1630. flex: 'none'
  1631. }
  1632. },
  1633. // Loading
  1634. [`&${componentCls}-loading`]: {
  1635. opacity: opacityLoading,
  1636. cursor: 'default'
  1637. },
  1638. [`${componentCls}-loading-icon`]: {
  1639. transition: ['width', 'opacity', 'margin'].map(transition => `${transition} ${motionDurationSlow} ${motionEaseInOut}`).join(',')
  1640. },
  1641. // iconPosition
  1642. [`&:not(${componentCls}-icon-end)`]: {
  1643. [`${componentCls}-loading-icon-motion`]: {
  1644. '&-appear-start, &-enter-start': {
  1645. marginInlineEnd: calc(iconGap).mul(-1).equal()
  1646. },
  1647. '&-appear-active, &-enter-active': {
  1648. marginInlineEnd: 0
  1649. },
  1650. '&-leave-start': {
  1651. marginInlineEnd: 0
  1652. },
  1653. '&-leave-active': {
  1654. marginInlineEnd: calc(iconGap).mul(-1).equal()
  1655. }
  1656. }
  1657. },
  1658. '&-icon-end': {
  1659. flexDirection: 'row-reverse',
  1660. [`${componentCls}-loading-icon-motion`]: {
  1661. '&-appear-start, &-enter-start': {
  1662. marginInlineStart: calc(iconGap).mul(-1).equal()
  1663. },
  1664. '&-appear-active, &-enter-active': {
  1665. marginInlineStart: 0
  1666. },
  1667. '&-leave-start': {
  1668. marginInlineStart: 0
  1669. },
  1670. '&-leave-active': {
  1671. marginInlineStart: calc(iconGap).mul(-1).equal()
  1672. }
  1673. }
  1674. }
  1675. }
  1676. };
  1677. };
  1678. const genHoverActiveButtonStyle = (btnCls, hoverStyle, activeStyle) => ({
  1679. [`&:not(:disabled):not(${btnCls}-disabled)`]: {
  1680. '&:hover': hoverStyle,
  1681. '&:active': activeStyle
  1682. }
  1683. });
  1684. // ============================== Shape ===============================
  1685. const genCircleButtonStyle = token => ({
  1686. minWidth: token.controlHeight,
  1687. paddingInline: 0,
  1688. borderRadius: '50%'
  1689. });
  1690. const genDisabledStyle = token => ({
  1691. cursor: 'not-allowed',
  1692. borderColor: token.borderColorDisabled,
  1693. color: token.colorTextDisabled,
  1694. background: token.colorBgContainerDisabled,
  1695. boxShadow: 'none'
  1696. });
  1697. const genGhostButtonStyle = (btnCls, background, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) => ({
  1698. [`&${btnCls}-background-ghost`]: Object.assign(Object.assign({
  1699. color: textColor || undefined,
  1700. background,
  1701. borderColor: borderColor || undefined,
  1702. boxShadow: 'none'
  1703. }, genHoverActiveButtonStyle(btnCls, Object.assign({
  1704. background
  1705. }, hoverStyle), Object.assign({
  1706. background
  1707. }, activeStyle))), {
  1708. '&:disabled': {
  1709. cursor: 'not-allowed',
  1710. color: textColorDisabled || undefined,
  1711. borderColor: borderColorDisabled || undefined
  1712. }
  1713. })
  1714. });
  1715. const genSolidDisabledButtonStyle = token => ({
  1716. [`&:disabled, &${token.componentCls}-disabled`]: Object.assign({}, genDisabledStyle(token))
  1717. });
  1718. const genPureDisabledButtonStyle = token => ({
  1719. [`&:disabled, &${token.componentCls}-disabled`]: {
  1720. cursor: 'not-allowed',
  1721. color: token.colorTextDisabled
  1722. }
  1723. });
  1724. // ============================== Variant =============================
  1725. const genVariantButtonStyle = (token, hoverStyle, activeStyle, variant) => {
  1726. const isPureDisabled = variant && ['link', 'text'].includes(variant);
  1727. const genDisabledButtonStyle = isPureDisabled ? genPureDisabledButtonStyle : genSolidDisabledButtonStyle;
  1728. return Object.assign(Object.assign({}, genDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, hoverStyle, activeStyle));
  1729. };
  1730. const genSolidButtonStyle = (token, textColor, background, hoverStyle, activeStyle) => ({
  1731. [`&${token.componentCls}-variant-solid`]: Object.assign({
  1732. color: textColor,
  1733. background
  1734. }, genVariantButtonStyle(token, hoverStyle, activeStyle))
  1735. });
  1736. const genOutlinedDashedButtonStyle = (token, borderColor, background, hoverStyle, activeStyle) => ({
  1737. [`&${token.componentCls}-variant-outlined, &${token.componentCls}-variant-dashed`]: Object.assign({
  1738. borderColor,
  1739. background
  1740. }, genVariantButtonStyle(token, hoverStyle, activeStyle))
  1741. });
  1742. const genDashedButtonStyle = token => ({
  1743. [`&${token.componentCls}-variant-dashed`]: {
  1744. borderStyle: 'dashed'
  1745. }
  1746. });
  1747. const genFilledButtonStyle = (token, background, hoverStyle, activeStyle) => ({
  1748. [`&${token.componentCls}-variant-filled`]: Object.assign({
  1749. boxShadow: 'none',
  1750. background
  1751. }, genVariantButtonStyle(token, hoverStyle, activeStyle))
  1752. });
  1753. const genTextLinkButtonStyle = (token, textColor, variant, hoverStyle, activeStyle) => ({
  1754. [`&${token.componentCls}-variant-${variant}`]: Object.assign({
  1755. color: textColor,
  1756. boxShadow: 'none'
  1757. }, genVariantButtonStyle(token, hoverStyle, activeStyle, variant))
  1758. });
  1759. // =============================== Color ==============================
  1760. const genPresetColorStyle = token => {
  1761. const {
  1762. componentCls
  1763. } = token;
  1764. return presetColors.PresetColors.reduce((prev, colorKey) => {
  1765. const darkColor = token[`${colorKey}6`];
  1766. const lightColor = token[`${colorKey}1`];
  1767. const hoverColor = token[`${colorKey}5`];
  1768. const lightHoverColor = token[`${colorKey}2`];
  1769. const lightBorderColor = token[`${colorKey}3`];
  1770. const activeColor = token[`${colorKey}7`];
  1771. return Object.assign(Object.assign({}, prev), {
  1772. [`&${componentCls}-color-${colorKey}`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  1773. color: darkColor,
  1774. boxShadow: token[`${colorKey}ShadowColor`]
  1775. }, genSolidButtonStyle(token, token.colorTextLightSolid, darkColor, {
  1776. background: hoverColor
  1777. }, {
  1778. background: activeColor
  1779. })), genOutlinedDashedButtonStyle(token, darkColor, token.colorBgContainer, {
  1780. color: hoverColor,
  1781. borderColor: hoverColor,
  1782. background: token.colorBgContainer
  1783. }, {
  1784. color: activeColor,
  1785. borderColor: activeColor,
  1786. background: token.colorBgContainer
  1787. })), genDashedButtonStyle(token)), genFilledButtonStyle(token, lightColor, {
  1788. color: darkColor,
  1789. background: lightHoverColor
  1790. }, {
  1791. color: darkColor,
  1792. background: lightBorderColor
  1793. })), genTextLinkButtonStyle(token, darkColor, 'link', {
  1794. color: hoverColor
  1795. }, {
  1796. color: activeColor
  1797. })), genTextLinkButtonStyle(token, darkColor, 'text', {
  1798. color: hoverColor,
  1799. background: lightColor
  1800. }, {
  1801. color: activeColor,
  1802. background: lightBorderColor
  1803. }))
  1804. });
  1805. }, {});
  1806. };
  1807. const genDefaultButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  1808. color: token.defaultColor,
  1809. boxShadow: token.defaultShadow
  1810. }, genSolidButtonStyle(token, token.solidTextColor, token.colorBgSolid, {
  1811. color: token.solidTextColor,
  1812. background: token.colorBgSolidHover
  1813. }, {
  1814. color: token.solidTextColor,
  1815. background: token.colorBgSolidActive
  1816. })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {
  1817. color: token.defaultColor,
  1818. background: token.colorFillSecondary
  1819. }, {
  1820. color: token.defaultColor,
  1821. background: token.colorFill
  1822. })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
  1823. color: token.colorLinkHover,
  1824. background: token.linkHoverBg
  1825. }, {
  1826. color: token.colorLinkActive
  1827. }));
  1828. const genPrimaryButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  1829. color: token.colorPrimary,
  1830. boxShadow: token.primaryShadow
  1831. }, genOutlinedDashedButtonStyle(token, token.colorPrimary, token.colorBgContainer, {
  1832. color: token.colorPrimaryTextHover,
  1833. borderColor: token.colorPrimaryHover,
  1834. background: token.colorBgContainer
  1835. }, {
  1836. color: token.colorPrimaryTextActive,
  1837. borderColor: token.colorPrimaryActive,
  1838. background: token.colorBgContainer
  1839. })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorPrimaryBg, {
  1840. color: token.colorPrimary,
  1841. background: token.colorPrimaryBgHover
  1842. }, {
  1843. color: token.colorPrimary,
  1844. background: token.colorPrimaryBorder
  1845. })), genTextLinkButtonStyle(token, token.colorPrimaryText, 'text', {
  1846. color: token.colorPrimaryTextHover,
  1847. background: token.colorPrimaryBg
  1848. }, {
  1849. color: token.colorPrimaryTextActive,
  1850. background: token.colorPrimaryBorder
  1851. })), genTextLinkButtonStyle(token, token.colorPrimaryText, 'link', {
  1852. color: token.colorPrimaryTextHover,
  1853. background: token.linkHoverBg
  1854. }, {
  1855. color: token.colorPrimaryTextActive
  1856. })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {
  1857. color: token.colorPrimaryHover,
  1858. borderColor: token.colorPrimaryHover
  1859. }, {
  1860. color: token.colorPrimaryActive,
  1861. borderColor: token.colorPrimaryActive
  1862. }));
  1863. const genDangerousStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  1864. color: token.colorError,
  1865. boxShadow: token.dangerShadow
  1866. }, genSolidButtonStyle(token, token.dangerColor, token.colorError, {
  1867. background: token.colorErrorHover
  1868. }, {
  1869. background: token.colorErrorActive
  1870. })), genOutlinedDashedButtonStyle(token, token.colorError, token.colorBgContainer, {
  1871. color: token.colorErrorHover,
  1872. borderColor: token.colorErrorBorderHover
  1873. }, {
  1874. color: token.colorErrorActive,
  1875. borderColor: token.colorErrorActive
  1876. })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorErrorBg, {
  1877. color: token.colorError,
  1878. background: token.colorErrorBgFilledHover
  1879. }, {
  1880. color: token.colorError,
  1881. background: token.colorErrorBgActive
  1882. })), genTextLinkButtonStyle(token, token.colorError, 'text', {
  1883. color: token.colorErrorHover,
  1884. background: token.colorErrorBg
  1885. }, {
  1886. color: token.colorErrorHover,
  1887. background: token.colorErrorBgActive
  1888. })), genTextLinkButtonStyle(token, token.colorError, 'link', {
  1889. color: token.colorErrorHover
  1890. }, {
  1891. color: token.colorErrorActive
  1892. })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {
  1893. color: token.colorErrorHover,
  1894. borderColor: token.colorErrorHover
  1895. }, {
  1896. color: token.colorErrorActive,
  1897. borderColor: token.colorErrorActive
  1898. }));
  1899. const genLinkStyle = token => Object.assign(Object.assign({}, genTextLinkButtonStyle(token, token.colorLink, 'link', {
  1900. color: token.colorLinkHover
  1901. }, {
  1902. color: token.colorLinkActive
  1903. })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorInfo, token.colorInfo, token.colorTextDisabled, token.colorBorder, {
  1904. color: token.colorInfoHover,
  1905. borderColor: token.colorInfoHover
  1906. }, {
  1907. color: token.colorInfoActive,
  1908. borderColor: token.colorInfoActive
  1909. }));
  1910. const genColorButtonStyle = token => {
  1911. const {
  1912. componentCls
  1913. } = token;
  1914. return Object.assign({
  1915. [`${componentCls}-color-default`]: genDefaultButtonStyle(token),
  1916. [`${componentCls}-color-primary`]: genPrimaryButtonStyle(token),
  1917. [`${componentCls}-color-dangerous`]: genDangerousStyle(token),
  1918. [`${componentCls}-color-link`]: genLinkStyle(token)
  1919. }, genPresetColorStyle(token));
  1920. };
  1921. // =========== Compatible with versions earlier than 5.21.0 ===========
  1922. const genCompatibleButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedDashedButtonStyle(token, token.defaultBorderColor, token.defaultBg, {
  1923. color: token.defaultHoverColor,
  1924. borderColor: token.defaultHoverBorderColor,
  1925. background: token.defaultHoverBg
  1926. }, {
  1927. color: token.defaultActiveColor,
  1928. borderColor: token.defaultActiveBorderColor,
  1929. background: token.defaultActiveBg
  1930. })), genTextLinkButtonStyle(token, token.textTextColor, 'text', {
  1931. color: token.textTextHoverColor,
  1932. background: token.textHoverBg
  1933. }, {
  1934. color: token.textTextActiveColor,
  1935. background: token.colorBgTextActive
  1936. })), genSolidButtonStyle(token, token.primaryColor, token.colorPrimary, {
  1937. background: token.colorPrimaryHover,
  1938. color: token.primaryColor
  1939. }, {
  1940. background: token.colorPrimaryActive,
  1941. color: token.primaryColor
  1942. })), genTextLinkButtonStyle(token, token.colorLink, 'link', {
  1943. color: token.colorLinkHover,
  1944. background: token.linkHoverBg
  1945. }, {
  1946. color: token.colorLinkActive
  1947. }));
  1948. // =============================== Size ===============================
  1949. const genButtonStyle = (token, prefixCls = '') => {
  1950. const {
  1951. componentCls,
  1952. controlHeight,
  1953. fontSize,
  1954. borderRadius,
  1955. buttonPaddingHorizontal,
  1956. iconCls,
  1957. buttonPaddingVertical,
  1958. buttonIconOnlyFontSize
  1959. } = token;
  1960. return [{
  1961. [prefixCls]: {
  1962. fontSize,
  1963. height: controlHeight,
  1964. padding: `${(0,cssinjs.unit)(buttonPaddingVertical)} ${(0,cssinjs.unit)(buttonPaddingHorizontal)}`,
  1965. borderRadius,
  1966. [`&${componentCls}-icon-only`]: {
  1967. width: controlHeight,
  1968. [iconCls]: {
  1969. fontSize: buttonIconOnlyFontSize
  1970. }
  1971. }
  1972. }
  1973. },
  1974. // Shape - patch prefixCls again to override solid border radius style
  1975. {
  1976. [`${componentCls}${componentCls}-circle${prefixCls}`]: genCircleButtonStyle(token)
  1977. }, {
  1978. [`${componentCls}${componentCls}-round${prefixCls}`]: {
  1979. borderRadius: token.controlHeight,
  1980. [`&:not(${componentCls}-icon-only)`]: {
  1981. paddingInline: token.buttonPaddingHorizontal
  1982. }
  1983. }
  1984. }];
  1985. };
  1986. const genSizeBaseButtonStyle = token => {
  1987. const baseToken = (0,es.mergeToken)(token, {
  1988. fontSize: token.contentFontSize
  1989. });
  1990. return genButtonStyle(baseToken, token.componentCls);
  1991. };
  1992. const genSizeSmallButtonStyle = token => {
  1993. const smallToken = (0,es.mergeToken)(token, {
  1994. controlHeight: token.controlHeightSM,
  1995. fontSize: token.contentFontSizeSM,
  1996. padding: token.paddingXS,
  1997. buttonPaddingHorizontal: token.paddingInlineSM,
  1998. buttonPaddingVertical: 0,
  1999. borderRadius: token.borderRadiusSM,
  2000. buttonIconOnlyFontSize: token.onlyIconSizeSM
  2001. });
  2002. return genButtonStyle(smallToken, `${token.componentCls}-sm`);
  2003. };
  2004. const genSizeLargeButtonStyle = token => {
  2005. const largeToken = (0,es.mergeToken)(token, {
  2006. controlHeight: token.controlHeightLG,
  2007. fontSize: token.contentFontSizeLG,
  2008. buttonPaddingHorizontal: token.paddingInlineLG,
  2009. buttonPaddingVertical: 0,
  2010. borderRadius: token.borderRadiusLG,
  2011. buttonIconOnlyFontSize: token.onlyIconSizeLG
  2012. });
  2013. return genButtonStyle(largeToken, `${token.componentCls}-lg`);
  2014. };
  2015. const genBlockButtonStyle = token => {
  2016. const {
  2017. componentCls
  2018. } = token;
  2019. return {
  2020. [componentCls]: {
  2021. [`&${componentCls}-block`]: {
  2022. width: '100%'
  2023. }
  2024. }
  2025. };
  2026. };
  2027. // ============================== Export ==============================
  2028. /* harmony default export */ var button_style = ((0,genStyleUtils.genStyleHooks)('Button', token => {
  2029. const buttonToken = (0,style_token.prepareToken)(token);
  2030. return [
  2031. // Shared
  2032. genSharedButtonStyle(buttonToken),
  2033. // Size
  2034. genSizeBaseButtonStyle(buttonToken), genSizeSmallButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),
  2035. // Block
  2036. genBlockButtonStyle(buttonToken),
  2037. // Color
  2038. genColorButtonStyle(buttonToken),
  2039. // https://github.com/ant-design/ant-design/issues/50969
  2040. genCompatibleButtonStyle(buttonToken),
  2041. // Button Group
  2042. group(buttonToken)];
  2043. }, style_token.prepareComponentToken, {
  2044. unitless: {
  2045. fontWeight: true,
  2046. contentLineHeight: true,
  2047. contentLineHeightSM: true,
  2048. contentLineHeightLG: true
  2049. }
  2050. }));
  2051. /***/ }),
  2052. /***/ "./components/button/style/token.ts":
  2053. /*!******************************************!*\
  2054. !*** ./components/button/style/token.ts ***!
  2055. \******************************************/
  2056. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  2057. "use strict";
  2058. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2059. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  2060. /* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
  2061. /* harmony export */ });
  2062. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  2063. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  2064. /* harmony import */ var _color_picker_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../color-picker/color */ "./components/color-picker/color.ts");
  2065. /* harmony import */ var _color_picker_components_ColorPresets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../color-picker/components/ColorPresets */ "./components/color-picker/components/ColorPresets.tsx");
  2066. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  2067. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/themes/shared/genFontSizes.ts");
  2068. /* harmony import */ var _theme_interface__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/interface */ "./components/theme/interface/presetColors.ts");
  2069. /* harmony import */ var _theme_util_getAlphaColor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/util/getAlphaColor */ "./components/theme/util/getAlphaColor.ts");
  2070. const prepareToken = token => {
  2071. const {
  2072. paddingInline,
  2073. onlyIconSize
  2074. } = token;
  2075. const buttonToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  2076. buttonPaddingHorizontal: paddingInline,
  2077. buttonPaddingVertical: 0,
  2078. buttonIconOnlyFontSize: onlyIconSize
  2079. });
  2080. return buttonToken;
  2081. };
  2082. const prepareComponentToken = token => {
  2083. var _a, _b, _c, _d, _e, _f;
  2084. const contentFontSize = (_a = token.contentFontSize) !== null && _a !== void 0 ? _a : token.fontSize;
  2085. const contentFontSizeSM = (_b = token.contentFontSizeSM) !== null && _b !== void 0 ? _b : token.fontSize;
  2086. const contentFontSizeLG = (_c = token.contentFontSizeLG) !== null && _c !== void 0 ? _c : token.fontSizeLG;
  2087. const contentLineHeight = (_d = token.contentLineHeight) !== null && _d !== void 0 ? _d : (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.getLineHeight)(contentFontSize);
  2088. const contentLineHeightSM = (_e = token.contentLineHeightSM) !== null && _e !== void 0 ? _e : (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.getLineHeight)(contentFontSizeSM);
  2089. const contentLineHeightLG = (_f = token.contentLineHeightLG) !== null && _f !== void 0 ? _f : (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.getLineHeight)(contentFontSizeLG);
  2090. const solidTextColor = (0,_color_picker_components_ColorPresets__WEBPACK_IMPORTED_MODULE_2__.isBright)(new _color_picker_color__WEBPACK_IMPORTED_MODULE_1__.AggregationColor(token.colorBgSolid), '#fff') ? '#000' : '#fff';
  2091. const shadowColorTokens = _theme_interface__WEBPACK_IMPORTED_MODULE_5__.PresetColors.reduce((prev, colorKey) => Object.assign(Object.assign({}, prev), {
  2092. [`${colorKey}ShadowColor`]: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.controlOutlineWidth)} 0 ${(0,_theme_util_getAlphaColor__WEBPACK_IMPORTED_MODULE_6__["default"])(token[`${colorKey}1`], token.colorBgContainer)}`
  2093. }), {});
  2094. return Object.assign(Object.assign({}, shadowColorTokens), {
  2095. fontWeight: 400,
  2096. iconGap: token.marginXS,
  2097. defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,
  2098. primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,
  2099. dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,
  2100. primaryColor: token.colorTextLightSolid,
  2101. dangerColor: token.colorTextLightSolid,
  2102. borderColorDisabled: token.colorBorder,
  2103. defaultGhostColor: token.colorBgContainer,
  2104. ghostBg: 'transparent',
  2105. defaultGhostBorderColor: token.colorBgContainer,
  2106. paddingInline: token.paddingContentHorizontal - token.lineWidth,
  2107. paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,
  2108. paddingInlineSM: 8 - token.lineWidth,
  2109. onlyIconSize: 'inherit',
  2110. onlyIconSizeSM: 'inherit',
  2111. onlyIconSizeLG: 'inherit',
  2112. groupBorderColor: token.colorPrimaryHover,
  2113. linkHoverBg: 'transparent',
  2114. textTextColor: token.colorText,
  2115. textTextHoverColor: token.colorText,
  2116. textTextActiveColor: token.colorText,
  2117. textHoverBg: token.colorFillTertiary,
  2118. defaultColor: token.colorText,
  2119. defaultBg: token.colorBgContainer,
  2120. defaultBorderColor: token.colorBorder,
  2121. defaultBorderColorDisabled: token.colorBorder,
  2122. defaultHoverBg: token.colorBgContainer,
  2123. defaultHoverColor: token.colorPrimaryHover,
  2124. defaultHoverBorderColor: token.colorPrimaryHover,
  2125. defaultActiveBg: token.colorBgContainer,
  2126. defaultActiveColor: token.colorPrimaryActive,
  2127. defaultActiveBorderColor: token.colorPrimaryActive,
  2128. solidTextColor,
  2129. contentFontSize,
  2130. contentFontSizeSM,
  2131. contentFontSizeLG,
  2132. contentLineHeight,
  2133. contentLineHeightSM,
  2134. contentLineHeightLG,
  2135. paddingBlock: Math.max((token.controlHeight - contentFontSize * contentLineHeight) / 2 - token.lineWidth, 0),
  2136. paddingBlockSM: Math.max((token.controlHeightSM - contentFontSizeSM * contentLineHeightSM) / 2 - token.lineWidth, 0),
  2137. paddingBlockLG: Math.max((token.controlHeightLG - contentFontSizeLG * contentLineHeightLG) / 2 - token.lineWidth, 0)
  2138. });
  2139. };
  2140. /***/ }),
  2141. /***/ "./components/calendar/locale/en_US.ts":
  2142. /*!*********************************************!*\
  2143. !*** ./components/calendar/locale/en_US.ts ***!
  2144. \*********************************************/
  2145. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  2146. "use strict";
  2147. /* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.ts");
  2148. /* harmony default export */ __webpack_exports__["default"] = (_date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_0__["default"]);
  2149. /***/ }),
  2150. /***/ "./components/calendar/style/index.ts":
  2151. /*!********************************************!*\
  2152. !*** ./components/calendar/style/index.ts ***!
  2153. \********************************************/
  2154. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  2155. "use strict";
  2156. __webpack_require__.r(__webpack_exports__);
  2157. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2158. /* harmony export */ genCalendarStyles: function() { return /* binding */ genCalendarStyles; },
  2159. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  2160. /* harmony export */ });
  2161. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  2162. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  2163. /* harmony import */ var _date_picker_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../date-picker/style */ "./components/date-picker/style/panel.ts");
  2164. /* harmony import */ var _date_picker_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../date-picker/style */ "./components/date-picker/style/token.ts");
  2165. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  2166. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  2167. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  2168. const genCalendarStyles = token => {
  2169. const {
  2170. calendarCls,
  2171. componentCls,
  2172. fullBg,
  2173. fullPanelBg,
  2174. itemActiveBg
  2175. } = token;
  2176. return {
  2177. [calendarCls]: Object.assign(Object.assign(Object.assign({}, (0,_date_picker_style__WEBPACK_IMPORTED_MODULE_1__.genPanelStyle)(token)), (0,_style__WEBPACK_IMPORTED_MODULE_3__.resetComponent)(token)), {
  2178. background: fullBg,
  2179. '&-rtl': {
  2180. direction: 'rtl'
  2181. },
  2182. [`${calendarCls}-header`]: {
  2183. display: 'flex',
  2184. justifyContent: 'flex-end',
  2185. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingSM)} 0`,
  2186. [`${calendarCls}-year-select`]: {
  2187. minWidth: token.yearControlWidth
  2188. },
  2189. [`${calendarCls}-month-select`]: {
  2190. minWidth: token.monthControlWidth,
  2191. marginInlineStart: token.marginXS
  2192. },
  2193. [`${calendarCls}-mode-switch`]: {
  2194. marginInlineStart: token.marginXS
  2195. }
  2196. }
  2197. }),
  2198. [`${calendarCls} ${componentCls}-panel`]: {
  2199. background: fullPanelBg,
  2200. border: 0,
  2201. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  2202. borderRadius: 0,
  2203. [`${componentCls}-month-panel, ${componentCls}-date-panel`]: {
  2204. width: 'auto'
  2205. },
  2206. [`${componentCls}-body`]: {
  2207. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} 0`
  2208. },
  2209. [`${componentCls}-content`]: {
  2210. width: '100%'
  2211. }
  2212. },
  2213. [`${calendarCls}-mini`]: {
  2214. borderRadius: token.borderRadiusLG,
  2215. [`${calendarCls}-header`]: {
  2216. paddingInlineEnd: token.paddingXS,
  2217. paddingInlineStart: token.paddingXS
  2218. },
  2219. [`${componentCls}-panel`]: {
  2220. borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)}`
  2221. },
  2222. [`${componentCls}-content`]: {
  2223. height: token.miniContentHeight,
  2224. th: {
  2225. height: 'auto',
  2226. padding: 0,
  2227. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.weekHeight)
  2228. }
  2229. },
  2230. [`${componentCls}-cell::before`]: {
  2231. pointerEvents: 'none'
  2232. }
  2233. },
  2234. [`${calendarCls}${calendarCls}-full`]: {
  2235. [`${componentCls}-panel`]: {
  2236. display: 'block',
  2237. width: '100%',
  2238. textAlign: 'end',
  2239. background: fullBg,
  2240. border: 0,
  2241. [`${componentCls}-body`]: {
  2242. 'th, td': {
  2243. padding: 0
  2244. },
  2245. th: {
  2246. height: 'auto',
  2247. paddingInlineEnd: token.paddingSM,
  2248. paddingBottom: token.paddingXXS,
  2249. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.weekHeight)
  2250. }
  2251. }
  2252. },
  2253. [`${componentCls}-cell-week ${componentCls}-cell-inner`]: {
  2254. display: 'block',
  2255. borderRadius: 0,
  2256. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,
  2257. width: '100%',
  2258. height: token.calc(token.dateValueHeight).add(token.dateContentHeight).add(token.calc(token.paddingXS).div(2)).add(token.lineWidthBold).equal()
  2259. },
  2260. [`${componentCls}-cell`]: {
  2261. '&::before': {
  2262. display: 'none'
  2263. },
  2264. '&:hover': {
  2265. [`${calendarCls}-date`]: {
  2266. background: token.controlItemBgHover
  2267. }
  2268. },
  2269. [`${calendarCls}-date-today::before`]: {
  2270. display: 'none'
  2271. },
  2272. // >>> Selected
  2273. [`&-in-view${componentCls}-cell-selected`]: {
  2274. [`${calendarCls}-date, ${calendarCls}-date-today`]: {
  2275. background: itemActiveBg
  2276. }
  2277. },
  2278. '&-selected, &-selected:hover': {
  2279. [`${calendarCls}-date, ${calendarCls}-date-today`]: {
  2280. [`${calendarCls}-date-value`]: {
  2281. color: token.colorPrimary
  2282. }
  2283. }
  2284. }
  2285. },
  2286. [`${calendarCls}-date`]: {
  2287. display: 'block',
  2288. width: 'auto',
  2289. height: 'auto',
  2290. margin: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.marginXS).div(2).equal())}`,
  2291. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.paddingXS).div(2).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} 0`,
  2292. border: 0,
  2293. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,
  2294. borderRadius: 0,
  2295. transition: `background ${token.motionDurationSlow}`,
  2296. '&-value': {
  2297. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.dateValueHeight),
  2298. transition: `color ${token.motionDurationSlow}`
  2299. },
  2300. '&-content': {
  2301. position: 'static',
  2302. width: 'auto',
  2303. height: token.dateContentHeight,
  2304. overflowY: 'auto',
  2305. color: token.colorText,
  2306. lineHeight: token.lineHeight,
  2307. textAlign: 'start'
  2308. },
  2309. '&-today': {
  2310. borderColor: token.colorPrimary,
  2311. [`${calendarCls}-date-value`]: {
  2312. color: token.colorText
  2313. }
  2314. }
  2315. }
  2316. },
  2317. [`@media only screen and (max-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.screenXS)}) `]: {
  2318. [calendarCls]: {
  2319. [`${calendarCls}-header`]: {
  2320. display: 'block',
  2321. [`${calendarCls}-year-select`]: {
  2322. width: '50%'
  2323. },
  2324. [`${calendarCls}-month-select`]: {
  2325. width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)})`
  2326. },
  2327. [`${calendarCls}-mode-switch`]: {
  2328. width: '100%',
  2329. marginTop: token.marginXS,
  2330. marginInlineStart: 0,
  2331. '> label': {
  2332. width: '50%',
  2333. textAlign: 'center'
  2334. }
  2335. }
  2336. }
  2337. }
  2338. }
  2339. };
  2340. };
  2341. const prepareComponentToken = token => Object.assign({
  2342. fullBg: token.colorBgContainer,
  2343. fullPanelBg: token.colorBgContainer,
  2344. itemActiveBg: token.controlItemBgActive,
  2345. yearControlWidth: 80,
  2346. monthControlWidth: 70,
  2347. miniContentHeight: 256
  2348. }, (0,_date_picker_style__WEBPACK_IMPORTED_MODULE_2__.initPanelComponentToken)(token));
  2349. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.genStyleHooks)('Calendar', token => {
  2350. const calendarCls = `${token.componentCls}-calendar`;
  2351. const calendarToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.mergeToken)(token, (0,_date_picker_style__WEBPACK_IMPORTED_MODULE_2__.initPickerPanelToken)(token), {
  2352. calendarCls,
  2353. pickerCellInnerCls: `${token.componentCls}-cell-inner`,
  2354. dateValueHeight: token.controlHeightSM,
  2355. weekHeight: token.calc(token.controlHeightSM).mul(0.75).equal(),
  2356. dateContentHeight: token.calc(token.calc(token.fontHeightSM).add(token.marginXS)).mul(3).add(token.calc(token.lineWidth).mul(2)).equal()
  2357. });
  2358. return genCalendarStyles(calendarToken);
  2359. }, prepareComponentToken));
  2360. /***/ }),
  2361. /***/ "./components/card/style/index.ts":
  2362. /*!****************************************!*\
  2363. !*** ./components/card/style/index.ts ***!
  2364. \****************************************/
  2365. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  2366. "use strict";
  2367. __webpack_require__.r(__webpack_exports__);
  2368. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2369. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  2370. /* harmony export */ });
  2371. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  2372. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  2373. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  2374. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  2375. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  2376. // ============================== Styles ==============================
  2377. // ============================== Head ==============================
  2378. const genCardHeadStyle = token => {
  2379. const {
  2380. antCls,
  2381. componentCls,
  2382. headerHeight,
  2383. headerPadding,
  2384. tabsMarginBottom
  2385. } = token;
  2386. return Object.assign(Object.assign({
  2387. display: 'flex',
  2388. justifyContent: 'center',
  2389. flexDirection: 'column',
  2390. minHeight: headerHeight,
  2391. marginBottom: -1,
  2392. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerPadding)}`,
  2393. color: token.colorTextHeading,
  2394. fontWeight: token.fontWeightStrong,
  2395. fontSize: token.headerFontSize,
  2396. background: token.headerBg,
  2397. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
  2398. borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} 0 0`
  2399. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
  2400. '&-wrapper': {
  2401. width: '100%',
  2402. display: 'flex',
  2403. alignItems: 'center'
  2404. },
  2405. '&-title': Object.assign(Object.assign({
  2406. display: 'inline-block',
  2407. flex: 1
  2408. }, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
  2409. [`
  2410. > ${componentCls}-typography,
  2411. > ${componentCls}-typography-edit-content
  2412. `]: {
  2413. insetInlineStart: 0,
  2414. marginTop: 0,
  2415. marginBottom: 0
  2416. }
  2417. }),
  2418. [`${antCls}-tabs-top`]: {
  2419. clear: 'both',
  2420. marginBottom: tabsMarginBottom,
  2421. color: token.colorText,
  2422. fontWeight: 'normal',
  2423. fontSize: token.fontSize,
  2424. '&-bar': {
  2425. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`
  2426. }
  2427. }
  2428. });
  2429. };
  2430. // ============================== Grid ==============================
  2431. const genCardGridStyle = token => {
  2432. const {
  2433. cardPaddingBase,
  2434. colorBorderSecondary,
  2435. cardShadow,
  2436. lineWidth
  2437. } = token;
  2438. return {
  2439. width: '33.33%',
  2440. padding: cardPaddingBase,
  2441. border: 0,
  2442. borderRadius: 0,
  2443. boxShadow: `
  2444. ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 0 ${colorBorderSecondary},
  2445. 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 ${colorBorderSecondary},
  2446. ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 ${colorBorderSecondary},
  2447. ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 0 ${colorBorderSecondary} inset,
  2448. 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0 ${colorBorderSecondary} inset;
  2449. `,
  2450. transition: `all ${token.motionDurationMid}`,
  2451. '&-hoverable:hover': {
  2452. position: 'relative',
  2453. zIndex: 1,
  2454. boxShadow: cardShadow
  2455. }
  2456. };
  2457. };
  2458. // ============================== Actions ==============================
  2459. const genCardActionsStyle = token => {
  2460. const {
  2461. componentCls,
  2462. iconCls,
  2463. actionsLiMargin,
  2464. cardActionsIconSize,
  2465. colorBorderSecondary,
  2466. actionsBg
  2467. } = token;
  2468. return Object.assign(Object.assign({
  2469. margin: 0,
  2470. padding: 0,
  2471. listStyle: 'none',
  2472. background: actionsBg,
  2473. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
  2474. display: 'flex',
  2475. borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)}`
  2476. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
  2477. '& > li': {
  2478. margin: actionsLiMargin,
  2479. color: token.colorTextDescription,
  2480. textAlign: 'center',
  2481. '> span': {
  2482. position: 'relative',
  2483. display: 'block',
  2484. minWidth: token.calc(token.cardActionsIconSize).mul(2).equal(),
  2485. fontSize: token.fontSize,
  2486. lineHeight: token.lineHeight,
  2487. cursor: 'pointer',
  2488. '&:hover': {
  2489. color: token.colorPrimary,
  2490. transition: `color ${token.motionDurationMid}`
  2491. },
  2492. [`a:not(${componentCls}-btn), > ${iconCls}`]: {
  2493. display: 'inline-block',
  2494. width: '100%',
  2495. color: token.colorIcon,
  2496. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.fontHeight),
  2497. transition: `color ${token.motionDurationMid}`,
  2498. '&:hover': {
  2499. color: token.colorPrimary
  2500. }
  2501. },
  2502. [`> ${iconCls}`]: {
  2503. fontSize: cardActionsIconSize,
  2504. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(cardActionsIconSize).mul(token.lineHeight).equal())
  2505. }
  2506. },
  2507. '&:not(:last-child)': {
  2508. borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`
  2509. }
  2510. }
  2511. });
  2512. };
  2513. // ============================== Meta ==============================
  2514. const genCardMetaStyle = token => Object.assign(Object.assign({
  2515. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.marginXXS).mul(-1).equal())} 0`,
  2516. display: 'flex'
  2517. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
  2518. '&-avatar': {
  2519. paddingInlineEnd: token.padding
  2520. },
  2521. '&-detail': {
  2522. overflow: 'hidden',
  2523. flex: 1,
  2524. '> div:not(:last-child)': {
  2525. marginBottom: token.marginXS
  2526. }
  2527. },
  2528. '&-title': Object.assign({
  2529. color: token.colorTextHeading,
  2530. fontWeight: token.fontWeightStrong,
  2531. fontSize: token.fontSizeLG
  2532. }, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis),
  2533. '&-description': {
  2534. color: token.colorTextDescription
  2535. }
  2536. });
  2537. // ============================== Inner ==============================
  2538. const genCardTypeInnerStyle = token => {
  2539. const {
  2540. componentCls,
  2541. colorFillAlter,
  2542. headerPadding,
  2543. bodyPadding
  2544. } = token;
  2545. return {
  2546. [`${componentCls}-head`]: {
  2547. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerPadding)}`,
  2548. background: colorFillAlter,
  2549. '&-title': {
  2550. fontSize: token.fontSize
  2551. }
  2552. },
  2553. [`${componentCls}-body`]: {
  2554. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(bodyPadding)}`
  2555. }
  2556. };
  2557. };
  2558. // ============================== Loading ==============================
  2559. const genCardLoadingStyle = token => {
  2560. const {
  2561. componentCls
  2562. } = token;
  2563. return {
  2564. overflow: 'hidden',
  2565. [`${componentCls}-body`]: {
  2566. userSelect: 'none'
  2567. }
  2568. };
  2569. };
  2570. // ============================== Basic ==============================
  2571. const genCardStyle = token => {
  2572. const {
  2573. componentCls,
  2574. cardShadow,
  2575. cardHeadPadding,
  2576. colorBorderSecondary,
  2577. boxShadowTertiary,
  2578. bodyPadding,
  2579. extraColor
  2580. } = token;
  2581. return {
  2582. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  2583. position: 'relative',
  2584. background: token.colorBgContainer,
  2585. borderRadius: token.borderRadiusLG,
  2586. [`&:not(${componentCls}-bordered)`]: {
  2587. boxShadow: boxShadowTertiary
  2588. },
  2589. [`${componentCls}-head`]: genCardHeadStyle(token),
  2590. [`${componentCls}-extra`]: {
  2591. // https://stackoverflow.com/a/22429853/3040605
  2592. marginInlineStart: 'auto',
  2593. color: extraColor,
  2594. fontWeight: 'normal',
  2595. fontSize: token.fontSize
  2596. },
  2597. [`${componentCls}-body`]: Object.assign({
  2598. padding: bodyPadding,
  2599. borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)}`
  2600. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()),
  2601. [`${componentCls}-grid`]: genCardGridStyle(token),
  2602. [`${componentCls}-cover`]: {
  2603. '> *': {
  2604. display: 'block',
  2605. width: '100%',
  2606. borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} 0 0`
  2607. }
  2608. },
  2609. [`${componentCls}-actions`]: genCardActionsStyle(token),
  2610. [`${componentCls}-meta`]: genCardMetaStyle(token)
  2611. }),
  2612. [`${componentCls}-bordered`]: {
  2613. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
  2614. [`${componentCls}-cover`]: {
  2615. marginTop: -1,
  2616. marginInlineStart: -1,
  2617. marginInlineEnd: -1
  2618. }
  2619. },
  2620. [`${componentCls}-hoverable`]: {
  2621. cursor: 'pointer',
  2622. transition: `box-shadow ${token.motionDurationMid}, border-color ${token.motionDurationMid}`,
  2623. '&:hover': {
  2624. borderColor: 'transparent',
  2625. boxShadow: cardShadow
  2626. }
  2627. },
  2628. [`${componentCls}-contain-grid`]: {
  2629. borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.borderRadiusLG)} 0 0 `,
  2630. [`${componentCls}-body`]: {
  2631. display: 'flex',
  2632. flexWrap: 'wrap'
  2633. },
  2634. [`&:not(${componentCls}-loading) ${componentCls}-body`]: {
  2635. marginBlockStart: token.calc(token.lineWidth).mul(-1).equal(),
  2636. marginInlineStart: token.calc(token.lineWidth).mul(-1).equal(),
  2637. padding: 0
  2638. }
  2639. },
  2640. [`${componentCls}-contain-tabs`]: {
  2641. [`> div${componentCls}-head`]: {
  2642. minHeight: 0,
  2643. [`${componentCls}-head-title, ${componentCls}-extra`]: {
  2644. paddingTop: cardHeadPadding
  2645. }
  2646. }
  2647. },
  2648. [`${componentCls}-type-inner`]: genCardTypeInnerStyle(token),
  2649. [`${componentCls}-loading`]: genCardLoadingStyle(token),
  2650. [`${componentCls}-rtl`]: {
  2651. direction: 'rtl'
  2652. }
  2653. };
  2654. };
  2655. // ============================== Size ==============================
  2656. const genCardSizeStyle = token => {
  2657. const {
  2658. componentCls,
  2659. bodyPaddingSM,
  2660. headerPaddingSM,
  2661. headerHeightSM,
  2662. headerFontSizeSM
  2663. } = token;
  2664. return {
  2665. [`${componentCls}-small`]: {
  2666. [`> ${componentCls}-head`]: {
  2667. minHeight: headerHeightSM,
  2668. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerPaddingSM)}`,
  2669. fontSize: headerFontSizeSM,
  2670. [`> ${componentCls}-head-wrapper`]: {
  2671. [`> ${componentCls}-extra`]: {
  2672. fontSize: token.fontSize
  2673. }
  2674. }
  2675. },
  2676. [`> ${componentCls}-body`]: {
  2677. padding: bodyPaddingSM
  2678. }
  2679. },
  2680. [`${componentCls}-small${componentCls}-contain-tabs`]: {
  2681. [`> ${componentCls}-head`]: {
  2682. [`${componentCls}-head-title, ${componentCls}-extra`]: {
  2683. paddingTop: 0,
  2684. display: 'flex',
  2685. alignItems: 'center'
  2686. }
  2687. }
  2688. }
  2689. };
  2690. };
  2691. const prepareComponentToken = token => {
  2692. var _a, _b;
  2693. return {
  2694. headerBg: 'transparent',
  2695. headerFontSize: token.fontSizeLG,
  2696. headerFontSizeSM: token.fontSize,
  2697. headerHeight: token.fontSizeLG * token.lineHeightLG + token.padding * 2,
  2698. headerHeightSM: token.fontSize * token.lineHeight + token.paddingXS * 2,
  2699. actionsBg: token.colorBgContainer,
  2700. actionsLiMargin: `${token.paddingSM}px 0`,
  2701. tabsMarginBottom: -token.padding - token.lineWidth,
  2702. extraColor: token.colorText,
  2703. bodyPaddingSM: 12,
  2704. // Fixed padding.
  2705. headerPaddingSM: 12,
  2706. bodyPadding: (_a = token.bodyPadding) !== null && _a !== void 0 ? _a : token.paddingLG,
  2707. headerPadding: (_b = token.headerPadding) !== null && _b !== void 0 ? _b : token.paddingLG
  2708. };
  2709. };
  2710. // ============================== Export ==============================
  2711. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Card', token => {
  2712. const cardToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  2713. cardShadow: token.boxShadowCard,
  2714. cardHeadPadding: token.padding,
  2715. cardPaddingBase: token.paddingLG,
  2716. cardActionsIconSize: token.fontSize
  2717. });
  2718. return [
  2719. // Style
  2720. genCardStyle(cardToken),
  2721. // Size
  2722. genCardSizeStyle(cardToken)];
  2723. }, prepareComponentToken));
  2724. /***/ }),
  2725. /***/ "./components/carousel/style/index.ts":
  2726. /*!********************************************!*\
  2727. !*** ./components/carousel/style/index.ts ***!
  2728. \********************************************/
  2729. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  2730. "use strict";
  2731. __webpack_require__.r(__webpack_exports__);
  2732. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2733. /* harmony export */ DotDuration: function() { return /* binding */ DotDuration; },
  2734. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  2735. /* harmony export */ });
  2736. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  2737. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  2738. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  2739. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  2740. const DotDuration = '--dot-duration';
  2741. const genCarouselStyle = token => {
  2742. const {
  2743. componentCls,
  2744. antCls
  2745. } = token;
  2746. return {
  2747. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  2748. '.slick-slider': {
  2749. position: 'relative',
  2750. display: 'block',
  2751. boxSizing: 'border-box',
  2752. touchAction: 'pan-y',
  2753. WebkitTouchCallout: 'none',
  2754. WebkitTapHighlightColor: 'transparent',
  2755. '.slick-track, .slick-list': {
  2756. transform: 'translate3d(0, 0, 0)',
  2757. touchAction: 'pan-y'
  2758. }
  2759. },
  2760. '.slick-list': {
  2761. position: 'relative',
  2762. display: 'block',
  2763. margin: 0,
  2764. padding: 0,
  2765. overflow: 'hidden',
  2766. '&:focus': {
  2767. outline: 'none'
  2768. },
  2769. '&.dragging': {
  2770. cursor: 'pointer'
  2771. },
  2772. '.slick-slide': {
  2773. pointerEvents: 'none',
  2774. // https://github.com/ant-design/ant-design/issues/23294
  2775. [`input${antCls}-radio-input, input${antCls}-checkbox-input`]: {
  2776. visibility: 'hidden'
  2777. },
  2778. '&.slick-active': {
  2779. pointerEvents: 'auto',
  2780. [`input${antCls}-radio-input, input${antCls}-checkbox-input`]: {
  2781. visibility: 'visible'
  2782. }
  2783. },
  2784. // fix Carousel content height not match parent node
  2785. // when children is empty node
  2786. // https://github.com/ant-design/ant-design/issues/25878
  2787. '> div > div': {
  2788. verticalAlign: 'bottom'
  2789. }
  2790. }
  2791. },
  2792. '.slick-track': {
  2793. position: 'relative',
  2794. top: 0,
  2795. insetInlineStart: 0,
  2796. display: 'block',
  2797. '&::before, &::after': {
  2798. display: 'table',
  2799. content: '""'
  2800. },
  2801. '&::after': {
  2802. clear: 'both'
  2803. }
  2804. },
  2805. '.slick-slide': {
  2806. display: 'none',
  2807. float: 'left',
  2808. height: '100%',
  2809. minHeight: 1,
  2810. img: {
  2811. display: 'block'
  2812. },
  2813. '&.dragging img': {
  2814. pointerEvents: 'none'
  2815. }
  2816. },
  2817. '.slick-initialized .slick-slide': {
  2818. display: 'block'
  2819. },
  2820. '.slick-vertical .slick-slide': {
  2821. display: 'block',
  2822. height: 'auto'
  2823. }
  2824. })
  2825. };
  2826. };
  2827. const genArrowsStyle = token => {
  2828. const {
  2829. componentCls,
  2830. motionDurationSlow,
  2831. arrowSize,
  2832. arrowOffset
  2833. } = token;
  2834. const arrowLength = token.calc(arrowSize).div(Math.SQRT2).equal();
  2835. return {
  2836. [componentCls]: {
  2837. // Arrows
  2838. '.slick-prev, .slick-next': {
  2839. position: 'absolute',
  2840. top: '50%',
  2841. width: arrowSize,
  2842. height: arrowSize,
  2843. transform: 'translateY(-50%)',
  2844. color: '#fff',
  2845. opacity: 0.4,
  2846. background: 'transparent',
  2847. padding: 0,
  2848. lineHeight: 0,
  2849. border: 0,
  2850. outline: 'none',
  2851. cursor: 'pointer',
  2852. zIndex: 1,
  2853. transition: `opacity ${motionDurationSlow}`,
  2854. '&:hover, &:focus': {
  2855. opacity: 1
  2856. },
  2857. '&.slick-disabled': {
  2858. pointerEvents: 'none',
  2859. opacity: 0
  2860. },
  2861. '&::after': {
  2862. boxSizing: 'border-box',
  2863. position: 'absolute',
  2864. top: token.calc(arrowSize).sub(arrowLength).div(2).equal(),
  2865. insetInlineStart: token.calc(arrowSize).sub(arrowLength).div(2).equal(),
  2866. display: 'inline-block',
  2867. width: arrowLength,
  2868. height: arrowLength,
  2869. border: `0 solid currentcolor`,
  2870. borderInlineStartWidth: 2,
  2871. borderBlockStartWidth: 2,
  2872. borderRadius: 1,
  2873. content: '""'
  2874. }
  2875. },
  2876. '.slick-prev': {
  2877. insetInlineStart: arrowOffset,
  2878. '&::after': {
  2879. transform: 'rotate(-45deg)'
  2880. }
  2881. },
  2882. '.slick-next': {
  2883. insetInlineEnd: arrowOffset,
  2884. '&::after': {
  2885. transform: 'rotate(135deg)'
  2886. }
  2887. }
  2888. }
  2889. };
  2890. };
  2891. const genDotsStyle = token => {
  2892. const {
  2893. componentCls,
  2894. dotOffset,
  2895. dotWidth,
  2896. dotHeight,
  2897. dotGap,
  2898. colorBgContainer,
  2899. motionDurationSlow
  2900. } = token;
  2901. return {
  2902. [componentCls]: {
  2903. '.slick-dots': {
  2904. position: 'absolute',
  2905. insetInlineEnd: 0,
  2906. bottom: 0,
  2907. insetInlineStart: 0,
  2908. zIndex: 15,
  2909. display: 'flex !important',
  2910. justifyContent: 'center',
  2911. paddingInlineStart: 0,
  2912. margin: 0,
  2913. listStyle: 'none',
  2914. '&-bottom': {
  2915. bottom: dotOffset
  2916. },
  2917. '&-top': {
  2918. top: dotOffset,
  2919. bottom: 'auto'
  2920. },
  2921. li: {
  2922. position: 'relative',
  2923. display: 'inline-block',
  2924. flex: '0 1 auto',
  2925. boxSizing: 'content-box',
  2926. width: dotWidth,
  2927. height: dotHeight,
  2928. marginInline: dotGap,
  2929. padding: 0,
  2930. textAlign: 'center',
  2931. textIndent: -999,
  2932. verticalAlign: 'top',
  2933. transition: `all ${motionDurationSlow}`,
  2934. borderRadius: dotHeight,
  2935. overflow: 'hidden',
  2936. '&::after': {
  2937. display: 'block',
  2938. position: 'absolute',
  2939. top: 0,
  2940. insetInlineStart: 0,
  2941. width: '100%',
  2942. height: dotHeight,
  2943. content: '""',
  2944. background: 'transparent',
  2945. borderRadius: dotHeight,
  2946. opacity: 1,
  2947. outline: 'none',
  2948. cursor: 'pointer',
  2949. overflow: 'hidden',
  2950. transform: 'translate3d(-100%, 0, 0)'
  2951. },
  2952. button: {
  2953. position: 'relative',
  2954. display: 'block',
  2955. width: '100%',
  2956. height: dotHeight,
  2957. padding: 0,
  2958. color: 'transparent',
  2959. fontSize: 0,
  2960. background: colorBgContainer,
  2961. border: 0,
  2962. borderRadius: dotHeight,
  2963. outline: 'none',
  2964. cursor: 'pointer',
  2965. opacity: 0.2,
  2966. transition: `all ${motionDurationSlow}`,
  2967. overflow: 'hidden',
  2968. '&:hover': {
  2969. opacity: 0.75
  2970. },
  2971. '&::after': {
  2972. position: 'absolute',
  2973. inset: token.calc(dotGap).mul(-1).equal(),
  2974. content: '""'
  2975. }
  2976. },
  2977. '&.slick-active': {
  2978. width: token.dotActiveWidth,
  2979. position: 'relative',
  2980. '&:hover': {
  2981. opacity: 1
  2982. },
  2983. '&::after': {
  2984. background: colorBgContainer,
  2985. transform: 'translate3d(0, 0, 0)',
  2986. transition: `transform var(${DotDuration}) ease-out`
  2987. }
  2988. }
  2989. }
  2990. }
  2991. }
  2992. };
  2993. };
  2994. const genCarouselVerticalStyle = token => {
  2995. const {
  2996. componentCls,
  2997. dotOffset,
  2998. arrowOffset,
  2999. marginXXS
  3000. } = token;
  3001. const reverseSizeOfDot = {
  3002. width: token.dotHeight,
  3003. height: token.dotWidth
  3004. };
  3005. return {
  3006. [`${componentCls}-vertical`]: {
  3007. '.slick-prev, .slick-next': {
  3008. insetInlineStart: '50%',
  3009. marginBlockStart: 'unset',
  3010. transform: 'translateX(-50%)'
  3011. },
  3012. '.slick-prev': {
  3013. insetBlockStart: arrowOffset,
  3014. insetInlineStart: '50%',
  3015. '&::after': {
  3016. transform: 'rotate(45deg)'
  3017. }
  3018. },
  3019. '.slick-next': {
  3020. insetBlockStart: 'auto',
  3021. insetBlockEnd: arrowOffset,
  3022. '&::after': {
  3023. transform: 'rotate(-135deg)'
  3024. }
  3025. },
  3026. '.slick-dots': {
  3027. top: '50%',
  3028. bottom: 'auto',
  3029. flexDirection: 'column',
  3030. width: token.dotHeight,
  3031. height: 'auto',
  3032. margin: 0,
  3033. transform: 'translateY(-50%)',
  3034. '&-left': {
  3035. insetInlineEnd: 'auto',
  3036. insetInlineStart: dotOffset
  3037. },
  3038. '&-right': {
  3039. insetInlineEnd: dotOffset,
  3040. insetInlineStart: 'auto'
  3041. },
  3042. li: Object.assign(Object.assign({}, reverseSizeOfDot), {
  3043. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginXXS)} 0`,
  3044. verticalAlign: 'baseline',
  3045. button: reverseSizeOfDot,
  3046. '&::after': Object.assign(Object.assign({}, reverseSizeOfDot), {
  3047. height: 0
  3048. }),
  3049. '&.slick-active': Object.assign(Object.assign({}, reverseSizeOfDot), {
  3050. button: reverseSizeOfDot,
  3051. '&::after': Object.assign(Object.assign({}, reverseSizeOfDot), {
  3052. transition: `height var(${DotDuration}) ease-out`
  3053. })
  3054. })
  3055. })
  3056. }
  3057. }
  3058. };
  3059. };
  3060. const genCarouselRtlStyle = token => {
  3061. const {
  3062. componentCls
  3063. } = token;
  3064. return [{
  3065. [`${componentCls}-rtl`]: {
  3066. direction: 'rtl'
  3067. }
  3068. }, {
  3069. [`${componentCls}-vertical`]: {
  3070. '.slick-dots': {
  3071. [`${componentCls}-rtl&`]: {
  3072. flexDirection: 'column'
  3073. }
  3074. }
  3075. }
  3076. }];
  3077. };
  3078. const prepareComponentToken = token => {
  3079. const dotActiveWidth = 24;
  3080. return {
  3081. arrowSize: 16,
  3082. arrowOffset: token.marginXS,
  3083. dotWidth: 16,
  3084. dotHeight: 3,
  3085. dotGap: token.marginXXS,
  3086. dotOffset: 12,
  3087. dotWidthActive: dotActiveWidth,
  3088. dotActiveWidth
  3089. };
  3090. };
  3091. // ============================== Export ==============================
  3092. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Carousel', token => [genCarouselStyle(token), genArrowsStyle(token), genDotsStyle(token), genCarouselVerticalStyle(token), genCarouselRtlStyle(token)], prepareComponentToken, {
  3093. deprecatedTokens: [['dotWidthActive', 'dotActiveWidth']]
  3094. }));
  3095. /***/ }),
  3096. /***/ "./components/cascader/style/columns.ts":
  3097. /*!**********************************************!*\
  3098. !*** ./components/cascader/style/columns.ts ***!
  3099. \**********************************************/
  3100. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  3101. "use strict";
  3102. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  3103. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  3104. /* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../checkbox/style */ "./components/checkbox/style/index.ts");
  3105. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  3106. const getColumnsStyle = token => {
  3107. const {
  3108. prefixCls,
  3109. componentCls
  3110. } = token;
  3111. const cascaderMenuItemCls = `${componentCls}-menu-item`;
  3112. const iconCls = `
  3113. &${cascaderMenuItemCls}-expand ${cascaderMenuItemCls}-expand-icon,
  3114. ${cascaderMenuItemCls}-loading-icon
  3115. `;
  3116. return [
  3117. // ==================== Checkbox ====================
  3118. (0,_checkbox_style__WEBPACK_IMPORTED_MODULE_1__.getStyle)(`${prefixCls}-checkbox`, token), {
  3119. [componentCls]: {
  3120. // ================== Checkbox ==================
  3121. '&-checkbox': {
  3122. top: 0,
  3123. marginInlineEnd: token.paddingXS,
  3124. pointerEvents: 'unset'
  3125. },
  3126. // ==================== Menu ====================
  3127. // >>> Menus
  3128. '&-menus': {
  3129. display: 'flex',
  3130. flexWrap: 'nowrap',
  3131. alignItems: 'flex-start',
  3132. [`&${componentCls}-menu-empty`]: {
  3133. [`${componentCls}-menu`]: {
  3134. width: '100%',
  3135. height: 'auto',
  3136. [cascaderMenuItemCls]: {
  3137. color: token.colorTextDisabled
  3138. }
  3139. }
  3140. }
  3141. },
  3142. // >>> Menu
  3143. '&-menu': {
  3144. flexGrow: 1,
  3145. flexShrink: 0,
  3146. minWidth: token.controlItemWidth,
  3147. height: token.dropdownHeight,
  3148. margin: 0,
  3149. padding: token.menuPadding,
  3150. overflow: 'auto',
  3151. verticalAlign: 'top',
  3152. listStyle: 'none',
  3153. '-ms-overflow-style': '-ms-autohiding-scrollbar',
  3154. // https://github.com/ant-design/ant-design/issues/11857
  3155. '&:not(:last-child)': {
  3156. borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  3157. },
  3158. '&-item': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_2__.textEllipsis), {
  3159. display: 'flex',
  3160. flexWrap: 'nowrap',
  3161. alignItems: 'center',
  3162. padding: token.optionPadding,
  3163. lineHeight: token.lineHeight,
  3164. cursor: 'pointer',
  3165. transition: `all ${token.motionDurationMid}`,
  3166. borderRadius: token.borderRadiusSM,
  3167. '&:hover': {
  3168. background: token.controlItemBgHover
  3169. },
  3170. '&-disabled': {
  3171. color: token.colorTextDisabled,
  3172. cursor: 'not-allowed',
  3173. '&:hover': {
  3174. background: 'transparent'
  3175. },
  3176. [iconCls]: {
  3177. color: token.colorTextDisabled
  3178. }
  3179. },
  3180. [`&-active:not(${cascaderMenuItemCls}-disabled)`]: {
  3181. '&, &:hover': {
  3182. color: token.optionSelectedColor,
  3183. fontWeight: token.optionSelectedFontWeight,
  3184. backgroundColor: token.optionSelectedBg
  3185. }
  3186. },
  3187. '&-content': {
  3188. flex: 'auto'
  3189. },
  3190. [iconCls]: {
  3191. marginInlineStart: token.paddingXXS,
  3192. color: token.colorIcon,
  3193. fontSize: token.fontSizeIcon
  3194. },
  3195. '&-keyword': {
  3196. color: token.colorHighlight
  3197. }
  3198. })
  3199. }
  3200. }
  3201. }];
  3202. };
  3203. /* harmony default export */ __webpack_exports__["default"] = (getColumnsStyle);
  3204. /***/ }),
  3205. /***/ "./components/cascader/style/index.ts":
  3206. /*!********************************************!*\
  3207. !*** ./components/cascader/style/index.ts ***!
  3208. \********************************************/
  3209. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  3210. "use strict";
  3211. __webpack_require__.r(__webpack_exports__);
  3212. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3213. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  3214. /* harmony export */ });
  3215. /* harmony import */ var _style_compact_item__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/compact-item */ "./components/style/compact-item.ts");
  3216. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  3217. /* harmony import */ var _columns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./columns */ "./components/cascader/style/columns.ts");
  3218. // =============================== Base ===============================
  3219. const genBaseStyle = token => {
  3220. const {
  3221. componentCls,
  3222. antCls
  3223. } = token;
  3224. return [
  3225. // =====================================================
  3226. // == Control ==
  3227. // =====================================================
  3228. {
  3229. [componentCls]: {
  3230. width: token.controlWidth
  3231. }
  3232. },
  3233. // =====================================================
  3234. // == Popup ==
  3235. // =====================================================
  3236. {
  3237. [`${componentCls}-dropdown`]: [{
  3238. [`&${antCls}-select-dropdown`]: {
  3239. padding: 0
  3240. }
  3241. }, (0,_columns__WEBPACK_IMPORTED_MODULE_2__["default"])(token)]
  3242. },
  3243. // =====================================================
  3244. // == RTL ==
  3245. // =====================================================
  3246. {
  3247. [`${componentCls}-dropdown-rtl`]: {
  3248. direction: 'rtl'
  3249. }
  3250. },
  3251. // =====================================================
  3252. // == Space Compact ==
  3253. // =====================================================
  3254. (0,_style_compact_item__WEBPACK_IMPORTED_MODULE_0__.genCompactItemStyle)(token)];
  3255. };
  3256. // ============================== Export ==============================
  3257. const prepareComponentToken = token => {
  3258. const itemPaddingVertical = Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2);
  3259. return {
  3260. controlWidth: 184,
  3261. controlItemWidth: 111,
  3262. dropdownHeight: 180,
  3263. optionSelectedBg: token.controlItemBgActive,
  3264. optionSelectedFontWeight: token.fontWeightStrong,
  3265. optionPadding: `${itemPaddingVertical}px ${token.paddingSM}px`,
  3266. menuPadding: token.paddingXXS,
  3267. optionSelectedColor: token.colorText
  3268. };
  3269. };
  3270. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Cascader', genBaseStyle, prepareComponentToken, {
  3271. unitless: {
  3272. optionSelectedFontWeight: true
  3273. }
  3274. }));
  3275. /***/ }),
  3276. /***/ "./components/checkbox/style/index.ts":
  3277. /*!********************************************!*\
  3278. !*** ./components/checkbox/style/index.ts ***!
  3279. \********************************************/
  3280. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  3281. "use strict";
  3282. __webpack_require__.r(__webpack_exports__);
  3283. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3284. /* harmony export */ genCheckboxStyle: function() { return /* binding */ genCheckboxStyle; },
  3285. /* harmony export */ getStyle: function() { return /* binding */ getStyle; }
  3286. /* harmony export */ });
  3287. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  3288. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  3289. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  3290. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  3291. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  3292. // ============================== Styles ==============================
  3293. const genCheckboxStyle = token => {
  3294. const {
  3295. checkboxCls
  3296. } = token;
  3297. const wrapperCls = `${checkboxCls}-wrapper`;
  3298. return [
  3299. // ===================== Basic =====================
  3300. {
  3301. // Group
  3302. [`${checkboxCls}-group`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  3303. display: 'inline-flex',
  3304. flexWrap: 'wrap',
  3305. columnGap: token.marginXS,
  3306. // Group > Grid
  3307. [`> ${token.antCls}-row`]: {
  3308. flex: 1
  3309. }
  3310. }),
  3311. // Wrapper
  3312. [wrapperCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  3313. display: 'inline-flex',
  3314. alignItems: 'baseline',
  3315. cursor: 'pointer',
  3316. // Fix checkbox & radio in flex align #30260
  3317. '&:after': {
  3318. display: 'inline-block',
  3319. width: 0,
  3320. overflow: 'hidden',
  3321. content: "'\\a0'"
  3322. },
  3323. // Checkbox near checkbox
  3324. [`& + ${wrapperCls}`]: {
  3325. marginInlineStart: 0
  3326. },
  3327. [`&${wrapperCls}-in-form-item`]: {
  3328. 'input[type="checkbox"]': {
  3329. width: 14,
  3330. // FIXME: magic
  3331. height: 14 // FIXME: magic
  3332. }
  3333. }
  3334. }),
  3335. // Wrapper > Checkbox
  3336. [checkboxCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  3337. position: 'relative',
  3338. whiteSpace: 'nowrap',
  3339. lineHeight: 1,
  3340. cursor: 'pointer',
  3341. borderRadius: token.borderRadiusSM,
  3342. // To make alignment right when `controlHeight` is changed
  3343. // Ref: https://github.com/ant-design/ant-design/issues/41564
  3344. alignSelf: 'center',
  3345. // Wrapper > Checkbox > input
  3346. [`${checkboxCls}-input`]: {
  3347. position: 'absolute',
  3348. // Since baseline align will get additional space offset,
  3349. // we need to move input to top to make it align with text.
  3350. // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
  3351. inset: 0,
  3352. zIndex: 1,
  3353. cursor: 'pointer',
  3354. opacity: 0,
  3355. margin: 0,
  3356. [`&:focus-visible + ${checkboxCls}-inner`]: (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusOutline)(token)
  3357. },
  3358. // Wrapper > Checkbox > inner
  3359. [`${checkboxCls}-inner`]: {
  3360. boxSizing: 'border-box',
  3361. display: 'block',
  3362. width: token.checkboxSize,
  3363. height: token.checkboxSize,
  3364. direction: 'ltr',
  3365. backgroundColor: token.colorBgContainer,
  3366. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  3367. borderRadius: token.borderRadiusSM,
  3368. borderCollapse: 'separate',
  3369. transition: `all ${token.motionDurationSlow}`,
  3370. '&:after': {
  3371. boxSizing: 'border-box',
  3372. position: 'absolute',
  3373. top: '50%',
  3374. insetInlineStart: '25%',
  3375. display: 'table',
  3376. width: token.calc(token.checkboxSize).div(14).mul(5).equal(),
  3377. height: token.calc(token.checkboxSize).div(14).mul(8).equal(),
  3378. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidthBold)} solid ${token.colorWhite}`,
  3379. borderTop: 0,
  3380. borderInlineStart: 0,
  3381. transform: 'rotate(45deg) scale(0) translate(-50%,-50%)',
  3382. opacity: 0,
  3383. content: '""',
  3384. transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}`
  3385. }
  3386. },
  3387. // Wrapper > Checkbox + Text
  3388. '& + span': {
  3389. paddingInlineStart: token.paddingXS,
  3390. paddingInlineEnd: token.paddingXS
  3391. }
  3392. })
  3393. },
  3394. // ===================== Hover =====================
  3395. {
  3396. // Wrapper & Wrapper > Checkbox
  3397. [`
  3398. ${wrapperCls}:not(${wrapperCls}-disabled),
  3399. ${checkboxCls}:not(${checkboxCls}-disabled)
  3400. `]: {
  3401. [`&:hover ${checkboxCls}-inner`]: {
  3402. borderColor: token.colorPrimary
  3403. }
  3404. },
  3405. [`${wrapperCls}:not(${wrapperCls}-disabled)`]: {
  3406. [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled) ${checkboxCls}-inner`]: {
  3407. backgroundColor: token.colorPrimaryHover,
  3408. borderColor: 'transparent'
  3409. },
  3410. [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled):after`]: {
  3411. borderColor: token.colorPrimaryHover
  3412. }
  3413. }
  3414. },
  3415. // ==================== Checked ====================
  3416. {
  3417. // Wrapper > Checkbox
  3418. [`${checkboxCls}-checked`]: {
  3419. [`${checkboxCls}-inner`]: {
  3420. backgroundColor: token.colorPrimary,
  3421. borderColor: token.colorPrimary,
  3422. '&:after': {
  3423. opacity: 1,
  3424. transform: 'rotate(45deg) scale(1) translate(-50%,-50%)',
  3425. transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`
  3426. }
  3427. }
  3428. },
  3429. [`
  3430. ${wrapperCls}-checked:not(${wrapperCls}-disabled),
  3431. ${checkboxCls}-checked:not(${checkboxCls}-disabled)
  3432. `]: {
  3433. [`&:hover ${checkboxCls}-inner`]: {
  3434. backgroundColor: token.colorPrimaryHover,
  3435. borderColor: 'transparent'
  3436. }
  3437. }
  3438. },
  3439. // ================= Indeterminate =================
  3440. {
  3441. [checkboxCls]: {
  3442. '&-indeterminate': {
  3443. '&': {
  3444. // Wrapper > Checkbox > inner
  3445. [`${checkboxCls}-inner`]: {
  3446. backgroundColor: `${token.colorBgContainer}`,
  3447. borderColor: `${token.colorBorder}`,
  3448. '&:after': {
  3449. top: '50%',
  3450. insetInlineStart: '50%',
  3451. width: token.calc(token.fontSizeLG).div(2).equal(),
  3452. height: token.calc(token.fontSizeLG).div(2).equal(),
  3453. backgroundColor: token.colorPrimary,
  3454. border: 0,
  3455. transform: 'translate(-50%, -50%) scale(1)',
  3456. opacity: 1,
  3457. content: '""'
  3458. }
  3459. },
  3460. // https://github.com/ant-design/ant-design/issues/50074
  3461. [`&:hover ${checkboxCls}-inner`]: {
  3462. backgroundColor: `${token.colorBgContainer}`,
  3463. borderColor: `${token.colorPrimary}`
  3464. }
  3465. }
  3466. }
  3467. }
  3468. },
  3469. // ==================== Disable ====================
  3470. {
  3471. // Wrapper
  3472. [`${wrapperCls}-disabled`]: {
  3473. cursor: 'not-allowed'
  3474. },
  3475. // Wrapper > Checkbox
  3476. [`${checkboxCls}-disabled`]: {
  3477. // Wrapper > Checkbox > input
  3478. [`&, ${checkboxCls}-input`]: {
  3479. cursor: 'not-allowed',
  3480. // Disabled for native input to enable Tooltip event handler
  3481. // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
  3482. pointerEvents: 'none'
  3483. },
  3484. // Wrapper > Checkbox > inner
  3485. [`${checkboxCls}-inner`]: {
  3486. background: token.colorBgContainerDisabled,
  3487. borderColor: token.colorBorder,
  3488. '&:after': {
  3489. borderColor: token.colorTextDisabled
  3490. }
  3491. },
  3492. '&:after': {
  3493. display: 'none'
  3494. },
  3495. '& + span': {
  3496. color: token.colorTextDisabled
  3497. },
  3498. [`&${checkboxCls}-indeterminate ${checkboxCls}-inner::after`]: {
  3499. background: token.colorTextDisabled
  3500. }
  3501. }
  3502. }];
  3503. };
  3504. // ============================== Export ==============================
  3505. function getStyle(prefixCls, token) {
  3506. const checkboxToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  3507. checkboxCls: `.${prefixCls}`,
  3508. checkboxSize: token.controlInteractiveSize
  3509. });
  3510. return genCheckboxStyle(checkboxToken);
  3511. }
  3512. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Checkbox', (token, {
  3513. prefixCls
  3514. }) => [getStyle(prefixCls, token)]));
  3515. /***/ }),
  3516. /***/ "./components/col/style/index.ts":
  3517. /*!***************************************!*\
  3518. !*** ./components/col/style/index.ts ***!
  3519. \***************************************/
  3520. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  3521. "use strict";
  3522. __webpack_require__.r(__webpack_exports__);
  3523. // Compatible for babel-plugin-import
  3524. /* istanbul ignore next */
  3525. /* harmony default export */ __webpack_exports__["default"] = ({});
  3526. /***/ }),
  3527. /***/ "./components/collapse/index.tsx":
  3528. /*!***************************************************!*\
  3529. !*** ./components/collapse/index.tsx + 7 modules ***!
  3530. \***************************************************/
  3531. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  3532. "use strict";
  3533. // EXPORTS
  3534. __webpack_require__.d(__webpack_exports__, {
  3535. "default": function() { return /* binding */ collapse; }
  3536. });
  3537. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  3538. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  3539. var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
  3540. // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
  3541. var RightOutlined = __webpack_require__("./node_modules/@ant-design/icons/es/icons/RightOutlined.js");
  3542. // EXTERNAL MODULE: ./node_modules/classnames/index.js
  3543. var classnames = __webpack_require__("./node_modules/classnames/index.js");
  3544. var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  3545. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  3546. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  3547. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
  3548. var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  3549. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  3550. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  3551. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  3552. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  3553. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
  3554. var useMergedState = __webpack_require__("./node_modules/rc-util/es/hooks/useMergedState.js");
  3555. // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
  3556. var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
  3557. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
  3558. var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
  3559. // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
  3560. var toArray = __webpack_require__("./node_modules/rc-util/es/Children/toArray.js");
  3561. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  3562. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  3563. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  3564. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  3565. // EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 13 modules
  3566. var es = __webpack_require__("./node_modules/rc-motion/es/index.js");
  3567. // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
  3568. var KeyCode = __webpack_require__("./node_modules/rc-util/es/KeyCode.js");
  3569. ;// ./node_modules/rc-collapse/es/PanelContent.js
  3570. var PanelContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
  3571. var prefixCls = props.prefixCls,
  3572. forceRender = props.forceRender,
  3573. className = props.className,
  3574. style = props.style,
  3575. children = props.children,
  3576. isActive = props.isActive,
  3577. role = props.role,
  3578. customizeClassNames = props.classNames,
  3579. styles = props.styles;
  3580. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(isActive || forceRender),
  3581. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  3582. rendered = _React$useState2[0],
  3583. setRendered = _React$useState2[1];
  3584. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
  3585. if (forceRender || isActive) {
  3586. setRendered(true);
  3587. }
  3588. }, [forceRender, isActive]);
  3589. if (!rendered) {
  3590. return null;
  3591. }
  3592. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  3593. ref: ref,
  3594. className: classnames_default()("".concat(prefixCls, "-content"), (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-content-active"), isActive), "".concat(prefixCls, "-content-inactive"), !isActive), className),
  3595. style: style,
  3596. role: role
  3597. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  3598. className: classnames_default()("".concat(prefixCls, "-content-box"), customizeClassNames === null || customizeClassNames === void 0 ? void 0 : customizeClassNames.body),
  3599. style: styles === null || styles === void 0 ? void 0 : styles.body
  3600. }, children));
  3601. });
  3602. PanelContent.displayName = 'PanelContent';
  3603. /* harmony default export */ var es_PanelContent = (PanelContent);
  3604. ;// ./node_modules/rc-collapse/es/Panel.js
  3605. var _excluded = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "classNames", "styles", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"];
  3606. var CollapsePanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
  3607. var _props$showArrow = props.showArrow,
  3608. showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
  3609. headerClass = props.headerClass,
  3610. isActive = props.isActive,
  3611. onItemClick = props.onItemClick,
  3612. forceRender = props.forceRender,
  3613. className = props.className,
  3614. _props$classNames = props.classNames,
  3615. customizeClassNames = _props$classNames === void 0 ? {} : _props$classNames,
  3616. _props$styles = props.styles,
  3617. styles = _props$styles === void 0 ? {} : _props$styles,
  3618. prefixCls = props.prefixCls,
  3619. collapsible = props.collapsible,
  3620. accordion = props.accordion,
  3621. panelKey = props.panelKey,
  3622. extra = props.extra,
  3623. header = props.header,
  3624. expandIcon = props.expandIcon,
  3625. openMotion = props.openMotion,
  3626. destroyInactivePanel = props.destroyInactivePanel,
  3627. children = props.children,
  3628. resetProps = (0,objectWithoutProperties["default"])(props, _excluded);
  3629. var disabled = collapsible === 'disabled';
  3630. var ifExtraExist = extra !== null && extra !== undefined && typeof extra !== 'boolean';
  3631. var collapsibleProps = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({
  3632. onClick: function onClick() {
  3633. onItemClick === null || onItemClick === void 0 || onItemClick(panelKey);
  3634. },
  3635. onKeyDown: function onKeyDown(e) {
  3636. if (e.key === 'Enter' || e.keyCode === KeyCode["default"].ENTER || e.which === KeyCode["default"].ENTER) {
  3637. onItemClick === null || onItemClick === void 0 || onItemClick(panelKey);
  3638. }
  3639. },
  3640. role: accordion ? 'tab' : 'button'
  3641. }, 'aria-expanded', isActive), 'aria-disabled', disabled), "tabIndex", disabled ? -1 : 0);
  3642. // ======================== Icon ========================
  3643. var iconNodeInner = typeof expandIcon === 'function' ? expandIcon(props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", {
  3644. className: "arrow"
  3645. });
  3646. var iconNode = iconNodeInner && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  3647. className: "".concat(prefixCls, "-expand-icon")
  3648. }, ['header', 'icon'].includes(collapsible) ? collapsibleProps : {}), iconNodeInner);
  3649. var collapsePanelClassNames = classnames_default()("".concat(prefixCls, "-item"), (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-item-active"), isActive), "".concat(prefixCls, "-item-disabled"), disabled), className);
  3650. var headerClassName = classnames_default()(headerClass, "".concat(prefixCls, "-header"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-collapsible-").concat(collapsible), !!collapsible), customizeClassNames.header);
  3651. // ======================== HeaderProps ========================
  3652. var headerProps = (0,objectSpread2["default"])({
  3653. className: headerClassName,
  3654. style: styles.header
  3655. }, ['header', 'icon'].includes(collapsible) ? {} : collapsibleProps);
  3656. // ======================== Render ========================
  3657. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({}, resetProps, {
  3658. ref: ref,
  3659. className: collapsePanelClassNames
  3660. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", headerProps, showArrow && iconNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", (0,esm_extends["default"])({
  3661. className: "".concat(prefixCls, "-header-text")
  3662. }, collapsible === 'header' ? collapsibleProps : {}), header), ifExtraExist && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  3663. className: "".concat(prefixCls, "-extra")
  3664. }, extra)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es["default"], (0,esm_extends["default"])({
  3665. visible: isActive,
  3666. leavedClassName: "".concat(prefixCls, "-content-hidden")
  3667. }, openMotion, {
  3668. forceRender: forceRender,
  3669. removeOnLeave: destroyInactivePanel
  3670. }), function (_ref, motionRef) {
  3671. var motionClassName = _ref.className,
  3672. motionStyle = _ref.style;
  3673. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_PanelContent, {
  3674. ref: motionRef,
  3675. prefixCls: prefixCls,
  3676. className: motionClassName,
  3677. classNames: customizeClassNames,
  3678. style: motionStyle,
  3679. styles: styles,
  3680. isActive: isActive,
  3681. forceRender: forceRender,
  3682. role: accordion ? 'tabpanel' : void 0
  3683. }, children);
  3684. }));
  3685. });
  3686. /* harmony default export */ var Panel = (CollapsePanel);
  3687. ;// ./node_modules/rc-collapse/es/hooks/useItems.js
  3688. var useItems_excluded = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"];
  3689. var convertItemsToNodes = function convertItemsToNodes(items, props) {
  3690. var prefixCls = props.prefixCls,
  3691. accordion = props.accordion,
  3692. collapsible = props.collapsible,
  3693. destroyInactivePanel = props.destroyInactivePanel,
  3694. onItemClick = props.onItemClick,
  3695. activeKey = props.activeKey,
  3696. openMotion = props.openMotion,
  3697. expandIcon = props.expandIcon;
  3698. return items.map(function (item, index) {
  3699. var children = item.children,
  3700. label = item.label,
  3701. rawKey = item.key,
  3702. rawCollapsible = item.collapsible,
  3703. rawOnItemClick = item.onItemClick,
  3704. rawDestroyInactivePanel = item.destroyInactivePanel,
  3705. restProps = (0,objectWithoutProperties["default"])(item, useItems_excluded);
  3706. // You may be puzzled why you want to convert them all into strings, me too.
  3707. // Maybe: https://github.com/react-component/collapse/blob/aac303a8b6ff30e35060b4f8fecde6f4556fcbe2/src/Collapse.tsx#L15
  3708. var key = String(rawKey !== null && rawKey !== void 0 ? rawKey : index);
  3709. var mergeCollapsible = rawCollapsible !== null && rawCollapsible !== void 0 ? rawCollapsible : collapsible;
  3710. var mergeDestroyInactivePanel = rawDestroyInactivePanel !== null && rawDestroyInactivePanel !== void 0 ? rawDestroyInactivePanel : destroyInactivePanel;
  3711. var handleItemClick = function handleItemClick(value) {
  3712. if (mergeCollapsible === 'disabled') return;
  3713. onItemClick(value);
  3714. rawOnItemClick === null || rawOnItemClick === void 0 || rawOnItemClick(value);
  3715. };
  3716. var isActive = false;
  3717. if (accordion) {
  3718. isActive = activeKey[0] === key;
  3719. } else {
  3720. isActive = activeKey.indexOf(key) > -1;
  3721. }
  3722. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Panel, (0,esm_extends["default"])({}, restProps, {
  3723. prefixCls: prefixCls,
  3724. key: key,
  3725. panelKey: key,
  3726. isActive: isActive,
  3727. accordion: accordion,
  3728. openMotion: openMotion,
  3729. expandIcon: expandIcon,
  3730. header: label,
  3731. collapsible: mergeCollapsible,
  3732. onItemClick: handleItemClick,
  3733. destroyInactivePanel: mergeDestroyInactivePanel
  3734. }), children);
  3735. });
  3736. };
  3737. /**
  3738. * @deprecated The next major version will be removed
  3739. */
  3740. var getNewChild = function getNewChild(child, index, props) {
  3741. if (!child) return null;
  3742. var prefixCls = props.prefixCls,
  3743. accordion = props.accordion,
  3744. collapsible = props.collapsible,
  3745. destroyInactivePanel = props.destroyInactivePanel,
  3746. onItemClick = props.onItemClick,
  3747. activeKey = props.activeKey,
  3748. openMotion = props.openMotion,
  3749. expandIcon = props.expandIcon;
  3750. var key = child.key || String(index);
  3751. var _child$props = child.props,
  3752. header = _child$props.header,
  3753. headerClass = _child$props.headerClass,
  3754. childDestroyInactivePanel = _child$props.destroyInactivePanel,
  3755. childCollapsible = _child$props.collapsible,
  3756. childOnItemClick = _child$props.onItemClick;
  3757. var isActive = false;
  3758. if (accordion) {
  3759. isActive = activeKey[0] === key;
  3760. } else {
  3761. isActive = activeKey.indexOf(key) > -1;
  3762. }
  3763. var mergeCollapsible = childCollapsible !== null && childCollapsible !== void 0 ? childCollapsible : collapsible;
  3764. var handleItemClick = function handleItemClick(value) {
  3765. if (mergeCollapsible === 'disabled') return;
  3766. onItemClick(value);
  3767. childOnItemClick === null || childOnItemClick === void 0 || childOnItemClick(value);
  3768. };
  3769. var childProps = {
  3770. key: key,
  3771. panelKey: key,
  3772. header: header,
  3773. headerClass: headerClass,
  3774. isActive: isActive,
  3775. prefixCls: prefixCls,
  3776. destroyInactivePanel: childDestroyInactivePanel !== null && childDestroyInactivePanel !== void 0 ? childDestroyInactivePanel : destroyInactivePanel,
  3777. openMotion: openMotion,
  3778. accordion: accordion,
  3779. children: child.props.children,
  3780. onItemClick: handleItemClick,
  3781. expandIcon: expandIcon,
  3782. collapsible: mergeCollapsible
  3783. };
  3784. // https://github.com/ant-design/ant-design/issues/20479
  3785. if (typeof child.type === 'string') {
  3786. return child;
  3787. }
  3788. Object.keys(childProps).forEach(function (propName) {
  3789. if (typeof childProps[propName] === 'undefined') {
  3790. delete childProps[propName];
  3791. }
  3792. });
  3793. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, childProps);
  3794. };
  3795. function useItems(items, rawChildren, props) {
  3796. if (Array.isArray(items)) {
  3797. return convertItemsToNodes(items, props);
  3798. }
  3799. return (0,toArray["default"])(rawChildren).map(function (child, index) {
  3800. return getNewChild(child, index, props);
  3801. });
  3802. }
  3803. /* harmony default export */ var hooks_useItems = (useItems);
  3804. // EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
  3805. var pickAttrs = __webpack_require__("./node_modules/rc-util/es/pickAttrs.js");
  3806. ;// ./node_modules/rc-collapse/es/Collapse.js
  3807. function getActiveKeysArray(activeKey) {
  3808. var currentActiveKey = activeKey;
  3809. if (!Array.isArray(currentActiveKey)) {
  3810. var activeKeyType = (0,esm_typeof["default"])(currentActiveKey);
  3811. currentActiveKey = activeKeyType === 'number' || activeKeyType === 'string' ? [currentActiveKey] : [];
  3812. }
  3813. return currentActiveKey.map(function (key) {
  3814. return String(key);
  3815. });
  3816. }
  3817. var Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
  3818. var _props$prefixCls = props.prefixCls,
  3819. prefixCls = _props$prefixCls === void 0 ? 'rc-collapse' : _props$prefixCls,
  3820. _props$destroyInactiv = props.destroyInactivePanel,
  3821. destroyInactivePanel = _props$destroyInactiv === void 0 ? false : _props$destroyInactiv,
  3822. style = props.style,
  3823. accordion = props.accordion,
  3824. className = props.className,
  3825. children = props.children,
  3826. collapsible = props.collapsible,
  3827. openMotion = props.openMotion,
  3828. expandIcon = props.expandIcon,
  3829. rawActiveKey = props.activeKey,
  3830. defaultActiveKey = props.defaultActiveKey,
  3831. _onChange = props.onChange,
  3832. items = props.items;
  3833. var collapseClassName = classnames_default()(prefixCls, className);
  3834. var _useMergedState = (0,useMergedState["default"])([], {
  3835. value: rawActiveKey,
  3836. onChange: function onChange(v) {
  3837. return _onChange === null || _onChange === void 0 ? void 0 : _onChange(v);
  3838. },
  3839. defaultValue: defaultActiveKey,
  3840. postState: getActiveKeysArray
  3841. }),
  3842. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  3843. activeKey = _useMergedState2[0],
  3844. setActiveKey = _useMergedState2[1];
  3845. var onItemClick = function onItemClick(key) {
  3846. return setActiveKey(function () {
  3847. if (accordion) {
  3848. return activeKey[0] === key ? [] : [key];
  3849. }
  3850. var index = activeKey.indexOf(key);
  3851. var isActive = index > -1;
  3852. if (isActive) {
  3853. return activeKey.filter(function (item) {
  3854. return item !== key;
  3855. });
  3856. }
  3857. return [].concat((0,toConsumableArray["default"])(activeKey), [key]);
  3858. });
  3859. };
  3860. // ======================== Children ========================
  3861. (0,warning["default"])(!children, '[rc-collapse] `children` will be removed in next major version. Please use `items` instead.');
  3862. var mergedChildren = hooks_useItems(items, children, {
  3863. prefixCls: prefixCls,
  3864. accordion: accordion,
  3865. openMotion: openMotion,
  3866. expandIcon: expandIcon,
  3867. collapsible: collapsible,
  3868. destroyInactivePanel: destroyInactivePanel,
  3869. onItemClick: onItemClick,
  3870. activeKey: activeKey
  3871. });
  3872. // ======================== Render ========================
  3873. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  3874. ref: ref,
  3875. className: collapseClassName,
  3876. style: style,
  3877. role: accordion ? 'tablist' : undefined
  3878. }, (0,pickAttrs["default"])(props, {
  3879. aria: true,
  3880. data: true
  3881. })), mergedChildren);
  3882. });
  3883. /* harmony default export */ var es_Collapse = (Object.assign(Collapse, {
  3884. /**
  3885. * @deprecated use `items` instead, will be removed in `v4.0.0`
  3886. */
  3887. Panel: Panel
  3888. }));
  3889. ;// ./node_modules/rc-collapse/es/index.js
  3890. /* harmony default export */ var rc_collapse_es = (es_Collapse);
  3891. /**
  3892. * @deprecated use `items` instead, will be removed in `v4.0.0`
  3893. */
  3894. var es_Panel = es_Collapse.Panel;
  3895. // EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
  3896. var omit = __webpack_require__("./node_modules/rc-util/es/omit.js");
  3897. // EXTERNAL MODULE: ./components/_util/motion.ts
  3898. var motion = __webpack_require__("./components/_util/motion.ts");
  3899. // EXTERNAL MODULE: ./components/_util/reactNode.ts
  3900. var reactNode = __webpack_require__("./components/_util/reactNode.ts");
  3901. // EXTERNAL MODULE: ./components/_util/warning.ts
  3902. var _util_warning = __webpack_require__("./components/_util/warning.ts");
  3903. // EXTERNAL MODULE: ./components/config-provider/context.ts
  3904. var context = __webpack_require__("./components/config-provider/context.ts");
  3905. // EXTERNAL MODULE: ./components/config-provider/hooks/useSize.ts
  3906. var useSize = __webpack_require__("./components/config-provider/hooks/useSize.ts");
  3907. ;// ./components/collapse/CollapsePanel.tsx
  3908. const CollapsePanel_CollapsePanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  3909. if (true) {
  3910. const warning = (0,_util_warning.devUseWarning)('Collapse.Panel');
  3911. warning.deprecated(!('disabled' in props), 'disabled', 'collapsible="disabled"');
  3912. }
  3913. const {
  3914. getPrefixCls
  3915. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context.ConfigContext);
  3916. const {
  3917. prefixCls: customizePrefixCls,
  3918. className,
  3919. showArrow = true
  3920. } = props;
  3921. const prefixCls = getPrefixCls('collapse', customizePrefixCls);
  3922. const collapsePanelClassName = classnames_default()({
  3923. [`${prefixCls}-no-arrow`]: !showArrow
  3924. }, className);
  3925. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_collapse_es.Panel, Object.assign({
  3926. ref: ref
  3927. }, props, {
  3928. prefixCls: prefixCls,
  3929. className: collapsePanelClassName
  3930. }));
  3931. });
  3932. /* harmony default export */ var collapse_CollapsePanel = (CollapsePanel_CollapsePanel);
  3933. // EXTERNAL MODULE: ./components/collapse/style/index.ts
  3934. var collapse_style = __webpack_require__("./components/collapse/style/index.ts");
  3935. ;// ./components/collapse/Collapse.tsx
  3936. const Collapse_Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  3937. const {
  3938. getPrefixCls,
  3939. direction,
  3940. expandIcon: contextExpandIcon,
  3941. className: contextClassName,
  3942. style: contextStyle
  3943. } = (0,context.useComponentConfig)('collapse');
  3944. const {
  3945. prefixCls: customizePrefixCls,
  3946. className,
  3947. rootClassName,
  3948. style,
  3949. bordered = true,
  3950. ghost,
  3951. size: customizeSize,
  3952. expandIconPosition = 'start',
  3953. children,
  3954. destroyInactivePanel,
  3955. destroyOnHidden,
  3956. expandIcon
  3957. } = props;
  3958. const mergedSize = (0,useSize["default"])(ctx => {
  3959. var _a;
  3960. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : ctx) !== null && _a !== void 0 ? _a : 'middle';
  3961. });
  3962. const prefixCls = getPrefixCls('collapse', customizePrefixCls);
  3963. const rootPrefixCls = getPrefixCls();
  3964. const [wrapCSSVar, hashId, cssVarCls] = (0,collapse_style["default"])(prefixCls);
  3965. if (true) {
  3966. const warning = (0,_util_warning.devUseWarning)('Collapse');
  3967. // Warning if use legacy type `expandIconPosition`
  3968. true ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'deprecated', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : 0;
  3969. warning.deprecated(!('destroyInactivePanel' in props), 'destroyInactivePanel', 'destroyOnHidden');
  3970. }
  3971. // Align with logic position
  3972. const mergedExpandIconPosition = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  3973. if (expandIconPosition === 'left') {
  3974. return 'start';
  3975. }
  3976. return expandIconPosition === 'right' ? 'end' : expandIconPosition;
  3977. }, [expandIconPosition]);
  3978. const mergedExpandIcon = expandIcon !== null && expandIcon !== void 0 ? expandIcon : contextExpandIcon;
  3979. const renderExpandIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((panelProps = {}) => {
  3980. const icon = typeof mergedExpandIcon === 'function' ? mergedExpandIcon(panelProps) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], {
  3981. rotate: panelProps.isActive ? direction === 'rtl' ? -90 : 90 : undefined,
  3982. "aria-label": panelProps.isActive ? 'expanded' : 'collapsed'
  3983. }));
  3984. return (0,reactNode.cloneElement)(icon, () => {
  3985. var _a;
  3986. return {
  3987. className: classnames_default()((_a = icon.props) === null || _a === void 0 ? void 0 : _a.className, `${prefixCls}-arrow`)
  3988. };
  3989. });
  3990. }, [mergedExpandIcon, prefixCls, direction]);
  3991. const collapseClassName = classnames_default()(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {
  3992. [`${prefixCls}-borderless`]: !bordered,
  3993. [`${prefixCls}-rtl`]: direction === 'rtl',
  3994. [`${prefixCls}-ghost`]: !!ghost,
  3995. [`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'
  3996. }, contextClassName, className, rootClassName, hashId, cssVarCls);
  3997. const openMotion = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, (0,motion["default"])(rootPrefixCls)), {
  3998. motionAppear: false,
  3999. leavedClassName: `${prefixCls}-content-hidden`
  4000. }), [rootPrefixCls, prefixCls]);
  4001. const items = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  4002. if (!children) {
  4003. return null;
  4004. }
  4005. return (0,toArray["default"])(children).map((child, index) => {
  4006. var _a, _b;
  4007. const childProps = child.props;
  4008. if (childProps === null || childProps === void 0 ? void 0 : childProps.disabled) {
  4009. const key = (_a = child.key) !== null && _a !== void 0 ? _a : String(index);
  4010. const mergedChildProps = Object.assign(Object.assign({}, (0,omit["default"])(child.props, ['disabled'])), {
  4011. key,
  4012. collapsible: (_b = childProps.collapsible) !== null && _b !== void 0 ? _b : 'disabled'
  4013. });
  4014. return (0,reactNode.cloneElement)(child, mergedChildProps);
  4015. }
  4016. return child;
  4017. });
  4018. }, [children]);
  4019. return wrapCSSVar(
  4020. /*#__PURE__*/
  4021. // @ts-ignore
  4022. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_collapse_es, Object.assign({
  4023. ref: ref,
  4024. openMotion: openMotion
  4025. }, (0,omit["default"])(props, ['rootClassName']), {
  4026. expandIcon: renderExpandIcon,
  4027. prefixCls: prefixCls,
  4028. className: collapseClassName,
  4029. style: Object.assign(Object.assign({}, contextStyle), style),
  4030. // TODO: In the future, destroyInactivePanel in rc-collapse needs to be upgrade to destroyOnHidden
  4031. destroyInactivePanel: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyInactivePanel
  4032. }), items));
  4033. });
  4034. if (true) {
  4035. Collapse_Collapse.displayName = 'Collapse';
  4036. }
  4037. /* harmony default export */ var collapse_Collapse = (Object.assign(Collapse_Collapse, {
  4038. Panel: collapse_CollapsePanel
  4039. }));
  4040. ;// ./components/collapse/index.tsx
  4041. /* harmony default export */ var collapse = (collapse_Collapse);
  4042. /***/ }),
  4043. /***/ "./components/collapse/style/index.ts":
  4044. /*!********************************************!*\
  4045. !*** ./components/collapse/style/index.ts ***!
  4046. \********************************************/
  4047. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  4048. "use strict";
  4049. __webpack_require__.r(__webpack_exports__);
  4050. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4051. /* harmony export */ genBaseStyle: function() { return /* binding */ genBaseStyle; },
  4052. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  4053. /* harmony export */ });
  4054. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  4055. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  4056. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  4057. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/collapse.ts");
  4058. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  4059. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  4060. const genBaseStyle = token => {
  4061. const {
  4062. componentCls,
  4063. contentBg,
  4064. padding,
  4065. headerBg,
  4066. headerPadding,
  4067. collapseHeaderPaddingSM,
  4068. collapseHeaderPaddingLG,
  4069. collapsePanelBorderRadius,
  4070. lineWidth,
  4071. lineType,
  4072. colorBorder,
  4073. colorText,
  4074. colorTextHeading,
  4075. colorTextDisabled,
  4076. fontSizeLG,
  4077. lineHeight,
  4078. lineHeightLG,
  4079. marginSM,
  4080. paddingSM,
  4081. paddingLG,
  4082. paddingXS,
  4083. motionDurationSlow,
  4084. fontSizeIcon,
  4085. contentPadding,
  4086. fontHeight,
  4087. fontHeightLG
  4088. } = token;
  4089. const borderBase = `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorBorder}`;
  4090. return {
  4091. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  4092. backgroundColor: headerBg,
  4093. border: borderBase,
  4094. borderRadius: collapsePanelBorderRadius,
  4095. '&-rtl': {
  4096. direction: 'rtl'
  4097. },
  4098. [`& > ${componentCls}-item`]: {
  4099. borderBottom: borderBase,
  4100. '&:first-child': {
  4101. [`
  4102. &,
  4103. & > ${componentCls}-header`]: {
  4104. borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} 0 0`
  4105. }
  4106. },
  4107. '&:last-child': {
  4108. [`
  4109. &,
  4110. & > ${componentCls}-header`]: {
  4111. borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)}`
  4112. }
  4113. },
  4114. [`> ${componentCls}-header`]: Object.assign(Object.assign({
  4115. position: 'relative',
  4116. display: 'flex',
  4117. flexWrap: 'nowrap',
  4118. alignItems: 'flex-start',
  4119. padding: headerPadding,
  4120. color: colorTextHeading,
  4121. lineHeight,
  4122. cursor: 'pointer',
  4123. transition: `all ${motionDurationSlow}, visibility 0s`
  4124. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusStyle)(token)), {
  4125. [`> ${componentCls}-header-text`]: {
  4126. flex: 'auto'
  4127. },
  4128. // >>>>> Arrow
  4129. [`${componentCls}-expand-icon`]: {
  4130. height: fontHeight,
  4131. display: 'flex',
  4132. alignItems: 'center',
  4133. paddingInlineEnd: marginSM
  4134. },
  4135. [`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetIcon)()), {
  4136. fontSize: fontSizeIcon,
  4137. // when `transform: rotate()` is applied to icon's root element
  4138. transition: `transform ${motionDurationSlow}`,
  4139. // when `transform: rotate()` is applied to icon's child element
  4140. svg: {
  4141. transition: `transform ${motionDurationSlow}`
  4142. }
  4143. }),
  4144. // >>>>> Text
  4145. [`${componentCls}-header-text`]: {
  4146. marginInlineEnd: 'auto'
  4147. }
  4148. }),
  4149. [`${componentCls}-collapsible-header`]: {
  4150. cursor: 'default',
  4151. [`${componentCls}-header-text`]: {
  4152. flex: 'none',
  4153. cursor: 'pointer'
  4154. },
  4155. [`${componentCls}-expand-icon`]: {
  4156. cursor: 'pointer'
  4157. }
  4158. },
  4159. [`${componentCls}-collapsible-icon`]: {
  4160. cursor: 'unset',
  4161. [`${componentCls}-expand-icon`]: {
  4162. cursor: 'pointer'
  4163. }
  4164. }
  4165. },
  4166. [`${componentCls}-content`]: {
  4167. color: colorText,
  4168. backgroundColor: contentBg,
  4169. borderTop: borderBase,
  4170. [`& > ${componentCls}-content-box`]: {
  4171. padding: contentPadding
  4172. },
  4173. '&-hidden': {
  4174. display: 'none'
  4175. }
  4176. },
  4177. '&-small': {
  4178. [`> ${componentCls}-item`]: {
  4179. [`> ${componentCls}-header`]: {
  4180. padding: collapseHeaderPaddingSM,
  4181. paddingInlineStart: paddingXS,
  4182. [`> ${componentCls}-expand-icon`]: {
  4183. // Arrow offset
  4184. marginInlineStart: token.calc(paddingSM).sub(paddingXS).equal()
  4185. }
  4186. },
  4187. [`> ${componentCls}-content > ${componentCls}-content-box`]: {
  4188. padding: paddingSM
  4189. }
  4190. }
  4191. },
  4192. '&-large': {
  4193. [`> ${componentCls}-item`]: {
  4194. fontSize: fontSizeLG,
  4195. lineHeight: lineHeightLG,
  4196. [`> ${componentCls}-header`]: {
  4197. padding: collapseHeaderPaddingLG,
  4198. paddingInlineStart: padding,
  4199. [`> ${componentCls}-expand-icon`]: {
  4200. height: fontHeightLG,
  4201. // Arrow offset
  4202. marginInlineStart: token.calc(paddingLG).sub(padding).equal()
  4203. }
  4204. },
  4205. [`> ${componentCls}-content > ${componentCls}-content-box`]: {
  4206. padding: paddingLG
  4207. }
  4208. }
  4209. },
  4210. [`${componentCls}-item:last-child`]: {
  4211. borderBottom: 0,
  4212. [`> ${componentCls}-content`]: {
  4213. borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(collapsePanelBorderRadius)}`
  4214. }
  4215. },
  4216. [`& ${componentCls}-item-disabled > ${componentCls}-header`]: {
  4217. [`
  4218. &,
  4219. & > .arrow
  4220. `]: {
  4221. color: colorTextDisabled,
  4222. cursor: 'not-allowed'
  4223. }
  4224. },
  4225. // ========================== Icon Position ==========================
  4226. [`&${componentCls}-icon-position-end`]: {
  4227. [`& > ${componentCls}-item`]: {
  4228. [`> ${componentCls}-header`]: {
  4229. [`${componentCls}-expand-icon`]: {
  4230. order: 1,
  4231. paddingInlineEnd: 0,
  4232. paddingInlineStart: marginSM
  4233. }
  4234. }
  4235. }
  4236. }
  4237. })
  4238. };
  4239. };
  4240. const genArrowStyle = token => {
  4241. const {
  4242. componentCls
  4243. } = token;
  4244. const fixedSelector = `> ${componentCls}-item > ${componentCls}-header ${componentCls}-arrow`;
  4245. return {
  4246. [`${componentCls}-rtl`]: {
  4247. [fixedSelector]: {
  4248. transform: `rotate(180deg)`
  4249. }
  4250. }
  4251. };
  4252. };
  4253. const genBorderlessStyle = token => {
  4254. const {
  4255. componentCls,
  4256. headerBg,
  4257. borderlessContentPadding,
  4258. borderlessContentBg,
  4259. colorBorder
  4260. } = token;
  4261. return {
  4262. [`${componentCls}-borderless`]: {
  4263. backgroundColor: headerBg,
  4264. border: 0,
  4265. [`> ${componentCls}-item`]: {
  4266. borderBottom: `1px solid ${colorBorder}`
  4267. },
  4268. [`
  4269. > ${componentCls}-item:last-child,
  4270. > ${componentCls}-item:last-child ${componentCls}-header
  4271. `]: {
  4272. borderRadius: 0
  4273. },
  4274. [`> ${componentCls}-item:last-child`]: {
  4275. borderBottom: 0
  4276. },
  4277. [`> ${componentCls}-item > ${componentCls}-content`]: {
  4278. backgroundColor: borderlessContentBg,
  4279. borderTop: 0
  4280. },
  4281. [`> ${componentCls}-item > ${componentCls}-content > ${componentCls}-content-box`]: {
  4282. padding: borderlessContentPadding
  4283. }
  4284. }
  4285. };
  4286. };
  4287. const genGhostStyle = token => {
  4288. const {
  4289. componentCls,
  4290. paddingSM
  4291. } = token;
  4292. return {
  4293. [`${componentCls}-ghost`]: {
  4294. backgroundColor: 'transparent',
  4295. border: 0,
  4296. [`> ${componentCls}-item`]: {
  4297. borderBottom: 0,
  4298. [`> ${componentCls}-content`]: {
  4299. backgroundColor: 'transparent',
  4300. border: 0,
  4301. [`> ${componentCls}-content-box`]: {
  4302. paddingBlock: paddingSM
  4303. }
  4304. }
  4305. }
  4306. }
  4307. };
  4308. };
  4309. const prepareComponentToken = token => ({
  4310. headerPadding: `${token.paddingSM}px ${token.padding}px`,
  4311. headerBg: token.colorFillAlter,
  4312. contentPadding: `${token.padding}px 16px`,
  4313. // Fixed Value
  4314. contentBg: token.colorBgContainer,
  4315. borderlessContentPadding: `${token.paddingXXS}px 16px ${token.padding}px`,
  4316. borderlessContentBg: 'transparent'
  4317. });
  4318. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Collapse', token => {
  4319. const collapseToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  4320. collapseHeaderPaddingSM: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingSM)}`,
  4321. collapseHeaderPaddingLG: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingLG)}`,
  4322. collapsePanelBorderRadius: token.borderRadiusLG
  4323. });
  4324. return [genBaseStyle(collapseToken), genBorderlessStyle(collapseToken), genGhostStyle(collapseToken), genArrowStyle(collapseToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_2__["default"])(collapseToken)];
  4325. }, prepareComponentToken));
  4326. /***/ }),
  4327. /***/ "./components/color-picker/color.ts":
  4328. /*!******************************************!*\
  4329. !*** ./components/color-picker/color.ts ***!
  4330. \******************************************/
  4331. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  4332. "use strict";
  4333. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4334. /* harmony export */ AggregationColor: function() { return /* binding */ AggregationColor; },
  4335. /* harmony export */ toHexFormat: function() { return /* binding */ toHexFormat; }
  4336. /* harmony export */ });
  4337. /* unused harmony export getHex */
  4338. /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  4339. /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
  4340. /* harmony import */ var _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @rc-component/color-picker */ "./node_modules/@rc-component/color-picker/es/index.js");
  4341. const toHexFormat = (value, alpha) => (value === null || value === void 0 ? void 0 : value.replace(/[^\w/]/g, '').slice(0, alpha ? 8 : 6)) || '';
  4342. const getHex = (value, alpha) => value ? toHexFormat(value, alpha) : '';
  4343. let AggregationColor = /*#__PURE__*/function () {
  4344. function AggregationColor(color) {
  4345. (0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, AggregationColor);
  4346. var _a;
  4347. this.cleared = false;
  4348. // Clone from another AggregationColor
  4349. if (color instanceof AggregationColor) {
  4350. this.metaColor = color.metaColor.clone();
  4351. this.colors = (_a = color.colors) === null || _a === void 0 ? void 0 : _a.map(info => ({
  4352. color: new AggregationColor(info.color),
  4353. percent: info.percent
  4354. }));
  4355. this.cleared = color.cleared;
  4356. return;
  4357. }
  4358. const isArray = Array.isArray(color);
  4359. if (isArray && color.length) {
  4360. this.colors = color.map(({
  4361. color: c,
  4362. percent
  4363. }) => ({
  4364. color: new AggregationColor(c),
  4365. percent
  4366. }));
  4367. this.metaColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_2__.Color(this.colors[0].color.metaColor);
  4368. } else {
  4369. this.metaColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_2__.Color(isArray ? '' : color);
  4370. }
  4371. if (!color || isArray && !this.colors) {
  4372. this.metaColor = this.metaColor.setA(0);
  4373. this.cleared = true;
  4374. }
  4375. }
  4376. return (0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(AggregationColor, [{
  4377. key: "toHsb",
  4378. value: function toHsb() {
  4379. return this.metaColor.toHsb();
  4380. }
  4381. }, {
  4382. key: "toHsbString",
  4383. value: function toHsbString() {
  4384. return this.metaColor.toHsbString();
  4385. }
  4386. }, {
  4387. key: "toHex",
  4388. value: function toHex() {
  4389. return getHex(this.toHexString(), this.metaColor.a < 1);
  4390. }
  4391. }, {
  4392. key: "toHexString",
  4393. value: function toHexString() {
  4394. return this.metaColor.toHexString();
  4395. }
  4396. }, {
  4397. key: "toRgb",
  4398. value: function toRgb() {
  4399. return this.metaColor.toRgb();
  4400. }
  4401. }, {
  4402. key: "toRgbString",
  4403. value: function toRgbString() {
  4404. return this.metaColor.toRgbString();
  4405. }
  4406. }, {
  4407. key: "isGradient",
  4408. value: function isGradient() {
  4409. return !!this.colors && !this.cleared;
  4410. }
  4411. }, {
  4412. key: "getColors",
  4413. value: function getColors() {
  4414. return this.colors || [{
  4415. color: this,
  4416. percent: 0
  4417. }];
  4418. }
  4419. }, {
  4420. key: "toCssString",
  4421. value: function toCssString() {
  4422. const {
  4423. colors
  4424. } = this;
  4425. // CSS line-gradient
  4426. if (colors) {
  4427. const colorsStr = colors.map(c => `${c.color.toRgbString()} ${c.percent}%`).join(', ');
  4428. return `linear-gradient(90deg, ${colorsStr})`;
  4429. }
  4430. return this.metaColor.toRgbString();
  4431. }
  4432. }, {
  4433. key: "equals",
  4434. value: function equals(color) {
  4435. if (!color || this.isGradient() !== color.isGradient()) {
  4436. return false;
  4437. }
  4438. if (!this.isGradient()) {
  4439. return this.toHexString() === color.toHexString();
  4440. }
  4441. return this.colors.length === color.colors.length && this.colors.every((c, i) => {
  4442. const target = color.colors[i];
  4443. return c.percent === target.percent && c.color.equals(target.color);
  4444. });
  4445. }
  4446. }]);
  4447. }();
  4448. /***/ }),
  4449. /***/ "./components/color-picker/components/ColorPresets.tsx":
  4450. /*!*************************************************************!*\
  4451. !*** ./components/color-picker/components/ColorPresets.tsx ***!
  4452. \*************************************************************/
  4453. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  4454. "use strict";
  4455. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4456. /* harmony export */ isBright: function() { return /* binding */ isBright; }
  4457. /* harmony export */ });
  4458. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  4459. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  4460. /* harmony import */ var _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rc-component/color-picker */ "./node_modules/@rc-component/color-picker/es/index.js");
  4461. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
  4462. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
  4463. /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js");
  4464. /* harmony import */ var _collapse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../collapse */ "./components/collapse/index.tsx");
  4465. /* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../locale */ "./components/locale/useLocale.ts");
  4466. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/useToken.ts");
  4467. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util */ "./components/color-picker/util.ts");
  4468. const genPresetColor = list => list.map(value => {
  4469. value.colors = value.colors.map(_util__WEBPACK_IMPORTED_MODULE_7__.generateColor);
  4470. return value;
  4471. });
  4472. const isBright = (value, bgColorToken) => {
  4473. const {
  4474. r,
  4475. g,
  4476. b,
  4477. a
  4478. } = value.toRgb();
  4479. const hsv = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.Color(value.toRgbString()).onBackground(bgColorToken).toHsv();
  4480. if (a <= 0.5) {
  4481. // Adapted to dark mode
  4482. return hsv.v > 0.5;
  4483. }
  4484. return r * 0.299 + g * 0.587 + b * 0.114 > 192;
  4485. };
  4486. const genCollapsePanelKey = (preset, index) => {
  4487. var _a;
  4488. const mergedKey = (_a = preset.key) !== null && _a !== void 0 ? _a : index;
  4489. return `panel-${mergedKey}`;
  4490. };
  4491. const ColorPresets = ({
  4492. prefixCls,
  4493. presets,
  4494. value: color,
  4495. onChange
  4496. }) => {
  4497. const [locale] = (0,_locale__WEBPACK_IMPORTED_MODULE_5__["default"])('ColorPicker');
  4498. const [, token] = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__["default"])();
  4499. const [presetsValue] = (0,rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_3__["default"])(genPresetColor(presets), {
  4500. value: genPresetColor(presets),
  4501. postState: genPresetColor
  4502. });
  4503. const colorPresetsPrefixCls = `${prefixCls}-presets`;
  4504. const activeKeys = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => presetsValue.reduce((acc, preset, index) => {
  4505. const {
  4506. defaultOpen = true
  4507. } = preset;
  4508. if (defaultOpen) {
  4509. acc.push(genCollapsePanelKey(preset, index));
  4510. }
  4511. return acc;
  4512. }, []), [presetsValue]);
  4513. const handleClick = colorValue => {
  4514. onChange === null || onChange === void 0 ? void 0 : onChange(colorValue);
  4515. };
  4516. const items = presetsValue.map((preset, index) => {
  4517. var _a;
  4518. return {
  4519. key: genCollapsePanelKey(preset, index),
  4520. label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
  4521. className: `${colorPresetsPrefixCls}-label`
  4522. }, preset === null || preset === void 0 ? void 0 : preset.label),
  4523. children: (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
  4524. className: `${colorPresetsPrefixCls}-items`
  4525. }, Array.isArray(preset === null || preset === void 0 ? void 0 : preset.colors) && ((_a = preset.colors) === null || _a === void 0 ? void 0 : _a.length) > 0 ? preset.colors.map((presetColor, index) => (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.ColorBlock
  4526. // eslint-disable-next-line react/no-array-index-key
  4527. , {
  4528. // eslint-disable-next-line react/no-array-index-key
  4529. key: `preset-${index}-${presetColor.toHexString()}`,
  4530. color: (0,_util__WEBPACK_IMPORTED_MODULE_7__.generateColor)(presetColor).toRgbString(),
  4531. prefixCls: prefixCls,
  4532. className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(`${colorPresetsPrefixCls}-color`, {
  4533. [`${colorPresetsPrefixCls}-color-checked`]: presetColor.toHexString() === (color === null || color === void 0 ? void 0 : color.toHexString()),
  4534. [`${colorPresetsPrefixCls}-color-bright`]: isBright(presetColor, token.colorBgElevated)
  4535. }),
  4536. onClick: () => handleClick(presetColor)
  4537. }))) : (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
  4538. className: `${colorPresetsPrefixCls}-empty`
  4539. }, locale.presetEmpty))))
  4540. };
  4541. });
  4542. return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
  4543. className: colorPresetsPrefixCls
  4544. }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_collapse__WEBPACK_IMPORTED_MODULE_4__["default"], {
  4545. defaultActiveKey: activeKeys,
  4546. ghost: true,
  4547. items: items
  4548. }));
  4549. };
  4550. /* harmony default export */ __webpack_exports__["default"] = (ColorPresets);
  4551. /***/ }),
  4552. /***/ "./components/color-picker/style/index.ts":
  4553. /*!************************************************************!*\
  4554. !*** ./components/color-picker/style/index.ts + 5 modules ***!
  4555. \************************************************************/
  4556. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  4557. "use strict";
  4558. // ESM COMPAT FLAG
  4559. __webpack_require__.r(__webpack_exports__);
  4560. // EXPORTS
  4561. __webpack_require__.d(__webpack_exports__, {
  4562. "default": function() { return /* binding */ style; },
  4563. genActiveStyle: function() { return /* binding */ genActiveStyle; }
  4564. });
  4565. // EXTERNAL MODULE: ./alias/cssinjs.js
  4566. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  4567. // EXTERNAL MODULE: ./components/style/compact-item.ts
  4568. var compact_item = __webpack_require__("./components/style/compact-item.ts");
  4569. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  4570. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  4571. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  4572. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  4573. ;// ./components/color-picker/style/color-block.ts
  4574. /**
  4575. * @private Internal usage only
  4576. * see: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/conic-gradient#checkerboard
  4577. */
  4578. const getTransBg = (size, colorFill) => ({
  4579. backgroundImage: `conic-gradient(${colorFill} 25%, transparent 25% 50%, ${colorFill} 50% 75%, transparent 75% 100%)`,
  4580. backgroundSize: `${size} ${size}`
  4581. });
  4582. const genColorBlockStyle = (token, size) => {
  4583. const {
  4584. componentCls,
  4585. borderRadiusSM,
  4586. colorPickerInsetShadow,
  4587. lineWidth,
  4588. colorFillSecondary
  4589. } = token;
  4590. return {
  4591. [`${componentCls}-color-block`]: Object.assign(Object.assign({
  4592. position: 'relative',
  4593. borderRadius: borderRadiusSM,
  4594. width: size,
  4595. height: size,
  4596. boxShadow: colorPickerInsetShadow,
  4597. flex: 'none'
  4598. }, getTransBg('50%', token.colorFillSecondary)), {
  4599. [`${componentCls}-color-block-inner`]: {
  4600. width: '100%',
  4601. height: '100%',
  4602. boxShadow: `inset 0 0 0 ${(0,cssinjs.unit)(lineWidth)} ${colorFillSecondary}`,
  4603. borderRadius: 'inherit'
  4604. }
  4605. })
  4606. };
  4607. };
  4608. /* harmony default export */ var color_block = (genColorBlockStyle);
  4609. ;// ./components/color-picker/style/input.ts
  4610. const genInputStyle = token => {
  4611. const {
  4612. componentCls,
  4613. antCls,
  4614. fontSizeSM,
  4615. lineHeightSM,
  4616. colorPickerAlphaInputWidth,
  4617. marginXXS,
  4618. paddingXXS,
  4619. controlHeightSM,
  4620. marginXS,
  4621. fontSizeIcon,
  4622. paddingXS,
  4623. colorTextPlaceholder,
  4624. colorPickerInputNumberHandleWidth,
  4625. lineWidth
  4626. } = token;
  4627. return {
  4628. [`${componentCls}-input-container`]: {
  4629. display: 'flex',
  4630. [`${componentCls}-steppers${antCls}-input-number`]: {
  4631. fontSize: fontSizeSM,
  4632. lineHeight: lineHeightSM,
  4633. [`${antCls}-input-number-input`]: {
  4634. paddingInlineStart: paddingXXS,
  4635. paddingInlineEnd: 0
  4636. },
  4637. [`${antCls}-input-number-handler-wrap`]: {
  4638. width: colorPickerInputNumberHandleWidth
  4639. }
  4640. },
  4641. [`${componentCls}-steppers${componentCls}-alpha-input`]: {
  4642. flex: `0 0 ${(0,cssinjs.unit)(colorPickerAlphaInputWidth)}`,
  4643. marginInlineStart: marginXXS
  4644. },
  4645. [`${componentCls}-format-select${antCls}-select`]: {
  4646. marginInlineEnd: marginXS,
  4647. width: 'auto',
  4648. '&-single': {
  4649. [`${antCls}-select-selector`]: {
  4650. padding: 0,
  4651. border: 0
  4652. },
  4653. [`${antCls}-select-arrow`]: {
  4654. insetInlineEnd: 0
  4655. },
  4656. [`${antCls}-select-selection-item`]: {
  4657. paddingInlineEnd: token.calc(fontSizeIcon).add(marginXXS).equal(),
  4658. fontSize: fontSizeSM,
  4659. lineHeight: (0,cssinjs.unit)(controlHeightSM)
  4660. },
  4661. [`${antCls}-select-item-option-content`]: {
  4662. fontSize: fontSizeSM,
  4663. lineHeight: lineHeightSM
  4664. },
  4665. [`${antCls}-select-dropdown`]: {
  4666. [`${antCls}-select-item`]: {
  4667. minHeight: 'auto'
  4668. }
  4669. }
  4670. }
  4671. },
  4672. [`${componentCls}-input`]: {
  4673. gap: marginXXS,
  4674. alignItems: 'center',
  4675. flex: 1,
  4676. width: 0,
  4677. [`${componentCls}-hsb-input,${componentCls}-rgb-input`]: {
  4678. display: 'flex',
  4679. gap: marginXXS,
  4680. alignItems: 'center'
  4681. },
  4682. [`${componentCls}-steppers`]: {
  4683. flex: 1
  4684. },
  4685. [`${componentCls}-hex-input${antCls}-input-affix-wrapper`]: {
  4686. flex: 1,
  4687. padding: `0 ${(0,cssinjs.unit)(paddingXS)}`,
  4688. [`${antCls}-input`]: {
  4689. fontSize: fontSizeSM,
  4690. textTransform: 'uppercase',
  4691. lineHeight: (0,cssinjs.unit)(token.calc(controlHeightSM).sub(token.calc(lineWidth).mul(2)).equal())
  4692. },
  4693. [`${antCls}-input-prefix`]: {
  4694. color: colorTextPlaceholder
  4695. }
  4696. }
  4697. }
  4698. }
  4699. };
  4700. };
  4701. /* harmony default export */ var input = (genInputStyle);
  4702. ;// ./components/color-picker/style/picker.ts
  4703. const genPickerStyle = token => {
  4704. const {
  4705. componentCls,
  4706. controlHeightLG,
  4707. borderRadiusSM,
  4708. colorPickerInsetShadow,
  4709. marginSM,
  4710. colorBgElevated,
  4711. colorFillSecondary,
  4712. lineWidthBold,
  4713. colorPickerHandlerSize
  4714. } = token;
  4715. return {
  4716. userSelect: 'none',
  4717. [`${componentCls}-select`]: {
  4718. [`${componentCls}-palette`]: {
  4719. minHeight: token.calc(controlHeightLG).mul(4).equal(),
  4720. overflow: 'hidden',
  4721. borderRadius: borderRadiusSM
  4722. },
  4723. [`${componentCls}-saturation`]: {
  4724. position: 'absolute',
  4725. borderRadius: 'inherit',
  4726. boxShadow: colorPickerInsetShadow,
  4727. inset: 0
  4728. },
  4729. marginBottom: marginSM
  4730. },
  4731. // ======================== Panel =========================
  4732. [`${componentCls}-handler`]: {
  4733. width: colorPickerHandlerSize,
  4734. height: colorPickerHandlerSize,
  4735. border: `${(0,cssinjs.unit)(lineWidthBold)} solid ${colorBgElevated}`,
  4736. position: 'relative',
  4737. borderRadius: '50%',
  4738. cursor: 'pointer',
  4739. boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`
  4740. }
  4741. };
  4742. };
  4743. /* harmony default export */ var picker = (genPickerStyle);
  4744. ;// ./components/color-picker/style/presets.ts
  4745. const genPresetsStyle = token => {
  4746. const {
  4747. componentCls,
  4748. antCls,
  4749. colorTextQuaternary,
  4750. paddingXXS,
  4751. colorPickerPresetColorSize,
  4752. fontSizeSM,
  4753. colorText,
  4754. lineHeightSM,
  4755. lineWidth,
  4756. borderRadius,
  4757. colorFill,
  4758. colorWhite,
  4759. marginXXS,
  4760. paddingXS,
  4761. fontHeightSM
  4762. } = token;
  4763. return {
  4764. [`${componentCls}-presets`]: {
  4765. [`${antCls}-collapse-item > ${antCls}-collapse-header`]: {
  4766. padding: 0,
  4767. [`${antCls}-collapse-expand-icon`]: {
  4768. height: fontHeightSM,
  4769. color: colorTextQuaternary,
  4770. paddingInlineEnd: paddingXXS
  4771. }
  4772. },
  4773. [`${antCls}-collapse`]: {
  4774. display: 'flex',
  4775. flexDirection: 'column',
  4776. gap: marginXXS
  4777. },
  4778. [`${antCls}-collapse-item > ${antCls}-collapse-content > ${antCls}-collapse-content-box`]: {
  4779. padding: `${(0,cssinjs.unit)(paddingXS)} 0`
  4780. },
  4781. '&-label': {
  4782. fontSize: fontSizeSM,
  4783. color: colorText,
  4784. lineHeight: lineHeightSM
  4785. },
  4786. '&-items': {
  4787. display: 'flex',
  4788. flexWrap: 'wrap',
  4789. gap: token.calc(marginXXS).mul(1.5).equal(),
  4790. [`${componentCls}-presets-color`]: {
  4791. position: 'relative',
  4792. cursor: 'pointer',
  4793. width: colorPickerPresetColorSize,
  4794. height: colorPickerPresetColorSize,
  4795. '&::before': {
  4796. content: '""',
  4797. pointerEvents: 'none',
  4798. width: token.calc(colorPickerPresetColorSize).add(token.calc(lineWidth).mul(4)).equal(),
  4799. height: token.calc(colorPickerPresetColorSize).add(token.calc(lineWidth).mul(4)).equal(),
  4800. position: 'absolute',
  4801. top: token.calc(lineWidth).mul(-2).equal(),
  4802. insetInlineStart: token.calc(lineWidth).mul(-2).equal(),
  4803. borderRadius,
  4804. border: `${(0,cssinjs.unit)(lineWidth)} solid transparent`,
  4805. transition: `border-color ${token.motionDurationMid} ${token.motionEaseInBack}`
  4806. },
  4807. '&:hover::before': {
  4808. borderColor: colorFill
  4809. },
  4810. '&::after': {
  4811. boxSizing: 'border-box',
  4812. position: 'absolute',
  4813. top: '50%',
  4814. insetInlineStart: '21.5%',
  4815. display: 'table',
  4816. width: token.calc(colorPickerPresetColorSize).div(13).mul(5).equal(),
  4817. height: token.calc(colorPickerPresetColorSize).div(13).mul(8).equal(),
  4818. border: `${(0,cssinjs.unit)(token.lineWidthBold)} solid ${token.colorWhite}`,
  4819. borderTop: 0,
  4820. borderInlineStart: 0,
  4821. transform: 'rotate(45deg) scale(0) translate(-50%,-50%)',
  4822. opacity: 0,
  4823. content: '""',
  4824. transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}`
  4825. },
  4826. [`&${componentCls}-presets-color-checked`]: {
  4827. '&::after': {
  4828. opacity: 1,
  4829. borderColor: colorWhite,
  4830. transform: 'rotate(45deg) scale(1) translate(-50%,-50%)',
  4831. transition: `transform ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`
  4832. },
  4833. [`&${componentCls}-presets-color-bright`]: {
  4834. '&::after': {
  4835. borderColor: 'rgba(0, 0, 0, 0.45)'
  4836. }
  4837. }
  4838. }
  4839. }
  4840. },
  4841. '&-empty': {
  4842. fontSize: fontSizeSM,
  4843. color: colorTextQuaternary
  4844. }
  4845. }
  4846. };
  4847. };
  4848. /* harmony default export */ var presets = (genPresetsStyle);
  4849. ;// ./components/color-picker/style/slider.ts
  4850. const genSliderStyle = token => {
  4851. const {
  4852. componentCls,
  4853. colorPickerInsetShadow,
  4854. colorBgElevated,
  4855. colorFillSecondary,
  4856. lineWidthBold,
  4857. colorPickerHandlerSizeSM,
  4858. colorPickerSliderHeight,
  4859. marginSM,
  4860. marginXS
  4861. } = token;
  4862. const handleInnerSize = token.calc(colorPickerHandlerSizeSM).sub(token.calc(lineWidthBold).mul(2).equal()).equal();
  4863. const handleHoverSize = token.calc(colorPickerHandlerSizeSM).add(token.calc(lineWidthBold).mul(2).equal()).equal();
  4864. const activeHandleStyle = {
  4865. '&:after': {
  4866. transform: 'scale(1)',
  4867. boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${token.colorPrimaryActive}`
  4868. }
  4869. };
  4870. return {
  4871. // ======================== Slider ========================
  4872. [`${componentCls}-slider`]: [getTransBg((0,cssinjs.unit)(colorPickerSliderHeight), token.colorFillSecondary), {
  4873. margin: 0,
  4874. padding: 0,
  4875. height: colorPickerSliderHeight,
  4876. borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
  4877. '&-rail': {
  4878. height: colorPickerSliderHeight,
  4879. borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
  4880. boxShadow: colorPickerInsetShadow
  4881. },
  4882. [`& ${componentCls}-slider-handle`]: {
  4883. width: handleInnerSize,
  4884. height: handleInnerSize,
  4885. top: 0,
  4886. borderRadius: '100%',
  4887. '&:before': {
  4888. display: 'block',
  4889. position: 'absolute',
  4890. background: 'transparent',
  4891. left: {
  4892. _skip_check_: true,
  4893. value: '50%'
  4894. },
  4895. top: '50%',
  4896. transform: 'translate(-50%, -50%)',
  4897. width: handleHoverSize,
  4898. height: handleHoverSize,
  4899. borderRadius: '100%'
  4900. },
  4901. '&:after': {
  4902. width: colorPickerHandlerSizeSM,
  4903. height: colorPickerHandlerSizeSM,
  4904. border: `${(0,cssinjs.unit)(lineWidthBold)} solid ${colorBgElevated}`,
  4905. boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`,
  4906. outline: 'none',
  4907. insetInlineStart: token.calc(lineWidthBold).mul(-1).equal(),
  4908. top: token.calc(lineWidthBold).mul(-1).equal(),
  4909. background: 'transparent',
  4910. transition: 'none'
  4911. },
  4912. '&:focus': activeHandleStyle
  4913. }
  4914. }],
  4915. // ======================== Layout ========================
  4916. [`${componentCls}-slider-container`]: {
  4917. display: 'flex',
  4918. gap: marginSM,
  4919. marginBottom: marginSM,
  4920. // Group
  4921. [`${componentCls}-slider-group`]: {
  4922. flex: 1,
  4923. flexDirection: 'column',
  4924. justifyContent: 'space-between',
  4925. display: 'flex',
  4926. '&-disabled-alpha': {
  4927. justifyContent: 'center'
  4928. }
  4929. }
  4930. },
  4931. [`${componentCls}-gradient-slider`]: {
  4932. marginBottom: marginXS,
  4933. [`& ${componentCls}-slider-handle`]: {
  4934. '&:after': {
  4935. transform: 'scale(0.8)'
  4936. },
  4937. '&-active, &:focus': activeHandleStyle
  4938. }
  4939. }
  4940. };
  4941. };
  4942. /* harmony default export */ var slider = (genSliderStyle);
  4943. ;// ./components/color-picker/style/index.ts
  4944. const genActiveStyle = (token, borderColor, outlineColor) => ({
  4945. borderInlineEndWidth: token.lineWidth,
  4946. borderColor,
  4947. boxShadow: `0 0 0 ${(0,cssinjs.unit)(token.controlOutlineWidth)} ${outlineColor}`,
  4948. outline: 0
  4949. });
  4950. const genRtlStyle = token => {
  4951. const {
  4952. componentCls
  4953. } = token;
  4954. return {
  4955. '&-rtl': {
  4956. [`${componentCls}-presets-color`]: {
  4957. '&::after': {
  4958. direction: 'ltr'
  4959. }
  4960. },
  4961. [`${componentCls}-clear`]: {
  4962. '&::after': {
  4963. direction: 'ltr'
  4964. }
  4965. }
  4966. }
  4967. };
  4968. };
  4969. const genClearStyle = (token, size, extraStyle) => {
  4970. const {
  4971. componentCls,
  4972. borderRadiusSM,
  4973. lineWidth,
  4974. colorSplit,
  4975. colorBorder,
  4976. red6
  4977. } = token;
  4978. return {
  4979. [`${componentCls}-clear`]: Object.assign(Object.assign({
  4980. width: size,
  4981. height: size,
  4982. borderRadius: borderRadiusSM,
  4983. border: `${(0,cssinjs.unit)(lineWidth)} solid ${colorSplit}`,
  4984. position: 'relative',
  4985. overflow: 'hidden',
  4986. cursor: 'inherit',
  4987. transition: `all ${token.motionDurationFast}`
  4988. }, extraStyle), {
  4989. '&::after': {
  4990. content: '""',
  4991. position: 'absolute',
  4992. insetInlineEnd: token.calc(lineWidth).mul(-1).equal(),
  4993. top: token.calc(lineWidth).mul(-1).equal(),
  4994. display: 'block',
  4995. width: 40,
  4996. // maximum
  4997. height: 2,
  4998. // fixed
  4999. transformOrigin: `calc(100% - 1px) 1px`,
  5000. transform: 'rotate(-45deg)',
  5001. backgroundColor: red6
  5002. },
  5003. '&:hover': {
  5004. borderColor: colorBorder
  5005. }
  5006. })
  5007. };
  5008. };
  5009. const genStatusStyle = token => {
  5010. const {
  5011. componentCls,
  5012. colorError,
  5013. colorWarning,
  5014. colorErrorHover,
  5015. colorWarningHover,
  5016. colorErrorOutline,
  5017. colorWarningOutline
  5018. } = token;
  5019. return {
  5020. [`&${componentCls}-status-error`]: {
  5021. borderColor: colorError,
  5022. '&:hover': {
  5023. borderColor: colorErrorHover
  5024. },
  5025. [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorError, colorErrorOutline))
  5026. },
  5027. [`&${componentCls}-status-warning`]: {
  5028. borderColor: colorWarning,
  5029. '&:hover': {
  5030. borderColor: colorWarningHover
  5031. },
  5032. [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorWarning, colorWarningOutline))
  5033. }
  5034. };
  5035. };
  5036. const genSizeStyle = token => {
  5037. const {
  5038. componentCls,
  5039. controlHeightLG,
  5040. controlHeightSM,
  5041. controlHeight,
  5042. controlHeightXS,
  5043. borderRadius,
  5044. borderRadiusSM,
  5045. borderRadiusXS,
  5046. borderRadiusLG,
  5047. fontSizeLG
  5048. } = token;
  5049. return {
  5050. [`&${componentCls}-lg`]: {
  5051. minWidth: controlHeightLG,
  5052. minHeight: controlHeightLG,
  5053. borderRadius: borderRadiusLG,
  5054. [`${componentCls}-color-block, ${componentCls}-clear`]: {
  5055. width: controlHeight,
  5056. height: controlHeight,
  5057. borderRadius
  5058. },
  5059. [`${componentCls}-trigger-text`]: {
  5060. fontSize: fontSizeLG
  5061. }
  5062. },
  5063. [`&${componentCls}-sm`]: {
  5064. minWidth: controlHeightSM,
  5065. minHeight: controlHeightSM,
  5066. borderRadius: borderRadiusSM,
  5067. [`${componentCls}-color-block, ${componentCls}-clear`]: {
  5068. width: controlHeightXS,
  5069. height: controlHeightXS,
  5070. borderRadius: borderRadiusXS
  5071. },
  5072. [`${componentCls}-trigger-text`]: {
  5073. lineHeight: (0,cssinjs.unit)(controlHeightXS)
  5074. }
  5075. }
  5076. };
  5077. };
  5078. const genColorPickerStyle = token => {
  5079. const {
  5080. antCls,
  5081. componentCls,
  5082. colorPickerWidth,
  5083. colorPrimary,
  5084. motionDurationMid,
  5085. colorBgElevated,
  5086. colorTextDisabled,
  5087. colorText,
  5088. colorBgContainerDisabled,
  5089. borderRadius,
  5090. marginXS,
  5091. marginSM,
  5092. controlHeight,
  5093. controlHeightSM,
  5094. colorBgTextActive,
  5095. colorPickerPresetColorSize,
  5096. colorPickerPreviewSize,
  5097. lineWidth,
  5098. colorBorder,
  5099. paddingXXS,
  5100. fontSize,
  5101. colorPrimaryHover,
  5102. controlOutline
  5103. } = token;
  5104. return [{
  5105. [componentCls]: Object.assign({
  5106. [`${componentCls}-inner`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  5107. '&-content': {
  5108. display: 'flex',
  5109. flexDirection: 'column',
  5110. width: colorPickerWidth,
  5111. [`& > ${antCls}-divider`]: {
  5112. margin: `${(0,cssinjs.unit)(marginSM)} 0 ${(0,cssinjs.unit)(marginXS)}`
  5113. }
  5114. },
  5115. [`${componentCls}-panel`]: Object.assign({}, picker(token))
  5116. }, slider(token)), color_block(token, colorPickerPreviewSize)), input(token)), presets(token)), genClearStyle(token, colorPickerPresetColorSize, {
  5117. marginInlineStart: 'auto'
  5118. })), {
  5119. // Operation bar
  5120. [`${componentCls}-operation`]: {
  5121. display: 'flex',
  5122. justifyContent: 'space-between',
  5123. marginBottom: marginXS
  5124. }
  5125. }),
  5126. '&-trigger': Object.assign(Object.assign(Object.assign(Object.assign({
  5127. minWidth: controlHeight,
  5128. minHeight: controlHeight,
  5129. borderRadius,
  5130. border: `${(0,cssinjs.unit)(lineWidth)} solid ${colorBorder}`,
  5131. cursor: 'pointer',
  5132. display: 'inline-flex',
  5133. alignItems: 'flex-start',
  5134. justifyContent: 'center',
  5135. transition: `all ${motionDurationMid}`,
  5136. background: colorBgElevated,
  5137. padding: token.calc(paddingXXS).sub(lineWidth).equal(),
  5138. [`${componentCls}-trigger-text`]: {
  5139. marginInlineStart: marginXS,
  5140. marginInlineEnd: token.calc(marginXS).sub(token.calc(paddingXXS).sub(lineWidth)).equal(),
  5141. fontSize,
  5142. color: colorText,
  5143. alignSelf: 'center',
  5144. '&-cell': {
  5145. '&:not(:last-child):after': {
  5146. content: '", "'
  5147. },
  5148. '&-inactive': {
  5149. color: colorTextDisabled
  5150. }
  5151. }
  5152. },
  5153. '&:hover': {
  5154. borderColor: colorPrimaryHover
  5155. },
  5156. [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorPrimary, controlOutline)),
  5157. '&-disabled': {
  5158. color: colorTextDisabled,
  5159. background: colorBgContainerDisabled,
  5160. cursor: 'not-allowed',
  5161. '&:hover': {
  5162. borderColor: colorBgTextActive
  5163. },
  5164. [`${componentCls}-trigger-text`]: {
  5165. color: colorTextDisabled
  5166. }
  5167. }
  5168. }, genClearStyle(token, controlHeightSM)), color_block(token, controlHeightSM)), genStatusStyle(token)), genSizeStyle(token))
  5169. }, genRtlStyle(token))
  5170. }, (0,compact_item.genCompactItemStyle)(token, {
  5171. focusElCls: `${componentCls}-trigger-active`
  5172. })];
  5173. };
  5174. /* harmony default export */ var style = ((0,genStyleUtils.genStyleHooks)('ColorPicker', token => {
  5175. const {
  5176. colorTextQuaternary,
  5177. marginSM
  5178. } = token;
  5179. const colorPickerSliderHeight = 8;
  5180. const colorPickerToken = (0,es.mergeToken)(token, {
  5181. colorPickerWidth: 234,
  5182. colorPickerHandlerSize: 16,
  5183. colorPickerHandlerSizeSM: 12,
  5184. colorPickerAlphaInputWidth: 44,
  5185. colorPickerInputNumberHandleWidth: 16,
  5186. colorPickerPresetColorSize: 24,
  5187. colorPickerInsetShadow: `inset 0 0 1px 0 ${colorTextQuaternary}`,
  5188. colorPickerSliderHeight,
  5189. colorPickerPreviewSize: token.calc(colorPickerSliderHeight).mul(2).add(marginSM).equal()
  5190. });
  5191. return genColorPickerStyle(colorPickerToken);
  5192. }));
  5193. /***/ }),
  5194. /***/ "./components/color-picker/util.ts":
  5195. /*!*****************************************!*\
  5196. !*** ./components/color-picker/util.ts ***!
  5197. \*****************************************/
  5198. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5199. "use strict";
  5200. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5201. /* harmony export */ genAlphaColor: function() { return /* binding */ genAlphaColor; },
  5202. /* harmony export */ generateColor: function() { return /* binding */ generateColor; },
  5203. /* harmony export */ getColorAlpha: function() { return /* binding */ getColorAlpha; },
  5204. /* harmony export */ getGradientPercentColor: function() { return /* binding */ getGradientPercentColor; },
  5205. /* harmony export */ getRoundNumber: function() { return /* binding */ getRoundNumber; }
  5206. /* harmony export */ });
  5207. /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  5208. /* harmony import */ var _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rc-component/color-picker */ "./node_modules/@rc-component/color-picker/es/index.js");
  5209. /* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./color */ "./components/color-picker/color.ts");
  5210. const generateColor = color => {
  5211. if (color instanceof _color__WEBPACK_IMPORTED_MODULE_2__.AggregationColor) {
  5212. return color;
  5213. }
  5214. return new _color__WEBPACK_IMPORTED_MODULE_2__.AggregationColor(color);
  5215. };
  5216. const getRoundNumber = value => Math.round(Number(value || 0));
  5217. const getColorAlpha = color => getRoundNumber(color.toHsb().a * 100);
  5218. /** Return the color whose `alpha` is 1 */
  5219. const genAlphaColor = (color, alpha) => {
  5220. const rgba = color.toRgb();
  5221. // Color from hsb input may get `rgb` is (0/0/0) when `hsb.b` is 0
  5222. // So if rgb is empty, we should get from hsb
  5223. if (!rgba.r && !rgba.g && !rgba.b) {
  5224. const hsba = color.toHsb();
  5225. hsba.a = alpha || 1;
  5226. return generateColor(hsba);
  5227. }
  5228. rgba.a = alpha || 1;
  5229. return generateColor(rgba);
  5230. };
  5231. /**
  5232. * Get percent position color. e.g. [10%-#fff, 20%-#000], 15% => #888
  5233. */
  5234. const getGradientPercentColor = (colors, percent) => {
  5235. const filledColors = [{
  5236. percent: 0,
  5237. color: colors[0].color
  5238. }].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(colors), [{
  5239. percent: 100,
  5240. color: colors[colors.length - 1].color
  5241. }]);
  5242. for (let i = 0; i < filledColors.length - 1; i += 1) {
  5243. const startPtg = filledColors[i].percent;
  5244. const endPtg = filledColors[i + 1].percent;
  5245. const startColor = filledColors[i].color;
  5246. const endColor = filledColors[i + 1].color;
  5247. if (startPtg <= percent && percent <= endPtg) {
  5248. const dist = endPtg - startPtg;
  5249. if (dist === 0) {
  5250. return startColor;
  5251. }
  5252. const ratio = (percent - startPtg) / dist * 100;
  5253. const startRcColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.Color(startColor);
  5254. const endRcColor = new _rc_component_color_picker__WEBPACK_IMPORTED_MODULE_1__.Color(endColor);
  5255. return startRcColor.mix(endRcColor, ratio).toRgbString();
  5256. }
  5257. }
  5258. // This will never reach
  5259. /* istanbul ignore next */
  5260. return '';
  5261. };
  5262. /***/ }),
  5263. /***/ "./components/config-provider/SizeContext.tsx":
  5264. /*!****************************************************!*\
  5265. !*** ./components/config-provider/SizeContext.tsx ***!
  5266. \****************************************************/
  5267. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5268. "use strict";
  5269. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5270. /* harmony export */ SizeContextProvider: function() { return /* binding */ SizeContextProvider; }
  5271. /* harmony export */ });
  5272. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  5273. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  5274. const SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(undefined);
  5275. const SizeContextProvider = ({
  5276. children,
  5277. size
  5278. }) => {
  5279. const originSize = react__WEBPACK_IMPORTED_MODULE_0__.useContext(SizeContext);
  5280. return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(SizeContext.Provider, {
  5281. value: size || originSize
  5282. }, children);
  5283. };
  5284. /* harmony default export */ __webpack_exports__["default"] = (SizeContext);
  5285. /***/ }),
  5286. /***/ "./components/config-provider/context.ts":
  5287. /*!***********************************************!*\
  5288. !*** ./components/config-provider/context.ts ***!
  5289. \***********************************************/
  5290. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5291. "use strict";
  5292. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5293. /* harmony export */ ConfigContext: function() { return /* binding */ ConfigContext; },
  5294. /* harmony export */ Variants: function() { return /* binding */ Variants; },
  5295. /* harmony export */ defaultIconPrefixCls: function() { return /* binding */ defaultIconPrefixCls; },
  5296. /* harmony export */ defaultPrefixCls: function() { return /* binding */ defaultPrefixCls; },
  5297. /* harmony export */ useComponentConfig: function() { return /* binding */ useComponentConfig; }
  5298. /* harmony export */ });
  5299. /* unused harmony export ConfigConsumer */
  5300. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  5301. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  5302. const defaultPrefixCls = 'ant';
  5303. const defaultIconPrefixCls = 'anticon';
  5304. const Variants = ['outlined', 'borderless', 'filled', 'underlined'];
  5305. const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
  5306. if (customizePrefixCls) {
  5307. return customizePrefixCls;
  5308. }
  5309. return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls;
  5310. };
  5311. // zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.
  5312. const ConfigContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({
  5313. // We provide a default function for Context without provider
  5314. getPrefixCls: defaultGetPrefixCls,
  5315. iconPrefixCls: defaultIconPrefixCls
  5316. });
  5317. const {
  5318. Consumer: ConfigConsumer
  5319. } = ConfigContext;
  5320. const EMPTY_OBJECT = {};
  5321. /**
  5322. * Get ConfigProvider configured component props.
  5323. * This help to reduce bundle size for saving `?.` operator.
  5324. * Do not use as `useMemo` deps since we do not cache the object here.
  5325. *
  5326. * NOTE: not refactor this with `useMemo` since memo will cost another memory space,
  5327. * which will waste both compare calculation & memory.
  5328. */
  5329. function useComponentConfig(propName) {
  5330. const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(ConfigContext);
  5331. const {
  5332. getPrefixCls,
  5333. direction,
  5334. getPopupContainer
  5335. } = context;
  5336. const propValue = context[propName];
  5337. return Object.assign(Object.assign({
  5338. classNames: EMPTY_OBJECT,
  5339. styles: EMPTY_OBJECT
  5340. }, propValue), {
  5341. getPrefixCls,
  5342. direction,
  5343. getPopupContainer
  5344. });
  5345. }
  5346. /***/ }),
  5347. /***/ "./components/config-provider/hooks/useSize.ts":
  5348. /*!*****************************************************!*\
  5349. !*** ./components/config-provider/hooks/useSize.ts ***!
  5350. \*****************************************************/
  5351. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5352. "use strict";
  5353. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  5354. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  5355. /* harmony import */ var _SizeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SizeContext */ "./components/config-provider/SizeContext.tsx");
  5356. const useSize = customSize => {
  5357. const size = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_SizeContext__WEBPACK_IMPORTED_MODULE_1__["default"]);
  5358. const mergedSize = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => {
  5359. if (!customSize) {
  5360. return size;
  5361. }
  5362. if (typeof customSize === 'string') {
  5363. return customSize !== null && customSize !== void 0 ? customSize : size;
  5364. }
  5365. if (typeof customSize === 'function') {
  5366. return customSize(size);
  5367. }
  5368. return size;
  5369. }, [customSize, size]);
  5370. return mergedSize;
  5371. };
  5372. /* harmony default export */ __webpack_exports__["default"] = (useSize);
  5373. /***/ }),
  5374. /***/ "./components/config-provider/style/index.ts":
  5375. /*!***************************************************!*\
  5376. !*** ./components/config-provider/style/index.ts ***!
  5377. \***************************************************/
  5378. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5379. "use strict";
  5380. __webpack_require__.r(__webpack_exports__);
  5381. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5382. /* harmony export */ "default": function() { return /* reexport safe */ _theme_internal__WEBPACK_IMPORTED_MODULE_0__["default"]; }
  5383. /* harmony export */ });
  5384. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/useResetIconStyle.ts");
  5385. /***/ }),
  5386. /***/ "./components/date-picker/locale/en_US.ts":
  5387. /*!************************************************************!*\
  5388. !*** ./components/date-picker/locale/en_US.ts + 1 modules ***!
  5389. \************************************************************/
  5390. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5391. "use strict";
  5392. // EXPORTS
  5393. __webpack_require__.d(__webpack_exports__, {
  5394. "default": function() { return /* binding */ date_picker_locale_en_US; }
  5395. });
  5396. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  5397. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  5398. // EXTERNAL MODULE: ./node_modules/rc-picker/es/locale/common.js
  5399. var common = __webpack_require__("./node_modules/rc-picker/es/locale/common.js");
  5400. ;// ./node_modules/rc-picker/es/locale/en_US.js
  5401. var locale = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common.commonLocale), {}, {
  5402. locale: 'en_US',
  5403. today: 'Today',
  5404. now: 'Now',
  5405. backToToday: 'Back to today',
  5406. ok: 'OK',
  5407. clear: 'Clear',
  5408. week: 'Week',
  5409. month: 'Month',
  5410. year: 'Year',
  5411. timeSelect: 'select time',
  5412. dateSelect: 'select date',
  5413. weekSelect: 'Choose a week',
  5414. monthSelect: 'Choose a month',
  5415. yearSelect: 'Choose a year',
  5416. decadeSelect: 'Choose a decade',
  5417. dateFormat: 'M/D/YYYY',
  5418. dateTimeFormat: 'M/D/YYYY HH:mm:ss',
  5419. previousMonth: 'Previous month (PageUp)',
  5420. nextMonth: 'Next month (PageDown)',
  5421. previousYear: 'Last year (Control + left)',
  5422. nextYear: 'Next year (Control + right)',
  5423. previousDecade: 'Last decade',
  5424. nextDecade: 'Next decade',
  5425. previousCentury: 'Last century',
  5426. nextCentury: 'Next century'
  5427. });
  5428. /* harmony default export */ var en_US = (locale);
  5429. // EXTERNAL MODULE: ./components/time-picker/locale/en_US.ts
  5430. var locale_en_US = __webpack_require__("./components/time-picker/locale/en_US.ts");
  5431. ;// ./components/date-picker/locale/en_US.ts
  5432. // Merge into a locale object
  5433. const en_US_locale = {
  5434. lang: Object.assign({
  5435. placeholder: 'Select date',
  5436. yearPlaceholder: 'Select year',
  5437. quarterPlaceholder: 'Select quarter',
  5438. monthPlaceholder: 'Select month',
  5439. weekPlaceholder: 'Select week',
  5440. rangePlaceholder: ['Start date', 'End date'],
  5441. rangeYearPlaceholder: ['Start year', 'End year'],
  5442. rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],
  5443. rangeMonthPlaceholder: ['Start month', 'End month'],
  5444. rangeWeekPlaceholder: ['Start week', 'End week']
  5445. }, en_US),
  5446. timePickerLocale: Object.assign({}, locale_en_US["default"])
  5447. };
  5448. // All settings at:
  5449. // https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
  5450. /* harmony default export */ var date_picker_locale_en_US = (en_US_locale);
  5451. /***/ }),
  5452. /***/ "./components/date-picker/style/index.ts":
  5453. /*!***********************************************************!*\
  5454. !*** ./components/date-picker/style/index.ts + 2 modules ***!
  5455. \***********************************************************/
  5456. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  5457. "use strict";
  5458. // ESM COMPAT FLAG
  5459. __webpack_require__.r(__webpack_exports__);
  5460. // EXPORTS
  5461. __webpack_require__.d(__webpack_exports__, {
  5462. "default": function() { return /* binding */ date_picker_style; },
  5463. genPanelStyle: function() { return /* reexport */ panel.genPanelStyle; },
  5464. initPanelComponentToken: function() { return /* reexport */ date_picker_style_token.initPanelComponentToken; },
  5465. initPickerPanelToken: function() { return /* reexport */ date_picker_style_token.initPickerPanelToken; }
  5466. });
  5467. // EXTERNAL MODULE: ./alias/cssinjs.js
  5468. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  5469. // EXTERNAL MODULE: ./components/input/style/index.ts
  5470. var style = __webpack_require__("./components/input/style/index.ts");
  5471. // EXTERNAL MODULE: ./components/input/style/token.ts
  5472. var style_token = __webpack_require__("./components/input/style/token.ts");
  5473. // EXTERNAL MODULE: ./components/style/index.tsx
  5474. var components_style = __webpack_require__("./components/style/index.tsx");
  5475. // EXTERNAL MODULE: ./components/style/compact-item.ts
  5476. var compact_item = __webpack_require__("./components/style/compact-item.ts");
  5477. // EXTERNAL MODULE: ./components/style/motion/slide.ts
  5478. var slide = __webpack_require__("./components/style/motion/slide.ts");
  5479. // EXTERNAL MODULE: ./components/style/motion/move.ts
  5480. var move = __webpack_require__("./components/style/motion/move.ts");
  5481. // EXTERNAL MODULE: ./components/style/roundedArrow.ts
  5482. var roundedArrow = __webpack_require__("./components/style/roundedArrow.ts");
  5483. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  5484. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  5485. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  5486. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  5487. // EXTERNAL MODULE: ./components/select/style/multiple.ts
  5488. var multiple = __webpack_require__("./components/select/style/multiple.ts");
  5489. ;// ./components/date-picker/style/multiple.ts
  5490. const genSize = (token, suffix) => {
  5491. const {
  5492. componentCls,
  5493. controlHeight
  5494. } = token;
  5495. const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
  5496. const multipleSelectorUnit = (0,multiple.getMultipleSelectorUnit)(token);
  5497. return [
  5498. // genSelectionStyle(token, suffix),
  5499. {
  5500. [`${componentCls}-multiple${suffixCls}`]: {
  5501. paddingBlock: multipleSelectorUnit.containerPadding,
  5502. paddingInlineStart: multipleSelectorUnit.basePadding,
  5503. minHeight: controlHeight,
  5504. // ======================== Selections ========================
  5505. [`${componentCls}-selection-item`]: {
  5506. height: multipleSelectorUnit.itemHeight,
  5507. lineHeight: (0,cssinjs.unit)(multipleSelectorUnit.itemLineHeight)
  5508. }
  5509. }
  5510. }];
  5511. };
  5512. const genPickerMultipleStyle = token => {
  5513. const {
  5514. componentCls,
  5515. calc,
  5516. lineWidth
  5517. } = token;
  5518. const smallToken = (0,es.mergeToken)(token, {
  5519. fontHeight: token.fontSize,
  5520. selectHeight: token.controlHeightSM,
  5521. multipleSelectItemHeight: token.multipleItemHeightSM,
  5522. borderRadius: token.borderRadiusSM,
  5523. borderRadiusSM: token.borderRadiusXS,
  5524. controlHeight: token.controlHeightSM
  5525. });
  5526. const largeToken = (0,es.mergeToken)(token, {
  5527. fontHeight: calc(token.multipleItemHeightLG).sub(calc(lineWidth).mul(2).equal()).equal(),
  5528. fontSize: token.fontSizeLG,
  5529. selectHeight: token.controlHeightLG,
  5530. multipleSelectItemHeight: token.multipleItemHeightLG,
  5531. borderRadius: token.borderRadiusLG,
  5532. borderRadiusSM: token.borderRadius,
  5533. controlHeight: token.controlHeightLG
  5534. });
  5535. return [
  5536. // ======================== Size ========================
  5537. genSize(smallToken, 'small'), genSize(token), genSize(largeToken, 'large'),
  5538. // ====================== Selection ======================
  5539. {
  5540. [`${componentCls}${componentCls}-multiple`]: Object.assign(Object.assign({
  5541. width: '100%',
  5542. cursor: 'text',
  5543. // ==================== Selector =====================
  5544. [`${componentCls}-selector`]: {
  5545. flex: 'auto',
  5546. padding: 0,
  5547. position: 'relative',
  5548. '&:after': {
  5549. margin: 0
  5550. },
  5551. // ================== placeholder ==================
  5552. [`${componentCls}-selection-placeholder`]: {
  5553. position: 'absolute',
  5554. top: '50%',
  5555. insetInlineStart: token.inputPaddingHorizontalBase,
  5556. insetInlineEnd: 0,
  5557. transform: 'translateY(-50%)',
  5558. transition: `all ${token.motionDurationSlow}`,
  5559. overflow: 'hidden',
  5560. whiteSpace: 'nowrap',
  5561. textOverflow: 'ellipsis',
  5562. flex: 1,
  5563. color: token.colorTextPlaceholder,
  5564. pointerEvents: 'none'
  5565. }
  5566. }
  5567. }, (0,multiple.genOverflowStyle)(token)), {
  5568. // ====================== Input ======================
  5569. // Input is `readonly`, which is used for a11y only
  5570. [`${componentCls}-multiple-input`]: {
  5571. width: 0,
  5572. height: 0,
  5573. border: 0,
  5574. visibility: 'hidden',
  5575. position: 'absolute',
  5576. zIndex: -1
  5577. }
  5578. })
  5579. }];
  5580. };
  5581. /* harmony default export */ var style_multiple = (genPickerMultipleStyle);
  5582. // EXTERNAL MODULE: ./components/date-picker/style/panel.ts
  5583. var panel = __webpack_require__("./components/date-picker/style/panel.ts");
  5584. // EXTERNAL MODULE: ./components/date-picker/style/token.ts
  5585. var date_picker_style_token = __webpack_require__("./components/date-picker/style/token.ts");
  5586. // EXTERNAL MODULE: ./components/input/style/variants.ts
  5587. var variants = __webpack_require__("./components/input/style/variants.ts");
  5588. ;// ./components/date-picker/style/variants.ts
  5589. const genVariantsStyle = token => {
  5590. const {
  5591. componentCls
  5592. } = token;
  5593. return {
  5594. [componentCls]: [Object.assign(Object.assign(Object.assign(Object.assign({}, (0,variants.genOutlinedStyle)(token)), (0,variants.genUnderlinedStyle)(token)), (0,variants.genFilledStyle)(token)), (0,variants.genBorderlessStyle)(token)),
  5595. // ========================= Multiple =========================
  5596. {
  5597. '&-outlined': {
  5598. [`&${componentCls}-multiple ${componentCls}-selection-item`]: {
  5599. background: token.multipleItemBg,
  5600. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
  5601. }
  5602. },
  5603. '&-filled': {
  5604. [`&${componentCls}-multiple ${componentCls}-selection-item`]: {
  5605. background: token.colorBgContainer,
  5606. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  5607. }
  5608. },
  5609. '&-borderless': {
  5610. [`&${componentCls}-multiple ${componentCls}-selection-item`]: {
  5611. background: token.multipleItemBg,
  5612. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
  5613. }
  5614. },
  5615. '&-underlined': {
  5616. [`&${componentCls}-multiple ${componentCls}-selection-item`]: {
  5617. background: token.multipleItemBg,
  5618. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
  5619. }
  5620. }
  5621. }]
  5622. };
  5623. };
  5624. /* harmony default export */ var style_variants = (genVariantsStyle);
  5625. ;// ./components/date-picker/style/index.ts
  5626. const genPickerPadding = (paddingBlock, paddingInline) => {
  5627. return {
  5628. padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(paddingInline)}`
  5629. };
  5630. };
  5631. const genPickerStatusStyle = token => {
  5632. const {
  5633. componentCls,
  5634. colorError,
  5635. colorWarning
  5636. } = token;
  5637. return {
  5638. [`${componentCls}:not(${componentCls}-disabled):not([disabled])`]: {
  5639. [`&${componentCls}-status-error`]: {
  5640. [`${componentCls}-active-bar`]: {
  5641. background: colorError
  5642. }
  5643. },
  5644. [`&${componentCls}-status-warning`]: {
  5645. [`${componentCls}-active-bar`]: {
  5646. background: colorWarning
  5647. }
  5648. }
  5649. }
  5650. };
  5651. };
  5652. const genPickerStyle = token => {
  5653. var _a;
  5654. const {
  5655. componentCls,
  5656. antCls,
  5657. paddingInline,
  5658. lineWidth,
  5659. lineType,
  5660. colorBorder,
  5661. borderRadius,
  5662. motionDurationMid,
  5663. colorTextDisabled,
  5664. colorTextPlaceholder,
  5665. fontSizeLG,
  5666. inputFontSizeLG,
  5667. fontSizeSM,
  5668. inputFontSizeSM,
  5669. controlHeightSM,
  5670. paddingInlineSM,
  5671. paddingXS,
  5672. marginXS,
  5673. colorIcon,
  5674. lineWidthBold,
  5675. colorPrimary,
  5676. motionDurationSlow,
  5677. zIndexPopup,
  5678. paddingXXS,
  5679. sizePopupArrow,
  5680. colorBgElevated,
  5681. borderRadiusLG,
  5682. boxShadowSecondary,
  5683. borderRadiusSM,
  5684. colorSplit,
  5685. cellHoverBg,
  5686. presetsWidth,
  5687. presetsMaxWidth,
  5688. boxShadowPopoverArrow,
  5689. fontHeight,
  5690. lineHeightLG
  5691. } = token;
  5692. return [{
  5693. [componentCls]: Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), genPickerPadding(token.paddingBlock, token.paddingInline)), {
  5694. position: 'relative',
  5695. display: 'inline-flex',
  5696. alignItems: 'center',
  5697. lineHeight: 1,
  5698. borderRadius,
  5699. transition: `border ${motionDurationMid}, box-shadow ${motionDurationMid}, background ${motionDurationMid}`,
  5700. [`${componentCls}-prefix`]: {
  5701. flex: '0 0 auto',
  5702. marginInlineEnd: token.inputAffixPadding
  5703. },
  5704. // ======================== Input =========================
  5705. [`${componentCls}-input`]: {
  5706. position: 'relative',
  5707. display: 'inline-flex',
  5708. alignItems: 'center',
  5709. width: '100%',
  5710. '> input': Object.assign(Object.assign({
  5711. position: 'relative',
  5712. display: 'inline-block',
  5713. width: '100%',
  5714. color: 'inherit',
  5715. fontSize: (_a = token.inputFontSize) !== null && _a !== void 0 ? _a : token.fontSize,
  5716. lineHeight: token.lineHeight,
  5717. transition: `all ${motionDurationMid}`
  5718. }, (0,style.genPlaceholderStyle)(colorTextPlaceholder)), {
  5719. flex: 'auto',
  5720. // Fix Firefox flex not correct:
  5721. // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
  5722. minWidth: 1,
  5723. height: 'auto',
  5724. padding: 0,
  5725. background: 'transparent',
  5726. border: 0,
  5727. fontFamily: 'inherit',
  5728. '&:focus': {
  5729. boxShadow: 'none',
  5730. outline: 0
  5731. },
  5732. '&[disabled]': {
  5733. background: 'transparent',
  5734. color: colorTextDisabled,
  5735. cursor: 'not-allowed'
  5736. }
  5737. }),
  5738. '&-placeholder': {
  5739. '> input': {
  5740. color: colorTextPlaceholder
  5741. }
  5742. }
  5743. },
  5744. // Size
  5745. '&-large': Object.assign(Object.assign({}, genPickerPadding(token.paddingBlockLG, token.paddingInlineLG)), {
  5746. [`${componentCls}-input > input`]: {
  5747. fontSize: inputFontSizeLG !== null && inputFontSizeLG !== void 0 ? inputFontSizeLG : fontSizeLG,
  5748. lineHeight: lineHeightLG
  5749. }
  5750. }),
  5751. '&-small': Object.assign(Object.assign({}, genPickerPadding(token.paddingBlockSM, token.paddingInlineSM)), {
  5752. [`${componentCls}-input > input`]: {
  5753. fontSize: inputFontSizeSM !== null && inputFontSizeSM !== void 0 ? inputFontSizeSM : fontSizeSM
  5754. }
  5755. }),
  5756. [`${componentCls}-suffix`]: {
  5757. display: 'flex',
  5758. flex: 'none',
  5759. alignSelf: 'center',
  5760. marginInlineStart: token.calc(paddingXS).div(2).equal(),
  5761. color: colorTextDisabled,
  5762. lineHeight: 1,
  5763. pointerEvents: 'none',
  5764. transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
  5765. '> *': {
  5766. verticalAlign: 'top',
  5767. '&:not(:last-child)': {
  5768. marginInlineEnd: marginXS
  5769. }
  5770. }
  5771. },
  5772. [`${componentCls}-clear`]: {
  5773. position: 'absolute',
  5774. top: '50%',
  5775. insetInlineEnd: 0,
  5776. color: colorTextDisabled,
  5777. lineHeight: 1,
  5778. transform: 'translateY(-50%)',
  5779. cursor: 'pointer',
  5780. opacity: 0,
  5781. transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
  5782. '> *': {
  5783. verticalAlign: 'top'
  5784. },
  5785. '&:hover': {
  5786. color: colorIcon
  5787. }
  5788. },
  5789. '&:hover': {
  5790. [`${componentCls}-clear`]: {
  5791. opacity: 1
  5792. },
  5793. // Should use the following selector, but since `:has` has poor compatibility,
  5794. // we use `:not(:last-child)` instead, which may cause some problems in some cases.
  5795. // [`${componentCls}-suffix:has(+ ${componentCls}-clear)`]: {
  5796. [`${componentCls}-suffix:not(:last-child)`]: {
  5797. opacity: 0
  5798. }
  5799. },
  5800. [`${componentCls}-separator`]: {
  5801. position: 'relative',
  5802. display: 'inline-block',
  5803. width: '1em',
  5804. height: fontSizeLG,
  5805. color: colorTextDisabled,
  5806. fontSize: fontSizeLG,
  5807. verticalAlign: 'top',
  5808. cursor: 'default',
  5809. [`${componentCls}-focused &`]: {
  5810. color: colorIcon
  5811. },
  5812. [`${componentCls}-range-separator &`]: {
  5813. [`${componentCls}-disabled &`]: {
  5814. cursor: 'not-allowed'
  5815. }
  5816. }
  5817. },
  5818. // ======================== Range =========================
  5819. '&-range': {
  5820. position: 'relative',
  5821. display: 'inline-flex',
  5822. // Active bar
  5823. [`${componentCls}-active-bar`]: {
  5824. bottom: token.calc(lineWidth).mul(-1).equal(),
  5825. height: lineWidthBold,
  5826. background: colorPrimary,
  5827. opacity: 0,
  5828. transition: `all ${motionDurationSlow} ease-out`,
  5829. pointerEvents: 'none'
  5830. },
  5831. [`&${componentCls}-focused`]: {
  5832. [`${componentCls}-active-bar`]: {
  5833. opacity: 1
  5834. }
  5835. },
  5836. [`${componentCls}-range-separator`]: {
  5837. alignItems: 'center',
  5838. padding: `0 ${(0,cssinjs.unit)(paddingXS)}`,
  5839. lineHeight: 1
  5840. }
  5841. },
  5842. // ======================== Clear =========================
  5843. '&-range, &-multiple': {
  5844. // Clear
  5845. [`${componentCls}-clear`]: {
  5846. insetInlineEnd: paddingInline
  5847. },
  5848. [`&${componentCls}-small`]: {
  5849. [`${componentCls}-clear`]: {
  5850. insetInlineEnd: paddingInlineSM
  5851. }
  5852. }
  5853. },
  5854. // ======================= Dropdown =======================
  5855. '&-dropdown': Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), (0,panel.genPanelStyle)(token)), {
  5856. pointerEvents: 'none',
  5857. position: 'absolute',
  5858. // Fix incorrect position of picker popup
  5859. // https://github.com/ant-design/ant-design/issues/35590
  5860. top: -9999,
  5861. left: {
  5862. _skip_check_: true,
  5863. value: -9999
  5864. },
  5865. zIndex: zIndexPopup,
  5866. [`&${componentCls}-dropdown-hidden`]: {
  5867. display: 'none'
  5868. },
  5869. '&-rtl': {
  5870. direction: 'rtl'
  5871. },
  5872. [`&${componentCls}-dropdown-placement-bottomLeft,
  5873. &${componentCls}-dropdown-placement-bottomRight`]: {
  5874. [`${componentCls}-range-arrow`]: {
  5875. top: 0,
  5876. display: 'block',
  5877. transform: 'translateY(-100%)'
  5878. }
  5879. },
  5880. [`&${componentCls}-dropdown-placement-topLeft,
  5881. &${componentCls}-dropdown-placement-topRight`]: {
  5882. [`${componentCls}-range-arrow`]: {
  5883. bottom: 0,
  5884. display: 'block',
  5885. transform: 'translateY(100%) rotate(180deg)'
  5886. }
  5887. },
  5888. [`&${antCls}-slide-up-appear, &${antCls}-slide-up-enter`]: {
  5889. [`${componentCls}-range-arrow${componentCls}-range-arrow`]: {
  5890. transition: 'none'
  5891. }
  5892. },
  5893. [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topLeft,
  5894. &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topRight,
  5895. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topLeft,
  5896. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topRight`]: {
  5897. animationName: slide.slideDownIn
  5898. },
  5899. [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomLeft,
  5900. &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomRight,
  5901. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomLeft,
  5902. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomRight`]: {
  5903. animationName: slide.slideUpIn
  5904. },
  5905. // https://github.com/ant-design/ant-design/issues/48727
  5906. [`&${antCls}-slide-up-leave ${componentCls}-panel-container`]: {
  5907. pointerEvents: 'none'
  5908. },
  5909. [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topLeft,
  5910. &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topRight`]: {
  5911. animationName: slide.slideDownOut
  5912. },
  5913. [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomLeft,
  5914. &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomRight`]: {
  5915. animationName: slide.slideUpOut
  5916. },
  5917. // Time picker with additional style
  5918. [`${componentCls}-panel > ${componentCls}-time-panel`]: {
  5919. paddingTop: paddingXXS
  5920. },
  5921. // ======================== Ranges ========================
  5922. [`${componentCls}-range-wrapper`]: {
  5923. display: 'flex',
  5924. position: 'relative'
  5925. },
  5926. [`${componentCls}-range-arrow`]: Object.assign(Object.assign({
  5927. position: 'absolute',
  5928. zIndex: 1,
  5929. display: 'none',
  5930. paddingInline: token.calc(paddingInline).mul(1.5).equal(),
  5931. boxSizing: 'content-box',
  5932. transition: `all ${motionDurationSlow} ease-out`
  5933. }, (0,roundedArrow.genRoundedArrow)(token, colorBgElevated, boxShadowPopoverArrow)), {
  5934. '&:before': {
  5935. insetInlineStart: token.calc(paddingInline).mul(1.5).equal()
  5936. }
  5937. }),
  5938. [`${componentCls}-panel-container`]: {
  5939. overflow: 'hidden',
  5940. verticalAlign: 'top',
  5941. background: colorBgElevated,
  5942. borderRadius: borderRadiusLG,
  5943. boxShadow: boxShadowSecondary,
  5944. transition: `margin ${motionDurationSlow}`,
  5945. display: 'inline-block',
  5946. pointerEvents: 'auto',
  5947. // ======================== Layout ========================
  5948. [`${componentCls}-panel-layout`]: {
  5949. display: 'flex',
  5950. flexWrap: 'nowrap',
  5951. alignItems: 'stretch'
  5952. },
  5953. // ======================== Preset ========================
  5954. [`${componentCls}-presets`]: {
  5955. display: 'flex',
  5956. flexDirection: 'column',
  5957. minWidth: presetsWidth,
  5958. maxWidth: presetsMaxWidth,
  5959. ul: {
  5960. height: 0,
  5961. flex: 'auto',
  5962. listStyle: 'none',
  5963. overflow: 'auto',
  5964. margin: 0,
  5965. padding: paddingXS,
  5966. borderInlineEnd: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  5967. li: Object.assign(Object.assign({}, components_style.textEllipsis), {
  5968. borderRadius: borderRadiusSM,
  5969. paddingInline: paddingXS,
  5970. paddingBlock: token.calc(controlHeightSM).sub(fontHeight).div(2).equal(),
  5971. cursor: 'pointer',
  5972. transition: `all ${motionDurationSlow}`,
  5973. '+ li': {
  5974. marginTop: marginXS
  5975. },
  5976. '&:hover': {
  5977. background: cellHoverBg
  5978. }
  5979. })
  5980. }
  5981. },
  5982. // ======================== Panels ========================
  5983. [`${componentCls}-panels`]: {
  5984. display: 'inline-flex',
  5985. flexWrap: 'nowrap',
  5986. // [`${componentCls}-panel`]: {
  5987. // borderWidth: `0 0 ${unit(lineWidth)}`,
  5988. // },
  5989. '&:last-child': {
  5990. [`${componentCls}-panel`]: {
  5991. borderWidth: 0
  5992. }
  5993. }
  5994. },
  5995. [`${componentCls}-panel`]: {
  5996. verticalAlign: 'top',
  5997. background: 'transparent',
  5998. borderRadius: 0,
  5999. borderWidth: 0,
  6000. [`${componentCls}-content, table`]: {
  6001. textAlign: 'center'
  6002. },
  6003. '&-focused': {
  6004. borderColor: colorBorder
  6005. }
  6006. }
  6007. }
  6008. }),
  6009. '&-dropdown-range': {
  6010. padding: `${(0,cssinjs.unit)(token.calc(sizePopupArrow).mul(2).div(3).equal())} 0`,
  6011. '&-hidden': {
  6012. display: 'none'
  6013. }
  6014. },
  6015. '&-rtl': {
  6016. direction: 'rtl',
  6017. [`${componentCls}-separator`]: {
  6018. transform: 'scale(-1, 1)'
  6019. },
  6020. [`${componentCls}-footer`]: {
  6021. '&-extra': {
  6022. direction: 'rtl'
  6023. }
  6024. }
  6025. }
  6026. })
  6027. },
  6028. // Follow code may reuse in other components
  6029. (0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down'), (0,move.initMoveMotion)(token, 'move-up'), (0,move.initMoveMotion)(token, 'move-down')];
  6030. };
  6031. // ============================== Export ==============================
  6032. /* harmony default export */ var date_picker_style = ((0,genStyleUtils.genStyleHooks)('DatePicker', token => {
  6033. const pickerToken = (0,es.mergeToken)((0,style_token.initInputToken)(token), (0,date_picker_style_token.initPickerPanelToken)(token), {
  6034. inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),
  6035. multipleSelectItemHeight: token.multipleItemHeight,
  6036. selectHeight: token.controlHeight
  6037. });
  6038. return [(0,panel["default"])(pickerToken), genPickerStyle(pickerToken), style_variants(pickerToken), genPickerStatusStyle(pickerToken), style_multiple(pickerToken),
  6039. // =====================================================
  6040. // == Space Compact ==
  6041. // =====================================================
  6042. (0,compact_item.genCompactItemStyle)(token, {
  6043. focusElCls: `${token.componentCls}-focused`
  6044. })];
  6045. }, date_picker_style_token.prepareComponentToken));
  6046. /***/ }),
  6047. /***/ "./components/date-picker/style/panel.ts":
  6048. /*!***********************************************!*\
  6049. !*** ./components/date-picker/style/panel.ts ***!
  6050. \***********************************************/
  6051. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  6052. "use strict";
  6053. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6054. /* harmony export */ genPanelStyle: function() { return /* binding */ genPanelStyle; }
  6055. /* harmony export */ });
  6056. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  6057. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  6058. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  6059. const genPickerCellInnerStyle = token => {
  6060. const {
  6061. pickerCellCls,
  6062. pickerCellInnerCls,
  6063. cellHeight,
  6064. borderRadiusSM,
  6065. motionDurationMid,
  6066. cellHoverBg,
  6067. lineWidth,
  6068. lineType,
  6069. colorPrimary,
  6070. cellActiveWithRangeBg,
  6071. colorTextLightSolid,
  6072. colorTextDisabled,
  6073. cellBgDisabled,
  6074. colorFillSecondary
  6075. } = token;
  6076. return {
  6077. '&::before': {
  6078. position: 'absolute',
  6079. top: '50%',
  6080. insetInlineStart: 0,
  6081. insetInlineEnd: 0,
  6082. zIndex: 1,
  6083. height: cellHeight,
  6084. transform: 'translateY(-50%)',
  6085. content: '""',
  6086. pointerEvents: 'none'
  6087. },
  6088. // >>> Default
  6089. [pickerCellInnerCls]: {
  6090. position: 'relative',
  6091. zIndex: 2,
  6092. display: 'inline-block',
  6093. minWidth: cellHeight,
  6094. height: cellHeight,
  6095. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(cellHeight),
  6096. borderRadius: borderRadiusSM,
  6097. transition: `background ${motionDurationMid}`
  6098. },
  6099. // >>> Hover
  6100. [`&:hover:not(${pickerCellCls}-in-view):not(${pickerCellCls}-disabled),
  6101. &:hover:not(${pickerCellCls}-selected):not(${pickerCellCls}-range-start):not(${pickerCellCls}-range-end):not(${pickerCellCls}-disabled)`]: {
  6102. [pickerCellInnerCls]: {
  6103. background: cellHoverBg
  6104. }
  6105. },
  6106. // >>> Today
  6107. [`&-in-view${pickerCellCls}-today ${pickerCellInnerCls}`]: {
  6108. '&::before': {
  6109. position: 'absolute',
  6110. top: 0,
  6111. insetInlineEnd: 0,
  6112. bottom: 0,
  6113. insetInlineStart: 0,
  6114. zIndex: 1,
  6115. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorPrimary}`,
  6116. borderRadius: borderRadiusSM,
  6117. content: '""'
  6118. }
  6119. },
  6120. // >>> In Range
  6121. [`&-in-view${pickerCellCls}-in-range,
  6122. &-in-view${pickerCellCls}-range-start,
  6123. &-in-view${pickerCellCls}-range-end`]: {
  6124. position: 'relative',
  6125. [`&:not(${pickerCellCls}-disabled):before`]: {
  6126. background: cellActiveWithRangeBg
  6127. }
  6128. },
  6129. // >>> Selected
  6130. [`&-in-view${pickerCellCls}-selected,
  6131. &-in-view${pickerCellCls}-range-start,
  6132. &-in-view${pickerCellCls}-range-end`]: {
  6133. [`&:not(${pickerCellCls}-disabled) ${pickerCellInnerCls}`]: {
  6134. color: colorTextLightSolid,
  6135. background: colorPrimary
  6136. },
  6137. [`&${pickerCellCls}-disabled ${pickerCellInnerCls}`]: {
  6138. background: colorFillSecondary
  6139. }
  6140. },
  6141. [`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-disabled):before`]: {
  6142. insetInlineStart: '50%'
  6143. },
  6144. [`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-disabled):before`]: {
  6145. insetInlineEnd: '50%'
  6146. },
  6147. // range start border-radius
  6148. [`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-range-end) ${pickerCellInnerCls}`]: {
  6149. borderStartStartRadius: borderRadiusSM,
  6150. borderEndStartRadius: borderRadiusSM,
  6151. borderStartEndRadius: 0,
  6152. borderEndEndRadius: 0
  6153. },
  6154. // range end border-radius
  6155. [`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-range-start) ${pickerCellInnerCls}`]: {
  6156. borderStartStartRadius: 0,
  6157. borderEndStartRadius: 0,
  6158. borderStartEndRadius: borderRadiusSM,
  6159. borderEndEndRadius: borderRadiusSM
  6160. },
  6161. // >>> Disabled
  6162. '&-disabled': {
  6163. color: colorTextDisabled,
  6164. cursor: 'not-allowed',
  6165. [pickerCellInnerCls]: {
  6166. background: 'transparent'
  6167. },
  6168. '&::before': {
  6169. background: cellBgDisabled
  6170. }
  6171. },
  6172. [`&-disabled${pickerCellCls}-today ${pickerCellInnerCls}::before`]: {
  6173. borderColor: colorTextDisabled
  6174. }
  6175. };
  6176. };
  6177. const genPanelStyle = token => {
  6178. const {
  6179. componentCls,
  6180. pickerCellCls,
  6181. pickerCellInnerCls,
  6182. pickerYearMonthCellWidth,
  6183. pickerControlIconSize,
  6184. cellWidth,
  6185. paddingSM,
  6186. paddingXS,
  6187. paddingXXS,
  6188. colorBgContainer,
  6189. lineWidth,
  6190. lineType,
  6191. borderRadiusLG,
  6192. colorPrimary,
  6193. colorTextHeading,
  6194. colorSplit,
  6195. pickerControlIconBorderWidth,
  6196. colorIcon,
  6197. textHeight,
  6198. motionDurationMid,
  6199. colorIconHover,
  6200. fontWeightStrong,
  6201. cellHeight,
  6202. pickerCellPaddingVertical,
  6203. colorTextDisabled,
  6204. colorText,
  6205. fontSize,
  6206. motionDurationSlow,
  6207. withoutTimeCellHeight,
  6208. pickerQuarterPanelContentHeight,
  6209. borderRadiusSM,
  6210. colorTextLightSolid,
  6211. cellHoverBg,
  6212. timeColumnHeight,
  6213. timeColumnWidth,
  6214. timeCellHeight,
  6215. controlItemBgActive,
  6216. marginXXS,
  6217. pickerDatePanelPaddingHorizontal,
  6218. pickerControlIconMargin
  6219. } = token;
  6220. const pickerPanelWidth = token.calc(cellWidth).mul(7).add(token.calc(pickerDatePanelPaddingHorizontal).mul(2)).equal();
  6221. return {
  6222. [componentCls]: {
  6223. '&-panel': {
  6224. display: 'inline-flex',
  6225. flexDirection: 'column',
  6226. textAlign: 'center',
  6227. background: colorBgContainer,
  6228. borderRadius: borderRadiusLG,
  6229. outline: 'none',
  6230. '&-focused': {
  6231. borderColor: colorPrimary
  6232. },
  6233. '&-rtl': {
  6234. [`${componentCls}-prev-icon,
  6235. ${componentCls}-super-prev-icon`]: {
  6236. transform: 'rotate(45deg)'
  6237. },
  6238. [`${componentCls}-next-icon,
  6239. ${componentCls}-super-next-icon`]: {
  6240. transform: 'rotate(-135deg)'
  6241. },
  6242. [`${componentCls}-time-panel`]: {
  6243. [`${componentCls}-content`]: {
  6244. direction: 'ltr',
  6245. '> *': {
  6246. direction: 'rtl'
  6247. }
  6248. }
  6249. }
  6250. }
  6251. },
  6252. // ========================================================
  6253. // = Shared Panel =
  6254. // ========================================================
  6255. [`&-decade-panel,
  6256. &-year-panel,
  6257. &-quarter-panel,
  6258. &-month-panel,
  6259. &-week-panel,
  6260. &-date-panel,
  6261. &-time-panel`]: {
  6262. display: 'flex',
  6263. flexDirection: 'column',
  6264. width: pickerPanelWidth
  6265. },
  6266. // ======================= Header =======================
  6267. '&-header': {
  6268. display: 'flex',
  6269. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`,
  6270. color: colorTextHeading,
  6271. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  6272. '> *': {
  6273. flex: 'none'
  6274. },
  6275. button: {
  6276. padding: 0,
  6277. color: colorIcon,
  6278. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(textHeight),
  6279. background: 'transparent',
  6280. border: 0,
  6281. cursor: 'pointer',
  6282. transition: `color ${motionDurationMid}`,
  6283. fontSize: 'inherit',
  6284. display: 'inline-flex',
  6285. alignItems: 'center',
  6286. justifyContent: 'center',
  6287. '&:empty': {
  6288. display: 'none'
  6289. }
  6290. },
  6291. '> button': {
  6292. minWidth: '1.6em',
  6293. fontSize,
  6294. '&:hover': {
  6295. color: colorIconHover
  6296. },
  6297. '&:disabled': {
  6298. opacity: 0.25,
  6299. pointerEvents: 'none'
  6300. }
  6301. },
  6302. '&-view': {
  6303. flex: 'auto',
  6304. fontWeight: fontWeightStrong,
  6305. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(textHeight),
  6306. '> button': {
  6307. color: 'inherit',
  6308. fontWeight: 'inherit',
  6309. verticalAlign: 'top',
  6310. '&:not(:first-child)': {
  6311. marginInlineStart: paddingXS
  6312. },
  6313. '&:hover': {
  6314. color: colorPrimary
  6315. }
  6316. }
  6317. }
  6318. },
  6319. // Arrow button
  6320. [`&-prev-icon,
  6321. &-next-icon,
  6322. &-super-prev-icon,
  6323. &-super-next-icon`]: {
  6324. position: 'relative',
  6325. width: pickerControlIconSize,
  6326. height: pickerControlIconSize,
  6327. '&::before': {
  6328. position: 'absolute',
  6329. top: 0,
  6330. insetInlineStart: 0,
  6331. width: pickerControlIconSize,
  6332. height: pickerControlIconSize,
  6333. border: `0 solid currentcolor`,
  6334. borderBlockStartWidth: pickerControlIconBorderWidth,
  6335. borderInlineStartWidth: pickerControlIconBorderWidth,
  6336. content: '""'
  6337. }
  6338. },
  6339. [`&-super-prev-icon,
  6340. &-super-next-icon`]: {
  6341. '&::after': {
  6342. position: 'absolute',
  6343. top: pickerControlIconMargin,
  6344. insetInlineStart: pickerControlIconMargin,
  6345. display: 'inline-block',
  6346. width: pickerControlIconSize,
  6347. height: pickerControlIconSize,
  6348. border: '0 solid currentcolor',
  6349. borderBlockStartWidth: pickerControlIconBorderWidth,
  6350. borderInlineStartWidth: pickerControlIconBorderWidth,
  6351. content: '""'
  6352. }
  6353. },
  6354. '&-prev-icon, &-super-prev-icon': {
  6355. transform: 'rotate(-45deg)'
  6356. },
  6357. '&-next-icon, &-super-next-icon': {
  6358. transform: 'rotate(135deg)'
  6359. },
  6360. // ======================== Body ========================
  6361. '&-content': {
  6362. width: '100%',
  6363. tableLayout: 'fixed',
  6364. borderCollapse: 'collapse',
  6365. 'th, td': {
  6366. position: 'relative',
  6367. minWidth: cellHeight,
  6368. fontWeight: 'normal'
  6369. },
  6370. th: {
  6371. height: token.calc(cellHeight).add(token.calc(pickerCellPaddingVertical).mul(2)).equal(),
  6372. color: colorText,
  6373. verticalAlign: 'middle'
  6374. }
  6375. },
  6376. '&-cell': Object.assign({
  6377. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(pickerCellPaddingVertical)} 0`,
  6378. color: colorTextDisabled,
  6379. cursor: 'pointer',
  6380. // In view
  6381. '&-in-view': {
  6382. color: colorText
  6383. }
  6384. }, genPickerCellInnerStyle(token)),
  6385. [`&-decade-panel,
  6386. &-year-panel,
  6387. &-quarter-panel,
  6388. &-month-panel`]: {
  6389. [`${componentCls}-content`]: {
  6390. height: token.calc(withoutTimeCellHeight).mul(4).equal()
  6391. },
  6392. [pickerCellInnerCls]: {
  6393. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`
  6394. }
  6395. },
  6396. '&-quarter-panel': {
  6397. [`${componentCls}-content`]: {
  6398. height: pickerQuarterPanelContentHeight
  6399. }
  6400. },
  6401. // ========================================================
  6402. // = Special =
  6403. // ========================================================
  6404. // ===================== Decade Panel =====================
  6405. '&-decade-panel': {
  6406. [pickerCellInnerCls]: {
  6407. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(paddingXS).div(2).equal())}`
  6408. },
  6409. [`${componentCls}-cell::before`]: {
  6410. display: 'none'
  6411. }
  6412. },
  6413. // ============= Year & Quarter & Month Panel =============
  6414. [`&-year-panel,
  6415. &-quarter-panel,
  6416. &-month-panel`]: {
  6417. [`${componentCls}-body`]: {
  6418. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`
  6419. },
  6420. [pickerCellInnerCls]: {
  6421. width: pickerYearMonthCellWidth
  6422. }
  6423. },
  6424. // ====================== Date Panel ======================
  6425. '&-date-panel': {
  6426. [`${componentCls}-body`]: {
  6427. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(pickerDatePanelPaddingHorizontal)}`
  6428. },
  6429. [`${componentCls}-content th`]: {
  6430. boxSizing: 'border-box',
  6431. padding: 0
  6432. }
  6433. },
  6434. // ====================== Week Panel ======================
  6435. '&-week-panel-row': {
  6436. td: {
  6437. '&:before': {
  6438. transition: `background ${motionDurationMid}`
  6439. },
  6440. '&:first-child:before': {
  6441. borderStartStartRadius: borderRadiusSM,
  6442. borderEndStartRadius: borderRadiusSM
  6443. },
  6444. '&:last-child:before': {
  6445. borderStartEndRadius: borderRadiusSM,
  6446. borderEndEndRadius: borderRadiusSM
  6447. }
  6448. },
  6449. '&:hover td:before': {
  6450. background: cellHoverBg
  6451. },
  6452. '&-range-start td, &-range-end td, &-selected td, &-hover td': {
  6453. // Rise priority to override hover style
  6454. [`&${pickerCellCls}`]: {
  6455. '&:before': {
  6456. background: colorPrimary
  6457. },
  6458. [`&${componentCls}-cell-week`]: {
  6459. color: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(colorTextLightSolid).setA(0.5).toHexString()
  6460. },
  6461. [pickerCellInnerCls]: {
  6462. color: colorTextLightSolid
  6463. }
  6464. }
  6465. },
  6466. '&-range-hover td:before': {
  6467. background: controlItemBgActive
  6468. }
  6469. },
  6470. // >>> ShowWeek
  6471. '&-week-panel, &-date-panel-show-week': {
  6472. [`${componentCls}-body`]: {
  6473. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM)}`
  6474. },
  6475. [`${componentCls}-content th`]: {
  6476. width: 'auto'
  6477. }
  6478. },
  6479. // ==================== Datetime Panel ====================
  6480. '&-datetime-panel': {
  6481. display: 'flex',
  6482. [`${componentCls}-time-panel`]: {
  6483. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`
  6484. },
  6485. [`${componentCls}-date-panel,
  6486. ${componentCls}-time-panel`]: {
  6487. transition: `opacity ${motionDurationSlow}`
  6488. },
  6489. // Keyboard
  6490. '&-active': {
  6491. [`${componentCls}-date-panel,
  6492. ${componentCls}-time-panel`]: {
  6493. opacity: 0.3,
  6494. '&-active': {
  6495. opacity: 1
  6496. }
  6497. }
  6498. }
  6499. },
  6500. // ====================== Time Panel ======================
  6501. '&-time-panel': {
  6502. width: 'auto',
  6503. minWidth: 'auto',
  6504. [`${componentCls}-content`]: {
  6505. display: 'flex',
  6506. flex: 'auto',
  6507. height: timeColumnHeight
  6508. },
  6509. '&-column': {
  6510. flex: '1 0 auto',
  6511. width: timeColumnWidth,
  6512. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXXS)} 0`,
  6513. padding: 0,
  6514. overflowY: 'hidden',
  6515. textAlign: 'start',
  6516. listStyle: 'none',
  6517. transition: `background ${motionDurationMid}`,
  6518. overflowX: 'hidden',
  6519. '&::-webkit-scrollbar': {
  6520. width: 8,
  6521. backgroundColor: 'transparent'
  6522. },
  6523. '&::-webkit-scrollbar-thumb': {
  6524. backgroundColor: token.colorTextTertiary,
  6525. borderRadius: token.borderRadiusSM
  6526. },
  6527. // For Firefox
  6528. '&': {
  6529. scrollbarWidth: 'thin',
  6530. scrollbarColor: `${token.colorTextTertiary} transparent`
  6531. },
  6532. '&::after': {
  6533. display: 'block',
  6534. height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(timeCellHeight)})`,
  6535. content: '""'
  6536. },
  6537. '&:not(:first-child)': {
  6538. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`
  6539. },
  6540. '&-active': {
  6541. background: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(controlItemBgActive).setA(0.2).toHexString()
  6542. },
  6543. '&:hover': {
  6544. overflowY: 'auto'
  6545. },
  6546. '> li': {
  6547. margin: 0,
  6548. padding: 0,
  6549. [`&${componentCls}-time-panel-cell`]: {
  6550. marginInline: marginXXS,
  6551. [`${componentCls}-time-panel-cell-inner`]: {
  6552. display: 'block',
  6553. width: token.calc(timeColumnWidth).sub(token.calc(marginXXS).mul(2)).equal(),
  6554. height: timeCellHeight,
  6555. margin: 0,
  6556. paddingBlock: 0,
  6557. paddingInlineEnd: 0,
  6558. paddingInlineStart: token.calc(timeColumnWidth).sub(timeCellHeight).div(2).equal(),
  6559. color: colorText,
  6560. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(timeCellHeight),
  6561. borderRadius: borderRadiusSM,
  6562. cursor: 'pointer',
  6563. transition: `background ${motionDurationMid}`,
  6564. '&:hover': {
  6565. background: cellHoverBg
  6566. }
  6567. },
  6568. '&-selected': {
  6569. [`${componentCls}-time-panel-cell-inner`]: {
  6570. background: controlItemBgActive
  6571. }
  6572. },
  6573. '&-disabled': {
  6574. [`${componentCls}-time-panel-cell-inner`]: {
  6575. color: colorTextDisabled,
  6576. background: 'transparent',
  6577. cursor: 'not-allowed'
  6578. }
  6579. }
  6580. }
  6581. }
  6582. }
  6583. }
  6584. }
  6585. };
  6586. };
  6587. const genPickerPanelStyle = token => {
  6588. const {
  6589. componentCls,
  6590. textHeight,
  6591. lineWidth,
  6592. paddingSM,
  6593. antCls,
  6594. colorPrimary,
  6595. cellActiveWithRangeBg,
  6596. colorPrimaryBorder,
  6597. lineType,
  6598. colorSplit
  6599. } = token;
  6600. return {
  6601. [`${componentCls}-dropdown`]: {
  6602. // ======================== Footer ========================
  6603. [`${componentCls}-footer`]: {
  6604. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  6605. '&-extra': {
  6606. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM)}`,
  6607. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),
  6608. textAlign: 'start',
  6609. '&:not(:last-child)': {
  6610. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`
  6611. }
  6612. }
  6613. },
  6614. // ==================== Footer > Ranges ===================
  6615. [`${componentCls}-panels + ${componentCls}-footer ${componentCls}-ranges`]: {
  6616. justifyContent: 'space-between'
  6617. },
  6618. [`${componentCls}-ranges`]: {
  6619. marginBlock: 0,
  6620. paddingInline: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM),
  6621. overflow: 'hidden',
  6622. textAlign: 'start',
  6623. listStyle: 'none',
  6624. display: 'flex',
  6625. justifyContent: 'center',
  6626. alignItems: 'center',
  6627. '> li': {
  6628. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),
  6629. display: 'inline-block'
  6630. },
  6631. [`${componentCls}-now-btn-disabled`]: {
  6632. pointerEvents: 'none',
  6633. color: token.colorTextDisabled
  6634. },
  6635. // https://github.com/ant-design/ant-design/issues/23687
  6636. [`${componentCls}-preset > ${antCls}-tag-blue`]: {
  6637. color: colorPrimary,
  6638. background: cellActiveWithRangeBg,
  6639. borderColor: colorPrimaryBorder,
  6640. cursor: 'pointer'
  6641. },
  6642. [`${componentCls}-ok`]: {
  6643. paddingBlock: token.calc(lineWidth).mul(2).equal(),
  6644. marginInlineStart: 'auto'
  6645. }
  6646. }
  6647. }
  6648. };
  6649. };
  6650. /* harmony default export */ __webpack_exports__["default"] = (genPickerPanelStyle);
  6651. /***/ }),
  6652. /***/ "./components/date-picker/style/token.ts":
  6653. /*!***********************************************!*\
  6654. !*** ./components/date-picker/style/token.ts ***!
  6655. \***********************************************/
  6656. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  6657. "use strict";
  6658. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6659. /* harmony export */ initPanelComponentToken: function() { return /* binding */ initPanelComponentToken; },
  6660. /* harmony export */ initPickerPanelToken: function() { return /* binding */ initPickerPanelToken; },
  6661. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  6662. /* harmony export */ });
  6663. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  6664. /* harmony import */ var _input_style_token__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/style/token */ "./components/input/style/token.ts");
  6665. /* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
  6666. const initPickerPanelToken = token => {
  6667. const {
  6668. componentCls,
  6669. controlHeightLG,
  6670. paddingXXS,
  6671. padding
  6672. } = token;
  6673. return {
  6674. pickerCellCls: `${componentCls}-cell`,
  6675. pickerCellInnerCls: `${componentCls}-cell-inner`,
  6676. pickerYearMonthCellWidth: token.calc(controlHeightLG).mul(1.5).equal(),
  6677. pickerQuarterPanelContentHeight: token.calc(controlHeightLG).mul(1.4).equal(),
  6678. pickerCellPaddingVertical: token.calc(paddingXXS).add(token.calc(paddingXXS).div(2)).equal(),
  6679. pickerCellBorderGap: 2,
  6680. // Magic for gap between cells
  6681. pickerControlIconSize: 7,
  6682. pickerControlIconMargin: 4,
  6683. pickerControlIconBorderWidth: 1.5,
  6684. pickerDatePanelPaddingHorizontal: token.calc(padding).add(token.calc(paddingXXS).div(2)).equal() // 18 in normal
  6685. };
  6686. };
  6687. const initPanelComponentToken = token => {
  6688. const {
  6689. colorBgContainerDisabled,
  6690. controlHeight,
  6691. controlHeightSM,
  6692. controlHeightLG,
  6693. paddingXXS,
  6694. lineWidth
  6695. } = token;
  6696. // Item height default use `controlHeight - 2 * paddingXXS`,
  6697. // but some case `paddingXXS=0`.
  6698. // Let's fallback it.
  6699. const dblPaddingXXS = paddingXXS * 2;
  6700. const dblLineWidth = lineWidth * 2;
  6701. const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);
  6702. const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);
  6703. const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);
  6704. // FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding
  6705. const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);
  6706. const filledToken = {
  6707. INTERNAL_FIXED_ITEM_MARGIN,
  6708. cellHoverBg: token.controlItemBgHover,
  6709. cellActiveWithRangeBg: token.controlItemBgActive,
  6710. cellHoverWithRangeBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorPrimary).lighten(35).toHexString(),
  6711. cellRangeBorderColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(token.colorPrimary).lighten(20).toHexString(),
  6712. cellBgDisabled: colorBgContainerDisabled,
  6713. timeColumnWidth: controlHeightLG * 1.4,
  6714. timeColumnHeight: 28 * 8,
  6715. timeCellHeight: 28,
  6716. cellWidth: controlHeightSM * 1.5,
  6717. cellHeight: controlHeightSM,
  6718. textHeight: controlHeightLG,
  6719. withoutTimeCellHeight: controlHeightLG * 1.65,
  6720. multipleItemBg: token.colorFillSecondary,
  6721. multipleItemBorderColor: 'transparent',
  6722. multipleItemHeight,
  6723. multipleItemHeightSM,
  6724. multipleItemHeightLG,
  6725. multipleSelectorBgDisabled: colorBgContainerDisabled,
  6726. multipleItemColorDisabled: token.colorTextDisabled,
  6727. multipleItemBorderColorDisabled: 'transparent'
  6728. };
  6729. return filledToken;
  6730. };
  6731. const prepareComponentToken = token => Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_input_style_token__WEBPACK_IMPORTED_MODULE_1__.initComponentToken)(token)), initPanelComponentToken(token)), (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_2__.getArrowToken)(token)), {
  6732. presetsWidth: 120,
  6733. presetsMaxWidth: 200,
  6734. zIndexPopup: token.zIndexPopupBase + 50
  6735. });
  6736. /***/ }),
  6737. /***/ "./components/descriptions/style/index.ts":
  6738. /*!************************************************!*\
  6739. !*** ./components/descriptions/style/index.ts ***!
  6740. \************************************************/
  6741. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  6742. "use strict";
  6743. __webpack_require__.r(__webpack_exports__);
  6744. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6745. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  6746. /* harmony export */ });
  6747. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  6748. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  6749. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  6750. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  6751. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  6752. const genBorderedStyle = token => {
  6753. const {
  6754. componentCls,
  6755. labelBg
  6756. } = token;
  6757. return {
  6758. [`&${componentCls}-bordered`]: {
  6759. [`> ${componentCls}-view`]: {
  6760. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  6761. '> table': {
  6762. tableLayout: 'auto'
  6763. },
  6764. [`${componentCls}-row`]: {
  6765. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  6766. '&:first-child': {
  6767. '> th:first-child, > td:first-child': {
  6768. borderStartStartRadius: token.borderRadiusLG
  6769. }
  6770. },
  6771. '&:last-child': {
  6772. borderBottom: 'none',
  6773. '> th:first-child, > td:first-child': {
  6774. borderEndStartRadius: token.borderRadiusLG
  6775. }
  6776. },
  6777. [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {
  6778. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingLG)}`,
  6779. borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  6780. '&:last-child': {
  6781. borderInlineEnd: 'none'
  6782. }
  6783. },
  6784. [`> ${componentCls}-item-label`]: {
  6785. color: token.colorTextSecondary,
  6786. backgroundColor: labelBg,
  6787. '&::after': {
  6788. display: 'none'
  6789. }
  6790. }
  6791. }
  6792. },
  6793. [`&${componentCls}-middle`]: {
  6794. [`${componentCls}-row`]: {
  6795. [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {
  6796. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingLG)}`
  6797. }
  6798. }
  6799. },
  6800. [`&${componentCls}-small`]: {
  6801. [`${componentCls}-row`]: {
  6802. [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {
  6803. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.padding)}`
  6804. }
  6805. }
  6806. }
  6807. }
  6808. };
  6809. };
  6810. const genDescriptionStyles = token => {
  6811. const {
  6812. componentCls,
  6813. extraColor,
  6814. itemPaddingBottom,
  6815. itemPaddingEnd,
  6816. colonMarginRight,
  6817. colonMarginLeft,
  6818. titleMarginBottom
  6819. } = token;
  6820. return {
  6821. [componentCls]: Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), genBorderedStyle(token)), {
  6822. '&-rtl': {
  6823. direction: 'rtl'
  6824. },
  6825. [`${componentCls}-header`]: {
  6826. display: 'flex',
  6827. alignItems: 'center',
  6828. marginBottom: titleMarginBottom
  6829. },
  6830. [`${componentCls}-title`]: Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
  6831. flex: 'auto',
  6832. color: token.titleColor,
  6833. fontWeight: token.fontWeightStrong,
  6834. fontSize: token.fontSizeLG,
  6835. lineHeight: token.lineHeightLG
  6836. }),
  6837. [`${componentCls}-extra`]: {
  6838. marginInlineStart: 'auto',
  6839. color: extraColor,
  6840. fontSize: token.fontSize
  6841. },
  6842. [`${componentCls}-view`]: {
  6843. width: '100%',
  6844. borderRadius: token.borderRadiusLG,
  6845. table: {
  6846. width: '100%',
  6847. tableLayout: 'fixed',
  6848. borderCollapse: 'collapse'
  6849. }
  6850. },
  6851. [`${componentCls}-row`]: {
  6852. '> th, > td': {
  6853. paddingBottom: itemPaddingBottom,
  6854. paddingInlineEnd: itemPaddingEnd
  6855. },
  6856. '> th:last-child, > td:last-child': {
  6857. paddingInlineEnd: 0
  6858. },
  6859. '&:last-child': {
  6860. borderBottom: 'none',
  6861. '> th, > td': {
  6862. paddingBottom: 0
  6863. }
  6864. }
  6865. },
  6866. [`${componentCls}-item-label`]: {
  6867. color: token.labelColor,
  6868. fontWeight: 'normal',
  6869. fontSize: token.fontSize,
  6870. lineHeight: token.lineHeight,
  6871. textAlign: 'start',
  6872. '&::after': {
  6873. content: '":"',
  6874. position: 'relative',
  6875. top: -0.5,
  6876. // magic for position
  6877. marginInline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(colonMarginLeft)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(colonMarginRight)}`
  6878. },
  6879. [`&${componentCls}-item-no-colon::after`]: {
  6880. content: '""'
  6881. }
  6882. },
  6883. [`${componentCls}-item-no-label`]: {
  6884. '&::after': {
  6885. margin: 0,
  6886. content: '""'
  6887. }
  6888. },
  6889. [`${componentCls}-item-content`]: {
  6890. display: 'table-cell',
  6891. flex: 1,
  6892. color: token.contentColor,
  6893. fontSize: token.fontSize,
  6894. lineHeight: token.lineHeight,
  6895. wordBreak: 'break-word',
  6896. overflowWrap: 'break-word'
  6897. },
  6898. [`${componentCls}-item`]: {
  6899. paddingBottom: 0,
  6900. verticalAlign: 'top',
  6901. '&-container': {
  6902. display: 'flex',
  6903. [`${componentCls}-item-label`]: {
  6904. display: 'inline-flex',
  6905. alignItems: 'baseline'
  6906. },
  6907. [`${componentCls}-item-content`]: {
  6908. display: 'inline-flex',
  6909. alignItems: 'baseline',
  6910. minWidth: '1em'
  6911. }
  6912. }
  6913. },
  6914. '&-middle': {
  6915. [`${componentCls}-row`]: {
  6916. '> th, > td': {
  6917. paddingBottom: token.paddingSM
  6918. }
  6919. }
  6920. },
  6921. '&-small': {
  6922. [`${componentCls}-row`]: {
  6923. '> th, > td': {
  6924. paddingBottom: token.paddingXS
  6925. }
  6926. }
  6927. }
  6928. })
  6929. };
  6930. };
  6931. const prepareComponentToken = token => ({
  6932. labelBg: token.colorFillAlter,
  6933. labelColor: token.colorTextTertiary,
  6934. titleColor: token.colorText,
  6935. titleMarginBottom: token.fontSizeSM * token.lineHeightSM,
  6936. itemPaddingBottom: token.padding,
  6937. itemPaddingEnd: token.padding,
  6938. colonMarginRight: token.marginXS,
  6939. colonMarginLeft: token.marginXXS / 2,
  6940. contentColor: token.colorText,
  6941. extraColor: token.colorText
  6942. });
  6943. // ============================== Export ==============================
  6944. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Descriptions', token => {
  6945. const descriptionToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {});
  6946. return genDescriptionStyles(descriptionToken);
  6947. }, prepareComponentToken));
  6948. /***/ }),
  6949. /***/ "./components/divider/style/index.ts":
  6950. /*!*******************************************!*\
  6951. !*** ./components/divider/style/index.ts ***!
  6952. \*******************************************/
  6953. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  6954. "use strict";
  6955. __webpack_require__.r(__webpack_exports__);
  6956. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6957. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  6958. /* harmony export */ });
  6959. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  6960. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  6961. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  6962. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  6963. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  6964. // ============================== Size ================================
  6965. const genSizeDividerStyle = token => {
  6966. const {
  6967. componentCls
  6968. } = token;
  6969. return {
  6970. [componentCls]: {
  6971. '&-horizontal': {
  6972. [`&${componentCls}`]: {
  6973. '&-sm': {
  6974. marginBlock: token.marginXS
  6975. },
  6976. '&-md': {
  6977. marginBlock: token.margin
  6978. }
  6979. }
  6980. }
  6981. }
  6982. };
  6983. };
  6984. // ============================== Shared ==============================
  6985. const genSharedDividerStyle = token => {
  6986. const {
  6987. componentCls,
  6988. sizePaddingEdgeHorizontal,
  6989. colorSplit,
  6990. lineWidth,
  6991. textPaddingInline,
  6992. orientationMargin,
  6993. verticalMarginInline
  6994. } = token;
  6995. return {
  6996. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  6997. borderBlockStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} solid ${colorSplit}`,
  6998. // vertical
  6999. '&-vertical': {
  7000. position: 'relative',
  7001. top: '-0.06em',
  7002. display: 'inline-block',
  7003. height: '0.9em',
  7004. marginInline: verticalMarginInline,
  7005. marginBlock: 0,
  7006. verticalAlign: 'middle',
  7007. borderTop: 0,
  7008. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} solid ${colorSplit}`
  7009. },
  7010. '&-horizontal': {
  7011. display: 'flex',
  7012. clear: 'both',
  7013. width: '100%',
  7014. minWidth: '100%',
  7015. // Fix https://github.com/ant-design/ant-design/issues/10914
  7016. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginLG)} 0`
  7017. },
  7018. [`&-horizontal${componentCls}-with-text`]: {
  7019. display: 'flex',
  7020. alignItems: 'center',
  7021. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.dividerHorizontalWithTextGutterMargin)} 0`,
  7022. color: token.colorTextHeading,
  7023. fontWeight: 500,
  7024. fontSize: token.fontSizeLG,
  7025. whiteSpace: 'nowrap',
  7026. textAlign: 'center',
  7027. borderBlockStart: `0 ${colorSplit}`,
  7028. '&::before, &::after': {
  7029. position: 'relative',
  7030. width: '50%',
  7031. borderBlockStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} solid transparent`,
  7032. // Chrome not accept `inherit` in `border-top`
  7033. borderBlockStartColor: 'inherit',
  7034. borderBlockEnd: 0,
  7035. transform: 'translateY(50%)',
  7036. content: "''"
  7037. }
  7038. },
  7039. [`&-horizontal${componentCls}-with-text-start`]: {
  7040. '&::before': {
  7041. width: `calc(${orientationMargin} * 100%)`
  7042. },
  7043. '&::after': {
  7044. width: `calc(100% - ${orientationMargin} * 100%)`
  7045. }
  7046. },
  7047. [`&-horizontal${componentCls}-with-text-end`]: {
  7048. '&::before': {
  7049. width: `calc(100% - ${orientationMargin} * 100%)`
  7050. },
  7051. '&::after': {
  7052. width: `calc(${orientationMargin} * 100%)`
  7053. }
  7054. },
  7055. [`${componentCls}-inner-text`]: {
  7056. display: 'inline-block',
  7057. paddingBlock: 0,
  7058. paddingInline: textPaddingInline
  7059. },
  7060. '&-dashed': {
  7061. background: 'none',
  7062. borderColor: colorSplit,
  7063. borderStyle: 'dashed',
  7064. borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0`
  7065. },
  7066. [`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
  7067. '&::before, &::after': {
  7068. borderStyle: 'dashed none none'
  7069. }
  7070. },
  7071. [`&-vertical${componentCls}-dashed`]: {
  7072. borderInlineStartWidth: lineWidth,
  7073. borderInlineEnd: 0,
  7074. borderBlockStart: 0,
  7075. borderBlockEnd: 0
  7076. },
  7077. '&-dotted': {
  7078. background: 'none',
  7079. borderColor: colorSplit,
  7080. borderStyle: 'dotted',
  7081. borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} 0 0`
  7082. },
  7083. [`&-horizontal${componentCls}-with-text${componentCls}-dotted`]: {
  7084. '&::before, &::after': {
  7085. borderStyle: 'dotted none none'
  7086. }
  7087. },
  7088. [`&-vertical${componentCls}-dotted`]: {
  7089. borderInlineStartWidth: lineWidth,
  7090. borderInlineEnd: 0,
  7091. borderBlockStart: 0,
  7092. borderBlockEnd: 0
  7093. },
  7094. [`&-plain${componentCls}-with-text`]: {
  7095. color: token.colorText,
  7096. fontWeight: 'normal',
  7097. fontSize: token.fontSize
  7098. },
  7099. [`&-horizontal${componentCls}-with-text-start${componentCls}-no-default-orientation-margin-start`]: {
  7100. '&::before': {
  7101. width: 0
  7102. },
  7103. '&::after': {
  7104. width: '100%'
  7105. },
  7106. [`${componentCls}-inner-text`]: {
  7107. paddingInlineStart: sizePaddingEdgeHorizontal
  7108. }
  7109. },
  7110. [`&-horizontal${componentCls}-with-text-end${componentCls}-no-default-orientation-margin-end`]: {
  7111. '&::before': {
  7112. width: '100%'
  7113. },
  7114. '&::after': {
  7115. width: 0
  7116. },
  7117. [`${componentCls}-inner-text`]: {
  7118. paddingInlineEnd: sizePaddingEdgeHorizontal
  7119. }
  7120. }
  7121. })
  7122. };
  7123. };
  7124. const prepareComponentToken = token => ({
  7125. textPaddingInline: '1em',
  7126. orientationMargin: 0.05,
  7127. verticalMarginInline: token.marginXS
  7128. });
  7129. // ============================== Export ==============================
  7130. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Divider', token => {
  7131. const dividerToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  7132. dividerHorizontalWithTextGutterMargin: token.margin,
  7133. sizePaddingEdgeHorizontal: 0
  7134. });
  7135. return [genSharedDividerStyle(dividerToken), genSizeDividerStyle(dividerToken)];
  7136. }, prepareComponentToken, {
  7137. unitless: {
  7138. orientationMargin: true
  7139. }
  7140. }));
  7141. /***/ }),
  7142. /***/ "./components/drawer/style/index.ts":
  7143. /*!******************************************************!*\
  7144. !*** ./components/drawer/style/index.ts + 1 modules ***!
  7145. \******************************************************/
  7146. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  7147. "use strict";
  7148. // ESM COMPAT FLAG
  7149. __webpack_require__.r(__webpack_exports__);
  7150. // EXPORTS
  7151. __webpack_require__.d(__webpack_exports__, {
  7152. "default": function() { return /* binding */ drawer_style; },
  7153. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  7154. });
  7155. // EXTERNAL MODULE: ./alias/cssinjs.js
  7156. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  7157. // EXTERNAL MODULE: ./components/style/index.tsx
  7158. var style = __webpack_require__("./components/style/index.tsx");
  7159. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  7160. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  7161. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  7162. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  7163. ;// ./components/drawer/style/motion.ts
  7164. const getMoveTranslate = direction => {
  7165. const value = '100%';
  7166. return {
  7167. left: `translateX(-${value})`,
  7168. right: `translateX(${value})`,
  7169. top: `translateY(-${value})`,
  7170. bottom: `translateY(${value})`
  7171. }[direction];
  7172. };
  7173. const getEnterLeaveStyle = (startStyle, endStyle) => ({
  7174. '&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {
  7175. '&-active': endStyle
  7176. }),
  7177. '&-leave': Object.assign(Object.assign({}, endStyle), {
  7178. '&-active': startStyle
  7179. })
  7180. });
  7181. const getFadeStyle = (from, duration) => Object.assign({
  7182. '&-enter, &-appear, &-leave': {
  7183. '&-start': {
  7184. transition: 'none'
  7185. },
  7186. '&-active': {
  7187. transition: `all ${duration}`
  7188. }
  7189. }
  7190. }, getEnterLeaveStyle({
  7191. opacity: from
  7192. }, {
  7193. opacity: 1
  7194. }));
  7195. const getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({
  7196. transform: getMoveTranslate(direction)
  7197. }, {
  7198. transform: 'none'
  7199. })];
  7200. const genMotionStyle = token => {
  7201. const {
  7202. componentCls,
  7203. motionDurationSlow
  7204. } = token;
  7205. return {
  7206. [componentCls]: {
  7207. // ======================== Mask ========================
  7208. [`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),
  7209. // ======================= Panel ========================
  7210. [`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {
  7211. [`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)
  7212. }), {})
  7213. }
  7214. };
  7215. };
  7216. /* harmony default export */ var motion = (genMotionStyle);
  7217. ;// ./components/drawer/style/index.ts
  7218. // =============================== Base ===============================
  7219. const genDrawerStyle = token => {
  7220. const {
  7221. borderRadiusSM,
  7222. componentCls,
  7223. zIndexPopup,
  7224. colorBgMask,
  7225. colorBgElevated,
  7226. motionDurationSlow,
  7227. motionDurationMid,
  7228. paddingXS,
  7229. padding,
  7230. paddingLG,
  7231. fontSizeLG,
  7232. lineHeightLG,
  7233. lineWidth,
  7234. lineType,
  7235. colorSplit,
  7236. marginXS,
  7237. colorIcon,
  7238. colorIconHover,
  7239. colorBgTextHover,
  7240. colorBgTextActive,
  7241. colorText,
  7242. fontWeightStrong,
  7243. footerPaddingBlock,
  7244. footerPaddingInline,
  7245. calc
  7246. } = token;
  7247. const wrapperCls = `${componentCls}-content-wrapper`;
  7248. return {
  7249. [componentCls]: {
  7250. position: 'fixed',
  7251. inset: 0,
  7252. zIndex: zIndexPopup,
  7253. pointerEvents: 'none',
  7254. color: colorText,
  7255. '&-pure': {
  7256. position: 'relative',
  7257. background: colorBgElevated,
  7258. display: 'flex',
  7259. flexDirection: 'column',
  7260. [`&${componentCls}-left`]: {
  7261. boxShadow: token.boxShadowDrawerLeft
  7262. },
  7263. [`&${componentCls}-right`]: {
  7264. boxShadow: token.boxShadowDrawerRight
  7265. },
  7266. [`&${componentCls}-top`]: {
  7267. boxShadow: token.boxShadowDrawerUp
  7268. },
  7269. [`&${componentCls}-bottom`]: {
  7270. boxShadow: token.boxShadowDrawerDown
  7271. }
  7272. },
  7273. '&-inline': {
  7274. position: 'absolute'
  7275. },
  7276. // ====================== Mask ======================
  7277. [`${componentCls}-mask`]: {
  7278. position: 'absolute',
  7279. inset: 0,
  7280. zIndex: zIndexPopup,
  7281. background: colorBgMask,
  7282. pointerEvents: 'auto'
  7283. },
  7284. // ==================== Content =====================
  7285. [wrapperCls]: {
  7286. position: 'absolute',
  7287. zIndex: zIndexPopup,
  7288. maxWidth: '100vw',
  7289. transition: `all ${motionDurationSlow}`,
  7290. '&-hidden': {
  7291. display: 'none'
  7292. }
  7293. },
  7294. // Placement
  7295. [`&-left > ${wrapperCls}`]: {
  7296. top: 0,
  7297. bottom: 0,
  7298. left: {
  7299. _skip_check_: true,
  7300. value: 0
  7301. },
  7302. boxShadow: token.boxShadowDrawerLeft
  7303. },
  7304. [`&-right > ${wrapperCls}`]: {
  7305. top: 0,
  7306. right: {
  7307. _skip_check_: true,
  7308. value: 0
  7309. },
  7310. bottom: 0,
  7311. boxShadow: token.boxShadowDrawerRight
  7312. },
  7313. [`&-top > ${wrapperCls}`]: {
  7314. top: 0,
  7315. insetInline: 0,
  7316. boxShadow: token.boxShadowDrawerUp
  7317. },
  7318. [`&-bottom > ${wrapperCls}`]: {
  7319. bottom: 0,
  7320. insetInline: 0,
  7321. boxShadow: token.boxShadowDrawerDown
  7322. },
  7323. [`${componentCls}-content`]: {
  7324. display: 'flex',
  7325. flexDirection: 'column',
  7326. width: '100%',
  7327. height: '100%',
  7328. overflow: 'auto',
  7329. background: colorBgElevated,
  7330. pointerEvents: 'auto'
  7331. },
  7332. // Header
  7333. [`${componentCls}-header`]: {
  7334. display: 'flex',
  7335. flex: 0,
  7336. alignItems: 'center',
  7337. padding: `${(0,cssinjs.unit)(padding)} ${(0,cssinjs.unit)(paddingLG)}`,
  7338. fontSize: fontSizeLG,
  7339. lineHeight: lineHeightLG,
  7340. borderBottom: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  7341. '&-title': {
  7342. display: 'flex',
  7343. flex: 1,
  7344. alignItems: 'center',
  7345. minWidth: 0,
  7346. minHeight: 0
  7347. }
  7348. },
  7349. [`${componentCls}-extra`]: {
  7350. flex: 'none'
  7351. },
  7352. [`${componentCls}-close`]: Object.assign({
  7353. display: 'inline-flex',
  7354. width: calc(fontSizeLG).add(paddingXS).equal(),
  7355. height: calc(fontSizeLG).add(paddingXS).equal(),
  7356. borderRadius: borderRadiusSM,
  7357. justifyContent: 'center',
  7358. alignItems: 'center',
  7359. marginInlineEnd: marginXS,
  7360. color: colorIcon,
  7361. fontWeight: fontWeightStrong,
  7362. fontSize: fontSizeLG,
  7363. fontStyle: 'normal',
  7364. lineHeight: 1,
  7365. textAlign: 'center',
  7366. textTransform: 'none',
  7367. textDecoration: 'none',
  7368. background: 'transparent',
  7369. border: 0,
  7370. cursor: 'pointer',
  7371. transition: `all ${motionDurationMid}`,
  7372. textRendering: 'auto',
  7373. '&:hover': {
  7374. color: colorIconHover,
  7375. backgroundColor: colorBgTextHover,
  7376. textDecoration: 'none'
  7377. },
  7378. '&:active': {
  7379. backgroundColor: colorBgTextActive
  7380. }
  7381. }, (0,style.genFocusStyle)(token)),
  7382. [`${componentCls}-title`]: {
  7383. flex: 1,
  7384. margin: 0,
  7385. fontWeight: token.fontWeightStrong,
  7386. fontSize: fontSizeLG,
  7387. lineHeight: lineHeightLG
  7388. },
  7389. // Body
  7390. [`${componentCls}-body`]: {
  7391. flex: 1,
  7392. minWidth: 0,
  7393. minHeight: 0,
  7394. padding: paddingLG,
  7395. overflow: 'auto',
  7396. [`${componentCls}-body-skeleton`]: {
  7397. width: '100%',
  7398. height: '100%',
  7399. display: 'flex',
  7400. justifyContent: 'center'
  7401. }
  7402. },
  7403. // Footer
  7404. [`${componentCls}-footer`]: {
  7405. flexShrink: 0,
  7406. padding: `${(0,cssinjs.unit)(footerPaddingBlock)} ${(0,cssinjs.unit)(footerPaddingInline)}`,
  7407. borderTop: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`
  7408. },
  7409. // ====================== RTL =======================
  7410. '&-rtl': {
  7411. direction: 'rtl'
  7412. }
  7413. }
  7414. };
  7415. };
  7416. const prepareComponentToken = token => ({
  7417. zIndexPopup: token.zIndexPopupBase,
  7418. footerPaddingBlock: token.paddingXS,
  7419. footerPaddingInline: token.padding
  7420. });
  7421. // ============================== Export ==============================
  7422. /* harmony default export */ var drawer_style = ((0,genStyleUtils.genStyleHooks)('Drawer', token => {
  7423. const drawerToken = (0,es.mergeToken)(token, {});
  7424. return [genDrawerStyle(drawerToken), motion(drawerToken)];
  7425. }, prepareComponentToken));
  7426. /***/ }),
  7427. /***/ "./components/dropdown/style/index.ts":
  7428. /*!********************************************************!*\
  7429. !*** ./components/dropdown/style/index.ts + 1 modules ***!
  7430. \********************************************************/
  7431. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  7432. "use strict";
  7433. // ESM COMPAT FLAG
  7434. __webpack_require__.r(__webpack_exports__);
  7435. // EXPORTS
  7436. __webpack_require__.d(__webpack_exports__, {
  7437. "default": function() { return /* binding */ dropdown_style; },
  7438. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  7439. });
  7440. // EXTERNAL MODULE: ./alias/cssinjs.js
  7441. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  7442. // EXTERNAL MODULE: ./components/style/index.tsx
  7443. var style = __webpack_require__("./components/style/index.tsx");
  7444. // EXTERNAL MODULE: ./components/style/motion/slide.ts
  7445. var slide = __webpack_require__("./components/style/motion/slide.ts");
  7446. // EXTERNAL MODULE: ./components/style/motion/move.ts
  7447. var move = __webpack_require__("./components/style/motion/move.ts");
  7448. // EXTERNAL MODULE: ./components/style/motion/zoom.ts
  7449. var zoom = __webpack_require__("./components/style/motion/zoom.ts");
  7450. // EXTERNAL MODULE: ./components/style/placementArrow.ts
  7451. var placementArrow = __webpack_require__("./components/style/placementArrow.ts");
  7452. // EXTERNAL MODULE: ./components/style/roundedArrow.ts
  7453. var roundedArrow = __webpack_require__("./components/style/roundedArrow.ts");
  7454. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  7455. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  7456. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  7457. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  7458. ;// ./components/dropdown/style/status.ts
  7459. const genStatusStyle = token => {
  7460. const {
  7461. componentCls,
  7462. menuCls,
  7463. colorError,
  7464. colorTextLightSolid
  7465. } = token;
  7466. const itemCls = `${menuCls}-item`;
  7467. return {
  7468. [`${componentCls}, ${componentCls}-menu-submenu`]: {
  7469. [`${menuCls} ${itemCls}`]: {
  7470. [`&${itemCls}-danger:not(${itemCls}-disabled)`]: {
  7471. color: colorError,
  7472. '&:hover': {
  7473. color: colorTextLightSolid,
  7474. backgroundColor: colorError
  7475. }
  7476. }
  7477. }
  7478. }
  7479. };
  7480. };
  7481. /* harmony default export */ var style_status = (genStatusStyle);
  7482. ;// ./components/dropdown/style/index.ts
  7483. // =============================== Base ===============================
  7484. const genBaseStyle = token => {
  7485. const {
  7486. componentCls,
  7487. menuCls,
  7488. zIndexPopup,
  7489. dropdownArrowDistance,
  7490. sizePopupArrow,
  7491. antCls,
  7492. iconCls,
  7493. motionDurationMid,
  7494. paddingBlock,
  7495. fontSize,
  7496. dropdownEdgeChildPadding,
  7497. colorTextDisabled,
  7498. fontSizeIcon,
  7499. controlPaddingHorizontal,
  7500. colorBgElevated
  7501. } = token;
  7502. return [{
  7503. [componentCls]: {
  7504. position: 'absolute',
  7505. top: -9999,
  7506. left: {
  7507. _skip_check_: true,
  7508. value: -9999
  7509. },
  7510. zIndex: zIndexPopup,
  7511. display: 'block',
  7512. // A placeholder out of dropdown visible range to avoid close when user moving
  7513. '&::before': {
  7514. position: 'absolute',
  7515. insetBlock: token.calc(sizePopupArrow).div(2).sub(dropdownArrowDistance).equal(),
  7516. // insetInlineStart: -7, // FIXME: Seems not work for hidden element
  7517. zIndex: -9999,
  7518. opacity: 0.0001,
  7519. content: '""'
  7520. },
  7521. // Makes vertical dropdowns have a scrollbar once they become taller than the viewport.
  7522. '&-menu-vertical': {
  7523. maxHeight: '100vh',
  7524. overflowY: 'auto'
  7525. },
  7526. [`&-trigger${antCls}-btn`]: {
  7527. [`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {
  7528. fontSize: fontSizeIcon
  7529. }
  7530. },
  7531. [`${componentCls}-wrap`]: {
  7532. position: 'relative',
  7533. [`${antCls}-btn > ${iconCls}-down`]: {
  7534. fontSize: fontSizeIcon
  7535. },
  7536. [`${iconCls}-down::before`]: {
  7537. transition: `transform ${motionDurationMid}`
  7538. }
  7539. },
  7540. [`${componentCls}-wrap-open`]: {
  7541. [`${iconCls}-down::before`]: {
  7542. transform: `rotate(180deg)`
  7543. }
  7544. },
  7545. [`
  7546. &-hidden,
  7547. &-menu-hidden,
  7548. &-menu-submenu-hidden
  7549. `]: {
  7550. display: 'none'
  7551. },
  7552. // =============================================================
  7553. // == Motion ==
  7554. // =============================================================
  7555. // When position is not enough for dropdown, the placement will revert.
  7556. // We will handle this with revert motion name.
  7557. [`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,
  7558. &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,
  7559. &${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,
  7560. &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,
  7561. &${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,
  7562. &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {
  7563. animationName: slide.slideUpIn
  7564. },
  7565. [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,
  7566. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,
  7567. &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,
  7568. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,
  7569. &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,
  7570. &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {
  7571. animationName: slide.slideDownIn
  7572. },
  7573. [`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,
  7574. &${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottom,
  7575. &${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomRight`]: {
  7576. animationName: slide.slideUpOut
  7577. },
  7578. [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topLeft,
  7579. &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-top,
  7580. &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topRight`]: {
  7581. animationName: slide.slideDownOut
  7582. }
  7583. }
  7584. },
  7585. // =============================================================
  7586. // == Arrow style ==
  7587. // =============================================================
  7588. (0,placementArrow["default"])(token, colorBgElevated, {
  7589. arrowPlacement: {
  7590. top: true,
  7591. bottom: true
  7592. }
  7593. }), {
  7594. // =============================================================
  7595. // == Menu ==
  7596. // =============================================================
  7597. [`${componentCls} ${menuCls}`]: {
  7598. position: 'relative',
  7599. margin: 0
  7600. },
  7601. [`${menuCls}-submenu-popup`]: {
  7602. position: 'absolute',
  7603. zIndex: zIndexPopup,
  7604. background: 'transparent',
  7605. boxShadow: 'none',
  7606. transformOrigin: '0 0',
  7607. 'ul, li': {
  7608. listStyle: 'none',
  7609. margin: 0
  7610. }
  7611. },
  7612. [`${componentCls}, ${componentCls}-menu-submenu`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  7613. [menuCls]: Object.assign(Object.assign({
  7614. padding: dropdownEdgeChildPadding,
  7615. listStyleType: 'none',
  7616. backgroundColor: colorBgElevated,
  7617. backgroundClip: 'padding-box',
  7618. borderRadius: token.borderRadiusLG,
  7619. outline: 'none',
  7620. boxShadow: token.boxShadowSecondary
  7621. }, (0,style.genFocusStyle)(token)), {
  7622. '&:empty': {
  7623. padding: 0,
  7624. boxShadow: 'none'
  7625. },
  7626. [`${menuCls}-item-group-title`]: {
  7627. padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(controlPaddingHorizontal)}`,
  7628. color: token.colorTextDescription,
  7629. transition: `all ${motionDurationMid}`
  7630. },
  7631. // ======================= Item Content =======================
  7632. [`${menuCls}-item`]: {
  7633. position: 'relative',
  7634. display: 'flex',
  7635. alignItems: 'center'
  7636. },
  7637. [`${menuCls}-item-icon`]: {
  7638. minWidth: fontSize,
  7639. marginInlineEnd: token.marginXS,
  7640. fontSize: token.fontSizeSM
  7641. },
  7642. [`${menuCls}-title-content`]: {
  7643. flex: 'auto',
  7644. '&-with-extra': {
  7645. display: 'inline-flex',
  7646. alignItems: 'center',
  7647. width: '100%'
  7648. },
  7649. '> a': {
  7650. color: 'inherit',
  7651. transition: `all ${motionDurationMid}`,
  7652. '&:hover': {
  7653. color: 'inherit'
  7654. },
  7655. '&::after': {
  7656. position: 'absolute',
  7657. inset: 0,
  7658. content: '""'
  7659. }
  7660. },
  7661. [`${menuCls}-item-extra`]: {
  7662. paddingInlineStart: token.padding,
  7663. marginInlineStart: 'auto',
  7664. fontSize: token.fontSizeSM,
  7665. color: token.colorTextDescription
  7666. }
  7667. },
  7668. // =========================== Item ===========================
  7669. [`${menuCls}-item, ${menuCls}-submenu-title`]: Object.assign(Object.assign({
  7670. display: 'flex',
  7671. margin: 0,
  7672. padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(controlPaddingHorizontal)}`,
  7673. color: token.colorText,
  7674. fontWeight: 'normal',
  7675. fontSize,
  7676. lineHeight: token.lineHeight,
  7677. cursor: 'pointer',
  7678. transition: `all ${motionDurationMid}`,
  7679. borderRadius: token.borderRadiusSM,
  7680. '&:hover, &-active': {
  7681. backgroundColor: token.controlItemBgHover
  7682. }
  7683. }, (0,style.genFocusStyle)(token)), {
  7684. '&-selected': {
  7685. color: token.colorPrimary,
  7686. backgroundColor: token.controlItemBgActive,
  7687. '&:hover, &-active': {
  7688. backgroundColor: token.controlItemBgActiveHover
  7689. }
  7690. },
  7691. '&-disabled': {
  7692. color: colorTextDisabled,
  7693. cursor: 'not-allowed',
  7694. '&:hover': {
  7695. color: colorTextDisabled,
  7696. backgroundColor: colorBgElevated,
  7697. cursor: 'not-allowed'
  7698. },
  7699. a: {
  7700. pointerEvents: 'none'
  7701. }
  7702. },
  7703. '&-divider': {
  7704. height: 1,
  7705. // By design
  7706. margin: `${(0,cssinjs.unit)(token.marginXXS)} 0`,
  7707. overflow: 'hidden',
  7708. lineHeight: 0,
  7709. backgroundColor: token.colorSplit
  7710. },
  7711. [`${componentCls}-menu-submenu-expand-icon`]: {
  7712. position: 'absolute',
  7713. insetInlineEnd: token.paddingXS,
  7714. [`${componentCls}-menu-submenu-arrow-icon`]: {
  7715. marginInlineEnd: '0 !important',
  7716. color: token.colorIcon,
  7717. fontSize: fontSizeIcon,
  7718. fontStyle: 'normal'
  7719. }
  7720. }
  7721. }),
  7722. [`${menuCls}-item-group-list`]: {
  7723. margin: `0 ${(0,cssinjs.unit)(token.marginXS)}`,
  7724. padding: 0,
  7725. listStyle: 'none'
  7726. },
  7727. [`${menuCls}-submenu-title`]: {
  7728. paddingInlineEnd: token.calc(controlPaddingHorizontal).add(token.fontSizeSM).equal()
  7729. },
  7730. [`${menuCls}-submenu-vertical`]: {
  7731. position: 'relative'
  7732. },
  7733. [`${menuCls}-submenu${menuCls}-submenu-disabled ${componentCls}-menu-submenu-title`]: {
  7734. [`&, ${componentCls}-menu-submenu-arrow-icon`]: {
  7735. color: colorTextDisabled,
  7736. backgroundColor: colorBgElevated,
  7737. cursor: 'not-allowed'
  7738. }
  7739. },
  7740. // https://github.com/ant-design/ant-design/issues/19264
  7741. [`${menuCls}-submenu-selected ${componentCls}-menu-submenu-title`]: {
  7742. color: token.colorPrimary
  7743. }
  7744. })
  7745. })
  7746. },
  7747. // Follow code may reuse in other components
  7748. [(0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down'), (0,move.initMoveMotion)(token, 'move-up'), (0,move.initMoveMotion)(token, 'move-down'), (0,zoom.initZoomMotion)(token, 'zoom-big')]];
  7749. };
  7750. // ============================== Export ==============================
  7751. const prepareComponentToken = token => Object.assign(Object.assign({
  7752. zIndexPopup: token.zIndexPopupBase + 50,
  7753. paddingBlock: (token.controlHeight - token.fontSize * token.lineHeight) / 2
  7754. }, (0,placementArrow.getArrowOffsetToken)({
  7755. contentRadius: token.borderRadiusLG,
  7756. limitVerticalRadius: true
  7757. })), (0,roundedArrow.getArrowToken)(token));
  7758. /* harmony default export */ var dropdown_style = ((0,genStyleUtils.genStyleHooks)('Dropdown', token => {
  7759. const {
  7760. marginXXS,
  7761. sizePopupArrow,
  7762. paddingXXS,
  7763. componentCls
  7764. } = token;
  7765. const dropdownToken = (0,es.mergeToken)(token, {
  7766. menuCls: `${componentCls}-menu`,
  7767. dropdownArrowDistance: token.calc(sizePopupArrow).div(2).add(marginXXS).equal(),
  7768. dropdownEdgeChildPadding: paddingXXS
  7769. });
  7770. return [genBaseStyle(dropdownToken), style_status(dropdownToken)];
  7771. }, prepareComponentToken, {
  7772. resetStyle: false
  7773. }));
  7774. /***/ }),
  7775. /***/ "./components/empty/style/index.ts":
  7776. /*!*****************************************!*\
  7777. !*** ./components/empty/style/index.ts ***!
  7778. \*****************************************/
  7779. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  7780. "use strict";
  7781. __webpack_require__.r(__webpack_exports__);
  7782. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  7783. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  7784. // ============================== Shared ==============================
  7785. const genSharedEmptyStyle = token => {
  7786. const {
  7787. componentCls,
  7788. margin,
  7789. marginXS,
  7790. marginXL,
  7791. fontSize,
  7792. lineHeight
  7793. } = token;
  7794. return {
  7795. [componentCls]: {
  7796. marginInline: marginXS,
  7797. fontSize,
  7798. lineHeight,
  7799. textAlign: 'center',
  7800. // 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
  7801. [`${componentCls}-image`]: {
  7802. height: token.emptyImgHeight,
  7803. marginBottom: marginXS,
  7804. opacity: token.opacityImage,
  7805. img: {
  7806. height: '100%'
  7807. },
  7808. svg: {
  7809. maxWidth: '100%',
  7810. height: '100%',
  7811. margin: 'auto'
  7812. }
  7813. },
  7814. [`${componentCls}-description`]: {
  7815. color: token.colorTextDescription
  7816. },
  7817. // 原来 &-footer 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
  7818. [`${componentCls}-footer`]: {
  7819. marginTop: margin
  7820. },
  7821. '&-normal': {
  7822. marginBlock: marginXL,
  7823. color: token.colorTextDescription,
  7824. [`${componentCls}-description`]: {
  7825. color: token.colorTextDescription
  7826. },
  7827. [`${componentCls}-image`]: {
  7828. height: token.emptyImgHeightMD
  7829. }
  7830. },
  7831. '&-small': {
  7832. marginBlock: marginXS,
  7833. color: token.colorTextDescription,
  7834. [`${componentCls}-image`]: {
  7835. height: token.emptyImgHeightSM
  7836. }
  7837. }
  7838. }
  7839. };
  7840. };
  7841. // ============================== Export ==============================
  7842. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Empty', token => {
  7843. const {
  7844. componentCls,
  7845. controlHeightLG,
  7846. calc
  7847. } = token;
  7848. const emptyToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.mergeToken)(token, {
  7849. emptyImgCls: `${componentCls}-img`,
  7850. emptyImgHeight: calc(controlHeightLG).mul(2.5).equal(),
  7851. emptyImgHeightMD: controlHeightLG,
  7852. emptyImgHeightSM: calc(controlHeightLG).mul(0.875).equal()
  7853. });
  7854. return genSharedEmptyStyle(emptyToken);
  7855. }));
  7856. /***/ }),
  7857. /***/ "./components/flex/style/index.ts":
  7858. /*!****************************************!*\
  7859. !*** ./components/flex/style/index.ts ***!
  7860. \****************************************/
  7861. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  7862. "use strict";
  7863. __webpack_require__.r(__webpack_exports__);
  7864. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7865. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  7866. /* harmony export */ });
  7867. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  7868. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  7869. /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./components/flex/utils.ts");
  7870. const genFlexStyle = token => {
  7871. const {
  7872. componentCls
  7873. } = token;
  7874. return {
  7875. [componentCls]: {
  7876. display: 'flex',
  7877. margin: 0,
  7878. padding: 0,
  7879. '&-vertical': {
  7880. flexDirection: 'column'
  7881. },
  7882. '&-rtl': {
  7883. direction: 'rtl'
  7884. },
  7885. '&:empty': {
  7886. display: 'none'
  7887. }
  7888. }
  7889. };
  7890. };
  7891. const genFlexGapStyle = token => {
  7892. const {
  7893. componentCls
  7894. } = token;
  7895. return {
  7896. [componentCls]: {
  7897. '&-gap-small': {
  7898. gap: token.flexGapSM
  7899. },
  7900. '&-gap-middle': {
  7901. gap: token.flexGap
  7902. },
  7903. '&-gap-large': {
  7904. gap: token.flexGapLG
  7905. }
  7906. }
  7907. };
  7908. };
  7909. const genFlexWrapStyle = token => {
  7910. const {
  7911. componentCls
  7912. } = token;
  7913. const wrapStyle = {};
  7914. _utils__WEBPACK_IMPORTED_MODULE_2__.flexWrapValues.forEach(value => {
  7915. wrapStyle[`${componentCls}-wrap-${value}`] = {
  7916. flexWrap: value
  7917. };
  7918. });
  7919. return wrapStyle;
  7920. };
  7921. const genAlignItemsStyle = token => {
  7922. const {
  7923. componentCls
  7924. } = token;
  7925. const alignStyle = {};
  7926. _utils__WEBPACK_IMPORTED_MODULE_2__.alignItemsValues.forEach(value => {
  7927. alignStyle[`${componentCls}-align-${value}`] = {
  7928. alignItems: value
  7929. };
  7930. });
  7931. return alignStyle;
  7932. };
  7933. const genJustifyContentStyle = token => {
  7934. const {
  7935. componentCls
  7936. } = token;
  7937. const justifyStyle = {};
  7938. _utils__WEBPACK_IMPORTED_MODULE_2__.justifyContentValues.forEach(value => {
  7939. justifyStyle[`${componentCls}-justify-${value}`] = {
  7940. justifyContent: value
  7941. };
  7942. });
  7943. return justifyStyle;
  7944. };
  7945. const prepareComponentToken = () => ({});
  7946. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Flex', token => {
  7947. const {
  7948. paddingXS,
  7949. padding,
  7950. paddingLG
  7951. } = token;
  7952. const flexToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.mergeToken)(token, {
  7953. flexGapSM: paddingXS,
  7954. flexGap: padding,
  7955. flexGapLG: paddingLG
  7956. });
  7957. return [genFlexStyle(flexToken), genFlexGapStyle(flexToken), genFlexWrapStyle(flexToken), genAlignItemsStyle(flexToken), genJustifyContentStyle(flexToken)];
  7958. }, prepareComponentToken, {
  7959. // Flex component don't apply extra font style
  7960. // https://github.com/ant-design/ant-design/issues/46403
  7961. resetStyle: false
  7962. }));
  7963. /***/ }),
  7964. /***/ "./components/flex/utils.ts":
  7965. /*!**********************************!*\
  7966. !*** ./components/flex/utils.ts ***!
  7967. \**********************************/
  7968. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  7969. "use strict";
  7970. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7971. /* harmony export */ alignItemsValues: function() { return /* binding */ alignItemsValues; },
  7972. /* harmony export */ flexWrapValues: function() { return /* binding */ flexWrapValues; },
  7973. /* harmony export */ justifyContentValues: function() { return /* binding */ justifyContentValues; }
  7974. /* harmony export */ });
  7975. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
  7976. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
  7977. const flexWrapValues = ['wrap', 'nowrap', 'wrap-reverse'];
  7978. const justifyContentValues = ['flex-start', 'flex-end', 'start', 'end', 'center', 'space-between', 'space-around', 'space-evenly', 'stretch', 'normal', 'left', 'right'];
  7979. const alignItemsValues = ['center', 'start', 'end', 'flex-start', 'flex-end', 'self-start', 'self-end', 'baseline', 'normal', 'stretch'];
  7980. const genClsWrap = (prefixCls, props) => {
  7981. const wrap = props.wrap === true ? 'wrap' : props.wrap;
  7982. return {
  7983. [`${prefixCls}-wrap-${wrap}`]: wrap && flexWrapValues.includes(wrap)
  7984. };
  7985. };
  7986. const genClsAlign = (prefixCls, props) => {
  7987. const alignCls = {};
  7988. alignItemsValues.forEach(cssKey => {
  7989. alignCls[`${prefixCls}-align-${cssKey}`] = props.align === cssKey;
  7990. });
  7991. alignCls[`${prefixCls}-align-stretch`] = !props.align && !!props.vertical;
  7992. return alignCls;
  7993. };
  7994. const genClsJustify = (prefixCls, props) => {
  7995. const justifyCls = {};
  7996. justifyContentValues.forEach(cssKey => {
  7997. justifyCls[`${prefixCls}-justify-${cssKey}`] = props.justify === cssKey;
  7998. });
  7999. return justifyCls;
  8000. };
  8001. function createFlexClassNames(prefixCls, props) {
  8002. return classnames__WEBPACK_IMPORTED_MODULE_0___default()(Object.assign(Object.assign(Object.assign({}, genClsWrap(prefixCls, props)), genClsAlign(prefixCls, props)), genClsJustify(prefixCls, props)));
  8003. }
  8004. /* harmony default export */ __webpack_exports__["default"] = (createFlexClassNames);
  8005. /***/ }),
  8006. /***/ "./components/float-button/style/index.ts":
  8007. /*!************************************************************!*\
  8008. !*** ./components/float-button/style/index.ts + 2 modules ***!
  8009. \************************************************************/
  8010. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  8011. "use strict";
  8012. // ESM COMPAT FLAG
  8013. __webpack_require__.r(__webpack_exports__);
  8014. // EXPORTS
  8015. __webpack_require__.d(__webpack_exports__, {
  8016. "default": function() { return /* binding */ float_button_style; },
  8017. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  8018. });
  8019. // EXTERNAL MODULE: ./alias/cssinjs.js
  8020. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  8021. // EXTERNAL MODULE: ./components/style/index.tsx
  8022. var style = __webpack_require__("./components/style/index.tsx");
  8023. // EXTERNAL MODULE: ./components/style/motion/fade.ts
  8024. var fade = __webpack_require__("./components/style/motion/fade.ts");
  8025. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  8026. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  8027. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  8028. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  8029. ;// ./components/float-button/util.ts
  8030. const getOffset = radius => {
  8031. if (radius === 0) {
  8032. return 0;
  8033. }
  8034. // 如果要考虑通用性,这里应该用三角函数 Math.sin(45)
  8035. // 但是这个场景比较特殊,始终是等腰直角三角形,所以直接用 Math.sqrt() 开方即可
  8036. return radius - Math.sqrt(Math.pow(radius, 2) / 2);
  8037. };
  8038. /* harmony default export */ var util = (getOffset);
  8039. // EXTERNAL MODULE: ./components/style/motion/motion.ts
  8040. var motion = __webpack_require__("./components/style/motion/motion.ts");
  8041. ;// ./components/float-button/style/keyframes.ts
  8042. const floatButtonGroupMotion = token => {
  8043. const {
  8044. componentCls,
  8045. floatButtonSize,
  8046. motionDurationSlow,
  8047. motionEaseInOutCirc,
  8048. calc
  8049. } = token;
  8050. const moveTopIn = new cssinjs.Keyframes('antFloatButtonMoveTopIn', {
  8051. '0%': {
  8052. transform: `translate3d(0, ${(0,cssinjs.unit)(floatButtonSize)}, 0)`,
  8053. transformOrigin: '0 0',
  8054. opacity: 0
  8055. },
  8056. '100%': {
  8057. transform: 'translate3d(0, 0, 0)',
  8058. transformOrigin: '0 0',
  8059. opacity: 1
  8060. }
  8061. });
  8062. const moveTopOut = new cssinjs.Keyframes('antFloatButtonMoveTopOut', {
  8063. '0%': {
  8064. transform: 'translate3d(0, 0, 0)',
  8065. transformOrigin: '0 0',
  8066. opacity: 1
  8067. },
  8068. '100%': {
  8069. transform: `translate3d(0, ${(0,cssinjs.unit)(floatButtonSize)}, 0)`,
  8070. transformOrigin: '0 0',
  8071. opacity: 0
  8072. }
  8073. });
  8074. const moveRightIn = new cssinjs.Keyframes('antFloatButtonMoveRightIn', {
  8075. '0%': {
  8076. transform: `translate3d(${(0,cssinjs.unit)(calc(floatButtonSize).mul(-1).equal())}, 0, 0)`,
  8077. transformOrigin: '0 0',
  8078. opacity: 0
  8079. },
  8080. '100%': {
  8081. transform: 'translate3d(0, 0, 0)',
  8082. transformOrigin: '0 0',
  8083. opacity: 1
  8084. }
  8085. });
  8086. const moveRightOut = new cssinjs.Keyframes('antFloatButtonMoveRightOut', {
  8087. '0%': {
  8088. transform: 'translate3d(0, 0, 0)',
  8089. transformOrigin: '0 0',
  8090. opacity: 1
  8091. },
  8092. '100%': {
  8093. transform: `translate3d(${(0,cssinjs.unit)(calc(floatButtonSize).mul(-1).equal())}, 0, 0)`,
  8094. transformOrigin: '0 0',
  8095. opacity: 0
  8096. }
  8097. });
  8098. const moveBottomIn = new cssinjs.Keyframes('antFloatButtonMoveBottomIn', {
  8099. '0%': {
  8100. transform: `translate3d(0, ${(0,cssinjs.unit)(calc(floatButtonSize).mul(-1).equal())}, 0)`,
  8101. transformOrigin: '0 0',
  8102. opacity: 0
  8103. },
  8104. '100%': {
  8105. transform: 'translate3d(0, 0, 0)',
  8106. transformOrigin: '0 0',
  8107. opacity: 1
  8108. }
  8109. });
  8110. const moveBottomOut = new cssinjs.Keyframes('antFloatButtonMoveBottomOut', {
  8111. '0%': {
  8112. transform: 'translate3d(0, 0, 0)',
  8113. transformOrigin: '0 0',
  8114. opacity: 1
  8115. },
  8116. '100%': {
  8117. transform: `translate3d(0, ${(0,cssinjs.unit)(calc(floatButtonSize).mul(-1).equal())}, 0)`,
  8118. transformOrigin: '0 0',
  8119. opacity: 0
  8120. }
  8121. });
  8122. const moveLeftIn = new cssinjs.Keyframes('antFloatButtonMoveLeftIn', {
  8123. '0%': {
  8124. transform: `translate3d(${(0,cssinjs.unit)(floatButtonSize)}, 0, 0)`,
  8125. transformOrigin: '0 0',
  8126. opacity: 0
  8127. },
  8128. '100%': {
  8129. transform: 'translate3d(0, 0, 0)',
  8130. transformOrigin: '0 0',
  8131. opacity: 1
  8132. }
  8133. });
  8134. const moveLeftOut = new cssinjs.Keyframes('antFloatButtonMoveLeftOut', {
  8135. '0%': {
  8136. transform: 'translate3d(0, 0, 0)',
  8137. transformOrigin: '0 0',
  8138. opacity: 1
  8139. },
  8140. '100%': {
  8141. transform: `translate3d(${(0,cssinjs.unit)(floatButtonSize)}, 0, 0)`,
  8142. transformOrigin: '0 0',
  8143. opacity: 0
  8144. }
  8145. });
  8146. const groupPrefixCls = `${componentCls}-group`;
  8147. return [{
  8148. [groupPrefixCls]: {
  8149. [`&${groupPrefixCls}-top ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveTopIn, moveTopOut, motionDurationSlow, true),
  8150. [`&${groupPrefixCls}-bottom ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveBottomIn, moveBottomOut, motionDurationSlow, true),
  8151. [`&${groupPrefixCls}-left ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveLeftIn, moveLeftOut, motionDurationSlow, true),
  8152. [`&${groupPrefixCls}-right ${groupPrefixCls}-wrap`]: (0,motion.initMotion)(`${groupPrefixCls}-wrap`, moveRightIn, moveRightOut, motionDurationSlow, true)
  8153. }
  8154. }, {
  8155. [`${groupPrefixCls}-wrap`]: {
  8156. [`&${groupPrefixCls}-wrap-enter, &${groupPrefixCls}-wrap-appear`]: {
  8157. opacity: 0,
  8158. animationTimingFunction: motionEaseInOutCirc
  8159. },
  8160. [`&${groupPrefixCls}-wrap-leave`]: {
  8161. opacity: 1,
  8162. animationTimingFunction: motionEaseInOutCirc
  8163. }
  8164. }
  8165. }];
  8166. };
  8167. /* harmony default export */ var keyframes = (floatButtonGroupMotion);
  8168. ;// ./components/float-button/style/index.ts
  8169. // ============================== Group ==============================
  8170. const floatButtonGroupStyle = token => {
  8171. const {
  8172. antCls,
  8173. componentCls,
  8174. floatButtonSize,
  8175. margin,
  8176. borderRadiusLG,
  8177. borderRadiusSM,
  8178. badgeOffset,
  8179. floatButtonBodyPadding,
  8180. zIndexPopupBase,
  8181. calc
  8182. } = token;
  8183. const groupPrefixCls = `${componentCls}-group`;
  8184. return {
  8185. [groupPrefixCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  8186. zIndex: zIndexPopupBase,
  8187. display: 'flex',
  8188. flexDirection: 'column',
  8189. alignItems: 'center',
  8190. justifyContent: 'center',
  8191. border: 'none',
  8192. position: 'fixed',
  8193. height: 'auto',
  8194. boxShadow: 'none',
  8195. minWidth: floatButtonSize,
  8196. minHeight: floatButtonSize,
  8197. insetInlineEnd: token.floatButtonInsetInlineEnd,
  8198. bottom: token.floatButtonInsetBlockEnd,
  8199. borderRadius: borderRadiusLG,
  8200. [`${groupPrefixCls}-wrap`]: {
  8201. zIndex: -1,
  8202. display: 'flex',
  8203. justifyContent: 'center',
  8204. alignItems: 'center',
  8205. position: 'absolute'
  8206. },
  8207. [`&${groupPrefixCls}-rtl`]: {
  8208. direction: 'rtl'
  8209. },
  8210. [componentCls]: {
  8211. position: 'static'
  8212. }
  8213. }),
  8214. [`${groupPrefixCls}-top > ${groupPrefixCls}-wrap`]: {
  8215. flexDirection: 'column',
  8216. top: 'auto',
  8217. bottom: calc(floatButtonSize).add(margin).equal(),
  8218. '&::after': {
  8219. content: '""',
  8220. position: 'absolute',
  8221. width: '100%',
  8222. height: margin,
  8223. bottom: calc(margin).mul(-1).equal()
  8224. }
  8225. },
  8226. [`${groupPrefixCls}-bottom > ${groupPrefixCls}-wrap`]: {
  8227. flexDirection: 'column',
  8228. top: calc(floatButtonSize).add(margin).equal(),
  8229. bottom: 'auto',
  8230. '&::after': {
  8231. content: '""',
  8232. position: 'absolute',
  8233. width: '100%',
  8234. height: margin,
  8235. top: calc(margin).mul(-1).equal()
  8236. }
  8237. },
  8238. [`${groupPrefixCls}-right > ${groupPrefixCls}-wrap`]: {
  8239. flexDirection: 'row',
  8240. left: {
  8241. _skip_check_: true,
  8242. value: calc(floatButtonSize).add(margin).equal()
  8243. },
  8244. right: {
  8245. _skip_check_: true,
  8246. value: 'auto'
  8247. },
  8248. '&::after': {
  8249. content: '""',
  8250. position: 'absolute',
  8251. width: margin,
  8252. height: '100%',
  8253. left: {
  8254. _skip_check_: true,
  8255. value: calc(margin).mul(-1).equal()
  8256. }
  8257. }
  8258. },
  8259. [`${groupPrefixCls}-left > ${groupPrefixCls}-wrap`]: {
  8260. flexDirection: 'row',
  8261. left: {
  8262. _skip_check_: true,
  8263. value: 'auto'
  8264. },
  8265. right: {
  8266. _skip_check_: true,
  8267. value: calc(floatButtonSize).add(margin).equal()
  8268. },
  8269. '&::after': {
  8270. content: '""',
  8271. position: 'absolute',
  8272. width: margin,
  8273. height: '100%',
  8274. right: {
  8275. _skip_check_: true,
  8276. value: calc(margin).mul(-1).equal()
  8277. }
  8278. }
  8279. },
  8280. [`${groupPrefixCls}-circle`]: {
  8281. gap: margin,
  8282. [`${groupPrefixCls}-wrap`]: {
  8283. gap: margin
  8284. }
  8285. },
  8286. [`${groupPrefixCls}-square`]: {
  8287. [`${componentCls}-square`]: {
  8288. padding: 0,
  8289. borderRadius: 0,
  8290. [`&${groupPrefixCls}-trigger`]: {
  8291. borderRadius: borderRadiusLG
  8292. },
  8293. '&:first-child': {
  8294. borderStartStartRadius: borderRadiusLG,
  8295. borderStartEndRadius: borderRadiusLG
  8296. },
  8297. '&:last-child': {
  8298. borderEndStartRadius: borderRadiusLG,
  8299. borderEndEndRadius: borderRadiusLG
  8300. },
  8301. '&:not(:last-child)': {
  8302. borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  8303. },
  8304. [`${antCls}-badge`]: {
  8305. [`${antCls}-badge-count`]: {
  8306. top: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal(),
  8307. insetInlineEnd: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal()
  8308. }
  8309. }
  8310. },
  8311. [`${groupPrefixCls}-wrap`]: {
  8312. borderRadius: borderRadiusLG,
  8313. boxShadow: token.boxShadowSecondary,
  8314. [`${componentCls}-square`]: {
  8315. boxShadow: 'none',
  8316. borderRadius: 0,
  8317. padding: floatButtonBodyPadding,
  8318. [`${componentCls}-body`]: {
  8319. width: token.floatButtonBodySize,
  8320. height: token.floatButtonBodySize,
  8321. borderRadius: borderRadiusSM
  8322. }
  8323. }
  8324. }
  8325. },
  8326. [`${groupPrefixCls}-top > ${groupPrefixCls}-wrap, ${groupPrefixCls}-bottom > ${groupPrefixCls}-wrap`]: {
  8327. [`> ${componentCls}-square`]: {
  8328. '&:first-child': {
  8329. borderStartStartRadius: borderRadiusLG,
  8330. borderStartEndRadius: borderRadiusLG
  8331. },
  8332. '&:last-child': {
  8333. borderEndStartRadius: borderRadiusLG,
  8334. borderEndEndRadius: borderRadiusLG
  8335. },
  8336. '&:not(:last-child)': {
  8337. borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  8338. }
  8339. }
  8340. },
  8341. [`${groupPrefixCls}-left > ${groupPrefixCls}-wrap, ${groupPrefixCls}-right > ${groupPrefixCls}-wrap`]: {
  8342. [`> ${componentCls}-square`]: {
  8343. '&:first-child': {
  8344. borderStartStartRadius: borderRadiusLG,
  8345. borderEndStartRadius: borderRadiusLG
  8346. },
  8347. '&:last-child': {
  8348. borderStartEndRadius: borderRadiusLG,
  8349. borderEndEndRadius: borderRadiusLG
  8350. },
  8351. '&:not(:last-child)': {
  8352. borderBottom: 'none',
  8353. borderInlineEnd: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  8354. }
  8355. }
  8356. },
  8357. [`${groupPrefixCls}-circle-shadow`]: {
  8358. boxShadow: 'none'
  8359. },
  8360. [`${groupPrefixCls}-square-shadow`]: {
  8361. boxShadow: token.boxShadowSecondary,
  8362. [`${componentCls}-square`]: {
  8363. boxShadow: 'none',
  8364. padding: floatButtonBodyPadding,
  8365. [`${componentCls}-body`]: {
  8366. width: token.floatButtonBodySize,
  8367. height: token.floatButtonBodySize,
  8368. borderRadius: borderRadiusSM
  8369. }
  8370. }
  8371. }
  8372. };
  8373. };
  8374. // ============================== Shared ==============================
  8375. const sharedFloatButtonStyle = token => {
  8376. const {
  8377. antCls,
  8378. componentCls,
  8379. floatButtonBodyPadding,
  8380. floatButtonIconSize,
  8381. floatButtonSize,
  8382. borderRadiusLG,
  8383. badgeOffset,
  8384. dotOffsetInSquare,
  8385. dotOffsetInCircle,
  8386. zIndexPopupBase,
  8387. calc
  8388. } = token;
  8389. return {
  8390. [componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  8391. border: 'none',
  8392. position: 'fixed',
  8393. cursor: 'pointer',
  8394. zIndex: zIndexPopupBase,
  8395. // Do not remove the 'display: block' here.
  8396. // Deleting it will cause marginBottom to become ineffective.
  8397. // Ref: https://github.com/ant-design/ant-design/issues/44700
  8398. display: 'block',
  8399. width: floatButtonSize,
  8400. height: floatButtonSize,
  8401. insetInlineEnd: token.floatButtonInsetInlineEnd,
  8402. bottom: token.floatButtonInsetBlockEnd,
  8403. boxShadow: token.boxShadowSecondary,
  8404. // Pure Panel
  8405. '&-pure': {
  8406. position: 'relative',
  8407. inset: 'auto'
  8408. },
  8409. '&:empty': {
  8410. display: 'none'
  8411. },
  8412. [`${antCls}-badge`]: {
  8413. width: '100%',
  8414. height: '100%',
  8415. [`${antCls}-badge-count`]: {
  8416. transform: 'translate(0, 0)',
  8417. transformOrigin: 'center',
  8418. top: calc(badgeOffset).mul(-1).equal(),
  8419. insetInlineEnd: calc(badgeOffset).mul(-1).equal()
  8420. }
  8421. },
  8422. [`${componentCls}-body`]: {
  8423. width: '100%',
  8424. height: '100%',
  8425. display: 'flex',
  8426. justifyContent: 'center',
  8427. alignItems: 'center',
  8428. transition: `all ${token.motionDurationMid}`,
  8429. [`${componentCls}-content`]: {
  8430. overflow: 'hidden',
  8431. textAlign: 'center',
  8432. minHeight: floatButtonSize,
  8433. display: 'flex',
  8434. flexDirection: 'column',
  8435. justifyContent: 'center',
  8436. alignItems: 'center',
  8437. padding: `${(0,cssinjs.unit)(calc(floatButtonBodyPadding).div(2).equal())} ${(0,cssinjs.unit)(floatButtonBodyPadding)}`,
  8438. [`${componentCls}-icon`]: {
  8439. textAlign: 'center',
  8440. margin: 'auto',
  8441. width: floatButtonIconSize,
  8442. fontSize: floatButtonIconSize,
  8443. lineHeight: 1
  8444. }
  8445. }
  8446. }
  8447. }),
  8448. [`${componentCls}-rtl`]: {
  8449. direction: 'rtl'
  8450. },
  8451. [`${componentCls}-circle`]: {
  8452. height: floatButtonSize,
  8453. borderRadius: '50%',
  8454. [`${antCls}-badge`]: {
  8455. [`${antCls}-badge-dot`]: {
  8456. top: dotOffsetInCircle,
  8457. insetInlineEnd: dotOffsetInCircle
  8458. }
  8459. },
  8460. [`${componentCls}-body`]: {
  8461. borderRadius: '50%'
  8462. }
  8463. },
  8464. [`${componentCls}-square`]: {
  8465. height: 'auto',
  8466. minHeight: floatButtonSize,
  8467. borderRadius: borderRadiusLG,
  8468. [`${antCls}-badge`]: {
  8469. [`${antCls}-badge-dot`]: {
  8470. top: dotOffsetInSquare,
  8471. insetInlineEnd: dotOffsetInSquare
  8472. }
  8473. },
  8474. [`${componentCls}-body`]: {
  8475. height: 'auto',
  8476. borderRadius: borderRadiusLG
  8477. }
  8478. },
  8479. [`${componentCls}-default`]: {
  8480. backgroundColor: token.floatButtonBackgroundColor,
  8481. transition: `background-color ${token.motionDurationMid}`,
  8482. [`${componentCls}-body`]: {
  8483. backgroundColor: token.floatButtonBackgroundColor,
  8484. transition: `background-color ${token.motionDurationMid}`,
  8485. '&:hover': {
  8486. backgroundColor: token.colorFillContent
  8487. },
  8488. [`${componentCls}-content`]: {
  8489. [`${componentCls}-icon`]: {
  8490. color: token.colorText
  8491. },
  8492. [`${componentCls}-description`]: {
  8493. display: 'flex',
  8494. alignItems: 'center',
  8495. lineHeight: (0,cssinjs.unit)(token.fontSizeLG),
  8496. color: token.colorText,
  8497. fontSize: token.fontSizeSM
  8498. }
  8499. }
  8500. }
  8501. },
  8502. [`${componentCls}-primary`]: {
  8503. backgroundColor: token.colorPrimary,
  8504. [`${componentCls}-body`]: {
  8505. backgroundColor: token.colorPrimary,
  8506. transition: `background-color ${token.motionDurationMid}`,
  8507. '&:hover': {
  8508. backgroundColor: token.colorPrimaryHover
  8509. },
  8510. [`${componentCls}-content`]: {
  8511. [`${componentCls}-icon`]: {
  8512. color: token.colorTextLightSolid
  8513. },
  8514. [`${componentCls}-description`]: {
  8515. display: 'flex',
  8516. alignItems: 'center',
  8517. lineHeight: (0,cssinjs.unit)(token.fontSizeLG),
  8518. color: token.colorTextLightSolid,
  8519. fontSize: token.fontSizeSM
  8520. }
  8521. }
  8522. }
  8523. }
  8524. };
  8525. };
  8526. // ============================== Export ==============================
  8527. const prepareComponentToken = token => ({
  8528. dotOffsetInCircle: util(token.controlHeightLG / 2),
  8529. dotOffsetInSquare: util(token.borderRadiusLG)
  8530. });
  8531. /* harmony default export */ var float_button_style = ((0,genStyleUtils.genStyleHooks)('FloatButton', token => {
  8532. const {
  8533. colorTextLightSolid,
  8534. colorBgElevated,
  8535. controlHeightLG,
  8536. marginXXL,
  8537. marginLG,
  8538. fontSize,
  8539. fontSizeIcon,
  8540. controlItemBgHover,
  8541. paddingXXS,
  8542. calc
  8543. } = token;
  8544. const floatButtonToken = (0,es.mergeToken)(token, {
  8545. floatButtonBackgroundColor: colorBgElevated,
  8546. floatButtonColor: colorTextLightSolid,
  8547. floatButtonHoverBackgroundColor: controlItemBgHover,
  8548. floatButtonFontSize: fontSize,
  8549. floatButtonIconSize: calc(fontSizeIcon).mul(1.5).equal(),
  8550. floatButtonSize: controlHeightLG,
  8551. floatButtonInsetBlockEnd: marginXXL,
  8552. floatButtonInsetInlineEnd: marginLG,
  8553. floatButtonBodySize: calc(controlHeightLG).sub(calc(paddingXXS).mul(2)).equal(),
  8554. // 这里的 paddingXXS 是简写,完整逻辑是 (controlHeightLG - (controlHeightLG - paddingXXS * 2)) / 2,
  8555. floatButtonBodyPadding: paddingXXS,
  8556. badgeOffset: calc(paddingXXS).mul(1.5).equal()
  8557. });
  8558. return [floatButtonGroupStyle(floatButtonToken), sharedFloatButtonStyle(floatButtonToken), (0,fade.initFadeMotion)(token), keyframes(floatButtonToken)];
  8559. }, prepareComponentToken));
  8560. /***/ }),
  8561. /***/ "./components/form/style/index.ts":
  8562. /*!****************************************************!*\
  8563. !*** ./components/form/style/index.ts + 1 modules ***!
  8564. \****************************************************/
  8565. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  8566. "use strict";
  8567. // ESM COMPAT FLAG
  8568. __webpack_require__.r(__webpack_exports__);
  8569. // EXPORTS
  8570. __webpack_require__.d(__webpack_exports__, {
  8571. "default": function() { return /* binding */ form_style; },
  8572. prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  8573. prepareToken: function() { return /* binding */ prepareToken; }
  8574. });
  8575. // EXTERNAL MODULE: ./alias/cssinjs.js
  8576. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  8577. // EXTERNAL MODULE: ./components/style/index.tsx
  8578. var style = __webpack_require__("./components/style/index.tsx");
  8579. // EXTERNAL MODULE: ./components/style/motion/zoom.ts
  8580. var zoom = __webpack_require__("./components/style/motion/zoom.ts");
  8581. // EXTERNAL MODULE: ./components/style/motion/collapse.ts
  8582. var collapse = __webpack_require__("./components/style/motion/collapse.ts");
  8583. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  8584. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  8585. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  8586. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  8587. ;// ./components/form/style/explain.ts
  8588. const genFormValidateMotionStyle = token => {
  8589. const {
  8590. componentCls
  8591. } = token;
  8592. const helpCls = `${componentCls}-show-help`;
  8593. const helpItemCls = `${componentCls}-show-help-item`;
  8594. return {
  8595. [helpCls]: {
  8596. // Explain holder
  8597. transition: `opacity ${token.motionDurationFast} ${token.motionEaseInOut}`,
  8598. '&-appear, &-enter': {
  8599. opacity: 0,
  8600. '&-active': {
  8601. opacity: 1
  8602. }
  8603. },
  8604. '&-leave': {
  8605. opacity: 1,
  8606. '&-active': {
  8607. opacity: 0
  8608. }
  8609. },
  8610. // Explain
  8611. [helpItemCls]: {
  8612. overflow: 'hidden',
  8613. transition: `height ${token.motionDurationFast} ${token.motionEaseInOut},
  8614. opacity ${token.motionDurationFast} ${token.motionEaseInOut},
  8615. transform ${token.motionDurationFast} ${token.motionEaseInOut} !important`,
  8616. [`&${helpItemCls}-appear, &${helpItemCls}-enter`]: {
  8617. transform: `translateY(-5px)`,
  8618. opacity: 0,
  8619. '&-active': {
  8620. transform: 'translateY(0)',
  8621. opacity: 1
  8622. }
  8623. },
  8624. [`&${helpItemCls}-leave-active`]: {
  8625. transform: `translateY(-5px)`
  8626. }
  8627. }
  8628. }
  8629. };
  8630. };
  8631. /* harmony default export */ var explain = (genFormValidateMotionStyle);
  8632. ;// ./components/form/style/index.ts
  8633. const resetForm = token => ({
  8634. legend: {
  8635. display: 'block',
  8636. width: '100%',
  8637. marginBottom: token.marginLG,
  8638. padding: 0,
  8639. color: token.colorTextDescription,
  8640. fontSize: token.fontSizeLG,
  8641. lineHeight: 'inherit',
  8642. border: 0,
  8643. borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
  8644. },
  8645. 'input[type="search"]': {
  8646. boxSizing: 'border-box'
  8647. },
  8648. // Position radios and checkboxes better
  8649. 'input[type="radio"], input[type="checkbox"]': {
  8650. lineHeight: 'normal'
  8651. },
  8652. 'input[type="file"]': {
  8653. display: 'block'
  8654. },
  8655. // Make range inputs behave like textual form controls
  8656. 'input[type="range"]': {
  8657. display: 'block',
  8658. width: '100%'
  8659. },
  8660. // Make multiple select elements height not fixed
  8661. 'select[multiple], select[size]': {
  8662. height: 'auto'
  8663. },
  8664. // Focus for file, radio, and checkbox
  8665. [`input[type='file']:focus,
  8666. input[type='radio']:focus,
  8667. input[type='checkbox']:focus`]: {
  8668. outline: 0,
  8669. boxShadow: `0 0 0 ${(0,cssinjs.unit)(token.controlOutlineWidth)} ${token.controlOutline}`
  8670. },
  8671. // Adjust output element
  8672. output: {
  8673. display: 'block',
  8674. paddingTop: 15,
  8675. color: token.colorText,
  8676. fontSize: token.fontSize,
  8677. lineHeight: token.lineHeight
  8678. }
  8679. });
  8680. const genFormSize = (token, height) => {
  8681. const {
  8682. formItemCls
  8683. } = token;
  8684. return {
  8685. [formItemCls]: {
  8686. [`${formItemCls}-label > label`]: {
  8687. height
  8688. },
  8689. [`${formItemCls}-control-input`]: {
  8690. minHeight: height
  8691. }
  8692. }
  8693. };
  8694. };
  8695. const genFormStyle = token => {
  8696. const {
  8697. componentCls
  8698. } = token;
  8699. return {
  8700. [token.componentCls]: Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), resetForm(token)), {
  8701. [`${componentCls}-text`]: {
  8702. display: 'inline-block',
  8703. paddingInlineEnd: token.paddingSM
  8704. },
  8705. // ================================================================
  8706. // = Size =
  8707. // ================================================================
  8708. '&-small': Object.assign({}, genFormSize(token, token.controlHeightSM)),
  8709. '&-large': Object.assign({}, genFormSize(token, token.controlHeightLG))
  8710. })
  8711. };
  8712. };
  8713. const genFormItemStyle = token => {
  8714. const {
  8715. formItemCls,
  8716. iconCls,
  8717. rootPrefixCls,
  8718. antCls,
  8719. labelRequiredMarkColor,
  8720. labelColor,
  8721. labelFontSize,
  8722. labelHeight,
  8723. labelColonMarginInlineStart,
  8724. labelColonMarginInlineEnd,
  8725. itemMarginBottom
  8726. } = token;
  8727. return {
  8728. [formItemCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  8729. marginBottom: itemMarginBottom,
  8730. verticalAlign: 'top',
  8731. '&-with-help': {
  8732. transition: 'none'
  8733. },
  8734. [`&-hidden,
  8735. &-hidden${antCls}-row`]: {
  8736. // https://github.com/ant-design/ant-design/issues/26141
  8737. display: 'none'
  8738. },
  8739. '&-has-warning': {
  8740. [`${formItemCls}-split`]: {
  8741. color: token.colorError
  8742. }
  8743. },
  8744. '&-has-error': {
  8745. [`${formItemCls}-split`]: {
  8746. color: token.colorWarning
  8747. }
  8748. },
  8749. // ==============================================================
  8750. // = Label =
  8751. // ==============================================================
  8752. [`${formItemCls}-label`]: {
  8753. flexGrow: 0,
  8754. overflow: 'hidden',
  8755. whiteSpace: 'nowrap',
  8756. textAlign: 'end',
  8757. verticalAlign: 'middle',
  8758. '&-left': {
  8759. textAlign: 'start'
  8760. },
  8761. '&-wrap': {
  8762. overflow: 'unset',
  8763. lineHeight: token.lineHeight,
  8764. whiteSpace: 'unset',
  8765. '> label': {
  8766. verticalAlign: 'middle',
  8767. textWrap: 'balance'
  8768. }
  8769. },
  8770. '> label': {
  8771. position: 'relative',
  8772. display: 'inline-flex',
  8773. alignItems: 'center',
  8774. maxWidth: '100%',
  8775. height: labelHeight,
  8776. color: labelColor,
  8777. fontSize: labelFontSize,
  8778. [`> ${iconCls}`]: {
  8779. fontSize: token.fontSize,
  8780. verticalAlign: 'top'
  8781. },
  8782. [`&${formItemCls}-required`]: {
  8783. '&::before': {
  8784. display: 'inline-block',
  8785. marginInlineEnd: token.marginXXS,
  8786. color: labelRequiredMarkColor,
  8787. fontSize: token.fontSize,
  8788. fontFamily: 'SimSun, sans-serif',
  8789. lineHeight: 1,
  8790. content: '"*"'
  8791. },
  8792. [`&${formItemCls}-required-mark-hidden, &${formItemCls}-required-mark-optional`]: {
  8793. '&::before': {
  8794. display: 'none'
  8795. }
  8796. }
  8797. },
  8798. // Optional mark
  8799. [`${formItemCls}-optional`]: {
  8800. display: 'inline-block',
  8801. marginInlineStart: token.marginXXS,
  8802. color: token.colorTextDescription,
  8803. [`&${formItemCls}-required-mark-hidden`]: {
  8804. display: 'none'
  8805. }
  8806. },
  8807. // Optional mark
  8808. [`${formItemCls}-tooltip`]: {
  8809. color: token.colorTextDescription,
  8810. cursor: 'help',
  8811. writingMode: 'horizontal-tb',
  8812. marginInlineStart: token.marginXXS
  8813. },
  8814. '&::after': {
  8815. content: '":"',
  8816. position: 'relative',
  8817. marginBlock: 0,
  8818. marginInlineStart: labelColonMarginInlineStart,
  8819. marginInlineEnd: labelColonMarginInlineEnd
  8820. },
  8821. [`&${formItemCls}-no-colon::after`]: {
  8822. content: '"\\a0"'
  8823. }
  8824. }
  8825. },
  8826. // ==============================================================
  8827. // = Input =
  8828. // ==============================================================
  8829. [`${formItemCls}-control`]: {
  8830. ['--ant-display']: 'flex',
  8831. flexDirection: 'column',
  8832. flexGrow: 1,
  8833. [`&:first-child:not([class^="'${rootPrefixCls}-col-'"]):not([class*="' ${rootPrefixCls}-col-'"])`]: {
  8834. width: '100%'
  8835. },
  8836. '&-input': {
  8837. position: 'relative',
  8838. display: 'flex',
  8839. alignItems: 'center',
  8840. minHeight: token.controlHeight,
  8841. '&-content': {
  8842. flex: 'auto',
  8843. maxWidth: '100%',
  8844. // Fix https://github.com/ant-design/ant-design/issues/54042
  8845. // Remove impact of whitespaces
  8846. [`&:has(> ${antCls}-switch:only-child, > ${antCls}-rate:only-child)`]: {
  8847. display: 'flex',
  8848. alignItems: 'center'
  8849. }
  8850. }
  8851. }
  8852. },
  8853. // ==============================================================
  8854. // = Explain =
  8855. // ==============================================================
  8856. [formItemCls]: {
  8857. '&-additional': {
  8858. display: 'flex',
  8859. flexDirection: 'column'
  8860. },
  8861. '&-explain, &-extra': {
  8862. clear: 'both',
  8863. color: token.colorTextDescription,
  8864. fontSize: token.fontSize,
  8865. lineHeight: token.lineHeight
  8866. },
  8867. '&-explain-connected': {
  8868. width: '100%'
  8869. },
  8870. '&-extra': {
  8871. minHeight: token.controlHeightSM,
  8872. transition: `color ${token.motionDurationMid} ${token.motionEaseOut}` // sync input color transition
  8873. },
  8874. '&-explain': {
  8875. '&-error': {
  8876. color: token.colorError
  8877. },
  8878. '&-warning': {
  8879. color: token.colorWarning
  8880. }
  8881. }
  8882. },
  8883. [`&-with-help ${formItemCls}-explain`]: {
  8884. height: 'auto',
  8885. opacity: 1
  8886. },
  8887. // ==============================================================
  8888. // = Feedback Icon =
  8889. // ==============================================================
  8890. [`${formItemCls}-feedback-icon`]: {
  8891. fontSize: token.fontSize,
  8892. textAlign: 'center',
  8893. visibility: 'visible',
  8894. animationName: zoom.zoomIn,
  8895. animationDuration: token.motionDurationMid,
  8896. animationTimingFunction: token.motionEaseOutBack,
  8897. pointerEvents: 'none',
  8898. '&-success': {
  8899. color: token.colorSuccess
  8900. },
  8901. '&-error': {
  8902. color: token.colorError
  8903. },
  8904. '&-warning': {
  8905. color: token.colorWarning
  8906. },
  8907. '&-validating': {
  8908. color: token.colorPrimary
  8909. }
  8910. }
  8911. })
  8912. };
  8913. };
  8914. const makeVerticalLayoutLabel = token => ({
  8915. padding: token.verticalLabelPadding,
  8916. margin: token.verticalLabelMargin,
  8917. whiteSpace: 'initial',
  8918. textAlign: 'start',
  8919. '> label': {
  8920. margin: 0,
  8921. '&::after': {
  8922. // https://github.com/ant-design/ant-design/issues/43538
  8923. visibility: 'hidden'
  8924. }
  8925. }
  8926. });
  8927. const genHorizontalStyle = token => {
  8928. const {
  8929. antCls,
  8930. formItemCls
  8931. } = token;
  8932. return {
  8933. [`${formItemCls}-horizontal`]: {
  8934. [`${formItemCls}-label`]: {
  8935. flexGrow: 0
  8936. },
  8937. [`${formItemCls}-control`]: {
  8938. flex: '1 1 0',
  8939. // https://github.com/ant-design/ant-design/issues/32777
  8940. // https://github.com/ant-design/ant-design/issues/33773
  8941. minWidth: 0
  8942. },
  8943. // Do not change this to `ant-col-24`! `-24` match all the responsive rules
  8944. // https://github.com/ant-design/ant-design/issues/32980
  8945. // https://github.com/ant-design/ant-design/issues/34903
  8946. // https://github.com/ant-design/ant-design/issues/44538
  8947. [`${formItemCls}-label[class$='-24'], ${formItemCls}-label[class*='-24 ']`]: {
  8948. [`& + ${formItemCls}-control`]: {
  8949. minWidth: 'unset'
  8950. }
  8951. },
  8952. [`${antCls}-col-24${formItemCls}-label,
  8953. ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
  8954. }
  8955. };
  8956. };
  8957. const genInlineStyle = token => {
  8958. const {
  8959. componentCls,
  8960. formItemCls,
  8961. inlineItemMarginBottom
  8962. } = token;
  8963. return {
  8964. [`${componentCls}-inline`]: {
  8965. display: 'flex',
  8966. flexWrap: 'wrap',
  8967. [`${formItemCls}-inline`]: {
  8968. flex: 'none',
  8969. marginInlineEnd: token.margin,
  8970. marginBottom: inlineItemMarginBottom,
  8971. '&-row': {
  8972. flexWrap: 'nowrap'
  8973. },
  8974. [`> ${formItemCls}-label,
  8975. > ${formItemCls}-control`]: {
  8976. display: 'inline-block',
  8977. verticalAlign: 'top'
  8978. },
  8979. [`> ${formItemCls}-label`]: {
  8980. flex: 'none'
  8981. },
  8982. [`${componentCls}-text`]: {
  8983. display: 'inline-block'
  8984. },
  8985. [`${formItemCls}-has-feedback`]: {
  8986. display: 'inline-block'
  8987. }
  8988. }
  8989. }
  8990. };
  8991. };
  8992. const makeVerticalLayout = token => {
  8993. const {
  8994. componentCls,
  8995. formItemCls,
  8996. rootPrefixCls
  8997. } = token;
  8998. return {
  8999. [`${formItemCls} ${formItemCls}-label`]: makeVerticalLayoutLabel(token),
  9000. // ref: https://github.com/ant-design/ant-design/issues/45122
  9001. [`${componentCls}:not(${componentCls}-inline)`]: {
  9002. [formItemCls]: {
  9003. flexWrap: 'wrap',
  9004. [`${formItemCls}-label, ${formItemCls}-control`]: {
  9005. // When developer pass `xs: { span }`,
  9006. // It should follow the `xs` screen config
  9007. // ref: https://github.com/ant-design/ant-design/issues/44386
  9008. [`&:not([class*=" ${rootPrefixCls}-col-xs"])`]: {
  9009. flex: '0 0 100%',
  9010. maxWidth: '100%'
  9011. }
  9012. }
  9013. }
  9014. }
  9015. };
  9016. };
  9017. const genVerticalStyle = token => {
  9018. const {
  9019. componentCls,
  9020. formItemCls,
  9021. antCls
  9022. } = token;
  9023. return {
  9024. [`${formItemCls}-vertical`]: {
  9025. [`${formItemCls}-row`]: {
  9026. flexDirection: 'column'
  9027. },
  9028. [`${formItemCls}-label > label`]: {
  9029. height: 'auto'
  9030. },
  9031. [`${formItemCls}-control`]: {
  9032. width: '100%'
  9033. },
  9034. [`${formItemCls}-label,
  9035. ${antCls}-col-24${formItemCls}-label,
  9036. ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
  9037. },
  9038. [`@media (max-width: ${(0,cssinjs.unit)(token.screenXSMax)})`]: [makeVerticalLayout(token), {
  9039. [componentCls]: {
  9040. [`${formItemCls}:not(${formItemCls}-horizontal)`]: {
  9041. [`${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
  9042. }
  9043. }
  9044. }],
  9045. [`@media (max-width: ${(0,cssinjs.unit)(token.screenSMMax)})`]: {
  9046. [componentCls]: {
  9047. [`${formItemCls}:not(${formItemCls}-horizontal)`]: {
  9048. [`${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
  9049. }
  9050. }
  9051. },
  9052. [`@media (max-width: ${(0,cssinjs.unit)(token.screenMDMax)})`]: {
  9053. [componentCls]: {
  9054. [`${formItemCls}:not(${formItemCls}-horizontal)`]: {
  9055. [`${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
  9056. }
  9057. }
  9058. },
  9059. [`@media (max-width: ${(0,cssinjs.unit)(token.screenLGMax)})`]: {
  9060. [componentCls]: {
  9061. [`${formItemCls}:not(${formItemCls}-horizontal)`]: {
  9062. [`${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
  9063. }
  9064. }
  9065. }
  9066. };
  9067. };
  9068. // ============================== Export ==============================
  9069. const prepareComponentToken = token => ({
  9070. labelRequiredMarkColor: token.colorError,
  9071. labelColor: token.colorTextHeading,
  9072. labelFontSize: token.fontSize,
  9073. labelHeight: token.controlHeight,
  9074. labelColonMarginInlineStart: token.marginXXS / 2,
  9075. labelColonMarginInlineEnd: token.marginXS,
  9076. itemMarginBottom: token.marginLG,
  9077. verticalLabelPadding: `0 0 ${token.paddingXS}px`,
  9078. verticalLabelMargin: 0,
  9079. inlineItemMarginBottom: 0
  9080. });
  9081. const prepareToken = (token, rootPrefixCls) => {
  9082. const formToken = (0,es.mergeToken)(token, {
  9083. formItemCls: `${token.componentCls}-item`,
  9084. rootPrefixCls
  9085. });
  9086. return formToken;
  9087. };
  9088. /* harmony default export */ var form_style = ((0,genStyleUtils.genStyleHooks)('Form', (token, {
  9089. rootPrefixCls
  9090. }) => {
  9091. const formToken = prepareToken(token, rootPrefixCls);
  9092. return [genFormStyle(formToken), genFormItemStyle(formToken), explain(formToken), genHorizontalStyle(formToken), genInlineStyle(formToken), genVerticalStyle(formToken), (0,collapse["default"])(formToken), zoom.zoomIn];
  9093. }, prepareComponentToken, {
  9094. // Let From style before the Grid
  9095. // ref https://github.com/ant-design/ant-design/issues/44386
  9096. order: -1000
  9097. }));
  9098. /***/ }),
  9099. /***/ "./components/grid/style/index.ts":
  9100. /*!****************************************!*\
  9101. !*** ./components/grid/style/index.ts ***!
  9102. \****************************************/
  9103. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  9104. "use strict";
  9105. __webpack_require__.r(__webpack_exports__);
  9106. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9107. /* harmony export */ getMediaSize: function() { return /* binding */ getMediaSize; },
  9108. /* harmony export */ prepareColComponentToken: function() { return /* binding */ prepareColComponentToken; },
  9109. /* harmony export */ prepareRowComponentToken: function() { return /* binding */ prepareRowComponentToken; },
  9110. /* harmony export */ useColStyle: function() { return /* binding */ useColStyle; },
  9111. /* harmony export */ useRowStyle: function() { return /* binding */ useRowStyle; }
  9112. /* harmony export */ });
  9113. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  9114. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  9115. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  9116. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  9117. // ============================== Row-Shared ==============================
  9118. const genGridRowStyle = token => {
  9119. const {
  9120. componentCls
  9121. } = token;
  9122. return {
  9123. // Grid system
  9124. [componentCls]: {
  9125. display: 'flex',
  9126. flexFlow: 'row wrap',
  9127. minWidth: 0,
  9128. '&::before, &::after': {
  9129. display: 'flex'
  9130. },
  9131. '&-no-wrap': {
  9132. flexWrap: 'nowrap'
  9133. },
  9134. // The origin of the X-axis
  9135. '&-start': {
  9136. justifyContent: 'flex-start'
  9137. },
  9138. // The center of the X-axis
  9139. '&-center': {
  9140. justifyContent: 'center'
  9141. },
  9142. // The opposite of the X-axis
  9143. '&-end': {
  9144. justifyContent: 'flex-end'
  9145. },
  9146. '&-space-between': {
  9147. justifyContent: 'space-between'
  9148. },
  9149. '&-space-around': {
  9150. justifyContent: 'space-around'
  9151. },
  9152. '&-space-evenly': {
  9153. justifyContent: 'space-evenly'
  9154. },
  9155. // Align at the top
  9156. '&-top': {
  9157. alignItems: 'flex-start'
  9158. },
  9159. // Align at the center
  9160. '&-middle': {
  9161. alignItems: 'center'
  9162. },
  9163. '&-bottom': {
  9164. alignItems: 'flex-end'
  9165. }
  9166. }
  9167. };
  9168. };
  9169. // ============================== Col-Shared ==============================
  9170. const genGridColStyle = token => {
  9171. const {
  9172. componentCls
  9173. } = token;
  9174. return {
  9175. // Grid system
  9176. [componentCls]: {
  9177. position: 'relative',
  9178. maxWidth: '100%',
  9179. // Prevent columns from collapsing when empty
  9180. minHeight: 1
  9181. }
  9182. };
  9183. };
  9184. const genLoopGridColumnsStyle = (token, sizeCls) => {
  9185. const {
  9186. prefixCls,
  9187. componentCls,
  9188. gridColumns
  9189. } = token;
  9190. const gridColumnsStyle = {};
  9191. for (let i = gridColumns; i >= 0; i--) {
  9192. if (i === 0) {
  9193. gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = {
  9194. display: 'none'
  9195. };
  9196. gridColumnsStyle[`${componentCls}-push-${i}`] = {
  9197. insetInlineStart: 'auto'
  9198. };
  9199. gridColumnsStyle[`${componentCls}-pull-${i}`] = {
  9200. insetInlineEnd: 'auto'
  9201. };
  9202. gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {
  9203. insetInlineStart: 'auto'
  9204. };
  9205. gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {
  9206. insetInlineEnd: 'auto'
  9207. };
  9208. gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {
  9209. marginInlineStart: 0
  9210. };
  9211. gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {
  9212. order: 0
  9213. };
  9214. } else {
  9215. gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = [
  9216. // https://github.com/ant-design/ant-design/issues/44456
  9217. // Form set `display: flex` on Col which will override `display: block`.
  9218. // Let's get it from css variable to support override.
  9219. {
  9220. ['--ant-display']: 'block',
  9221. // Fallback to display if variable not support
  9222. display: 'block'
  9223. }, {
  9224. display: 'var(--ant-display)',
  9225. flex: `0 0 ${i / gridColumns * 100}%`,
  9226. maxWidth: `${i / gridColumns * 100}%`
  9227. }];
  9228. gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {
  9229. insetInlineStart: `${i / gridColumns * 100}%`
  9230. };
  9231. gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {
  9232. insetInlineEnd: `${i / gridColumns * 100}%`
  9233. };
  9234. gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {
  9235. marginInlineStart: `${i / gridColumns * 100}%`
  9236. };
  9237. gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {
  9238. order: i
  9239. };
  9240. }
  9241. }
  9242. // Flex CSS Var
  9243. gridColumnsStyle[`${componentCls}${sizeCls}-flex`] = {
  9244. flex: `var(--${prefixCls}${sizeCls}-flex)`
  9245. };
  9246. return gridColumnsStyle;
  9247. };
  9248. const genGridStyle = (token, sizeCls) => genLoopGridColumnsStyle(token, sizeCls);
  9249. const genGridMediaStyle = (token, screenSize, sizeCls) => ({
  9250. [`@media (min-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(screenSize)})`]: Object.assign({}, genGridStyle(token, sizeCls))
  9251. });
  9252. const prepareRowComponentToken = () => ({});
  9253. const prepareColComponentToken = () => ({});
  9254. // ============================== Export ==============================
  9255. const useRowStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Grid', genGridRowStyle, prepareRowComponentToken);
  9256. const getMediaSize = token => {
  9257. const mediaSizesMap = {
  9258. xs: token.screenXSMin,
  9259. sm: token.screenSMMin,
  9260. md: token.screenMDMin,
  9261. lg: token.screenLGMin,
  9262. xl: token.screenXLMin,
  9263. xxl: token.screenXXLMin
  9264. };
  9265. return mediaSizesMap;
  9266. };
  9267. const useColStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Grid', token => {
  9268. const gridToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.mergeToken)(token, {
  9269. gridColumns: 24 // Row is divided into 24 parts in Grid
  9270. });
  9271. const gridMediaSizesMap = getMediaSize(gridToken);
  9272. delete gridMediaSizesMap.xs;
  9273. return [genGridColStyle(gridToken), genGridStyle(gridToken, ''), genGridStyle(gridToken, '-xs'), Object.keys(gridMediaSizesMap).map(key => genGridMediaStyle(gridToken, gridMediaSizesMap[key], `-${key}`)).reduce((pre, cur) => Object.assign(Object.assign({}, pre), cur), {})];
  9274. }, prepareColComponentToken);
  9275. /***/ }),
  9276. /***/ "./components/image/style/index.ts":
  9277. /*!*****************************************!*\
  9278. !*** ./components/image/style/index.ts ***!
  9279. \*****************************************/
  9280. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  9281. "use strict";
  9282. __webpack_require__.r(__webpack_exports__);
  9283. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9284. /* harmony export */ genBoxStyle: function() { return /* binding */ genBoxStyle; },
  9285. /* harmony export */ genImageMaskStyle: function() { return /* binding */ genImageMaskStyle; },
  9286. /* harmony export */ genImagePreviewStyle: function() { return /* binding */ genImagePreviewStyle; },
  9287. /* harmony export */ genPreviewOperationsStyle: function() { return /* binding */ genPreviewOperationsStyle; },
  9288. /* harmony export */ genPreviewSwitchStyle: function() { return /* binding */ genPreviewSwitchStyle; },
  9289. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  9290. /* harmony export */ });
  9291. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  9292. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  9293. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  9294. /* harmony import */ var _modal_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../modal/style */ "./components/modal/style/index.ts");
  9295. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  9296. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/fade.ts");
  9297. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
  9298. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  9299. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  9300. const genBoxStyle = position => ({
  9301. position: position || 'absolute',
  9302. inset: 0
  9303. });
  9304. const genImageMaskStyle = token => {
  9305. const {
  9306. iconCls,
  9307. motionDurationSlow,
  9308. paddingXXS,
  9309. marginXXS,
  9310. prefixCls,
  9311. colorTextLightSolid
  9312. } = token;
  9313. return {
  9314. position: 'absolute',
  9315. inset: 0,
  9316. display: 'flex',
  9317. alignItems: 'center',
  9318. justifyContent: 'center',
  9319. color: colorTextLightSolid,
  9320. background: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor('#000').setA(0.5).toRgbString(),
  9321. cursor: 'pointer',
  9322. opacity: 0,
  9323. transition: `opacity ${motionDurationSlow}`,
  9324. [`.${prefixCls}-mask-info`]: Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_3__.textEllipsis), {
  9325. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXXS)}`,
  9326. [iconCls]: {
  9327. marginInlineEnd: marginXXS,
  9328. svg: {
  9329. verticalAlign: 'baseline'
  9330. }
  9331. }
  9332. })
  9333. };
  9334. };
  9335. const genPreviewOperationsStyle = token => {
  9336. const {
  9337. previewCls,
  9338. modalMaskBg,
  9339. paddingSM,
  9340. marginXL,
  9341. margin,
  9342. paddingLG,
  9343. previewOperationColorDisabled,
  9344. previewOperationHoverColor,
  9345. motionDurationSlow,
  9346. iconCls,
  9347. colorTextLightSolid
  9348. } = token;
  9349. const operationBg = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(modalMaskBg).setA(0.1);
  9350. const operationBgHover = operationBg.clone().setA(0.2);
  9351. return {
  9352. [`${previewCls}-footer`]: {
  9353. position: 'fixed',
  9354. bottom: marginXL,
  9355. left: {
  9356. _skip_check_: true,
  9357. value: '50%'
  9358. },
  9359. display: 'flex',
  9360. flexDirection: 'column',
  9361. alignItems: 'center',
  9362. color: token.previewOperationColor,
  9363. transform: 'translateX(-50%)'
  9364. },
  9365. [`${previewCls}-progress`]: {
  9366. marginBottom: margin
  9367. },
  9368. [`${previewCls}-close`]: {
  9369. position: 'fixed',
  9370. top: marginXL,
  9371. right: {
  9372. _skip_check_: true,
  9373. value: marginXL
  9374. },
  9375. display: 'flex',
  9376. color: colorTextLightSolid,
  9377. backgroundColor: operationBg.toRgbString(),
  9378. borderRadius: '50%',
  9379. padding: paddingSM,
  9380. outline: 0,
  9381. border: 0,
  9382. cursor: 'pointer',
  9383. transition: `all ${motionDurationSlow}`,
  9384. '&:hover': {
  9385. backgroundColor: operationBgHover.toRgbString()
  9386. },
  9387. [`& > ${iconCls}`]: {
  9388. fontSize: token.previewOperationSize
  9389. }
  9390. },
  9391. [`${previewCls}-operations`]: {
  9392. display: 'flex',
  9393. alignItems: 'center',
  9394. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingLG)}`,
  9395. backgroundColor: operationBg.toRgbString(),
  9396. borderRadius: 100,
  9397. '&-operation': {
  9398. marginInlineStart: paddingSM,
  9399. padding: paddingSM,
  9400. cursor: 'pointer',
  9401. transition: `all ${motionDurationSlow}`,
  9402. userSelect: 'none',
  9403. [`&:not(${previewCls}-operations-operation-disabled):hover > ${iconCls}`]: {
  9404. color: previewOperationHoverColor
  9405. },
  9406. '&-disabled': {
  9407. color: previewOperationColorDisabled,
  9408. cursor: 'not-allowed'
  9409. },
  9410. '&:first-of-type': {
  9411. marginInlineStart: 0
  9412. },
  9413. [`& > ${iconCls}`]: {
  9414. fontSize: token.previewOperationSize
  9415. }
  9416. }
  9417. }
  9418. };
  9419. };
  9420. const genPreviewSwitchStyle = token => {
  9421. const {
  9422. modalMaskBg,
  9423. iconCls,
  9424. previewOperationColorDisabled,
  9425. previewCls,
  9426. zIndexPopup,
  9427. motionDurationSlow
  9428. } = token;
  9429. const operationBg = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(modalMaskBg).setA(0.1);
  9430. const operationBgHover = operationBg.clone().setA(0.2);
  9431. return {
  9432. [`${previewCls}-switch-left, ${previewCls}-switch-right`]: {
  9433. position: 'fixed',
  9434. insetBlockStart: '50%',
  9435. zIndex: token.calc(zIndexPopup).add(1).equal(),
  9436. display: 'flex',
  9437. alignItems: 'center',
  9438. justifyContent: 'center',
  9439. width: token.imagePreviewSwitchSize,
  9440. height: token.imagePreviewSwitchSize,
  9441. marginTop: token.calc(token.imagePreviewSwitchSize).mul(-1).div(2).equal(),
  9442. color: token.previewOperationColor,
  9443. background: operationBg.toRgbString(),
  9444. borderRadius: '50%',
  9445. transform: `translateY(-50%)`,
  9446. cursor: 'pointer',
  9447. transition: `all ${motionDurationSlow}`,
  9448. userSelect: 'none',
  9449. '&:hover': {
  9450. background: operationBgHover.toRgbString()
  9451. },
  9452. '&-disabled': {
  9453. '&, &:hover': {
  9454. color: previewOperationColorDisabled,
  9455. background: 'transparent',
  9456. cursor: 'not-allowed',
  9457. [`> ${iconCls}`]: {
  9458. cursor: 'not-allowed'
  9459. }
  9460. }
  9461. },
  9462. [`> ${iconCls}`]: {
  9463. fontSize: token.previewOperationSize
  9464. }
  9465. },
  9466. [`${previewCls}-switch-left`]: {
  9467. insetInlineStart: token.marginSM
  9468. },
  9469. [`${previewCls}-switch-right`]: {
  9470. insetInlineEnd: token.marginSM
  9471. }
  9472. };
  9473. };
  9474. const genImagePreviewStyle = token => {
  9475. const {
  9476. motionEaseOut,
  9477. previewCls,
  9478. motionDurationSlow,
  9479. componentCls
  9480. } = token;
  9481. return [{
  9482. [`${componentCls}-preview-root`]: {
  9483. [previewCls]: {
  9484. height: '100%',
  9485. textAlign: 'center',
  9486. pointerEvents: 'none'
  9487. },
  9488. [`${previewCls}-body`]: Object.assign(Object.assign({}, genBoxStyle()), {
  9489. overflow: 'hidden'
  9490. }),
  9491. [`${previewCls}-img`]: {
  9492. maxWidth: '100%',
  9493. maxHeight: '70%',
  9494. verticalAlign: 'middle',
  9495. transform: 'scale3d(1, 1, 1)',
  9496. cursor: 'grab',
  9497. transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,
  9498. userSelect: 'none',
  9499. '&-wrapper': Object.assign(Object.assign({}, genBoxStyle()), {
  9500. transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,
  9501. // https://github.com/ant-design/ant-design/issues/39913
  9502. // TailwindCSS will reset img default style.
  9503. // Let's set back.
  9504. display: 'flex',
  9505. justifyContent: 'center',
  9506. alignItems: 'center',
  9507. '& > *': {
  9508. pointerEvents: 'auto'
  9509. },
  9510. '&::before': {
  9511. display: 'inline-block',
  9512. width: 1,
  9513. height: '50%',
  9514. marginInlineEnd: -1,
  9515. content: '""'
  9516. }
  9517. })
  9518. },
  9519. [`${previewCls}-moving`]: {
  9520. [`${previewCls}-preview-img`]: {
  9521. cursor: 'grabbing',
  9522. '&-wrapper': {
  9523. transitionDuration: '0s'
  9524. }
  9525. }
  9526. }
  9527. }
  9528. },
  9529. // Override
  9530. {
  9531. [`${componentCls}-preview-root`]: {
  9532. [`${previewCls}-wrap`]: {
  9533. zIndex: token.zIndexPopup
  9534. }
  9535. }
  9536. },
  9537. // Preview operations & switch
  9538. {
  9539. [`${componentCls}-preview-operations-wrapper`]: {
  9540. position: 'fixed',
  9541. zIndex: token.calc(token.zIndexPopup).add(1).equal()
  9542. },
  9543. '&': [genPreviewOperationsStyle(token), genPreviewSwitchStyle(token)]
  9544. }];
  9545. };
  9546. const genImageStyle = token => {
  9547. const {
  9548. componentCls
  9549. } = token;
  9550. return {
  9551. // ============================== image ==============================
  9552. [componentCls]: {
  9553. position: 'relative',
  9554. display: 'inline-block',
  9555. [`${componentCls}-img`]: {
  9556. width: '100%',
  9557. height: 'auto',
  9558. verticalAlign: 'middle'
  9559. },
  9560. [`${componentCls}-img-placeholder`]: {
  9561. backgroundColor: token.colorBgContainerDisabled,
  9562. backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
  9563. backgroundRepeat: 'no-repeat',
  9564. backgroundPosition: 'center center',
  9565. backgroundSize: '30%'
  9566. },
  9567. [`${componentCls}-mask`]: Object.assign({}, genImageMaskStyle(token)),
  9568. [`${componentCls}-mask:hover`]: {
  9569. opacity: 1
  9570. },
  9571. [`${componentCls}-placeholder`]: Object.assign({}, genBoxStyle())
  9572. }
  9573. };
  9574. };
  9575. const genPreviewMotion = token => {
  9576. const {
  9577. previewCls
  9578. } = token;
  9579. return {
  9580. [`${previewCls}-root`]: (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__.initZoomMotion)(token, 'zoom'),
  9581. '&': (0,_style_motion__WEBPACK_IMPORTED_MODULE_4__.initFadeMotion)(token, true)
  9582. };
  9583. };
  9584. // ============================== Export ==============================
  9585. const prepareComponentToken = token => ({
  9586. zIndexPopup: token.zIndexPopupBase + 80,
  9587. previewOperationColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorTextLightSolid).setA(0.65).toRgbString(),
  9588. previewOperationHoverColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorTextLightSolid).setA(0.85).toRgbString(),
  9589. previewOperationColorDisabled: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorTextLightSolid).setA(0.25).toRgbString(),
  9590. previewOperationSize: token.fontSizeIcon * 1.5 // FIXME: fontSizeIconLG
  9591. });
  9592. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_7__.genStyleHooks)('Image', token => {
  9593. const previewCls = `${token.componentCls}-preview`;
  9594. const imageToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(token, {
  9595. previewCls,
  9596. modalMaskBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor('#000').setA(0.45).toRgbString(),
  9597. // FIXME: Shared Token
  9598. imagePreviewSwitchSize: token.controlHeightLG
  9599. });
  9600. return [genImageStyle(imageToken), genImagePreviewStyle(imageToken), (0,_modal_style__WEBPACK_IMPORTED_MODULE_2__.genModalMaskStyle)((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(imageToken, {
  9601. componentCls: previewCls
  9602. })), genPreviewMotion(imageToken)];
  9603. }, prepareComponentToken));
  9604. /***/ }),
  9605. /***/ "./components/index.ts":
  9606. /*!********************************************!*\
  9607. !*** ./components/index.ts + 1020 modules ***!
  9608. \********************************************/
  9609. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  9610. "use strict";
  9611. // ESM COMPAT FLAG
  9612. __webpack_require__.r(__webpack_exports__);
  9613. // EXPORTS
  9614. __webpack_require__.d(__webpack_exports__, {
  9615. Affix: function() { return /* reexport */ components_affix; },
  9616. Alert: function() { return /* reexport */ components_alert; },
  9617. Anchor: function() { return /* reexport */ components_anchor; },
  9618. App: function() { return /* reexport */ app; },
  9619. AutoComplete: function() { return /* reexport */ auto_complete; },
  9620. Avatar: function() { return /* reexport */ avatar; },
  9621. BackTop: function() { return /* reexport */ back_top; },
  9622. Badge: function() { return /* reexport */ components_badge; },
  9623. Breadcrumb: function() { return /* reexport */ breadcrumb; },
  9624. Button: function() { return /* reexport */ components_button; },
  9625. Calendar: function() { return /* reexport */ calendar; },
  9626. Card: function() { return /* reexport */ card; },
  9627. Carousel: function() { return /* reexport */ carousel; },
  9628. Cascader: function() { return /* reexport */ cascader; },
  9629. Checkbox: function() { return /* reexport */ components_checkbox; },
  9630. Col: function() { return /* reexport */ components_col; },
  9631. Collapse: function() { return /* reexport */ collapse["default"]; },
  9632. ColorPicker: function() { return /* reexport */ color_picker; },
  9633. ConfigProvider: function() { return /* reexport */ config_provider; },
  9634. DatePicker: function() { return /* reexport */ date_picker; },
  9635. Descriptions: function() { return /* reexport */ descriptions; },
  9636. Divider: function() { return /* reexport */ divider; },
  9637. Drawer: function() { return /* reexport */ drawer; },
  9638. Dropdown: function() { return /* reexport */ components_dropdown; },
  9639. Empty: function() { return /* reexport */ components_empty; },
  9640. Flex: function() { return /* reexport */ flex; },
  9641. FloatButton: function() { return /* reexport */ float_button; },
  9642. Form: function() { return /* reexport */ components_form; },
  9643. Grid: function() { return /* reexport */ grid; },
  9644. Image: function() { return /* reexport */ components_image; },
  9645. Input: function() { return /* reexport */ input; },
  9646. InputNumber: function() { return /* reexport */ input_number; },
  9647. Layout: function() { return /* reexport */ components_layout; },
  9648. List: function() { return /* reexport */ list; },
  9649. Mentions: function() { return /* reexport */ mentions; },
  9650. Menu: function() { return /* reexport */ components_menu; },
  9651. Modal: function() { return /* reexport */ modal; },
  9652. Pagination: function() { return /* reexport */ components_pagination; },
  9653. Popconfirm: function() { return /* reexport */ popconfirm; },
  9654. Popover: function() { return /* reexport */ popover; },
  9655. Progress: function() { return /* reexport */ components_progress; },
  9656. QRCode: function() { return /* reexport */ qr_code; },
  9657. Radio: function() { return /* reexport */ components_radio; },
  9658. Rate: function() { return /* reexport */ rate; },
  9659. Result: function() { return /* reexport */ result; },
  9660. Row: function() { return /* reexport */ components_row; },
  9661. Segmented: function() { return /* reexport */ segmented; },
  9662. Select: function() { return /* reexport */ components_select; },
  9663. Skeleton: function() { return /* reexport */ skeleton; },
  9664. Slider: function() { return /* reexport */ slider; },
  9665. Space: function() { return /* reexport */ space; },
  9666. Spin: function() { return /* reexport */ spin; },
  9667. Splitter: function() { return /* reexport */ splitter; },
  9668. Statistic: function() { return /* reexport */ statistic; },
  9669. Steps: function() { return /* reexport */ steps; },
  9670. Switch: function() { return /* reexport */ components_switch; },
  9671. Table: function() { return /* reexport */ table; },
  9672. Tabs: function() { return /* reexport */ components_tabs; },
  9673. Tag: function() { return /* reexport */ tag; },
  9674. TimePicker: function() { return /* reexport */ time_picker; },
  9675. Timeline: function() { return /* reexport */ timeline; },
  9676. Tooltip: function() { return /* reexport */ components_tooltip; },
  9677. Tour: function() { return /* reexport */ tour; },
  9678. Transfer: function() { return /* reexport */ transfer; },
  9679. Tree: function() { return /* reexport */ tree; },
  9680. TreeSelect: function() { return /* reexport */ tree_select; },
  9681. Typography: function() { return /* reexport */ typography; },
  9682. Upload: function() { return /* reexport */ components_upload; },
  9683. Watermark: function() { return /* reexport */ watermark; },
  9684. message: function() { return /* reexport */ components_message; },
  9685. notification: function() { return /* reexport */ components_notification; },
  9686. theme: function() { return /* reexport */ theme; },
  9687. unstableSetRender: function() { return /* reexport */ unstableSetRender; },
  9688. version: function() { return /* reexport */ components_version["default"]; }
  9689. });
  9690. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  9691. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  9692. var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
  9693. // EXTERNAL MODULE: ./node_modules/classnames/index.js
  9694. var classnames = __webpack_require__("./node_modules/classnames/index.js");
  9695. var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  9696. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  9697. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  9698. // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
  9699. var toArray = __webpack_require__("./node_modules/rc-util/es/Children/toArray.js");
  9700. // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
  9701. var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
  9702. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  9703. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  9704. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  9705. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  9706. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
  9707. var findDOMNode = __webpack_require__("./node_modules/rc-util/es/Dom/findDOMNode.js");
  9708. // EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
  9709. var es_ref = __webpack_require__("./node_modules/rc-util/es/ref.js");
  9710. ;// ./node_modules/rc-resize-observer/es/Collection.js
  9711. var CollectionContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  9712. /**
  9713. * Collect all the resize event from children ResizeObserver
  9714. */
  9715. function Collection(_ref) {
  9716. var children = _ref.children,
  9717. onBatchResize = _ref.onBatchResize;
  9718. var resizeIdRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
  9719. var resizeInfosRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  9720. var onCollectionResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(CollectionContext);
  9721. var onResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (size, element, data) {
  9722. resizeIdRef.current += 1;
  9723. var currentId = resizeIdRef.current;
  9724. resizeInfosRef.current.push({
  9725. size: size,
  9726. element: element,
  9727. data: data
  9728. });
  9729. Promise.resolve().then(function () {
  9730. if (currentId === resizeIdRef.current) {
  9731. onBatchResize === null || onBatchResize === void 0 || onBatchResize(resizeInfosRef.current);
  9732. resizeInfosRef.current = [];
  9733. }
  9734. });
  9735. // Continue bubbling if parent exist
  9736. onCollectionResize === null || onCollectionResize === void 0 || onCollectionResize(size, element, data);
  9737. }, [onBatchResize, onCollectionResize]);
  9738. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CollectionContext.Provider, {
  9739. value: onResize
  9740. }, children);
  9741. }
  9742. ;// ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
  9743. /**
  9744. * A collection of shims that provide minimal functionality of the ES6 collections.
  9745. *
  9746. * These implementations are not meant to be used outside of the ResizeObserver
  9747. * modules as they cover only a limited range of use cases.
  9748. */
  9749. /* eslint-disable require-jsdoc, valid-jsdoc */
  9750. var MapShim = (function () {
  9751. if (typeof Map !== 'undefined') {
  9752. return Map;
  9753. }
  9754. /**
  9755. * Returns index in provided array that matches the specified key.
  9756. *
  9757. * @param {Array<Array>} arr
  9758. * @param {*} key
  9759. * @returns {number}
  9760. */
  9761. function getIndex(arr, key) {
  9762. var result = -1;
  9763. arr.some(function (entry, index) {
  9764. if (entry[0] === key) {
  9765. result = index;
  9766. return true;
  9767. }
  9768. return false;
  9769. });
  9770. return result;
  9771. }
  9772. return /** @class */ (function () {
  9773. function class_1() {
  9774. this.__entries__ = [];
  9775. }
  9776. Object.defineProperty(class_1.prototype, "size", {
  9777. /**
  9778. * @returns {boolean}
  9779. */
  9780. get: function () {
  9781. return this.__entries__.length;
  9782. },
  9783. enumerable: true,
  9784. configurable: true
  9785. });
  9786. /**
  9787. * @param {*} key
  9788. * @returns {*}
  9789. */
  9790. class_1.prototype.get = function (key) {
  9791. var index = getIndex(this.__entries__, key);
  9792. var entry = this.__entries__[index];
  9793. return entry && entry[1];
  9794. };
  9795. /**
  9796. * @param {*} key
  9797. * @param {*} value
  9798. * @returns {void}
  9799. */
  9800. class_1.prototype.set = function (key, value) {
  9801. var index = getIndex(this.__entries__, key);
  9802. if (~index) {
  9803. this.__entries__[index][1] = value;
  9804. }
  9805. else {
  9806. this.__entries__.push([key, value]);
  9807. }
  9808. };
  9809. /**
  9810. * @param {*} key
  9811. * @returns {void}
  9812. */
  9813. class_1.prototype.delete = function (key) {
  9814. var entries = this.__entries__;
  9815. var index = getIndex(entries, key);
  9816. if (~index) {
  9817. entries.splice(index, 1);
  9818. }
  9819. };
  9820. /**
  9821. * @param {*} key
  9822. * @returns {void}
  9823. */
  9824. class_1.prototype.has = function (key) {
  9825. return !!~getIndex(this.__entries__, key);
  9826. };
  9827. /**
  9828. * @returns {void}
  9829. */
  9830. class_1.prototype.clear = function () {
  9831. this.__entries__.splice(0);
  9832. };
  9833. /**
  9834. * @param {Function} callback
  9835. * @param {*} [ctx=null]
  9836. * @returns {void}
  9837. */
  9838. class_1.prototype.forEach = function (callback, ctx) {
  9839. if (ctx === void 0) { ctx = null; }
  9840. for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
  9841. var entry = _a[_i];
  9842. callback.call(ctx, entry[1], entry[0]);
  9843. }
  9844. };
  9845. return class_1;
  9846. }());
  9847. })();
  9848. /**
  9849. * Detects whether window and document objects are available in current environment.
  9850. */
  9851. var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
  9852. // Returns global object of a current environment.
  9853. var global$1 = (function () {
  9854. if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
  9855. return __webpack_require__.g;
  9856. }
  9857. if (typeof self !== 'undefined' && self.Math === Math) {
  9858. return self;
  9859. }
  9860. if (typeof window !== 'undefined' && window.Math === Math) {
  9861. return window;
  9862. }
  9863. // eslint-disable-next-line no-new-func
  9864. return Function('return this')();
  9865. })();
  9866. /**
  9867. * A shim for the requestAnimationFrame which falls back to the setTimeout if
  9868. * first one is not supported.
  9869. *
  9870. * @returns {number} Requests' identifier.
  9871. */
  9872. var requestAnimationFrame$1 = (function () {
  9873. if (typeof requestAnimationFrame === 'function') {
  9874. // It's required to use a bounded function because IE sometimes throws
  9875. // an "Invalid calling object" error if rAF is invoked without the global
  9876. // object on the left hand side.
  9877. return requestAnimationFrame.bind(global$1);
  9878. }
  9879. return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
  9880. })();
  9881. // Defines minimum timeout before adding a trailing call.
  9882. var trailingTimeout = 2;
  9883. /**
  9884. * Creates a wrapper function which ensures that provided callback will be
  9885. * invoked only once during the specified delay period.
  9886. *
  9887. * @param {Function} callback - Function to be invoked after the delay period.
  9888. * @param {number} delay - Delay after which to invoke callback.
  9889. * @returns {Function}
  9890. */
  9891. function throttle (callback, delay) {
  9892. var leadingCall = false, trailingCall = false, lastCallTime = 0;
  9893. /**
  9894. * Invokes the original callback function and schedules new invocation if
  9895. * the "proxy" was called during current request.
  9896. *
  9897. * @returns {void}
  9898. */
  9899. function resolvePending() {
  9900. if (leadingCall) {
  9901. leadingCall = false;
  9902. callback();
  9903. }
  9904. if (trailingCall) {
  9905. proxy();
  9906. }
  9907. }
  9908. /**
  9909. * Callback invoked after the specified delay. It will further postpone
  9910. * invocation of the original function delegating it to the
  9911. * requestAnimationFrame.
  9912. *
  9913. * @returns {void}
  9914. */
  9915. function timeoutCallback() {
  9916. requestAnimationFrame$1(resolvePending);
  9917. }
  9918. /**
  9919. * Schedules invocation of the original function.
  9920. *
  9921. * @returns {void}
  9922. */
  9923. function proxy() {
  9924. var timeStamp = Date.now();
  9925. if (leadingCall) {
  9926. // Reject immediately following calls.
  9927. if (timeStamp - lastCallTime < trailingTimeout) {
  9928. return;
  9929. }
  9930. // Schedule new call to be in invoked when the pending one is resolved.
  9931. // This is important for "transitions" which never actually start
  9932. // immediately so there is a chance that we might miss one if change
  9933. // happens amids the pending invocation.
  9934. trailingCall = true;
  9935. }
  9936. else {
  9937. leadingCall = true;
  9938. trailingCall = false;
  9939. setTimeout(timeoutCallback, delay);
  9940. }
  9941. lastCallTime = timeStamp;
  9942. }
  9943. return proxy;
  9944. }
  9945. // Minimum delay before invoking the update of observers.
  9946. var REFRESH_DELAY = 20;
  9947. // A list of substrings of CSS properties used to find transition events that
  9948. // might affect dimensions of observed elements.
  9949. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
  9950. // Check if MutationObserver is available.
  9951. var mutationObserverSupported = typeof MutationObserver !== 'undefined';
  9952. /**
  9953. * Singleton controller class which handles updates of ResizeObserver instances.
  9954. */
  9955. var ResizeObserverController = /** @class */ (function () {
  9956. /**
  9957. * Creates a new instance of ResizeObserverController.
  9958. *
  9959. * @private
  9960. */
  9961. function ResizeObserverController() {
  9962. /**
  9963. * Indicates whether DOM listeners have been added.
  9964. *
  9965. * @private {boolean}
  9966. */
  9967. this.connected_ = false;
  9968. /**
  9969. * Tells that controller has subscribed for Mutation Events.
  9970. *
  9971. * @private {boolean}
  9972. */
  9973. this.mutationEventsAdded_ = false;
  9974. /**
  9975. * Keeps reference to the instance of MutationObserver.
  9976. *
  9977. * @private {MutationObserver}
  9978. */
  9979. this.mutationsObserver_ = null;
  9980. /**
  9981. * A list of connected observers.
  9982. *
  9983. * @private {Array<ResizeObserverSPI>}
  9984. */
  9985. this.observers_ = [];
  9986. this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
  9987. this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
  9988. }
  9989. /**
  9990. * Adds observer to observers list.
  9991. *
  9992. * @param {ResizeObserverSPI} observer - Observer to be added.
  9993. * @returns {void}
  9994. */
  9995. ResizeObserverController.prototype.addObserver = function (observer) {
  9996. if (!~this.observers_.indexOf(observer)) {
  9997. this.observers_.push(observer);
  9998. }
  9999. // Add listeners if they haven't been added yet.
  10000. if (!this.connected_) {
  10001. this.connect_();
  10002. }
  10003. };
  10004. /**
  10005. * Removes observer from observers list.
  10006. *
  10007. * @param {ResizeObserverSPI} observer - Observer to be removed.
  10008. * @returns {void}
  10009. */
  10010. ResizeObserverController.prototype.removeObserver = function (observer) {
  10011. var observers = this.observers_;
  10012. var index = observers.indexOf(observer);
  10013. // Remove observer if it's present in registry.
  10014. if (~index) {
  10015. observers.splice(index, 1);
  10016. }
  10017. // Remove listeners if controller has no connected observers.
  10018. if (!observers.length && this.connected_) {
  10019. this.disconnect_();
  10020. }
  10021. };
  10022. /**
  10023. * Invokes the update of observers. It will continue running updates insofar
  10024. * it detects changes.
  10025. *
  10026. * @returns {void}
  10027. */
  10028. ResizeObserverController.prototype.refresh = function () {
  10029. var changesDetected = this.updateObservers_();
  10030. // Continue running updates if changes have been detected as there might
  10031. // be future ones caused by CSS transitions.
  10032. if (changesDetected) {
  10033. this.refresh();
  10034. }
  10035. };
  10036. /**
  10037. * Updates every observer from observers list and notifies them of queued
  10038. * entries.
  10039. *
  10040. * @private
  10041. * @returns {boolean} Returns "true" if any observer has detected changes in
  10042. * dimensions of it's elements.
  10043. */
  10044. ResizeObserverController.prototype.updateObservers_ = function () {
  10045. // Collect observers that have active observations.
  10046. var activeObservers = this.observers_.filter(function (observer) {
  10047. return observer.gatherActive(), observer.hasActive();
  10048. });
  10049. // Deliver notifications in a separate cycle in order to avoid any
  10050. // collisions between observers, e.g. when multiple instances of
  10051. // ResizeObserver are tracking the same element and the callback of one
  10052. // of them changes content dimensions of the observed target. Sometimes
  10053. // this may result in notifications being blocked for the rest of observers.
  10054. activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
  10055. return activeObservers.length > 0;
  10056. };
  10057. /**
  10058. * Initializes DOM listeners.
  10059. *
  10060. * @private
  10061. * @returns {void}
  10062. */
  10063. ResizeObserverController.prototype.connect_ = function () {
  10064. // Do nothing if running in a non-browser environment or if listeners
  10065. // have been already added.
  10066. if (!isBrowser || this.connected_) {
  10067. return;
  10068. }
  10069. // Subscription to the "Transitionend" event is used as a workaround for
  10070. // delayed transitions. This way it's possible to capture at least the
  10071. // final state of an element.
  10072. document.addEventListener('transitionend', this.onTransitionEnd_);
  10073. window.addEventListener('resize', this.refresh);
  10074. if (mutationObserverSupported) {
  10075. this.mutationsObserver_ = new MutationObserver(this.refresh);
  10076. this.mutationsObserver_.observe(document, {
  10077. attributes: true,
  10078. childList: true,
  10079. characterData: true,
  10080. subtree: true
  10081. });
  10082. }
  10083. else {
  10084. document.addEventListener('DOMSubtreeModified', this.refresh);
  10085. this.mutationEventsAdded_ = true;
  10086. }
  10087. this.connected_ = true;
  10088. };
  10089. /**
  10090. * Removes DOM listeners.
  10091. *
  10092. * @private
  10093. * @returns {void}
  10094. */
  10095. ResizeObserverController.prototype.disconnect_ = function () {
  10096. // Do nothing if running in a non-browser environment or if listeners
  10097. // have been already removed.
  10098. if (!isBrowser || !this.connected_) {
  10099. return;
  10100. }
  10101. document.removeEventListener('transitionend', this.onTransitionEnd_);
  10102. window.removeEventListener('resize', this.refresh);
  10103. if (this.mutationsObserver_) {
  10104. this.mutationsObserver_.disconnect();
  10105. }
  10106. if (this.mutationEventsAdded_) {
  10107. document.removeEventListener('DOMSubtreeModified', this.refresh);
  10108. }
  10109. this.mutationsObserver_ = null;
  10110. this.mutationEventsAdded_ = false;
  10111. this.connected_ = false;
  10112. };
  10113. /**
  10114. * "Transitionend" event handler.
  10115. *
  10116. * @private
  10117. * @param {TransitionEvent} event
  10118. * @returns {void}
  10119. */
  10120. ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
  10121. var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
  10122. // Detect whether transition may affect dimensions of an element.
  10123. var isReflowProperty = transitionKeys.some(function (key) {
  10124. return !!~propertyName.indexOf(key);
  10125. });
  10126. if (isReflowProperty) {
  10127. this.refresh();
  10128. }
  10129. };
  10130. /**
  10131. * Returns instance of the ResizeObserverController.
  10132. *
  10133. * @returns {ResizeObserverController}
  10134. */
  10135. ResizeObserverController.getInstance = function () {
  10136. if (!this.instance_) {
  10137. this.instance_ = new ResizeObserverController();
  10138. }
  10139. return this.instance_;
  10140. };
  10141. /**
  10142. * Holds reference to the controller's instance.
  10143. *
  10144. * @private {ResizeObserverController}
  10145. */
  10146. ResizeObserverController.instance_ = null;
  10147. return ResizeObserverController;
  10148. }());
  10149. /**
  10150. * Defines non-writable/enumerable properties of the provided target object.
  10151. *
  10152. * @param {Object} target - Object for which to define properties.
  10153. * @param {Object} props - Properties to be defined.
  10154. * @returns {Object} Target object.
  10155. */
  10156. var defineConfigurable = (function (target, props) {
  10157. for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
  10158. var key = _a[_i];
  10159. Object.defineProperty(target, key, {
  10160. value: props[key],
  10161. enumerable: false,
  10162. writable: false,
  10163. configurable: true
  10164. });
  10165. }
  10166. return target;
  10167. });
  10168. /**
  10169. * Returns the global object associated with provided element.
  10170. *
  10171. * @param {Object} target
  10172. * @returns {Object}
  10173. */
  10174. var getWindowOf = (function (target) {
  10175. // Assume that the element is an instance of Node, which means that it
  10176. // has the "ownerDocument" property from which we can retrieve a
  10177. // corresponding global object.
  10178. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
  10179. // Return the local global object if it's not possible extract one from
  10180. // provided element.
  10181. return ownerGlobal || global$1;
  10182. });
  10183. // Placeholder of an empty content rectangle.
  10184. var emptyRect = createRectInit(0, 0, 0, 0);
  10185. /**
  10186. * Converts provided string to a number.
  10187. *
  10188. * @param {number|string} value
  10189. * @returns {number}
  10190. */
  10191. function toFloat(value) {
  10192. return parseFloat(value) || 0;
  10193. }
  10194. /**
  10195. * Extracts borders size from provided styles.
  10196. *
  10197. * @param {CSSStyleDeclaration} styles
  10198. * @param {...string} positions - Borders positions (top, right, ...)
  10199. * @returns {number}
  10200. */
  10201. function getBordersSize(styles) {
  10202. var positions = [];
  10203. for (var _i = 1; _i < arguments.length; _i++) {
  10204. positions[_i - 1] = arguments[_i];
  10205. }
  10206. return positions.reduce(function (size, position) {
  10207. var value = styles['border-' + position + '-width'];
  10208. return size + toFloat(value);
  10209. }, 0);
  10210. }
  10211. /**
  10212. * Extracts paddings sizes from provided styles.
  10213. *
  10214. * @param {CSSStyleDeclaration} styles
  10215. * @returns {Object} Paddings box.
  10216. */
  10217. function getPaddings(styles) {
  10218. var positions = ['top', 'right', 'bottom', 'left'];
  10219. var paddings = {};
  10220. for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
  10221. var position = positions_1[_i];
  10222. var value = styles['padding-' + position];
  10223. paddings[position] = toFloat(value);
  10224. }
  10225. return paddings;
  10226. }
  10227. /**
  10228. * Calculates content rectangle of provided SVG element.
  10229. *
  10230. * @param {SVGGraphicsElement} target - Element content rectangle of which needs
  10231. * to be calculated.
  10232. * @returns {DOMRectInit}
  10233. */
  10234. function getSVGContentRect(target) {
  10235. var bbox = target.getBBox();
  10236. return createRectInit(0, 0, bbox.width, bbox.height);
  10237. }
  10238. /**
  10239. * Calculates content rectangle of provided HTMLElement.
  10240. *
  10241. * @param {HTMLElement} target - Element for which to calculate the content rectangle.
  10242. * @returns {DOMRectInit}
  10243. */
  10244. function getHTMLElementContentRect(target) {
  10245. // Client width & height properties can't be
  10246. // used exclusively as they provide rounded values.
  10247. var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
  10248. // By this condition we can catch all non-replaced inline, hidden and
  10249. // detached elements. Though elements with width & height properties less
  10250. // than 0.5 will be discarded as well.
  10251. //
  10252. // Without it we would need to implement separate methods for each of
  10253. // those cases and it's not possible to perform a precise and performance
  10254. // effective test for hidden elements. E.g. even jQuery's ':visible' filter
  10255. // gives wrong results for elements with width & height less than 0.5.
  10256. if (!clientWidth && !clientHeight) {
  10257. return emptyRect;
  10258. }
  10259. var styles = getWindowOf(target).getComputedStyle(target);
  10260. var paddings = getPaddings(styles);
  10261. var horizPad = paddings.left + paddings.right;
  10262. var vertPad = paddings.top + paddings.bottom;
  10263. // Computed styles of width & height are being used because they are the
  10264. // only dimensions available to JS that contain non-rounded values. It could
  10265. // be possible to utilize the getBoundingClientRect if only it's data wasn't
  10266. // affected by CSS transformations let alone paddings, borders and scroll bars.
  10267. var width = toFloat(styles.width), height = toFloat(styles.height);
  10268. // Width & height include paddings and borders when the 'border-box' box
  10269. // model is applied (except for IE).
  10270. if (styles.boxSizing === 'border-box') {
  10271. // Following conditions are required to handle Internet Explorer which
  10272. // doesn't include paddings and borders to computed CSS dimensions.
  10273. //
  10274. // We can say that if CSS dimensions + paddings are equal to the "client"
  10275. // properties then it's either IE, and thus we don't need to subtract
  10276. // anything, or an element merely doesn't have paddings/borders styles.
  10277. if (Math.round(width + horizPad) !== clientWidth) {
  10278. width -= getBordersSize(styles, 'left', 'right') + horizPad;
  10279. }
  10280. if (Math.round(height + vertPad) !== clientHeight) {
  10281. height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
  10282. }
  10283. }
  10284. // Following steps can't be applied to the document's root element as its
  10285. // client[Width/Height] properties represent viewport area of the window.
  10286. // Besides, it's as well not necessary as the <html> itself neither has
  10287. // rendered scroll bars nor it can be clipped.
  10288. if (!isDocumentElement(target)) {
  10289. // In some browsers (only in Firefox, actually) CSS width & height
  10290. // include scroll bars size which can be removed at this step as scroll
  10291. // bars are the only difference between rounded dimensions + paddings
  10292. // and "client" properties, though that is not always true in Chrome.
  10293. var vertScrollbar = Math.round(width + horizPad) - clientWidth;
  10294. var horizScrollbar = Math.round(height + vertPad) - clientHeight;
  10295. // Chrome has a rather weird rounding of "client" properties.
  10296. // E.g. for an element with content width of 314.2px it sometimes gives
  10297. // the client width of 315px and for the width of 314.7px it may give
  10298. // 314px. And it doesn't happen all the time. So just ignore this delta
  10299. // as a non-relevant.
  10300. if (Math.abs(vertScrollbar) !== 1) {
  10301. width -= vertScrollbar;
  10302. }
  10303. if (Math.abs(horizScrollbar) !== 1) {
  10304. height -= horizScrollbar;
  10305. }
  10306. }
  10307. return createRectInit(paddings.left, paddings.top, width, height);
  10308. }
  10309. /**
  10310. * Checks whether provided element is an instance of the SVGGraphicsElement.
  10311. *
  10312. * @param {Element} target - Element to be checked.
  10313. * @returns {boolean}
  10314. */
  10315. var isSVGGraphicsElement = (function () {
  10316. // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
  10317. // interface.
  10318. if (typeof SVGGraphicsElement !== 'undefined') {
  10319. return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
  10320. }
  10321. // If it's so, then check that element is at least an instance of the
  10322. // SVGElement and that it has the "getBBox" method.
  10323. // eslint-disable-next-line no-extra-parens
  10324. return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
  10325. typeof target.getBBox === 'function'); };
  10326. })();
  10327. /**
  10328. * Checks whether provided element is a document element (<html>).
  10329. *
  10330. * @param {Element} target - Element to be checked.
  10331. * @returns {boolean}
  10332. */
  10333. function isDocumentElement(target) {
  10334. return target === getWindowOf(target).document.documentElement;
  10335. }
  10336. /**
  10337. * Calculates an appropriate content rectangle for provided html or svg element.
  10338. *
  10339. * @param {Element} target - Element content rectangle of which needs to be calculated.
  10340. * @returns {DOMRectInit}
  10341. */
  10342. function getContentRect(target) {
  10343. if (!isBrowser) {
  10344. return emptyRect;
  10345. }
  10346. if (isSVGGraphicsElement(target)) {
  10347. return getSVGContentRect(target);
  10348. }
  10349. return getHTMLElementContentRect(target);
  10350. }
  10351. /**
  10352. * Creates rectangle with an interface of the DOMRectReadOnly.
  10353. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
  10354. *
  10355. * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
  10356. * @returns {DOMRectReadOnly}
  10357. */
  10358. function createReadOnlyRect(_a) {
  10359. var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
  10360. // If DOMRectReadOnly is available use it as a prototype for the rectangle.
  10361. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
  10362. var rect = Object.create(Constr.prototype);
  10363. // Rectangle's properties are not writable and non-enumerable.
  10364. defineConfigurable(rect, {
  10365. x: x, y: y, width: width, height: height,
  10366. top: y,
  10367. right: x + width,
  10368. bottom: height + y,
  10369. left: x
  10370. });
  10371. return rect;
  10372. }
  10373. /**
  10374. * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
  10375. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
  10376. *
  10377. * @param {number} x - X coordinate.
  10378. * @param {number} y - Y coordinate.
  10379. * @param {number} width - Rectangle's width.
  10380. * @param {number} height - Rectangle's height.
  10381. * @returns {DOMRectInit}
  10382. */
  10383. function createRectInit(x, y, width, height) {
  10384. return { x: x, y: y, width: width, height: height };
  10385. }
  10386. /**
  10387. * Class that is responsible for computations of the content rectangle of
  10388. * provided DOM element and for keeping track of it's changes.
  10389. */
  10390. var ResizeObservation = /** @class */ (function () {
  10391. /**
  10392. * Creates an instance of ResizeObservation.
  10393. *
  10394. * @param {Element} target - Element to be observed.
  10395. */
  10396. function ResizeObservation(target) {
  10397. /**
  10398. * Broadcasted width of content rectangle.
  10399. *
  10400. * @type {number}
  10401. */
  10402. this.broadcastWidth = 0;
  10403. /**
  10404. * Broadcasted height of content rectangle.
  10405. *
  10406. * @type {number}
  10407. */
  10408. this.broadcastHeight = 0;
  10409. /**
  10410. * Reference to the last observed content rectangle.
  10411. *
  10412. * @private {DOMRectInit}
  10413. */
  10414. this.contentRect_ = createRectInit(0, 0, 0, 0);
  10415. this.target = target;
  10416. }
  10417. /**
  10418. * Updates content rectangle and tells whether it's width or height properties
  10419. * have changed since the last broadcast.
  10420. *
  10421. * @returns {boolean}
  10422. */
  10423. ResizeObservation.prototype.isActive = function () {
  10424. var rect = getContentRect(this.target);
  10425. this.contentRect_ = rect;
  10426. return (rect.width !== this.broadcastWidth ||
  10427. rect.height !== this.broadcastHeight);
  10428. };
  10429. /**
  10430. * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
  10431. * from the corresponding properties of the last observed content rectangle.
  10432. *
  10433. * @returns {DOMRectInit} Last observed content rectangle.
  10434. */
  10435. ResizeObservation.prototype.broadcastRect = function () {
  10436. var rect = this.contentRect_;
  10437. this.broadcastWidth = rect.width;
  10438. this.broadcastHeight = rect.height;
  10439. return rect;
  10440. };
  10441. return ResizeObservation;
  10442. }());
  10443. var ResizeObserverEntry = /** @class */ (function () {
  10444. /**
  10445. * Creates an instance of ResizeObserverEntry.
  10446. *
  10447. * @param {Element} target - Element that is being observed.
  10448. * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
  10449. */
  10450. function ResizeObserverEntry(target, rectInit) {
  10451. var contentRect = createReadOnlyRect(rectInit);
  10452. // According to the specification following properties are not writable
  10453. // and are also not enumerable in the native implementation.
  10454. //
  10455. // Property accessors are not being used as they'd require to define a
  10456. // private WeakMap storage which may cause memory leaks in browsers that
  10457. // don't support this type of collections.
  10458. defineConfigurable(this, { target: target, contentRect: contentRect });
  10459. }
  10460. return ResizeObserverEntry;
  10461. }());
  10462. var ResizeObserverSPI = /** @class */ (function () {
  10463. /**
  10464. * Creates a new instance of ResizeObserver.
  10465. *
  10466. * @param {ResizeObserverCallback} callback - Callback function that is invoked
  10467. * when one of the observed elements changes it's content dimensions.
  10468. * @param {ResizeObserverController} controller - Controller instance which
  10469. * is responsible for the updates of observer.
  10470. * @param {ResizeObserver} callbackCtx - Reference to the public
  10471. * ResizeObserver instance which will be passed to callback function.
  10472. */
  10473. function ResizeObserverSPI(callback, controller, callbackCtx) {
  10474. /**
  10475. * Collection of resize observations that have detected changes in dimensions
  10476. * of elements.
  10477. *
  10478. * @private {Array<ResizeObservation>}
  10479. */
  10480. this.activeObservations_ = [];
  10481. /**
  10482. * Registry of the ResizeObservation instances.
  10483. *
  10484. * @private {Map<Element, ResizeObservation>}
  10485. */
  10486. this.observations_ = new MapShim();
  10487. if (typeof callback !== 'function') {
  10488. throw new TypeError('The callback provided as parameter 1 is not a function.');
  10489. }
  10490. this.callback_ = callback;
  10491. this.controller_ = controller;
  10492. this.callbackCtx_ = callbackCtx;
  10493. }
  10494. /**
  10495. * Starts observing provided element.
  10496. *
  10497. * @param {Element} target - Element to be observed.
  10498. * @returns {void}
  10499. */
  10500. ResizeObserverSPI.prototype.observe = function (target) {
  10501. if (!arguments.length) {
  10502. throw new TypeError('1 argument required, but only 0 present.');
  10503. }
  10504. // Do nothing if current environment doesn't have the Element interface.
  10505. if (typeof Element === 'undefined' || !(Element instanceof Object)) {
  10506. return;
  10507. }
  10508. if (!(target instanceof getWindowOf(target).Element)) {
  10509. throw new TypeError('parameter 1 is not of type "Element".');
  10510. }
  10511. var observations = this.observations_;
  10512. // Do nothing if element is already being observed.
  10513. if (observations.has(target)) {
  10514. return;
  10515. }
  10516. observations.set(target, new ResizeObservation(target));
  10517. this.controller_.addObserver(this);
  10518. // Force the update of observations.
  10519. this.controller_.refresh();
  10520. };
  10521. /**
  10522. * Stops observing provided element.
  10523. *
  10524. * @param {Element} target - Element to stop observing.
  10525. * @returns {void}
  10526. */
  10527. ResizeObserverSPI.prototype.unobserve = function (target) {
  10528. if (!arguments.length) {
  10529. throw new TypeError('1 argument required, but only 0 present.');
  10530. }
  10531. // Do nothing if current environment doesn't have the Element interface.
  10532. if (typeof Element === 'undefined' || !(Element instanceof Object)) {
  10533. return;
  10534. }
  10535. if (!(target instanceof getWindowOf(target).Element)) {
  10536. throw new TypeError('parameter 1 is not of type "Element".');
  10537. }
  10538. var observations = this.observations_;
  10539. // Do nothing if element is not being observed.
  10540. if (!observations.has(target)) {
  10541. return;
  10542. }
  10543. observations.delete(target);
  10544. if (!observations.size) {
  10545. this.controller_.removeObserver(this);
  10546. }
  10547. };
  10548. /**
  10549. * Stops observing all elements.
  10550. *
  10551. * @returns {void}
  10552. */
  10553. ResizeObserverSPI.prototype.disconnect = function () {
  10554. this.clearActive();
  10555. this.observations_.clear();
  10556. this.controller_.removeObserver(this);
  10557. };
  10558. /**
  10559. * Collects observation instances the associated element of which has changed
  10560. * it's content rectangle.
  10561. *
  10562. * @returns {void}
  10563. */
  10564. ResizeObserverSPI.prototype.gatherActive = function () {
  10565. var _this = this;
  10566. this.clearActive();
  10567. this.observations_.forEach(function (observation) {
  10568. if (observation.isActive()) {
  10569. _this.activeObservations_.push(observation);
  10570. }
  10571. });
  10572. };
  10573. /**
  10574. * Invokes initial callback function with a list of ResizeObserverEntry
  10575. * instances collected from active resize observations.
  10576. *
  10577. * @returns {void}
  10578. */
  10579. ResizeObserverSPI.prototype.broadcastActive = function () {
  10580. // Do nothing if observer doesn't have active observations.
  10581. if (!this.hasActive()) {
  10582. return;
  10583. }
  10584. var ctx = this.callbackCtx_;
  10585. // Create ResizeObserverEntry instance for every active observation.
  10586. var entries = this.activeObservations_.map(function (observation) {
  10587. return new ResizeObserverEntry(observation.target, observation.broadcastRect());
  10588. });
  10589. this.callback_.call(ctx, entries, ctx);
  10590. this.clearActive();
  10591. };
  10592. /**
  10593. * Clears the collection of active observations.
  10594. *
  10595. * @returns {void}
  10596. */
  10597. ResizeObserverSPI.prototype.clearActive = function () {
  10598. this.activeObservations_.splice(0);
  10599. };
  10600. /**
  10601. * Tells whether observer has active observations.
  10602. *
  10603. * @returns {boolean}
  10604. */
  10605. ResizeObserverSPI.prototype.hasActive = function () {
  10606. return this.activeObservations_.length > 0;
  10607. };
  10608. return ResizeObserverSPI;
  10609. }());
  10610. // Registry of internal observers. If WeakMap is not available use current shim
  10611. // for the Map collection as it has all required methods and because WeakMap
  10612. // can't be fully polyfilled anyway.
  10613. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
  10614. /**
  10615. * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
  10616. * exposing only those methods and properties that are defined in the spec.
  10617. */
  10618. var ResizeObserver_es_ResizeObserver = /** @class */ (function () {
  10619. /**
  10620. * Creates a new instance of ResizeObserver.
  10621. *
  10622. * @param {ResizeObserverCallback} callback - Callback that is invoked when
  10623. * dimensions of the observed elements change.
  10624. */
  10625. function ResizeObserver(callback) {
  10626. if (!(this instanceof ResizeObserver)) {
  10627. throw new TypeError('Cannot call a class as a function.');
  10628. }
  10629. if (!arguments.length) {
  10630. throw new TypeError('1 argument required, but only 0 present.');
  10631. }
  10632. var controller = ResizeObserverController.getInstance();
  10633. var observer = new ResizeObserverSPI(callback, controller, this);
  10634. observers.set(this, observer);
  10635. }
  10636. return ResizeObserver;
  10637. }());
  10638. // Expose public methods of ResizeObserver.
  10639. [
  10640. 'observe',
  10641. 'unobserve',
  10642. 'disconnect'
  10643. ].forEach(function (method) {
  10644. ResizeObserver_es_ResizeObserver.prototype[method] = function () {
  10645. var _a;
  10646. return (_a = observers.get(this))[method].apply(_a, arguments);
  10647. };
  10648. });
  10649. var index = (function () {
  10650. // Export existing implementation if available.
  10651. if (typeof global$1.ResizeObserver !== 'undefined') {
  10652. return global$1.ResizeObserver;
  10653. }
  10654. return ResizeObserver_es_ResizeObserver;
  10655. })();
  10656. /* harmony default export */ var ResizeObserver_es = (index);
  10657. ;// ./node_modules/rc-resize-observer/es/utils/observerUtil.js
  10658. // =============================== Const ===============================
  10659. var elementListeners = new Map();
  10660. function onResize(entities) {
  10661. entities.forEach(function (entity) {
  10662. var _elementListeners$get;
  10663. var target = entity.target;
  10664. (_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 || _elementListeners$get.forEach(function (listener) {
  10665. return listener(target);
  10666. });
  10667. });
  10668. }
  10669. // Note: ResizeObserver polyfill not support option to measure border-box resize
  10670. var resizeObserver = new ResizeObserver_es(onResize);
  10671. // Dev env only
  10672. var _el = true ? elementListeners : 0; // eslint-disable-line
  10673. var _rs = true ? onResize : 0; // eslint-disable-line
  10674. // ============================== Observe ==============================
  10675. function observe(element, callback) {
  10676. if (!elementListeners.has(element)) {
  10677. elementListeners.set(element, new Set());
  10678. resizeObserver.observe(element);
  10679. }
  10680. elementListeners.get(element).add(callback);
  10681. }
  10682. function unobserve(element, callback) {
  10683. if (elementListeners.has(element)) {
  10684. elementListeners.get(element).delete(callback);
  10685. if (!elementListeners.get(element).size) {
  10686. resizeObserver.unobserve(element);
  10687. elementListeners.delete(element);
  10688. }
  10689. }
  10690. }
  10691. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  10692. var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  10693. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
  10694. var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
  10695. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
  10696. var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
  10697. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
  10698. var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
  10699. ;// ./node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js
  10700. /**
  10701. * Fallback to findDOMNode if origin ref do not provide any dom element
  10702. */
  10703. var DomWrapper = /*#__PURE__*/function (_React$Component) {
  10704. (0,inherits["default"])(DomWrapper, _React$Component);
  10705. var _super = (0,createSuper["default"])(DomWrapper);
  10706. function DomWrapper() {
  10707. (0,classCallCheck["default"])(this, DomWrapper);
  10708. return _super.apply(this, arguments);
  10709. }
  10710. (0,createClass["default"])(DomWrapper, [{
  10711. key: "render",
  10712. value: function render() {
  10713. return this.props.children;
  10714. }
  10715. }]);
  10716. return DomWrapper;
  10717. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  10718. ;// ./node_modules/rc-resize-observer/es/SingleObserver/index.js
  10719. function SingleObserver(props, ref) {
  10720. var children = props.children,
  10721. disabled = props.disabled;
  10722. var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  10723. var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  10724. var onCollectionResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(CollectionContext);
  10725. // =========================== Children ===========================
  10726. var isRenderProps = typeof children === 'function';
  10727. var mergedChildren = isRenderProps ? children(elementRef) : children;
  10728. // ============================= Size =============================
  10729. var sizeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  10730. width: -1,
  10731. height: -1,
  10732. offsetWidth: -1,
  10733. offsetHeight: -1
  10734. });
  10735. // ============================= Ref ==============================
  10736. var canRef = !isRenderProps && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedChildren) && (0,es_ref.supportRef)(mergedChildren);
  10737. var originRef = canRef ? (0,es_ref.getNodeRef)(mergedChildren) : null;
  10738. var mergedRef = (0,es_ref.useComposeRef)(originRef, elementRef);
  10739. var getDom = function getDom() {
  10740. var _elementRef$current;
  10741. return (0,findDOMNode["default"])(elementRef.current) || (
  10742. // Support `nativeElement` format
  10743. elementRef.current && (0,esm_typeof["default"])(elementRef.current) === 'object' ? (0,findDOMNode["default"])((_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.nativeElement) : null) || (0,findDOMNode["default"])(wrapperRef.current);
  10744. };
  10745. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  10746. return getDom();
  10747. });
  10748. // =========================== Observe ============================
  10749. var propsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(props);
  10750. propsRef.current = props;
  10751. // Handler
  10752. var onInternalResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (target) {
  10753. var _propsRef$current = propsRef.current,
  10754. onResize = _propsRef$current.onResize,
  10755. data = _propsRef$current.data;
  10756. var _target$getBoundingCl = target.getBoundingClientRect(),
  10757. width = _target$getBoundingCl.width,
  10758. height = _target$getBoundingCl.height;
  10759. var offsetWidth = target.offsetWidth,
  10760. offsetHeight = target.offsetHeight;
  10761. /**
  10762. * Resize observer trigger when content size changed.
  10763. * In most case we just care about element size,
  10764. * let's use `boundary` instead of `contentRect` here to avoid shaking.
  10765. */
  10766. var fixedWidth = Math.floor(width);
  10767. var fixedHeight = Math.floor(height);
  10768. if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
  10769. var size = {
  10770. width: fixedWidth,
  10771. height: fixedHeight,
  10772. offsetWidth: offsetWidth,
  10773. offsetHeight: offsetHeight
  10774. };
  10775. sizeRef.current = size;
  10776. // IE is strange, right?
  10777. var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
  10778. var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
  10779. var sizeInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, size), {}, {
  10780. offsetWidth: mergedOffsetWidth,
  10781. offsetHeight: mergedOffsetHeight
  10782. });
  10783. // Let collection know what happened
  10784. onCollectionResize === null || onCollectionResize === void 0 || onCollectionResize(sizeInfo, target, data);
  10785. if (onResize) {
  10786. // defer the callback but not defer to next frame
  10787. Promise.resolve().then(function () {
  10788. onResize(sizeInfo, target);
  10789. });
  10790. }
  10791. }
  10792. }, []);
  10793. // Dynamic observe
  10794. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  10795. var currentElement = getDom();
  10796. if (currentElement && !disabled) {
  10797. observe(currentElement, onInternalResize);
  10798. }
  10799. return function () {
  10800. return unobserve(currentElement, onInternalResize);
  10801. };
  10802. }, [elementRef.current, disabled]);
  10803. // ============================ Render ============================
  10804. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DomWrapper, {
  10805. ref: wrapperRef
  10806. }, canRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(mergedChildren, {
  10807. ref: mergedRef
  10808. }) : mergedChildren);
  10809. }
  10810. var RefSingleObserver = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SingleObserver);
  10811. if (true) {
  10812. RefSingleObserver.displayName = 'SingleObserver';
  10813. }
  10814. /* harmony default export */ var es_SingleObserver = (RefSingleObserver);
  10815. ;// ./node_modules/rc-resize-observer/es/index.js
  10816. var INTERNAL_PREFIX_KEY = 'rc-observer-key';
  10817. function es_ResizeObserver(props, ref) {
  10818. var children = props.children;
  10819. var childNodes = typeof children === 'function' ? [children] : (0,toArray["default"])(children);
  10820. if (true) {
  10821. if (childNodes.length > 1) {
  10822. (0,warning.warning)(false, 'Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.');
  10823. } else if (childNodes.length === 0) {
  10824. (0,warning.warning)(false, '`children` of ResizeObserver is empty. Nothing is in observe.');
  10825. }
  10826. }
  10827. return childNodes.map(function (child, index) {
  10828. var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
  10829. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SingleObserver, (0,esm_extends["default"])({}, props, {
  10830. key: key,
  10831. ref: index === 0 ? ref : undefined
  10832. }), child);
  10833. });
  10834. }
  10835. var RefResizeObserver = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(es_ResizeObserver);
  10836. if (true) {
  10837. RefResizeObserver.displayName = 'ResizeObserver';
  10838. }
  10839. RefResizeObserver.Collection = Collection;
  10840. /* harmony default export */ var es = (RefResizeObserver);
  10841. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
  10842. var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  10843. // EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js
  10844. var raf = __webpack_require__("./node_modules/rc-util/es/raf.js");
  10845. ;// ./components/_util/throttleByAnimationFrame.ts
  10846. function throttleByAnimationFrame(fn) {
  10847. let requestId = null;
  10848. const later = args => () => {
  10849. requestId = null;
  10850. fn.apply(void 0, (0,toConsumableArray["default"])(args));
  10851. };
  10852. const throttled = (...args) => {
  10853. if (requestId === null) {
  10854. requestId = (0,raf["default"])(later(args));
  10855. }
  10856. };
  10857. throttled.cancel = () => {
  10858. raf["default"].cancel(requestId);
  10859. requestId = null;
  10860. };
  10861. return throttled;
  10862. }
  10863. /* harmony default export */ var _util_throttleByAnimationFrame = (throttleByAnimationFrame);
  10864. // EXTERNAL MODULE: ./components/config-provider/context.ts
  10865. var config_provider_context = __webpack_require__("./components/config-provider/context.ts");
  10866. // EXTERNAL MODULE: ./components/affix/style/index.ts
  10867. var affix_style = __webpack_require__("./components/affix/style/index.ts");
  10868. ;// ./components/affix/utils.ts
  10869. function getTargetRect(target) {
  10870. return target !== window ? target.getBoundingClientRect() : {
  10871. top: 0,
  10872. bottom: window.innerHeight
  10873. };
  10874. }
  10875. function getFixedTop(placeholderRect, targetRect, offsetTop) {
  10876. if (offsetTop !== undefined && Math.round(targetRect.top) > Math.round(placeholderRect.top) - offsetTop) {
  10877. return offsetTop + targetRect.top;
  10878. }
  10879. return undefined;
  10880. }
  10881. function getFixedBottom(placeholderRect, targetRect, offsetBottom) {
  10882. if (offsetBottom !== undefined && Math.round(targetRect.bottom) < Math.round(placeholderRect.bottom) + offsetBottom) {
  10883. const targetBottomOffset = window.innerHeight - targetRect.bottom;
  10884. return offsetBottom + targetBottomOffset;
  10885. }
  10886. return undefined;
  10887. }
  10888. ;// ./components/affix/index.tsx
  10889. var __rest = undefined && undefined.__rest || function (s, e) {
  10890. var t = {};
  10891. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  10892. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  10893. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  10894. }
  10895. return t;
  10896. };
  10897. const TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
  10898. function getDefaultTarget() {
  10899. return typeof window !== 'undefined' ? window : null;
  10900. }
  10901. const AFFIX_STATUS_NONE = 0;
  10902. const AFFIX_STATUS_PREPARE = 1;
  10903. const Affix = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  10904. var _a;
  10905. const {
  10906. style,
  10907. offsetTop,
  10908. offsetBottom,
  10909. prefixCls,
  10910. className,
  10911. rootClassName,
  10912. children,
  10913. target,
  10914. onChange,
  10915. onTestUpdatePosition
  10916. } = props,
  10917. restProps = __rest(props, ["style", "offsetTop", "offsetBottom", "prefixCls", "className", "rootClassName", "children", "target", "onChange", "onTestUpdatePosition"]);
  10918. const {
  10919. getPrefixCls,
  10920. getTargetContainer
  10921. } = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
  10922. const affixPrefixCls = getPrefixCls('affix', prefixCls);
  10923. const [lastAffix, setLastAffix] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false);
  10924. const [affixStyle, setAffixStyle] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState();
  10925. const [placeholderStyle, setPlaceholderStyle] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState();
  10926. const status = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(AFFIX_STATUS_NONE);
  10927. const prevTarget = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  10928. const prevListener = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  10929. const placeholderNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  10930. const fixedNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  10931. const timer = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  10932. const targetFunc = (_a = target !== null && target !== void 0 ? target : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultTarget;
  10933. const internalOffsetTop = offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
  10934. // =================== Measure ===================
  10935. const measure = () => {
  10936. if (status.current !== AFFIX_STATUS_PREPARE || !fixedNodeRef.current || !placeholderNodeRef.current || !targetFunc) {
  10937. return;
  10938. }
  10939. const targetNode = targetFunc();
  10940. if (targetNode) {
  10941. const newState = {
  10942. status: AFFIX_STATUS_NONE
  10943. };
  10944. const placeholderRect = getTargetRect(placeholderNodeRef.current);
  10945. if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {
  10946. return;
  10947. }
  10948. const targetRect = getTargetRect(targetNode);
  10949. const fixedTop = getFixedTop(placeholderRect, targetRect, internalOffsetTop);
  10950. const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
  10951. if (fixedTop !== undefined) {
  10952. newState.affixStyle = {
  10953. position: 'fixed',
  10954. top: fixedTop,
  10955. width: placeholderRect.width,
  10956. height: placeholderRect.height
  10957. };
  10958. newState.placeholderStyle = {
  10959. width: placeholderRect.width,
  10960. height: placeholderRect.height
  10961. };
  10962. } else if (fixedBottom !== undefined) {
  10963. newState.affixStyle = {
  10964. position: 'fixed',
  10965. bottom: fixedBottom,
  10966. width: placeholderRect.width,
  10967. height: placeholderRect.height
  10968. };
  10969. newState.placeholderStyle = {
  10970. width: placeholderRect.width,
  10971. height: placeholderRect.height
  10972. };
  10973. }
  10974. newState.lastAffix = !!newState.affixStyle;
  10975. if (lastAffix !== newState.lastAffix) {
  10976. onChange === null || onChange === void 0 ? void 0 : onChange(newState.lastAffix);
  10977. }
  10978. status.current = newState.status;
  10979. setAffixStyle(newState.affixStyle);
  10980. setPlaceholderStyle(newState.placeholderStyle);
  10981. setLastAffix(newState.lastAffix);
  10982. }
  10983. };
  10984. const prepareMeasure = () => {
  10985. status.current = AFFIX_STATUS_PREPARE;
  10986. measure();
  10987. if (false) // removed by dead control flow
  10988. {}
  10989. };
  10990. const updatePosition = _util_throttleByAnimationFrame(() => {
  10991. prepareMeasure();
  10992. });
  10993. const lazyUpdatePosition = _util_throttleByAnimationFrame(() => {
  10994. // Check position change before measure to make Safari smooth
  10995. if (targetFunc && affixStyle) {
  10996. const targetNode = targetFunc();
  10997. if (targetNode && placeholderNodeRef.current) {
  10998. const targetRect = getTargetRect(targetNode);
  10999. const placeholderRect = getTargetRect(placeholderNodeRef.current);
  11000. const fixedTop = getFixedTop(placeholderRect, targetRect, internalOffsetTop);
  11001. const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
  11002. if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {
  11003. return;
  11004. }
  11005. }
  11006. }
  11007. // Directly call prepare measure since it's already throttled.
  11008. prepareMeasure();
  11009. });
  11010. const addListeners = () => {
  11011. const listenerTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
  11012. if (!listenerTarget) {
  11013. return;
  11014. }
  11015. TRIGGER_EVENTS.forEach(eventName => {
  11016. var _a;
  11017. if (prevListener.current) {
  11018. (_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);
  11019. }
  11020. listenerTarget === null || listenerTarget === void 0 ? void 0 : listenerTarget.addEventListener(eventName, lazyUpdatePosition);
  11021. });
  11022. prevTarget.current = listenerTarget;
  11023. prevListener.current = lazyUpdatePosition;
  11024. };
  11025. const removeListeners = () => {
  11026. if (timer.current) {
  11027. clearTimeout(timer.current);
  11028. timer.current = null;
  11029. }
  11030. const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
  11031. TRIGGER_EVENTS.forEach(eventName => {
  11032. var _a;
  11033. newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, lazyUpdatePosition);
  11034. if (prevListener.current) {
  11035. (_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);
  11036. }
  11037. });
  11038. updatePosition.cancel();
  11039. lazyUpdatePosition.cancel();
  11040. };
  11041. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => ({
  11042. updatePosition
  11043. }));
  11044. // mount & unmount
  11045. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  11046. // [Legacy] Wait for parent component ref has its value.
  11047. // We should use target as directly element instead of function which makes element check hard.
  11048. timer.current = setTimeout(addListeners);
  11049. return () => removeListeners();
  11050. }, []);
  11051. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  11052. addListeners();
  11053. return () => removeListeners();
  11054. }, [target, affixStyle, lastAffix, offsetTop, offsetBottom]);
  11055. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  11056. updatePosition();
  11057. }, [target, offsetTop, offsetBottom]);
  11058. const [wrapCSSVar, hashId, cssVarCls] = (0,affix_style["default"])(affixPrefixCls);
  11059. const rootCls = classnames_default()(rootClassName, hashId, affixPrefixCls, cssVarCls);
  11060. const mergedCls = classnames_default()({
  11061. [rootCls]: affixStyle
  11062. });
  11063. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es, {
  11064. onResize: updatePosition
  11065. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
  11066. style: style,
  11067. className: className,
  11068. ref: placeholderNodeRef
  11069. }, restProps), affixStyle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  11070. style: placeholderStyle,
  11071. "aria-hidden": "true"
  11072. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  11073. className: mergedCls,
  11074. ref: fixedNodeRef,
  11075. style: affixStyle
  11076. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es, {
  11077. onResize: updatePosition
  11078. }, children)))));
  11079. });
  11080. if (true) {
  11081. Affix.displayName = 'Affix';
  11082. }
  11083. /* harmony default export */ var components_affix = (Affix);
  11084. ;// ./node_modules/@ant-design/icons-svg/es/asn/CheckCircleFilled.js
  11085. // This icon file is generated automatically.
  11086. var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" };
  11087. /* harmony default export */ var asn_CheckCircleFilled = (CheckCircleFilled);
  11088. // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
  11089. var AntdIcon = __webpack_require__("./node_modules/@ant-design/icons/es/components/AntdIcon.js");
  11090. ;// ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js
  11091. // GENERATE BY ./scripts/generate.ts
  11092. // DON NOT EDIT IT MANUALLY
  11093. var CheckCircleFilled_CheckCircleFilled = function CheckCircleFilled(props, ref) {
  11094. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  11095. ref: ref,
  11096. icon: asn_CheckCircleFilled
  11097. }));
  11098. };
  11099. /**![check-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0xOTMuNSAzMDEuN2wtMjEwLjYgMjkyYTMxLjggMzEuOCAwIDAxLTUxLjcgMEwzMTguNSA0ODQuOWMtMy44LTUuMyAwLTEyLjcgNi41LTEyLjdoNDYuOWMxMC4yIDAgMTkuOSA0LjkgMjUuOSAxMy4zbDcxLjIgOTguOCAxNTcuMi0yMThjNi04LjMgMTUuNi0xMy4zIDI1LjktMTMuM0g2OTljNi41IDAgMTAuMyA3LjQgNi41IDEyLjd6IiAvPjwvc3ZnPg==) */
  11100. var RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CheckCircleFilled_CheckCircleFilled);
  11101. if (true) {
  11102. RefIcon.displayName = 'CheckCircleFilled';
  11103. }
  11104. /* harmony default export */ var icons_CheckCircleFilled = (RefIcon);
  11105. ;// ./node_modules/@ant-design/icons-svg/es/asn/CloseCircleFilled.js
  11106. // This icon file is generated automatically.
  11107. var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
  11108. /* harmony default export */ var asn_CloseCircleFilled = (CloseCircleFilled);
  11109. ;// ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js
  11110. // GENERATE BY ./scripts/generate.ts
  11111. // DON NOT EDIT IT MANUALLY
  11112. var CloseCircleFilled_CloseCircleFilled = function CloseCircleFilled(props, ref) {
  11113. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  11114. ref: ref,
  11115. icon: asn_CloseCircleFilled
  11116. }));
  11117. };
  11118. /**![close-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdmlld0JveD0iNjQgNjQgODk2IDg5NiIgZm9jdXNhYmxlPSJmYWxzZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNTEyIDY0YzI0Ny40IDAgNDQ4IDIwMC42IDQ0OCA0NDhTNzU5LjQgOTYwIDUxMiA5NjAgNjQgNzU5LjQgNjQgNTEyIDI2NC42IDY0IDUxMiA2NHptMTI3Ljk4IDI3NC44MmgtLjA0bC0uMDguMDZMNTEyIDQ2Ni43NSAzODQuMTQgMzM4Ljg4Yy0uMDQtLjA1LS4wNi0uMDYtLjA4LS4wNmEuMTIuMTIgMCAwMC0uMDcgMGMtLjAzIDAtLjA1LjAxLS4wOS4wNWwtNDUuMDIgNDUuMDJhLjIuMiAwIDAwLS4wNS4wOS4xMi4xMiAwIDAwMCAuMDd2LjAyYS4yNy4yNyAwIDAwLjA2LjA2TDQ2Ni43NSA1MTIgMzM4Ljg4IDYzOS44NmMtLjA1LjA0LS4wNi4wNi0uMDYuMDhhLjEyLjEyIDAgMDAwIC4wN2MwIC4wMy4wMS4wNS4wNS4wOWw0NS4wMiA0NS4wMmEuMi4yIDAgMDAuMDkuMDUuMTIuMTIgMCAwMC4wNyAwYy4wMiAwIC4wNC0uMDEuMDgtLjA1TDUxMiA1NTcuMjVsMTI3Ljg2IDEyNy44N2MuMDQuMDQuMDYuMDUuMDguMDVhLjEyLjEyIDAgMDAuMDcgMGMuMDMgMCAuMDUtLjAxLjA5LS4wNWw0NS4wMi00NS4wMmEuMi4yIDAgMDAuMDUtLjA5LjEyLjEyIDAgMDAwLS4wN3YtLjAyYS4yNy4yNyAwIDAwLS4wNS0uMDZMNTU3LjI1IDUxMmwxMjcuODctMTI3Ljg2Yy4wNC0uMDQuMDUtLjA2LjA1LS4wOGEuMTIuMTIgMCAwMDAtLjA3YzAtLjAzLS4wMS0uMDUtLjA1LS4wOWwtNDUuMDItNDUuMDJhLjIuMiAwIDAwLS4wOS0uMDUuMTIuMTIgMCAwMC0uMDcgMHoiIC8+PC9zdmc+) */
  11119. var CloseCircleFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CloseCircleFilled_CloseCircleFilled);
  11120. if (true) {
  11121. CloseCircleFilled_RefIcon.displayName = 'CloseCircleFilled';
  11122. }
  11123. /* harmony default export */ var icons_CloseCircleFilled = (CloseCircleFilled_RefIcon);
  11124. ;// ./node_modules/@ant-design/icons-svg/es/asn/CloseOutlined.js
  11125. // This icon file is generated automatically.
  11126. var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
  11127. /* harmony default export */ var asn_CloseOutlined = (CloseOutlined);
  11128. ;// ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js
  11129. // GENERATE BY ./scripts/generate.ts
  11130. // DON NOT EDIT IT MANUALLY
  11131. var CloseOutlined_CloseOutlined = function CloseOutlined(props, ref) {
  11132. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  11133. ref: ref,
  11134. icon: asn_CloseOutlined
  11135. }));
  11136. };
  11137. /**![close](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdmlld0JveD0iNjQgNjQgODk2IDg5NiIgZm9jdXNhYmxlPSJmYWxzZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNzk5Ljg2IDE2Ni4zMWMuMDIgMCAuMDQuMDIuMDguMDZsNTcuNjkgNTcuN2MuMDQuMDMuMDUuMDUuMDYuMDhhLjEyLjEyIDAgMDEwIC4wNmMwIC4wMy0uMDIuMDUtLjA2LjA5TDU2OS45MyA1MTJsMjg3LjcgMjg3LjdjLjA0LjA0LjA1LjA2LjA2LjA5YS4xMi4xMiAwIDAxMCAuMDdjMCAuMDItLjAyLjA0LS4wNi4wOGwtNTcuNyA1Ny42OWMtLjAzLjA0LS4wNS4wNS0uMDcuMDZhLjEyLjEyIDAgMDEtLjA3IDBjLS4wMyAwLS4wNS0uMDItLjA5LS4wNkw1MTIgNTY5LjkzbC0yODcuNyAyODcuN2MtLjA0LjA0LS4wNi4wNS0uMDkuMDZhLjEyLjEyIDAgMDEtLjA3IDBjLS4wMiAwLS4wNC0uMDItLjA4LS4wNmwtNTcuNjktNTcuN2MtLjA0LS4wMy0uMDUtLjA1LS4wNi0uMDdhLjEyLjEyIDAgMDEwLS4wN2MwLS4wMy4wMi0uMDUuMDYtLjA5TDQ1NC4wNyA1MTJsLTI4Ny43LTI4Ny43Yy0uMDQtLjA0LS4wNS0uMDYtLjA2LS4wOWEuMTIuMTIgMCAwMTAtLjA3YzAtLjAyLjAyLS4wNC4wNi0uMDhsNTcuNy01Ny42OWMuMDMtLjA0LjA1LS4wNS4wNy0uMDZhLjEyLjEyIDAgMDEuMDcgMGMuMDMgMCAuMDUuMDIuMDkuMDZMNTEyIDQ1NC4wN2wyODcuNy0yODcuN2MuMDQtLjA0LjA2LS4wNS4wOS0uMDZhLjEyLjEyIDAgMDEuMDcgMHoiIC8+PC9zdmc+) */
  11138. var CloseOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CloseOutlined_CloseOutlined);
  11139. if (true) {
  11140. CloseOutlined_RefIcon.displayName = 'CloseOutlined';
  11141. }
  11142. /* harmony default export */ var icons_CloseOutlined = (CloseOutlined_RefIcon);
  11143. ;// ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleFilled.js
  11144. // This icon file is generated automatically.
  11145. var ExclamationCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
  11146. /* harmony default export */ var asn_ExclamationCircleFilled = (ExclamationCircleFilled);
  11147. ;// ./node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js
  11148. // GENERATE BY ./scripts/generate.ts
  11149. // DON NOT EDIT IT MANUALLY
  11150. var ExclamationCircleFilled_ExclamationCircleFilled = function ExclamationCircleFilled(props, ref) {
  11151. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  11152. ref: ref,
  11153. icon: asn_ExclamationCircleFilled
  11154. }));
  11155. };
  11156. /**![exclamation-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0tMzIgMjMyYzAtNC40IDMuNi04IDgtOGg0OGM0LjQgMCA4IDMuNiA4IDh2MjcyYzAgNC40LTMuNiA4LTggOGgtNDhjLTQuNCAwLTgtMy42LTgtOFYyOTZ6bTMyIDQ0MGE0OC4wMSA0OC4wMSAwIDAxMC05NiA0OC4wMSA0OC4wMSAwIDAxMCA5NnoiIC8+PC9zdmc+) */
  11157. var ExclamationCircleFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ExclamationCircleFilled_ExclamationCircleFilled);
  11158. if (true) {
  11159. ExclamationCircleFilled_RefIcon.displayName = 'ExclamationCircleFilled';
  11160. }
  11161. /* harmony default export */ var icons_ExclamationCircleFilled = (ExclamationCircleFilled_RefIcon);
  11162. ;// ./node_modules/@ant-design/icons-svg/es/asn/InfoCircleFilled.js
  11163. // This icon file is generated automatically.
  11164. var InfoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
  11165. /* harmony default export */ var asn_InfoCircleFilled = (InfoCircleFilled);
  11166. ;// ./node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js
  11167. // GENERATE BY ./scripts/generate.ts
  11168. // DON NOT EDIT IT MANUALLY
  11169. var InfoCircleFilled_InfoCircleFilled = function InfoCircleFilled(props, ref) {
  11170. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  11171. ref: ref,
  11172. icon: asn_InfoCircleFilled
  11173. }));
  11174. };
  11175. /**![info-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0zMiA2NjRjMCA0LjQtMy42IDgtOCA4aC00OGMtNC40IDAtOC0zLjYtOC04VjQ1NmMwLTQuNCAzLjYtOCA4LThoNDhjNC40IDAgOCAzLjYgOCA4djI3MnptLTMyLTM0NGE0OC4wMSA0OC4wMSAwIDAxMC05NiA0OC4wMSA0OC4wMSAwIDAxMCA5NnoiIC8+PC9zdmc+) */
  11176. var InfoCircleFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InfoCircleFilled_InfoCircleFilled);
  11177. if (true) {
  11178. InfoCircleFilled_RefIcon.displayName = 'InfoCircleFilled';
  11179. }
  11180. /* harmony default export */ var icons_InfoCircleFilled = (InfoCircleFilled_RefIcon);
  11181. // EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 13 modules
  11182. var rc_motion_es = __webpack_require__("./node_modules/rc-motion/es/index.js");
  11183. // EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
  11184. var pickAttrs = __webpack_require__("./node_modules/rc-util/es/pickAttrs.js");
  11185. // EXTERNAL MODULE: ./components/_util/reactNode.ts
  11186. var reactNode = __webpack_require__("./components/_util/reactNode.ts");
  11187. // EXTERNAL MODULE: ./components/_util/warning.ts
  11188. var _util_warning = __webpack_require__("./components/_util/warning.ts");
  11189. // EXTERNAL MODULE: ./components/alert/style/index.ts
  11190. var alert_style = __webpack_require__("./components/alert/style/index.ts");
  11191. ;// ./components/alert/Alert.tsx
  11192. var Alert_rest = undefined && undefined.__rest || function (s, e) {
  11193. var t = {};
  11194. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  11195. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  11196. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  11197. }
  11198. return t;
  11199. };
  11200. const iconMapFilled = {
  11201. success: icons_CheckCircleFilled,
  11202. info: icons_InfoCircleFilled,
  11203. error: icons_CloseCircleFilled,
  11204. warning: icons_ExclamationCircleFilled
  11205. };
  11206. const IconNode = props => {
  11207. const {
  11208. icon,
  11209. prefixCls,
  11210. type
  11211. } = props;
  11212. const iconType = iconMapFilled[type] || null;
  11213. if (icon) {
  11214. return (0,reactNode.replaceElement)(icon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  11215. className: `${prefixCls}-icon`
  11216. }, icon), () => ({
  11217. className: classnames_default()(`${prefixCls}-icon`, icon.props.className)
  11218. }));
  11219. }
  11220. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(iconType, {
  11221. className: `${prefixCls}-icon`
  11222. });
  11223. };
  11224. const CloseIconNode = props => {
  11225. const {
  11226. isClosable,
  11227. prefixCls,
  11228. closeIcon,
  11229. handleClose,
  11230. ariaProps
  11231. } = props;
  11232. const mergedCloseIcon = closeIcon === true || closeIcon === undefined ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null) : closeIcon;
  11233. return isClosable ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", Object.assign({
  11234. type: "button",
  11235. onClick: handleClose,
  11236. className: `${prefixCls}-close-icon`,
  11237. tabIndex: 0
  11238. }, ariaProps), mergedCloseIcon)) : null;
  11239. };
  11240. const Alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  11241. const {
  11242. description,
  11243. prefixCls: customizePrefixCls,
  11244. message,
  11245. banner,
  11246. className,
  11247. rootClassName,
  11248. style,
  11249. onMouseEnter,
  11250. onMouseLeave,
  11251. onClick,
  11252. afterClose,
  11253. showIcon,
  11254. closable,
  11255. closeText,
  11256. closeIcon,
  11257. action,
  11258. id
  11259. } = props,
  11260. otherProps = Alert_rest(props, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]);
  11261. const [closed, setClosed] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  11262. if (true) {
  11263. const warning = (0,_util_warning.devUseWarning)('Alert');
  11264. warning.deprecated(!closeText, 'closeText', 'closable.closeIcon');
  11265. }
  11266. const internalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  11267. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  11268. nativeElement: internalRef.current
  11269. }));
  11270. const {
  11271. getPrefixCls,
  11272. direction,
  11273. closable: contextClosable,
  11274. closeIcon: contextCloseIcon,
  11275. className: contextClassName,
  11276. style: contextStyle
  11277. } = (0,config_provider_context.useComponentConfig)('alert');
  11278. const prefixCls = getPrefixCls('alert', customizePrefixCls);
  11279. const [wrapCSSVar, hashId, cssVarCls] = (0,alert_style["default"])(prefixCls);
  11280. const handleClose = e => {
  11281. var _a;
  11282. setClosed(true);
  11283. (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
  11284. };
  11285. const type = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  11286. if (props.type !== undefined) {
  11287. return props.type;
  11288. }
  11289. // banner mode defaults to 'warning'
  11290. return banner ? 'warning' : 'info';
  11291. }, [props.type, banner]);
  11292. // closeable when closeText or closeIcon is assigned
  11293. const isClosable = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  11294. if (typeof closable === 'object' && closable.closeIcon) return true;
  11295. if (closeText) {
  11296. return true;
  11297. }
  11298. if (typeof closable === 'boolean') {
  11299. return closable;
  11300. }
  11301. // should be true when closeIcon is 0 or ''
  11302. if (closeIcon !== false && closeIcon !== null && closeIcon !== undefined) {
  11303. return true;
  11304. }
  11305. return !!contextClosable;
  11306. }, [closeText, closeIcon, closable, contextClosable]);
  11307. // banner mode defaults to Icon
  11308. const isShowIcon = banner && showIcon === undefined ? true : showIcon;
  11309. const alertCls = classnames_default()(prefixCls, `${prefixCls}-${type}`, {
  11310. [`${prefixCls}-with-description`]: !!description,
  11311. [`${prefixCls}-no-icon`]: !isShowIcon,
  11312. [`${prefixCls}-banner`]: !!banner,
  11313. [`${prefixCls}-rtl`]: direction === 'rtl'
  11314. }, contextClassName, className, rootClassName, cssVarCls, hashId);
  11315. const restProps = (0,pickAttrs["default"])(otherProps, {
  11316. aria: true,
  11317. data: true
  11318. });
  11319. const mergedCloseIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  11320. if (typeof closable === 'object' && closable.closeIcon) {
  11321. return closable.closeIcon;
  11322. }
  11323. if (closeText) {
  11324. return closeText;
  11325. }
  11326. if (closeIcon !== undefined) {
  11327. return closeIcon;
  11328. }
  11329. if (typeof contextClosable === 'object' && contextClosable.closeIcon) {
  11330. return contextClosable.closeIcon;
  11331. }
  11332. return contextCloseIcon;
  11333. }, [closeIcon, closable, closeText, contextCloseIcon]);
  11334. const mergedAriaProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  11335. const merged = closable !== null && closable !== void 0 ? closable : contextClosable;
  11336. if (typeof merged === 'object') {
  11337. const {
  11338. closeIcon: _
  11339. } = merged,
  11340. ariaProps = Alert_rest(merged, ["closeIcon"]);
  11341. return ariaProps;
  11342. }
  11343. return {};
  11344. }, [closable, contextClosable]);
  11345. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  11346. visible: !closed,
  11347. motionName: `${prefixCls}-motion`,
  11348. motionAppear: false,
  11349. motionEnter: false,
  11350. onLeaveStart: node => ({
  11351. maxHeight: node.offsetHeight
  11352. }),
  11353. onLeaveEnd: afterClose
  11354. }, ({
  11355. className: motionClassName,
  11356. style: motionStyle
  11357. }, setRef) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  11358. id: id,
  11359. ref: (0,es_ref.composeRef)(internalRef, setRef),
  11360. "data-show": !closed,
  11361. className: classnames_default()(alertCls, motionClassName),
  11362. style: Object.assign(Object.assign(Object.assign({}, contextStyle), style), motionStyle),
  11363. onMouseEnter: onMouseEnter,
  11364. onMouseLeave: onMouseLeave,
  11365. onClick: onClick,
  11366. role: "alert"
  11367. }, restProps), isShowIcon ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IconNode, {
  11368. description: description,
  11369. icon: props.icon,
  11370. prefixCls: prefixCls,
  11371. type: type
  11372. })) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11373. className: `${prefixCls}-content`
  11374. }, message ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11375. className: `${prefixCls}-message`
  11376. }, message) : null, description ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11377. className: `${prefixCls}-description`
  11378. }, description) : null), action ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11379. className: `${prefixCls}-action`
  11380. }, action) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CloseIconNode, {
  11381. isClosable: isClosable,
  11382. prefixCls: prefixCls,
  11383. closeIcon: mergedCloseIcon,
  11384. handleClose: handleClose,
  11385. ariaProps: mergedAriaProps
  11386. })))));
  11387. });
  11388. if (true) {
  11389. Alert.displayName = 'Alert';
  11390. }
  11391. /* harmony default export */ var alert_Alert = (Alert);
  11392. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
  11393. var getPrototypeOf = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
  11394. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
  11395. var isNativeReflectConstruct = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js");
  11396. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
  11397. var possibleConstructorReturn = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
  11398. ;// ./node_modules/@babel/runtime/helpers/esm/callSuper.js
  11399. function _callSuper(t, o, e) {
  11400. return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e));
  11401. }
  11402. ;// ./components/alert/ErrorBoundary.tsx
  11403. let ErrorBoundary = /*#__PURE__*/function (_React$Component) {
  11404. function ErrorBoundary() {
  11405. var _this;
  11406. (0,classCallCheck["default"])(this, ErrorBoundary);
  11407. _this = _callSuper(this, ErrorBoundary, arguments);
  11408. _this.state = {
  11409. error: undefined,
  11410. info: {
  11411. componentStack: ''
  11412. }
  11413. };
  11414. return _this;
  11415. }
  11416. (0,inherits["default"])(ErrorBoundary, _React$Component);
  11417. return (0,createClass["default"])(ErrorBoundary, [{
  11418. key: "componentDidCatch",
  11419. value: function componentDidCatch(error, info) {
  11420. this.setState({
  11421. error,
  11422. info
  11423. });
  11424. }
  11425. }, {
  11426. key: "render",
  11427. value: function render() {
  11428. const {
  11429. message,
  11430. description,
  11431. id,
  11432. children
  11433. } = this.props;
  11434. const {
  11435. error,
  11436. info
  11437. } = this.state;
  11438. const componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;
  11439. const errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;
  11440. const errorDescription = typeof description === 'undefined' ? componentStack : description;
  11441. if (error) {
  11442. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(alert_Alert, {
  11443. id: id,
  11444. type: "error",
  11445. message: errorMessage,
  11446. description: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("pre", {
  11447. style: {
  11448. fontSize: '0.9em',
  11449. overflowX: 'auto'
  11450. }
  11451. }, errorDescription)
  11452. });
  11453. }
  11454. return children;
  11455. }
  11456. }]);
  11457. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  11458. /* harmony default export */ var alert_ErrorBoundary = (ErrorBoundary);
  11459. ;// ./components/alert/index.tsx
  11460. const components_alert_Alert = alert_Alert;
  11461. components_alert_Alert.ErrorBoundary = alert_ErrorBoundary;
  11462. /* harmony default export */ var components_alert = (components_alert_Alert);
  11463. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useEvent.js
  11464. var useEvent = __webpack_require__("./node_modules/rc-util/es/hooks/useEvent.js");
  11465. ;// ./node_modules/compute-scroll-into-view/dist/index.js
  11466. const t=t=>"object"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||"hidden"!==t)&&("visible"!==t&&"clip"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},dist_r=(e,r)=>{var i,s,d,h;if("undefined"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p="function"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k="start"===f||"nearest"===f?x-T:"end"===f?I+F:x+v/2-T+F,D="center"===u?R+E/2-V+B:"end"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:l,width:r,top:i,right:s,bottom:d,left:h}=e.getBoundingClientRect();if("if-needed"===c&&x>=0&&R>=0&&I<=H&&C<=b&&(e===m&&!n(e)||x>=i&&I<=d&&R>=h&&C<=s))return L;const a=getComputedStyle(e),g=parseInt(a.borderLeftWidth,10),p=parseInt(a.borderTopWidth,10),W=parseInt(a.borderRightWidth,10),T=parseInt(a.borderBottomWidth,10);let B=0,F=0;const V="offsetWidth"in e?e.offsetWidth-e.clientWidth-g-W:0,S="offsetHeight"in e?e.offsetHeight-e.clientHeight-p-T:0,X="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,Y="offsetHeight"in e?0===e.offsetHeight?0:l/e.offsetHeight:0;if(m===e)B="start"===f?k:"end"===f?k-H:"nearest"===f?o(M,M+H,H,p,T,M+k,M+k+v,v):k-H/2,F="start"===u?D:"center"===u?D-b/2:"end"===u?D-b:o(y,y+b,b,g,W,y+D,y+D+E,E),B=Math.max(0,B+M),F=Math.max(0,F+y);else{B="start"===f?k-i-p:"end"===f?k-d+T+S:"nearest"===f?o(i,d,l,p,T+S,k,k+v,v):k-(i+l/2)+S/2,F="start"===u?D-h-g:"center"===u?D-(h+r/2)+V/2:"end"===u?D-s+W+V:o(h,s,r,g,W+V,D,D+E,E);const{scrollLeft:t,scrollTop:n}=e;B=0===Y?0:Math.max(0,Math.min(n+B/Y,e.scrollHeight-l/Y+S)),F=0===X?0:Math.max(0,Math.min(t+F/X,e.scrollWidth-r/X+V)),k+=n-B,D+=t-F}L.push({el:e,top:B,left:F})}return L};//# sourceMappingURL=index.js.map
  11467. ;// ./node_modules/scroll-into-view-if-needed/dist/index.js
  11468. const dist_o=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function dist_e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(r))return r.behavior(dist_r(e,r));const l="boolean"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of dist_r(e,dist_o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}//# sourceMappingURL=index.js.map
  11469. ;// ./components/_util/getScroll.ts
  11470. function isWindow(obj) {
  11471. return obj !== null && obj !== undefined && obj === obj.window;
  11472. }
  11473. const getScroll = target => {
  11474. var _a, _b;
  11475. if (typeof window === 'undefined') {
  11476. /* istanbul ignore next */
  11477. return 0;
  11478. }
  11479. let result = 0;
  11480. if (isWindow(target)) {
  11481. result = target.pageYOffset;
  11482. } else if (target instanceof Document) {
  11483. result = target.documentElement.scrollTop;
  11484. } else if (target instanceof HTMLElement) {
  11485. result = target.scrollTop;
  11486. } else if (target) {
  11487. // According to the type inference, the `target` is `never` type.
  11488. // Since we configured the loose mode type checking, and supports mocking the target with such shape below::
  11489. // `{ documentElement: { scrollLeft: 200, scrollTop: 400 } }`,
  11490. // the program may falls into this branch.
  11491. // Check the corresponding tests for details. Don't sure what is the real scenario this happens.
  11492. /* biome-ignore lint/complexity/useLiteralKeys: target is a never type */ /* eslint-disable-next-line dot-notation */
  11493. result = target['scrollTop'];
  11494. }
  11495. if (target && !isWindow(target) && typeof result !== 'number') {
  11496. result = (_b = ((_a = target.ownerDocument) !== null && _a !== void 0 ? _a : target).documentElement) === null || _b === void 0 ? void 0 : _b.scrollTop;
  11497. }
  11498. return result;
  11499. };
  11500. /* harmony default export */ var _util_getScroll = (getScroll);
  11501. ;// ./components/_util/easings.ts
  11502. function easeInOutCubic(t, b, c, d) {
  11503. const cc = c - b;
  11504. t /= d / 2;
  11505. if (t < 1) {
  11506. return cc / 2 * t * t * t + b;
  11507. }
  11508. // biome-ignore lint: it is a common easing function
  11509. return cc / 2 * ((t -= 2) * t * t + 2) + b;
  11510. }
  11511. ;// ./components/_util/scrollTo.ts
  11512. function scrollTo(y, options = {}) {
  11513. const {
  11514. getContainer = () => window,
  11515. callback,
  11516. duration = 450
  11517. } = options;
  11518. const container = getContainer();
  11519. const scrollTop = _util_getScroll(container);
  11520. const startTime = Date.now();
  11521. const frameFunc = () => {
  11522. const timestamp = Date.now();
  11523. const time = timestamp - startTime;
  11524. const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
  11525. if (isWindow(container)) {
  11526. container.scrollTo(window.pageXOffset, nextScrollTop);
  11527. } else if (container instanceof Document || container.constructor.name === 'HTMLDocument') {
  11528. container.documentElement.scrollTop = nextScrollTop;
  11529. } else {
  11530. container.scrollTop = nextScrollTop;
  11531. }
  11532. if (time < duration) {
  11533. (0,raf["default"])(frameFunc);
  11534. } else if (typeof callback === 'function') {
  11535. callback();
  11536. }
  11537. };
  11538. (0,raf["default"])(frameFunc);
  11539. }
  11540. // EXTERNAL MODULE: ./components/theme/useToken.ts
  11541. var useToken = __webpack_require__("./components/theme/useToken.ts");
  11542. ;// ./components/config-provider/hooks/useCSSVarCls.ts
  11543. /**
  11544. * This hook is only for cssVar to add root className for components.
  11545. * If root ClassName is needed, this hook could be refactored with `-root`
  11546. * @param prefixCls
  11547. */
  11548. const useCSSVarCls = prefixCls => {
  11549. const [,,,, cssVar] = (0,useToken["default"])();
  11550. return cssVar ? `${prefixCls}-css-var` : '';
  11551. };
  11552. /* harmony default export */ var hooks_useCSSVarCls = (useCSSVarCls);
  11553. ;// ./components/anchor/context.ts
  11554. const AnchorContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
  11555. /* harmony default export */ var anchor_context = (AnchorContext);
  11556. ;// ./components/anchor/AnchorLink.tsx
  11557. const AnchorLink = props => {
  11558. const {
  11559. href,
  11560. title,
  11561. prefixCls: customizePrefixCls,
  11562. children,
  11563. className,
  11564. target,
  11565. replace
  11566. } = props;
  11567. const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(anchor_context);
  11568. const {
  11569. registerLink,
  11570. unregisterLink,
  11571. scrollTo,
  11572. onClick,
  11573. activeLink,
  11574. direction
  11575. } = context || {};
  11576. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  11577. registerLink === null || registerLink === void 0 ? void 0 : registerLink(href);
  11578. return () => {
  11579. unregisterLink === null || unregisterLink === void 0 ? void 0 : unregisterLink(href);
  11580. };
  11581. }, [href]);
  11582. const handleClick = e => {
  11583. onClick === null || onClick === void 0 ? void 0 : onClick(e, {
  11584. title,
  11585. href
  11586. });
  11587. scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
  11588. // Support clicking on an anchor does not record history.
  11589. if (e.defaultPrevented) {
  11590. return;
  11591. }
  11592. const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
  11593. // Support external link
  11594. if (isExternalLink) {
  11595. if (replace) {
  11596. e.preventDefault();
  11597. window.location.replace(href);
  11598. }
  11599. return;
  11600. }
  11601. // Handling internal anchor link
  11602. e.preventDefault();
  11603. const historyMethod = replace ? 'replaceState' : 'pushState';
  11604. window.history[historyMethod](null, '', href);
  11605. };
  11606. // =================== Warning =====================
  11607. if (true) {
  11608. const warning = (0,_util_warning.devUseWarning)('Anchor.Link');
  11609. true ? warning(!children || direction !== 'horizontal', 'usage', '`Anchor.Link children` is not supported when `Anchor` direction is horizontal') : 0;
  11610. }
  11611. const {
  11612. getPrefixCls
  11613. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  11614. const prefixCls = getPrefixCls('anchor', customizePrefixCls);
  11615. const active = activeLink === href;
  11616. const wrapperClassName = classnames_default()(`${prefixCls}-link`, className, {
  11617. [`${prefixCls}-link-active`]: active
  11618. });
  11619. const titleClassName = classnames_default()(`${prefixCls}-link-title`, {
  11620. [`${prefixCls}-link-title-active`]: active
  11621. });
  11622. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11623. className: wrapperClassName
  11624. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  11625. className: titleClassName,
  11626. href: href,
  11627. title: typeof title === 'string' ? title : '',
  11628. target: target,
  11629. onClick: handleClick
  11630. }, title), direction !== 'horizontal' ? children : null);
  11631. };
  11632. /* harmony default export */ var anchor_AnchorLink = (AnchorLink);
  11633. // EXTERNAL MODULE: ./components/anchor/style/index.ts
  11634. var anchor_style = __webpack_require__("./components/anchor/style/index.ts");
  11635. ;// ./components/anchor/Anchor.tsx
  11636. function getDefaultContainer() {
  11637. return window;
  11638. }
  11639. function getOffsetTop(element, container) {
  11640. if (!element.getClientRects().length) {
  11641. return 0;
  11642. }
  11643. const rect = element.getBoundingClientRect();
  11644. if (rect.width || rect.height) {
  11645. if (container === window) {
  11646. return rect.top - element.ownerDocument.documentElement.clientTop;
  11647. }
  11648. return rect.top - container.getBoundingClientRect().top;
  11649. }
  11650. return rect.top;
  11651. }
  11652. const sharpMatcherRegex = /#([\S ]+)$/;
  11653. const Anchor = props => {
  11654. var _a;
  11655. const {
  11656. rootClassName,
  11657. prefixCls: customPrefixCls,
  11658. className,
  11659. style,
  11660. offsetTop,
  11661. affix = true,
  11662. showInkInFixed = false,
  11663. children,
  11664. items,
  11665. direction: anchorDirection = 'vertical',
  11666. bounds,
  11667. targetOffset,
  11668. onClick,
  11669. onChange,
  11670. getContainer,
  11671. getCurrentAnchor,
  11672. replace
  11673. } = props;
  11674. // =================== Warning =====================
  11675. if (true) {
  11676. const warning = (0,_util_warning.devUseWarning)('Anchor');
  11677. warning.deprecated(!children, 'Anchor children', 'items');
  11678. true ? warning(!(anchorDirection === 'horizontal' && (items === null || items === void 0 ? void 0 : items.some(n => 'children' in n))), 'usage', '`Anchor items#children` is not supported when `Anchor` direction is horizontal.') : 0;
  11679. }
  11680. const [links, setLinks] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  11681. const [activeLink, setActiveLink] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  11682. const activeLinkRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(activeLink);
  11683. const wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  11684. const spanLinkNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  11685. const animating = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  11686. const {
  11687. direction,
  11688. getPrefixCls,
  11689. className: anchorClassName,
  11690. style: anchorStyle
  11691. } = (0,config_provider_context.useComponentConfig)('anchor');
  11692. const {
  11693. getTargetContainer
  11694. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  11695. const prefixCls = getPrefixCls('anchor', customPrefixCls);
  11696. const rootCls = hooks_useCSSVarCls(prefixCls);
  11697. const [wrapCSSVar, hashId, cssVarCls] = (0,anchor_style["default"])(prefixCls, rootCls);
  11698. const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;
  11699. const dependencyListItem = JSON.stringify(links);
  11700. const registerLink = (0,useEvent["default"])(link => {
  11701. if (!links.includes(link)) {
  11702. setLinks(prev => [].concat((0,toConsumableArray["default"])(prev), [link]));
  11703. }
  11704. });
  11705. const unregisterLink = (0,useEvent["default"])(link => {
  11706. if (links.includes(link)) {
  11707. setLinks(prev => prev.filter(i => i !== link));
  11708. }
  11709. });
  11710. const updateInk = () => {
  11711. var _a;
  11712. const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);
  11713. if (linkNode && spanLinkNode.current) {
  11714. const {
  11715. style: inkStyle
  11716. } = spanLinkNode.current;
  11717. const horizontalAnchor = anchorDirection === 'horizontal';
  11718. inkStyle.top = horizontalAnchor ? '' : `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;
  11719. inkStyle.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;
  11720. inkStyle.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';
  11721. inkStyle.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';
  11722. if (horizontalAnchor) {
  11723. dist_e(linkNode, {
  11724. scrollMode: 'if-needed',
  11725. block: 'nearest'
  11726. });
  11727. }
  11728. }
  11729. };
  11730. const getInternalCurrentAnchor = (_links, _offsetTop = 0, _bounds = 5) => {
  11731. const linkSections = [];
  11732. const container = getCurrentContainer();
  11733. _links.forEach(link => {
  11734. const sharpLinkMatch = sharpMatcherRegex.exec(link === null || link === void 0 ? void 0 : link.toString());
  11735. if (!sharpLinkMatch) {
  11736. return;
  11737. }
  11738. const target = document.getElementById(sharpLinkMatch[1]);
  11739. if (target) {
  11740. const top = getOffsetTop(target, container);
  11741. if (top <= _offsetTop + _bounds) {
  11742. linkSections.push({
  11743. link,
  11744. top
  11745. });
  11746. }
  11747. }
  11748. });
  11749. if (linkSections.length) {
  11750. const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
  11751. return maxSection.link;
  11752. }
  11753. return '';
  11754. };
  11755. const setCurrentActiveLink = (0,useEvent["default"])(link => {
  11756. // FIXME: Seems a bug since this compare is not equals
  11757. // `activeLinkRef` is parsed value which will always trigger `onChange` event.
  11758. if (activeLinkRef.current === link) {
  11759. return;
  11760. }
  11761. // https://github.com/ant-design/ant-design/issues/30584
  11762. const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;
  11763. setActiveLink(newLink);
  11764. activeLinkRef.current = newLink;
  11765. // onChange should respect the original link (which may caused by
  11766. // window scroll or user click), not the new link
  11767. onChange === null || onChange === void 0 ? void 0 : onChange(link);
  11768. });
  11769. const handleScroll = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(() => {
  11770. if (animating.current) {
  11771. return;
  11772. }
  11773. const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);
  11774. setCurrentActiveLink(currentActiveLink);
  11775. }, [dependencyListItem, targetOffset, offsetTop]);
  11776. const handleScrollTo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(link => {
  11777. setCurrentActiveLink(link);
  11778. const sharpLinkMatch = sharpMatcherRegex.exec(link);
  11779. if (!sharpLinkMatch) {
  11780. return;
  11781. }
  11782. const targetElement = document.getElementById(sharpLinkMatch[1]);
  11783. if (!targetElement) {
  11784. return;
  11785. }
  11786. const container = getCurrentContainer();
  11787. const scrollTop = _util_getScroll(container);
  11788. const eleOffsetTop = getOffsetTop(targetElement, container);
  11789. let y = scrollTop + eleOffsetTop;
  11790. y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;
  11791. animating.current = true;
  11792. scrollTo(y, {
  11793. getContainer: getCurrentContainer,
  11794. callback() {
  11795. animating.current = false;
  11796. }
  11797. });
  11798. }, [targetOffset, offsetTop]);
  11799. const wrapperClass = classnames_default()(hashId, cssVarCls, rootCls, rootClassName, `${prefixCls}-wrapper`, {
  11800. [`${prefixCls}-wrapper-horizontal`]: anchorDirection === 'horizontal',
  11801. [`${prefixCls}-rtl`]: direction === 'rtl'
  11802. }, className, anchorClassName);
  11803. const anchorClass = classnames_default()(prefixCls, {
  11804. [`${prefixCls}-fixed`]: !affix && !showInkInFixed
  11805. });
  11806. const inkClass = classnames_default()(`${prefixCls}-ink`, {
  11807. [`${prefixCls}-ink-visible`]: activeLink
  11808. });
  11809. const wrapperStyle = Object.assign(Object.assign({
  11810. maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'
  11811. }, anchorStyle), style);
  11812. const createNestedLink = options => Array.isArray(options) ? options.map(item => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(anchor_AnchorLink, Object.assign({
  11813. replace: replace
  11814. }, item, {
  11815. key: item.key
  11816. }), anchorDirection === 'vertical' && createNestedLink(item.children)))) : null;
  11817. const anchorContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11818. ref: wrapperRef,
  11819. className: wrapperClass,
  11820. style: wrapperStyle
  11821. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11822. className: anchorClass
  11823. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  11824. className: inkClass,
  11825. ref: spanLinkNode
  11826. }), 'items' in props ? createNestedLink(items) : children));
  11827. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  11828. const scrollContainer = getCurrentContainer();
  11829. handleScroll();
  11830. scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);
  11831. return () => {
  11832. scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);
  11833. };
  11834. }, [dependencyListItem]);
  11835. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  11836. if (typeof getCurrentAnchor === 'function') {
  11837. setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));
  11838. }
  11839. }, [getCurrentAnchor]);
  11840. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  11841. updateInk();
  11842. }, [anchorDirection, getCurrentAnchor, dependencyListItem, activeLink]);
  11843. const memoizedContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  11844. registerLink,
  11845. unregisterLink,
  11846. scrollTo: handleScrollTo,
  11847. activeLink,
  11848. onClick,
  11849. direction: anchorDirection
  11850. }), [activeLink, onClick, handleScrollTo, anchorDirection]);
  11851. const affixProps = affix && typeof affix === 'object' ? affix : undefined;
  11852. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(anchor_context.Provider, {
  11853. value: memoizedContextValue
  11854. }, affix ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_affix, Object.assign({
  11855. offsetTop: offsetTop,
  11856. target: getCurrentContainer
  11857. }, affixProps), anchorContent)) : anchorContent));
  11858. };
  11859. if (true) {
  11860. Anchor.displayName = 'Anchor';
  11861. }
  11862. /* harmony default export */ var anchor_Anchor = (Anchor);
  11863. ;// ./components/anchor/index.tsx
  11864. const components_anchor_Anchor = anchor_Anchor;
  11865. components_anchor_Anchor.Link = anchor_AnchorLink;
  11866. /* harmony default export */ var components_anchor = (components_anchor_Anchor);
  11867. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  11868. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  11869. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
  11870. var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
  11871. // EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
  11872. var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__("react-dom");
  11873. var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
  11874. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  11875. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  11876. // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
  11877. var KeyCode = __webpack_require__("./node_modules/rc-util/es/KeyCode.js");
  11878. ;// ./node_modules/rc-notification/es/Notice.js
  11879. var Notify = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  11880. var prefixCls = props.prefixCls,
  11881. style = props.style,
  11882. className = props.className,
  11883. _props$duration = props.duration,
  11884. duration = _props$duration === void 0 ? 4.5 : _props$duration,
  11885. showProgress = props.showProgress,
  11886. _props$pauseOnHover = props.pauseOnHover,
  11887. pauseOnHover = _props$pauseOnHover === void 0 ? true : _props$pauseOnHover,
  11888. eventKey = props.eventKey,
  11889. content = props.content,
  11890. closable = props.closable,
  11891. _props$closeIcon = props.closeIcon,
  11892. closeIcon = _props$closeIcon === void 0 ? 'x' : _props$closeIcon,
  11893. divProps = props.props,
  11894. onClick = props.onClick,
  11895. onNoticeClose = props.onNoticeClose,
  11896. times = props.times,
  11897. forcedHovering = props.hovering;
  11898. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  11899. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  11900. hovering = _React$useState2[0],
  11901. setHovering = _React$useState2[1];
  11902. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  11903. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  11904. percent = _React$useState4[0],
  11905. setPercent = _React$useState4[1];
  11906. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  11907. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  11908. spentTime = _React$useState6[0],
  11909. setSpentTime = _React$useState6[1];
  11910. var mergedHovering = forcedHovering || hovering;
  11911. var mergedShowProgress = duration > 0 && showProgress;
  11912. // ======================== Close =========================
  11913. var onInternalClose = function onInternalClose() {
  11914. onNoticeClose(eventKey);
  11915. };
  11916. var onCloseKeyDown = function onCloseKeyDown(e) {
  11917. if (e.key === 'Enter' || e.code === 'Enter' || e.keyCode === KeyCode["default"].ENTER) {
  11918. onInternalClose();
  11919. }
  11920. };
  11921. // ======================== Effect ========================
  11922. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  11923. if (!mergedHovering && duration > 0) {
  11924. var start = Date.now() - spentTime;
  11925. var timeout = setTimeout(function () {
  11926. onInternalClose();
  11927. }, duration * 1000 - spentTime);
  11928. return function () {
  11929. if (pauseOnHover) {
  11930. clearTimeout(timeout);
  11931. }
  11932. setSpentTime(Date.now() - start);
  11933. };
  11934. }
  11935. // eslint-disable-next-line react-hooks/exhaustive-deps
  11936. }, [duration, mergedHovering, times]);
  11937. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  11938. if (!mergedHovering && mergedShowProgress && (pauseOnHover || spentTime === 0)) {
  11939. var start = performance.now();
  11940. var animationFrame;
  11941. var calculate = function calculate() {
  11942. cancelAnimationFrame(animationFrame);
  11943. animationFrame = requestAnimationFrame(function (timestamp) {
  11944. var runtime = timestamp + spentTime - start;
  11945. var progress = Math.min(runtime / (duration * 1000), 1);
  11946. setPercent(progress * 100);
  11947. if (progress < 1) {
  11948. calculate();
  11949. }
  11950. });
  11951. };
  11952. calculate();
  11953. return function () {
  11954. if (pauseOnHover) {
  11955. cancelAnimationFrame(animationFrame);
  11956. }
  11957. };
  11958. }
  11959. // eslint-disable-next-line react-hooks/exhaustive-deps
  11960. }, [duration, spentTime, mergedHovering, mergedShowProgress, times]);
  11961. // ======================== Closable ========================
  11962. var closableObj = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  11963. if ((0,esm_typeof["default"])(closable) === 'object' && closable !== null) {
  11964. return closable;
  11965. }
  11966. if (closable) {
  11967. return {
  11968. closeIcon: closeIcon
  11969. };
  11970. }
  11971. return {};
  11972. }, [closable, closeIcon]);
  11973. var ariaProps = (0,pickAttrs["default"])(closableObj, true);
  11974. // ======================== Progress ========================
  11975. var validPercent = 100 - (!percent || percent < 0 ? 0 : percent > 100 ? 100 : percent);
  11976. // ======================== Render ========================
  11977. var noticePrefixCls = "".concat(prefixCls, "-notice");
  11978. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, divProps, {
  11979. ref: ref,
  11980. className: classnames_default()(noticePrefixCls, className, (0,defineProperty["default"])({}, "".concat(noticePrefixCls, "-closable"), closable)),
  11981. style: style,
  11982. onMouseEnter: function onMouseEnter(e) {
  11983. var _divProps$onMouseEnte;
  11984. setHovering(true);
  11985. divProps === null || divProps === void 0 || (_divProps$onMouseEnte = divProps.onMouseEnter) === null || _divProps$onMouseEnte === void 0 || _divProps$onMouseEnte.call(divProps, e);
  11986. },
  11987. onMouseLeave: function onMouseLeave(e) {
  11988. var _divProps$onMouseLeav;
  11989. setHovering(false);
  11990. divProps === null || divProps === void 0 || (_divProps$onMouseLeav = divProps.onMouseLeave) === null || _divProps$onMouseLeav === void 0 || _divProps$onMouseLeav.call(divProps, e);
  11991. },
  11992. onClick: onClick
  11993. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  11994. className: "".concat(noticePrefixCls, "-content")
  11995. }, content), closable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", (0,esm_extends["default"])({
  11996. tabIndex: 0,
  11997. className: "".concat(noticePrefixCls, "-close"),
  11998. onKeyDown: onCloseKeyDown,
  11999. "aria-label": "Close"
  12000. }, ariaProps, {
  12001. onClick: function onClick(e) {
  12002. e.preventDefault();
  12003. e.stopPropagation();
  12004. onInternalClose();
  12005. }
  12006. }), closableObj.closeIcon), mergedShowProgress && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("progress", {
  12007. className: "".concat(noticePrefixCls, "-progress"),
  12008. max: "100",
  12009. value: validPercent
  12010. }, validPercent + '%'));
  12011. });
  12012. /* harmony default export */ var Notice = (Notify);
  12013. ;// ./node_modules/rc-notification/es/NotificationProvider.js
  12014. var NotificationContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  12015. var NotificationProvider = function NotificationProvider(_ref) {
  12016. var children = _ref.children,
  12017. classNames = _ref.classNames;
  12018. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NotificationContext.Provider, {
  12019. value: {
  12020. classNames: classNames
  12021. }
  12022. }, children);
  12023. };
  12024. /* harmony default export */ var es_NotificationProvider = (NotificationProvider);
  12025. ;// ./node_modules/rc-notification/es/hooks/useStack.js
  12026. var DEFAULT_OFFSET = 8;
  12027. var DEFAULT_THRESHOLD = 3;
  12028. var DEFAULT_GAP = 16;
  12029. var useStack = function useStack(config) {
  12030. var result = {
  12031. offset: DEFAULT_OFFSET,
  12032. threshold: DEFAULT_THRESHOLD,
  12033. gap: DEFAULT_GAP
  12034. };
  12035. if (config && (0,esm_typeof["default"])(config) === 'object') {
  12036. var _config$offset, _config$threshold, _config$gap;
  12037. result.offset = (_config$offset = config.offset) !== null && _config$offset !== void 0 ? _config$offset : DEFAULT_OFFSET;
  12038. result.threshold = (_config$threshold = config.threshold) !== null && _config$threshold !== void 0 ? _config$threshold : DEFAULT_THRESHOLD;
  12039. result.gap = (_config$gap = config.gap) !== null && _config$gap !== void 0 ? _config$gap : DEFAULT_GAP;
  12040. }
  12041. return [!!config, result];
  12042. };
  12043. /* harmony default export */ var hooks_useStack = (useStack);
  12044. ;// ./node_modules/rc-notification/es/NoticeList.js
  12045. var _excluded = ["className", "style", "classNames", "styles"];
  12046. var NoticeList = function NoticeList(props) {
  12047. var configList = props.configList,
  12048. placement = props.placement,
  12049. prefixCls = props.prefixCls,
  12050. className = props.className,
  12051. style = props.style,
  12052. motion = props.motion,
  12053. onAllNoticeRemoved = props.onAllNoticeRemoved,
  12054. onNoticeClose = props.onNoticeClose,
  12055. stackConfig = props.stack;
  12056. var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NotificationContext),
  12057. ctxCls = _useContext.classNames;
  12058. var dictRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
  12059. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  12060. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  12061. latestNotice = _useState2[0],
  12062. setLatestNotice = _useState2[1];
  12063. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
  12064. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  12065. hoverKeys = _useState4[0],
  12066. setHoverKeys = _useState4[1];
  12067. var keys = configList.map(function (config) {
  12068. return {
  12069. config: config,
  12070. key: String(config.key)
  12071. };
  12072. });
  12073. var _useStack = hooks_useStack(stackConfig),
  12074. _useStack2 = (0,slicedToArray["default"])(_useStack, 2),
  12075. stack = _useStack2[0],
  12076. _useStack2$ = _useStack2[1],
  12077. offset = _useStack2$.offset,
  12078. threshold = _useStack2$.threshold,
  12079. gap = _useStack2$.gap;
  12080. var expanded = stack && (hoverKeys.length > 0 || keys.length <= threshold);
  12081. var placementMotion = typeof motion === 'function' ? motion(placement) : motion;
  12082. // Clean hover key
  12083. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  12084. if (stack && hoverKeys.length > 1) {
  12085. setHoverKeys(function (prev) {
  12086. return prev.filter(function (key) {
  12087. return keys.some(function (_ref) {
  12088. var dataKey = _ref.key;
  12089. return key === dataKey;
  12090. });
  12091. });
  12092. });
  12093. }
  12094. }, [hoverKeys, keys, stack]);
  12095. // Force update latest notice
  12096. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  12097. var _keys;
  12098. if (stack && dictRef.current[(_keys = keys[keys.length - 1]) === null || _keys === void 0 ? void 0 : _keys.key]) {
  12099. var _keys2;
  12100. setLatestNotice(dictRef.current[(_keys2 = keys[keys.length - 1]) === null || _keys2 === void 0 ? void 0 : _keys2.key]);
  12101. }
  12102. }, [keys, stack]);
  12103. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es.CSSMotionList, (0,esm_extends["default"])({
  12104. key: placement,
  12105. className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), ctxCls === null || ctxCls === void 0 ? void 0 : ctxCls.list, className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-stack"), !!stack), "".concat(prefixCls, "-stack-expanded"), expanded)),
  12106. style: style,
  12107. keys: keys,
  12108. motionAppear: true
  12109. }, placementMotion, {
  12110. onAllRemoved: function onAllRemoved() {
  12111. onAllNoticeRemoved(placement);
  12112. }
  12113. }), function (_ref2, nodeRef) {
  12114. var config = _ref2.config,
  12115. motionClassName = _ref2.className,
  12116. motionStyle = _ref2.style,
  12117. motionIndex = _ref2.index;
  12118. var _ref3 = config,
  12119. key = _ref3.key,
  12120. times = _ref3.times;
  12121. var strKey = String(key);
  12122. var _ref4 = config,
  12123. configClassName = _ref4.className,
  12124. configStyle = _ref4.style,
  12125. configClassNames = _ref4.classNames,
  12126. configStyles = _ref4.styles,
  12127. restConfig = (0,objectWithoutProperties["default"])(_ref4, _excluded);
  12128. var dataIndex = keys.findIndex(function (item) {
  12129. return item.key === strKey;
  12130. });
  12131. // If dataIndex is -1, that means this notice has been removed in data, but still in dom
  12132. // Should minus (motionIndex - 1) to get the correct index because keys.length is not the same as dom length
  12133. var stackStyle = {};
  12134. if (stack) {
  12135. var index = keys.length - 1 - (dataIndex > -1 ? dataIndex : motionIndex - 1);
  12136. var transformX = placement === 'top' || placement === 'bottom' ? '-50%' : '0';
  12137. if (index > 0) {
  12138. var _dictRef$current$strK, _dictRef$current$strK2, _dictRef$current$strK3;
  12139. stackStyle.height = expanded ? (_dictRef$current$strK = dictRef.current[strKey]) === null || _dictRef$current$strK === void 0 ? void 0 : _dictRef$current$strK.offsetHeight : latestNotice === null || latestNotice === void 0 ? void 0 : latestNotice.offsetHeight;
  12140. // Transform
  12141. var verticalOffset = 0;
  12142. for (var i = 0; i < index; i++) {
  12143. var _dictRef$current$keys;
  12144. verticalOffset += ((_dictRef$current$keys = dictRef.current[keys[keys.length - 1 - i].key]) === null || _dictRef$current$keys === void 0 ? void 0 : _dictRef$current$keys.offsetHeight) + gap;
  12145. }
  12146. var transformY = (expanded ? verticalOffset : index * offset) * (placement.startsWith('top') ? 1 : -1);
  12147. var scaleX = !expanded && latestNotice !== null && latestNotice !== void 0 && latestNotice.offsetWidth && (_dictRef$current$strK2 = dictRef.current[strKey]) !== null && _dictRef$current$strK2 !== void 0 && _dictRef$current$strK2.offsetWidth ? ((latestNotice === null || latestNotice === void 0 ? void 0 : latestNotice.offsetWidth) - offset * 2 * (index < 3 ? index : 3)) / ((_dictRef$current$strK3 = dictRef.current[strKey]) === null || _dictRef$current$strK3 === void 0 ? void 0 : _dictRef$current$strK3.offsetWidth) : 1;
  12148. stackStyle.transform = "translate3d(".concat(transformX, ", ").concat(transformY, "px, 0) scaleX(").concat(scaleX, ")");
  12149. } else {
  12150. stackStyle.transform = "translate3d(".concat(transformX, ", 0, 0)");
  12151. }
  12152. }
  12153. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  12154. ref: nodeRef,
  12155. className: classnames_default()("".concat(prefixCls, "-notice-wrapper"), motionClassName, configClassNames === null || configClassNames === void 0 ? void 0 : configClassNames.wrapper),
  12156. style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), stackStyle), configStyles === null || configStyles === void 0 ? void 0 : configStyles.wrapper),
  12157. onMouseEnter: function onMouseEnter() {
  12158. return setHoverKeys(function (prev) {
  12159. return prev.includes(strKey) ? prev : [].concat((0,toConsumableArray["default"])(prev), [strKey]);
  12160. });
  12161. },
  12162. onMouseLeave: function onMouseLeave() {
  12163. return setHoverKeys(function (prev) {
  12164. return prev.filter(function (k) {
  12165. return k !== strKey;
  12166. });
  12167. });
  12168. }
  12169. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Notice, (0,esm_extends["default"])({}, restConfig, {
  12170. ref: function ref(node) {
  12171. if (dataIndex > -1) {
  12172. dictRef.current[strKey] = node;
  12173. } else {
  12174. delete dictRef.current[strKey];
  12175. }
  12176. },
  12177. prefixCls: prefixCls,
  12178. classNames: configClassNames,
  12179. styles: configStyles,
  12180. className: classnames_default()(configClassName, ctxCls === null || ctxCls === void 0 ? void 0 : ctxCls.notice),
  12181. style: configStyle,
  12182. times: times,
  12183. key: key,
  12184. eventKey: key,
  12185. onNoticeClose: onNoticeClose,
  12186. hovering: stack && hoverKeys.length > 0
  12187. })));
  12188. });
  12189. };
  12190. if (true) {
  12191. NoticeList.displayName = 'NoticeList';
  12192. }
  12193. /* harmony default export */ var es_NoticeList = (NoticeList);
  12194. ;// ./node_modules/rc-notification/es/Notifications.js
  12195. // ant-notification ant-notification-topRight
  12196. var Notifications = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  12197. var _props$prefixCls = props.prefixCls,
  12198. prefixCls = _props$prefixCls === void 0 ? 'rc-notification' : _props$prefixCls,
  12199. container = props.container,
  12200. motion = props.motion,
  12201. maxCount = props.maxCount,
  12202. className = props.className,
  12203. style = props.style,
  12204. onAllRemoved = props.onAllRemoved,
  12205. stack = props.stack,
  12206. renderNotifications = props.renderNotifications;
  12207. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
  12208. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  12209. configList = _React$useState2[0],
  12210. setConfigList = _React$useState2[1];
  12211. // ======================== Close =========================
  12212. var onNoticeClose = function onNoticeClose(key) {
  12213. var _config$onClose;
  12214. // Trigger close event
  12215. var config = configList.find(function (item) {
  12216. return item.key === key;
  12217. });
  12218. config === null || config === void 0 || (_config$onClose = config.onClose) === null || _config$onClose === void 0 || _config$onClose.call(config);
  12219. setConfigList(function (list) {
  12220. return list.filter(function (item) {
  12221. return item.key !== key;
  12222. });
  12223. });
  12224. };
  12225. // ========================= Refs =========================
  12226. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  12227. return {
  12228. open: function open(config) {
  12229. setConfigList(function (list) {
  12230. var clone = (0,toConsumableArray["default"])(list);
  12231. // Replace if exist
  12232. var index = clone.findIndex(function (item) {
  12233. return item.key === config.key;
  12234. });
  12235. var innerConfig = (0,objectSpread2["default"])({}, config);
  12236. if (index >= 0) {
  12237. var _list$index;
  12238. innerConfig.times = (((_list$index = list[index]) === null || _list$index === void 0 ? void 0 : _list$index.times) || 0) + 1;
  12239. clone[index] = innerConfig;
  12240. } else {
  12241. innerConfig.times = 0;
  12242. clone.push(innerConfig);
  12243. }
  12244. if (maxCount > 0 && clone.length > maxCount) {
  12245. clone = clone.slice(-maxCount);
  12246. }
  12247. return clone;
  12248. });
  12249. },
  12250. close: function close(key) {
  12251. onNoticeClose(key);
  12252. },
  12253. destroy: function destroy() {
  12254. setConfigList([]);
  12255. }
  12256. };
  12257. });
  12258. // ====================== Placements ======================
  12259. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  12260. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  12261. placements = _React$useState4[0],
  12262. setPlacements = _React$useState4[1];
  12263. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  12264. var nextPlacements = {};
  12265. configList.forEach(function (config) {
  12266. var _config$placement = config.placement,
  12267. placement = _config$placement === void 0 ? 'topRight' : _config$placement;
  12268. if (placement) {
  12269. nextPlacements[placement] = nextPlacements[placement] || [];
  12270. nextPlacements[placement].push(config);
  12271. }
  12272. });
  12273. // Fill exist placements to avoid empty list causing remove without motion
  12274. Object.keys(placements).forEach(function (placement) {
  12275. nextPlacements[placement] = nextPlacements[placement] || [];
  12276. });
  12277. setPlacements(nextPlacements);
  12278. }, [configList]);
  12279. // Clean up container if all notices fade out
  12280. var onAllNoticeRemoved = function onAllNoticeRemoved(placement) {
  12281. setPlacements(function (originPlacements) {
  12282. var clone = (0,objectSpread2["default"])({}, originPlacements);
  12283. var list = clone[placement] || [];
  12284. if (!list.length) {
  12285. delete clone[placement];
  12286. }
  12287. return clone;
  12288. });
  12289. };
  12290. // Effect tell that placements is empty now
  12291. var emptyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  12292. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  12293. if (Object.keys(placements).length > 0) {
  12294. emptyRef.current = true;
  12295. } else if (emptyRef.current) {
  12296. // Trigger only when from exist to empty
  12297. onAllRemoved === null || onAllRemoved === void 0 || onAllRemoved();
  12298. emptyRef.current = false;
  12299. }
  12300. }, [placements]);
  12301. // ======================== Render ========================
  12302. if (!container) {
  12303. return null;
  12304. }
  12305. var placementList = Object.keys(placements);
  12306. return /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, placementList.map(function (placement) {
  12307. var placementConfigList = placements[placement];
  12308. var list = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_NoticeList, {
  12309. key: placement,
  12310. configList: placementConfigList,
  12311. placement: placement,
  12312. prefixCls: prefixCls,
  12313. className: className === null || className === void 0 ? void 0 : className(placement),
  12314. style: style === null || style === void 0 ? void 0 : style(placement),
  12315. motion: motion,
  12316. onNoticeClose: onNoticeClose,
  12317. onAllNoticeRemoved: onAllNoticeRemoved,
  12318. stack: stack
  12319. });
  12320. return renderNotifications ? renderNotifications(list, {
  12321. prefixCls: prefixCls,
  12322. key: placement
  12323. }) : list;
  12324. })), container);
  12325. });
  12326. if (true) {
  12327. Notifications.displayName = 'Notifications';
  12328. }
  12329. /* harmony default export */ var es_Notifications = (Notifications);
  12330. // EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
  12331. var rc_util_es = __webpack_require__("./node_modules/rc-util/es/index.js");
  12332. ;// ./node_modules/rc-notification/es/hooks/useNotification.js
  12333. var useNotification_excluded = ["getContainer", "motion", "prefixCls", "maxCount", "className", "style", "onAllRemoved", "stack", "renderNotifications"];
  12334. var defaultGetContainer = function defaultGetContainer() {
  12335. return document.body;
  12336. };
  12337. var uniqueKey = 0;
  12338. function mergeConfig() {
  12339. var clone = {};
  12340. for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {
  12341. objList[_key] = arguments[_key];
  12342. }
  12343. objList.forEach(function (obj) {
  12344. if (obj) {
  12345. Object.keys(obj).forEach(function (key) {
  12346. var val = obj[key];
  12347. if (val !== undefined) {
  12348. clone[key] = val;
  12349. }
  12350. });
  12351. }
  12352. });
  12353. return clone;
  12354. }
  12355. function useNotification() {
  12356. var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  12357. var _rootConfig$getContai = rootConfig.getContainer,
  12358. getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai,
  12359. motion = rootConfig.motion,
  12360. prefixCls = rootConfig.prefixCls,
  12361. maxCount = rootConfig.maxCount,
  12362. className = rootConfig.className,
  12363. style = rootConfig.style,
  12364. onAllRemoved = rootConfig.onAllRemoved,
  12365. stack = rootConfig.stack,
  12366. renderNotifications = rootConfig.renderNotifications,
  12367. shareConfig = (0,objectWithoutProperties["default"])(rootConfig, useNotification_excluded);
  12368. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
  12369. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  12370. container = _React$useState2[0],
  12371. setContainer = _React$useState2[1];
  12372. var notificationsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  12373. var contextHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Notifications, {
  12374. container: container,
  12375. ref: notificationsRef,
  12376. prefixCls: prefixCls,
  12377. motion: motion,
  12378. maxCount: maxCount,
  12379. className: className,
  12380. style: style,
  12381. onAllRemoved: onAllRemoved,
  12382. stack: stack,
  12383. renderNotifications: renderNotifications
  12384. });
  12385. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
  12386. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  12387. taskQueue = _React$useState4[0],
  12388. setTaskQueue = _React$useState4[1];
  12389. var open = (0,rc_util_es.useEvent)(function (config) {
  12390. var mergedConfig = mergeConfig(shareConfig, config);
  12391. if (mergedConfig.key === null || mergedConfig.key === undefined) {
  12392. mergedConfig.key = "rc-notification-".concat(uniqueKey);
  12393. uniqueKey += 1;
  12394. }
  12395. setTaskQueue(function (queue) {
  12396. return [].concat((0,toConsumableArray["default"])(queue), [{
  12397. type: 'open',
  12398. config: mergedConfig
  12399. }]);
  12400. });
  12401. });
  12402. // ========================= Refs =========================
  12403. var api = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  12404. return {
  12405. open: open,
  12406. close: function close(key) {
  12407. setTaskQueue(function (queue) {
  12408. return [].concat((0,toConsumableArray["default"])(queue), [{
  12409. type: 'close',
  12410. key: key
  12411. }]);
  12412. });
  12413. },
  12414. destroy: function destroy() {
  12415. setTaskQueue(function (queue) {
  12416. return [].concat((0,toConsumableArray["default"])(queue), [{
  12417. type: 'destroy'
  12418. }]);
  12419. });
  12420. }
  12421. };
  12422. }, []);
  12423. // ======================= Container ======================
  12424. // React 18 should all in effect that we will check container in each render
  12425. // Which means getContainer should be stable.
  12426. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  12427. setContainer(getContainer());
  12428. });
  12429. // ======================== Effect ========================
  12430. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  12431. // Flush task when node ready
  12432. if (notificationsRef.current && taskQueue.length) {
  12433. taskQueue.forEach(function (task) {
  12434. switch (task.type) {
  12435. case 'open':
  12436. notificationsRef.current.open(task.config);
  12437. break;
  12438. case 'close':
  12439. notificationsRef.current.close(task.key);
  12440. break;
  12441. case 'destroy':
  12442. notificationsRef.current.destroy();
  12443. break;
  12444. }
  12445. });
  12446. // https://github.com/ant-design/ant-design/issues/52590
  12447. // React `startTransition` will run once `useEffect` but many times `setState`,
  12448. // So `setTaskQueue` with filtered array will cause infinite loop.
  12449. // We cache the first match queue instead.
  12450. var oriTaskQueue;
  12451. var tgtTaskQueue;
  12452. // React 17 will mix order of effect & setState in async
  12453. // - open: setState[0]
  12454. // - effect[0]
  12455. // - open: setState[1]
  12456. // - effect setState([]) * here will clean up [0, 1] in React 17
  12457. setTaskQueue(function (oriQueue) {
  12458. if (oriTaskQueue !== oriQueue || !tgtTaskQueue) {
  12459. oriTaskQueue = oriQueue;
  12460. tgtTaskQueue = oriQueue.filter(function (task) {
  12461. return !taskQueue.includes(task);
  12462. });
  12463. }
  12464. return tgtTaskQueue;
  12465. });
  12466. }
  12467. }, [taskQueue]);
  12468. // ======================== Return ========================
  12469. return [api, contextHolder];
  12470. }
  12471. ;// ./node_modules/rc-notification/es/index.js
  12472. ;// ./node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js
  12473. // This icon file is generated automatically.
  12474. var LoadingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
  12475. /* harmony default export */ var asn_LoadingOutlined = (LoadingOutlined);
  12476. ;// ./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js
  12477. // GENERATE BY ./scripts/generate.ts
  12478. // DON NOT EDIT IT MANUALLY
  12479. var LoadingOutlined_LoadingOutlined = function LoadingOutlined(props, ref) {
  12480. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  12481. ref: ref,
  12482. icon: asn_LoadingOutlined
  12483. }));
  12484. };
  12485. /**![loading](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk4OCA1NDhjLTE5LjkgMC0zNi0xNi4xLTM2LTM2IDAtNTkuNC0xMS42LTExNy0zNC42LTE3MS4zYTQ0MC40NSA0NDAuNDUgMCAwMC05NC4zLTEzOS45IDQzNy43MSA0MzcuNzEgMCAwMC0xMzkuOS05NC4zQzYyOSA4My42IDU3MS40IDcyIDUxMiA3MmMtMTkuOSAwLTM2LTE2LjEtMzYtMzZzMTYuMS0zNiAzNi0zNmM2OS4xIDAgMTM2LjIgMTMuNSAxOTkuMyA0MC4zQzc3Mi4zIDY2IDgyNyAxMDMgODc0IDE1MGM0NyA0NyA4My45IDEwMS44IDEwOS43IDE2Mi43IDI2LjcgNjMuMSA0MC4yIDEzMC4yIDQwLjIgMTk5LjMuMSAxOS45LTE2IDM2LTM1LjkgMzZ6IiAvPjwvc3ZnPg==) */
  12486. var LoadingOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(LoadingOutlined_LoadingOutlined);
  12487. if (true) {
  12488. LoadingOutlined_RefIcon.displayName = 'LoadingOutlined';
  12489. }
  12490. /* harmony default export */ var icons_LoadingOutlined = (LoadingOutlined_RefIcon);
  12491. // EXTERNAL MODULE: ./components/message/style/index.ts
  12492. var style = __webpack_require__("./components/message/style/index.ts");
  12493. ;// ./components/message/PurePanel.tsx
  12494. var PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  12495. var t = {};
  12496. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  12497. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  12498. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  12499. }
  12500. return t;
  12501. };
  12502. const TypeIcon = {
  12503. info: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_InfoCircleFilled, null),
  12504. success: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null),
  12505. error: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null),
  12506. warning: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
  12507. loading: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null)
  12508. };
  12509. const PureContent = ({
  12510. prefixCls,
  12511. type,
  12512. icon,
  12513. children
  12514. }) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  12515. className: classnames_default()(`${prefixCls}-custom-content`, `${prefixCls}-${type}`)
  12516. }, icon || TypeIcon[type], /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children)));
  12517. /** @private Internal Component. Do not use in your production. */
  12518. const PurePanel = props => {
  12519. const {
  12520. prefixCls: staticPrefixCls,
  12521. className,
  12522. type,
  12523. icon,
  12524. content
  12525. } = props,
  12526. restProps = PurePanel_rest(props, ["prefixCls", "className", "type", "icon", "content"]);
  12527. const {
  12528. getPrefixCls
  12529. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  12530. const prefixCls = staticPrefixCls || getPrefixCls('message');
  12531. const rootCls = hooks_useCSSVarCls(prefixCls);
  12532. const [wrapCSSVar, hashId, cssVarCls] = (0,style["default"])(prefixCls, rootCls);
  12533. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Notice, Object.assign({}, restProps, {
  12534. prefixCls: prefixCls,
  12535. className: classnames_default()(className, hashId, `${prefixCls}-notice-pure-panel`, cssVarCls, rootCls),
  12536. eventKey: "pure",
  12537. duration: null,
  12538. content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureContent, {
  12539. prefixCls: prefixCls,
  12540. type: type,
  12541. icon: icon
  12542. }, content)
  12543. })));
  12544. };
  12545. /* harmony default export */ var message_PurePanel = (PurePanel);
  12546. ;// ./components/message/util.ts
  12547. function getMotion(prefixCls, transitionName) {
  12548. return {
  12549. motionName: transitionName !== null && transitionName !== void 0 ? transitionName : `${prefixCls}-move-up`
  12550. };
  12551. }
  12552. /** Wrap message open with promise like function */
  12553. function wrapPromiseFn(openFn) {
  12554. let closeFn;
  12555. const closePromise = new Promise(resolve => {
  12556. closeFn = openFn(() => {
  12557. resolve(true);
  12558. });
  12559. });
  12560. const result = () => {
  12561. closeFn === null || closeFn === void 0 ? void 0 : closeFn();
  12562. };
  12563. result.then = (filled, rejected) => closePromise.then(filled, rejected);
  12564. result.promise = closePromise;
  12565. return result;
  12566. }
  12567. ;// ./components/message/useMessage.tsx
  12568. var useMessage_rest = undefined && undefined.__rest || function (s, e) {
  12569. var t = {};
  12570. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  12571. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  12572. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  12573. }
  12574. return t;
  12575. };
  12576. const useMessage_DEFAULT_OFFSET = 8;
  12577. const DEFAULT_DURATION = 3;
  12578. const Wrapper = ({
  12579. children,
  12580. prefixCls
  12581. }) => {
  12582. const rootCls = hooks_useCSSVarCls(prefixCls);
  12583. const [wrapCSSVar, hashId, cssVarCls] = (0,style["default"])(prefixCls, rootCls);
  12584. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_NotificationProvider, {
  12585. classNames: {
  12586. list: classnames_default()(hashId, cssVarCls, rootCls)
  12587. }
  12588. }, children));
  12589. };
  12590. const renderNotifications = (node, {
  12591. prefixCls,
  12592. key
  12593. }) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Wrapper, {
  12594. prefixCls: prefixCls,
  12595. key: key
  12596. }, node));
  12597. const Holder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  12598. const {
  12599. top,
  12600. prefixCls: staticPrefixCls,
  12601. getContainer: staticGetContainer,
  12602. maxCount,
  12603. duration = DEFAULT_DURATION,
  12604. rtl,
  12605. transitionName,
  12606. onAllRemoved
  12607. } = props;
  12608. const {
  12609. getPrefixCls,
  12610. getPopupContainer,
  12611. message,
  12612. direction
  12613. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  12614. const prefixCls = staticPrefixCls || getPrefixCls('message');
  12615. // =============================== Style ===============================
  12616. const getStyle = () => ({
  12617. left: '50%',
  12618. transform: 'translateX(-50%)',
  12619. top: top !== null && top !== void 0 ? top : useMessage_DEFAULT_OFFSET
  12620. });
  12621. const getClassName = () => classnames_default()({
  12622. [`${prefixCls}-rtl`]: rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl'
  12623. });
  12624. // ============================== Motion ===============================
  12625. const getNotificationMotion = () => getMotion(prefixCls, transitionName);
  12626. // ============================ Close Icon =============================
  12627. const mergedCloseIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  12628. className: `${prefixCls}-close-x`
  12629. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
  12630. className: `${prefixCls}-close-icon`
  12631. }));
  12632. // ============================== Origin ===============================
  12633. const [api, holder] = useNotification({
  12634. prefixCls,
  12635. style: getStyle,
  12636. className: getClassName,
  12637. motion: getNotificationMotion,
  12638. closable: false,
  12639. closeIcon: mergedCloseIcon,
  12640. duration,
  12641. getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,
  12642. maxCount,
  12643. onAllRemoved,
  12644. renderNotifications
  12645. });
  12646. // ================================ Ref ================================
  12647. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {
  12648. prefixCls,
  12649. message
  12650. }));
  12651. return holder;
  12652. });
  12653. // ==============================================================================
  12654. // == Hook ==
  12655. // ==============================================================================
  12656. let keyIndex = 0;
  12657. function useInternalMessage(messageConfig) {
  12658. const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  12659. const warning = (0,_util_warning.devUseWarning)('Message');
  12660. // ================================ API ================================
  12661. const wrapAPI = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  12662. // Wrap with notification content
  12663. // >>> close
  12664. const close = key => {
  12665. var _a;
  12666. (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);
  12667. };
  12668. // >>> Open
  12669. const open = config => {
  12670. if (!holderRef.current) {
  12671. true ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : 0;
  12672. const fakeResult = () => {};
  12673. fakeResult.then = () => {};
  12674. return fakeResult;
  12675. }
  12676. const {
  12677. open: originOpen,
  12678. prefixCls,
  12679. message
  12680. } = holderRef.current;
  12681. const noticePrefixCls = `${prefixCls}-notice`;
  12682. const {
  12683. content,
  12684. icon,
  12685. type,
  12686. key,
  12687. className,
  12688. style,
  12689. onClose
  12690. } = config,
  12691. restConfig = useMessage_rest(config, ["content", "icon", "type", "key", "className", "style", "onClose"]);
  12692. let mergedKey = key;
  12693. if (mergedKey === undefined || mergedKey === null) {
  12694. keyIndex += 1;
  12695. mergedKey = `antd-message-${keyIndex}`;
  12696. }
  12697. return wrapPromiseFn(resolve => {
  12698. originOpen(Object.assign(Object.assign({}, restConfig), {
  12699. key: mergedKey,
  12700. content: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureContent, {
  12701. prefixCls: prefixCls,
  12702. type: type,
  12703. icon: icon
  12704. }, content)),
  12705. placement: 'top',
  12706. className: classnames_default()(type && `${noticePrefixCls}-${type}`, className, message === null || message === void 0 ? void 0 : message.className),
  12707. style: Object.assign(Object.assign({}, message === null || message === void 0 ? void 0 : message.style), style),
  12708. onClose: () => {
  12709. onClose === null || onClose === void 0 ? void 0 : onClose();
  12710. resolve();
  12711. }
  12712. }));
  12713. // Return close function
  12714. return () => {
  12715. close(mergedKey);
  12716. };
  12717. });
  12718. };
  12719. // >>> destroy
  12720. const destroy = key => {
  12721. var _a;
  12722. if (key !== undefined) {
  12723. close(key);
  12724. } else {
  12725. (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
  12726. }
  12727. };
  12728. const clone = {
  12729. open,
  12730. destroy
  12731. };
  12732. const keys = ['info', 'success', 'warning', 'error', 'loading'];
  12733. keys.forEach(type => {
  12734. const typeOpen = (jointContent, duration, onClose) => {
  12735. let config;
  12736. if (jointContent && typeof jointContent === 'object' && 'content' in jointContent) {
  12737. config = jointContent;
  12738. } else {
  12739. config = {
  12740. content: jointContent
  12741. };
  12742. }
  12743. // Params
  12744. let mergedDuration;
  12745. let mergedOnClose;
  12746. if (typeof duration === 'function') {
  12747. mergedOnClose = duration;
  12748. } else {
  12749. mergedDuration = duration;
  12750. mergedOnClose = onClose;
  12751. }
  12752. const mergedConfig = Object.assign(Object.assign({
  12753. onClose: mergedOnClose,
  12754. duration: mergedDuration
  12755. }, config), {
  12756. type
  12757. });
  12758. return open(mergedConfig);
  12759. };
  12760. clone[type] = typeOpen;
  12761. });
  12762. return clone;
  12763. }, []);
  12764. // ============================== Return ===============================
  12765. return [wrapAPI, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Holder, Object.assign({
  12766. key: "message-holder"
  12767. }, messageConfig, {
  12768. ref: holderRef
  12769. }))];
  12770. }
  12771. function useMessage(messageConfig) {
  12772. return useInternalMessage(messageConfig);
  12773. }
  12774. ;// ./components/_util/hooks/usePatchElement.ts
  12775. function usePatchElement() {
  12776. const [elements, setElements] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  12777. const patchElement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(element => {
  12778. // append a new element to elements (and create a new ref)
  12779. setElements(originElements => [].concat((0,toConsumableArray["default"])(originElements), [element]));
  12780. // return a function that removes the new element out of elements (and create a new ref)
  12781. // it works a little like useEffect
  12782. return () => {
  12783. setElements(originElements => originElements.filter(ele => ele !== element));
  12784. };
  12785. }, []);
  12786. return [elements, patchElement];
  12787. }
  12788. // EXTERNAL MODULE: ./alias/cssinjs.js
  12789. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  12790. // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/Context.js
  12791. var Context = __webpack_require__("./node_modules/@ant-design/icons/es/components/Context.js");
  12792. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js
  12793. var useMemo = __webpack_require__("./node_modules/rc-util/es/hooks/useMemo.js");
  12794. // EXTERNAL MODULE: ./node_modules/rc-util/es/utils/set.js
  12795. var set = __webpack_require__("./node_modules/rc-util/es/utils/set.js");
  12796. ;// ./components/form/validateMessagesContext.tsx
  12797. // ZombieJ: We export single file here since
  12798. // ConfigProvider use this which will make loop deps
  12799. // to import whole `rc-field-form`
  12800. /* harmony default export */ var validateMessagesContext = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(undefined));
  12801. // EXTERNAL MODULE: ./components/locale/en_US.ts
  12802. var en_US = __webpack_require__("./components/locale/en_US.ts");
  12803. ;// ./components/modal/locale.ts
  12804. let runtimeLocale = Object.assign({}, en_US["default"].Modal);
  12805. let localeList = [];
  12806. const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), en_US["default"].Modal);
  12807. function changeConfirmLocale(newLocale) {
  12808. if (newLocale) {
  12809. const cloneLocale = Object.assign({}, newLocale);
  12810. localeList.push(cloneLocale);
  12811. runtimeLocale = generateLocale();
  12812. return () => {
  12813. localeList = localeList.filter(locale => locale !== cloneLocale);
  12814. runtimeLocale = generateLocale();
  12815. };
  12816. }
  12817. runtimeLocale = Object.assign({}, en_US["default"].Modal);
  12818. }
  12819. function getConfirmLocale() {
  12820. return runtimeLocale;
  12821. }
  12822. // EXTERNAL MODULE: ./components/locale/context.ts
  12823. var locale_context = __webpack_require__("./components/locale/context.ts");
  12824. ;// ./components/locale/index.tsx
  12825. const ANT_MARK = 'internalMark';
  12826. const LocaleProvider = props => {
  12827. const {
  12828. locale = {},
  12829. children,
  12830. _ANT_MARK__
  12831. } = props;
  12832. if (true) {
  12833. const warning = (0,_util_warning.devUseWarning)('LocaleProvider');
  12834. true ? warning(_ANT_MARK__ === ANT_MARK, 'deprecated', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale') : 0;
  12835. }
  12836. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  12837. const clearLocale = changeConfirmLocale(locale === null || locale === void 0 ? void 0 : locale.Modal);
  12838. return clearLocale;
  12839. }, [locale]);
  12840. const getMemoizedContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, locale), {
  12841. exist: true
  12842. }), [locale]);
  12843. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(locale_context["default"].Provider, {
  12844. value: getMemoizedContextValue
  12845. }, children);
  12846. };
  12847. if (true) {
  12848. LocaleProvider.displayName = 'LocaleProvider';
  12849. }
  12850. /* harmony default export */ var components_locale = (LocaleProvider);
  12851. // EXTERNAL MODULE: ./components/theme/themes/default/theme.ts
  12852. var default_theme = __webpack_require__("./components/theme/themes/default/theme.ts");
  12853. // EXTERNAL MODULE: ./components/theme/context.ts
  12854. var context = __webpack_require__("./components/theme/context.ts");
  12855. // EXTERNAL MODULE: ./components/theme/themes/seed.ts
  12856. var seed = __webpack_require__("./components/theme/themes/seed.ts");
  12857. // EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 2 modules
  12858. var colors_es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
  12859. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  12860. var fast_color_es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  12861. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
  12862. var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
  12863. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
  12864. var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
  12865. ;// ./components/config-provider/cssVariables.ts
  12866. const dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;
  12867. function getStyle(globalPrefixCls, theme) {
  12868. const variables = {};
  12869. const formatColor = (color, updater) => {
  12870. let clone = color.clone();
  12871. clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;
  12872. return clone.toRgbString();
  12873. };
  12874. const fillColor = (colorVal, type) => {
  12875. const baseColor = new fast_color_es.FastColor(colorVal);
  12876. const colorPalettes = (0,colors_es.generate)(baseColor.toRgbString());
  12877. variables[`${type}-color`] = formatColor(baseColor);
  12878. variables[`${type}-color-disabled`] = colorPalettes[1];
  12879. variables[`${type}-color-hover`] = colorPalettes[4];
  12880. variables[`${type}-color-active`] = colorPalettes[6];
  12881. variables[`${type}-color-outline`] = baseColor.clone().setA(0.2).toRgbString();
  12882. variables[`${type}-color-deprecated-bg`] = colorPalettes[0];
  12883. variables[`${type}-color-deprecated-border`] = colorPalettes[2];
  12884. };
  12885. // ================ Primary Color ================
  12886. if (theme.primaryColor) {
  12887. fillColor(theme.primaryColor, 'primary');
  12888. const primaryColor = new fast_color_es.FastColor(theme.primaryColor);
  12889. const primaryColors = (0,colors_es.generate)(primaryColor.toRgbString());
  12890. // Legacy - We should use semantic naming standard
  12891. primaryColors.forEach((color, index) => {
  12892. variables[`primary-${index + 1}`] = color;
  12893. });
  12894. // Deprecated
  12895. variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));
  12896. variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));
  12897. variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));
  12898. variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));
  12899. variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setA(c.a * 0.12));
  12900. const primaryActiveColor = new fast_color_es.FastColor(primaryColors[0]);
  12901. variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setA(c.a * 0.3));
  12902. variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));
  12903. }
  12904. // ================ Success Color ================
  12905. if (theme.successColor) {
  12906. fillColor(theme.successColor, 'success');
  12907. }
  12908. // ================ Warning Color ================
  12909. if (theme.warningColor) {
  12910. fillColor(theme.warningColor, 'warning');
  12911. }
  12912. // ================= Error Color =================
  12913. if (theme.errorColor) {
  12914. fillColor(theme.errorColor, 'error');
  12915. }
  12916. // ================= Info Color ==================
  12917. if (theme.infoColor) {
  12918. fillColor(theme.infoColor, 'info');
  12919. }
  12920. // Convert to css variables
  12921. const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);
  12922. return `
  12923. :root {
  12924. ${cssList.join('\n')}
  12925. }
  12926. `.trim();
  12927. }
  12928. function registerTheme(globalPrefixCls, theme) {
  12929. const style = getStyle(globalPrefixCls, theme);
  12930. if ((0,canUseDom["default"])()) {
  12931. (0,dynamicCSS.updateCSS)(style, `${dynamicStyleMark}-dynamic-theme`);
  12932. } else {
  12933. true ? (0,_util_warning["default"])(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : 0;
  12934. }
  12935. }
  12936. ;// ./components/config-provider/DisabledContext.tsx
  12937. const DisabledContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(false);
  12938. const DisabledContextProvider = ({
  12939. children,
  12940. disabled
  12941. }) => {
  12942. const originDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(DisabledContext);
  12943. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DisabledContext.Provider, {
  12944. value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
  12945. }, children);
  12946. };
  12947. /* harmony default export */ var config_provider_DisabledContext = (DisabledContext);
  12948. // EXTERNAL MODULE: ./components/config-provider/SizeContext.tsx
  12949. var SizeContext = __webpack_require__("./components/config-provider/SizeContext.tsx");
  12950. ;// ./components/config-provider/hooks/useConfig.ts
  12951. function useConfig() {
  12952. const componentDisabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_DisabledContext);
  12953. const componentSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(SizeContext["default"]);
  12954. return {
  12955. componentDisabled,
  12956. componentSize
  12957. };
  12958. }
  12959. /* harmony default export */ var hooks_useConfig = (useConfig);
  12960. // EXTERNAL MODULE: ./node_modules/rc-util/es/isEqual.js
  12961. var isEqual = __webpack_require__("./node_modules/rc-util/es/isEqual.js");
  12962. ;// ./components/config-provider/hooks/useThemeKey.ts
  12963. const fullClone = Object.assign({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
  12964. const {
  12965. useId
  12966. } = fullClone;
  12967. const useEmptyId = () => '';
  12968. const useThemeKey = typeof useId === 'undefined' ? useEmptyId : useId;
  12969. /* harmony default export */ var hooks_useThemeKey = (useThemeKey);
  12970. ;// ./components/config-provider/hooks/useTheme.ts
  12971. function useTheme(theme, parentTheme, config) {
  12972. var _a, _b;
  12973. const warning = (0,_util_warning.devUseWarning)('ConfigProvider');
  12974. const themeConfig = theme || {};
  12975. const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? Object.assign(Object.assign({}, context.defaultConfig), {
  12976. hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : context.defaultConfig.hashed,
  12977. cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar
  12978. }) : parentTheme;
  12979. const themeKey = hooks_useThemeKey();
  12980. if (true) {
  12981. const cssVarEnabled = themeConfig.cssVar || parentThemeConfig.cssVar;
  12982. const validKey = !!(typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || themeKey);
  12983. true ? warning(!cssVarEnabled || validKey, 'breaking', 'Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.') : 0;
  12984. }
  12985. return (0,useMemo["default"])(() => {
  12986. var _a, _b;
  12987. if (!theme) {
  12988. return parentTheme;
  12989. }
  12990. // Override
  12991. const mergedComponents = Object.assign({}, parentThemeConfig.components);
  12992. Object.keys(theme.components || {}).forEach(componentName => {
  12993. mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);
  12994. });
  12995. const cssVarKey = `css-var-${themeKey.replace(/:/g, '')}`;
  12996. const mergedCssVar = ((_a = themeConfig.cssVar) !== null && _a !== void 0 ? _a : parentThemeConfig.cssVar) && Object.assign(Object.assign(Object.assign({
  12997. prefix: config === null || config === void 0 ? void 0 : config.prefixCls
  12998. }, typeof parentThemeConfig.cssVar === 'object' ? parentThemeConfig.cssVar : {}), typeof themeConfig.cssVar === 'object' ? themeConfig.cssVar : {}), {
  12999. key: typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || cssVarKey
  13000. });
  13001. // Base token
  13002. return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {
  13003. token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),
  13004. components: mergedComponents,
  13005. cssVar: mergedCssVar
  13006. });
  13007. }, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {
  13008. const nextTheme = next[index];
  13009. return !(0,isEqual["default"])(prevTheme, nextTheme, true);
  13010. }));
  13011. }
  13012. ;// ./components/config-provider/MotionWrapper.tsx
  13013. const MotionCacheContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(true);
  13014. if (true) {
  13015. MotionCacheContext.displayName = 'MotionCacheContext';
  13016. }
  13017. function MotionWrapper(props) {
  13018. const parentMotion = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MotionCacheContext);
  13019. const {
  13020. children
  13021. } = props;
  13022. const [, token] = (0,useToken["default"])();
  13023. const {
  13024. motion
  13025. } = token;
  13026. const needWrapMotionProviderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  13027. needWrapMotionProviderRef.current || (needWrapMotionProviderRef.current = parentMotion !== motion);
  13028. if (needWrapMotionProviderRef.current) {
  13029. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MotionCacheContext.Provider, {
  13030. value: motion
  13031. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es.Provider, {
  13032. motion: motion
  13033. }, children));
  13034. }
  13035. return children;
  13036. }
  13037. ;// ./components/config-provider/PropWarning.tsx
  13038. /**
  13039. * Warning for ConfigProviderProps.
  13040. * This will be empty function in production.
  13041. */
  13042. const PropWarning = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(({
  13043. dropdownMatchSelectWidth
  13044. }) => {
  13045. const warning = (0,_util_warning.devUseWarning)('ConfigProvider');
  13046. warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
  13047. return null;
  13048. });
  13049. if (true) {
  13050. PropWarning.displayName = 'PropWarning';
  13051. }
  13052. /* harmony default export */ var config_provider_PropWarning = ( true ? PropWarning : 0);
  13053. // EXTERNAL MODULE: ./components/theme/util/useResetIconStyle.ts
  13054. var useResetIconStyle = __webpack_require__("./components/theme/util/useResetIconStyle.ts");
  13055. ;// ./components/config-provider/index.tsx
  13056. var config_provider_rest = undefined && undefined.__rest || function (s, e) {
  13057. var t = {};
  13058. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  13059. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  13060. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  13061. }
  13062. return t;
  13063. };
  13064. /**
  13065. * Since too many feedback using static method like `Modal.confirm` not getting theme, we record the
  13066. * theme register info here to help developer get warning info.
  13067. */
  13068. let existThemeConfig = false;
  13069. const warnContext = true ? componentName => {
  13070. true ? (0,_util_warning["default"])(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) : 0;
  13071. } : /* istanbul ignore next */
  13072. 0;
  13073. const configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale'];
  13074. // These props is used by `useContext` directly in sub component
  13075. const PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];
  13076. let globalPrefixCls;
  13077. let globalIconPrefixCls;
  13078. let globalTheme;
  13079. let globalHolderRender;
  13080. function getGlobalPrefixCls() {
  13081. return globalPrefixCls || config_provider_context.defaultPrefixCls;
  13082. }
  13083. function getGlobalIconPrefixCls() {
  13084. return globalIconPrefixCls || config_provider_context.defaultIconPrefixCls;
  13085. }
  13086. function isLegacyTheme(theme) {
  13087. return Object.keys(theme).some(key => key.endsWith('Color'));
  13088. }
  13089. const setGlobalConfig = props => {
  13090. const {
  13091. prefixCls,
  13092. iconPrefixCls,
  13093. theme,
  13094. holderRender
  13095. } = props;
  13096. if (prefixCls !== undefined) {
  13097. globalPrefixCls = prefixCls;
  13098. }
  13099. if (iconPrefixCls !== undefined) {
  13100. globalIconPrefixCls = iconPrefixCls;
  13101. }
  13102. if ('holderRender' in props) {
  13103. globalHolderRender = holderRender;
  13104. }
  13105. if (theme) {
  13106. if (isLegacyTheme(theme)) {
  13107. true ? (0,_util_warning["default"])(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : 0;
  13108. registerTheme(getGlobalPrefixCls(), theme);
  13109. } else {
  13110. globalTheme = theme;
  13111. }
  13112. }
  13113. };
  13114. const globalConfig = () => ({
  13115. getPrefixCls: (suffixCls, customizePrefixCls) => {
  13116. if (customizePrefixCls) {
  13117. return customizePrefixCls;
  13118. }
  13119. return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();
  13120. },
  13121. getIconPrefixCls: getGlobalIconPrefixCls,
  13122. getRootPrefixCls: () => {
  13123. // If Global prefixCls provided, use this
  13124. if (globalPrefixCls) {
  13125. return globalPrefixCls;
  13126. }
  13127. // Fallback to default prefixCls
  13128. return getGlobalPrefixCls();
  13129. },
  13130. getTheme: () => globalTheme,
  13131. holderRender: globalHolderRender
  13132. });
  13133. const ProviderChildren = props => {
  13134. const {
  13135. children,
  13136. csp: customCsp,
  13137. autoInsertSpaceInButton,
  13138. alert,
  13139. anchor,
  13140. form,
  13141. locale,
  13142. componentSize,
  13143. direction,
  13144. space,
  13145. splitter,
  13146. virtual,
  13147. dropdownMatchSelectWidth,
  13148. popupMatchSelectWidth,
  13149. popupOverflow,
  13150. legacyLocale,
  13151. parentContext,
  13152. iconPrefixCls: customIconPrefixCls,
  13153. theme,
  13154. componentDisabled,
  13155. segmented,
  13156. statistic,
  13157. spin,
  13158. calendar,
  13159. carousel,
  13160. cascader,
  13161. collapse,
  13162. typography,
  13163. checkbox,
  13164. descriptions,
  13165. divider,
  13166. drawer,
  13167. skeleton,
  13168. steps,
  13169. image,
  13170. layout,
  13171. list,
  13172. mentions,
  13173. modal,
  13174. progress,
  13175. result,
  13176. slider,
  13177. breadcrumb,
  13178. menu,
  13179. pagination,
  13180. input,
  13181. textArea,
  13182. empty,
  13183. badge,
  13184. radio,
  13185. rate,
  13186. switch: SWITCH,
  13187. transfer,
  13188. avatar,
  13189. message,
  13190. tag,
  13191. table,
  13192. card,
  13193. tabs,
  13194. timeline,
  13195. timePicker,
  13196. upload,
  13197. notification,
  13198. tree,
  13199. colorPicker,
  13200. datePicker,
  13201. rangePicker,
  13202. flex,
  13203. wave,
  13204. dropdown,
  13205. warning: warningConfig,
  13206. tour,
  13207. tooltip,
  13208. popover,
  13209. popconfirm,
  13210. floatButton,
  13211. floatButtonGroup,
  13212. variant,
  13213. inputNumber,
  13214. treeSelect
  13215. } = props;
  13216. // =================================== Context ===================================
  13217. const getPrefixCls = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((suffixCls, customizePrefixCls) => {
  13218. const {
  13219. prefixCls
  13220. } = props;
  13221. if (customizePrefixCls) {
  13222. return customizePrefixCls;
  13223. }
  13224. const mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');
  13225. return suffixCls ? `${mergedPrefixCls}-${suffixCls}` : mergedPrefixCls;
  13226. }, [parentContext.getPrefixCls, props.prefixCls]);
  13227. const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || config_provider_context.defaultIconPrefixCls;
  13228. const csp = customCsp || parentContext.csp;
  13229. (0,useResetIconStyle["default"])(iconPrefixCls, csp);
  13230. const mergedTheme = useTheme(theme, parentContext.theme, {
  13231. prefixCls: getPrefixCls('')
  13232. });
  13233. if (true) {
  13234. existThemeConfig = existThemeConfig || !!mergedTheme;
  13235. }
  13236. const baseConfig = {
  13237. csp,
  13238. autoInsertSpaceInButton,
  13239. alert,
  13240. anchor,
  13241. locale: locale || legacyLocale,
  13242. direction,
  13243. space,
  13244. splitter,
  13245. virtual,
  13246. popupMatchSelectWidth: popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth,
  13247. popupOverflow,
  13248. getPrefixCls,
  13249. iconPrefixCls,
  13250. theme: mergedTheme,
  13251. segmented,
  13252. statistic,
  13253. spin,
  13254. calendar,
  13255. carousel,
  13256. cascader,
  13257. collapse,
  13258. typography,
  13259. checkbox,
  13260. descriptions,
  13261. divider,
  13262. drawer,
  13263. skeleton,
  13264. steps,
  13265. image,
  13266. input,
  13267. textArea,
  13268. layout,
  13269. list,
  13270. mentions,
  13271. modal,
  13272. progress,
  13273. result,
  13274. slider,
  13275. breadcrumb,
  13276. menu,
  13277. pagination,
  13278. empty,
  13279. badge,
  13280. radio,
  13281. rate,
  13282. switch: SWITCH,
  13283. transfer,
  13284. avatar,
  13285. message,
  13286. tag,
  13287. table,
  13288. card,
  13289. tabs,
  13290. timeline,
  13291. timePicker,
  13292. upload,
  13293. notification,
  13294. tree,
  13295. colorPicker,
  13296. datePicker,
  13297. rangePicker,
  13298. flex,
  13299. wave,
  13300. dropdown,
  13301. warning: warningConfig,
  13302. tour,
  13303. tooltip,
  13304. popover,
  13305. popconfirm,
  13306. floatButton,
  13307. floatButtonGroup,
  13308. variant,
  13309. inputNumber,
  13310. treeSelect
  13311. };
  13312. if (true) {
  13313. const warningFn = (0,_util_warning.devUseWarning)('ConfigProvider');
  13314. warningFn(!('autoInsertSpaceInButton' in props), 'deprecated', '`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.');
  13315. }
  13316. const config = Object.assign({}, parentContext);
  13317. Object.keys(baseConfig).forEach(key => {
  13318. if (baseConfig[key] !== undefined) {
  13319. config[key] = baseConfig[key];
  13320. }
  13321. });
  13322. // Pass the props used by `useContext` directly with child component.
  13323. // These props should merged into `config`.
  13324. PASSED_PROPS.forEach(propName => {
  13325. const propValue = props[propName];
  13326. if (propValue) {
  13327. config[propName] = propValue;
  13328. }
  13329. });
  13330. if (typeof autoInsertSpaceInButton !== 'undefined') {
  13331. // merge deprecated api
  13332. config.button = Object.assign({
  13333. autoInsertSpace: autoInsertSpaceInButton
  13334. }, config.button);
  13335. }
  13336. // https://github.com/ant-design/ant-design/issues/27617
  13337. const memoedConfig = (0,useMemo["default"])(() => config, config, (prevConfig, currentConfig) => {
  13338. const prevKeys = Object.keys(prevConfig);
  13339. const currentKeys = Object.keys(currentConfig);
  13340. return prevKeys.length !== currentKeys.length || prevKeys.some(key => prevConfig[key] !== currentConfig[key]);
  13341. });
  13342. const {
  13343. layer
  13344. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(cssinjs.StyleContext);
  13345. const memoIconContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  13346. prefixCls: iconPrefixCls,
  13347. csp,
  13348. layer: layer ? 'antd' : undefined
  13349. }), [iconPrefixCls, csp, layer]);
  13350. let childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider_PropWarning, {
  13351. dropdownMatchSelectWidth: dropdownMatchSelectWidth
  13352. }), children);
  13353. const validateMessages = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  13354. var _a, _b, _c, _d;
  13355. return (0,set.merge)(((_a = en_US["default"].Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});
  13356. }, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);
  13357. if (Object.keys(validateMessages).length > 0) {
  13358. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(validateMessagesContext.Provider, {
  13359. value: validateMessages
  13360. }, childNode);
  13361. }
  13362. if (locale) {
  13363. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_locale, {
  13364. locale: locale,
  13365. _ANT_MARK__: ANT_MARK
  13366. }, childNode);
  13367. }
  13368. if (iconPrefixCls || csp) {
  13369. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Context["default"].Provider, {
  13370. value: memoIconContextValue
  13371. }, childNode);
  13372. }
  13373. if (componentSize) {
  13374. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SizeContext.SizeContextProvider, {
  13375. size: componentSize
  13376. }, childNode);
  13377. }
  13378. // =================================== Motion ===================================
  13379. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MotionWrapper, null, childNode);
  13380. // ================================ Dynamic theme ================================
  13381. const memoTheme = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  13382. const _a = mergedTheme || {},
  13383. {
  13384. algorithm,
  13385. token,
  13386. components,
  13387. cssVar
  13388. } = _a,
  13389. rest = config_provider_rest(_a, ["algorithm", "token", "components", "cssVar"]);
  13390. const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? (0,cssinjs.createTheme)(algorithm) : default_theme["default"];
  13391. const parsedComponents = {};
  13392. Object.entries(components || {}).forEach(([componentName, componentToken]) => {
  13393. const parsedToken = Object.assign({}, componentToken);
  13394. if ('algorithm' in parsedToken) {
  13395. if (parsedToken.algorithm === true) {
  13396. parsedToken.theme = themeObj;
  13397. } else if (Array.isArray(parsedToken.algorithm) || typeof parsedToken.algorithm === 'function') {
  13398. parsedToken.theme = (0,cssinjs.createTheme)(parsedToken.algorithm);
  13399. }
  13400. delete parsedToken.algorithm;
  13401. }
  13402. parsedComponents[componentName] = parsedToken;
  13403. });
  13404. const mergedToken = Object.assign(Object.assign({}, seed["default"]), token);
  13405. return Object.assign(Object.assign({}, rest), {
  13406. theme: themeObj,
  13407. token: mergedToken,
  13408. components: parsedComponents,
  13409. override: Object.assign({
  13410. override: mergedToken
  13411. }, parsedComponents),
  13412. cssVar: cssVar
  13413. });
  13414. }, [mergedTheme]);
  13415. if (theme) {
  13416. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context.DesignTokenContext.Provider, {
  13417. value: memoTheme
  13418. }, childNode);
  13419. }
  13420. // ================================== Warning ===================================
  13421. if (memoedConfig.warning) {
  13422. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_warning.WarningContext.Provider, {
  13423. value: memoedConfig.warning
  13424. }, childNode);
  13425. }
  13426. // =================================== Render ===================================
  13427. if (componentDisabled !== undefined) {
  13428. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DisabledContextProvider, {
  13429. disabled: componentDisabled
  13430. }, childNode);
  13431. }
  13432. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider_context.ConfigContext.Provider, {
  13433. value: memoedConfig
  13434. }, childNode);
  13435. };
  13436. const ConfigProvider = props => {
  13437. const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  13438. const antLocale = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(locale_context["default"]);
  13439. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ProviderChildren, Object.assign({
  13440. parentContext: context,
  13441. legacyLocale: antLocale
  13442. }, props));
  13443. };
  13444. ConfigProvider.ConfigContext = config_provider_context.ConfigContext;
  13445. ConfigProvider.SizeContext = SizeContext["default"];
  13446. ConfigProvider.config = setGlobalConfig;
  13447. ConfigProvider.useConfig = hooks_useConfig;
  13448. Object.defineProperty(ConfigProvider, 'SizeContext', {
  13449. get: () => {
  13450. true ? (0,_util_warning["default"])(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : 0;
  13451. return SizeContext["default"];
  13452. }
  13453. });
  13454. if (true) {
  13455. ConfigProvider.displayName = 'ConfigProvider';
  13456. }
  13457. /* harmony default export */ var config_provider = (ConfigProvider);
  13458. ;// ./node_modules/@babel/runtime/helpers/esm/OverloadYield.js
  13459. function _OverloadYield(e, d) {
  13460. this.v = e, this.k = d;
  13461. }
  13462. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js
  13463. function _regeneratorDefine(e, r, n, t) {
  13464. var i = Object.defineProperty;
  13465. try {
  13466. i({}, "", {});
  13467. } catch (e) {
  13468. i = 0;
  13469. }
  13470. _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
  13471. function o(r, n) {
  13472. _regeneratorDefine(e, r, function (e) {
  13473. return this._invoke(r, n, e);
  13474. });
  13475. }
  13476. r ? i ? i(e, r, {
  13477. value: n,
  13478. enumerable: !t,
  13479. configurable: !t,
  13480. writable: !t
  13481. }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
  13482. }, _regeneratorDefine(e, r, n, t);
  13483. }
  13484. ;// ./node_modules/@babel/runtime/helpers/esm/regenerator.js
  13485. function _regenerator() {
  13486. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
  13487. var e,
  13488. t,
  13489. r = "function" == typeof Symbol ? Symbol : {},
  13490. n = r.iterator || "@@iterator",
  13491. o = r.toStringTag || "@@toStringTag";
  13492. function i(r, n, o, i) {
  13493. var c = n && n.prototype instanceof Generator ? n : Generator,
  13494. u = Object.create(c.prototype);
  13495. return _regeneratorDefine(u, "_invoke", function (r, n, o) {
  13496. var i,
  13497. c,
  13498. u,
  13499. f = 0,
  13500. p = o || [],
  13501. y = !1,
  13502. G = {
  13503. p: 0,
  13504. n: 0,
  13505. v: e,
  13506. a: d,
  13507. f: d.bind(e, 4),
  13508. d: function d(t, r) {
  13509. return i = t, c = 0, u = e, G.n = r, a;
  13510. }
  13511. };
  13512. function d(r, n) {
  13513. for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
  13514. var o,
  13515. i = p[t],
  13516. d = G.p,
  13517. l = i[2];
  13518. r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
  13519. }
  13520. if (o || r > 1) return a;
  13521. throw y = !0, n;
  13522. }
  13523. return function (o, p, l) {
  13524. if (f > 1) throw TypeError("Generator is already running");
  13525. for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
  13526. i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
  13527. try {
  13528. if (f = 2, i) {
  13529. if (c || (o = "next"), t = i[o]) {
  13530. if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
  13531. if (!t.done) return t;
  13532. u = t.value, c < 2 && (c = 0);
  13533. } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
  13534. i = e;
  13535. } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
  13536. } catch (t) {
  13537. i = e, c = 1, u = t;
  13538. } finally {
  13539. f = 1;
  13540. }
  13541. }
  13542. return {
  13543. value: t,
  13544. done: y
  13545. };
  13546. };
  13547. }(r, o, i), !0), u;
  13548. }
  13549. var a = {};
  13550. function Generator() {}
  13551. function GeneratorFunction() {}
  13552. function GeneratorFunctionPrototype() {}
  13553. t = Object.getPrototypeOf;
  13554. var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
  13555. return this;
  13556. }), t),
  13557. u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
  13558. function f(e) {
  13559. return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
  13560. }
  13561. return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
  13562. return this;
  13563. }), _regeneratorDefine(u, "toString", function () {
  13564. return "[object Generator]";
  13565. }), (_regenerator = function _regenerator() {
  13566. return {
  13567. w: i,
  13568. m: f
  13569. };
  13570. })();
  13571. }
  13572. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js
  13573. function AsyncIterator(t, e) {
  13574. function n(r, o, i, f) {
  13575. try {
  13576. var c = t[r](o),
  13577. u = c.value;
  13578. return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) {
  13579. n("next", t, i, f);
  13580. }, function (t) {
  13581. n("throw", t, i, f);
  13582. }) : e.resolve(u).then(function (t) {
  13583. c.value = t, i(c);
  13584. }, function (t) {
  13585. return n("throw", t, i, f);
  13586. });
  13587. } catch (t) {
  13588. f(t);
  13589. }
  13590. }
  13591. var r;
  13592. this.next || (_regeneratorDefine(AsyncIterator.prototype), _regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
  13593. return this;
  13594. })), _regeneratorDefine(this, "_invoke", function (t, o, i) {
  13595. function f() {
  13596. return new e(function (e, r) {
  13597. n(t, i, e, r);
  13598. });
  13599. }
  13600. return r = r ? r.then(f, f) : f();
  13601. }, !0);
  13602. }
  13603. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js
  13604. function _regeneratorAsyncGen(r, e, t, o, n) {
  13605. return new AsyncIterator(_regenerator().w(r, e, t, o), n || Promise);
  13606. }
  13607. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js
  13608. function _regeneratorAsync(n, e, r, t, o) {
  13609. var a = _regeneratorAsyncGen(n, e, r, t, o);
  13610. return a.next().then(function (n) {
  13611. return n.done ? n.value : a.next();
  13612. });
  13613. }
  13614. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js
  13615. function _regeneratorKeys(e) {
  13616. var n = Object(e),
  13617. r = [];
  13618. for (var t in n) r.unshift(t);
  13619. return function e() {
  13620. for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
  13621. return e.done = !0, e;
  13622. };
  13623. }
  13624. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorValues.js
  13625. function _regeneratorValues(e) {
  13626. if (null != e) {
  13627. var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
  13628. r = 0;
  13629. if (t) return t.call(e);
  13630. if ("function" == typeof e.next) return e;
  13631. if (!isNaN(e.length)) return {
  13632. next: function next() {
  13633. return e && r >= e.length && (e = void 0), {
  13634. value: e && e[r++],
  13635. done: !e
  13636. };
  13637. }
  13638. };
  13639. }
  13640. throw new TypeError((0,esm_typeof["default"])(e) + " is not iterable");
  13641. }
  13642. ;// ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
  13643. function _regeneratorRuntime() {
  13644. "use strict";
  13645. var r = _regenerator(),
  13646. e = r.m(_regeneratorRuntime),
  13647. t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
  13648. function n(r) {
  13649. var e = "function" == typeof r && r.constructor;
  13650. return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
  13651. }
  13652. var o = {
  13653. "throw": 1,
  13654. "return": 2,
  13655. "break": 3,
  13656. "continue": 3
  13657. };
  13658. function a(r) {
  13659. var e, t;
  13660. return function (n) {
  13661. e || (e = {
  13662. stop: function stop() {
  13663. return t(n.a, 2);
  13664. },
  13665. "catch": function _catch() {
  13666. return n.v;
  13667. },
  13668. abrupt: function abrupt(r, e) {
  13669. return t(n.a, o[r], e);
  13670. },
  13671. delegateYield: function delegateYield(r, o, a) {
  13672. return e.resultName = o, t(n.d, _regeneratorValues(r), a);
  13673. },
  13674. finish: function finish(r) {
  13675. return t(n.f, r);
  13676. }
  13677. }, t = function t(r, _t, o) {
  13678. n.p = e.prev, n.n = e.next;
  13679. try {
  13680. return r(_t, o);
  13681. } finally {
  13682. e.next = n.n;
  13683. }
  13684. }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
  13685. try {
  13686. return r.call(this, e);
  13687. } finally {
  13688. n.p = e.prev, n.n = e.next;
  13689. }
  13690. };
  13691. }
  13692. return (_regeneratorRuntime = function _regeneratorRuntime() {
  13693. return {
  13694. wrap: function wrap(e, t, n, o) {
  13695. return r.w(a(e), t, n, o && o.reverse());
  13696. },
  13697. isGeneratorFunction: n,
  13698. mark: r.m,
  13699. awrap: function awrap(r, e) {
  13700. return new _OverloadYield(r, e);
  13701. },
  13702. AsyncIterator: AsyncIterator,
  13703. async: function async(r, e, t, o, u) {
  13704. return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
  13705. },
  13706. keys: _regeneratorKeys,
  13707. values: _regeneratorValues
  13708. };
  13709. })();
  13710. }
  13711. ;// ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
  13712. function asyncGeneratorStep(n, t, e, r, o, a, c) {
  13713. try {
  13714. var i = n[a](c),
  13715. u = i.value;
  13716. } catch (n) {
  13717. return void e(n);
  13718. }
  13719. i.done ? t(u) : Promise.resolve(u).then(r, o);
  13720. }
  13721. function _asyncToGenerator(n) {
  13722. return function () {
  13723. var t = this,
  13724. e = arguments;
  13725. return new Promise(function (r, o) {
  13726. var a = n.apply(t, e);
  13727. function _next(n) {
  13728. asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
  13729. }
  13730. function _throw(n) {
  13731. asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
  13732. }
  13733. _next(void 0);
  13734. });
  13735. };
  13736. }
  13737. ;// ./node_modules/rc-util/es/React/render.js
  13738. // Let compiler not to search module usage
  13739. var render_fullClone = (0,objectSpread2["default"])({}, external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
  13740. var version = render_fullClone.version,
  13741. reactRender = render_fullClone.render,
  13742. unmountComponentAtNode = render_fullClone.unmountComponentAtNode;
  13743. var createRoot;
  13744. try {
  13745. var mainVersion = Number((version || '').split('.')[0]);
  13746. if (mainVersion >= 18) {
  13747. createRoot = render_fullClone.createRoot;
  13748. }
  13749. } catch (e) {
  13750. // Do nothing;
  13751. }
  13752. function toggleWarning(skip) {
  13753. var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = render_fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  13754. if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (0,esm_typeof["default"])(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
  13755. __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
  13756. }
  13757. }
  13758. var MARK = '__rc_react_root__';
  13759. // ========================== Render ==========================
  13760. function modernRender(node, container) {
  13761. toggleWarning(true);
  13762. var root = container[MARK] || createRoot(container);
  13763. toggleWarning(false);
  13764. root.render(node);
  13765. container[MARK] = root;
  13766. }
  13767. function legacyRender(node, container) {
  13768. reactRender === null || reactRender === void 0 || reactRender(node, container);
  13769. }
  13770. /** @private Test usage. Not work in prod */
  13771. function _r(node, container) {
  13772. if (true) {
  13773. return legacyRender(node, container);
  13774. }
  13775. }
  13776. function render(node, container) {
  13777. if (createRoot) {
  13778. modernRender(node, container);
  13779. return;
  13780. }
  13781. legacyRender(node, container);
  13782. }
  13783. // ========================= Unmount ==========================
  13784. function modernUnmount(_x) {
  13785. return _modernUnmount.apply(this, arguments);
  13786. }
  13787. function _modernUnmount() {
  13788. _modernUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {
  13789. return _regeneratorRuntime().wrap(function _callee$(_context) {
  13790. while (1) switch (_context.prev = _context.next) {
  13791. case 0:
  13792. return _context.abrupt("return", Promise.resolve().then(function () {
  13793. var _container$MARK;
  13794. (_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();
  13795. delete container[MARK];
  13796. }));
  13797. case 1:
  13798. case "end":
  13799. return _context.stop();
  13800. }
  13801. }, _callee);
  13802. }));
  13803. return _modernUnmount.apply(this, arguments);
  13804. }
  13805. function legacyUnmount(container) {
  13806. unmountComponentAtNode(container);
  13807. }
  13808. /** @private Test usage. Not work in prod */
  13809. function _u(container) {
  13810. if (true) {
  13811. return legacyUnmount(container);
  13812. }
  13813. }
  13814. function unmount(_x2) {
  13815. return _unmount.apply(this, arguments);
  13816. }
  13817. function _unmount() {
  13818. _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
  13819. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  13820. while (1) switch (_context2.prev = _context2.next) {
  13821. case 0:
  13822. if (!(createRoot !== undefined)) {
  13823. _context2.next = 2;
  13824. break;
  13825. }
  13826. return _context2.abrupt("return", modernUnmount(container));
  13827. case 2:
  13828. legacyUnmount(container);
  13829. case 3:
  13830. case "end":
  13831. return _context2.stop();
  13832. }
  13833. }, _callee2);
  13834. }));
  13835. return _unmount.apply(this, arguments);
  13836. }
  13837. ;// ./components/config-provider/UnstableContext.tsx
  13838. const defaultReactRender = (node, container) => {
  13839. // TODO: Remove in v6
  13840. // Warning for React 19
  13841. if (true) {
  13842. const majorVersion = parseInt(external_root_React_commonjs2_react_commonjs_react_amd_react_.version.split('.')[0], 10);
  13843. const fullKeys = Object.keys(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
  13844. true ? (0,_util_warning["default"])(majorVersion < 19 || fullKeys.includes('createRoot'), 'compatible', 'antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.') : 0;
  13845. }
  13846. render(node, container);
  13847. return () => {
  13848. return unmount(container);
  13849. };
  13850. };
  13851. let unstableRender = defaultReactRender;
  13852. /**
  13853. * @deprecated Set React render function for compatible usage.
  13854. * This is internal usage only compatible with React 19.
  13855. * And will be removed in next major version.
  13856. */
  13857. function unstableSetRender(render) {
  13858. if (render) {
  13859. unstableRender = render;
  13860. }
  13861. return unstableRender;
  13862. }
  13863. // EXTERNAL MODULE: ./components/_util/hooks/useZIndex.ts
  13864. var useZIndex = __webpack_require__("./components/_util/hooks/useZIndex.ts");
  13865. // EXTERNAL MODULE: ./components/_util/motion.ts
  13866. var _util_motion = __webpack_require__("./components/_util/motion.ts");
  13867. // EXTERNAL MODULE: ./components/locale/useLocale.ts
  13868. var useLocale = __webpack_require__("./components/locale/useLocale.ts");
  13869. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useState.js
  13870. var useState = __webpack_require__("./node_modules/rc-util/es/hooks/useState.js");
  13871. // EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
  13872. var omit = __webpack_require__("./node_modules/rc-util/es/omit.js");
  13873. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
  13874. var useLayoutEffect = __webpack_require__("./node_modules/rc-util/es/hooks/useLayoutEffect.js");
  13875. ;// ./node_modules/rc-util/es/Dom/isVisible.js
  13876. /* harmony default export */ var isVisible = (function (element) {
  13877. if (!element) {
  13878. return false;
  13879. }
  13880. if (element instanceof Element) {
  13881. if (element.offsetParent) {
  13882. return true;
  13883. }
  13884. if (element.getBBox) {
  13885. var _getBBox = element.getBBox(),
  13886. width = _getBBox.width,
  13887. height = _getBBox.height;
  13888. if (width || height) {
  13889. return true;
  13890. }
  13891. }
  13892. if (element.getBoundingClientRect) {
  13893. var _element$getBoundingC = element.getBoundingClientRect(),
  13894. _width = _element$getBoundingC.width,
  13895. _height = _element$getBoundingC.height;
  13896. if (_width || _height) {
  13897. return true;
  13898. }
  13899. }
  13900. }
  13901. return false;
  13902. });
  13903. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  13904. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  13905. ;// ./components/_util/wave/style.ts
  13906. const genWaveStyle = token => {
  13907. const {
  13908. componentCls,
  13909. colorPrimary
  13910. } = token;
  13911. return {
  13912. [componentCls]: {
  13913. position: 'absolute',
  13914. background: 'transparent',
  13915. pointerEvents: 'none',
  13916. boxSizing: 'border-box',
  13917. color: `var(--wave-color, ${colorPrimary})`,
  13918. boxShadow: `0 0 0 0 currentcolor`,
  13919. opacity: 0.2,
  13920. // =================== Motion ===================
  13921. '&.wave-motion-appear': {
  13922. transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),
  13923. '&-active': {
  13924. boxShadow: `0 0 0 6px currentcolor`,
  13925. opacity: 0
  13926. },
  13927. '&.wave-quick': {
  13928. transition: [`box-shadow ${token.motionDurationSlow} ${token.motionEaseInOut}`, `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`].join(',')
  13929. }
  13930. }
  13931. }
  13932. };
  13933. };
  13934. /* harmony default export */ var wave_style = ((0,genStyleUtils.genComponentStyleHook)('Wave', genWaveStyle));
  13935. ;// ./components/_util/wave/interface.ts
  13936. const TARGET_CLS = `${config_provider_context.defaultPrefixCls}-wave-target`;
  13937. ;// ./components/_util/wave/util.ts
  13938. function isValidWaveColor(color) {
  13939. return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && !/rgba\((?:\d*, ){3}0\)/.test(color) &&
  13940. // any transparent rgba color
  13941. color !== 'transparent' && color !== 'canvastext';
  13942. }
  13943. function getTargetWaveColor(node) {
  13944. var _a;
  13945. const {
  13946. borderTopColor,
  13947. borderColor,
  13948. backgroundColor
  13949. } = getComputedStyle(node);
  13950. return (_a = [borderTopColor, borderColor, backgroundColor].find(isValidWaveColor)) !== null && _a !== void 0 ? _a : null;
  13951. }
  13952. ;// ./components/_util/wave/WaveEffect.tsx
  13953. function validateNum(value) {
  13954. return Number.isNaN(value) ? 0 : value;
  13955. }
  13956. const WaveEffect = props => {
  13957. const {
  13958. className,
  13959. target,
  13960. component,
  13961. registerUnmount
  13962. } = props;
  13963. const divRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  13964. // ====================== Refs ======================
  13965. const unmountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  13966. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  13967. unmountRef.current = registerUnmount();
  13968. }, []);
  13969. // ===================== Effect =====================
  13970. const [color, setWaveColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  13971. const [borderRadius, setBorderRadius] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  13972. const [left, setLeft] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  13973. const [top, setTop] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  13974. const [width, setWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  13975. const [height, setHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  13976. const [enabled, setEnabled] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  13977. const waveStyle = {
  13978. left,
  13979. top,
  13980. width,
  13981. height,
  13982. borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')
  13983. };
  13984. if (color) {
  13985. waveStyle['--wave-color'] = color;
  13986. }
  13987. function syncPos() {
  13988. const nodeStyle = getComputedStyle(target);
  13989. // Get wave color from target
  13990. setWaveColor(getTargetWaveColor(target));
  13991. const isStatic = nodeStyle.position === 'static';
  13992. // Rect
  13993. const {
  13994. borderLeftWidth,
  13995. borderTopWidth
  13996. } = nodeStyle;
  13997. setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));
  13998. setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));
  13999. setWidth(target.offsetWidth);
  14000. setHeight(target.offsetHeight);
  14001. // Get border radius
  14002. const {
  14003. borderTopLeftRadius,
  14004. borderTopRightRadius,
  14005. borderBottomLeftRadius,
  14006. borderBottomRightRadius
  14007. } = nodeStyle;
  14008. setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));
  14009. }
  14010. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  14011. if (target) {
  14012. // We need delay to check position here
  14013. // since UI may change after click
  14014. const id = (0,raf["default"])(() => {
  14015. syncPos();
  14016. setEnabled(true);
  14017. });
  14018. // Add resize observer to follow size
  14019. let resizeObserver;
  14020. if (typeof ResizeObserver !== 'undefined') {
  14021. resizeObserver = new ResizeObserver(syncPos);
  14022. resizeObserver.observe(target);
  14023. }
  14024. return () => {
  14025. raf["default"].cancel(id);
  14026. resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
  14027. };
  14028. }
  14029. }, []);
  14030. if (!enabled) {
  14031. return null;
  14032. }
  14033. const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(TARGET_CLS));
  14034. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  14035. visible: true,
  14036. motionAppear: true,
  14037. motionName: "wave-motion",
  14038. motionDeadline: 5000,
  14039. onAppearEnd: (_, event) => {
  14040. var _a, _b;
  14041. if (event.deadline || event.propertyName === 'opacity') {
  14042. const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
  14043. (_b = unmountRef.current) === null || _b === void 0 ? void 0 : _b.call(unmountRef).then(() => {
  14044. holder === null || holder === void 0 ? void 0 : holder.remove();
  14045. });
  14046. }
  14047. return false;
  14048. }
  14049. }, ({
  14050. className: motionClassName
  14051. }, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  14052. ref: (0,es_ref.composeRef)(divRef, ref),
  14053. className: classnames_default()(className, motionClassName, {
  14054. 'wave-quick': isSmallComponent
  14055. }),
  14056. style: waveStyle
  14057. })));
  14058. };
  14059. const showWaveEffect = (target, info) => {
  14060. var _a;
  14061. const {
  14062. component
  14063. } = info;
  14064. // Skip for unchecked checkbox
  14065. if (component === 'Checkbox' && !((_a = target.querySelector('input')) === null || _a === void 0 ? void 0 : _a.checked)) {
  14066. return;
  14067. }
  14068. // Create holder
  14069. const holder = document.createElement('div');
  14070. holder.style.position = 'absolute';
  14071. holder.style.left = '0px';
  14072. holder.style.top = '0px';
  14073. target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);
  14074. const reactRender = unstableSetRender();
  14075. let unmountCallback = null;
  14076. function registerUnmount() {
  14077. return unmountCallback;
  14078. }
  14079. unmountCallback = reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WaveEffect, Object.assign({}, info, {
  14080. target: target,
  14081. registerUnmount: registerUnmount
  14082. })), holder);
  14083. };
  14084. /* harmony default export */ var wave_WaveEffect = (showWaveEffect);
  14085. ;// ./components/_util/wave/useWave.ts
  14086. const useWave = (nodeRef, className, component) => {
  14087. const {
  14088. wave
  14089. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  14090. const [, token, hashId] = (0,useToken["default"])();
  14091. const showWave = (0,useEvent["default"])(event => {
  14092. const node = nodeRef.current;
  14093. if ((wave === null || wave === void 0 ? void 0 : wave.disabled) || !node) {
  14094. return;
  14095. }
  14096. const targetNode = node.querySelector(`.${TARGET_CLS}`) || node;
  14097. const {
  14098. showEffect
  14099. } = wave || {};
  14100. // Customize wave effect
  14101. (showEffect || wave_WaveEffect)(targetNode, {
  14102. className,
  14103. token,
  14104. component,
  14105. event,
  14106. hashId
  14107. });
  14108. });
  14109. const rafId = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  14110. // Merge trigger event into one for each frame
  14111. const showDebounceWave = event => {
  14112. raf["default"].cancel(rafId.current);
  14113. rafId.current = (0,raf["default"])(() => {
  14114. showWave(event);
  14115. });
  14116. };
  14117. return showDebounceWave;
  14118. };
  14119. /* harmony default export */ var wave_useWave = (useWave);
  14120. ;// ./components/_util/wave/index.ts
  14121. const Wave = props => {
  14122. const {
  14123. children,
  14124. disabled,
  14125. component
  14126. } = props;
  14127. const {
  14128. getPrefixCls
  14129. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  14130. const containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  14131. // ============================== Style ===============================
  14132. const prefixCls = getPrefixCls('wave');
  14133. const [, hashId] = wave_style(prefixCls);
  14134. // =============================== Wave ===============================
  14135. const showWave = wave_useWave(containerRef, classnames_default()(prefixCls, hashId), component);
  14136. // ============================== Effect ==============================
  14137. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  14138. const node = containerRef.current;
  14139. if (!node || node.nodeType !== window.Node.ELEMENT_NODE || disabled) {
  14140. return;
  14141. }
  14142. // Click handler
  14143. const onClick = e => {
  14144. // Fix radio button click twice
  14145. if (!isVisible(e.target) ||
  14146. // No need wave
  14147. !node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') && !node.className.includes('disabled:') || node.getAttribute('aria-disabled') === 'true' || node.className.includes('-leave')) {
  14148. return;
  14149. }
  14150. showWave(e);
  14151. };
  14152. // Bind events
  14153. node.addEventListener('click', onClick, true);
  14154. return () => {
  14155. node.removeEventListener('click', onClick, true);
  14156. };
  14157. }, [disabled]);
  14158. // ============================== Render ==============================
  14159. if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children)) {
  14160. return children !== null && children !== void 0 ? children : null;
  14161. }
  14162. const ref = (0,es_ref.supportRef)(children) ? (0,es_ref.composeRef)((0,es_ref.getNodeRef)(children), containerRef) : containerRef;
  14163. return (0,reactNode.cloneElement)(children, {
  14164. ref
  14165. });
  14166. };
  14167. if (true) {
  14168. Wave.displayName = 'Wave';
  14169. }
  14170. /* harmony default export */ var wave = (Wave);
  14171. // EXTERNAL MODULE: ./components/config-provider/hooks/useSize.ts
  14172. var useSize = __webpack_require__("./components/config-provider/hooks/useSize.ts");
  14173. // EXTERNAL MODULE: ./components/space/style/index.ts + 1 modules
  14174. var space_style = __webpack_require__("./components/space/style/index.ts");
  14175. ;// ./components/space/Compact.tsx
  14176. var Compact_rest = undefined && undefined.__rest || function (s, e) {
  14177. var t = {};
  14178. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  14179. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  14180. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  14181. }
  14182. return t;
  14183. };
  14184. const SpaceCompactItemContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  14185. const useCompactItemContext = (prefixCls, direction) => {
  14186. const compactItemContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SpaceCompactItemContext);
  14187. const compactItemClassnames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  14188. if (!compactItemContext) {
  14189. return '';
  14190. }
  14191. const {
  14192. compactDirection,
  14193. isFirstItem,
  14194. isLastItem
  14195. } = compactItemContext;
  14196. const separator = compactDirection === 'vertical' ? '-vertical-' : '-';
  14197. return classnames_default()(`${prefixCls}-compact${separator}item`, {
  14198. [`${prefixCls}-compact${separator}first-item`]: isFirstItem,
  14199. [`${prefixCls}-compact${separator}last-item`]: isLastItem,
  14200. [`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'
  14201. });
  14202. }, [prefixCls, direction, compactItemContext]);
  14203. return {
  14204. compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,
  14205. compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,
  14206. compactItemClassnames
  14207. };
  14208. };
  14209. const NoCompactStyle = props => {
  14210. const {
  14211. children
  14212. } = props;
  14213. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SpaceCompactItemContext.Provider, {
  14214. value: null
  14215. }, children);
  14216. };
  14217. const CompactItem = props => {
  14218. const {
  14219. children
  14220. } = props,
  14221. others = Compact_rest(props, ["children"]);
  14222. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SpaceCompactItemContext.Provider, {
  14223. value: external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => others, [others])
  14224. }, children);
  14225. };
  14226. const Compact = props => {
  14227. const {
  14228. getPrefixCls,
  14229. direction: directionConfig
  14230. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  14231. const {
  14232. size,
  14233. direction,
  14234. block,
  14235. prefixCls: customizePrefixCls,
  14236. className,
  14237. rootClassName,
  14238. children
  14239. } = props,
  14240. restProps = Compact_rest(props, ["size", "direction", "block", "prefixCls", "className", "rootClassName", "children"]);
  14241. const mergedSize = (0,useSize["default"])(ctx => size !== null && size !== void 0 ? size : ctx);
  14242. const prefixCls = getPrefixCls('space-compact', customizePrefixCls);
  14243. const [wrapCSSVar, hashId] = (0,space_style["default"])(prefixCls);
  14244. const clx = classnames_default()(prefixCls, hashId, {
  14245. [`${prefixCls}-rtl`]: directionConfig === 'rtl',
  14246. [`${prefixCls}-block`]: block,
  14247. [`${prefixCls}-vertical`]: direction === 'vertical'
  14248. }, className, rootClassName);
  14249. const compactItemContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SpaceCompactItemContext);
  14250. const childNodes = (0,toArray["default"])(children);
  14251. const nodes = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => childNodes.map((child, i) => {
  14252. const key = (child === null || child === void 0 ? void 0 : child.key) || `${prefixCls}-item-${i}`;
  14253. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CompactItem, {
  14254. key: key,
  14255. compactSize: mergedSize,
  14256. compactDirection: direction,
  14257. isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),
  14258. isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))
  14259. }, child);
  14260. }), [size, childNodes, compactItemContext]);
  14261. // =========================== Render ===========================
  14262. if (childNodes.length === 0) {
  14263. return null;
  14264. }
  14265. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  14266. className: clx
  14267. }, restProps), nodes));
  14268. };
  14269. /* harmony default export */ var space_Compact = (Compact);
  14270. ;// ./components/button/button-group.tsx
  14271. var button_group_rest = undefined && undefined.__rest || function (s, e) {
  14272. var t = {};
  14273. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  14274. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  14275. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  14276. }
  14277. return t;
  14278. };
  14279. const GroupSizeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
  14280. const ButtonGroup = props => {
  14281. const {
  14282. getPrefixCls,
  14283. direction
  14284. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  14285. const {
  14286. prefixCls: customizePrefixCls,
  14287. size,
  14288. className
  14289. } = props,
  14290. others = button_group_rest(props, ["prefixCls", "size", "className"]);
  14291. const prefixCls = getPrefixCls('btn-group', customizePrefixCls);
  14292. const [,, hashId] = (0,useToken["default"])();
  14293. const sizeCls = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  14294. switch (size) {
  14295. case 'large':
  14296. return 'lg';
  14297. case 'small':
  14298. return 'sm';
  14299. default:
  14300. return '';
  14301. }
  14302. }, [size]);
  14303. if (true) {
  14304. const warning = (0,_util_warning.devUseWarning)('Button.Group');
  14305. warning.deprecated(false, 'Button.Group', 'Space.Compact');
  14306. true ? warning(!size || ['large', 'small', 'middle'].includes(size), 'usage', 'Invalid prop `size`.') : 0;
  14307. }
  14308. const classes = classnames_default()(prefixCls, {
  14309. [`${prefixCls}-${sizeCls}`]: sizeCls,
  14310. [`${prefixCls}-rtl`]: direction === 'rtl'
  14311. }, className, hashId);
  14312. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GroupSizeContext.Provider, {
  14313. value: size
  14314. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
  14315. className: classes
  14316. })));
  14317. };
  14318. /* harmony default export */ var button_group = (ButtonGroup);
  14319. // EXTERNAL MODULE: ./components/theme/interface/presetColors.ts
  14320. var presetColors = __webpack_require__("./components/theme/interface/presetColors.ts");
  14321. ;// ./components/button/buttonHelpers.tsx
  14322. const rxTwoCNChar = /^[\u4E00-\u9FA5]{2}$/;
  14323. const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
  14324. function convertLegacyProps(type) {
  14325. if (type === 'danger') {
  14326. return {
  14327. danger: true
  14328. };
  14329. }
  14330. return {
  14331. type
  14332. };
  14333. }
  14334. function isString(str) {
  14335. return typeof str === 'string';
  14336. }
  14337. function isUnBorderedButtonVariant(type) {
  14338. return type === 'text' || type === 'link';
  14339. }
  14340. function splitCNCharsBySpace(child, needInserted) {
  14341. if (child === null || child === undefined) {
  14342. return;
  14343. }
  14344. const SPACE = needInserted ? ' ' : '';
  14345. if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
  14346. return (0,reactNode.cloneElement)(child, {
  14347. children: child.props.children.split('').join(SPACE)
  14348. });
  14349. }
  14350. if (isString(child)) {
  14351. return isTwoCNChar(child) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, child);
  14352. }
  14353. if ((0,reactNode.isFragment)(child)) {
  14354. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, child);
  14355. }
  14356. return child;
  14357. }
  14358. function spaceChildren(children, needInserted) {
  14359. let isPrevChildPure = false;
  14360. const childList = [];
  14361. external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, child => {
  14362. const type = typeof child;
  14363. const isCurrentChildPure = type === 'string' || type === 'number';
  14364. if (isPrevChildPure && isCurrentChildPure) {
  14365. const lastIndex = childList.length - 1;
  14366. const lastChild = childList[lastIndex];
  14367. childList[lastIndex] = `${lastChild}${child}`;
  14368. } else {
  14369. childList.push(child);
  14370. }
  14371. isPrevChildPure = isCurrentChildPure;
  14372. });
  14373. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
  14374. }
  14375. const _ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'];
  14376. const _ButtonShapes = ['default', 'circle', 'round'];
  14377. const _ButtonHTMLTypes = ['submit', 'button', 'reset'];
  14378. const _ButtonVariantTypes = ['outlined', 'dashed', 'solid', 'filled', 'text', 'link'];
  14379. const _ButtonColorTypes = ['default', 'primary', 'danger'].concat((0,toConsumableArray["default"])(presetColors.PresetColors));
  14380. ;// ./components/button/IconWrapper.tsx
  14381. const IconWrapper = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  14382. const {
  14383. className,
  14384. style,
  14385. children,
  14386. prefixCls
  14387. } = props;
  14388. const iconWrapperCls = classnames_default()(`${prefixCls}-icon`, className);
  14389. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  14390. ref: ref,
  14391. className: iconWrapperCls,
  14392. style: style
  14393. }, children);
  14394. });
  14395. /* harmony default export */ var button_IconWrapper = (IconWrapper);
  14396. ;// ./components/button/DefaultLoadingIcon.tsx
  14397. const InnerLoadingIcon = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  14398. const {
  14399. prefixCls,
  14400. className,
  14401. style,
  14402. iconClassName
  14403. } = props;
  14404. const mergedIconCls = classnames_default()(`${prefixCls}-loading-icon`, className);
  14405. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_IconWrapper, {
  14406. prefixCls: prefixCls,
  14407. className: mergedIconCls,
  14408. style: style,
  14409. ref: ref
  14410. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_LoadingOutlined, {
  14411. className: iconClassName
  14412. }));
  14413. });
  14414. const getCollapsedWidth = () => ({
  14415. width: 0,
  14416. opacity: 0,
  14417. transform: 'scale(0)'
  14418. });
  14419. const getRealWidth = node => ({
  14420. width: node.scrollWidth,
  14421. opacity: 1,
  14422. transform: 'scale(1)'
  14423. });
  14424. const DefaultLoadingIcon = props => {
  14425. const {
  14426. prefixCls,
  14427. loading,
  14428. existIcon,
  14429. className,
  14430. style,
  14431. mount
  14432. } = props;
  14433. const visible = !!loading;
  14434. if (existIcon) {
  14435. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InnerLoadingIcon, {
  14436. prefixCls: prefixCls,
  14437. className: className,
  14438. style: style
  14439. });
  14440. }
  14441. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es["default"], {
  14442. visible: visible,
  14443. // Used for minus flex gap style only
  14444. motionName: `${prefixCls}-loading-icon-motion`,
  14445. motionAppear: !mount,
  14446. motionEnter: !mount,
  14447. motionLeave: !mount,
  14448. removeOnLeave: true,
  14449. onAppearStart: getCollapsedWidth,
  14450. onAppearActive: getRealWidth,
  14451. onEnterStart: getCollapsedWidth,
  14452. onEnterActive: getRealWidth,
  14453. onLeaveStart: getRealWidth,
  14454. onLeaveActive: getCollapsedWidth
  14455. }, ({
  14456. className: motionCls,
  14457. style: motionStyle
  14458. }, ref) => {
  14459. const mergedStyle = Object.assign(Object.assign({}, style), motionStyle);
  14460. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InnerLoadingIcon, {
  14461. prefixCls: prefixCls,
  14462. className: classnames_default()(className, motionCls),
  14463. style: mergedStyle,
  14464. ref: ref
  14465. });
  14466. });
  14467. };
  14468. /* harmony default export */ var button_DefaultLoadingIcon = (DefaultLoadingIcon);
  14469. // EXTERNAL MODULE: ./components/button/style/index.ts + 1 modules
  14470. var button_style = __webpack_require__("./components/button/style/index.ts");
  14471. // EXTERNAL MODULE: ./components/style/compact-item.ts
  14472. var compact_item = __webpack_require__("./components/style/compact-item.ts");
  14473. ;// ./components/style/compact-item-vertical.ts
  14474. function compactItemVerticalBorder(token, parentCls, prefixCls) {
  14475. return {
  14476. // border collapse
  14477. [`&-item:not(${parentCls}-last-item)`]: {
  14478. marginBottom: token.calc(token.lineWidth).mul(-1).equal()
  14479. },
  14480. [`&-item:not(${prefixCls}-status-success)`]: {
  14481. zIndex: 2
  14482. },
  14483. '&-item': {
  14484. '&:hover,&:focus,&:active': {
  14485. zIndex: 3
  14486. },
  14487. '&[disabled]': {
  14488. zIndex: 0
  14489. }
  14490. }
  14491. };
  14492. }
  14493. function compactItemBorderVerticalRadius(prefixCls, parentCls) {
  14494. return {
  14495. [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {
  14496. borderRadius: 0
  14497. },
  14498. [`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {
  14499. [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
  14500. borderEndEndRadius: 0,
  14501. borderEndStartRadius: 0
  14502. }
  14503. },
  14504. [`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {
  14505. [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
  14506. borderStartStartRadius: 0,
  14507. borderStartEndRadius: 0
  14508. }
  14509. }
  14510. };
  14511. }
  14512. function genCompactItemVerticalStyle(token) {
  14513. const compactCls = `${token.componentCls}-compact-vertical`;
  14514. return {
  14515. [compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls, token.componentCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))
  14516. };
  14517. }
  14518. // EXTERNAL MODULE: ./components/button/style/token.ts
  14519. var style_token = __webpack_require__("./components/button/style/token.ts");
  14520. ;// ./components/button/style/compact.ts
  14521. const genButtonCompactStyle = token => {
  14522. const {
  14523. componentCls,
  14524. colorPrimaryHover,
  14525. lineWidth,
  14526. calc
  14527. } = token;
  14528. const insetOffset = calc(lineWidth).mul(-1).equal();
  14529. const getCompactBorderStyle = vertical => {
  14530. const selector = `${componentCls}-compact${vertical ? '-vertical' : ''}-item${componentCls}-primary:not([disabled])`;
  14531. return {
  14532. [`${selector} + ${selector}::before`]: {
  14533. position: 'absolute',
  14534. top: vertical ? insetOffset : 0,
  14535. insetInlineStart: vertical ? 0 : insetOffset,
  14536. backgroundColor: colorPrimaryHover,
  14537. content: '""',
  14538. width: vertical ? '100%' : lineWidth,
  14539. height: vertical ? lineWidth : '100%'
  14540. }
  14541. };
  14542. };
  14543. // Special styles for Primary Button
  14544. return Object.assign(Object.assign({}, getCompactBorderStyle()), getCompactBorderStyle(true));
  14545. };
  14546. // ============================== Export ==============================
  14547. /* harmony default export */ var compact = ((0,genStyleUtils.genSubStyleComponent)(['Button', 'compact'], token => {
  14548. const buttonToken = (0,style_token.prepareToken)(token);
  14549. return [
  14550. // Space Compact
  14551. (0,compact_item.genCompactItemStyle)(buttonToken), genCompactItemVerticalStyle(buttonToken), genButtonCompactStyle(buttonToken)];
  14552. }, style_token.prepareComponentToken));
  14553. ;// ./components/button/button.tsx
  14554. var button_rest = undefined && undefined.__rest || function (s, e) {
  14555. var t = {};
  14556. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  14557. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  14558. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  14559. }
  14560. return t;
  14561. };
  14562. function getLoadingConfig(loading) {
  14563. if (typeof loading === 'object' && loading) {
  14564. let delay = loading === null || loading === void 0 ? void 0 : loading.delay;
  14565. delay = !Number.isNaN(delay) && typeof delay === 'number' ? delay : 0;
  14566. return {
  14567. loading: delay <= 0,
  14568. delay
  14569. };
  14570. }
  14571. return {
  14572. loading: !!loading,
  14573. delay: 0
  14574. };
  14575. }
  14576. const ButtonTypeMap = {
  14577. default: ['default', 'outlined'],
  14578. primary: ['primary', 'solid'],
  14579. dashed: ['default', 'dashed'],
  14580. // `link` is not a real color but we should compatible with it
  14581. link: ['link', 'link'],
  14582. text: ['default', 'text']
  14583. };
  14584. const InternalCompoundedButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  14585. var _a, _b;
  14586. const {
  14587. loading = false,
  14588. prefixCls: customizePrefixCls,
  14589. color,
  14590. variant,
  14591. type,
  14592. danger = false,
  14593. shape: customizeShape,
  14594. size: customizeSize,
  14595. styles,
  14596. disabled: customDisabled,
  14597. className,
  14598. rootClassName,
  14599. children,
  14600. icon,
  14601. iconPosition = 'start',
  14602. ghost = false,
  14603. block = false,
  14604. // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
  14605. htmlType = 'button',
  14606. classNames: customClassNames,
  14607. style: customStyle = {},
  14608. autoInsertSpace,
  14609. autoFocus
  14610. } = props,
  14611. rest = button_rest(props, ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"]);
  14612. // https://github.com/ant-design/ant-design/issues/47605
  14613. // Compatible with original `type` behavior
  14614. const mergedType = type || 'default';
  14615. const {
  14616. button
  14617. } = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
  14618. const shape = customizeShape || (button === null || button === void 0 ? void 0 : button.shape) || 'default';
  14619. const [mergedColor, mergedVariant] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  14620. // >>>>> Local
  14621. // Color & Variant
  14622. if (color && variant) {
  14623. return [color, variant];
  14624. }
  14625. // Sugar syntax
  14626. if (type || danger) {
  14627. const colorVariantPair = ButtonTypeMap[mergedType] || [];
  14628. if (danger) {
  14629. return ['danger', colorVariantPair[1]];
  14630. }
  14631. return colorVariantPair;
  14632. }
  14633. // >>> Context fallback
  14634. if ((button === null || button === void 0 ? void 0 : button.color) && (button === null || button === void 0 ? void 0 : button.variant)) {
  14635. return [button.color, button.variant];
  14636. }
  14637. return ['default', 'outlined'];
  14638. }, [type, color, variant, danger, button === null || button === void 0 ? void 0 : button.variant, button === null || button === void 0 ? void 0 : button.color]);
  14639. const isDanger = mergedColor === 'danger';
  14640. const mergedColorText = isDanger ? 'dangerous' : mergedColor;
  14641. const {
  14642. getPrefixCls,
  14643. direction,
  14644. autoInsertSpace: contextAutoInsertSpace,
  14645. className: contextClassName,
  14646. style: contextStyle,
  14647. classNames: contextClassNames,
  14648. styles: contextStyles
  14649. } = (0,config_provider_context.useComponentConfig)('button');
  14650. const mergedInsertSpace = (_a = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : contextAutoInsertSpace) !== null && _a !== void 0 ? _a : true;
  14651. const prefixCls = getPrefixCls('btn', customizePrefixCls);
  14652. const [wrapCSSVar, hashId, cssVarCls] = (0,button_style["default"])(prefixCls);
  14653. const disabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_DisabledContext);
  14654. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  14655. const groupSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(GroupSizeContext);
  14656. const loadingOrDelay = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => getLoadingConfig(loading), [loading]);
  14657. const [innerLoading, setLoading] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(loadingOrDelay.loading);
  14658. const [hasTwoCNChar, setHasTwoCNChar] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
  14659. const buttonRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  14660. const mergedRef = (0,es_ref.useComposeRef)(ref, buttonRef);
  14661. const needInserted = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(children) === 1 && !icon && !isUnBorderedButtonVariant(mergedVariant);
  14662. // ========================= Mount ==========================
  14663. // Record for mount status.
  14664. // This will help to no to show the animation of loading on the first mount.
  14665. const isMountRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
  14666. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  14667. isMountRef.current = false;
  14668. return () => {
  14669. isMountRef.current = true;
  14670. };
  14671. }, []);
  14672. // ========================= Effect =========================
  14673. // Loading. Should use `useLayoutEffect` to avoid low perf multiple click issue.
  14674. // https://github.com/ant-design/ant-design/issues/51325
  14675. (0,useLayoutEffect["default"])(() => {
  14676. let delayTimer = null;
  14677. if (loadingOrDelay.delay > 0) {
  14678. delayTimer = setTimeout(() => {
  14679. delayTimer = null;
  14680. setLoading(true);
  14681. }, loadingOrDelay.delay);
  14682. } else {
  14683. setLoading(loadingOrDelay.loading);
  14684. }
  14685. function cleanupTimer() {
  14686. if (delayTimer) {
  14687. clearTimeout(delayTimer);
  14688. delayTimer = null;
  14689. }
  14690. }
  14691. return cleanupTimer;
  14692. }, [loadingOrDelay.delay, loadingOrDelay.loading]);
  14693. // Two chinese characters check
  14694. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  14695. // FIXME: for HOC usage like <FormatMessage />
  14696. if (!buttonRef.current || !mergedInsertSpace) {
  14697. return;
  14698. }
  14699. const buttonText = buttonRef.current.textContent || '';
  14700. if (needInserted && isTwoCNChar(buttonText)) {
  14701. if (!hasTwoCNChar) {
  14702. setHasTwoCNChar(true);
  14703. }
  14704. } else if (hasTwoCNChar) {
  14705. setHasTwoCNChar(false);
  14706. }
  14707. });
  14708. // Auto focus
  14709. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  14710. if (autoFocus && buttonRef.current) {
  14711. buttonRef.current.focus();
  14712. }
  14713. }, []);
  14714. // ========================= Events =========================
  14715. const handleClick = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(e => {
  14716. var _a;
  14717. // FIXME: https://github.com/ant-design/ant-design/issues/30207
  14718. if (innerLoading || mergedDisabled) {
  14719. e.preventDefault();
  14720. return;
  14721. }
  14722. (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, 'href' in props ? e : e);
  14723. }, [props.onClick, innerLoading, mergedDisabled]);
  14724. // ========================== Warn ==========================
  14725. if (true) {
  14726. const warning = (0,_util_warning.devUseWarning)('Button');
  14727. true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
  14728. true ? warning(!(ghost && isUnBorderedButtonVariant(mergedVariant)), 'usage', "`link` or `text` button can't be a `ghost` button.") : 0;
  14729. }
  14730. // ========================== Size ==========================
  14731. const {
  14732. compactSize,
  14733. compactItemClassnames
  14734. } = useCompactItemContext(prefixCls, direction);
  14735. const sizeClassNameMap = {
  14736. large: 'lg',
  14737. small: 'sm',
  14738. middle: undefined
  14739. };
  14740. const sizeFullName = (0,useSize["default"])(ctxSize => {
  14741. var _a, _b;
  14742. return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;
  14743. });
  14744. const sizeCls = sizeFullName ? (_b = sizeClassNameMap[sizeFullName]) !== null && _b !== void 0 ? _b : '' : '';
  14745. const iconType = innerLoading ? 'loading' : icon;
  14746. const linkButtonRestProps = (0,omit["default"])(rest, ['navigate']);
  14747. // ========================= Render =========================
  14748. const classes = classnames_default()(prefixCls, hashId, cssVarCls, {
  14749. [`${prefixCls}-${shape}`]: shape !== 'default' && shape,
  14750. // Compatible with versions earlier than 5.21.0
  14751. [`${prefixCls}-${mergedType}`]: mergedType,
  14752. [`${prefixCls}-dangerous`]: danger,
  14753. [`${prefixCls}-color-${mergedColorText}`]: mergedColorText,
  14754. [`${prefixCls}-variant-${mergedVariant}`]: mergedVariant,
  14755. [`${prefixCls}-${sizeCls}`]: sizeCls,
  14756. [`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,
  14757. [`${prefixCls}-background-ghost`]: ghost && !isUnBorderedButtonVariant(mergedVariant),
  14758. [`${prefixCls}-loading`]: innerLoading,
  14759. [`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && mergedInsertSpace && !innerLoading,
  14760. [`${prefixCls}-block`]: block,
  14761. [`${prefixCls}-rtl`]: direction === 'rtl',
  14762. [`${prefixCls}-icon-end`]: iconPosition === 'end'
  14763. }, compactItemClassnames, className, rootClassName, contextClassName);
  14764. const fullStyle = Object.assign(Object.assign({}, contextStyle), customStyle);
  14765. const iconClasses = classnames_default()(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, contextClassNames.icon);
  14766. const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), contextStyles.icon || {});
  14767. const iconNode = icon && !innerLoading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_IconWrapper, {
  14768. prefixCls: prefixCls,
  14769. className: iconClasses,
  14770. style: iconStyle
  14771. }, icon)) : loading && typeof loading === 'object' && loading.icon ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_IconWrapper, {
  14772. prefixCls: prefixCls,
  14773. className: iconClasses,
  14774. style: iconStyle
  14775. }, loading.icon)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_DefaultLoadingIcon, {
  14776. existIcon: !!icon,
  14777. prefixCls: prefixCls,
  14778. loading: innerLoading,
  14779. mount: isMountRef.current
  14780. }));
  14781. const kids = children || children === 0 ? spaceChildren(children, needInserted && mergedInsertSpace) : null;
  14782. if (linkButtonRestProps.href !== undefined) {
  14783. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", Object.assign({}, linkButtonRestProps, {
  14784. className: classnames_default()(classes, {
  14785. [`${prefixCls}-disabled`]: mergedDisabled
  14786. }),
  14787. href: mergedDisabled ? undefined : linkButtonRestProps.href,
  14788. style: fullStyle,
  14789. onClick: handleClick,
  14790. ref: mergedRef,
  14791. tabIndex: mergedDisabled ? -1 : 0,
  14792. "aria-disabled": mergedDisabled
  14793. }), iconNode, kids));
  14794. }
  14795. let buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", Object.assign({}, rest, {
  14796. type: htmlType,
  14797. className: classes,
  14798. style: fullStyle,
  14799. onClick: handleClick,
  14800. disabled: mergedDisabled,
  14801. ref: mergedRef
  14802. }), iconNode, kids, compactItemClassnames && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(compact, {
  14803. prefixCls: prefixCls
  14804. }));
  14805. if (!isUnBorderedButtonVariant(mergedVariant)) {
  14806. buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(wave, {
  14807. component: "Button",
  14808. disabled: innerLoading
  14809. }, buttonNode);
  14810. }
  14811. return wrapCSSVar(buttonNode);
  14812. });
  14813. const Button = InternalCompoundedButton;
  14814. Button.Group = button_group;
  14815. Button.__ANT_BUTTON = true;
  14816. if (true) {
  14817. Button.displayName = 'Button';
  14818. }
  14819. /* harmony default export */ var button_button = (Button);
  14820. ;// ./components/button/index.tsx
  14821. /* harmony default export */ var components_button = (button_button);
  14822. ;// ./components/_util/ActionButton.tsx
  14823. const isThenable = thing => {
  14824. return typeof (thing === null || thing === void 0 ? void 0 : thing.then) === 'function';
  14825. };
  14826. const ActionButton = props => {
  14827. const {
  14828. type,
  14829. children,
  14830. prefixCls,
  14831. buttonProps,
  14832. close,
  14833. autoFocus,
  14834. emitEvent,
  14835. isSilent,
  14836. quitOnNullishReturnValue,
  14837. actionFn
  14838. } = props;
  14839. const clickedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  14840. const buttonRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  14841. const [loading, setLoading] = (0,useState["default"])(false);
  14842. const onInternalClose = (...args) => {
  14843. close === null || close === void 0 ? void 0 : close.apply(void 0, args);
  14844. };
  14845. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  14846. let timeoutId = null;
  14847. if (autoFocus) {
  14848. timeoutId = setTimeout(() => {
  14849. var _a;
  14850. (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus({
  14851. preventScroll: true
  14852. });
  14853. });
  14854. }
  14855. return () => {
  14856. if (timeoutId) {
  14857. clearTimeout(timeoutId);
  14858. }
  14859. };
  14860. }, []);
  14861. const handlePromiseOnOk = returnValueOfOnOk => {
  14862. if (!isThenable(returnValueOfOnOk)) {
  14863. return;
  14864. }
  14865. setLoading(true);
  14866. returnValueOfOnOk.then((...args) => {
  14867. setLoading(false, true);
  14868. onInternalClose.apply(void 0, args);
  14869. clickedRef.current = false;
  14870. }, e => {
  14871. // See: https://github.com/ant-design/ant-design/issues/6183
  14872. setLoading(false, true);
  14873. clickedRef.current = false;
  14874. // Do not throw if is `await` mode
  14875. if (isSilent === null || isSilent === void 0 ? void 0 : isSilent()) {
  14876. return;
  14877. }
  14878. return Promise.reject(e);
  14879. });
  14880. };
  14881. const onClick = e => {
  14882. if (clickedRef.current) {
  14883. return;
  14884. }
  14885. clickedRef.current = true;
  14886. if (!actionFn) {
  14887. onInternalClose();
  14888. return;
  14889. }
  14890. let returnValueOfOnOk;
  14891. if (emitEvent) {
  14892. returnValueOfOnOk = actionFn(e);
  14893. if (quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {
  14894. clickedRef.current = false;
  14895. onInternalClose(e);
  14896. return;
  14897. }
  14898. } else if (actionFn.length) {
  14899. returnValueOfOnOk = actionFn(close);
  14900. // https://github.com/ant-design/ant-design/issues/23358
  14901. clickedRef.current = false;
  14902. } else {
  14903. returnValueOfOnOk = actionFn();
  14904. if (!isThenable(returnValueOfOnOk)) {
  14905. onInternalClose();
  14906. return;
  14907. }
  14908. }
  14909. handlePromiseOnOk(returnValueOfOnOk);
  14910. };
  14911. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({}, convertLegacyProps(type), {
  14912. onClick: onClick,
  14913. loading: loading,
  14914. prefixCls: prefixCls
  14915. }, buttonProps, {
  14916. ref: buttonRef
  14917. }), children);
  14918. };
  14919. /* harmony default export */ var _util_ActionButton = (ActionButton);
  14920. ;// ./components/modal/context.ts
  14921. const ModalContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  14922. const {
  14923. Provider: ModalContextProvider
  14924. } = ModalContext;
  14925. ;// ./components/modal/components/ConfirmCancelBtn.tsx
  14926. const ConfirmCancelBtn = () => {
  14927. const {
  14928. autoFocusButton,
  14929. cancelButtonProps,
  14930. cancelTextLocale,
  14931. isSilent,
  14932. mergedOkCancel,
  14933. rootPrefixCls,
  14934. close,
  14935. onCancel,
  14936. onConfirm
  14937. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
  14938. return mergedOkCancel ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ActionButton, {
  14939. isSilent: isSilent,
  14940. actionFn: onCancel,
  14941. close: (...args) => {
  14942. close === null || close === void 0 ? void 0 : close.apply(void 0, args);
  14943. onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
  14944. },
  14945. autoFocus: autoFocusButton === 'cancel',
  14946. buttonProps: cancelButtonProps,
  14947. prefixCls: `${rootPrefixCls}-btn`
  14948. }, cancelTextLocale)) : null;
  14949. };
  14950. /* harmony default export */ var components_ConfirmCancelBtn = (ConfirmCancelBtn);
  14951. ;// ./components/modal/components/ConfirmOkBtn.tsx
  14952. const ConfirmOkBtn = () => {
  14953. const {
  14954. autoFocusButton,
  14955. close,
  14956. isSilent,
  14957. okButtonProps,
  14958. rootPrefixCls,
  14959. okTextLocale,
  14960. okType,
  14961. onConfirm,
  14962. onOk
  14963. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
  14964. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ActionButton, {
  14965. isSilent: isSilent,
  14966. type: okType || 'primary',
  14967. actionFn: onOk,
  14968. close: (...args) => {
  14969. close === null || close === void 0 ? void 0 : close.apply(void 0, args);
  14970. onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(true);
  14971. },
  14972. autoFocus: autoFocusButton === 'ok',
  14973. buttonProps: okButtonProps,
  14974. prefixCls: `${rootPrefixCls}-btn`
  14975. }, okTextLocale);
  14976. };
  14977. /* harmony default export */ var components_ConfirmOkBtn = (ConfirmOkBtn);
  14978. ;// ./node_modules/@rc-component/portal/es/Context.js
  14979. var OrderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  14980. /* harmony default export */ var es_Context = (OrderContext);
  14981. ;// ./node_modules/@rc-component/portal/es/useDom.js
  14982. var EMPTY_LIST = [];
  14983. /**
  14984. * Will add `div` to document. Nest call will keep order
  14985. * @param render Render DOM in document
  14986. */
  14987. function useDom(render, debug) {
  14988. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  14989. if (!(0,canUseDom["default"])()) {
  14990. return null;
  14991. }
  14992. var defaultEle = document.createElement('div');
  14993. if ( true && debug) {
  14994. defaultEle.setAttribute('data-debug', debug);
  14995. }
  14996. return defaultEle;
  14997. }),
  14998. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
  14999. ele = _React$useState2[0];
  15000. // ========================== Order ==========================
  15001. var appendedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  15002. var queueCreate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_Context);
  15003. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(EMPTY_LIST),
  15004. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  15005. queue = _React$useState4[0],
  15006. setQueue = _React$useState4[1];
  15007. var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) {
  15008. setQueue(function (origin) {
  15009. var newQueue = [appendFn].concat((0,toConsumableArray["default"])(origin));
  15010. return newQueue;
  15011. });
  15012. });
  15013. // =========================== DOM ===========================
  15014. function append() {
  15015. if (!ele.parentElement) {
  15016. document.body.appendChild(ele);
  15017. }
  15018. appendedRef.current = true;
  15019. }
  15020. function cleanup() {
  15021. var _ele$parentElement;
  15022. (_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele);
  15023. appendedRef.current = false;
  15024. }
  15025. (0,useLayoutEffect["default"])(function () {
  15026. if (render) {
  15027. if (queueCreate) {
  15028. queueCreate(append);
  15029. } else {
  15030. append();
  15031. }
  15032. } else {
  15033. cleanup();
  15034. }
  15035. return cleanup;
  15036. }, [render]);
  15037. (0,useLayoutEffect["default"])(function () {
  15038. if (queue.length) {
  15039. queue.forEach(function (appendFn) {
  15040. return appendFn();
  15041. });
  15042. setQueue(EMPTY_LIST);
  15043. }
  15044. }, [queue]);
  15045. return [ele, mergedQueueCreate];
  15046. }
  15047. ;// ./node_modules/rc-util/es/getScrollBarSize.js
  15048. /* eslint-disable no-param-reassign */
  15049. var cached;
  15050. function measureScrollbarSize(ele) {
  15051. var randomId = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7));
  15052. var measureEle = document.createElement('div');
  15053. measureEle.id = randomId;
  15054. // Create Style
  15055. var measureStyle = measureEle.style;
  15056. measureStyle.position = 'absolute';
  15057. measureStyle.left = '0';
  15058. measureStyle.top = '0';
  15059. measureStyle.width = '100px';
  15060. measureStyle.height = '100px';
  15061. measureStyle.overflow = 'scroll';
  15062. // Clone Style if needed
  15063. var fallbackWidth;
  15064. var fallbackHeight;
  15065. if (ele) {
  15066. var targetStyle = getComputedStyle(ele);
  15067. measureStyle.scrollbarColor = targetStyle.scrollbarColor;
  15068. measureStyle.scrollbarWidth = targetStyle.scrollbarWidth;
  15069. // Set Webkit style
  15070. var webkitScrollbarStyle = getComputedStyle(ele, '::-webkit-scrollbar');
  15071. var width = parseInt(webkitScrollbarStyle.width, 10);
  15072. var height = parseInt(webkitScrollbarStyle.height, 10);
  15073. // Try wrap to handle CSP case
  15074. try {
  15075. var widthStyle = width ? "width: ".concat(webkitScrollbarStyle.width, ";") : '';
  15076. var heightStyle = height ? "height: ".concat(webkitScrollbarStyle.height, ";") : '';
  15077. (0,dynamicCSS.updateCSS)("\n#".concat(randomId, "::-webkit-scrollbar {\n").concat(widthStyle, "\n").concat(heightStyle, "\n}"), randomId);
  15078. } catch (e) {
  15079. // Can't wrap, just log error
  15080. console.error(e);
  15081. // Get from style directly
  15082. fallbackWidth = width;
  15083. fallbackHeight = height;
  15084. }
  15085. }
  15086. document.body.appendChild(measureEle);
  15087. // Measure. Get fallback style if provided
  15088. var scrollWidth = ele && fallbackWidth && !isNaN(fallbackWidth) ? fallbackWidth : measureEle.offsetWidth - measureEle.clientWidth;
  15089. var scrollHeight = ele && fallbackHeight && !isNaN(fallbackHeight) ? fallbackHeight : measureEle.offsetHeight - measureEle.clientHeight;
  15090. // Clean up
  15091. document.body.removeChild(measureEle);
  15092. (0,dynamicCSS.removeCSS)(randomId);
  15093. return {
  15094. width: scrollWidth,
  15095. height: scrollHeight
  15096. };
  15097. }
  15098. function getScrollBarSize(fresh) {
  15099. if (typeof document === 'undefined') {
  15100. return 0;
  15101. }
  15102. if (fresh || cached === undefined) {
  15103. cached = measureScrollbarSize();
  15104. }
  15105. return cached.width;
  15106. }
  15107. function getTargetScrollBarSize(target) {
  15108. if (typeof document === 'undefined' || !target || !(target instanceof Element)) {
  15109. return {
  15110. width: 0,
  15111. height: 0
  15112. };
  15113. }
  15114. return measureScrollbarSize(target);
  15115. }
  15116. ;// ./node_modules/@rc-component/portal/es/util.js
  15117. /**
  15118. * Test usage export. Do not use in your production
  15119. */
  15120. function isBodyOverflowing() {
  15121. return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
  15122. }
  15123. ;// ./node_modules/@rc-component/portal/es/useScrollLocker.js
  15124. var UNIQUE_ID = "rc-util-locker-".concat(Date.now());
  15125. var uuid = 0;
  15126. function useScrollLocker(lock) {
  15127. var mergedLock = !!lock;
  15128. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  15129. uuid += 1;
  15130. return "".concat(UNIQUE_ID, "_").concat(uuid);
  15131. }),
  15132. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
  15133. id = _React$useState2[0];
  15134. (0,useLayoutEffect["default"])(function () {
  15135. if (mergedLock) {
  15136. var scrollbarSize = getTargetScrollBarSize(document.body).width;
  15137. var isOverflow = isBodyOverflowing();
  15138. (0,dynamicCSS.updateCSS)("\nhtml body {\n overflow-y: hidden;\n ".concat(isOverflow ? "width: calc(100% - ".concat(scrollbarSize, "px);") : '', "\n}"), id);
  15139. } else {
  15140. (0,dynamicCSS.removeCSS)(id);
  15141. }
  15142. return function () {
  15143. (0,dynamicCSS.removeCSS)(id);
  15144. };
  15145. }, [mergedLock, id]);
  15146. }
  15147. ;// ./node_modules/@rc-component/portal/es/mock.js
  15148. var inline = false;
  15149. function inlineMock(nextInline) {
  15150. if (typeof nextInline === 'boolean') {
  15151. inline = nextInline;
  15152. }
  15153. return inline;
  15154. }
  15155. ;// ./node_modules/@rc-component/portal/es/Portal.js
  15156. var getPortalContainer = function getPortalContainer(getContainer) {
  15157. if (getContainer === false) {
  15158. return false;
  15159. }
  15160. if (!(0,canUseDom["default"])() || !getContainer) {
  15161. return null;
  15162. }
  15163. if (typeof getContainer === 'string') {
  15164. return document.querySelector(getContainer);
  15165. }
  15166. if (typeof getContainer === 'function') {
  15167. return getContainer();
  15168. }
  15169. return getContainer;
  15170. };
  15171. var Portal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  15172. var open = props.open,
  15173. autoLock = props.autoLock,
  15174. getContainer = props.getContainer,
  15175. debug = props.debug,
  15176. _props$autoDestroy = props.autoDestroy,
  15177. autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy,
  15178. children = props.children;
  15179. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(open),
  15180. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  15181. shouldRender = _React$useState2[0],
  15182. setShouldRender = _React$useState2[1];
  15183. var mergedRender = shouldRender || open;
  15184. // ========================= Warning =========================
  15185. if (true) {
  15186. (0,warning["default"])((0,canUseDom["default"])() || !open, "Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR.");
  15187. }
  15188. // ====================== Should Render ======================
  15189. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  15190. if (autoDestroy || open) {
  15191. setShouldRender(open);
  15192. }
  15193. }, [open, autoDestroy]);
  15194. // ======================== Container ========================
  15195. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  15196. return getPortalContainer(getContainer);
  15197. }),
  15198. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  15199. innerContainer = _React$useState4[0],
  15200. setInnerContainer = _React$useState4[1];
  15201. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  15202. var customizeContainer = getPortalContainer(getContainer);
  15203. // Tell component that we check this in effect which is safe to be `null`
  15204. setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null);
  15205. });
  15206. var _useDom = useDom(mergedRender && !innerContainer, debug),
  15207. _useDom2 = (0,slicedToArray["default"])(_useDom, 2),
  15208. defaultContainer = _useDom2[0],
  15209. queueCreate = _useDom2[1];
  15210. var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer;
  15211. // ========================= Locker ==========================
  15212. useScrollLocker(autoLock && open && (0,canUseDom["default"])() && (mergedContainer === defaultContainer || mergedContainer === document.body));
  15213. // =========================== Ref ===========================
  15214. var childRef = null;
  15215. if (children && (0,es_ref.supportRef)(children) && ref) {
  15216. var _ref = children;
  15217. childRef = _ref.ref;
  15218. }
  15219. var mergedRef = (0,es_ref.useComposeRef)(childRef, ref);
  15220. // ========================= Render ==========================
  15221. // Do not render when nothing need render
  15222. // When innerContainer is `undefined`, it may not ready since user use ref in the same render
  15223. if (!mergedRender || !(0,canUseDom["default"])() || innerContainer === undefined) {
  15224. return null;
  15225. }
  15226. // Render inline
  15227. var renderInline = mergedContainer === false || inlineMock();
  15228. var reffedChildren = children;
  15229. if (ref) {
  15230. reffedChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
  15231. ref: mergedRef
  15232. });
  15233. }
  15234. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Context.Provider, {
  15235. value: queueCreate
  15236. }, renderInline ? reffedChildren : /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)(reffedChildren, mergedContainer));
  15237. });
  15238. if (true) {
  15239. Portal.displayName = 'Portal';
  15240. }
  15241. /* harmony default export */ var es_Portal = (Portal);
  15242. ;// ./node_modules/@rc-component/portal/es/index.js
  15243. /* harmony default export */ var portal_es = (es_Portal);
  15244. ;// ./node_modules/rc-dialog/es/context.js
  15245. var RefContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  15246. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js
  15247. var contains = __webpack_require__("./node_modules/rc-util/es/Dom/contains.js");
  15248. ;// ./node_modules/rc-util/es/hooks/useId.js
  15249. function getUseId() {
  15250. // We need fully clone React function here to avoid webpack warning React 17 do not export `useId`
  15251. var fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
  15252. return fullClone.useId;
  15253. }
  15254. var useId_uuid = 0;
  15255. /** @private Note only worked in develop env. Not work in production. */
  15256. function resetUuid() {
  15257. if (true) {
  15258. useId_uuid = 0;
  15259. }
  15260. }
  15261. var useOriginId = getUseId();
  15262. /* harmony default export */ var hooks_useId = (useOriginId ?
  15263. // Use React `useId`
  15264. function useId(id) {
  15265. var reactId = useOriginId();
  15266. // Developer passed id is single source of truth
  15267. if (id) {
  15268. return id;
  15269. }
  15270. // Test env always return mock id
  15271. if (false) // removed by dead control flow
  15272. {}
  15273. return reactId;
  15274. } :
  15275. // Use compatible of `useId`
  15276. function useCompatId(id) {
  15277. // Inner id for accessibility usage. Only work in client side
  15278. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('ssr-id'),
  15279. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  15280. innerId = _React$useState2[0],
  15281. setInnerId = _React$useState2[1];
  15282. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  15283. var nextId = useId_uuid;
  15284. useId_uuid += 1;
  15285. setInnerId("rc_unique_".concat(nextId));
  15286. }, []);
  15287. // Developer passed id is single source of truth
  15288. if (id) {
  15289. return id;
  15290. }
  15291. // Test env always return mock id
  15292. if (false) // removed by dead control flow
  15293. {}
  15294. // Return react native id or inner id
  15295. return innerId;
  15296. });
  15297. ;// ./node_modules/rc-dialog/es/util.js
  15298. // =============================== Motion ===============================
  15299. function getMotionName(prefixCls, transitionName, animationName) {
  15300. var motionName = transitionName;
  15301. if (!motionName && animationName) {
  15302. motionName = "".concat(prefixCls, "-").concat(animationName);
  15303. }
  15304. return motionName;
  15305. }
  15306. // =============================== Offset ===============================
  15307. function util_getScroll(w, top) {
  15308. var ret = w["page".concat(top ? 'Y' : 'X', "Offset")];
  15309. var method = "scroll".concat(top ? 'Top' : 'Left');
  15310. if (typeof ret !== 'number') {
  15311. var d = w.document;
  15312. ret = d.documentElement[method];
  15313. if (typeof ret !== 'number') {
  15314. ret = d.body[method];
  15315. }
  15316. }
  15317. return ret;
  15318. }
  15319. function offset(el) {
  15320. var rect = el.getBoundingClientRect();
  15321. var pos = {
  15322. left: rect.left,
  15323. top: rect.top
  15324. };
  15325. var doc = el.ownerDocument;
  15326. var w = doc.defaultView || doc.parentWindow;
  15327. pos.left += util_getScroll(w);
  15328. pos.top += util_getScroll(w, true);
  15329. return pos;
  15330. }
  15331. ;// ./node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js
  15332. /* harmony default export */ var MemoChildren = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function (_ref) {
  15333. var children = _ref.children;
  15334. return children;
  15335. }, function (_, _ref2) {
  15336. var shouldUpdate = _ref2.shouldUpdate;
  15337. return !shouldUpdate;
  15338. }));
  15339. ;// ./node_modules/rc-dialog/es/Dialog/Content/Panel.js
  15340. var sentinelStyle = {
  15341. width: 0,
  15342. height: 0,
  15343. overflow: 'hidden',
  15344. outline: 'none'
  15345. };
  15346. var entityStyle = {
  15347. outline: 'none'
  15348. };
  15349. var Panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
  15350. var prefixCls = props.prefixCls,
  15351. className = props.className,
  15352. style = props.style,
  15353. title = props.title,
  15354. ariaId = props.ariaId,
  15355. footer = props.footer,
  15356. closable = props.closable,
  15357. closeIcon = props.closeIcon,
  15358. onClose = props.onClose,
  15359. children = props.children,
  15360. bodyStyle = props.bodyStyle,
  15361. bodyProps = props.bodyProps,
  15362. modalRender = props.modalRender,
  15363. onMouseDown = props.onMouseDown,
  15364. onMouseUp = props.onMouseUp,
  15365. holderRef = props.holderRef,
  15366. visible = props.visible,
  15367. forceRender = props.forceRender,
  15368. width = props.width,
  15369. height = props.height,
  15370. modalClassNames = props.classNames,
  15371. modalStyles = props.styles;
  15372. // ================================= Refs =================================
  15373. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(RefContext),
  15374. panelRef = _React$useContext.panel;
  15375. var mergedRef = (0,es_ref.useComposeRef)(holderRef, panelRef);
  15376. var sentinelStartRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15377. var sentinelEndRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15378. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
  15379. return {
  15380. focus: function focus() {
  15381. var _sentinelStartRef$cur;
  15382. (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 || _sentinelStartRef$cur.focus({
  15383. preventScroll: true
  15384. });
  15385. },
  15386. changeActive: function changeActive(next) {
  15387. var _document = document,
  15388. activeElement = _document.activeElement;
  15389. if (next && activeElement === sentinelEndRef.current) {
  15390. sentinelStartRef.current.focus({
  15391. preventScroll: true
  15392. });
  15393. } else if (!next && activeElement === sentinelStartRef.current) {
  15394. sentinelEndRef.current.focus({
  15395. preventScroll: true
  15396. });
  15397. }
  15398. }
  15399. };
  15400. });
  15401. // ================================ Style =================================
  15402. var contentStyle = {};
  15403. if (width !== undefined) {
  15404. contentStyle.width = width;
  15405. }
  15406. if (height !== undefined) {
  15407. contentStyle.height = height;
  15408. }
  15409. // ================================ Render ================================
  15410. var footerNode = footer ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15411. className: classnames_default()("".concat(prefixCls, "-footer"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.footer),
  15412. style: (0,objectSpread2["default"])({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.footer)
  15413. }, footer) : null;
  15414. var headerNode = title ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15415. className: classnames_default()("".concat(prefixCls, "-header"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.header),
  15416. style: (0,objectSpread2["default"])({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.header)
  15417. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15418. className: "".concat(prefixCls, "-title"),
  15419. id: ariaId
  15420. }, title)) : null;
  15421. var closableObj = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  15422. if ((0,esm_typeof["default"])(closable) === 'object' && closable !== null) {
  15423. return closable;
  15424. }
  15425. if (closable) {
  15426. return {
  15427. closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  15428. className: "".concat(prefixCls, "-close-x")
  15429. })
  15430. };
  15431. }
  15432. return {};
  15433. }, [closable, closeIcon, prefixCls]);
  15434. var ariaProps = (0,pickAttrs["default"])(closableObj, true);
  15435. var closeBtnIsDisabled = (0,esm_typeof["default"])(closable) === 'object' && closable.disabled;
  15436. var closerNode = closable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", (0,esm_extends["default"])({
  15437. type: "button",
  15438. onClick: onClose,
  15439. "aria-label": "Close"
  15440. }, ariaProps, {
  15441. className: "".concat(prefixCls, "-close"),
  15442. disabled: closeBtnIsDisabled
  15443. }), closableObj.closeIcon) : null;
  15444. var content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15445. className: classnames_default()("".concat(prefixCls, "-content"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.content),
  15446. style: modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.content
  15447. }, closerNode, headerNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  15448. className: classnames_default()("".concat(prefixCls, "-body"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.body),
  15449. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, bodyStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.body)
  15450. }, bodyProps), children), footerNode);
  15451. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15452. key: "dialog-element",
  15453. role: "dialog",
  15454. "aria-labelledby": title ? ariaId : null,
  15455. "aria-modal": "true",
  15456. ref: mergedRef,
  15457. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), contentStyle),
  15458. className: classnames_default()(prefixCls, className),
  15459. onMouseDown: onMouseDown,
  15460. onMouseUp: onMouseUp
  15461. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15462. ref: sentinelStartRef,
  15463. tabIndex: 0,
  15464. style: entityStyle
  15465. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(MemoChildren, {
  15466. shouldUpdate: visible || forceRender
  15467. }, modalRender ? modalRender(content) : content)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  15468. tabIndex: 0,
  15469. ref: sentinelEndRef,
  15470. style: sentinelStyle
  15471. }));
  15472. });
  15473. if (true) {
  15474. Panel.displayName = 'Panel';
  15475. }
  15476. /* harmony default export */ var Content_Panel = (Panel);
  15477. ;// ./node_modules/rc-dialog/es/Dialog/Content/index.js
  15478. var Content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  15479. var prefixCls = props.prefixCls,
  15480. title = props.title,
  15481. style = props.style,
  15482. className = props.className,
  15483. visible = props.visible,
  15484. forceRender = props.forceRender,
  15485. destroyOnClose = props.destroyOnClose,
  15486. motionName = props.motionName,
  15487. ariaId = props.ariaId,
  15488. onVisibleChanged = props.onVisibleChanged,
  15489. mousePosition = props.mousePosition;
  15490. var dialogRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15491. // ============================= Style ==============================
  15492. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
  15493. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  15494. transformOrigin = _React$useState2[0],
  15495. setTransformOrigin = _React$useState2[1];
  15496. var contentStyle = {};
  15497. if (transformOrigin) {
  15498. contentStyle.transformOrigin = transformOrigin;
  15499. }
  15500. function onPrepare() {
  15501. var elementOffset = offset(dialogRef.current);
  15502. setTransformOrigin(mousePosition && (mousePosition.x || mousePosition.y) ? "".concat(mousePosition.x - elementOffset.left, "px ").concat(mousePosition.y - elementOffset.top, "px") : '');
  15503. }
  15504. // ============================= Render =============================
  15505. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  15506. visible: visible,
  15507. onVisibleChanged: onVisibleChanged,
  15508. onAppearPrepare: onPrepare,
  15509. onEnterPrepare: onPrepare,
  15510. forceRender: forceRender,
  15511. motionName: motionName,
  15512. removeOnLeave: destroyOnClose,
  15513. ref: dialogRef
  15514. }, function (_ref, motionRef) {
  15515. var motionClassName = _ref.className,
  15516. motionStyle = _ref.style;
  15517. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Content_Panel, (0,esm_extends["default"])({}, props, {
  15518. ref: ref,
  15519. title: title,
  15520. ariaId: ariaId,
  15521. prefixCls: prefixCls,
  15522. holderRef: motionRef,
  15523. style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), style), contentStyle),
  15524. className: classnames_default()(className, motionClassName)
  15525. }));
  15526. });
  15527. });
  15528. Content.displayName = 'Content';
  15529. /* harmony default export */ var Dialog_Content = (Content);
  15530. ;// ./node_modules/rc-dialog/es/Dialog/Mask.js
  15531. var Mask = function Mask(props) {
  15532. var prefixCls = props.prefixCls,
  15533. style = props.style,
  15534. visible = props.visible,
  15535. maskProps = props.maskProps,
  15536. motionName = props.motionName,
  15537. className = props.className;
  15538. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  15539. key: "mask",
  15540. visible: visible,
  15541. motionName: motionName,
  15542. leavedClassName: "".concat(prefixCls, "-mask-hidden")
  15543. }, function (_ref, ref) {
  15544. var motionClassName = _ref.className,
  15545. motionStyle = _ref.style;
  15546. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  15547. ref: ref,
  15548. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), style),
  15549. className: classnames_default()("".concat(prefixCls, "-mask"), motionClassName, className)
  15550. }, maskProps));
  15551. });
  15552. };
  15553. /* harmony default export */ var Dialog_Mask = (Mask);
  15554. ;// ./node_modules/rc-dialog/es/Dialog/index.js
  15555. var Dialog = function Dialog(props) {
  15556. var _props$prefixCls = props.prefixCls,
  15557. prefixCls = _props$prefixCls === void 0 ? 'rc-dialog' : _props$prefixCls,
  15558. zIndex = props.zIndex,
  15559. _props$visible = props.visible,
  15560. visible = _props$visible === void 0 ? false : _props$visible,
  15561. _props$keyboard = props.keyboard,
  15562. keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
  15563. _props$focusTriggerAf = props.focusTriggerAfterClose,
  15564. focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,
  15565. wrapStyle = props.wrapStyle,
  15566. wrapClassName = props.wrapClassName,
  15567. wrapProps = props.wrapProps,
  15568. onClose = props.onClose,
  15569. afterOpenChange = props.afterOpenChange,
  15570. afterClose = props.afterClose,
  15571. transitionName = props.transitionName,
  15572. animation = props.animation,
  15573. _props$closable = props.closable,
  15574. closable = _props$closable === void 0 ? true : _props$closable,
  15575. _props$mask = props.mask,
  15576. mask = _props$mask === void 0 ? true : _props$mask,
  15577. maskTransitionName = props.maskTransitionName,
  15578. maskAnimation = props.maskAnimation,
  15579. _props$maskClosable = props.maskClosable,
  15580. maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
  15581. maskStyle = props.maskStyle,
  15582. maskProps = props.maskProps,
  15583. rootClassName = props.rootClassName,
  15584. modalClassNames = props.classNames,
  15585. modalStyles = props.styles;
  15586. if (true) {
  15587. ['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(function (prop) {
  15588. // (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)
  15589. (0,warning.warning)(!(prop in props), "".concat(prop, " is deprecated, please use styles instead."));
  15590. });
  15591. if ('wrapClassName' in props) {
  15592. (0,warning.warning)(false, "wrapClassName is deprecated, please use classNames instead.");
  15593. }
  15594. }
  15595. var lastOutSideActiveElementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15596. var wrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15597. var contentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15598. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(visible),
  15599. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  15600. animatedVisible = _React$useState2[0],
  15601. setAnimatedVisible = _React$useState2[1];
  15602. // ========================== Init ==========================
  15603. var ariaId = hooks_useId();
  15604. function saveLastOutSideActiveElementRef() {
  15605. if (!(0,contains["default"])(wrapperRef.current, document.activeElement)) {
  15606. lastOutSideActiveElementRef.current = document.activeElement;
  15607. }
  15608. }
  15609. function focusDialogContent() {
  15610. if (!(0,contains["default"])(wrapperRef.current, document.activeElement)) {
  15611. var _contentRef$current;
  15612. (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 || _contentRef$current.focus();
  15613. }
  15614. }
  15615. // ========================= Events =========================
  15616. function onDialogVisibleChanged(newVisible) {
  15617. // Try to focus
  15618. if (newVisible) {
  15619. focusDialogContent();
  15620. } else {
  15621. // Clean up scroll bar & focus back
  15622. setAnimatedVisible(false);
  15623. if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {
  15624. try {
  15625. lastOutSideActiveElementRef.current.focus({
  15626. preventScroll: true
  15627. });
  15628. } catch (e) {
  15629. // Do nothing
  15630. }
  15631. lastOutSideActiveElementRef.current = null;
  15632. }
  15633. // Trigger afterClose only when change visible from true to false
  15634. if (animatedVisible) {
  15635. afterClose === null || afterClose === void 0 || afterClose();
  15636. }
  15637. }
  15638. afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(newVisible);
  15639. }
  15640. function onInternalClose(e) {
  15641. onClose === null || onClose === void 0 || onClose(e);
  15642. }
  15643. // >>> Content
  15644. var contentClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  15645. var contentTimeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  15646. // We need record content click incase content popup out of dialog
  15647. var onContentMouseDown = function onContentMouseDown() {
  15648. clearTimeout(contentTimeoutRef.current);
  15649. contentClickRef.current = true;
  15650. };
  15651. var onContentMouseUp = function onContentMouseUp() {
  15652. contentTimeoutRef.current = setTimeout(function () {
  15653. contentClickRef.current = false;
  15654. });
  15655. };
  15656. // >>> Wrapper
  15657. // Close only when element not on dialog
  15658. var onWrapperClick = null;
  15659. if (maskClosable) {
  15660. onWrapperClick = function onWrapperClick(e) {
  15661. if (contentClickRef.current) {
  15662. contentClickRef.current = false;
  15663. } else if (wrapperRef.current === e.target) {
  15664. onInternalClose(e);
  15665. }
  15666. };
  15667. }
  15668. function onWrapperKeyDown(e) {
  15669. if (keyboard && e.keyCode === KeyCode["default"].ESC) {
  15670. e.stopPropagation();
  15671. onInternalClose(e);
  15672. return;
  15673. }
  15674. // keep focus inside dialog
  15675. if (visible && e.keyCode === KeyCode["default"].TAB) {
  15676. contentRef.current.changeActive(!e.shiftKey);
  15677. }
  15678. }
  15679. // ========================= Effect =========================
  15680. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  15681. if (visible) {
  15682. setAnimatedVisible(true);
  15683. saveLastOutSideActiveElementRef();
  15684. }
  15685. }, [visible]);
  15686. // Remove direct should also check the scroll bar update
  15687. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  15688. return function () {
  15689. clearTimeout(contentTimeoutRef.current);
  15690. };
  15691. }, []);
  15692. var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
  15693. zIndex: zIndex
  15694. }, wrapStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.wrapper), {}, {
  15695. display: !animatedVisible ? 'none' : null
  15696. });
  15697. // ========================= Render =========================
  15698. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  15699. className: classnames_default()("".concat(prefixCls, "-root"), rootClassName)
  15700. }, (0,pickAttrs["default"])(props, {
  15701. data: true
  15702. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Dialog_Mask, {
  15703. prefixCls: prefixCls,
  15704. visible: mask && visible,
  15705. motionName: getMotionName(prefixCls, maskTransitionName, maskAnimation),
  15706. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({
  15707. zIndex: zIndex
  15708. }, maskStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.mask),
  15709. maskProps: maskProps,
  15710. className: modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.mask
  15711. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  15712. tabIndex: -1,
  15713. onKeyDown: onWrapperKeyDown,
  15714. className: classnames_default()("".concat(prefixCls, "-wrap"), wrapClassName, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper),
  15715. ref: wrapperRef,
  15716. onClick: onWrapperClick,
  15717. style: mergedStyle
  15718. }, wrapProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Dialog_Content, (0,esm_extends["default"])({}, props, {
  15719. onMouseDown: onContentMouseDown,
  15720. onMouseUp: onContentMouseUp,
  15721. ref: contentRef,
  15722. closable: closable,
  15723. ariaId: ariaId,
  15724. prefixCls: prefixCls,
  15725. visible: visible && animatedVisible,
  15726. onClose: onInternalClose,
  15727. onVisibleChanged: onDialogVisibleChanged,
  15728. motionName: getMotionName(prefixCls, transitionName, animation)
  15729. }))));
  15730. };
  15731. /* harmony default export */ var es_Dialog = (Dialog);
  15732. ;// ./node_modules/rc-dialog/es/DialogWrap.js
  15733. // fix issue #10656
  15734. /*
  15735. * getContainer remarks
  15736. * Custom container should not be return, because in the Portal component, it will remove the
  15737. * return container element here, if the custom container is the only child of it's component,
  15738. * like issue #10656, It will has a conflict with removeChild method in react-dom.
  15739. * So here should add a child (div element) to custom container.
  15740. * */
  15741. var DialogWrap = function DialogWrap(props) {
  15742. var visible = props.visible,
  15743. getContainer = props.getContainer,
  15744. forceRender = props.forceRender,
  15745. _props$destroyOnClose = props.destroyOnClose,
  15746. destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,
  15747. _afterClose = props.afterClose,
  15748. panelRef = props.panelRef;
  15749. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(visible),
  15750. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  15751. animatedVisible = _React$useState2[0],
  15752. setAnimatedVisible = _React$useState2[1];
  15753. var refContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  15754. return {
  15755. panel: panelRef
  15756. };
  15757. }, [panelRef]);
  15758. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  15759. if (visible) {
  15760. setAnimatedVisible(true);
  15761. }
  15762. }, [visible]);
  15763. // Destroy on close will remove wrapped div
  15764. if (!forceRender && destroyOnClose && !animatedVisible) {
  15765. return null;
  15766. }
  15767. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RefContext.Provider, {
  15768. value: refContext
  15769. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
  15770. open: visible || forceRender || animatedVisible,
  15771. autoDestroy: false,
  15772. getContainer: getContainer,
  15773. autoLock: visible || animatedVisible
  15774. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Dialog, (0,esm_extends["default"])({}, props, {
  15775. destroyOnClose: destroyOnClose,
  15776. afterClose: function afterClose() {
  15777. _afterClose === null || _afterClose === void 0 || _afterClose();
  15778. setAnimatedVisible(false);
  15779. }
  15780. }))));
  15781. };
  15782. DialogWrap.displayName = 'Dialog';
  15783. /* harmony default export */ var es_DialogWrap = (DialogWrap);
  15784. ;// ./node_modules/rc-dialog/es/index.js
  15785. /* harmony default export */ var rc_dialog_es = (es_DialogWrap);
  15786. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
  15787. var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  15788. ;// ./node_modules/rc-field-form/es/FieldContext.js
  15789. var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';
  15790. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  15791. var warningFunc = function warningFunc() {
  15792. (0,warning["default"])(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');
  15793. };
  15794. var FieldContext_Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  15795. getFieldValue: warningFunc,
  15796. getFieldsValue: warningFunc,
  15797. getFieldError: warningFunc,
  15798. getFieldWarning: warningFunc,
  15799. getFieldsError: warningFunc,
  15800. isFieldsTouched: warningFunc,
  15801. isFieldTouched: warningFunc,
  15802. isFieldValidating: warningFunc,
  15803. isFieldsValidating: warningFunc,
  15804. resetFields: warningFunc,
  15805. setFields: warningFunc,
  15806. setFieldValue: warningFunc,
  15807. setFieldsValue: warningFunc,
  15808. validateFields: warningFunc,
  15809. submit: warningFunc,
  15810. getInternalHooks: function getInternalHooks() {
  15811. warningFunc();
  15812. return {
  15813. dispatch: warningFunc,
  15814. initEntityValue: warningFunc,
  15815. registerField: warningFunc,
  15816. useSubscribe: warningFunc,
  15817. setInitialValues: warningFunc,
  15818. destroyForm: warningFunc,
  15819. setCallbacks: warningFunc,
  15820. registerWatch: warningFunc,
  15821. getFields: warningFunc,
  15822. setValidateMessages: warningFunc,
  15823. setPreserve: warningFunc,
  15824. getInitialValue: warningFunc
  15825. };
  15826. }
  15827. });
  15828. /* harmony default export */ var FieldContext = (FieldContext_Context);
  15829. ;// ./node_modules/rc-field-form/es/ListContext.js
  15830. var ListContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  15831. /* harmony default export */ var es_ListContext = (ListContext);
  15832. ;// ./node_modules/rc-field-form/es/utils/typeUtil.js
  15833. function typeUtil_toArray(value) {
  15834. if (value === undefined || value === null) {
  15835. return [];
  15836. }
  15837. return Array.isArray(value) ? value : [value];
  15838. }
  15839. function isFormInstance(form) {
  15840. return form && !!form._init;
  15841. }
  15842. ;// ./node_modules/@rc-component/async-validator/es/messages.js
  15843. function newMessages() {
  15844. return {
  15845. default: 'Validation error on field %s',
  15846. required: '%s is required',
  15847. enum: '%s must be one of %s',
  15848. whitespace: '%s cannot be empty',
  15849. date: {
  15850. format: '%s date %s is invalid for format %s',
  15851. parse: '%s date could not be parsed, %s is invalid ',
  15852. invalid: '%s date %s is invalid'
  15853. },
  15854. types: {
  15855. string: '%s is not a %s',
  15856. method: '%s is not a %s (function)',
  15857. array: '%s is not an %s',
  15858. object: '%s is not an %s',
  15859. number: '%s is not a %s',
  15860. date: '%s is not a %s',
  15861. boolean: '%s is not a %s',
  15862. integer: '%s is not an %s',
  15863. float: '%s is not a %s',
  15864. regexp: '%s is not a valid %s',
  15865. email: '%s is not a valid %s',
  15866. url: '%s is not a valid %s',
  15867. hex: '%s is not a valid %s'
  15868. },
  15869. string: {
  15870. len: '%s must be exactly %s characters',
  15871. min: '%s must be at least %s characters',
  15872. max: '%s cannot be longer than %s characters',
  15873. range: '%s must be between %s and %s characters'
  15874. },
  15875. number: {
  15876. len: '%s must equal %s',
  15877. min: '%s cannot be less than %s',
  15878. max: '%s cannot be greater than %s',
  15879. range: '%s must be between %s and %s'
  15880. },
  15881. array: {
  15882. len: '%s must be exactly %s in length',
  15883. min: '%s cannot be less than %s in length',
  15884. max: '%s cannot be greater than %s in length',
  15885. range: '%s must be between %s and %s in length'
  15886. },
  15887. pattern: {
  15888. mismatch: '%s value %s does not match pattern %s'
  15889. },
  15890. clone: function clone() {
  15891. var cloned = JSON.parse(JSON.stringify(this));
  15892. cloned.clone = this.clone;
  15893. return cloned;
  15894. }
  15895. };
  15896. }
  15897. var messages_messages = newMessages();
  15898. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
  15899. var setPrototypeOf = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
  15900. ;// ./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
  15901. function _isNativeFunction(t) {
  15902. try {
  15903. return -1 !== Function.toString.call(t).indexOf("[native code]");
  15904. } catch (n) {
  15905. return "function" == typeof t;
  15906. }
  15907. }
  15908. ;// ./node_modules/@babel/runtime/helpers/esm/construct.js
  15909. function _construct(t, e, r) {
  15910. if ((0,isNativeReflectConstruct["default"])()) return Reflect.construct.apply(null, arguments);
  15911. var o = [null];
  15912. o.push.apply(o, e);
  15913. var p = new (t.bind.apply(t, o))();
  15914. return r && (0,setPrototypeOf["default"])(p, r.prototype), p;
  15915. }
  15916. ;// ./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
  15917. function _wrapNativeSuper(t) {
  15918. var r = "function" == typeof Map ? new Map() : void 0;
  15919. return _wrapNativeSuper = function _wrapNativeSuper(t) {
  15920. if (null === t || !_isNativeFunction(t)) return t;
  15921. if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
  15922. if (void 0 !== r) {
  15923. if (r.has(t)) return r.get(t);
  15924. r.set(t, Wrapper);
  15925. }
  15926. function Wrapper() {
  15927. return _construct(t, arguments, (0,getPrototypeOf["default"])(this).constructor);
  15928. }
  15929. return Wrapper.prototype = Object.create(t.prototype, {
  15930. constructor: {
  15931. value: Wrapper,
  15932. enumerable: !1,
  15933. writable: !0,
  15934. configurable: !0
  15935. }
  15936. }), (0,setPrototypeOf["default"])(Wrapper, t);
  15937. }, _wrapNativeSuper(t);
  15938. }
  15939. ;// ./node_modules/@rc-component/async-validator/es/util.js
  15940. /* eslint no-console:0 */
  15941. var formatRegExp = /%[sdj%]/g;
  15942. var util_warning = function warning() {};
  15943. // don't print warning message when in production env or node runtime
  15944. if (typeof process !== 'undefined' && process.env && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  15945. util_warning = function warning(type, errors) {
  15946. if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {
  15947. if (errors.every(function (e) {
  15948. return typeof e === 'string';
  15949. })) {
  15950. console.warn(type, errors);
  15951. }
  15952. }
  15953. };
  15954. }
  15955. function convertFieldsError(errors) {
  15956. if (!errors || !errors.length) return null;
  15957. var fields = {};
  15958. errors.forEach(function (error) {
  15959. var field = error.field;
  15960. fields[field] = fields[field] || [];
  15961. fields[field].push(error);
  15962. });
  15963. return fields;
  15964. }
  15965. function format(template) {
  15966. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  15967. args[_key - 1] = arguments[_key];
  15968. }
  15969. var i = 0;
  15970. var len = args.length;
  15971. if (typeof template === 'function') {
  15972. // eslint-disable-next-line prefer-spread
  15973. return template.apply(null, args);
  15974. }
  15975. if (typeof template === 'string') {
  15976. var str = template.replace(formatRegExp, function (x) {
  15977. if (x === '%%') {
  15978. return '%';
  15979. }
  15980. if (i >= len) {
  15981. return x;
  15982. }
  15983. switch (x) {
  15984. case '%s':
  15985. return String(args[i++]);
  15986. case '%d':
  15987. return Number(args[i++]);
  15988. case '%j':
  15989. try {
  15990. return JSON.stringify(args[i++]);
  15991. } catch (_) {
  15992. return '[Circular]';
  15993. }
  15994. // removed by dead control flow
  15995. default:
  15996. return x;
  15997. }
  15998. });
  15999. return str;
  16000. }
  16001. return template;
  16002. }
  16003. function isNativeStringType(type) {
  16004. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';
  16005. }
  16006. function isEmptyValue(value, type) {
  16007. if (value === undefined || value === null) {
  16008. return true;
  16009. }
  16010. if (type === 'array' && Array.isArray(value) && !value.length) {
  16011. return true;
  16012. }
  16013. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  16014. return true;
  16015. }
  16016. return false;
  16017. }
  16018. function isEmptyObject(obj) {
  16019. return Object.keys(obj).length === 0;
  16020. }
  16021. function asyncParallelArray(arr, func, callback) {
  16022. var results = [];
  16023. var total = 0;
  16024. var arrLength = arr.length;
  16025. function count(errors) {
  16026. results.push.apply(results, (0,toConsumableArray["default"])(errors || []));
  16027. total++;
  16028. if (total === arrLength) {
  16029. callback(results);
  16030. }
  16031. }
  16032. arr.forEach(function (a) {
  16033. func(a, count);
  16034. });
  16035. }
  16036. function asyncSerialArray(arr, func, callback) {
  16037. var index = 0;
  16038. var arrLength = arr.length;
  16039. function next(errors) {
  16040. if (errors && errors.length) {
  16041. callback(errors);
  16042. return;
  16043. }
  16044. var original = index;
  16045. index = index + 1;
  16046. if (original < arrLength) {
  16047. func(arr[original], next);
  16048. } else {
  16049. callback([]);
  16050. }
  16051. }
  16052. next([]);
  16053. }
  16054. function flattenObjArr(objArr) {
  16055. var ret = [];
  16056. Object.keys(objArr).forEach(function (k) {
  16057. ret.push.apply(ret, (0,toConsumableArray["default"])(objArr[k] || []));
  16058. });
  16059. return ret;
  16060. }
  16061. var AsyncValidationError = /*#__PURE__*/function (_Error) {
  16062. (0,inherits["default"])(AsyncValidationError, _Error);
  16063. var _super = (0,createSuper["default"])(AsyncValidationError);
  16064. function AsyncValidationError(errors, fields) {
  16065. var _this;
  16066. (0,classCallCheck["default"])(this, AsyncValidationError);
  16067. _this = _super.call(this, 'Async Validation Error');
  16068. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "errors", void 0);
  16069. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "fields", void 0);
  16070. _this.errors = errors;
  16071. _this.fields = fields;
  16072. return _this;
  16073. }
  16074. return (0,createClass["default"])(AsyncValidationError);
  16075. }( /*#__PURE__*/_wrapNativeSuper(Error));
  16076. function asyncMap(objArr, option, func, callback, source) {
  16077. if (option.first) {
  16078. var _pending = new Promise(function (resolve, reject) {
  16079. var next = function next(errors) {
  16080. callback(errors);
  16081. return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
  16082. };
  16083. var flattenArr = flattenObjArr(objArr);
  16084. asyncSerialArray(flattenArr, func, next);
  16085. });
  16086. _pending.catch(function (e) {
  16087. return e;
  16088. });
  16089. return _pending;
  16090. }
  16091. var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
  16092. var objArrKeys = Object.keys(objArr);
  16093. var objArrLength = objArrKeys.length;
  16094. var total = 0;
  16095. var results = [];
  16096. var pending = new Promise(function (resolve, reject) {
  16097. var next = function next(errors) {
  16098. // eslint-disable-next-line prefer-spread
  16099. results.push.apply(results, errors);
  16100. total++;
  16101. if (total === objArrLength) {
  16102. callback(results);
  16103. return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
  16104. }
  16105. };
  16106. if (!objArrKeys.length) {
  16107. callback(results);
  16108. resolve(source);
  16109. }
  16110. objArrKeys.forEach(function (key) {
  16111. var arr = objArr[key];
  16112. if (firstFields.indexOf(key) !== -1) {
  16113. asyncSerialArray(arr, func, next);
  16114. } else {
  16115. asyncParallelArray(arr, func, next);
  16116. }
  16117. });
  16118. });
  16119. pending.catch(function (e) {
  16120. return e;
  16121. });
  16122. return pending;
  16123. }
  16124. function isErrorObj(obj) {
  16125. return !!(obj && obj.message !== undefined);
  16126. }
  16127. function getValue(value, path) {
  16128. var v = value;
  16129. for (var i = 0; i < path.length; i++) {
  16130. if (v == undefined) {
  16131. return v;
  16132. }
  16133. v = v[path[i]];
  16134. }
  16135. return v;
  16136. }
  16137. function complementError(rule, source) {
  16138. return function (oe) {
  16139. var fieldValue;
  16140. if (rule.fullFields) {
  16141. fieldValue = getValue(source, rule.fullFields);
  16142. } else {
  16143. fieldValue = source[oe.field || rule.fullField];
  16144. }
  16145. if (isErrorObj(oe)) {
  16146. oe.field = oe.field || rule.fullField;
  16147. oe.fieldValue = fieldValue;
  16148. return oe;
  16149. }
  16150. return {
  16151. message: typeof oe === 'function' ? oe() : oe,
  16152. fieldValue: fieldValue,
  16153. field: oe.field || rule.fullField
  16154. };
  16155. };
  16156. }
  16157. function deepMerge(target, source) {
  16158. if (source) {
  16159. for (var s in source) {
  16160. if (source.hasOwnProperty(s)) {
  16161. var value = source[s];
  16162. if ((0,esm_typeof["default"])(value) === 'object' && (0,esm_typeof["default"])(target[s]) === 'object') {
  16163. target[s] = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, target[s]), value);
  16164. } else {
  16165. target[s] = value;
  16166. }
  16167. }
  16168. }
  16169. }
  16170. return target;
  16171. }
  16172. ;// ./node_modules/@rc-component/async-validator/es/rule/enum.js
  16173. var ENUM = 'enum';
  16174. var enumerable = function enumerable(rule, value, source, errors, options) {
  16175. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  16176. if (rule[ENUM].indexOf(value) === -1) {
  16177. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  16178. }
  16179. };
  16180. /* harmony default export */ var rule_enum = (enumerable);
  16181. ;// ./node_modules/@rc-component/async-validator/es/rule/pattern.js
  16182. var pattern = function pattern(rule, value, source, errors, options) {
  16183. if (rule.pattern) {
  16184. if (rule.pattern instanceof RegExp) {
  16185. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  16186. // flag is accidentally set to `true`, which in a validation scenario
  16187. // is not necessary and the result might be misleading
  16188. rule.pattern.lastIndex = 0;
  16189. if (!rule.pattern.test(value)) {
  16190. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  16191. }
  16192. } else if (typeof rule.pattern === 'string') {
  16193. var _pattern = new RegExp(rule.pattern);
  16194. if (!_pattern.test(value)) {
  16195. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  16196. }
  16197. }
  16198. }
  16199. };
  16200. /* harmony default export */ var rule_pattern = (pattern);
  16201. ;// ./node_modules/@rc-component/async-validator/es/rule/range.js
  16202. var range = function range(rule, value, source, errors, options) {
  16203. var len = typeof rule.len === 'number';
  16204. var min = typeof rule.min === 'number';
  16205. var max = typeof rule.max === 'number';
  16206. // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  16207. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  16208. var val = value;
  16209. var key = null;
  16210. var num = typeof value === 'number';
  16211. var str = typeof value === 'string';
  16212. var arr = Array.isArray(value);
  16213. if (num) {
  16214. key = 'number';
  16215. } else if (str) {
  16216. key = 'string';
  16217. } else if (arr) {
  16218. key = 'array';
  16219. }
  16220. // if the value is not of a supported type for range validation
  16221. // the validation rule rule should use the
  16222. // type property to also test for a particular type
  16223. if (!key) {
  16224. return false;
  16225. }
  16226. if (arr) {
  16227. val = value.length;
  16228. }
  16229. if (str) {
  16230. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".length !== 3
  16231. val = value.replace(spRegexp, '_').length;
  16232. }
  16233. if (len) {
  16234. if (val !== rule.len) {
  16235. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  16236. }
  16237. } else if (min && !max && val < rule.min) {
  16238. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  16239. } else if (max && !min && val > rule.max) {
  16240. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  16241. } else if (min && max && (val < rule.min || val > rule.max)) {
  16242. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  16243. }
  16244. };
  16245. /* harmony default export */ var rule_range = (range);
  16246. ;// ./node_modules/@rc-component/async-validator/es/rule/required.js
  16247. var required = function required(rule, value, source, errors, options, type) {
  16248. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  16249. errors.push(format(options.messages.required, rule.fullField));
  16250. }
  16251. };
  16252. /* harmony default export */ var rule_required = (required);
  16253. ;// ./node_modules/@rc-component/async-validator/es/rule/url.js
  16254. // https://github.com/kevva/url-regex/blob/master/index.js
  16255. var urlReg;
  16256. /* harmony default export */ var rule_url = (function () {
  16257. if (urlReg) {
  16258. return urlReg;
  16259. }
  16260. var word = '[a-fA-F\\d:]';
  16261. var b = function b(options) {
  16262. return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=".concat(word, ")|(?<=").concat(word, ")(?=\\s|$))") : '';
  16263. };
  16264. var v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
  16265. var v6seg = '[a-fA-F\\d]{1,4}';
  16266. var v6List = ["(?:".concat(v6seg, ":){7}(?:").concat(v6seg, "|:)"), // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
  16267. "(?:".concat(v6seg, ":){6}(?:").concat(v4, "|:").concat(v6seg, "|:)"), // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::
  16268. "(?:".concat(v6seg, ":){5}(?::").concat(v4, "|(?::").concat(v6seg, "){1,2}|:)"), // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::
  16269. "(?:".concat(v6seg, ":){4}(?:(?::").concat(v6seg, "){0,1}:").concat(v4, "|(?::").concat(v6seg, "){1,3}|:)"), // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::
  16270. "(?:".concat(v6seg, ":){3}(?:(?::").concat(v6seg, "){0,2}:").concat(v4, "|(?::").concat(v6seg, "){1,4}|:)"), // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::
  16271. "(?:".concat(v6seg, ":){2}(?:(?::").concat(v6seg, "){0,3}:").concat(v4, "|(?::").concat(v6seg, "){1,5}|:)"), // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::
  16272. "(?:".concat(v6seg, ":){1}(?:(?::").concat(v6seg, "){0,4}:").concat(v4, "|(?::").concat(v6seg, "){1,6}|:)"), // 1:: 1::3:4:5:6:7:8 1::8 1::
  16273. "(?::(?:(?::".concat(v6seg, "){0,5}:").concat(v4, "|(?::").concat(v6seg, "){1,7}|:))") // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::
  16274. ];
  16275. var v6Eth0 = "(?:%[0-9a-zA-Z]{1,})?"; // %eth0 %1
  16276. var v6 = "(?:".concat(v6List.join('|'), ")").concat(v6Eth0);
  16277. // Pre-compile only the exact regexes because adding a global flag make regexes stateful
  16278. var v46Exact = new RegExp("(?:^".concat(v4, "$)|(?:^").concat(v6, "$)"));
  16279. var v4exact = new RegExp("^".concat(v4, "$"));
  16280. var v6exact = new RegExp("^".concat(v6, "$"));
  16281. var ip = function ip(options) {
  16282. return options && options.exact ? v46Exact : new RegExp("(?:".concat(b(options)).concat(v4).concat(b(options), ")|(?:").concat(b(options)).concat(v6).concat(b(options), ")"), 'g');
  16283. };
  16284. ip.v4 = function (options) {
  16285. return options && options.exact ? v4exact : new RegExp("".concat(b(options)).concat(v4).concat(b(options)), 'g');
  16286. };
  16287. ip.v6 = function (options) {
  16288. return options && options.exact ? v6exact : new RegExp("".concat(b(options)).concat(v6).concat(b(options)), 'g');
  16289. };
  16290. var protocol = "(?:(?:[a-z]+:)?//)";
  16291. var auth = '(?:\\S+(?::\\S*)?@)?';
  16292. var ipv4 = ip.v4().source;
  16293. var ipv6 = ip.v6().source;
  16294. var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
  16295. var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
  16296. var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
  16297. var port = '(?::\\d{2,5})?';
  16298. var path = '(?:[/?#][^\\s"]*)?';
  16299. var regex = "(?:".concat(protocol, "|www\\.)").concat(auth, "(?:localhost|").concat(ipv4, "|").concat(ipv6, "|").concat(host).concat(domain).concat(tld, ")").concat(port).concat(path);
  16300. urlReg = new RegExp("(?:^".concat(regex, "$)"), 'i');
  16301. return urlReg;
  16302. });
  16303. ;// ./node_modules/@rc-component/async-validator/es/rule/type.js
  16304. /* eslint max-len:0 */
  16305. var type_pattern = {
  16306. // http://emailregex.com/
  16307. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  16308. // url: new RegExp(
  16309. // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  16310. // 'i',
  16311. // ),
  16312. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  16313. };
  16314. var types = {
  16315. integer: function integer(value) {
  16316. return types.number(value) && parseInt(value, 10) === value;
  16317. },
  16318. float: function float(value) {
  16319. return types.number(value) && !types.integer(value);
  16320. },
  16321. array: function array(value) {
  16322. return Array.isArray(value);
  16323. },
  16324. regexp: function regexp(value) {
  16325. if (value instanceof RegExp) {
  16326. return true;
  16327. }
  16328. try {
  16329. return !!new RegExp(value);
  16330. } catch (e) {
  16331. return false;
  16332. }
  16333. },
  16334. date: function date(value) {
  16335. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());
  16336. },
  16337. number: function number(value) {
  16338. if (isNaN(value)) {
  16339. return false;
  16340. }
  16341. return typeof value === 'number';
  16342. },
  16343. object: function object(value) {
  16344. return (0,esm_typeof["default"])(value) === 'object' && !types.array(value);
  16345. },
  16346. method: function method(value) {
  16347. return typeof value === 'function';
  16348. },
  16349. email: function email(value) {
  16350. return typeof value === 'string' && value.length <= 320 && !!value.match(type_pattern.email);
  16351. },
  16352. url: function url(value) {
  16353. return typeof value === 'string' && value.length <= 2048 && !!value.match(rule_url());
  16354. },
  16355. hex: function hex(value) {
  16356. return typeof value === 'string' && !!value.match(type_pattern.hex);
  16357. }
  16358. };
  16359. var type = function type(rule, value, source, errors, options) {
  16360. if (rule.required && value === undefined) {
  16361. rule_required(rule, value, source, errors, options);
  16362. return;
  16363. }
  16364. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  16365. var ruleType = rule.type;
  16366. if (custom.indexOf(ruleType) > -1) {
  16367. if (!types[ruleType](value)) {
  16368. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  16369. }
  16370. // straight typeof check
  16371. } else if (ruleType && (0,esm_typeof["default"])(value) !== rule.type) {
  16372. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  16373. }
  16374. };
  16375. /* harmony default export */ var rule_type = (type);
  16376. ;// ./node_modules/@rc-component/async-validator/es/rule/whitespace.js
  16377. /**
  16378. * Rule for validating whitespace.
  16379. *
  16380. * @param rule The validation rule.
  16381. * @param value The value of the field on the source object.
  16382. * @param source The source object being validated.
  16383. * @param errors An array of errors that this rule may add
  16384. * validation errors to.
  16385. * @param options The validation options.
  16386. * @param options.messages The validation messages.
  16387. */
  16388. var whitespace = function whitespace(rule, value, source, errors, options) {
  16389. if (/^\s+$/.test(value) || value === '') {
  16390. errors.push(format(options.messages.whitespace, rule.fullField));
  16391. }
  16392. };
  16393. /* harmony default export */ var rule_whitespace = (whitespace);
  16394. ;// ./node_modules/@rc-component/async-validator/es/rule/index.js
  16395. /* harmony default export */ var es_rule = ({
  16396. required: rule_required,
  16397. whitespace: rule_whitespace,
  16398. type: rule_type,
  16399. range: rule_range,
  16400. enum: rule_enum,
  16401. pattern: rule_pattern
  16402. });
  16403. ;// ./node_modules/@rc-component/async-validator/es/validator/any.js
  16404. var any = function any(rule, value, callback, source, options) {
  16405. var errors = [];
  16406. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16407. if (validate) {
  16408. if (isEmptyValue(value) && !rule.required) {
  16409. return callback();
  16410. }
  16411. es_rule.required(rule, value, source, errors, options);
  16412. }
  16413. callback(errors);
  16414. };
  16415. /* harmony default export */ var validator_any = (any);
  16416. ;// ./node_modules/@rc-component/async-validator/es/validator/array.js
  16417. var array = function array(rule, value, callback, source, options) {
  16418. var errors = [];
  16419. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16420. if (validate) {
  16421. if ((value === undefined || value === null) && !rule.required) {
  16422. return callback();
  16423. }
  16424. es_rule.required(rule, value, source, errors, options, 'array');
  16425. if (value !== undefined && value !== null) {
  16426. es_rule.type(rule, value, source, errors, options);
  16427. es_rule.range(rule, value, source, errors, options);
  16428. }
  16429. }
  16430. callback(errors);
  16431. };
  16432. /* harmony default export */ var validator_array = (array);
  16433. ;// ./node_modules/@rc-component/async-validator/es/validator/boolean.js
  16434. var boolean_boolean = function boolean(rule, value, callback, source, options) {
  16435. var errors = [];
  16436. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16437. if (validate) {
  16438. if (isEmptyValue(value) && !rule.required) {
  16439. return callback();
  16440. }
  16441. es_rule.required(rule, value, source, errors, options);
  16442. if (value !== undefined) {
  16443. es_rule.type(rule, value, source, errors, options);
  16444. }
  16445. }
  16446. callback(errors);
  16447. };
  16448. /* harmony default export */ var validator_boolean = (boolean_boolean);
  16449. ;// ./node_modules/@rc-component/async-validator/es/validator/date.js
  16450. var date = function date(rule, value, callback, source, options) {
  16451. // console.log('integer rule called %j', rule);
  16452. var errors = [];
  16453. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16454. // console.log('validate on %s value', value);
  16455. if (validate) {
  16456. if (isEmptyValue(value, 'date') && !rule.required) {
  16457. return callback();
  16458. }
  16459. es_rule.required(rule, value, source, errors, options);
  16460. if (!isEmptyValue(value, 'date')) {
  16461. var dateObject;
  16462. if (value instanceof Date) {
  16463. dateObject = value;
  16464. } else {
  16465. dateObject = new Date(value);
  16466. }
  16467. es_rule.type(rule, dateObject, source, errors, options);
  16468. if (dateObject) {
  16469. es_rule.range(rule, dateObject.getTime(), source, errors, options);
  16470. }
  16471. }
  16472. }
  16473. callback(errors);
  16474. };
  16475. /* harmony default export */ var validator_date = (date);
  16476. ;// ./node_modules/@rc-component/async-validator/es/validator/enum.js
  16477. var enum_ENUM = 'enum';
  16478. var enum_enumerable = function enumerable(rule, value, callback, source, options) {
  16479. var errors = [];
  16480. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16481. if (validate) {
  16482. if (isEmptyValue(value) && !rule.required) {
  16483. return callback();
  16484. }
  16485. es_rule.required(rule, value, source, errors, options);
  16486. if (value !== undefined) {
  16487. es_rule[enum_ENUM](rule, value, source, errors, options);
  16488. }
  16489. }
  16490. callback(errors);
  16491. };
  16492. /* harmony default export */ var validator_enum = (enum_enumerable);
  16493. ;// ./node_modules/@rc-component/async-validator/es/validator/float.js
  16494. var floatFn = function floatFn(rule, value, callback, source, options) {
  16495. var errors = [];
  16496. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16497. if (validate) {
  16498. if (isEmptyValue(value) && !rule.required) {
  16499. return callback();
  16500. }
  16501. es_rule.required(rule, value, source, errors, options);
  16502. if (value !== undefined) {
  16503. es_rule.type(rule, value, source, errors, options);
  16504. es_rule.range(rule, value, source, errors, options);
  16505. }
  16506. }
  16507. callback(errors);
  16508. };
  16509. /* harmony default export */ var validator_float = (floatFn);
  16510. ;// ./node_modules/@rc-component/async-validator/es/validator/integer.js
  16511. var integer = function integer(rule, value, callback, source, options) {
  16512. var errors = [];
  16513. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16514. if (validate) {
  16515. if (isEmptyValue(value) && !rule.required) {
  16516. return callback();
  16517. }
  16518. es_rule.required(rule, value, source, errors, options);
  16519. if (value !== undefined) {
  16520. es_rule.type(rule, value, source, errors, options);
  16521. es_rule.range(rule, value, source, errors, options);
  16522. }
  16523. }
  16524. callback(errors);
  16525. };
  16526. /* harmony default export */ var validator_integer = (integer);
  16527. ;// ./node_modules/@rc-component/async-validator/es/validator/method.js
  16528. var method = function method(rule, value, callback, source, options) {
  16529. var errors = [];
  16530. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16531. if (validate) {
  16532. if (isEmptyValue(value) && !rule.required) {
  16533. return callback();
  16534. }
  16535. es_rule.required(rule, value, source, errors, options);
  16536. if (value !== undefined) {
  16537. es_rule.type(rule, value, source, errors, options);
  16538. }
  16539. }
  16540. callback(errors);
  16541. };
  16542. /* harmony default export */ var validator_method = (method);
  16543. ;// ./node_modules/@rc-component/async-validator/es/validator/number.js
  16544. var number = function number(rule, value, callback, source, options) {
  16545. var errors = [];
  16546. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16547. if (validate) {
  16548. if (value === '') {
  16549. // eslint-disable-next-line no-param-reassign
  16550. value = undefined;
  16551. }
  16552. if (isEmptyValue(value) && !rule.required) {
  16553. return callback();
  16554. }
  16555. es_rule.required(rule, value, source, errors, options);
  16556. if (value !== undefined) {
  16557. es_rule.type(rule, value, source, errors, options);
  16558. es_rule.range(rule, value, source, errors, options);
  16559. }
  16560. }
  16561. callback(errors);
  16562. };
  16563. /* harmony default export */ var validator_number = (number);
  16564. ;// ./node_modules/@rc-component/async-validator/es/validator/object.js
  16565. var object = function object(rule, value, callback, source, options) {
  16566. var errors = [];
  16567. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16568. if (validate) {
  16569. if (isEmptyValue(value) && !rule.required) {
  16570. return callback();
  16571. }
  16572. es_rule.required(rule, value, source, errors, options);
  16573. if (value !== undefined) {
  16574. es_rule.type(rule, value, source, errors, options);
  16575. }
  16576. }
  16577. callback(errors);
  16578. };
  16579. /* harmony default export */ var validator_object = (object);
  16580. ;// ./node_modules/@rc-component/async-validator/es/validator/pattern.js
  16581. var pattern_pattern = function pattern(rule, value, callback, source, options) {
  16582. var errors = [];
  16583. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16584. if (validate) {
  16585. if (isEmptyValue(value, 'string') && !rule.required) {
  16586. return callback();
  16587. }
  16588. es_rule.required(rule, value, source, errors, options);
  16589. if (!isEmptyValue(value, 'string')) {
  16590. es_rule.pattern(rule, value, source, errors, options);
  16591. }
  16592. }
  16593. callback(errors);
  16594. };
  16595. /* harmony default export */ var validator_pattern = (pattern_pattern);
  16596. ;// ./node_modules/@rc-component/async-validator/es/validator/regexp.js
  16597. var regexp = function regexp(rule, value, callback, source, options) {
  16598. var errors = [];
  16599. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16600. if (validate) {
  16601. if (isEmptyValue(value) && !rule.required) {
  16602. return callback();
  16603. }
  16604. es_rule.required(rule, value, source, errors, options);
  16605. if (!isEmptyValue(value)) {
  16606. es_rule.type(rule, value, source, errors, options);
  16607. }
  16608. }
  16609. callback(errors);
  16610. };
  16611. /* harmony default export */ var validator_regexp = (regexp);
  16612. ;// ./node_modules/@rc-component/async-validator/es/validator/required.js
  16613. var required_required = function required(rule, value, callback, source, options) {
  16614. var errors = [];
  16615. var type = Array.isArray(value) ? 'array' : (0,esm_typeof["default"])(value);
  16616. es_rule.required(rule, value, source, errors, options, type);
  16617. callback(errors);
  16618. };
  16619. /* harmony default export */ var validator_required = (required_required);
  16620. ;// ./node_modules/@rc-component/async-validator/es/validator/string.js
  16621. var string = function string(rule, value, callback, source, options) {
  16622. var errors = [];
  16623. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16624. if (validate) {
  16625. if (isEmptyValue(value, 'string') && !rule.required) {
  16626. return callback();
  16627. }
  16628. es_rule.required(rule, value, source, errors, options, 'string');
  16629. if (!isEmptyValue(value, 'string')) {
  16630. es_rule.type(rule, value, source, errors, options);
  16631. es_rule.range(rule, value, source, errors, options);
  16632. es_rule.pattern(rule, value, source, errors, options);
  16633. if (rule.whitespace === true) {
  16634. es_rule.whitespace(rule, value, source, errors, options);
  16635. }
  16636. }
  16637. }
  16638. callback(errors);
  16639. };
  16640. /* harmony default export */ var validator_string = (string);
  16641. ;// ./node_modules/@rc-component/async-validator/es/validator/type.js
  16642. var type_type = function type(rule, value, callback, source, options) {
  16643. var ruleType = rule.type;
  16644. var errors = [];
  16645. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16646. if (validate) {
  16647. if (isEmptyValue(value, ruleType) && !rule.required) {
  16648. return callback();
  16649. }
  16650. es_rule.required(rule, value, source, errors, options, ruleType);
  16651. if (!isEmptyValue(value, ruleType)) {
  16652. es_rule.type(rule, value, source, errors, options);
  16653. }
  16654. }
  16655. callback(errors);
  16656. };
  16657. /* harmony default export */ var validator_type = (type_type);
  16658. ;// ./node_modules/@rc-component/async-validator/es/validator/index.js
  16659. /* harmony default export */ var es_validator = ({
  16660. string: validator_string,
  16661. method: validator_method,
  16662. number: validator_number,
  16663. boolean: validator_boolean,
  16664. regexp: validator_regexp,
  16665. integer: validator_integer,
  16666. float: validator_float,
  16667. array: validator_array,
  16668. object: validator_object,
  16669. enum: validator_enum,
  16670. pattern: validator_pattern,
  16671. date: validator_date,
  16672. url: validator_type,
  16673. hex: validator_type,
  16674. email: validator_type,
  16675. required: validator_required,
  16676. any: validator_any
  16677. });
  16678. ;// ./node_modules/@rc-component/async-validator/es/interface.js
  16679. ;// ./node_modules/@rc-component/async-validator/es/index.js
  16680. /**
  16681. * Encapsulates a validation schema.
  16682. *
  16683. * @param descriptor An object declaring validation rules
  16684. * for this schema.
  16685. */
  16686. var Schema = /*#__PURE__*/function () {
  16687. function Schema(descriptor) {
  16688. (0,classCallCheck["default"])(this, Schema);
  16689. // ======================== Instance ========================
  16690. (0,defineProperty["default"])(this, "rules", null);
  16691. (0,defineProperty["default"])(this, "_messages", messages_messages);
  16692. this.define(descriptor);
  16693. }
  16694. (0,createClass["default"])(Schema, [{
  16695. key: "define",
  16696. value: function define(rules) {
  16697. var _this = this;
  16698. if (!rules) {
  16699. throw new Error('Cannot configure a schema with no rules');
  16700. }
  16701. if ((0,esm_typeof["default"])(rules) !== 'object' || Array.isArray(rules)) {
  16702. throw new Error('Rules must be an object');
  16703. }
  16704. this.rules = {};
  16705. Object.keys(rules).forEach(function (name) {
  16706. var item = rules[name];
  16707. _this.rules[name] = Array.isArray(item) ? item : [item];
  16708. });
  16709. }
  16710. }, {
  16711. key: "messages",
  16712. value: function messages(_messages) {
  16713. if (_messages) {
  16714. this._messages = deepMerge(newMessages(), _messages);
  16715. }
  16716. return this._messages;
  16717. }
  16718. }, {
  16719. key: "validate",
  16720. value: function validate(source_) {
  16721. var _this2 = this;
  16722. var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16723. var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
  16724. var source = source_;
  16725. var options = o;
  16726. var callback = oc;
  16727. if (typeof options === 'function') {
  16728. callback = options;
  16729. options = {};
  16730. }
  16731. if (!this.rules || Object.keys(this.rules).length === 0) {
  16732. if (callback) {
  16733. callback(null, source);
  16734. }
  16735. return Promise.resolve(source);
  16736. }
  16737. function complete(results) {
  16738. var errors = [];
  16739. var fields = {};
  16740. function add(e) {
  16741. if (Array.isArray(e)) {
  16742. var _errors;
  16743. errors = (_errors = errors).concat.apply(_errors, (0,toConsumableArray["default"])(e));
  16744. } else {
  16745. errors.push(e);
  16746. }
  16747. }
  16748. for (var i = 0; i < results.length; i++) {
  16749. add(results[i]);
  16750. }
  16751. if (!errors.length) {
  16752. callback(null, source);
  16753. } else {
  16754. fields = convertFieldsError(errors);
  16755. callback(errors, fields);
  16756. }
  16757. }
  16758. if (options.messages) {
  16759. var messages = this.messages();
  16760. if (messages === messages_messages) {
  16761. messages = newMessages();
  16762. }
  16763. deepMerge(messages, options.messages);
  16764. options.messages = messages;
  16765. } else {
  16766. options.messages = this.messages();
  16767. }
  16768. var series = {};
  16769. var keys = options.keys || Object.keys(this.rules);
  16770. keys.forEach(function (z) {
  16771. var arr = _this2.rules[z];
  16772. var value = source[z];
  16773. arr.forEach(function (r) {
  16774. var rule = r;
  16775. if (typeof rule.transform === 'function') {
  16776. if (source === source_) {
  16777. source = (0,objectSpread2["default"])({}, source);
  16778. }
  16779. value = source[z] = rule.transform(value);
  16780. if (value !== undefined && value !== null) {
  16781. rule.type = rule.type || (Array.isArray(value) ? 'array' : (0,esm_typeof["default"])(value));
  16782. }
  16783. }
  16784. if (typeof rule === 'function') {
  16785. rule = {
  16786. validator: rule
  16787. };
  16788. } else {
  16789. rule = (0,objectSpread2["default"])({}, rule);
  16790. }
  16791. // Fill validator. Skip if nothing need to validate
  16792. rule.validator = _this2.getValidationMethod(rule);
  16793. if (!rule.validator) {
  16794. return;
  16795. }
  16796. rule.field = z;
  16797. rule.fullField = rule.fullField || z;
  16798. rule.type = _this2.getType(rule);
  16799. series[z] = series[z] || [];
  16800. series[z].push({
  16801. rule: rule,
  16802. value: value,
  16803. source: source,
  16804. field: z
  16805. });
  16806. });
  16807. });
  16808. var errorFields = {};
  16809. return asyncMap(series, options, function (data, doIt) {
  16810. var rule = data.rule;
  16811. var deep = (rule.type === 'object' || rule.type === 'array') && ((0,esm_typeof["default"])(rule.fields) === 'object' || (0,esm_typeof["default"])(rule.defaultField) === 'object');
  16812. deep = deep && (rule.required || !rule.required && data.value);
  16813. rule.field = data.field;
  16814. function addFullField(key, schema) {
  16815. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, schema), {}, {
  16816. fullField: "".concat(rule.fullField, ".").concat(key),
  16817. fullFields: rule.fullFields ? [].concat((0,toConsumableArray["default"])(rule.fullFields), [key]) : [key]
  16818. });
  16819. }
  16820. function cb() {
  16821. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16822. var errorList = Array.isArray(e) ? e : [e];
  16823. if (!options.suppressWarning && errorList.length) {
  16824. Schema.warning('async-validator:', errorList);
  16825. }
  16826. if (errorList.length && rule.message !== undefined) {
  16827. errorList = [].concat(rule.message);
  16828. }
  16829. // Fill error info
  16830. var filledErrors = errorList.map(complementError(rule, source));
  16831. if (options.first && filledErrors.length) {
  16832. errorFields[rule.field] = 1;
  16833. return doIt(filledErrors);
  16834. }
  16835. if (!deep) {
  16836. doIt(filledErrors);
  16837. } else {
  16838. // if rule is required but the target object
  16839. // does not exist fail at the rule level and don't
  16840. // go deeper
  16841. if (rule.required && !data.value) {
  16842. if (rule.message !== undefined) {
  16843. filledErrors = [].concat(rule.message).map(complementError(rule, source));
  16844. } else if (options.error) {
  16845. filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
  16846. }
  16847. return doIt(filledErrors);
  16848. }
  16849. var fieldsSchema = {};
  16850. if (rule.defaultField) {
  16851. Object.keys(data.value).map(function (key) {
  16852. fieldsSchema[key] = rule.defaultField;
  16853. });
  16854. }
  16855. fieldsSchema = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, fieldsSchema), data.rule.fields);
  16856. var paredFieldsSchema = {};
  16857. Object.keys(fieldsSchema).forEach(function (field) {
  16858. var fieldSchema = fieldsSchema[field];
  16859. var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];
  16860. paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));
  16861. });
  16862. var schema = new Schema(paredFieldsSchema);
  16863. schema.messages(options.messages);
  16864. if (data.rule.options) {
  16865. data.rule.options.messages = options.messages;
  16866. data.rule.options.error = options.error;
  16867. }
  16868. schema.validate(data.value, data.rule.options || options, function (errs) {
  16869. var finalErrors = [];
  16870. if (filledErrors && filledErrors.length) {
  16871. finalErrors.push.apply(finalErrors, (0,toConsumableArray["default"])(filledErrors));
  16872. }
  16873. if (errs && errs.length) {
  16874. finalErrors.push.apply(finalErrors, (0,toConsumableArray["default"])(errs));
  16875. }
  16876. doIt(finalErrors.length ? finalErrors : null);
  16877. });
  16878. }
  16879. }
  16880. var res;
  16881. if (rule.asyncValidator) {
  16882. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  16883. } else if (rule.validator) {
  16884. try {
  16885. res = rule.validator(rule, data.value, cb, data.source, options);
  16886. } catch (error) {
  16887. var _console$error, _console;
  16888. (_console$error = (_console = console).error) === null || _console$error === void 0 || _console$error.call(_console, error);
  16889. // rethrow to report error
  16890. if (!options.suppressValidatorError) {
  16891. setTimeout(function () {
  16892. throw error;
  16893. }, 0);
  16894. }
  16895. cb(error.message);
  16896. }
  16897. if (res === true) {
  16898. cb();
  16899. } else if (res === false) {
  16900. cb(typeof rule.message === 'function' ? rule.message(rule.fullField || rule.field) : rule.message || "".concat(rule.fullField || rule.field, " fails"));
  16901. } else if (res instanceof Array) {
  16902. cb(res);
  16903. } else if (res instanceof Error) {
  16904. cb(res.message);
  16905. }
  16906. }
  16907. if (res && res.then) {
  16908. res.then(function () {
  16909. return cb();
  16910. }, function (e) {
  16911. return cb(e);
  16912. });
  16913. }
  16914. }, function (results) {
  16915. complete(results);
  16916. }, source);
  16917. }
  16918. }, {
  16919. key: "getType",
  16920. value: function getType(rule) {
  16921. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  16922. rule.type = 'pattern';
  16923. }
  16924. if (typeof rule.validator !== 'function' && rule.type && !es_validator.hasOwnProperty(rule.type)) {
  16925. throw new Error(format('Unknown rule type %s', rule.type));
  16926. }
  16927. return rule.type || 'string';
  16928. }
  16929. }, {
  16930. key: "getValidationMethod",
  16931. value: function getValidationMethod(rule) {
  16932. if (typeof rule.validator === 'function') {
  16933. return rule.validator;
  16934. }
  16935. var keys = Object.keys(rule);
  16936. var messageIndex = keys.indexOf('message');
  16937. if (messageIndex !== -1) {
  16938. keys.splice(messageIndex, 1);
  16939. }
  16940. if (keys.length === 1 && keys[0] === 'required') {
  16941. return es_validator.required;
  16942. }
  16943. return es_validator[this.getType(rule)] || undefined;
  16944. }
  16945. }]);
  16946. return Schema;
  16947. }();
  16948. // ========================= Static =========================
  16949. (0,defineProperty["default"])(Schema, "register", function register(type, validator) {
  16950. if (typeof validator !== 'function') {
  16951. throw new Error('Cannot register a validator by type, validator is not a function');
  16952. }
  16953. es_validator[type] = validator;
  16954. });
  16955. (0,defineProperty["default"])(Schema, "warning", util_warning);
  16956. (0,defineProperty["default"])(Schema, "messages", messages_messages);
  16957. (0,defineProperty["default"])(Schema, "validators", es_validator);
  16958. /* harmony default export */ var async_validator_es = (Schema);
  16959. ;// ./node_modules/rc-field-form/es/utils/messages.js
  16960. var typeTemplate = "'${name}' is not a valid ${type}";
  16961. var defaultValidateMessages = {
  16962. default: "Validation error on field '${name}'",
  16963. required: "'${name}' is required",
  16964. enum: "'${name}' must be one of [${enum}]",
  16965. whitespace: "'${name}' cannot be empty",
  16966. date: {
  16967. format: "'${name}' is invalid for format date",
  16968. parse: "'${name}' could not be parsed as date",
  16969. invalid: "'${name}' is invalid date"
  16970. },
  16971. types: {
  16972. string: typeTemplate,
  16973. method: typeTemplate,
  16974. array: typeTemplate,
  16975. object: typeTemplate,
  16976. number: typeTemplate,
  16977. date: typeTemplate,
  16978. boolean: typeTemplate,
  16979. integer: typeTemplate,
  16980. float: typeTemplate,
  16981. regexp: typeTemplate,
  16982. email: typeTemplate,
  16983. url: typeTemplate,
  16984. hex: typeTemplate
  16985. },
  16986. string: {
  16987. len: "'${name}' must be exactly ${len} characters",
  16988. min: "'${name}' must be at least ${min} characters",
  16989. max: "'${name}' cannot be longer than ${max} characters",
  16990. range: "'${name}' must be between ${min} and ${max} characters"
  16991. },
  16992. number: {
  16993. len: "'${name}' must equal ${len}",
  16994. min: "'${name}' cannot be less than ${min}",
  16995. max: "'${name}' cannot be greater than ${max}",
  16996. range: "'${name}' must be between ${min} and ${max}"
  16997. },
  16998. array: {
  16999. len: "'${name}' must be exactly ${len} in length",
  17000. min: "'${name}' cannot be less than ${min} in length",
  17001. max: "'${name}' cannot be greater than ${max} in length",
  17002. range: "'${name}' must be between ${min} and ${max} in length"
  17003. },
  17004. pattern: {
  17005. mismatch: "'${name}' does not match pattern ${pattern}"
  17006. }
  17007. };
  17008. ;// ./node_modules/rc-field-form/es/utils/validateUtil.js
  17009. // Remove incorrect original ts define
  17010. var AsyncValidator = async_validator_es;
  17011. /**
  17012. * Replace with template.
  17013. * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo
  17014. */
  17015. function replaceMessage(template, kv) {
  17016. return template.replace(/\\?\$\{\w+\}/g, function (str) {
  17017. if (str.startsWith('\\')) {
  17018. return str.slice(1);
  17019. }
  17020. var key = str.slice(2, -1);
  17021. return kv[key];
  17022. });
  17023. }
  17024. var CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';
  17025. function validateRule(_x, _x2, _x3, _x4, _x5) {
  17026. return _validateRule.apply(this, arguments);
  17027. }
  17028. /**
  17029. * We use `async-validator` to validate the value.
  17030. * But only check one value in a time to avoid namePath validate issue.
  17031. */
  17032. function _validateRule() {
  17033. _validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
  17034. var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;
  17035. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  17036. while (1) switch (_context2.prev = _context2.next) {
  17037. case 0:
  17038. cloneRule = (0,objectSpread2["default"])({}, rule); // Bug of `async-validator`
  17039. // https://github.com/react-component/field-form/issues/316
  17040. // https://github.com/react-component/field-form/issues/313
  17041. delete cloneRule.ruleIndex;
  17042. // https://github.com/ant-design/ant-design/issues/40497#issuecomment-1422282378
  17043. AsyncValidator.warning = function () {
  17044. return void 0;
  17045. };
  17046. if (cloneRule.validator) {
  17047. originValidator = cloneRule.validator;
  17048. cloneRule.validator = function () {
  17049. try {
  17050. return originValidator.apply(void 0, arguments);
  17051. } catch (error) {
  17052. console.error(error);
  17053. return Promise.reject(CODE_LOGIC_ERROR);
  17054. }
  17055. };
  17056. }
  17057. // We should special handle array validate
  17058. subRuleField = null;
  17059. if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {
  17060. subRuleField = cloneRule.defaultField;
  17061. delete cloneRule.defaultField;
  17062. }
  17063. validator = new AsyncValidator((0,defineProperty["default"])({}, name, [cloneRule]));
  17064. messages = (0,set.merge)(defaultValidateMessages, options.validateMessages);
  17065. validator.messages(messages);
  17066. result = [];
  17067. _context2.prev = 10;
  17068. _context2.next = 13;
  17069. return Promise.resolve(validator.validate((0,defineProperty["default"])({}, name, value), (0,objectSpread2["default"])({}, options)));
  17070. case 13:
  17071. _context2.next = 18;
  17072. break;
  17073. case 15:
  17074. _context2.prev = 15;
  17075. _context2.t0 = _context2["catch"](10);
  17076. if (_context2.t0.errors) {
  17077. result = _context2.t0.errors.map(function (_ref4, index) {
  17078. var message = _ref4.message;
  17079. var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;
  17080. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedMessage) ?
  17081. /*#__PURE__*/
  17082. // Wrap ReactNode with `key`
  17083. external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(mergedMessage, {
  17084. key: "error_".concat(index)
  17085. }) : mergedMessage;
  17086. });
  17087. }
  17088. case 18:
  17089. if (!(!result.length && subRuleField)) {
  17090. _context2.next = 23;
  17091. break;
  17092. }
  17093. _context2.next = 21;
  17094. return Promise.all(value.map(function (subValue, i) {
  17095. return validateRule("".concat(name, ".").concat(i), subValue, subRuleField, options, messageVariables);
  17096. }));
  17097. case 21:
  17098. subResults = _context2.sent;
  17099. return _context2.abrupt("return", subResults.reduce(function (prev, errors) {
  17100. return [].concat((0,toConsumableArray["default"])(prev), (0,toConsumableArray["default"])(errors));
  17101. }, []));
  17102. case 23:
  17103. // Replace message with variables
  17104. kv = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rule), {}, {
  17105. name: name,
  17106. enum: (rule.enum || []).join(', ')
  17107. }, messageVariables);
  17108. fillVariableResult = result.map(function (error) {
  17109. if (typeof error === 'string') {
  17110. return replaceMessage(error, kv);
  17111. }
  17112. return error;
  17113. });
  17114. return _context2.abrupt("return", fillVariableResult);
  17115. case 26:
  17116. case "end":
  17117. return _context2.stop();
  17118. }
  17119. }, _callee2, null, [[10, 15]]);
  17120. }));
  17121. return _validateRule.apply(this, arguments);
  17122. }
  17123. function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {
  17124. var name = namePath.join('.');
  17125. // Fill rule with context
  17126. var filledRules = rules.map(function (currentRule, ruleIndex) {
  17127. var originValidatorFunc = currentRule.validator;
  17128. var cloneRule = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, currentRule), {}, {
  17129. ruleIndex: ruleIndex
  17130. });
  17131. // Replace validator if needed
  17132. if (originValidatorFunc) {
  17133. cloneRule.validator = function (rule, val, callback) {
  17134. var hasPromise = false;
  17135. // Wrap callback only accept when promise not provided
  17136. var wrappedCallback = function wrappedCallback() {
  17137. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  17138. args[_key] = arguments[_key];
  17139. }
  17140. // Wait a tick to make sure return type is a promise
  17141. Promise.resolve().then(function () {
  17142. (0,warning["default"])(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');
  17143. if (!hasPromise) {
  17144. callback.apply(void 0, args);
  17145. }
  17146. });
  17147. };
  17148. // Get promise
  17149. var promise = originValidatorFunc(rule, val, wrappedCallback);
  17150. hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';
  17151. /**
  17152. * 1. Use promise as the first priority.
  17153. * 2. If promise not exist, use callback with warning instead
  17154. */
  17155. (0,warning["default"])(hasPromise, '`callback` is deprecated. Please return a promise instead.');
  17156. if (hasPromise) {
  17157. promise.then(function () {
  17158. callback();
  17159. }).catch(function (err) {
  17160. callback(err || ' ');
  17161. });
  17162. }
  17163. };
  17164. }
  17165. return cloneRule;
  17166. }).sort(function (_ref, _ref2) {
  17167. var w1 = _ref.warningOnly,
  17168. i1 = _ref.ruleIndex;
  17169. var w2 = _ref2.warningOnly,
  17170. i2 = _ref2.ruleIndex;
  17171. if (!!w1 === !!w2) {
  17172. // Let keep origin order
  17173. return i1 - i2;
  17174. }
  17175. if (w1) {
  17176. return 1;
  17177. }
  17178. return -1;
  17179. });
  17180. // Do validate rules
  17181. var summaryPromise;
  17182. if (validateFirst === true) {
  17183. // >>>>> Validate by serialization
  17184. summaryPromise = new Promise( /*#__PURE__*/function () {
  17185. var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
  17186. var i, rule, errors;
  17187. return _regeneratorRuntime().wrap(function _callee$(_context) {
  17188. while (1) switch (_context.prev = _context.next) {
  17189. case 0:
  17190. i = 0;
  17191. case 1:
  17192. if (!(i < filledRules.length)) {
  17193. _context.next = 12;
  17194. break;
  17195. }
  17196. rule = filledRules[i];
  17197. _context.next = 5;
  17198. return validateRule(name, value, rule, options, messageVariables);
  17199. case 5:
  17200. errors = _context.sent;
  17201. if (!errors.length) {
  17202. _context.next = 9;
  17203. break;
  17204. }
  17205. reject([{
  17206. errors: errors,
  17207. rule: rule
  17208. }]);
  17209. return _context.abrupt("return");
  17210. case 9:
  17211. i += 1;
  17212. _context.next = 1;
  17213. break;
  17214. case 12:
  17215. /* eslint-enable */
  17216. resolve([]);
  17217. case 13:
  17218. case "end":
  17219. return _context.stop();
  17220. }
  17221. }, _callee);
  17222. }));
  17223. return function (_x6, _x7) {
  17224. return _ref3.apply(this, arguments);
  17225. };
  17226. }());
  17227. } else {
  17228. // >>>>> Validate by parallel
  17229. var rulePromises = filledRules.map(function (rule) {
  17230. return validateRule(name, value, rule, options, messageVariables).then(function (errors) {
  17231. return {
  17232. errors: errors,
  17233. rule: rule
  17234. };
  17235. });
  17236. });
  17237. summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {
  17238. // Always change to rejection for Field to catch
  17239. return Promise.reject(errors);
  17240. });
  17241. }
  17242. // Internal catch error to avoid console error log.
  17243. summaryPromise.catch(function (e) {
  17244. return e;
  17245. });
  17246. return summaryPromise;
  17247. }
  17248. function finishOnAllFailed(_x8) {
  17249. return _finishOnAllFailed.apply(this, arguments);
  17250. }
  17251. function _finishOnAllFailed() {
  17252. _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rulePromises) {
  17253. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  17254. while (1) switch (_context3.prev = _context3.next) {
  17255. case 0:
  17256. return _context3.abrupt("return", Promise.all(rulePromises).then(function (errorsList) {
  17257. var _ref5;
  17258. var errors = (_ref5 = []).concat.apply(_ref5, (0,toConsumableArray["default"])(errorsList));
  17259. return errors;
  17260. }));
  17261. case 1:
  17262. case "end":
  17263. return _context3.stop();
  17264. }
  17265. }, _callee3);
  17266. }));
  17267. return _finishOnAllFailed.apply(this, arguments);
  17268. }
  17269. function finishOnFirstFailed(_x9) {
  17270. return _finishOnFirstFailed.apply(this, arguments);
  17271. }
  17272. function _finishOnFirstFailed() {
  17273. _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rulePromises) {
  17274. var count;
  17275. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  17276. while (1) switch (_context4.prev = _context4.next) {
  17277. case 0:
  17278. count = 0;
  17279. return _context4.abrupt("return", new Promise(function (resolve) {
  17280. rulePromises.forEach(function (promise) {
  17281. promise.then(function (ruleError) {
  17282. if (ruleError.errors.length) {
  17283. resolve([ruleError]);
  17284. }
  17285. count += 1;
  17286. if (count === rulePromises.length) {
  17287. resolve([]);
  17288. }
  17289. });
  17290. });
  17291. }));
  17292. case 2:
  17293. case "end":
  17294. return _context4.stop();
  17295. }
  17296. }, _callee4);
  17297. }));
  17298. return _finishOnFirstFailed.apply(this, arguments);
  17299. }
  17300. // EXTERNAL MODULE: ./node_modules/rc-util/es/utils/get.js
  17301. var get = __webpack_require__("./node_modules/rc-util/es/utils/get.js");
  17302. ;// ./node_modules/rc-field-form/es/utils/valueUtil.js
  17303. /**
  17304. * Convert name to internal supported format.
  17305. * This function should keep since we still thinking if need support like `a.b.c` format.
  17306. * 'a' => ['a']
  17307. * 123 => [123]
  17308. * ['a', 123] => ['a', 123]
  17309. */
  17310. function getNamePath(path) {
  17311. return typeUtil_toArray(path);
  17312. }
  17313. function cloneByNamePathList(store, namePathList) {
  17314. var newStore = {};
  17315. namePathList.forEach(function (namePath) {
  17316. var value = (0,get["default"])(store, namePath);
  17317. newStore = (0,set["default"])(newStore, namePath, value);
  17318. });
  17319. return newStore;
  17320. }
  17321. /**
  17322. * Check if `namePathList` includes `namePath`.
  17323. * @param namePathList A list of `InternalNamePath[]`
  17324. * @param namePath Compare `InternalNamePath`
  17325. * @param partialMatch True will make `[a, b]` match `[a, b, c]`
  17326. */
  17327. function containsNamePath(namePathList, namePath) {
  17328. var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  17329. return namePathList && namePathList.some(function (path) {
  17330. return matchNamePath(namePath, path, partialMatch);
  17331. });
  17332. }
  17333. /**
  17334. * Check if `namePath` is super set or equal of `subNamePath`.
  17335. * @param namePath A list of `InternalNamePath[]`
  17336. * @param subNamePath Compare `InternalNamePath`
  17337. * @param partialMatch True will make `[a, b]` match `[a, b, c]`
  17338. */
  17339. function matchNamePath(namePath, subNamePath) {
  17340. var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  17341. if (!namePath || !subNamePath) {
  17342. return false;
  17343. }
  17344. if (!partialMatch && namePath.length !== subNamePath.length) {
  17345. return false;
  17346. }
  17347. return subNamePath.every(function (nameUnit, i) {
  17348. return namePath[i] === nameUnit;
  17349. });
  17350. }
  17351. // Like `shallowEqual`, but we not check the data which may cause re-render
  17352. function isSimilar(source, target) {
  17353. if (source === target) {
  17354. return true;
  17355. }
  17356. if (!source && target || source && !target) {
  17357. return false;
  17358. }
  17359. if (!source || !target || (0,esm_typeof["default"])(source) !== 'object' || (0,esm_typeof["default"])(target) !== 'object') {
  17360. return false;
  17361. }
  17362. var sourceKeys = Object.keys(source);
  17363. var targetKeys = Object.keys(target);
  17364. var keys = new Set([].concat(sourceKeys, targetKeys));
  17365. return (0,toConsumableArray["default"])(keys).every(function (key) {
  17366. var sourceValue = source[key];
  17367. var targetValue = target[key];
  17368. if (typeof sourceValue === 'function' && typeof targetValue === 'function') {
  17369. return true;
  17370. }
  17371. return sourceValue === targetValue;
  17372. });
  17373. }
  17374. function defaultGetValueFromEvent(valuePropName) {
  17375. var event = arguments.length <= 1 ? undefined : arguments[1];
  17376. if (event && event.target && (0,esm_typeof["default"])(event.target) === 'object' && valuePropName in event.target) {
  17377. return event.target[valuePropName];
  17378. }
  17379. return event;
  17380. }
  17381. /**
  17382. * Moves an array item from one position in an array to another.
  17383. *
  17384. * Note: This is a pure function so a new array will be returned, instead
  17385. * of altering the array argument.
  17386. *
  17387. * @param array Array in which to move an item. (required)
  17388. * @param moveIndex The index of the item to move. (required)
  17389. * @param toIndex The index to move item at moveIndex to. (required)
  17390. */
  17391. function valueUtil_move(array, moveIndex, toIndex) {
  17392. var length = array.length;
  17393. if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {
  17394. return array;
  17395. }
  17396. var item = array[moveIndex];
  17397. var diff = moveIndex - toIndex;
  17398. if (diff > 0) {
  17399. // move left
  17400. return [].concat((0,toConsumableArray["default"])(array.slice(0, toIndex)), [item], (0,toConsumableArray["default"])(array.slice(toIndex, moveIndex)), (0,toConsumableArray["default"])(array.slice(moveIndex + 1, length)));
  17401. }
  17402. if (diff < 0) {
  17403. // move right
  17404. return [].concat((0,toConsumableArray["default"])(array.slice(0, moveIndex)), (0,toConsumableArray["default"])(array.slice(moveIndex + 1, toIndex + 1)), [item], (0,toConsumableArray["default"])(array.slice(toIndex + 1, length)));
  17405. }
  17406. return array;
  17407. }
  17408. ;// ./node_modules/rc-field-form/es/Field.js
  17409. var Field_excluded = ["name"];
  17410. var EMPTY_ERRORS = [];
  17411. function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {
  17412. if (typeof shouldUpdate === 'function') {
  17413. return shouldUpdate(prev, next, 'source' in info ? {
  17414. source: info.source
  17415. } : {});
  17416. }
  17417. return prevValue !== nextValue;
  17418. }
  17419. // eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
  17420. // We use Class instead of Hooks here since it will cost much code by using Hooks.
  17421. var Field = /*#__PURE__*/function (_React$Component) {
  17422. (0,inherits["default"])(Field, _React$Component);
  17423. var _super = (0,createSuper["default"])(Field);
  17424. // ============================== Subscriptions ==============================
  17425. function Field(props) {
  17426. var _this;
  17427. (0,classCallCheck["default"])(this, Field);
  17428. _this = _super.call(this, props);
  17429. // Register on init
  17430. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
  17431. resetCount: 0
  17432. });
  17433. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "cancelRegisterFunc", null);
  17434. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "mounted", false);
  17435. /**
  17436. * Follow state should not management in State since it will async update by React.
  17437. * This makes first render of form can not get correct state value.
  17438. */
  17439. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "touched", false);
  17440. /**
  17441. * Mark when touched & validated. Currently only used for `dependencies`.
  17442. * Note that we do not think field with `initialValue` is dirty
  17443. * but this will be by `isFieldDirty` func.
  17444. */
  17445. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "dirty", false);
  17446. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "validatePromise", void 0);
  17447. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "prevValidating", void 0);
  17448. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "errors", EMPTY_ERRORS);
  17449. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "warnings", EMPTY_ERRORS);
  17450. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "cancelRegister", function () {
  17451. var _this$props = _this.props,
  17452. preserve = _this$props.preserve,
  17453. isListField = _this$props.isListField,
  17454. name = _this$props.name;
  17455. if (_this.cancelRegisterFunc) {
  17456. _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));
  17457. }
  17458. _this.cancelRegisterFunc = null;
  17459. });
  17460. // ================================== Utils ==================================
  17461. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getNamePath", function () {
  17462. var _this$props2 = _this.props,
  17463. name = _this$props2.name,
  17464. fieldContext = _this$props2.fieldContext;
  17465. var _fieldContext$prefixN = fieldContext.prefixName,
  17466. prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;
  17467. return name !== undefined ? [].concat((0,toConsumableArray["default"])(prefixName), (0,toConsumableArray["default"])(name)) : [];
  17468. });
  17469. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getRules", function () {
  17470. var _this$props3 = _this.props,
  17471. _this$props3$rules = _this$props3.rules,
  17472. rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,
  17473. fieldContext = _this$props3.fieldContext;
  17474. return rules.map(function (rule) {
  17475. if (typeof rule === 'function') {
  17476. return rule(fieldContext);
  17477. }
  17478. return rule;
  17479. });
  17480. });
  17481. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "refresh", function () {
  17482. if (!_this.mounted) return;
  17483. /**
  17484. * Clean up current node.
  17485. */
  17486. _this.setState(function (_ref) {
  17487. var resetCount = _ref.resetCount;
  17488. return {
  17489. resetCount: resetCount + 1
  17490. };
  17491. });
  17492. });
  17493. // Event should only trigger when meta changed
  17494. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "metaCache", null);
  17495. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "triggerMetaEvent", function (destroy) {
  17496. var onMetaChange = _this.props.onMetaChange;
  17497. if (onMetaChange) {
  17498. var _meta = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.getMeta()), {}, {
  17499. destroy: destroy
  17500. });
  17501. if (!(0,isEqual["default"])(_this.metaCache, _meta)) {
  17502. onMetaChange(_meta);
  17503. }
  17504. _this.metaCache = _meta;
  17505. } else {
  17506. _this.metaCache = null;
  17507. }
  17508. });
  17509. // ========================= Field Entity Interfaces =========================
  17510. // Trigger by store update. Check if need update the component
  17511. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onStoreChange", function (prevStore, namePathList, info) {
  17512. var _this$props4 = _this.props,
  17513. shouldUpdate = _this$props4.shouldUpdate,
  17514. _this$props4$dependen = _this$props4.dependencies,
  17515. dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,
  17516. onReset = _this$props4.onReset;
  17517. var store = info.store;
  17518. var namePath = _this.getNamePath();
  17519. var prevValue = _this.getValue(prevStore);
  17520. var curValue = _this.getValue(store);
  17521. var namePathMatch = namePathList && containsNamePath(namePathList, namePath);
  17522. // `setFieldsValue` is a quick access to update related status
  17523. if (info.type === 'valueUpdate' && info.source === 'external' && !(0,isEqual["default"])(prevValue, curValue)) {
  17524. _this.touched = true;
  17525. _this.dirty = true;
  17526. _this.validatePromise = null;
  17527. _this.errors = EMPTY_ERRORS;
  17528. _this.warnings = EMPTY_ERRORS;
  17529. _this.triggerMetaEvent();
  17530. }
  17531. switch (info.type) {
  17532. case 'reset':
  17533. if (!namePathList || namePathMatch) {
  17534. // Clean up state
  17535. _this.touched = false;
  17536. _this.dirty = false;
  17537. _this.validatePromise = undefined;
  17538. _this.errors = EMPTY_ERRORS;
  17539. _this.warnings = EMPTY_ERRORS;
  17540. _this.triggerMetaEvent();
  17541. onReset === null || onReset === void 0 || onReset();
  17542. _this.refresh();
  17543. return;
  17544. }
  17545. break;
  17546. /**
  17547. * In case field with `preserve = false` nest deps like:
  17548. * - A = 1 => show B
  17549. * - B = 1 => show C
  17550. * - Reset A, need clean B, C
  17551. */
  17552. case 'remove':
  17553. {
  17554. if (shouldUpdate && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
  17555. _this.reRender();
  17556. return;
  17557. }
  17558. break;
  17559. }
  17560. case 'setField':
  17561. {
  17562. var data = info.data;
  17563. if (namePathMatch) {
  17564. if ('touched' in data) {
  17565. _this.touched = data.touched;
  17566. }
  17567. if ('validating' in data && !('originRCField' in data)) {
  17568. _this.validatePromise = data.validating ? Promise.resolve([]) : null;
  17569. }
  17570. if ('errors' in data) {
  17571. _this.errors = data.errors || EMPTY_ERRORS;
  17572. }
  17573. if ('warnings' in data) {
  17574. _this.warnings = data.warnings || EMPTY_ERRORS;
  17575. }
  17576. _this.dirty = true;
  17577. _this.triggerMetaEvent();
  17578. _this.reRender();
  17579. return;
  17580. } else if ('value' in data && containsNamePath(namePathList, namePath, true)) {
  17581. // Contains path with value should also check
  17582. _this.reRender();
  17583. return;
  17584. }
  17585. // Handle update by `setField` with `shouldUpdate`
  17586. if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
  17587. _this.reRender();
  17588. return;
  17589. }
  17590. break;
  17591. }
  17592. case 'dependenciesUpdate':
  17593. {
  17594. /**
  17595. * Trigger when marked `dependencies` updated. Related fields will all update
  17596. */
  17597. var dependencyList = dependencies.map(getNamePath);
  17598. // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be
  17599. // emitted earlier and they will work there
  17600. // If set it may cause unnecessary twice rerendering
  17601. if (dependencyList.some(function (dependency) {
  17602. return containsNamePath(info.relatedFields, dependency);
  17603. })) {
  17604. _this.reRender();
  17605. return;
  17606. }
  17607. break;
  17608. }
  17609. default:
  17610. // 1. If `namePath` exists in `namePathList`, means it's related value and should update
  17611. // For example <List name="list"><Field name={['list', 0]}></List>
  17612. // If `namePathList` is [['list']] (List value update), Field should be updated
  17613. // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated
  17614. // 2.
  17615. // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,
  17616. // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`
  17617. // is not provided
  17618. // 2.2 If `shouldUpdate` provided, use customize logic to update the field
  17619. // else to check if value changed
  17620. if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
  17621. _this.reRender();
  17622. return;
  17623. }
  17624. break;
  17625. }
  17626. if (shouldUpdate === true) {
  17627. _this.reRender();
  17628. }
  17629. });
  17630. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "validateRules", function (options) {
  17631. // We should fixed namePath & value to avoid developer change then by form function
  17632. var namePath = _this.getNamePath();
  17633. var currentValue = _this.getValue();
  17634. var _ref2 = options || {},
  17635. triggerName = _ref2.triggerName,
  17636. _ref2$validateOnly = _ref2.validateOnly,
  17637. validateOnly = _ref2$validateOnly === void 0 ? false : _ref2$validateOnly;
  17638. // Force change to async to avoid rule OOD under renderProps field
  17639. var rootPromise = Promise.resolve().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  17640. var _this$props5, _this$props5$validate, validateFirst, messageVariables, validateDebounce, filteredRules, promise;
  17641. return _regeneratorRuntime().wrap(function _callee$(_context) {
  17642. while (1) switch (_context.prev = _context.next) {
  17643. case 0:
  17644. if (_this.mounted) {
  17645. _context.next = 2;
  17646. break;
  17647. }
  17648. return _context.abrupt("return", []);
  17649. case 2:
  17650. _this$props5 = _this.props, _this$props5$validate = _this$props5.validateFirst, validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate, messageVariables = _this$props5.messageVariables, validateDebounce = _this$props5.validateDebounce; // Start validate
  17651. filteredRules = _this.getRules();
  17652. if (triggerName) {
  17653. filteredRules = filteredRules.filter(function (rule) {
  17654. return rule;
  17655. }).filter(function (rule) {
  17656. var validateTrigger = rule.validateTrigger;
  17657. if (!validateTrigger) {
  17658. return true;
  17659. }
  17660. var triggerList = typeUtil_toArray(validateTrigger);
  17661. return triggerList.includes(triggerName);
  17662. });
  17663. }
  17664. // Wait for debounce. Skip if no `triggerName` since its from `validateFields / submit`
  17665. if (!(validateDebounce && triggerName)) {
  17666. _context.next = 10;
  17667. break;
  17668. }
  17669. _context.next = 8;
  17670. return new Promise(function (resolve) {
  17671. setTimeout(resolve, validateDebounce);
  17672. });
  17673. case 8:
  17674. if (!(_this.validatePromise !== rootPromise)) {
  17675. _context.next = 10;
  17676. break;
  17677. }
  17678. return _context.abrupt("return", []);
  17679. case 10:
  17680. promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);
  17681. promise.catch(function (e) {
  17682. return e;
  17683. }).then(function () {
  17684. var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;
  17685. if (_this.validatePromise === rootPromise) {
  17686. var _ruleErrors$forEach;
  17687. _this.validatePromise = null;
  17688. // Get errors & warnings
  17689. var nextErrors = [];
  17690. var nextWarnings = [];
  17691. (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref4) {
  17692. var warningOnly = _ref4.rule.warningOnly,
  17693. _ref4$errors = _ref4.errors,
  17694. errors = _ref4$errors === void 0 ? EMPTY_ERRORS : _ref4$errors;
  17695. if (warningOnly) {
  17696. nextWarnings.push.apply(nextWarnings, (0,toConsumableArray["default"])(errors));
  17697. } else {
  17698. nextErrors.push.apply(nextErrors, (0,toConsumableArray["default"])(errors));
  17699. }
  17700. });
  17701. _this.errors = nextErrors;
  17702. _this.warnings = nextWarnings;
  17703. _this.triggerMetaEvent();
  17704. _this.reRender();
  17705. }
  17706. });
  17707. return _context.abrupt("return", promise);
  17708. case 13:
  17709. case "end":
  17710. return _context.stop();
  17711. }
  17712. }, _callee);
  17713. })));
  17714. if (validateOnly) {
  17715. return rootPromise;
  17716. }
  17717. _this.validatePromise = rootPromise;
  17718. _this.dirty = true;
  17719. _this.errors = EMPTY_ERRORS;
  17720. _this.warnings = EMPTY_ERRORS;
  17721. _this.triggerMetaEvent();
  17722. // Force trigger re-render since we need sync renderProps with new meta
  17723. _this.reRender();
  17724. return rootPromise;
  17725. });
  17726. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isFieldValidating", function () {
  17727. return !!_this.validatePromise;
  17728. });
  17729. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isFieldTouched", function () {
  17730. return _this.touched;
  17731. });
  17732. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isFieldDirty", function () {
  17733. // Touched or validate or has initialValue
  17734. if (_this.dirty || _this.props.initialValue !== undefined) {
  17735. return true;
  17736. }
  17737. // Form set initialValue
  17738. var fieldContext = _this.props.fieldContext;
  17739. var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),
  17740. getInitialValue = _fieldContext$getInte.getInitialValue;
  17741. if (getInitialValue(_this.getNamePath()) !== undefined) {
  17742. return true;
  17743. }
  17744. return false;
  17745. });
  17746. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getErrors", function () {
  17747. return _this.errors;
  17748. });
  17749. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getWarnings", function () {
  17750. return _this.warnings;
  17751. });
  17752. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isListField", function () {
  17753. return _this.props.isListField;
  17754. });
  17755. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isList", function () {
  17756. return _this.props.isList;
  17757. });
  17758. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "isPreserve", function () {
  17759. return _this.props.preserve;
  17760. });
  17761. // ============================= Child Component =============================
  17762. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getMeta", function () {
  17763. // Make error & validating in cache to save perf
  17764. _this.prevValidating = _this.isFieldValidating();
  17765. var meta = {
  17766. touched: _this.isFieldTouched(),
  17767. validating: _this.prevValidating,
  17768. errors: _this.errors,
  17769. warnings: _this.warnings,
  17770. name: _this.getNamePath(),
  17771. validated: _this.validatePromise === null
  17772. };
  17773. return meta;
  17774. });
  17775. // Only return validate child node. If invalidate, will do nothing about field.
  17776. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getOnlyChild", function (children) {
  17777. // Support render props
  17778. if (typeof children === 'function') {
  17779. var _meta2 = _this.getMeta();
  17780. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.getOnlyChild(children(_this.getControlled(), _meta2, _this.props.fieldContext))), {}, {
  17781. isFunction: true
  17782. });
  17783. }
  17784. // Filed element only
  17785. var childList = (0,toArray["default"])(children);
  17786. if (childList.length !== 1 || ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(childList[0])) {
  17787. return {
  17788. child: childList,
  17789. isFunction: false
  17790. };
  17791. }
  17792. return {
  17793. child: childList[0],
  17794. isFunction: false
  17795. };
  17796. });
  17797. // ============================== Field Control ==============================
  17798. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getValue", function (store) {
  17799. var getFieldsValue = _this.props.fieldContext.getFieldsValue;
  17800. var namePath = _this.getNamePath();
  17801. return (0,get["default"])(store || getFieldsValue(true), namePath);
  17802. });
  17803. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getControlled", function () {
  17804. var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17805. var _this$props6 = _this.props,
  17806. name = _this$props6.name,
  17807. trigger = _this$props6.trigger,
  17808. validateTrigger = _this$props6.validateTrigger,
  17809. getValueFromEvent = _this$props6.getValueFromEvent,
  17810. normalize = _this$props6.normalize,
  17811. valuePropName = _this$props6.valuePropName,
  17812. getValueProps = _this$props6.getValueProps,
  17813. fieldContext = _this$props6.fieldContext;
  17814. var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;
  17815. var namePath = _this.getNamePath();
  17816. var getInternalHooks = fieldContext.getInternalHooks,
  17817. getFieldsValue = fieldContext.getFieldsValue;
  17818. var _getInternalHooks = getInternalHooks(HOOK_MARK),
  17819. dispatch = _getInternalHooks.dispatch;
  17820. var value = _this.getValue();
  17821. var mergedGetValueProps = getValueProps || function (val) {
  17822. return (0,defineProperty["default"])({}, valuePropName, val);
  17823. };
  17824. var originTriggerFunc = childProps[trigger];
  17825. var valueProps = name !== undefined ? mergedGetValueProps(value) : {};
  17826. // warning when prop value is function
  17827. if ( true && valueProps) {
  17828. Object.keys(valueProps).forEach(function (key) {
  17829. (0,warning["default"])(typeof valueProps[key] !== 'function', "It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(key, ")"));
  17830. });
  17831. }
  17832. var control = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, childProps), valueProps);
  17833. // Add trigger
  17834. control[trigger] = function () {
  17835. // Mark as touched
  17836. _this.touched = true;
  17837. _this.dirty = true;
  17838. _this.triggerMetaEvent();
  17839. var newValue;
  17840. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  17841. args[_key] = arguments[_key];
  17842. }
  17843. if (getValueFromEvent) {
  17844. newValue = getValueFromEvent.apply(void 0, args);
  17845. } else {
  17846. newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));
  17847. }
  17848. if (normalize) {
  17849. newValue = normalize(newValue, value, getFieldsValue(true));
  17850. }
  17851. if (newValue !== value) {
  17852. dispatch({
  17853. type: 'updateValue',
  17854. namePath: namePath,
  17855. value: newValue
  17856. });
  17857. }
  17858. if (originTriggerFunc) {
  17859. originTriggerFunc.apply(void 0, args);
  17860. }
  17861. };
  17862. // Add validateTrigger
  17863. var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []);
  17864. validateTriggerList.forEach(function (triggerName) {
  17865. // Wrap additional function of component, so that we can get latest value from store
  17866. var originTrigger = control[triggerName];
  17867. control[triggerName] = function () {
  17868. if (originTrigger) {
  17869. originTrigger.apply(void 0, arguments);
  17870. }
  17871. // Always use latest rules
  17872. var rules = _this.props.rules;
  17873. if (rules && rules.length) {
  17874. // We dispatch validate to root,
  17875. // since it will update related data with other field with same name
  17876. dispatch({
  17877. type: 'validateField',
  17878. namePath: namePath,
  17879. triggerName: triggerName
  17880. });
  17881. }
  17882. };
  17883. });
  17884. return control;
  17885. });
  17886. if (props.fieldContext) {
  17887. var getInternalHooks = props.fieldContext.getInternalHooks;
  17888. var _getInternalHooks2 = getInternalHooks(HOOK_MARK),
  17889. initEntityValue = _getInternalHooks2.initEntityValue;
  17890. initEntityValue((0,assertThisInitialized["default"])(_this));
  17891. }
  17892. return _this;
  17893. }
  17894. (0,createClass["default"])(Field, [{
  17895. key: "componentDidMount",
  17896. value: function componentDidMount() {
  17897. var _this$props7 = this.props,
  17898. shouldUpdate = _this$props7.shouldUpdate,
  17899. fieldContext = _this$props7.fieldContext;
  17900. this.mounted = true;
  17901. // Register on init
  17902. if (fieldContext) {
  17903. var getInternalHooks = fieldContext.getInternalHooks;
  17904. var _getInternalHooks3 = getInternalHooks(HOOK_MARK),
  17905. registerField = _getInternalHooks3.registerField;
  17906. this.cancelRegisterFunc = registerField(this);
  17907. }
  17908. // One more render for component in case fields not ready
  17909. if (shouldUpdate === true) {
  17910. this.reRender();
  17911. }
  17912. }
  17913. }, {
  17914. key: "componentWillUnmount",
  17915. value: function componentWillUnmount() {
  17916. this.cancelRegister();
  17917. this.triggerMetaEvent(true);
  17918. this.mounted = false;
  17919. }
  17920. }, {
  17921. key: "reRender",
  17922. value: function reRender() {
  17923. if (!this.mounted) return;
  17924. this.forceUpdate();
  17925. }
  17926. }, {
  17927. key: "render",
  17928. value: function render() {
  17929. var resetCount = this.state.resetCount;
  17930. var children = this.props.children;
  17931. var _this$getOnlyChild = this.getOnlyChild(children),
  17932. child = _this$getOnlyChild.child,
  17933. isFunction = _this$getOnlyChild.isFunction;
  17934. // Not need to `cloneElement` since user can handle this in render function self
  17935. var returnChildNode;
  17936. if (isFunction) {
  17937. returnChildNode = child;
  17938. } else if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) {
  17939. returnChildNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, this.getControlled(child.props));
  17940. } else {
  17941. (0,warning["default"])(!child, '`children` of Field is not validate ReactElement.');
  17942. returnChildNode = child;
  17943. }
  17944. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
  17945. key: resetCount
  17946. }, returnChildNode);
  17947. }
  17948. }]);
  17949. return Field;
  17950. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  17951. (0,defineProperty["default"])(Field, "contextType", FieldContext);
  17952. (0,defineProperty["default"])(Field, "defaultProps", {
  17953. trigger: 'onChange',
  17954. valuePropName: 'value'
  17955. });
  17956. function WrapperField(_ref6) {
  17957. var _restProps$isListFiel;
  17958. var name = _ref6.name,
  17959. restProps = (0,objectWithoutProperties["default"])(_ref6, Field_excluded);
  17960. var fieldContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FieldContext);
  17961. var listContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_ListContext);
  17962. var namePath = name !== undefined ? getNamePath(name) : undefined;
  17963. var isMergedListField = (_restProps$isListFiel = restProps.isListField) !== null && _restProps$isListFiel !== void 0 ? _restProps$isListFiel : !!listContext;
  17964. var key = 'keep';
  17965. if (!isMergedListField) {
  17966. key = "_".concat((namePath || []).join('_'));
  17967. }
  17968. // Warning if it's a directly list field.
  17969. // We can still support multiple level field preserve.
  17970. if ( true && restProps.preserve === false && isMergedListField && namePath.length <= 1) {
  17971. (0,warning["default"])(false, '`preserve` should not apply on Form.List fields.');
  17972. }
  17973. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Field, (0,esm_extends["default"])({
  17974. key: key,
  17975. name: namePath,
  17976. isListField: isMergedListField
  17977. }, restProps, {
  17978. fieldContext: fieldContext
  17979. }));
  17980. }
  17981. /* harmony default export */ var es_Field = (WrapperField);
  17982. ;// ./node_modules/rc-field-form/es/List.js
  17983. function List(_ref) {
  17984. var name = _ref.name,
  17985. initialValue = _ref.initialValue,
  17986. children = _ref.children,
  17987. rules = _ref.rules,
  17988. validateTrigger = _ref.validateTrigger,
  17989. isListField = _ref.isListField;
  17990. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FieldContext);
  17991. var wrapperListContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_ListContext);
  17992. var keyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  17993. keys: [],
  17994. id: 0
  17995. });
  17996. var keyManager = keyRef.current;
  17997. var prefixName = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  17998. var parentPrefixName = getNamePath(context.prefixName) || [];
  17999. return [].concat((0,toConsumableArray["default"])(parentPrefixName), (0,toConsumableArray["default"])(getNamePath(name)));
  18000. }, [context.prefixName, name]);
  18001. var fieldContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  18002. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, context), {}, {
  18003. prefixName: prefixName
  18004. });
  18005. }, [context, prefixName]);
  18006. // List context
  18007. var listContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  18008. return {
  18009. getKey: function getKey(namePath) {
  18010. var len = prefixName.length;
  18011. var pathName = namePath[len];
  18012. return [keyManager.keys[pathName], namePath.slice(len + 1)];
  18013. }
  18014. };
  18015. }, [prefixName]);
  18016. // User should not pass `children` as other type.
  18017. if (typeof children !== 'function') {
  18018. (0,warning["default"])(false, 'Form.List only accepts function as children.');
  18019. return null;
  18020. }
  18021. var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {
  18022. var source = _ref2.source;
  18023. if (source === 'internal') {
  18024. return false;
  18025. }
  18026. return prevValue !== nextValue;
  18027. };
  18028. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ListContext.Provider, {
  18029. value: listContext
  18030. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FieldContext.Provider, {
  18031. value: fieldContext
  18032. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Field, {
  18033. name: [],
  18034. shouldUpdate: shouldUpdate,
  18035. rules: rules,
  18036. validateTrigger: validateTrigger,
  18037. initialValue: initialValue,
  18038. isList: true,
  18039. isListField: isListField !== null && isListField !== void 0 ? isListField : !!wrapperListContext
  18040. }, function (_ref3, meta) {
  18041. var _ref3$value = _ref3.value,
  18042. value = _ref3$value === void 0 ? [] : _ref3$value,
  18043. onChange = _ref3.onChange;
  18044. var getFieldValue = context.getFieldValue;
  18045. var getNewValue = function getNewValue() {
  18046. var values = getFieldValue(prefixName || []);
  18047. return values || [];
  18048. };
  18049. /**
  18050. * Always get latest value in case user update fields by `form` api.
  18051. */
  18052. var operations = {
  18053. add: function add(defaultValue, index) {
  18054. // Mapping keys
  18055. var newValue = getNewValue();
  18056. if (index >= 0 && index <= newValue.length) {
  18057. keyManager.keys = [].concat((0,toConsumableArray["default"])(keyManager.keys.slice(0, index)), [keyManager.id], (0,toConsumableArray["default"])(keyManager.keys.slice(index)));
  18058. onChange([].concat((0,toConsumableArray["default"])(newValue.slice(0, index)), [defaultValue], (0,toConsumableArray["default"])(newValue.slice(index))));
  18059. } else {
  18060. if ( true && (index < 0 || index > newValue.length)) {
  18061. (0,warning["default"])(false, 'The second parameter of the add function should be a valid positive number.');
  18062. }
  18063. keyManager.keys = [].concat((0,toConsumableArray["default"])(keyManager.keys), [keyManager.id]);
  18064. onChange([].concat((0,toConsumableArray["default"])(newValue), [defaultValue]));
  18065. }
  18066. keyManager.id += 1;
  18067. },
  18068. remove: function remove(index) {
  18069. var newValue = getNewValue();
  18070. var indexSet = new Set(Array.isArray(index) ? index : [index]);
  18071. if (indexSet.size <= 0) {
  18072. return;
  18073. }
  18074. keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {
  18075. return !indexSet.has(keysIndex);
  18076. });
  18077. // Trigger store change
  18078. onChange(newValue.filter(function (_, valueIndex) {
  18079. return !indexSet.has(valueIndex);
  18080. }));
  18081. },
  18082. move: function move(from, to) {
  18083. if (from === to) {
  18084. return;
  18085. }
  18086. var newValue = getNewValue();
  18087. // Do not handle out of range
  18088. if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {
  18089. return;
  18090. }
  18091. keyManager.keys = valueUtil_move(keyManager.keys, from, to);
  18092. // Trigger store change
  18093. onChange(valueUtil_move(newValue, from, to));
  18094. }
  18095. };
  18096. var listValue = value || [];
  18097. if (!Array.isArray(listValue)) {
  18098. listValue = [];
  18099. if (true) {
  18100. (0,warning["default"])(false, "Current value of '".concat(prefixName.join(' > '), "' is not an array type."));
  18101. }
  18102. }
  18103. return children(listValue.map(function (__, index) {
  18104. var key = keyManager.keys[index];
  18105. if (key === undefined) {
  18106. keyManager.keys[index] = keyManager.id;
  18107. key = keyManager.keys[index];
  18108. keyManager.id += 1;
  18109. }
  18110. return {
  18111. name: index,
  18112. key: key,
  18113. isListField: true
  18114. };
  18115. }), operations, meta);
  18116. })));
  18117. }
  18118. /* harmony default export */ var es_List = (List);
  18119. ;// ./node_modules/rc-field-form/es/utils/asyncUtil.js
  18120. function allPromiseFinish(promiseList) {
  18121. var hasError = false;
  18122. var count = promiseList.length;
  18123. var results = [];
  18124. if (!promiseList.length) {
  18125. return Promise.resolve([]);
  18126. }
  18127. return new Promise(function (resolve, reject) {
  18128. promiseList.forEach(function (promise, index) {
  18129. promise.catch(function (e) {
  18130. hasError = true;
  18131. return e;
  18132. }).then(function (result) {
  18133. count -= 1;
  18134. results[index] = result;
  18135. if (count > 0) {
  18136. return;
  18137. }
  18138. if (hasError) {
  18139. reject(results);
  18140. }
  18141. resolve(results);
  18142. });
  18143. });
  18144. });
  18145. }
  18146. ;// ./node_modules/rc-field-form/es/utils/NameMap.js
  18147. var SPLIT = '__@field_split__';
  18148. /**
  18149. * Convert name path into string to fast the fetch speed of Map.
  18150. */
  18151. function normalize(namePath) {
  18152. return namePath.map(function (cell) {
  18153. return "".concat((0,esm_typeof["default"])(cell), ":").concat(cell);
  18154. })
  18155. // Magic split
  18156. .join(SPLIT);
  18157. }
  18158. /**
  18159. * NameMap like a `Map` but accepts `string[]` as key.
  18160. */
  18161. var NameMap = /*#__PURE__*/function () {
  18162. function NameMap() {
  18163. (0,classCallCheck["default"])(this, NameMap);
  18164. (0,defineProperty["default"])(this, "kvs", new Map());
  18165. }
  18166. (0,createClass["default"])(NameMap, [{
  18167. key: "set",
  18168. value: function set(key, value) {
  18169. this.kvs.set(normalize(key), value);
  18170. }
  18171. }, {
  18172. key: "get",
  18173. value: function get(key) {
  18174. return this.kvs.get(normalize(key));
  18175. }
  18176. }, {
  18177. key: "update",
  18178. value: function update(key, updater) {
  18179. var origin = this.get(key);
  18180. var next = updater(origin);
  18181. if (!next) {
  18182. this.delete(key);
  18183. } else {
  18184. this.set(key, next);
  18185. }
  18186. }
  18187. }, {
  18188. key: "delete",
  18189. value: function _delete(key) {
  18190. this.kvs.delete(normalize(key));
  18191. }
  18192. // Since we only use this in test, let simply realize this
  18193. }, {
  18194. key: "map",
  18195. value: function map(callback) {
  18196. return (0,toConsumableArray["default"])(this.kvs.entries()).map(function (_ref) {
  18197. var _ref2 = (0,slicedToArray["default"])(_ref, 2),
  18198. key = _ref2[0],
  18199. value = _ref2[1];
  18200. var cells = key.split(SPLIT);
  18201. return callback({
  18202. key: cells.map(function (cell) {
  18203. var _cell$match = cell.match(/^([^:]*):(.*)$/),
  18204. _cell$match2 = (0,slicedToArray["default"])(_cell$match, 3),
  18205. type = _cell$match2[1],
  18206. unit = _cell$match2[2];
  18207. return type === 'number' ? Number(unit) : unit;
  18208. }),
  18209. value: value
  18210. });
  18211. });
  18212. }
  18213. }, {
  18214. key: "toJSON",
  18215. value: function toJSON() {
  18216. var json = {};
  18217. this.map(function (_ref3) {
  18218. var key = _ref3.key,
  18219. value = _ref3.value;
  18220. json[key.join('.')] = value;
  18221. return null;
  18222. });
  18223. return json;
  18224. }
  18225. }]);
  18226. return NameMap;
  18227. }();
  18228. /* harmony default export */ var utils_NameMap = (NameMap);
  18229. ;// ./node_modules/rc-field-form/es/useForm.js
  18230. var useForm_excluded = ["name"];
  18231. var FormStore = /*#__PURE__*/(0,createClass["default"])(function FormStore(forceRootUpdate) {
  18232. var _this = this;
  18233. (0,classCallCheck["default"])(this, FormStore);
  18234. (0,defineProperty["default"])(this, "formHooked", false);
  18235. (0,defineProperty["default"])(this, "forceRootUpdate", void 0);
  18236. (0,defineProperty["default"])(this, "subscribable", true);
  18237. (0,defineProperty["default"])(this, "store", {});
  18238. (0,defineProperty["default"])(this, "fieldEntities", []);
  18239. (0,defineProperty["default"])(this, "initialValues", {});
  18240. (0,defineProperty["default"])(this, "callbacks", {});
  18241. (0,defineProperty["default"])(this, "validateMessages", null);
  18242. (0,defineProperty["default"])(this, "preserve", null);
  18243. (0,defineProperty["default"])(this, "lastValidatePromise", null);
  18244. (0,defineProperty["default"])(this, "getForm", function () {
  18245. return {
  18246. getFieldValue: _this.getFieldValue,
  18247. getFieldsValue: _this.getFieldsValue,
  18248. getFieldError: _this.getFieldError,
  18249. getFieldWarning: _this.getFieldWarning,
  18250. getFieldsError: _this.getFieldsError,
  18251. isFieldsTouched: _this.isFieldsTouched,
  18252. isFieldTouched: _this.isFieldTouched,
  18253. isFieldValidating: _this.isFieldValidating,
  18254. isFieldsValidating: _this.isFieldsValidating,
  18255. resetFields: _this.resetFields,
  18256. setFields: _this.setFields,
  18257. setFieldValue: _this.setFieldValue,
  18258. setFieldsValue: _this.setFieldsValue,
  18259. validateFields: _this.validateFields,
  18260. submit: _this.submit,
  18261. _init: true,
  18262. getInternalHooks: _this.getInternalHooks
  18263. };
  18264. });
  18265. // ======================== Internal Hooks ========================
  18266. (0,defineProperty["default"])(this, "getInternalHooks", function (key) {
  18267. if (key === HOOK_MARK) {
  18268. _this.formHooked = true;
  18269. return {
  18270. dispatch: _this.dispatch,
  18271. initEntityValue: _this.initEntityValue,
  18272. registerField: _this.registerField,
  18273. useSubscribe: _this.useSubscribe,
  18274. setInitialValues: _this.setInitialValues,
  18275. destroyForm: _this.destroyForm,
  18276. setCallbacks: _this.setCallbacks,
  18277. setValidateMessages: _this.setValidateMessages,
  18278. getFields: _this.getFields,
  18279. setPreserve: _this.setPreserve,
  18280. getInitialValue: _this.getInitialValue,
  18281. registerWatch: _this.registerWatch
  18282. };
  18283. }
  18284. (0,warning["default"])(false, '`getInternalHooks` is internal usage. Should not call directly.');
  18285. return null;
  18286. });
  18287. (0,defineProperty["default"])(this, "useSubscribe", function (subscribable) {
  18288. _this.subscribable = subscribable;
  18289. });
  18290. /**
  18291. * Record prev Form unmount fieldEntities which config preserve false.
  18292. * This need to be refill with initialValues instead of store value.
  18293. */
  18294. (0,defineProperty["default"])(this, "prevWithoutPreserves", null);
  18295. /**
  18296. * First time `setInitialValues` should update store with initial value
  18297. */
  18298. (0,defineProperty["default"])(this, "setInitialValues", function (initialValues, init) {
  18299. _this.initialValues = initialValues || {};
  18300. if (init) {
  18301. var _this$prevWithoutPres;
  18302. var nextStore = (0,set.merge)(initialValues, _this.store);
  18303. // We will take consider prev form unmount fields.
  18304. // When the field is not `preserve`, we need fill this with initialValues instead of store.
  18305. // eslint-disable-next-line array-callback-return
  18306. (_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 || _this$prevWithoutPres.map(function (_ref) {
  18307. var namePath = _ref.key;
  18308. nextStore = (0,set["default"])(nextStore, namePath, (0,get["default"])(initialValues, namePath));
  18309. });
  18310. _this.prevWithoutPreserves = null;
  18311. _this.updateStore(nextStore);
  18312. }
  18313. });
  18314. (0,defineProperty["default"])(this, "destroyForm", function (clearOnDestroy) {
  18315. if (clearOnDestroy) {
  18316. // destroy form reset store
  18317. _this.updateStore({});
  18318. } else {
  18319. // Fill preserve fields
  18320. var prevWithoutPreserves = new utils_NameMap();
  18321. _this.getFieldEntities(true).forEach(function (entity) {
  18322. if (!_this.isMergedPreserve(entity.isPreserve())) {
  18323. prevWithoutPreserves.set(entity.getNamePath(), true);
  18324. }
  18325. });
  18326. _this.prevWithoutPreserves = prevWithoutPreserves;
  18327. }
  18328. });
  18329. (0,defineProperty["default"])(this, "getInitialValue", function (namePath) {
  18330. var initValue = (0,get["default"])(_this.initialValues, namePath);
  18331. // Not cloneDeep when without `namePath`
  18332. return namePath.length ? (0,set.merge)(initValue) : initValue;
  18333. });
  18334. (0,defineProperty["default"])(this, "setCallbacks", function (callbacks) {
  18335. _this.callbacks = callbacks;
  18336. });
  18337. (0,defineProperty["default"])(this, "setValidateMessages", function (validateMessages) {
  18338. _this.validateMessages = validateMessages;
  18339. });
  18340. (0,defineProperty["default"])(this, "setPreserve", function (preserve) {
  18341. _this.preserve = preserve;
  18342. });
  18343. // ============================= Watch ============================
  18344. (0,defineProperty["default"])(this, "watchList", []);
  18345. (0,defineProperty["default"])(this, "registerWatch", function (callback) {
  18346. _this.watchList.push(callback);
  18347. return function () {
  18348. _this.watchList = _this.watchList.filter(function (fn) {
  18349. return fn !== callback;
  18350. });
  18351. };
  18352. });
  18353. (0,defineProperty["default"])(this, "notifyWatch", function () {
  18354. var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18355. // No need to cost perf when nothing need to watch
  18356. if (_this.watchList.length) {
  18357. var values = _this.getFieldsValue();
  18358. var allValues = _this.getFieldsValue(true);
  18359. _this.watchList.forEach(function (callback) {
  18360. callback(values, allValues, namePath);
  18361. });
  18362. }
  18363. });
  18364. // ========================== Dev Warning =========================
  18365. (0,defineProperty["default"])(this, "timeoutId", null);
  18366. (0,defineProperty["default"])(this, "warningUnhooked", function () {
  18367. if ( true && !_this.timeoutId && typeof window !== 'undefined') {
  18368. _this.timeoutId = setTimeout(function () {
  18369. _this.timeoutId = null;
  18370. if (!_this.formHooked) {
  18371. (0,warning["default"])(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');
  18372. }
  18373. });
  18374. }
  18375. });
  18376. // ============================ Store =============================
  18377. (0,defineProperty["default"])(this, "updateStore", function (nextStore) {
  18378. _this.store = nextStore;
  18379. });
  18380. // ============================ Fields ============================
  18381. /**
  18382. * Get registered field entities.
  18383. * @param pure Only return field which has a `name`. Default: false
  18384. */
  18385. (0,defineProperty["default"])(this, "getFieldEntities", function () {
  18386. var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  18387. if (!pure) {
  18388. return _this.fieldEntities;
  18389. }
  18390. return _this.fieldEntities.filter(function (field) {
  18391. return field.getNamePath().length;
  18392. });
  18393. });
  18394. (0,defineProperty["default"])(this, "getFieldsMap", function () {
  18395. var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  18396. var cache = new utils_NameMap();
  18397. _this.getFieldEntities(pure).forEach(function (field) {
  18398. var namePath = field.getNamePath();
  18399. cache.set(namePath, field);
  18400. });
  18401. return cache;
  18402. });
  18403. (0,defineProperty["default"])(this, "getFieldEntitiesForNamePathList", function (nameList) {
  18404. if (!nameList) {
  18405. return _this.getFieldEntities(true);
  18406. }
  18407. var cache = _this.getFieldsMap(true);
  18408. return nameList.map(function (name) {
  18409. var namePath = getNamePath(name);
  18410. return cache.get(namePath) || {
  18411. INVALIDATE_NAME_PATH: getNamePath(name)
  18412. };
  18413. });
  18414. });
  18415. (0,defineProperty["default"])(this, "getFieldsValue", function (nameList, filterFunc) {
  18416. _this.warningUnhooked();
  18417. // Fill args
  18418. var mergedNameList;
  18419. var mergedFilterFunc;
  18420. var mergedStrict;
  18421. if (nameList === true || Array.isArray(nameList)) {
  18422. mergedNameList = nameList;
  18423. mergedFilterFunc = filterFunc;
  18424. } else if (nameList && (0,esm_typeof["default"])(nameList) === 'object') {
  18425. mergedStrict = nameList.strict;
  18426. mergedFilterFunc = nameList.filter;
  18427. }
  18428. if (mergedNameList === true && !mergedFilterFunc) {
  18429. return _this.store;
  18430. }
  18431. var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(mergedNameList) ? mergedNameList : null);
  18432. var filteredNameList = [];
  18433. fieldEntities.forEach(function (entity) {
  18434. var _isListField, _ref3;
  18435. var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();
  18436. // Ignore when it's a list item and not specific the namePath,
  18437. // since parent field is already take in count
  18438. if (mergedStrict) {
  18439. var _isList, _ref2;
  18440. if ((_isList = (_ref2 = entity).isList) !== null && _isList !== void 0 && _isList.call(_ref2)) {
  18441. return;
  18442. }
  18443. } else if (!mergedNameList && (_isListField = (_ref3 = entity).isListField) !== null && _isListField !== void 0 && _isListField.call(_ref3)) {
  18444. return;
  18445. }
  18446. if (!mergedFilterFunc) {
  18447. filteredNameList.push(namePath);
  18448. } else {
  18449. var meta = 'getMeta' in entity ? entity.getMeta() : null;
  18450. if (mergedFilterFunc(meta)) {
  18451. filteredNameList.push(namePath);
  18452. }
  18453. }
  18454. });
  18455. return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));
  18456. });
  18457. (0,defineProperty["default"])(this, "getFieldValue", function (name) {
  18458. _this.warningUnhooked();
  18459. var namePath = getNamePath(name);
  18460. return (0,get["default"])(_this.store, namePath);
  18461. });
  18462. (0,defineProperty["default"])(this, "getFieldsError", function (nameList) {
  18463. _this.warningUnhooked();
  18464. var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);
  18465. return fieldEntities.map(function (entity, index) {
  18466. if (entity && !('INVALIDATE_NAME_PATH' in entity)) {
  18467. return {
  18468. name: entity.getNamePath(),
  18469. errors: entity.getErrors(),
  18470. warnings: entity.getWarnings()
  18471. };
  18472. }
  18473. return {
  18474. name: getNamePath(nameList[index]),
  18475. errors: [],
  18476. warnings: []
  18477. };
  18478. });
  18479. });
  18480. (0,defineProperty["default"])(this, "getFieldError", function (name) {
  18481. _this.warningUnhooked();
  18482. var namePath = getNamePath(name);
  18483. var fieldError = _this.getFieldsError([namePath])[0];
  18484. return fieldError.errors;
  18485. });
  18486. (0,defineProperty["default"])(this, "getFieldWarning", function (name) {
  18487. _this.warningUnhooked();
  18488. var namePath = getNamePath(name);
  18489. var fieldError = _this.getFieldsError([namePath])[0];
  18490. return fieldError.warnings;
  18491. });
  18492. (0,defineProperty["default"])(this, "isFieldsTouched", function () {
  18493. _this.warningUnhooked();
  18494. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  18495. args[_key] = arguments[_key];
  18496. }
  18497. var arg0 = args[0],
  18498. arg1 = args[1];
  18499. var namePathList;
  18500. var isAllFieldsTouched = false;
  18501. if (args.length === 0) {
  18502. namePathList = null;
  18503. } else if (args.length === 1) {
  18504. if (Array.isArray(arg0)) {
  18505. namePathList = arg0.map(getNamePath);
  18506. isAllFieldsTouched = false;
  18507. } else {
  18508. namePathList = null;
  18509. isAllFieldsTouched = arg0;
  18510. }
  18511. } else {
  18512. namePathList = arg0.map(getNamePath);
  18513. isAllFieldsTouched = arg1;
  18514. }
  18515. var fieldEntities = _this.getFieldEntities(true);
  18516. var isFieldTouched = function isFieldTouched(field) {
  18517. return field.isFieldTouched();
  18518. };
  18519. // ===== Will get fully compare when not config namePathList =====
  18520. if (!namePathList) {
  18521. return isAllFieldsTouched ? fieldEntities.every(function (entity) {
  18522. return isFieldTouched(entity) || entity.isList();
  18523. }) : fieldEntities.some(isFieldTouched);
  18524. }
  18525. // Generate a nest tree for validate
  18526. var map = new utils_NameMap();
  18527. namePathList.forEach(function (shortNamePath) {
  18528. map.set(shortNamePath, []);
  18529. });
  18530. fieldEntities.forEach(function (field) {
  18531. var fieldNamePath = field.getNamePath();
  18532. // Find matched entity and put into list
  18533. namePathList.forEach(function (shortNamePath) {
  18534. if (shortNamePath.every(function (nameUnit, i) {
  18535. return fieldNamePath[i] === nameUnit;
  18536. })) {
  18537. map.update(shortNamePath, function (list) {
  18538. return [].concat((0,toConsumableArray["default"])(list), [field]);
  18539. });
  18540. }
  18541. });
  18542. });
  18543. // Check if NameMap value is touched
  18544. var isNamePathListTouched = function isNamePathListTouched(entities) {
  18545. return entities.some(isFieldTouched);
  18546. };
  18547. var namePathListEntities = map.map(function (_ref4) {
  18548. var value = _ref4.value;
  18549. return value;
  18550. });
  18551. return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);
  18552. });
  18553. (0,defineProperty["default"])(this, "isFieldTouched", function (name) {
  18554. _this.warningUnhooked();
  18555. return _this.isFieldsTouched([name]);
  18556. });
  18557. (0,defineProperty["default"])(this, "isFieldsValidating", function (nameList) {
  18558. _this.warningUnhooked();
  18559. var fieldEntities = _this.getFieldEntities();
  18560. if (!nameList) {
  18561. return fieldEntities.some(function (testField) {
  18562. return testField.isFieldValidating();
  18563. });
  18564. }
  18565. var namePathList = nameList.map(getNamePath);
  18566. return fieldEntities.some(function (testField) {
  18567. var fieldNamePath = testField.getNamePath();
  18568. return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();
  18569. });
  18570. });
  18571. (0,defineProperty["default"])(this, "isFieldValidating", function (name) {
  18572. _this.warningUnhooked();
  18573. return _this.isFieldsValidating([name]);
  18574. });
  18575. /**
  18576. * Reset Field with field `initialValue` prop.
  18577. * Can pass `entities` or `namePathList` or just nothing.
  18578. */
  18579. (0,defineProperty["default"])(this, "resetWithFieldInitialValue", function () {
  18580. var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18581. // Create cache
  18582. var cache = new utils_NameMap();
  18583. var fieldEntities = _this.getFieldEntities(true);
  18584. fieldEntities.forEach(function (field) {
  18585. var initialValue = field.props.initialValue;
  18586. var namePath = field.getNamePath();
  18587. // Record only if has `initialValue`
  18588. if (initialValue !== undefined) {
  18589. var records = cache.get(namePath) || new Set();
  18590. records.add({
  18591. entity: field,
  18592. value: initialValue
  18593. });
  18594. cache.set(namePath, records);
  18595. }
  18596. });
  18597. // Reset
  18598. var resetWithFields = function resetWithFields(entities) {
  18599. entities.forEach(function (field) {
  18600. var initialValue = field.props.initialValue;
  18601. if (initialValue !== undefined) {
  18602. var namePath = field.getNamePath();
  18603. var formInitialValue = _this.getInitialValue(namePath);
  18604. if (formInitialValue !== undefined) {
  18605. // Warning if conflict with form initialValues and do not modify value
  18606. (0,warning["default"])(false, "Form already set 'initialValues' with path '".concat(namePath.join('.'), "'. Field can not overwrite it."));
  18607. } else {
  18608. var records = cache.get(namePath);
  18609. if (records && records.size > 1) {
  18610. // Warning if multiple field set `initialValue`and do not modify value
  18611. (0,warning["default"])(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick."));
  18612. } else if (records) {
  18613. var originValue = _this.getFieldValue(namePath);
  18614. var isListField = field.isListField();
  18615. // Set `initialValue`
  18616. if (!isListField && (!info.skipExist || originValue === undefined)) {
  18617. _this.updateStore((0,set["default"])(_this.store, namePath, (0,toConsumableArray["default"])(records)[0].value));
  18618. }
  18619. }
  18620. }
  18621. }
  18622. });
  18623. };
  18624. var requiredFieldEntities;
  18625. if (info.entities) {
  18626. requiredFieldEntities = info.entities;
  18627. } else if (info.namePathList) {
  18628. requiredFieldEntities = [];
  18629. info.namePathList.forEach(function (namePath) {
  18630. var records = cache.get(namePath);
  18631. if (records) {
  18632. var _requiredFieldEntitie;
  18633. (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, (0,toConsumableArray["default"])((0,toConsumableArray["default"])(records).map(function (r) {
  18634. return r.entity;
  18635. })));
  18636. }
  18637. });
  18638. } else {
  18639. requiredFieldEntities = fieldEntities;
  18640. }
  18641. resetWithFields(requiredFieldEntities);
  18642. });
  18643. (0,defineProperty["default"])(this, "resetFields", function (nameList) {
  18644. _this.warningUnhooked();
  18645. var prevStore = _this.store;
  18646. if (!nameList) {
  18647. _this.updateStore((0,set.merge)(_this.initialValues));
  18648. _this.resetWithFieldInitialValue();
  18649. _this.notifyObservers(prevStore, null, {
  18650. type: 'reset'
  18651. });
  18652. _this.notifyWatch();
  18653. return;
  18654. }
  18655. // Reset by `nameList`
  18656. var namePathList = nameList.map(getNamePath);
  18657. namePathList.forEach(function (namePath) {
  18658. var initialValue = _this.getInitialValue(namePath);
  18659. _this.updateStore((0,set["default"])(_this.store, namePath, initialValue));
  18660. });
  18661. _this.resetWithFieldInitialValue({
  18662. namePathList: namePathList
  18663. });
  18664. _this.notifyObservers(prevStore, namePathList, {
  18665. type: 'reset'
  18666. });
  18667. _this.notifyWatch(namePathList);
  18668. });
  18669. (0,defineProperty["default"])(this, "setFields", function (fields) {
  18670. _this.warningUnhooked();
  18671. var prevStore = _this.store;
  18672. var namePathList = [];
  18673. fields.forEach(function (fieldData) {
  18674. var name = fieldData.name,
  18675. data = (0,objectWithoutProperties["default"])(fieldData, useForm_excluded);
  18676. var namePath = getNamePath(name);
  18677. namePathList.push(namePath);
  18678. // Value
  18679. if ('value' in data) {
  18680. _this.updateStore((0,set["default"])(_this.store, namePath, data.value));
  18681. }
  18682. _this.notifyObservers(prevStore, [namePath], {
  18683. type: 'setField',
  18684. data: fieldData
  18685. });
  18686. });
  18687. _this.notifyWatch(namePathList);
  18688. });
  18689. (0,defineProperty["default"])(this, "getFields", function () {
  18690. var entities = _this.getFieldEntities(true);
  18691. var fields = entities.map(function (field) {
  18692. var namePath = field.getNamePath();
  18693. var meta = field.getMeta();
  18694. var fieldData = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, meta), {}, {
  18695. name: namePath,
  18696. value: _this.getFieldValue(namePath)
  18697. });
  18698. Object.defineProperty(fieldData, 'originRCField', {
  18699. value: true
  18700. });
  18701. return fieldData;
  18702. });
  18703. return fields;
  18704. });
  18705. // =========================== Observer ===========================
  18706. /**
  18707. * This only trigger when a field is on constructor to avoid we get initialValue too late
  18708. */
  18709. (0,defineProperty["default"])(this, "initEntityValue", function (entity) {
  18710. var initialValue = entity.props.initialValue;
  18711. if (initialValue !== undefined) {
  18712. var namePath = entity.getNamePath();
  18713. var prevValue = (0,get["default"])(_this.store, namePath);
  18714. if (prevValue === undefined) {
  18715. _this.updateStore((0,set["default"])(_this.store, namePath, initialValue));
  18716. }
  18717. }
  18718. });
  18719. (0,defineProperty["default"])(this, "isMergedPreserve", function (fieldPreserve) {
  18720. var mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : _this.preserve;
  18721. return mergedPreserve !== null && mergedPreserve !== void 0 ? mergedPreserve : true;
  18722. });
  18723. (0,defineProperty["default"])(this, "registerField", function (entity) {
  18724. _this.fieldEntities.push(entity);
  18725. var namePath = entity.getNamePath();
  18726. _this.notifyWatch([namePath]);
  18727. // Set initial values
  18728. if (entity.props.initialValue !== undefined) {
  18729. var prevStore = _this.store;
  18730. _this.resetWithFieldInitialValue({
  18731. entities: [entity],
  18732. skipExist: true
  18733. });
  18734. _this.notifyObservers(prevStore, [entity.getNamePath()], {
  18735. type: 'valueUpdate',
  18736. source: 'internal'
  18737. });
  18738. }
  18739. // un-register field callback
  18740. return function (isListField, preserve) {
  18741. var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  18742. _this.fieldEntities = _this.fieldEntities.filter(function (item) {
  18743. return item !== entity;
  18744. });
  18745. // Clean up store value if not preserve
  18746. if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {
  18747. var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);
  18748. if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {
  18749. return (
  18750. // Only reset when no namePath exist
  18751. !matchNamePath(field.getNamePath(), namePath)
  18752. );
  18753. })) {
  18754. var _prevStore = _this.store;
  18755. _this.updateStore((0,set["default"])(_prevStore, namePath, defaultValue, true));
  18756. // Notify that field is unmount
  18757. _this.notifyObservers(_prevStore, [namePath], {
  18758. type: 'remove'
  18759. });
  18760. // Dependencies update
  18761. _this.triggerDependenciesUpdate(_prevStore, namePath);
  18762. }
  18763. }
  18764. _this.notifyWatch([namePath]);
  18765. };
  18766. });
  18767. (0,defineProperty["default"])(this, "dispatch", function (action) {
  18768. switch (action.type) {
  18769. case 'updateValue':
  18770. {
  18771. var namePath = action.namePath,
  18772. value = action.value;
  18773. _this.updateValue(namePath, value);
  18774. break;
  18775. }
  18776. case 'validateField':
  18777. {
  18778. var _namePath = action.namePath,
  18779. triggerName = action.triggerName;
  18780. _this.validateFields([_namePath], {
  18781. triggerName: triggerName
  18782. });
  18783. break;
  18784. }
  18785. default:
  18786. // Currently we don't have other action. Do nothing.
  18787. }
  18788. });
  18789. (0,defineProperty["default"])(this, "notifyObservers", function (prevStore, namePathList, info) {
  18790. if (_this.subscribable) {
  18791. var mergedInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
  18792. store: _this.getFieldsValue(true)
  18793. });
  18794. _this.getFieldEntities().forEach(function (_ref5) {
  18795. var onStoreChange = _ref5.onStoreChange;
  18796. onStoreChange(prevStore, namePathList, mergedInfo);
  18797. });
  18798. } else {
  18799. _this.forceRootUpdate();
  18800. }
  18801. });
  18802. /**
  18803. * Notify dependencies children with parent update
  18804. * We need delay to trigger validate in case Field is under render props
  18805. */
  18806. (0,defineProperty["default"])(this, "triggerDependenciesUpdate", function (prevStore, namePath) {
  18807. var childrenFields = _this.getDependencyChildrenFields(namePath);
  18808. if (childrenFields.length) {
  18809. _this.validateFields(childrenFields);
  18810. }
  18811. _this.notifyObservers(prevStore, childrenFields, {
  18812. type: 'dependenciesUpdate',
  18813. relatedFields: [namePath].concat((0,toConsumableArray["default"])(childrenFields))
  18814. });
  18815. return childrenFields;
  18816. });
  18817. (0,defineProperty["default"])(this, "updateValue", function (name, value) {
  18818. var namePath = getNamePath(name);
  18819. var prevStore = _this.store;
  18820. _this.updateStore((0,set["default"])(_this.store, namePath, value));
  18821. _this.notifyObservers(prevStore, [namePath], {
  18822. type: 'valueUpdate',
  18823. source: 'internal'
  18824. });
  18825. _this.notifyWatch([namePath]);
  18826. // Dependencies update
  18827. var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);
  18828. // trigger callback function
  18829. var onValuesChange = _this.callbacks.onValuesChange;
  18830. if (onValuesChange) {
  18831. var changedValues = cloneByNamePathList(_this.store, [namePath]);
  18832. onValuesChange(changedValues, _this.getFieldsValue());
  18833. }
  18834. _this.triggerOnFieldsChange([namePath].concat((0,toConsumableArray["default"])(childrenFields)));
  18835. });
  18836. // Let all child Field get update.
  18837. (0,defineProperty["default"])(this, "setFieldsValue", function (store) {
  18838. _this.warningUnhooked();
  18839. var prevStore = _this.store;
  18840. if (store) {
  18841. var nextStore = (0,set.merge)(_this.store, store);
  18842. _this.updateStore(nextStore);
  18843. }
  18844. _this.notifyObservers(prevStore, null, {
  18845. type: 'valueUpdate',
  18846. source: 'external'
  18847. });
  18848. _this.notifyWatch();
  18849. });
  18850. (0,defineProperty["default"])(this, "setFieldValue", function (name, value) {
  18851. _this.setFields([{
  18852. name: name,
  18853. value: value,
  18854. errors: [],
  18855. warnings: []
  18856. }]);
  18857. });
  18858. (0,defineProperty["default"])(this, "getDependencyChildrenFields", function (rootNamePath) {
  18859. var children = new Set();
  18860. var childrenFields = [];
  18861. var dependencies2fields = new utils_NameMap();
  18862. /**
  18863. * Generate maps
  18864. * Can use cache to save perf if user report performance issue with this
  18865. */
  18866. _this.getFieldEntities().forEach(function (field) {
  18867. var dependencies = field.props.dependencies;
  18868. (dependencies || []).forEach(function (dependency) {
  18869. var dependencyNamePath = getNamePath(dependency);
  18870. dependencies2fields.update(dependencyNamePath, function () {
  18871. var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();
  18872. fields.add(field);
  18873. return fields;
  18874. });
  18875. });
  18876. });
  18877. var fillChildren = function fillChildren(namePath) {
  18878. var fields = dependencies2fields.get(namePath) || new Set();
  18879. fields.forEach(function (field) {
  18880. if (!children.has(field)) {
  18881. children.add(field);
  18882. var fieldNamePath = field.getNamePath();
  18883. if (field.isFieldDirty() && fieldNamePath.length) {
  18884. childrenFields.push(fieldNamePath);
  18885. fillChildren(fieldNamePath);
  18886. }
  18887. }
  18888. });
  18889. };
  18890. fillChildren(rootNamePath);
  18891. return childrenFields;
  18892. });
  18893. (0,defineProperty["default"])(this, "triggerOnFieldsChange", function (namePathList, filedErrors) {
  18894. var onFieldsChange = _this.callbacks.onFieldsChange;
  18895. if (onFieldsChange) {
  18896. var fields = _this.getFields();
  18897. /**
  18898. * Fill errors since `fields` may be replaced by controlled fields
  18899. */
  18900. if (filedErrors) {
  18901. var cache = new utils_NameMap();
  18902. filedErrors.forEach(function (_ref6) {
  18903. var name = _ref6.name,
  18904. errors = _ref6.errors;
  18905. cache.set(name, errors);
  18906. });
  18907. fields.forEach(function (field) {
  18908. // eslint-disable-next-line no-param-reassign
  18909. field.errors = cache.get(field.name) || field.errors;
  18910. });
  18911. }
  18912. var changedFields = fields.filter(function (_ref7) {
  18913. var fieldName = _ref7.name;
  18914. return containsNamePath(namePathList, fieldName);
  18915. });
  18916. if (changedFields.length) {
  18917. onFieldsChange(changedFields, fields);
  18918. }
  18919. }
  18920. });
  18921. // =========================== Validate ===========================
  18922. (0,defineProperty["default"])(this, "validateFields", function (arg1, arg2) {
  18923. _this.warningUnhooked();
  18924. var nameList;
  18925. var options;
  18926. if (Array.isArray(arg1) || typeof arg1 === 'string' || typeof arg2 === 'string') {
  18927. nameList = arg1;
  18928. options = arg2;
  18929. } else {
  18930. options = arg1;
  18931. }
  18932. var provideNameList = !!nameList;
  18933. var namePathList = provideNameList ? nameList.map(getNamePath) : [];
  18934. // Collect result in promise list
  18935. var promiseList = [];
  18936. // We temp save the path which need trigger for `onFieldsChange`
  18937. var TMP_SPLIT = String(Date.now());
  18938. var validateNamePathList = new Set();
  18939. var _ref8 = options || {},
  18940. recursive = _ref8.recursive,
  18941. dirty = _ref8.dirty;
  18942. _this.getFieldEntities(true).forEach(function (field) {
  18943. // Add field if not provide `nameList`
  18944. if (!provideNameList) {
  18945. namePathList.push(field.getNamePath());
  18946. }
  18947. // Skip if without rule
  18948. if (!field.props.rules || !field.props.rules.length) {
  18949. return;
  18950. }
  18951. // Skip if only validate dirty field
  18952. if (dirty && !field.isFieldDirty()) {
  18953. return;
  18954. }
  18955. var fieldNamePath = field.getNamePath();
  18956. validateNamePathList.add(fieldNamePath.join(TMP_SPLIT));
  18957. // Add field validate rule in to promise list
  18958. if (!provideNameList || containsNamePath(namePathList, fieldNamePath, recursive)) {
  18959. var promise = field.validateRules((0,objectSpread2["default"])({
  18960. validateMessages: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, defaultValidateMessages), _this.validateMessages)
  18961. }, options));
  18962. // Wrap promise with field
  18963. promiseList.push(promise.then(function () {
  18964. return {
  18965. name: fieldNamePath,
  18966. errors: [],
  18967. warnings: []
  18968. };
  18969. }).catch(function (ruleErrors) {
  18970. var _ruleErrors$forEach;
  18971. var mergedErrors = [];
  18972. var mergedWarnings = [];
  18973. (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref9) {
  18974. var warningOnly = _ref9.rule.warningOnly,
  18975. errors = _ref9.errors;
  18976. if (warningOnly) {
  18977. mergedWarnings.push.apply(mergedWarnings, (0,toConsumableArray["default"])(errors));
  18978. } else {
  18979. mergedErrors.push.apply(mergedErrors, (0,toConsumableArray["default"])(errors));
  18980. }
  18981. });
  18982. if (mergedErrors.length) {
  18983. return Promise.reject({
  18984. name: fieldNamePath,
  18985. errors: mergedErrors,
  18986. warnings: mergedWarnings
  18987. });
  18988. }
  18989. return {
  18990. name: fieldNamePath,
  18991. errors: mergedErrors,
  18992. warnings: mergedWarnings
  18993. };
  18994. }));
  18995. }
  18996. });
  18997. var summaryPromise = allPromiseFinish(promiseList);
  18998. _this.lastValidatePromise = summaryPromise;
  18999. // Notify fields with rule that validate has finished and need update
  19000. summaryPromise.catch(function (results) {
  19001. return results;
  19002. }).then(function (results) {
  19003. var resultNamePathList = results.map(function (_ref10) {
  19004. var name = _ref10.name;
  19005. return name;
  19006. });
  19007. _this.notifyObservers(_this.store, resultNamePathList, {
  19008. type: 'validateFinish'
  19009. });
  19010. _this.triggerOnFieldsChange(resultNamePathList, results);
  19011. });
  19012. var returnPromise = summaryPromise.then(function () {
  19013. if (_this.lastValidatePromise === summaryPromise) {
  19014. return Promise.resolve(_this.getFieldsValue(namePathList));
  19015. }
  19016. return Promise.reject([]);
  19017. }).catch(function (results) {
  19018. var errorList = results.filter(function (result) {
  19019. return result && result.errors.length;
  19020. });
  19021. return Promise.reject({
  19022. values: _this.getFieldsValue(namePathList),
  19023. errorFields: errorList,
  19024. outOfDate: _this.lastValidatePromise !== summaryPromise
  19025. });
  19026. });
  19027. // Do not throw in console
  19028. returnPromise.catch(function (e) {
  19029. return e;
  19030. });
  19031. // `validating` changed. Trigger `onFieldsChange`
  19032. var triggerNamePathList = namePathList.filter(function (namePath) {
  19033. return validateNamePathList.has(namePath.join(TMP_SPLIT));
  19034. });
  19035. _this.triggerOnFieldsChange(triggerNamePathList);
  19036. return returnPromise;
  19037. });
  19038. // ============================ Submit ============================
  19039. (0,defineProperty["default"])(this, "submit", function () {
  19040. _this.warningUnhooked();
  19041. _this.validateFields().then(function (values) {
  19042. var onFinish = _this.callbacks.onFinish;
  19043. if (onFinish) {
  19044. try {
  19045. onFinish(values);
  19046. } catch (err) {
  19047. // Should print error if user `onFinish` callback failed
  19048. console.error(err);
  19049. }
  19050. }
  19051. }).catch(function (e) {
  19052. var onFinishFailed = _this.callbacks.onFinishFailed;
  19053. if (onFinishFailed) {
  19054. onFinishFailed(e);
  19055. }
  19056. });
  19057. });
  19058. this.forceRootUpdate = forceRootUpdate;
  19059. });
  19060. function useForm(form) {
  19061. var formRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  19062. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  19063. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  19064. forceUpdate = _React$useState2[1];
  19065. if (!formRef.current) {
  19066. if (form) {
  19067. formRef.current = form;
  19068. } else {
  19069. // Create a new FormStore if not provided
  19070. var forceReRender = function forceReRender() {
  19071. forceUpdate({});
  19072. };
  19073. var formStore = new FormStore(forceReRender);
  19074. formRef.current = formStore.getForm();
  19075. }
  19076. }
  19077. return [formRef.current];
  19078. }
  19079. /* harmony default export */ var es_useForm = (useForm);
  19080. ;// ./node_modules/rc-field-form/es/FormContext.js
  19081. var FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  19082. triggerFormChange: function triggerFormChange() {},
  19083. triggerFormFinish: function triggerFormFinish() {},
  19084. registerForm: function registerForm() {},
  19085. unregisterForm: function unregisterForm() {}
  19086. });
  19087. var FormProvider = function FormProvider(_ref) {
  19088. var validateMessages = _ref.validateMessages,
  19089. onFormChange = _ref.onFormChange,
  19090. onFormFinish = _ref.onFormFinish,
  19091. children = _ref.children;
  19092. var formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormContext);
  19093. var formsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  19094. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormContext.Provider, {
  19095. value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formContext), {}, {
  19096. validateMessages: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formContext.validateMessages), validateMessages),
  19097. // =========================================================
  19098. // = Global Form Control =
  19099. // =========================================================
  19100. triggerFormChange: function triggerFormChange(name, changedFields) {
  19101. if (onFormChange) {
  19102. onFormChange(name, {
  19103. changedFields: changedFields,
  19104. forms: formsRef.current
  19105. });
  19106. }
  19107. formContext.triggerFormChange(name, changedFields);
  19108. },
  19109. triggerFormFinish: function triggerFormFinish(name, values) {
  19110. if (onFormFinish) {
  19111. onFormFinish(name, {
  19112. values: values,
  19113. forms: formsRef.current
  19114. });
  19115. }
  19116. formContext.triggerFormFinish(name, values);
  19117. },
  19118. registerForm: function registerForm(name, form) {
  19119. if (name) {
  19120. formsRef.current = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formsRef.current), {}, (0,defineProperty["default"])({}, name, form));
  19121. }
  19122. formContext.registerForm(name, form);
  19123. },
  19124. unregisterForm: function unregisterForm(name) {
  19125. var newForms = (0,objectSpread2["default"])({}, formsRef.current);
  19126. delete newForms[name];
  19127. formsRef.current = newForms;
  19128. formContext.unregisterForm(name);
  19129. }
  19130. })
  19131. }, children);
  19132. };
  19133. /* harmony default export */ var es_FormContext = (FormContext);
  19134. ;// ./node_modules/rc-field-form/es/Form.js
  19135. var Form_excluded = ["name", "initialValues", "fields", "form", "preserve", "children", "component", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed", "clearOnDestroy"];
  19136. var Form = function Form(_ref, ref) {
  19137. var name = _ref.name,
  19138. initialValues = _ref.initialValues,
  19139. fields = _ref.fields,
  19140. form = _ref.form,
  19141. preserve = _ref.preserve,
  19142. children = _ref.children,
  19143. _ref$component = _ref.component,
  19144. Component = _ref$component === void 0 ? 'form' : _ref$component,
  19145. validateMessages = _ref.validateMessages,
  19146. _ref$validateTrigger = _ref.validateTrigger,
  19147. validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,
  19148. onValuesChange = _ref.onValuesChange,
  19149. _onFieldsChange = _ref.onFieldsChange,
  19150. _onFinish = _ref.onFinish,
  19151. onFinishFailed = _ref.onFinishFailed,
  19152. clearOnDestroy = _ref.clearOnDestroy,
  19153. restProps = (0,objectWithoutProperties["default"])(_ref, Form_excluded);
  19154. var nativeElementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  19155. var formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_FormContext);
  19156. // We customize handle event since Context will makes all the consumer re-render:
  19157. // https://reactjs.org/docs/context.html#contextprovider
  19158. var _useForm = es_useForm(form),
  19159. _useForm2 = (0,slicedToArray["default"])(_useForm, 1),
  19160. formInstance = _useForm2[0];
  19161. var _getInternalHooks = formInstance.getInternalHooks(HOOK_MARK),
  19162. useSubscribe = _getInternalHooks.useSubscribe,
  19163. setInitialValues = _getInternalHooks.setInitialValues,
  19164. setCallbacks = _getInternalHooks.setCallbacks,
  19165. setValidateMessages = _getInternalHooks.setValidateMessages,
  19166. setPreserve = _getInternalHooks.setPreserve,
  19167. destroyForm = _getInternalHooks.destroyForm;
  19168. // Pass ref with form instance
  19169. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  19170. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formInstance), {}, {
  19171. nativeElement: nativeElementRef.current
  19172. });
  19173. });
  19174. // Register form into Context
  19175. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  19176. formContext.registerForm(name, formInstance);
  19177. return function () {
  19178. formContext.unregisterForm(name);
  19179. };
  19180. }, [formContext, formInstance, name]);
  19181. // Pass props to store
  19182. setValidateMessages((0,objectSpread2["default"])((0,objectSpread2["default"])({}, formContext.validateMessages), validateMessages));
  19183. setCallbacks({
  19184. onValuesChange: onValuesChange,
  19185. onFieldsChange: function onFieldsChange(changedFields) {
  19186. formContext.triggerFormChange(name, changedFields);
  19187. if (_onFieldsChange) {
  19188. for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  19189. rest[_key - 1] = arguments[_key];
  19190. }
  19191. _onFieldsChange.apply(void 0, [changedFields].concat(rest));
  19192. }
  19193. },
  19194. onFinish: function onFinish(values) {
  19195. formContext.triggerFormFinish(name, values);
  19196. if (_onFinish) {
  19197. _onFinish(values);
  19198. }
  19199. },
  19200. onFinishFailed: onFinishFailed
  19201. });
  19202. setPreserve(preserve);
  19203. // Set initial value, init store value when first mount
  19204. var mountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  19205. setInitialValues(initialValues, !mountRef.current);
  19206. if (!mountRef.current) {
  19207. mountRef.current = true;
  19208. }
  19209. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  19210. return function () {
  19211. return destroyForm(clearOnDestroy);
  19212. };
  19213. },
  19214. // eslint-disable-next-line react-hooks/exhaustive-deps
  19215. []);
  19216. // Prepare children by `children` type
  19217. var childrenNode;
  19218. var childrenRenderProps = typeof children === 'function';
  19219. if (childrenRenderProps) {
  19220. var _values = formInstance.getFieldsValue(true);
  19221. childrenNode = children(_values, formInstance);
  19222. } else {
  19223. childrenNode = children;
  19224. }
  19225. // Not use subscribe when using render props
  19226. useSubscribe(!childrenRenderProps);
  19227. // Listen if fields provided. We use ref to save prev data here to avoid additional render
  19228. var prevFieldsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  19229. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  19230. if (!isSimilar(prevFieldsRef.current || [], fields || [])) {
  19231. formInstance.setFields(fields || []);
  19232. }
  19233. prevFieldsRef.current = fields;
  19234. }, [fields, formInstance]);
  19235. var formContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  19236. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, formInstance), {}, {
  19237. validateTrigger: validateTrigger
  19238. });
  19239. }, [formInstance, validateTrigger]);
  19240. var wrapperNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ListContext.Provider, {
  19241. value: null
  19242. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FieldContext.Provider, {
  19243. value: formContextValue
  19244. }, childrenNode));
  19245. if (Component === false) {
  19246. return wrapperNode;
  19247. }
  19248. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, restProps, {
  19249. ref: nativeElementRef,
  19250. onSubmit: function onSubmit(event) {
  19251. event.preventDefault();
  19252. event.stopPropagation();
  19253. formInstance.submit();
  19254. },
  19255. onReset: function onReset(event) {
  19256. var _restProps$onReset;
  19257. event.preventDefault();
  19258. formInstance.resetFields();
  19259. (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 || _restProps$onReset.call(restProps, event);
  19260. }
  19261. }), wrapperNode);
  19262. };
  19263. /* harmony default export */ var es_Form = (Form);
  19264. ;// ./node_modules/rc-field-form/es/useWatch.js
  19265. function stringify(value) {
  19266. try {
  19267. return JSON.stringify(value);
  19268. } catch (err) {
  19269. return Math.random();
  19270. }
  19271. }
  19272. var useWatchWarning = true ? function (namePath) {
  19273. var fullyStr = namePath.join('__RC_FIELD_FORM_SPLIT__');
  19274. var nameStrRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(fullyStr);
  19275. (0,warning["default"])(nameStrRef.current === fullyStr, '`useWatch` is not support dynamic `namePath`. Please provide static instead.');
  19276. } : 0;
  19277. // ------- selector type -------
  19278. // ------- selector type end -------
  19279. function useWatch() {
  19280. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  19281. args[_key] = arguments[_key];
  19282. }
  19283. var dependencies = args[0],
  19284. _args$ = args[1],
  19285. _form = _args$ === void 0 ? {} : _args$;
  19286. var options = isFormInstance(_form) ? {
  19287. form: _form
  19288. } : _form;
  19289. var form = options.form;
  19290. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
  19291. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  19292. value = _useState2[0],
  19293. setValue = _useState2[1];
  19294. var valueStr = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  19295. return stringify(value);
  19296. }, [value]);
  19297. var valueStrRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(valueStr);
  19298. valueStrRef.current = valueStr;
  19299. var fieldContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FieldContext);
  19300. var formInstance = form || fieldContext;
  19301. var isValidForm = formInstance && formInstance._init;
  19302. // Warning if not exist form instance
  19303. if (true) {
  19304. (0,warning["default"])(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');
  19305. }
  19306. var namePath = getNamePath(dependencies);
  19307. var namePathRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(namePath);
  19308. namePathRef.current = namePath;
  19309. useWatchWarning(namePath);
  19310. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  19311. // Skip if not exist form instance
  19312. if (!isValidForm) {
  19313. return;
  19314. }
  19315. var getFieldsValue = formInstance.getFieldsValue,
  19316. getInternalHooks = formInstance.getInternalHooks;
  19317. var _getInternalHooks = getInternalHooks(HOOK_MARK),
  19318. registerWatch = _getInternalHooks.registerWatch;
  19319. var getWatchValue = function getWatchValue(values, allValues) {
  19320. var watchValue = options.preserve ? allValues : values;
  19321. return typeof dependencies === 'function' ? dependencies(watchValue) : (0,get["default"])(watchValue, namePathRef.current);
  19322. };
  19323. var cancelRegister = registerWatch(function (values, allValues) {
  19324. var newValue = getWatchValue(values, allValues);
  19325. var nextValueStr = stringify(newValue);
  19326. // Compare stringify in case it's nest object
  19327. if (valueStrRef.current !== nextValueStr) {
  19328. valueStrRef.current = nextValueStr;
  19329. setValue(newValue);
  19330. }
  19331. });
  19332. // TODO: We can improve this perf in future
  19333. var initialValue = getWatchValue(getFieldsValue(), getFieldsValue(true));
  19334. // React 18 has the bug that will queue update twice even the value is not changed
  19335. // ref: https://github.com/facebook/react/issues/27213
  19336. if (value !== initialValue) {
  19337. setValue(initialValue);
  19338. }
  19339. return cancelRegister;
  19340. },
  19341. // We do not need re-register since namePath content is the same
  19342. // eslint-disable-next-line react-hooks/exhaustive-deps
  19343. [isValidForm]);
  19344. return value;
  19345. }
  19346. /* harmony default export */ var es_useWatch = (useWatch);
  19347. ;// ./node_modules/rc-field-form/es/index.js
  19348. var InternalForm = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(es_Form);
  19349. var RefForm = InternalForm;
  19350. RefForm.FormProvider = FormProvider;
  19351. RefForm.Field = es_Field;
  19352. RefForm.List = es_List;
  19353. RefForm.useForm = es_useForm;
  19354. RefForm.useWatch = es_useWatch;
  19355. /* harmony default export */ var rc_field_form_es = (RefForm);
  19356. ;// ./components/form/context.tsx
  19357. const context_FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  19358. labelAlign: 'right',
  19359. layout: 'horizontal',
  19360. itemRef: () => {}
  19361. });
  19362. const NoStyleItemContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  19363. const context_FormProvider = props => {
  19364. const providerProps = (0,omit["default"])(props, ['prefixCls']);
  19365. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormProvider, Object.assign({}, providerProps));
  19366. };
  19367. const FormItemPrefixContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  19368. prefixCls: ''
  19369. });
  19370. const FormItemInputContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  19371. if (true) {
  19372. FormItemInputContext.displayName = 'FormItemInputContext';
  19373. }
  19374. const NoFormStyle = ({
  19375. children,
  19376. status,
  19377. override
  19378. }) => {
  19379. const formItemInputContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  19380. const newFormItemInputContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  19381. const newContext = Object.assign({}, formItemInputContext);
  19382. if (override) {
  19383. delete newContext.isFormItemInput;
  19384. }
  19385. if (status) {
  19386. delete newContext.status;
  19387. delete newContext.hasFeedback;
  19388. delete newContext.feedbackIcon;
  19389. }
  19390. return newContext;
  19391. }, [status, override, formItemInputContext]);
  19392. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
  19393. value: newFormItemInputContext
  19394. }, children);
  19395. };
  19396. const VariantContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
  19397. ;// ./components/_util/ContextIsolator.tsx
  19398. const ContextIsolator = props => {
  19399. const {
  19400. space,
  19401. form,
  19402. children
  19403. } = props;
  19404. if (children === undefined || children === null) {
  19405. return null;
  19406. }
  19407. let result = children;
  19408. if (form) {
  19409. result = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NoFormStyle, {
  19410. override: true,
  19411. status: true
  19412. }, result);
  19413. }
  19414. if (space) {
  19415. result = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NoCompactStyle, null, result);
  19416. }
  19417. return result;
  19418. };
  19419. /* harmony default export */ var _util_ContextIsolator = (ContextIsolator);
  19420. ;// ./components/_util/extendsObject.ts
  19421. function mergeProps(...items) {
  19422. const ret = {};
  19423. items.forEach(item => {
  19424. if (item) {
  19425. Object.keys(item).forEach(key => {
  19426. if (item[key] !== undefined) {
  19427. ret[key] = item[key];
  19428. }
  19429. });
  19430. }
  19431. });
  19432. return ret;
  19433. }
  19434. /* harmony default export */ var extendsObject = (mergeProps);
  19435. ;// ./components/_util/hooks/useClosable.tsx
  19436. function pickClosable(context) {
  19437. if (!context) {
  19438. return undefined;
  19439. }
  19440. const {
  19441. closable,
  19442. closeIcon
  19443. } = context;
  19444. return {
  19445. closable,
  19446. closeIcon
  19447. };
  19448. }
  19449. /** Convert `closable` and `closeIcon` to config object */
  19450. function useClosableConfig(closableCollection) {
  19451. const {
  19452. closable,
  19453. closeIcon
  19454. } = closableCollection || {};
  19455. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  19456. if (
  19457. // If `closable`, whatever rest be should be true
  19458. !closable && (closable === false || closeIcon === false || closeIcon === null)) {
  19459. return false;
  19460. }
  19461. if (closable === undefined && closeIcon === undefined) {
  19462. return null;
  19463. }
  19464. let closableConfig = {
  19465. closeIcon: typeof closeIcon !== 'boolean' && closeIcon !== null ? closeIcon : undefined
  19466. };
  19467. if (closable && typeof closable === 'object') {
  19468. closableConfig = Object.assign(Object.assign({}, closableConfig), closable);
  19469. }
  19470. return closableConfig;
  19471. }, [closable, closeIcon]);
  19472. }
  19473. /** Use same object to support `useMemo` optimization */
  19474. const EmptyFallbackCloseCollection = {};
  19475. function useClosable(propCloseCollection, contextCloseCollection, fallbackCloseCollection = EmptyFallbackCloseCollection) {
  19476. // Align the `props`, `context` `fallback` to config object first
  19477. const propCloseConfig = useClosableConfig(propCloseCollection);
  19478. const contextCloseConfig = useClosableConfig(contextCloseCollection);
  19479. const [contextLocale] = (0,useLocale["default"])('global', en_US["default"].global);
  19480. const closeBtnIsDisabled = typeof propCloseConfig !== 'boolean' ? !!(propCloseConfig === null || propCloseConfig === void 0 ? void 0 : propCloseConfig.disabled) : false;
  19481. const mergedFallbackCloseCollection = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => Object.assign({
  19482. closeIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, null)
  19483. }, fallbackCloseCollection), [fallbackCloseCollection]);
  19484. // Use fallback logic to fill the config
  19485. const mergedClosableConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  19486. // ================ Props First ================
  19487. // Skip if prop is disabled
  19488. if (propCloseConfig === false) {
  19489. return false;
  19490. }
  19491. if (propCloseConfig) {
  19492. return extendsObject(mergedFallbackCloseCollection, contextCloseConfig, propCloseConfig);
  19493. }
  19494. // =============== Context Second ==============
  19495. // Skip if context is disabled
  19496. if (contextCloseConfig === false) {
  19497. return false;
  19498. }
  19499. if (contextCloseConfig) {
  19500. return extendsObject(mergedFallbackCloseCollection, contextCloseConfig);
  19501. }
  19502. // ============= Fallback Default ==============
  19503. return !mergedFallbackCloseCollection.closable ? false : mergedFallbackCloseCollection;
  19504. }, [propCloseConfig, contextCloseConfig, mergedFallbackCloseCollection]);
  19505. // Calculate the final closeIcon
  19506. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  19507. var _a, _b;
  19508. if (mergedClosableConfig === false) {
  19509. return [false, null, closeBtnIsDisabled, {}];
  19510. }
  19511. const {
  19512. closeIconRender
  19513. } = mergedFallbackCloseCollection;
  19514. const {
  19515. closeIcon
  19516. } = mergedClosableConfig;
  19517. let mergedCloseIcon = closeIcon;
  19518. // Wrap the closeIcon with aria props
  19519. const ariaOrDataProps = (0,pickAttrs["default"])(mergedClosableConfig, true);
  19520. if (mergedCloseIcon !== null && mergedCloseIcon !== undefined) {
  19521. // Wrap the closeIcon if needed
  19522. if (closeIconRender) {
  19523. mergedCloseIcon = closeIconRender(closeIcon);
  19524. }
  19525. mergedCloseIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(mergedCloseIcon) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(mergedCloseIcon, Object.assign(Object.assign(Object.assign({}, mergedCloseIcon.props), {
  19526. 'aria-label': (_b = (_a = mergedCloseIcon.props) === null || _a === void 0 ? void 0 : _a['aria-label']) !== null && _b !== void 0 ? _b : contextLocale.close
  19527. }), ariaOrDataProps))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", Object.assign({
  19528. "aria-label": contextLocale.close
  19529. }, ariaOrDataProps), mergedCloseIcon));
  19530. }
  19531. return [true, mergedCloseIcon, closeBtnIsDisabled, ariaOrDataProps];
  19532. }, [mergedClosableConfig, mergedFallbackCloseCollection]);
  19533. }
  19534. ;// ./node_modules/rc-util/es/Dom/styleChecker.js
  19535. var isStyleNameSupport = function isStyleNameSupport(styleName) {
  19536. if ((0,canUseDom["default"])() && window.document.documentElement) {
  19537. var styleNameList = Array.isArray(styleName) ? styleName : [styleName];
  19538. var documentElement = window.document.documentElement;
  19539. return styleNameList.some(function (name) {
  19540. return name in documentElement.style;
  19541. });
  19542. }
  19543. return false;
  19544. };
  19545. var isStyleValueSupport = function isStyleValueSupport(styleName, value) {
  19546. if (!isStyleNameSupport(styleName)) {
  19547. return false;
  19548. }
  19549. var ele = document.createElement('div');
  19550. var origin = ele.style[styleName];
  19551. ele.style[styleName] = value;
  19552. return ele.style[styleName] !== origin;
  19553. };
  19554. function isStyleSupport(styleName, styleValue) {
  19555. if (!Array.isArray(styleName) && styleValue !== undefined) {
  19556. return isStyleValueSupport(styleName, styleValue);
  19557. }
  19558. return isStyleNameSupport(styleName);
  19559. }
  19560. ;// ./components/_util/styleChecker.ts
  19561. const canUseDocElement = () => (0,canUseDom["default"])() && window.document.documentElement;
  19562. // EXTERNAL MODULE: ./components/_util/zindexContext.ts
  19563. var zindexContext = __webpack_require__("./components/_util/zindexContext.ts");
  19564. ;// ./components/skeleton/Element.tsx
  19565. const Element_Element = props => {
  19566. const {
  19567. prefixCls,
  19568. className,
  19569. style,
  19570. size,
  19571. shape
  19572. } = props;
  19573. const sizeCls = classnames_default()({
  19574. [`${prefixCls}-lg`]: size === 'large',
  19575. [`${prefixCls}-sm`]: size === 'small'
  19576. });
  19577. const shapeCls = classnames_default()({
  19578. [`${prefixCls}-circle`]: shape === 'circle',
  19579. [`${prefixCls}-square`]: shape === 'square',
  19580. [`${prefixCls}-round`]: shape === 'round'
  19581. });
  19582. const sizeStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => typeof size === 'number' ? {
  19583. width: size,
  19584. height: size,
  19585. lineHeight: `${size}px`
  19586. } : {}, [size]);
  19587. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  19588. className: classnames_default()(prefixCls, sizeCls, shapeCls, className),
  19589. style: Object.assign(Object.assign({}, sizeStyle), style)
  19590. });
  19591. };
  19592. /* harmony default export */ var skeleton_Element = (Element_Element);
  19593. // EXTERNAL MODULE: ./components/skeleton/style/index.ts
  19594. var skeleton_style = __webpack_require__("./components/skeleton/style/index.ts");
  19595. ;// ./components/skeleton/Avatar.tsx
  19596. const SkeletonAvatar = props => {
  19597. const {
  19598. prefixCls: customizePrefixCls,
  19599. className,
  19600. rootClassName,
  19601. active,
  19602. shape = 'circle',
  19603. size = 'default'
  19604. } = props;
  19605. const {
  19606. getPrefixCls
  19607. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  19608. const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
  19609. const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
  19610. const otherProps = (0,omit["default"])(props, ['prefixCls', 'className']);
  19611. const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
  19612. [`${prefixCls}-active`]: active
  19613. }, className, rootClassName, hashId, cssVarCls);
  19614. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19615. className: cls
  19616. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({
  19617. prefixCls: `${prefixCls}-avatar`,
  19618. shape: shape,
  19619. size: size
  19620. }, otherProps))));
  19621. };
  19622. /* harmony default export */ var Avatar = (SkeletonAvatar);
  19623. ;// ./components/skeleton/Button.tsx
  19624. const SkeletonButton = props => {
  19625. const {
  19626. prefixCls: customizePrefixCls,
  19627. className,
  19628. rootClassName,
  19629. active,
  19630. block = false,
  19631. size = 'default'
  19632. } = props;
  19633. const {
  19634. getPrefixCls
  19635. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  19636. const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
  19637. const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
  19638. const otherProps = (0,omit["default"])(props, ['prefixCls']);
  19639. const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
  19640. [`${prefixCls}-active`]: active,
  19641. [`${prefixCls}-block`]: block
  19642. }, className, rootClassName, hashId, cssVarCls);
  19643. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19644. className: cls
  19645. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({
  19646. prefixCls: `${prefixCls}-button`,
  19647. size: size
  19648. }, otherProps))));
  19649. };
  19650. /* harmony default export */ var skeleton_Button = (SkeletonButton);
  19651. ;// ./components/skeleton/Image.tsx
  19652. const path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z';
  19653. const SkeletonImage = props => {
  19654. const {
  19655. prefixCls: customizePrefixCls,
  19656. className,
  19657. rootClassName,
  19658. style,
  19659. active
  19660. } = props;
  19661. const {
  19662. getPrefixCls
  19663. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  19664. const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
  19665. const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
  19666. const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
  19667. [`${prefixCls}-active`]: active
  19668. }, className, rootClassName, hashId, cssVarCls);
  19669. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19670. className: cls
  19671. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19672. className: classnames_default()(`${prefixCls}-image`, className),
  19673. style: style
  19674. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  19675. viewBox: "0 0 1098 1024",
  19676. xmlns: "http://www.w3.org/2000/svg",
  19677. className: `${prefixCls}-image-svg`
  19678. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "Image placeholder"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  19679. d: path,
  19680. className: `${prefixCls}-image-path`
  19681. })))));
  19682. };
  19683. /* harmony default export */ var skeleton_Image = (SkeletonImage);
  19684. ;// ./components/skeleton/Input.tsx
  19685. const SkeletonInput = props => {
  19686. const {
  19687. prefixCls: customizePrefixCls,
  19688. className,
  19689. rootClassName,
  19690. active,
  19691. block,
  19692. size = 'default'
  19693. } = props;
  19694. const {
  19695. getPrefixCls
  19696. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  19697. const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
  19698. const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
  19699. const otherProps = (0,omit["default"])(props, ['prefixCls']);
  19700. const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
  19701. [`${prefixCls}-active`]: active,
  19702. [`${prefixCls}-block`]: block
  19703. }, className, rootClassName, hashId, cssVarCls);
  19704. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19705. className: cls
  19706. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({
  19707. prefixCls: `${prefixCls}-input`,
  19708. size: size
  19709. }, otherProps))));
  19710. };
  19711. /* harmony default export */ var Input = (SkeletonInput);
  19712. ;// ./components/skeleton/Node.tsx
  19713. const SkeletonNode = props => {
  19714. const {
  19715. prefixCls: customizePrefixCls,
  19716. className,
  19717. rootClassName,
  19718. style,
  19719. active,
  19720. children
  19721. } = props;
  19722. const {
  19723. getPrefixCls
  19724. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  19725. const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
  19726. const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
  19727. const cls = classnames_default()(prefixCls, `${prefixCls}-element`, {
  19728. [`${prefixCls}-active`]: active
  19729. }, hashId, className, rootClassName, cssVarCls);
  19730. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19731. className: cls
  19732. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19733. className: classnames_default()(`${prefixCls}-image`, className),
  19734. style: style
  19735. }, children)));
  19736. };
  19737. /* harmony default export */ var Node = (SkeletonNode);
  19738. ;// ./components/skeleton/Paragraph.tsx
  19739. const getWidth = (index, props) => {
  19740. const {
  19741. width,
  19742. rows = 2
  19743. } = props;
  19744. if (Array.isArray(width)) {
  19745. return width[index];
  19746. }
  19747. // last paragraph
  19748. if (rows - 1 === index) {
  19749. return width;
  19750. }
  19751. return undefined;
  19752. };
  19753. const Paragraph = props => {
  19754. const {
  19755. prefixCls,
  19756. className,
  19757. style,
  19758. rows = 0
  19759. } = props;
  19760. const rowList = Array.from({
  19761. length: rows
  19762. }).map((_, index) => (
  19763. /*#__PURE__*/
  19764. // eslint-disable-next-line react/no-array-index-key
  19765. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  19766. key: index,
  19767. style: {
  19768. width: getWidth(index, props)
  19769. }
  19770. })));
  19771. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  19772. className: classnames_default()(prefixCls, className),
  19773. style: style
  19774. }, rowList);
  19775. };
  19776. /* harmony default export */ var skeleton_Paragraph = (Paragraph);
  19777. ;// ./components/skeleton/Title.tsx
  19778. /* eslint-disable jsx-a11y/heading-has-content */
  19779. const Title = ({
  19780. prefixCls,
  19781. className,
  19782. width,
  19783. style
  19784. }) => (
  19785. /*#__PURE__*/
  19786. // biome-ignore lint/a11y/useHeadingContent: HOC here
  19787. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("h3", {
  19788. className: classnames_default()(prefixCls, className),
  19789. style: Object.assign({
  19790. width
  19791. }, style)
  19792. }));
  19793. /* harmony default export */ var skeleton_Title = (Title);
  19794. ;// ./components/skeleton/Skeleton.tsx
  19795. function getComponentProps(prop) {
  19796. if (prop && typeof prop === 'object') {
  19797. return prop;
  19798. }
  19799. return {};
  19800. }
  19801. function getAvatarBasicProps(hasTitle, hasParagraph) {
  19802. if (hasTitle && !hasParagraph) {
  19803. // Square avatar
  19804. return {
  19805. size: 'large',
  19806. shape: 'square'
  19807. };
  19808. }
  19809. return {
  19810. size: 'large',
  19811. shape: 'circle'
  19812. };
  19813. }
  19814. function getTitleBasicProps(hasAvatar, hasParagraph) {
  19815. if (!hasAvatar && hasParagraph) {
  19816. return {
  19817. width: '38%'
  19818. };
  19819. }
  19820. if (hasAvatar && hasParagraph) {
  19821. return {
  19822. width: '50%'
  19823. };
  19824. }
  19825. return {};
  19826. }
  19827. function getParagraphBasicProps(hasAvatar, hasTitle) {
  19828. const basicProps = {};
  19829. // Width
  19830. if (!hasAvatar || !hasTitle) {
  19831. basicProps.width = '61%';
  19832. }
  19833. // Rows
  19834. if (!hasAvatar && hasTitle) {
  19835. basicProps.rows = 3;
  19836. } else {
  19837. basicProps.rows = 2;
  19838. }
  19839. return basicProps;
  19840. }
  19841. const Skeleton = props => {
  19842. const {
  19843. prefixCls: customizePrefixCls,
  19844. loading,
  19845. className,
  19846. rootClassName,
  19847. style,
  19848. children,
  19849. avatar = false,
  19850. title = true,
  19851. paragraph = true,
  19852. active,
  19853. round
  19854. } = props;
  19855. const {
  19856. getPrefixCls,
  19857. direction,
  19858. className: contextClassName,
  19859. style: contextStyle
  19860. } = (0,config_provider_context.useComponentConfig)('skeleton');
  19861. const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
  19862. const [wrapCSSVar, hashId, cssVarCls] = (0,skeleton_style["default"])(prefixCls);
  19863. if (loading || !('loading' in props)) {
  19864. const hasAvatar = !!avatar;
  19865. const hasTitle = !!title;
  19866. const hasParagraph = !!paragraph;
  19867. // Avatar
  19868. let avatarNode;
  19869. if (hasAvatar) {
  19870. const avatarProps = Object.assign(Object.assign({
  19871. prefixCls: `${prefixCls}-avatar`
  19872. }, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar));
  19873. // We direct use SkeletonElement as avatar in skeleton internal.
  19874. avatarNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19875. className: `${prefixCls}-header`
  19876. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Element, Object.assign({}, avatarProps)));
  19877. }
  19878. let contentNode;
  19879. if (hasTitle || hasParagraph) {
  19880. // Title
  19881. let $title;
  19882. if (hasTitle) {
  19883. const titleProps = Object.assign(Object.assign({
  19884. prefixCls: `${prefixCls}-title`
  19885. }, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title));
  19886. $title = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Title, Object.assign({}, titleProps));
  19887. }
  19888. // Paragraph
  19889. let paragraphNode;
  19890. if (hasParagraph) {
  19891. const paragraphProps = Object.assign(Object.assign({
  19892. prefixCls: `${prefixCls}-paragraph`
  19893. }, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph));
  19894. paragraphNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton_Paragraph, Object.assign({}, paragraphProps));
  19895. }
  19896. contentNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19897. className: `${prefixCls}-content`
  19898. }, $title, paragraphNode);
  19899. }
  19900. const cls = classnames_default()(prefixCls, {
  19901. [`${prefixCls}-with-avatar`]: hasAvatar,
  19902. [`${prefixCls}-active`]: active,
  19903. [`${prefixCls}-rtl`]: direction === 'rtl',
  19904. [`${prefixCls}-round`]: round
  19905. }, contextClassName, className, rootClassName, hashId, cssVarCls);
  19906. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  19907. className: cls,
  19908. style: Object.assign(Object.assign({}, contextStyle), style)
  19909. }, avatarNode, contentNode));
  19910. }
  19911. return children !== null && children !== void 0 ? children : null;
  19912. };
  19913. Skeleton.Button = skeleton_Button;
  19914. Skeleton.Avatar = Avatar;
  19915. Skeleton.Input = Input;
  19916. Skeleton.Image = skeleton_Image;
  19917. Skeleton.Node = Node;
  19918. if (true) {
  19919. Skeleton.displayName = 'Skeleton';
  19920. }
  19921. /* harmony default export */ var skeleton_Skeleton = (Skeleton);
  19922. ;// ./components/skeleton/index.tsx
  19923. /* harmony default export */ var skeleton = (skeleton_Skeleton);
  19924. ;// ./components/watermark/context.ts
  19925. function voidFunc() {}
  19926. const WatermarkContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  19927. add: voidFunc,
  19928. remove: voidFunc
  19929. });
  19930. function usePanelRef(panelSelector) {
  19931. const watermark = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(WatermarkContext);
  19932. const panelEleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  19933. const panelRef = (0,useEvent["default"])(ele => {
  19934. if (ele) {
  19935. const innerContentEle = panelSelector ? ele.querySelector(panelSelector) : ele;
  19936. watermark.add(innerContentEle);
  19937. panelEleRef.current = innerContentEle;
  19938. } else {
  19939. watermark.remove(panelEleRef.current);
  19940. }
  19941. });
  19942. return panelRef;
  19943. }
  19944. /* harmony default export */ var watermark_context = (WatermarkContext);
  19945. ;// ./components/modal/components/NormalCancelBtn.tsx
  19946. const NormalCancelBtn = () => {
  19947. const {
  19948. cancelButtonProps,
  19949. cancelTextLocale,
  19950. onCancel
  19951. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
  19952. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({
  19953. onClick: onCancel
  19954. }, cancelButtonProps), cancelTextLocale);
  19955. };
  19956. /* harmony default export */ var components_NormalCancelBtn = (NormalCancelBtn);
  19957. ;// ./components/modal/components/NormalOkBtn.tsx
  19958. const NormalOkBtn = () => {
  19959. const {
  19960. confirmLoading,
  19961. okButtonProps,
  19962. okType,
  19963. okTextLocale,
  19964. onOk
  19965. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ModalContext);
  19966. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({}, convertLegacyProps(okType), {
  19967. loading: confirmLoading,
  19968. onClick: onOk
  19969. }, okButtonProps), okTextLocale);
  19970. };
  19971. /* harmony default export */ var components_NormalOkBtn = (NormalOkBtn);
  19972. ;// ./components/modal/shared.tsx
  19973. function renderCloseIcon(prefixCls, closeIcon) {
  19974. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  19975. className: `${prefixCls}-close-x`
  19976. }, closeIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, {
  19977. className: `${prefixCls}-close-icon`
  19978. }));
  19979. }
  19980. const Footer = props => {
  19981. const {
  19982. okText,
  19983. okType = 'primary',
  19984. cancelText,
  19985. confirmLoading,
  19986. onOk,
  19987. onCancel,
  19988. okButtonProps,
  19989. cancelButtonProps,
  19990. footer
  19991. } = props;
  19992. const [locale] = (0,useLocale["default"])('Modal', getConfirmLocale());
  19993. // ================== Locale Text ==================
  19994. const okTextLocale = okText || (locale === null || locale === void 0 ? void 0 : locale.okText);
  19995. const cancelTextLocale = cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText);
  19996. // ================= Context Value =================
  19997. const btnCtxValue = {
  19998. confirmLoading,
  19999. okButtonProps,
  20000. cancelButtonProps,
  20001. okTextLocale,
  20002. cancelTextLocale,
  20003. okType,
  20004. onOk,
  20005. onCancel
  20006. };
  20007. const btnCtxValueMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => btnCtxValue, (0,toConsumableArray["default"])(Object.values(btnCtxValue)));
  20008. let footerNode;
  20009. if (typeof footer === 'function' || typeof footer === 'undefined') {
  20010. footerNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_NormalCancelBtn, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_NormalOkBtn, null));
  20011. if (typeof footer === 'function') {
  20012. footerNode = footer(footerNode, {
  20013. OkBtn: components_NormalOkBtn,
  20014. CancelBtn: components_NormalCancelBtn
  20015. });
  20016. }
  20017. footerNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ModalContextProvider, {
  20018. value: btnCtxValueMemo
  20019. }, footerNode);
  20020. } else {
  20021. footerNode = footer;
  20022. }
  20023. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(DisabledContextProvider, {
  20024. disabled: false
  20025. }, footerNode);
  20026. };
  20027. // EXTERNAL MODULE: ./components/modal/style/index.ts
  20028. var modal_style = __webpack_require__("./components/modal/style/index.ts");
  20029. ;// ./components/modal/Modal.tsx
  20030. var Modal_rest = undefined && undefined.__rest || function (s, e) {
  20031. var t = {};
  20032. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  20033. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  20034. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  20035. }
  20036. return t;
  20037. };
  20038. let mousePosition;
  20039. // ref: https://github.com/ant-design/ant-design/issues/15795
  20040. const getClickPosition = e => {
  20041. mousePosition = {
  20042. x: e.pageX,
  20043. y: e.pageY
  20044. };
  20045. // 100ms 内发生过点击事件,则从点击位置动画展示
  20046. // 否则直接 zoom 展示
  20047. // 这样可以兼容非点击方式展开
  20048. setTimeout(() => {
  20049. mousePosition = null;
  20050. }, 100);
  20051. };
  20052. // 只有点击事件支持从鼠标位置动画展开
  20053. if (canUseDocElement()) {
  20054. document.documentElement.addEventListener('click', getClickPosition, true);
  20055. }
  20056. const Modal = props => {
  20057. const {
  20058. prefixCls: customizePrefixCls,
  20059. className,
  20060. rootClassName,
  20061. open,
  20062. wrapClassName,
  20063. centered,
  20064. getContainer,
  20065. focusTriggerAfterClose = true,
  20066. style,
  20067. // Deprecated
  20068. visible,
  20069. width = 520,
  20070. footer,
  20071. classNames: modalClassNames,
  20072. styles: modalStyles,
  20073. children,
  20074. loading,
  20075. confirmLoading,
  20076. zIndex: customizeZIndex,
  20077. mousePosition: customizeMousePosition,
  20078. onOk,
  20079. onCancel,
  20080. destroyOnHidden,
  20081. destroyOnClose,
  20082. panelRef = null
  20083. } = props,
  20084. restProps = Modal_rest(props, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading", "confirmLoading", "zIndex", "mousePosition", "onOk", "onCancel", "destroyOnHidden", "destroyOnClose", "panelRef"]);
  20085. const {
  20086. getPopupContainer: getContextPopupContainer,
  20087. getPrefixCls,
  20088. direction,
  20089. modal: modalContext
  20090. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  20091. const handleCancel = e => {
  20092. if (confirmLoading) {
  20093. return;
  20094. }
  20095. onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);
  20096. };
  20097. const handleOk = e => {
  20098. onOk === null || onOk === void 0 ? void 0 : onOk(e);
  20099. };
  20100. if (true) {
  20101. const warning = (0,_util_warning.devUseWarning)('Modal');
  20102. [['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask'], ['destroyOnClose', 'destroyOnHidden']].forEach(([deprecatedName, newName]) => {
  20103. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  20104. });
  20105. }
  20106. const prefixCls = getPrefixCls('modal', customizePrefixCls);
  20107. const rootPrefixCls = getPrefixCls();
  20108. // Style
  20109. const rootCls = hooks_useCSSVarCls(prefixCls);
  20110. const [wrapCSSVar, hashId, cssVarCls] = (0,modal_style["default"])(prefixCls, rootCls);
  20111. const wrapClassNameExtended = classnames_default()(wrapClassName, {
  20112. [`${prefixCls}-centered`]: centered !== null && centered !== void 0 ? centered : modalContext === null || modalContext === void 0 ? void 0 : modalContext.centered,
  20113. [`${prefixCls}-wrap-rtl`]: direction === 'rtl'
  20114. });
  20115. const dialogFooter = footer !== null && !loading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer, Object.assign({}, props, {
  20116. onOk: handleOk,
  20117. onCancel: handleCancel
  20118. }))) : null;
  20119. const [mergedClosable, mergedCloseIcon, closeBtnIsDisabled, ariaProps] = useClosable(pickClosable(props), pickClosable(modalContext), {
  20120. closable: true,
  20121. closeIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
  20122. className: `${prefixCls}-close-icon`
  20123. }),
  20124. closeIconRender: icon => renderCloseIcon(prefixCls, icon)
  20125. });
  20126. // ============================ Refs ============================
  20127. // Select `ant-modal-content` by `panelRef`
  20128. const innerPanelRef = usePanelRef(`.${prefixCls}-content`);
  20129. const mergedPanelRef = (0,es_ref.composeRef)(panelRef, innerPanelRef);
  20130. // ============================ zIndex ============================
  20131. const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Modal', customizeZIndex);
  20132. // =========================== Width ============================
  20133. const [numWidth, responsiveWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  20134. if (width && typeof width === 'object') {
  20135. return [undefined, width];
  20136. }
  20137. return [width, undefined];
  20138. }, [width]);
  20139. const responsiveWidthVars = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  20140. const vars = {};
  20141. if (responsiveWidth) {
  20142. Object.keys(responsiveWidth).forEach(breakpoint => {
  20143. const breakpointWidth = responsiveWidth[breakpoint];
  20144. if (breakpointWidth !== undefined) {
  20145. vars[`--${prefixCls}-${breakpoint}-width`] = typeof breakpointWidth === 'number' ? `${breakpointWidth}px` : breakpointWidth;
  20146. }
  20147. });
  20148. }
  20149. return vars;
  20150. }, [responsiveWidth]);
  20151. // =========================== Render ===========================
  20152. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  20153. form: true,
  20154. space: true
  20155. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
  20156. value: contextZIndex
  20157. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_dialog_es, Object.assign({
  20158. width: numWidth
  20159. }, restProps, {
  20160. zIndex: zIndex,
  20161. getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
  20162. prefixCls: prefixCls,
  20163. rootClassName: classnames_default()(hashId, rootClassName, cssVarCls, rootCls),
  20164. footer: dialogFooter,
  20165. visible: open !== null && open !== void 0 ? open : visible,
  20166. mousePosition: customizeMousePosition !== null && customizeMousePosition !== void 0 ? customizeMousePosition : mousePosition,
  20167. onClose: handleCancel,
  20168. closable: mergedClosable ? Object.assign({
  20169. disabled: closeBtnIsDisabled,
  20170. closeIcon: mergedCloseIcon
  20171. }, ariaProps) : mergedClosable,
  20172. closeIcon: mergedCloseIcon,
  20173. focusTriggerAfterClose: focusTriggerAfterClose,
  20174. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom', props.transitionName),
  20175. maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'fade', props.maskTransitionName),
  20176. className: classnames_default()(hashId, className, modalContext === null || modalContext === void 0 ? void 0 : modalContext.className),
  20177. style: Object.assign(Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.style), style), responsiveWidthVars),
  20178. classNames: Object.assign(Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.classNames), modalClassNames), {
  20179. wrapper: classnames_default()(wrapClassNameExtended, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper)
  20180. }),
  20181. styles: Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.styles), modalStyles),
  20182. panelRef: mergedPanelRef,
  20183. // TODO: In the future, destroyOnClose in rc-dialog needs to be upgrade to destroyOnHidden
  20184. destroyOnClose: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyOnClose
  20185. }), loading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
  20186. active: true,
  20187. title: false,
  20188. paragraph: {
  20189. rows: 4
  20190. },
  20191. className: `${prefixCls}-body-skeleton`
  20192. })) : children))));
  20193. };
  20194. /* harmony default export */ var modal_Modal = (Modal);
  20195. // EXTERNAL MODULE: ./components/style/index.tsx
  20196. var components_style = __webpack_require__("./components/style/index.tsx");
  20197. ;// ./components/modal/style/confirm.ts
  20198. // Style as confirm component
  20199. // ============================= Confirm ==============================
  20200. const genModalConfirmStyle = token => {
  20201. const {
  20202. componentCls,
  20203. titleFontSize,
  20204. titleLineHeight,
  20205. modalConfirmIconSize,
  20206. fontSize,
  20207. lineHeight,
  20208. modalTitleHeight,
  20209. fontHeight,
  20210. confirmBodyPadding
  20211. } = token;
  20212. const confirmComponentCls = `${componentCls}-confirm`;
  20213. return {
  20214. [confirmComponentCls]: {
  20215. '&-rtl': {
  20216. direction: 'rtl'
  20217. },
  20218. [`${token.antCls}-modal-header`]: {
  20219. display: 'none'
  20220. },
  20221. [`${confirmComponentCls}-body-wrapper`]: Object.assign({}, (0,components_style.clearFix)()),
  20222. [`&${componentCls} ${componentCls}-body`]: {
  20223. padding: confirmBodyPadding
  20224. },
  20225. // ====================== Body ======================
  20226. [`${confirmComponentCls}-body`]: {
  20227. display: 'flex',
  20228. flexWrap: 'nowrap',
  20229. alignItems: 'start',
  20230. [`> ${token.iconCls}`]: {
  20231. flex: 'none',
  20232. fontSize: modalConfirmIconSize,
  20233. marginInlineEnd: token.confirmIconMarginInlineEnd,
  20234. marginTop: token.calc(token.calc(fontHeight).sub(modalConfirmIconSize).equal()).div(2).equal()
  20235. },
  20236. [`&-has-title > ${token.iconCls}`]: {
  20237. marginTop: token.calc(token.calc(modalTitleHeight).sub(modalConfirmIconSize).equal()).div(2).equal()
  20238. }
  20239. },
  20240. [`${confirmComponentCls}-paragraph`]: {
  20241. display: 'flex',
  20242. flexDirection: 'column',
  20243. flex: 'auto',
  20244. rowGap: token.marginXS,
  20245. // https://github.com/ant-design/ant-design/issues/51912
  20246. maxWidth: `calc(100% - ${(0,cssinjs.unit)(token.marginSM)})`
  20247. },
  20248. // https://github.com/ant-design/ant-design/issues/48159
  20249. [`${token.iconCls} + ${confirmComponentCls}-paragraph`]: {
  20250. maxWidth: `calc(100% - ${(0,cssinjs.unit)(token.calc(token.modalConfirmIconSize).add(token.marginSM).equal())})`
  20251. },
  20252. [`${confirmComponentCls}-title`]: {
  20253. color: token.colorTextHeading,
  20254. fontWeight: token.fontWeightStrong,
  20255. fontSize: titleFontSize,
  20256. lineHeight: titleLineHeight
  20257. },
  20258. [`${confirmComponentCls}-content`]: {
  20259. color: token.colorText,
  20260. fontSize,
  20261. lineHeight
  20262. },
  20263. // ===================== Footer =====================
  20264. [`${confirmComponentCls}-btns`]: {
  20265. textAlign: 'end',
  20266. marginTop: token.confirmBtnsMarginTop,
  20267. [`${token.antCls}-btn + ${token.antCls}-btn`]: {
  20268. marginBottom: 0,
  20269. marginInlineStart: token.marginXS
  20270. }
  20271. }
  20272. },
  20273. [`${confirmComponentCls}-error ${confirmComponentCls}-body > ${token.iconCls}`]: {
  20274. color: token.colorError
  20275. },
  20276. [`${confirmComponentCls}-warning ${confirmComponentCls}-body > ${token.iconCls},
  20277. ${confirmComponentCls}-confirm ${confirmComponentCls}-body > ${token.iconCls}`]: {
  20278. color: token.colorWarning
  20279. },
  20280. [`${confirmComponentCls}-info ${confirmComponentCls}-body > ${token.iconCls}`]: {
  20281. color: token.colorInfo
  20282. },
  20283. [`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {
  20284. color: token.colorSuccess
  20285. }
  20286. };
  20287. };
  20288. // ============================== Export ==============================
  20289. /* harmony default export */ var style_confirm = ((0,genStyleUtils.genSubStyleComponent)(['Modal', 'confirm'], token => {
  20290. const modalToken = (0,modal_style.prepareToken)(token);
  20291. return genModalConfirmStyle(modalToken);
  20292. }, modal_style.prepareComponentToken, {
  20293. // confirm is weak than modal since no conflict here
  20294. order: -1000
  20295. }));
  20296. ;// ./components/modal/ConfirmDialog.tsx
  20297. var ConfirmDialog_rest = undefined && undefined.__rest || function (s, e) {
  20298. var t = {};
  20299. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  20300. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  20301. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  20302. }
  20303. return t;
  20304. };
  20305. function ConfirmContent(props) {
  20306. const {
  20307. prefixCls,
  20308. icon,
  20309. okText,
  20310. cancelText,
  20311. confirmPrefixCls,
  20312. type,
  20313. okCancel,
  20314. footer,
  20315. // Legacy for static function usage
  20316. locale: staticLocale
  20317. } = props,
  20318. resetProps = ConfirmDialog_rest(props, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
  20319. if (true) {
  20320. const warning = (0,_util_warning.devUseWarning)('Modal');
  20321. true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
  20322. }
  20323. // Icon
  20324. let mergedIcon = icon;
  20325. // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon
  20326. if (!icon && icon !== null) {
  20327. switch (type) {
  20328. case 'info':
  20329. mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_InfoCircleFilled, null);
  20330. break;
  20331. case 'success':
  20332. mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null);
  20333. break;
  20334. case 'error':
  20335. mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null);
  20336. break;
  20337. default:
  20338. mergedIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null);
  20339. }
  20340. }
  20341. // 默认为 true,保持向下兼容
  20342. const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type === 'confirm';
  20343. const autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';
  20344. const [locale] = (0,useLocale["default"])('Modal');
  20345. const mergedLocale = staticLocale || locale;
  20346. // ================== Locale Text ==================
  20347. const okTextLocale = okText || (mergedOkCancel ? mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.okText : mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.justOkText);
  20348. const cancelTextLocale = cancelText || (mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.cancelText);
  20349. // ================= Context Value =================
  20350. const btnCtxValue = Object.assign({
  20351. autoFocusButton,
  20352. cancelTextLocale,
  20353. okTextLocale,
  20354. mergedOkCancel
  20355. }, resetProps);
  20356. const btnCtxValueMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => btnCtxValue, (0,toConsumableArray["default"])(Object.values(btnCtxValue)));
  20357. // ====================== Footer Origin Node ======================
  20358. const footerOriginNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_ConfirmCancelBtn, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_ConfirmOkBtn, null));
  20359. const hasTitle = props.title !== undefined && props.title !== null;
  20360. const bodyCls = `${confirmPrefixCls}-body`;
  20361. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20362. className: `${confirmPrefixCls}-body-wrapper`
  20363. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20364. className: classnames_default()(bodyCls, {
  20365. [`${bodyCls}-has-title`]: hasTitle
  20366. })
  20367. }, mergedIcon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20368. className: `${confirmPrefixCls}-paragraph`
  20369. }, hasTitle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  20370. className: `${confirmPrefixCls}-title`
  20371. }, props.title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20372. className: `${confirmPrefixCls}-content`
  20373. }, props.content))), footer === undefined || typeof footer === 'function' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ModalContextProvider, {
  20374. value: btnCtxValueMemo
  20375. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20376. className: `${confirmPrefixCls}-btns`
  20377. }, typeof footer === 'function' ? footer(footerOriginNode, {
  20378. OkBtn: components_ConfirmOkBtn,
  20379. CancelBtn: components_ConfirmCancelBtn
  20380. }) : footerOriginNode))) : footer, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(style_confirm, {
  20381. prefixCls: prefixCls
  20382. }));
  20383. }
  20384. const ConfirmDialog = props => {
  20385. const {
  20386. close,
  20387. zIndex,
  20388. maskStyle,
  20389. direction,
  20390. prefixCls,
  20391. wrapClassName,
  20392. rootPrefixCls,
  20393. bodyStyle,
  20394. closable = false,
  20395. onConfirm,
  20396. styles
  20397. } = props;
  20398. if (true) {
  20399. const warning = (0,_util_warning.devUseWarning)('Modal');
  20400. [['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(([deprecatedName, newName]) => {
  20401. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  20402. });
  20403. }
  20404. const confirmPrefixCls = `${prefixCls}-confirm`;
  20405. const width = props.width || 416;
  20406. const style = props.style || {};
  20407. const mask = props.mask === undefined ? true : props.mask;
  20408. // 默认为 false,保持旧版默认行为
  20409. const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
  20410. const classString = classnames_default()(confirmPrefixCls, `${confirmPrefixCls}-${props.type}`, {
  20411. [`${confirmPrefixCls}-rtl`]: direction === 'rtl'
  20412. }, props.className);
  20413. // ========================= zIndex =========================
  20414. const [, token] = (0,useToken["default"])();
  20415. const mergedZIndex = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  20416. if (zIndex !== undefined) {
  20417. return zIndex;
  20418. }
  20419. // Static always use max zIndex
  20420. return token.zIndexPopupBase + useZIndex.CONTAINER_MAX_OFFSET;
  20421. }, [zIndex, token]);
  20422. // ========================= Render =========================
  20423. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(modal_Modal, Object.assign({}, props, {
  20424. className: classString,
  20425. wrapClassName: classnames_default()({
  20426. [`${confirmPrefixCls}-centered`]: !!props.centered
  20427. }, wrapClassName),
  20428. onCancel: () => {
  20429. close === null || close === void 0 ? void 0 : close({
  20430. triggerCancel: true
  20431. });
  20432. onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
  20433. },
  20434. title: "",
  20435. footer: null,
  20436. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls || '', 'zoom', props.transitionName),
  20437. maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls || '', 'fade', props.maskTransitionName),
  20438. mask: mask,
  20439. maskClosable: maskClosable,
  20440. style: style,
  20441. styles: Object.assign({
  20442. body: bodyStyle,
  20443. mask: maskStyle
  20444. }, styles),
  20445. width: width,
  20446. zIndex: mergedZIndex,
  20447. closable: closable
  20448. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ConfirmContent, Object.assign({}, props, {
  20449. confirmPrefixCls: confirmPrefixCls
  20450. })));
  20451. };
  20452. const ConfirmDialogWrapper = props => {
  20453. const {
  20454. rootPrefixCls,
  20455. iconPrefixCls,
  20456. direction,
  20457. theme
  20458. } = props;
  20459. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
  20460. prefixCls: rootPrefixCls,
  20461. iconPrefixCls: iconPrefixCls,
  20462. direction: direction,
  20463. theme: theme
  20464. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ConfirmDialog, Object.assign({}, props)));
  20465. };
  20466. if (true) {
  20467. ConfirmDialog.displayName = 'ConfirmDialog';
  20468. ConfirmDialogWrapper.displayName = 'ConfirmDialogWrapper';
  20469. }
  20470. /* harmony default export */ var modal_ConfirmDialog = (ConfirmDialogWrapper);
  20471. ;// ./components/modal/destroyFns.ts
  20472. const destroyFns = [];
  20473. /* harmony default export */ var modal_destroyFns = (destroyFns);
  20474. ;// ./components/modal/confirm.tsx
  20475. let defaultRootPrefixCls = '';
  20476. function getRootPrefixCls() {
  20477. return defaultRootPrefixCls;
  20478. }
  20479. const confirm_ConfirmDialogWrapper = props => {
  20480. var _a, _b;
  20481. const {
  20482. prefixCls: customizePrefixCls,
  20483. getContainer,
  20484. direction
  20485. } = props;
  20486. const runtimeLocale = getConfirmLocale();
  20487. const config = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  20488. const rootPrefixCls = getRootPrefixCls() || config.getPrefixCls();
  20489. // because Modal.config set rootPrefixCls, which is different from other components
  20490. const prefixCls = customizePrefixCls || `${rootPrefixCls}-modal`;
  20491. let mergedGetContainer = getContainer;
  20492. if (mergedGetContainer === false) {
  20493. mergedGetContainer = undefined;
  20494. if (true) {
  20495. true ? (0,_util_warning["default"])(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') : 0;
  20496. }
  20497. }
  20498. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(modal_ConfirmDialog, Object.assign({}, props, {
  20499. rootPrefixCls: rootPrefixCls,
  20500. prefixCls: prefixCls,
  20501. iconPrefixCls: config.iconPrefixCls,
  20502. theme: config.theme,
  20503. direction: direction !== null && direction !== void 0 ? direction : config.direction,
  20504. locale: (_b = (_a = config.locale) === null || _a === void 0 ? void 0 : _a.Modal) !== null && _b !== void 0 ? _b : runtimeLocale,
  20505. getContainer: mergedGetContainer
  20506. }));
  20507. };
  20508. function confirm_confirm(config) {
  20509. const global = globalConfig();
  20510. if ( true && !global.holderRender) {
  20511. warnContext('Modal');
  20512. }
  20513. const container = document.createDocumentFragment();
  20514. let currentConfig = Object.assign(Object.assign({}, config), {
  20515. close,
  20516. open: true
  20517. });
  20518. let timeoutId;
  20519. let reactUnmount;
  20520. function destroy(...args) {
  20521. var _a;
  20522. const triggerCancel = args.some(param => param === null || param === void 0 ? void 0 : param.triggerCancel);
  20523. if (triggerCancel) {
  20524. var _a2;
  20525. (_a = config.onCancel) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [config, () => {}].concat((0,toConsumableArray["default"])(args.slice(1))));
  20526. }
  20527. for (let i = 0; i < modal_destroyFns.length; i++) {
  20528. const fn = modal_destroyFns[i];
  20529. if (fn === close) {
  20530. modal_destroyFns.splice(i, 1);
  20531. break;
  20532. }
  20533. }
  20534. reactUnmount();
  20535. }
  20536. function render(props) {
  20537. clearTimeout(timeoutId);
  20538. /**
  20539. * https://github.com/ant-design/ant-design/issues/23623
  20540. *
  20541. * Sync render blocks React event. Let's make this async.
  20542. */
  20543. timeoutId = setTimeout(() => {
  20544. const rootPrefixCls = global.getPrefixCls(undefined, getRootPrefixCls());
  20545. const iconPrefixCls = global.getIconPrefixCls();
  20546. const theme = global.getTheme();
  20547. const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(confirm_ConfirmDialogWrapper, Object.assign({}, props));
  20548. const reactRender = unstableSetRender();
  20549. reactUnmount = reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(config_provider, {
  20550. prefixCls: rootPrefixCls,
  20551. iconPrefixCls: iconPrefixCls,
  20552. theme: theme
  20553. }, global.holderRender ? global.holderRender(dom) : dom), container);
  20554. });
  20555. }
  20556. function close(...args) {
  20557. currentConfig = Object.assign(Object.assign({}, currentConfig), {
  20558. open: false,
  20559. afterClose: () => {
  20560. if (typeof config.afterClose === 'function') {
  20561. config.afterClose();
  20562. }
  20563. // @ts-ignore
  20564. destroy.apply(this, args);
  20565. }
  20566. });
  20567. // Legacy support
  20568. if (currentConfig.visible) {
  20569. delete currentConfig.visible;
  20570. }
  20571. render(currentConfig);
  20572. }
  20573. function update(configUpdate) {
  20574. if (typeof configUpdate === 'function') {
  20575. currentConfig = configUpdate(currentConfig);
  20576. } else {
  20577. currentConfig = Object.assign(Object.assign({}, currentConfig), configUpdate);
  20578. }
  20579. render(currentConfig);
  20580. }
  20581. render(currentConfig);
  20582. modal_destroyFns.push(close);
  20583. return {
  20584. destroy: close,
  20585. update
  20586. };
  20587. }
  20588. function withWarn(props) {
  20589. return Object.assign(Object.assign({}, props), {
  20590. type: 'warning'
  20591. });
  20592. }
  20593. function withInfo(props) {
  20594. return Object.assign(Object.assign({}, props), {
  20595. type: 'info'
  20596. });
  20597. }
  20598. function withSuccess(props) {
  20599. return Object.assign(Object.assign({}, props), {
  20600. type: 'success'
  20601. });
  20602. }
  20603. function withError(props) {
  20604. return Object.assign(Object.assign({}, props), {
  20605. type: 'error'
  20606. });
  20607. }
  20608. function withConfirm(props) {
  20609. return Object.assign(Object.assign({}, props), {
  20610. type: 'confirm'
  20611. });
  20612. }
  20613. function modalGlobalConfig({
  20614. rootPrefixCls
  20615. }) {
  20616. true ? (0,_util_warning["default"])(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') : 0;
  20617. defaultRootPrefixCls = rootPrefixCls;
  20618. }
  20619. ;// ./components/modal/useModal/HookModal.tsx
  20620. var HookModal_rest = undefined && undefined.__rest || function (s, e) {
  20621. var t = {};
  20622. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  20623. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  20624. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  20625. }
  20626. return t;
  20627. };
  20628. const HookModal = (_a, ref) => {
  20629. var _b;
  20630. var {
  20631. afterClose: hookAfterClose,
  20632. config
  20633. } = _a,
  20634. restProps = HookModal_rest(_a, ["afterClose", "config"]);
  20635. const [open, setOpen] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
  20636. const [innerConfig, setInnerConfig] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(config);
  20637. const {
  20638. direction,
  20639. getPrefixCls
  20640. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  20641. const prefixCls = getPrefixCls('modal');
  20642. const rootPrefixCls = getPrefixCls();
  20643. const afterClose = () => {
  20644. var _a;
  20645. hookAfterClose();
  20646. (_a = innerConfig.afterClose) === null || _a === void 0 ? void 0 : _a.call(innerConfig);
  20647. };
  20648. const close = (...args) => {
  20649. var _a;
  20650. setOpen(false);
  20651. const triggerCancel = args.some(param => param === null || param === void 0 ? void 0 : param.triggerCancel);
  20652. if (triggerCancel) {
  20653. var _a2;
  20654. (_a = innerConfig.onCancel) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [innerConfig, () => {}].concat((0,toConsumableArray["default"])(args.slice(1))));
  20655. }
  20656. };
  20657. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  20658. destroy: close,
  20659. update: newConfig => {
  20660. setInnerConfig(originConfig => {
  20661. const nextConfig = typeof newConfig === 'function' ? newConfig(originConfig) : newConfig;
  20662. return Object.assign(Object.assign({}, originConfig), nextConfig);
  20663. });
  20664. }
  20665. }));
  20666. const mergedOkCancel = (_b = innerConfig.okCancel) !== null && _b !== void 0 ? _b : innerConfig.type === 'confirm';
  20667. const [contextLocale] = (0,useLocale["default"])('Modal', en_US["default"].Modal);
  20668. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(modal_ConfirmDialog, Object.assign({
  20669. prefixCls: prefixCls,
  20670. rootPrefixCls: rootPrefixCls
  20671. }, innerConfig, {
  20672. close: close,
  20673. open: open,
  20674. afterClose: afterClose,
  20675. okText: innerConfig.okText || (mergedOkCancel ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.justOkText),
  20676. direction: innerConfig.direction || direction,
  20677. cancelText: innerConfig.cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText)
  20678. }, restProps));
  20679. };
  20680. /* harmony default export */ var useModal_HookModal = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(HookModal));
  20681. ;// ./components/modal/useModal/index.tsx
  20682. let useModal_uuid = 0;
  20683. const ElementsHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_props, ref) => {
  20684. const [elements, patchElement] = usePatchElement();
  20685. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  20686. patchElement
  20687. }), []);
  20688. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, elements);
  20689. }));
  20690. function useModal() {
  20691. const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  20692. // ========================== Effect ==========================
  20693. const [actionQueue, setActionQueue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  20694. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  20695. if (actionQueue.length) {
  20696. const cloneQueue = (0,toConsumableArray["default"])(actionQueue);
  20697. cloneQueue.forEach(action => {
  20698. action();
  20699. });
  20700. setActionQueue([]);
  20701. }
  20702. }, [actionQueue]);
  20703. // =========================== Hook ===========================
  20704. const getConfirmFunc = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(withFunc => function hookConfirm(config) {
  20705. var _a;
  20706. useModal_uuid += 1;
  20707. const modalRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createRef();
  20708. // Proxy to promise with `onClose`
  20709. let resolvePromise;
  20710. const promise = new Promise(resolve => {
  20711. resolvePromise = resolve;
  20712. });
  20713. let silent = false;
  20714. let closeFunc;
  20715. const modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useModal_HookModal, {
  20716. key: `modal-${useModal_uuid}`,
  20717. config: withFunc(config),
  20718. ref: modalRef,
  20719. afterClose: () => {
  20720. closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();
  20721. },
  20722. isSilent: () => silent,
  20723. onConfirm: confirmed => {
  20724. resolvePromise(confirmed);
  20725. }
  20726. });
  20727. closeFunc = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.patchElement(modal);
  20728. if (closeFunc) {
  20729. modal_destroyFns.push(closeFunc);
  20730. }
  20731. const instance = {
  20732. destroy: () => {
  20733. function destroyAction() {
  20734. var _a;
  20735. (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
  20736. }
  20737. if (modalRef.current) {
  20738. destroyAction();
  20739. } else {
  20740. setActionQueue(prev => [].concat((0,toConsumableArray["default"])(prev), [destroyAction]));
  20741. }
  20742. },
  20743. update: newConfig => {
  20744. function updateAction() {
  20745. var _a;
  20746. (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.update(newConfig);
  20747. }
  20748. if (modalRef.current) {
  20749. updateAction();
  20750. } else {
  20751. setActionQueue(prev => [].concat((0,toConsumableArray["default"])(prev), [updateAction]));
  20752. }
  20753. },
  20754. then: resolve => {
  20755. silent = true;
  20756. return promise.then(resolve);
  20757. }
  20758. };
  20759. return instance;
  20760. }, []);
  20761. const fns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  20762. info: getConfirmFunc(withInfo),
  20763. success: getConfirmFunc(withSuccess),
  20764. error: getConfirmFunc(withError),
  20765. warning: getConfirmFunc(withWarn),
  20766. confirm: getConfirmFunc(withConfirm)
  20767. }), []);
  20768. return [fns, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ElementsHolder, {
  20769. key: "modal-holder",
  20770. ref: holderRef
  20771. })];
  20772. }
  20773. /* harmony default export */ var modal_useModal = (useModal);
  20774. // EXTERNAL MODULE: ./components/notification/style/index.ts + 3 modules
  20775. var notification_style = __webpack_require__("./components/notification/style/index.ts");
  20776. ;// ./components/notification/style/pure-panel.ts
  20777. /* harmony default export */ var pure_panel = ((0,genStyleUtils.genSubStyleComponent)(['Notification', 'PurePanel'], token => {
  20778. const noticeCls = `${token.componentCls}-notice`;
  20779. const notificationToken = (0,notification_style.prepareNotificationToken)(token);
  20780. return {
  20781. [`${noticeCls}-pure-panel`]: Object.assign(Object.assign({}, (0,notification_style.genNoticeStyle)(notificationToken)), {
  20782. width: notificationToken.width,
  20783. maxWidth: `calc(100vw - ${(0,cssinjs.unit)(token.calc(notificationToken.notificationMarginEdge).mul(2).equal())})`,
  20784. margin: 0
  20785. })
  20786. };
  20787. }, notification_style.prepareComponentToken));
  20788. ;// ./components/notification/PurePanel.tsx
  20789. var notification_PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  20790. var t = {};
  20791. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  20792. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  20793. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  20794. }
  20795. return t;
  20796. };
  20797. const PurePanel_TypeIcon = {
  20798. info: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_InfoCircleFilled, null),
  20799. success: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null),
  20800. error: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null),
  20801. warning: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
  20802. loading: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null)
  20803. };
  20804. function getCloseIcon(prefixCls, closeIcon) {
  20805. if (closeIcon === null || closeIcon === false) {
  20806. return null;
  20807. }
  20808. return closeIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
  20809. className: `${prefixCls}-close-icon`
  20810. });
  20811. }
  20812. const typeToIcon = {
  20813. success: icons_CheckCircleFilled,
  20814. info: icons_InfoCircleFilled,
  20815. error: icons_CloseCircleFilled,
  20816. warning: icons_ExclamationCircleFilled
  20817. };
  20818. const PurePanel_PureContent = props => {
  20819. const {
  20820. prefixCls,
  20821. icon,
  20822. type,
  20823. message,
  20824. description,
  20825. actions,
  20826. role = 'alert'
  20827. } = props;
  20828. let iconNode = null;
  20829. if (icon) {
  20830. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  20831. className: `${prefixCls}-icon`
  20832. }, icon);
  20833. } else if (type) {
  20834. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typeToIcon[type] || null, {
  20835. className: classnames_default()(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)
  20836. });
  20837. }
  20838. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20839. className: classnames_default()({
  20840. [`${prefixCls}-with-icon`]: iconNode
  20841. }),
  20842. role: role
  20843. }, iconNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20844. className: `${prefixCls}-message`
  20845. }, message), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20846. className: `${prefixCls}-description`
  20847. }, description), actions && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20848. className: `${prefixCls}-actions`
  20849. }, actions));
  20850. };
  20851. /** @private Internal Component. Do not use in your production. */
  20852. const PurePanel_PurePanel = props => {
  20853. const {
  20854. prefixCls: staticPrefixCls,
  20855. className,
  20856. icon,
  20857. type,
  20858. message,
  20859. description,
  20860. btn,
  20861. actions,
  20862. closable = true,
  20863. closeIcon,
  20864. className: notificationClassName
  20865. } = props,
  20866. restProps = notification_PurePanel_rest(props, ["prefixCls", "className", "icon", "type", "message", "description", "btn", "actions", "closable", "closeIcon", "className"]);
  20867. const {
  20868. getPrefixCls
  20869. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  20870. const mergedActions = actions !== null && actions !== void 0 ? actions : btn;
  20871. if (true) {
  20872. const warning = (0,_util_warning.devUseWarning)('Notification');
  20873. warning.deprecated(!btn, 'btn', 'actions');
  20874. }
  20875. const prefixCls = staticPrefixCls || getPrefixCls('notification');
  20876. const noticePrefixCls = `${prefixCls}-notice`;
  20877. const rootCls = hooks_useCSSVarCls(prefixCls);
  20878. const [wrapCSSVar, hashId, cssVarCls] = (0,notification_style["default"])(prefixCls, rootCls);
  20879. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  20880. className: classnames_default()(`${noticePrefixCls}-pure-panel`, hashId, className, cssVarCls, rootCls)
  20881. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(pure_panel, {
  20882. prefixCls: prefixCls
  20883. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Notice, Object.assign({}, restProps, {
  20884. prefixCls: prefixCls,
  20885. eventKey: "pure",
  20886. duration: null,
  20887. closable: closable,
  20888. className: classnames_default()({
  20889. notificationClassName
  20890. }),
  20891. closeIcon: getCloseIcon(prefixCls, closeIcon),
  20892. content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PurePanel_PureContent, {
  20893. prefixCls: noticePrefixCls,
  20894. icon: icon,
  20895. type: type,
  20896. message: message,
  20897. description: description,
  20898. actions: mergedActions
  20899. })
  20900. }))));
  20901. };
  20902. /* harmony default export */ var notification_PurePanel = (PurePanel_PurePanel);
  20903. ;// ./components/notification/util.ts
  20904. function getPlacementStyle(placement, top, bottom) {
  20905. let style;
  20906. switch (placement) {
  20907. case 'top':
  20908. style = {
  20909. left: '50%',
  20910. transform: 'translateX(-50%)',
  20911. right: 'auto',
  20912. top,
  20913. bottom: 'auto'
  20914. };
  20915. break;
  20916. case 'topLeft':
  20917. style = {
  20918. left: 0,
  20919. top,
  20920. bottom: 'auto'
  20921. };
  20922. break;
  20923. case 'topRight':
  20924. style = {
  20925. right: 0,
  20926. top,
  20927. bottom: 'auto'
  20928. };
  20929. break;
  20930. case 'bottom':
  20931. style = {
  20932. left: '50%',
  20933. transform: 'translateX(-50%)',
  20934. right: 'auto',
  20935. top: 'auto',
  20936. bottom
  20937. };
  20938. break;
  20939. case 'bottomLeft':
  20940. style = {
  20941. left: 0,
  20942. top: 'auto',
  20943. bottom
  20944. };
  20945. break;
  20946. default:
  20947. style = {
  20948. right: 0,
  20949. top: 'auto',
  20950. bottom
  20951. };
  20952. break;
  20953. }
  20954. return style;
  20955. }
  20956. function util_getMotion(prefixCls) {
  20957. return {
  20958. motionName: `${prefixCls}-fade`
  20959. };
  20960. }
  20961. function getCloseIconConfig(closeIcon, notificationConfig, notification) {
  20962. if (typeof closeIcon !== 'undefined') {
  20963. return closeIcon;
  20964. }
  20965. if (typeof (notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.closeIcon) !== 'undefined') {
  20966. return notificationConfig.closeIcon;
  20967. }
  20968. return notification === null || notification === void 0 ? void 0 : notification.closeIcon;
  20969. }
  20970. ;// ./components/notification/useNotification.tsx
  20971. var useNotification_rest = undefined && undefined.__rest || function (s, e) {
  20972. var t = {};
  20973. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  20974. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  20975. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  20976. }
  20977. return t;
  20978. };
  20979. const useNotification_DEFAULT_OFFSET = 24;
  20980. const useNotification_DEFAULT_DURATION = 4.5;
  20981. const DEFAULT_PLACEMENT = 'topRight';
  20982. const useNotification_Wrapper = ({
  20983. children,
  20984. prefixCls
  20985. }) => {
  20986. const rootCls = hooks_useCSSVarCls(prefixCls);
  20987. const [wrapCSSVar, hashId, cssVarCls] = (0,notification_style["default"])(prefixCls, rootCls);
  20988. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_NotificationProvider, {
  20989. classNames: {
  20990. list: classnames_default()(hashId, cssVarCls, rootCls)
  20991. }
  20992. }, children));
  20993. };
  20994. const useNotification_renderNotifications = (node, {
  20995. prefixCls,
  20996. key
  20997. }) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(useNotification_Wrapper, {
  20998. prefixCls: prefixCls,
  20999. key: key
  21000. }, node));
  21001. const useNotification_Holder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  21002. const {
  21003. top,
  21004. bottom,
  21005. prefixCls: staticPrefixCls,
  21006. getContainer: staticGetContainer,
  21007. maxCount,
  21008. rtl,
  21009. onAllRemoved,
  21010. stack,
  21011. duration,
  21012. pauseOnHover = true,
  21013. showProgress
  21014. } = props;
  21015. const {
  21016. getPrefixCls,
  21017. getPopupContainer,
  21018. notification,
  21019. direction
  21020. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  21021. const [, token] = (0,useToken["default"])();
  21022. const prefixCls = staticPrefixCls || getPrefixCls('notification');
  21023. // =============================== Style ===============================
  21024. const getStyle = placement => getPlacementStyle(placement, top !== null && top !== void 0 ? top : useNotification_DEFAULT_OFFSET, bottom !== null && bottom !== void 0 ? bottom : useNotification_DEFAULT_OFFSET);
  21025. const getClassName = () => classnames_default()({
  21026. [`${prefixCls}-rtl`]: rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl'
  21027. });
  21028. // ============================== Motion ===============================
  21029. const getNotificationMotion = () => util_getMotion(prefixCls);
  21030. // ============================== Origin ===============================
  21031. const [api, holder] = useNotification({
  21032. prefixCls,
  21033. style: getStyle,
  21034. className: getClassName,
  21035. motion: getNotificationMotion,
  21036. closable: true,
  21037. closeIcon: getCloseIcon(prefixCls),
  21038. duration: duration !== null && duration !== void 0 ? duration : useNotification_DEFAULT_DURATION,
  21039. getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,
  21040. maxCount,
  21041. pauseOnHover,
  21042. showProgress,
  21043. onAllRemoved,
  21044. renderNotifications: useNotification_renderNotifications,
  21045. stack: stack === false ? false : {
  21046. threshold: typeof stack === 'object' ? stack === null || stack === void 0 ? void 0 : stack.threshold : undefined,
  21047. offset: 8,
  21048. gap: token.margin
  21049. }
  21050. });
  21051. // ================================ Ref ================================
  21052. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {
  21053. prefixCls,
  21054. notification
  21055. }));
  21056. return holder;
  21057. });
  21058. // ==============================================================================
  21059. // == Hook ==
  21060. // ==============================================================================
  21061. function useInternalNotification(notificationConfig) {
  21062. const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  21063. const warning = (0,_util_warning.devUseWarning)('Notification');
  21064. // ================================ API ================================
  21065. const wrapAPI = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  21066. // Wrap with notification content
  21067. // >>> Open
  21068. const open = config => {
  21069. var _a;
  21070. if (!holderRef.current) {
  21071. true ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : 0;
  21072. return;
  21073. }
  21074. const {
  21075. open: originOpen,
  21076. prefixCls,
  21077. notification
  21078. } = holderRef.current;
  21079. const noticePrefixCls = `${prefixCls}-notice`;
  21080. const {
  21081. message,
  21082. description,
  21083. icon,
  21084. type,
  21085. btn,
  21086. actions,
  21087. className,
  21088. style,
  21089. role = 'alert',
  21090. closeIcon,
  21091. closable
  21092. } = config,
  21093. restConfig = useNotification_rest(config, ["message", "description", "icon", "type", "btn", "actions", "className", "style", "role", "closeIcon", "closable"]);
  21094. if (true) {
  21095. warning.deprecated(!btn, 'btn', 'actions');
  21096. }
  21097. const mergedActions = actions !== null && actions !== void 0 ? actions : btn;
  21098. const realCloseIcon = getCloseIcon(noticePrefixCls, getCloseIconConfig(closeIcon, notificationConfig, notification));
  21099. return originOpen(Object.assign(Object.assign({
  21100. // use placement from props instead of hard-coding "topRight"
  21101. placement: (_a = notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.placement) !== null && _a !== void 0 ? _a : DEFAULT_PLACEMENT
  21102. }, restConfig), {
  21103. content: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PurePanel_PureContent, {
  21104. prefixCls: noticePrefixCls,
  21105. icon: icon,
  21106. type: type,
  21107. message: message,
  21108. description: description,
  21109. actions: mergedActions,
  21110. role: role
  21111. })),
  21112. className: classnames_default()(type && `${noticePrefixCls}-${type}`, className, notification === null || notification === void 0 ? void 0 : notification.className),
  21113. style: Object.assign(Object.assign({}, notification === null || notification === void 0 ? void 0 : notification.style), style),
  21114. closeIcon: realCloseIcon,
  21115. closable: closable !== null && closable !== void 0 ? closable : !!realCloseIcon
  21116. }));
  21117. };
  21118. // >>> destroy
  21119. const destroy = key => {
  21120. var _a, _b;
  21121. if (key !== undefined) {
  21122. (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);
  21123. } else {
  21124. (_b = holderRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
  21125. }
  21126. };
  21127. const clone = {
  21128. open,
  21129. destroy
  21130. };
  21131. const keys = ['success', 'info', 'warning', 'error'];
  21132. keys.forEach(type => {
  21133. clone[type] = config => open(Object.assign(Object.assign({}, config), {
  21134. type
  21135. }));
  21136. });
  21137. return clone;
  21138. }, []);
  21139. // ============================== Return ===============================
  21140. return [wrapAPI, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(useNotification_Holder, Object.assign({
  21141. key: "notification-holder"
  21142. }, notificationConfig, {
  21143. ref: holderRef
  21144. }))];
  21145. }
  21146. function useNotification_useNotification(notificationConfig) {
  21147. return useInternalNotification(notificationConfig);
  21148. }
  21149. ;// ./components/app/context.ts
  21150. const AppConfigContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  21151. const AppContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
  21152. message: {},
  21153. notification: {},
  21154. modal: {}
  21155. });
  21156. /* harmony default export */ var app_context = (AppContext);
  21157. // EXTERNAL MODULE: ./components/app/style/index.ts
  21158. var app_style = __webpack_require__("./components/app/style/index.ts");
  21159. ;// ./components/app/App.tsx
  21160. const App = props => {
  21161. const {
  21162. prefixCls: customizePrefixCls,
  21163. children,
  21164. className,
  21165. rootClassName,
  21166. message,
  21167. notification,
  21168. style,
  21169. component = 'div'
  21170. } = props;
  21171. const {
  21172. direction,
  21173. getPrefixCls
  21174. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  21175. const prefixCls = getPrefixCls('app', customizePrefixCls);
  21176. const [wrapCSSVar, hashId, cssVarCls] = (0,app_style["default"])(prefixCls);
  21177. const customClassName = classnames_default()(hashId, prefixCls, className, rootClassName, cssVarCls, {
  21178. [`${prefixCls}-rtl`]: direction === 'rtl'
  21179. });
  21180. const appConfig = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AppConfigContext);
  21181. const mergedAppConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
  21182. message: Object.assign(Object.assign({}, appConfig.message), message),
  21183. notification: Object.assign(Object.assign({}, appConfig.notification), notification)
  21184. }), [message, notification, appConfig.message, appConfig.notification]);
  21185. const [messageApi, messageContextHolder] = useMessage(mergedAppConfig.message);
  21186. const [notificationApi, notificationContextHolder] = useNotification_useNotification(mergedAppConfig.notification);
  21187. const [ModalApi, ModalContextHolder] = modal_useModal();
  21188. const memoizedContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
  21189. message: messageApi,
  21190. notification: notificationApi,
  21191. modal: ModalApi
  21192. }), [messageApi, notificationApi, ModalApi]);
  21193. // https://github.com/ant-design/ant-design/issues/48802#issuecomment-2097813526
  21194. (0,_util_warning.devUseWarning)('App')(!(cssVarCls && component === false), 'usage', 'When using cssVar, ensure `component` is assigned a valid React component string.');
  21195. // ============================ Render ============================
  21196. const Component = component === false ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment : component;
  21197. const rootProps = {
  21198. className: customClassName,
  21199. style
  21200. };
  21201. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(app_context.Provider, {
  21202. value: memoizedContextValue
  21203. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AppConfigContext.Provider, {
  21204. value: mergedAppConfig
  21205. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, Object.assign({}, component === false ? undefined : rootProps), ModalContextHolder, messageContextHolder, notificationContextHolder, children))));
  21206. };
  21207. if (true) {
  21208. App.displayName = 'App';
  21209. }
  21210. /* harmony default export */ var app_App = (App);
  21211. ;// ./components/app/useApp.ts
  21212. const useApp = () => external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(app_context);
  21213. /* harmony default export */ var app_useApp = (useApp);
  21214. ;// ./components/app/index.tsx
  21215. const components_app_App = app_App;
  21216. components_app_App.useApp = app_useApp;
  21217. /* harmony default export */ var app = (components_app_App);
  21218. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
  21219. var useMergedState = __webpack_require__("./node_modules/rc-util/es/hooks/useMergedState.js");
  21220. ;// ./components/_util/PurePanel.tsx
  21221. function withPureRenderTheme(Component) {
  21222. return props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
  21223. theme: {
  21224. token: {
  21225. motion: false,
  21226. zIndexPopupBase: 0
  21227. }
  21228. }
  21229. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({}, props))));
  21230. }
  21231. /* istanbul ignore next */
  21232. const genPurePanel = (Component, alignPropName, postProps, defaultPrefixCls, getDropdownCls) => {
  21233. const PurePanel = props => {
  21234. const {
  21235. prefixCls: customizePrefixCls,
  21236. style
  21237. } = props;
  21238. const holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  21239. const [popupHeight, setPopupHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  21240. const [popupWidth, setPopupWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  21241. const [open, setOpen] = (0,useMergedState["default"])(false, {
  21242. value: props.open
  21243. });
  21244. const {
  21245. getPrefixCls
  21246. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  21247. const prefixCls = getPrefixCls(defaultPrefixCls || 'select', customizePrefixCls);
  21248. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  21249. // We do not care about ssr
  21250. setOpen(true);
  21251. if (typeof ResizeObserver !== 'undefined') {
  21252. const resizeObserver = new ResizeObserver(entries => {
  21253. const element = entries[0].target;
  21254. setPopupHeight(element.offsetHeight + 8);
  21255. setPopupWidth(element.offsetWidth);
  21256. });
  21257. const interval = setInterval(() => {
  21258. var _a;
  21259. const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls)}` : `.${prefixCls}-dropdown`;
  21260. const popup = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(dropdownCls);
  21261. if (popup) {
  21262. clearInterval(interval);
  21263. resizeObserver.observe(popup);
  21264. }
  21265. }, 10);
  21266. return () => {
  21267. clearInterval(interval);
  21268. resizeObserver.disconnect();
  21269. };
  21270. }
  21271. }, []);
  21272. let mergedProps = Object.assign(Object.assign({}, props), {
  21273. style: Object.assign(Object.assign({}, style), {
  21274. margin: 0
  21275. }),
  21276. open,
  21277. visible: open,
  21278. getPopupContainer: () => holderRef.current
  21279. });
  21280. if (postProps) {
  21281. mergedProps = postProps(mergedProps);
  21282. }
  21283. if (alignPropName) {
  21284. Object.assign(mergedProps, {
  21285. [alignPropName]: {
  21286. overflow: {
  21287. adjustX: false,
  21288. adjustY: false
  21289. }
  21290. }
  21291. });
  21292. }
  21293. const mergedStyle = {
  21294. paddingBottom: popupHeight,
  21295. position: 'relative',
  21296. minWidth: popupWidth
  21297. };
  21298. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  21299. ref: holderRef,
  21300. style: mergedStyle
  21301. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({}, mergedProps)));
  21302. };
  21303. return withPureRenderTheme(PurePanel);
  21304. };
  21305. /* harmony default export */ var _util_PurePanel = (genPurePanel);
  21306. ;// ./node_modules/rc-util/es/isMobile.js
  21307. /* harmony default export */ var isMobile = (function () {
  21308. if (typeof navigator === 'undefined' || typeof window === 'undefined') {
  21309. return false;
  21310. }
  21311. var agent = navigator.userAgent || navigator.vendor || window.opera;
  21312. return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4));
  21313. });
  21314. ;// ./node_modules/rc-select/es/TransBtn.js
  21315. var TransBtn = function TransBtn(props) {
  21316. var className = props.className,
  21317. customizeIcon = props.customizeIcon,
  21318. customizeIconProps = props.customizeIconProps,
  21319. children = props.children,
  21320. _onMouseDown = props.onMouseDown,
  21321. onClick = props.onClick;
  21322. var icon = typeof customizeIcon === 'function' ? customizeIcon(customizeIconProps) : customizeIcon;
  21323. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  21324. className: className,
  21325. onMouseDown: function onMouseDown(event) {
  21326. event.preventDefault();
  21327. _onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(event);
  21328. },
  21329. style: {
  21330. userSelect: 'none',
  21331. WebkitUserSelect: 'none'
  21332. },
  21333. unselectable: "on",
  21334. onClick: onClick,
  21335. "aria-hidden": true
  21336. }, icon !== undefined ? icon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  21337. className: classnames_default()(className.split(/\s+/).map(function (cls) {
  21338. return "".concat(cls, "-icon");
  21339. }))
  21340. }, children));
  21341. };
  21342. /* harmony default export */ var es_TransBtn = (TransBtn);
  21343. ;// ./node_modules/rc-select/es/hooks/useAllowClear.js
  21344. var useAllowClear = function useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon) {
  21345. var disabled = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
  21346. var mergedSearchValue = arguments.length > 6 ? arguments[6] : undefined;
  21347. var mode = arguments.length > 7 ? arguments[7] : undefined;
  21348. var mergedClearIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  21349. if ((0,esm_typeof["default"])(allowClear) === 'object') {
  21350. return allowClear.clearIcon;
  21351. }
  21352. if (clearIcon) {
  21353. return clearIcon;
  21354. }
  21355. }, [allowClear, clearIcon]);
  21356. var mergedAllowClear = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  21357. if (!disabled && !!allowClear && (displayValues.length || mergedSearchValue) && !(mode === 'combobox' && mergedSearchValue === '')) {
  21358. return true;
  21359. }
  21360. return false;
  21361. }, [allowClear, disabled, displayValues.length, mergedSearchValue, mode]);
  21362. return {
  21363. allowClear: mergedAllowClear,
  21364. clearIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_TransBtn, {
  21365. className: "".concat(prefixCls, "-clear"),
  21366. onMouseDown: onClearMouseDown,
  21367. customizeIcon: mergedClearIcon
  21368. }, "\xD7")
  21369. };
  21370. };
  21371. ;// ./node_modules/rc-select/es/hooks/useBaseProps.js
  21372. /**
  21373. * BaseSelect provide some parsed data into context.
  21374. * You can use this hooks to get them.
  21375. */
  21376. var BaseSelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  21377. function useBaseProps() {
  21378. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(BaseSelectContext);
  21379. }
  21380. ;// ./node_modules/rc-select/es/hooks/useDelayReset.js
  21381. /**
  21382. * Similar with `useLock`, but this hook will always execute last value.
  21383. * When set to `true`, it will keep `true` for a short time even if `false` is set.
  21384. */
  21385. function useDelayReset() {
  21386. var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
  21387. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  21388. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  21389. bool = _React$useState2[0],
  21390. setBool = _React$useState2[1];
  21391. var delayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  21392. var cancelLatest = function cancelLatest() {
  21393. window.clearTimeout(delayRef.current);
  21394. };
  21395. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  21396. return cancelLatest;
  21397. }, []);
  21398. var delaySetBool = function delaySetBool(value, callback) {
  21399. cancelLatest();
  21400. delayRef.current = window.setTimeout(function () {
  21401. setBool(value);
  21402. if (callback) {
  21403. callback();
  21404. }
  21405. }, timeout);
  21406. };
  21407. return [bool, delaySetBool, cancelLatest];
  21408. }
  21409. ;// ./node_modules/rc-select/es/hooks/useLock.js
  21410. /**
  21411. * Locker return cached mark.
  21412. * If set to `true`, will return `true` in a short time even if set `false`.
  21413. * If set to `false` and then set to `true`, will change to `true`.
  21414. * And after time duration, it will back to `null` automatically.
  21415. */
  21416. function useLock() {
  21417. var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 250;
  21418. var lockRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  21419. var timeoutRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  21420. // Clean up
  21421. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  21422. return function () {
  21423. window.clearTimeout(timeoutRef.current);
  21424. };
  21425. }, []);
  21426. function doLock(locked) {
  21427. if (locked || lockRef.current === null) {
  21428. lockRef.current = locked;
  21429. }
  21430. window.clearTimeout(timeoutRef.current);
  21431. timeoutRef.current = window.setTimeout(function () {
  21432. lockRef.current = null;
  21433. }, duration);
  21434. }
  21435. return [function () {
  21436. return lockRef.current;
  21437. }, doLock];
  21438. }
  21439. ;// ./node_modules/rc-select/es/hooks/useSelectTriggerControl.js
  21440. function useSelectTriggerControl(elements, open, triggerOpen, customizedTrigger) {
  21441. var propsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  21442. propsRef.current = {
  21443. open: open,
  21444. triggerOpen: triggerOpen,
  21445. customizedTrigger: customizedTrigger
  21446. };
  21447. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  21448. function onGlobalMouseDown(event) {
  21449. var _propsRef$current;
  21450. // If trigger is customized, Trigger will take control of popupVisible
  21451. if ((_propsRef$current = propsRef.current) !== null && _propsRef$current !== void 0 && _propsRef$current.customizedTrigger) {
  21452. return;
  21453. }
  21454. var target = event.target;
  21455. if (target.shadowRoot && event.composed) {
  21456. target = event.composedPath()[0] || target;
  21457. }
  21458. if (propsRef.current.open && elements().filter(function (element) {
  21459. return element;
  21460. }).every(function (element) {
  21461. return !element.contains(target) && element !== target;
  21462. })) {
  21463. // Should trigger close
  21464. propsRef.current.triggerOpen(false);
  21465. }
  21466. }
  21467. window.addEventListener('mousedown', onGlobalMouseDown);
  21468. return function () {
  21469. return window.removeEventListener('mousedown', onGlobalMouseDown);
  21470. };
  21471. }, []);
  21472. }
  21473. ;// ./node_modules/rc-select/es/utils/keyUtil.js
  21474. /** keyCode Judgment function */
  21475. function isValidateOpenKey(currentKeyCode) {
  21476. return (
  21477. // Undefined for Edge bug:
  21478. // https://github.com/ant-design/ant-design/issues/51292
  21479. currentKeyCode &&
  21480. // Other keys
  21481. ![
  21482. // System function button
  21483. KeyCode["default"].ESC, KeyCode["default"].SHIFT, KeyCode["default"].BACKSPACE, KeyCode["default"].TAB, KeyCode["default"].WIN_KEY, KeyCode["default"].ALT, KeyCode["default"].META, KeyCode["default"].WIN_KEY_RIGHT, KeyCode["default"].CTRL, KeyCode["default"].SEMICOLON, KeyCode["default"].EQUALS, KeyCode["default"].CAPS_LOCK, KeyCode["default"].CONTEXT_MENU,
  21484. // F1-F12
  21485. KeyCode["default"].F1, KeyCode["default"].F2, KeyCode["default"].F3, KeyCode["default"].F4, KeyCode["default"].F5, KeyCode["default"].F6, KeyCode["default"].F7, KeyCode["default"].F8, KeyCode["default"].F9, KeyCode["default"].F10, KeyCode["default"].F11, KeyCode["default"].F12].includes(currentKeyCode)
  21486. );
  21487. }
  21488. ;// ./node_modules/rc-overflow/es/Item.js
  21489. var Item_excluded = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"];
  21490. // Use shared variable to save bundle size
  21491. var UNDEFINED = undefined;
  21492. function InternalItem(props, ref) {
  21493. var prefixCls = props.prefixCls,
  21494. invalidate = props.invalidate,
  21495. item = props.item,
  21496. renderItem = props.renderItem,
  21497. responsive = props.responsive,
  21498. responsiveDisabled = props.responsiveDisabled,
  21499. registerSize = props.registerSize,
  21500. itemKey = props.itemKey,
  21501. className = props.className,
  21502. style = props.style,
  21503. children = props.children,
  21504. display = props.display,
  21505. order = props.order,
  21506. _props$component = props.component,
  21507. Component = _props$component === void 0 ? 'div' : _props$component,
  21508. restProps = (0,objectWithoutProperties["default"])(props, Item_excluded);
  21509. var mergedHidden = responsive && !display;
  21510. // ================================ Effect ================================
  21511. function internalRegisterSize(width) {
  21512. registerSize(itemKey, width);
  21513. }
  21514. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  21515. return function () {
  21516. internalRegisterSize(null);
  21517. };
  21518. }, []);
  21519. // ================================ Render ================================
  21520. var childNode = renderItem && item !== UNDEFINED ? renderItem(item, {
  21521. index: order
  21522. }) : children;
  21523. var overflowStyle;
  21524. if (!invalidate) {
  21525. overflowStyle = {
  21526. opacity: mergedHidden ? 0 : 1,
  21527. height: mergedHidden ? 0 : UNDEFINED,
  21528. overflowY: mergedHidden ? 'hidden' : UNDEFINED,
  21529. order: responsive ? order : UNDEFINED,
  21530. pointerEvents: mergedHidden ? 'none' : UNDEFINED,
  21531. position: mergedHidden ? 'absolute' : UNDEFINED
  21532. };
  21533. }
  21534. var overflowProps = {};
  21535. if (mergedHidden) {
  21536. overflowProps['aria-hidden'] = true;
  21537. }
  21538. var itemNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({
  21539. className: classnames_default()(!invalidate && prefixCls, className),
  21540. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, overflowStyle), style)
  21541. }, overflowProps, restProps, {
  21542. ref: ref
  21543. }), childNode);
  21544. if (responsive) {
  21545. itemNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  21546. onResize: function onResize(_ref) {
  21547. var offsetWidth = _ref.offsetWidth;
  21548. internalRegisterSize(offsetWidth);
  21549. },
  21550. disabled: responsiveDisabled
  21551. }, itemNode);
  21552. }
  21553. return itemNode;
  21554. }
  21555. var Item = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalItem);
  21556. Item.displayName = 'Item';
  21557. /* harmony default export */ var es_Item = (Item);
  21558. ;// ./node_modules/rc-overflow/es/hooks/channelUpdate.js
  21559. function channelUpdate(callback) {
  21560. if (typeof MessageChannel === 'undefined') {
  21561. (0,raf["default"])(callback);
  21562. } else {
  21563. var channel = new MessageChannel();
  21564. channel.port1.onmessage = function () {
  21565. return callback();
  21566. };
  21567. channel.port2.postMessage(undefined);
  21568. }
  21569. }
  21570. ;// ./node_modules/rc-overflow/es/hooks/useEffectState.js
  21571. /**
  21572. * Batcher for record any `useEffectState` need update.
  21573. */
  21574. function useBatcher() {
  21575. // Updater Trigger
  21576. var updateFuncRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  21577. // Notify update
  21578. var notifyEffectUpdate = function notifyEffectUpdate(callback) {
  21579. if (!updateFuncRef.current) {
  21580. updateFuncRef.current = [];
  21581. channelUpdate(function () {
  21582. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.unstable_batchedUpdates)(function () {
  21583. updateFuncRef.current.forEach(function (fn) {
  21584. fn();
  21585. });
  21586. updateFuncRef.current = null;
  21587. });
  21588. });
  21589. }
  21590. updateFuncRef.current.push(callback);
  21591. };
  21592. return notifyEffectUpdate;
  21593. }
  21594. /**
  21595. * Trigger state update by `useLayoutEffect` to save perf.
  21596. */
  21597. function useEffectState(notifyEffectUpdate, defaultValue) {
  21598. // Value
  21599. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(defaultValue),
  21600. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  21601. stateValue = _React$useState2[0],
  21602. setStateValue = _React$useState2[1];
  21603. // Set State
  21604. var setEffectVal = (0,useEvent["default"])(function (nextValue) {
  21605. notifyEffectUpdate(function () {
  21606. setStateValue(nextValue);
  21607. });
  21608. });
  21609. return [stateValue, setEffectVal];
  21610. }
  21611. ;// ./node_modules/rc-overflow/es/context.js
  21612. var OverflowContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
  21613. ;// ./node_modules/rc-overflow/es/RawItem.js
  21614. var RawItem_excluded = ["component"],
  21615. _excluded2 = ["className"],
  21616. _excluded3 = ["className"];
  21617. var InternalRawItem = function InternalRawItem(props, ref) {
  21618. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(OverflowContext);
  21619. // Render directly when context not provided
  21620. if (!context) {
  21621. var _props$component = props.component,
  21622. Component = _props$component === void 0 ? 'div' : _props$component,
  21623. _restProps = (0,objectWithoutProperties["default"])(props, RawItem_excluded);
  21624. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, _restProps, {
  21625. ref: ref
  21626. }));
  21627. }
  21628. var contextClassName = context.className,
  21629. restContext = (0,objectWithoutProperties["default"])(context, _excluded2);
  21630. var className = props.className,
  21631. restProps = (0,objectWithoutProperties["default"])(props, _excluded3);
  21632. // Do not pass context to sub item to avoid multiple measure
  21633. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverflowContext.Provider, {
  21634. value: null
  21635. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({
  21636. ref: ref,
  21637. className: classnames_default()(contextClassName, className)
  21638. }, restContext, restProps)));
  21639. };
  21640. var RawItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalRawItem);
  21641. RawItem.displayName = 'RawItem';
  21642. /* harmony default export */ var es_RawItem = (RawItem);
  21643. ;// ./node_modules/rc-overflow/es/Overflow.js
  21644. var Overflow_excluded = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"];
  21645. var RESPONSIVE = 'responsive';
  21646. var INVALIDATE = 'invalidate';
  21647. function defaultRenderRest(omittedItems) {
  21648. return "+ ".concat(omittedItems.length, " ...");
  21649. }
  21650. function Overflow(props, ref) {
  21651. var _props$prefixCls = props.prefixCls,
  21652. prefixCls = _props$prefixCls === void 0 ? 'rc-overflow' : _props$prefixCls,
  21653. _props$data = props.data,
  21654. data = _props$data === void 0 ? [] : _props$data,
  21655. renderItem = props.renderItem,
  21656. renderRawItem = props.renderRawItem,
  21657. itemKey = props.itemKey,
  21658. _props$itemWidth = props.itemWidth,
  21659. itemWidth = _props$itemWidth === void 0 ? 10 : _props$itemWidth,
  21660. ssr = props.ssr,
  21661. style = props.style,
  21662. className = props.className,
  21663. maxCount = props.maxCount,
  21664. renderRest = props.renderRest,
  21665. renderRawRest = props.renderRawRest,
  21666. suffix = props.suffix,
  21667. _props$component = props.component,
  21668. Component = _props$component === void 0 ? 'div' : _props$component,
  21669. itemComponent = props.itemComponent,
  21670. onVisibleChange = props.onVisibleChange,
  21671. restProps = (0,objectWithoutProperties["default"])(props, Overflow_excluded);
  21672. var fullySSR = ssr === 'full';
  21673. var notifyEffectUpdate = useBatcher();
  21674. var _useEffectState = useEffectState(notifyEffectUpdate, null),
  21675. _useEffectState2 = (0,slicedToArray["default"])(_useEffectState, 2),
  21676. containerWidth = _useEffectState2[0],
  21677. setContainerWidth = _useEffectState2[1];
  21678. var mergedContainerWidth = containerWidth || 0;
  21679. var _useEffectState3 = useEffectState(notifyEffectUpdate, new Map()),
  21680. _useEffectState4 = (0,slicedToArray["default"])(_useEffectState3, 2),
  21681. itemWidths = _useEffectState4[0],
  21682. setItemWidths = _useEffectState4[1];
  21683. var _useEffectState5 = useEffectState(notifyEffectUpdate, 0),
  21684. _useEffectState6 = (0,slicedToArray["default"])(_useEffectState5, 2),
  21685. prevRestWidth = _useEffectState6[0],
  21686. setPrevRestWidth = _useEffectState6[1];
  21687. var _useEffectState7 = useEffectState(notifyEffectUpdate, 0),
  21688. _useEffectState8 = (0,slicedToArray["default"])(_useEffectState7, 2),
  21689. restWidth = _useEffectState8[0],
  21690. setRestWidth = _useEffectState8[1];
  21691. var _useEffectState9 = useEffectState(notifyEffectUpdate, 0),
  21692. _useEffectState10 = (0,slicedToArray["default"])(_useEffectState9, 2),
  21693. suffixWidth = _useEffectState10[0],
  21694. setSuffixWidth = _useEffectState10[1];
  21695. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  21696. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  21697. suffixFixedStart = _useState2[0],
  21698. setSuffixFixedStart = _useState2[1];
  21699. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  21700. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  21701. displayCount = _useState4[0],
  21702. setDisplayCount = _useState4[1];
  21703. var mergedDisplayCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  21704. if (displayCount === null && fullySSR) {
  21705. return Number.MAX_SAFE_INTEGER;
  21706. }
  21707. return displayCount || 0;
  21708. }, [displayCount, containerWidth]);
  21709. var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  21710. _useState6 = (0,slicedToArray["default"])(_useState5, 2),
  21711. restReady = _useState6[0],
  21712. setRestReady = _useState6[1];
  21713. var itemPrefixCls = "".concat(prefixCls, "-item");
  21714. // Always use the max width to avoid blink
  21715. var mergedRestWidth = Math.max(prevRestWidth, restWidth);
  21716. // ================================= Data =================================
  21717. var isResponsive = maxCount === RESPONSIVE;
  21718. var shouldResponsive = data.length && isResponsive;
  21719. var invalidate = maxCount === INVALIDATE;
  21720. /**
  21721. * When is `responsive`, we will always render rest node to get the real width of it for calculation
  21722. */
  21723. var showRest = shouldResponsive || typeof maxCount === 'number' && data.length > maxCount;
  21724. var mergedData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  21725. var items = data;
  21726. if (shouldResponsive) {
  21727. if (containerWidth === null && fullySSR) {
  21728. items = data;
  21729. } else {
  21730. items = data.slice(0, Math.min(data.length, mergedContainerWidth / itemWidth));
  21731. }
  21732. } else if (typeof maxCount === 'number') {
  21733. items = data.slice(0, maxCount);
  21734. }
  21735. return items;
  21736. }, [data, itemWidth, containerWidth, maxCount, shouldResponsive]);
  21737. var omittedItems = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  21738. if (shouldResponsive) {
  21739. return data.slice(mergedDisplayCount + 1);
  21740. }
  21741. return data.slice(mergedData.length);
  21742. }, [data, mergedData, shouldResponsive, mergedDisplayCount]);
  21743. // ================================= Item =================================
  21744. var getKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (item, index) {
  21745. var _ref;
  21746. if (typeof itemKey === 'function') {
  21747. return itemKey(item);
  21748. }
  21749. return (_ref = itemKey && (item === null || item === void 0 ? void 0 : item[itemKey])) !== null && _ref !== void 0 ? _ref : index;
  21750. }, [itemKey]);
  21751. var mergedRenderItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(renderItem || function (item) {
  21752. return item;
  21753. }, [renderItem]);
  21754. function updateDisplayCount(count, suffixFixedStartVal, notReady) {
  21755. // React 18 will sync render even when the value is same in some case.
  21756. // We take `mergedData` as deps which may cause dead loop if it's dynamic generate.
  21757. // ref: https://github.com/ant-design/ant-design/issues/36559
  21758. if (displayCount === count && (suffixFixedStartVal === undefined || suffixFixedStartVal === suffixFixedStart)) {
  21759. return;
  21760. }
  21761. setDisplayCount(count);
  21762. if (!notReady) {
  21763. setRestReady(count < data.length - 1);
  21764. onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(count);
  21765. }
  21766. if (suffixFixedStartVal !== undefined) {
  21767. setSuffixFixedStart(suffixFixedStartVal);
  21768. }
  21769. }
  21770. // ================================= Size =================================
  21771. function onOverflowResize(_, element) {
  21772. setContainerWidth(element.clientWidth);
  21773. }
  21774. function registerSize(key, width) {
  21775. setItemWidths(function (origin) {
  21776. var clone = new Map(origin);
  21777. if (width === null) {
  21778. clone.delete(key);
  21779. } else {
  21780. clone.set(key, width);
  21781. }
  21782. return clone;
  21783. });
  21784. }
  21785. function registerOverflowSize(_, width) {
  21786. setRestWidth(width);
  21787. setPrevRestWidth(restWidth);
  21788. }
  21789. function registerSuffixSize(_, width) {
  21790. setSuffixWidth(width);
  21791. }
  21792. // ================================ Effect ================================
  21793. function getItemWidth(index) {
  21794. return itemWidths.get(getKey(mergedData[index], index));
  21795. }
  21796. (0,useLayoutEffect["default"])(function () {
  21797. if (mergedContainerWidth && typeof mergedRestWidth === 'number' && mergedData) {
  21798. var totalWidth = suffixWidth;
  21799. var len = mergedData.length;
  21800. var lastIndex = len - 1;
  21801. // When data count change to 0, reset this since not loop will reach
  21802. if (!len) {
  21803. updateDisplayCount(0, null);
  21804. return;
  21805. }
  21806. for (var i = 0; i < len; i += 1) {
  21807. var currentItemWidth = getItemWidth(i);
  21808. // Fully will always render
  21809. if (fullySSR) {
  21810. currentItemWidth = currentItemWidth || 0;
  21811. }
  21812. // Break since data not ready
  21813. if (currentItemWidth === undefined) {
  21814. updateDisplayCount(i - 1, undefined, true);
  21815. break;
  21816. }
  21817. // Find best match
  21818. totalWidth += currentItemWidth;
  21819. if (
  21820. // Only one means `totalWidth` is the final width
  21821. lastIndex === 0 && totalWidth <= mergedContainerWidth ||
  21822. // Last two width will be the final width
  21823. i === lastIndex - 1 && totalWidth + getItemWidth(lastIndex) <= mergedContainerWidth) {
  21824. // Additional check if match the end
  21825. updateDisplayCount(lastIndex, null);
  21826. break;
  21827. } else if (totalWidth + mergedRestWidth > mergedContainerWidth) {
  21828. // Can not hold all the content to show rest
  21829. updateDisplayCount(i - 1, totalWidth - currentItemWidth - suffixWidth + restWidth);
  21830. break;
  21831. }
  21832. }
  21833. if (suffix && getItemWidth(0) + suffixWidth > mergedContainerWidth) {
  21834. setSuffixFixedStart(null);
  21835. }
  21836. }
  21837. }, [mergedContainerWidth, itemWidths, restWidth, suffixWidth, getKey, mergedData]);
  21838. // ================================ Render ================================
  21839. var displayRest = restReady && !!omittedItems.length;
  21840. var suffixStyle = {};
  21841. if (suffixFixedStart !== null && shouldResponsive) {
  21842. suffixStyle = {
  21843. position: 'absolute',
  21844. left: suffixFixedStart,
  21845. top: 0
  21846. };
  21847. }
  21848. var itemSharedProps = {
  21849. prefixCls: itemPrefixCls,
  21850. responsive: shouldResponsive,
  21851. component: itemComponent,
  21852. invalidate: invalidate
  21853. };
  21854. // >>>>> Choice render fun by `renderRawItem`
  21855. var internalRenderItemNode = renderRawItem ? function (item, index) {
  21856. var key = getKey(item, index);
  21857. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverflowContext.Provider, {
  21858. key: key,
  21859. value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, itemSharedProps), {}, {
  21860. order: index,
  21861. item: item,
  21862. itemKey: key,
  21863. registerSize: registerSize,
  21864. display: index <= mergedDisplayCount
  21865. })
  21866. }, renderRawItem(item, index));
  21867. } : function (item, index) {
  21868. var key = getKey(item, index);
  21869. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({}, itemSharedProps, {
  21870. order: index,
  21871. key: key,
  21872. item: item,
  21873. renderItem: mergedRenderItem,
  21874. itemKey: key,
  21875. registerSize: registerSize,
  21876. display: index <= mergedDisplayCount
  21877. }));
  21878. };
  21879. // >>>>> Rest node
  21880. var restContextProps = {
  21881. order: displayRest ? mergedDisplayCount : Number.MAX_SAFE_INTEGER,
  21882. className: "".concat(itemPrefixCls, "-rest"),
  21883. registerSize: registerOverflowSize,
  21884. display: displayRest
  21885. };
  21886. var mergedRenderRest = renderRest || defaultRenderRest;
  21887. var restNode = renderRawRest ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverflowContext.Provider, {
  21888. value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, itemSharedProps), restContextProps)
  21889. }, renderRawRest(omittedItems)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({}, itemSharedProps, restContextProps), typeof mergedRenderRest === 'function' ? mergedRenderRest(omittedItems) : mergedRenderRest);
  21890. var overflowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({
  21891. className: classnames_default()(!invalidate && prefixCls, className),
  21892. style: style,
  21893. ref: ref
  21894. }, restProps), mergedData.map(internalRenderItemNode), showRest ? restNode : null, suffix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Item, (0,esm_extends["default"])({}, itemSharedProps, {
  21895. responsive: isResponsive,
  21896. responsiveDisabled: !shouldResponsive,
  21897. order: mergedDisplayCount,
  21898. className: "".concat(itemPrefixCls, "-suffix"),
  21899. registerSize: registerSuffixSize,
  21900. display: true,
  21901. style: suffixStyle
  21902. }), suffix));
  21903. return isResponsive ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  21904. onResize: onOverflowResize,
  21905. disabled: !shouldResponsive
  21906. }, overflowNode) : overflowNode;
  21907. }
  21908. var ForwardOverflow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Overflow);
  21909. ForwardOverflow.displayName = 'Overflow';
  21910. ForwardOverflow.Item = es_RawItem;
  21911. ForwardOverflow.RESPONSIVE = RESPONSIVE;
  21912. ForwardOverflow.INVALIDATE = INVALIDATE;
  21913. // Convert to generic type
  21914. /* harmony default export */ var es_Overflow = (ForwardOverflow);
  21915. ;// ./node_modules/rc-overflow/es/index.js
  21916. /* harmony default export */ var rc_overflow_es = (es_Overflow);
  21917. ;// ./node_modules/rc-util/es/composeProps.js
  21918. function composeProps(originProps, patchProps, isAll) {
  21919. var composedProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originProps), isAll ? patchProps : {});
  21920. Object.keys(patchProps).forEach(function (key) {
  21921. var func = patchProps[key];
  21922. if (typeof func === 'function') {
  21923. composedProps[key] = function () {
  21924. var _originProps$key;
  21925. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  21926. args[_key] = arguments[_key];
  21927. }
  21928. func.apply(void 0, args);
  21929. return (_originProps$key = originProps[key]) === null || _originProps$key === void 0 ? void 0 : _originProps$key.call.apply(_originProps$key, [originProps].concat(args));
  21930. };
  21931. }
  21932. });
  21933. return composedProps;
  21934. }
  21935. /* harmony default export */ var es_composeProps = (composeProps);
  21936. ;// ./node_modules/rc-select/es/Selector/Input.js
  21937. var Input_excluded = ["prefixCls", "id", "inputElement", "autoFocus", "autoComplete", "editable", "activeDescendantId", "value", "open", "attrs"];
  21938. var Input_Input = function Input(props, ref) {
  21939. var prefixCls = props.prefixCls,
  21940. id = props.id,
  21941. inputElement = props.inputElement,
  21942. autoFocus = props.autoFocus,
  21943. autoComplete = props.autoComplete,
  21944. editable = props.editable,
  21945. activeDescendantId = props.activeDescendantId,
  21946. value = props.value,
  21947. open = props.open,
  21948. attrs = props.attrs,
  21949. restProps = (0,objectWithoutProperties["default"])(props, Input_excluded);
  21950. var inputNode = inputElement || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", null);
  21951. var _inputNode = inputNode,
  21952. originRef = _inputNode.ref,
  21953. originProps = _inputNode.props;
  21954. (0,warning.warning)(!('maxLength' in inputNode.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled.");
  21955. inputNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(inputNode, (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
  21956. type: 'search'
  21957. }, es_composeProps(restProps, originProps, true)), {}, {
  21958. // Override over origin props
  21959. id: id,
  21960. ref: (0,es_ref.composeRef)(ref, originRef),
  21961. autoComplete: autoComplete || 'off',
  21962. autoFocus: autoFocus,
  21963. className: classnames_default()("".concat(prefixCls, "-selection-search-input"), originProps === null || originProps === void 0 ? void 0 : originProps.className),
  21964. role: 'combobox',
  21965. 'aria-expanded': open || false,
  21966. 'aria-haspopup': 'listbox',
  21967. 'aria-owns': "".concat(id, "_list"),
  21968. 'aria-autocomplete': 'list',
  21969. 'aria-controls': "".concat(id, "_list"),
  21970. 'aria-activedescendant': open ? activeDescendantId : undefined
  21971. }, attrs), {}, {
  21972. value: editable ? value : '',
  21973. readOnly: !editable,
  21974. unselectable: !editable ? 'on' : null,
  21975. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originProps.style), {}, {
  21976. opacity: editable ? null : 0
  21977. })
  21978. }));
  21979. return inputNode;
  21980. };
  21981. var RefInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Input_Input);
  21982. if (true) {
  21983. RefInput.displayName = 'Input';
  21984. }
  21985. /* harmony default export */ var Selector_Input = (RefInput);
  21986. ;// ./node_modules/rc-select/es/utils/commonUtil.js
  21987. function commonUtil_toArray(value) {
  21988. if (Array.isArray(value)) {
  21989. return value;
  21990. }
  21991. return value !== undefined ? [value] : [];
  21992. }
  21993. var isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;
  21994. /** Is client side and not jsdom */
  21995. var isBrowserClient = true && isClient;
  21996. function hasValue(value) {
  21997. return value !== undefined && value !== null;
  21998. }
  21999. /** combo mode no value judgment function */
  22000. function isComboNoValue(value) {
  22001. return !value && value !== 0;
  22002. }
  22003. function isTitleType(title) {
  22004. return ['string', 'number'].includes((0,esm_typeof["default"])(title));
  22005. }
  22006. function getTitle(item) {
  22007. var title = undefined;
  22008. if (item) {
  22009. if (isTitleType(item.title)) {
  22010. title = item.title.toString();
  22011. } else if (isTitleType(item.label)) {
  22012. title = item.label.toString();
  22013. }
  22014. }
  22015. return title;
  22016. }
  22017. ;// ./node_modules/rc-select/es/hooks/useLayoutEffect.js
  22018. /* eslint-disable react-hooks/rules-of-hooks */
  22019. /**
  22020. * Wrap `React.useLayoutEffect` which will not throw warning message in test env
  22021. */
  22022. function useLayoutEffect_useLayoutEffect(effect, deps) {
  22023. // Never happen in test env
  22024. if (isBrowserClient) {
  22025. /* istanbul ignore next */
  22026. external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect(effect, deps);
  22027. } else {
  22028. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(effect, deps);
  22029. }
  22030. }
  22031. /* eslint-enable */
  22032. ;// ./node_modules/rc-select/es/Selector/MultipleSelector.js
  22033. function itemKey(value) {
  22034. var _value$key;
  22035. return (_value$key = value.key) !== null && _value$key !== void 0 ? _value$key : value.value;
  22036. }
  22037. var onPreventMouseDown = function onPreventMouseDown(event) {
  22038. event.preventDefault();
  22039. event.stopPropagation();
  22040. };
  22041. var SelectSelector = function SelectSelector(props) {
  22042. var id = props.id,
  22043. prefixCls = props.prefixCls,
  22044. values = props.values,
  22045. open = props.open,
  22046. searchValue = props.searchValue,
  22047. autoClearSearchValue = props.autoClearSearchValue,
  22048. inputRef = props.inputRef,
  22049. placeholder = props.placeholder,
  22050. disabled = props.disabled,
  22051. mode = props.mode,
  22052. showSearch = props.showSearch,
  22053. autoFocus = props.autoFocus,
  22054. autoComplete = props.autoComplete,
  22055. activeDescendantId = props.activeDescendantId,
  22056. tabIndex = props.tabIndex,
  22057. removeIcon = props.removeIcon,
  22058. maxTagCount = props.maxTagCount,
  22059. maxTagTextLength = props.maxTagTextLength,
  22060. _props$maxTagPlacehol = props.maxTagPlaceholder,
  22061. maxTagPlaceholder = _props$maxTagPlacehol === void 0 ? function (omittedValues) {
  22062. return "+ ".concat(omittedValues.length, " ...");
  22063. } : _props$maxTagPlacehol,
  22064. tagRender = props.tagRender,
  22065. onToggleOpen = props.onToggleOpen,
  22066. onRemove = props.onRemove,
  22067. onInputChange = props.onInputChange,
  22068. onInputPaste = props.onInputPaste,
  22069. onInputKeyDown = props.onInputKeyDown,
  22070. onInputMouseDown = props.onInputMouseDown,
  22071. onInputCompositionStart = props.onInputCompositionStart,
  22072. onInputCompositionEnd = props.onInputCompositionEnd,
  22073. onInputBlur = props.onInputBlur;
  22074. var measureRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  22075. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  22076. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  22077. inputWidth = _useState2[0],
  22078. setInputWidth = _useState2[1];
  22079. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  22080. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  22081. focused = _useState4[0],
  22082. setFocused = _useState4[1];
  22083. var selectionPrefixCls = "".concat(prefixCls, "-selection");
  22084. // ===================== Search ======================
  22085. var inputValue = open || mode === 'multiple' && autoClearSearchValue === false || mode === 'tags' ? searchValue : '';
  22086. var inputEditable = mode === 'tags' || mode === 'multiple' && autoClearSearchValue === false || showSearch && (open || focused);
  22087. // We measure width and set to the input immediately
  22088. useLayoutEffect_useLayoutEffect(function () {
  22089. setInputWidth(measureRef.current.scrollWidth);
  22090. }, [inputValue]);
  22091. // ===================== Render ======================
  22092. // >>> Render Selector Node. Includes Item & Rest
  22093. var defaultRenderSelector = function defaultRenderSelector(item, content, itemDisabled, closable, onClose) {
  22094. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22095. title: getTitle(item),
  22096. className: classnames_default()("".concat(selectionPrefixCls, "-item"), (0,defineProperty["default"])({}, "".concat(selectionPrefixCls, "-item-disabled"), itemDisabled))
  22097. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22098. className: "".concat(selectionPrefixCls, "-item-content")
  22099. }, content), closable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TransBtn, {
  22100. className: "".concat(selectionPrefixCls, "-item-remove"),
  22101. onMouseDown: onPreventMouseDown,
  22102. onClick: onClose,
  22103. customizeIcon: removeIcon
  22104. }, "\xD7"));
  22105. };
  22106. var customizeRenderSelector = function customizeRenderSelector(value, content, itemDisabled, closable, onClose, isMaxTag) {
  22107. var onMouseDown = function onMouseDown(e) {
  22108. onPreventMouseDown(e);
  22109. onToggleOpen(!open);
  22110. };
  22111. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22112. onMouseDown: onMouseDown
  22113. }, tagRender({
  22114. label: content,
  22115. value: value,
  22116. disabled: itemDisabled,
  22117. closable: closable,
  22118. onClose: onClose,
  22119. isMaxTag: !!isMaxTag
  22120. }));
  22121. };
  22122. var renderItem = function renderItem(valueItem) {
  22123. var itemDisabled = valueItem.disabled,
  22124. label = valueItem.label,
  22125. value = valueItem.value;
  22126. var closable = !disabled && !itemDisabled;
  22127. var displayLabel = label;
  22128. if (typeof maxTagTextLength === 'number') {
  22129. if (typeof label === 'string' || typeof label === 'number') {
  22130. var strLabel = String(displayLabel);
  22131. if (strLabel.length > maxTagTextLength) {
  22132. displayLabel = "".concat(strLabel.slice(0, maxTagTextLength), "...");
  22133. }
  22134. }
  22135. }
  22136. var onClose = function onClose(event) {
  22137. if (event) {
  22138. event.stopPropagation();
  22139. }
  22140. onRemove(valueItem);
  22141. };
  22142. return typeof tagRender === 'function' ? customizeRenderSelector(value, displayLabel, itemDisabled, closable, onClose) : defaultRenderSelector(valueItem, displayLabel, itemDisabled, closable, onClose);
  22143. };
  22144. var renderRest = function renderRest(omittedValues) {
  22145. // https://github.com/ant-design/ant-design/issues/48930
  22146. if (!values.length) {
  22147. return null;
  22148. }
  22149. var content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder;
  22150. return typeof tagRender === 'function' ? customizeRenderSelector(undefined, content, false, false, undefined, true) : defaultRenderSelector({
  22151. title: content
  22152. }, content, false);
  22153. };
  22154. // >>> Input Node
  22155. var inputNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  22156. className: "".concat(selectionPrefixCls, "-search"),
  22157. style: {
  22158. width: inputWidth
  22159. },
  22160. onFocus: function onFocus() {
  22161. setFocused(true);
  22162. },
  22163. onBlur: function onBlur() {
  22164. setFocused(false);
  22165. }
  22166. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_Input, {
  22167. ref: inputRef,
  22168. open: open,
  22169. prefixCls: prefixCls,
  22170. id: id,
  22171. inputElement: null,
  22172. disabled: disabled,
  22173. autoFocus: autoFocus,
  22174. autoComplete: autoComplete,
  22175. editable: inputEditable,
  22176. activeDescendantId: activeDescendantId,
  22177. value: inputValue,
  22178. onKeyDown: onInputKeyDown,
  22179. onMouseDown: onInputMouseDown,
  22180. onChange: onInputChange,
  22181. onPaste: onInputPaste,
  22182. onCompositionStart: onInputCompositionStart,
  22183. onCompositionEnd: onInputCompositionEnd,
  22184. onBlur: onInputBlur,
  22185. tabIndex: tabIndex,
  22186. attrs: (0,pickAttrs["default"])(props, true)
  22187. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22188. ref: measureRef,
  22189. className: "".concat(selectionPrefixCls, "-search-mirror"),
  22190. "aria-hidden": true
  22191. }, inputValue, "\xA0"));
  22192. // >>> Selections
  22193. var selectionNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es, {
  22194. prefixCls: "".concat(selectionPrefixCls, "-overflow"),
  22195. data: values,
  22196. renderItem: renderItem,
  22197. renderRest: renderRest,
  22198. suffix: inputNode,
  22199. itemKey: itemKey,
  22200. maxCount: maxTagCount
  22201. });
  22202. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22203. className: "".concat(selectionPrefixCls, "-wrap")
  22204. }, selectionNode, !values.length && !inputValue && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22205. className: "".concat(selectionPrefixCls, "-placeholder")
  22206. }, placeholder));
  22207. };
  22208. /* harmony default export */ var MultipleSelector = (SelectSelector);
  22209. ;// ./node_modules/rc-select/es/Selector/SingleSelector.js
  22210. var SingleSelector = function SingleSelector(props) {
  22211. var inputElement = props.inputElement,
  22212. prefixCls = props.prefixCls,
  22213. id = props.id,
  22214. inputRef = props.inputRef,
  22215. disabled = props.disabled,
  22216. autoFocus = props.autoFocus,
  22217. autoComplete = props.autoComplete,
  22218. activeDescendantId = props.activeDescendantId,
  22219. mode = props.mode,
  22220. open = props.open,
  22221. values = props.values,
  22222. placeholder = props.placeholder,
  22223. tabIndex = props.tabIndex,
  22224. showSearch = props.showSearch,
  22225. searchValue = props.searchValue,
  22226. activeValue = props.activeValue,
  22227. maxLength = props.maxLength,
  22228. onInputKeyDown = props.onInputKeyDown,
  22229. onInputMouseDown = props.onInputMouseDown,
  22230. onInputChange = props.onInputChange,
  22231. onInputPaste = props.onInputPaste,
  22232. onInputCompositionStart = props.onInputCompositionStart,
  22233. onInputCompositionEnd = props.onInputCompositionEnd,
  22234. onInputBlur = props.onInputBlur,
  22235. title = props.title;
  22236. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  22237. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  22238. inputChanged = _React$useState2[0],
  22239. setInputChanged = _React$useState2[1];
  22240. var combobox = mode === 'combobox';
  22241. var inputEditable = combobox || showSearch;
  22242. var item = values[0];
  22243. var inputValue = searchValue || '';
  22244. if (combobox && activeValue && !inputChanged) {
  22245. inputValue = activeValue;
  22246. }
  22247. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  22248. if (combobox) {
  22249. setInputChanged(false);
  22250. }
  22251. }, [combobox, activeValue]);
  22252. // Not show text when closed expect combobox mode
  22253. var hasTextInput = mode !== 'combobox' && !open && !showSearch ? false : !!inputValue;
  22254. // Get title of selection item
  22255. var selectionTitle = title === undefined ? getTitle(item) : title;
  22256. var placeholderNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  22257. if (item) {
  22258. return null;
  22259. }
  22260. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22261. className: "".concat(prefixCls, "-selection-placeholder"),
  22262. style: hasTextInput ? {
  22263. visibility: 'hidden'
  22264. } : undefined
  22265. }, placeholder);
  22266. }, [item, hasTextInput, placeholder, prefixCls]);
  22267. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22268. className: "".concat(prefixCls, "-selection-wrap")
  22269. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22270. className: "".concat(prefixCls, "-selection-search")
  22271. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_Input, {
  22272. ref: inputRef,
  22273. prefixCls: prefixCls,
  22274. id: id,
  22275. open: open,
  22276. inputElement: inputElement,
  22277. disabled: disabled,
  22278. autoFocus: autoFocus,
  22279. autoComplete: autoComplete,
  22280. editable: inputEditable,
  22281. activeDescendantId: activeDescendantId,
  22282. value: inputValue,
  22283. onKeyDown: onInputKeyDown,
  22284. onMouseDown: onInputMouseDown,
  22285. onChange: function onChange(e) {
  22286. setInputChanged(true);
  22287. onInputChange(e);
  22288. },
  22289. onPaste: onInputPaste,
  22290. onCompositionStart: onInputCompositionStart,
  22291. onCompositionEnd: onInputCompositionEnd,
  22292. onBlur: onInputBlur,
  22293. tabIndex: tabIndex,
  22294. attrs: (0,pickAttrs["default"])(props, true),
  22295. maxLength: combobox ? maxLength : undefined
  22296. })), !combobox && item ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  22297. className: "".concat(prefixCls, "-selection-item"),
  22298. title: selectionTitle
  22299. // 当 Select 已经选中选项时,还需 selection 隐藏但留在原地占位
  22300. // https://github.com/ant-design/ant-design/issues/27688
  22301. // https://github.com/ant-design/ant-design/issues/41530
  22302. ,
  22303. style: hasTextInput ? {
  22304. visibility: 'hidden'
  22305. } : undefined
  22306. }, item.label) : null, placeholderNode);
  22307. };
  22308. /* harmony default export */ var Selector_SingleSelector = (SingleSelector);
  22309. ;// ./node_modules/rc-select/es/Selector/index.js
  22310. /**
  22311. * Cursor rule:
  22312. * 1. Only `showSearch` enabled
  22313. * 2. Only `open` is `true`
  22314. * 3. When typing, set `open` to `true` which hit rule of 2
  22315. *
  22316. * Accessibility:
  22317. * - https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html
  22318. */
  22319. var Selector = function Selector(props, ref) {
  22320. var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  22321. var compositionStatusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  22322. var prefixCls = props.prefixCls,
  22323. open = props.open,
  22324. mode = props.mode,
  22325. showSearch = props.showSearch,
  22326. tokenWithEnter = props.tokenWithEnter,
  22327. disabled = props.disabled,
  22328. prefix = props.prefix,
  22329. autoClearSearchValue = props.autoClearSearchValue,
  22330. onSearch = props.onSearch,
  22331. onSearchSubmit = props.onSearchSubmit,
  22332. onToggleOpen = props.onToggleOpen,
  22333. onInputKeyDown = props.onInputKeyDown,
  22334. onInputBlur = props.onInputBlur,
  22335. domRef = props.domRef;
  22336. // ======================= Ref =======================
  22337. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  22338. return {
  22339. focus: function focus(options) {
  22340. inputRef.current.focus(options);
  22341. },
  22342. blur: function blur() {
  22343. inputRef.current.blur();
  22344. }
  22345. };
  22346. });
  22347. // ====================== Input ======================
  22348. var _useLock = useLock(0),
  22349. _useLock2 = (0,slicedToArray["default"])(_useLock, 2),
  22350. getInputMouseDown = _useLock2[0],
  22351. setInputMouseDown = _useLock2[1];
  22352. var onInternalInputKeyDown = function onInternalInputKeyDown(event) {
  22353. var which = event.which;
  22354. // Compatible with multiple lines in TextArea
  22355. var isTextAreaElement = inputRef.current instanceof HTMLTextAreaElement;
  22356. if (!isTextAreaElement && open && (which === KeyCode["default"].UP || which === KeyCode["default"].DOWN)) {
  22357. event.preventDefault();
  22358. }
  22359. if (onInputKeyDown) {
  22360. onInputKeyDown(event);
  22361. }
  22362. if (which === KeyCode["default"].ENTER && mode === 'tags' && !compositionStatusRef.current && !open) {
  22363. // When menu isn't open, OptionList won't trigger a value change
  22364. // So when enter is pressed, the tag's input value should be emitted here to let selector know
  22365. onSearchSubmit === null || onSearchSubmit === void 0 || onSearchSubmit(event.target.value);
  22366. }
  22367. // Move within the text box
  22368. if (isTextAreaElement && !open && ~[KeyCode["default"].UP, KeyCode["default"].DOWN, KeyCode["default"].LEFT, KeyCode["default"].RIGHT].indexOf(which)) {
  22369. return;
  22370. }
  22371. if (isValidateOpenKey(which)) {
  22372. onToggleOpen(true);
  22373. }
  22374. };
  22375. /**
  22376. * We can not use `findDOMNode` sine it will get warning,
  22377. * have to use timer to check if is input element.
  22378. */
  22379. var onInternalInputMouseDown = function onInternalInputMouseDown() {
  22380. setInputMouseDown(true);
  22381. };
  22382. // When paste come, ignore next onChange
  22383. var pastedTextRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  22384. var triggerOnSearch = function triggerOnSearch(value) {
  22385. if (onSearch(value, true, compositionStatusRef.current) !== false) {
  22386. onToggleOpen(true);
  22387. }
  22388. };
  22389. var onInputCompositionStart = function onInputCompositionStart() {
  22390. compositionStatusRef.current = true;
  22391. };
  22392. var onInputCompositionEnd = function onInputCompositionEnd(e) {
  22393. compositionStatusRef.current = false;
  22394. // Trigger search again to support `tokenSeparators` with typewriting
  22395. if (mode !== 'combobox') {
  22396. triggerOnSearch(e.target.value);
  22397. }
  22398. };
  22399. var onInputChange = function onInputChange(event) {
  22400. var value = event.target.value;
  22401. // Pasted text should replace back to origin content
  22402. if (tokenWithEnter && pastedTextRef.current && /[\r\n]/.test(pastedTextRef.current)) {
  22403. // CRLF will be treated as a single space for input element
  22404. var replacedText = pastedTextRef.current.replace(/[\r\n]+$/, '').replace(/\r\n/g, ' ').replace(/[\r\n]/g, ' ');
  22405. value = value.replace(replacedText, pastedTextRef.current);
  22406. }
  22407. pastedTextRef.current = null;
  22408. triggerOnSearch(value);
  22409. };
  22410. var onInputPaste = function onInputPaste(e) {
  22411. var clipboardData = e.clipboardData;
  22412. var value = clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
  22413. pastedTextRef.current = value || '';
  22414. };
  22415. var onClick = function onClick(_ref) {
  22416. var target = _ref.target;
  22417. if (target !== inputRef.current) {
  22418. // Should focus input if click the selector
  22419. var isIE = document.body.style.msTouchAction !== undefined;
  22420. if (isIE) {
  22421. setTimeout(function () {
  22422. inputRef.current.focus();
  22423. });
  22424. } else {
  22425. inputRef.current.focus();
  22426. }
  22427. }
  22428. };
  22429. var onMouseDown = function onMouseDown(event) {
  22430. var inputMouseDown = getInputMouseDown();
  22431. // when mode is combobox and it is disabled, don't prevent default behavior
  22432. // https://github.com/ant-design/ant-design/issues/37320
  22433. // https://github.com/ant-design/ant-design/issues/48281
  22434. if (event.target !== inputRef.current && !inputMouseDown && !(mode === 'combobox' && disabled)) {
  22435. event.preventDefault();
  22436. }
  22437. if (mode !== 'combobox' && (!showSearch || !inputMouseDown) || !open) {
  22438. if (open && autoClearSearchValue !== false) {
  22439. onSearch('', true, false);
  22440. }
  22441. onToggleOpen();
  22442. }
  22443. };
  22444. // ================= Inner Selector ==================
  22445. var sharedProps = {
  22446. inputRef: inputRef,
  22447. onInputKeyDown: onInternalInputKeyDown,
  22448. onInputMouseDown: onInternalInputMouseDown,
  22449. onInputChange: onInputChange,
  22450. onInputPaste: onInputPaste,
  22451. onInputCompositionStart: onInputCompositionStart,
  22452. onInputCompositionEnd: onInputCompositionEnd,
  22453. onInputBlur: onInputBlur
  22454. };
  22455. var selectNode = mode === 'multiple' || mode === 'tags' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MultipleSelector, (0,esm_extends["default"])({}, props, sharedProps)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_SingleSelector, (0,esm_extends["default"])({}, props, sharedProps));
  22456. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  22457. ref: domRef,
  22458. className: "".concat(prefixCls, "-selector"),
  22459. onClick: onClick,
  22460. onMouseDown: onMouseDown
  22461. }, prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  22462. className: "".concat(prefixCls, "-prefix")
  22463. }, prefix), selectNode);
  22464. };
  22465. var ForwardSelector = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Selector);
  22466. if (true) {
  22467. ForwardSelector.displayName = 'Selector';
  22468. }
  22469. /* harmony default export */ var es_Selector = (ForwardSelector);
  22470. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/shadow.js
  22471. var shadow = __webpack_require__("./node_modules/rc-util/es/Dom/shadow.js");
  22472. ;// ./node_modules/@rc-component/trigger/es/Popup/Arrow.js
  22473. function Arrow(props) {
  22474. var prefixCls = props.prefixCls,
  22475. align = props.align,
  22476. arrow = props.arrow,
  22477. arrowPos = props.arrowPos;
  22478. var _ref = arrow || {},
  22479. className = _ref.className,
  22480. content = _ref.content;
  22481. var _arrowPos$x = arrowPos.x,
  22482. x = _arrowPos$x === void 0 ? 0 : _arrowPos$x,
  22483. _arrowPos$y = arrowPos.y,
  22484. y = _arrowPos$y === void 0 ? 0 : _arrowPos$y;
  22485. var arrowRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  22486. // Skip if no align
  22487. if (!align || !align.points) {
  22488. return null;
  22489. }
  22490. var alignStyle = {
  22491. position: 'absolute'
  22492. };
  22493. // Skip if no need to align
  22494. if (align.autoArrow !== false) {
  22495. var popupPoints = align.points[0];
  22496. var targetPoints = align.points[1];
  22497. var popupTB = popupPoints[0];
  22498. var popupLR = popupPoints[1];
  22499. var targetTB = targetPoints[0];
  22500. var targetLR = targetPoints[1];
  22501. // Top & Bottom
  22502. if (popupTB === targetTB || !['t', 'b'].includes(popupTB)) {
  22503. alignStyle.top = y;
  22504. } else if (popupTB === 't') {
  22505. alignStyle.top = 0;
  22506. } else {
  22507. alignStyle.bottom = 0;
  22508. }
  22509. // Left & Right
  22510. if (popupLR === targetLR || !['l', 'r'].includes(popupLR)) {
  22511. alignStyle.left = x;
  22512. } else if (popupLR === 'l') {
  22513. alignStyle.left = 0;
  22514. } else {
  22515. alignStyle.right = 0;
  22516. }
  22517. }
  22518. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  22519. ref: arrowRef,
  22520. className: classnames_default()("".concat(prefixCls, "-arrow"), className),
  22521. style: alignStyle
  22522. }, content);
  22523. }
  22524. ;// ./node_modules/@rc-component/trigger/es/Popup/Mask.js
  22525. function Mask_Mask(props) {
  22526. var prefixCls = props.prefixCls,
  22527. open = props.open,
  22528. zIndex = props.zIndex,
  22529. mask = props.mask,
  22530. motion = props.motion;
  22531. if (!mask) {
  22532. return null;
  22533. }
  22534. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({}, motion, {
  22535. motionAppear: true,
  22536. visible: open,
  22537. removeOnLeave: true
  22538. }), function (_ref) {
  22539. var className = _ref.className;
  22540. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  22541. style: {
  22542. zIndex: zIndex
  22543. },
  22544. className: classnames_default()("".concat(prefixCls, "-mask"), className)
  22545. });
  22546. });
  22547. }
  22548. ;// ./node_modules/@rc-component/trigger/es/Popup/PopupContent.js
  22549. var PopupContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function (_ref) {
  22550. var children = _ref.children;
  22551. return children;
  22552. }, function (_, next) {
  22553. return next.cache;
  22554. });
  22555. if (true) {
  22556. PopupContent.displayName = 'PopupContent';
  22557. }
  22558. /* harmony default export */ var Popup_PopupContent = (PopupContent);
  22559. ;// ./node_modules/@rc-component/trigger/es/Popup/index.js
  22560. var Popup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  22561. var popup = props.popup,
  22562. className = props.className,
  22563. prefixCls = props.prefixCls,
  22564. style = props.style,
  22565. target = props.target,
  22566. _onVisibleChanged = props.onVisibleChanged,
  22567. open = props.open,
  22568. keepDom = props.keepDom,
  22569. fresh = props.fresh,
  22570. onClick = props.onClick,
  22571. mask = props.mask,
  22572. arrow = props.arrow,
  22573. arrowPos = props.arrowPos,
  22574. align = props.align,
  22575. motion = props.motion,
  22576. maskMotion = props.maskMotion,
  22577. forceRender = props.forceRender,
  22578. getPopupContainer = props.getPopupContainer,
  22579. autoDestroy = props.autoDestroy,
  22580. Portal = props.portal,
  22581. zIndex = props.zIndex,
  22582. onMouseEnter = props.onMouseEnter,
  22583. onMouseLeave = props.onMouseLeave,
  22584. onPointerEnter = props.onPointerEnter,
  22585. onPointerDownCapture = props.onPointerDownCapture,
  22586. ready = props.ready,
  22587. offsetX = props.offsetX,
  22588. offsetY = props.offsetY,
  22589. offsetR = props.offsetR,
  22590. offsetB = props.offsetB,
  22591. onAlign = props.onAlign,
  22592. onPrepare = props.onPrepare,
  22593. stretch = props.stretch,
  22594. targetWidth = props.targetWidth,
  22595. targetHeight = props.targetHeight;
  22596. var childNode = typeof popup === 'function' ? popup() : popup;
  22597. // We can not remove holder only when motion finished.
  22598. var isNodeVisible = open || keepDom;
  22599. // ======================= Container ========================
  22600. var getPopupContainerNeedParams = (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer.length) > 0;
  22601. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(!getPopupContainer || !getPopupContainerNeedParams),
  22602. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  22603. show = _React$useState2[0],
  22604. setShow = _React$useState2[1];
  22605. // Delay to show since `getPopupContainer` need target element
  22606. (0,useLayoutEffect["default"])(function () {
  22607. if (!show && getPopupContainerNeedParams && target) {
  22608. setShow(true);
  22609. }
  22610. }, [show, getPopupContainerNeedParams, target]);
  22611. // ========================= Render =========================
  22612. if (!show) {
  22613. return null;
  22614. }
  22615. // >>>>> Offset
  22616. var AUTO = 'auto';
  22617. var offsetStyle = {
  22618. left: '-1000vw',
  22619. top: '-1000vh',
  22620. right: AUTO,
  22621. bottom: AUTO
  22622. };
  22623. // Set align style
  22624. if (ready || !open) {
  22625. var _experimental;
  22626. var points = align.points;
  22627. var dynamicInset = align.dynamicInset || ((_experimental = align._experimental) === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset);
  22628. var alignRight = dynamicInset && points[0][1] === 'r';
  22629. var alignBottom = dynamicInset && points[0][0] === 'b';
  22630. if (alignRight) {
  22631. offsetStyle.right = offsetR;
  22632. offsetStyle.left = AUTO;
  22633. } else {
  22634. offsetStyle.left = offsetX;
  22635. offsetStyle.right = AUTO;
  22636. }
  22637. if (alignBottom) {
  22638. offsetStyle.bottom = offsetB;
  22639. offsetStyle.top = AUTO;
  22640. } else {
  22641. offsetStyle.top = offsetY;
  22642. offsetStyle.bottom = AUTO;
  22643. }
  22644. }
  22645. // >>>>> Misc
  22646. var miscStyle = {};
  22647. if (stretch) {
  22648. if (stretch.includes('height') && targetHeight) {
  22649. miscStyle.height = targetHeight;
  22650. } else if (stretch.includes('minHeight') && targetHeight) {
  22651. miscStyle.minHeight = targetHeight;
  22652. }
  22653. if (stretch.includes('width') && targetWidth) {
  22654. miscStyle.width = targetWidth;
  22655. } else if (stretch.includes('minWidth') && targetWidth) {
  22656. miscStyle.minWidth = targetWidth;
  22657. }
  22658. }
  22659. if (!open) {
  22660. miscStyle.pointerEvents = 'none';
  22661. }
  22662. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Portal, {
  22663. open: forceRender || isNodeVisible,
  22664. getContainer: getPopupContainer && function () {
  22665. return getPopupContainer(target);
  22666. },
  22667. autoDestroy: autoDestroy
  22668. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Mask_Mask, {
  22669. prefixCls: prefixCls,
  22670. open: open,
  22671. zIndex: zIndex,
  22672. mask: mask,
  22673. motion: maskMotion
  22674. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  22675. onResize: onAlign,
  22676. disabled: !open
  22677. }, function (resizeObserverRef) {
  22678. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
  22679. motionAppear: true,
  22680. motionEnter: true,
  22681. motionLeave: true,
  22682. removeOnLeave: false,
  22683. forceRender: forceRender,
  22684. leavedClassName: "".concat(prefixCls, "-hidden")
  22685. }, motion, {
  22686. onAppearPrepare: onPrepare,
  22687. onEnterPrepare: onPrepare,
  22688. visible: open,
  22689. onVisibleChanged: function onVisibleChanged(nextVisible) {
  22690. var _motion$onVisibleChan;
  22691. motion === null || motion === void 0 || (_motion$onVisibleChan = motion.onVisibleChanged) === null || _motion$onVisibleChan === void 0 || _motion$onVisibleChan.call(motion, nextVisible);
  22692. _onVisibleChanged(nextVisible);
  22693. }
  22694. }), function (_ref, motionRef) {
  22695. var motionClassName = _ref.className,
  22696. motionStyle = _ref.style;
  22697. var cls = classnames_default()(prefixCls, motionClassName, className);
  22698. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  22699. ref: (0,es_ref.composeRef)(resizeObserverRef, ref, motionRef),
  22700. className: cls,
  22701. style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
  22702. '--arrow-x': "".concat(arrowPos.x || 0, "px"),
  22703. '--arrow-y': "".concat(arrowPos.y || 0, "px")
  22704. }, offsetStyle), miscStyle), motionStyle), {}, {
  22705. boxSizing: 'border-box',
  22706. zIndex: zIndex
  22707. }, style),
  22708. onMouseEnter: onMouseEnter,
  22709. onMouseLeave: onMouseLeave,
  22710. onPointerEnter: onPointerEnter,
  22711. onClick: onClick,
  22712. onPointerDownCapture: onPointerDownCapture
  22713. }, arrow && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Arrow, {
  22714. prefixCls: prefixCls,
  22715. arrow: arrow,
  22716. arrowPos: arrowPos,
  22717. align: align
  22718. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_PopupContent, {
  22719. cache: !open && !fresh
  22720. }, childNode));
  22721. });
  22722. }));
  22723. });
  22724. if (true) {
  22725. Popup.displayName = 'Popup';
  22726. }
  22727. /* harmony default export */ var es_Popup = (Popup);
  22728. ;// ./node_modules/@rc-component/trigger/es/TriggerWrapper.js
  22729. var TriggerWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  22730. var children = props.children,
  22731. getTriggerDOMNode = props.getTriggerDOMNode;
  22732. var canUseRef = (0,es_ref.supportRef)(children);
  22733. // When use `getTriggerDOMNode`, we should do additional work to get the real dom
  22734. var setRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (node) {
  22735. (0,es_ref.fillRef)(ref, getTriggerDOMNode ? getTriggerDOMNode(node) : node);
  22736. }, [getTriggerDOMNode]);
  22737. var mergedRef = (0,es_ref.useComposeRef)(setRef, (0,es_ref.getNodeRef)(children));
  22738. return canUseRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
  22739. ref: mergedRef
  22740. }) : children;
  22741. });
  22742. if (true) {
  22743. TriggerWrapper.displayName = 'TriggerWrapper';
  22744. }
  22745. /* harmony default export */ var es_TriggerWrapper = (TriggerWrapper);
  22746. ;// ./node_modules/@rc-component/trigger/es/context.js
  22747. var TriggerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  22748. /* harmony default export */ var es_context = (TriggerContext);
  22749. ;// ./node_modules/@rc-component/trigger/es/hooks/useAction.js
  22750. function useAction_toArray(val) {
  22751. return val ? Array.isArray(val) ? val : [val] : [];
  22752. }
  22753. function useAction(mobile, action, showAction, hideAction) {
  22754. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  22755. var mergedShowAction = useAction_toArray(showAction !== null && showAction !== void 0 ? showAction : action);
  22756. var mergedHideAction = useAction_toArray(hideAction !== null && hideAction !== void 0 ? hideAction : action);
  22757. var showActionSet = new Set(mergedShowAction);
  22758. var hideActionSet = new Set(mergedHideAction);
  22759. if (mobile) {
  22760. if (showActionSet.has('hover')) {
  22761. showActionSet.delete('hover');
  22762. showActionSet.add('click');
  22763. }
  22764. if (hideActionSet.has('hover')) {
  22765. hideActionSet.delete('hover');
  22766. hideActionSet.add('click');
  22767. }
  22768. }
  22769. return [showActionSet, hideActionSet];
  22770. }, [mobile, action, showAction, hideAction]);
  22771. }
  22772. ;// ./node_modules/@rc-component/trigger/es/util.js
  22773. function isPointsEq() {
  22774. var a1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  22775. var a2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  22776. var isAlignPoint = arguments.length > 2 ? arguments[2] : undefined;
  22777. if (isAlignPoint) {
  22778. return a1[0] === a2[0];
  22779. }
  22780. return a1[0] === a2[0] && a1[1] === a2[1];
  22781. }
  22782. function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
  22783. var points = align.points;
  22784. var placements = Object.keys(builtinPlacements);
  22785. for (var i = 0; i < placements.length; i += 1) {
  22786. var _builtinPlacements$pl;
  22787. var placement = placements[i];
  22788. if (isPointsEq((_builtinPlacements$pl = builtinPlacements[placement]) === null || _builtinPlacements$pl === void 0 ? void 0 : _builtinPlacements$pl.points, points, isAlignPoint)) {
  22789. return "".concat(prefixCls, "-placement-").concat(placement);
  22790. }
  22791. }
  22792. return '';
  22793. }
  22794. /** @deprecated We should not use this if we can refactor all deps */
  22795. function es_util_getMotion(prefixCls, motion, animation, transitionName) {
  22796. if (motion) {
  22797. return motion;
  22798. }
  22799. if (animation) {
  22800. return {
  22801. motionName: "".concat(prefixCls, "-").concat(animation)
  22802. };
  22803. }
  22804. if (transitionName) {
  22805. return {
  22806. motionName: transitionName
  22807. };
  22808. }
  22809. return null;
  22810. }
  22811. function getWin(ele) {
  22812. return ele.ownerDocument.defaultView;
  22813. }
  22814. /**
  22815. * Get all the scrollable parent elements of the element
  22816. * @param ele The element to be detected
  22817. * @param areaOnly Only return the parent which will cut visible area
  22818. */
  22819. function collectScroller(ele) {
  22820. var scrollerList = [];
  22821. var current = ele === null || ele === void 0 ? void 0 : ele.parentElement;
  22822. var scrollStyle = ['hidden', 'scroll', 'clip', 'auto'];
  22823. while (current) {
  22824. var _getWin$getComputedSt = getWin(current).getComputedStyle(current),
  22825. overflowX = _getWin$getComputedSt.overflowX,
  22826. overflowY = _getWin$getComputedSt.overflowY,
  22827. overflow = _getWin$getComputedSt.overflow;
  22828. if ([overflowX, overflowY, overflow].some(function (o) {
  22829. return scrollStyle.includes(o);
  22830. })) {
  22831. scrollerList.push(current);
  22832. }
  22833. current = current.parentElement;
  22834. }
  22835. return scrollerList;
  22836. }
  22837. function toNum(num) {
  22838. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  22839. return Number.isNaN(num) ? defaultValue : num;
  22840. }
  22841. function getPxValue(val) {
  22842. return toNum(parseFloat(val), 0);
  22843. }
  22844. /**
  22845. *
  22846. *
  22847. * **************************************
  22848. * * Border *
  22849. * * ************************** *
  22850. * * * * * *
  22851. * * B * * S * B *
  22852. * * o * * c * o *
  22853. * * r * Content * r * r *
  22854. * * d * * o * d *
  22855. * * e * * l * e *
  22856. * * r ******************** l * r *
  22857. * * * Scroll * *
  22858. * * ************************** *
  22859. * * Border *
  22860. * **************************************
  22861. *
  22862. */
  22863. /**
  22864. * Get visible area of element
  22865. */
  22866. function getVisibleArea(initArea, scrollerList) {
  22867. var visibleArea = (0,objectSpread2["default"])({}, initArea);
  22868. (scrollerList || []).forEach(function (ele) {
  22869. if (ele instanceof HTMLBodyElement || ele instanceof HTMLHtmlElement) {
  22870. return;
  22871. }
  22872. // Skip if static position which will not affect visible area
  22873. var _getWin$getComputedSt2 = getWin(ele).getComputedStyle(ele),
  22874. overflow = _getWin$getComputedSt2.overflow,
  22875. overflowClipMargin = _getWin$getComputedSt2.overflowClipMargin,
  22876. borderTopWidth = _getWin$getComputedSt2.borderTopWidth,
  22877. borderBottomWidth = _getWin$getComputedSt2.borderBottomWidth,
  22878. borderLeftWidth = _getWin$getComputedSt2.borderLeftWidth,
  22879. borderRightWidth = _getWin$getComputedSt2.borderRightWidth;
  22880. var eleRect = ele.getBoundingClientRect();
  22881. var eleOutHeight = ele.offsetHeight,
  22882. eleInnerHeight = ele.clientHeight,
  22883. eleOutWidth = ele.offsetWidth,
  22884. eleInnerWidth = ele.clientWidth;
  22885. var borderTopNum = getPxValue(borderTopWidth);
  22886. var borderBottomNum = getPxValue(borderBottomWidth);
  22887. var borderLeftNum = getPxValue(borderLeftWidth);
  22888. var borderRightNum = getPxValue(borderRightWidth);
  22889. var scaleX = toNum(Math.round(eleRect.width / eleOutWidth * 1000) / 1000);
  22890. var scaleY = toNum(Math.round(eleRect.height / eleOutHeight * 1000) / 1000);
  22891. // Original visible area
  22892. var eleScrollWidth = (eleOutWidth - eleInnerWidth - borderLeftNum - borderRightNum) * scaleX;
  22893. var eleScrollHeight = (eleOutHeight - eleInnerHeight - borderTopNum - borderBottomNum) * scaleY;
  22894. // Cut border size
  22895. var scaledBorderTopWidth = borderTopNum * scaleY;
  22896. var scaledBorderBottomWidth = borderBottomNum * scaleY;
  22897. var scaledBorderLeftWidth = borderLeftNum * scaleX;
  22898. var scaledBorderRightWidth = borderRightNum * scaleX;
  22899. // Clip margin
  22900. var clipMarginWidth = 0;
  22901. var clipMarginHeight = 0;
  22902. if (overflow === 'clip') {
  22903. var clipNum = getPxValue(overflowClipMargin);
  22904. clipMarginWidth = clipNum * scaleX;
  22905. clipMarginHeight = clipNum * scaleY;
  22906. }
  22907. // Region
  22908. var eleLeft = eleRect.x + scaledBorderLeftWidth - clipMarginWidth;
  22909. var eleTop = eleRect.y + scaledBorderTopWidth - clipMarginHeight;
  22910. var eleRight = eleLeft + eleRect.width + 2 * clipMarginWidth - scaledBorderLeftWidth - scaledBorderRightWidth - eleScrollWidth;
  22911. var eleBottom = eleTop + eleRect.height + 2 * clipMarginHeight - scaledBorderTopWidth - scaledBorderBottomWidth - eleScrollHeight;
  22912. visibleArea.left = Math.max(visibleArea.left, eleLeft);
  22913. visibleArea.top = Math.max(visibleArea.top, eleTop);
  22914. visibleArea.right = Math.min(visibleArea.right, eleRight);
  22915. visibleArea.bottom = Math.min(visibleArea.bottom, eleBottom);
  22916. });
  22917. return visibleArea;
  22918. }
  22919. ;// ./node_modules/@rc-component/trigger/es/hooks/useAlign.js
  22920. function getUnitOffset(size) {
  22921. var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  22922. var offsetStr = "".concat(offset);
  22923. var cells = offsetStr.match(/^(.*)\%$/);
  22924. if (cells) {
  22925. return size * (parseFloat(cells[1]) / 100);
  22926. }
  22927. return parseFloat(offsetStr);
  22928. }
  22929. function getNumberOffset(rect, offset) {
  22930. var _ref = offset || [],
  22931. _ref2 = (0,slicedToArray["default"])(_ref, 2),
  22932. offsetX = _ref2[0],
  22933. offsetY = _ref2[1];
  22934. return [getUnitOffset(rect.width, offsetX), getUnitOffset(rect.height, offsetY)];
  22935. }
  22936. function splitPoints() {
  22937. var points = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  22938. return [points[0], points[1]];
  22939. }
  22940. function getAlignPoint(rect, points) {
  22941. var topBottom = points[0];
  22942. var leftRight = points[1];
  22943. var x;
  22944. var y;
  22945. // Top & Bottom
  22946. if (topBottom === 't') {
  22947. y = rect.y;
  22948. } else if (topBottom === 'b') {
  22949. y = rect.y + rect.height;
  22950. } else {
  22951. y = rect.y + rect.height / 2;
  22952. }
  22953. // Left & Right
  22954. if (leftRight === 'l') {
  22955. x = rect.x;
  22956. } else if (leftRight === 'r') {
  22957. x = rect.x + rect.width;
  22958. } else {
  22959. x = rect.x + rect.width / 2;
  22960. }
  22961. return {
  22962. x: x,
  22963. y: y
  22964. };
  22965. }
  22966. function reversePoints(points, index) {
  22967. var reverseMap = {
  22968. t: 'b',
  22969. b: 't',
  22970. l: 'r',
  22971. r: 'l'
  22972. };
  22973. return points.map(function (point, i) {
  22974. if (i === index) {
  22975. return reverseMap[point] || 'c';
  22976. }
  22977. return point;
  22978. }).join('');
  22979. }
  22980. function useAlign(open, popupEle, target, placement, builtinPlacements, popupAlign, onPopupAlign) {
  22981. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({
  22982. ready: false,
  22983. offsetX: 0,
  22984. offsetY: 0,
  22985. offsetR: 0,
  22986. offsetB: 0,
  22987. arrowX: 0,
  22988. arrowY: 0,
  22989. scaleX: 1,
  22990. scaleY: 1,
  22991. align: builtinPlacements[placement] || {}
  22992. }),
  22993. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  22994. offsetInfo = _React$useState2[0],
  22995. setOffsetInfo = _React$useState2[1];
  22996. var alignCountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
  22997. var scrollerList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  22998. if (!popupEle) {
  22999. return [];
  23000. }
  23001. return collectScroller(popupEle);
  23002. }, [popupEle]);
  23003. // ========================= Flip ==========================
  23004. // We will memo flip info.
  23005. // If size change to make flip, it will memo the flip info and use it in next align.
  23006. var prevFlipRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  23007. var resetFlipCache = function resetFlipCache() {
  23008. prevFlipRef.current = {};
  23009. };
  23010. if (!open) {
  23011. resetFlipCache();
  23012. }
  23013. // ========================= Align =========================
  23014. var onAlign = (0,useEvent["default"])(function () {
  23015. if (popupEle && target && open) {
  23016. var _popupElement$parentE, _popupRect$x, _popupRect$y, _popupElement$parentE2;
  23017. var popupElement = popupEle;
  23018. var doc = popupElement.ownerDocument;
  23019. var win = getWin(popupElement);
  23020. var _win$getComputedStyle = win.getComputedStyle(popupElement),
  23021. popupPosition = _win$getComputedStyle.position;
  23022. var originLeft = popupElement.style.left;
  23023. var originTop = popupElement.style.top;
  23024. var originRight = popupElement.style.right;
  23025. var originBottom = popupElement.style.bottom;
  23026. var originOverflow = popupElement.style.overflow;
  23027. // Placement
  23028. var placementInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, builtinPlacements[placement]), popupAlign);
  23029. // placeholder element
  23030. var placeholderElement = doc.createElement('div');
  23031. (_popupElement$parentE = popupElement.parentElement) === null || _popupElement$parentE === void 0 || _popupElement$parentE.appendChild(placeholderElement);
  23032. placeholderElement.style.left = "".concat(popupElement.offsetLeft, "px");
  23033. placeholderElement.style.top = "".concat(popupElement.offsetTop, "px");
  23034. placeholderElement.style.position = popupPosition;
  23035. placeholderElement.style.height = "".concat(popupElement.offsetHeight, "px");
  23036. placeholderElement.style.width = "".concat(popupElement.offsetWidth, "px");
  23037. // Reset first
  23038. popupElement.style.left = '0';
  23039. popupElement.style.top = '0';
  23040. popupElement.style.right = 'auto';
  23041. popupElement.style.bottom = 'auto';
  23042. popupElement.style.overflow = 'hidden';
  23043. // Calculate align style, we should consider `transform` case
  23044. var targetRect;
  23045. if (Array.isArray(target)) {
  23046. targetRect = {
  23047. x: target[0],
  23048. y: target[1],
  23049. width: 0,
  23050. height: 0
  23051. };
  23052. } else {
  23053. var _rect$x, _rect$y;
  23054. var rect = target.getBoundingClientRect();
  23055. rect.x = (_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left;
  23056. rect.y = (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top;
  23057. targetRect = {
  23058. x: rect.x,
  23059. y: rect.y,
  23060. width: rect.width,
  23061. height: rect.height
  23062. };
  23063. }
  23064. var popupRect = popupElement.getBoundingClientRect();
  23065. var _win$getComputedStyle2 = win.getComputedStyle(popupElement),
  23066. height = _win$getComputedStyle2.height,
  23067. width = _win$getComputedStyle2.width;
  23068. popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left;
  23069. popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;
  23070. var _doc$documentElement = doc.documentElement,
  23071. clientWidth = _doc$documentElement.clientWidth,
  23072. clientHeight = _doc$documentElement.clientHeight,
  23073. scrollWidth = _doc$documentElement.scrollWidth,
  23074. scrollHeight = _doc$documentElement.scrollHeight,
  23075. scrollTop = _doc$documentElement.scrollTop,
  23076. scrollLeft = _doc$documentElement.scrollLeft;
  23077. var popupHeight = popupRect.height;
  23078. var popupWidth = popupRect.width;
  23079. var targetHeight = targetRect.height;
  23080. var targetWidth = targetRect.width;
  23081. // Get bounding of visible area
  23082. var visibleRegion = {
  23083. left: 0,
  23084. top: 0,
  23085. right: clientWidth,
  23086. bottom: clientHeight
  23087. };
  23088. var scrollRegion = {
  23089. left: -scrollLeft,
  23090. top: -scrollTop,
  23091. right: scrollWidth - scrollLeft,
  23092. bottom: scrollHeight - scrollTop
  23093. };
  23094. var htmlRegion = placementInfo.htmlRegion;
  23095. var VISIBLE = 'visible';
  23096. var VISIBLE_FIRST = 'visibleFirst';
  23097. if (htmlRegion !== 'scroll' && htmlRegion !== VISIBLE_FIRST) {
  23098. htmlRegion = VISIBLE;
  23099. }
  23100. var isVisibleFirst = htmlRegion === VISIBLE_FIRST;
  23101. var scrollRegionArea = getVisibleArea(scrollRegion, scrollerList);
  23102. var visibleRegionArea = getVisibleArea(visibleRegion, scrollerList);
  23103. var visibleArea = htmlRegion === VISIBLE ? visibleRegionArea : scrollRegionArea;
  23104. // When set to `visibleFirst`,
  23105. // the check `adjust` logic will use `visibleRegion` for check first.
  23106. var adjustCheckVisibleArea = isVisibleFirst ? visibleRegionArea : visibleArea;
  23107. // Record right & bottom align data
  23108. popupElement.style.left = 'auto';
  23109. popupElement.style.top = 'auto';
  23110. popupElement.style.right = '0';
  23111. popupElement.style.bottom = '0';
  23112. var popupMirrorRect = popupElement.getBoundingClientRect();
  23113. // Reset back
  23114. popupElement.style.left = originLeft;
  23115. popupElement.style.top = originTop;
  23116. popupElement.style.right = originRight;
  23117. popupElement.style.bottom = originBottom;
  23118. popupElement.style.overflow = originOverflow;
  23119. (_popupElement$parentE2 = popupElement.parentElement) === null || _popupElement$parentE2 === void 0 || _popupElement$parentE2.removeChild(placeholderElement);
  23120. // Calculate scale
  23121. var _scaleX = toNum(Math.round(popupWidth / parseFloat(width) * 1000) / 1000);
  23122. var _scaleY = toNum(Math.round(popupHeight / parseFloat(height) * 1000) / 1000);
  23123. // No need to align since it's not visible in view
  23124. if (_scaleX === 0 || _scaleY === 0 || (0,findDOMNode.isDOM)(target) && !isVisible(target)) {
  23125. return;
  23126. }
  23127. // Offset
  23128. var offset = placementInfo.offset,
  23129. targetOffset = placementInfo.targetOffset;
  23130. var _getNumberOffset = getNumberOffset(popupRect, offset),
  23131. _getNumberOffset2 = (0,slicedToArray["default"])(_getNumberOffset, 2),
  23132. popupOffsetX = _getNumberOffset2[0],
  23133. popupOffsetY = _getNumberOffset2[1];
  23134. var _getNumberOffset3 = getNumberOffset(targetRect, targetOffset),
  23135. _getNumberOffset4 = (0,slicedToArray["default"])(_getNumberOffset3, 2),
  23136. targetOffsetX = _getNumberOffset4[0],
  23137. targetOffsetY = _getNumberOffset4[1];
  23138. targetRect.x -= targetOffsetX;
  23139. targetRect.y -= targetOffsetY;
  23140. // Points
  23141. var _ref3 = placementInfo.points || [],
  23142. _ref4 = (0,slicedToArray["default"])(_ref3, 2),
  23143. popupPoint = _ref4[0],
  23144. targetPoint = _ref4[1];
  23145. var targetPoints = splitPoints(targetPoint);
  23146. var popupPoints = splitPoints(popupPoint);
  23147. var targetAlignPoint = getAlignPoint(targetRect, targetPoints);
  23148. var popupAlignPoint = getAlignPoint(popupRect, popupPoints);
  23149. // Real align info may not same as origin one
  23150. var nextAlignInfo = (0,objectSpread2["default"])({}, placementInfo);
  23151. // Next Offset
  23152. var nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX;
  23153. var nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY;
  23154. // ============== Intersection ===============
  23155. // Get area by position. Used for check if flip area is better
  23156. function getIntersectionVisibleArea(offsetX, offsetY) {
  23157. var area = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : visibleArea;
  23158. var l = popupRect.x + offsetX;
  23159. var t = popupRect.y + offsetY;
  23160. var r = l + popupWidth;
  23161. var b = t + popupHeight;
  23162. var visibleL = Math.max(l, area.left);
  23163. var visibleT = Math.max(t, area.top);
  23164. var visibleR = Math.min(r, area.right);
  23165. var visibleB = Math.min(b, area.bottom);
  23166. return Math.max(0, (visibleR - visibleL) * (visibleB - visibleT));
  23167. }
  23168. var originIntersectionVisibleArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY);
  23169. // As `visibleFirst`, we prepare this for check
  23170. var originIntersectionRecommendArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY, visibleRegionArea);
  23171. // ========================== Overflow ===========================
  23172. var targetAlignPointTL = getAlignPoint(targetRect, ['t', 'l']);
  23173. var popupAlignPointTL = getAlignPoint(popupRect, ['t', 'l']);
  23174. var targetAlignPointBR = getAlignPoint(targetRect, ['b', 'r']);
  23175. var popupAlignPointBR = getAlignPoint(popupRect, ['b', 'r']);
  23176. var overflow = placementInfo.overflow || {};
  23177. var adjustX = overflow.adjustX,
  23178. adjustY = overflow.adjustY,
  23179. shiftX = overflow.shiftX,
  23180. shiftY = overflow.shiftY;
  23181. var supportAdjust = function supportAdjust(val) {
  23182. if (typeof val === 'boolean') {
  23183. return val;
  23184. }
  23185. return val >= 0;
  23186. };
  23187. // Prepare position
  23188. var nextPopupY;
  23189. var nextPopupBottom;
  23190. var nextPopupX;
  23191. var nextPopupRight;
  23192. function syncNextPopupPosition() {
  23193. nextPopupY = popupRect.y + nextOffsetY;
  23194. nextPopupBottom = nextPopupY + popupHeight;
  23195. nextPopupX = popupRect.x + nextOffsetX;
  23196. nextPopupRight = nextPopupX + popupWidth;
  23197. }
  23198. syncNextPopupPosition();
  23199. // >>>>>>>>>> Top & Bottom
  23200. var needAdjustY = supportAdjust(adjustY);
  23201. var sameTB = popupPoints[0] === targetPoints[0];
  23202. // Bottom to Top
  23203. if (needAdjustY && popupPoints[0] === 't' && (nextPopupBottom > adjustCheckVisibleArea.bottom || prevFlipRef.current.bt)) {
  23204. var tmpNextOffsetY = nextOffsetY;
  23205. if (sameTB) {
  23206. tmpNextOffsetY -= popupHeight - targetHeight;
  23207. } else {
  23208. tmpNextOffsetY = targetAlignPointTL.y - popupAlignPointBR.y - popupOffsetY;
  23209. }
  23210. var newVisibleArea = getIntersectionVisibleArea(nextOffsetX, tmpNextOffsetY);
  23211. var newVisibleRecommendArea = getIntersectionVisibleArea(nextOffsetX, tmpNextOffsetY, visibleRegionArea);
  23212. if (
  23213. // Of course use larger one
  23214. newVisibleArea > originIntersectionVisibleArea || newVisibleArea === originIntersectionVisibleArea && (!isVisibleFirst ||
  23215. // Choose recommend one
  23216. newVisibleRecommendArea >= originIntersectionRecommendArea)) {
  23217. prevFlipRef.current.bt = true;
  23218. nextOffsetY = tmpNextOffsetY;
  23219. popupOffsetY = -popupOffsetY;
  23220. nextAlignInfo.points = [reversePoints(popupPoints, 0), reversePoints(targetPoints, 0)];
  23221. } else {
  23222. prevFlipRef.current.bt = false;
  23223. }
  23224. }
  23225. // Top to Bottom
  23226. if (needAdjustY && popupPoints[0] === 'b' && (nextPopupY < adjustCheckVisibleArea.top || prevFlipRef.current.tb)) {
  23227. var _tmpNextOffsetY = nextOffsetY;
  23228. if (sameTB) {
  23229. _tmpNextOffsetY += popupHeight - targetHeight;
  23230. } else {
  23231. _tmpNextOffsetY = targetAlignPointBR.y - popupAlignPointTL.y - popupOffsetY;
  23232. }
  23233. var _newVisibleArea = getIntersectionVisibleArea(nextOffsetX, _tmpNextOffsetY);
  23234. var _newVisibleRecommendArea = getIntersectionVisibleArea(nextOffsetX, _tmpNextOffsetY, visibleRegionArea);
  23235. if (
  23236. // Of course use larger one
  23237. _newVisibleArea > originIntersectionVisibleArea || _newVisibleArea === originIntersectionVisibleArea && (!isVisibleFirst ||
  23238. // Choose recommend one
  23239. _newVisibleRecommendArea >= originIntersectionRecommendArea)) {
  23240. prevFlipRef.current.tb = true;
  23241. nextOffsetY = _tmpNextOffsetY;
  23242. popupOffsetY = -popupOffsetY;
  23243. nextAlignInfo.points = [reversePoints(popupPoints, 0), reversePoints(targetPoints, 0)];
  23244. } else {
  23245. prevFlipRef.current.tb = false;
  23246. }
  23247. }
  23248. // >>>>>>>>>> Left & Right
  23249. var needAdjustX = supportAdjust(adjustX);
  23250. // >>>>> Flip
  23251. var sameLR = popupPoints[1] === targetPoints[1];
  23252. // Right to Left
  23253. if (needAdjustX && popupPoints[1] === 'l' && (nextPopupRight > adjustCheckVisibleArea.right || prevFlipRef.current.rl)) {
  23254. var tmpNextOffsetX = nextOffsetX;
  23255. if (sameLR) {
  23256. tmpNextOffsetX -= popupWidth - targetWidth;
  23257. } else {
  23258. tmpNextOffsetX = targetAlignPointTL.x - popupAlignPointBR.x - popupOffsetX;
  23259. }
  23260. var _newVisibleArea2 = getIntersectionVisibleArea(tmpNextOffsetX, nextOffsetY);
  23261. var _newVisibleRecommendArea2 = getIntersectionVisibleArea(tmpNextOffsetX, nextOffsetY, visibleRegionArea);
  23262. if (
  23263. // Of course use larger one
  23264. _newVisibleArea2 > originIntersectionVisibleArea || _newVisibleArea2 === originIntersectionVisibleArea && (!isVisibleFirst ||
  23265. // Choose recommend one
  23266. _newVisibleRecommendArea2 >= originIntersectionRecommendArea)) {
  23267. prevFlipRef.current.rl = true;
  23268. nextOffsetX = tmpNextOffsetX;
  23269. popupOffsetX = -popupOffsetX;
  23270. nextAlignInfo.points = [reversePoints(popupPoints, 1), reversePoints(targetPoints, 1)];
  23271. } else {
  23272. prevFlipRef.current.rl = false;
  23273. }
  23274. }
  23275. // Left to Right
  23276. if (needAdjustX && popupPoints[1] === 'r' && (nextPopupX < adjustCheckVisibleArea.left || prevFlipRef.current.lr)) {
  23277. var _tmpNextOffsetX = nextOffsetX;
  23278. if (sameLR) {
  23279. _tmpNextOffsetX += popupWidth - targetWidth;
  23280. } else {
  23281. _tmpNextOffsetX = targetAlignPointBR.x - popupAlignPointTL.x - popupOffsetX;
  23282. }
  23283. var _newVisibleArea3 = getIntersectionVisibleArea(_tmpNextOffsetX, nextOffsetY);
  23284. var _newVisibleRecommendArea3 = getIntersectionVisibleArea(_tmpNextOffsetX, nextOffsetY, visibleRegionArea);
  23285. if (
  23286. // Of course use larger one
  23287. _newVisibleArea3 > originIntersectionVisibleArea || _newVisibleArea3 === originIntersectionVisibleArea && (!isVisibleFirst ||
  23288. // Choose recommend one
  23289. _newVisibleRecommendArea3 >= originIntersectionRecommendArea)) {
  23290. prevFlipRef.current.lr = true;
  23291. nextOffsetX = _tmpNextOffsetX;
  23292. popupOffsetX = -popupOffsetX;
  23293. nextAlignInfo.points = [reversePoints(popupPoints, 1), reversePoints(targetPoints, 1)];
  23294. } else {
  23295. prevFlipRef.current.lr = false;
  23296. }
  23297. }
  23298. // ============================ Shift ============================
  23299. syncNextPopupPosition();
  23300. var numShiftX = shiftX === true ? 0 : shiftX;
  23301. if (typeof numShiftX === 'number') {
  23302. // Left
  23303. if (nextPopupX < visibleRegionArea.left) {
  23304. nextOffsetX -= nextPopupX - visibleRegionArea.left - popupOffsetX;
  23305. if (targetRect.x + targetWidth < visibleRegionArea.left + numShiftX) {
  23306. nextOffsetX += targetRect.x - visibleRegionArea.left + targetWidth - numShiftX;
  23307. }
  23308. }
  23309. // Right
  23310. if (nextPopupRight > visibleRegionArea.right) {
  23311. nextOffsetX -= nextPopupRight - visibleRegionArea.right - popupOffsetX;
  23312. if (targetRect.x > visibleRegionArea.right - numShiftX) {
  23313. nextOffsetX += targetRect.x - visibleRegionArea.right + numShiftX;
  23314. }
  23315. }
  23316. }
  23317. var numShiftY = shiftY === true ? 0 : shiftY;
  23318. if (typeof numShiftY === 'number') {
  23319. // Top
  23320. if (nextPopupY < visibleRegionArea.top) {
  23321. nextOffsetY -= nextPopupY - visibleRegionArea.top - popupOffsetY;
  23322. // When target if far away from visible area
  23323. // Stop shift
  23324. if (targetRect.y + targetHeight < visibleRegionArea.top + numShiftY) {
  23325. nextOffsetY += targetRect.y - visibleRegionArea.top + targetHeight - numShiftY;
  23326. }
  23327. }
  23328. // Bottom
  23329. if (nextPopupBottom > visibleRegionArea.bottom) {
  23330. nextOffsetY -= nextPopupBottom - visibleRegionArea.bottom - popupOffsetY;
  23331. if (targetRect.y > visibleRegionArea.bottom - numShiftY) {
  23332. nextOffsetY += targetRect.y - visibleRegionArea.bottom + numShiftY;
  23333. }
  23334. }
  23335. }
  23336. // ============================ Arrow ============================
  23337. // Arrow center align
  23338. var popupLeft = popupRect.x + nextOffsetX;
  23339. var popupRight = popupLeft + popupWidth;
  23340. var popupTop = popupRect.y + nextOffsetY;
  23341. var popupBottom = popupTop + popupHeight;
  23342. var targetLeft = targetRect.x;
  23343. var targetRight = targetLeft + targetWidth;
  23344. var targetTop = targetRect.y;
  23345. var targetBottom = targetTop + targetHeight;
  23346. var maxLeft = Math.max(popupLeft, targetLeft);
  23347. var minRight = Math.min(popupRight, targetRight);
  23348. var xCenter = (maxLeft + minRight) / 2;
  23349. var nextArrowX = xCenter - popupLeft;
  23350. var maxTop = Math.max(popupTop, targetTop);
  23351. var minBottom = Math.min(popupBottom, targetBottom);
  23352. var yCenter = (maxTop + minBottom) / 2;
  23353. var nextArrowY = yCenter - popupTop;
  23354. onPopupAlign === null || onPopupAlign === void 0 || onPopupAlign(popupEle, nextAlignInfo);
  23355. // Additional calculate right & bottom position
  23356. var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
  23357. var offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
  23358. if (_scaleX === 1) {
  23359. nextOffsetX = Math.round(nextOffsetX);
  23360. offsetX4Right = Math.round(offsetX4Right);
  23361. }
  23362. if (_scaleY === 1) {
  23363. nextOffsetY = Math.round(nextOffsetY);
  23364. offsetY4Bottom = Math.round(offsetY4Bottom);
  23365. }
  23366. var nextOffsetInfo = {
  23367. ready: true,
  23368. offsetX: nextOffsetX / _scaleX,
  23369. offsetY: nextOffsetY / _scaleY,
  23370. offsetR: offsetX4Right / _scaleX,
  23371. offsetB: offsetY4Bottom / _scaleY,
  23372. arrowX: nextArrowX / _scaleX,
  23373. arrowY: nextArrowY / _scaleY,
  23374. scaleX: _scaleX,
  23375. scaleY: _scaleY,
  23376. align: nextAlignInfo
  23377. };
  23378. setOffsetInfo(nextOffsetInfo);
  23379. }
  23380. });
  23381. var triggerAlign = function triggerAlign() {
  23382. alignCountRef.current += 1;
  23383. var id = alignCountRef.current;
  23384. // Merge all align requirement into one frame
  23385. Promise.resolve().then(function () {
  23386. if (alignCountRef.current === id) {
  23387. onAlign();
  23388. }
  23389. });
  23390. };
  23391. // Reset ready status when placement & open changed
  23392. var resetReady = function resetReady() {
  23393. setOffsetInfo(function (ori) {
  23394. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, ori), {}, {
  23395. ready: false
  23396. });
  23397. });
  23398. };
  23399. (0,useLayoutEffect["default"])(resetReady, [placement]);
  23400. (0,useLayoutEffect["default"])(function () {
  23401. if (!open) {
  23402. resetReady();
  23403. }
  23404. }, [open]);
  23405. return [offsetInfo.ready, offsetInfo.offsetX, offsetInfo.offsetY, offsetInfo.offsetR, offsetInfo.offsetB, offsetInfo.arrowX, offsetInfo.arrowY, offsetInfo.scaleX, offsetInfo.scaleY, offsetInfo.align, triggerAlign];
  23406. }
  23407. ;// ./node_modules/@rc-component/trigger/es/hooks/useWatch.js
  23408. function useWatch_useWatch(open, target, popup, onAlign, onScroll) {
  23409. (0,useLayoutEffect["default"])(function () {
  23410. if (open && target && popup) {
  23411. var targetElement = target;
  23412. var popupElement = popup;
  23413. var targetScrollList = collectScroller(targetElement);
  23414. var popupScrollList = collectScroller(popupElement);
  23415. var win = getWin(popupElement);
  23416. var mergedList = new Set([win].concat((0,toConsumableArray["default"])(targetScrollList), (0,toConsumableArray["default"])(popupScrollList)));
  23417. function notifyScroll() {
  23418. onAlign();
  23419. onScroll();
  23420. }
  23421. mergedList.forEach(function (scroller) {
  23422. scroller.addEventListener('scroll', notifyScroll, {
  23423. passive: true
  23424. });
  23425. });
  23426. win.addEventListener('resize', notifyScroll, {
  23427. passive: true
  23428. });
  23429. // First time always do align
  23430. onAlign();
  23431. return function () {
  23432. mergedList.forEach(function (scroller) {
  23433. scroller.removeEventListener('scroll', notifyScroll);
  23434. win.removeEventListener('resize', notifyScroll);
  23435. });
  23436. };
  23437. }
  23438. }, [open, target, popup]);
  23439. }
  23440. ;// ./node_modules/@rc-component/trigger/es/hooks/useWinClick.js
  23441. function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen) {
  23442. var openRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(open);
  23443. openRef.current = open;
  23444. var popupPointerDownRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  23445. // Click to hide is special action since click popup element should not hide
  23446. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  23447. if (clickToHide && popupEle && (!mask || maskClosable)) {
  23448. var onPointerDown = function onPointerDown() {
  23449. popupPointerDownRef.current = false;
  23450. };
  23451. var onTriggerClose = function onTriggerClose(e) {
  23452. var _e$composedPath;
  23453. if (openRef.current && !inPopupOrChild(((_e$composedPath = e.composedPath) === null || _e$composedPath === void 0 || (_e$composedPath = _e$composedPath.call(e)) === null || _e$composedPath === void 0 ? void 0 : _e$composedPath[0]) || e.target) && !popupPointerDownRef.current) {
  23454. triggerOpen(false);
  23455. }
  23456. };
  23457. var win = getWin(popupEle);
  23458. win.addEventListener('pointerdown', onPointerDown, true);
  23459. win.addEventListener('mousedown', onTriggerClose, true);
  23460. win.addEventListener('contextmenu', onTriggerClose, true);
  23461. // shadow root
  23462. var targetShadowRoot = (0,shadow.getShadowRoot)(targetEle);
  23463. if (targetShadowRoot) {
  23464. targetShadowRoot.addEventListener('mousedown', onTriggerClose, true);
  23465. targetShadowRoot.addEventListener('contextmenu', onTriggerClose, true);
  23466. }
  23467. // Warning if target and popup not in same root
  23468. if (true) {
  23469. var _targetEle$getRootNod, _popupEle$getRootNode;
  23470. var targetRoot = targetEle === null || targetEle === void 0 || (_targetEle$getRootNod = targetEle.getRootNode) === null || _targetEle$getRootNod === void 0 ? void 0 : _targetEle$getRootNod.call(targetEle);
  23471. var popupRoot = (_popupEle$getRootNode = popupEle.getRootNode) === null || _popupEle$getRootNode === void 0 ? void 0 : _popupEle$getRootNode.call(popupEle);
  23472. (0,warning.warning)(targetRoot === popupRoot, "trigger element and popup element should in same shadow root.");
  23473. }
  23474. return function () {
  23475. win.removeEventListener('pointerdown', onPointerDown, true);
  23476. win.removeEventListener('mousedown', onTriggerClose, true);
  23477. win.removeEventListener('contextmenu', onTriggerClose, true);
  23478. if (targetShadowRoot) {
  23479. targetShadowRoot.removeEventListener('mousedown', onTriggerClose, true);
  23480. targetShadowRoot.removeEventListener('contextmenu', onTriggerClose, true);
  23481. }
  23482. };
  23483. }
  23484. }, [clickToHide, targetEle, popupEle, mask, maskClosable]);
  23485. function onPopupPointerDown() {
  23486. popupPointerDownRef.current = true;
  23487. }
  23488. return onPopupPointerDown;
  23489. }
  23490. ;// ./node_modules/@rc-component/trigger/es/index.js
  23491. var es_excluded = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
  23492. // Removed Props List
  23493. // Seems this can be auto
  23494. // getDocument?: (element?: HTMLElement) => Document;
  23495. // New version will not wrap popup with `rc-trigger-popup-content` when multiple children
  23496. function generateTrigger() {
  23497. var PortalComponent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : portal_es;
  23498. var Trigger = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  23499. var _props$prefixCls = props.prefixCls,
  23500. prefixCls = _props$prefixCls === void 0 ? 'rc-trigger-popup' : _props$prefixCls,
  23501. children = props.children,
  23502. _props$action = props.action,
  23503. action = _props$action === void 0 ? 'hover' : _props$action,
  23504. showAction = props.showAction,
  23505. hideAction = props.hideAction,
  23506. popupVisible = props.popupVisible,
  23507. defaultPopupVisible = props.defaultPopupVisible,
  23508. onPopupVisibleChange = props.onPopupVisibleChange,
  23509. afterPopupVisibleChange = props.afterPopupVisibleChange,
  23510. mouseEnterDelay = props.mouseEnterDelay,
  23511. _props$mouseLeaveDela = props.mouseLeaveDelay,
  23512. mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
  23513. focusDelay = props.focusDelay,
  23514. blurDelay = props.blurDelay,
  23515. mask = props.mask,
  23516. _props$maskClosable = props.maskClosable,
  23517. maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
  23518. getPopupContainer = props.getPopupContainer,
  23519. forceRender = props.forceRender,
  23520. autoDestroy = props.autoDestroy,
  23521. destroyPopupOnHide = props.destroyPopupOnHide,
  23522. popup = props.popup,
  23523. popupClassName = props.popupClassName,
  23524. popupStyle = props.popupStyle,
  23525. popupPlacement = props.popupPlacement,
  23526. _props$builtinPlaceme = props.builtinPlacements,
  23527. builtinPlacements = _props$builtinPlaceme === void 0 ? {} : _props$builtinPlaceme,
  23528. popupAlign = props.popupAlign,
  23529. zIndex = props.zIndex,
  23530. stretch = props.stretch,
  23531. getPopupClassNameFromAlign = props.getPopupClassNameFromAlign,
  23532. fresh = props.fresh,
  23533. alignPoint = props.alignPoint,
  23534. onPopupClick = props.onPopupClick,
  23535. onPopupAlign = props.onPopupAlign,
  23536. arrow = props.arrow,
  23537. popupMotion = props.popupMotion,
  23538. maskMotion = props.maskMotion,
  23539. popupTransitionName = props.popupTransitionName,
  23540. popupAnimation = props.popupAnimation,
  23541. maskTransitionName = props.maskTransitionName,
  23542. maskAnimation = props.maskAnimation,
  23543. className = props.className,
  23544. getTriggerDOMNode = props.getTriggerDOMNode,
  23545. restProps = (0,objectWithoutProperties["default"])(props, es_excluded);
  23546. var mergedAutoDestroy = autoDestroy || destroyPopupOnHide || false;
  23547. // =========================== Mobile ===========================
  23548. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  23549. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  23550. mobile = _React$useState2[0],
  23551. setMobile = _React$useState2[1];
  23552. (0,useLayoutEffect["default"])(function () {
  23553. setMobile(isMobile());
  23554. }, []);
  23555. // ========================== Context ===========================
  23556. var subPopupElements = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  23557. var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_context);
  23558. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  23559. return {
  23560. registerSubPopup: function registerSubPopup(id, subPopupEle) {
  23561. subPopupElements.current[id] = subPopupEle;
  23562. parentContext === null || parentContext === void 0 || parentContext.registerSubPopup(id, subPopupEle);
  23563. }
  23564. };
  23565. }, [parentContext]);
  23566. // =========================== Popup ============================
  23567. var id = hooks_useId();
  23568. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  23569. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  23570. popupEle = _React$useState4[0],
  23571. setPopupEle = _React$useState4[1];
  23572. // Used for forwardRef popup. Not use internal
  23573. var externalPopupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  23574. var setPopupRef = (0,useEvent["default"])(function (node) {
  23575. externalPopupRef.current = node;
  23576. if ((0,findDOMNode.isDOM)(node) && popupEle !== node) {
  23577. setPopupEle(node);
  23578. }
  23579. parentContext === null || parentContext === void 0 || parentContext.registerSubPopup(id, node);
  23580. });
  23581. // =========================== Target ===========================
  23582. // Use state to control here since `useRef` update not trigger render
  23583. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  23584. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  23585. targetEle = _React$useState6[0],
  23586. setTargetEle = _React$useState6[1];
  23587. // Used for forwardRef target. Not use internal
  23588. var externalForwardRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  23589. var setTargetRef = (0,useEvent["default"])(function (node) {
  23590. if ((0,findDOMNode.isDOM)(node) && targetEle !== node) {
  23591. setTargetEle(node);
  23592. externalForwardRef.current = node;
  23593. }
  23594. });
  23595. // ========================== Children ==========================
  23596. var child = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children);
  23597. var originChildProps = (child === null || child === void 0 ? void 0 : child.props) || {};
  23598. var cloneProps = {};
  23599. var inPopupOrChild = (0,useEvent["default"])(function (ele) {
  23600. var _getShadowRoot, _getShadowRoot2;
  23601. var childDOM = targetEle;
  23602. return (childDOM === null || childDOM === void 0 ? void 0 : childDOM.contains(ele)) || ((_getShadowRoot = (0,shadow.getShadowRoot)(childDOM)) === null || _getShadowRoot === void 0 ? void 0 : _getShadowRoot.host) === ele || ele === childDOM || (popupEle === null || popupEle === void 0 ? void 0 : popupEle.contains(ele)) || ((_getShadowRoot2 = (0,shadow.getShadowRoot)(popupEle)) === null || _getShadowRoot2 === void 0 ? void 0 : _getShadowRoot2.host) === ele || ele === popupEle || Object.values(subPopupElements.current).some(function (subPopupEle) {
  23603. return (subPopupEle === null || subPopupEle === void 0 ? void 0 : subPopupEle.contains(ele)) || ele === subPopupEle;
  23604. });
  23605. });
  23606. // =========================== Motion ===========================
  23607. var mergePopupMotion = es_util_getMotion(prefixCls, popupMotion, popupAnimation, popupTransitionName);
  23608. var mergeMaskMotion = es_util_getMotion(prefixCls, maskMotion, maskAnimation, maskTransitionName);
  23609. // ============================ Open ============================
  23610. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(defaultPopupVisible || false),
  23611. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  23612. internalOpen = _React$useState8[0],
  23613. setInternalOpen = _React$useState8[1];
  23614. // Render still use props as first priority
  23615. var mergedOpen = popupVisible !== null && popupVisible !== void 0 ? popupVisible : internalOpen;
  23616. // We use effect sync here in case `popupVisible` back to `undefined`
  23617. var setMergedOpen = (0,useEvent["default"])(function (nextOpen) {
  23618. if (popupVisible === undefined) {
  23619. setInternalOpen(nextOpen);
  23620. }
  23621. });
  23622. (0,useLayoutEffect["default"])(function () {
  23623. setInternalOpen(popupVisible || false);
  23624. }, [popupVisible]);
  23625. var openRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mergedOpen);
  23626. openRef.current = mergedOpen;
  23627. var lastTriggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  23628. lastTriggerRef.current = [];
  23629. var internalTriggerOpen = (0,useEvent["default"])(function (nextOpen) {
  23630. var _lastTriggerRef$curre;
  23631. setMergedOpen(nextOpen);
  23632. // Enter or Pointer will both trigger open state change
  23633. // We only need take one to avoid duplicated change event trigger
  23634. // Use `lastTriggerRef` to record last open type
  23635. if (((_lastTriggerRef$curre = lastTriggerRef.current[lastTriggerRef.current.length - 1]) !== null && _lastTriggerRef$curre !== void 0 ? _lastTriggerRef$curre : mergedOpen) !== nextOpen) {
  23636. lastTriggerRef.current.push(nextOpen);
  23637. onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextOpen);
  23638. }
  23639. });
  23640. // Trigger for delay
  23641. var delayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  23642. var clearDelay = function clearDelay() {
  23643. clearTimeout(delayRef.current);
  23644. };
  23645. var triggerOpen = function triggerOpen(nextOpen) {
  23646. var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  23647. clearDelay();
  23648. if (delay === 0) {
  23649. internalTriggerOpen(nextOpen);
  23650. } else {
  23651. delayRef.current = setTimeout(function () {
  23652. internalTriggerOpen(nextOpen);
  23653. }, delay * 1000);
  23654. }
  23655. };
  23656. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  23657. return clearDelay;
  23658. }, []);
  23659. // ========================== Motion ============================
  23660. var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  23661. _React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
  23662. inMotion = _React$useState10[0],
  23663. setInMotion = _React$useState10[1];
  23664. (0,useLayoutEffect["default"])(function (firstMount) {
  23665. if (!firstMount || mergedOpen) {
  23666. setInMotion(true);
  23667. }
  23668. }, [mergedOpen]);
  23669. var _React$useState11 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  23670. _React$useState12 = (0,slicedToArray["default"])(_React$useState11, 2),
  23671. motionPrepareResolve = _React$useState12[0],
  23672. setMotionPrepareResolve = _React$useState12[1];
  23673. // =========================== Align ============================
  23674. var _React$useState13 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  23675. _React$useState14 = (0,slicedToArray["default"])(_React$useState13, 2),
  23676. mousePos = _React$useState14[0],
  23677. setMousePos = _React$useState14[1];
  23678. var setMousePosByEvent = function setMousePosByEvent(event) {
  23679. setMousePos([event.clientX, event.clientY]);
  23680. };
  23681. var _useAlign = useAlign(mergedOpen, popupEle, alignPoint && mousePos !== null ? mousePos : targetEle, popupPlacement, builtinPlacements, popupAlign, onPopupAlign),
  23682. _useAlign2 = (0,slicedToArray["default"])(_useAlign, 11),
  23683. ready = _useAlign2[0],
  23684. offsetX = _useAlign2[1],
  23685. offsetY = _useAlign2[2],
  23686. offsetR = _useAlign2[3],
  23687. offsetB = _useAlign2[4],
  23688. arrowX = _useAlign2[5],
  23689. arrowY = _useAlign2[6],
  23690. scaleX = _useAlign2[7],
  23691. scaleY = _useAlign2[8],
  23692. alignInfo = _useAlign2[9],
  23693. onAlign = _useAlign2[10];
  23694. var _useAction = useAction(mobile, action, showAction, hideAction),
  23695. _useAction2 = (0,slicedToArray["default"])(_useAction, 2),
  23696. showActions = _useAction2[0],
  23697. hideActions = _useAction2[1];
  23698. var clickToShow = showActions.has('click');
  23699. var clickToHide = hideActions.has('click') || hideActions.has('contextMenu');
  23700. var triggerAlign = (0,useEvent["default"])(function () {
  23701. if (!inMotion) {
  23702. onAlign();
  23703. }
  23704. });
  23705. var onScroll = function onScroll() {
  23706. if (openRef.current && alignPoint && clickToHide) {
  23707. triggerOpen(false);
  23708. }
  23709. };
  23710. useWatch_useWatch(mergedOpen, targetEle, popupEle, triggerAlign, onScroll);
  23711. (0,useLayoutEffect["default"])(function () {
  23712. triggerAlign();
  23713. }, [mousePos, popupPlacement]);
  23714. // When no builtinPlacements and popupAlign changed
  23715. (0,useLayoutEffect["default"])(function () {
  23716. if (mergedOpen && !(builtinPlacements !== null && builtinPlacements !== void 0 && builtinPlacements[popupPlacement])) {
  23717. triggerAlign();
  23718. }
  23719. }, [JSON.stringify(popupAlign)]);
  23720. var alignedClassName = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  23721. var baseClassName = getAlignPopupClassName(builtinPlacements, prefixCls, alignInfo, alignPoint);
  23722. return classnames_default()(baseClassName, getPopupClassNameFromAlign === null || getPopupClassNameFromAlign === void 0 ? void 0 : getPopupClassNameFromAlign(alignInfo));
  23723. }, [alignInfo, getPopupClassNameFromAlign, builtinPlacements, prefixCls, alignPoint]);
  23724. // ============================ Refs ============================
  23725. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  23726. return {
  23727. nativeElement: externalForwardRef.current,
  23728. popupElement: externalPopupRef.current,
  23729. forceAlign: triggerAlign
  23730. };
  23731. });
  23732. // ========================== Stretch ===========================
  23733. var _React$useState15 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  23734. _React$useState16 = (0,slicedToArray["default"])(_React$useState15, 2),
  23735. targetWidth = _React$useState16[0],
  23736. setTargetWidth = _React$useState16[1];
  23737. var _React$useState17 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  23738. _React$useState18 = (0,slicedToArray["default"])(_React$useState17, 2),
  23739. targetHeight = _React$useState18[0],
  23740. setTargetHeight = _React$useState18[1];
  23741. var syncTargetSize = function syncTargetSize() {
  23742. if (stretch && targetEle) {
  23743. var rect = targetEle.getBoundingClientRect();
  23744. setTargetWidth(rect.width);
  23745. setTargetHeight(rect.height);
  23746. }
  23747. };
  23748. var onTargetResize = function onTargetResize() {
  23749. syncTargetSize();
  23750. triggerAlign();
  23751. };
  23752. // ========================== Motion ============================
  23753. var onVisibleChanged = function onVisibleChanged(visible) {
  23754. setInMotion(false);
  23755. onAlign();
  23756. afterPopupVisibleChange === null || afterPopupVisibleChange === void 0 || afterPopupVisibleChange(visible);
  23757. };
  23758. // We will trigger align when motion is in prepare
  23759. var onPrepare = function onPrepare() {
  23760. return new Promise(function (resolve) {
  23761. syncTargetSize();
  23762. setMotionPrepareResolve(function () {
  23763. return resolve;
  23764. });
  23765. });
  23766. };
  23767. (0,useLayoutEffect["default"])(function () {
  23768. if (motionPrepareResolve) {
  23769. onAlign();
  23770. motionPrepareResolve();
  23771. setMotionPrepareResolve(null);
  23772. }
  23773. }, [motionPrepareResolve]);
  23774. // =========================== Action ===========================
  23775. /**
  23776. * Util wrapper for trigger action
  23777. */
  23778. function wrapperAction(eventName, nextOpen, delay, preEvent) {
  23779. cloneProps[eventName] = function (event) {
  23780. var _originChildProps$eve;
  23781. preEvent === null || preEvent === void 0 || preEvent(event);
  23782. triggerOpen(nextOpen, delay);
  23783. // Pass to origin
  23784. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  23785. args[_key - 1] = arguments[_key];
  23786. }
  23787. (_originChildProps$eve = originChildProps[eventName]) === null || _originChildProps$eve === void 0 || _originChildProps$eve.call.apply(_originChildProps$eve, [originChildProps, event].concat(args));
  23788. };
  23789. }
  23790. // ======================= Action: Click ========================
  23791. if (clickToShow || clickToHide) {
  23792. cloneProps.onClick = function (event) {
  23793. var _originChildProps$onC;
  23794. if (openRef.current && clickToHide) {
  23795. triggerOpen(false);
  23796. } else if (!openRef.current && clickToShow) {
  23797. setMousePosByEvent(event);
  23798. triggerOpen(true);
  23799. }
  23800. // Pass to origin
  23801. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  23802. args[_key2 - 1] = arguments[_key2];
  23803. }
  23804. (_originChildProps$onC = originChildProps.onClick) === null || _originChildProps$onC === void 0 || _originChildProps$onC.call.apply(_originChildProps$onC, [originChildProps, event].concat(args));
  23805. };
  23806. }
  23807. // Click to hide is special action since click popup element should not hide
  23808. var onPopupPointerDown = useWinClick(mergedOpen, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen);
  23809. // ======================= Action: Hover ========================
  23810. var hoverToShow = showActions.has('hover');
  23811. var hoverToHide = hideActions.has('hover');
  23812. var onPopupMouseEnter;
  23813. var onPopupMouseLeave;
  23814. if (hoverToShow) {
  23815. // Compatible with old browser which not support pointer event
  23816. wrapperAction('onMouseEnter', true, mouseEnterDelay, function (event) {
  23817. setMousePosByEvent(event);
  23818. });
  23819. wrapperAction('onPointerEnter', true, mouseEnterDelay, function (event) {
  23820. setMousePosByEvent(event);
  23821. });
  23822. onPopupMouseEnter = function onPopupMouseEnter(event) {
  23823. // Only trigger re-open when popup is visible
  23824. if ((mergedOpen || inMotion) && popupEle !== null && popupEle !== void 0 && popupEle.contains(event.target)) {
  23825. triggerOpen(true, mouseEnterDelay);
  23826. }
  23827. };
  23828. // Align Point
  23829. if (alignPoint) {
  23830. cloneProps.onMouseMove = function (event) {
  23831. var _originChildProps$onM;
  23832. // setMousePosByEvent(event);
  23833. (_originChildProps$onM = originChildProps.onMouseMove) === null || _originChildProps$onM === void 0 || _originChildProps$onM.call(originChildProps, event);
  23834. };
  23835. }
  23836. }
  23837. if (hoverToHide) {
  23838. wrapperAction('onMouseLeave', false, mouseLeaveDelay);
  23839. wrapperAction('onPointerLeave', false, mouseLeaveDelay);
  23840. onPopupMouseLeave = function onPopupMouseLeave() {
  23841. triggerOpen(false, mouseLeaveDelay);
  23842. };
  23843. }
  23844. // ======================= Action: Focus ========================
  23845. if (showActions.has('focus')) {
  23846. wrapperAction('onFocus', true, focusDelay);
  23847. }
  23848. if (hideActions.has('focus')) {
  23849. wrapperAction('onBlur', false, blurDelay);
  23850. }
  23851. // ==================== Action: ContextMenu =====================
  23852. if (showActions.has('contextMenu')) {
  23853. cloneProps.onContextMenu = function (event) {
  23854. var _originChildProps$onC2;
  23855. if (openRef.current && hideActions.has('contextMenu')) {
  23856. triggerOpen(false);
  23857. } else {
  23858. setMousePosByEvent(event);
  23859. triggerOpen(true);
  23860. }
  23861. event.preventDefault();
  23862. // Pass to origin
  23863. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  23864. args[_key3 - 1] = arguments[_key3];
  23865. }
  23866. (_originChildProps$onC2 = originChildProps.onContextMenu) === null || _originChildProps$onC2 === void 0 || _originChildProps$onC2.call.apply(_originChildProps$onC2, [originChildProps, event].concat(args));
  23867. };
  23868. }
  23869. // ========================= ClassName ==========================
  23870. if (className) {
  23871. cloneProps.className = classnames_default()(originChildProps.className, className);
  23872. }
  23873. // ============================ Perf ============================
  23874. var renderedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  23875. renderedRef.current || (renderedRef.current = forceRender || mergedOpen || inMotion);
  23876. // =========================== Render ===========================
  23877. var mergedChildrenProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originChildProps), cloneProps);
  23878. // Pass props into cloneProps for nest usage
  23879. var passedProps = {};
  23880. var passedEventList = ['onContextMenu', 'onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];
  23881. passedEventList.forEach(function (eventName) {
  23882. if (restProps[eventName]) {
  23883. passedProps[eventName] = function () {
  23884. var _mergedChildrenProps$;
  23885. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  23886. args[_key4] = arguments[_key4];
  23887. }
  23888. (_mergedChildrenProps$ = mergedChildrenProps[eventName]) === null || _mergedChildrenProps$ === void 0 || _mergedChildrenProps$.call.apply(_mergedChildrenProps$, [mergedChildrenProps].concat(args));
  23889. restProps[eventName].apply(restProps, args);
  23890. };
  23891. }
  23892. });
  23893. // Child Node
  23894. var triggerNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedChildrenProps), passedProps));
  23895. var arrowPos = {
  23896. x: arrowX,
  23897. y: arrowY
  23898. };
  23899. var innerArrow = arrow ? (0,objectSpread2["default"])({}, arrow !== true ? arrow : {}) : null;
  23900. // Render
  23901. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  23902. disabled: !mergedOpen,
  23903. ref: setTargetRef,
  23904. onResize: onTargetResize
  23905. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TriggerWrapper, {
  23906. getTriggerDOMNode: getTriggerDOMNode
  23907. }, triggerNode)), renderedRef.current && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_context.Provider, {
  23908. value: context
  23909. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Popup, {
  23910. portal: PortalComponent,
  23911. ref: setPopupRef,
  23912. prefixCls: prefixCls,
  23913. popup: popup,
  23914. className: classnames_default()(popupClassName, alignedClassName),
  23915. style: popupStyle,
  23916. target: targetEle,
  23917. onMouseEnter: onPopupMouseEnter,
  23918. onMouseLeave: onPopupMouseLeave
  23919. // https://github.com/ant-design/ant-design/issues/43924
  23920. ,
  23921. onPointerEnter: onPopupMouseEnter,
  23922. zIndex: zIndex
  23923. // Open
  23924. ,
  23925. open: mergedOpen,
  23926. keepDom: inMotion,
  23927. fresh: fresh
  23928. // Click
  23929. ,
  23930. onClick: onPopupClick,
  23931. onPointerDownCapture: onPopupPointerDown
  23932. // Mask
  23933. ,
  23934. mask: mask
  23935. // Motion
  23936. ,
  23937. motion: mergePopupMotion,
  23938. maskMotion: mergeMaskMotion,
  23939. onVisibleChanged: onVisibleChanged,
  23940. onPrepare: onPrepare
  23941. // Portal
  23942. ,
  23943. forceRender: forceRender,
  23944. autoDestroy: mergedAutoDestroy,
  23945. getPopupContainer: getPopupContainer
  23946. // Arrow
  23947. ,
  23948. align: alignInfo,
  23949. arrow: innerArrow,
  23950. arrowPos: arrowPos
  23951. // Align
  23952. ,
  23953. ready: ready,
  23954. offsetX: offsetX,
  23955. offsetY: offsetY,
  23956. offsetR: offsetR,
  23957. offsetB: offsetB,
  23958. onAlign: triggerAlign
  23959. // Stretch
  23960. ,
  23961. stretch: stretch,
  23962. targetWidth: targetWidth / scaleX,
  23963. targetHeight: targetHeight / scaleY
  23964. })));
  23965. });
  23966. if (true) {
  23967. Trigger.displayName = 'Trigger';
  23968. }
  23969. return Trigger;
  23970. }
  23971. /* harmony default export */ var trigger_es = (generateTrigger(portal_es));
  23972. ;// ./node_modules/rc-select/es/SelectTrigger.js
  23973. var SelectTrigger_excluded = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"];
  23974. var getBuiltInPlacements = function getBuiltInPlacements(dropdownMatchSelectWidth) {
  23975. // Enable horizontal overflow auto-adjustment when a custom dropdown width is provided
  23976. var adjustX = dropdownMatchSelectWidth === true ? 0 : 1;
  23977. return {
  23978. bottomLeft: {
  23979. points: ['tl', 'bl'],
  23980. offset: [0, 4],
  23981. overflow: {
  23982. adjustX: adjustX,
  23983. adjustY: 1
  23984. },
  23985. htmlRegion: 'scroll'
  23986. },
  23987. bottomRight: {
  23988. points: ['tr', 'br'],
  23989. offset: [0, 4],
  23990. overflow: {
  23991. adjustX: adjustX,
  23992. adjustY: 1
  23993. },
  23994. htmlRegion: 'scroll'
  23995. },
  23996. topLeft: {
  23997. points: ['bl', 'tl'],
  23998. offset: [0, -4],
  23999. overflow: {
  24000. adjustX: adjustX,
  24001. adjustY: 1
  24002. },
  24003. htmlRegion: 'scroll'
  24004. },
  24005. topRight: {
  24006. points: ['br', 'tr'],
  24007. offset: [0, -4],
  24008. overflow: {
  24009. adjustX: adjustX,
  24010. adjustY: 1
  24011. },
  24012. htmlRegion: 'scroll'
  24013. }
  24014. };
  24015. };
  24016. var SelectTrigger = function SelectTrigger(props, ref) {
  24017. var prefixCls = props.prefixCls,
  24018. disabled = props.disabled,
  24019. visible = props.visible,
  24020. children = props.children,
  24021. popupElement = props.popupElement,
  24022. animation = props.animation,
  24023. transitionName = props.transitionName,
  24024. dropdownStyle = props.dropdownStyle,
  24025. dropdownClassName = props.dropdownClassName,
  24026. _props$direction = props.direction,
  24027. direction = _props$direction === void 0 ? 'ltr' : _props$direction,
  24028. placement = props.placement,
  24029. builtinPlacements = props.builtinPlacements,
  24030. dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,
  24031. dropdownRender = props.dropdownRender,
  24032. dropdownAlign = props.dropdownAlign,
  24033. getPopupContainer = props.getPopupContainer,
  24034. empty = props.empty,
  24035. getTriggerDOMNode = props.getTriggerDOMNode,
  24036. onPopupVisibleChange = props.onPopupVisibleChange,
  24037. onPopupMouseEnter = props.onPopupMouseEnter,
  24038. restProps = (0,objectWithoutProperties["default"])(props, SelectTrigger_excluded);
  24039. var dropdownPrefixCls = "".concat(prefixCls, "-dropdown");
  24040. var popupNode = popupElement;
  24041. if (dropdownRender) {
  24042. popupNode = dropdownRender(popupElement);
  24043. }
  24044. var mergedBuiltinPlacements = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  24045. return builtinPlacements || getBuiltInPlacements(dropdownMatchSelectWidth);
  24046. }, [builtinPlacements, dropdownMatchSelectWidth]);
  24047. // ===================== Motion ======================
  24048. var mergedTransitionName = animation ? "".concat(dropdownPrefixCls, "-").concat(animation) : transitionName;
  24049. // =================== Popup Width ===================
  24050. var isNumberPopupWidth = typeof dropdownMatchSelectWidth === 'number';
  24051. var stretch = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  24052. if (isNumberPopupWidth) {
  24053. return null;
  24054. }
  24055. return dropdownMatchSelectWidth === false ? 'minWidth' : 'width';
  24056. }, [dropdownMatchSelectWidth, isNumberPopupWidth]);
  24057. var popupStyle = dropdownStyle;
  24058. if (isNumberPopupWidth) {
  24059. popupStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, popupStyle), {}, {
  24060. width: dropdownMatchSelectWidth
  24061. });
  24062. }
  24063. // ======================= Ref =======================
  24064. var triggerPopupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  24065. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  24066. return {
  24067. getPopupElement: function getPopupElement() {
  24068. var _triggerPopupRef$curr;
  24069. return (_triggerPopupRef$curr = triggerPopupRef.current) === null || _triggerPopupRef$curr === void 0 ? void 0 : _triggerPopupRef$curr.popupElement;
  24070. }
  24071. };
  24072. });
  24073. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, (0,esm_extends["default"])({}, restProps, {
  24074. showAction: onPopupVisibleChange ? ['click'] : [],
  24075. hideAction: onPopupVisibleChange ? ['click'] : [],
  24076. popupPlacement: placement || (direction === 'rtl' ? 'bottomRight' : 'bottomLeft'),
  24077. builtinPlacements: mergedBuiltinPlacements,
  24078. prefixCls: dropdownPrefixCls,
  24079. popupTransitionName: mergedTransitionName,
  24080. popup: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  24081. onMouseEnter: onPopupMouseEnter
  24082. }, popupNode),
  24083. ref: triggerPopupRef,
  24084. stretch: stretch,
  24085. popupAlign: dropdownAlign,
  24086. popupVisible: visible,
  24087. getPopupContainer: getPopupContainer,
  24088. popupClassName: classnames_default()(dropdownClassName, (0,defineProperty["default"])({}, "".concat(dropdownPrefixCls, "-empty"), empty)),
  24089. popupStyle: popupStyle,
  24090. getTriggerDOMNode: getTriggerDOMNode,
  24091. onPopupVisibleChange: onPopupVisibleChange
  24092. }), children);
  24093. };
  24094. var RefSelectTrigger = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SelectTrigger);
  24095. if (true) {
  24096. RefSelectTrigger.displayName = 'SelectTrigger';
  24097. }
  24098. /* harmony default export */ var es_SelectTrigger = (RefSelectTrigger);
  24099. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
  24100. var esm_toArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toArray.js");
  24101. ;// ./node_modules/rc-select/es/utils/valueUtil.js
  24102. function getKey(data, index) {
  24103. var key = data.key;
  24104. var value;
  24105. if ('value' in data) {
  24106. value = data.value;
  24107. }
  24108. if (key !== null && key !== undefined) {
  24109. return key;
  24110. }
  24111. if (value !== undefined) {
  24112. return value;
  24113. }
  24114. return "rc-index-key-".concat(index);
  24115. }
  24116. function isValidCount(value) {
  24117. return typeof value !== 'undefined' && !Number.isNaN(value);
  24118. }
  24119. function fillFieldNames(fieldNames, childrenAsData) {
  24120. var _ref = fieldNames || {},
  24121. label = _ref.label,
  24122. value = _ref.value,
  24123. options = _ref.options,
  24124. groupLabel = _ref.groupLabel;
  24125. var mergedLabel = label || (childrenAsData ? 'children' : 'label');
  24126. return {
  24127. label: mergedLabel,
  24128. value: value || 'value',
  24129. options: options || 'options',
  24130. groupLabel: groupLabel || mergedLabel
  24131. };
  24132. }
  24133. /**
  24134. * Flat options into flatten list.
  24135. * We use `optionOnly` here is aim to avoid user use nested option group.
  24136. * Here is simply set `key` to the index if not provided.
  24137. */
  24138. function flattenOptions(options) {
  24139. var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  24140. fieldNames = _ref2.fieldNames,
  24141. childrenAsData = _ref2.childrenAsData;
  24142. var flattenList = [];
  24143. var _fillFieldNames = fillFieldNames(fieldNames, false),
  24144. fieldLabel = _fillFieldNames.label,
  24145. fieldValue = _fillFieldNames.value,
  24146. fieldOptions = _fillFieldNames.options,
  24147. groupLabel = _fillFieldNames.groupLabel;
  24148. function dig(list, isGroupOption) {
  24149. if (!Array.isArray(list)) {
  24150. return;
  24151. }
  24152. list.forEach(function (data) {
  24153. if (isGroupOption || !(fieldOptions in data)) {
  24154. var value = data[fieldValue];
  24155. // Option
  24156. flattenList.push({
  24157. key: getKey(data, flattenList.length),
  24158. groupOption: isGroupOption,
  24159. data: data,
  24160. label: data[fieldLabel],
  24161. value: value
  24162. });
  24163. } else {
  24164. var grpLabel = data[groupLabel];
  24165. if (grpLabel === undefined && childrenAsData) {
  24166. grpLabel = data.label;
  24167. }
  24168. // Option Group
  24169. flattenList.push({
  24170. key: getKey(data, flattenList.length),
  24171. group: true,
  24172. data: data,
  24173. label: grpLabel
  24174. });
  24175. dig(data[fieldOptions], true);
  24176. }
  24177. });
  24178. }
  24179. dig(options, false);
  24180. return flattenList;
  24181. }
  24182. /**
  24183. * Inject `props` into `option` for legacy usage
  24184. */
  24185. function injectPropsWithOption(option) {
  24186. var newOption = (0,objectSpread2["default"])({}, option);
  24187. if (!('props' in newOption)) {
  24188. Object.defineProperty(newOption, 'props', {
  24189. get: function get() {
  24190. (0,warning["default"])(false, 'Return type is option instead of Option instance. Please read value directly instead of reading from `props`.');
  24191. return newOption;
  24192. }
  24193. });
  24194. }
  24195. return newOption;
  24196. }
  24197. var getSeparatedContent = function getSeparatedContent(text, tokens, end) {
  24198. if (!tokens || !tokens.length) {
  24199. return null;
  24200. }
  24201. var match = false;
  24202. var separate = function separate(str, _ref3) {
  24203. var _ref4 = (0,esm_toArray["default"])(_ref3),
  24204. token = _ref4[0],
  24205. restTokens = _ref4.slice(1);
  24206. if (!token) {
  24207. return [str];
  24208. }
  24209. var list = str.split(token);
  24210. match = match || list.length > 1;
  24211. return list.reduce(function (prevList, unitStr) {
  24212. return [].concat((0,toConsumableArray["default"])(prevList), (0,toConsumableArray["default"])(separate(unitStr, restTokens)));
  24213. }, []).filter(Boolean);
  24214. };
  24215. var list = separate(text, tokens);
  24216. if (match) {
  24217. return typeof end !== 'undefined' ? list.slice(0, end) : list;
  24218. } else {
  24219. return null;
  24220. }
  24221. };
  24222. ;// ./node_modules/rc-select/es/SelectContext.js
  24223. // Use any here since we do not get the type during compilation
  24224. var SelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  24225. /* harmony default export */ var es_SelectContext = (SelectContext);
  24226. ;// ./node_modules/rc-select/es/BaseSelect/Polite.js
  24227. function Polite(props) {
  24228. var visible = props.visible,
  24229. values = props.values;
  24230. if (!visible) {
  24231. return null;
  24232. }
  24233. // Only cut part of values since it's a screen reader
  24234. var MAX_COUNT = 50;
  24235. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  24236. "aria-live": "polite",
  24237. style: {
  24238. width: 0,
  24239. height: 0,
  24240. position: 'absolute',
  24241. overflow: 'hidden',
  24242. opacity: 0
  24243. }
  24244. }, "".concat(values.slice(0, MAX_COUNT).map(function (_ref) {
  24245. var label = _ref.label,
  24246. value = _ref.value;
  24247. return ['number', 'string'].includes((0,esm_typeof["default"])(label)) ? label : value;
  24248. }).join(', ')), values.length > MAX_COUNT ? ', ...' : null);
  24249. }
  24250. ;// ./node_modules/rc-select/es/BaseSelect/index.js
  24251. var BaseSelect_excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"];
  24252. var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex'];
  24253. var isMultiple = function isMultiple(mode) {
  24254. return mode === 'tags' || mode === 'multiple';
  24255. };
  24256. var BaseSelect = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  24257. var _customizeRawInputEle;
  24258. var id = props.id,
  24259. prefixCls = props.prefixCls,
  24260. className = props.className,
  24261. showSearch = props.showSearch,
  24262. tagRender = props.tagRender,
  24263. direction = props.direction,
  24264. omitDomProps = props.omitDomProps,
  24265. displayValues = props.displayValues,
  24266. onDisplayValuesChange = props.onDisplayValuesChange,
  24267. emptyOptions = props.emptyOptions,
  24268. _props$notFoundConten = props.notFoundContent,
  24269. notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,
  24270. onClear = props.onClear,
  24271. mode = props.mode,
  24272. disabled = props.disabled,
  24273. loading = props.loading,
  24274. getInputElement = props.getInputElement,
  24275. getRawInputElement = props.getRawInputElement,
  24276. open = props.open,
  24277. defaultOpen = props.defaultOpen,
  24278. onDropdownVisibleChange = props.onDropdownVisibleChange,
  24279. activeValue = props.activeValue,
  24280. onActiveValueChange = props.onActiveValueChange,
  24281. activeDescendantId = props.activeDescendantId,
  24282. searchValue = props.searchValue,
  24283. autoClearSearchValue = props.autoClearSearchValue,
  24284. onSearch = props.onSearch,
  24285. onSearchSplit = props.onSearchSplit,
  24286. tokenSeparators = props.tokenSeparators,
  24287. allowClear = props.allowClear,
  24288. prefix = props.prefix,
  24289. suffixIcon = props.suffixIcon,
  24290. clearIcon = props.clearIcon,
  24291. OptionList = props.OptionList,
  24292. animation = props.animation,
  24293. transitionName = props.transitionName,
  24294. dropdownStyle = props.dropdownStyle,
  24295. dropdownClassName = props.dropdownClassName,
  24296. dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,
  24297. dropdownRender = props.dropdownRender,
  24298. dropdownAlign = props.dropdownAlign,
  24299. placement = props.placement,
  24300. builtinPlacements = props.builtinPlacements,
  24301. getPopupContainer = props.getPopupContainer,
  24302. _props$showAction = props.showAction,
  24303. showAction = _props$showAction === void 0 ? [] : _props$showAction,
  24304. onFocus = props.onFocus,
  24305. onBlur = props.onBlur,
  24306. onKeyUp = props.onKeyUp,
  24307. onKeyDown = props.onKeyDown,
  24308. onMouseDown = props.onMouseDown,
  24309. restProps = (0,objectWithoutProperties["default"])(props, BaseSelect_excluded);
  24310. // ============================== MISC ==============================
  24311. var multiple = isMultiple(mode);
  24312. var mergedShowSearch = (showSearch !== undefined ? showSearch : multiple) || mode === 'combobox';
  24313. var domProps = (0,objectSpread2["default"])({}, restProps);
  24314. DEFAULT_OMIT_PROPS.forEach(function (propName) {
  24315. delete domProps[propName];
  24316. });
  24317. omitDomProps === null || omitDomProps === void 0 || omitDomProps.forEach(function (propName) {
  24318. delete domProps[propName];
  24319. });
  24320. // ============================= Mobile =============================
  24321. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  24322. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  24323. mobile = _React$useState2[0],
  24324. setMobile = _React$useState2[1];
  24325. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  24326. // Only update on the client side
  24327. setMobile(isMobile());
  24328. }, []);
  24329. // ============================== Refs ==============================
  24330. var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  24331. var selectorDomRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  24332. var triggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  24333. var selectorRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  24334. var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  24335. var blurRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  24336. /** Used for component focused management */
  24337. var _useDelayReset = useDelayReset(),
  24338. _useDelayReset2 = (0,slicedToArray["default"])(_useDelayReset, 3),
  24339. mockFocused = _useDelayReset2[0],
  24340. setMockFocused = _useDelayReset2[1],
  24341. cancelSetMockFocused = _useDelayReset2[2];
  24342. // =========================== Imperative ===========================
  24343. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  24344. var _selectorRef$current, _selectorRef$current2;
  24345. return {
  24346. focus: (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.focus,
  24347. blur: (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 ? void 0 : _selectorRef$current2.blur,
  24348. scrollTo: function scrollTo(arg) {
  24349. var _listRef$current;
  24350. return (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollTo(arg);
  24351. },
  24352. nativeElement: containerRef.current || selectorDomRef.current
  24353. };
  24354. });
  24355. // ========================== Search Value ==========================
  24356. var mergedSearchValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  24357. var _displayValues$;
  24358. if (mode !== 'combobox') {
  24359. return searchValue;
  24360. }
  24361. var val = (_displayValues$ = displayValues[0]) === null || _displayValues$ === void 0 ? void 0 : _displayValues$.value;
  24362. return typeof val === 'string' || typeof val === 'number' ? String(val) : '';
  24363. }, [searchValue, mode, displayValues]);
  24364. // ========================== Custom Input ==========================
  24365. // Only works in `combobox`
  24366. var customizeInputElement = mode === 'combobox' && typeof getInputElement === 'function' && getInputElement() || null;
  24367. // Used for customize replacement for `rc-cascader`
  24368. var customizeRawInputElement = typeof getRawInputElement === 'function' && getRawInputElement();
  24369. var customizeRawInputRef = (0,es_ref.useComposeRef)(selectorDomRef, customizeRawInputElement === null || customizeRawInputElement === void 0 || (_customizeRawInputEle = customizeRawInputElement.props) === null || _customizeRawInputEle === void 0 ? void 0 : _customizeRawInputEle.ref);
  24370. // ============================== Open ==============================
  24371. // SSR not support Portal which means we need delay `open` for the first time render
  24372. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  24373. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  24374. rendered = _React$useState4[0],
  24375. setRendered = _React$useState4[1];
  24376. (0,useLayoutEffect["default"])(function () {
  24377. setRendered(true);
  24378. }, []);
  24379. var _useMergedState = (0,useMergedState["default"])(false, {
  24380. defaultValue: defaultOpen,
  24381. value: open
  24382. }),
  24383. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  24384. innerOpen = _useMergedState2[0],
  24385. setInnerOpen = _useMergedState2[1];
  24386. var mergedOpen = rendered ? innerOpen : false;
  24387. // Not trigger `open` in `combobox` when `notFoundContent` is empty
  24388. var emptyListContent = !notFoundContent && emptyOptions;
  24389. if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {
  24390. mergedOpen = false;
  24391. }
  24392. var triggerOpen = emptyListContent ? false : mergedOpen;
  24393. var onToggleOpen = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (newOpen) {
  24394. var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;
  24395. if (!disabled) {
  24396. setInnerOpen(nextOpen);
  24397. if (mergedOpen !== nextOpen) {
  24398. onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(nextOpen);
  24399. }
  24400. }
  24401. }, [disabled, mergedOpen, setInnerOpen, onDropdownVisibleChange]);
  24402. // ============================= Search =============================
  24403. var tokenWithEnter = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  24404. return (tokenSeparators || []).some(function (tokenSeparator) {
  24405. return ['\n', '\r\n'].includes(tokenSeparator);
  24406. });
  24407. }, [tokenSeparators]);
  24408. var _ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_SelectContext) || {},
  24409. maxCount = _ref.maxCount,
  24410. rawValues = _ref.rawValues;
  24411. var onInternalSearch = function onInternalSearch(searchText, fromTyping, isCompositing) {
  24412. if (multiple && isValidCount(maxCount) && (rawValues === null || rawValues === void 0 ? void 0 : rawValues.size) >= maxCount) {
  24413. return;
  24414. }
  24415. var ret = true;
  24416. var newSearchText = searchText;
  24417. onActiveValueChange === null || onActiveValueChange === void 0 || onActiveValueChange(null);
  24418. var separatedList = getSeparatedContent(searchText, tokenSeparators, isValidCount(maxCount) ? maxCount - rawValues.size : undefined);
  24419. // Check if match the `tokenSeparators`
  24420. var patchLabels = isCompositing ? null : separatedList;
  24421. // Ignore combobox since it's not split-able
  24422. if (mode !== 'combobox' && patchLabels) {
  24423. newSearchText = '';
  24424. onSearchSplit === null || onSearchSplit === void 0 || onSearchSplit(patchLabels);
  24425. // Should close when paste finish
  24426. onToggleOpen(false);
  24427. // Tell Selector that break next actions
  24428. ret = false;
  24429. }
  24430. if (onSearch && mergedSearchValue !== newSearchText) {
  24431. onSearch(newSearchText, {
  24432. source: fromTyping ? 'typing' : 'effect'
  24433. });
  24434. }
  24435. return ret;
  24436. };
  24437. // Only triggered when menu is closed & mode is tags
  24438. // If menu is open, OptionList will take charge
  24439. // If mode isn't tags, press enter is not meaningful when you can't see any option
  24440. var onInternalSearchSubmit = function onInternalSearchSubmit(searchText) {
  24441. // prevent empty tags from appearing when you click the Enter button
  24442. if (!searchText || !searchText.trim()) {
  24443. return;
  24444. }
  24445. onSearch(searchText, {
  24446. source: 'submit'
  24447. });
  24448. };
  24449. // Close will clean up single mode search text
  24450. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  24451. if (!mergedOpen && !multiple && mode !== 'combobox') {
  24452. onInternalSearch('', false, false);
  24453. }
  24454. }, [mergedOpen]);
  24455. // ============================ Disabled ============================
  24456. // Close dropdown & remove focus state when disabled change
  24457. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  24458. if (innerOpen && disabled) {
  24459. setInnerOpen(false);
  24460. }
  24461. // After onBlur is triggered, the focused does not need to be reset
  24462. if (disabled && !blurRef.current) {
  24463. setMockFocused(false);
  24464. }
  24465. }, [disabled]);
  24466. // ============================ Keyboard ============================
  24467. /**
  24468. * We record input value here to check if can press to clean up by backspace
  24469. * - null: Key is not down, this is reset by key up
  24470. * - true: Search text is empty when first time backspace down
  24471. * - false: Search text is not empty when first time backspace down
  24472. */
  24473. var _useLock = useLock(),
  24474. _useLock2 = (0,slicedToArray["default"])(_useLock, 2),
  24475. getClearLock = _useLock2[0],
  24476. setClearLock = _useLock2[1];
  24477. var keyLockRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  24478. // KeyDown
  24479. var onInternalKeyDown = function onInternalKeyDown(event) {
  24480. var clearLock = getClearLock();
  24481. var key = event.key;
  24482. var isEnterKey = key === 'Enter';
  24483. if (isEnterKey) {
  24484. // Do not submit form when type in the input
  24485. if (mode !== 'combobox') {
  24486. event.preventDefault();
  24487. }
  24488. // We only manage open state here, close logic should handle by list component
  24489. if (!mergedOpen) {
  24490. onToggleOpen(true);
  24491. }
  24492. }
  24493. setClearLock(!!mergedSearchValue);
  24494. // Remove value by `backspace`
  24495. if (key === 'Backspace' && !clearLock && multiple && !mergedSearchValue && displayValues.length) {
  24496. var cloneDisplayValues = (0,toConsumableArray["default"])(displayValues);
  24497. var removedDisplayValue = null;
  24498. for (var i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {
  24499. var current = cloneDisplayValues[i];
  24500. if (!current.disabled) {
  24501. cloneDisplayValues.splice(i, 1);
  24502. removedDisplayValue = current;
  24503. break;
  24504. }
  24505. }
  24506. if (removedDisplayValue) {
  24507. onDisplayValuesChange(cloneDisplayValues, {
  24508. type: 'remove',
  24509. values: [removedDisplayValue]
  24510. });
  24511. }
  24512. }
  24513. for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  24514. rest[_key - 1] = arguments[_key];
  24515. }
  24516. if (mergedOpen && (!isEnterKey || !keyLockRef.current)) {
  24517. var _listRef$current2;
  24518. // Lock the Enter key after it is pressed to avoid repeated triggering of the onChange event.
  24519. if (isEnterKey) {
  24520. keyLockRef.current = true;
  24521. }
  24522. (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 || _listRef$current2.onKeyDown.apply(_listRef$current2, [event].concat(rest));
  24523. }
  24524. onKeyDown === null || onKeyDown === void 0 || onKeyDown.apply(void 0, [event].concat(rest));
  24525. };
  24526. // KeyUp
  24527. var onInternalKeyUp = function onInternalKeyUp(event) {
  24528. for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  24529. rest[_key2 - 1] = arguments[_key2];
  24530. }
  24531. if (mergedOpen) {
  24532. var _listRef$current3;
  24533. (_listRef$current3 = listRef.current) === null || _listRef$current3 === void 0 || _listRef$current3.onKeyUp.apply(_listRef$current3, [event].concat(rest));
  24534. }
  24535. if (event.key === 'Enter') {
  24536. keyLockRef.current = false;
  24537. }
  24538. onKeyUp === null || onKeyUp === void 0 || onKeyUp.apply(void 0, [event].concat(rest));
  24539. };
  24540. // ============================ Selector ============================
  24541. var onSelectorRemove = function onSelectorRemove(val) {
  24542. var newValues = displayValues.filter(function (i) {
  24543. return i !== val;
  24544. });
  24545. onDisplayValuesChange(newValues, {
  24546. type: 'remove',
  24547. values: [val]
  24548. });
  24549. };
  24550. var onInputBlur = function onInputBlur() {
  24551. // Unlock the Enter key after the input blur; otherwise, the Enter key needs to be pressed twice to trigger the correct effect.
  24552. keyLockRef.current = false;
  24553. };
  24554. // ========================== Focus / Blur ==========================
  24555. /** Record real focus status */
  24556. var focusRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  24557. var onContainerFocus = function onContainerFocus() {
  24558. setMockFocused(true);
  24559. if (!disabled) {
  24560. if (onFocus && !focusRef.current) {
  24561. onFocus.apply(void 0, arguments);
  24562. }
  24563. // `showAction` should handle `focus` if set
  24564. if (showAction.includes('focus')) {
  24565. onToggleOpen(true);
  24566. }
  24567. }
  24568. focusRef.current = true;
  24569. };
  24570. var onContainerBlur = function onContainerBlur() {
  24571. blurRef.current = true;
  24572. setMockFocused(false, function () {
  24573. focusRef.current = false;
  24574. blurRef.current = false;
  24575. onToggleOpen(false);
  24576. });
  24577. if (disabled) {
  24578. return;
  24579. }
  24580. if (mergedSearchValue) {
  24581. // `tags` mode should move `searchValue` into values
  24582. if (mode === 'tags') {
  24583. onSearch(mergedSearchValue, {
  24584. source: 'submit'
  24585. });
  24586. } else if (mode === 'multiple') {
  24587. // `multiple` mode only clean the search value but not trigger event
  24588. onSearch('', {
  24589. source: 'blur'
  24590. });
  24591. }
  24592. }
  24593. if (onBlur) {
  24594. onBlur.apply(void 0, arguments);
  24595. }
  24596. };
  24597. // Give focus back of Select
  24598. var activeTimeoutIds = [];
  24599. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  24600. return function () {
  24601. activeTimeoutIds.forEach(function (timeoutId) {
  24602. return clearTimeout(timeoutId);
  24603. });
  24604. activeTimeoutIds.splice(0, activeTimeoutIds.length);
  24605. };
  24606. }, []);
  24607. var onInternalMouseDown = function onInternalMouseDown(event) {
  24608. var _triggerRef$current;
  24609. var target = event.target;
  24610. var popupElement = (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getPopupElement();
  24611. // We should give focus back to selector if clicked item is not focusable
  24612. if (popupElement && popupElement.contains(target)) {
  24613. var timeoutId = setTimeout(function () {
  24614. var index = activeTimeoutIds.indexOf(timeoutId);
  24615. if (index !== -1) {
  24616. activeTimeoutIds.splice(index, 1);
  24617. }
  24618. cancelSetMockFocused();
  24619. if (!mobile && !popupElement.contains(document.activeElement)) {
  24620. var _selectorRef$current3;
  24621. (_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 || _selectorRef$current3.focus();
  24622. }
  24623. });
  24624. activeTimeoutIds.push(timeoutId);
  24625. }
  24626. for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  24627. restArgs[_key3 - 1] = arguments[_key3];
  24628. }
  24629. onMouseDown === null || onMouseDown === void 0 || onMouseDown.apply(void 0, [event].concat(restArgs));
  24630. };
  24631. // ============================ Dropdown ============================
  24632. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  24633. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  24634. forceUpdate = _React$useState6[1];
  24635. // We need force update here since popup dom is render async
  24636. function onPopupMouseEnter() {
  24637. forceUpdate({});
  24638. }
  24639. // Used for raw custom input trigger
  24640. var onTriggerVisibleChange;
  24641. if (customizeRawInputElement) {
  24642. onTriggerVisibleChange = function onTriggerVisibleChange(newOpen) {
  24643. onToggleOpen(newOpen);
  24644. };
  24645. }
  24646. // Close when click on non-select element
  24647. useSelectTriggerControl(function () {
  24648. var _triggerRef$current2;
  24649. return [containerRef.current, (_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : _triggerRef$current2.getPopupElement()];
  24650. }, triggerOpen, onToggleOpen, !!customizeRawInputElement);
  24651. // ============================ Context =============================
  24652. var baseSelectContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  24653. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  24654. notFoundContent: notFoundContent,
  24655. open: mergedOpen,
  24656. triggerOpen: triggerOpen,
  24657. id: id,
  24658. showSearch: mergedShowSearch,
  24659. multiple: multiple,
  24660. toggleOpen: onToggleOpen
  24661. });
  24662. }, [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]);
  24663. // ==================================================================
  24664. // == Render ==
  24665. // ==================================================================
  24666. // ============================= Arrow ==============================
  24667. var showSuffixIcon = !!suffixIcon || loading;
  24668. var arrowNode;
  24669. if (showSuffixIcon) {
  24670. arrowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TransBtn, {
  24671. className: classnames_default()("".concat(prefixCls, "-arrow"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-arrow-loading"), loading)),
  24672. customizeIcon: suffixIcon,
  24673. customizeIconProps: {
  24674. loading: loading,
  24675. searchValue: mergedSearchValue,
  24676. open: mergedOpen,
  24677. focused: mockFocused,
  24678. showSearch: mergedShowSearch
  24679. }
  24680. });
  24681. }
  24682. // ============================= Clear ==============================
  24683. var onClearMouseDown = function onClearMouseDown() {
  24684. var _selectorRef$current4;
  24685. onClear === null || onClear === void 0 || onClear();
  24686. (_selectorRef$current4 = selectorRef.current) === null || _selectorRef$current4 === void 0 || _selectorRef$current4.focus();
  24687. onDisplayValuesChange([], {
  24688. type: 'clear',
  24689. values: displayValues
  24690. });
  24691. onInternalSearch('', false, false);
  24692. };
  24693. var _useAllowClear = useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon, disabled, mergedSearchValue, mode),
  24694. mergedAllowClear = _useAllowClear.allowClear,
  24695. clearNode = _useAllowClear.clearIcon;
  24696. // =========================== OptionList ===========================
  24697. var optionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList, {
  24698. ref: listRef
  24699. });
  24700. // ============================= Select =============================
  24701. var mergedClassName = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-focused"), mockFocused), "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-single"), !multiple), "".concat(prefixCls, "-allow-clear"), allowClear), "".concat(prefixCls, "-show-arrow"), showSuffixIcon), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-open"), mergedOpen), "".concat(prefixCls, "-customize-input"), customizeInputElement), "".concat(prefixCls, "-show-search"), mergedShowSearch));
  24702. // >>> Selector
  24703. var selectorNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SelectTrigger, {
  24704. ref: triggerRef,
  24705. disabled: disabled,
  24706. prefixCls: prefixCls,
  24707. visible: triggerOpen,
  24708. popupElement: optionList,
  24709. animation: animation,
  24710. transitionName: transitionName,
  24711. dropdownStyle: dropdownStyle,
  24712. dropdownClassName: dropdownClassName,
  24713. direction: direction,
  24714. dropdownMatchSelectWidth: dropdownMatchSelectWidth,
  24715. dropdownRender: dropdownRender,
  24716. dropdownAlign: dropdownAlign,
  24717. placement: placement,
  24718. builtinPlacements: builtinPlacements,
  24719. getPopupContainer: getPopupContainer,
  24720. empty: emptyOptions,
  24721. getTriggerDOMNode: function getTriggerDOMNode(node) {
  24722. return (
  24723. // TODO: This is workaround and should be removed in `rc-select`
  24724. // And use new standard `nativeElement` for ref.
  24725. // But we should update `rc-resize-observer` first.
  24726. selectorDomRef.current || node
  24727. );
  24728. },
  24729. onPopupVisibleChange: onTriggerVisibleChange,
  24730. onPopupMouseEnter: onPopupMouseEnter
  24731. }, customizeRawInputElement ? ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(customizeRawInputElement, {
  24732. ref: customizeRawInputRef
  24733. })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Selector, (0,esm_extends["default"])({}, props, {
  24734. domRef: selectorDomRef,
  24735. prefixCls: prefixCls,
  24736. inputElement: customizeInputElement,
  24737. ref: selectorRef,
  24738. id: id,
  24739. prefix: prefix,
  24740. showSearch: mergedShowSearch,
  24741. autoClearSearchValue: autoClearSearchValue,
  24742. mode: mode,
  24743. activeDescendantId: activeDescendantId,
  24744. tagRender: tagRender,
  24745. values: displayValues,
  24746. open: mergedOpen,
  24747. onToggleOpen: onToggleOpen,
  24748. activeValue: activeValue,
  24749. searchValue: mergedSearchValue,
  24750. onSearch: onInternalSearch,
  24751. onSearchSubmit: onInternalSearchSubmit,
  24752. onRemove: onSelectorRemove,
  24753. tokenWithEnter: tokenWithEnter,
  24754. onInputBlur: onInputBlur
  24755. })));
  24756. // >>> Render
  24757. var renderNode;
  24758. // Render raw
  24759. if (customizeRawInputElement) {
  24760. renderNode = selectorNode;
  24761. } else {
  24762. renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  24763. className: mergedClassName
  24764. }, domProps, {
  24765. ref: containerRef,
  24766. onMouseDown: onInternalMouseDown,
  24767. onKeyDown: onInternalKeyDown,
  24768. onKeyUp: onInternalKeyUp,
  24769. onFocus: onContainerFocus,
  24770. onBlur: onContainerBlur
  24771. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Polite, {
  24772. visible: mockFocused && !mergedOpen,
  24773. values: displayValues
  24774. }), selectorNode, arrowNode, mergedAllowClear && clearNode);
  24775. }
  24776. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(BaseSelectContext.Provider, {
  24777. value: baseSelectContext
  24778. }, renderNode);
  24779. });
  24780. // Set display name for dev
  24781. if (true) {
  24782. BaseSelect.displayName = 'BaseSelect';
  24783. }
  24784. /* harmony default export */ var es_BaseSelect = (BaseSelect);
  24785. ;// ./node_modules/rc-select/es/OptGroup.js
  24786. /* istanbul ignore file */
  24787. /** This is a placeholder, not real render in dom */
  24788. var OptGroup = function OptGroup() {
  24789. return null;
  24790. };
  24791. OptGroup.isSelectOptGroup = true;
  24792. /* harmony default export */ var es_OptGroup = (OptGroup);
  24793. ;// ./node_modules/rc-select/es/Option.js
  24794. /* istanbul ignore file */
  24795. /** This is a placeholder, not real render in dom */
  24796. var Option = function Option() {
  24797. return null;
  24798. };
  24799. Option.isSelectOption = true;
  24800. /* harmony default export */ var es_Option = (Option);
  24801. ;// ./node_modules/rc-virtual-list/es/Filler.js
  24802. /**
  24803. * Fill component to provided the scroll content real height.
  24804. */
  24805. var Filler = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (_ref, ref) {
  24806. var height = _ref.height,
  24807. offsetY = _ref.offsetY,
  24808. offsetX = _ref.offsetX,
  24809. children = _ref.children,
  24810. prefixCls = _ref.prefixCls,
  24811. onInnerResize = _ref.onInnerResize,
  24812. innerProps = _ref.innerProps,
  24813. rtl = _ref.rtl,
  24814. extra = _ref.extra;
  24815. var outerStyle = {};
  24816. var innerStyle = {
  24817. display: 'flex',
  24818. flexDirection: 'column'
  24819. };
  24820. if (offsetY !== undefined) {
  24821. // Not set `width` since this will break `sticky: right`
  24822. outerStyle = {
  24823. height: height,
  24824. position: 'relative',
  24825. overflow: 'hidden'
  24826. };
  24827. innerStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, innerStyle), {}, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({
  24828. transform: "translateY(".concat(offsetY, "px)")
  24829. }, rtl ? 'marginRight' : 'marginLeft', -offsetX), "position", 'absolute'), "left", 0), "right", 0), "top", 0));
  24830. }
  24831. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  24832. style: outerStyle
  24833. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  24834. onResize: function onResize(_ref2) {
  24835. var offsetHeight = _ref2.offsetHeight;
  24836. if (offsetHeight && onInnerResize) {
  24837. onInnerResize();
  24838. }
  24839. }
  24840. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  24841. style: innerStyle,
  24842. className: classnames_default()((0,defineProperty["default"])({}, "".concat(prefixCls, "-holder-inner"), prefixCls)),
  24843. ref: ref
  24844. }, innerProps), children, extra)));
  24845. });
  24846. Filler.displayName = 'Filler';
  24847. /* harmony default export */ var es_Filler = (Filler);
  24848. ;// ./node_modules/rc-virtual-list/es/Item.js
  24849. function Item_Item(_ref) {
  24850. var children = _ref.children,
  24851. setRef = _ref.setRef;
  24852. var refFunc = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (node) {
  24853. setRef(node);
  24854. }, []);
  24855. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
  24856. ref: refFunc
  24857. });
  24858. }
  24859. ;// ./node_modules/rc-virtual-list/es/hooks/useChildren.js
  24860. function useChildren(list, startIndex, endIndex, scrollWidth, offsetX, setNodeRef, renderFunc, _ref) {
  24861. var getKey = _ref.getKey;
  24862. return list.slice(startIndex, endIndex + 1).map(function (item, index) {
  24863. var eleIndex = startIndex + index;
  24864. var node = renderFunc(item, eleIndex, {
  24865. style: {
  24866. width: scrollWidth
  24867. },
  24868. offsetX: offsetX
  24869. });
  24870. var key = getKey(item);
  24871. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Item_Item, {
  24872. key: key,
  24873. setRef: function setRef(ele) {
  24874. return setNodeRef(item, ele);
  24875. }
  24876. }, node);
  24877. });
  24878. }
  24879. ;// ./node_modules/rc-virtual-list/es/utils/algorithmUtil.js
  24880. /**
  24881. * Get index with specific start index one by one. e.g.
  24882. * min: 3, max: 9, start: 6
  24883. *
  24884. * Return index is:
  24885. * [0]: 6
  24886. * [1]: 7
  24887. * [2]: 5
  24888. * [3]: 8
  24889. * [4]: 4
  24890. * [5]: 9
  24891. * [6]: 3
  24892. */
  24893. function getIndexByStartLoc(min, max, start, index) {
  24894. var beforeCount = start - min;
  24895. var afterCount = max - start;
  24896. var balanceCount = Math.min(beforeCount, afterCount) * 2;
  24897. // Balance
  24898. if (index <= balanceCount) {
  24899. var stepIndex = Math.floor(index / 2);
  24900. if (index % 2) {
  24901. return start + stepIndex + 1;
  24902. }
  24903. return start - stepIndex;
  24904. }
  24905. // One is out of range
  24906. if (beforeCount > afterCount) {
  24907. return start - (index - afterCount);
  24908. }
  24909. return start + (index - beforeCount);
  24910. }
  24911. /**
  24912. * We assume that 2 list has only 1 item diff and others keeping the order.
  24913. * So we can use dichotomy algorithm to find changed one.
  24914. */
  24915. function findListDiffIndex(originList, targetList, getKey) {
  24916. var originLen = originList.length;
  24917. var targetLen = targetList.length;
  24918. var shortList;
  24919. var longList;
  24920. if (originLen === 0 && targetLen === 0) {
  24921. return null;
  24922. }
  24923. if (originLen < targetLen) {
  24924. shortList = originList;
  24925. longList = targetList;
  24926. } else {
  24927. shortList = targetList;
  24928. longList = originList;
  24929. }
  24930. var notExistKey = {
  24931. __EMPTY_ITEM__: true
  24932. };
  24933. function getItemKey(item) {
  24934. if (item !== undefined) {
  24935. return getKey(item);
  24936. }
  24937. return notExistKey;
  24938. }
  24939. // Loop to find diff one
  24940. var diffIndex = null;
  24941. var multiple = Math.abs(originLen - targetLen) !== 1;
  24942. for (var i = 0; i < longList.length; i += 1) {
  24943. var shortKey = getItemKey(shortList[i]);
  24944. var longKey = getItemKey(longList[i]);
  24945. if (shortKey !== longKey) {
  24946. diffIndex = i;
  24947. multiple = multiple || shortKey !== getItemKey(longList[i + 1]);
  24948. break;
  24949. }
  24950. }
  24951. return diffIndex === null ? null : {
  24952. index: diffIndex,
  24953. multiple: multiple
  24954. };
  24955. }
  24956. ;// ./node_modules/rc-virtual-list/es/hooks/useDiffItem.js
  24957. function useDiffItem(data, getKey, onDiff) {
  24958. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(data),
  24959. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  24960. prevData = _React$useState2[0],
  24961. setPrevData = _React$useState2[1];
  24962. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  24963. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  24964. diffItem = _React$useState4[0],
  24965. setDiffItem = _React$useState4[1];
  24966. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  24967. var diff = findListDiffIndex(prevData || [], data || [], getKey);
  24968. if ((diff === null || diff === void 0 ? void 0 : diff.index) !== undefined) {
  24969. onDiff === null || onDiff === void 0 || onDiff(diff.index);
  24970. setDiffItem(data[diff.index]);
  24971. }
  24972. setPrevData(data);
  24973. }, [data]);
  24974. return [diffItem];
  24975. }
  24976. ;// ./node_modules/rc-virtual-list/es/utils/isFirefox.js
  24977. var isFF = (typeof navigator === "undefined" ? "undefined" : (0,esm_typeof["default"])(navigator)) === 'object' && /Firefox/i.test(navigator.userAgent);
  24978. /* harmony default export */ var isFirefox = (isFF);
  24979. ;// ./node_modules/rc-virtual-list/es/hooks/useOriginScroll.js
  24980. /* harmony default export */ var useOriginScroll = (function (isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight) {
  24981. // Do lock for a wheel when scrolling
  24982. var lockRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  24983. var lockTimeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  24984. function lockScroll() {
  24985. clearTimeout(lockTimeoutRef.current);
  24986. lockRef.current = true;
  24987. lockTimeoutRef.current = setTimeout(function () {
  24988. lockRef.current = false;
  24989. }, 50);
  24990. }
  24991. // Pass to ref since global add is in closure
  24992. var scrollPingRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
  24993. top: isScrollAtTop,
  24994. bottom: isScrollAtBottom,
  24995. left: isScrollAtLeft,
  24996. right: isScrollAtRight
  24997. });
  24998. scrollPingRef.current.top = isScrollAtTop;
  24999. scrollPingRef.current.bottom = isScrollAtBottom;
  25000. scrollPingRef.current.left = isScrollAtLeft;
  25001. scrollPingRef.current.right = isScrollAtRight;
  25002. return function (isHorizontal, delta) {
  25003. var smoothOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  25004. var originScroll = isHorizontal ?
  25005. // Pass origin wheel when on the left
  25006. delta < 0 && scrollPingRef.current.left ||
  25007. // Pass origin wheel when on the right
  25008. delta > 0 && scrollPingRef.current.right // Pass origin wheel when on the top
  25009. : delta < 0 && scrollPingRef.current.top ||
  25010. // Pass origin wheel when on the bottom
  25011. delta > 0 && scrollPingRef.current.bottom;
  25012. if (smoothOffset && originScroll) {
  25013. // No need lock anymore when it's smooth offset from touchMove interval
  25014. clearTimeout(lockTimeoutRef.current);
  25015. lockRef.current = false;
  25016. } else if (!originScroll || lockRef.current) {
  25017. lockScroll();
  25018. }
  25019. return !lockRef.current && originScroll;
  25020. };
  25021. });
  25022. ;// ./node_modules/rc-virtual-list/es/hooks/useFrameWheel.js
  25023. function useFrameWheel(inVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, horizontalScroll,
  25024. /***
  25025. * Return `true` when you need to prevent default event
  25026. */
  25027. onWheelDelta) {
  25028. var offsetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  25029. var nextFrameRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  25030. // Firefox patch
  25031. var wheelValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  25032. var isMouseScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  25033. // Scroll status sync
  25034. var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
  25035. function onWheelY(e, deltaY) {
  25036. raf["default"].cancel(nextFrameRef.current);
  25037. // Do nothing when scroll at the edge, Skip check when is in scroll
  25038. if (originScroll(false, deltaY)) return;
  25039. // Skip if nest List has handled this event
  25040. var event = e;
  25041. if (!event._virtualHandled) {
  25042. event._virtualHandled = true;
  25043. } else {
  25044. return;
  25045. }
  25046. offsetRef.current += deltaY;
  25047. wheelValueRef.current = deltaY;
  25048. // Proxy of scroll events
  25049. if (!isFirefox) {
  25050. event.preventDefault();
  25051. }
  25052. nextFrameRef.current = (0,raf["default"])(function () {
  25053. // Patch a multiple for Firefox to fix wheel number too small
  25054. // ref: https://github.com/ant-design/ant-design/issues/26372#issuecomment-679460266
  25055. var patchMultiple = isMouseScrollRef.current ? 10 : 1;
  25056. onWheelDelta(offsetRef.current * patchMultiple, false);
  25057. offsetRef.current = 0;
  25058. });
  25059. }
  25060. function onWheelX(event, deltaX) {
  25061. onWheelDelta(deltaX, true);
  25062. if (!isFirefox) {
  25063. event.preventDefault();
  25064. }
  25065. }
  25066. // Check for which direction does wheel do. `sx` means `shift + wheel`
  25067. var wheelDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  25068. var wheelDirectionCleanRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  25069. function onWheel(event) {
  25070. if (!inVirtual) return;
  25071. // Wait for 2 frame to clean direction
  25072. raf["default"].cancel(wheelDirectionCleanRef.current);
  25073. wheelDirectionCleanRef.current = (0,raf["default"])(function () {
  25074. wheelDirectionRef.current = null;
  25075. }, 2);
  25076. var deltaX = event.deltaX,
  25077. deltaY = event.deltaY,
  25078. shiftKey = event.shiftKey;
  25079. var mergedDeltaX = deltaX;
  25080. var mergedDeltaY = deltaY;
  25081. if (wheelDirectionRef.current === 'sx' || !wheelDirectionRef.current && (shiftKey || false) && deltaY && !deltaX) {
  25082. mergedDeltaX = deltaY;
  25083. mergedDeltaY = 0;
  25084. wheelDirectionRef.current = 'sx';
  25085. }
  25086. var absX = Math.abs(mergedDeltaX);
  25087. var absY = Math.abs(mergedDeltaY);
  25088. if (wheelDirectionRef.current === null) {
  25089. wheelDirectionRef.current = horizontalScroll && absX > absY ? 'x' : 'y';
  25090. }
  25091. if (wheelDirectionRef.current === 'y') {
  25092. onWheelY(event, mergedDeltaY);
  25093. } else {
  25094. onWheelX(event, mergedDeltaX);
  25095. }
  25096. }
  25097. // A patch for firefox
  25098. function onFireFoxScroll(event) {
  25099. if (!inVirtual) return;
  25100. isMouseScrollRef.current = event.detail === wheelValueRef.current;
  25101. }
  25102. return [onWheel, onFireFoxScroll];
  25103. }
  25104. ;// ./node_modules/rc-virtual-list/es/hooks/useGetSize.js
  25105. /**
  25106. * Size info need loop query for the `heights` which will has the perf issue.
  25107. * Let cache result for each render phase.
  25108. */
  25109. function useGetSize(mergedData, getKey, heights, itemHeight) {
  25110. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  25111. return [new Map(), []];
  25112. }, [mergedData, heights.id, itemHeight]),
  25113. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
  25114. key2Index = _React$useMemo2[0],
  25115. bottomList = _React$useMemo2[1];
  25116. var getSize = function getSize(startKey) {
  25117. var endKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startKey;
  25118. // Get from cache first
  25119. var startIndex = key2Index.get(startKey);
  25120. var endIndex = key2Index.get(endKey);
  25121. // Loop to fill the cache
  25122. if (startIndex === undefined || endIndex === undefined) {
  25123. var dataLen = mergedData.length;
  25124. for (var i = bottomList.length; i < dataLen; i += 1) {
  25125. var _heights$get;
  25126. var item = mergedData[i];
  25127. var key = getKey(item);
  25128. key2Index.set(key, i);
  25129. var cacheHeight = (_heights$get = heights.get(key)) !== null && _heights$get !== void 0 ? _heights$get : itemHeight;
  25130. bottomList[i] = (bottomList[i - 1] || 0) + cacheHeight;
  25131. if (key === startKey) {
  25132. startIndex = i;
  25133. }
  25134. if (key === endKey) {
  25135. endIndex = i;
  25136. }
  25137. if (startIndex !== undefined && endIndex !== undefined) {
  25138. break;
  25139. }
  25140. }
  25141. }
  25142. return {
  25143. top: bottomList[startIndex - 1] || 0,
  25144. bottom: bottomList[endIndex]
  25145. };
  25146. };
  25147. return getSize;
  25148. }
  25149. ;// ./node_modules/rc-virtual-list/es/utils/CacheMap.js
  25150. // Firefox has low performance of map.
  25151. var CacheMap = /*#__PURE__*/function () {
  25152. function CacheMap() {
  25153. (0,classCallCheck["default"])(this, CacheMap);
  25154. (0,defineProperty["default"])(this, "maps", void 0);
  25155. // Used for cache key
  25156. // `useMemo` no need to update if `id` not change
  25157. (0,defineProperty["default"])(this, "id", 0);
  25158. (0,defineProperty["default"])(this, "diffRecords", new Map());
  25159. this.maps = Object.create(null);
  25160. }
  25161. (0,createClass["default"])(CacheMap, [{
  25162. key: "set",
  25163. value: function set(key, value) {
  25164. // Record prev value
  25165. this.diffRecords.set(key, this.maps[key]);
  25166. this.maps[key] = value;
  25167. this.id += 1;
  25168. }
  25169. }, {
  25170. key: "get",
  25171. value: function get(key) {
  25172. return this.maps[key];
  25173. }
  25174. /**
  25175. * CacheMap will record the key changed.
  25176. * To help to know what's update in the next render.
  25177. */
  25178. }, {
  25179. key: "resetRecord",
  25180. value: function resetRecord() {
  25181. this.diffRecords.clear();
  25182. }
  25183. }, {
  25184. key: "getRecord",
  25185. value: function getRecord() {
  25186. return this.diffRecords;
  25187. }
  25188. }]);
  25189. return CacheMap;
  25190. }();
  25191. /* harmony default export */ var utils_CacheMap = (CacheMap);
  25192. ;// ./node_modules/rc-virtual-list/es/hooks/useHeights.js
  25193. function parseNumber(value) {
  25194. var num = parseFloat(value);
  25195. return isNaN(num) ? 0 : num;
  25196. }
  25197. function useHeights(getKey, onItemAdd, onItemRemove) {
  25198. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  25199. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  25200. updatedMark = _React$useState2[0],
  25201. setUpdatedMark = _React$useState2[1];
  25202. var instanceRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new Map());
  25203. var heightsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new utils_CacheMap());
  25204. var promiseIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  25205. function cancelRaf() {
  25206. promiseIdRef.current += 1;
  25207. }
  25208. function collectHeight() {
  25209. var sync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  25210. cancelRaf();
  25211. var doCollect = function doCollect() {
  25212. var changed = false;
  25213. instanceRef.current.forEach(function (element, key) {
  25214. if (element && element.offsetParent) {
  25215. var offsetHeight = element.offsetHeight;
  25216. var _getComputedStyle = getComputedStyle(element),
  25217. marginTop = _getComputedStyle.marginTop,
  25218. marginBottom = _getComputedStyle.marginBottom;
  25219. var marginTopNum = parseNumber(marginTop);
  25220. var marginBottomNum = parseNumber(marginBottom);
  25221. var totalHeight = offsetHeight + marginTopNum + marginBottomNum;
  25222. if (heightsRef.current.get(key) !== totalHeight) {
  25223. heightsRef.current.set(key, totalHeight);
  25224. changed = true;
  25225. }
  25226. }
  25227. });
  25228. // Always trigger update mark to tell parent that should re-calculate heights when resized
  25229. if (changed) {
  25230. setUpdatedMark(function (c) {
  25231. return c + 1;
  25232. });
  25233. }
  25234. };
  25235. if (sync) {
  25236. doCollect();
  25237. } else {
  25238. promiseIdRef.current += 1;
  25239. var id = promiseIdRef.current;
  25240. Promise.resolve().then(function () {
  25241. if (id === promiseIdRef.current) {
  25242. doCollect();
  25243. }
  25244. });
  25245. }
  25246. }
  25247. function setInstanceRef(item, instance) {
  25248. var key = getKey(item);
  25249. var origin = instanceRef.current.get(key);
  25250. if (instance) {
  25251. instanceRef.current.set(key, instance);
  25252. collectHeight();
  25253. } else {
  25254. instanceRef.current.delete(key);
  25255. }
  25256. // Instance changed
  25257. if (!origin !== !instance) {
  25258. if (instance) {
  25259. onItemAdd === null || onItemAdd === void 0 || onItemAdd(item);
  25260. } else {
  25261. onItemRemove === null || onItemRemove === void 0 || onItemRemove(item);
  25262. }
  25263. }
  25264. }
  25265. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  25266. return cancelRaf;
  25267. }, []);
  25268. return [setInstanceRef, collectHeight, heightsRef.current, updatedMark];
  25269. }
  25270. ;// ./node_modules/rc-virtual-list/es/hooks/useMobileTouchMove.js
  25271. var SMOOTH_PTG = 14 / 15;
  25272. function useMobileTouchMove(inVirtual, listRef, callback) {
  25273. var touchedRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  25274. var touchXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  25275. var touchYRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  25276. var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  25277. // Smooth scroll
  25278. var intervalRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  25279. /* eslint-disable prefer-const */
  25280. var cleanUpEvents;
  25281. var onTouchMove = function onTouchMove(e) {
  25282. if (touchedRef.current) {
  25283. var currentX = Math.ceil(e.touches[0].pageX);
  25284. var currentY = Math.ceil(e.touches[0].pageY);
  25285. var offsetX = touchXRef.current - currentX;
  25286. var offsetY = touchYRef.current - currentY;
  25287. var _isHorizontal = Math.abs(offsetX) > Math.abs(offsetY);
  25288. if (_isHorizontal) {
  25289. touchXRef.current = currentX;
  25290. } else {
  25291. touchYRef.current = currentY;
  25292. }
  25293. var scrollHandled = callback(_isHorizontal, _isHorizontal ? offsetX : offsetY, false, e);
  25294. if (scrollHandled) {
  25295. e.preventDefault();
  25296. }
  25297. // Smooth interval
  25298. clearInterval(intervalRef.current);
  25299. if (scrollHandled) {
  25300. intervalRef.current = setInterval(function () {
  25301. if (_isHorizontal) {
  25302. offsetX *= SMOOTH_PTG;
  25303. } else {
  25304. offsetY *= SMOOTH_PTG;
  25305. }
  25306. var offset = Math.floor(_isHorizontal ? offsetX : offsetY);
  25307. if (!callback(_isHorizontal, offset, true) || Math.abs(offset) <= 0.1) {
  25308. clearInterval(intervalRef.current);
  25309. }
  25310. }, 16);
  25311. }
  25312. }
  25313. };
  25314. var onTouchEnd = function onTouchEnd() {
  25315. touchedRef.current = false;
  25316. cleanUpEvents();
  25317. };
  25318. var onTouchStart = function onTouchStart(e) {
  25319. cleanUpEvents();
  25320. if (e.touches.length === 1 && !touchedRef.current) {
  25321. touchedRef.current = true;
  25322. touchXRef.current = Math.ceil(e.touches[0].pageX);
  25323. touchYRef.current = Math.ceil(e.touches[0].pageY);
  25324. elementRef.current = e.target;
  25325. elementRef.current.addEventListener('touchmove', onTouchMove, {
  25326. passive: false
  25327. });
  25328. elementRef.current.addEventListener('touchend', onTouchEnd, {
  25329. passive: true
  25330. });
  25331. }
  25332. };
  25333. cleanUpEvents = function cleanUpEvents() {
  25334. if (elementRef.current) {
  25335. elementRef.current.removeEventListener('touchmove', onTouchMove);
  25336. elementRef.current.removeEventListener('touchend', onTouchEnd);
  25337. }
  25338. };
  25339. (0,useLayoutEffect["default"])(function () {
  25340. if (inVirtual) {
  25341. listRef.current.addEventListener('touchstart', onTouchStart, {
  25342. passive: true
  25343. });
  25344. }
  25345. return function () {
  25346. var _listRef$current;
  25347. (_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.removeEventListener('touchstart', onTouchStart);
  25348. cleanUpEvents();
  25349. clearInterval(intervalRef.current);
  25350. };
  25351. }, [inVirtual]);
  25352. }
  25353. ;// ./node_modules/rc-virtual-list/es/hooks/useScrollDrag.js
  25354. function smoothScrollOffset(offset) {
  25355. return Math.floor(Math.pow(offset, 0.5));
  25356. }
  25357. function getPageXY(e, horizontal) {
  25358. var obj = 'touches' in e ? e.touches[0] : e;
  25359. return obj[horizontal ? 'pageX' : 'pageY'] - window[horizontal ? 'scrollX' : 'scrollY'];
  25360. }
  25361. function useScrollDrag(inVirtual, componentRef, onScrollOffset) {
  25362. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  25363. var ele = componentRef.current;
  25364. if (inVirtual && ele) {
  25365. var mouseDownLock = false;
  25366. var rafId;
  25367. var _offset;
  25368. var stopScroll = function stopScroll() {
  25369. raf["default"].cancel(rafId);
  25370. };
  25371. var continueScroll = function continueScroll() {
  25372. stopScroll();
  25373. rafId = (0,raf["default"])(function () {
  25374. onScrollOffset(_offset);
  25375. continueScroll();
  25376. });
  25377. };
  25378. var clearDragState = function clearDragState() {
  25379. mouseDownLock = false;
  25380. stopScroll();
  25381. };
  25382. var onMouseDown = function onMouseDown(e) {
  25383. // Skip if element set draggable
  25384. if (e.target.draggable || e.button !== 0) {
  25385. return;
  25386. }
  25387. // Skip if nest List has handled this event
  25388. var event = e;
  25389. if (!event._virtualHandled) {
  25390. event._virtualHandled = true;
  25391. mouseDownLock = true;
  25392. }
  25393. };
  25394. var onMouseMove = function onMouseMove(e) {
  25395. if (mouseDownLock) {
  25396. var mouseY = getPageXY(e, false);
  25397. var _ele$getBoundingClien = ele.getBoundingClientRect(),
  25398. top = _ele$getBoundingClien.top,
  25399. bottom = _ele$getBoundingClien.bottom;
  25400. if (mouseY <= top) {
  25401. var diff = top - mouseY;
  25402. _offset = -smoothScrollOffset(diff);
  25403. continueScroll();
  25404. } else if (mouseY >= bottom) {
  25405. var _diff = mouseY - bottom;
  25406. _offset = smoothScrollOffset(_diff);
  25407. continueScroll();
  25408. } else {
  25409. stopScroll();
  25410. }
  25411. }
  25412. };
  25413. ele.addEventListener('mousedown', onMouseDown);
  25414. ele.ownerDocument.addEventListener('mouseup', clearDragState);
  25415. ele.ownerDocument.addEventListener('mousemove', onMouseMove);
  25416. ele.ownerDocument.addEventListener('dragend', clearDragState);
  25417. return function () {
  25418. ele.removeEventListener('mousedown', onMouseDown);
  25419. ele.ownerDocument.removeEventListener('mouseup', clearDragState);
  25420. ele.ownerDocument.removeEventListener('mousemove', onMouseMove);
  25421. ele.ownerDocument.removeEventListener('dragend', clearDragState);
  25422. stopScroll();
  25423. };
  25424. }
  25425. }, [inVirtual]);
  25426. }
  25427. ;// ./node_modules/rc-virtual-list/es/hooks/useScrollTo.js
  25428. /* eslint-disable no-param-reassign */
  25429. var MAX_TIMES = 10;
  25430. function useScrollTo(containerRef, data, heights, itemHeight, getKey, collectHeight, syncScrollTop, triggerFlash) {
  25431. var scrollRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  25432. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  25433. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  25434. syncState = _React$useState2[0],
  25435. setSyncState = _React$useState2[1];
  25436. // ========================== Sync Scroll ==========================
  25437. (0,useLayoutEffect["default"])(function () {
  25438. if (syncState && syncState.times < MAX_TIMES) {
  25439. // Never reach
  25440. if (!containerRef.current) {
  25441. setSyncState(function (ori) {
  25442. return (0,objectSpread2["default"])({}, ori);
  25443. });
  25444. return;
  25445. }
  25446. collectHeight();
  25447. var targetAlign = syncState.targetAlign,
  25448. originAlign = syncState.originAlign,
  25449. index = syncState.index,
  25450. offset = syncState.offset;
  25451. var height = containerRef.current.clientHeight;
  25452. var needCollectHeight = false;
  25453. var newTargetAlign = targetAlign;
  25454. var targetTop = null;
  25455. // Go to next frame if height not exist
  25456. if (height) {
  25457. var mergedAlign = targetAlign || originAlign;
  25458. // Get top & bottom
  25459. var stackTop = 0;
  25460. var itemTop = 0;
  25461. var itemBottom = 0;
  25462. var maxLen = Math.min(data.length - 1, index);
  25463. for (var i = 0; i <= maxLen; i += 1) {
  25464. var key = getKey(data[i]);
  25465. itemTop = stackTop;
  25466. var cacheHeight = heights.get(key);
  25467. itemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight);
  25468. stackTop = itemBottom;
  25469. }
  25470. // Check if need sync height (visible range has item not record height)
  25471. var leftHeight = mergedAlign === 'top' ? offset : height - offset;
  25472. for (var _i = maxLen; _i >= 0; _i -= 1) {
  25473. var _key = getKey(data[_i]);
  25474. var _cacheHeight = heights.get(_key);
  25475. if (_cacheHeight === undefined) {
  25476. needCollectHeight = true;
  25477. break;
  25478. }
  25479. leftHeight -= _cacheHeight;
  25480. if (leftHeight <= 0) {
  25481. break;
  25482. }
  25483. }
  25484. // Scroll to
  25485. switch (mergedAlign) {
  25486. case 'top':
  25487. targetTop = itemTop - offset;
  25488. break;
  25489. case 'bottom':
  25490. targetTop = itemBottom - height + offset;
  25491. break;
  25492. default:
  25493. {
  25494. var scrollTop = containerRef.current.scrollTop;
  25495. var scrollBottom = scrollTop + height;
  25496. if (itemTop < scrollTop) {
  25497. newTargetAlign = 'top';
  25498. } else if (itemBottom > scrollBottom) {
  25499. newTargetAlign = 'bottom';
  25500. }
  25501. }
  25502. }
  25503. if (targetTop !== null) {
  25504. syncScrollTop(targetTop);
  25505. }
  25506. // One more time for sync
  25507. if (targetTop !== syncState.lastTop) {
  25508. needCollectHeight = true;
  25509. }
  25510. }
  25511. // Trigger next effect
  25512. if (needCollectHeight) {
  25513. setSyncState((0,objectSpread2["default"])((0,objectSpread2["default"])({}, syncState), {}, {
  25514. times: syncState.times + 1,
  25515. targetAlign: newTargetAlign,
  25516. lastTop: targetTop
  25517. }));
  25518. }
  25519. } else if ( true && (syncState === null || syncState === void 0 ? void 0 : syncState.times) === MAX_TIMES) {
  25520. (0,rc_util_es.warning)(false, 'Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.');
  25521. }
  25522. }, [syncState, containerRef.current]);
  25523. // =========================== Scroll To ===========================
  25524. return function (arg) {
  25525. // When not argument provided, we think dev may want to show the scrollbar
  25526. if (arg === null || arg === undefined) {
  25527. triggerFlash();
  25528. return;
  25529. }
  25530. // Normal scroll logic
  25531. raf["default"].cancel(scrollRef.current);
  25532. if (typeof arg === 'number') {
  25533. syncScrollTop(arg);
  25534. } else if (arg && (0,esm_typeof["default"])(arg) === 'object') {
  25535. var index;
  25536. var align = arg.align;
  25537. if ('index' in arg) {
  25538. index = arg.index;
  25539. } else {
  25540. index = data.findIndex(function (item) {
  25541. return getKey(item) === arg.key;
  25542. });
  25543. }
  25544. var _arg$offset = arg.offset,
  25545. offset = _arg$offset === void 0 ? 0 : _arg$offset;
  25546. setSyncState({
  25547. times: 0,
  25548. index: index,
  25549. offset: offset,
  25550. originAlign: align
  25551. });
  25552. }
  25553. };
  25554. }
  25555. ;// ./node_modules/rc-virtual-list/es/ScrollBar.js
  25556. var ScrollBar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  25557. var prefixCls = props.prefixCls,
  25558. rtl = props.rtl,
  25559. scrollOffset = props.scrollOffset,
  25560. scrollRange = props.scrollRange,
  25561. onStartMove = props.onStartMove,
  25562. onStopMove = props.onStopMove,
  25563. onScroll = props.onScroll,
  25564. horizontal = props.horizontal,
  25565. spinSize = props.spinSize,
  25566. containerSize = props.containerSize,
  25567. style = props.style,
  25568. propsThumbStyle = props.thumbStyle,
  25569. showScrollBar = props.showScrollBar;
  25570. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  25571. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  25572. dragging = _React$useState2[0],
  25573. setDragging = _React$useState2[1];
  25574. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  25575. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  25576. pageXY = _React$useState4[0],
  25577. setPageXY = _React$useState4[1];
  25578. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  25579. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  25580. startTop = _React$useState6[0],
  25581. setStartTop = _React$useState6[1];
  25582. var isLTR = !rtl;
  25583. // ========================= Refs =========================
  25584. var scrollbarRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  25585. var thumbRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  25586. // ======================= Visible ========================
  25587. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(showScrollBar),
  25588. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  25589. visible = _React$useState8[0],
  25590. setVisible = _React$useState8[1];
  25591. var visibleTimeoutRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  25592. var delayHidden = function delayHidden() {
  25593. if (showScrollBar === true || showScrollBar === false) return;
  25594. clearTimeout(visibleTimeoutRef.current);
  25595. setVisible(true);
  25596. visibleTimeoutRef.current = setTimeout(function () {
  25597. setVisible(false);
  25598. }, 3000);
  25599. };
  25600. // ======================== Range =========================
  25601. var enableScrollRange = scrollRange - containerSize || 0;
  25602. var enableOffsetRange = containerSize - spinSize || 0;
  25603. // ========================= Top ==========================
  25604. var top = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  25605. if (scrollOffset === 0 || enableScrollRange === 0) {
  25606. return 0;
  25607. }
  25608. var ptg = scrollOffset / enableScrollRange;
  25609. return ptg * enableOffsetRange;
  25610. }, [scrollOffset, enableScrollRange, enableOffsetRange]);
  25611. // ====================== Container =======================
  25612. var onContainerMouseDown = function onContainerMouseDown(e) {
  25613. e.stopPropagation();
  25614. e.preventDefault();
  25615. };
  25616. // ======================== Thumb =========================
  25617. var stateRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  25618. top: top,
  25619. dragging: dragging,
  25620. pageY: pageXY,
  25621. startTop: startTop
  25622. });
  25623. stateRef.current = {
  25624. top: top,
  25625. dragging: dragging,
  25626. pageY: pageXY,
  25627. startTop: startTop
  25628. };
  25629. var onThumbMouseDown = function onThumbMouseDown(e) {
  25630. setDragging(true);
  25631. setPageXY(getPageXY(e, horizontal));
  25632. setStartTop(stateRef.current.top);
  25633. onStartMove();
  25634. e.stopPropagation();
  25635. e.preventDefault();
  25636. };
  25637. // ======================== Effect ========================
  25638. // React make event as passive, but we need to preventDefault
  25639. // Add event on dom directly instead.
  25640. // ref: https://github.com/facebook/react/issues/9809
  25641. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  25642. var onScrollbarTouchStart = function onScrollbarTouchStart(e) {
  25643. e.preventDefault();
  25644. };
  25645. var scrollbarEle = scrollbarRef.current;
  25646. var thumbEle = thumbRef.current;
  25647. scrollbarEle.addEventListener('touchstart', onScrollbarTouchStart, {
  25648. passive: false
  25649. });
  25650. thumbEle.addEventListener('touchstart', onThumbMouseDown, {
  25651. passive: false
  25652. });
  25653. return function () {
  25654. scrollbarEle.removeEventListener('touchstart', onScrollbarTouchStart);
  25655. thumbEle.removeEventListener('touchstart', onThumbMouseDown);
  25656. };
  25657. }, []);
  25658. // Pass to effect
  25659. var enableScrollRangeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  25660. enableScrollRangeRef.current = enableScrollRange;
  25661. var enableOffsetRangeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  25662. enableOffsetRangeRef.current = enableOffsetRange;
  25663. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  25664. if (dragging) {
  25665. var moveRafId;
  25666. var onMouseMove = function onMouseMove(e) {
  25667. var _stateRef$current = stateRef.current,
  25668. stateDragging = _stateRef$current.dragging,
  25669. statePageY = _stateRef$current.pageY,
  25670. stateStartTop = _stateRef$current.startTop;
  25671. raf["default"].cancel(moveRafId);
  25672. var rect = scrollbarRef.current.getBoundingClientRect();
  25673. var scale = containerSize / (horizontal ? rect.width : rect.height);
  25674. if (stateDragging) {
  25675. var offset = (getPageXY(e, horizontal) - statePageY) * scale;
  25676. var newTop = stateStartTop;
  25677. if (!isLTR && horizontal) {
  25678. newTop -= offset;
  25679. } else {
  25680. newTop += offset;
  25681. }
  25682. var tmpEnableScrollRange = enableScrollRangeRef.current;
  25683. var tmpEnableOffsetRange = enableOffsetRangeRef.current;
  25684. var ptg = tmpEnableOffsetRange ? newTop / tmpEnableOffsetRange : 0;
  25685. var newScrollTop = Math.ceil(ptg * tmpEnableScrollRange);
  25686. newScrollTop = Math.max(newScrollTop, 0);
  25687. newScrollTop = Math.min(newScrollTop, tmpEnableScrollRange);
  25688. moveRafId = (0,raf["default"])(function () {
  25689. onScroll(newScrollTop, horizontal);
  25690. });
  25691. }
  25692. };
  25693. var onMouseUp = function onMouseUp() {
  25694. setDragging(false);
  25695. onStopMove();
  25696. };
  25697. window.addEventListener('mousemove', onMouseMove, {
  25698. passive: true
  25699. });
  25700. window.addEventListener('touchmove', onMouseMove, {
  25701. passive: true
  25702. });
  25703. window.addEventListener('mouseup', onMouseUp, {
  25704. passive: true
  25705. });
  25706. window.addEventListener('touchend', onMouseUp, {
  25707. passive: true
  25708. });
  25709. return function () {
  25710. window.removeEventListener('mousemove', onMouseMove);
  25711. window.removeEventListener('touchmove', onMouseMove);
  25712. window.removeEventListener('mouseup', onMouseUp);
  25713. window.removeEventListener('touchend', onMouseUp);
  25714. raf["default"].cancel(moveRafId);
  25715. };
  25716. }
  25717. }, [dragging]);
  25718. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  25719. delayHidden();
  25720. return function () {
  25721. clearTimeout(visibleTimeoutRef.current);
  25722. };
  25723. }, [scrollOffset]);
  25724. // ====================== Imperative ======================
  25725. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  25726. return {
  25727. delayHidden: delayHidden
  25728. };
  25729. });
  25730. // ======================== Render ========================
  25731. var scrollbarPrefixCls = "".concat(prefixCls, "-scrollbar");
  25732. var containerStyle = {
  25733. position: 'absolute',
  25734. visibility: visible ? null : 'hidden'
  25735. };
  25736. var thumbStyle = {
  25737. position: 'absolute',
  25738. borderRadius: 99,
  25739. background: 'var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))',
  25740. cursor: 'pointer',
  25741. userSelect: 'none'
  25742. };
  25743. if (horizontal) {
  25744. Object.assign(containerStyle, {
  25745. height: 8,
  25746. left: 0,
  25747. right: 0,
  25748. bottom: 0
  25749. });
  25750. Object.assign(thumbStyle, (0,defineProperty["default"])({
  25751. height: '100%',
  25752. width: spinSize
  25753. }, isLTR ? 'left' : 'right', top));
  25754. } else {
  25755. Object.assign(containerStyle, (0,defineProperty["default"])({
  25756. width: 8,
  25757. top: 0,
  25758. bottom: 0
  25759. }, isLTR ? 'right' : 'left', 0));
  25760. Object.assign(thumbStyle, {
  25761. width: '100%',
  25762. height: spinSize,
  25763. top: top
  25764. });
  25765. }
  25766. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  25767. ref: scrollbarRef,
  25768. className: classnames_default()(scrollbarPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(scrollbarPrefixCls, "-horizontal"), horizontal), "".concat(scrollbarPrefixCls, "-vertical"), !horizontal), "".concat(scrollbarPrefixCls, "-visible"), visible)),
  25769. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, containerStyle), style),
  25770. onMouseDown: onContainerMouseDown,
  25771. onMouseMove: delayHidden
  25772. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  25773. ref: thumbRef,
  25774. className: classnames_default()("".concat(scrollbarPrefixCls, "-thumb"), (0,defineProperty["default"])({}, "".concat(scrollbarPrefixCls, "-thumb-moving"), dragging)),
  25775. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, thumbStyle), propsThumbStyle),
  25776. onMouseDown: onThumbMouseDown
  25777. }));
  25778. });
  25779. if (true) {
  25780. ScrollBar.displayName = 'ScrollBar';
  25781. }
  25782. /* harmony default export */ var es_ScrollBar = (ScrollBar);
  25783. ;// ./node_modules/rc-virtual-list/es/utils/scrollbarUtil.js
  25784. var MIN_SIZE = 20;
  25785. function getSpinSize() {
  25786. var containerSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  25787. var scrollRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  25788. var baseSize = containerSize / scrollRange * containerSize;
  25789. if (isNaN(baseSize)) {
  25790. baseSize = 0;
  25791. }
  25792. baseSize = Math.max(baseSize, MIN_SIZE);
  25793. return Math.floor(baseSize);
  25794. }
  25795. ;// ./node_modules/rc-virtual-list/es/List.js
  25796. var List_excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"];
  25797. var EMPTY_DATA = [];
  25798. var ScrollStyle = {
  25799. overflowY: 'auto',
  25800. overflowAnchor: 'none'
  25801. };
  25802. function RawList(props, ref) {
  25803. var _props$prefixCls = props.prefixCls,
  25804. prefixCls = _props$prefixCls === void 0 ? 'rc-virtual-list' : _props$prefixCls,
  25805. className = props.className,
  25806. height = props.height,
  25807. itemHeight = props.itemHeight,
  25808. _props$fullHeight = props.fullHeight,
  25809. fullHeight = _props$fullHeight === void 0 ? true : _props$fullHeight,
  25810. style = props.style,
  25811. data = props.data,
  25812. children = props.children,
  25813. itemKey = props.itemKey,
  25814. virtual = props.virtual,
  25815. direction = props.direction,
  25816. scrollWidth = props.scrollWidth,
  25817. _props$component = props.component,
  25818. Component = _props$component === void 0 ? 'div' : _props$component,
  25819. onScroll = props.onScroll,
  25820. onVirtualScroll = props.onVirtualScroll,
  25821. onVisibleChange = props.onVisibleChange,
  25822. innerProps = props.innerProps,
  25823. extraRender = props.extraRender,
  25824. styles = props.styles,
  25825. _props$showScrollBar = props.showScrollBar,
  25826. showScrollBar = _props$showScrollBar === void 0 ? 'optional' : _props$showScrollBar,
  25827. restProps = (0,objectWithoutProperties["default"])(props, List_excluded);
  25828. // =============================== Item Key ===============================
  25829. var getKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (item) {
  25830. if (typeof itemKey === 'function') {
  25831. return itemKey(item);
  25832. }
  25833. return item === null || item === void 0 ? void 0 : item[itemKey];
  25834. }, [itemKey]);
  25835. // ================================ Height ================================
  25836. var _useHeights = useHeights(getKey, null, null),
  25837. _useHeights2 = (0,slicedToArray["default"])(_useHeights, 4),
  25838. setInstanceRef = _useHeights2[0],
  25839. collectHeight = _useHeights2[1],
  25840. heights = _useHeights2[2],
  25841. heightUpdatedMark = _useHeights2[3];
  25842. // ================================= MISC =================================
  25843. var useVirtual = !!(virtual !== false && height && itemHeight);
  25844. var containerHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  25845. return Object.values(heights.maps).reduce(function (total, curr) {
  25846. return total + curr;
  25847. }, 0);
  25848. }, [heights.id, heights.maps]);
  25849. var inVirtual = useVirtual && data && (Math.max(itemHeight * data.length, containerHeight) > height || !!scrollWidth);
  25850. var isRTL = direction === 'rtl';
  25851. var mergedClassName = classnames_default()(prefixCls, (0,defineProperty["default"])({}, "".concat(prefixCls, "-rtl"), isRTL), className);
  25852. var mergedData = data || EMPTY_DATA;
  25853. var componentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  25854. var fillerInnerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  25855. var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  25856. // =============================== Item Key ===============================
  25857. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  25858. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  25859. offsetTop = _useState2[0],
  25860. setOffsetTop = _useState2[1];
  25861. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  25862. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  25863. offsetLeft = _useState4[0],
  25864. setOffsetLeft = _useState4[1];
  25865. var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  25866. _useState6 = (0,slicedToArray["default"])(_useState5, 2),
  25867. scrollMoving = _useState6[0],
  25868. setScrollMoving = _useState6[1];
  25869. var onScrollbarStartMove = function onScrollbarStartMove() {
  25870. setScrollMoving(true);
  25871. };
  25872. var onScrollbarStopMove = function onScrollbarStopMove() {
  25873. setScrollMoving(false);
  25874. };
  25875. var sharedConfig = {
  25876. getKey: getKey
  25877. };
  25878. // ================================ Scroll ================================
  25879. function syncScrollTop(newTop) {
  25880. setOffsetTop(function (origin) {
  25881. var value;
  25882. if (typeof newTop === 'function') {
  25883. value = newTop(origin);
  25884. } else {
  25885. value = newTop;
  25886. }
  25887. var alignedTop = keepInRange(value);
  25888. componentRef.current.scrollTop = alignedTop;
  25889. return alignedTop;
  25890. });
  25891. }
  25892. // ================================ Legacy ================================
  25893. // Put ref here since the range is generate by follow
  25894. var rangeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
  25895. start: 0,
  25896. end: mergedData.length
  25897. });
  25898. var diffItemRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  25899. var _useDiffItem = useDiffItem(mergedData, getKey),
  25900. _useDiffItem2 = (0,slicedToArray["default"])(_useDiffItem, 1),
  25901. diffItem = _useDiffItem2[0];
  25902. diffItemRef.current = diffItem;
  25903. // ========================== Visible Calculation =========================
  25904. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  25905. if (!useVirtual) {
  25906. return {
  25907. scrollHeight: undefined,
  25908. start: 0,
  25909. end: mergedData.length - 1,
  25910. offset: undefined
  25911. };
  25912. }
  25913. // Always use virtual scroll bar in avoid shaking
  25914. if (!inVirtual) {
  25915. var _fillerInnerRef$curre;
  25916. return {
  25917. scrollHeight: ((_fillerInnerRef$curre = fillerInnerRef.current) === null || _fillerInnerRef$curre === void 0 ? void 0 : _fillerInnerRef$curre.offsetHeight) || 0,
  25918. start: 0,
  25919. end: mergedData.length - 1,
  25920. offset: undefined
  25921. };
  25922. }
  25923. var itemTop = 0;
  25924. var startIndex;
  25925. var startOffset;
  25926. var endIndex;
  25927. var dataLen = mergedData.length;
  25928. for (var i = 0; i < dataLen; i += 1) {
  25929. var _item = mergedData[i];
  25930. var key = getKey(_item);
  25931. var cacheHeight = heights.get(key);
  25932. var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight);
  25933. // Check item top in the range
  25934. if (currentItemBottom >= offsetTop && startIndex === undefined) {
  25935. startIndex = i;
  25936. startOffset = itemTop;
  25937. }
  25938. // Check item bottom in the range. We will render additional one item for motion usage
  25939. if (currentItemBottom > offsetTop + height && endIndex === undefined) {
  25940. endIndex = i;
  25941. }
  25942. itemTop = currentItemBottom;
  25943. }
  25944. // When scrollTop at the end but data cut to small count will reach this
  25945. if (startIndex === undefined) {
  25946. startIndex = 0;
  25947. startOffset = 0;
  25948. endIndex = Math.ceil(height / itemHeight);
  25949. }
  25950. if (endIndex === undefined) {
  25951. endIndex = mergedData.length - 1;
  25952. }
  25953. // Give cache to improve scroll experience
  25954. endIndex = Math.min(endIndex + 1, mergedData.length - 1);
  25955. return {
  25956. scrollHeight: itemTop,
  25957. start: startIndex,
  25958. end: endIndex,
  25959. offset: startOffset
  25960. };
  25961. }, [inVirtual, useVirtual, offsetTop, mergedData, heightUpdatedMark, height]),
  25962. scrollHeight = _React$useMemo.scrollHeight,
  25963. start = _React$useMemo.start,
  25964. end = _React$useMemo.end,
  25965. fillerOffset = _React$useMemo.offset;
  25966. rangeRef.current.start = start;
  25967. rangeRef.current.end = end;
  25968. // When scroll up, first visible item get real height may not same as `itemHeight`,
  25969. // Which will make scroll jump.
  25970. // Let's sync scroll top to avoid jump
  25971. external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect(function () {
  25972. var changedRecord = heights.getRecord();
  25973. if (changedRecord.size === 1) {
  25974. var recordKey = Array.from(changedRecord.keys())[0];
  25975. var prevCacheHeight = changedRecord.get(recordKey);
  25976. // Quick switch data may cause `start` not in `mergedData` anymore
  25977. var startItem = mergedData[start];
  25978. if (startItem && prevCacheHeight === undefined) {
  25979. var startIndexKey = getKey(startItem);
  25980. if (startIndexKey === recordKey) {
  25981. var realStartHeight = heights.get(recordKey);
  25982. var diffHeight = realStartHeight - itemHeight;
  25983. syncScrollTop(function (ori) {
  25984. return ori + diffHeight;
  25985. });
  25986. }
  25987. }
  25988. }
  25989. heights.resetRecord();
  25990. }, [scrollHeight]);
  25991. // ================================= Size =================================
  25992. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({
  25993. width: 0,
  25994. height: height
  25995. }),
  25996. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  25997. size = _React$useState2[0],
  25998. setSize = _React$useState2[1];
  25999. var onHolderResize = function onHolderResize(sizeInfo) {
  26000. setSize({
  26001. width: sizeInfo.offsetWidth,
  26002. height: sizeInfo.offsetHeight
  26003. });
  26004. };
  26005. // Hack on scrollbar to enable flash call
  26006. var verticalScrollBarRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  26007. var horizontalScrollBarRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  26008. var horizontalScrollBarSpinSize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  26009. return getSpinSize(size.width, scrollWidth);
  26010. }, [size.width, scrollWidth]);
  26011. var verticalScrollBarSpinSize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  26012. return getSpinSize(size.height, scrollHeight);
  26013. }, [size.height, scrollHeight]);
  26014. // =============================== In Range ===============================
  26015. var maxScrollHeight = scrollHeight - height;
  26016. var maxScrollHeightRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(maxScrollHeight);
  26017. maxScrollHeightRef.current = maxScrollHeight;
  26018. function keepInRange(newScrollTop) {
  26019. var newTop = newScrollTop;
  26020. if (!Number.isNaN(maxScrollHeightRef.current)) {
  26021. newTop = Math.min(newTop, maxScrollHeightRef.current);
  26022. }
  26023. newTop = Math.max(newTop, 0);
  26024. return newTop;
  26025. }
  26026. var isScrollAtTop = offsetTop <= 0;
  26027. var isScrollAtBottom = offsetTop >= maxScrollHeight;
  26028. var isScrollAtLeft = offsetLeft <= 0;
  26029. var isScrollAtRight = offsetLeft >= scrollWidth;
  26030. var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
  26031. // ================================ Scroll ================================
  26032. var getVirtualScrollInfo = function getVirtualScrollInfo() {
  26033. return {
  26034. x: isRTL ? -offsetLeft : offsetLeft,
  26035. y: offsetTop
  26036. };
  26037. };
  26038. var lastVirtualScrollInfoRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(getVirtualScrollInfo());
  26039. var triggerScroll = (0,rc_util_es.useEvent)(function (params) {
  26040. if (onVirtualScroll) {
  26041. var nextInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getVirtualScrollInfo()), params);
  26042. // Trigger when offset changed
  26043. if (lastVirtualScrollInfoRef.current.x !== nextInfo.x || lastVirtualScrollInfoRef.current.y !== nextInfo.y) {
  26044. onVirtualScroll(nextInfo);
  26045. lastVirtualScrollInfoRef.current = nextInfo;
  26046. }
  26047. }
  26048. });
  26049. function onScrollBar(newScrollOffset, horizontal) {
  26050. var newOffset = newScrollOffset;
  26051. if (horizontal) {
  26052. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(function () {
  26053. setOffsetLeft(newOffset);
  26054. });
  26055. triggerScroll();
  26056. } else {
  26057. syncScrollTop(newOffset);
  26058. }
  26059. }
  26060. // When data size reduce. It may trigger native scroll event back to fit scroll position
  26061. function onFallbackScroll(e) {
  26062. var newScrollTop = e.currentTarget.scrollTop;
  26063. if (newScrollTop !== offsetTop) {
  26064. syncScrollTop(newScrollTop);
  26065. }
  26066. // Trigger origin onScroll
  26067. onScroll === null || onScroll === void 0 || onScroll(e);
  26068. triggerScroll();
  26069. }
  26070. var keepInHorizontalRange = function keepInHorizontalRange(nextOffsetLeft) {
  26071. var tmpOffsetLeft = nextOffsetLeft;
  26072. var max = !!scrollWidth ? scrollWidth - size.width : 0;
  26073. tmpOffsetLeft = Math.max(tmpOffsetLeft, 0);
  26074. tmpOffsetLeft = Math.min(tmpOffsetLeft, max);
  26075. return tmpOffsetLeft;
  26076. };
  26077. var onWheelDelta = (0,rc_util_es.useEvent)(function (offsetXY, fromHorizontal) {
  26078. if (fromHorizontal) {
  26079. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(function () {
  26080. setOffsetLeft(function (left) {
  26081. var nextOffsetLeft = left + (isRTL ? -offsetXY : offsetXY);
  26082. return keepInHorizontalRange(nextOffsetLeft);
  26083. });
  26084. });
  26085. triggerScroll();
  26086. } else {
  26087. syncScrollTop(function (top) {
  26088. var newTop = top + offsetXY;
  26089. return newTop;
  26090. });
  26091. }
  26092. });
  26093. // Since this added in global,should use ref to keep update
  26094. var _useFrameWheel = useFrameWheel(useVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, !!scrollWidth, onWheelDelta),
  26095. _useFrameWheel2 = (0,slicedToArray["default"])(_useFrameWheel, 2),
  26096. onRawWheel = _useFrameWheel2[0],
  26097. onFireFoxScroll = _useFrameWheel2[1];
  26098. // Mobile touch move
  26099. useMobileTouchMove(useVirtual, componentRef, function (isHorizontal, delta, smoothOffset, e) {
  26100. var event = e;
  26101. if (originScroll(isHorizontal, delta, smoothOffset)) {
  26102. return false;
  26103. }
  26104. // Fix nest List trigger TouchMove event
  26105. if (!event || !event._virtualHandled) {
  26106. if (event) {
  26107. event._virtualHandled = true;
  26108. }
  26109. onRawWheel({
  26110. preventDefault: function preventDefault() {},
  26111. deltaX: isHorizontal ? delta : 0,
  26112. deltaY: isHorizontal ? 0 : delta
  26113. });
  26114. return true;
  26115. }
  26116. return false;
  26117. });
  26118. // MouseDown drag for scroll
  26119. useScrollDrag(inVirtual, componentRef, function (offset) {
  26120. syncScrollTop(function (top) {
  26121. return top + offset;
  26122. });
  26123. });
  26124. (0,useLayoutEffect["default"])(function () {
  26125. // Firefox only
  26126. function onMozMousePixelScroll(e) {
  26127. // scrolling at top/bottom limit
  26128. var scrollingUpAtTop = isScrollAtTop && e.detail < 0;
  26129. var scrollingDownAtBottom = isScrollAtBottom && e.detail > 0;
  26130. if (useVirtual && !scrollingUpAtTop && !scrollingDownAtBottom) {
  26131. e.preventDefault();
  26132. }
  26133. }
  26134. var componentEle = componentRef.current;
  26135. componentEle.addEventListener('wheel', onRawWheel, {
  26136. passive: false
  26137. });
  26138. componentEle.addEventListener('DOMMouseScroll', onFireFoxScroll, {
  26139. passive: true
  26140. });
  26141. componentEle.addEventListener('MozMousePixelScroll', onMozMousePixelScroll, {
  26142. passive: false
  26143. });
  26144. return function () {
  26145. componentEle.removeEventListener('wheel', onRawWheel);
  26146. componentEle.removeEventListener('DOMMouseScroll', onFireFoxScroll);
  26147. componentEle.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll);
  26148. };
  26149. }, [useVirtual, isScrollAtTop, isScrollAtBottom]);
  26150. // Sync scroll left
  26151. (0,useLayoutEffect["default"])(function () {
  26152. if (scrollWidth) {
  26153. var newOffsetLeft = keepInHorizontalRange(offsetLeft);
  26154. setOffsetLeft(newOffsetLeft);
  26155. triggerScroll({
  26156. x: newOffsetLeft
  26157. });
  26158. }
  26159. }, [size.width, scrollWidth]);
  26160. // ================================= Ref ==================================
  26161. var delayHideScrollBar = function delayHideScrollBar() {
  26162. var _verticalScrollBarRef, _horizontalScrollBarR;
  26163. (_verticalScrollBarRef = verticalScrollBarRef.current) === null || _verticalScrollBarRef === void 0 || _verticalScrollBarRef.delayHidden();
  26164. (_horizontalScrollBarR = horizontalScrollBarRef.current) === null || _horizontalScrollBarR === void 0 || _horizontalScrollBarR.delayHidden();
  26165. };
  26166. var _scrollTo = useScrollTo(componentRef, mergedData, heights, itemHeight, getKey, function () {
  26167. return collectHeight(true);
  26168. }, syncScrollTop, delayHideScrollBar);
  26169. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  26170. return {
  26171. nativeElement: containerRef.current,
  26172. getScrollInfo: getVirtualScrollInfo,
  26173. scrollTo: function scrollTo(config) {
  26174. function isPosScroll(arg) {
  26175. return arg && (0,esm_typeof["default"])(arg) === 'object' && ('left' in arg || 'top' in arg);
  26176. }
  26177. if (isPosScroll(config)) {
  26178. // Scroll X
  26179. if (config.left !== undefined) {
  26180. setOffsetLeft(keepInHorizontalRange(config.left));
  26181. }
  26182. // Scroll Y
  26183. _scrollTo(config.top);
  26184. } else {
  26185. _scrollTo(config);
  26186. }
  26187. }
  26188. };
  26189. });
  26190. // ================================ Effect ================================
  26191. /** We need told outside that some list not rendered */
  26192. (0,useLayoutEffect["default"])(function () {
  26193. if (onVisibleChange) {
  26194. var renderList = mergedData.slice(start, end + 1);
  26195. onVisibleChange(renderList, mergedData);
  26196. }
  26197. }, [start, end, mergedData]);
  26198. // ================================ Extra =================================
  26199. var getSize = useGetSize(mergedData, getKey, heights, itemHeight);
  26200. var extraContent = extraRender === null || extraRender === void 0 ? void 0 : extraRender({
  26201. start: start,
  26202. end: end,
  26203. virtual: inVirtual,
  26204. offsetX: offsetLeft,
  26205. offsetY: fillerOffset,
  26206. rtl: isRTL,
  26207. getSize: getSize
  26208. });
  26209. // ================================ Render ================================
  26210. var listChildren = useChildren(mergedData, start, end, scrollWidth, offsetLeft, setInstanceRef, children, sharedConfig);
  26211. var componentStyle = null;
  26212. if (height) {
  26213. componentStyle = (0,objectSpread2["default"])((0,defineProperty["default"])({}, fullHeight ? 'height' : 'maxHeight', height), ScrollStyle);
  26214. if (useVirtual) {
  26215. componentStyle.overflowY = 'hidden';
  26216. if (scrollWidth) {
  26217. componentStyle.overflowX = 'hidden';
  26218. }
  26219. if (scrollMoving) {
  26220. componentStyle.pointerEvents = 'none';
  26221. }
  26222. }
  26223. }
  26224. var containerProps = {};
  26225. if (isRTL) {
  26226. containerProps.dir = 'rtl';
  26227. }
  26228. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  26229. ref: containerRef,
  26230. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
  26231. position: 'relative'
  26232. }),
  26233. className: mergedClassName
  26234. }, containerProps, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  26235. onResize: onHolderResize
  26236. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
  26237. className: "".concat(prefixCls, "-holder"),
  26238. style: componentStyle,
  26239. ref: componentRef,
  26240. onScroll: onFallbackScroll,
  26241. onMouseEnter: delayHideScrollBar
  26242. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Filler, {
  26243. prefixCls: prefixCls,
  26244. height: scrollHeight,
  26245. offsetX: offsetLeft,
  26246. offsetY: fillerOffset,
  26247. scrollWidth: scrollWidth,
  26248. onInnerResize: collectHeight,
  26249. ref: fillerInnerRef,
  26250. innerProps: innerProps,
  26251. rtl: isRTL,
  26252. extra: extraContent
  26253. }, listChildren))), inVirtual && scrollHeight > height && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ScrollBar, {
  26254. ref: verticalScrollBarRef,
  26255. prefixCls: prefixCls,
  26256. scrollOffset: offsetTop,
  26257. scrollRange: scrollHeight,
  26258. rtl: isRTL,
  26259. onScroll: onScrollBar,
  26260. onStartMove: onScrollbarStartMove,
  26261. onStopMove: onScrollbarStopMove,
  26262. spinSize: verticalScrollBarSpinSize,
  26263. containerSize: size.height,
  26264. style: styles === null || styles === void 0 ? void 0 : styles.verticalScrollBar,
  26265. thumbStyle: styles === null || styles === void 0 ? void 0 : styles.verticalScrollBarThumb,
  26266. showScrollBar: showScrollBar
  26267. }), inVirtual && scrollWidth > size.width && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ScrollBar, {
  26268. ref: horizontalScrollBarRef,
  26269. prefixCls: prefixCls,
  26270. scrollOffset: offsetLeft,
  26271. scrollRange: scrollWidth,
  26272. rtl: isRTL,
  26273. onScroll: onScrollBar,
  26274. onStartMove: onScrollbarStartMove,
  26275. onStopMove: onScrollbarStopMove,
  26276. spinSize: horizontalScrollBarSpinSize,
  26277. containerSize: size.width,
  26278. horizontal: true,
  26279. style: styles === null || styles === void 0 ? void 0 : styles.horizontalScrollBar,
  26280. thumbStyle: styles === null || styles === void 0 ? void 0 : styles.horizontalScrollBarThumb,
  26281. showScrollBar: showScrollBar
  26282. }));
  26283. }
  26284. var List_List = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RawList);
  26285. List_List.displayName = 'List';
  26286. /* harmony default export */ var rc_virtual_list_es_List = (List_List);
  26287. ;// ./node_modules/rc-virtual-list/es/index.js
  26288. /* harmony default export */ var rc_virtual_list_es = (rc_virtual_list_es_List);
  26289. ;// ./node_modules/rc-select/es/utils/platformUtil.js
  26290. /* istanbul ignore file */
  26291. function isPlatformMac() {
  26292. return /(mac\sos|macintosh)/i.test(navigator.appVersion);
  26293. }
  26294. ;// ./node_modules/rc-select/es/OptionList.js
  26295. var OptionList_excluded = ["disabled", "title", "children", "style", "className"];
  26296. // export interface OptionListProps<OptionsType extends object[]> {
  26297. function OptionList_isTitleType(content) {
  26298. return typeof content === 'string' || typeof content === 'number';
  26299. }
  26300. /**
  26301. * Using virtual list of option display.
  26302. * Will fallback to dom if use customize render.
  26303. */
  26304. var OptionList = function OptionList(_, ref) {
  26305. var _useBaseProps = useBaseProps(),
  26306. prefixCls = _useBaseProps.prefixCls,
  26307. id = _useBaseProps.id,
  26308. open = _useBaseProps.open,
  26309. multiple = _useBaseProps.multiple,
  26310. mode = _useBaseProps.mode,
  26311. searchValue = _useBaseProps.searchValue,
  26312. toggleOpen = _useBaseProps.toggleOpen,
  26313. notFoundContent = _useBaseProps.notFoundContent,
  26314. onPopupScroll = _useBaseProps.onPopupScroll;
  26315. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_SelectContext),
  26316. maxCount = _React$useContext.maxCount,
  26317. flattenOptions = _React$useContext.flattenOptions,
  26318. onActiveValue = _React$useContext.onActiveValue,
  26319. defaultActiveFirstOption = _React$useContext.defaultActiveFirstOption,
  26320. onSelect = _React$useContext.onSelect,
  26321. menuItemSelectedIcon = _React$useContext.menuItemSelectedIcon,
  26322. rawValues = _React$useContext.rawValues,
  26323. fieldNames = _React$useContext.fieldNames,
  26324. virtual = _React$useContext.virtual,
  26325. direction = _React$useContext.direction,
  26326. listHeight = _React$useContext.listHeight,
  26327. listItemHeight = _React$useContext.listItemHeight,
  26328. optionRender = _React$useContext.optionRender;
  26329. var itemPrefixCls = "".concat(prefixCls, "-item");
  26330. var memoFlattenOptions = (0,useMemo["default"])(function () {
  26331. return flattenOptions;
  26332. }, [open, flattenOptions], function (prev, next) {
  26333. return next[0] && prev[1] !== next[1];
  26334. });
  26335. // =========================== List ===========================
  26336. var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  26337. var overMaxCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  26338. return multiple && isValidCount(maxCount) && (rawValues === null || rawValues === void 0 ? void 0 : rawValues.size) >= maxCount;
  26339. }, [multiple, maxCount, rawValues === null || rawValues === void 0 ? void 0 : rawValues.size]);
  26340. var onListMouseDown = function onListMouseDown(event) {
  26341. event.preventDefault();
  26342. };
  26343. var scrollIntoView = function scrollIntoView(args) {
  26344. var _listRef$current;
  26345. (_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollTo(typeof args === 'number' ? {
  26346. index: args
  26347. } : args);
  26348. };
  26349. // https://github.com/ant-design/ant-design/issues/34975
  26350. var isSelected = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (value) {
  26351. if (mode === 'combobox') {
  26352. return false;
  26353. }
  26354. return rawValues.has(value);
  26355. }, [mode, (0,toConsumableArray["default"])(rawValues).toString(), rawValues.size]);
  26356. // ========================== Active ==========================
  26357. var getEnabledActiveIndex = function getEnabledActiveIndex(index) {
  26358. var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  26359. var len = memoFlattenOptions.length;
  26360. for (var i = 0; i < len; i += 1) {
  26361. var current = (index + i * offset + len) % len;
  26362. var _ref = memoFlattenOptions[current] || {},
  26363. group = _ref.group,
  26364. data = _ref.data;
  26365. if (!group && !(data !== null && data !== void 0 && data.disabled) && (isSelected(data.value) || !overMaxCount)) {
  26366. return current;
  26367. }
  26368. }
  26369. return -1;
  26370. };
  26371. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  26372. return getEnabledActiveIndex(0);
  26373. }),
  26374. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  26375. activeIndex = _React$useState2[0],
  26376. setActiveIndex = _React$useState2[1];
  26377. var setActive = function setActive(index) {
  26378. var fromKeyboard = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  26379. setActiveIndex(index);
  26380. var info = {
  26381. source: fromKeyboard ? 'keyboard' : 'mouse'
  26382. };
  26383. // Trigger active event
  26384. var flattenItem = memoFlattenOptions[index];
  26385. if (!flattenItem) {
  26386. onActiveValue(null, -1, info);
  26387. return;
  26388. }
  26389. onActiveValue(flattenItem.value, index, info);
  26390. };
  26391. // Auto active first item when list length or searchValue changed
  26392. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  26393. setActive(defaultActiveFirstOption !== false ? getEnabledActiveIndex(0) : -1);
  26394. }, [memoFlattenOptions.length, searchValue]);
  26395. // https://github.com/ant-design/ant-design/issues/48036
  26396. var isAriaSelected = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (value) {
  26397. if (mode === 'combobox') {
  26398. return String(value).toLowerCase() === searchValue.toLowerCase();
  26399. }
  26400. return rawValues.has(value);
  26401. }, [mode, searchValue, (0,toConsumableArray["default"])(rawValues).toString(), rawValues.size]);
  26402. // Auto scroll to item position in single mode
  26403. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  26404. /**
  26405. * React will skip `onChange` when component update.
  26406. * `setActive` function will call root accessibility state update which makes re-render.
  26407. * So we need to delay to let Input component trigger onChange first.
  26408. */
  26409. var timeoutId = setTimeout(function () {
  26410. if (!multiple && open && rawValues.size === 1) {
  26411. var value = Array.from(rawValues)[0];
  26412. // Scroll to the option closest to the searchValue if searching.
  26413. var index = memoFlattenOptions.findIndex(function (_ref2) {
  26414. var data = _ref2.data;
  26415. return searchValue ? String(data.value).startsWith(searchValue) : data.value === value;
  26416. });
  26417. if (index !== -1) {
  26418. setActive(index);
  26419. scrollIntoView(index);
  26420. }
  26421. }
  26422. });
  26423. // Force trigger scrollbar visible when open
  26424. if (open) {
  26425. var _listRef$current2;
  26426. (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 || _listRef$current2.scrollTo(undefined);
  26427. }
  26428. return function () {
  26429. return clearTimeout(timeoutId);
  26430. };
  26431. }, [open, searchValue]);
  26432. // ========================== Values ==========================
  26433. var onSelectValue = function onSelectValue(value) {
  26434. if (value !== undefined) {
  26435. onSelect(value, {
  26436. selected: !rawValues.has(value)
  26437. });
  26438. }
  26439. // Single mode should always close by select
  26440. if (!multiple) {
  26441. toggleOpen(false);
  26442. }
  26443. };
  26444. // ========================= Keyboard =========================
  26445. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  26446. return {
  26447. onKeyDown: function onKeyDown(event) {
  26448. var which = event.which,
  26449. ctrlKey = event.ctrlKey;
  26450. switch (which) {
  26451. // >>> Arrow keys & ctrl + n/p on Mac
  26452. case KeyCode["default"].N:
  26453. case KeyCode["default"].P:
  26454. case KeyCode["default"].UP:
  26455. case KeyCode["default"].DOWN:
  26456. {
  26457. var offset = 0;
  26458. if (which === KeyCode["default"].UP) {
  26459. offset = -1;
  26460. } else if (which === KeyCode["default"].DOWN) {
  26461. offset = 1;
  26462. } else if (isPlatformMac() && ctrlKey) {
  26463. if (which === KeyCode["default"].N) {
  26464. offset = 1;
  26465. } else if (which === KeyCode["default"].P) {
  26466. offset = -1;
  26467. }
  26468. }
  26469. if (offset !== 0) {
  26470. var nextActiveIndex = getEnabledActiveIndex(activeIndex + offset, offset);
  26471. scrollIntoView(nextActiveIndex);
  26472. setActive(nextActiveIndex, true);
  26473. }
  26474. break;
  26475. }
  26476. // >>> Select (Tab / Enter)
  26477. case KeyCode["default"].TAB:
  26478. case KeyCode["default"].ENTER:
  26479. {
  26480. var _item$data;
  26481. // value
  26482. var item = memoFlattenOptions[activeIndex];
  26483. if (item && !(item !== null && item !== void 0 && (_item$data = item.data) !== null && _item$data !== void 0 && _item$data.disabled) && !overMaxCount) {
  26484. onSelectValue(item.value);
  26485. } else {
  26486. onSelectValue(undefined);
  26487. }
  26488. if (open) {
  26489. event.preventDefault();
  26490. }
  26491. break;
  26492. }
  26493. // >>> Close
  26494. case KeyCode["default"].ESC:
  26495. {
  26496. toggleOpen(false);
  26497. if (open) {
  26498. event.stopPropagation();
  26499. }
  26500. }
  26501. }
  26502. },
  26503. onKeyUp: function onKeyUp() {},
  26504. scrollTo: function scrollTo(index) {
  26505. scrollIntoView(index);
  26506. }
  26507. };
  26508. });
  26509. // ========================== Render ==========================
  26510. if (memoFlattenOptions.length === 0) {
  26511. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  26512. role: "listbox",
  26513. id: "".concat(id, "_list"),
  26514. className: "".concat(itemPrefixCls, "-empty"),
  26515. onMouseDown: onListMouseDown
  26516. }, notFoundContent);
  26517. }
  26518. var omitFieldNameList = Object.keys(fieldNames).map(function (key) {
  26519. return fieldNames[key];
  26520. });
  26521. var getLabel = function getLabel(item) {
  26522. return item.label;
  26523. };
  26524. function getItemAriaProps(item, index) {
  26525. var group = item.group;
  26526. return {
  26527. role: group ? 'presentation' : 'option',
  26528. id: "".concat(id, "_list_").concat(index)
  26529. };
  26530. }
  26531. var renderItem = function renderItem(index) {
  26532. var item = memoFlattenOptions[index];
  26533. if (!item) {
  26534. return null;
  26535. }
  26536. var itemData = item.data || {};
  26537. var value = itemData.value;
  26538. var group = item.group;
  26539. var attrs = (0,pickAttrs["default"])(itemData, true);
  26540. var mergedLabel = getLabel(item);
  26541. return item ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  26542. "aria-label": typeof mergedLabel === 'string' && !group ? mergedLabel : null
  26543. }, attrs, {
  26544. key: index
  26545. }, getItemAriaProps(item, index), {
  26546. "aria-selected": isAriaSelected(value)
  26547. }), value) : null;
  26548. };
  26549. var a11yProps = {
  26550. role: 'listbox',
  26551. id: "".concat(id, "_list")
  26552. };
  26553. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, virtual && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, a11yProps, {
  26554. style: {
  26555. height: 0,
  26556. width: 0,
  26557. overflow: 'hidden'
  26558. }
  26559. }), renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_virtual_list_es, {
  26560. itemKey: "key",
  26561. ref: listRef,
  26562. data: memoFlattenOptions,
  26563. height: listHeight,
  26564. itemHeight: listItemHeight,
  26565. fullHeight: false,
  26566. onMouseDown: onListMouseDown,
  26567. onScroll: onPopupScroll,
  26568. virtual: virtual,
  26569. direction: direction,
  26570. innerProps: virtual ? null : a11yProps
  26571. }, function (item, itemIndex) {
  26572. var group = item.group,
  26573. groupOption = item.groupOption,
  26574. data = item.data,
  26575. label = item.label,
  26576. value = item.value;
  26577. var key = data.key;
  26578. // Group
  26579. if (group) {
  26580. var _data$title;
  26581. var groupTitle = (_data$title = data.title) !== null && _data$title !== void 0 ? _data$title : OptionList_isTitleType(label) ? label.toString() : undefined;
  26582. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  26583. className: classnames_default()(itemPrefixCls, "".concat(itemPrefixCls, "-group"), data.className),
  26584. title: groupTitle
  26585. }, label !== undefined ? label : key);
  26586. }
  26587. var disabled = data.disabled,
  26588. title = data.title,
  26589. children = data.children,
  26590. style = data.style,
  26591. className = data.className,
  26592. otherProps = (0,objectWithoutProperties["default"])(data, OptionList_excluded);
  26593. var passedProps = (0,omit["default"])(otherProps, omitFieldNameList);
  26594. // Option
  26595. var selected = isSelected(value);
  26596. var mergedDisabled = disabled || !selected && overMaxCount;
  26597. var optionPrefixCls = "".concat(itemPrefixCls, "-option");
  26598. var optionClassName = classnames_default()(itemPrefixCls, optionPrefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(optionPrefixCls, "-grouped"), groupOption), "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !mergedDisabled), "".concat(optionPrefixCls, "-disabled"), mergedDisabled), "".concat(optionPrefixCls, "-selected"), selected));
  26599. var mergedLabel = getLabel(item);
  26600. var iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
  26601. // https://github.com/ant-design/ant-design/issues/34145
  26602. var content = typeof mergedLabel === 'number' ? mergedLabel : mergedLabel || value;
  26603. // https://github.com/ant-design/ant-design/issues/26717
  26604. var optionTitle = OptionList_isTitleType(content) ? content.toString() : undefined;
  26605. if (title !== undefined) {
  26606. optionTitle = title;
  26607. }
  26608. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, (0,pickAttrs["default"])(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
  26609. "aria-selected": isAriaSelected(value),
  26610. className: optionClassName,
  26611. title: optionTitle,
  26612. onMouseMove: function onMouseMove() {
  26613. if (activeIndex === itemIndex || mergedDisabled) {
  26614. return;
  26615. }
  26616. setActive(itemIndex);
  26617. },
  26618. onClick: function onClick() {
  26619. if (!mergedDisabled) {
  26620. onSelectValue(value);
  26621. }
  26622. },
  26623. style: style
  26624. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  26625. className: "".concat(optionPrefixCls, "-content")
  26626. }, typeof optionRender === 'function' ? optionRender(item, {
  26627. index: itemIndex
  26628. }) : content), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(menuItemSelectedIcon) || selected, iconVisible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TransBtn, {
  26629. className: "".concat(itemPrefixCls, "-option-state"),
  26630. customizeIcon: menuItemSelectedIcon,
  26631. customizeIconProps: {
  26632. value: value,
  26633. disabled: mergedDisabled,
  26634. isSelected: selected
  26635. }
  26636. }, selected ? '✓' : null));
  26637. }));
  26638. };
  26639. var RefOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(OptionList);
  26640. if (true) {
  26641. RefOptionList.displayName = 'OptionList';
  26642. }
  26643. /* harmony default export */ var es_OptionList = (RefOptionList);
  26644. ;// ./node_modules/rc-select/es/hooks/useCache.js
  26645. /**
  26646. * Cache `value` related LabeledValue & options.
  26647. */
  26648. /* harmony default export */ var useCache = (function (labeledValues, valueOptions) {
  26649. var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  26650. values: new Map(),
  26651. options: new Map()
  26652. });
  26653. var filledLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  26654. var _cacheRef$current = cacheRef.current,
  26655. prevValueCache = _cacheRef$current.values,
  26656. prevOptionCache = _cacheRef$current.options;
  26657. // Fill label by cache
  26658. var patchedValues = labeledValues.map(function (item) {
  26659. if (item.label === undefined) {
  26660. var _prevValueCache$get;
  26661. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
  26662. label: (_prevValueCache$get = prevValueCache.get(item.value)) === null || _prevValueCache$get === void 0 ? void 0 : _prevValueCache$get.label
  26663. });
  26664. }
  26665. return item;
  26666. });
  26667. // Refresh cache
  26668. var valueCache = new Map();
  26669. var optionCache = new Map();
  26670. patchedValues.forEach(function (item) {
  26671. valueCache.set(item.value, item);
  26672. optionCache.set(item.value, valueOptions.get(item.value) || prevOptionCache.get(item.value));
  26673. });
  26674. cacheRef.current.values = valueCache;
  26675. cacheRef.current.options = optionCache;
  26676. return patchedValues;
  26677. }, [labeledValues, valueOptions]);
  26678. var getOption = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
  26679. return valueOptions.get(val) || cacheRef.current.options.get(val);
  26680. }, [valueOptions]);
  26681. return [filledLabeledValues, getOption];
  26682. });
  26683. ;// ./node_modules/rc-select/es/hooks/useFilterOptions.js
  26684. function includes(test, search) {
  26685. return commonUtil_toArray(test).join('').toUpperCase().includes(search);
  26686. }
  26687. /* harmony default export */ var useFilterOptions = (function (options, fieldNames, searchValue, filterOption, optionFilterProp) {
  26688. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  26689. if (!searchValue || filterOption === false) {
  26690. return options;
  26691. }
  26692. var fieldOptions = fieldNames.options,
  26693. fieldLabel = fieldNames.label,
  26694. fieldValue = fieldNames.value;
  26695. var filteredOptions = [];
  26696. var customizeFilter = typeof filterOption === 'function';
  26697. var upperSearch = searchValue.toUpperCase();
  26698. var filterFunc = customizeFilter ? filterOption : function (_, option) {
  26699. // Use provided `optionFilterProp`
  26700. if (optionFilterProp) {
  26701. return includes(option[optionFilterProp], upperSearch);
  26702. }
  26703. // Auto select `label` or `value` by option type
  26704. if (option[fieldOptions]) {
  26705. // hack `fieldLabel` since `OptionGroup` children is not `label`
  26706. return includes(option[fieldLabel !== 'children' ? fieldLabel : 'label'], upperSearch);
  26707. }
  26708. return includes(option[fieldValue], upperSearch);
  26709. };
  26710. var wrapOption = customizeFilter ? function (opt) {
  26711. return injectPropsWithOption(opt);
  26712. } : function (opt) {
  26713. return opt;
  26714. };
  26715. options.forEach(function (item) {
  26716. // Group should check child options
  26717. if (item[fieldOptions]) {
  26718. // Check group first
  26719. var matchGroup = filterFunc(searchValue, wrapOption(item));
  26720. if (matchGroup) {
  26721. filteredOptions.push(item);
  26722. } else {
  26723. // Check option
  26724. var subOptions = item[fieldOptions].filter(function (subItem) {
  26725. return filterFunc(searchValue, wrapOption(subItem));
  26726. });
  26727. if (subOptions.length) {
  26728. filteredOptions.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, (0,defineProperty["default"])({}, fieldOptions, subOptions)));
  26729. }
  26730. }
  26731. return;
  26732. }
  26733. if (filterFunc(searchValue, wrapOption(item))) {
  26734. filteredOptions.push(item);
  26735. }
  26736. });
  26737. return filteredOptions;
  26738. }, [options, filterOption, optionFilterProp, searchValue, fieldNames]);
  26739. });
  26740. ;// ./node_modules/rc-select/es/hooks/useId.js
  26741. var hooks_useId_uuid = 0;
  26742. /** Is client side and not jsdom */
  26743. var useId_isBrowserClient = true && (0,canUseDom["default"])();
  26744. /** Get unique id for accessibility usage */
  26745. function getUUID() {
  26746. var retId;
  26747. // Test never reach
  26748. /* istanbul ignore if */
  26749. if (useId_isBrowserClient) {
  26750. retId = hooks_useId_uuid;
  26751. hooks_useId_uuid += 1;
  26752. } else {
  26753. retId = 'TEST_OR_SSR';
  26754. }
  26755. return retId;
  26756. }
  26757. function useId_useId(id) {
  26758. // Inner id for accessibility usage. Only work in client side
  26759. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
  26760. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  26761. innerId = _React$useState2[0],
  26762. setInnerId = _React$useState2[1];
  26763. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  26764. setInnerId("rc_select_".concat(getUUID()));
  26765. }, []);
  26766. return id || innerId;
  26767. }
  26768. ;// ./node_modules/rc-select/es/utils/legacyUtil.js
  26769. var legacyUtil_excluded = ["children", "value"],
  26770. legacyUtil_excluded2 = ["children"];
  26771. function convertNodeToOption(node) {
  26772. var _ref = node,
  26773. key = _ref.key,
  26774. _ref$props = _ref.props,
  26775. children = _ref$props.children,
  26776. value = _ref$props.value,
  26777. restProps = (0,objectWithoutProperties["default"])(_ref$props, legacyUtil_excluded);
  26778. return (0,objectSpread2["default"])({
  26779. key: key,
  26780. value: value !== undefined ? value : key,
  26781. children: children
  26782. }, restProps);
  26783. }
  26784. function convertChildrenToData(nodes) {
  26785. var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  26786. return (0,toArray["default"])(nodes).map(function (node, index) {
  26787. if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node) || !node.type) {
  26788. return null;
  26789. }
  26790. var _ref2 = node,
  26791. isSelectOptGroup = _ref2.type.isSelectOptGroup,
  26792. key = _ref2.key,
  26793. _ref2$props = _ref2.props,
  26794. children = _ref2$props.children,
  26795. restProps = (0,objectWithoutProperties["default"])(_ref2$props, legacyUtil_excluded2);
  26796. if (optionOnly || !isSelectOptGroup) {
  26797. return convertNodeToOption(node);
  26798. }
  26799. return (0,objectSpread2["default"])((0,objectSpread2["default"])({
  26800. key: "__RC_SELECT_GRP__".concat(key === null ? index : key, "__"),
  26801. label: key
  26802. }, restProps), {}, {
  26803. options: convertChildrenToData(children)
  26804. });
  26805. }).filter(function (data) {
  26806. return data;
  26807. });
  26808. }
  26809. ;// ./node_modules/rc-select/es/hooks/useOptions.js
  26810. /**
  26811. * Parse `children` to `options` if `options` is not provided.
  26812. * Then flatten the `options`.
  26813. */
  26814. var useOptions = function useOptions(options, children, fieldNames, optionFilterProp, optionLabelProp) {
  26815. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  26816. var mergedOptions = options;
  26817. var childrenAsData = !options;
  26818. if (childrenAsData) {
  26819. mergedOptions = convertChildrenToData(children);
  26820. }
  26821. var valueOptions = new Map();
  26822. var labelOptions = new Map();
  26823. var setLabelOptions = function setLabelOptions(labelOptionsMap, option, key) {
  26824. if (key && typeof key === 'string') {
  26825. labelOptionsMap.set(option[key], option);
  26826. }
  26827. };
  26828. var dig = function dig(optionList) {
  26829. var isChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  26830. // for loop to speed up collection speed
  26831. for (var i = 0; i < optionList.length; i += 1) {
  26832. var option = optionList[i];
  26833. if (!option[fieldNames.options] || isChildren) {
  26834. valueOptions.set(option[fieldNames.value], option);
  26835. setLabelOptions(labelOptions, option, fieldNames.label);
  26836. // https://github.com/ant-design/ant-design/issues/35304
  26837. setLabelOptions(labelOptions, option, optionFilterProp);
  26838. setLabelOptions(labelOptions, option, optionLabelProp);
  26839. } else {
  26840. dig(option[fieldNames.options], true);
  26841. }
  26842. }
  26843. };
  26844. dig(mergedOptions);
  26845. return {
  26846. options: mergedOptions,
  26847. valueOptions: valueOptions,
  26848. labelOptions: labelOptions
  26849. };
  26850. }, [options, children, fieldNames, optionFilterProp, optionLabelProp]);
  26851. };
  26852. /* harmony default export */ var hooks_useOptions = (useOptions);
  26853. ;// ./node_modules/rc-select/es/hooks/useRefFunc.js
  26854. /**
  26855. * Same as `React.useCallback` but always return a memoized function
  26856. * but redirect to real function.
  26857. */
  26858. function useRefFunc(callback) {
  26859. var funcRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  26860. funcRef.current = callback;
  26861. var cacheFn = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
  26862. return funcRef.current.apply(funcRef, arguments);
  26863. }, []);
  26864. return cacheFn;
  26865. }
  26866. ;// ./node_modules/rc-select/es/utils/warningPropsUtil.js
  26867. function warningProps(props) {
  26868. var mode = props.mode,
  26869. options = props.options,
  26870. children = props.children,
  26871. backfill = props.backfill,
  26872. allowClear = props.allowClear,
  26873. placeholder = props.placeholder,
  26874. getInputElement = props.getInputElement,
  26875. showSearch = props.showSearch,
  26876. onSearch = props.onSearch,
  26877. defaultOpen = props.defaultOpen,
  26878. autoFocus = props.autoFocus,
  26879. labelInValue = props.labelInValue,
  26880. value = props.value,
  26881. inputValue = props.inputValue,
  26882. optionLabelProp = props.optionLabelProp;
  26883. var multiple = isMultiple(mode);
  26884. var mergedShowSearch = showSearch !== undefined ? showSearch : multiple || mode === 'combobox';
  26885. var mergedOptions = options || convertChildrenToData(children);
  26886. // `tags` should not set option as disabled
  26887. (0,warning["default"])(mode !== 'tags' || mergedOptions.every(function (opt) {
  26888. return !opt.disabled;
  26889. }), 'Please avoid setting option to disabled in tags mode since user can always type text as tag.');
  26890. // `combobox` & `tags` should option be `string` type
  26891. if (mode === 'tags' || mode === 'combobox') {
  26892. var hasNumberValue = mergedOptions.some(function (item) {
  26893. if (item.options) {
  26894. return item.options.some(function (opt) {
  26895. return typeof ('value' in opt ? opt.value : opt.key) === 'number';
  26896. });
  26897. }
  26898. return typeof ('value' in item ? item.value : item.key) === 'number';
  26899. });
  26900. (0,warning["default"])(!hasNumberValue, '`value` of Option should not use number type when `mode` is `tags` or `combobox`.');
  26901. }
  26902. // `combobox` should not use `optionLabelProp`
  26903. (0,warning["default"])(mode !== 'combobox' || !optionLabelProp, '`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly.');
  26904. // Only `combobox` support `backfill`
  26905. (0,warning["default"])(mode === 'combobox' || !backfill, '`backfill` only works with `combobox` mode.');
  26906. // Only `combobox` support `getInputElement`
  26907. (0,warning["default"])(mode === 'combobox' || !getInputElement, '`getInputElement` only work with `combobox` mode.');
  26908. // Customize `getInputElement` should not use `allowClear` & `placeholder`
  26909. (0,warning.noteOnce)(mode !== 'combobox' || !getInputElement || !allowClear || !placeholder, 'Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`.');
  26910. // `onSearch` should use in `combobox` or `showSearch`
  26911. if (onSearch && !mergedShowSearch && mode !== 'combobox' && mode !== 'tags') {
  26912. (0,warning["default"])(false, '`onSearch` should work with `showSearch` instead of use alone.');
  26913. }
  26914. (0,warning.noteOnce)(!defaultOpen || autoFocus, '`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed.');
  26915. if (value !== undefined && value !== null) {
  26916. var values = commonUtil_toArray(value);
  26917. (0,warning["default"])(!labelInValue || values.every(function (val) {
  26918. return (0,esm_typeof["default"])(val) === 'object' && ('key' in val || 'value' in val);
  26919. }), '`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`');
  26920. (0,warning["default"])(!multiple || Array.isArray(value), '`value` should be array when `mode` is `multiple` or `tags`');
  26921. }
  26922. // Syntactic sugar should use correct children type
  26923. if (children) {
  26924. var invalidateChildType = null;
  26925. (0,toArray["default"])(children).some(function (node) {
  26926. if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node) || !node.type) {
  26927. return false;
  26928. }
  26929. var _ref = node,
  26930. type = _ref.type;
  26931. if (type.isSelectOption) {
  26932. return false;
  26933. }
  26934. if (type.isSelectOptGroup) {
  26935. var allChildrenValid = (0,toArray["default"])(node.props.children).every(function (subNode) {
  26936. if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(subNode) || !node.type || subNode.type.isSelectOption) {
  26937. return true;
  26938. }
  26939. invalidateChildType = subNode.type;
  26940. return false;
  26941. });
  26942. if (allChildrenValid) {
  26943. return false;
  26944. }
  26945. return true;
  26946. }
  26947. invalidateChildType = type;
  26948. return true;
  26949. });
  26950. if (invalidateChildType) {
  26951. (0,warning["default"])(false, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(invalidateChildType.displayName || invalidateChildType.name || invalidateChildType, "`."));
  26952. }
  26953. (0,warning["default"])(inputValue === undefined, '`inputValue` is deprecated, please use `searchValue` instead.');
  26954. }
  26955. }
  26956. // value in Select option should not be null
  26957. // note: OptGroup has options too
  26958. function warningNullOptions(options, fieldNames) {
  26959. if (options) {
  26960. var recursiveOptions = function recursiveOptions(optionsList) {
  26961. var inGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  26962. for (var i = 0; i < optionsList.length; i++) {
  26963. var option = optionsList[i];
  26964. if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
  26965. (0,warning["default"])(false, '`value` in Select options should not be `null`.');
  26966. return true;
  26967. }
  26968. if (!inGroup && Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.options]) && recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.options], true)) {
  26969. break;
  26970. }
  26971. }
  26972. };
  26973. recursiveOptions(options);
  26974. }
  26975. }
  26976. /* harmony default export */ var warningPropsUtil = (warningProps);
  26977. ;// ./node_modules/rc-select/es/Select.js
  26978. var Select_excluded = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"];
  26979. /**
  26980. * To match accessibility requirement, we always provide an input in the component.
  26981. * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.
  26982. * For focused select, we set `aria-live="polite"` to update the accessibility content.
  26983. *
  26984. * ref:
  26985. * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions
  26986. *
  26987. * New api:
  26988. * - listHeight
  26989. * - listItemHeight
  26990. * - component
  26991. *
  26992. * Remove deprecated api:
  26993. * - multiple
  26994. * - tags
  26995. * - combobox
  26996. * - firstActiveValue
  26997. * - dropdownMenuStyle
  26998. * - openClassName (Not list in api)
  26999. *
  27000. * Update:
  27001. * - `backfill` only support `combobox` mode
  27002. * - `combobox` mode not support `labelInValue` since it's meaningless
  27003. * - `getInputElement` only support `combobox` mode
  27004. * - `onChange` return OptionData instead of ReactNode
  27005. * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode
  27006. * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option
  27007. * - `combobox` mode not support `optionLabelProp`
  27008. */
  27009. var OMIT_DOM_PROPS = ['inputValue'];
  27010. function isRawValue(value) {
  27011. return !value || (0,esm_typeof["default"])(value) !== 'object';
  27012. }
  27013. var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  27014. var id = props.id,
  27015. mode = props.mode,
  27016. _props$prefixCls = props.prefixCls,
  27017. prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,
  27018. backfill = props.backfill,
  27019. fieldNames = props.fieldNames,
  27020. inputValue = props.inputValue,
  27021. searchValue = props.searchValue,
  27022. onSearch = props.onSearch,
  27023. _props$autoClearSearc = props.autoClearSearchValue,
  27024. autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
  27025. onSelect = props.onSelect,
  27026. onDeselect = props.onDeselect,
  27027. _props$dropdownMatchS = props.dropdownMatchSelectWidth,
  27028. dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
  27029. filterOption = props.filterOption,
  27030. filterSort = props.filterSort,
  27031. optionFilterProp = props.optionFilterProp,
  27032. optionLabelProp = props.optionLabelProp,
  27033. options = props.options,
  27034. optionRender = props.optionRender,
  27035. children = props.children,
  27036. defaultActiveFirstOption = props.defaultActiveFirstOption,
  27037. menuItemSelectedIcon = props.menuItemSelectedIcon,
  27038. virtual = props.virtual,
  27039. direction = props.direction,
  27040. _props$listHeight = props.listHeight,
  27041. listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,
  27042. _props$listItemHeight = props.listItemHeight,
  27043. listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,
  27044. labelRender = props.labelRender,
  27045. value = props.value,
  27046. defaultValue = props.defaultValue,
  27047. labelInValue = props.labelInValue,
  27048. onChange = props.onChange,
  27049. maxCount = props.maxCount,
  27050. restProps = (0,objectWithoutProperties["default"])(props, Select_excluded);
  27051. var mergedId = useId_useId(id);
  27052. var multiple = isMultiple(mode);
  27053. var childrenAsData = !!(!options && children);
  27054. var mergedFilterOption = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27055. if (filterOption === undefined && mode === 'combobox') {
  27056. return false;
  27057. }
  27058. return filterOption;
  27059. }, [filterOption, mode]);
  27060. // ========================= FieldNames =========================
  27061. var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27062. return fillFieldNames(fieldNames, childrenAsData);
  27063. }, /* eslint-disable react-hooks/exhaustive-deps */
  27064. [
  27065. // We stringify fieldNames to avoid unnecessary re-renders.
  27066. JSON.stringify(fieldNames), childrenAsData]
  27067. /* eslint-enable react-hooks/exhaustive-deps */);
  27068. // =========================== Search ===========================
  27069. var _useMergedState = (0,useMergedState["default"])('', {
  27070. value: searchValue !== undefined ? searchValue : inputValue,
  27071. postState: function postState(search) {
  27072. return search || '';
  27073. }
  27074. }),
  27075. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  27076. mergedSearchValue = _useMergedState2[0],
  27077. setSearchValue = _useMergedState2[1];
  27078. // =========================== Option ===========================
  27079. var parsedOptions = hooks_useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
  27080. var valueOptions = parsedOptions.valueOptions,
  27081. labelOptions = parsedOptions.labelOptions,
  27082. mergedOptions = parsedOptions.options;
  27083. // ========================= Wrap Value =========================
  27084. var convert2LabelValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (draftValues) {
  27085. // Convert to array
  27086. var valueList = commonUtil_toArray(draftValues);
  27087. // Convert to labelInValue type
  27088. return valueList.map(function (val) {
  27089. var rawValue;
  27090. var rawLabel;
  27091. var rawKey;
  27092. var rawDisabled;
  27093. var rawTitle;
  27094. // Fill label & value
  27095. if (isRawValue(val)) {
  27096. rawValue = val;
  27097. } else {
  27098. var _val$value;
  27099. rawKey = val.key;
  27100. rawLabel = val.label;
  27101. rawValue = (_val$value = val.value) !== null && _val$value !== void 0 ? _val$value : rawKey;
  27102. }
  27103. var option = valueOptions.get(rawValue);
  27104. if (option) {
  27105. var _option$key;
  27106. // Fill missing props
  27107. if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];
  27108. if (rawKey === undefined) rawKey = (_option$key = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key !== void 0 ? _option$key : rawValue;
  27109. rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;
  27110. rawTitle = option === null || option === void 0 ? void 0 : option.title;
  27111. // Warning if label not same as provided
  27112. if ( true && !optionLabelProp) {
  27113. var optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];
  27114. if (optionLabel !== undefined && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(optionLabel) && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(rawLabel) && optionLabel !== rawLabel) {
  27115. (0,warning["default"])(false, '`label` of `value` is not same as `label` in Select options.');
  27116. }
  27117. }
  27118. }
  27119. return {
  27120. label: rawLabel,
  27121. value: rawValue,
  27122. key: rawKey,
  27123. disabled: rawDisabled,
  27124. title: rawTitle
  27125. };
  27126. });
  27127. }, [mergedFieldNames, optionLabelProp, valueOptions]);
  27128. // =========================== Values ===========================
  27129. var _useMergedState3 = (0,useMergedState["default"])(defaultValue, {
  27130. value: value
  27131. }),
  27132. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  27133. internalValue = _useMergedState4[0],
  27134. setInternalValue = _useMergedState4[1];
  27135. // Merged value with LabelValueType
  27136. var rawLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27137. var _values$;
  27138. var newInternalValue = multiple && internalValue === null ? [] : internalValue;
  27139. var values = convert2LabelValues(newInternalValue);
  27140. // combobox no need save value when it's no value (exclude value equal 0)
  27141. if (mode === 'combobox' && isComboNoValue((_values$ = values[0]) === null || _values$ === void 0 ? void 0 : _values$.value)) {
  27142. return [];
  27143. }
  27144. return values;
  27145. }, [internalValue, convert2LabelValues, mode, multiple]);
  27146. // Fill label with cache to avoid option remove
  27147. var _useCache = useCache(rawLabeledValues, valueOptions),
  27148. _useCache2 = (0,slicedToArray["default"])(_useCache, 2),
  27149. mergedValues = _useCache2[0],
  27150. getMixedOption = _useCache2[1];
  27151. var displayValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27152. // `null` need show as placeholder instead
  27153. // https://github.com/ant-design/ant-design/issues/25057
  27154. if (!mode && mergedValues.length === 1) {
  27155. var firstValue = mergedValues[0];
  27156. if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {
  27157. return [];
  27158. }
  27159. }
  27160. return mergedValues.map(function (item) {
  27161. var _ref;
  27162. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
  27163. label: (_ref = typeof labelRender === 'function' ? labelRender(item) : item.label) !== null && _ref !== void 0 ? _ref : item.value
  27164. });
  27165. });
  27166. }, [mode, mergedValues, labelRender]);
  27167. /** Convert `displayValues` to raw value type set */
  27168. var rawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27169. return new Set(mergedValues.map(function (val) {
  27170. return val.value;
  27171. }));
  27172. }, [mergedValues]);
  27173. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  27174. if (mode === 'combobox') {
  27175. var _mergedValues$;
  27176. var strValue = (_mergedValues$ = mergedValues[0]) === null || _mergedValues$ === void 0 ? void 0 : _mergedValues$.value;
  27177. setSearchValue(hasValue(strValue) ? String(strValue) : '');
  27178. }
  27179. }, [mergedValues]);
  27180. // ======================= Display Option =======================
  27181. // Create a placeholder item if not exist in `options`
  27182. var createTagOption = useRefFunc(function (val, label) {
  27183. var mergedLabel = label !== null && label !== void 0 ? label : val;
  27184. return (0,defineProperty["default"])((0,defineProperty["default"])({}, mergedFieldNames.value, val), mergedFieldNames.label, mergedLabel);
  27185. });
  27186. // Fill tag as option if mode is `tags`
  27187. var filledTagOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27188. if (mode !== 'tags') {
  27189. return mergedOptions;
  27190. }
  27191. // >>> Tag mode
  27192. var cloneOptions = (0,toConsumableArray["default"])(mergedOptions);
  27193. // Check if value exist in options (include new patch item)
  27194. var existOptions = function existOptions(val) {
  27195. return valueOptions.has(val);
  27196. };
  27197. // Fill current value as option
  27198. (0,toConsumableArray["default"])(mergedValues).sort(function (a, b) {
  27199. return a.value < b.value ? -1 : 1;
  27200. }).forEach(function (item) {
  27201. var val = item.value;
  27202. if (!existOptions(val)) {
  27203. cloneOptions.push(createTagOption(val, item.label));
  27204. }
  27205. });
  27206. return cloneOptions;
  27207. }, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);
  27208. var filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp);
  27209. // Fill options with search value if needed
  27210. var filledSearchOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27211. if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(function (item) {
  27212. return item[optionFilterProp || 'value'] === mergedSearchValue;
  27213. })) {
  27214. return filteredOptions;
  27215. }
  27216. // ignore when search value equal select input value
  27217. if (filteredOptions.some(function (item) {
  27218. return item[mergedFieldNames.value] === mergedSearchValue;
  27219. })) {
  27220. return filteredOptions;
  27221. }
  27222. // Fill search value as option
  27223. return [createTagOption(mergedSearchValue)].concat((0,toConsumableArray["default"])(filteredOptions));
  27224. }, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]);
  27225. var sorter = function sorter(inputOptions) {
  27226. var sortedOptions = (0,toConsumableArray["default"])(inputOptions).sort(function (a, b) {
  27227. return filterSort(a, b, {
  27228. searchValue: mergedSearchValue
  27229. });
  27230. });
  27231. return sortedOptions.map(function (item) {
  27232. if (Array.isArray(item.options)) {
  27233. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
  27234. options: item.options.length > 0 ? sorter(item.options) : item.options
  27235. });
  27236. }
  27237. return item;
  27238. });
  27239. };
  27240. var orderedFilteredOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27241. if (!filterSort) {
  27242. return filledSearchOptions;
  27243. }
  27244. return sorter(filledSearchOptions);
  27245. }, [filledSearchOptions, filterSort, mergedSearchValue]);
  27246. var displayOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27247. return flattenOptions(orderedFilteredOptions, {
  27248. fieldNames: mergedFieldNames,
  27249. childrenAsData: childrenAsData
  27250. });
  27251. }, [orderedFilteredOptions, mergedFieldNames, childrenAsData]);
  27252. // =========================== Change ===========================
  27253. var triggerChange = function triggerChange(values) {
  27254. var labeledValues = convert2LabelValues(values);
  27255. setInternalValue(labeledValues);
  27256. if (onChange && (
  27257. // Trigger event only when value changed
  27258. labeledValues.length !== mergedValues.length || labeledValues.some(function (newVal, index) {
  27259. var _mergedValues$index;
  27260. return ((_mergedValues$index = mergedValues[index]) === null || _mergedValues$index === void 0 ? void 0 : _mergedValues$index.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);
  27261. }))) {
  27262. var returnValues = labelInValue ? labeledValues : labeledValues.map(function (v) {
  27263. return v.value;
  27264. });
  27265. var returnOptions = labeledValues.map(function (v) {
  27266. return injectPropsWithOption(getMixedOption(v.value));
  27267. });
  27268. onChange(
  27269. // Value
  27270. multiple ? returnValues : returnValues[0],
  27271. // Option
  27272. multiple ? returnOptions : returnOptions[0]);
  27273. }
  27274. };
  27275. // ======================= Accessibility ========================
  27276. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  27277. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  27278. activeValue = _React$useState2[0],
  27279. setActiveValue = _React$useState2[1];
  27280. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  27281. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  27282. accessibilityIndex = _React$useState4[0],
  27283. setAccessibilityIndex = _React$useState4[1];
  27284. var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';
  27285. var onActiveValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (active, index) {
  27286. var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
  27287. _ref3$source = _ref3.source,
  27288. source = _ref3$source === void 0 ? 'keyboard' : _ref3$source;
  27289. setAccessibilityIndex(index);
  27290. if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {
  27291. setActiveValue(String(active));
  27292. }
  27293. }, [backfill, mode]);
  27294. // ========================= OptionList =========================
  27295. var triggerSelect = function triggerSelect(val, selected, type) {
  27296. var getSelectEnt = function getSelectEnt() {
  27297. var _option$key2;
  27298. var option = getMixedOption(val);
  27299. return [labelInValue ? {
  27300. label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],
  27301. value: val,
  27302. key: (_option$key2 = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key2 !== void 0 ? _option$key2 : val
  27303. } : val, injectPropsWithOption(option)];
  27304. };
  27305. if (selected && onSelect) {
  27306. var _getSelectEnt = getSelectEnt(),
  27307. _getSelectEnt2 = (0,slicedToArray["default"])(_getSelectEnt, 2),
  27308. wrappedValue = _getSelectEnt2[0],
  27309. _option = _getSelectEnt2[1];
  27310. onSelect(wrappedValue, _option);
  27311. } else if (!selected && onDeselect && type !== 'clear') {
  27312. var _getSelectEnt3 = getSelectEnt(),
  27313. _getSelectEnt4 = (0,slicedToArray["default"])(_getSelectEnt3, 2),
  27314. _wrappedValue = _getSelectEnt4[0],
  27315. _option2 = _getSelectEnt4[1];
  27316. onDeselect(_wrappedValue, _option2);
  27317. }
  27318. };
  27319. // Used for OptionList selection
  27320. var onInternalSelect = useRefFunc(function (val, info) {
  27321. var cloneValues;
  27322. // Single mode always trigger select only with option list
  27323. var mergedSelect = multiple ? info.selected : true;
  27324. if (mergedSelect) {
  27325. cloneValues = multiple ? [].concat((0,toConsumableArray["default"])(mergedValues), [val]) : [val];
  27326. } else {
  27327. cloneValues = mergedValues.filter(function (v) {
  27328. return v.value !== val;
  27329. });
  27330. }
  27331. triggerChange(cloneValues);
  27332. triggerSelect(val, mergedSelect);
  27333. // Clean search value if single or configured
  27334. if (mode === 'combobox') {
  27335. // setSearchValue(String(val));
  27336. setActiveValue('');
  27337. } else if (!isMultiple || autoClearSearchValue) {
  27338. setSearchValue('');
  27339. setActiveValue('');
  27340. }
  27341. });
  27342. // ======================= Display Change =======================
  27343. // BaseSelect display values change
  27344. var onDisplayValuesChange = function onDisplayValuesChange(nextValues, info) {
  27345. triggerChange(nextValues);
  27346. var type = info.type,
  27347. values = info.values;
  27348. if (type === 'remove' || type === 'clear') {
  27349. values.forEach(function (item) {
  27350. triggerSelect(item.value, false, type);
  27351. });
  27352. }
  27353. };
  27354. // =========================== Search ===========================
  27355. var onInternalSearch = function onInternalSearch(searchText, info) {
  27356. setSearchValue(searchText);
  27357. setActiveValue(null);
  27358. // [Submit] Tag mode should flush input
  27359. if (info.source === 'submit') {
  27360. var formatted = (searchText || '').trim();
  27361. // prevent empty tags from appearing when you click the Enter button
  27362. if (formatted) {
  27363. var newRawValues = Array.from(new Set([].concat((0,toConsumableArray["default"])(rawValues), [formatted])));
  27364. triggerChange(newRawValues);
  27365. triggerSelect(formatted, true);
  27366. setSearchValue('');
  27367. }
  27368. return;
  27369. }
  27370. if (info.source !== 'blur') {
  27371. if (mode === 'combobox') {
  27372. triggerChange(searchText);
  27373. }
  27374. onSearch === null || onSearch === void 0 || onSearch(searchText);
  27375. }
  27376. };
  27377. var onInternalSearchSplit = function onInternalSearchSplit(words) {
  27378. var patchValues = words;
  27379. if (mode !== 'tags') {
  27380. patchValues = words.map(function (word) {
  27381. var opt = labelOptions.get(word);
  27382. return opt === null || opt === void 0 ? void 0 : opt.value;
  27383. }).filter(function (val) {
  27384. return val !== undefined;
  27385. });
  27386. }
  27387. var newRawValues = Array.from(new Set([].concat((0,toConsumableArray["default"])(rawValues), (0,toConsumableArray["default"])(patchValues))));
  27388. triggerChange(newRawValues);
  27389. newRawValues.forEach(function (newRawValue) {
  27390. triggerSelect(newRawValue, true);
  27391. });
  27392. };
  27393. // ========================== Context ===========================
  27394. var selectContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  27395. var realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;
  27396. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, parsedOptions), {}, {
  27397. flattenOptions: displayOptions,
  27398. onActiveValue: onActiveValue,
  27399. defaultActiveFirstOption: mergedDefaultActiveFirstOption,
  27400. onSelect: onInternalSelect,
  27401. menuItemSelectedIcon: menuItemSelectedIcon,
  27402. rawValues: rawValues,
  27403. fieldNames: mergedFieldNames,
  27404. virtual: realVirtual,
  27405. direction: direction,
  27406. listHeight: listHeight,
  27407. listItemHeight: listItemHeight,
  27408. childrenAsData: childrenAsData,
  27409. maxCount: maxCount,
  27410. optionRender: optionRender
  27411. });
  27412. }, [maxCount, parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, direction, listHeight, listItemHeight, childrenAsData, optionRender]);
  27413. // ========================== Warning ===========================
  27414. if (true) {
  27415. warningPropsUtil(props);
  27416. warningNullOptions(mergedOptions, mergedFieldNames);
  27417. }
  27418. // ==============================================================
  27419. // == Render ==
  27420. // ==============================================================
  27421. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SelectContext.Provider, {
  27422. value: selectContext
  27423. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseSelect, (0,esm_extends["default"])({}, restProps, {
  27424. // >>> MISC
  27425. id: mergedId,
  27426. prefixCls: prefixCls,
  27427. ref: ref,
  27428. omitDomProps: OMIT_DOM_PROPS,
  27429. mode: mode
  27430. // >>> Values
  27431. ,
  27432. displayValues: displayValues,
  27433. onDisplayValuesChange: onDisplayValuesChange
  27434. // >>> Trigger
  27435. ,
  27436. direction: direction
  27437. // >>> Search
  27438. ,
  27439. searchValue: mergedSearchValue,
  27440. onSearch: onInternalSearch,
  27441. autoClearSearchValue: autoClearSearchValue,
  27442. onSearchSplit: onInternalSearchSplit,
  27443. dropdownMatchSelectWidth: dropdownMatchSelectWidth
  27444. // >>> OptionList
  27445. ,
  27446. OptionList: es_OptionList,
  27447. emptyOptions: !displayOptions.length
  27448. // >>> Accessibility
  27449. ,
  27450. activeValue: activeValue,
  27451. activeDescendantId: "".concat(mergedId, "_list_").concat(accessibilityIndex)
  27452. })));
  27453. });
  27454. if (true) {
  27455. Select.displayName = 'Select';
  27456. }
  27457. var TypedSelect = Select;
  27458. TypedSelect.Option = es_Option;
  27459. TypedSelect.OptGroup = es_OptGroup;
  27460. /* harmony default export */ var es_Select = (TypedSelect);
  27461. ;// ./node_modules/rc-select/es/index.js
  27462. /* harmony default export */ var rc_select_es = (es_Select);
  27463. ;// ./components/_util/statusUtils.ts
  27464. const _InputStatuses = ['warning', 'error', ''];
  27465. function getStatusClassNames(prefixCls, status, hasFeedback) {
  27466. return classnames_default()({
  27467. [`${prefixCls}-status-success`]: status === 'success',
  27468. [`${prefixCls}-status-warning`]: status === 'warning',
  27469. [`${prefixCls}-status-error`]: status === 'error',
  27470. [`${prefixCls}-status-validating`]: status === 'validating',
  27471. [`${prefixCls}-has-feedback`]: hasFeedback
  27472. });
  27473. }
  27474. const getMergedStatus = (contextStatus, customStatus) => customStatus || contextStatus;
  27475. ;// ./components/empty/empty.tsx
  27476. const Empty = () => {
  27477. const [, token] = (0,useToken["default"])();
  27478. const [locale] = (0,useLocale["default"])('Empty');
  27479. const bgColor = new fast_color_es.FastColor(token.colorBgBase);
  27480. // Dark Theme need more dark of this
  27481. const themeStyle = bgColor.toHsl().l < 0.5 ? {
  27482. opacity: 0.65
  27483. } : {};
  27484. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  27485. style: themeStyle,
  27486. width: "184",
  27487. height: "152",
  27488. viewBox: "0 0 184 152",
  27489. xmlns: "http://www.w3.org/2000/svg"
  27490. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  27491. fill: "none",
  27492. fillRule: "evenodd"
  27493. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  27494. transform: "translate(24 31.67)"
  27495. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ellipse", {
  27496. fillOpacity: ".8",
  27497. fill: "#F5F5F7",
  27498. cx: "67.797",
  27499. cy: "106.89",
  27500. rx: "67.797",
  27501. ry: "12.668"
  27502. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27503. d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
  27504. fill: "#AEB8C2"
  27505. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27506. d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
  27507. fill: "url(#linearGradient-1)",
  27508. transform: "translate(13.56)"
  27509. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27510. d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
  27511. fill: "#F5F5F7"
  27512. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27513. d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
  27514. fill: "#DCE0E6"
  27515. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27516. d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
  27517. fill: "#DCE0E6"
  27518. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  27519. transform: "translate(149.65 15.383)",
  27520. fill: "#FFF"
  27521. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ellipse", {
  27522. cx: "20.654",
  27523. cy: "3.167",
  27524. rx: "2.849",
  27525. ry: "2.815"
  27526. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27527. d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
  27528. }))));
  27529. };
  27530. if (true) {
  27531. Empty.displayName = 'EmptyImage';
  27532. }
  27533. /* harmony default export */ var empty = (Empty);
  27534. ;// ./components/empty/simple.tsx
  27535. const Simple = () => {
  27536. const [, token] = (0,useToken["default"])();
  27537. const [locale] = (0,useLocale["default"])('Empty');
  27538. const {
  27539. colorFill,
  27540. colorFillTertiary,
  27541. colorFillQuaternary,
  27542. colorBgContainer
  27543. } = token;
  27544. const {
  27545. borderColor,
  27546. shadowColor,
  27547. contentColor
  27548. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
  27549. borderColor: new fast_color_es.FastColor(colorFill).onBackground(colorBgContainer).toHexString(),
  27550. shadowColor: new fast_color_es.FastColor(colorFillTertiary).onBackground(colorBgContainer).toHexString(),
  27551. contentColor: new fast_color_es.FastColor(colorFillQuaternary).onBackground(colorBgContainer).toHexString()
  27552. }), [colorFill, colorFillTertiary, colorFillQuaternary, colorBgContainer]);
  27553. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  27554. width: "64",
  27555. height: "41",
  27556. viewBox: "0 0 64 41",
  27557. xmlns: "http://www.w3.org/2000/svg"
  27558. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  27559. transform: "translate(0 1)",
  27560. fill: "none",
  27561. fillRule: "evenodd"
  27562. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ellipse", {
  27563. fill: shadowColor,
  27564. cx: "32",
  27565. cy: "33",
  27566. rx: "32",
  27567. ry: "7"
  27568. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  27569. fillRule: "nonzero",
  27570. stroke: borderColor
  27571. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27572. d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
  27573. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  27574. d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
  27575. fill: contentColor
  27576. }))));
  27577. };
  27578. if (true) {
  27579. Simple.displayName = 'SimpleImage';
  27580. }
  27581. /* harmony default export */ var simple = (Simple);
  27582. // EXTERNAL MODULE: ./components/empty/style/index.ts
  27583. var empty_style = __webpack_require__("./components/empty/style/index.ts");
  27584. ;// ./components/empty/index.tsx
  27585. var empty_rest = undefined && undefined.__rest || function (s, e) {
  27586. var t = {};
  27587. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  27588. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  27589. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  27590. }
  27591. return t;
  27592. };
  27593. const defaultEmptyImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(empty, null);
  27594. const simpleEmptyImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(simple, null);
  27595. const empty_Empty = props => {
  27596. var _a;
  27597. const {
  27598. className,
  27599. rootClassName,
  27600. prefixCls: customizePrefixCls,
  27601. image,
  27602. description,
  27603. children,
  27604. imageStyle,
  27605. style,
  27606. classNames: emptyClassNames,
  27607. styles
  27608. } = props,
  27609. restProps = empty_rest(props, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]);
  27610. const {
  27611. getPrefixCls,
  27612. direction,
  27613. className: contextClassName,
  27614. style: contextStyle,
  27615. classNames: contextClassNames,
  27616. styles: contextStyles,
  27617. image: contextImage
  27618. } = (0,config_provider_context.useComponentConfig)('empty');
  27619. const prefixCls = getPrefixCls('empty', customizePrefixCls);
  27620. const [wrapCSSVar, hashId, cssVarCls] = (0,empty_style["default"])(prefixCls);
  27621. const [locale] = (0,useLocale["default"])('Empty');
  27622. const des = typeof description !== 'undefined' ? description : locale === null || locale === void 0 ? void 0 : locale.description;
  27623. const alt = typeof des === 'string' ? des : 'empty';
  27624. const mergedImage = (_a = image !== null && image !== void 0 ? image : contextImage) !== null && _a !== void 0 ? _a : defaultEmptyImg;
  27625. let imageNode = null;
  27626. if (typeof mergedImage === 'string') {
  27627. imageNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", {
  27628. draggable: false,
  27629. alt: alt,
  27630. src: mergedImage
  27631. });
  27632. } else {
  27633. imageNode = mergedImage;
  27634. }
  27635. // ============================= Warning ==============================
  27636. if (true) {
  27637. const warning = (0,_util_warning.devUseWarning)('Empty');
  27638. [['imageStyle', 'styles: { image: {} }']].forEach(([deprecatedName, newName]) => {
  27639. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  27640. });
  27641. }
  27642. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  27643. className: classnames_default()(hashId, cssVarCls, prefixCls, contextClassName, {
  27644. [`${prefixCls}-normal`]: mergedImage === simpleEmptyImg,
  27645. [`${prefixCls}-rtl`]: direction === 'rtl'
  27646. }, className, rootClassName, contextClassNames.root, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.root),
  27647. style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), styles === null || styles === void 0 ? void 0 : styles.root), style)
  27648. }, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  27649. className: classnames_default()(`${prefixCls}-image`, contextClassNames.image, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.image),
  27650. style: Object.assign(Object.assign(Object.assign({}, imageStyle), contextStyles.image), styles === null || styles === void 0 ? void 0 : styles.image)
  27651. }, imageNode), des && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  27652. className: classnames_default()(`${prefixCls}-description`, contextClassNames.description, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.description),
  27653. style: Object.assign(Object.assign({}, contextStyles.description), styles === null || styles === void 0 ? void 0 : styles.description)
  27654. }, des)), children && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  27655. className: classnames_default()(`${prefixCls}-footer`, contextClassNames.footer, emptyClassNames === null || emptyClassNames === void 0 ? void 0 : emptyClassNames.footer),
  27656. style: Object.assign(Object.assign({}, contextStyles.footer), styles === null || styles === void 0 ? void 0 : styles.footer)
  27657. }, children))));
  27658. };
  27659. empty_Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;
  27660. empty_Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;
  27661. if (true) {
  27662. empty_Empty.displayName = 'Empty';
  27663. }
  27664. /* harmony default export */ var components_empty = (empty_Empty);
  27665. ;// ./components/config-provider/defaultRenderEmpty.tsx
  27666. const DefaultRenderEmpty = props => {
  27667. const {
  27668. componentName
  27669. } = props;
  27670. const {
  27671. getPrefixCls
  27672. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  27673. const prefix = getPrefixCls('empty');
  27674. switch (componentName) {
  27675. case 'Table':
  27676. case 'List':
  27677. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_empty, {
  27678. image: components_empty.PRESENTED_IMAGE_SIMPLE
  27679. });
  27680. case 'Select':
  27681. case 'TreeSelect':
  27682. case 'Cascader':
  27683. case 'Transfer':
  27684. case 'Mentions':
  27685. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_empty, {
  27686. image: components_empty.PRESENTED_IMAGE_SIMPLE,
  27687. className: `${prefix}-small`
  27688. });
  27689. /**
  27690. * This type of component should satisfy the nullish coalescing operator(??) on the left-hand side.
  27691. * to let the component itself implement the logic.
  27692. * For example `Table.filter`.
  27693. */
  27694. case 'Table.filter':
  27695. // why `null`? legacy react16 node type `undefined` is not allowed.
  27696. return null;
  27697. default:
  27698. // Should never hit if we take all the component into consider.
  27699. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_empty, null);
  27700. }
  27701. };
  27702. /* harmony default export */ var defaultRenderEmpty = (DefaultRenderEmpty);
  27703. ;// ./components/form/hooks/useVariants.ts
  27704. /**
  27705. * Compatible for legacy `bordered` prop.
  27706. */
  27707. const useVariant = (component, variant, legacyBordered = undefined) => {
  27708. var _a, _b;
  27709. const {
  27710. variant: configVariant,
  27711. [component]: componentConfig
  27712. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  27713. const ctxVariant = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(VariantContext);
  27714. const configComponentVariant = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.variant;
  27715. let mergedVariant;
  27716. if (typeof variant !== 'undefined') {
  27717. mergedVariant = variant;
  27718. } else if (legacyBordered === false) {
  27719. mergedVariant = 'borderless';
  27720. } else {
  27721. // form variant > component global variant > global variant
  27722. mergedVariant = (_b = (_a = ctxVariant !== null && ctxVariant !== void 0 ? ctxVariant : configComponentVariant) !== null && _a !== void 0 ? _a : configVariant) !== null && _b !== void 0 ? _b : 'outlined';
  27723. }
  27724. const enableVariantCls = config_provider_context.Variants.includes(mergedVariant);
  27725. return [mergedVariant, enableVariantCls];
  27726. };
  27727. /* harmony default export */ var useVariants = (useVariant);
  27728. ;// ./components/select/mergedBuiltinPlacements.ts
  27729. const mergedBuiltinPlacements_getBuiltInPlacements = popupOverflow => {
  27730. const htmlRegion = popupOverflow === 'scroll' ? 'scroll' : 'visible';
  27731. const sharedConfig = {
  27732. overflow: {
  27733. adjustX: true,
  27734. adjustY: true,
  27735. shiftY: true
  27736. },
  27737. htmlRegion,
  27738. dynamicInset: true
  27739. };
  27740. return {
  27741. bottomLeft: Object.assign(Object.assign({}, sharedConfig), {
  27742. points: ['tl', 'bl'],
  27743. offset: [0, 4]
  27744. }),
  27745. bottomRight: Object.assign(Object.assign({}, sharedConfig), {
  27746. points: ['tr', 'br'],
  27747. offset: [0, 4]
  27748. }),
  27749. topLeft: Object.assign(Object.assign({}, sharedConfig), {
  27750. points: ['bl', 'tl'],
  27751. offset: [0, -4]
  27752. }),
  27753. topRight: Object.assign(Object.assign({}, sharedConfig), {
  27754. points: ['br', 'tr'],
  27755. offset: [0, -4]
  27756. })
  27757. };
  27758. };
  27759. function mergedBuiltinPlacements(buildInPlacements, popupOverflow) {
  27760. return buildInPlacements || mergedBuiltinPlacements_getBuiltInPlacements(popupOverflow);
  27761. }
  27762. /* harmony default export */ var select_mergedBuiltinPlacements = (mergedBuiltinPlacements);
  27763. // EXTERNAL MODULE: ./components/select/style/index.ts + 4 modules
  27764. var select_style = __webpack_require__("./components/select/style/index.ts");
  27765. ;// ./node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js
  27766. // This icon file is generated automatically.
  27767. var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
  27768. /* harmony default export */ var asn_CheckOutlined = (CheckOutlined);
  27769. ;// ./node_modules/@ant-design/icons/es/icons/CheckOutlined.js
  27770. // GENERATE BY ./scripts/generate.ts
  27771. // DON NOT EDIT IT MANUALLY
  27772. var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) {
  27773. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  27774. ref: ref,
  27775. icon: asn_CheckOutlined
  27776. }));
  27777. };
  27778. /**![check](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkxMiAxOTBoLTY5LjljLTkuOCAwLTE5LjEgNC41LTI1LjEgMTIuMkw0MDQuNyA3MjQuNSAyMDcgNDc0YTMyIDMyIDAgMDAtMjUuMS0xMi4ySDExMmMtNi43IDAtMTAuNCA3LjctNi4zIDEyLjlsMjczLjkgMzQ3YzEyLjggMTYuMiAzNy40IDE2LjIgNTAuMyAwbDQ4OC40LTYxOC45YzQuMS01LjEuNC0xMi44LTYuMy0xMi44eiIgLz48L3N2Zz4=) */
  27779. var CheckOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CheckOutlined_CheckOutlined);
  27780. if (true) {
  27781. CheckOutlined_RefIcon.displayName = 'CheckOutlined';
  27782. }
  27783. /* harmony default export */ var icons_CheckOutlined = (CheckOutlined_RefIcon);
  27784. ;// ./node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js
  27785. // This icon file is generated automatically.
  27786. var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
  27787. /* harmony default export */ var asn_DownOutlined = (DownOutlined);
  27788. ;// ./node_modules/@ant-design/icons/es/icons/DownOutlined.js
  27789. // GENERATE BY ./scripts/generate.ts
  27790. // DON NOT EDIT IT MANUALLY
  27791. var DownOutlined_DownOutlined = function DownOutlined(props, ref) {
  27792. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  27793. ref: ref,
  27794. icon: asn_DownOutlined
  27795. }));
  27796. };
  27797. /**![down](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg4NCAyNTZoLTc1Yy01LjEgMC05LjkgMi41LTEyLjkgNi42TDUxMiA2NTQuMiAyMjcuOSAyNjIuNmMtMy00LjEtNy44LTYuNi0xMi45LTYuNmgtNzVjLTYuNSAwLTEwLjMgNy40LTYuNSAxMi43bDM1Mi42IDQ4Ni4xYzEyLjggMTcuNiAzOSAxNy42IDUxLjcgMGwzNTIuNi00ODYuMWMzLjktNS4zLjEtMTIuNy02LjQtMTIuN3oiIC8+PC9zdmc+) */
  27798. var DownOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DownOutlined_DownOutlined);
  27799. if (true) {
  27800. DownOutlined_RefIcon.displayName = 'DownOutlined';
  27801. }
  27802. /* harmony default export */ var icons_DownOutlined = (DownOutlined_RefIcon);
  27803. ;// ./node_modules/@ant-design/icons-svg/es/asn/SearchOutlined.js
  27804. // This icon file is generated automatically.
  27805. var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
  27806. /* harmony default export */ var asn_SearchOutlined = (SearchOutlined);
  27807. ;// ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js
  27808. // GENERATE BY ./scripts/generate.ts
  27809. // DON NOT EDIT IT MANUALLY
  27810. var SearchOutlined_SearchOutlined = function SearchOutlined(props, ref) {
  27811. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  27812. ref: ref,
  27813. icon: asn_SearchOutlined
  27814. }));
  27815. };
  27816. /**![search](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkwOS42IDg1NC41TDY0OS45IDU5NC44QzY5MC4yIDU0Mi43IDcxMiA0NzkgNzEyIDQxMmMwLTgwLjItMzEuMy0xNTUuNC04Ny45LTIxMi4xLTU2LjYtNTYuNy0xMzItODcuOS0yMTIuMS04Ny45cy0xNTUuNSAzMS4zLTIxMi4xIDg3LjlDMTQzLjIgMjU2LjUgMTEyIDMzMS44IDExMiA0MTJjMCA4MC4xIDMxLjMgMTU1LjUgODcuOSAyMTIuMUMyNTYuNSA2ODAuOCAzMzEuOCA3MTIgNDEyIDcxMmM2NyAwIDEzMC42LTIxLjggMTgyLjctNjJsMjU5LjcgMjU5LjZhOC4yIDguMiAwIDAwMTEuNiAwbDQzLjYtNDMuNWE4LjIgOC4yIDAgMDAwLTExLjZ6TTU3MC40IDU3MC40QzUyOCA2MTIuNyA0NzEuOCA2MzYgNDEyIDYzNnMtMTE2LTIzLjMtMTU4LjQtNjUuNkMyMTEuMyA1MjggMTg4IDQ3MS44IDE4OCA0MTJzMjMuMy0xMTYuMSA2NS42LTE1OC40QzI5NiAyMTEuMyAzNTIuMiAxODggNDEyIDE4OHMxMTYuMSAyMy4yIDE1OC40IDY1LjZTNjM2IDM1Mi4yIDYzNiA0MTJzLTIzLjMgMTE2LjEtNjUuNiAxNTguNHoiIC8+PC9zdmc+) */
  27817. var SearchOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SearchOutlined_SearchOutlined);
  27818. if (true) {
  27819. SearchOutlined_RefIcon.displayName = 'SearchOutlined';
  27820. }
  27821. /* harmony default export */ var icons_SearchOutlined = (SearchOutlined_RefIcon);
  27822. ;// ./components/select/useIcons.tsx
  27823. function useIcons({
  27824. suffixIcon,
  27825. clearIcon,
  27826. menuItemSelectedIcon,
  27827. removeIcon,
  27828. loading,
  27829. multiple,
  27830. hasFeedback,
  27831. prefixCls,
  27832. showSuffixIcon,
  27833. feedbackIcon,
  27834. showArrow,
  27835. componentName
  27836. }) {
  27837. if (true) {
  27838. const warning = (0,_util_warning.devUseWarning)(componentName);
  27839. warning.deprecated(!clearIcon, 'clearIcon', 'allowClear={{ clearIcon: React.ReactNode }}');
  27840. }
  27841. // Clear Icon
  27842. const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null);
  27843. // Validation Feedback Icon
  27844. const getSuffixIconNode = arrowIcon => {
  27845. if (suffixIcon === null && !hasFeedback && !showArrow) {
  27846. return null;
  27847. }
  27848. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, showSuffixIcon !== false && arrowIcon, hasFeedback && feedbackIcon);
  27849. };
  27850. // Arrow item icon
  27851. let mergedSuffixIcon = null;
  27852. if (suffixIcon !== undefined) {
  27853. mergedSuffixIcon = getSuffixIconNode(suffixIcon);
  27854. } else if (loading) {
  27855. mergedSuffixIcon = getSuffixIconNode(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
  27856. spin: true
  27857. }));
  27858. } else {
  27859. const iconCls = `${prefixCls}-suffix`;
  27860. mergedSuffixIcon = ({
  27861. open,
  27862. showSearch
  27863. }) => {
  27864. if (open && showSearch) {
  27865. return getSuffixIconNode(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, {
  27866. className: iconCls
  27867. }));
  27868. }
  27869. return getSuffixIconNode(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, {
  27870. className: iconCls
  27871. }));
  27872. };
  27873. }
  27874. // Checked item icon
  27875. let mergedItemIcon = null;
  27876. if (menuItemSelectedIcon !== undefined) {
  27877. mergedItemIcon = menuItemSelectedIcon;
  27878. } else if (multiple) {
  27879. mergedItemIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, null);
  27880. } else {
  27881. mergedItemIcon = null;
  27882. }
  27883. let mergedRemoveIcon = null;
  27884. if (removeIcon !== undefined) {
  27885. mergedRemoveIcon = removeIcon;
  27886. } else {
  27887. mergedRemoveIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null);
  27888. }
  27889. return {
  27890. clearIcon: mergedClearIcon,
  27891. suffixIcon: mergedSuffixIcon,
  27892. itemIcon: mergedItemIcon,
  27893. removeIcon: mergedRemoveIcon
  27894. };
  27895. }
  27896. ;// ./components/select/usePopupRender.tsx
  27897. function usePopupRender(renderFn) {
  27898. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  27899. if (!renderFn) {
  27900. return undefined;
  27901. }
  27902. return (...args) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
  27903. space: true
  27904. }, renderFn.apply(void 0, args));
  27905. }, [renderFn]);
  27906. }
  27907. /* harmony default export */ var select_usePopupRender = (usePopupRender);
  27908. ;// ./components/select/useShowArrow.ts
  27909. /**
  27910. * Since Select, TreeSelect, Cascader is same Select like component.
  27911. * We just use same hook to handle this logic.
  27912. *
  27913. * If `suffixIcon` is not equal to `null`, always show it.
  27914. */
  27915. function useShowArrow(suffixIcon, showArrow) {
  27916. return showArrow !== undefined ? showArrow : suffixIcon !== null;
  27917. }
  27918. ;// ./components/select/index.tsx
  27919. var select_rest = undefined && undefined.__rest || function (s, e) {
  27920. var t = {};
  27921. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  27922. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  27923. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  27924. }
  27925. return t;
  27926. };
  27927. // TODO: 4.0 - codemod should help to change `filterOption` to support node props.
  27928. const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
  27929. const InternalSelect = (props, ref) => {
  27930. var _a, _b, _c, _d, _e;
  27931. const {
  27932. prefixCls: customizePrefixCls,
  27933. bordered,
  27934. className,
  27935. rootClassName,
  27936. getPopupContainer,
  27937. popupClassName,
  27938. dropdownClassName,
  27939. listHeight = 256,
  27940. placement,
  27941. listItemHeight: customListItemHeight,
  27942. size: customizeSize,
  27943. disabled: customDisabled,
  27944. notFoundContent,
  27945. status: customStatus,
  27946. builtinPlacements,
  27947. dropdownMatchSelectWidth,
  27948. popupMatchSelectWidth,
  27949. direction: propDirection,
  27950. style,
  27951. allowClear,
  27952. variant: customizeVariant,
  27953. dropdownStyle,
  27954. transitionName,
  27955. tagRender,
  27956. maxCount,
  27957. prefix,
  27958. dropdownRender,
  27959. popupRender,
  27960. onDropdownVisibleChange,
  27961. onOpenChange,
  27962. styles,
  27963. classNames
  27964. } = props,
  27965. rest = select_rest(props, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix", "dropdownRender", "popupRender", "onDropdownVisibleChange", "onOpenChange", "styles", "classNames"]);
  27966. const {
  27967. getPopupContainer: getContextPopupContainer,
  27968. getPrefixCls,
  27969. renderEmpty,
  27970. direction: contextDirection,
  27971. virtual,
  27972. popupMatchSelectWidth: contextPopupMatchSelectWidth,
  27973. popupOverflow
  27974. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  27975. const {
  27976. showSearch,
  27977. style: contextStyle,
  27978. styles: contextStyles,
  27979. className: contextClassName,
  27980. classNames: contextClassNames
  27981. } = (0,config_provider_context.useComponentConfig)('select');
  27982. const [, token] = (0,useToken["default"])();
  27983. const listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : token === null || token === void 0 ? void 0 : token.controlHeight;
  27984. const prefixCls = getPrefixCls('select', customizePrefixCls);
  27985. const rootPrefixCls = getPrefixCls();
  27986. const direction = propDirection !== null && propDirection !== void 0 ? propDirection : contextDirection;
  27987. const {
  27988. compactSize,
  27989. compactItemClassnames
  27990. } = useCompactItemContext(prefixCls, direction);
  27991. const [variant, enableVariantCls] = useVariants('select', customizeVariant, bordered);
  27992. const rootCls = hooks_useCSSVarCls(prefixCls);
  27993. const [wrapCSSVar, hashId, cssVarCls] = (0,select_style["default"])(prefixCls, rootCls);
  27994. const mode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  27995. const {
  27996. mode: m
  27997. } = props;
  27998. if (m === 'combobox') {
  27999. return undefined;
  28000. }
  28001. if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {
  28002. return 'combobox';
  28003. }
  28004. return m;
  28005. }, [props.mode]);
  28006. const isMultiple = mode === 'multiple' || mode === 'tags';
  28007. const showSuffixIcon = useShowArrow(props.suffixIcon, props.showArrow);
  28008. const mergedPopupMatchSelectWidth = (_a = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : contextPopupMatchSelectWidth;
  28009. const mergedPopupStyle = ((_b = styles === null || styles === void 0 ? void 0 : styles.popup) === null || _b === void 0 ? void 0 : _b.root) || ((_c = contextStyles.popup) === null || _c === void 0 ? void 0 : _c.root) || dropdownStyle;
  28010. const mergedPopupRender = select_usePopupRender(popupRender || dropdownRender);
  28011. const mergedOnOpenChange = onOpenChange || onDropdownVisibleChange;
  28012. // ===================== Form Status =====================
  28013. const {
  28014. status: contextStatus,
  28015. hasFeedback,
  28016. isFormItemInput,
  28017. feedbackIcon
  28018. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  28019. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  28020. // ===================== Empty =====================
  28021. let mergedNotFound;
  28022. if (notFoundContent !== undefined) {
  28023. mergedNotFound = notFoundContent;
  28024. } else if (mode === 'combobox') {
  28025. mergedNotFound = null;
  28026. } else {
  28027. mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  28028. componentName: "Select"
  28029. });
  28030. }
  28031. // ===================== Icons =====================
  28032. const {
  28033. suffixIcon,
  28034. itemIcon,
  28035. removeIcon,
  28036. clearIcon
  28037. } = useIcons(Object.assign(Object.assign({}, rest), {
  28038. multiple: isMultiple,
  28039. hasFeedback,
  28040. feedbackIcon,
  28041. showSuffixIcon,
  28042. prefixCls,
  28043. componentName: 'Select'
  28044. }));
  28045. const mergedAllowClear = allowClear === true ? {
  28046. clearIcon
  28047. } : allowClear;
  28048. const selectProps = (0,omit["default"])(rest, ['suffixIcon', 'itemIcon']);
  28049. const mergedPopupClassName = classnames_default()(((_d = classNames === null || classNames === void 0 ? void 0 : classNames.popup) === null || _d === void 0 ? void 0 : _d.root) || ((_e = contextClassNames === null || contextClassNames === void 0 ? void 0 : contextClassNames.popup) === null || _e === void 0 ? void 0 : _e.root) || popupClassName || dropdownClassName, {
  28050. [`${prefixCls}-dropdown-${direction}`]: direction === 'rtl'
  28051. }, rootClassName, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cssVarCls, rootCls, hashId);
  28052. const mergedSize = (0,useSize["default"])(ctx => {
  28053. var _a;
  28054. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  28055. });
  28056. // ===================== Disabled =====================
  28057. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  28058. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  28059. const mergedClassName = classnames_default()({
  28060. [`${prefixCls}-lg`]: mergedSize === 'large',
  28061. [`${prefixCls}-sm`]: mergedSize === 'small',
  28062. [`${prefixCls}-rtl`]: direction === 'rtl',
  28063. [`${prefixCls}-${variant}`]: enableVariantCls,
  28064. [`${prefixCls}-in-form-item`]: isFormItemInput
  28065. }, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, contextClassName, className, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, rootClassName, cssVarCls, rootCls, hashId);
  28066. // ===================== Placement =====================
  28067. const memoPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  28068. if (placement !== undefined) {
  28069. return placement;
  28070. }
  28071. return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
  28072. }, [placement, direction]);
  28073. // ====================== Warning ======================
  28074. if (true) {
  28075. const warning = (0,_util_warning.devUseWarning)('Select');
  28076. const deprecatedProps = {
  28077. dropdownMatchSelectWidth: 'popupMatchSelectWidth',
  28078. dropdownStyle: 'styles.popup.root',
  28079. dropdownClassName: 'classNames.popup.root',
  28080. popupClassName: 'classNames.popup.root',
  28081. dropdownRender: 'popupRender',
  28082. onDropdownVisibleChange: 'onOpenChange',
  28083. bordered: 'variant'
  28084. };
  28085. Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
  28086. warning.deprecated(!(oldProp in props), oldProp, newProp);
  28087. });
  28088. true ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : 0;
  28089. true ? warning(!(typeof maxCount !== 'undefined' && !isMultiple), 'usage', '`maxCount` only works with mode `multiple` or `tags`') : 0;
  28090. }
  28091. // ====================== zIndex =========================
  28092. const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', mergedPopupStyle === null || mergedPopupStyle === void 0 ? void 0 : mergedPopupStyle.zIndex);
  28093. // ====================== Render =======================
  28094. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_select_es, Object.assign({
  28095. ref: ref,
  28096. virtual: virtual,
  28097. showSearch: showSearch
  28098. }, selectProps, {
  28099. style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), styles === null || styles === void 0 ? void 0 : styles.root), contextStyle), style),
  28100. dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,
  28101. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),
  28102. builtinPlacements: select_mergedBuiltinPlacements(builtinPlacements, popupOverflow),
  28103. listHeight: listHeight,
  28104. listItemHeight: listItemHeight,
  28105. mode: mode,
  28106. prefixCls: prefixCls,
  28107. placement: memoPlacement,
  28108. direction: direction,
  28109. prefix: prefix,
  28110. suffixIcon: suffixIcon,
  28111. menuItemSelectedIcon: itemIcon,
  28112. removeIcon: removeIcon,
  28113. allowClear: mergedAllowClear,
  28114. notFoundContent: mergedNotFound,
  28115. className: mergedClassName,
  28116. getPopupContainer: getPopupContainer || getContextPopupContainer,
  28117. dropdownClassName: mergedPopupClassName,
  28118. disabled: mergedDisabled,
  28119. dropdownStyle: Object.assign(Object.assign({}, mergedPopupStyle), {
  28120. zIndex
  28121. }),
  28122. maxCount: isMultiple ? maxCount : undefined,
  28123. tagRender: isMultiple ? tagRender : undefined,
  28124. dropdownRender: mergedPopupRender,
  28125. onDropdownVisibleChange: mergedOnOpenChange
  28126. })));
  28127. };
  28128. if (true) {
  28129. InternalSelect.displayName = 'Select';
  28130. }
  28131. const select_Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalSelect);
  28132. // We don't care debug panel
  28133. /* istanbul ignore next */
  28134. const select_PurePanel = _util_PurePanel(select_Select, 'dropdownAlign');
  28135. select_Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
  28136. select_Select.Option = es_Option;
  28137. select_Select.OptGroup = es_OptGroup;
  28138. select_Select._InternalPanelDoNotUseOrYouWillBeFired = select_PurePanel;
  28139. if (true) {
  28140. select_Select.displayName = 'Select';
  28141. }
  28142. /* harmony default export */ var components_select = (select_Select);
  28143. ;// ./components/auto-complete/AutoComplete.tsx
  28144. const {
  28145. Option: AutoComplete_Option
  28146. } = components_select;
  28147. function isSelectOptionOrSelectOptGroup(child) {
  28148. return (child === null || child === void 0 ? void 0 : child.type) && (child.type.isSelectOption || child.type.isSelectOptGroup);
  28149. }
  28150. const AutoComplete = (props, ref) => {
  28151. var _a, _b;
  28152. const {
  28153. prefixCls: customizePrefixCls,
  28154. className,
  28155. popupClassName,
  28156. dropdownClassName,
  28157. children,
  28158. dataSource,
  28159. dropdownStyle,
  28160. dropdownRender,
  28161. popupRender,
  28162. onDropdownVisibleChange,
  28163. onOpenChange,
  28164. styles,
  28165. classNames
  28166. } = props;
  28167. const childNodes = (0,toArray["default"])(children);
  28168. const mergedPopupStyle = ((_a = styles === null || styles === void 0 ? void 0 : styles.popup) === null || _a === void 0 ? void 0 : _a.root) || dropdownStyle;
  28169. const mergedPopupClassName = ((_b = classNames === null || classNames === void 0 ? void 0 : classNames.popup) === null || _b === void 0 ? void 0 : _b.root) || popupClassName || dropdownClassName;
  28170. const mergedPopupRender = popupRender || dropdownRender;
  28171. const mergedOnOpenChange = onOpenChange || onDropdownVisibleChange;
  28172. // ============================= Input =============================
  28173. let customizeInput;
  28174. if (childNodes.length === 1 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
  28175. [customizeInput] = childNodes;
  28176. }
  28177. const getInputElement = customizeInput ? () => customizeInput : undefined;
  28178. // ============================ Options ============================
  28179. let optionChildren;
  28180. // [Legacy] convert `children` or `dataSource` into option children
  28181. if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
  28182. optionChildren = children;
  28183. } else {
  28184. optionChildren = dataSource ? dataSource.map(item => {
  28185. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(item)) {
  28186. return item;
  28187. }
  28188. switch (typeof item) {
  28189. case 'string':
  28190. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AutoComplete_Option, {
  28191. key: item,
  28192. value: item
  28193. }, item);
  28194. case 'object':
  28195. {
  28196. const {
  28197. value: optionValue
  28198. } = item;
  28199. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AutoComplete_Option, {
  28200. key: optionValue,
  28201. value: optionValue
  28202. }, item.text);
  28203. }
  28204. default:
  28205. return undefined;
  28206. }
  28207. }) : [];
  28208. }
  28209. if (true) {
  28210. const warning = (0,_util_warning.devUseWarning)('AutoComplete');
  28211. true ? warning(!customizeInput || !('size' in props), 'usage', 'You need to control style self instead of setting `size` when using customize input.') : 0;
  28212. const deprecatedProps = {
  28213. dropdownMatchSelectWidth: 'popupMatchSelectWidth',
  28214. dropdownStyle: 'styles.popup.root',
  28215. dropdownClassName: 'classNames.popup.root',
  28216. popupClassName: 'classNames.popup.root',
  28217. dropdownRender: 'popupRender',
  28218. onDropdownVisibleChange: 'onOpenChange',
  28219. dataSource: 'options'
  28220. };
  28221. Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
  28222. warning.deprecated(!(oldProp in props), oldProp, newProp);
  28223. });
  28224. }
  28225. const {
  28226. getPrefixCls
  28227. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  28228. const prefixCls = getPrefixCls('select', customizePrefixCls);
  28229. // ============================ zIndex ============================
  28230. const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', mergedPopupStyle === null || mergedPopupStyle === void 0 ? void 0 : mergedPopupStyle.zIndex);
  28231. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_select, Object.assign({
  28232. ref: ref,
  28233. suffixIcon: null
  28234. }, (0,omit["default"])(props, ['dataSource', 'dropdownClassName', 'popupClassName']), {
  28235. prefixCls: prefixCls,
  28236. classNames: {
  28237. popup: {
  28238. root: mergedPopupClassName
  28239. },
  28240. root: classNames === null || classNames === void 0 ? void 0 : classNames.root
  28241. },
  28242. styles: {
  28243. popup: {
  28244. root: Object.assign(Object.assign({}, mergedPopupStyle), {
  28245. zIndex
  28246. })
  28247. },
  28248. root: styles === null || styles === void 0 ? void 0 : styles.root
  28249. },
  28250. className: classnames_default()(`${prefixCls}-auto-complete`, className),
  28251. mode: components_select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
  28252. popupRender: mergedPopupRender,
  28253. onOpenChange: mergedOnOpenChange,
  28254. // Internal api
  28255. getInputElement
  28256. }), optionChildren);
  28257. };
  28258. const RefAutoComplete = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(AutoComplete);
  28259. if (true) {
  28260. RefAutoComplete.displayName = 'AutoComplete';
  28261. }
  28262. /* harmony default export */ var auto_complete_AutoComplete = (RefAutoComplete);
  28263. ;// ./components/auto-complete/index.tsx
  28264. const {
  28265. Option: auto_complete_Option
  28266. } = components_select;
  28267. // We don't care debug panel
  28268. /* istanbul ignore next */
  28269. const auto_complete_PurePanel = _util_PurePanel(auto_complete_AutoComplete, 'dropdownAlign', props => (0,omit["default"])(props, ['visible']));
  28270. const components_auto_complete_AutoComplete = auto_complete_AutoComplete;
  28271. components_auto_complete_AutoComplete.Option = auto_complete_Option;
  28272. components_auto_complete_AutoComplete._InternalPanelDoNotUseOrYouWillBeFired = auto_complete_PurePanel;
  28273. /* harmony default export */ var auto_complete = (components_auto_complete_AutoComplete);
  28274. ;// ./components/_util/mediaQueryUtil.ts
  28275. const addMediaQueryListener = (mql, handler) => {
  28276. // Don't delete here, please keep the code compatible
  28277. if (typeof (mql === null || mql === void 0 ? void 0 : mql.addEventListener) !== 'undefined') {
  28278. mql.addEventListener('change', handler);
  28279. } else if (typeof (mql === null || mql === void 0 ? void 0 : mql.addListener) !== 'undefined') {
  28280. mql.addListener(handler);
  28281. }
  28282. };
  28283. const removeMediaQueryListener = (mql, handler) => {
  28284. // Don't delete here, please keep the code compatible
  28285. if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeEventListener) !== 'undefined') {
  28286. mql.removeEventListener('change', handler);
  28287. } else if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeListener) !== 'undefined') {
  28288. mql.removeListener(handler);
  28289. }
  28290. };
  28291. ;// ./components/_util/responsiveObserver.ts
  28292. const responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
  28293. const getResponsiveMap = token => ({
  28294. xs: `(max-width: ${token.screenXSMax}px)`,
  28295. sm: `(min-width: ${token.screenSM}px)`,
  28296. md: `(min-width: ${token.screenMD}px)`,
  28297. lg: `(min-width: ${token.screenLG}px)`,
  28298. xl: `(min-width: ${token.screenXL}px)`,
  28299. xxl: `(min-width: ${token.screenXXL}px)`
  28300. });
  28301. /**
  28302. * Ensures that the breakpoints token are valid, in good order
  28303. * For each breakpoint : screenMin <= screen <= screenMax and screenMax <= nextScreenMin
  28304. */
  28305. const validateBreakpoints = token => {
  28306. const indexableToken = token;
  28307. const revBreakpoints = [].concat(responsiveArray).reverse();
  28308. revBreakpoints.forEach((breakpoint, i) => {
  28309. const breakpointUpper = breakpoint.toUpperCase();
  28310. const screenMin = `screen${breakpointUpper}Min`;
  28311. const screen = `screen${breakpointUpper}`;
  28312. if (!(indexableToken[screenMin] <= indexableToken[screen])) {
  28313. throw new Error(`${screenMin}<=${screen} fails : !(${indexableToken[screenMin]}<=${indexableToken[screen]})`);
  28314. }
  28315. if (i < revBreakpoints.length - 1) {
  28316. const screenMax = `screen${breakpointUpper}Max`;
  28317. if (!(indexableToken[screen] <= indexableToken[screenMax])) {
  28318. throw new Error(`${screen}<=${screenMax} fails : !(${indexableToken[screen]}<=${indexableToken[screenMax]})`);
  28319. }
  28320. const nextBreakpointUpperMin = revBreakpoints[i + 1].toUpperCase();
  28321. const nextScreenMin = `screen${nextBreakpointUpperMin}Min`;
  28322. if (!(indexableToken[screenMax] <= indexableToken[nextScreenMin])) {
  28323. throw new Error(`${screenMax}<=${nextScreenMin} fails : !(${indexableToken[screenMax]}<=${indexableToken[nextScreenMin]})`);
  28324. }
  28325. }
  28326. });
  28327. return token;
  28328. };
  28329. const matchScreen = (screens, screenSizes) => {
  28330. if (!screenSizes) {
  28331. return;
  28332. }
  28333. for (const breakpoint of responsiveArray) {
  28334. if (screens[breakpoint] && (screenSizes === null || screenSizes === void 0 ? void 0 : screenSizes[breakpoint]) !== undefined) {
  28335. return screenSizes[breakpoint];
  28336. }
  28337. }
  28338. };
  28339. const useResponsiveObserver = () => {
  28340. const [, token] = (0,useToken["default"])();
  28341. const responsiveMap = getResponsiveMap(validateBreakpoints(token));
  28342. // To avoid repeat create instance, we add `useMemo` here.
  28343. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  28344. const subscribers = new Map();
  28345. let subUid = -1;
  28346. let screens = {};
  28347. return {
  28348. responsiveMap,
  28349. matchHandlers: {},
  28350. dispatch(pointMap) {
  28351. screens = pointMap;
  28352. subscribers.forEach(func => func(screens));
  28353. return subscribers.size >= 1;
  28354. },
  28355. subscribe(func) {
  28356. if (!subscribers.size) {
  28357. this.register();
  28358. }
  28359. subUid += 1;
  28360. subscribers.set(subUid, func);
  28361. func(screens);
  28362. return subUid;
  28363. },
  28364. unsubscribe(paramToken) {
  28365. subscribers.delete(paramToken);
  28366. if (!subscribers.size) {
  28367. this.unregister();
  28368. }
  28369. },
  28370. register() {
  28371. Object.entries(responsiveMap).forEach(([screen, mediaQuery]) => {
  28372. const listener = ({
  28373. matches
  28374. }) => {
  28375. this.dispatch(Object.assign(Object.assign({}, screens), {
  28376. [screen]: matches
  28377. }));
  28378. };
  28379. const mql = window.matchMedia(mediaQuery);
  28380. addMediaQueryListener(mql, listener);
  28381. this.matchHandlers[mediaQuery] = {
  28382. mql,
  28383. listener
  28384. };
  28385. listener(mql);
  28386. });
  28387. },
  28388. unregister() {
  28389. Object.values(responsiveMap).forEach(mediaQuery => {
  28390. const handler = this.matchHandlers[mediaQuery];
  28391. removeMediaQueryListener(handler === null || handler === void 0 ? void 0 : handler.mql, handler === null || handler === void 0 ? void 0 : handler.listener);
  28392. });
  28393. subscribers.clear();
  28394. }
  28395. };
  28396. }, [token]);
  28397. };
  28398. /* harmony default export */ var _util_responsiveObserver = (useResponsiveObserver);
  28399. ;// ./components/_util/hooks/useForceUpdate.ts
  28400. function useForceUpdate() {
  28401. const [, forceUpdate] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer(x => x + 1, 0);
  28402. return forceUpdate;
  28403. }
  28404. ;// ./components/grid/hooks/useBreakpoint.tsx
  28405. function useBreakpoint(refreshOnChange = true, defaultScreens = {}) {
  28406. const screensRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(defaultScreens);
  28407. const forceUpdate = useForceUpdate();
  28408. const responsiveObserver = _util_responsiveObserver();
  28409. (0,useLayoutEffect["default"])(() => {
  28410. const token = responsiveObserver.subscribe(supportScreens => {
  28411. screensRef.current = supportScreens;
  28412. if (refreshOnChange) {
  28413. forceUpdate();
  28414. }
  28415. });
  28416. return () => responsiveObserver.unsubscribe(token);
  28417. }, []);
  28418. return screensRef.current;
  28419. }
  28420. /* harmony default export */ var hooks_useBreakpoint = (useBreakpoint);
  28421. ;// ./components/avatar/AvatarContext.ts
  28422. const AvatarContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  28423. /* harmony default export */ var avatar_AvatarContext = (AvatarContext);
  28424. // EXTERNAL MODULE: ./components/avatar/style/index.ts
  28425. var avatar_style = __webpack_require__("./components/avatar/style/index.ts");
  28426. ;// ./components/avatar/Avatar.tsx
  28427. var Avatar_rest = undefined && undefined.__rest || function (s, e) {
  28428. var t = {};
  28429. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  28430. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  28431. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  28432. }
  28433. return t;
  28434. };
  28435. const Avatar_Avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  28436. const {
  28437. prefixCls: customizePrefixCls,
  28438. shape,
  28439. size: customSize,
  28440. src,
  28441. srcSet,
  28442. icon,
  28443. className,
  28444. rootClassName,
  28445. style,
  28446. alt,
  28447. draggable,
  28448. children,
  28449. crossOrigin,
  28450. gap = 4,
  28451. onError
  28452. } = props,
  28453. others = Avatar_rest(props, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "rootClassName", "style", "alt", "draggable", "children", "crossOrigin", "gap", "onError"]);
  28454. const [scale, setScale] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(1);
  28455. const [mounted, setMounted] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  28456. const [isImgExist, setIsImgExist] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
  28457. const avatarNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  28458. const avatarChildrenRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  28459. const avatarNodeMergedRef = (0,es_ref.composeRef)(ref, avatarNodeRef);
  28460. const {
  28461. getPrefixCls,
  28462. avatar
  28463. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  28464. const avatarCtx = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(avatar_AvatarContext);
  28465. const setScaleParam = () => {
  28466. if (!avatarChildrenRef.current || !avatarNodeRef.current) {
  28467. return;
  28468. }
  28469. const childrenWidth = avatarChildrenRef.current.offsetWidth; // offsetWidth avoid affecting be transform scale
  28470. const nodeWidth = avatarNodeRef.current.offsetWidth;
  28471. // denominator is 0 is no meaning
  28472. if (childrenWidth !== 0 && nodeWidth !== 0) {
  28473. if (gap * 2 < nodeWidth) {
  28474. setScale(nodeWidth - gap * 2 < childrenWidth ? (nodeWidth - gap * 2) / childrenWidth : 1);
  28475. }
  28476. }
  28477. };
  28478. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  28479. setMounted(true);
  28480. }, []);
  28481. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  28482. setIsImgExist(true);
  28483. setScale(1);
  28484. }, [src]);
  28485. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(setScaleParam, [gap]);
  28486. const handleImgLoadError = () => {
  28487. const errorFlag = onError === null || onError === void 0 ? void 0 : onError();
  28488. if (errorFlag !== false) {
  28489. setIsImgExist(false);
  28490. }
  28491. };
  28492. const size = (0,useSize["default"])(ctxSize => {
  28493. var _a, _b;
  28494. return (_b = (_a = customSize !== null && customSize !== void 0 ? customSize : avatarCtx === null || avatarCtx === void 0 ? void 0 : avatarCtx.size) !== null && _a !== void 0 ? _a : ctxSize) !== null && _b !== void 0 ? _b : 'default';
  28495. });
  28496. const needResponsive = Object.keys(typeof size === 'object' ? size || {} : {}).some(key => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key));
  28497. const screens = hooks_useBreakpoint(needResponsive);
  28498. const responsiveSizeStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  28499. if (typeof size !== 'object') {
  28500. return {};
  28501. }
  28502. const currentBreakpoint = responsiveArray.find(screen => screens[screen]);
  28503. const currentSize = size[currentBreakpoint];
  28504. return currentSize ? {
  28505. width: currentSize,
  28506. height: currentSize,
  28507. fontSize: currentSize && (icon || children) ? currentSize / 2 : 18
  28508. } : {};
  28509. }, [screens, size]);
  28510. if (true) {
  28511. const warning = (0,_util_warning.devUseWarning)('Avatar');
  28512. true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
  28513. }
  28514. const prefixCls = getPrefixCls('avatar', customizePrefixCls);
  28515. const rootCls = hooks_useCSSVarCls(prefixCls);
  28516. const [wrapCSSVar, hashId, cssVarCls] = (0,avatar_style["default"])(prefixCls, rootCls);
  28517. const sizeCls = classnames_default()({
  28518. [`${prefixCls}-lg`]: size === 'large',
  28519. [`${prefixCls}-sm`]: size === 'small'
  28520. });
  28521. const hasImageElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(src);
  28522. const mergedShape = shape || (avatarCtx === null || avatarCtx === void 0 ? void 0 : avatarCtx.shape) || 'circle';
  28523. const classString = classnames_default()(prefixCls, sizeCls, avatar === null || avatar === void 0 ? void 0 : avatar.className, `${prefixCls}-${mergedShape}`, {
  28524. [`${prefixCls}-image`]: hasImageElement || src && isImgExist,
  28525. [`${prefixCls}-icon`]: !!icon
  28526. }, cssVarCls, rootCls, className, rootClassName, hashId);
  28527. const sizeStyle = typeof size === 'number' ? {
  28528. width: size,
  28529. height: size,
  28530. fontSize: icon ? size / 2 : 18
  28531. } : {};
  28532. let childrenToRender;
  28533. if (typeof src === 'string' && isImgExist) {
  28534. childrenToRender = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", {
  28535. src: src,
  28536. draggable: draggable,
  28537. srcSet: srcSet,
  28538. onError: handleImgLoadError,
  28539. alt: alt,
  28540. crossOrigin: crossOrigin
  28541. });
  28542. } else if (hasImageElement) {
  28543. childrenToRender = src;
  28544. } else if (icon) {
  28545. childrenToRender = icon;
  28546. } else if (mounted || scale !== 1) {
  28547. const transformString = `scale(${scale})`;
  28548. const childrenStyle = {
  28549. msTransform: transformString,
  28550. WebkitTransform: transformString,
  28551. transform: transformString
  28552. };
  28553. childrenToRender = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  28554. onResize: setScaleParam
  28555. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  28556. className: `${prefixCls}-string`,
  28557. ref: avatarChildrenRef,
  28558. style: Object.assign({}, childrenStyle)
  28559. }, children));
  28560. } else {
  28561. childrenToRender = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  28562. className: `${prefixCls}-string`,
  28563. style: {
  28564. opacity: 0
  28565. },
  28566. ref: avatarChildrenRef
  28567. }, children);
  28568. }
  28569. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, others, {
  28570. style: Object.assign(Object.assign(Object.assign(Object.assign({}, sizeStyle), responsiveSizeStyle), avatar === null || avatar === void 0 ? void 0 : avatar.style), style),
  28571. className: classString,
  28572. ref: avatarNodeMergedRef
  28573. }), childrenToRender));
  28574. });
  28575. if (true) {
  28576. Avatar_Avatar.displayName = 'Avatar';
  28577. }
  28578. /* harmony default export */ var avatar_Avatar = (Avatar_Avatar);
  28579. ;// ./components/_util/getRenderPropValue.ts
  28580. const getRenderPropValue = propValue => {
  28581. if (!propValue) {
  28582. return null;
  28583. }
  28584. return typeof propValue === 'function' ? propValue() : propValue;
  28585. };
  28586. ;// ./node_modules/rc-tooltip/es/Popup.js
  28587. function Popup_Popup(props) {
  28588. var children = props.children,
  28589. prefixCls = props.prefixCls,
  28590. id = props.id,
  28591. innerStyle = props.overlayInnerStyle,
  28592. bodyClassName = props.bodyClassName,
  28593. className = props.className,
  28594. style = props.style;
  28595. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  28596. className: classnames_default()("".concat(prefixCls, "-content"), className),
  28597. style: style
  28598. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  28599. className: classnames_default()("".concat(prefixCls, "-inner"), bodyClassName),
  28600. id: id,
  28601. role: "tooltip",
  28602. style: innerStyle
  28603. }, typeof children === 'function' ? children() : children));
  28604. }
  28605. ;// ./node_modules/rc-tooltip/es/placements.js
  28606. var autoAdjustOverflowTopBottom = {
  28607. shiftX: 64,
  28608. adjustY: 1
  28609. };
  28610. var autoAdjustOverflowLeftRight = {
  28611. adjustX: 1,
  28612. shiftY: true
  28613. };
  28614. var targetOffset = [0, 0];
  28615. var placements = {
  28616. left: {
  28617. points: ['cr', 'cl'],
  28618. overflow: autoAdjustOverflowLeftRight,
  28619. offset: [-4, 0],
  28620. targetOffset: targetOffset
  28621. },
  28622. right: {
  28623. points: ['cl', 'cr'],
  28624. overflow: autoAdjustOverflowLeftRight,
  28625. offset: [4, 0],
  28626. targetOffset: targetOffset
  28627. },
  28628. top: {
  28629. points: ['bc', 'tc'],
  28630. overflow: autoAdjustOverflowTopBottom,
  28631. offset: [0, -4],
  28632. targetOffset: targetOffset
  28633. },
  28634. bottom: {
  28635. points: ['tc', 'bc'],
  28636. overflow: autoAdjustOverflowTopBottom,
  28637. offset: [0, 4],
  28638. targetOffset: targetOffset
  28639. },
  28640. topLeft: {
  28641. points: ['bl', 'tl'],
  28642. overflow: autoAdjustOverflowTopBottom,
  28643. offset: [0, -4],
  28644. targetOffset: targetOffset
  28645. },
  28646. leftTop: {
  28647. points: ['tr', 'tl'],
  28648. overflow: autoAdjustOverflowLeftRight,
  28649. offset: [-4, 0],
  28650. targetOffset: targetOffset
  28651. },
  28652. topRight: {
  28653. points: ['br', 'tr'],
  28654. overflow: autoAdjustOverflowTopBottom,
  28655. offset: [0, -4],
  28656. targetOffset: targetOffset
  28657. },
  28658. rightTop: {
  28659. points: ['tl', 'tr'],
  28660. overflow: autoAdjustOverflowLeftRight,
  28661. offset: [4, 0],
  28662. targetOffset: targetOffset
  28663. },
  28664. bottomRight: {
  28665. points: ['tr', 'br'],
  28666. overflow: autoAdjustOverflowTopBottom,
  28667. offset: [0, 4],
  28668. targetOffset: targetOffset
  28669. },
  28670. rightBottom: {
  28671. points: ['bl', 'br'],
  28672. overflow: autoAdjustOverflowLeftRight,
  28673. offset: [4, 0],
  28674. targetOffset: targetOffset
  28675. },
  28676. bottomLeft: {
  28677. points: ['tl', 'bl'],
  28678. overflow: autoAdjustOverflowTopBottom,
  28679. offset: [0, 4],
  28680. targetOffset: targetOffset
  28681. },
  28682. leftBottom: {
  28683. points: ['br', 'bl'],
  28684. overflow: autoAdjustOverflowLeftRight,
  28685. offset: [-4, 0],
  28686. targetOffset: targetOffset
  28687. }
  28688. };
  28689. /* harmony default export */ var es_placements = (placements);
  28690. ;// ./node_modules/rc-tooltip/es/Tooltip.js
  28691. var Tooltip_excluded = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow", "classNames", "styles"];
  28692. var Tooltip = function Tooltip(props, ref) {
  28693. var overlayClassName = props.overlayClassName,
  28694. _props$trigger = props.trigger,
  28695. trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
  28696. _props$mouseEnterDela = props.mouseEnterDelay,
  28697. mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,
  28698. _props$mouseLeaveDela = props.mouseLeaveDelay,
  28699. mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
  28700. overlayStyle = props.overlayStyle,
  28701. _props$prefixCls = props.prefixCls,
  28702. prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,
  28703. children = props.children,
  28704. onVisibleChange = props.onVisibleChange,
  28705. afterVisibleChange = props.afterVisibleChange,
  28706. transitionName = props.transitionName,
  28707. animation = props.animation,
  28708. motion = props.motion,
  28709. _props$placement = props.placement,
  28710. placement = _props$placement === void 0 ? 'right' : _props$placement,
  28711. _props$align = props.align,
  28712. align = _props$align === void 0 ? {} : _props$align,
  28713. _props$destroyTooltip = props.destroyTooltipOnHide,
  28714. destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,
  28715. defaultVisible = props.defaultVisible,
  28716. getTooltipContainer = props.getTooltipContainer,
  28717. overlayInnerStyle = props.overlayInnerStyle,
  28718. arrowContent = props.arrowContent,
  28719. overlay = props.overlay,
  28720. id = props.id,
  28721. _props$showArrow = props.showArrow,
  28722. showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
  28723. tooltipClassNames = props.classNames,
  28724. tooltipStyles = props.styles,
  28725. restProps = (0,objectWithoutProperties["default"])(props, Tooltip_excluded);
  28726. var mergedId = hooks_useId(id);
  28727. var triggerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  28728. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
  28729. return triggerRef.current;
  28730. });
  28731. var extraProps = (0,objectSpread2["default"])({}, restProps);
  28732. if ('visible' in props) {
  28733. extraProps.popupVisible = props.visible;
  28734. }
  28735. var getPopupElement = function getPopupElement() {
  28736. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_Popup, {
  28737. key: "content",
  28738. prefixCls: prefixCls,
  28739. id: mergedId,
  28740. bodyClassName: tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.body,
  28741. overlayInnerStyle: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, overlayInnerStyle), tooltipStyles === null || tooltipStyles === void 0 ? void 0 : tooltipStyles.body)
  28742. }, overlay);
  28743. };
  28744. var getChildren = function getChildren() {
  28745. var child = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children);
  28746. var originalProps = (child === null || child === void 0 ? void 0 : child.props) || {};
  28747. var childProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originalProps), {}, {
  28748. 'aria-describedby': overlay ? mergedId : null
  28749. });
  28750. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, childProps);
  28751. };
  28752. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, (0,esm_extends["default"])({
  28753. popupClassName: classnames_default()(overlayClassName, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.root),
  28754. prefixCls: prefixCls,
  28755. popup: getPopupElement,
  28756. action: trigger,
  28757. builtinPlacements: placements,
  28758. popupPlacement: placement,
  28759. ref: triggerRef,
  28760. popupAlign: align,
  28761. getPopupContainer: getTooltipContainer,
  28762. onPopupVisibleChange: onVisibleChange,
  28763. afterPopupVisibleChange: afterVisibleChange,
  28764. popupTransitionName: transitionName,
  28765. popupAnimation: animation,
  28766. popupMotion: motion,
  28767. defaultPopupVisible: defaultVisible,
  28768. autoDestroy: destroyTooltipOnHide,
  28769. mouseLeaveDelay: mouseLeaveDelay,
  28770. popupStyle: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, overlayStyle), tooltipStyles === null || tooltipStyles === void 0 ? void 0 : tooltipStyles.root),
  28771. mouseEnterDelay: mouseEnterDelay,
  28772. arrow: showArrow
  28773. }, extraProps), getChildren());
  28774. };
  28775. /* harmony default export */ var es_Tooltip = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(Tooltip));
  28776. ;// ./node_modules/rc-tooltip/es/index.js
  28777. /* harmony default export */ var rc_tooltip_es = (es_Tooltip);
  28778. // EXTERNAL MODULE: ./components/style/placementArrow.ts
  28779. var placementArrow = __webpack_require__("./components/style/placementArrow.ts");
  28780. ;// ./components/_util/placements.ts
  28781. function getOverflowOptions(placement, arrowOffset, arrowWidth, autoAdjustOverflow) {
  28782. if (autoAdjustOverflow === false) {
  28783. return {
  28784. adjustX: false,
  28785. adjustY: false
  28786. };
  28787. }
  28788. const overflow = autoAdjustOverflow && typeof autoAdjustOverflow === 'object' ? autoAdjustOverflow : {};
  28789. const baseOverflow = {};
  28790. switch (placement) {
  28791. case 'top':
  28792. case 'bottom':
  28793. baseOverflow.shiftX = arrowOffset.arrowOffsetHorizontal * 2 + arrowWidth;
  28794. baseOverflow.shiftY = true;
  28795. baseOverflow.adjustY = true;
  28796. break;
  28797. case 'left':
  28798. case 'right':
  28799. baseOverflow.shiftY = arrowOffset.arrowOffsetVertical * 2 + arrowWidth;
  28800. baseOverflow.shiftX = true;
  28801. baseOverflow.adjustX = true;
  28802. break;
  28803. }
  28804. const mergedOverflow = Object.assign(Object.assign({}, baseOverflow), overflow);
  28805. // Support auto shift
  28806. if (!mergedOverflow.shiftX) {
  28807. mergedOverflow.adjustX = true;
  28808. }
  28809. if (!mergedOverflow.shiftY) {
  28810. mergedOverflow.adjustY = true;
  28811. }
  28812. return mergedOverflow;
  28813. }
  28814. const PlacementAlignMap = {
  28815. left: {
  28816. points: ['cr', 'cl']
  28817. },
  28818. right: {
  28819. points: ['cl', 'cr']
  28820. },
  28821. top: {
  28822. points: ['bc', 'tc']
  28823. },
  28824. bottom: {
  28825. points: ['tc', 'bc']
  28826. },
  28827. topLeft: {
  28828. points: ['bl', 'tl']
  28829. },
  28830. leftTop: {
  28831. points: ['tr', 'tl']
  28832. },
  28833. topRight: {
  28834. points: ['br', 'tr']
  28835. },
  28836. rightTop: {
  28837. points: ['tl', 'tr']
  28838. },
  28839. bottomRight: {
  28840. points: ['tr', 'br']
  28841. },
  28842. rightBottom: {
  28843. points: ['bl', 'br']
  28844. },
  28845. bottomLeft: {
  28846. points: ['tl', 'bl']
  28847. },
  28848. leftBottom: {
  28849. points: ['br', 'bl']
  28850. }
  28851. };
  28852. const ArrowCenterPlacementAlignMap = {
  28853. topLeft: {
  28854. points: ['bl', 'tc']
  28855. },
  28856. leftTop: {
  28857. points: ['tr', 'cl']
  28858. },
  28859. topRight: {
  28860. points: ['br', 'tc']
  28861. },
  28862. rightTop: {
  28863. points: ['tl', 'cr']
  28864. },
  28865. bottomRight: {
  28866. points: ['tr', 'bc']
  28867. },
  28868. rightBottom: {
  28869. points: ['bl', 'cr']
  28870. },
  28871. bottomLeft: {
  28872. points: ['tl', 'bc']
  28873. },
  28874. leftBottom: {
  28875. points: ['br', 'cl']
  28876. }
  28877. };
  28878. const DisableAutoArrowList = new Set(['topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom']);
  28879. function getPlacements(config) {
  28880. const {
  28881. arrowWidth,
  28882. autoAdjustOverflow,
  28883. arrowPointAtCenter,
  28884. offset,
  28885. borderRadius,
  28886. visibleFirst
  28887. } = config;
  28888. const halfArrowWidth = arrowWidth / 2;
  28889. const placementMap = {};
  28890. // Dynamic offset
  28891. const arrowOffset = (0,placementArrow.getArrowOffsetToken)({
  28892. contentRadius: borderRadius,
  28893. limitVerticalRadius: true
  28894. });
  28895. Object.keys(PlacementAlignMap).forEach(key => {
  28896. const template = arrowPointAtCenter && ArrowCenterPlacementAlignMap[key] || PlacementAlignMap[key];
  28897. const placementInfo = Object.assign(Object.assign({}, template), {
  28898. offset: [0, 0],
  28899. dynamicInset: true
  28900. });
  28901. placementMap[key] = placementInfo;
  28902. // Disable autoArrow since design is fixed position
  28903. if (DisableAutoArrowList.has(key)) {
  28904. placementInfo.autoArrow = false;
  28905. }
  28906. // Static offset
  28907. switch (key) {
  28908. case 'top':
  28909. case 'topLeft':
  28910. case 'topRight':
  28911. placementInfo.offset[1] = -halfArrowWidth - offset;
  28912. break;
  28913. case 'bottom':
  28914. case 'bottomLeft':
  28915. case 'bottomRight':
  28916. placementInfo.offset[1] = halfArrowWidth + offset;
  28917. break;
  28918. case 'left':
  28919. case 'leftTop':
  28920. case 'leftBottom':
  28921. placementInfo.offset[0] = -halfArrowWidth - offset;
  28922. break;
  28923. case 'right':
  28924. case 'rightTop':
  28925. case 'rightBottom':
  28926. placementInfo.offset[0] = halfArrowWidth + offset;
  28927. break;
  28928. }
  28929. if (arrowPointAtCenter) {
  28930. switch (key) {
  28931. case 'topLeft':
  28932. case 'bottomLeft':
  28933. placementInfo.offset[0] = -arrowOffset.arrowOffsetHorizontal - halfArrowWidth;
  28934. break;
  28935. case 'topRight':
  28936. case 'bottomRight':
  28937. placementInfo.offset[0] = arrowOffset.arrowOffsetHorizontal + halfArrowWidth;
  28938. break;
  28939. case 'leftTop':
  28940. case 'rightTop':
  28941. placementInfo.offset[1] = -arrowOffset.arrowOffsetHorizontal * 2 + halfArrowWidth;
  28942. break;
  28943. case 'leftBottom':
  28944. case 'rightBottom':
  28945. placementInfo.offset[1] = arrowOffset.arrowOffsetHorizontal * 2 - halfArrowWidth;
  28946. break;
  28947. }
  28948. }
  28949. // Overflow
  28950. placementInfo.overflow = getOverflowOptions(key, arrowOffset, arrowWidth, autoAdjustOverflow);
  28951. // VisibleFirst
  28952. if (visibleFirst) {
  28953. placementInfo.htmlRegion = 'visibleFirst';
  28954. }
  28955. });
  28956. return placementMap;
  28957. }
  28958. // EXTERNAL MODULE: ./components/tooltip/style/index.ts
  28959. var tooltip_style = __webpack_require__("./components/tooltip/style/index.ts");
  28960. ;// ./components/_util/colors.ts
  28961. const inverseColors = presetColors.PresetColors.map(color => `${color}-inverse`);
  28962. const PresetStatusColorTypes = ['success', 'processing', 'error', 'default', 'warning'];
  28963. /**
  28964. * determine if the color keyword belongs to the `Ant Design` {@link PresetColors}.
  28965. * @param color color to be judged
  28966. * @param includeInverse whether to include reversed colors
  28967. */
  28968. function isPresetColor(color, includeInverse = true) {
  28969. if (includeInverse) {
  28970. return [].concat((0,toConsumableArray["default"])(inverseColors), (0,toConsumableArray["default"])(presetColors.PresetColors)).includes(color);
  28971. }
  28972. return presetColors.PresetColors.includes(color);
  28973. }
  28974. function isPresetStatusColor(color) {
  28975. return PresetStatusColorTypes.includes(color);
  28976. }
  28977. // EXTERNAL MODULE: ./components/color-picker/util.ts
  28978. var util = __webpack_require__("./components/color-picker/util.ts");
  28979. ;// ./components/tooltip/util.ts
  28980. function parseColor(prefixCls, color) {
  28981. const isInternalColor = isPresetColor(color);
  28982. const className = classnames_default()({
  28983. [`${prefixCls}-${color}`]: color && isInternalColor
  28984. });
  28985. const overlayStyle = {};
  28986. const arrowStyle = {};
  28987. const rgb = (0,util.generateColor)(color).toRgb();
  28988. const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
  28989. const textColor = luminance < 0.5 ? '#FFF' : '#000';
  28990. if (color && !isInternalColor) {
  28991. overlayStyle.background = color;
  28992. overlayStyle['--ant-tooltip-color'] = textColor;
  28993. // @ts-ignore
  28994. arrowStyle['--antd-arrow-background-color'] = color;
  28995. }
  28996. return {
  28997. className,
  28998. overlayStyle,
  28999. arrowStyle
  29000. };
  29001. }
  29002. ;// ./components/tooltip/PurePanel.tsx
  29003. /** @private Internal Component. Do not use in your production. */
  29004. const tooltip_PurePanel_PurePanel = props => {
  29005. const {
  29006. prefixCls: customizePrefixCls,
  29007. className,
  29008. placement = 'top',
  29009. title,
  29010. color,
  29011. overlayInnerStyle
  29012. } = props;
  29013. const {
  29014. getPrefixCls
  29015. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29016. const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
  29017. const [wrapCSSVar, hashId, cssVarCls] = (0,tooltip_style["default"])(prefixCls);
  29018. // Color
  29019. const colorInfo = parseColor(prefixCls, color);
  29020. const arrowContentStyle = colorInfo.arrowStyle;
  29021. const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);
  29022. const cls = classnames_default()(hashId, cssVarCls, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className, colorInfo.className);
  29023. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29024. className: cls,
  29025. style: arrowContentStyle
  29026. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29027. className: `${prefixCls}-arrow`
  29028. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_Popup, Object.assign({}, props, {
  29029. className: hashId,
  29030. prefixCls: prefixCls,
  29031. overlayInnerStyle: formattedOverlayInnerStyle
  29032. }), title)));
  29033. };
  29034. /* harmony default export */ var tooltip_PurePanel = (tooltip_PurePanel_PurePanel);
  29035. ;// ./components/tooltip/index.tsx
  29036. var tooltip_rest = undefined && undefined.__rest || function (s, e) {
  29037. var t = {};
  29038. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  29039. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  29040. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  29041. }
  29042. return t;
  29043. };
  29044. const InternalTooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  29045. var _a, _b;
  29046. const {
  29047. prefixCls: customizePrefixCls,
  29048. openClassName,
  29049. getTooltipContainer,
  29050. color,
  29051. overlayInnerStyle,
  29052. children,
  29053. afterOpenChange,
  29054. afterVisibleChange,
  29055. destroyTooltipOnHide,
  29056. destroyOnHidden,
  29057. arrow = true,
  29058. title,
  29059. overlay,
  29060. builtinPlacements,
  29061. arrowPointAtCenter = false,
  29062. autoAdjustOverflow = true,
  29063. motion,
  29064. getPopupContainer,
  29065. placement = 'top',
  29066. mouseEnterDelay = 0.1,
  29067. mouseLeaveDelay = 0.1,
  29068. overlayStyle,
  29069. rootClassName,
  29070. overlayClassName,
  29071. styles,
  29072. classNames: tooltipClassNames
  29073. } = props,
  29074. restProps = tooltip_rest(props, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "destroyOnHidden", "arrow", "title", "overlay", "builtinPlacements", "arrowPointAtCenter", "autoAdjustOverflow", "motion", "getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]);
  29075. const mergedShowArrow = !!arrow;
  29076. const [, token] = (0,useToken["default"])();
  29077. const {
  29078. getPopupContainer: getContextPopupContainer,
  29079. getPrefixCls,
  29080. direction,
  29081. className: contextClassName,
  29082. style: contextStyle,
  29083. classNames: contextClassNames,
  29084. styles: contextStyles
  29085. } = (0,config_provider_context.useComponentConfig)('tooltip');
  29086. // ============================== Ref ===============================
  29087. const warning = (0,_util_warning.devUseWarning)('Tooltip');
  29088. const tooltipRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  29089. const forceAlign = () => {
  29090. var _a;
  29091. (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.forceAlign();
  29092. };
  29093. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => {
  29094. var _a, _b;
  29095. return {
  29096. forceAlign,
  29097. forcePopupAlign: () => {
  29098. warning.deprecated(false, 'forcePopupAlign', 'forceAlign');
  29099. forceAlign();
  29100. },
  29101. nativeElement: (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement,
  29102. popupElement: (_b = tooltipRef.current) === null || _b === void 0 ? void 0 : _b.popupElement
  29103. };
  29104. });
  29105. // ============================== Warn ==============================
  29106. if (true) {
  29107. [['visible', 'open'], ['defaultVisible', 'defaultOpen'], ['onVisibleChange', 'onOpenChange'], ['afterVisibleChange', 'afterOpenChange'], ['destroyTooltipOnHide', 'destroyOnHidden'], ['arrowPointAtCenter', 'arrow={{ pointAtCenter: true }}'], ['overlayStyle', 'styles={{ root: {} }}'], ['overlayInnerStyle', 'styles={{ body: {} }}'], ['overlayClassName', 'classNames={{ root: "" }}']].forEach(([deprecatedName, newName]) => {
  29108. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  29109. });
  29110. true ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === 'boolean', 'usage', '`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.') : 0;
  29111. true ? warning(!arrow || typeof arrow === 'boolean' || !('arrowPointAtCenter' in arrow), 'deprecated', '`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead.') : 0;
  29112. }
  29113. // ============================== Open ==============================
  29114. const [open, setOpen] = (0,useMergedState["default"])(false, {
  29115. value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,
  29116. defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible
  29117. });
  29118. const noTitle = !title && !overlay && title !== 0; // overlay for old version compatibility
  29119. const onOpenChange = vis => {
  29120. var _a, _b;
  29121. setOpen(noTitle ? false : vis);
  29122. if (!noTitle) {
  29123. (_a = props.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(props, vis);
  29124. (_b = props.onVisibleChange) === null || _b === void 0 ? void 0 : _b.call(props, vis);
  29125. }
  29126. };
  29127. const tooltipPlacements = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  29128. var _a, _b;
  29129. let mergedArrowPointAtCenter = arrowPointAtCenter;
  29130. if (typeof arrow === 'object') {
  29131. mergedArrowPointAtCenter = (_b = (_a = arrow.pointAtCenter) !== null && _a !== void 0 ? _a : arrow.arrowPointAtCenter) !== null && _b !== void 0 ? _b : arrowPointAtCenter;
  29132. }
  29133. return builtinPlacements || getPlacements({
  29134. arrowPointAtCenter: mergedArrowPointAtCenter,
  29135. autoAdjustOverflow,
  29136. arrowWidth: mergedShowArrow ? token.sizePopupArrow : 0,
  29137. borderRadius: token.borderRadius,
  29138. offset: token.marginXXS,
  29139. visibleFirst: true
  29140. });
  29141. }, [arrowPointAtCenter, arrow, builtinPlacements, token]);
  29142. const memoOverlay = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  29143. if (title === 0) {
  29144. return title;
  29145. }
  29146. return overlay || title || '';
  29147. }, [overlay, title]);
  29148. const memoOverlayWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  29149. space: true
  29150. }, typeof memoOverlay === 'function' ? memoOverlay() : memoOverlay);
  29151. const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
  29152. const rootPrefixCls = getPrefixCls();
  29153. const injectFromPopover = props['data-popover-inject'];
  29154. let tempOpen = open;
  29155. // Hide tooltip when there is no title
  29156. if (!('open' in props) && !('visible' in props) && noTitle) {
  29157. tempOpen = false;
  29158. }
  29159. // ============================= Render =============================
  29160. const child = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children) && !(0,reactNode.isFragment)(children) ? children : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children);
  29161. const childProps = child.props;
  29162. const childCls = !childProps.className || typeof childProps.className === 'string' ? classnames_default()(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;
  29163. // Style
  29164. const [wrapCSSVar, hashId, cssVarCls] = (0,tooltip_style["default"])(prefixCls, !injectFromPopover);
  29165. // Color
  29166. const colorInfo = parseColor(prefixCls, color);
  29167. const arrowContentStyle = colorInfo.arrowStyle;
  29168. const rootClassNames = classnames_default()(overlayClassName, {
  29169. [`${prefixCls}-rtl`]: direction === 'rtl'
  29170. }, colorInfo.className, rootClassName, hashId, cssVarCls, contextClassName, contextClassNames.root, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.root);
  29171. const bodyClassNames = classnames_default()(contextClassNames.body, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.body);
  29172. // ============================ zIndex ============================
  29173. const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Tooltip', restProps.zIndex);
  29174. const content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tooltip_es, Object.assign({}, restProps, {
  29175. zIndex: zIndex,
  29176. showArrow: mergedShowArrow,
  29177. placement: placement,
  29178. mouseEnterDelay: mouseEnterDelay,
  29179. mouseLeaveDelay: mouseLeaveDelay,
  29180. prefixCls: prefixCls,
  29181. classNames: {
  29182. root: rootClassNames,
  29183. body: bodyClassNames
  29184. },
  29185. styles: {
  29186. root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, arrowContentStyle), contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
  29187. body: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.body), overlayInnerStyle), styles === null || styles === void 0 ? void 0 : styles.body), colorInfo.overlayStyle)
  29188. },
  29189. getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,
  29190. ref: tooltipRef,
  29191. builtinPlacements: tooltipPlacements,
  29192. overlay: memoOverlayWrapper,
  29193. visible: tempOpen,
  29194. onVisibleChange: onOpenChange,
  29195. afterVisibleChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,
  29196. arrowContent: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29197. className: `${prefixCls}-arrow-content`
  29198. }),
  29199. motion: {
  29200. motionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom-big-fast', props.transitionName),
  29201. motionDeadline: 1000
  29202. },
  29203. // TODO: In the future, destroyTooltipOnHide in rc-tooltip needs to be upgrade to destroyOnHidden
  29204. destroyTooltipOnHide: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : !!destroyTooltipOnHide
  29205. }), tempOpen ? (0,reactNode.cloneElement)(child, {
  29206. className: childCls
  29207. }) : child);
  29208. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
  29209. value: contextZIndex
  29210. }, content));
  29211. });
  29212. const tooltip_Tooltip = InternalTooltip;
  29213. if (true) {
  29214. tooltip_Tooltip.displayName = 'Tooltip';
  29215. }
  29216. tooltip_Tooltip._InternalPanelDoNotUseOrYouWillBeFired = tooltip_PurePanel;
  29217. /* harmony default export */ var components_tooltip = (tooltip_Tooltip);
  29218. // EXTERNAL MODULE: ./components/popover/style/index.ts
  29219. var popover_style = __webpack_require__("./components/popover/style/index.ts");
  29220. ;// ./components/popover/PurePanel.tsx
  29221. var popover_PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  29222. var t = {};
  29223. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  29224. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  29225. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  29226. }
  29227. return t;
  29228. };
  29229. const Overlay = ({
  29230. title,
  29231. content,
  29232. prefixCls
  29233. }) => {
  29234. if (!title && !content) {
  29235. return null;
  29236. }
  29237. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29238. className: `${prefixCls}-title`
  29239. }, title), content && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29240. className: `${prefixCls}-inner-content`
  29241. }, content));
  29242. };
  29243. const RawPurePanel = props => {
  29244. const {
  29245. hashId,
  29246. prefixCls,
  29247. className,
  29248. style,
  29249. placement = 'top',
  29250. title,
  29251. content,
  29252. children
  29253. } = props;
  29254. const titleNode = getRenderPropValue(title);
  29255. const contentNode = getRenderPropValue(content);
  29256. const cls = classnames_default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className);
  29257. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29258. className: cls,
  29259. style: style
  29260. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29261. className: `${prefixCls}-arrow`
  29262. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Popup_Popup, Object.assign({}, props, {
  29263. className: hashId,
  29264. prefixCls: prefixCls
  29265. }), children || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Overlay, {
  29266. prefixCls: prefixCls,
  29267. title: titleNode,
  29268. content: contentNode
  29269. })));
  29270. };
  29271. const popover_PurePanel_PurePanel = props => {
  29272. const {
  29273. prefixCls: customizePrefixCls,
  29274. className
  29275. } = props,
  29276. restProps = popover_PurePanel_rest(props, ["prefixCls", "className"]);
  29277. const {
  29278. getPrefixCls
  29279. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29280. const prefixCls = getPrefixCls('popover', customizePrefixCls);
  29281. const [wrapCSSVar, hashId, cssVarCls] = (0,popover_style["default"])(prefixCls);
  29282. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RawPurePanel, Object.assign({}, restProps, {
  29283. prefixCls: prefixCls,
  29284. hashId: hashId,
  29285. className: classnames_default()(className, cssVarCls)
  29286. })));
  29287. };
  29288. /* harmony default export */ var popover_PurePanel = (popover_PurePanel_PurePanel);
  29289. ;// ./components/popover/index.tsx
  29290. var popover_rest = undefined && undefined.__rest || function (s, e) {
  29291. var t = {};
  29292. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  29293. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  29294. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  29295. }
  29296. return t;
  29297. };
  29298. // CSSINJS
  29299. const InternalPopover = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  29300. var _a, _b;
  29301. const {
  29302. prefixCls: customizePrefixCls,
  29303. title,
  29304. content,
  29305. overlayClassName,
  29306. placement = 'top',
  29307. trigger = 'hover',
  29308. children,
  29309. mouseEnterDelay = 0.1,
  29310. mouseLeaveDelay = 0.1,
  29311. onOpenChange,
  29312. overlayStyle = {},
  29313. styles,
  29314. classNames: popoverClassNames
  29315. } = props,
  29316. otherProps = popover_rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle", "styles", "classNames"]);
  29317. const {
  29318. getPrefixCls,
  29319. className: contextClassName,
  29320. style: contextStyle,
  29321. classNames: contextClassNames,
  29322. styles: contextStyles
  29323. } = (0,config_provider_context.useComponentConfig)('popover');
  29324. const prefixCls = getPrefixCls('popover', customizePrefixCls);
  29325. const [wrapCSSVar, hashId, cssVarCls] = (0,popover_style["default"])(prefixCls);
  29326. const rootPrefixCls = getPrefixCls();
  29327. const rootClassNames = classnames_default()(overlayClassName, hashId, cssVarCls, contextClassName, contextClassNames.root, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.root);
  29328. const bodyClassNames = classnames_default()(contextClassNames.body, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.body);
  29329. const [open, setOpen] = (0,useMergedState["default"])(false, {
  29330. value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,
  29331. defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible
  29332. });
  29333. const settingOpen = (value, e) => {
  29334. setOpen(value, true);
  29335. onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);
  29336. };
  29337. const onKeyDown = e => {
  29338. if (e.keyCode === KeyCode["default"].ESC) {
  29339. settingOpen(false, e);
  29340. }
  29341. };
  29342. const onInternalOpenChange = value => {
  29343. settingOpen(value);
  29344. };
  29345. const titleNode = getRenderPropValue(title);
  29346. const contentNode = getRenderPropValue(content);
  29347. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({
  29348. placement: placement,
  29349. trigger: trigger,
  29350. mouseEnterDelay: mouseEnterDelay,
  29351. mouseLeaveDelay: mouseLeaveDelay
  29352. }, otherProps, {
  29353. prefixCls: prefixCls,
  29354. classNames: {
  29355. root: rootClassNames,
  29356. body: bodyClassNames
  29357. },
  29358. styles: {
  29359. root: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
  29360. body: Object.assign(Object.assign({}, contextStyles.body), styles === null || styles === void 0 ? void 0 : styles.body)
  29361. },
  29362. ref: ref,
  29363. open: open,
  29364. onOpenChange: onInternalOpenChange,
  29365. overlay: titleNode || contentNode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Overlay, {
  29366. prefixCls: prefixCls,
  29367. title: titleNode,
  29368. content: contentNode
  29369. })) : null,
  29370. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
  29371. "data-popover-inject": true
  29372. }), (0,reactNode.cloneElement)(children, {
  29373. onKeyDown: e => {
  29374. var _a, _b;
  29375. if (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
  29376. (_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
  29377. }
  29378. onKeyDown(e);
  29379. }
  29380. })));
  29381. });
  29382. const Popover = InternalPopover;
  29383. Popover._InternalPanelDoNotUseOrYouWillBeFired = popover_PurePanel;
  29384. if (true) {
  29385. Popover.displayName = 'Popover';
  29386. }
  29387. /* harmony default export */ var popover = (Popover);
  29388. ;// ./components/avatar/AvatarGroup.tsx
  29389. const AvatarContextProvider = props => {
  29390. const {
  29391. size,
  29392. shape
  29393. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(avatar_AvatarContext);
  29394. const avatarContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  29395. size: props.size || size,
  29396. shape: props.shape || shape
  29397. }), [props.size, props.shape, size, shape]);
  29398. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(avatar_AvatarContext.Provider, {
  29399. value: avatarContextValue
  29400. }, props.children);
  29401. };
  29402. const AvatarGroup = props => {
  29403. var _a, _b, _c, _d;
  29404. const {
  29405. getPrefixCls,
  29406. direction
  29407. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29408. const {
  29409. prefixCls: customizePrefixCls,
  29410. className,
  29411. rootClassName,
  29412. style,
  29413. maxCount,
  29414. maxStyle,
  29415. size,
  29416. shape,
  29417. maxPopoverPlacement,
  29418. maxPopoverTrigger,
  29419. children,
  29420. max
  29421. } = props;
  29422. if (true) {
  29423. const warning = (0,_util_warning.devUseWarning)('Avatar.Group');
  29424. [['maxCount', 'max={{ count: number }}'], ['maxStyle', 'max={{ style: CSSProperties }}'], ['maxPopoverPlacement', 'max={{ popover: PopoverProps }}'], ['maxPopoverTrigger', 'max={{ popover: PopoverProps }}']].forEach(([deprecatedName, newName]) => {
  29425. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  29426. });
  29427. }
  29428. const prefixCls = getPrefixCls('avatar', customizePrefixCls);
  29429. const groupPrefixCls = `${prefixCls}-group`;
  29430. const rootCls = hooks_useCSSVarCls(prefixCls);
  29431. const [wrapCSSVar, hashId, cssVarCls] = (0,avatar_style["default"])(prefixCls, rootCls);
  29432. const cls = classnames_default()(groupPrefixCls, {
  29433. [`${groupPrefixCls}-rtl`]: direction === 'rtl'
  29434. }, cssVarCls, rootCls, className, rootClassName, hashId);
  29435. const childrenWithProps = (0,toArray["default"])(children).map((child, index) => (0,reactNode.cloneElement)(child, {
  29436. // eslint-disable-next-line react/no-array-index-key
  29437. key: `avatar-key-${index}`
  29438. }));
  29439. const mergeCount = (max === null || max === void 0 ? void 0 : max.count) || maxCount;
  29440. const numOfChildren = childrenWithProps.length;
  29441. if (mergeCount && mergeCount < numOfChildren) {
  29442. const childrenShow = childrenWithProps.slice(0, mergeCount);
  29443. const childrenHidden = childrenWithProps.slice(mergeCount, numOfChildren);
  29444. const mergeStyle = (max === null || max === void 0 ? void 0 : max.style) || maxStyle;
  29445. const mergePopoverTrigger = ((_a = max === null || max === void 0 ? void 0 : max.popover) === null || _a === void 0 ? void 0 : _a.trigger) || maxPopoverTrigger || 'hover';
  29446. const mergePopoverPlacement = ((_b = max === null || max === void 0 ? void 0 : max.popover) === null || _b === void 0 ? void 0 : _b.placement) || maxPopoverPlacement || 'top';
  29447. const mergeProps = Object.assign(Object.assign({
  29448. content: childrenHidden
  29449. }, max === null || max === void 0 ? void 0 : max.popover), {
  29450. classNames: {
  29451. root: classnames_default()(`${groupPrefixCls}-popover`, (_d = (_c = max === null || max === void 0 ? void 0 : max.popover) === null || _c === void 0 ? void 0 : _c.classNames) === null || _d === void 0 ? void 0 : _d.root)
  29452. },
  29453. placement: mergePopoverPlacement,
  29454. trigger: mergePopoverTrigger
  29455. });
  29456. childrenShow.push(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(popover, Object.assign({
  29457. key: "avatar-popover-key",
  29458. destroyOnHidden: true
  29459. }, mergeProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(avatar_Avatar, {
  29460. style: mergeStyle
  29461. }, `+${numOfChildren - mergeCount}`)));
  29462. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AvatarContextProvider, {
  29463. shape: shape,
  29464. size: size
  29465. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29466. className: cls,
  29467. style: style
  29468. }, childrenShow)));
  29469. }
  29470. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AvatarContextProvider, {
  29471. shape: shape,
  29472. size: size
  29473. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29474. className: cls,
  29475. style: style
  29476. }, childrenWithProps)));
  29477. };
  29478. /* harmony default export */ var avatar_AvatarGroup = (AvatarGroup);
  29479. ;// ./components/avatar/index.tsx
  29480. const components_avatar_Avatar = avatar_Avatar;
  29481. components_avatar_Avatar.Group = avatar_AvatarGroup;
  29482. /* harmony default export */ var avatar = (components_avatar_Avatar);
  29483. ;// ./node_modules/@ant-design/icons-svg/es/asn/VerticalAlignTopOutlined.js
  29484. // This icon file is generated automatically.
  29485. var VerticalAlignTopOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z" } }] }, "name": "vertical-align-top", "theme": "outlined" };
  29486. /* harmony default export */ var asn_VerticalAlignTopOutlined = (VerticalAlignTopOutlined);
  29487. ;// ./node_modules/@ant-design/icons/es/icons/VerticalAlignTopOutlined.js
  29488. // GENERATE BY ./scripts/generate.ts
  29489. // DON NOT EDIT IT MANUALLY
  29490. var VerticalAlignTopOutlined_VerticalAlignTopOutlined = function VerticalAlignTopOutlined(props, ref) {
  29491. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  29492. ref: ref,
  29493. icon: asn_VerticalAlignTopOutlined
  29494. }));
  29495. };
  29496. /**![vertical-align-top](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg1OS45IDE2OEgxNjQuMWMtNC41IDAtOC4xIDMuNi04LjEgOHY2MGMwIDQuNCAzLjYgOCA4LjEgOGg2OTUuOGM0LjUgMCA4LjEtMy42IDguMS04di02MGMwLTQuNC0zLjYtOC04LjEtOHpNNTE4LjMgMzU1YTggOCAwIDAwLTEyLjYgMGwtMTEyIDE0MS43YTcuOTggNy45OCAwIDAwNi4zIDEyLjloNzMuOVY4NDhjMCA0LjQgMy42IDggOCA4aDYwYzQuNCAwIDgtMy42IDgtOFY1MDkuN0g2MjRjNi43IDAgMTAuNC03LjcgNi4zLTEyLjlMNTE4LjMgMzU1eiIgLz48L3N2Zz4=) */
  29497. var VerticalAlignTopOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(VerticalAlignTopOutlined_VerticalAlignTopOutlined);
  29498. if (true) {
  29499. VerticalAlignTopOutlined_RefIcon.displayName = 'VerticalAlignTopOutlined';
  29500. }
  29501. /* harmony default export */ var icons_VerticalAlignTopOutlined = (VerticalAlignTopOutlined_RefIcon);
  29502. // EXTERNAL MODULE: ./components/back-top/style/index.ts
  29503. var back_top_style = __webpack_require__("./components/back-top/style/index.ts");
  29504. ;// ./components/back-top/index.tsx
  29505. const BackTop = props => {
  29506. const {
  29507. prefixCls: customizePrefixCls,
  29508. className,
  29509. rootClassName,
  29510. visibilityHeight = 400,
  29511. target,
  29512. onClick,
  29513. duration = 450
  29514. } = props;
  29515. const [visible, setVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(visibilityHeight === 0);
  29516. const ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  29517. const getDefaultTarget = () => {
  29518. var _a;
  29519. return ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window;
  29520. };
  29521. const handleScroll = _util_throttleByAnimationFrame(e => {
  29522. const scrollTop = _util_getScroll(e.target);
  29523. setVisible(scrollTop >= visibilityHeight);
  29524. });
  29525. if (true) {
  29526. const warning = (0,_util_warning.devUseWarning)('BackTop');
  29527. warning.deprecated(false, 'BackTop', 'FloatButton.BackTop');
  29528. }
  29529. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  29530. const getTarget = target || getDefaultTarget;
  29531. const container = getTarget();
  29532. handleScroll({
  29533. target: container
  29534. });
  29535. container === null || container === void 0 ? void 0 : container.addEventListener('scroll', handleScroll);
  29536. return () => {
  29537. handleScroll.cancel();
  29538. container === null || container === void 0 ? void 0 : container.removeEventListener('scroll', handleScroll);
  29539. };
  29540. }, [target]);
  29541. const scrollToTop = e => {
  29542. scrollTo(0, {
  29543. getContainer: target || getDefaultTarget,
  29544. duration
  29545. });
  29546. onClick === null || onClick === void 0 ? void 0 : onClick(e);
  29547. };
  29548. const {
  29549. getPrefixCls,
  29550. direction
  29551. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29552. const prefixCls = getPrefixCls('back-top', customizePrefixCls);
  29553. const rootPrefixCls = getPrefixCls();
  29554. const [wrapCSSVar, hashId, cssVarCls] = (0,back_top_style["default"])(prefixCls);
  29555. const classString = classnames_default()(hashId, cssVarCls, prefixCls, {
  29556. [`${prefixCls}-rtl`]: direction === 'rtl'
  29557. }, className, rootClassName);
  29558. // fix https://fb.me/react-unknown-prop
  29559. const divProps = (0,omit["default"])(props, ['prefixCls', 'className', 'rootClassName', 'children', 'visibilityHeight', 'target']);
  29560. const defaultElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29561. className: `${prefixCls}-content`
  29562. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29563. className: `${prefixCls}-icon`
  29564. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_VerticalAlignTopOutlined, null)));
  29565. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, divProps, {
  29566. className: classString,
  29567. onClick: scrollToTop,
  29568. ref: ref
  29569. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  29570. visible: visible,
  29571. motionName: `${rootPrefixCls}-fade`
  29572. }, ({
  29573. className: motionClassName
  29574. }) => (0,reactNode.cloneElement)(props.children || defaultElement, ({
  29575. className: cloneCls
  29576. }) => ({
  29577. className: classnames_default()(motionClassName, cloneCls)
  29578. })))));
  29579. };
  29580. if (true) {
  29581. BackTop.displayName = 'BackTop';
  29582. }
  29583. /* harmony default export */ var back_top = (BackTop);
  29584. // EXTERNAL MODULE: ./components/badge/style/index.ts
  29585. var badge_style = __webpack_require__("./components/badge/style/index.ts");
  29586. // EXTERNAL MODULE: ./components/theme/util/genPresetColor.ts
  29587. var genPresetColor = __webpack_require__("./components/theme/util/genPresetColor.ts");
  29588. ;// ./components/badge/style/ribbon.ts
  29589. // ============================== Ribbon ==============================
  29590. const genRibbonStyle = token => {
  29591. const {
  29592. antCls,
  29593. badgeFontHeight,
  29594. marginXS,
  29595. badgeRibbonOffset,
  29596. calc
  29597. } = token;
  29598. const ribbonPrefixCls = `${antCls}-ribbon`;
  29599. const ribbonWrapperPrefixCls = `${antCls}-ribbon-wrapper`;
  29600. const statusRibbonPreset = (0,genPresetColor["default"])(token, (colorKey, {
  29601. darkColor
  29602. }) => ({
  29603. [`&${ribbonPrefixCls}-color-${colorKey}`]: {
  29604. background: darkColor,
  29605. color: darkColor
  29606. }
  29607. }));
  29608. return {
  29609. [ribbonWrapperPrefixCls]: {
  29610. position: 'relative'
  29611. },
  29612. [ribbonPrefixCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), {
  29613. position: 'absolute',
  29614. top: marginXS,
  29615. padding: `0 ${(0,cssinjs.unit)(token.paddingXS)}`,
  29616. color: token.colorPrimary,
  29617. lineHeight: (0,cssinjs.unit)(badgeFontHeight),
  29618. whiteSpace: 'nowrap',
  29619. backgroundColor: token.colorPrimary,
  29620. borderRadius: token.borderRadiusSM,
  29621. [`${ribbonPrefixCls}-text`]: {
  29622. color: token.badgeTextColor
  29623. },
  29624. [`${ribbonPrefixCls}-corner`]: {
  29625. position: 'absolute',
  29626. top: '100%',
  29627. width: badgeRibbonOffset,
  29628. height: badgeRibbonOffset,
  29629. color: 'currentcolor',
  29630. border: `${(0,cssinjs.unit)(calc(badgeRibbonOffset).div(2).equal())} solid`,
  29631. transform: token.badgeRibbonCornerTransform,
  29632. transformOrigin: 'top',
  29633. filter: token.badgeRibbonCornerFilter
  29634. }
  29635. }), statusRibbonPreset), {
  29636. [`&${ribbonPrefixCls}-placement-end`]: {
  29637. insetInlineEnd: calc(badgeRibbonOffset).mul(-1).equal(),
  29638. borderEndEndRadius: 0,
  29639. [`${ribbonPrefixCls}-corner`]: {
  29640. insetInlineEnd: 0,
  29641. borderInlineEndColor: 'transparent',
  29642. borderBlockEndColor: 'transparent'
  29643. }
  29644. },
  29645. [`&${ribbonPrefixCls}-placement-start`]: {
  29646. insetInlineStart: calc(badgeRibbonOffset).mul(-1).equal(),
  29647. borderEndStartRadius: 0,
  29648. [`${ribbonPrefixCls}-corner`]: {
  29649. insetInlineStart: 0,
  29650. borderBlockEndColor: 'transparent',
  29651. borderInlineStartColor: 'transparent'
  29652. }
  29653. },
  29654. // ====================== RTL =======================
  29655. '&-rtl': {
  29656. direction: 'rtl'
  29657. }
  29658. })
  29659. };
  29660. };
  29661. // ============================== Export ==============================
  29662. /* harmony default export */ var ribbon = ((0,genStyleUtils.genStyleHooks)(['Badge', 'Ribbon'], token => {
  29663. const badgeToken = (0,badge_style.prepareToken)(token);
  29664. return genRibbonStyle(badgeToken);
  29665. }, badge_style.prepareComponentToken));
  29666. ;// ./components/badge/Ribbon.tsx
  29667. const Ribbon = props => {
  29668. const {
  29669. className,
  29670. prefixCls: customizePrefixCls,
  29671. style,
  29672. color,
  29673. children,
  29674. text,
  29675. placement = 'end',
  29676. rootClassName
  29677. } = props;
  29678. const {
  29679. getPrefixCls,
  29680. direction
  29681. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29682. const prefixCls = getPrefixCls('ribbon', customizePrefixCls);
  29683. const wrapperCls = `${prefixCls}-wrapper`;
  29684. const [wrapCSSVar, hashId, cssVarCls] = ribbon(prefixCls, wrapperCls);
  29685. const colorInPreset = isPresetColor(color, false);
  29686. const ribbonCls = classnames_default()(prefixCls, `${prefixCls}-placement-${placement}`, {
  29687. [`${prefixCls}-rtl`]: direction === 'rtl',
  29688. [`${prefixCls}-color-${color}`]: colorInPreset
  29689. }, className);
  29690. const colorStyle = {};
  29691. const cornerColorStyle = {};
  29692. if (color && !colorInPreset) {
  29693. colorStyle.background = color;
  29694. cornerColorStyle.color = color;
  29695. }
  29696. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29697. className: classnames_default()(wrapperCls, rootClassName, hashId, cssVarCls)
  29698. }, children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29699. className: classnames_default()(ribbonCls, hashId),
  29700. style: Object.assign(Object.assign({}, colorStyle), style)
  29701. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29702. className: `${prefixCls}-text`
  29703. }, text), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  29704. className: `${prefixCls}-corner`,
  29705. style: cornerColorStyle
  29706. }))));
  29707. };
  29708. if (true) {
  29709. Ribbon.displayName = 'Ribbon';
  29710. }
  29711. /* harmony default export */ var badge_Ribbon = (Ribbon);
  29712. ;// ./components/badge/SingleNumber.tsx
  29713. const UnitNumber = props => {
  29714. const {
  29715. prefixCls,
  29716. value,
  29717. current,
  29718. offset = 0
  29719. } = props;
  29720. let style;
  29721. if (offset) {
  29722. style = {
  29723. position: 'absolute',
  29724. top: `${offset}00%`,
  29725. left: 0
  29726. };
  29727. }
  29728. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29729. style: style,
  29730. className: classnames_default()(`${prefixCls}-only-unit`, {
  29731. current
  29732. })
  29733. }, value);
  29734. };
  29735. function getOffset(start, end, unit) {
  29736. let index = start;
  29737. let offset = 0;
  29738. while ((index + 10) % 10 !== end) {
  29739. index += unit;
  29740. offset += unit;
  29741. }
  29742. return offset;
  29743. }
  29744. const SingleNumber = props => {
  29745. const {
  29746. prefixCls,
  29747. count: originCount,
  29748. value: originValue
  29749. } = props;
  29750. const value = Number(originValue);
  29751. const count = Math.abs(originCount);
  29752. const [prevValue, setPrevValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value);
  29753. const [prevCount, setPrevCount] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(count);
  29754. // ============================= Events =============================
  29755. const onTransitionEnd = () => {
  29756. setPrevValue(value);
  29757. setPrevCount(count);
  29758. };
  29759. // Fallback if transition events are not supported
  29760. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  29761. const timer = setTimeout(onTransitionEnd, 1000);
  29762. return () => clearTimeout(timer);
  29763. }, [value]);
  29764. // ============================= Render =============================
  29765. // Render unit list
  29766. let unitNodes;
  29767. let offsetStyle;
  29768. if (prevValue === value || Number.isNaN(value) || Number.isNaN(prevValue)) {
  29769. // Nothing to change
  29770. unitNodes = [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UnitNumber, Object.assign({}, props, {
  29771. key: value,
  29772. current: true
  29773. }))];
  29774. offsetStyle = {
  29775. transition: 'none'
  29776. };
  29777. } else {
  29778. unitNodes = [];
  29779. // Fill basic number units
  29780. const end = value + 10;
  29781. const unitNumberList = [];
  29782. for (let index = value; index <= end; index += 1) {
  29783. unitNumberList.push(index);
  29784. }
  29785. const unit = prevCount < count ? 1 : -1;
  29786. // Fill with number unit nodes
  29787. const prevIndex = unitNumberList.findIndex(n => n % 10 === prevValue);
  29788. // Cut list
  29789. const cutUnitNumberList = unit < 0 ? unitNumberList.slice(0, prevIndex + 1) : unitNumberList.slice(prevIndex);
  29790. unitNodes = cutUnitNumberList.map((n, index) => {
  29791. const singleUnit = n % 10;
  29792. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UnitNumber, Object.assign({}, props, {
  29793. key: n,
  29794. value: singleUnit,
  29795. offset: unit < 0 ? index - prevIndex : index,
  29796. current: index === prevIndex
  29797. }));
  29798. });
  29799. // Calculate container offset value
  29800. offsetStyle = {
  29801. transform: `translateY(${-getOffset(prevValue, value, unit)}00%)`
  29802. };
  29803. }
  29804. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29805. className: `${prefixCls}-only`,
  29806. style: offsetStyle,
  29807. onTransitionEnd: onTransitionEnd
  29808. }, unitNodes);
  29809. };
  29810. /* harmony default export */ var badge_SingleNumber = (SingleNumber);
  29811. ;// ./components/badge/ScrollNumber.tsx
  29812. var ScrollNumber_rest = undefined && undefined.__rest || function (s, e) {
  29813. var t = {};
  29814. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  29815. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  29816. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  29817. }
  29818. return t;
  29819. };
  29820. const ScrollNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  29821. const {
  29822. prefixCls: customizePrefixCls,
  29823. count,
  29824. className,
  29825. motionClassName,
  29826. style,
  29827. title,
  29828. show,
  29829. component: Component = 'sup',
  29830. children
  29831. } = props,
  29832. restProps = ScrollNumber_rest(props, ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"]);
  29833. const {
  29834. getPrefixCls
  29835. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29836. const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
  29837. // ============================ Render ============================
  29838. const newProps = Object.assign(Object.assign({}, restProps), {
  29839. 'data-show': show,
  29840. style,
  29841. className: classnames_default()(prefixCls, className, motionClassName),
  29842. title: title
  29843. });
  29844. // Only integer need motion
  29845. let numberNodes = count;
  29846. if (count && Number(count) % 1 === 0) {
  29847. const numberList = String(count).split('');
  29848. numberNodes = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("bdi", null, numberList.map((num, i) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(badge_SingleNumber, {
  29849. prefixCls: prefixCls,
  29850. count: Number(count),
  29851. value: num,
  29852. // eslint-disable-next-line react/no-array-index-key
  29853. key: numberList.length - i
  29854. }))));
  29855. }
  29856. // allow specify the border
  29857. // mock border-color by box-shadow for compatible with old usage:
  29858. // <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
  29859. if (style === null || style === void 0 ? void 0 : style.borderColor) {
  29860. newProps.style = Object.assign(Object.assign({}, style), {
  29861. boxShadow: `0 0 0 1px ${style.borderColor} inset`
  29862. });
  29863. }
  29864. if (children) {
  29865. return (0,reactNode.cloneElement)(children, oriProps => ({
  29866. className: classnames_default()(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)
  29867. }));
  29868. }
  29869. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({}, newProps, {
  29870. ref: ref
  29871. }), numberNodes);
  29872. });
  29873. /* harmony default export */ var badge_ScrollNumber = (ScrollNumber);
  29874. ;// ./components/badge/index.tsx
  29875. var badge_rest = undefined && undefined.__rest || function (s, e) {
  29876. var t = {};
  29877. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  29878. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  29879. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  29880. }
  29881. return t;
  29882. };
  29883. const InternalBadge = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  29884. var _a, _b, _c, _d, _e;
  29885. const {
  29886. prefixCls: customizePrefixCls,
  29887. scrollNumberPrefixCls: customizeScrollNumberPrefixCls,
  29888. children,
  29889. status,
  29890. text,
  29891. color,
  29892. count = null,
  29893. overflowCount = 99,
  29894. dot = false,
  29895. size = 'default',
  29896. title,
  29897. offset,
  29898. style,
  29899. className,
  29900. rootClassName,
  29901. classNames,
  29902. styles,
  29903. showZero = false
  29904. } = props,
  29905. restProps = badge_rest(props, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "rootClassName", "classNames", "styles", "showZero"]);
  29906. const {
  29907. getPrefixCls,
  29908. direction,
  29909. badge
  29910. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  29911. const prefixCls = getPrefixCls('badge', customizePrefixCls);
  29912. const [wrapCSSVar, hashId, cssVarCls] = (0,badge_style["default"])(prefixCls);
  29913. // ================================ Misc ================================
  29914. const numberedDisplayCount = count > overflowCount ? `${overflowCount}+` : count;
  29915. const isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0 || text === '0' || text === 0;
  29916. const ignoreCount = count === null || isZero && !showZero;
  29917. const hasStatus = (status !== null && status !== undefined || color !== null && color !== undefined) && ignoreCount;
  29918. const hasStatusValue = status !== null && status !== undefined || !isZero;
  29919. const showAsDot = dot && !isZero;
  29920. const mergedCount = showAsDot ? '' : numberedDisplayCount;
  29921. const isHidden = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  29922. const isEmpty = (mergedCount === null || mergedCount === undefined || mergedCount === '') && (text === undefined || text === null || text === '');
  29923. return (isEmpty || isZero && !showZero) && !showAsDot;
  29924. }, [mergedCount, isZero, showZero, showAsDot, text]);
  29925. // Count should be cache in case hidden change it
  29926. const countRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(count);
  29927. if (!isHidden) {
  29928. countRef.current = count;
  29929. }
  29930. const livingCount = countRef.current;
  29931. // We need cache count since remove motion should not change count display
  29932. const displayCountRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(mergedCount);
  29933. if (!isHidden) {
  29934. displayCountRef.current = mergedCount;
  29935. }
  29936. const displayCount = displayCountRef.current;
  29937. // We will cache the dot status to avoid shaking on leaved motion
  29938. const isDotRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(showAsDot);
  29939. if (!isHidden) {
  29940. isDotRef.current = showAsDot;
  29941. }
  29942. // =============================== Styles ===============================
  29943. const mergedStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  29944. if (!offset) {
  29945. return Object.assign(Object.assign({}, badge === null || badge === void 0 ? void 0 : badge.style), style);
  29946. }
  29947. const offsetStyle = {
  29948. marginTop: offset[1]
  29949. };
  29950. if (direction === 'rtl') {
  29951. offsetStyle.left = parseInt(offset[0], 10);
  29952. } else {
  29953. offsetStyle.right = -parseInt(offset[0], 10);
  29954. }
  29955. return Object.assign(Object.assign(Object.assign({}, offsetStyle), badge === null || badge === void 0 ? void 0 : badge.style), style);
  29956. }, [direction, offset, style, badge === null || badge === void 0 ? void 0 : badge.style]);
  29957. // =============================== Render ===============================
  29958. // >>> Title
  29959. const titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined;
  29960. // >>> Status Text
  29961. const showStatusTextNode = !isHidden && (text === 0 ? showZero : !!text && text !== true);
  29962. const statusTextNode = !showStatusTextNode ? null : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29963. className: `${prefixCls}-status-text`
  29964. }, text));
  29965. // >>> Display Component
  29966. const displayNode = !livingCount || typeof livingCount !== 'object' ? undefined : (0,reactNode.cloneElement)(livingCount, oriProps => ({
  29967. style: Object.assign(Object.assign({}, mergedStyle), oriProps.style)
  29968. }));
  29969. // InternalColor
  29970. const isInternalColor = isPresetColor(color, false);
  29971. // Shared styles
  29972. const statusCls = classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.indicator, (_a = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _a === void 0 ? void 0 : _a.indicator, {
  29973. [`${prefixCls}-status-dot`]: hasStatus,
  29974. [`${prefixCls}-status-${status}`]: !!status,
  29975. [`${prefixCls}-color-${color}`]: isInternalColor
  29976. });
  29977. const statusStyle = {};
  29978. if (color && !isInternalColor) {
  29979. statusStyle.color = color;
  29980. statusStyle.background = color;
  29981. }
  29982. const badgeClassName = classnames_default()(prefixCls, {
  29983. [`${prefixCls}-status`]: hasStatus,
  29984. [`${prefixCls}-not-a-wrapper`]: !children,
  29985. [`${prefixCls}-rtl`]: direction === 'rtl'
  29986. }, className, rootClassName, badge === null || badge === void 0 ? void 0 : badge.className, (_b = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _b === void 0 ? void 0 : _b.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, hashId, cssVarCls);
  29987. // <Badge status="success" />
  29988. if (!children && hasStatus && (text || hasStatusValue || !ignoreCount)) {
  29989. const statusTextColor = mergedStyle.color;
  29990. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, restProps, {
  29991. className: badgeClassName,
  29992. style: Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.root), (_c = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _c === void 0 ? void 0 : _c.root), mergedStyle)
  29993. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29994. className: statusCls,
  29995. style: Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.indicator), (_d = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _d === void 0 ? void 0 : _d.indicator), statusStyle)
  29996. }), showStatusTextNode && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  29997. style: {
  29998. color: statusTextColor
  29999. },
  30000. className: `${prefixCls}-status-text`
  30001. }, text))));
  30002. }
  30003. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({
  30004. ref: ref
  30005. }, restProps, {
  30006. className: badgeClassName,
  30007. style: Object.assign(Object.assign({}, (_e = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _e === void 0 ? void 0 : _e.root), styles === null || styles === void 0 ? void 0 : styles.root)
  30008. }), children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  30009. visible: !isHidden,
  30010. motionName: `${prefixCls}-zoom`,
  30011. motionAppear: false,
  30012. motionDeadline: 1000
  30013. }, ({
  30014. className: motionClassName
  30015. }) => {
  30016. var _a, _b;
  30017. const scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);
  30018. const isDot = isDotRef.current;
  30019. const scrollNumberCls = classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.indicator, (_a = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _a === void 0 ? void 0 : _a.indicator, {
  30020. [`${prefixCls}-dot`]: isDot,
  30021. [`${prefixCls}-count`]: !isDot,
  30022. [`${prefixCls}-count-sm`]: size === 'small',
  30023. [`${prefixCls}-multiple-words`]: !isDot && displayCount && displayCount.toString().length > 1,
  30024. [`${prefixCls}-status-${status}`]: !!status,
  30025. [`${prefixCls}-color-${color}`]: isInternalColor
  30026. });
  30027. let scrollNumberStyle = Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.indicator), (_b = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _b === void 0 ? void 0 : _b.indicator), mergedStyle);
  30028. if (color && !isInternalColor) {
  30029. scrollNumberStyle = scrollNumberStyle || {};
  30030. scrollNumberStyle.background = color;
  30031. }
  30032. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(badge_ScrollNumber, {
  30033. prefixCls: scrollNumberPrefixCls,
  30034. show: !isHidden,
  30035. motionClassName: motionClassName,
  30036. className: scrollNumberCls,
  30037. count: displayCount,
  30038. title: titleNode,
  30039. style: scrollNumberStyle,
  30040. key: "scrollNumber"
  30041. }, displayNode);
  30042. }), statusTextNode));
  30043. });
  30044. const Badge = InternalBadge;
  30045. Badge.Ribbon = badge_Ribbon;
  30046. if (true) {
  30047. Badge.displayName = 'Badge';
  30048. }
  30049. /* harmony default export */ var components_badge = (Badge);
  30050. ;// ./node_modules/@ant-design/icons-svg/es/asn/LeftOutlined.js
  30051. // This icon file is generated automatically.
  30052. var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
  30053. /* harmony default export */ var asn_LeftOutlined = (LeftOutlined);
  30054. ;// ./node_modules/@ant-design/icons/es/icons/LeftOutlined.js
  30055. // GENERATE BY ./scripts/generate.ts
  30056. // DON NOT EDIT IT MANUALLY
  30057. var LeftOutlined_LeftOutlined = function LeftOutlined(props, ref) {
  30058. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  30059. ref: ref,
  30060. icon: asn_LeftOutlined
  30061. }));
  30062. };
  30063. /**![left](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcyNCAyMTguM1YxNDFjMC02LjctNy43LTEwLjQtMTIuOS02LjNMMjYwLjMgNDg2LjhhMzEuODYgMzEuODYgMCAwMDAgNTAuM2w0NTAuOCAzNTIuMWM1LjMgNC4xIDEyLjkuNCAxMi45LTYuM3YtNzcuM2MwLTQuOS0yLjMtOS42LTYuMS0xMi42bC0zNjAtMjgxIDM2MC0yODEuMWMzLjgtMyA2LjEtNy43IDYuMS0xMi42eiIgLz48L3N2Zz4=) */
  30064. var LeftOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(LeftOutlined_LeftOutlined);
  30065. if (true) {
  30066. LeftOutlined_RefIcon.displayName = 'LeftOutlined';
  30067. }
  30068. /* harmony default export */ var icons_LeftOutlined = (LeftOutlined_RefIcon);
  30069. // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
  30070. var RightOutlined = __webpack_require__("./node_modules/@ant-design/icons/es/icons/RightOutlined.js");
  30071. ;// ./node_modules/rc-dropdown/es/hooks/useAccessibility.js
  30072. var ESC = KeyCode["default"].ESC,
  30073. TAB = KeyCode["default"].TAB;
  30074. function useAccessibility(_ref) {
  30075. var visible = _ref.visible,
  30076. triggerRef = _ref.triggerRef,
  30077. onVisibleChange = _ref.onVisibleChange,
  30078. autoFocus = _ref.autoFocus,
  30079. overlayRef = _ref.overlayRef;
  30080. var focusMenuRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  30081. var handleCloseMenuAndReturnFocus = function handleCloseMenuAndReturnFocus() {
  30082. if (visible) {
  30083. var _triggerRef$current, _triggerRef$current$f;
  30084. (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || (_triggerRef$current$f = _triggerRef$current.focus) === null || _triggerRef$current$f === void 0 || _triggerRef$current$f.call(_triggerRef$current);
  30085. onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(false);
  30086. }
  30087. };
  30088. var focusMenu = function focusMenu() {
  30089. var _overlayRef$current;
  30090. if ((_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.focus) {
  30091. overlayRef.current.focus();
  30092. focusMenuRef.current = true;
  30093. return true;
  30094. }
  30095. return false;
  30096. };
  30097. var handleKeyDown = function handleKeyDown(event) {
  30098. switch (event.keyCode) {
  30099. case ESC:
  30100. handleCloseMenuAndReturnFocus();
  30101. break;
  30102. case TAB:
  30103. {
  30104. var focusResult = false;
  30105. if (!focusMenuRef.current) {
  30106. focusResult = focusMenu();
  30107. }
  30108. if (focusResult) {
  30109. event.preventDefault();
  30110. } else {
  30111. handleCloseMenuAndReturnFocus();
  30112. }
  30113. break;
  30114. }
  30115. }
  30116. };
  30117. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  30118. if (visible) {
  30119. window.addEventListener("keydown", handleKeyDown);
  30120. if (autoFocus) {
  30121. // FIXME: hack with raf
  30122. (0,raf["default"])(focusMenu, 3);
  30123. }
  30124. return function () {
  30125. window.removeEventListener("keydown", handleKeyDown);
  30126. focusMenuRef.current = false;
  30127. };
  30128. }
  30129. return function () {
  30130. focusMenuRef.current = false;
  30131. };
  30132. }, [visible]); // eslint-disable-line react-hooks/exhaustive-deps
  30133. }
  30134. ;// ./node_modules/rc-dropdown/es/Overlay.js
  30135. var Overlay_Overlay = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
  30136. var overlay = props.overlay,
  30137. arrow = props.arrow,
  30138. prefixCls = props.prefixCls;
  30139. var overlayNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  30140. var overlayElement;
  30141. if (typeof overlay === 'function') {
  30142. overlayElement = overlay();
  30143. } else {
  30144. overlayElement = overlay;
  30145. }
  30146. return overlayElement;
  30147. }, [overlay]);
  30148. var composedRef = (0,es_ref.composeRef)(ref, (0,es_ref.getNodeRef)(overlayNode));
  30149. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, arrow && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  30150. className: "".concat(prefixCls, "-arrow")
  30151. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(overlayNode, {
  30152. ref: (0,es_ref.supportRef)(overlayNode) ? composedRef : undefined
  30153. }));
  30154. });
  30155. /* harmony default export */ var es_Overlay = (Overlay_Overlay);
  30156. ;// ./node_modules/rc-dropdown/es/placements.js
  30157. var autoAdjustOverflow = {
  30158. adjustX: 1,
  30159. adjustY: 1
  30160. };
  30161. var placements_targetOffset = [0, 0];
  30162. var placements_placements = {
  30163. topLeft: {
  30164. points: ['bl', 'tl'],
  30165. overflow: autoAdjustOverflow,
  30166. offset: [0, -4],
  30167. targetOffset: placements_targetOffset
  30168. },
  30169. top: {
  30170. points: ['bc', 'tc'],
  30171. overflow: autoAdjustOverflow,
  30172. offset: [0, -4],
  30173. targetOffset: placements_targetOffset
  30174. },
  30175. topRight: {
  30176. points: ['br', 'tr'],
  30177. overflow: autoAdjustOverflow,
  30178. offset: [0, -4],
  30179. targetOffset: placements_targetOffset
  30180. },
  30181. bottomLeft: {
  30182. points: ['tl', 'bl'],
  30183. overflow: autoAdjustOverflow,
  30184. offset: [0, 4],
  30185. targetOffset: placements_targetOffset
  30186. },
  30187. bottom: {
  30188. points: ['tc', 'bc'],
  30189. overflow: autoAdjustOverflow,
  30190. offset: [0, 4],
  30191. targetOffset: placements_targetOffset
  30192. },
  30193. bottomRight: {
  30194. points: ['tr', 'br'],
  30195. overflow: autoAdjustOverflow,
  30196. offset: [0, 4],
  30197. targetOffset: placements_targetOffset
  30198. }
  30199. };
  30200. /* harmony default export */ var rc_dropdown_es_placements = (placements_placements);
  30201. ;// ./node_modules/rc-dropdown/es/Dropdown.js
  30202. var Dropdown_excluded = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
  30203. function Dropdown(props, ref) {
  30204. var _children$props;
  30205. var _props$arrow = props.arrow,
  30206. arrow = _props$arrow === void 0 ? false : _props$arrow,
  30207. _props$prefixCls = props.prefixCls,
  30208. prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls,
  30209. transitionName = props.transitionName,
  30210. animation = props.animation,
  30211. align = props.align,
  30212. _props$placement = props.placement,
  30213. placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
  30214. _props$placements = props.placements,
  30215. placements = _props$placements === void 0 ? rc_dropdown_es_placements : _props$placements,
  30216. getPopupContainer = props.getPopupContainer,
  30217. showAction = props.showAction,
  30218. hideAction = props.hideAction,
  30219. overlayClassName = props.overlayClassName,
  30220. overlayStyle = props.overlayStyle,
  30221. visible = props.visible,
  30222. _props$trigger = props.trigger,
  30223. trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
  30224. autoFocus = props.autoFocus,
  30225. overlay = props.overlay,
  30226. children = props.children,
  30227. onVisibleChange = props.onVisibleChange,
  30228. otherProps = (0,objectWithoutProperties["default"])(props, Dropdown_excluded);
  30229. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
  30230. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  30231. triggerVisible = _React$useState2[0],
  30232. setTriggerVisible = _React$useState2[1];
  30233. var mergedVisible = 'visible' in props ? visible : triggerVisible;
  30234. var triggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  30235. var overlayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  30236. var childRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  30237. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
  30238. return triggerRef.current;
  30239. });
  30240. var handleVisibleChange = function handleVisibleChange(newVisible) {
  30241. setTriggerVisible(newVisible);
  30242. onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(newVisible);
  30243. };
  30244. useAccessibility({
  30245. visible: mergedVisible,
  30246. triggerRef: childRef,
  30247. onVisibleChange: handleVisibleChange,
  30248. autoFocus: autoFocus,
  30249. overlayRef: overlayRef
  30250. });
  30251. var onClick = function onClick(e) {
  30252. var onOverlayClick = props.onOverlayClick;
  30253. setTriggerVisible(false);
  30254. if (onOverlayClick) {
  30255. onOverlayClick(e);
  30256. }
  30257. };
  30258. var getMenuElement = function getMenuElement() {
  30259. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Overlay, {
  30260. ref: overlayRef,
  30261. overlay: overlay,
  30262. prefixCls: prefixCls,
  30263. arrow: arrow
  30264. });
  30265. };
  30266. var getMenuElementOrLambda = function getMenuElementOrLambda() {
  30267. if (typeof overlay === 'function') {
  30268. return getMenuElement;
  30269. }
  30270. return getMenuElement();
  30271. };
  30272. var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() {
  30273. var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger,
  30274. alignPoint = props.alignPoint;
  30275. if ('minOverlayWidthMatchTrigger' in props) {
  30276. return minOverlayWidthMatchTrigger;
  30277. }
  30278. return !alignPoint;
  30279. };
  30280. var getOpenClassName = function getOpenClassName() {
  30281. var openClassName = props.openClassName;
  30282. if (openClassName !== undefined) {
  30283. return openClassName;
  30284. }
  30285. return "".concat(prefixCls, "-open");
  30286. };
  30287. var childrenNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
  30288. className: classnames_default()((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()),
  30289. ref: (0,es_ref.supportRef)(children) ? (0,es_ref.composeRef)(childRef, (0,es_ref.getNodeRef)(children)) : undefined
  30290. });
  30291. var triggerHideAction = hideAction;
  30292. if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
  30293. triggerHideAction = ['click'];
  30294. }
  30295. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(trigger_es, (0,esm_extends["default"])({
  30296. builtinPlacements: placements
  30297. }, otherProps, {
  30298. prefixCls: prefixCls,
  30299. ref: triggerRef,
  30300. popupClassName: classnames_default()(overlayClassName, (0,defineProperty["default"])({}, "".concat(prefixCls, "-show-arrow"), arrow)),
  30301. popupStyle: overlayStyle,
  30302. action: trigger,
  30303. showAction: showAction,
  30304. hideAction: triggerHideAction,
  30305. popupPlacement: placement,
  30306. popupAlign: align,
  30307. popupTransitionName: transitionName,
  30308. popupAnimation: animation,
  30309. popupVisible: mergedVisible,
  30310. stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '',
  30311. popup: getMenuElementOrLambda(),
  30312. onPopupVisibleChange: handleVisibleChange,
  30313. onPopupClick: onClick,
  30314. getPopupContainer: getPopupContainer
  30315. }), childrenNode);
  30316. }
  30317. /* harmony default export */ var es_Dropdown = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Dropdown));
  30318. ;// ./node_modules/rc-dropdown/es/index.js
  30319. /* harmony default export */ var rc_dropdown_es = (es_Dropdown);
  30320. ;// ./components/_util/isPrimitive.ts
  30321. const isPrimitive = value => typeof value !== 'object' && typeof value !== 'function' || value === null;
  30322. /* harmony default export */ var _util_isPrimitive = (isPrimitive);
  30323. ;// ./node_modules/rc-menu/es/context/IdContext.js
  30324. var IdContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  30325. function getMenuId(uuid, eventKey) {
  30326. if (uuid === undefined) {
  30327. return null;
  30328. }
  30329. return "".concat(uuid, "-").concat(eventKey);
  30330. }
  30331. /**
  30332. * Get `data-menu-id`
  30333. */
  30334. function useMenuId(eventKey) {
  30335. var id = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(IdContext);
  30336. return getMenuId(id, eventKey);
  30337. }
  30338. ;// ./node_modules/rc-menu/es/context/MenuContext.js
  30339. var MenuContext_excluded = ["children", "locked"];
  30340. var MenuContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  30341. function MenuContext_mergeProps(origin, target) {
  30342. var clone = (0,objectSpread2["default"])({}, origin);
  30343. Object.keys(target).forEach(function (key) {
  30344. var value = target[key];
  30345. if (value !== undefined) {
  30346. clone[key] = value;
  30347. }
  30348. });
  30349. return clone;
  30350. }
  30351. function InheritableContextProvider(_ref) {
  30352. var children = _ref.children,
  30353. locked = _ref.locked,
  30354. restProps = (0,objectWithoutProperties["default"])(_ref, MenuContext_excluded);
  30355. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext);
  30356. var inheritableContext = (0,useMemo["default"])(function () {
  30357. return MenuContext_mergeProps(context, restProps);
  30358. }, [context, restProps], function (prev, next) {
  30359. return !locked && (prev[0] !== next[0] || !(0,isEqual["default"])(prev[1], next[1], true));
  30360. });
  30361. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MenuContext.Provider, {
  30362. value: inheritableContext
  30363. }, children);
  30364. }
  30365. ;// ./node_modules/rc-menu/es/context/PathContext.js
  30366. var EmptyList = [];
  30367. // ========================= Path Register =========================
  30368. var PathRegisterContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  30369. function useMeasure() {
  30370. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PathRegisterContext);
  30371. }
  30372. // ========================= Path Tracker ==========================
  30373. var PathTrackerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(EmptyList);
  30374. function useFullPath(eventKey) {
  30375. var parentKeyPath = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PathTrackerContext);
  30376. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  30377. return eventKey !== undefined ? [].concat((0,toConsumableArray["default"])(parentKeyPath), [eventKey]) : parentKeyPath;
  30378. }, [parentKeyPath, eventKey]);
  30379. }
  30380. // =========================== Path User ===========================
  30381. var PathUserContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  30382. ;// ./node_modules/rc-menu/es/context/PrivateContext.js
  30383. var PrivateContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  30384. /* harmony default export */ var context_PrivateContext = (PrivateContext);
  30385. ;// ./node_modules/rc-util/es/Dom/focus.js
  30386. function focusable(node) {
  30387. var includePositive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  30388. if (isVisible(node)) {
  30389. var nodeName = node.nodeName.toLowerCase();
  30390. var isFocusableElement =
  30391. // Focusable element
  30392. ['input', 'select', 'textarea', 'button'].includes(nodeName) ||
  30393. // Editable element
  30394. node.isContentEditable ||
  30395. // Anchor with href element
  30396. nodeName === 'a' && !!node.getAttribute('href');
  30397. // Get tabIndex
  30398. var tabIndexAttr = node.getAttribute('tabindex');
  30399. var tabIndexNum = Number(tabIndexAttr);
  30400. // Parse as number if validate
  30401. var tabIndex = null;
  30402. if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {
  30403. tabIndex = tabIndexNum;
  30404. } else if (isFocusableElement && tabIndex === null) {
  30405. tabIndex = 0;
  30406. }
  30407. // Block focusable if disabled
  30408. if (isFocusableElement && node.disabled) {
  30409. tabIndex = null;
  30410. }
  30411. return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);
  30412. }
  30413. return false;
  30414. }
  30415. function getFocusNodeList(node) {
  30416. var includePositive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  30417. var res = (0,toConsumableArray["default"])(node.querySelectorAll('*')).filter(function (child) {
  30418. return focusable(child, includePositive);
  30419. });
  30420. if (focusable(node, includePositive)) {
  30421. res.unshift(node);
  30422. }
  30423. return res;
  30424. }
  30425. var lastFocusElement = null;
  30426. /** @deprecated Do not use since this may failed when used in async */
  30427. function saveLastFocusNode() {
  30428. lastFocusElement = document.activeElement;
  30429. }
  30430. /** @deprecated Do not use since this may failed when used in async */
  30431. function clearLastFocusNode() {
  30432. lastFocusElement = null;
  30433. }
  30434. /** @deprecated Do not use since this may failed when used in async */
  30435. function backLastFocusNode() {
  30436. if (lastFocusElement) {
  30437. try {
  30438. // 元素可能已经被移动了
  30439. lastFocusElement.focus();
  30440. /* eslint-disable no-empty */
  30441. } catch (e) {
  30442. // empty
  30443. }
  30444. /* eslint-enable no-empty */
  30445. }
  30446. }
  30447. function limitTabRange(node, e) {
  30448. if (e.keyCode === 9) {
  30449. var tabNodeList = getFocusNodeList(node);
  30450. var lastTabNode = tabNodeList[e.shiftKey ? 0 : tabNodeList.length - 1];
  30451. var leavingTab = lastTabNode === document.activeElement || node === document.activeElement;
  30452. if (leavingTab) {
  30453. var target = tabNodeList[e.shiftKey ? tabNodeList.length - 1 : 0];
  30454. target.focus();
  30455. e.preventDefault();
  30456. }
  30457. }
  30458. }
  30459. ;// ./node_modules/rc-menu/es/hooks/useAccessibility.js
  30460. // destruct to reduce minify size
  30461. var LEFT = KeyCode["default"].LEFT,
  30462. RIGHT = KeyCode["default"].RIGHT,
  30463. UP = KeyCode["default"].UP,
  30464. DOWN = KeyCode["default"].DOWN,
  30465. ENTER = KeyCode["default"].ENTER,
  30466. useAccessibility_ESC = KeyCode["default"].ESC,
  30467. HOME = KeyCode["default"].HOME,
  30468. END = KeyCode["default"].END;
  30469. var ArrowKeys = [UP, DOWN, LEFT, RIGHT];
  30470. function useAccessibility_getOffset(mode, isRootLevel, isRtl, which) {
  30471. var _offsets;
  30472. var prev = 'prev';
  30473. var next = 'next';
  30474. var children = 'children';
  30475. var parent = 'parent';
  30476. // Inline enter is special that we use unique operation
  30477. if (mode === 'inline' && which === ENTER) {
  30478. return {
  30479. inlineTrigger: true
  30480. };
  30481. }
  30482. var inline = (0,defineProperty["default"])((0,defineProperty["default"])({}, UP, prev), DOWN, next);
  30483. var horizontal = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, LEFT, isRtl ? next : prev), RIGHT, isRtl ? prev : next), DOWN, children), ENTER, children);
  30484. var vertical = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, UP, prev), DOWN, next), ENTER, children), useAccessibility_ESC, parent), LEFT, isRtl ? children : parent), RIGHT, isRtl ? parent : children);
  30485. var offsets = {
  30486. inline: inline,
  30487. horizontal: horizontal,
  30488. vertical: vertical,
  30489. inlineSub: inline,
  30490. horizontalSub: vertical,
  30491. verticalSub: vertical
  30492. };
  30493. var type = (_offsets = offsets["".concat(mode).concat(isRootLevel ? '' : 'Sub')]) === null || _offsets === void 0 ? void 0 : _offsets[which];
  30494. switch (type) {
  30495. case prev:
  30496. return {
  30497. offset: -1,
  30498. sibling: true
  30499. };
  30500. case next:
  30501. return {
  30502. offset: 1,
  30503. sibling: true
  30504. };
  30505. case parent:
  30506. return {
  30507. offset: -1,
  30508. sibling: false
  30509. };
  30510. case children:
  30511. return {
  30512. offset: 1,
  30513. sibling: false
  30514. };
  30515. default:
  30516. return null;
  30517. }
  30518. }
  30519. function findContainerUL(element) {
  30520. var current = element;
  30521. while (current) {
  30522. if (current.getAttribute('data-menu-list')) {
  30523. return current;
  30524. }
  30525. current = current.parentElement;
  30526. }
  30527. // Normally should not reach this line
  30528. /* istanbul ignore next */
  30529. return null;
  30530. }
  30531. /**
  30532. * Find focused element within element set provided
  30533. */
  30534. function getFocusElement(activeElement, elements) {
  30535. var current = activeElement || document.activeElement;
  30536. while (current) {
  30537. if (elements.has(current)) {
  30538. return current;
  30539. }
  30540. current = current.parentElement;
  30541. }
  30542. return null;
  30543. }
  30544. /**
  30545. * Get focusable elements from the element set under provided container
  30546. */
  30547. function getFocusableElements(container, elements) {
  30548. var list = getFocusNodeList(container, true);
  30549. return list.filter(function (ele) {
  30550. return elements.has(ele);
  30551. });
  30552. }
  30553. function getNextFocusElement(parentQueryContainer, elements, focusMenuElement) {
  30554. var offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
  30555. // Key on the menu item will not get validate parent container
  30556. if (!parentQueryContainer) {
  30557. return null;
  30558. }
  30559. // List current level menu item elements
  30560. var sameLevelFocusableMenuElementList = getFocusableElements(parentQueryContainer, elements);
  30561. // Find next focus index
  30562. var count = sameLevelFocusableMenuElementList.length;
  30563. var focusIndex = sameLevelFocusableMenuElementList.findIndex(function (ele) {
  30564. return focusMenuElement === ele;
  30565. });
  30566. if (offset < 0) {
  30567. if (focusIndex === -1) {
  30568. focusIndex = count - 1;
  30569. } else {
  30570. focusIndex -= 1;
  30571. }
  30572. } else if (offset > 0) {
  30573. focusIndex += 1;
  30574. }
  30575. focusIndex = (focusIndex + count) % count;
  30576. // Focus menu item
  30577. return sameLevelFocusableMenuElementList[focusIndex];
  30578. }
  30579. var refreshElements = function refreshElements(keys, id) {
  30580. var elements = new Set();
  30581. var key2element = new Map();
  30582. var element2key = new Map();
  30583. keys.forEach(function (key) {
  30584. var element = document.querySelector("[data-menu-id='".concat(getMenuId(id, key), "']"));
  30585. if (element) {
  30586. elements.add(element);
  30587. element2key.set(element, key);
  30588. key2element.set(key, element);
  30589. }
  30590. });
  30591. return {
  30592. elements: elements,
  30593. key2element: key2element,
  30594. element2key: element2key
  30595. };
  30596. };
  30597. function useAccessibility_useAccessibility(mode, activeKey, isRtl, id, containerRef, getKeys, getKeyPath, triggerActiveKey, triggerAccessibilityOpen, originOnKeyDown) {
  30598. var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  30599. var activeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  30600. activeRef.current = activeKey;
  30601. var cleanRaf = function cleanRaf() {
  30602. raf["default"].cancel(rafRef.current);
  30603. };
  30604. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  30605. return function () {
  30606. cleanRaf();
  30607. };
  30608. }, []);
  30609. return function (e) {
  30610. var which = e.which;
  30611. if ([].concat(ArrowKeys, [ENTER, useAccessibility_ESC, HOME, END]).includes(which)) {
  30612. var keys = getKeys();
  30613. var refreshedElements = refreshElements(keys, id);
  30614. var _refreshedElements = refreshedElements,
  30615. elements = _refreshedElements.elements,
  30616. key2element = _refreshedElements.key2element,
  30617. element2key = _refreshedElements.element2key;
  30618. // First we should find current focused MenuItem/SubMenu element
  30619. var activeElement = key2element.get(activeKey);
  30620. var focusMenuElement = getFocusElement(activeElement, elements);
  30621. var focusMenuKey = element2key.get(focusMenuElement);
  30622. var offsetObj = useAccessibility_getOffset(mode, getKeyPath(focusMenuKey, true).length === 1, isRtl, which);
  30623. // Some mode do not have fully arrow operation like inline
  30624. if (!offsetObj && which !== HOME && which !== END) {
  30625. return;
  30626. }
  30627. // Arrow prevent default to avoid page scroll
  30628. if (ArrowKeys.includes(which) || [HOME, END].includes(which)) {
  30629. e.preventDefault();
  30630. }
  30631. var tryFocus = function tryFocus(menuElement) {
  30632. if (menuElement) {
  30633. var focusTargetElement = menuElement;
  30634. // Focus to link instead of menu item if possible
  30635. var link = menuElement.querySelector('a');
  30636. if (link !== null && link !== void 0 && link.getAttribute('href')) {
  30637. focusTargetElement = link;
  30638. }
  30639. var targetKey = element2key.get(menuElement);
  30640. triggerActiveKey(targetKey);
  30641. /**
  30642. * Do not `useEffect` here since `tryFocus` may trigger async
  30643. * which makes React sync update the `activeKey`
  30644. * that force render before `useRef` set the next activeKey
  30645. */
  30646. cleanRaf();
  30647. rafRef.current = (0,raf["default"])(function () {
  30648. if (activeRef.current === targetKey) {
  30649. focusTargetElement.focus();
  30650. }
  30651. });
  30652. }
  30653. };
  30654. if ([HOME, END].includes(which) || offsetObj.sibling || !focusMenuElement) {
  30655. // ========================== Sibling ==========================
  30656. // Find walkable focus menu element container
  30657. var parentQueryContainer;
  30658. if (!focusMenuElement || mode === 'inline') {
  30659. parentQueryContainer = containerRef.current;
  30660. } else {
  30661. parentQueryContainer = findContainerUL(focusMenuElement);
  30662. }
  30663. // Get next focus element
  30664. var targetElement;
  30665. var focusableElements = getFocusableElements(parentQueryContainer, elements);
  30666. if (which === HOME) {
  30667. targetElement = focusableElements[0];
  30668. } else if (which === END) {
  30669. targetElement = focusableElements[focusableElements.length - 1];
  30670. } else {
  30671. targetElement = getNextFocusElement(parentQueryContainer, elements, focusMenuElement, offsetObj.offset);
  30672. }
  30673. // Focus menu item
  30674. tryFocus(targetElement);
  30675. // ======================= InlineTrigger =======================
  30676. } else if (offsetObj.inlineTrigger) {
  30677. // Inline trigger no need switch to sub menu item
  30678. triggerAccessibilityOpen(focusMenuKey);
  30679. // =========================== Level ===========================
  30680. } else if (offsetObj.offset > 0) {
  30681. triggerAccessibilityOpen(focusMenuKey, true);
  30682. cleanRaf();
  30683. rafRef.current = (0,raf["default"])(function () {
  30684. // Async should resync elements
  30685. refreshedElements = refreshElements(keys, id);
  30686. var controlId = focusMenuElement.getAttribute('aria-controls');
  30687. var subQueryContainer = document.getElementById(controlId);
  30688. // Get sub focusable menu item
  30689. var targetElement = getNextFocusElement(subQueryContainer, refreshedElements.elements);
  30690. // Focus menu item
  30691. tryFocus(targetElement);
  30692. }, 5);
  30693. } else if (offsetObj.offset < 0) {
  30694. var keyPath = getKeyPath(focusMenuKey, true);
  30695. var parentKey = keyPath[keyPath.length - 2];
  30696. var parentMenuElement = key2element.get(parentKey);
  30697. // Focus menu item
  30698. triggerAccessibilityOpen(parentKey, false);
  30699. tryFocus(parentMenuElement);
  30700. }
  30701. }
  30702. // Pass origin key down event
  30703. originOnKeyDown === null || originOnKeyDown === void 0 || originOnKeyDown(e);
  30704. };
  30705. }
  30706. ;// ./node_modules/rc-menu/es/utils/timeUtil.js
  30707. function nextSlice(callback) {
  30708. /* istanbul ignore next */
  30709. Promise.resolve().then(callback);
  30710. }
  30711. ;// ./node_modules/rc-menu/es/hooks/useKeyRecords.js
  30712. var PATH_SPLIT = '__RC_UTIL_PATH_SPLIT__';
  30713. var getPathStr = function getPathStr(keyPath) {
  30714. return keyPath.join(PATH_SPLIT);
  30715. };
  30716. var getPathKeys = function getPathKeys(keyPathStr) {
  30717. return keyPathStr.split(PATH_SPLIT);
  30718. };
  30719. var OVERFLOW_KEY = 'rc-menu-more';
  30720. function useKeyRecords() {
  30721. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  30722. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  30723. internalForceUpdate = _React$useState2[1];
  30724. var key2pathRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new Map());
  30725. var path2keyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(new Map());
  30726. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
  30727. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  30728. overflowKeys = _React$useState4[0],
  30729. setOverflowKeys = _React$useState4[1];
  30730. var updateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  30731. var destroyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  30732. var forceUpdate = function forceUpdate() {
  30733. if (!destroyRef.current) {
  30734. internalForceUpdate({});
  30735. }
  30736. };
  30737. var registerPath = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (key, keyPath) {
  30738. // Warning for invalidate or duplicated `key`
  30739. if (true) {
  30740. (0,warning["default"])(!key2pathRef.current.has(key), "Duplicated key '".concat(key, "' used in Menu by path [").concat(keyPath.join(' > '), "]"));
  30741. }
  30742. // Fill map
  30743. var connectedPath = getPathStr(keyPath);
  30744. path2keyRef.current.set(connectedPath, key);
  30745. key2pathRef.current.set(key, connectedPath);
  30746. updateRef.current += 1;
  30747. var id = updateRef.current;
  30748. nextSlice(function () {
  30749. if (id === updateRef.current) {
  30750. forceUpdate();
  30751. }
  30752. });
  30753. }, []);
  30754. var unregisterPath = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (key, keyPath) {
  30755. var connectedPath = getPathStr(keyPath);
  30756. path2keyRef.current.delete(connectedPath);
  30757. key2pathRef.current.delete(key);
  30758. }, []);
  30759. var refreshOverflowKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (keys) {
  30760. setOverflowKeys(keys);
  30761. }, []);
  30762. var getKeyPath = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (eventKey, includeOverflow) {
  30763. var fullPath = key2pathRef.current.get(eventKey) || '';
  30764. var keys = getPathKeys(fullPath);
  30765. if (includeOverflow && overflowKeys.includes(keys[0])) {
  30766. keys.unshift(OVERFLOW_KEY);
  30767. }
  30768. return keys;
  30769. }, [overflowKeys]);
  30770. var isSubPathKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (pathKeys, eventKey) {
  30771. return pathKeys.filter(function (item) {
  30772. return item !== undefined;
  30773. }).some(function (pathKey) {
  30774. var pathKeyList = getKeyPath(pathKey, true);
  30775. return pathKeyList.includes(eventKey);
  30776. });
  30777. }, [getKeyPath]);
  30778. var getKeys = function getKeys() {
  30779. var keys = (0,toConsumableArray["default"])(key2pathRef.current.keys());
  30780. if (overflowKeys.length) {
  30781. keys.push(OVERFLOW_KEY);
  30782. }
  30783. return keys;
  30784. };
  30785. /**
  30786. * Find current key related child path keys
  30787. */
  30788. var getSubPathKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (key) {
  30789. var connectedPath = "".concat(key2pathRef.current.get(key)).concat(PATH_SPLIT);
  30790. var pathKeys = new Set();
  30791. (0,toConsumableArray["default"])(path2keyRef.current.keys()).forEach(function (pathKey) {
  30792. if (pathKey.startsWith(connectedPath)) {
  30793. pathKeys.add(path2keyRef.current.get(pathKey));
  30794. }
  30795. });
  30796. return pathKeys;
  30797. }, []);
  30798. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  30799. return function () {
  30800. destroyRef.current = true;
  30801. };
  30802. }, []);
  30803. return {
  30804. // Register
  30805. registerPath: registerPath,
  30806. unregisterPath: unregisterPath,
  30807. refreshOverflowKeys: refreshOverflowKeys,
  30808. // Util
  30809. isSubPathKey: isSubPathKey,
  30810. getKeyPath: getKeyPath,
  30811. getKeys: getKeys,
  30812. getSubPathKeys: getSubPathKeys
  30813. };
  30814. }
  30815. ;// ./node_modules/rc-menu/es/hooks/useMemoCallback.js
  30816. /**
  30817. * Cache callback function that always return same ref instead.
  30818. * This is used for context optimization.
  30819. */
  30820. function useMemoCallback(func) {
  30821. var funRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(func);
  30822. funRef.current = func;
  30823. var callback = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
  30824. var _funRef$current;
  30825. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  30826. args[_key] = arguments[_key];
  30827. }
  30828. return (_funRef$current = funRef.current) === null || _funRef$current === void 0 ? void 0 : _funRef$current.call.apply(_funRef$current, [funRef].concat(args));
  30829. }, []);
  30830. return func ? callback : undefined;
  30831. }
  30832. ;// ./node_modules/rc-menu/es/hooks/useUUID.js
  30833. var uniquePrefix = Math.random().toFixed(5).toString().slice(2);
  30834. var internalId = 0;
  30835. function useUUID(id) {
  30836. var _useMergedState = (0,useMergedState["default"])(id, {
  30837. value: id
  30838. }),
  30839. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  30840. uuid = _useMergedState2[0],
  30841. setUUID = _useMergedState2[1];
  30842. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  30843. internalId += 1;
  30844. var newId = false ? 0 : "".concat(uniquePrefix, "-").concat(internalId);
  30845. setUUID("rc-menu-uuid-".concat(newId));
  30846. }, []);
  30847. return uuid;
  30848. }
  30849. ;// ./node_modules/rc-menu/es/hooks/useActive.js
  30850. function useActive(eventKey, disabled, onMouseEnter, onMouseLeave) {
  30851. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  30852. activeKey = _React$useContext.activeKey,
  30853. onActive = _React$useContext.onActive,
  30854. onInactive = _React$useContext.onInactive;
  30855. var ret = {
  30856. active: activeKey === eventKey
  30857. };
  30858. // Skip when disabled
  30859. if (!disabled) {
  30860. ret.onMouseEnter = function (domEvent) {
  30861. onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter({
  30862. key: eventKey,
  30863. domEvent: domEvent
  30864. });
  30865. onActive(eventKey);
  30866. };
  30867. ret.onMouseLeave = function (domEvent) {
  30868. onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave({
  30869. key: eventKey,
  30870. domEvent: domEvent
  30871. });
  30872. onInactive(eventKey);
  30873. };
  30874. }
  30875. return ret;
  30876. }
  30877. ;// ./node_modules/rc-menu/es/hooks/useDirectionStyle.js
  30878. function useDirectionStyle(level) {
  30879. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  30880. mode = _React$useContext.mode,
  30881. rtl = _React$useContext.rtl,
  30882. inlineIndent = _React$useContext.inlineIndent;
  30883. if (mode !== 'inline') {
  30884. return null;
  30885. }
  30886. var len = level;
  30887. return rtl ? {
  30888. paddingRight: len * inlineIndent
  30889. } : {
  30890. paddingLeft: len * inlineIndent
  30891. };
  30892. }
  30893. ;// ./node_modules/rc-menu/es/Icon.js
  30894. function Icon(_ref) {
  30895. var icon = _ref.icon,
  30896. props = _ref.props,
  30897. children = _ref.children;
  30898. var iconNode;
  30899. if (icon === null || icon === false) {
  30900. return null;
  30901. }
  30902. if (typeof icon === 'function') {
  30903. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icon, (0,objectSpread2["default"])({}, props));
  30904. } else if (typeof icon !== "boolean") {
  30905. // Compatible for origin definition
  30906. iconNode = icon;
  30907. }
  30908. return iconNode || children || null;
  30909. }
  30910. ;// ./node_modules/rc-menu/es/utils/warnUtil.js
  30911. var warnUtil_excluded = ["item"];
  30912. /**
  30913. * `onClick` event return `info.item` which point to react node directly.
  30914. * We should warning this since it will not work on FC.
  30915. */
  30916. function warnItemProp(_ref) {
  30917. var item = _ref.item,
  30918. restInfo = (0,objectWithoutProperties["default"])(_ref, warnUtil_excluded);
  30919. Object.defineProperty(restInfo, 'item', {
  30920. get: function get() {
  30921. (0,warning["default"])(false, '`info.item` is deprecated since we will move to function component that not provides React Node instance in future.');
  30922. return item;
  30923. }
  30924. });
  30925. return restInfo;
  30926. }
  30927. ;// ./node_modules/rc-menu/es/MenuItem.js
  30928. var MenuItem_excluded = ["title", "attribute", "elementRef"],
  30929. MenuItem_excluded2 = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"],
  30930. MenuItem_excluded3 = ["active"];
  30931. // Since Menu event provide the `info.item` which point to the MenuItem node instance.
  30932. // We have to use class component here.
  30933. // This should be removed from doc & api in future.
  30934. var LegacyMenuItem = /*#__PURE__*/function (_React$Component) {
  30935. (0,inherits["default"])(LegacyMenuItem, _React$Component);
  30936. var _super = (0,createSuper["default"])(LegacyMenuItem);
  30937. function LegacyMenuItem() {
  30938. (0,classCallCheck["default"])(this, LegacyMenuItem);
  30939. return _super.apply(this, arguments);
  30940. }
  30941. (0,createClass["default"])(LegacyMenuItem, [{
  30942. key: "render",
  30943. value: function render() {
  30944. var _this$props = this.props,
  30945. title = _this$props.title,
  30946. attribute = _this$props.attribute,
  30947. elementRef = _this$props.elementRef,
  30948. restProps = (0,objectWithoutProperties["default"])(_this$props, MenuItem_excluded);
  30949. // Here the props are eventually passed to the DOM element.
  30950. // React does not recognize non-standard attributes.
  30951. // Therefore, remove the props that is not used here.
  30952. // ref: https://github.com/ant-design/ant-design/issues/41395
  30953. var passedProps = (0,omit["default"])(restProps, ['eventKey', 'popupClassName', 'popupOffset', 'onTitleClick']);
  30954. (0,warning["default"])(!attribute, '`attribute` of Menu.Item is deprecated. Please pass attribute directly.');
  30955. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es.Item, (0,esm_extends["default"])({}, attribute, {
  30956. title: typeof title === 'string' ? title : undefined
  30957. }, passedProps, {
  30958. ref: elementRef
  30959. }));
  30960. }
  30961. }]);
  30962. return LegacyMenuItem;
  30963. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  30964. /**
  30965. * Real Menu Item component
  30966. */
  30967. var InternalMenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  30968. var style = props.style,
  30969. className = props.className,
  30970. eventKey = props.eventKey,
  30971. warnKey = props.warnKey,
  30972. disabled = props.disabled,
  30973. itemIcon = props.itemIcon,
  30974. children = props.children,
  30975. role = props.role,
  30976. onMouseEnter = props.onMouseEnter,
  30977. onMouseLeave = props.onMouseLeave,
  30978. onClick = props.onClick,
  30979. onKeyDown = props.onKeyDown,
  30980. onFocus = props.onFocus,
  30981. restProps = (0,objectWithoutProperties["default"])(props, MenuItem_excluded2);
  30982. var domDataId = useMenuId(eventKey);
  30983. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  30984. prefixCls = _React$useContext.prefixCls,
  30985. onItemClick = _React$useContext.onItemClick,
  30986. contextDisabled = _React$useContext.disabled,
  30987. overflowDisabled = _React$useContext.overflowDisabled,
  30988. contextItemIcon = _React$useContext.itemIcon,
  30989. selectedKeys = _React$useContext.selectedKeys,
  30990. onActive = _React$useContext.onActive;
  30991. var _React$useContext2 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_PrivateContext),
  30992. _internalRenderMenuItem = _React$useContext2._internalRenderMenuItem;
  30993. var itemCls = "".concat(prefixCls, "-item");
  30994. var legacyMenuItemRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  30995. var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  30996. var mergedDisabled = contextDisabled || disabled;
  30997. var mergedEleRef = (0,es_ref.useComposeRef)(ref, elementRef);
  30998. var connectedKeys = useFullPath(eventKey);
  30999. // ================================ Warn ================================
  31000. if ( true && warnKey) {
  31001. (0,warning["default"])(false, 'MenuItem should not leave undefined `key`.');
  31002. }
  31003. // ============================= Info =============================
  31004. var getEventInfo = function getEventInfo(e) {
  31005. return {
  31006. key: eventKey,
  31007. // Note: For legacy code is reversed which not like other antd component
  31008. keyPath: (0,toConsumableArray["default"])(connectedKeys).reverse(),
  31009. item: legacyMenuItemRef.current,
  31010. domEvent: e
  31011. };
  31012. };
  31013. // ============================= Icon =============================
  31014. var mergedItemIcon = itemIcon || contextItemIcon;
  31015. // ============================ Active ============================
  31016. var _useActive = useActive(eventKey, mergedDisabled, onMouseEnter, onMouseLeave),
  31017. active = _useActive.active,
  31018. activeProps = (0,objectWithoutProperties["default"])(_useActive, MenuItem_excluded3);
  31019. // ============================ Select ============================
  31020. var selected = selectedKeys.includes(eventKey);
  31021. // ======================== DirectionStyle ========================
  31022. var directionStyle = useDirectionStyle(connectedKeys.length);
  31023. // ============================ Events ============================
  31024. var onInternalClick = function onInternalClick(e) {
  31025. if (mergedDisabled) {
  31026. return;
  31027. }
  31028. var info = getEventInfo(e);
  31029. onClick === null || onClick === void 0 || onClick(warnItemProp(info));
  31030. onItemClick(info);
  31031. };
  31032. var onInternalKeyDown = function onInternalKeyDown(e) {
  31033. onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
  31034. if (e.which === KeyCode["default"].ENTER) {
  31035. var info = getEventInfo(e);
  31036. // Legacy. Key will also trigger click event
  31037. onClick === null || onClick === void 0 || onClick(warnItemProp(info));
  31038. onItemClick(info);
  31039. }
  31040. };
  31041. /**
  31042. * Used for accessibility. Helper will focus element without key board.
  31043. * We should manually trigger an active
  31044. */
  31045. var onInternalFocus = function onInternalFocus(e) {
  31046. onActive(eventKey);
  31047. onFocus === null || onFocus === void 0 || onFocus(e);
  31048. };
  31049. // ============================ Render ============================
  31050. var optionRoleProps = {};
  31051. if (props.role === 'option') {
  31052. optionRoleProps['aria-selected'] = selected;
  31053. }
  31054. var renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(LegacyMenuItem, (0,esm_extends["default"])({
  31055. ref: legacyMenuItemRef,
  31056. elementRef: mergedEleRef,
  31057. role: role === null ? 'none' : role || 'menuitem',
  31058. tabIndex: disabled ? null : -1,
  31059. "data-menu-id": overflowDisabled && domDataId ? null : domDataId
  31060. }, (0,omit["default"])(restProps, ['extra']), activeProps, optionRoleProps, {
  31061. component: "li",
  31062. "aria-disabled": disabled,
  31063. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, directionStyle), style),
  31064. className: classnames_default()(itemCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(itemCls, "-active"), active), "".concat(itemCls, "-selected"), selected), "".concat(itemCls, "-disabled"), mergedDisabled), className),
  31065. onClick: onInternalClick,
  31066. onKeyDown: onInternalKeyDown,
  31067. onFocus: onInternalFocus
  31068. }), children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon, {
  31069. props: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  31070. isSelected: selected
  31071. }),
  31072. icon: mergedItemIcon
  31073. }));
  31074. if (_internalRenderMenuItem) {
  31075. renderNode = _internalRenderMenuItem(renderNode, props, {
  31076. selected: selected
  31077. });
  31078. }
  31079. return renderNode;
  31080. });
  31081. function MenuItem(props, ref) {
  31082. var eventKey = props.eventKey;
  31083. // ==================== Record KeyPath ====================
  31084. var measure = useMeasure();
  31085. var connectedKeyPath = useFullPath(eventKey);
  31086. // eslint-disable-next-line consistent-return
  31087. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31088. if (measure) {
  31089. measure.registerPath(eventKey, connectedKeyPath);
  31090. return function () {
  31091. measure.unregisterPath(eventKey, connectedKeyPath);
  31092. };
  31093. }
  31094. }, [connectedKeyPath]);
  31095. if (measure) {
  31096. return null;
  31097. }
  31098. // ======================== Render ========================
  31099. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalMenuItem, (0,esm_extends["default"])({}, props, {
  31100. ref: ref
  31101. }));
  31102. }
  31103. /* harmony default export */ var es_MenuItem = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(MenuItem));
  31104. ;// ./node_modules/rc-menu/es/SubMenu/SubMenuList.js
  31105. var SubMenuList_excluded = ["className", "children"];
  31106. var InternalSubMenuList = function InternalSubMenuList(_ref, ref) {
  31107. var className = _ref.className,
  31108. children = _ref.children,
  31109. restProps = (0,objectWithoutProperties["default"])(_ref, SubMenuList_excluded);
  31110. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  31111. prefixCls = _React$useContext.prefixCls,
  31112. mode = _React$useContext.mode,
  31113. rtl = _React$useContext.rtl;
  31114. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", (0,esm_extends["default"])({
  31115. className: classnames_default()(prefixCls, rtl && "".concat(prefixCls, "-rtl"), "".concat(prefixCls, "-sub"), "".concat(prefixCls, "-").concat(mode === 'inline' ? 'inline' : 'vertical'), className),
  31116. role: "menu"
  31117. }, restProps, {
  31118. "data-menu-list": true,
  31119. ref: ref
  31120. }), children);
  31121. };
  31122. var SubMenuList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalSubMenuList);
  31123. SubMenuList.displayName = 'SubMenuList';
  31124. /* harmony default export */ var SubMenu_SubMenuList = (SubMenuList);
  31125. ;// ./node_modules/rc-menu/es/utils/commonUtil.js
  31126. function parseChildren(children, keyPath) {
  31127. return (0,toArray["default"])(children).map(function (child, index) {
  31128. if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) {
  31129. var _eventKey, _child$props;
  31130. var key = child.key;
  31131. var eventKey = (_eventKey = (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.eventKey) !== null && _eventKey !== void 0 ? _eventKey : key;
  31132. var emptyKey = eventKey === null || eventKey === undefined;
  31133. if (emptyKey) {
  31134. eventKey = "tmp_key-".concat([].concat((0,toConsumableArray["default"])(keyPath), [index]).join('-'));
  31135. }
  31136. var cloneProps = {
  31137. key: eventKey,
  31138. eventKey: eventKey
  31139. };
  31140. if ( true && emptyKey) {
  31141. cloneProps.warnKey = true;
  31142. }
  31143. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, cloneProps);
  31144. }
  31145. return child;
  31146. });
  31147. }
  31148. ;// ./node_modules/rc-menu/es/placements.js
  31149. var placements_autoAdjustOverflow = {
  31150. adjustX: 1,
  31151. adjustY: 1
  31152. };
  31153. var es_placements_placements = {
  31154. topLeft: {
  31155. points: ['bl', 'tl'],
  31156. overflow: placements_autoAdjustOverflow
  31157. },
  31158. topRight: {
  31159. points: ['br', 'tr'],
  31160. overflow: placements_autoAdjustOverflow
  31161. },
  31162. bottomLeft: {
  31163. points: ['tl', 'bl'],
  31164. overflow: placements_autoAdjustOverflow
  31165. },
  31166. bottomRight: {
  31167. points: ['tr', 'br'],
  31168. overflow: placements_autoAdjustOverflow
  31169. },
  31170. leftTop: {
  31171. points: ['tr', 'tl'],
  31172. overflow: placements_autoAdjustOverflow
  31173. },
  31174. leftBottom: {
  31175. points: ['br', 'bl'],
  31176. overflow: placements_autoAdjustOverflow
  31177. },
  31178. rightTop: {
  31179. points: ['tl', 'tr'],
  31180. overflow: placements_autoAdjustOverflow
  31181. },
  31182. rightBottom: {
  31183. points: ['bl', 'br'],
  31184. overflow: placements_autoAdjustOverflow
  31185. }
  31186. };
  31187. var placementsRtl = {
  31188. topLeft: {
  31189. points: ['bl', 'tl'],
  31190. overflow: placements_autoAdjustOverflow
  31191. },
  31192. topRight: {
  31193. points: ['br', 'tr'],
  31194. overflow: placements_autoAdjustOverflow
  31195. },
  31196. bottomLeft: {
  31197. points: ['tl', 'bl'],
  31198. overflow: placements_autoAdjustOverflow
  31199. },
  31200. bottomRight: {
  31201. points: ['tr', 'br'],
  31202. overflow: placements_autoAdjustOverflow
  31203. },
  31204. rightTop: {
  31205. points: ['tr', 'tl'],
  31206. overflow: placements_autoAdjustOverflow
  31207. },
  31208. rightBottom: {
  31209. points: ['br', 'bl'],
  31210. overflow: placements_autoAdjustOverflow
  31211. },
  31212. leftTop: {
  31213. points: ['tl', 'tr'],
  31214. overflow: placements_autoAdjustOverflow
  31215. },
  31216. leftBottom: {
  31217. points: ['bl', 'br'],
  31218. overflow: placements_autoAdjustOverflow
  31219. }
  31220. };
  31221. /* harmony default export */ var rc_menu_es_placements = (es_placements_placements);
  31222. ;// ./node_modules/rc-menu/es/utils/motionUtil.js
  31223. function motionUtil_getMotion(mode, motion, defaultMotions) {
  31224. if (motion) {
  31225. return motion;
  31226. }
  31227. if (defaultMotions) {
  31228. return defaultMotions[mode] || defaultMotions.other;
  31229. }
  31230. return undefined;
  31231. }
  31232. ;// ./node_modules/rc-menu/es/SubMenu/PopupTrigger.js
  31233. var popupPlacementMap = {
  31234. horizontal: 'bottomLeft',
  31235. vertical: 'rightTop',
  31236. 'vertical-left': 'rightTop',
  31237. 'vertical-right': 'leftTop'
  31238. };
  31239. function PopupTrigger(_ref) {
  31240. var prefixCls = _ref.prefixCls,
  31241. visible = _ref.visible,
  31242. children = _ref.children,
  31243. popup = _ref.popup,
  31244. popupStyle = _ref.popupStyle,
  31245. popupClassName = _ref.popupClassName,
  31246. popupOffset = _ref.popupOffset,
  31247. disabled = _ref.disabled,
  31248. mode = _ref.mode,
  31249. onVisibleChange = _ref.onVisibleChange;
  31250. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  31251. getPopupContainer = _React$useContext.getPopupContainer,
  31252. rtl = _React$useContext.rtl,
  31253. subMenuOpenDelay = _React$useContext.subMenuOpenDelay,
  31254. subMenuCloseDelay = _React$useContext.subMenuCloseDelay,
  31255. builtinPlacements = _React$useContext.builtinPlacements,
  31256. triggerSubMenuAction = _React$useContext.triggerSubMenuAction,
  31257. forceSubMenuRender = _React$useContext.forceSubMenuRender,
  31258. rootClassName = _React$useContext.rootClassName,
  31259. motion = _React$useContext.motion,
  31260. defaultMotions = _React$useContext.defaultMotions;
  31261. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  31262. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  31263. innerVisible = _React$useState2[0],
  31264. setInnerVisible = _React$useState2[1];
  31265. var placement = rtl ? (0,objectSpread2["default"])((0,objectSpread2["default"])({}, placementsRtl), builtinPlacements) : (0,objectSpread2["default"])((0,objectSpread2["default"])({}, es_placements_placements), builtinPlacements);
  31266. var popupPlacement = popupPlacementMap[mode];
  31267. var targetMotion = motionUtil_getMotion(mode, motion, defaultMotions);
  31268. var targetMotionRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(targetMotion);
  31269. if (mode !== 'inline') {
  31270. /**
  31271. * PopupTrigger is only used for vertical and horizontal types.
  31272. * When collapsed is unfolded, the inline animation will destroy the vertical animation.
  31273. */
  31274. targetMotionRef.current = targetMotion;
  31275. }
  31276. var mergedMotion = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, targetMotionRef.current), {}, {
  31277. leavedClassName: "".concat(prefixCls, "-hidden"),
  31278. removeOnLeave: false,
  31279. motionAppear: true
  31280. });
  31281. // Delay to change visible
  31282. var visibleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  31283. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31284. visibleRef.current = (0,raf["default"])(function () {
  31285. setInnerVisible(visible);
  31286. });
  31287. return function () {
  31288. raf["default"].cancel(visibleRef.current);
  31289. };
  31290. }, [visible]);
  31291. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, {
  31292. prefixCls: prefixCls,
  31293. popupClassName: classnames_default()("".concat(prefixCls, "-popup"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-rtl"), rtl), popupClassName, rootClassName),
  31294. stretch: mode === 'horizontal' ? 'minWidth' : null,
  31295. getPopupContainer: getPopupContainer,
  31296. builtinPlacements: placement,
  31297. popupPlacement: popupPlacement,
  31298. popupVisible: innerVisible,
  31299. popup: popup,
  31300. popupStyle: popupStyle,
  31301. popupAlign: popupOffset && {
  31302. offset: popupOffset
  31303. },
  31304. action: disabled ? [] : [triggerSubMenuAction],
  31305. mouseEnterDelay: subMenuOpenDelay,
  31306. mouseLeaveDelay: subMenuCloseDelay,
  31307. onPopupVisibleChange: onVisibleChange,
  31308. forceRender: forceSubMenuRender,
  31309. popupMotion: mergedMotion,
  31310. fresh: true
  31311. }, children);
  31312. }
  31313. ;// ./node_modules/rc-menu/es/SubMenu/InlineSubMenuList.js
  31314. function InlineSubMenuList(_ref) {
  31315. var id = _ref.id,
  31316. open = _ref.open,
  31317. keyPath = _ref.keyPath,
  31318. children = _ref.children;
  31319. var fixedMode = 'inline';
  31320. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  31321. prefixCls = _React$useContext.prefixCls,
  31322. forceSubMenuRender = _React$useContext.forceSubMenuRender,
  31323. motion = _React$useContext.motion,
  31324. defaultMotions = _React$useContext.defaultMotions,
  31325. mode = _React$useContext.mode;
  31326. // Always use latest mode check
  31327. var sameModeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  31328. sameModeRef.current = mode === fixedMode;
  31329. // We record `destroy` mark here since when mode change from `inline` to others.
  31330. // The inline list should remove when motion end.
  31331. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(!sameModeRef.current),
  31332. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  31333. destroy = _React$useState2[0],
  31334. setDestroy = _React$useState2[1];
  31335. var mergedOpen = sameModeRef.current ? open : false;
  31336. // ================================= Effect =================================
  31337. // Reset destroy state when mode change back
  31338. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31339. if (sameModeRef.current) {
  31340. setDestroy(false);
  31341. }
  31342. }, [mode]);
  31343. // ================================= Render =================================
  31344. var mergedMotion = (0,objectSpread2["default"])({}, motionUtil_getMotion(fixedMode, motion, defaultMotions));
  31345. // No need appear since nest inlineCollapse changed
  31346. if (keyPath.length > 1) {
  31347. mergedMotion.motionAppear = false;
  31348. }
  31349. // Hide inline list when mode changed and motion end
  31350. var originOnVisibleChanged = mergedMotion.onVisibleChanged;
  31351. mergedMotion.onVisibleChanged = function (newVisible) {
  31352. if (!sameModeRef.current && !newVisible) {
  31353. setDestroy(true);
  31354. }
  31355. return originOnVisibleChanged === null || originOnVisibleChanged === void 0 ? void 0 : originOnVisibleChanged(newVisible);
  31356. };
  31357. if (destroy) {
  31358. return null;
  31359. }
  31360. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
  31361. mode: fixedMode,
  31362. locked: !sameModeRef.current
  31363. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
  31364. visible: mergedOpen
  31365. }, mergedMotion, {
  31366. forceRender: forceSubMenuRender,
  31367. removeOnLeave: false,
  31368. leavedClassName: "".concat(prefixCls, "-hidden")
  31369. }), function (_ref2) {
  31370. var motionClassName = _ref2.className,
  31371. motionStyle = _ref2.style;
  31372. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SubMenu_SubMenuList, {
  31373. id: id,
  31374. className: motionClassName,
  31375. style: motionStyle
  31376. }, children);
  31377. }));
  31378. }
  31379. ;// ./node_modules/rc-menu/es/SubMenu/index.js
  31380. var SubMenu_excluded = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"],
  31381. SubMenu_excluded2 = ["active"];
  31382. var InternalSubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  31383. var style = props.style,
  31384. className = props.className,
  31385. title = props.title,
  31386. eventKey = props.eventKey,
  31387. warnKey = props.warnKey,
  31388. disabled = props.disabled,
  31389. internalPopupClose = props.internalPopupClose,
  31390. children = props.children,
  31391. itemIcon = props.itemIcon,
  31392. expandIcon = props.expandIcon,
  31393. popupClassName = props.popupClassName,
  31394. popupOffset = props.popupOffset,
  31395. popupStyle = props.popupStyle,
  31396. onClick = props.onClick,
  31397. onMouseEnter = props.onMouseEnter,
  31398. onMouseLeave = props.onMouseLeave,
  31399. onTitleClick = props.onTitleClick,
  31400. onTitleMouseEnter = props.onTitleMouseEnter,
  31401. onTitleMouseLeave = props.onTitleMouseLeave,
  31402. restProps = (0,objectWithoutProperties["default"])(props, SubMenu_excluded);
  31403. var domDataId = useMenuId(eventKey);
  31404. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  31405. prefixCls = _React$useContext.prefixCls,
  31406. mode = _React$useContext.mode,
  31407. openKeys = _React$useContext.openKeys,
  31408. contextDisabled = _React$useContext.disabled,
  31409. overflowDisabled = _React$useContext.overflowDisabled,
  31410. activeKey = _React$useContext.activeKey,
  31411. selectedKeys = _React$useContext.selectedKeys,
  31412. contextItemIcon = _React$useContext.itemIcon,
  31413. contextExpandIcon = _React$useContext.expandIcon,
  31414. onItemClick = _React$useContext.onItemClick,
  31415. onOpenChange = _React$useContext.onOpenChange,
  31416. onActive = _React$useContext.onActive;
  31417. var _React$useContext2 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_PrivateContext),
  31418. _internalRenderSubMenuItem = _React$useContext2._internalRenderSubMenuItem;
  31419. var _React$useContext3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PathUserContext),
  31420. isSubPathKey = _React$useContext3.isSubPathKey;
  31421. var connectedPath = useFullPath();
  31422. var subMenuPrefixCls = "".concat(prefixCls, "-submenu");
  31423. var mergedDisabled = contextDisabled || disabled;
  31424. var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  31425. var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  31426. // ================================ Warn ================================
  31427. if ( true && warnKey) {
  31428. (0,warning["default"])(false, 'SubMenu should not leave undefined `key`.');
  31429. }
  31430. // ================================ Icon ================================
  31431. var mergedItemIcon = itemIcon !== null && itemIcon !== void 0 ? itemIcon : contextItemIcon;
  31432. var mergedExpandIcon = expandIcon !== null && expandIcon !== void 0 ? expandIcon : contextExpandIcon;
  31433. // ================================ Open ================================
  31434. var originOpen = openKeys.includes(eventKey);
  31435. var open = !overflowDisabled && originOpen;
  31436. // =============================== Select ===============================
  31437. var childrenSelected = isSubPathKey(selectedKeys, eventKey);
  31438. // =============================== Active ===============================
  31439. var _useActive = useActive(eventKey, mergedDisabled, onTitleMouseEnter, onTitleMouseLeave),
  31440. active = _useActive.active,
  31441. activeProps = (0,objectWithoutProperties["default"])(_useActive, SubMenu_excluded2);
  31442. // Fallback of active check to avoid hover on menu title or disabled item
  31443. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  31444. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  31445. childrenActive = _React$useState2[0],
  31446. setChildrenActive = _React$useState2[1];
  31447. var triggerChildrenActive = function triggerChildrenActive(newActive) {
  31448. if (!mergedDisabled) {
  31449. setChildrenActive(newActive);
  31450. }
  31451. };
  31452. var onInternalMouseEnter = function onInternalMouseEnter(domEvent) {
  31453. triggerChildrenActive(true);
  31454. onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter({
  31455. key: eventKey,
  31456. domEvent: domEvent
  31457. });
  31458. };
  31459. var onInternalMouseLeave = function onInternalMouseLeave(domEvent) {
  31460. triggerChildrenActive(false);
  31461. onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave({
  31462. key: eventKey,
  31463. domEvent: domEvent
  31464. });
  31465. };
  31466. var mergedActive = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  31467. if (active) {
  31468. return active;
  31469. }
  31470. if (mode !== 'inline') {
  31471. return childrenActive || isSubPathKey([activeKey], eventKey);
  31472. }
  31473. return false;
  31474. }, [mode, active, activeKey, childrenActive, eventKey, isSubPathKey]);
  31475. // ========================== DirectionStyle ==========================
  31476. var directionStyle = useDirectionStyle(connectedPath.length);
  31477. // =============================== Events ===============================
  31478. // >>>> Title click
  31479. var onInternalTitleClick = function onInternalTitleClick(e) {
  31480. // Skip if disabled
  31481. if (mergedDisabled) {
  31482. return;
  31483. }
  31484. onTitleClick === null || onTitleClick === void 0 || onTitleClick({
  31485. key: eventKey,
  31486. domEvent: e
  31487. });
  31488. // Trigger open by click when mode is `inline`
  31489. if (mode === 'inline') {
  31490. onOpenChange(eventKey, !originOpen);
  31491. }
  31492. };
  31493. // >>>> Context for children click
  31494. var onMergedItemClick = useMemoCallback(function (info) {
  31495. onClick === null || onClick === void 0 || onClick(warnItemProp(info));
  31496. onItemClick(info);
  31497. });
  31498. // >>>>> Visible change
  31499. var onPopupVisibleChange = function onPopupVisibleChange(newVisible) {
  31500. if (mode !== 'inline') {
  31501. onOpenChange(eventKey, newVisible);
  31502. }
  31503. };
  31504. /**
  31505. * Used for accessibility. Helper will focus element without key board.
  31506. * We should manually trigger an active
  31507. */
  31508. var onInternalFocus = function onInternalFocus() {
  31509. onActive(eventKey);
  31510. };
  31511. // =============================== Render ===============================
  31512. var popupId = domDataId && "".concat(domDataId, "-popup");
  31513. var expandIconNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  31514. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon, {
  31515. icon: mode !== 'horizontal' ? mergedExpandIcon : undefined,
  31516. props: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  31517. isOpen: open,
  31518. // [Legacy] Not sure why need this mark
  31519. isSubMenu: true
  31520. })
  31521. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("i", {
  31522. className: "".concat(subMenuPrefixCls, "-arrow")
  31523. }));
  31524. }, [mode, mergedExpandIcon, props, open, subMenuPrefixCls]);
  31525. // >>>>> Title
  31526. var titleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  31527. role: "menuitem",
  31528. style: directionStyle,
  31529. className: "".concat(subMenuPrefixCls, "-title"),
  31530. tabIndex: mergedDisabled ? null : -1,
  31531. ref: elementRef,
  31532. title: typeof title === 'string' ? title : null,
  31533. "data-menu-id": overflowDisabled && domDataId ? null : domDataId,
  31534. "aria-expanded": open,
  31535. "aria-haspopup": true,
  31536. "aria-controls": popupId,
  31537. "aria-disabled": mergedDisabled,
  31538. onClick: onInternalTitleClick,
  31539. onFocus: onInternalFocus
  31540. }, activeProps), title, expandIconNode);
  31541. // Cache mode if it change to `inline` which do not have popup motion
  31542. var triggerModeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mode);
  31543. if (mode !== 'inline' && connectedPath.length > 1) {
  31544. triggerModeRef.current = 'vertical';
  31545. } else {
  31546. triggerModeRef.current = mode;
  31547. }
  31548. if (!overflowDisabled) {
  31549. var triggerMode = triggerModeRef.current;
  31550. // Still wrap with Trigger here since we need avoid react re-mount dom node
  31551. // Which makes motion failed
  31552. titleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PopupTrigger, {
  31553. mode: triggerMode,
  31554. prefixCls: subMenuPrefixCls,
  31555. visible: !internalPopupClose && open && mode !== 'inline',
  31556. popupClassName: popupClassName,
  31557. popupOffset: popupOffset,
  31558. popupStyle: popupStyle,
  31559. popup: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider
  31560. // Special handle of horizontal mode
  31561. , {
  31562. mode: triggerMode === 'horizontal' ? 'vertical' : triggerMode
  31563. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SubMenu_SubMenuList, {
  31564. id: popupId,
  31565. ref: popupRef
  31566. }, children)),
  31567. disabled: mergedDisabled,
  31568. onVisibleChange: onPopupVisibleChange
  31569. }, titleNode);
  31570. }
  31571. // >>>>> List node
  31572. var listNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es.Item, (0,esm_extends["default"])({
  31573. ref: ref,
  31574. role: "none"
  31575. }, restProps, {
  31576. component: "li",
  31577. style: style,
  31578. className: classnames_default()(subMenuPrefixCls, "".concat(subMenuPrefixCls, "-").concat(mode), className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(subMenuPrefixCls, "-open"), open), "".concat(subMenuPrefixCls, "-active"), mergedActive), "".concat(subMenuPrefixCls, "-selected"), childrenSelected), "".concat(subMenuPrefixCls, "-disabled"), mergedDisabled)),
  31579. onMouseEnter: onInternalMouseEnter,
  31580. onMouseLeave: onInternalMouseLeave
  31581. }), titleNode, !overflowDisabled && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InlineSubMenuList, {
  31582. id: popupId,
  31583. open: open,
  31584. keyPath: connectedPath
  31585. }, children));
  31586. if (_internalRenderSubMenuItem) {
  31587. listNode = _internalRenderSubMenuItem(listNode, props, {
  31588. selected: childrenSelected,
  31589. active: mergedActive,
  31590. open: open,
  31591. disabled: mergedDisabled
  31592. });
  31593. }
  31594. // >>>>> Render
  31595. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
  31596. onItemClick: onMergedItemClick,
  31597. mode: mode === 'horizontal' ? 'vertical' : mode,
  31598. itemIcon: mergedItemIcon,
  31599. expandIcon: mergedExpandIcon
  31600. }, listNode);
  31601. });
  31602. var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  31603. var eventKey = props.eventKey,
  31604. children = props.children;
  31605. var connectedKeyPath = useFullPath(eventKey);
  31606. var childList = parseChildren(children, connectedKeyPath);
  31607. // ==================== Record KeyPath ====================
  31608. var measure = useMeasure();
  31609. // eslint-disable-next-line consistent-return
  31610. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31611. if (measure) {
  31612. measure.registerPath(eventKey, connectedKeyPath);
  31613. return function () {
  31614. measure.unregisterPath(eventKey, connectedKeyPath);
  31615. };
  31616. }
  31617. }, [connectedKeyPath]);
  31618. var renderNode;
  31619. // ======================== Render ========================
  31620. if (measure) {
  31621. renderNode = childList;
  31622. } else {
  31623. renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalSubMenu, (0,esm_extends["default"])({
  31624. ref: ref
  31625. }, props), childList);
  31626. }
  31627. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PathTrackerContext.Provider, {
  31628. value: connectedKeyPath
  31629. }, renderNode);
  31630. });
  31631. if (true) {
  31632. SubMenu.displayName = 'SubMenu';
  31633. }
  31634. /* harmony default export */ var es_SubMenu = (SubMenu);
  31635. ;// ./node_modules/rc-menu/es/Divider.js
  31636. function Divider(_ref) {
  31637. var className = _ref.className,
  31638. style = _ref.style;
  31639. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  31640. prefixCls = _React$useContext.prefixCls;
  31641. var measure = useMeasure();
  31642. if (measure) {
  31643. return null;
  31644. }
  31645. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  31646. role: "separator",
  31647. className: classnames_default()("".concat(prefixCls, "-item-divider"), className),
  31648. style: style
  31649. });
  31650. }
  31651. ;// ./node_modules/rc-menu/es/MenuItemGroup.js
  31652. var MenuItemGroup_excluded = ["className", "title", "eventKey", "children"];
  31653. var InternalMenuItemGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  31654. var className = props.className,
  31655. title = props.title,
  31656. eventKey = props.eventKey,
  31657. children = props.children,
  31658. restProps = (0,objectWithoutProperties["default"])(props, MenuItemGroup_excluded);
  31659. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(MenuContext),
  31660. prefixCls = _React$useContext.prefixCls;
  31661. var groupPrefixCls = "".concat(prefixCls, "-item-group");
  31662. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", (0,esm_extends["default"])({
  31663. ref: ref,
  31664. role: "presentation"
  31665. }, restProps, {
  31666. onClick: function onClick(e) {
  31667. return e.stopPropagation();
  31668. },
  31669. className: classnames_default()(groupPrefixCls, className)
  31670. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  31671. role: "presentation",
  31672. className: "".concat(groupPrefixCls, "-title"),
  31673. title: typeof title === 'string' ? title : undefined
  31674. }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  31675. role: "group",
  31676. className: "".concat(groupPrefixCls, "-list")
  31677. }, children));
  31678. });
  31679. var MenuItemGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  31680. var eventKey = props.eventKey,
  31681. children = props.children;
  31682. var connectedKeyPath = useFullPath(eventKey);
  31683. var childList = parseChildren(children, connectedKeyPath);
  31684. var measure = useMeasure();
  31685. if (measure) {
  31686. return childList;
  31687. }
  31688. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalMenuItemGroup, (0,esm_extends["default"])({
  31689. ref: ref
  31690. }, (0,omit["default"])(props, ['warnKey'])), childList);
  31691. });
  31692. if (true) {
  31693. MenuItemGroup.displayName = 'MenuItemGroup';
  31694. }
  31695. /* harmony default export */ var es_MenuItemGroup = (MenuItemGroup);
  31696. ;// ./node_modules/rc-menu/es/utils/nodeUtil.js
  31697. var nodeUtil_excluded = ["label", "children", "key", "type", "extra"];
  31698. function convertItemsToNodes(list, components, prefixCls) {
  31699. var MergedMenuItem = components.item,
  31700. MergedMenuItemGroup = components.group,
  31701. MergedSubMenu = components.submenu,
  31702. MergedDivider = components.divider;
  31703. return (list || []).map(function (opt, index) {
  31704. if (opt && (0,esm_typeof["default"])(opt) === 'object') {
  31705. var _ref = opt,
  31706. label = _ref.label,
  31707. children = _ref.children,
  31708. key = _ref.key,
  31709. type = _ref.type,
  31710. extra = _ref.extra,
  31711. restProps = (0,objectWithoutProperties["default"])(_ref, nodeUtil_excluded);
  31712. var mergedKey = key !== null && key !== void 0 ? key : "tmp-".concat(index);
  31713. // MenuItemGroup & SubMenuItem
  31714. if (children || type === 'group') {
  31715. if (type === 'group') {
  31716. // Group
  31717. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedMenuItemGroup, (0,esm_extends["default"])({
  31718. key: mergedKey
  31719. }, restProps, {
  31720. title: label
  31721. }), convertItemsToNodes(children, components, prefixCls));
  31722. }
  31723. // Sub Menu
  31724. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedSubMenu, (0,esm_extends["default"])({
  31725. key: mergedKey
  31726. }, restProps, {
  31727. title: label
  31728. }), convertItemsToNodes(children, components, prefixCls));
  31729. }
  31730. // MenuItem & Divider
  31731. if (type === 'divider') {
  31732. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedDivider, (0,esm_extends["default"])({
  31733. key: mergedKey
  31734. }, restProps));
  31735. }
  31736. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MergedMenuItem, (0,esm_extends["default"])({
  31737. key: mergedKey
  31738. }, restProps, {
  31739. extra: extra
  31740. }), label, (!!extra || extra === 0) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  31741. className: "".concat(prefixCls, "-item-extra")
  31742. }, extra));
  31743. }
  31744. return null;
  31745. }).filter(function (opt) {
  31746. return opt;
  31747. });
  31748. }
  31749. function parseItems(children, items, keyPath, components, prefixCls) {
  31750. var childNodes = children;
  31751. var mergedComponents = (0,objectSpread2["default"])({
  31752. divider: Divider,
  31753. item: es_MenuItem,
  31754. group: es_MenuItemGroup,
  31755. submenu: es_SubMenu
  31756. }, components);
  31757. if (items) {
  31758. childNodes = convertItemsToNodes(items, mergedComponents, prefixCls);
  31759. }
  31760. return parseChildren(childNodes, keyPath);
  31761. }
  31762. ;// ./node_modules/rc-menu/es/Menu.js
  31763. var Menu_excluded = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"];
  31764. /**
  31765. * Menu modify after refactor:
  31766. * ## Add
  31767. * - disabled
  31768. *
  31769. * ## Remove
  31770. * - openTransitionName
  31771. * - openAnimation
  31772. * - onDestroy
  31773. * - siderCollapsed: Seems antd do not use this prop (Need test in antd)
  31774. * - collapsedWidth: Seems this logic should be handle by antd Layout.Sider
  31775. */
  31776. // optimize for render
  31777. var Menu_EMPTY_LIST = [];
  31778. var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  31779. var _childList$;
  31780. var _ref = props,
  31781. _ref$prefixCls = _ref.prefixCls,
  31782. prefixCls = _ref$prefixCls === void 0 ? 'rc-menu' : _ref$prefixCls,
  31783. rootClassName = _ref.rootClassName,
  31784. style = _ref.style,
  31785. className = _ref.className,
  31786. _ref$tabIndex = _ref.tabIndex,
  31787. tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
  31788. items = _ref.items,
  31789. children = _ref.children,
  31790. direction = _ref.direction,
  31791. id = _ref.id,
  31792. _ref$mode = _ref.mode,
  31793. mode = _ref$mode === void 0 ? 'vertical' : _ref$mode,
  31794. inlineCollapsed = _ref.inlineCollapsed,
  31795. disabled = _ref.disabled,
  31796. disabledOverflow = _ref.disabledOverflow,
  31797. _ref$subMenuOpenDelay = _ref.subMenuOpenDelay,
  31798. subMenuOpenDelay = _ref$subMenuOpenDelay === void 0 ? 0.1 : _ref$subMenuOpenDelay,
  31799. _ref$subMenuCloseDela = _ref.subMenuCloseDelay,
  31800. subMenuCloseDelay = _ref$subMenuCloseDela === void 0 ? 0.1 : _ref$subMenuCloseDela,
  31801. forceSubMenuRender = _ref.forceSubMenuRender,
  31802. defaultOpenKeys = _ref.defaultOpenKeys,
  31803. openKeys = _ref.openKeys,
  31804. activeKey = _ref.activeKey,
  31805. defaultActiveFirst = _ref.defaultActiveFirst,
  31806. _ref$selectable = _ref.selectable,
  31807. selectable = _ref$selectable === void 0 ? true : _ref$selectable,
  31808. _ref$multiple = _ref.multiple,
  31809. multiple = _ref$multiple === void 0 ? false : _ref$multiple,
  31810. defaultSelectedKeys = _ref.defaultSelectedKeys,
  31811. selectedKeys = _ref.selectedKeys,
  31812. onSelect = _ref.onSelect,
  31813. onDeselect = _ref.onDeselect,
  31814. _ref$inlineIndent = _ref.inlineIndent,
  31815. inlineIndent = _ref$inlineIndent === void 0 ? 24 : _ref$inlineIndent,
  31816. motion = _ref.motion,
  31817. defaultMotions = _ref.defaultMotions,
  31818. _ref$triggerSubMenuAc = _ref.triggerSubMenuAction,
  31819. triggerSubMenuAction = _ref$triggerSubMenuAc === void 0 ? 'hover' : _ref$triggerSubMenuAc,
  31820. builtinPlacements = _ref.builtinPlacements,
  31821. itemIcon = _ref.itemIcon,
  31822. expandIcon = _ref.expandIcon,
  31823. _ref$overflowedIndica = _ref.overflowedIndicator,
  31824. overflowedIndicator = _ref$overflowedIndica === void 0 ? '...' : _ref$overflowedIndica,
  31825. overflowedIndicatorPopupClassName = _ref.overflowedIndicatorPopupClassName,
  31826. getPopupContainer = _ref.getPopupContainer,
  31827. onClick = _ref.onClick,
  31828. onOpenChange = _ref.onOpenChange,
  31829. onKeyDown = _ref.onKeyDown,
  31830. openAnimation = _ref.openAnimation,
  31831. openTransitionName = _ref.openTransitionName,
  31832. _internalRenderMenuItem = _ref._internalRenderMenuItem,
  31833. _internalRenderSubMenuItem = _ref._internalRenderSubMenuItem,
  31834. _internalComponents = _ref._internalComponents,
  31835. restProps = (0,objectWithoutProperties["default"])(_ref, Menu_excluded);
  31836. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  31837. return [parseItems(children, items, Menu_EMPTY_LIST, _internalComponents, prefixCls), parseItems(children, items, Menu_EMPTY_LIST, {}, prefixCls)];
  31838. }, [children, items, _internalComponents]),
  31839. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
  31840. childList = _React$useMemo2[0],
  31841. measureChildList = _React$useMemo2[1];
  31842. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  31843. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  31844. mounted = _React$useState2[0],
  31845. setMounted = _React$useState2[1];
  31846. var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  31847. var uuid = useUUID(id);
  31848. var isRtl = direction === 'rtl';
  31849. // ========================= Warn =========================
  31850. if (true) {
  31851. (0,warning["default"])(!openAnimation && !openTransitionName, '`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.');
  31852. }
  31853. // ========================= Open =========================
  31854. var _useMergedState = (0,useMergedState["default"])(defaultOpenKeys, {
  31855. value: openKeys,
  31856. postState: function postState(keys) {
  31857. return keys || Menu_EMPTY_LIST;
  31858. }
  31859. }),
  31860. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  31861. mergedOpenKeys = _useMergedState2[0],
  31862. setMergedOpenKeys = _useMergedState2[1];
  31863. // React 18 will merge mouse event which means we open key will not sync
  31864. // ref: https://github.com/ant-design/ant-design/issues/38818
  31865. var triggerOpenKeys = function triggerOpenKeys(keys) {
  31866. var forceFlush = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  31867. function doUpdate() {
  31868. setMergedOpenKeys(keys);
  31869. onOpenChange === null || onOpenChange === void 0 || onOpenChange(keys);
  31870. }
  31871. if (forceFlush) {
  31872. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(doUpdate);
  31873. } else {
  31874. doUpdate();
  31875. }
  31876. };
  31877. // >>>>> Cache & Reset open keys when inlineCollapsed changed
  31878. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedOpenKeys),
  31879. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  31880. inlineCacheOpenKeys = _React$useState4[0],
  31881. setInlineCacheOpenKeys = _React$useState4[1];
  31882. var mountRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  31883. // ========================= Mode =========================
  31884. var _React$useMemo3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  31885. if ((mode === 'inline' || mode === 'vertical') && inlineCollapsed) {
  31886. return ['vertical', inlineCollapsed];
  31887. }
  31888. return [mode, false];
  31889. }, [mode, inlineCollapsed]),
  31890. _React$useMemo4 = (0,slicedToArray["default"])(_React$useMemo3, 2),
  31891. mergedMode = _React$useMemo4[0],
  31892. mergedInlineCollapsed = _React$useMemo4[1];
  31893. var isInlineMode = mergedMode === 'inline';
  31894. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedMode),
  31895. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  31896. internalMode = _React$useState6[0],
  31897. setInternalMode = _React$useState6[1];
  31898. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedInlineCollapsed),
  31899. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  31900. internalInlineCollapsed = _React$useState8[0],
  31901. setInternalInlineCollapsed = _React$useState8[1];
  31902. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31903. setInternalMode(mergedMode);
  31904. setInternalInlineCollapsed(mergedInlineCollapsed);
  31905. if (!mountRef.current) {
  31906. return;
  31907. }
  31908. // Synchronously update MergedOpenKeys
  31909. if (isInlineMode) {
  31910. setMergedOpenKeys(inlineCacheOpenKeys);
  31911. } else {
  31912. // Trigger open event in case its in control
  31913. triggerOpenKeys(Menu_EMPTY_LIST);
  31914. }
  31915. }, [mergedMode, mergedInlineCollapsed]);
  31916. // ====================== Responsive ======================
  31917. var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  31918. _React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
  31919. lastVisibleIndex = _React$useState10[0],
  31920. setLastVisibleIndex = _React$useState10[1];
  31921. var allVisible = lastVisibleIndex >= childList.length - 1 || internalMode !== 'horizontal' || disabledOverflow;
  31922. // Cache
  31923. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31924. if (isInlineMode) {
  31925. setInlineCacheOpenKeys(mergedOpenKeys);
  31926. }
  31927. }, [mergedOpenKeys]);
  31928. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31929. mountRef.current = true;
  31930. return function () {
  31931. mountRef.current = false;
  31932. };
  31933. }, []);
  31934. // ========================= Path =========================
  31935. var _useKeyRecords = useKeyRecords(),
  31936. registerPath = _useKeyRecords.registerPath,
  31937. unregisterPath = _useKeyRecords.unregisterPath,
  31938. refreshOverflowKeys = _useKeyRecords.refreshOverflowKeys,
  31939. isSubPathKey = _useKeyRecords.isSubPathKey,
  31940. getKeyPath = _useKeyRecords.getKeyPath,
  31941. getKeys = _useKeyRecords.getKeys,
  31942. getSubPathKeys = _useKeyRecords.getSubPathKeys;
  31943. var registerPathContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  31944. return {
  31945. registerPath: registerPath,
  31946. unregisterPath: unregisterPath
  31947. };
  31948. }, [registerPath, unregisterPath]);
  31949. var pathUserContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  31950. return {
  31951. isSubPathKey: isSubPathKey
  31952. };
  31953. }, [isSubPathKey]);
  31954. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  31955. refreshOverflowKeys(allVisible ? Menu_EMPTY_LIST : childList.slice(lastVisibleIndex + 1).map(function (child) {
  31956. return child.key;
  31957. }));
  31958. }, [lastVisibleIndex, allVisible]);
  31959. // ======================== Active ========================
  31960. var _useMergedState3 = (0,useMergedState["default"])(activeKey || defaultActiveFirst && ((_childList$ = childList[0]) === null || _childList$ === void 0 ? void 0 : _childList$.key), {
  31961. value: activeKey
  31962. }),
  31963. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  31964. mergedActiveKey = _useMergedState4[0],
  31965. setMergedActiveKey = _useMergedState4[1];
  31966. var onActive = useMemoCallback(function (key) {
  31967. setMergedActiveKey(key);
  31968. });
  31969. var onInactive = useMemoCallback(function () {
  31970. setMergedActiveKey(undefined);
  31971. });
  31972. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
  31973. return {
  31974. list: containerRef.current,
  31975. focus: function focus(options) {
  31976. var _childList$find;
  31977. var keys = getKeys();
  31978. var _refreshElements = refreshElements(keys, uuid),
  31979. elements = _refreshElements.elements,
  31980. key2element = _refreshElements.key2element,
  31981. element2key = _refreshElements.element2key;
  31982. var focusableElements = getFocusableElements(containerRef.current, elements);
  31983. var shouldFocusKey = mergedActiveKey !== null && mergedActiveKey !== void 0 ? mergedActiveKey : focusableElements[0] ? element2key.get(focusableElements[0]) : (_childList$find = childList.find(function (node) {
  31984. return !node.props.disabled;
  31985. })) === null || _childList$find === void 0 ? void 0 : _childList$find.key;
  31986. var elementToFocus = key2element.get(shouldFocusKey);
  31987. if (shouldFocusKey && elementToFocus) {
  31988. var _elementToFocus$focus;
  31989. elementToFocus === null || elementToFocus === void 0 || (_elementToFocus$focus = elementToFocus.focus) === null || _elementToFocus$focus === void 0 || _elementToFocus$focus.call(elementToFocus, options);
  31990. }
  31991. }
  31992. };
  31993. });
  31994. // ======================== Select ========================
  31995. // >>>>> Select keys
  31996. var _useMergedState5 = (0,useMergedState["default"])(defaultSelectedKeys || [], {
  31997. value: selectedKeys,
  31998. // Legacy convert key to array
  31999. postState: function postState(keys) {
  32000. if (Array.isArray(keys)) {
  32001. return keys;
  32002. }
  32003. if (keys === null || keys === undefined) {
  32004. return Menu_EMPTY_LIST;
  32005. }
  32006. return [keys];
  32007. }
  32008. }),
  32009. _useMergedState6 = (0,slicedToArray["default"])(_useMergedState5, 2),
  32010. mergedSelectKeys = _useMergedState6[0],
  32011. setMergedSelectKeys = _useMergedState6[1];
  32012. // >>>>> Trigger select
  32013. var triggerSelection = function triggerSelection(info) {
  32014. if (selectable) {
  32015. // Insert or Remove
  32016. var targetKey = info.key;
  32017. var exist = mergedSelectKeys.includes(targetKey);
  32018. var newSelectKeys;
  32019. if (multiple) {
  32020. if (exist) {
  32021. newSelectKeys = mergedSelectKeys.filter(function (key) {
  32022. return key !== targetKey;
  32023. });
  32024. } else {
  32025. newSelectKeys = [].concat((0,toConsumableArray["default"])(mergedSelectKeys), [targetKey]);
  32026. }
  32027. } else {
  32028. newSelectKeys = [targetKey];
  32029. }
  32030. setMergedSelectKeys(newSelectKeys);
  32031. // Trigger event
  32032. var selectInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
  32033. selectedKeys: newSelectKeys
  32034. });
  32035. if (exist) {
  32036. onDeselect === null || onDeselect === void 0 || onDeselect(selectInfo);
  32037. } else {
  32038. onSelect === null || onSelect === void 0 || onSelect(selectInfo);
  32039. }
  32040. }
  32041. // Whatever selectable, always close it
  32042. if (!multiple && mergedOpenKeys.length && internalMode !== 'inline') {
  32043. triggerOpenKeys(Menu_EMPTY_LIST);
  32044. }
  32045. };
  32046. // ========================= Open =========================
  32047. /**
  32048. * Click for item. SubMenu do not have selection status
  32049. */
  32050. var onInternalClick = useMemoCallback(function (info) {
  32051. onClick === null || onClick === void 0 || onClick(warnItemProp(info));
  32052. triggerSelection(info);
  32053. });
  32054. var onInternalOpenChange = useMemoCallback(function (key, open) {
  32055. var newOpenKeys = mergedOpenKeys.filter(function (k) {
  32056. return k !== key;
  32057. });
  32058. if (open) {
  32059. newOpenKeys.push(key);
  32060. } else if (internalMode !== 'inline') {
  32061. // We need find all related popup to close
  32062. var subPathKeys = getSubPathKeys(key);
  32063. newOpenKeys = newOpenKeys.filter(function (k) {
  32064. return !subPathKeys.has(k);
  32065. });
  32066. }
  32067. if (!(0,isEqual["default"])(mergedOpenKeys, newOpenKeys, true)) {
  32068. triggerOpenKeys(newOpenKeys, true);
  32069. }
  32070. });
  32071. // ==================== Accessibility =====================
  32072. var triggerAccessibilityOpen = function triggerAccessibilityOpen(key, open) {
  32073. var nextOpen = open !== null && open !== void 0 ? open : !mergedOpenKeys.includes(key);
  32074. onInternalOpenChange(key, nextOpen);
  32075. };
  32076. var onInternalKeyDown = useAccessibility_useAccessibility(internalMode, mergedActiveKey, isRtl, uuid, containerRef, getKeys, getKeyPath, setMergedActiveKey, triggerAccessibilityOpen, onKeyDown);
  32077. // ======================== Effect ========================
  32078. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  32079. setMounted(true);
  32080. }, []);
  32081. // ======================= Context ========================
  32082. var privateContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  32083. return {
  32084. _internalRenderMenuItem: _internalRenderMenuItem,
  32085. _internalRenderSubMenuItem: _internalRenderSubMenuItem
  32086. };
  32087. }, [_internalRenderMenuItem, _internalRenderSubMenuItem]);
  32088. // ======================== Render ========================
  32089. // >>>>> Children
  32090. var wrappedChildList = internalMode !== 'horizontal' || disabledOverflow ? childList :
  32091. // Need wrap for overflow dropdown that do not response for open
  32092. childList.map(function (child, index) {
  32093. return (
  32094. /*#__PURE__*/
  32095. // Always wrap provider to avoid sub node re-mount
  32096. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
  32097. key: child.key,
  32098. overflowDisabled: index > lastVisibleIndex
  32099. }, child)
  32100. );
  32101. });
  32102. // >>>>> Container
  32103. var container = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es, (0,esm_extends["default"])({
  32104. id: id,
  32105. ref: containerRef,
  32106. prefixCls: "".concat(prefixCls, "-overflow"),
  32107. component: "ul",
  32108. itemComponent: es_MenuItem,
  32109. className: classnames_default()(prefixCls, "".concat(prefixCls, "-root"), "".concat(prefixCls, "-").concat(internalMode), className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-inline-collapsed"), internalInlineCollapsed), "".concat(prefixCls, "-rtl"), isRtl), rootClassName),
  32110. dir: direction,
  32111. style: style,
  32112. role: "menu",
  32113. tabIndex: tabIndex,
  32114. data: wrappedChildList,
  32115. renderRawItem: function renderRawItem(node) {
  32116. return node;
  32117. },
  32118. renderRawRest: function renderRawRest(omitItems) {
  32119. // We use origin list since wrapped list use context to prevent open
  32120. var len = omitItems.length;
  32121. var originOmitItems = len ? childList.slice(-len) : null;
  32122. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SubMenu, {
  32123. eventKey: OVERFLOW_KEY,
  32124. title: overflowedIndicator,
  32125. disabled: allVisible,
  32126. internalPopupClose: len === 0,
  32127. popupClassName: overflowedIndicatorPopupClassName
  32128. }, originOmitItems);
  32129. },
  32130. maxCount: internalMode !== 'horizontal' || disabledOverflow ? rc_overflow_es.INVALIDATE : rc_overflow_es.RESPONSIVE,
  32131. ssr: "full",
  32132. "data-menu-list": true,
  32133. onVisibleChange: function onVisibleChange(newLastIndex) {
  32134. setLastVisibleIndex(newLastIndex);
  32135. },
  32136. onKeyDown: onInternalKeyDown
  32137. }, restProps));
  32138. // >>>>> Render
  32139. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_PrivateContext.Provider, {
  32140. value: privateContext
  32141. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IdContext.Provider, {
  32142. value: uuid
  32143. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InheritableContextProvider, {
  32144. prefixCls: prefixCls,
  32145. rootClassName: rootClassName,
  32146. mode: internalMode,
  32147. openKeys: mergedOpenKeys,
  32148. rtl: isRtl
  32149. // Disabled
  32150. ,
  32151. disabled: disabled
  32152. // Motion
  32153. ,
  32154. motion: mounted ? motion : null,
  32155. defaultMotions: mounted ? defaultMotions : null
  32156. // Active
  32157. ,
  32158. activeKey: mergedActiveKey,
  32159. onActive: onActive,
  32160. onInactive: onInactive
  32161. // Selection
  32162. ,
  32163. selectedKeys: mergedSelectKeys
  32164. // Level
  32165. ,
  32166. inlineIndent: inlineIndent
  32167. // Popup
  32168. ,
  32169. subMenuOpenDelay: subMenuOpenDelay,
  32170. subMenuCloseDelay: subMenuCloseDelay,
  32171. forceSubMenuRender: forceSubMenuRender,
  32172. builtinPlacements: builtinPlacements,
  32173. triggerSubMenuAction: triggerSubMenuAction,
  32174. getPopupContainer: getPopupContainer
  32175. // Icon
  32176. ,
  32177. itemIcon: itemIcon,
  32178. expandIcon: expandIcon
  32179. // Events
  32180. ,
  32181. onItemClick: onInternalClick,
  32182. onOpenChange: onInternalOpenChange
  32183. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PathUserContext.Provider, {
  32184. value: pathUserContext
  32185. }, container), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  32186. style: {
  32187. display: 'none'
  32188. },
  32189. "aria-hidden": true
  32190. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PathRegisterContext.Provider, {
  32191. value: registerPathContext
  32192. }, measureChildList)))));
  32193. });
  32194. /* harmony default export */ var es_Menu = (Menu);
  32195. ;// ./node_modules/rc-menu/es/index.js
  32196. var ExportMenu = es_Menu;
  32197. ExportMenu.Item = es_MenuItem;
  32198. ExportMenu.SubMenu = es_SubMenu;
  32199. ExportMenu.ItemGroup = es_MenuItemGroup;
  32200. ExportMenu.Divider = Divider;
  32201. /* harmony default export */ var rc_menu_es = (ExportMenu);
  32202. ;// ./node_modules/@ant-design/icons-svg/es/asn/BarsOutlined.js
  32203. // This icon file is generated automatically.
  32204. var BarsOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "bars", "theme": "outlined" };
  32205. /* harmony default export */ var asn_BarsOutlined = (BarsOutlined);
  32206. ;// ./node_modules/@ant-design/icons/es/icons/BarsOutlined.js
  32207. // GENERATE BY ./scripts/generate.ts
  32208. // DON NOT EDIT IT MANUALLY
  32209. var BarsOutlined_BarsOutlined = function BarsOutlined(props, ref) {
  32210. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  32211. ref: ref,
  32212. icon: asn_BarsOutlined
  32213. }));
  32214. };
  32215. /**![bars](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkxMiAxOTJIMzI4Yy00LjQgMC04IDMuNi04IDh2NTZjMCA0LjQgMy42IDggOCA4aDU4NGM0LjQgMCA4LTMuNiA4LTh2LTU2YzAtNC40LTMuNi04LTgtOHptMCAyODRIMzI4Yy00LjQgMC04IDMuNi04IDh2NTZjMCA0LjQgMy42IDggOCA4aDU4NGM0LjQgMCA4LTMuNiA4LTh2LTU2YzAtNC40LTMuNi04LTgtOHptMCAyODRIMzI4Yy00LjQgMC04IDMuNi04IDh2NTZjMCA0LjQgMy42IDggOCA4aDU4NGM0LjQgMCA4LTMuNiA4LTh2LTU2YzAtNC40LTMuNi04LTgtOHpNMTA0IDIyOGE1NiA1NiAwIDEwMTEyIDAgNTYgNTYgMCAxMC0xMTIgMHptMCAyODRhNTYgNTYgMCAxMDExMiAwIDU2IDU2IDAgMTAtMTEyIDB6bTAgMjg0YTU2IDU2IDAgMTAxMTIgMCA1NiA1NiAwIDEwLTExMiAweiIgLz48L3N2Zz4=) */
  32216. var BarsOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(BarsOutlined_BarsOutlined);
  32217. if (true) {
  32218. BarsOutlined_RefIcon.displayName = 'BarsOutlined';
  32219. }
  32220. /* harmony default export */ var icons_BarsOutlined = (BarsOutlined_RefIcon);
  32221. ;// ./components/layout/context.ts
  32222. const LayoutContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  32223. siderHook: {
  32224. addSider: () => null,
  32225. removeSider: () => null
  32226. }
  32227. });
  32228. // EXTERNAL MODULE: ./components/layout/style/index.ts
  32229. var layout_style = __webpack_require__("./components/layout/style/index.ts");
  32230. ;// ./components/layout/style/sider.ts
  32231. const genSiderStyle = token => {
  32232. const {
  32233. componentCls,
  32234. siderBg,
  32235. motionDurationMid,
  32236. motionDurationSlow,
  32237. antCls,
  32238. triggerHeight,
  32239. triggerColor,
  32240. triggerBg,
  32241. headerHeight,
  32242. zeroTriggerWidth,
  32243. zeroTriggerHeight,
  32244. borderRadiusLG,
  32245. lightSiderBg,
  32246. lightTriggerColor,
  32247. lightTriggerBg,
  32248. bodyBg
  32249. } = token;
  32250. return {
  32251. [componentCls]: {
  32252. position: 'relative',
  32253. // fix firefox can't set width smaller than content on flex item
  32254. minWidth: 0,
  32255. background: siderBg,
  32256. transition: `all ${motionDurationMid}, background 0s`,
  32257. '&-has-trigger': {
  32258. paddingBottom: triggerHeight
  32259. },
  32260. '&-right': {
  32261. order: 1
  32262. },
  32263. [`${componentCls}-children`]: {
  32264. height: '100%',
  32265. // Hack for fixing margin collapse bug
  32266. // https://github.com/ant-design/ant-design/issues/7967
  32267. // solution from https://stackoverflow.com/a/33132624/3040605
  32268. marginTop: -0.1,
  32269. paddingTop: 0.1,
  32270. [`${antCls}-menu${antCls}-menu-inline-collapsed`]: {
  32271. width: 'auto'
  32272. }
  32273. },
  32274. [`&-zero-width ${componentCls}-children`]: {
  32275. overflow: 'hidden'
  32276. },
  32277. [`${componentCls}-trigger`]: {
  32278. position: 'fixed',
  32279. bottom: 0,
  32280. zIndex: 1,
  32281. height: triggerHeight,
  32282. color: triggerColor,
  32283. lineHeight: (0,cssinjs.unit)(triggerHeight),
  32284. textAlign: 'center',
  32285. background: triggerBg,
  32286. cursor: 'pointer',
  32287. transition: `all ${motionDurationMid}`
  32288. },
  32289. [`${componentCls}-zero-width-trigger`]: {
  32290. position: 'absolute',
  32291. top: headerHeight,
  32292. insetInlineEnd: token.calc(zeroTriggerWidth).mul(-1).equal(),
  32293. zIndex: 1,
  32294. width: zeroTriggerWidth,
  32295. height: zeroTriggerHeight,
  32296. color: triggerColor,
  32297. fontSize: token.fontSizeXL,
  32298. display: 'flex',
  32299. alignItems: 'center',
  32300. justifyContent: 'center',
  32301. background: siderBg,
  32302. borderRadius: `0 ${(0,cssinjs.unit)(borderRadiusLG)} ${(0,cssinjs.unit)(borderRadiusLG)} 0`,
  32303. cursor: 'pointer',
  32304. transition: `background ${motionDurationSlow} ease`,
  32305. '&::after': {
  32306. position: 'absolute',
  32307. inset: 0,
  32308. background: 'transparent',
  32309. transition: `all ${motionDurationSlow}`,
  32310. content: '""'
  32311. },
  32312. '&:hover::after': {
  32313. background: `rgba(255, 255, 255, 0.2)`
  32314. },
  32315. '&-right': {
  32316. insetInlineStart: token.calc(zeroTriggerWidth).mul(-1).equal(),
  32317. borderRadius: `${(0,cssinjs.unit)(borderRadiusLG)} 0 0 ${(0,cssinjs.unit)(borderRadiusLG)}`
  32318. }
  32319. },
  32320. // Light
  32321. '&-light': {
  32322. background: lightSiderBg,
  32323. [`${componentCls}-trigger`]: {
  32324. color: lightTriggerColor,
  32325. background: lightTriggerBg
  32326. },
  32327. [`${componentCls}-zero-width-trigger`]: {
  32328. color: lightTriggerColor,
  32329. background: lightTriggerBg,
  32330. border: `1px solid ${bodyBg}`,
  32331. // Safe to modify to any other color
  32332. borderInlineStart: 0
  32333. }
  32334. }
  32335. }
  32336. };
  32337. };
  32338. /* harmony default export */ var sider = ((0,genStyleUtils.genStyleHooks)(['Layout', 'Sider'], genSiderStyle, layout_style.prepareComponentToken, {
  32339. deprecatedTokens: layout_style.DEPRECATED_TOKENS
  32340. }));
  32341. ;// ./components/layout/Sider.tsx
  32342. var Sider_rest = undefined && undefined.__rest || function (s, e) {
  32343. var t = {};
  32344. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  32345. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  32346. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  32347. }
  32348. return t;
  32349. };
  32350. const dimensionMaxMap = {
  32351. xs: '479.98px',
  32352. sm: '575.98px',
  32353. md: '767.98px',
  32354. lg: '991.98px',
  32355. xl: '1199.98px',
  32356. xxl: '1599.98px'
  32357. };
  32358. const isNumeric = value => !Number.isNaN(Number.parseFloat(value)) && isFinite(value);
  32359. const SiderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  32360. const generateId = (() => {
  32361. let i = 0;
  32362. return (prefix = '') => {
  32363. i += 1;
  32364. return `${prefix}${i}`;
  32365. };
  32366. })();
  32367. const Sider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  32368. const {
  32369. prefixCls: customizePrefixCls,
  32370. className,
  32371. trigger,
  32372. children,
  32373. defaultCollapsed = false,
  32374. theme = 'dark',
  32375. style = {},
  32376. collapsible = false,
  32377. reverseArrow = false,
  32378. width = 200,
  32379. collapsedWidth = 80,
  32380. zeroWidthTriggerStyle,
  32381. breakpoint,
  32382. onCollapse,
  32383. onBreakpoint
  32384. } = props,
  32385. otherProps = Sider_rest(props, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]);
  32386. const {
  32387. siderHook
  32388. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(LayoutContext);
  32389. const [collapsed, setCollapsed] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('collapsed' in props ? props.collapsed : defaultCollapsed);
  32390. const [below, setBelow] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
  32391. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  32392. if ('collapsed' in props) {
  32393. setCollapsed(props.collapsed);
  32394. }
  32395. }, [props.collapsed]);
  32396. const handleSetCollapsed = (value, type) => {
  32397. if (!('collapsed' in props)) {
  32398. setCollapsed(value);
  32399. }
  32400. onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(value, type);
  32401. };
  32402. // =========================== Prefix ===========================
  32403. const {
  32404. getPrefixCls,
  32405. direction
  32406. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  32407. const prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
  32408. const [wrapCSSVar, hashId, cssVarCls] = sider(prefixCls);
  32409. // ========================= Responsive =========================
  32410. const responsiveHandlerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  32411. responsiveHandlerRef.current = mql => {
  32412. setBelow(mql.matches);
  32413. onBreakpoint === null || onBreakpoint === void 0 ? void 0 : onBreakpoint(mql.matches);
  32414. if (collapsed !== mql.matches) {
  32415. handleSetCollapsed(mql.matches, 'responsive');
  32416. }
  32417. };
  32418. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  32419. function responsiveHandler(mql) {
  32420. var _a;
  32421. return (_a = responsiveHandlerRef.current) === null || _a === void 0 ? void 0 : _a.call(responsiveHandlerRef, mql);
  32422. }
  32423. let mql;
  32424. if (typeof (window === null || window === void 0 ? void 0 : window.matchMedia) !== 'undefined' && breakpoint && breakpoint in dimensionMaxMap) {
  32425. mql = window.matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
  32426. addMediaQueryListener(mql, responsiveHandler);
  32427. responsiveHandler(mql);
  32428. }
  32429. return () => {
  32430. removeMediaQueryListener(mql, responsiveHandler);
  32431. };
  32432. }, [breakpoint]); // in order to accept dynamic 'breakpoint' property, we need to add 'breakpoint' into dependency array.
  32433. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  32434. const uniqueId = generateId('ant-sider-');
  32435. siderHook.addSider(uniqueId);
  32436. return () => siderHook.removeSider(uniqueId);
  32437. }, []);
  32438. const toggle = () => {
  32439. handleSetCollapsed(!collapsed, 'clickTrigger');
  32440. };
  32441. const divProps = (0,omit["default"])(otherProps, ['collapsed']);
  32442. const rawWidth = collapsed ? collapsedWidth : width;
  32443. // use "px" as fallback unit for width
  32444. const siderWidth = isNumeric(rawWidth) ? `${rawWidth}px` : String(rawWidth);
  32445. // special trigger when collapsedWidth == 0
  32446. const zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  32447. onClick: toggle,
  32448. className: classnames_default()(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? 'right' : 'left'}`),
  32449. style: zeroWidthTriggerStyle
  32450. }, trigger || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_BarsOutlined, null))) : null;
  32451. const reverseIcon = direction === 'rtl' === !reverseArrow;
  32452. const iconObj = {
  32453. expanded: reverseIcon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null),
  32454. collapsed: reverseIcon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null)
  32455. };
  32456. const status = collapsed ? 'collapsed' : 'expanded';
  32457. const defaultTrigger = iconObj[status];
  32458. const triggerDom = trigger !== null ? zeroWidthTrigger || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  32459. className: `${prefixCls}-trigger`,
  32460. onClick: toggle,
  32461. style: {
  32462. width: siderWidth
  32463. }
  32464. }, trigger || defaultTrigger)) : null;
  32465. const divStyle = Object.assign(Object.assign({}, style), {
  32466. flex: `0 0 ${siderWidth}`,
  32467. maxWidth: siderWidth,
  32468. minWidth: siderWidth,
  32469. width: siderWidth
  32470. });
  32471. const siderCls = classnames_default()(prefixCls, `${prefixCls}-${theme}`, {
  32472. [`${prefixCls}-collapsed`]: !!collapsed,
  32473. [`${prefixCls}-has-trigger`]: collapsible && trigger !== null && !zeroWidthTrigger,
  32474. [`${prefixCls}-below`]: !!below,
  32475. [`${prefixCls}-zero-width`]: parseFloat(siderWidth) === 0
  32476. }, className, hashId, cssVarCls);
  32477. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  32478. siderCollapsed: collapsed
  32479. }), [collapsed]);
  32480. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SiderContext.Provider, {
  32481. value: contextValue
  32482. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("aside", Object.assign({
  32483. className: siderCls
  32484. }, divProps, {
  32485. style: divStyle,
  32486. ref: ref
  32487. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  32488. className: `${prefixCls}-children`
  32489. }, children), collapsible || below && zeroWidthTrigger ? triggerDom : null)));
  32490. });
  32491. if (true) {
  32492. Sider.displayName = 'Sider';
  32493. }
  32494. /* harmony default export */ var layout_Sider = (Sider);
  32495. ;// ./node_modules/@ant-design/icons-svg/es/asn/EllipsisOutlined.js
  32496. // This icon file is generated automatically.
  32497. var EllipsisOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "ellipsis", "theme": "outlined" };
  32498. /* harmony default export */ var asn_EllipsisOutlined = (EllipsisOutlined);
  32499. ;// ./node_modules/@ant-design/icons/es/icons/EllipsisOutlined.js
  32500. // GENERATE BY ./scripts/generate.ts
  32501. // DON NOT EDIT IT MANUALLY
  32502. var EllipsisOutlined_EllipsisOutlined = function EllipsisOutlined(props, ref) {
  32503. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  32504. ref: ref,
  32505. icon: asn_EllipsisOutlined
  32506. }));
  32507. };
  32508. /**![ellipsis](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE3NiA1MTFhNTYgNTYgMCAxMDExMiAwIDU2IDU2IDAgMTAtMTEyIDB6bTI4MCAwYTU2IDU2IDAgMTAxMTIgMCA1NiA1NiAwIDEwLTExMiAwem0yODAgMGE1NiA1NiAwIDEwMTEyIDAgNTYgNTYgMCAxMC0xMTIgMHoiIC8+PC9zdmc+) */
  32509. var EllipsisOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EllipsisOutlined_EllipsisOutlined);
  32510. if (true) {
  32511. EllipsisOutlined_RefIcon.displayName = 'EllipsisOutlined';
  32512. }
  32513. /* harmony default export */ var icons_EllipsisOutlined = (EllipsisOutlined_RefIcon);
  32514. ;// ./components/menu/MenuContext.tsx
  32515. const MenuContext_MenuContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({
  32516. prefixCls: '',
  32517. firstLevel: true,
  32518. inlineCollapsed: false
  32519. });
  32520. /* harmony default export */ var menu_MenuContext = (MenuContext_MenuContext);
  32521. ;// ./components/menu/MenuDivider.tsx
  32522. var MenuDivider_rest = undefined && undefined.__rest || function (s, e) {
  32523. var t = {};
  32524. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  32525. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  32526. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  32527. }
  32528. return t;
  32529. };
  32530. const MenuDivider = props => {
  32531. const {
  32532. prefixCls: customizePrefixCls,
  32533. className,
  32534. dashed
  32535. } = props,
  32536. restProps = MenuDivider_rest(props, ["prefixCls", "className", "dashed"]);
  32537. const {
  32538. getPrefixCls
  32539. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  32540. const prefixCls = getPrefixCls('menu', customizePrefixCls);
  32541. const classString = classnames_default()({
  32542. [`${prefixCls}-item-divider-dashed`]: !!dashed
  32543. }, className);
  32544. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Divider, Object.assign({
  32545. className: classString
  32546. }, restProps));
  32547. };
  32548. /* harmony default export */ var menu_MenuDivider = (MenuDivider);
  32549. ;// ./components/menu/MenuItem.tsx
  32550. const MenuItem_MenuItem = props => {
  32551. var _a;
  32552. const {
  32553. className,
  32554. children,
  32555. icon,
  32556. title,
  32557. danger,
  32558. extra
  32559. } = props;
  32560. const {
  32561. prefixCls,
  32562. firstLevel,
  32563. direction,
  32564. disableMenuItemTitleTooltip,
  32565. inlineCollapsed: isInlineCollapsed
  32566. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(menu_MenuContext);
  32567. const renderItemChildren = inlineCollapsed => {
  32568. const label = children === null || children === void 0 ? void 0 : children[0];
  32569. const wrapNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  32570. className: classnames_default()(`${prefixCls}-title-content`, {
  32571. [`${prefixCls}-title-content-with-extra`]: !!extra || extra === 0
  32572. })
  32573. }, children);
  32574. // inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span
  32575. // ref: https://github.com/ant-design/ant-design/pull/23456
  32576. if (!icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children) && children.type === 'span') {
  32577. if (children && inlineCollapsed && firstLevel && typeof label === 'string') {
  32578. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  32579. className: `${prefixCls}-inline-collapsed-noicon`
  32580. }, label.charAt(0));
  32581. }
  32582. }
  32583. return wrapNode;
  32584. };
  32585. const {
  32586. siderCollapsed
  32587. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SiderContext);
  32588. let tooltipTitle = title;
  32589. if (typeof title === 'undefined') {
  32590. tooltipTitle = firstLevel ? children : '';
  32591. } else if (title === false) {
  32592. tooltipTitle = '';
  32593. }
  32594. const tooltipProps = {
  32595. title: tooltipTitle
  32596. };
  32597. if (!siderCollapsed && !isInlineCollapsed) {
  32598. tooltipProps.title = null;
  32599. // Reset `open` to fix control mode tooltip display not correct
  32600. // ref: https://github.com/ant-design/ant-design/issues/16742
  32601. tooltipProps.open = false;
  32602. }
  32603. const childrenLength = (0,toArray["default"])(children).length;
  32604. let returnNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, Object.assign({}, (0,omit["default"])(props, ['title', 'icon', 'danger']), {
  32605. className: classnames_default()({
  32606. [`${prefixCls}-item-danger`]: danger,
  32607. [`${prefixCls}-item-only-child`]: (icon ? childrenLength + 1 : childrenLength) === 1
  32608. }, className),
  32609. title: typeof title === 'string' ? title : undefined
  32610. }), (0,reactNode.cloneElement)(icon, {
  32611. className: classnames_default()(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : undefined, `${prefixCls}-item-icon`)
  32612. }), renderItemChildren(isInlineCollapsed));
  32613. if (!disableMenuItemTitleTooltip) {
  32614. returnNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, tooltipProps, {
  32615. placement: direction === 'rtl' ? 'left' : 'right',
  32616. classNames: {
  32617. root: `${prefixCls}-inline-collapsed-tooltip`
  32618. }
  32619. }), returnNode);
  32620. }
  32621. return returnNode;
  32622. };
  32623. /* harmony default export */ var menu_MenuItem = (MenuItem_MenuItem);
  32624. ;// ./components/menu/OverrideContext.tsx
  32625. var OverrideContext_rest = undefined && undefined.__rest || function (s, e) {
  32626. var t = {};
  32627. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  32628. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  32629. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  32630. }
  32631. return t;
  32632. };
  32633. const OverrideContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  32634. /** @internal Only used for Dropdown component. Do not use this in your production. */
  32635. const OverrideProvider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  32636. const {
  32637. children
  32638. } = props,
  32639. restProps = OverrideContext_rest(props, ["children"]);
  32640. const override = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(OverrideContext);
  32641. const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, override), restProps), [override, restProps.prefixCls,
  32642. // restProps.expandIcon, Not mark as deps since this is a ReactNode
  32643. restProps.mode, restProps.selectable, restProps.rootClassName
  32644. // restProps.validator, Not mark as deps since this is a function
  32645. ]);
  32646. const canRef = (0,es_ref.supportNodeRef)(children);
  32647. const mergedRef = (0,es_ref.useComposeRef)(ref, canRef ? (0,es_ref.getNodeRef)(children) : null);
  32648. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverrideContext.Provider, {
  32649. value: context
  32650. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  32651. space: true
  32652. }, canRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
  32653. ref: mergedRef
  32654. }) : children));
  32655. });
  32656. /** @internal Only used for Dropdown component. Do not use this in your production. */
  32657. /* harmony default export */ var menu_OverrideContext = (OverrideContext);
  32658. // EXTERNAL MODULE: ./components/menu/style/index.ts + 4 modules
  32659. var menu_style = __webpack_require__("./components/menu/style/index.ts");
  32660. ;// ./components/menu/SubMenu.tsx
  32661. const SubMenu_SubMenu = props => {
  32662. var _a;
  32663. const {
  32664. popupClassName,
  32665. icon,
  32666. title,
  32667. theme: customTheme
  32668. } = props;
  32669. const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(menu_MenuContext);
  32670. const {
  32671. prefixCls,
  32672. inlineCollapsed,
  32673. theme: contextTheme
  32674. } = context;
  32675. const parentPath = useFullPath();
  32676. let titleNode;
  32677. if (!icon) {
  32678. titleNode = inlineCollapsed && !parentPath.length && title && typeof title === 'string' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  32679. className: `${prefixCls}-inline-collapsed-noicon`
  32680. }, title.charAt(0))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  32681. className: `${prefixCls}-title-content`
  32682. }, title));
  32683. } else {
  32684. // inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span
  32685. // ref: https://github.com/ant-design/ant-design/pull/23456
  32686. const titleIsSpan = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(title) && title.type === 'span';
  32687. titleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, (0,reactNode.cloneElement)(icon, {
  32688. className: classnames_default()(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : undefined, `${prefixCls}-item-icon`)
  32689. }), titleIsSpan ? title : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  32690. className: `${prefixCls}-title-content`
  32691. }, title));
  32692. }
  32693. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, context), {
  32694. firstLevel: false
  32695. }), [context]);
  32696. // ============================ zIndex ============================
  32697. const [zIndex] = (0,useZIndex.useZIndex)('Menu');
  32698. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu_MenuContext.Provider, {
  32699. value: contextValue
  32700. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_SubMenu, Object.assign({}, (0,omit["default"])(props, ['icon']), {
  32701. title: titleNode,
  32702. popupClassName: classnames_default()(prefixCls, popupClassName, `${prefixCls}-${customTheme || contextTheme}`),
  32703. popupStyle: Object.assign({
  32704. zIndex
  32705. }, props.popupStyle)
  32706. })));
  32707. };
  32708. /* harmony default export */ var menu_SubMenu = (SubMenu_SubMenu);
  32709. ;// ./components/menu/menu.tsx
  32710. var menu_rest = undefined && undefined.__rest || function (s, e) {
  32711. var t = {};
  32712. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  32713. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  32714. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  32715. }
  32716. return t;
  32717. };
  32718. function isEmptyIcon(icon) {
  32719. return icon === null || icon === false;
  32720. }
  32721. const MENU_COMPONENTS = {
  32722. item: menu_MenuItem,
  32723. submenu: menu_SubMenu,
  32724. divider: menu_MenuDivider
  32725. };
  32726. const InternalMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  32727. var _a;
  32728. const override = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(menu_OverrideContext);
  32729. const overrideObj = override || {};
  32730. const {
  32731. getPrefixCls,
  32732. getPopupContainer,
  32733. direction,
  32734. menu
  32735. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  32736. const rootPrefixCls = getPrefixCls();
  32737. const {
  32738. prefixCls: customizePrefixCls,
  32739. className,
  32740. style,
  32741. theme = 'light',
  32742. expandIcon,
  32743. _internalDisableMenuItemTitleTooltip,
  32744. inlineCollapsed,
  32745. siderCollapsed,
  32746. rootClassName,
  32747. mode,
  32748. selectable,
  32749. onClick,
  32750. overflowedIndicatorPopupClassName
  32751. } = props,
  32752. restProps = menu_rest(props, ["prefixCls", "className", "style", "theme", "expandIcon", "_internalDisableMenuItemTitleTooltip", "inlineCollapsed", "siderCollapsed", "rootClassName", "mode", "selectable", "onClick", "overflowedIndicatorPopupClassName"]);
  32753. const passedProps = (0,omit["default"])(restProps, ['collapsedWidth']);
  32754. // ======================== Warning ==========================
  32755. if (true) {
  32756. const warning = (0,_util_warning.devUseWarning)('Menu');
  32757. true ? warning(!('inlineCollapsed' in props && mode !== 'inline'), 'usage', '`inlineCollapsed` should only be used when `mode` is inline.') : 0;
  32758. warning.deprecated('items' in props && !props.children, 'children', 'items');
  32759. }
  32760. (_a = overrideObj.validator) === null || _a === void 0 ? void 0 : _a.call(overrideObj, {
  32761. mode
  32762. });
  32763. // ========================== Click ==========================
  32764. // Tell dropdown that item clicked
  32765. const onItemClick = (0,useEvent["default"])((...args) => {
  32766. var _a;
  32767. onClick === null || onClick === void 0 ? void 0 : onClick.apply(void 0, args);
  32768. (_a = overrideObj.onClick) === null || _a === void 0 ? void 0 : _a.call(overrideObj);
  32769. });
  32770. // ========================== Mode ===========================
  32771. const mergedMode = overrideObj.mode || mode;
  32772. // ======================= Selectable ========================
  32773. const mergedSelectable = selectable !== null && selectable !== void 0 ? selectable : overrideObj.selectable;
  32774. // ======================== Collapsed ========================
  32775. // Inline Collapsed
  32776. const mergedInlineCollapsed = inlineCollapsed !== null && inlineCollapsed !== void 0 ? inlineCollapsed : siderCollapsed;
  32777. const defaultMotions = {
  32778. horizontal: {
  32779. motionName: `${rootPrefixCls}-slide-up`
  32780. },
  32781. inline: (0,_util_motion["default"])(rootPrefixCls),
  32782. other: {
  32783. motionName: `${rootPrefixCls}-zoom-big`
  32784. }
  32785. };
  32786. const prefixCls = getPrefixCls('menu', customizePrefixCls || overrideObj.prefixCls);
  32787. const rootCls = hooks_useCSSVarCls(prefixCls);
  32788. const [wrapCSSVar, hashId, cssVarCls] = (0,menu_style["default"])(prefixCls, rootCls, !override);
  32789. const menuClassName = classnames_default()(`${prefixCls}-${theme}`, menu === null || menu === void 0 ? void 0 : menu.className, className);
  32790. // ====================== ExpandIcon ========================
  32791. const mergedExpandIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  32792. var _a, _b;
  32793. if (typeof expandIcon === 'function' || isEmptyIcon(expandIcon)) {
  32794. return expandIcon || null;
  32795. }
  32796. if (typeof overrideObj.expandIcon === 'function' || isEmptyIcon(overrideObj.expandIcon)) {
  32797. return overrideObj.expandIcon || null;
  32798. }
  32799. if (typeof (menu === null || menu === void 0 ? void 0 : menu.expandIcon) === 'function' || isEmptyIcon(menu === null || menu === void 0 ? void 0 : menu.expandIcon)) {
  32800. return (menu === null || menu === void 0 ? void 0 : menu.expandIcon) || null;
  32801. }
  32802. const mergedIcon = (_a = expandIcon !== null && expandIcon !== void 0 ? expandIcon : overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon) !== null && _a !== void 0 ? _a : menu === null || menu === void 0 ? void 0 : menu.expandIcon;
  32803. return (0,reactNode.cloneElement)(mergedIcon, {
  32804. className: classnames_default()(`${prefixCls}-submenu-expand-icon`, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedIcon) ? (_b = mergedIcon.props) === null || _b === void 0 ? void 0 : _b.className : undefined)
  32805. });
  32806. }, [expandIcon, overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon, menu === null || menu === void 0 ? void 0 : menu.expandIcon, prefixCls]);
  32807. // ======================== Context ==========================
  32808. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  32809. prefixCls,
  32810. inlineCollapsed: mergedInlineCollapsed || false,
  32811. direction,
  32812. firstLevel: true,
  32813. theme,
  32814. mode: mergedMode,
  32815. disableMenuItemTitleTooltip: _internalDisableMenuItemTitleTooltip
  32816. }), [prefixCls, mergedInlineCollapsed, direction, _internalDisableMenuItemTitleTooltip, theme]);
  32817. // ========================= Render ==========================
  32818. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu_OverrideContext.Provider, {
  32819. value: null
  32820. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu_MenuContext.Provider, {
  32821. value: contextValue
  32822. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_menu_es, Object.assign({
  32823. getPopupContainer: getPopupContainer,
  32824. overflowedIndicator: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EllipsisOutlined, null),
  32825. overflowedIndicatorPopupClassName: classnames_default()(prefixCls, `${prefixCls}-${theme}`, overflowedIndicatorPopupClassName),
  32826. mode: mergedMode,
  32827. selectable: mergedSelectable,
  32828. onClick: onItemClick
  32829. }, passedProps, {
  32830. inlineCollapsed: mergedInlineCollapsed,
  32831. style: Object.assign(Object.assign({}, menu === null || menu === void 0 ? void 0 : menu.style), style),
  32832. className: menuClassName,
  32833. prefixCls: prefixCls,
  32834. direction: direction,
  32835. defaultMotions: defaultMotions,
  32836. expandIcon: mergedExpandIcon,
  32837. ref: ref,
  32838. rootClassName: classnames_default()(rootClassName, hashId, overrideObj.rootClassName, cssVarCls, rootCls),
  32839. _internalComponents: MENU_COMPONENTS
  32840. })))));
  32841. });
  32842. /* harmony default export */ var menu = (InternalMenu);
  32843. ;// ./components/menu/index.tsx
  32844. const menu_Menu = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  32845. const menuRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  32846. const context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SiderContext);
  32847. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => ({
  32848. menu: menuRef.current,
  32849. focus: options => {
  32850. var _a;
  32851. (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.focus(options);
  32852. }
  32853. }));
  32854. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(menu, Object.assign({
  32855. ref: menuRef
  32856. }, props, context));
  32857. });
  32858. menu_Menu.Item = menu_MenuItem;
  32859. menu_Menu.SubMenu = menu_SubMenu;
  32860. menu_Menu.Divider = menu_MenuDivider;
  32861. menu_Menu.ItemGroup = es_MenuItemGroup;
  32862. if (true) {
  32863. menu_Menu.displayName = 'Menu';
  32864. }
  32865. /* harmony default export */ var components_menu = (menu_Menu);
  32866. // EXTERNAL MODULE: ./components/dropdown/style/index.ts + 1 modules
  32867. var dropdown_style = __webpack_require__("./components/dropdown/style/index.ts");
  32868. ;// ./components/dropdown/dropdown.tsx
  32869. const _Placements = ['topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', 'top', 'bottom'];
  32870. const dropdown_Dropdown = props => {
  32871. var _a;
  32872. const {
  32873. menu,
  32874. arrow,
  32875. prefixCls: customizePrefixCls,
  32876. children,
  32877. trigger,
  32878. disabled,
  32879. dropdownRender,
  32880. popupRender,
  32881. getPopupContainer,
  32882. overlayClassName,
  32883. rootClassName,
  32884. overlayStyle,
  32885. open,
  32886. onOpenChange,
  32887. // Deprecated
  32888. visible,
  32889. onVisibleChange,
  32890. mouseEnterDelay = 0.15,
  32891. mouseLeaveDelay = 0.1,
  32892. autoAdjustOverflow = true,
  32893. placement = '',
  32894. overlay,
  32895. transitionName,
  32896. destroyOnHidden,
  32897. destroyPopupOnHide
  32898. } = props;
  32899. const {
  32900. getPopupContainer: getContextPopupContainer,
  32901. getPrefixCls,
  32902. direction,
  32903. dropdown
  32904. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  32905. const mergedPopupRender = popupRender || dropdownRender;
  32906. // Warning for deprecated usage
  32907. const warning = (0,_util_warning.devUseWarning)('Dropdown');
  32908. if (true) {
  32909. const deprecatedProps = {
  32910. visible: 'open',
  32911. onVisibleChange: 'onOpenChange',
  32912. overlay: 'menu',
  32913. dropdownRender: 'popupRender',
  32914. destroyPopupOnHide: 'destroyOnHidden'
  32915. };
  32916. Object.entries(deprecatedProps).forEach(([deprecatedName, newName]) => {
  32917. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  32918. });
  32919. if (placement.includes('Center')) {
  32920. warning.deprecated(!placement.includes('Center'), `placement: ${placement}`, `placement: ${placement.slice(0, placement.indexOf('Center'))}`);
  32921. }
  32922. }
  32923. const memoTransitionName = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  32924. const rootPrefixCls = getPrefixCls();
  32925. if (transitionName !== undefined) {
  32926. return transitionName;
  32927. }
  32928. if (placement.includes('top')) {
  32929. return `${rootPrefixCls}-slide-down`;
  32930. }
  32931. return `${rootPrefixCls}-slide-up`;
  32932. }, [getPrefixCls, placement, transitionName]);
  32933. const memoPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  32934. if (!placement) {
  32935. return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
  32936. }
  32937. if (placement.includes('Center')) {
  32938. return placement.slice(0, placement.indexOf('Center'));
  32939. }
  32940. return placement;
  32941. }, [placement, direction]);
  32942. const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
  32943. const rootCls = hooks_useCSSVarCls(prefixCls);
  32944. const [wrapCSSVar, hashId, cssVarCls] = (0,dropdown_style["default"])(prefixCls, rootCls);
  32945. const [, token] = (0,useToken["default"])();
  32946. const child = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(_util_isPrimitive(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children) : children);
  32947. const popupTrigger = (0,reactNode.cloneElement)(child, {
  32948. className: classnames_default()(`${prefixCls}-trigger`, {
  32949. [`${prefixCls}-rtl`]: direction === 'rtl'
  32950. }, child.props.className),
  32951. disabled: (_a = child.props.disabled) !== null && _a !== void 0 ? _a : disabled
  32952. });
  32953. const triggerActions = disabled ? [] : trigger;
  32954. const alignPoint = !!(triggerActions === null || triggerActions === void 0 ? void 0 : triggerActions.includes('contextMenu'));
  32955. // =========================== Open ============================
  32956. const [mergedOpen, setOpen] = (0,useMergedState["default"])(false, {
  32957. value: open !== null && open !== void 0 ? open : visible
  32958. });
  32959. const onInnerOpenChange = (0,useEvent["default"])(nextOpen => {
  32960. onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen, {
  32961. source: 'trigger'
  32962. });
  32963. onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(nextOpen);
  32964. setOpen(nextOpen);
  32965. });
  32966. // =========================== Overlay ============================
  32967. const overlayClassNameCustomized = classnames_default()(overlayClassName, rootClassName, hashId, cssVarCls, rootCls, dropdown === null || dropdown === void 0 ? void 0 : dropdown.className, {
  32968. [`${prefixCls}-rtl`]: direction === 'rtl'
  32969. });
  32970. const builtinPlacements = getPlacements({
  32971. arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,
  32972. autoAdjustOverflow,
  32973. offset: token.marginXXS,
  32974. arrowWidth: arrow ? token.sizePopupArrow : 0,
  32975. borderRadius: token.borderRadius
  32976. });
  32977. const onMenuClick = (0,useEvent["default"])(() => {
  32978. if ((menu === null || menu === void 0 ? void 0 : menu.selectable) && (menu === null || menu === void 0 ? void 0 : menu.multiple)) {
  32979. return;
  32980. }
  32981. onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false, {
  32982. source: 'menu'
  32983. });
  32984. setOpen(false);
  32985. });
  32986. const renderOverlay = () => {
  32987. // rc-dropdown already can process the function of overlay, but we have check logic here.
  32988. // So we need render the element to check and pass back to rc-dropdown.
  32989. let overlayNode;
  32990. if (menu === null || menu === void 0 ? void 0 : menu.items) {
  32991. overlayNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_menu, Object.assign({}, menu));
  32992. } else if (typeof overlay === 'function') {
  32993. overlayNode = overlay();
  32994. } else {
  32995. overlayNode = overlay;
  32996. }
  32997. if (mergedPopupRender) {
  32998. overlayNode = mergedPopupRender(overlayNode);
  32999. }
  33000. overlayNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(typeof overlayNode === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, overlayNode) : overlayNode);
  33001. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverrideProvider, {
  33002. prefixCls: `${prefixCls}-menu`,
  33003. rootClassName: classnames_default()(cssVarCls, rootCls),
  33004. expandIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  33005. className: `${prefixCls}-menu-submenu-arrow`
  33006. }, direction === 'rtl' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, {
  33007. className: `${prefixCls}-menu-submenu-arrow-icon`
  33008. })) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], {
  33009. className: `${prefixCls}-menu-submenu-arrow-icon`
  33010. }))),
  33011. mode: "vertical",
  33012. selectable: false,
  33013. onClick: onMenuClick,
  33014. validator: ({
  33015. mode
  33016. }) => {
  33017. // Warning if use other mode
  33018. true ? warning(!mode || mode === 'vertical', 'usage', `mode="${mode}" is not supported for Dropdown's Menu.`) : 0;
  33019. }
  33020. }, overlayNode);
  33021. };
  33022. // =========================== zIndex ============================
  33023. const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Dropdown', overlayStyle === null || overlayStyle === void 0 ? void 0 : overlayStyle.zIndex);
  33024. // ============================ Render ============================
  33025. let renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_dropdown_es, Object.assign({
  33026. alignPoint: alignPoint
  33027. }, (0,omit["default"])(props, ['rootClassName']), {
  33028. mouseEnterDelay: mouseEnterDelay,
  33029. mouseLeaveDelay: mouseLeaveDelay,
  33030. visible: mergedOpen,
  33031. builtinPlacements: builtinPlacements,
  33032. arrow: !!arrow,
  33033. overlayClassName: overlayClassNameCustomized,
  33034. prefixCls: prefixCls,
  33035. getPopupContainer: getPopupContainer || getContextPopupContainer,
  33036. transitionName: memoTransitionName,
  33037. trigger: triggerActions,
  33038. overlay: renderOverlay,
  33039. placement: memoPlacement,
  33040. onVisibleChange: onInnerOpenChange,
  33041. overlayStyle: Object.assign(Object.assign(Object.assign({}, dropdown === null || dropdown === void 0 ? void 0 : dropdown.style), overlayStyle), {
  33042. zIndex
  33043. }),
  33044. autoDestroy: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyPopupOnHide
  33045. }), popupTrigger);
  33046. if (zIndex) {
  33047. renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
  33048. value: contextZIndex
  33049. }, renderNode);
  33050. }
  33051. return wrapCSSVar(renderNode);
  33052. };
  33053. // We don't care debug panel
  33054. const dropdown_PurePanel = _util_PurePanel(dropdown_Dropdown, 'align', undefined, 'dropdown', prefixCls => prefixCls);
  33055. /* istanbul ignore next */
  33056. const WrapPurePanel = props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(dropdown_PurePanel, Object.assign({}, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null)));
  33057. dropdown_Dropdown._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel;
  33058. if (true) {
  33059. dropdown_Dropdown.displayName = 'Dropdown';
  33060. }
  33061. /* harmony default export */ var dropdown = (dropdown_Dropdown);
  33062. ;// ./components/breadcrumb/BreadcrumbSeparator.tsx
  33063. const BreadcrumbSeparator = ({
  33064. children
  33065. }) => {
  33066. const {
  33067. getPrefixCls
  33068. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  33069. const prefixCls = getPrefixCls('breadcrumb');
  33070. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  33071. className: `${prefixCls}-separator`,
  33072. "aria-hidden": "true"
  33073. }, children === '' ? children : children || '/');
  33074. };
  33075. BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
  33076. /* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
  33077. ;// ./components/breadcrumb/useItemRender.tsx
  33078. var useItemRender_rest = undefined && undefined.__rest || function (s, e) {
  33079. var t = {};
  33080. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  33081. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  33082. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  33083. }
  33084. return t;
  33085. };
  33086. function getBreadcrumbName(route, params) {
  33087. if (route.title === undefined || route.title === null) {
  33088. return null;
  33089. }
  33090. const paramsKeys = Object.keys(params).join('|');
  33091. return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
  33092. }
  33093. function renderItem(prefixCls, item, children, href) {
  33094. if (children === null || children === undefined) {
  33095. return null;
  33096. }
  33097. const {
  33098. className,
  33099. onClick
  33100. } = item,
  33101. restItem = useItemRender_rest(item, ["className", "onClick"]);
  33102. const passedProps = Object.assign(Object.assign({}, (0,pickAttrs["default"])(restItem, {
  33103. data: true,
  33104. aria: true
  33105. })), {
  33106. onClick
  33107. });
  33108. if (href !== undefined) {
  33109. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", Object.assign({}, passedProps, {
  33110. className: classnames_default()(`${prefixCls}-link`, className),
  33111. href: href
  33112. }), children);
  33113. }
  33114. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, passedProps, {
  33115. className: classnames_default()(`${prefixCls}-link`, className)
  33116. }), children);
  33117. }
  33118. function useItemRender(prefixCls, itemRender) {
  33119. const mergedItemRender = (item, params, routes, path, href) => {
  33120. if (itemRender) {
  33121. return itemRender(item, params, routes, path);
  33122. }
  33123. const name = getBreadcrumbName(item, params);
  33124. return renderItem(prefixCls, item, name, href);
  33125. };
  33126. return mergedItemRender;
  33127. }
  33128. ;// ./components/breadcrumb/BreadcrumbItem.tsx
  33129. var BreadcrumbItem_rest = undefined && undefined.__rest || function (s, e) {
  33130. var t = {};
  33131. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  33132. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  33133. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  33134. }
  33135. return t;
  33136. };
  33137. const InternalBreadcrumbItem = props => {
  33138. const {
  33139. prefixCls,
  33140. separator = '/',
  33141. children,
  33142. menu,
  33143. overlay,
  33144. dropdownProps,
  33145. href
  33146. } = props;
  33147. // Warning for deprecated usage
  33148. if (true) {
  33149. const warning = (0,_util_warning.devUseWarning)('Breadcrumb.Item');
  33150. warning.deprecated(!('overlay' in props), 'overlay', 'menu');
  33151. }
  33152. /** If overlay is have Wrap a Dropdown */
  33153. const renderBreadcrumbNode = breadcrumbItem => {
  33154. if (menu || overlay) {
  33155. const mergeDropDownProps = Object.assign({}, dropdownProps);
  33156. if (menu) {
  33157. const _a = menu || {},
  33158. {
  33159. items
  33160. } = _a,
  33161. menuProps = BreadcrumbItem_rest(_a, ["items"]);
  33162. mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
  33163. items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
  33164. var {
  33165. key,
  33166. title,
  33167. label,
  33168. path
  33169. } = _a,
  33170. itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
  33171. let mergedLabel = label !== null && label !== void 0 ? label : title;
  33172. if (path) {
  33173. mergedLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  33174. href: `${href}${path}`
  33175. }, mergedLabel);
  33176. }
  33177. return Object.assign(Object.assign({}, itemProps), {
  33178. key: key !== null && key !== void 0 ? key : index,
  33179. label: mergedLabel
  33180. });
  33181. })
  33182. });
  33183. } else if (overlay) {
  33184. mergeDropDownProps.overlay = overlay;
  33185. }
  33186. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(dropdown, Object.assign({
  33187. placement: "bottom"
  33188. }, mergeDropDownProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  33189. className: `${prefixCls}-overlay-link`
  33190. }, breadcrumbItem, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, null)));
  33191. }
  33192. return breadcrumbItem;
  33193. };
  33194. // wrap to dropDown
  33195. const link = renderBreadcrumbNode(children);
  33196. if (link !== undefined && link !== null) {
  33197. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", null, link), separator && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
  33198. }
  33199. return null;
  33200. };
  33201. const BreadcrumbItem = props => {
  33202. const {
  33203. prefixCls: customizePrefixCls,
  33204. children,
  33205. href
  33206. } = props,
  33207. restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
  33208. const {
  33209. getPrefixCls
  33210. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  33211. const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
  33212. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
  33213. prefixCls: prefixCls
  33214. }), renderItem(prefixCls, restProps, children, href));
  33215. };
  33216. BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
  33217. /* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
  33218. // EXTERNAL MODULE: ./components/breadcrumb/style/index.ts
  33219. var breadcrumb_style = __webpack_require__("./components/breadcrumb/style/index.ts");
  33220. ;// ./components/breadcrumb/useItems.ts
  33221. var useItems_rest = undefined && undefined.__rest || function (s, e) {
  33222. var t = {};
  33223. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  33224. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  33225. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  33226. }
  33227. return t;
  33228. };
  33229. function route2item(route) {
  33230. const {
  33231. breadcrumbName,
  33232. children
  33233. } = route,
  33234. rest = useItems_rest(route, ["breadcrumbName", "children"]);
  33235. const clone = Object.assign({
  33236. title: breadcrumbName
  33237. }, rest);
  33238. if (children) {
  33239. clone.menu = {
  33240. items: children.map(_a => {
  33241. var {
  33242. breadcrumbName: itemBreadcrumbName
  33243. } = _a,
  33244. itemProps = useItems_rest(_a, ["breadcrumbName"]);
  33245. return Object.assign(Object.assign({}, itemProps), {
  33246. title: itemBreadcrumbName
  33247. });
  33248. })
  33249. };
  33250. }
  33251. return clone;
  33252. }
  33253. function useItems(items, routes) {
  33254. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  33255. if (items) {
  33256. return items;
  33257. }
  33258. if (routes) {
  33259. return routes.map(route2item);
  33260. }
  33261. return null;
  33262. }, [items, routes]);
  33263. }
  33264. ;// ./components/breadcrumb/Breadcrumb.tsx
  33265. var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) {
  33266. var t = {};
  33267. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  33268. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  33269. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  33270. }
  33271. return t;
  33272. };
  33273. const getPath = (params, path) => {
  33274. if (path === undefined) {
  33275. return path;
  33276. }
  33277. let mergedPath = (path || '').replace(/^\//, '');
  33278. Object.keys(params).forEach(key => {
  33279. mergedPath = mergedPath.replace(`:${key}`, params[key]);
  33280. });
  33281. return mergedPath;
  33282. };
  33283. const Breadcrumb = props => {
  33284. const {
  33285. prefixCls: customizePrefixCls,
  33286. separator = '/',
  33287. style,
  33288. className,
  33289. rootClassName,
  33290. routes: legacyRoutes,
  33291. items,
  33292. children,
  33293. itemRender,
  33294. params = {}
  33295. } = props,
  33296. restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
  33297. const {
  33298. getPrefixCls,
  33299. direction,
  33300. breadcrumb
  33301. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  33302. let crumbs;
  33303. const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
  33304. const [wrapCSSVar, hashId, cssVarCls] = (0,breadcrumb_style["default"])(prefixCls);
  33305. const mergedItems = useItems(items, legacyRoutes);
  33306. if (true) {
  33307. const warning = (0,_util_warning.devUseWarning)('Breadcrumb');
  33308. warning.deprecated(!legacyRoutes, 'routes', 'items');
  33309. // Deprecated warning for breadcrumb children
  33310. if (!mergedItems || mergedItems.length === 0) {
  33311. const childList = (0,toArray["default"])(children);
  33312. warning.deprecated(childList.length === 0, 'Breadcrumb.Item and Breadcrumb.Separator', 'items');
  33313. childList.forEach(element => {
  33314. if (element) {
  33315. true ? warning(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'usage', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children") : 0;
  33316. }
  33317. });
  33318. }
  33319. }
  33320. const mergedItemRender = useItemRender(prefixCls, itemRender);
  33321. if (mergedItems && mergedItems.length > 0) {
  33322. // generated by route
  33323. const paths = [];
  33324. const itemRenderRoutes = items || legacyRoutes;
  33325. crumbs = mergedItems.map((item, index) => {
  33326. const {
  33327. path,
  33328. key,
  33329. type,
  33330. menu,
  33331. overlay,
  33332. onClick,
  33333. className: itemClassName,
  33334. separator: itemSeparator,
  33335. dropdownProps
  33336. } = item;
  33337. const mergedPath = getPath(params, path);
  33338. if (mergedPath !== undefined) {
  33339. paths.push(mergedPath);
  33340. }
  33341. const mergedKey = key !== null && key !== void 0 ? key : index;
  33342. if (type === 'separator') {
  33343. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(breadcrumb_BreadcrumbSeparator, {
  33344. key: mergedKey
  33345. }, itemSeparator);
  33346. }
  33347. const itemProps = {};
  33348. const isLastItem = index === mergedItems.length - 1;
  33349. if (menu) {
  33350. itemProps.menu = menu;
  33351. } else if (overlay) {
  33352. itemProps.overlay = overlay;
  33353. }
  33354. let {
  33355. href
  33356. } = item;
  33357. if (paths.length && mergedPath !== undefined) {
  33358. href = `#/${paths.join('/')}`;
  33359. }
  33360. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalBreadcrumbItem, Object.assign({
  33361. key: mergedKey
  33362. }, itemProps, (0,pickAttrs["default"])(item, {
  33363. data: true,
  33364. aria: true
  33365. }), {
  33366. className: itemClassName,
  33367. dropdownProps: dropdownProps,
  33368. href: href,
  33369. separator: isLastItem ? '' : separator,
  33370. onClick: onClick,
  33371. prefixCls: prefixCls
  33372. }), mergedItemRender(item, params, itemRenderRoutes, paths, href));
  33373. });
  33374. } else if (children) {
  33375. const childrenLength = (0,toArray["default"])(children).length;
  33376. crumbs = (0,toArray["default"])(children).map((element, index) => {
  33377. if (!element) {
  33378. return element;
  33379. }
  33380. const isLastItem = index === childrenLength - 1;
  33381. return (0,reactNode.cloneElement)(element, {
  33382. separator: isLastItem ? '' : separator,
  33383. // eslint-disable-next-line react/no-array-index-key
  33384. key: index
  33385. });
  33386. });
  33387. }
  33388. const breadcrumbClassName = classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
  33389. [`${prefixCls}-rtl`]: direction === 'rtl'
  33390. }, className, rootClassName, hashId, cssVarCls);
  33391. const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
  33392. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("nav", Object.assign({
  33393. className: breadcrumbClassName,
  33394. style: mergedStyle
  33395. }, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ol", null, crumbs)));
  33396. };
  33397. Breadcrumb.Item = breadcrumb_BreadcrumbItem;
  33398. Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
  33399. if (true) {
  33400. Breadcrumb.displayName = 'Breadcrumb';
  33401. }
  33402. /* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
  33403. ;// ./components/breadcrumb/index.tsx
  33404. /* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
  33405. // EXTERNAL MODULE: external {"root":"dayjs","commonjs2":"dayjs","commonjs":"dayjs","amd":"dayjs"}
  33406. var external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_ = __webpack_require__("dayjs");
  33407. var external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_);
  33408. // EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekday.js
  33409. var weekday = __webpack_require__("./node_modules/dayjs/plugin/weekday.js");
  33410. var weekday_default = /*#__PURE__*/__webpack_require__.n(weekday);
  33411. // EXTERNAL MODULE: ./node_modules/dayjs/plugin/localeData.js
  33412. var localeData = __webpack_require__("./node_modules/dayjs/plugin/localeData.js");
  33413. var localeData_default = /*#__PURE__*/__webpack_require__.n(localeData);
  33414. // EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekOfYear.js
  33415. var weekOfYear = __webpack_require__("./node_modules/dayjs/plugin/weekOfYear.js");
  33416. var weekOfYear_default = /*#__PURE__*/__webpack_require__.n(weekOfYear);
  33417. // EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekYear.js
  33418. var weekYear = __webpack_require__("./node_modules/dayjs/plugin/weekYear.js");
  33419. var weekYear_default = /*#__PURE__*/__webpack_require__.n(weekYear);
  33420. // EXTERNAL MODULE: ./node_modules/dayjs/plugin/advancedFormat.js
  33421. var advancedFormat = __webpack_require__("./node_modules/dayjs/plugin/advancedFormat.js");
  33422. var advancedFormat_default = /*#__PURE__*/__webpack_require__.n(advancedFormat);
  33423. // EXTERNAL MODULE: ./node_modules/dayjs/plugin/customParseFormat.js
  33424. var customParseFormat = __webpack_require__("./node_modules/dayjs/plugin/customParseFormat.js");
  33425. var customParseFormat_default = /*#__PURE__*/__webpack_require__.n(customParseFormat);
  33426. ;// ./node_modules/rc-picker/es/generate/dayjs.js
  33427. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((customParseFormat_default()));
  33428. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((advancedFormat_default()));
  33429. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((weekday_default()));
  33430. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((localeData_default()));
  33431. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((weekOfYear_default()));
  33432. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend((weekYear_default()));
  33433. external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default().extend(function (o, c) {
  33434. // todo support Wo (ISO week)
  33435. var proto = c.prototype;
  33436. var oldFormat = proto.format;
  33437. proto.format = function f(formatStr) {
  33438. var str = (formatStr || '').replace('Wo', 'wo');
  33439. return oldFormat.bind(this)(str);
  33440. };
  33441. });
  33442. var localeMap = {
  33443. // ar_EG:
  33444. // az_AZ:
  33445. // bg_BG:
  33446. bn_BD: 'bn-bd',
  33447. by_BY: 'be',
  33448. // ca_ES:
  33449. // cs_CZ:
  33450. // da_DK:
  33451. // de_DE:
  33452. // el_GR:
  33453. en_GB: 'en-gb',
  33454. en_US: 'en',
  33455. // es_ES:
  33456. // et_EE:
  33457. // fa_IR:
  33458. // fi_FI:
  33459. fr_BE: 'fr',
  33460. // todo: dayjs has no fr_BE locale, use fr at present
  33461. fr_CA: 'fr-ca',
  33462. // fr_FR:
  33463. // ga_IE:
  33464. // gl_ES:
  33465. // he_IL:
  33466. // hi_IN:
  33467. // hr_HR:
  33468. // hu_HU:
  33469. hy_AM: 'hy-am',
  33470. // id_ID:
  33471. // is_IS:
  33472. // it_IT:
  33473. // ja_JP:
  33474. // ka_GE:
  33475. // kk_KZ:
  33476. // km_KH:
  33477. kmr_IQ: 'ku',
  33478. // kn_IN:
  33479. // ko_KR:
  33480. // ku_IQ: // previous ku in antd
  33481. // lt_LT:
  33482. // lv_LV:
  33483. // mk_MK:
  33484. // ml_IN:
  33485. // mn_MN:
  33486. // ms_MY:
  33487. // nb_NO:
  33488. // ne_NP:
  33489. nl_BE: 'nl-be',
  33490. // nl_NL:
  33491. // pl_PL:
  33492. pt_BR: 'pt-br',
  33493. // pt_PT:
  33494. // ro_RO:
  33495. // ru_RU:
  33496. // sk_SK:
  33497. // sl_SI:
  33498. // sr_RS:
  33499. // sv_SE:
  33500. // ta_IN:
  33501. // th_TH:
  33502. // tr_TR:
  33503. // uk_UA:
  33504. // ur_PK:
  33505. // vi_VN:
  33506. zh_CN: 'zh-cn',
  33507. zh_HK: 'zh-hk',
  33508. zh_TW: 'zh-tw'
  33509. };
  33510. var parseLocale = function parseLocale(locale) {
  33511. var mapLocale = localeMap[locale];
  33512. return mapLocale || locale.split('_')[0];
  33513. };
  33514. /* istanbul ignore next */
  33515. var parseNoMatchNotice = function parseNoMatchNotice() {
  33516. // zombieJ:
  33517. // When user typing, its always miss match format.
  33518. // This check is meaningless.
  33519. // https://github.com/ant-design/ant-design/issues/51839
  33520. // noteOnce(false, 'Not match any format. Please help to fire a issue about this.');
  33521. };
  33522. var generateConfig = {
  33523. // get
  33524. getNow: function getNow() {
  33525. var now = external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()();
  33526. // https://github.com/ant-design/ant-design/discussions/50934
  33527. if (typeof now.tz === 'function') {
  33528. return now.tz(); // use default timezone
  33529. }
  33530. return now;
  33531. },
  33532. getFixedDate: function getFixedDate(string) {
  33533. return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()(string, ['YYYY-M-DD', 'YYYY-MM-DD']);
  33534. },
  33535. getEndDate: function getEndDate(date) {
  33536. return date.endOf('month');
  33537. },
  33538. getWeekDay: function getWeekDay(date) {
  33539. var clone = date.locale('en');
  33540. return clone.weekday() + clone.localeData().firstDayOfWeek();
  33541. },
  33542. getYear: function getYear(date) {
  33543. return date.year();
  33544. },
  33545. getMonth: function getMonth(date) {
  33546. return date.month();
  33547. },
  33548. getDate: function getDate(date) {
  33549. return date.date();
  33550. },
  33551. getHour: function getHour(date) {
  33552. return date.hour();
  33553. },
  33554. getMinute: function getMinute(date) {
  33555. return date.minute();
  33556. },
  33557. getSecond: function getSecond(date) {
  33558. return date.second();
  33559. },
  33560. getMillisecond: function getMillisecond(date) {
  33561. return date.millisecond();
  33562. },
  33563. // set
  33564. addYear: function addYear(date, diff) {
  33565. return date.add(diff, 'year');
  33566. },
  33567. addMonth: function addMonth(date, diff) {
  33568. return date.add(diff, 'month');
  33569. },
  33570. addDate: function addDate(date, diff) {
  33571. return date.add(diff, 'day');
  33572. },
  33573. setYear: function setYear(date, year) {
  33574. return date.year(year);
  33575. },
  33576. setMonth: function setMonth(date, month) {
  33577. return date.month(month);
  33578. },
  33579. setDate: function setDate(date, num) {
  33580. return date.date(num);
  33581. },
  33582. setHour: function setHour(date, hour) {
  33583. return date.hour(hour);
  33584. },
  33585. setMinute: function setMinute(date, minute) {
  33586. return date.minute(minute);
  33587. },
  33588. setSecond: function setSecond(date, second) {
  33589. return date.second(second);
  33590. },
  33591. setMillisecond: function setMillisecond(date, milliseconds) {
  33592. return date.millisecond(milliseconds);
  33593. },
  33594. // Compare
  33595. isAfter: function isAfter(date1, date2) {
  33596. return date1.isAfter(date2);
  33597. },
  33598. isValidate: function isValidate(date) {
  33599. return date.isValid();
  33600. },
  33601. locale: {
  33602. getWeekFirstDay: function getWeekFirstDay(locale) {
  33603. return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()().locale(parseLocale(locale)).localeData().firstDayOfWeek();
  33604. },
  33605. getWeekFirstDate: function getWeekFirstDate(locale, date) {
  33606. return date.locale(parseLocale(locale)).weekday(0);
  33607. },
  33608. getWeek: function getWeek(locale, date) {
  33609. return date.locale(parseLocale(locale)).week();
  33610. },
  33611. getShortWeekDays: function getShortWeekDays(locale) {
  33612. return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()().locale(parseLocale(locale)).localeData().weekdaysMin();
  33613. },
  33614. getShortMonths: function getShortMonths(locale) {
  33615. return external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()().locale(parseLocale(locale)).localeData().monthsShort();
  33616. },
  33617. format: function format(locale, date, _format) {
  33618. return date.locale(parseLocale(locale)).format(_format);
  33619. },
  33620. parse: function parse(locale, text, formats) {
  33621. var localeStr = parseLocale(locale);
  33622. for (var i = 0; i < formats.length; i += 1) {
  33623. var format = formats[i];
  33624. var formatText = text;
  33625. if (format.includes('wo') || format.includes('Wo')) {
  33626. // parse Wo
  33627. var year = formatText.split('-')[0];
  33628. var weekStr = formatText.split('-')[1];
  33629. var firstWeek = external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()(year, 'YYYY').startOf('year').locale(localeStr);
  33630. for (var j = 0; j <= 52; j += 1) {
  33631. var nextWeek = firstWeek.add(j, 'week');
  33632. if (nextWeek.format('Wo') === weekStr) {
  33633. return nextWeek;
  33634. }
  33635. }
  33636. parseNoMatchNotice();
  33637. return null;
  33638. }
  33639. var date = external_root_dayjs_commonjs2_dayjs_commonjs_dayjs_amd_dayjs_default()(formatText, format, true).locale(localeStr);
  33640. if (date.isValid()) {
  33641. return date;
  33642. }
  33643. }
  33644. if (text) {
  33645. parseNoMatchNotice();
  33646. }
  33647. return null;
  33648. }
  33649. }
  33650. };
  33651. /* harmony default export */ var dayjs = (generateConfig);
  33652. ;// ./node_modules/rc-picker/es/utils/uiUtil.js
  33653. // ====================== Mode ======================
  33654. function getRealPlacement(placement, rtl) {
  33655. if (placement !== undefined) {
  33656. return placement;
  33657. }
  33658. return rtl ? 'bottomRight' : 'bottomLeft';
  33659. }
  33660. ;// ./node_modules/rc-picker/es/PickerInput/context.js
  33661. var PickerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  33662. /* harmony default export */ var PickerInput_context = (PickerContext);
  33663. ;// ./node_modules/rc-picker/es/PickerTrigger/index.js
  33664. var BUILT_IN_PLACEMENTS = {
  33665. bottomLeft: {
  33666. points: ['tl', 'bl'],
  33667. offset: [0, 4],
  33668. overflow: {
  33669. adjustX: 1,
  33670. adjustY: 1
  33671. }
  33672. },
  33673. bottomRight: {
  33674. points: ['tr', 'br'],
  33675. offset: [0, 4],
  33676. overflow: {
  33677. adjustX: 1,
  33678. adjustY: 1
  33679. }
  33680. },
  33681. topLeft: {
  33682. points: ['bl', 'tl'],
  33683. offset: [0, -4],
  33684. overflow: {
  33685. adjustX: 0,
  33686. adjustY: 1
  33687. }
  33688. },
  33689. topRight: {
  33690. points: ['br', 'tr'],
  33691. offset: [0, -4],
  33692. overflow: {
  33693. adjustX: 0,
  33694. adjustY: 1
  33695. }
  33696. }
  33697. };
  33698. function PickerTrigger(_ref) {
  33699. var popupElement = _ref.popupElement,
  33700. popupStyle = _ref.popupStyle,
  33701. popupClassName = _ref.popupClassName,
  33702. popupAlign = _ref.popupAlign,
  33703. transitionName = _ref.transitionName,
  33704. getPopupContainer = _ref.getPopupContainer,
  33705. children = _ref.children,
  33706. range = _ref.range,
  33707. placement = _ref.placement,
  33708. _ref$builtinPlacement = _ref.builtinPlacements,
  33709. builtinPlacements = _ref$builtinPlacement === void 0 ? BUILT_IN_PLACEMENTS : _ref$builtinPlacement,
  33710. direction = _ref.direction,
  33711. visible = _ref.visible,
  33712. onClose = _ref.onClose;
  33713. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  33714. prefixCls = _React$useContext.prefixCls;
  33715. var dropdownPrefixCls = "".concat(prefixCls, "-dropdown");
  33716. var realPlacement = getRealPlacement(placement, direction === 'rtl');
  33717. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, {
  33718. showAction: [],
  33719. hideAction: ['click'],
  33720. popupPlacement: realPlacement,
  33721. builtinPlacements: builtinPlacements,
  33722. prefixCls: dropdownPrefixCls,
  33723. popupTransitionName: transitionName,
  33724. popup: popupElement,
  33725. popupAlign: popupAlign,
  33726. popupVisible: visible,
  33727. popupClassName: classnames_default()(popupClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(dropdownPrefixCls, "-range"), range), "".concat(dropdownPrefixCls, "-rtl"), direction === 'rtl')),
  33728. popupStyle: popupStyle,
  33729. stretch: "minWidth",
  33730. getPopupContainer: getPopupContainer,
  33731. onPopupVisibleChange: function onPopupVisibleChange(nextVisible) {
  33732. if (!nextVisible) {
  33733. onClose();
  33734. }
  33735. }
  33736. }, children);
  33737. }
  33738. /* harmony default export */ var es_PickerTrigger = (PickerTrigger);
  33739. ;// ./node_modules/rc-picker/es/utils/miscUtil.js
  33740. function leftPad(str, length) {
  33741. var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';
  33742. var current = String(str);
  33743. while (current.length < length) {
  33744. current = "".concat(fill).concat(current);
  33745. }
  33746. return current;
  33747. }
  33748. /**
  33749. * Convert `value` to array. Will provide `[]` if is null or undefined.
  33750. */
  33751. function miscUtil_toArray(val) {
  33752. if (val === null || val === undefined) {
  33753. return [];
  33754. }
  33755. return Array.isArray(val) ? val : [val];
  33756. }
  33757. function fillIndex(ori, index, value) {
  33758. var clone = (0,toConsumableArray["default"])(ori);
  33759. clone[index] = value;
  33760. return clone;
  33761. }
  33762. /** Pick props from the key list. Will filter empty value */
  33763. function pickProps(props, keys) {
  33764. var clone = {};
  33765. var mergedKeys = keys || Object.keys(props);
  33766. mergedKeys.forEach(function (key) {
  33767. if (props[key] !== undefined) {
  33768. clone[key] = props[key];
  33769. }
  33770. });
  33771. return clone;
  33772. }
  33773. function getRowFormat(picker, locale, format) {
  33774. if (format) {
  33775. return format;
  33776. }
  33777. switch (picker) {
  33778. // All from the `locale.fieldXXXFormat` first
  33779. case 'time':
  33780. return locale.fieldTimeFormat;
  33781. case 'datetime':
  33782. return locale.fieldDateTimeFormat;
  33783. case 'month':
  33784. return locale.fieldMonthFormat;
  33785. case 'year':
  33786. return locale.fieldYearFormat;
  33787. case 'quarter':
  33788. return locale.fieldQuarterFormat;
  33789. case 'week':
  33790. return locale.fieldWeekFormat;
  33791. default:
  33792. return locale.fieldDateFormat;
  33793. }
  33794. }
  33795. function getFromDate(calendarValues, activeIndexList, activeIndex) {
  33796. var mergedActiveIndex = activeIndex !== undefined ? activeIndex : activeIndexList[activeIndexList.length - 1];
  33797. var firstValuedIndex = activeIndexList.find(function (index) {
  33798. return calendarValues[index];
  33799. });
  33800. return mergedActiveIndex !== firstValuedIndex ? calendarValues[firstValuedIndex] : undefined;
  33801. }
  33802. ;// ./node_modules/rc-picker/es/PickerTrigger/util.js
  33803. function pickTriggerProps(props) {
  33804. return pickProps(props, ['placement', 'builtinPlacements', 'popupAlign', 'getPopupContainer', 'transitionName', 'direction']);
  33805. }
  33806. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useCellRender.js
  33807. function useCellRender(cellRender, dateRender, monthCellRender, range) {
  33808. // ========================= Warn =========================
  33809. if (true) {
  33810. (0,rc_util_es.warning)(!dateRender, "'dateRender' is deprecated. Please use 'cellRender' instead.");
  33811. (0,rc_util_es.warning)(!monthCellRender, "'monthCellRender' is deprecated. Please use 'cellRender' instead.");
  33812. }
  33813. // ======================== Render ========================
  33814. // Merged render
  33815. var mergedCellRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  33816. if (cellRender) {
  33817. return cellRender;
  33818. }
  33819. return function (current, info) {
  33820. var date = current;
  33821. if (dateRender && info.type === 'date') {
  33822. return dateRender(date, info.today);
  33823. }
  33824. if (monthCellRender && info.type === 'month') {
  33825. return monthCellRender(date, info.locale);
  33826. }
  33827. return info.originNode;
  33828. };
  33829. }, [cellRender, monthCellRender, dateRender]);
  33830. // Cell render
  33831. var onInternalCellRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (date, info) {
  33832. return mergedCellRender(date, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
  33833. range: range
  33834. }));
  33835. }, [mergedCellRender, range]);
  33836. return onInternalCellRender;
  33837. }
  33838. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useFieldsInvalidate.js
  33839. /**
  33840. * Used to control each fields invalidate status
  33841. */
  33842. function useFieldsInvalidate(calendarValue, isInvalidateDate) {
  33843. var allowEmpty = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  33844. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([false, false]),
  33845. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  33846. fieldsInvalidates = _React$useState2[0],
  33847. setFieldsInvalidates = _React$useState2[1];
  33848. var onSelectorInvalid = function onSelectorInvalid(invalid, index) {
  33849. setFieldsInvalidates(function (ori) {
  33850. return fillIndex(ori, index, invalid);
  33851. });
  33852. };
  33853. /**
  33854. * For the Selector Input to mark as `aria-disabled`
  33855. */
  33856. var submitInvalidates = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  33857. return fieldsInvalidates.map(function (invalid, index) {
  33858. // If typing invalidate
  33859. if (invalid) {
  33860. return true;
  33861. }
  33862. var current = calendarValue[index];
  33863. // Not check if all empty
  33864. if (!current) {
  33865. return false;
  33866. }
  33867. // Not allow empty
  33868. if (!allowEmpty[index] && !current) {
  33869. return true;
  33870. }
  33871. // Invalidate
  33872. if (current && isInvalidateDate(current, {
  33873. activeIndex: index
  33874. })) {
  33875. return true;
  33876. }
  33877. return false;
  33878. });
  33879. }, [calendarValue, fieldsInvalidates, isInvalidateDate, allowEmpty]);
  33880. return [submitInvalidates, onSelectorInvalid];
  33881. }
  33882. ;// ./node_modules/rc-picker/es/hooks/useLocale.js
  33883. function fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, showMeridiem) {
  33884. var timeFormat = '';
  33885. // Base HH:mm:ss
  33886. var cells = [];
  33887. if (showHour) {
  33888. cells.push(showMeridiem ? 'hh' : 'HH');
  33889. }
  33890. if (showMinute) {
  33891. cells.push('mm');
  33892. }
  33893. if (showSecond) {
  33894. cells.push('ss');
  33895. }
  33896. timeFormat = cells.join(':');
  33897. // Millisecond
  33898. if (showMillisecond) {
  33899. timeFormat += '.SSS';
  33900. }
  33901. // Meridiem
  33902. if (showMeridiem) {
  33903. timeFormat += ' A';
  33904. }
  33905. return timeFormat;
  33906. }
  33907. /**
  33908. * Used for `useFilledProps` since it already in the React.useMemo
  33909. */
  33910. function fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours) {
  33911. // Not fill `monthFormat` since `locale.shortMonths` handle this
  33912. // Not fill `cellMeridiemFormat` since AM & PM by default
  33913. var fieldDateTimeFormat = locale.fieldDateTimeFormat,
  33914. fieldDateFormat = locale.fieldDateFormat,
  33915. fieldTimeFormat = locale.fieldTimeFormat,
  33916. fieldMonthFormat = locale.fieldMonthFormat,
  33917. fieldYearFormat = locale.fieldYearFormat,
  33918. fieldWeekFormat = locale.fieldWeekFormat,
  33919. fieldQuarterFormat = locale.fieldQuarterFormat,
  33920. yearFormat = locale.yearFormat,
  33921. cellYearFormat = locale.cellYearFormat,
  33922. cellQuarterFormat = locale.cellQuarterFormat,
  33923. dayFormat = locale.dayFormat,
  33924. cellDateFormat = locale.cellDateFormat;
  33925. var timeFormat = fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, use12Hours);
  33926. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, locale), {}, {
  33927. fieldDateTimeFormat: fieldDateTimeFormat || "YYYY-MM-DD ".concat(timeFormat),
  33928. fieldDateFormat: fieldDateFormat || 'YYYY-MM-DD',
  33929. fieldTimeFormat: fieldTimeFormat || timeFormat,
  33930. fieldMonthFormat: fieldMonthFormat || 'YYYY-MM',
  33931. fieldYearFormat: fieldYearFormat || 'YYYY',
  33932. fieldWeekFormat: fieldWeekFormat || 'gggg-wo',
  33933. fieldQuarterFormat: fieldQuarterFormat || 'YYYY-[Q]Q',
  33934. yearFormat: yearFormat || 'YYYY',
  33935. cellYearFormat: cellYearFormat || 'YYYY',
  33936. cellQuarterFormat: cellQuarterFormat || '[Q]Q',
  33937. cellDateFormat: cellDateFormat || dayFormat || 'D'
  33938. });
  33939. }
  33940. /**
  33941. * Fill locale format as start up
  33942. */
  33943. function useLocale_useLocale(locale, showProps) {
  33944. var showHour = showProps.showHour,
  33945. showMinute = showProps.showMinute,
  33946. showSecond = showProps.showSecond,
  33947. showMillisecond = showProps.showMillisecond,
  33948. use12Hours = showProps.use12Hours;
  33949. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  33950. return fillLocale(locale, showHour, showMinute, showSecond, showMillisecond, use12Hours);
  33951. }, [locale, showHour, showMinute, showSecond, showMillisecond, use12Hours]);
  33952. }
  33953. ;// ./node_modules/rc-picker/es/hooks/useTimeConfig.js
  33954. function checkShow(format, keywords, show) {
  33955. return show !== null && show !== void 0 ? show : keywords.some(function (keyword) {
  33956. return format.includes(keyword);
  33957. });
  33958. }
  33959. var showTimeKeys = [
  33960. // 'format',
  33961. 'showNow', 'showHour', 'showMinute', 'showSecond', 'showMillisecond', 'use12Hours', 'hourStep', 'minuteStep', 'secondStep', 'millisecondStep', 'hideDisabledOptions', 'defaultValue', 'disabledHours', 'disabledMinutes', 'disabledSeconds', 'disabledMilliseconds', 'disabledTime', 'changeOnScroll', 'defaultOpenValue'];
  33962. /**
  33963. * Get SharedTimeProps from props.
  33964. */
  33965. function pickTimeProps(props) {
  33966. var timeProps = pickProps(props, showTimeKeys);
  33967. var format = props.format,
  33968. picker = props.picker;
  33969. var propFormat = null;
  33970. if (format) {
  33971. propFormat = format;
  33972. if (Array.isArray(propFormat)) {
  33973. propFormat = propFormat[0];
  33974. }
  33975. propFormat = (0,esm_typeof["default"])(propFormat) === 'object' ? propFormat.format : propFormat;
  33976. }
  33977. if (picker === 'time') {
  33978. timeProps.format = propFormat;
  33979. }
  33980. return [timeProps, propFormat];
  33981. }
  33982. function isStringFormat(format) {
  33983. return format && typeof format === 'string';
  33984. }
  33985. /** Check if all the showXXX is `undefined` */
  33986. function existShowConfig(showHour, showMinute, showSecond, showMillisecond) {
  33987. return [showHour, showMinute, showSecond, showMillisecond].some(function (show) {
  33988. return show !== undefined;
  33989. });
  33990. }
  33991. /** Fill the showXXX if needed */
  33992. function fillShowConfig(hasShowConfig, showHour, showMinute, showSecond, showMillisecond) {
  33993. var parsedShowHour = showHour;
  33994. var parsedShowMinute = showMinute;
  33995. var parsedShowSecond = showSecond;
  33996. if (!hasShowConfig && !parsedShowHour && !parsedShowMinute && !parsedShowSecond && !showMillisecond) {
  33997. parsedShowHour = true;
  33998. parsedShowMinute = true;
  33999. parsedShowSecond = true;
  34000. } else if (hasShowConfig) {
  34001. var _parsedShowHour, _parsedShowMinute, _parsedShowSecond;
  34002. var existFalse = [parsedShowHour, parsedShowMinute, parsedShowSecond].some(function (show) {
  34003. return show === false;
  34004. });
  34005. var existTrue = [parsedShowHour, parsedShowMinute, parsedShowSecond].some(function (show) {
  34006. return show === true;
  34007. });
  34008. var defaultShow = existFalse ? true : !existTrue;
  34009. parsedShowHour = (_parsedShowHour = parsedShowHour) !== null && _parsedShowHour !== void 0 ? _parsedShowHour : defaultShow;
  34010. parsedShowMinute = (_parsedShowMinute = parsedShowMinute) !== null && _parsedShowMinute !== void 0 ? _parsedShowMinute : defaultShow;
  34011. parsedShowSecond = (_parsedShowSecond = parsedShowSecond) !== null && _parsedShowSecond !== void 0 ? _parsedShowSecond : defaultShow;
  34012. }
  34013. return [parsedShowHour, parsedShowMinute, parsedShowSecond, showMillisecond];
  34014. }
  34015. /**
  34016. * Get `showHour`, `showMinute`, `showSecond` or other from the props.
  34017. * This is pure function, will not get `showXXX` from the `format` prop.
  34018. */
  34019. function getTimeProps(componentProps) {
  34020. var showTime = componentProps.showTime;
  34021. var _pickTimeProps = pickTimeProps(componentProps),
  34022. _pickTimeProps2 = (0,slicedToArray["default"])(_pickTimeProps, 2),
  34023. pickedProps = _pickTimeProps2[0],
  34024. propFormat = _pickTimeProps2[1];
  34025. var showTimeConfig = showTime && (0,esm_typeof["default"])(showTime) === 'object' ? showTime : {};
  34026. var timeConfig = (0,objectSpread2["default"])((0,objectSpread2["default"])({
  34027. defaultOpenValue: showTimeConfig.defaultOpenValue || showTimeConfig.defaultValue
  34028. }, pickedProps), showTimeConfig);
  34029. var showMillisecond = timeConfig.showMillisecond;
  34030. var showHour = timeConfig.showHour,
  34031. showMinute = timeConfig.showMinute,
  34032. showSecond = timeConfig.showSecond;
  34033. var hasShowConfig = existShowConfig(showHour, showMinute, showSecond, showMillisecond);
  34034. var _fillShowConfig = fillShowConfig(hasShowConfig, showHour, showMinute, showSecond, showMillisecond);
  34035. var _fillShowConfig2 = (0,slicedToArray["default"])(_fillShowConfig, 3);
  34036. showHour = _fillShowConfig2[0];
  34037. showMinute = _fillShowConfig2[1];
  34038. showSecond = _fillShowConfig2[2];
  34039. return [timeConfig, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, timeConfig), {}, {
  34040. showHour: showHour,
  34041. showMinute: showMinute,
  34042. showSecond: showSecond,
  34043. showMillisecond: showMillisecond
  34044. }), timeConfig.format, propFormat];
  34045. }
  34046. function fillShowTimeConfig(picker, showTimeFormat, propFormat, timeConfig, locale) {
  34047. var isTimePicker = picker === 'time';
  34048. if (picker === 'datetime' || isTimePicker) {
  34049. var pickedProps = timeConfig;
  34050. // ====================== BaseFormat ======================
  34051. var defaultLocaleFormat = getRowFormat(picker, locale, null);
  34052. var baselineFormat = defaultLocaleFormat;
  34053. var formatList = [showTimeFormat, propFormat];
  34054. for (var i = 0; i < formatList.length; i += 1) {
  34055. var format = miscUtil_toArray(formatList[i])[0];
  34056. if (isStringFormat(format)) {
  34057. baselineFormat = format;
  34058. break;
  34059. }
  34060. }
  34061. // ========================= Show =========================
  34062. var showHour = pickedProps.showHour,
  34063. showMinute = pickedProps.showMinute,
  34064. showSecond = pickedProps.showSecond,
  34065. showMillisecond = pickedProps.showMillisecond;
  34066. var use12Hours = pickedProps.use12Hours;
  34067. var showMeridiem = checkShow(baselineFormat, ['a', 'A', 'LT', 'LLL', 'LTS'], use12Hours);
  34068. var hasShowConfig = existShowConfig(showHour, showMinute, showSecond, showMillisecond);
  34069. // Fill with format, if needed
  34070. if (!hasShowConfig) {
  34071. showHour = checkShow(baselineFormat, ['H', 'h', 'k', 'LT', 'LLL']);
  34072. showMinute = checkShow(baselineFormat, ['m', 'LT', 'LLL']);
  34073. showSecond = checkShow(baselineFormat, ['s', 'LTS']);
  34074. showMillisecond = checkShow(baselineFormat, ['SSS']);
  34075. }
  34076. // Fallback if all can not see
  34077. // ======================== Format ========================
  34078. var _fillShowConfig3 = fillShowConfig(hasShowConfig, showHour, showMinute, showSecond, showMillisecond);
  34079. var _fillShowConfig4 = (0,slicedToArray["default"])(_fillShowConfig3, 3);
  34080. showHour = _fillShowConfig4[0];
  34081. showMinute = _fillShowConfig4[1];
  34082. showSecond = _fillShowConfig4[2];
  34083. var timeFormat = showTimeFormat || fillTimeFormat(showHour, showMinute, showSecond, showMillisecond, showMeridiem);
  34084. // ======================== Props =========================
  34085. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, pickedProps), {}, {
  34086. // Format
  34087. format: timeFormat,
  34088. // Show Config
  34089. showHour: showHour,
  34090. showMinute: showMinute,
  34091. showSecond: showSecond,
  34092. showMillisecond: showMillisecond,
  34093. use12Hours: showMeridiem
  34094. });
  34095. }
  34096. return null;
  34097. }
  34098. ;// ./node_modules/rc-picker/es/PickerInput/Selector/hooks/useClearIcon.js
  34099. /**
  34100. * Used for `useFilledProps` since it already in the React.useMemo
  34101. */
  34102. function fillClearIcon(prefixCls, allowClear, clearIcon) {
  34103. if ( true && clearIcon) {
  34104. (0,warning["default"])(false, '`clearIcon` will be removed in future. Please use `allowClear` instead.');
  34105. }
  34106. if (allowClear === false) {
  34107. return null;
  34108. }
  34109. var config = allowClear && (0,esm_typeof["default"])(allowClear) === 'object' ? allowClear : {};
  34110. return config.clearIcon || clearIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  34111. className: "".concat(prefixCls, "-clear-btn")
  34112. });
  34113. }
  34114. ;// ./node_modules/rc-picker/es/utils/dateUtil.js
  34115. var WEEK_DAY_COUNT = 7;
  34116. /**
  34117. * Wrap the compare logic.
  34118. * This will compare the each of value is empty first.
  34119. * 1. All is empty, return true.
  34120. * 2. One is empty, return false.
  34121. * 3. return customize compare logic.
  34122. */
  34123. function nullableCompare(value1, value2, oriCompareFn) {
  34124. if (!value1 && !value2 || value1 === value2) {
  34125. return true;
  34126. }
  34127. if (!value1 || !value2) {
  34128. return false;
  34129. }
  34130. return oriCompareFn();
  34131. }
  34132. function isSameDecade(generateConfig, decade1, decade2) {
  34133. return nullableCompare(decade1, decade2, function () {
  34134. var num1 = Math.floor(generateConfig.getYear(decade1) / 10);
  34135. var num2 = Math.floor(generateConfig.getYear(decade2) / 10);
  34136. return num1 === num2;
  34137. });
  34138. }
  34139. function isSameYear(generateConfig, year1, year2) {
  34140. return nullableCompare(year1, year2, function () {
  34141. return generateConfig.getYear(year1) === generateConfig.getYear(year2);
  34142. });
  34143. }
  34144. function getQuarter(generateConfig, date) {
  34145. var quota = Math.floor(generateConfig.getMonth(date) / 3);
  34146. return quota + 1;
  34147. }
  34148. function isSameQuarter(generateConfig, quarter1, quarter2) {
  34149. return nullableCompare(quarter1, quarter2, function () {
  34150. return isSameYear(generateConfig, quarter1, quarter2) && getQuarter(generateConfig, quarter1) === getQuarter(generateConfig, quarter2);
  34151. });
  34152. }
  34153. function isSameMonth(generateConfig, month1, month2) {
  34154. return nullableCompare(month1, month2, function () {
  34155. return isSameYear(generateConfig, month1, month2) && generateConfig.getMonth(month1) === generateConfig.getMonth(month2);
  34156. });
  34157. }
  34158. function isSameDate(generateConfig, date1, date2) {
  34159. return nullableCompare(date1, date2, function () {
  34160. return isSameYear(generateConfig, date1, date2) && isSameMonth(generateConfig, date1, date2) && generateConfig.getDate(date1) === generateConfig.getDate(date2);
  34161. });
  34162. }
  34163. function isSameTime(generateConfig, time1, time2) {
  34164. return nullableCompare(time1, time2, function () {
  34165. return generateConfig.getHour(time1) === generateConfig.getHour(time2) && generateConfig.getMinute(time1) === generateConfig.getMinute(time2) && generateConfig.getSecond(time1) === generateConfig.getSecond(time2);
  34166. });
  34167. }
  34168. /**
  34169. * Check if the Date is all the same of timestamp
  34170. */
  34171. function isSameTimestamp(generateConfig, time1, time2) {
  34172. return nullableCompare(time1, time2, function () {
  34173. return isSameDate(generateConfig, time1, time2) && isSameTime(generateConfig, time1, time2) && generateConfig.getMillisecond(time1) === generateConfig.getMillisecond(time2);
  34174. });
  34175. }
  34176. function isSameWeek(generateConfig, locale, date1, date2) {
  34177. return nullableCompare(date1, date2, function () {
  34178. var weekStartDate1 = generateConfig.locale.getWeekFirstDate(locale, date1);
  34179. var weekStartDate2 = generateConfig.locale.getWeekFirstDate(locale, date2);
  34180. return isSameYear(generateConfig, weekStartDate1, weekStartDate2) && generateConfig.locale.getWeek(locale, date1) === generateConfig.locale.getWeek(locale, date2);
  34181. });
  34182. }
  34183. function isSame(generateConfig, locale, source, target, type) {
  34184. switch (type) {
  34185. case 'date':
  34186. return isSameDate(generateConfig, source, target);
  34187. case 'week':
  34188. return isSameWeek(generateConfig, locale.locale, source, target);
  34189. case 'month':
  34190. return isSameMonth(generateConfig, source, target);
  34191. case 'quarter':
  34192. return isSameQuarter(generateConfig, source, target);
  34193. case 'year':
  34194. return isSameYear(generateConfig, source, target);
  34195. case 'decade':
  34196. return isSameDecade(generateConfig, source, target);
  34197. case 'time':
  34198. return isSameTime(generateConfig, source, target);
  34199. default:
  34200. return isSameTimestamp(generateConfig, source, target);
  34201. }
  34202. }
  34203. /** Between in date but not equal of date */
  34204. function isInRange(generateConfig, startDate, endDate, current) {
  34205. if (!startDate || !endDate || !current) {
  34206. return false;
  34207. }
  34208. return generateConfig.isAfter(current, startDate) && generateConfig.isAfter(endDate, current);
  34209. }
  34210. function isSameOrAfter(generateConfig, locale, date1, date2, type) {
  34211. if (isSame(generateConfig, locale, date1, date2, type)) {
  34212. return true;
  34213. }
  34214. return generateConfig.isAfter(date1, date2);
  34215. }
  34216. function getWeekStartDate(locale, generateConfig, value) {
  34217. var weekFirstDay = generateConfig.locale.getWeekFirstDay(locale);
  34218. var monthStartDate = generateConfig.setDate(value, 1);
  34219. var startDateWeekDay = generateConfig.getWeekDay(monthStartDate);
  34220. var alignStartDate = generateConfig.addDate(monthStartDate, weekFirstDay - startDateWeekDay);
  34221. if (generateConfig.getMonth(alignStartDate) === generateConfig.getMonth(value) && generateConfig.getDate(alignStartDate) > 1) {
  34222. alignStartDate = generateConfig.addDate(alignStartDate, -7);
  34223. }
  34224. return alignStartDate;
  34225. }
  34226. function formatValue(value, _ref) {
  34227. var generateConfig = _ref.generateConfig,
  34228. locale = _ref.locale,
  34229. format = _ref.format;
  34230. if (!value) {
  34231. return '';
  34232. }
  34233. return typeof format === 'function' ? format(value) : generateConfig.locale.format(locale.locale, value, format);
  34234. }
  34235. /**
  34236. * Fill the time info into Date if provided.
  34237. */
  34238. function fillTime(generateConfig, date, time) {
  34239. var tmpDate = date;
  34240. var getFn = ['getHour', 'getMinute', 'getSecond', 'getMillisecond'];
  34241. var setFn = ['setHour', 'setMinute', 'setSecond', 'setMillisecond'];
  34242. setFn.forEach(function (fn, index) {
  34243. if (time) {
  34244. tmpDate = generateConfig[fn](tmpDate, generateConfig[getFn[index]](time));
  34245. } else {
  34246. tmpDate = generateConfig[fn](tmpDate, 0);
  34247. }
  34248. });
  34249. return tmpDate;
  34250. }
  34251. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useDisabledBoundary.js
  34252. /**
  34253. * Merge `disabledDate` with `minDate` & `maxDate`.
  34254. */
  34255. function useDisabledBoundary(generateConfig, locale, disabledDate, minDate, maxDate) {
  34256. var mergedDisabledDate = (0,rc_util_es.useEvent)(function (date, info) {
  34257. if (disabledDate && disabledDate(date, info)) {
  34258. return true;
  34259. }
  34260. if (minDate && generateConfig.isAfter(minDate, date) && !isSame(generateConfig, locale, minDate, date, info.type)) {
  34261. return true;
  34262. }
  34263. if (maxDate && generateConfig.isAfter(date, maxDate) && !isSame(generateConfig, locale, maxDate, date, info.type)) {
  34264. return true;
  34265. }
  34266. return false;
  34267. });
  34268. return mergedDisabledDate;
  34269. }
  34270. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useFieldFormat.js
  34271. function useFieldFormat(picker, locale, format) {
  34272. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34273. var rawFormat = getRowFormat(picker, locale, format);
  34274. var formatList = miscUtil_toArray(rawFormat);
  34275. var firstFormat = formatList[0];
  34276. var maskFormat = (0,esm_typeof["default"])(firstFormat) === 'object' && firstFormat.type === 'mask' ? firstFormat.format : null;
  34277. return [
  34278. // Format list
  34279. formatList.map(function (config) {
  34280. return typeof config === 'string' || typeof config === 'function' ? config : config.format;
  34281. }),
  34282. // Mask Format
  34283. maskFormat];
  34284. }, [picker, locale, format]);
  34285. }
  34286. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useInputReadOnly.js
  34287. function useInputReadOnly(formatList, inputReadOnly, multiple) {
  34288. if (typeof formatList[0] === 'function' || multiple) {
  34289. return true;
  34290. }
  34291. return inputReadOnly;
  34292. }
  34293. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useInvalidate.js
  34294. /**
  34295. * Check if provided date is valid for the `disabledDate` & `showTime.disabledTime`.
  34296. */
  34297. function useInvalidate(generateConfig, picker, disabledDate, showTime) {
  34298. // Check disabled date
  34299. var isInvalidate = (0,rc_util_es.useEvent)(function (date, info) {
  34300. var outsideInfo = (0,objectSpread2["default"])({
  34301. type: picker
  34302. }, info);
  34303. delete outsideInfo.activeIndex;
  34304. if (
  34305. // Date object is invalid
  34306. !generateConfig.isValidate(date) ||
  34307. // Date is disabled by `disabledDate`
  34308. disabledDate && disabledDate(date, outsideInfo)) {
  34309. return true;
  34310. }
  34311. if ((picker === 'date' || picker === 'time') && showTime) {
  34312. var _showTime$disabledTim;
  34313. var range = info && info.activeIndex === 1 ? 'end' : 'start';
  34314. var _ref = ((_showTime$disabledTim = showTime.disabledTime) === null || _showTime$disabledTim === void 0 ? void 0 : _showTime$disabledTim.call(showTime, date, range, {
  34315. from: outsideInfo.from
  34316. })) || {},
  34317. disabledHours = _ref.disabledHours,
  34318. disabledMinutes = _ref.disabledMinutes,
  34319. disabledSeconds = _ref.disabledSeconds,
  34320. disabledMilliseconds = _ref.disabledMilliseconds;
  34321. var legacyDisabledHours = showTime.disabledHours,
  34322. legacyDisabledMinutes = showTime.disabledMinutes,
  34323. legacyDisabledSeconds = showTime.disabledSeconds;
  34324. var mergedDisabledHours = disabledHours || legacyDisabledHours;
  34325. var mergedDisabledMinutes = disabledMinutes || legacyDisabledMinutes;
  34326. var mergedDisabledSeconds = disabledSeconds || legacyDisabledSeconds;
  34327. var hour = generateConfig.getHour(date);
  34328. var minute = generateConfig.getMinute(date);
  34329. var second = generateConfig.getSecond(date);
  34330. var millisecond = generateConfig.getMillisecond(date);
  34331. if (mergedDisabledHours && mergedDisabledHours().includes(hour)) {
  34332. return true;
  34333. }
  34334. if (mergedDisabledMinutes && mergedDisabledMinutes(hour).includes(minute)) {
  34335. return true;
  34336. }
  34337. if (mergedDisabledSeconds && mergedDisabledSeconds(hour, minute).includes(second)) {
  34338. return true;
  34339. }
  34340. if (disabledMilliseconds && disabledMilliseconds(hour, minute, second).includes(millisecond)) {
  34341. return true;
  34342. }
  34343. }
  34344. return false;
  34345. });
  34346. return isInvalidate;
  34347. }
  34348. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useFilledProps.js
  34349. function useList(value) {
  34350. var fillMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  34351. var values = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34352. var list = value ? miscUtil_toArray(value) : value;
  34353. if (fillMode && list) {
  34354. list[1] = list[1] || list[0];
  34355. }
  34356. return list;
  34357. }, [value, fillMode]);
  34358. return values;
  34359. }
  34360. /**
  34361. * Align the outer props with unique typed and fill undefined props.
  34362. * This is shared with both RangePicker and Picker. This will do:
  34363. * - Convert `value` & `defaultValue` to array
  34364. * - handle the legacy props fill like `clearIcon` + `allowClear` = `clearIcon`
  34365. */
  34366. function useFilledProps(props, updater) {
  34367. var generateConfig = props.generateConfig,
  34368. locale = props.locale,
  34369. _props$picker = props.picker,
  34370. picker = _props$picker === void 0 ? 'date' : _props$picker,
  34371. _props$prefixCls = props.prefixCls,
  34372. prefixCls = _props$prefixCls === void 0 ? 'rc-picker' : _props$prefixCls,
  34373. _props$styles = props.styles,
  34374. styles = _props$styles === void 0 ? {} : _props$styles,
  34375. _props$classNames = props.classNames,
  34376. classNames = _props$classNames === void 0 ? {} : _props$classNames,
  34377. _props$order = props.order,
  34378. order = _props$order === void 0 ? true : _props$order,
  34379. _props$components = props.components,
  34380. components = _props$components === void 0 ? {} : _props$components,
  34381. inputRender = props.inputRender,
  34382. allowClear = props.allowClear,
  34383. clearIcon = props.clearIcon,
  34384. needConfirm = props.needConfirm,
  34385. multiple = props.multiple,
  34386. format = props.format,
  34387. inputReadOnly = props.inputReadOnly,
  34388. disabledDate = props.disabledDate,
  34389. minDate = props.minDate,
  34390. maxDate = props.maxDate,
  34391. showTime = props.showTime,
  34392. value = props.value,
  34393. defaultValue = props.defaultValue,
  34394. pickerValue = props.pickerValue,
  34395. defaultPickerValue = props.defaultPickerValue;
  34396. var values = useList(value);
  34397. var defaultValues = useList(defaultValue);
  34398. var pickerValues = useList(pickerValue);
  34399. var defaultPickerValues = useList(defaultPickerValue);
  34400. // ======================== Picker ========================
  34401. /** Almost same as `picker`, but add `datetime` for `date` with `showTime` */
  34402. var internalPicker = picker === 'date' && showTime ? 'datetime' : picker;
  34403. /** The picker is `datetime` or `time` */
  34404. var multipleInteractivePicker = internalPicker === 'time' || internalPicker === 'datetime';
  34405. var complexPicker = multipleInteractivePicker || multiple;
  34406. var mergedNeedConfirm = needConfirm !== null && needConfirm !== void 0 ? needConfirm : multipleInteractivePicker;
  34407. // ========================== Time ==========================
  34408. // Auto `format` need to check `showTime.showXXX` first.
  34409. // And then merge the `locale` into `mergedShowTime`.
  34410. var _getTimeProps = getTimeProps(props),
  34411. _getTimeProps2 = (0,slicedToArray["default"])(_getTimeProps, 4),
  34412. timeProps = _getTimeProps2[0],
  34413. localeTimeProps = _getTimeProps2[1],
  34414. showTimeFormat = _getTimeProps2[2],
  34415. propFormat = _getTimeProps2[3];
  34416. // ======================= Locales ========================
  34417. var mergedLocale = useLocale_useLocale(locale, localeTimeProps);
  34418. var mergedShowTime = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34419. return fillShowTimeConfig(internalPicker, showTimeFormat, propFormat, timeProps, mergedLocale);
  34420. }, [internalPicker, showTimeFormat, propFormat, timeProps, mergedLocale]);
  34421. // ======================= Warning ========================
  34422. if ( true && picker === 'time') {
  34423. if (['disabledHours', 'disabledMinutes', 'disabledSeconds'].some(function (key) {
  34424. return props[key];
  34425. })) {
  34426. (0,rc_util_es.warning)(false, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
  34427. }
  34428. }
  34429. // ======================== Props =========================
  34430. var filledProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34431. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  34432. prefixCls: prefixCls,
  34433. locale: mergedLocale,
  34434. picker: picker,
  34435. styles: styles,
  34436. classNames: classNames,
  34437. order: order,
  34438. components: (0,objectSpread2["default"])({
  34439. input: inputRender
  34440. }, components),
  34441. clearIcon: fillClearIcon(prefixCls, allowClear, clearIcon),
  34442. showTime: mergedShowTime,
  34443. value: values,
  34444. defaultValue: defaultValues,
  34445. pickerValue: pickerValues,
  34446. defaultPickerValue: defaultPickerValues
  34447. }, updater === null || updater === void 0 ? void 0 : updater());
  34448. }, [props]);
  34449. // ======================== Format ========================
  34450. var _useFieldFormat = useFieldFormat(internalPicker, mergedLocale, format),
  34451. _useFieldFormat2 = (0,slicedToArray["default"])(_useFieldFormat, 2),
  34452. formatList = _useFieldFormat2[0],
  34453. maskFormat = _useFieldFormat2[1];
  34454. // ======================= ReadOnly =======================
  34455. var mergedInputReadOnly = useInputReadOnly(formatList, inputReadOnly, multiple);
  34456. // ======================= Boundary =======================
  34457. var disabledBoundaryDate = useDisabledBoundary(generateConfig, locale, disabledDate, minDate, maxDate);
  34458. // ====================== Invalidate ======================
  34459. var isInvalidateDate = useInvalidate(generateConfig, picker, disabledBoundaryDate, mergedShowTime);
  34460. // ======================== Merged ========================
  34461. var mergedProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34462. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, filledProps), {}, {
  34463. needConfirm: mergedNeedConfirm,
  34464. inputReadOnly: mergedInputReadOnly,
  34465. disabledDate: disabledBoundaryDate
  34466. });
  34467. }, [filledProps, mergedNeedConfirm, mergedInputReadOnly, disabledBoundaryDate]);
  34468. return [mergedProps, internalPicker, complexPicker, formatList, maskFormat, isInvalidateDate];
  34469. }
  34470. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useDelayState.js
  34471. /**
  34472. * Will be `true` immediately for next effect.
  34473. * But will be `false` for a delay of effect.
  34474. */
  34475. function useDelayState(value, defaultValue, onChange) {
  34476. var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
  34477. value: value
  34478. }),
  34479. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  34480. state = _useMergedState2[0],
  34481. setState = _useMergedState2[1];
  34482. var nextValueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(value);
  34483. // ============================= Update =============================
  34484. var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef();
  34485. var cancelRaf = function cancelRaf() {
  34486. raf["default"].cancel(rafRef.current);
  34487. };
  34488. var doUpdate = (0,rc_util_es.useEvent)(function () {
  34489. setState(nextValueRef.current);
  34490. if (onChange && state !== nextValueRef.current) {
  34491. onChange(nextValueRef.current);
  34492. }
  34493. });
  34494. var updateValue = (0,rc_util_es.useEvent)(function (next, immediately) {
  34495. cancelRaf();
  34496. nextValueRef.current = next;
  34497. if (next || immediately) {
  34498. doUpdate();
  34499. } else {
  34500. rafRef.current = (0,raf["default"])(doUpdate);
  34501. }
  34502. });
  34503. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
  34504. return cancelRaf;
  34505. }, []);
  34506. return [state, updateValue];
  34507. }
  34508. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useOpen.js
  34509. /**
  34510. * Control the open state.
  34511. * Will not close if activeElement is on the popup.
  34512. */
  34513. function useOpen(open, defaultOpen) {
  34514. var disabledList = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  34515. var onOpenChange = arguments.length > 3 ? arguments[3] : undefined;
  34516. var mergedOpen = disabledList.every(function (disabled) {
  34517. return disabled;
  34518. }) ? false : open;
  34519. // Delay for handle the open state, in case fast shift from `open` -> `close` -> `open`
  34520. // const [rafOpen, setRafOpen] = useLockState(open, defaultOpen || false, onOpenChange);
  34521. var _useDelayState = useDelayState(mergedOpen, defaultOpen || false, onOpenChange),
  34522. _useDelayState2 = (0,slicedToArray["default"])(_useDelayState, 2),
  34523. rafOpen = _useDelayState2[0],
  34524. setRafOpen = _useDelayState2[1];
  34525. function setOpen(next) {
  34526. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34527. if (!config.inherit || rafOpen) {
  34528. setRafOpen(next, config.force);
  34529. }
  34530. }
  34531. return [rafOpen, setOpen];
  34532. }
  34533. ;// ./node_modules/rc-picker/es/PickerInput/hooks/usePickerRef.js
  34534. function usePickerRef(ref) {
  34535. var selectorRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  34536. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  34537. var _selectorRef$current;
  34538. return {
  34539. nativeElement: (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.nativeElement,
  34540. focus: function focus(options) {
  34541. var _selectorRef$current2;
  34542. (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 || _selectorRef$current2.focus(options);
  34543. },
  34544. blur: function blur() {
  34545. var _selectorRef$current3;
  34546. (_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 || _selectorRef$current3.blur();
  34547. }
  34548. };
  34549. });
  34550. return selectorRef;
  34551. }
  34552. ;// ./node_modules/rc-picker/es/PickerInput/hooks/usePresets.js
  34553. function usePresets(presets, legacyRanges) {
  34554. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34555. if (presets) {
  34556. return presets;
  34557. }
  34558. if (legacyRanges) {
  34559. (0,warning["default"])(false, '`ranges` is deprecated. Please use `presets` instead.');
  34560. return Object.entries(legacyRanges).map(function (_ref) {
  34561. var _ref2 = (0,slicedToArray["default"])(_ref, 2),
  34562. label = _ref2[0],
  34563. value = _ref2[1];
  34564. return {
  34565. label: label,
  34566. value: value
  34567. };
  34568. });
  34569. }
  34570. return [];
  34571. }, [presets, legacyRanges]);
  34572. }
  34573. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useLockEffect.js
  34574. /**
  34575. * Trigger `callback` immediately when `condition` is `true`.
  34576. * But trigger `callback` in next frame when `condition` is `false`.
  34577. */
  34578. function useLockEffect(condition, callback) {
  34579. var delayFrames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  34580. var callbackRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(callback);
  34581. callbackRef.current = callback;
  34582. (0,useLayoutEffect.useLayoutUpdateEffect)(function () {
  34583. if (condition) {
  34584. callbackRef.current(condition);
  34585. } else {
  34586. var id = (0,raf["default"])(function () {
  34587. callbackRef.current(condition);
  34588. }, delayFrames);
  34589. return function () {
  34590. raf["default"].cancel(id);
  34591. };
  34592. }
  34593. }, [condition]);
  34594. }
  34595. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangeActive.js
  34596. /**
  34597. * When user first focus one input, any submit will trigger focus another one.
  34598. * When second time focus one input, submit will not trigger focus again.
  34599. * When click outside to close the panel, trigger event if it can trigger onChange.
  34600. */
  34601. function useRangeActive(disabled) {
  34602. var empty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  34603. var mergedOpen = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  34604. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  34605. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  34606. activeIndex = _React$useState2[0],
  34607. setActiveIndex = _React$useState2[1];
  34608. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  34609. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  34610. focused = _React$useState4[0],
  34611. setFocused = _React$useState4[1];
  34612. var activeListRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  34613. var submitIndexRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  34614. var lastOperationRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  34615. var updateSubmitIndex = function updateSubmitIndex(index) {
  34616. submitIndexRef.current = index;
  34617. };
  34618. var hasActiveSubmitValue = function hasActiveSubmitValue(index) {
  34619. return submitIndexRef.current === index;
  34620. };
  34621. var triggerFocus = function triggerFocus(nextFocus) {
  34622. setFocused(nextFocus);
  34623. };
  34624. // ============================= Record =============================
  34625. var lastOperation = function lastOperation(type) {
  34626. if (type) {
  34627. lastOperationRef.current = type;
  34628. }
  34629. return lastOperationRef.current;
  34630. };
  34631. // ============================ Strategy ============================
  34632. // Trigger when input enter or input blur or panel close
  34633. var nextActiveIndex = function nextActiveIndex(nextValue) {
  34634. var list = activeListRef.current;
  34635. var filledActiveSet = new Set(list.filter(function (index) {
  34636. return nextValue[index] || empty[index];
  34637. }));
  34638. var nextIndex = list[list.length - 1] === 0 ? 1 : 0;
  34639. if (filledActiveSet.size >= 2 || disabled[nextIndex]) {
  34640. return null;
  34641. }
  34642. return nextIndex;
  34643. };
  34644. // ============================= Effect =============================
  34645. // Wait in case it's from the click outside to blur
  34646. useLockEffect(focused || mergedOpen, function () {
  34647. if (!focused) {
  34648. activeListRef.current = [];
  34649. updateSubmitIndex(null);
  34650. }
  34651. });
  34652. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  34653. if (focused) {
  34654. activeListRef.current.push(activeIndex);
  34655. }
  34656. }, [focused, activeIndex]);
  34657. return [focused, triggerFocus, lastOperation, activeIndex, setActiveIndex, nextActiveIndex, activeListRef.current, updateSubmitIndex, hasActiveSubmitValue];
  34658. }
  34659. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangeDisabledDate.js
  34660. /**
  34661. * RangePicker need additional logic to handle the `disabled` case. e.g.
  34662. * [disabled, enabled] should end date not before start date
  34663. */
  34664. function useRangeDisabledDate(values, disabled, activeIndexList, generateConfig, locale, disabledDate) {
  34665. var activeIndex = activeIndexList[activeIndexList.length - 1];
  34666. var rangeDisabledDate = function rangeDisabledDate(date, info) {
  34667. var _values = (0,slicedToArray["default"])(values, 2),
  34668. start = _values[0],
  34669. end = _values[1];
  34670. var mergedInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
  34671. from: getFromDate(values, activeIndexList)
  34672. });
  34673. // ============================ Disabled ============================
  34674. // Should not select days before the start date
  34675. if (activeIndex === 1 && disabled[0] && start &&
  34676. // Same date isOK
  34677. !isSame(generateConfig, locale, start, date, mergedInfo.type) &&
  34678. // Before start date
  34679. generateConfig.isAfter(start, date)) {
  34680. return true;
  34681. }
  34682. // Should not select days after the end date
  34683. if (activeIndex === 0 && disabled[1] && end &&
  34684. // Same date isOK
  34685. !isSame(generateConfig, locale, end, date, mergedInfo.type) &&
  34686. // After end date
  34687. generateConfig.isAfter(date, end)) {
  34688. return true;
  34689. }
  34690. // ============================= Origin =============================
  34691. return disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date, mergedInfo);
  34692. };
  34693. return rangeDisabledDate;
  34694. }
  34695. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangePickerValue.js
  34696. function offsetPanelDate(generateConfig, picker, date, offset) {
  34697. switch (picker) {
  34698. case 'date':
  34699. case 'week':
  34700. return generateConfig.addMonth(date, offset);
  34701. case 'month':
  34702. case 'quarter':
  34703. return generateConfig.addYear(date, offset);
  34704. case 'year':
  34705. return generateConfig.addYear(date, offset * 10);
  34706. case 'decade':
  34707. return generateConfig.addYear(date, offset * 100);
  34708. default:
  34709. return date;
  34710. }
  34711. }
  34712. var useRangePickerValue_EMPTY_LIST = [];
  34713. function useRangePickerValue(generateConfig, locale, calendarValue, modes, open, activeIndex, pickerMode, multiplePanel) {
  34714. var defaultPickerValue = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : useRangePickerValue_EMPTY_LIST;
  34715. var pickerValue = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : useRangePickerValue_EMPTY_LIST;
  34716. var timeDefaultValue = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : useRangePickerValue_EMPTY_LIST;
  34717. var onPickerValueChange = arguments.length > 11 ? arguments[11] : undefined;
  34718. var minDate = arguments.length > 12 ? arguments[12] : undefined;
  34719. var maxDate = arguments.length > 13 ? arguments[13] : undefined;
  34720. var isTimePicker = pickerMode === 'time';
  34721. // ======================== Active ========================
  34722. // `activeIndex` must be valid to avoid getting empty `pickerValue`
  34723. var mergedActiveIndex = activeIndex || 0;
  34724. // ===================== Picker Value =====================
  34725. var getDefaultPickerValue = function getDefaultPickerValue(index) {
  34726. var now = generateConfig.getNow();
  34727. if (isTimePicker) {
  34728. now = fillTime(generateConfig, now);
  34729. }
  34730. return defaultPickerValue[index] || calendarValue[index] || now;
  34731. };
  34732. // Align `pickerValue` with `showTime.defaultValue`
  34733. var _pickerValue = (0,slicedToArray["default"])(pickerValue, 2),
  34734. startPickerValue = _pickerValue[0],
  34735. endPickerValue = _pickerValue[1];
  34736. // PickerValue state
  34737. var _useMergedState = (0,rc_util_es.useMergedState)(function () {
  34738. return getDefaultPickerValue(0);
  34739. }, {
  34740. value: startPickerValue
  34741. }),
  34742. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  34743. mergedStartPickerValue = _useMergedState2[0],
  34744. setStartPickerValue = _useMergedState2[1];
  34745. var _useMergedState3 = (0,rc_util_es.useMergedState)(function () {
  34746. return getDefaultPickerValue(1);
  34747. }, {
  34748. value: endPickerValue
  34749. }),
  34750. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  34751. mergedEndPickerValue = _useMergedState4[0],
  34752. setEndPickerValue = _useMergedState4[1];
  34753. // Current PickerValue
  34754. var currentPickerValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  34755. var current = [mergedStartPickerValue, mergedEndPickerValue][mergedActiveIndex];
  34756. // Merge the `showTime.defaultValue` into `pickerValue`
  34757. return isTimePicker ? current : fillTime(generateConfig, current, timeDefaultValue[mergedActiveIndex]);
  34758. }, [isTimePicker, mergedStartPickerValue, mergedEndPickerValue, mergedActiveIndex, generateConfig, timeDefaultValue]);
  34759. var setCurrentPickerValue = function setCurrentPickerValue(nextPickerValue) {
  34760. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'panel';
  34761. var updater = [setStartPickerValue, setEndPickerValue][mergedActiveIndex];
  34762. updater(nextPickerValue);
  34763. var clone = [mergedStartPickerValue, mergedEndPickerValue];
  34764. clone[mergedActiveIndex] = nextPickerValue;
  34765. if (onPickerValueChange && (!isSame(generateConfig, locale, mergedStartPickerValue, clone[0], pickerMode) || !isSame(generateConfig, locale, mergedEndPickerValue, clone[1], pickerMode))) {
  34766. onPickerValueChange(clone, {
  34767. source: source,
  34768. range: mergedActiveIndex === 1 ? 'end' : 'start',
  34769. mode: modes
  34770. });
  34771. }
  34772. };
  34773. // ======================== Effect ========================
  34774. /**
  34775. * EndDate pickerValue is little different. It should be:
  34776. * - If date picker (without time), endDate is not same year & month as startDate
  34777. * - pickerValue minus one month
  34778. * - Else pass directly
  34779. */
  34780. var getEndDatePickerValue = function getEndDatePickerValue(startDate, endDate) {
  34781. if (multiplePanel) {
  34782. // Basic offset
  34783. var SAME_CHECKER = {
  34784. date: 'month',
  34785. week: 'month',
  34786. month: 'year',
  34787. quarter: 'year'
  34788. };
  34789. var mode = SAME_CHECKER[pickerMode];
  34790. if (mode && !isSame(generateConfig, locale, startDate, endDate, mode)) {
  34791. return offsetPanelDate(generateConfig, pickerMode, endDate, -1);
  34792. }
  34793. // Year offset
  34794. if (pickerMode === 'year' && startDate) {
  34795. var srcYear = Math.floor(generateConfig.getYear(startDate) / 10);
  34796. var tgtYear = Math.floor(generateConfig.getYear(endDate) / 10);
  34797. if (srcYear !== tgtYear) {
  34798. return offsetPanelDate(generateConfig, pickerMode, endDate, -1);
  34799. }
  34800. }
  34801. }
  34802. return endDate;
  34803. };
  34804. // >>> When switch field, reset the picker value as prev field picker value
  34805. var prevActiveIndexRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  34806. (0,useLayoutEffect["default"])(function () {
  34807. if (open) {
  34808. if (!defaultPickerValue[mergedActiveIndex]) {
  34809. var nextPickerValue = isTimePicker ? null : generateConfig.getNow();
  34810. /**
  34811. * 1. If has prevActiveIndex, use it to avoid panel jump
  34812. * 2. If current field has value
  34813. * - If `activeIndex` is 1 and `calendarValue[0]` is not same panel as `calendarValue[1]`,
  34814. * offset `calendarValue[1]` and set it
  34815. * - Else use `calendarValue[activeIndex]`
  34816. * 3. If current field has no value but another field has value, use another field value
  34817. * 4. Else use now (not any `calendarValue` can ref)
  34818. */
  34819. if (prevActiveIndexRef.current !== null && prevActiveIndexRef.current !== mergedActiveIndex) {
  34820. // If from another field, not jump picker value
  34821. nextPickerValue = [mergedStartPickerValue, mergedEndPickerValue][mergedActiveIndex ^ 1];
  34822. } else if (calendarValue[mergedActiveIndex]) {
  34823. // Current field has value
  34824. nextPickerValue = mergedActiveIndex === 0 ? calendarValue[0] : getEndDatePickerValue(calendarValue[0], calendarValue[1]);
  34825. } else if (calendarValue[mergedActiveIndex ^ 1]) {
  34826. // Current field has no value but another field has value
  34827. nextPickerValue = calendarValue[mergedActiveIndex ^ 1];
  34828. }
  34829. // Only sync when has value, this will sync in the `min-max` logic
  34830. if (nextPickerValue) {
  34831. // nextPickerValue < minDate
  34832. if (minDate && generateConfig.isAfter(minDate, nextPickerValue)) {
  34833. nextPickerValue = minDate;
  34834. }
  34835. // maxDate < nextPickerValue
  34836. var offsetPickerValue = multiplePanel ? offsetPanelDate(generateConfig, pickerMode, nextPickerValue, 1) : nextPickerValue;
  34837. if (maxDate && generateConfig.isAfter(offsetPickerValue, maxDate)) {
  34838. nextPickerValue = multiplePanel ? offsetPanelDate(generateConfig, pickerMode, maxDate, -1) : maxDate;
  34839. }
  34840. setCurrentPickerValue(nextPickerValue, 'reset');
  34841. }
  34842. }
  34843. }
  34844. }, [open, mergedActiveIndex, calendarValue[mergedActiveIndex]]);
  34845. // >>> Reset prevActiveIndex when panel closed
  34846. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  34847. if (open) {
  34848. prevActiveIndexRef.current = mergedActiveIndex;
  34849. } else {
  34850. prevActiveIndexRef.current = null;
  34851. }
  34852. }, [open, mergedActiveIndex]);
  34853. // >>> defaultPickerValue: Resync to `defaultPickerValue` for each panel focused
  34854. (0,useLayoutEffect["default"])(function () {
  34855. if (open && defaultPickerValue) {
  34856. if (defaultPickerValue[mergedActiveIndex]) {
  34857. setCurrentPickerValue(defaultPickerValue[mergedActiveIndex], 'reset');
  34858. }
  34859. }
  34860. }, [open, mergedActiveIndex]);
  34861. return [currentPickerValue, setCurrentPickerValue];
  34862. }
  34863. ;// ./node_modules/rc-picker/es/hooks/useSyncState.js
  34864. /**
  34865. * Sync value with state.
  34866. * This should only used for internal which not affect outside calculation.
  34867. * Since it's not safe for suspense.
  34868. */
  34869. function useSyncState(defaultValue, controlledValue) {
  34870. var valueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(defaultValue);
  34871. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  34872. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  34873. forceUpdate = _React$useState2[1];
  34874. var getter = function getter(useControlledValueFirst) {
  34875. return useControlledValueFirst && controlledValue !== undefined ? controlledValue : valueRef.current;
  34876. };
  34877. var setter = function setter(nextValue) {
  34878. valueRef.current = nextValue;
  34879. forceUpdate({});
  34880. };
  34881. return [getter, setter, getter(true)];
  34882. }
  34883. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useRangeValue.js
  34884. var EMPTY_VALUE = [];
  34885. // Submit Logic:
  34886. // * ✅ Value:
  34887. // * merged value using controlled value, if not, use stateValue
  34888. // * When merged value change, [1] resync calendar value and submit value
  34889. // * ✅ Calender Value:
  34890. // * 💻 When user typing is validate, change the calendar value
  34891. // * 🌅 When user click on the panel, change the calendar value
  34892. // * Submit Value:
  34893. // * 💻 When user blur the input, flush calendar value to submit value
  34894. // * 🌅 When user click on the panel is no needConfirm, flush calendar value to submit value
  34895. // * 🌅 When user click on the panel is needConfirm and click OK, flush calendar value to submit value
  34896. // * Blur logic & close logic:
  34897. // * ✅ For value, always try flush submit
  34898. // * ✅ If `needConfirm`, reset as [1]
  34899. // * Else (`!needConfirm`)
  34900. // * If has another index field, active another index
  34901. // * ✅ Flush submit:
  34902. // * If all the start & end field is confirmed or all blur or panel closed
  34903. // * Update `needSubmit` mark to true
  34904. // * trigger onChange by `needSubmit` and update stateValue
  34905. function useUtil(generateConfig, locale, formatList) {
  34906. var getDateTexts = function getDateTexts(dates) {
  34907. return dates.map(function (date) {
  34908. return formatValue(date, {
  34909. generateConfig: generateConfig,
  34910. locale: locale,
  34911. format: formatList[0]
  34912. });
  34913. });
  34914. };
  34915. var isSameDates = function isSameDates(source, target) {
  34916. var maxLen = Math.max(source.length, target.length);
  34917. var diffIndex = -1;
  34918. for (var i = 0; i < maxLen; i += 1) {
  34919. var prev = source[i] || null;
  34920. var next = target[i] || null;
  34921. if (prev !== next && !isSameTimestamp(generateConfig, prev, next)) {
  34922. diffIndex = i;
  34923. break;
  34924. }
  34925. }
  34926. return [diffIndex < 0, diffIndex !== 0];
  34927. };
  34928. return [getDateTexts, isSameDates];
  34929. }
  34930. function orderDates(dates, generateConfig) {
  34931. return (0,toConsumableArray["default"])(dates).sort(function (a, b) {
  34932. return generateConfig.isAfter(a, b) ? 1 : -1;
  34933. });
  34934. }
  34935. /**
  34936. * Used for internal value management.
  34937. * It should always use `mergedValue` in render logic
  34938. */
  34939. function useCalendarValue(mergedValue) {
  34940. var _useSyncState = useSyncState(mergedValue),
  34941. _useSyncState2 = (0,slicedToArray["default"])(_useSyncState, 2),
  34942. calendarValue = _useSyncState2[0],
  34943. setCalendarValue = _useSyncState2[1];
  34944. /** Sync calendarValue & submitValue back with value */
  34945. var syncWithValue = (0,rc_util_es.useEvent)(function () {
  34946. setCalendarValue(mergedValue);
  34947. });
  34948. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  34949. syncWithValue();
  34950. }, [mergedValue]);
  34951. return [calendarValue, setCalendarValue];
  34952. }
  34953. /**
  34954. * Control the internal `value` align with prop `value` and provide a temp `calendarValue` for ui.
  34955. * `calendarValue` will be reset when blur & focus & open.
  34956. */
  34957. function useInnerValue(generateConfig, locale, formatList, /** Used for RangePicker. `true` means [DateType, DateType] or will be DateType[] */
  34958. rangeValue,
  34959. /**
  34960. * Trigger order when trigger calendar value change.
  34961. * This should only used in SinglePicker with `multiple` mode.
  34962. * So when `rangeValue` is `true`, order will be ignored.
  34963. */
  34964. order, defaultValue, value, onCalendarChange, onOk) {
  34965. // This is the root value which will sync with controlled or uncontrolled value
  34966. var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
  34967. value: value
  34968. }),
  34969. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  34970. innerValue = _useMergedState2[0],
  34971. setInnerValue = _useMergedState2[1];
  34972. var mergedValue = innerValue || EMPTY_VALUE;
  34973. // ========================= Inner Values =========================
  34974. var _useCalendarValue = useCalendarValue(mergedValue),
  34975. _useCalendarValue2 = (0,slicedToArray["default"])(_useCalendarValue, 2),
  34976. calendarValue = _useCalendarValue2[0],
  34977. setCalendarValue = _useCalendarValue2[1];
  34978. // ============================ Change ============================
  34979. var _useUtil = useUtil(generateConfig, locale, formatList),
  34980. _useUtil2 = (0,slicedToArray["default"])(_useUtil, 2),
  34981. getDateTexts = _useUtil2[0],
  34982. isSameDates = _useUtil2[1];
  34983. var triggerCalendarChange = (0,rc_util_es.useEvent)(function (nextCalendarValues) {
  34984. var clone = (0,toConsumableArray["default"])(nextCalendarValues);
  34985. if (rangeValue) {
  34986. for (var i = 0; i < 2; i += 1) {
  34987. clone[i] = clone[i] || null;
  34988. }
  34989. } else if (order) {
  34990. clone = orderDates(clone.filter(function (date) {
  34991. return date;
  34992. }), generateConfig);
  34993. }
  34994. // Update merged value
  34995. var _isSameDates = isSameDates(calendarValue(), clone),
  34996. _isSameDates2 = (0,slicedToArray["default"])(_isSameDates, 2),
  34997. isSameMergedDates = _isSameDates2[0],
  34998. isSameStart = _isSameDates2[1];
  34999. if (!isSameMergedDates) {
  35000. setCalendarValue(clone);
  35001. // Trigger calendar change event
  35002. if (onCalendarChange) {
  35003. var cellTexts = getDateTexts(clone);
  35004. onCalendarChange(clone, cellTexts, {
  35005. range: isSameStart ? 'end' : 'start'
  35006. });
  35007. }
  35008. }
  35009. });
  35010. var triggerOk = function triggerOk() {
  35011. if (onOk) {
  35012. onOk(calendarValue());
  35013. }
  35014. };
  35015. return [mergedValue, setInnerValue, calendarValue, triggerCalendarChange, triggerOk];
  35016. }
  35017. function useRangeValue(info, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, open, isInvalidateDate) {
  35018. var generateConfig = info.generateConfig,
  35019. locale = info.locale,
  35020. picker = info.picker,
  35021. onChange = info.onChange,
  35022. allowEmpty = info.allowEmpty,
  35023. order = info.order;
  35024. var orderOnChange = disabled.some(function (d) {
  35025. return d;
  35026. }) ? false : order;
  35027. // ============================= Util =============================
  35028. var _useUtil3 = useUtil(generateConfig, locale, formatList),
  35029. _useUtil4 = (0,slicedToArray["default"])(_useUtil3, 2),
  35030. getDateTexts = _useUtil4[0],
  35031. isSameDates = _useUtil4[1];
  35032. // ============================ Values ============================
  35033. // Used for trigger `onChange` event.
  35034. // Record current value which is wait for submit.
  35035. var _useSyncState3 = useSyncState(mergedValue),
  35036. _useSyncState4 = (0,slicedToArray["default"])(_useSyncState3, 2),
  35037. submitValue = _useSyncState4[0],
  35038. setSubmitValue = _useSyncState4[1];
  35039. /** Sync calendarValue & submitValue back with value */
  35040. var syncWithValue = (0,rc_util_es.useEvent)(function () {
  35041. setSubmitValue(mergedValue);
  35042. });
  35043. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  35044. syncWithValue();
  35045. }, [mergedValue]);
  35046. // ============================ Submit ============================
  35047. var triggerSubmit = (0,rc_util_es.useEvent)(function (nextValue) {
  35048. var isNullValue = nextValue === null;
  35049. var clone = (0,toConsumableArray["default"])(nextValue || submitValue());
  35050. // Fill null value
  35051. if (isNullValue) {
  35052. var maxLen = Math.max(disabled.length, clone.length);
  35053. for (var i = 0; i < maxLen; i += 1) {
  35054. if (!disabled[i]) {
  35055. clone[i] = null;
  35056. }
  35057. }
  35058. }
  35059. // Only when exist value to sort
  35060. if (orderOnChange && clone[0] && clone[1]) {
  35061. clone = orderDates(clone, generateConfig);
  35062. }
  35063. // Sync `calendarValue`
  35064. triggerCalendarChange(clone);
  35065. // ========= Validate check =========
  35066. var _clone = clone,
  35067. _clone2 = (0,slicedToArray["default"])(_clone, 2),
  35068. start = _clone2[0],
  35069. end = _clone2[1];
  35070. // >>> Empty
  35071. var startEmpty = !start;
  35072. var endEmpty = !end;
  35073. var validateEmptyDateRange = allowEmpty ?
  35074. // Validate empty start
  35075. (!startEmpty || allowEmpty[0]) && (
  35076. // Validate empty end
  35077. !endEmpty || allowEmpty[1]) : true;
  35078. // >>> Order
  35079. var validateOrder = !order || startEmpty || endEmpty || isSame(generateConfig, locale, start, end, picker) || generateConfig.isAfter(end, start);
  35080. // >>> Invalid
  35081. var validateDates =
  35082. // Validate start
  35083. (disabled[0] || !start || !isInvalidateDate(start, {
  35084. activeIndex: 0
  35085. })) && (
  35086. // Validate end
  35087. disabled[1] || !end || !isInvalidateDate(end, {
  35088. from: start,
  35089. activeIndex: 1
  35090. }));
  35091. // >>> Result
  35092. var allPassed =
  35093. // Null value is from clear button
  35094. isNullValue ||
  35095. // Normal check
  35096. validateEmptyDateRange && validateOrder && validateDates;
  35097. if (allPassed) {
  35098. // Sync value with submit value
  35099. setInnerValue(clone);
  35100. var _isSameDates3 = isSameDates(clone, mergedValue),
  35101. _isSameDates4 = (0,slicedToArray["default"])(_isSameDates3, 1),
  35102. isSameMergedDates = _isSameDates4[0];
  35103. // Trigger `onChange` if needed
  35104. if (onChange && !isSameMergedDates) {
  35105. onChange(
  35106. // Return null directly if all date are empty
  35107. isNullValue && clone.every(function (val) {
  35108. return !val;
  35109. }) ? null : clone, getDateTexts(clone));
  35110. }
  35111. }
  35112. return allPassed;
  35113. });
  35114. // ========================= Flush Submit =========================
  35115. var flushSubmit = (0,rc_util_es.useEvent)(function (index, needTriggerChange) {
  35116. var nextSubmitValue = fillIndex(submitValue(), index, getCalendarValue()[index]);
  35117. setSubmitValue(nextSubmitValue);
  35118. if (needTriggerChange) {
  35119. triggerSubmit();
  35120. }
  35121. });
  35122. // ============================ Effect ============================
  35123. // All finished action trigger after 2 frames
  35124. var interactiveFinished = !focused && !open;
  35125. useLockEffect(!interactiveFinished, function () {
  35126. if (interactiveFinished) {
  35127. // Always try to trigger submit first
  35128. triggerSubmit();
  35129. // Trigger calendar change since this is a effect reset
  35130. // https://github.com/ant-design/ant-design/issues/22351
  35131. triggerCalendarChange(mergedValue);
  35132. // Sync with value anyway
  35133. syncWithValue();
  35134. }
  35135. }, 2);
  35136. // ============================ Return ============================
  35137. return [flushSubmit, triggerSubmit];
  35138. }
  35139. ;// ./node_modules/rc-picker/es/PickerInput/hooks/useShowNow.js
  35140. function useShowNow(picker, mode, showNow, showToday, rangePicker) {
  35141. if (mode !== 'date' && mode !== 'time') {
  35142. return false;
  35143. }
  35144. if (showNow !== undefined) {
  35145. return showNow;
  35146. }
  35147. // Compatible with old version `showToday`
  35148. if (showToday !== undefined) {
  35149. return showToday;
  35150. }
  35151. return !rangePicker && (picker === 'date' || picker === 'time');
  35152. }
  35153. ;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/util.js
  35154. function findValidateTime(date, getHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits, generateConfig) {
  35155. var nextDate = date;
  35156. function alignValidate(getUnitValue, setUnitValue, units) {
  35157. var nextValue = generateConfig[getUnitValue](nextDate);
  35158. var nextUnit = units.find(function (unit) {
  35159. return unit.value === nextValue;
  35160. });
  35161. if (!nextUnit || nextUnit.disabled) {
  35162. // Find most closest unit
  35163. var validateUnits = units.filter(function (unit) {
  35164. return !unit.disabled;
  35165. });
  35166. var reverseEnabledUnits = (0,toConsumableArray["default"])(validateUnits).reverse();
  35167. var validateUnit = reverseEnabledUnits.find(function (unit) {
  35168. return unit.value <= nextValue;
  35169. }) || validateUnits[0];
  35170. if (validateUnit) {
  35171. nextValue = validateUnit.value;
  35172. nextDate = generateConfig[setUnitValue](nextDate, nextValue);
  35173. }
  35174. }
  35175. return nextValue;
  35176. }
  35177. // Find validate hour
  35178. var nextHour = alignValidate('getHour', 'setHour', getHourUnits());
  35179. // Find validate minute
  35180. var nextMinute = alignValidate('getMinute', 'setMinute', getMinuteUnits(nextHour));
  35181. // Find validate second
  35182. var nextSecond = alignValidate('getSecond', 'setSecond', getSecondUnits(nextHour, nextMinute));
  35183. // Find validate millisecond
  35184. alignValidate('getMillisecond', 'setMillisecond', getMillisecondUnits(nextHour, nextMinute, nextSecond));
  35185. return nextDate;
  35186. }
  35187. ;// ./node_modules/rc-picker/es/hooks/useTimeInfo.js
  35188. function emptyDisabled() {
  35189. return [];
  35190. }
  35191. function generateUnits(start, end) {
  35192. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  35193. var hideDisabledOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  35194. var disabledUnits = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
  35195. var pad = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 2;
  35196. var units = [];
  35197. var integerStep = step >= 1 ? step | 0 : 1;
  35198. for (var i = start; i <= end; i += integerStep) {
  35199. var disabled = disabledUnits.includes(i);
  35200. if (!disabled || !hideDisabledOptions) {
  35201. units.push({
  35202. label: leftPad(i, pad),
  35203. value: i,
  35204. disabled: disabled
  35205. });
  35206. }
  35207. }
  35208. return units;
  35209. }
  35210. /**
  35211. * Parse time props to get util info
  35212. */
  35213. function useTimeInfo(generateConfig) {
  35214. var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  35215. var date = arguments.length > 2 ? arguments[2] : undefined;
  35216. var _ref = props || {},
  35217. use12Hours = _ref.use12Hours,
  35218. _ref$hourStep = _ref.hourStep,
  35219. hourStep = _ref$hourStep === void 0 ? 1 : _ref$hourStep,
  35220. _ref$minuteStep = _ref.minuteStep,
  35221. minuteStep = _ref$minuteStep === void 0 ? 1 : _ref$minuteStep,
  35222. _ref$secondStep = _ref.secondStep,
  35223. secondStep = _ref$secondStep === void 0 ? 1 : _ref$secondStep,
  35224. _ref$millisecondStep = _ref.millisecondStep,
  35225. millisecondStep = _ref$millisecondStep === void 0 ? 100 : _ref$millisecondStep,
  35226. hideDisabledOptions = _ref.hideDisabledOptions,
  35227. disabledTime = _ref.disabledTime,
  35228. disabledHours = _ref.disabledHours,
  35229. disabledMinutes = _ref.disabledMinutes,
  35230. disabledSeconds = _ref.disabledSeconds;
  35231. var mergedDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35232. return date || generateConfig.getNow();
  35233. }, [date, generateConfig]);
  35234. // ======================== Warnings ========================
  35235. if (true) {
  35236. var isHourStepValid = 24 % hourStep === 0;
  35237. var isMinuteStepValid = 60 % minuteStep === 0;
  35238. var isSecondStepValid = 60 % secondStep === 0;
  35239. (0,rc_util_es.warning)(isHourStepValid, "`hourStep` ".concat(hourStep, " is invalid. It should be a factor of 24."));
  35240. (0,rc_util_es.warning)(isMinuteStepValid, "`minuteStep` ".concat(minuteStep, " is invalid. It should be a factor of 60."));
  35241. (0,rc_util_es.warning)(isSecondStepValid, "`secondStep` ".concat(secondStep, " is invalid. It should be a factor of 60."));
  35242. }
  35243. // ======================== Disabled ========================
  35244. var getDisabledTimes = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (targetDate) {
  35245. var disabledConfig = (disabledTime === null || disabledTime === void 0 ? void 0 : disabledTime(targetDate)) || {};
  35246. return [disabledConfig.disabledHours || disabledHours || emptyDisabled, disabledConfig.disabledMinutes || disabledMinutes || emptyDisabled, disabledConfig.disabledSeconds || disabledSeconds || emptyDisabled, disabledConfig.disabledMilliseconds || emptyDisabled];
  35247. }, [disabledTime, disabledHours, disabledMinutes, disabledSeconds]);
  35248. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35249. return getDisabledTimes(mergedDate);
  35250. }, [mergedDate, getDisabledTimes]),
  35251. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 4),
  35252. mergedDisabledHours = _React$useMemo2[0],
  35253. mergedDisabledMinutes = _React$useMemo2[1],
  35254. mergedDisabledSeconds = _React$useMemo2[2],
  35255. mergedDisabledMilliseconds = _React$useMemo2[3];
  35256. // ========================= Column =========================
  35257. var getAllUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (getDisabledHours, getDisabledMinutes, getDisabledSeconds, getDisabledMilliseconds) {
  35258. var hours = generateUnits(0, 23, hourStep, hideDisabledOptions, getDisabledHours());
  35259. // Hours
  35260. var rowHourUnits = use12Hours ? hours.map(function (unit) {
  35261. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, unit), {}, {
  35262. label: leftPad(unit.value % 12 || 12, 2)
  35263. });
  35264. }) : hours;
  35265. // Minutes
  35266. var getMinuteUnits = function getMinuteUnits(nextHour) {
  35267. return generateUnits(0, 59, minuteStep, hideDisabledOptions, getDisabledMinutes(nextHour));
  35268. };
  35269. // Seconds
  35270. var getSecondUnits = function getSecondUnits(nextHour, nextMinute) {
  35271. return generateUnits(0, 59, secondStep, hideDisabledOptions, getDisabledSeconds(nextHour, nextMinute));
  35272. };
  35273. // Milliseconds
  35274. var getMillisecondUnits = function getMillisecondUnits(nextHour, nextMinute, nextSecond) {
  35275. return generateUnits(0, 999, millisecondStep, hideDisabledOptions, getDisabledMilliseconds(nextHour, nextMinute, nextSecond), 3);
  35276. };
  35277. return [rowHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits];
  35278. }, [hideDisabledOptions, hourStep, use12Hours, millisecondStep, minuteStep, secondStep]);
  35279. var _React$useMemo3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35280. return getAllUnits(mergedDisabledHours, mergedDisabledMinutes, mergedDisabledSeconds, mergedDisabledMilliseconds);
  35281. }, [getAllUnits, mergedDisabledHours, mergedDisabledMinutes, mergedDisabledSeconds, mergedDisabledMilliseconds]),
  35282. _React$useMemo4 = (0,slicedToArray["default"])(_React$useMemo3, 4),
  35283. rowHourUnits = _React$useMemo4[0],
  35284. getMinuteUnits = _React$useMemo4[1],
  35285. getSecondUnits = _React$useMemo4[2],
  35286. getMillisecondUnits = _React$useMemo4[3];
  35287. // ======================== Validate ========================
  35288. /**
  35289. * Get validate time with `disabledTime`, `certainDate` to specific the date need to check
  35290. */
  35291. var getValidTime = function getValidTime(nextTime, certainDate) {
  35292. var getCheckHourUnits = function getCheckHourUnits() {
  35293. return rowHourUnits;
  35294. };
  35295. var getCheckMinuteUnits = getMinuteUnits;
  35296. var getCheckSecondUnits = getSecondUnits;
  35297. var getCheckMillisecondUnits = getMillisecondUnits;
  35298. if (certainDate) {
  35299. var _getDisabledTimes = getDisabledTimes(certainDate),
  35300. _getDisabledTimes2 = (0,slicedToArray["default"])(_getDisabledTimes, 4),
  35301. targetDisabledHours = _getDisabledTimes2[0],
  35302. targetDisabledMinutes = _getDisabledTimes2[1],
  35303. targetDisabledSeconds = _getDisabledTimes2[2],
  35304. targetDisabledMilliseconds = _getDisabledTimes2[3];
  35305. var _getAllUnits = getAllUnits(targetDisabledHours, targetDisabledMinutes, targetDisabledSeconds, targetDisabledMilliseconds),
  35306. _getAllUnits2 = (0,slicedToArray["default"])(_getAllUnits, 4),
  35307. targetRowHourUnits = _getAllUnits2[0],
  35308. targetGetMinuteUnits = _getAllUnits2[1],
  35309. targetGetSecondUnits = _getAllUnits2[2],
  35310. targetGetMillisecondUnits = _getAllUnits2[3];
  35311. getCheckHourUnits = function getCheckHourUnits() {
  35312. return targetRowHourUnits;
  35313. };
  35314. getCheckMinuteUnits = targetGetMinuteUnits;
  35315. getCheckSecondUnits = targetGetSecondUnits;
  35316. getCheckMillisecondUnits = targetGetMillisecondUnits;
  35317. }
  35318. var validateDate = findValidateTime(nextTime, getCheckHourUnits, getCheckMinuteUnits, getCheckSecondUnits, getCheckMillisecondUnits, generateConfig);
  35319. return validateDate;
  35320. };
  35321. return [
  35322. // getValidTime
  35323. getValidTime,
  35324. // Units
  35325. rowHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits];
  35326. }
  35327. ;// ./node_modules/rc-picker/es/PickerInput/Popup/Footer.js
  35328. function Footer_Footer(props) {
  35329. var mode = props.mode,
  35330. internalMode = props.internalMode,
  35331. renderExtraFooter = props.renderExtraFooter,
  35332. showNow = props.showNow,
  35333. showTime = props.showTime,
  35334. onSubmit = props.onSubmit,
  35335. onNow = props.onNow,
  35336. invalid = props.invalid,
  35337. needConfirm = props.needConfirm,
  35338. generateConfig = props.generateConfig,
  35339. disabledDate = props.disabledDate;
  35340. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  35341. prefixCls = _React$useContext.prefixCls,
  35342. locale = _React$useContext.locale,
  35343. _React$useContext$but = _React$useContext.button,
  35344. Button = _React$useContext$but === void 0 ? 'button' : _React$useContext$but;
  35345. // >>> Now
  35346. var now = generateConfig.getNow();
  35347. var _useTimeInfo = useTimeInfo(generateConfig, showTime, now),
  35348. _useTimeInfo2 = (0,slicedToArray["default"])(_useTimeInfo, 1),
  35349. getValidTime = _useTimeInfo2[0];
  35350. // ======================== Extra =========================
  35351. var extraNode = renderExtraFooter === null || renderExtraFooter === void 0 ? void 0 : renderExtraFooter(mode);
  35352. // ======================== Ranges ========================
  35353. var nowDisabled = disabledDate(now, {
  35354. type: mode
  35355. });
  35356. var onInternalNow = function onInternalNow() {
  35357. if (!nowDisabled) {
  35358. var validateNow = getValidTime(now);
  35359. onNow(validateNow);
  35360. }
  35361. };
  35362. var nowPrefixCls = "".concat(prefixCls, "-now");
  35363. var nowBtnPrefixCls = "".concat(nowPrefixCls, "-btn");
  35364. var presetNode = showNow && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  35365. className: nowPrefixCls
  35366. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  35367. className: classnames_default()(nowBtnPrefixCls, nowDisabled && "".concat(nowBtnPrefixCls, "-disabled")),
  35368. "aria-disabled": nowDisabled,
  35369. onClick: onInternalNow
  35370. }, internalMode === 'date' ? locale.today : locale.now));
  35371. // >>> OK
  35372. var okNode = needConfirm && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  35373. className: "".concat(prefixCls, "-ok")
  35374. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Button, {
  35375. disabled: invalid,
  35376. onClick: onSubmit
  35377. }, locale.ok));
  35378. var rangeNode = (presetNode || okNode) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  35379. className: "".concat(prefixCls, "-ranges")
  35380. }, presetNode, okNode);
  35381. // ======================== Render ========================
  35382. if (!extraNode && !rangeNode) {
  35383. return null;
  35384. }
  35385. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35386. className: "".concat(prefixCls, "-footer")
  35387. }, extraNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35388. className: "".concat(prefixCls, "-footer-extra")
  35389. }, extraNode), rangeNode);
  35390. }
  35391. ;// ./node_modules/rc-picker/es/hooks/useToggleDates.js
  35392. /**
  35393. * Toggles the presence of a value in an array.
  35394. * If the value exists in the array, removed it.
  35395. * Else add it.
  35396. */
  35397. function useToggleDates(generateConfig, locale, panelMode) {
  35398. function toggleDates(list, target) {
  35399. var index = list.findIndex(function (date) {
  35400. return isSame(generateConfig, locale, date, target, panelMode);
  35401. });
  35402. if (index === -1) {
  35403. return [].concat((0,toConsumableArray["default"])(list), [target]);
  35404. }
  35405. var sliceList = (0,toConsumableArray["default"])(list);
  35406. sliceList.splice(index, 1);
  35407. return sliceList;
  35408. }
  35409. return toggleDates;
  35410. }
  35411. ;// ./node_modules/rc-picker/es/PickerPanel/context.js
  35412. /** Used for each single Panel. e.g. DatePanel */
  35413. var PanelContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  35414. function usePanelContext() {
  35415. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PanelContext);
  35416. }
  35417. /**
  35418. * Get shared props for the SharedPanelProps interface.
  35419. */
  35420. function useInfo(props, panelType) {
  35421. var prefixCls = props.prefixCls,
  35422. generateConfig = props.generateConfig,
  35423. locale = props.locale,
  35424. disabledDate = props.disabledDate,
  35425. minDate = props.minDate,
  35426. maxDate = props.maxDate,
  35427. cellRender = props.cellRender,
  35428. hoverValue = props.hoverValue,
  35429. hoverRangeValue = props.hoverRangeValue,
  35430. onHover = props.onHover,
  35431. values = props.values,
  35432. pickerValue = props.pickerValue,
  35433. onSelect = props.onSelect,
  35434. prevIcon = props.prevIcon,
  35435. nextIcon = props.nextIcon,
  35436. superPrevIcon = props.superPrevIcon,
  35437. superNextIcon = props.superNextIcon;
  35438. // ========================= MISC =========================
  35439. var now = generateConfig.getNow();
  35440. // ========================= Info =========================
  35441. var info = {
  35442. now: now,
  35443. values: values,
  35444. pickerValue: pickerValue,
  35445. prefixCls: prefixCls,
  35446. disabledDate: disabledDate,
  35447. minDate: minDate,
  35448. maxDate: maxDate,
  35449. cellRender: cellRender,
  35450. hoverValue: hoverValue,
  35451. hoverRangeValue: hoverRangeValue,
  35452. onHover: onHover,
  35453. locale: locale,
  35454. generateConfig: generateConfig,
  35455. onSelect: onSelect,
  35456. panelType: panelType,
  35457. // Icons
  35458. prevIcon: prevIcon,
  35459. nextIcon: nextIcon,
  35460. superPrevIcon: superPrevIcon,
  35461. superNextIcon: superNextIcon
  35462. };
  35463. return [info, now];
  35464. }
  35465. // ============================== Internal ==============================
  35466. /**
  35467. * Internal usage for RangePicker to not to show the operation arrow
  35468. */
  35469. var PickerHackContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  35470. if (true) {
  35471. PickerHackContext.displayName = 'PickerHackContext';
  35472. }
  35473. ;// ./node_modules/rc-picker/es/PickerPanel/PanelBody.js
  35474. function PanelBody(props) {
  35475. var rowNum = props.rowNum,
  35476. colNum = props.colNum,
  35477. baseDate = props.baseDate,
  35478. getCellDate = props.getCellDate,
  35479. prefixColumn = props.prefixColumn,
  35480. rowClassName = props.rowClassName,
  35481. titleFormat = props.titleFormat,
  35482. getCellText = props.getCellText,
  35483. getCellClassName = props.getCellClassName,
  35484. headerCells = props.headerCells,
  35485. _props$cellSelection = props.cellSelection,
  35486. cellSelection = _props$cellSelection === void 0 ? true : _props$cellSelection,
  35487. disabledDate = props.disabledDate;
  35488. var _usePanelContext = usePanelContext(),
  35489. prefixCls = _usePanelContext.prefixCls,
  35490. type = _usePanelContext.panelType,
  35491. now = _usePanelContext.now,
  35492. contextDisabledDate = _usePanelContext.disabledDate,
  35493. cellRender = _usePanelContext.cellRender,
  35494. onHover = _usePanelContext.onHover,
  35495. hoverValue = _usePanelContext.hoverValue,
  35496. hoverRangeValue = _usePanelContext.hoverRangeValue,
  35497. generateConfig = _usePanelContext.generateConfig,
  35498. values = _usePanelContext.values,
  35499. locale = _usePanelContext.locale,
  35500. onSelect = _usePanelContext.onSelect;
  35501. var mergedDisabledDate = disabledDate || contextDisabledDate;
  35502. var cellPrefixCls = "".concat(prefixCls, "-cell");
  35503. // ============================= Context ==============================
  35504. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext),
  35505. onCellDblClick = _React$useContext.onCellDblClick;
  35506. // ============================== Value ===============================
  35507. var matchValues = function matchValues(date) {
  35508. return values.some(function (singleValue) {
  35509. return singleValue && isSame(generateConfig, locale, date, singleValue, type);
  35510. });
  35511. };
  35512. // =============================== Body ===============================
  35513. var rows = [];
  35514. for (var row = 0; row < rowNum; row += 1) {
  35515. var rowNode = [];
  35516. var rowStartDate = void 0;
  35517. var _loop = function _loop() {
  35518. var offset = row * colNum + col;
  35519. var currentDate = getCellDate(baseDate, offset);
  35520. var disabled = mergedDisabledDate === null || mergedDisabledDate === void 0 ? void 0 : mergedDisabledDate(currentDate, {
  35521. type: type
  35522. });
  35523. // Row Start Cell
  35524. if (col === 0) {
  35525. rowStartDate = currentDate;
  35526. if (prefixColumn) {
  35527. rowNode.push(prefixColumn(rowStartDate));
  35528. }
  35529. }
  35530. // Range
  35531. var inRange = false;
  35532. var rangeStart = false;
  35533. var rangeEnd = false;
  35534. if (cellSelection && hoverRangeValue) {
  35535. var _hoverRangeValue = (0,slicedToArray["default"])(hoverRangeValue, 2),
  35536. hoverStart = _hoverRangeValue[0],
  35537. hoverEnd = _hoverRangeValue[1];
  35538. inRange = isInRange(generateConfig, hoverStart, hoverEnd, currentDate);
  35539. rangeStart = isSame(generateConfig, locale, currentDate, hoverStart, type);
  35540. rangeEnd = isSame(generateConfig, locale, currentDate, hoverEnd, type);
  35541. }
  35542. // Title
  35543. var title = titleFormat ? formatValue(currentDate, {
  35544. locale: locale,
  35545. format: titleFormat,
  35546. generateConfig: generateConfig
  35547. }) : undefined;
  35548. // Render
  35549. var inner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35550. className: "".concat(cellPrefixCls, "-inner")
  35551. }, getCellText(currentDate));
  35552. rowNode.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("td", {
  35553. key: col,
  35554. title: title,
  35555. className: classnames_default()(cellPrefixCls, (0,objectSpread2["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
  35556. return isSame(generateConfig, locale, currentDate, date, type);
  35557. })), "".concat(cellPrefixCls, "-in-range"), inRange && !rangeStart && !rangeEnd), "".concat(cellPrefixCls, "-range-start"), rangeStart), "".concat(cellPrefixCls, "-range-end"), rangeEnd), "".concat(prefixCls, "-cell-selected"), !hoverRangeValue &&
  35558. // WeekPicker use row instead
  35559. type !== 'week' && matchValues(currentDate)), getCellClassName(currentDate))),
  35560. onClick: function onClick() {
  35561. if (!disabled) {
  35562. onSelect(currentDate);
  35563. }
  35564. },
  35565. onDoubleClick: function onDoubleClick() {
  35566. if (!disabled && onCellDblClick) {
  35567. onCellDblClick();
  35568. }
  35569. },
  35570. onMouseEnter: function onMouseEnter() {
  35571. if (!disabled) {
  35572. onHover === null || onHover === void 0 || onHover(currentDate);
  35573. }
  35574. },
  35575. onMouseLeave: function onMouseLeave() {
  35576. if (!disabled) {
  35577. onHover === null || onHover === void 0 || onHover(null);
  35578. }
  35579. }
  35580. }, cellRender ? cellRender(currentDate, {
  35581. prefixCls: prefixCls,
  35582. originNode: inner,
  35583. today: now,
  35584. type: type,
  35585. locale: locale
  35586. }) : inner));
  35587. };
  35588. for (var col = 0; col < colNum; col += 1) {
  35589. _loop();
  35590. }
  35591. rows.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
  35592. key: row,
  35593. className: rowClassName === null || rowClassName === void 0 ? void 0 : rowClassName(rowStartDate)
  35594. }, rowNode));
  35595. }
  35596. // ============================== Render ==============================
  35597. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35598. className: "".concat(prefixCls, "-body")
  35599. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("table", {
  35600. className: "".concat(prefixCls, "-content")
  35601. }, headerCells && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("thead", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", null, headerCells)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tbody", null, rows)));
  35602. }
  35603. ;// ./node_modules/rc-picker/es/PickerPanel/PanelHeader.js
  35604. var HIDDEN_STYLE = {
  35605. visibility: 'hidden'
  35606. };
  35607. function PanelHeader(props) {
  35608. var offset = props.offset,
  35609. superOffset = props.superOffset,
  35610. onChange = props.onChange,
  35611. getStart = props.getStart,
  35612. getEnd = props.getEnd,
  35613. children = props.children;
  35614. var _usePanelContext = usePanelContext(),
  35615. prefixCls = _usePanelContext.prefixCls,
  35616. _usePanelContext$prev = _usePanelContext.prevIcon,
  35617. prevIcon = _usePanelContext$prev === void 0 ? "\u2039" : _usePanelContext$prev,
  35618. _usePanelContext$next = _usePanelContext.nextIcon,
  35619. nextIcon = _usePanelContext$next === void 0 ? "\u203A" : _usePanelContext$next,
  35620. _usePanelContext$supe = _usePanelContext.superPrevIcon,
  35621. superPrevIcon = _usePanelContext$supe === void 0 ? "\xAB" : _usePanelContext$supe,
  35622. _usePanelContext$supe2 = _usePanelContext.superNextIcon,
  35623. superNextIcon = _usePanelContext$supe2 === void 0 ? "\xBB" : _usePanelContext$supe2,
  35624. minDate = _usePanelContext.minDate,
  35625. maxDate = _usePanelContext.maxDate,
  35626. generateConfig = _usePanelContext.generateConfig,
  35627. locale = _usePanelContext.locale,
  35628. pickerValue = _usePanelContext.pickerValue,
  35629. type = _usePanelContext.panelType;
  35630. var headerPrefixCls = "".concat(prefixCls, "-header");
  35631. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext),
  35632. hidePrev = _React$useContext.hidePrev,
  35633. hideNext = _React$useContext.hideNext,
  35634. hideHeader = _React$useContext.hideHeader;
  35635. // ======================= Limitation =======================
  35636. var disabledOffsetPrev = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35637. if (!minDate || !offset || !getEnd) {
  35638. return false;
  35639. }
  35640. var prevPanelLimitDate = getEnd(offset(-1, pickerValue));
  35641. return !isSameOrAfter(generateConfig, locale, prevPanelLimitDate, minDate, type);
  35642. }, [minDate, offset, pickerValue, getEnd, generateConfig, locale, type]);
  35643. var disabledSuperOffsetPrev = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35644. if (!minDate || !superOffset || !getEnd) {
  35645. return false;
  35646. }
  35647. var prevPanelLimitDate = getEnd(superOffset(-1, pickerValue));
  35648. return !isSameOrAfter(generateConfig, locale, prevPanelLimitDate, minDate, type);
  35649. }, [minDate, superOffset, pickerValue, getEnd, generateConfig, locale, type]);
  35650. var disabledOffsetNext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35651. if (!maxDate || !offset || !getStart) {
  35652. return false;
  35653. }
  35654. var nextPanelLimitDate = getStart(offset(1, pickerValue));
  35655. return !isSameOrAfter(generateConfig, locale, maxDate, nextPanelLimitDate, type);
  35656. }, [maxDate, offset, pickerValue, getStart, generateConfig, locale, type]);
  35657. var disabledSuperOffsetNext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  35658. if (!maxDate || !superOffset || !getStart) {
  35659. return false;
  35660. }
  35661. var nextPanelLimitDate = getStart(superOffset(1, pickerValue));
  35662. return !isSameOrAfter(generateConfig, locale, maxDate, nextPanelLimitDate, type);
  35663. }, [maxDate, superOffset, pickerValue, getStart, generateConfig, locale, type]);
  35664. // ========================= Offset =========================
  35665. var onOffset = function onOffset(distance) {
  35666. if (offset) {
  35667. onChange(offset(distance, pickerValue));
  35668. }
  35669. };
  35670. var onSuperOffset = function onSuperOffset(distance) {
  35671. if (superOffset) {
  35672. onChange(superOffset(distance, pickerValue));
  35673. }
  35674. };
  35675. // ========================= Render =========================
  35676. if (hideHeader) {
  35677. return null;
  35678. }
  35679. var prevBtnCls = "".concat(headerPrefixCls, "-prev-btn");
  35680. var nextBtnCls = "".concat(headerPrefixCls, "-next-btn");
  35681. var superPrevBtnCls = "".concat(headerPrefixCls, "-super-prev-btn");
  35682. var superNextBtnCls = "".concat(headerPrefixCls, "-super-next-btn");
  35683. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35684. className: headerPrefixCls
  35685. }, superOffset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  35686. type: "button",
  35687. "aria-label": locale.previousYear,
  35688. onClick: function onClick() {
  35689. return onSuperOffset(-1);
  35690. },
  35691. tabIndex: -1,
  35692. className: classnames_default()(superPrevBtnCls, disabledSuperOffsetPrev && "".concat(superPrevBtnCls, "-disabled")),
  35693. disabled: disabledSuperOffsetPrev,
  35694. style: hidePrev ? HIDDEN_STYLE : {}
  35695. }, superPrevIcon), offset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  35696. type: "button",
  35697. "aria-label": locale.previousMonth,
  35698. onClick: function onClick() {
  35699. return onOffset(-1);
  35700. },
  35701. tabIndex: -1,
  35702. className: classnames_default()(prevBtnCls, disabledOffsetPrev && "".concat(prevBtnCls, "-disabled")),
  35703. disabled: disabledOffsetPrev,
  35704. style: hidePrev ? HIDDEN_STYLE : {}
  35705. }, prevIcon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35706. className: "".concat(headerPrefixCls, "-view")
  35707. }, children), offset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  35708. type: "button",
  35709. "aria-label": locale.nextMonth,
  35710. onClick: function onClick() {
  35711. return onOffset(1);
  35712. },
  35713. tabIndex: -1,
  35714. className: classnames_default()(nextBtnCls, disabledOffsetNext && "".concat(nextBtnCls, "-disabled")),
  35715. disabled: disabledOffsetNext,
  35716. style: hideNext ? HIDDEN_STYLE : {}
  35717. }, nextIcon), superOffset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  35718. type: "button",
  35719. "aria-label": locale.nextYear,
  35720. onClick: function onClick() {
  35721. return onSuperOffset(1);
  35722. },
  35723. tabIndex: -1,
  35724. className: classnames_default()(superNextBtnCls, disabledSuperOffsetNext && "".concat(superNextBtnCls, "-disabled")),
  35725. disabled: disabledSuperOffsetNext,
  35726. style: hideNext ? HIDDEN_STYLE : {}
  35727. }, superNextIcon));
  35728. }
  35729. /* harmony default export */ var PickerPanel_PanelHeader = (PanelHeader);
  35730. ;// ./node_modules/rc-picker/es/PickerPanel/DatePanel/index.js
  35731. function DatePanel(props) {
  35732. var prefixCls = props.prefixCls,
  35733. _props$panelName = props.panelName,
  35734. panelName = _props$panelName === void 0 ? 'date' : _props$panelName,
  35735. locale = props.locale,
  35736. generateConfig = props.generateConfig,
  35737. pickerValue = props.pickerValue,
  35738. onPickerValueChange = props.onPickerValueChange,
  35739. onModeChange = props.onModeChange,
  35740. _props$mode = props.mode,
  35741. mode = _props$mode === void 0 ? 'date' : _props$mode,
  35742. disabledDate = props.disabledDate,
  35743. onSelect = props.onSelect,
  35744. onHover = props.onHover,
  35745. showWeek = props.showWeek;
  35746. var panelPrefixCls = "".concat(prefixCls, "-").concat(panelName, "-panel");
  35747. var cellPrefixCls = "".concat(prefixCls, "-cell");
  35748. var isWeek = mode === 'week';
  35749. // ========================== Base ==========================
  35750. var _useInfo = useInfo(props, mode),
  35751. _useInfo2 = (0,slicedToArray["default"])(_useInfo, 2),
  35752. info = _useInfo2[0],
  35753. now = _useInfo2[1];
  35754. var weekFirstDay = generateConfig.locale.getWeekFirstDay(locale.locale);
  35755. var monthStartDate = generateConfig.setDate(pickerValue, 1);
  35756. var baseDate = getWeekStartDate(locale.locale, generateConfig, monthStartDate);
  35757. var month = generateConfig.getMonth(pickerValue);
  35758. // =========================== PrefixColumn ===========================
  35759. var showPrefixColumn = showWeek === undefined ? isWeek : showWeek;
  35760. var prefixColumn = showPrefixColumn ? function (date) {
  35761. // >>> Additional check for disabled
  35762. var disabled = disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date, {
  35763. type: 'week'
  35764. });
  35765. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("td", {
  35766. key: "week",
  35767. className: classnames_default()(cellPrefixCls, "".concat(cellPrefixCls, "-week"), (0,defineProperty["default"])({}, "".concat(cellPrefixCls, "-disabled"), disabled))
  35768. // Operation: Same as code in PanelBody
  35769. ,
  35770. onClick: function onClick() {
  35771. if (!disabled) {
  35772. onSelect(date);
  35773. }
  35774. },
  35775. onMouseEnter: function onMouseEnter() {
  35776. if (!disabled) {
  35777. onHover === null || onHover === void 0 || onHover(date);
  35778. }
  35779. },
  35780. onMouseLeave: function onMouseLeave() {
  35781. if (!disabled) {
  35782. onHover === null || onHover === void 0 || onHover(null);
  35783. }
  35784. }
  35785. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35786. className: "".concat(cellPrefixCls, "-inner")
  35787. }, generateConfig.locale.getWeek(locale.locale, date)));
  35788. } : null;
  35789. // ========================= Cells ==========================
  35790. // >>> Header Cells
  35791. var headerCells = [];
  35792. var weekDaysLocale = locale.shortWeekDays || (generateConfig.locale.getShortWeekDays ? generateConfig.locale.getShortWeekDays(locale.locale) : []);
  35793. if (prefixColumn) {
  35794. headerCells.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("th", {
  35795. key: "empty"
  35796. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  35797. style: {
  35798. width: 0,
  35799. height: 0,
  35800. position: 'absolute',
  35801. overflow: 'hidden',
  35802. opacity: 0
  35803. }
  35804. }, locale.week)));
  35805. }
  35806. for (var i = 0; i < WEEK_DAY_COUNT; i += 1) {
  35807. headerCells.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("th", {
  35808. key: i
  35809. }, weekDaysLocale[(i + weekFirstDay) % WEEK_DAY_COUNT]));
  35810. }
  35811. // >>> Body Cells
  35812. var getCellDate = function getCellDate(date, offset) {
  35813. return generateConfig.addDate(date, offset);
  35814. };
  35815. var getCellText = function getCellText(date) {
  35816. return formatValue(date, {
  35817. locale: locale,
  35818. format: locale.cellDateFormat,
  35819. generateConfig: generateConfig
  35820. });
  35821. };
  35822. var getCellClassName = function getCellClassName(date) {
  35823. var classObj = (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), isSameMonth(generateConfig, date, pickerValue)), "".concat(prefixCls, "-cell-today"), isSameDate(generateConfig, date, now));
  35824. return classObj;
  35825. };
  35826. // ========================= Header =========================
  35827. var monthsLocale = locale.shortMonths || (generateConfig.locale.getShortMonths ? generateConfig.locale.getShortMonths(locale.locale) : []);
  35828. var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  35829. type: "button",
  35830. "aria-label": locale.yearSelect,
  35831. key: "year",
  35832. onClick: function onClick() {
  35833. onModeChange('year', pickerValue);
  35834. },
  35835. tabIndex: -1,
  35836. className: "".concat(prefixCls, "-year-btn")
  35837. }, formatValue(pickerValue, {
  35838. locale: locale,
  35839. format: locale.yearFormat,
  35840. generateConfig: generateConfig
  35841. }));
  35842. var monthNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  35843. type: "button",
  35844. "aria-label": locale.monthSelect,
  35845. key: "month",
  35846. onClick: function onClick() {
  35847. onModeChange('month', pickerValue);
  35848. },
  35849. tabIndex: -1,
  35850. className: "".concat(prefixCls, "-month-btn")
  35851. }, locale.monthFormat ? formatValue(pickerValue, {
  35852. locale: locale,
  35853. format: locale.monthFormat,
  35854. generateConfig: generateConfig
  35855. }) : monthsLocale[month]);
  35856. var monthYearNodes = locale.monthBeforeYear ? [monthNode, yearNode] : [yearNode, monthNode];
  35857. // ========================= Render =========================
  35858. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
  35859. value: info
  35860. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  35861. className: classnames_default()(panelPrefixCls, showWeek && "".concat(panelPrefixCls, "-show-week"))
  35862. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
  35863. offset: function offset(distance) {
  35864. return generateConfig.addMonth(pickerValue, distance);
  35865. },
  35866. superOffset: function superOffset(distance) {
  35867. return generateConfig.addYear(pickerValue, distance);
  35868. },
  35869. onChange: onPickerValueChange
  35870. // Limitation
  35871. ,
  35872. getStart: function getStart(date) {
  35873. return generateConfig.setDate(date, 1);
  35874. },
  35875. getEnd: function getEnd(date) {
  35876. var clone = generateConfig.setDate(date, 1);
  35877. clone = generateConfig.addMonth(clone, 1);
  35878. return generateConfig.addDate(clone, -1);
  35879. }
  35880. }, monthYearNodes), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({
  35881. titleFormat: locale.fieldDateFormat
  35882. }, props, {
  35883. colNum: WEEK_DAY_COUNT,
  35884. rowNum: 6,
  35885. baseDate: baseDate
  35886. // Header
  35887. ,
  35888. headerCells: headerCells
  35889. // Body
  35890. ,
  35891. getCellDate: getCellDate,
  35892. getCellText: getCellText,
  35893. getCellClassName: getCellClassName,
  35894. prefixColumn: prefixColumn,
  35895. cellSelection: !isWeek
  35896. }))));
  35897. }
  35898. ;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js
  35899. var SPEED_PTG = 1 / 3;
  35900. function useScrollTo_useScrollTo(ulRef, value) {
  35901. // ========================= Scroll =========================
  35902. var scrollingRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  35903. var scrollRafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  35904. var scrollDistRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  35905. var isScrolling = function isScrolling() {
  35906. return scrollingRef.current;
  35907. };
  35908. var stopScroll = function stopScroll() {
  35909. raf["default"].cancel(scrollRafRef.current);
  35910. scrollingRef.current = false;
  35911. };
  35912. var scrollRafTimesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  35913. var startScroll = function startScroll() {
  35914. var ul = ulRef.current;
  35915. scrollDistRef.current = null;
  35916. scrollRafTimesRef.current = 0;
  35917. if (ul) {
  35918. var targetLi = ul.querySelector("[data-value=\"".concat(value, "\"]"));
  35919. var firstLi = ul.querySelector("li");
  35920. var doScroll = function doScroll() {
  35921. stopScroll();
  35922. scrollingRef.current = true;
  35923. scrollRafTimesRef.current += 1;
  35924. var currentTop = ul.scrollTop;
  35925. var firstLiTop = firstLi.offsetTop;
  35926. var targetLiTop = targetLi.offsetTop;
  35927. var targetTop = targetLiTop - firstLiTop;
  35928. // Wait for element exist. 5 frames is enough
  35929. if (targetLiTop === 0 && targetLi !== firstLi || !isVisible(ul)) {
  35930. if (scrollRafTimesRef.current <= 5) {
  35931. scrollRafRef.current = (0,raf["default"])(doScroll);
  35932. }
  35933. return;
  35934. }
  35935. var nextTop = currentTop + (targetTop - currentTop) * SPEED_PTG;
  35936. var dist = Math.abs(targetTop - nextTop);
  35937. // Break if dist get larger, which means user is scrolling
  35938. if (scrollDistRef.current !== null && scrollDistRef.current < dist) {
  35939. stopScroll();
  35940. return;
  35941. }
  35942. scrollDistRef.current = dist;
  35943. // Stop when dist is less than 1
  35944. if (dist <= 1) {
  35945. ul.scrollTop = targetTop;
  35946. stopScroll();
  35947. return;
  35948. }
  35949. // IE not support `scrollTo`
  35950. ul.scrollTop = nextTop;
  35951. scrollRafRef.current = (0,raf["default"])(doScroll);
  35952. };
  35953. if (targetLi && firstLi) {
  35954. doScroll();
  35955. }
  35956. }
  35957. };
  35958. // ======================== Trigger =========================
  35959. var syncScroll = (0,rc_util_es.useEvent)(startScroll);
  35960. return [syncScroll, stopScroll, isScrolling];
  35961. }
  35962. ;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js
  35963. var SCROLL_DELAY = 300;
  35964. // Not use JSON.stringify to avoid dead loop
  35965. function flattenUnits(units) {
  35966. return units.map(function (_ref) {
  35967. var value = _ref.value,
  35968. label = _ref.label,
  35969. disabled = _ref.disabled;
  35970. return [value, label, disabled].join(',');
  35971. }).join(';');
  35972. }
  35973. function TimeColumn(props) {
  35974. var units = props.units,
  35975. value = props.value,
  35976. optionalValue = props.optionalValue,
  35977. type = props.type,
  35978. onChange = props.onChange,
  35979. onHover = props.onHover,
  35980. onDblClick = props.onDblClick,
  35981. changeOnScroll = props.changeOnScroll;
  35982. var _usePanelContext = usePanelContext(),
  35983. prefixCls = _usePanelContext.prefixCls,
  35984. cellRender = _usePanelContext.cellRender,
  35985. now = _usePanelContext.now,
  35986. locale = _usePanelContext.locale;
  35987. var panelPrefixCls = "".concat(prefixCls, "-time-panel");
  35988. var cellPrefixCls = "".concat(prefixCls, "-time-panel-cell");
  35989. // ========================== Refs ==========================
  35990. var ulRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  35991. // ========================= Scroll =========================
  35992. var checkDelayRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  35993. var clearDelayCheck = function clearDelayCheck() {
  35994. clearTimeout(checkDelayRef.current);
  35995. };
  35996. // ========================== Sync ==========================
  35997. var _useScrollTo = useScrollTo_useScrollTo(ulRef, value !== null && value !== void 0 ? value : optionalValue),
  35998. _useScrollTo2 = (0,slicedToArray["default"])(_useScrollTo, 3),
  35999. syncScroll = _useScrollTo2[0],
  36000. stopScroll = _useScrollTo2[1],
  36001. isScrolling = _useScrollTo2[2];
  36002. // Effect sync value scroll
  36003. (0,useLayoutEffect["default"])(function () {
  36004. syncScroll();
  36005. clearDelayCheck();
  36006. return function () {
  36007. stopScroll();
  36008. clearDelayCheck();
  36009. };
  36010. }, [value, optionalValue, flattenUnits(units)]);
  36011. // ========================= Change =========================
  36012. // Scroll event if sync onScroll
  36013. var onInternalScroll = function onInternalScroll(event) {
  36014. clearDelayCheck();
  36015. var target = event.target;
  36016. if (!isScrolling() && changeOnScroll) {
  36017. checkDelayRef.current = setTimeout(function () {
  36018. var ul = ulRef.current;
  36019. var firstLiTop = ul.querySelector("li").offsetTop;
  36020. var liList = Array.from(ul.querySelectorAll("li"));
  36021. var liTopList = liList.map(function (li) {
  36022. return li.offsetTop - firstLiTop;
  36023. });
  36024. var liDistList = liTopList.map(function (top, index) {
  36025. if (units[index].disabled) {
  36026. return Number.MAX_SAFE_INTEGER;
  36027. }
  36028. return Math.abs(top - target.scrollTop);
  36029. });
  36030. // Find min distance index
  36031. var minDist = Math.min.apply(Math, (0,toConsumableArray["default"])(liDistList));
  36032. var minDistIndex = liDistList.findIndex(function (dist) {
  36033. return dist === minDist;
  36034. });
  36035. var targetUnit = units[minDistIndex];
  36036. if (targetUnit && !targetUnit.disabled) {
  36037. onChange(targetUnit.value);
  36038. }
  36039. }, SCROLL_DELAY);
  36040. }
  36041. };
  36042. // ========================= Render =========================
  36043. var columnPrefixCls = "".concat(panelPrefixCls, "-column");
  36044. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  36045. className: columnPrefixCls,
  36046. ref: ulRef,
  36047. "data-type": type,
  36048. onScroll: onInternalScroll
  36049. }, units.map(function (_ref2) {
  36050. var label = _ref2.label,
  36051. unitValue = _ref2.value,
  36052. disabled = _ref2.disabled;
  36053. var inner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36054. className: "".concat(cellPrefixCls, "-inner")
  36055. }, label);
  36056. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  36057. key: unitValue,
  36058. className: classnames_default()(cellPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(cellPrefixCls, "-selected"), value === unitValue), "".concat(cellPrefixCls, "-disabled"), disabled)),
  36059. onClick: function onClick() {
  36060. if (!disabled) {
  36061. onChange(unitValue);
  36062. }
  36063. },
  36064. onDoubleClick: function onDoubleClick() {
  36065. if (!disabled && onDblClick) {
  36066. onDblClick();
  36067. }
  36068. },
  36069. onMouseEnter: function onMouseEnter() {
  36070. onHover(unitValue);
  36071. },
  36072. onMouseLeave: function onMouseLeave() {
  36073. onHover(null);
  36074. },
  36075. "data-value": unitValue
  36076. }, cellRender ? cellRender(unitValue, {
  36077. prefixCls: prefixCls,
  36078. originNode: inner,
  36079. today: now,
  36080. type: 'time',
  36081. subType: type,
  36082. locale: locale
  36083. }) : inner);
  36084. }));
  36085. }
  36086. ;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/index.js
  36087. function isAM(hour) {
  36088. return hour < 12;
  36089. }
  36090. function TimePanelBody(props) {
  36091. var showHour = props.showHour,
  36092. showMinute = props.showMinute,
  36093. showSecond = props.showSecond,
  36094. showMillisecond = props.showMillisecond,
  36095. showMeridiem = props.use12Hours,
  36096. changeOnScroll = props.changeOnScroll;
  36097. var _usePanelContext = usePanelContext(),
  36098. prefixCls = _usePanelContext.prefixCls,
  36099. values = _usePanelContext.values,
  36100. generateConfig = _usePanelContext.generateConfig,
  36101. locale = _usePanelContext.locale,
  36102. onSelect = _usePanelContext.onSelect,
  36103. _usePanelContext$onHo = _usePanelContext.onHover,
  36104. onHover = _usePanelContext$onHo === void 0 ? function () {} : _usePanelContext$onHo,
  36105. pickerValue = _usePanelContext.pickerValue;
  36106. var value = (values === null || values === void 0 ? void 0 : values[0]) || null;
  36107. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext),
  36108. onCellDblClick = _React$useContext.onCellDblClick;
  36109. // ========================== Info ==========================
  36110. var _useTimeInfo = useTimeInfo(generateConfig, props, value),
  36111. _useTimeInfo2 = (0,slicedToArray["default"])(_useTimeInfo, 5),
  36112. getValidTime = _useTimeInfo2[0],
  36113. rowHourUnits = _useTimeInfo2[1],
  36114. getMinuteUnits = _useTimeInfo2[2],
  36115. getSecondUnits = _useTimeInfo2[3],
  36116. getMillisecondUnits = _useTimeInfo2[4];
  36117. // ========================= Value ==========================
  36118. // PickerValue will tell which one to align on the top
  36119. var getUnitValue = function getUnitValue(func) {
  36120. var valueUnitVal = value && generateConfig[func](value);
  36121. var pickerUnitValue = pickerValue && generateConfig[func](pickerValue);
  36122. return [valueUnitVal, pickerUnitValue];
  36123. };
  36124. var _getUnitValue = getUnitValue('getHour'),
  36125. _getUnitValue2 = (0,slicedToArray["default"])(_getUnitValue, 2),
  36126. hour = _getUnitValue2[0],
  36127. pickerHour = _getUnitValue2[1];
  36128. var _getUnitValue3 = getUnitValue('getMinute'),
  36129. _getUnitValue4 = (0,slicedToArray["default"])(_getUnitValue3, 2),
  36130. minute = _getUnitValue4[0],
  36131. pickerMinute = _getUnitValue4[1];
  36132. var _getUnitValue5 = getUnitValue('getSecond'),
  36133. _getUnitValue6 = (0,slicedToArray["default"])(_getUnitValue5, 2),
  36134. second = _getUnitValue6[0],
  36135. pickerSecond = _getUnitValue6[1];
  36136. var _getUnitValue7 = getUnitValue('getMillisecond'),
  36137. _getUnitValue8 = (0,slicedToArray["default"])(_getUnitValue7, 2),
  36138. millisecond = _getUnitValue8[0],
  36139. pickerMillisecond = _getUnitValue8[1];
  36140. var meridiem = hour === null ? null : isAM(hour) ? 'am' : 'pm';
  36141. // ========================= Column =========================
  36142. // Hours
  36143. var hourUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36144. if (!showMeridiem) {
  36145. return rowHourUnits;
  36146. }
  36147. return isAM(hour) ? rowHourUnits.filter(function (h) {
  36148. return isAM(h.value);
  36149. }) : rowHourUnits.filter(function (h) {
  36150. return !isAM(h.value);
  36151. });
  36152. }, [hour, rowHourUnits, showMeridiem]);
  36153. // >>> Pick Fallback
  36154. var getEnabled = function getEnabled(units, val) {
  36155. var _enabledUnits$;
  36156. var enabledUnits = units.filter(function (unit) {
  36157. return !unit.disabled;
  36158. });
  36159. return val !== null && val !== void 0 ? val : // Fallback to enabled value
  36160. enabledUnits === null || enabledUnits === void 0 || (_enabledUnits$ = enabledUnits[0]) === null || _enabledUnits$ === void 0 ? void 0 : _enabledUnits$.value;
  36161. };
  36162. // >>> Minutes
  36163. var validHour = getEnabled(rowHourUnits, hour);
  36164. var minuteUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36165. return getMinuteUnits(validHour);
  36166. }, [getMinuteUnits, validHour]);
  36167. // >>> Seconds
  36168. var validMinute = getEnabled(minuteUnits, minute);
  36169. var secondUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36170. return getSecondUnits(validHour, validMinute);
  36171. }, [getSecondUnits, validHour, validMinute]);
  36172. // >>> Milliseconds
  36173. var validSecond = getEnabled(secondUnits, second);
  36174. var millisecondUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36175. return getMillisecondUnits(validHour, validMinute, validSecond);
  36176. }, [getMillisecondUnits, validHour, validMinute, validSecond]);
  36177. var validMillisecond = getEnabled(millisecondUnits, millisecond);
  36178. // Meridiem
  36179. var meridiemUnits = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36180. if (!showMeridiem) {
  36181. return [];
  36182. }
  36183. var base = generateConfig.getNow();
  36184. var amDate = generateConfig.setHour(base, 6);
  36185. var pmDate = generateConfig.setHour(base, 18);
  36186. var formatMeridiem = function formatMeridiem(date, defaultLabel) {
  36187. var cellMeridiemFormat = locale.cellMeridiemFormat;
  36188. return cellMeridiemFormat ? formatValue(date, {
  36189. generateConfig: generateConfig,
  36190. locale: locale,
  36191. format: cellMeridiemFormat
  36192. }) : defaultLabel;
  36193. };
  36194. return [{
  36195. label: formatMeridiem(amDate, 'AM'),
  36196. value: 'am',
  36197. disabled: rowHourUnits.every(function (h) {
  36198. return h.disabled || !isAM(h.value);
  36199. })
  36200. }, {
  36201. label: formatMeridiem(pmDate, 'PM'),
  36202. value: 'pm',
  36203. disabled: rowHourUnits.every(function (h) {
  36204. return h.disabled || isAM(h.value);
  36205. })
  36206. }];
  36207. }, [rowHourUnits, showMeridiem, generateConfig, locale]);
  36208. // ========================= Change =========================
  36209. /**
  36210. * Check if time is validate or will match to validate one
  36211. */
  36212. var triggerChange = function triggerChange(nextDate) {
  36213. var validateDate = getValidTime(nextDate);
  36214. onSelect(validateDate);
  36215. };
  36216. // ========================= Column =========================
  36217. // Create a template date for the trigger change event
  36218. var triggerDateTmpl = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36219. var tmpl = value || pickerValue || generateConfig.getNow();
  36220. var isNotNull = function isNotNull(num) {
  36221. return num !== null && num !== undefined;
  36222. };
  36223. if (isNotNull(hour)) {
  36224. tmpl = generateConfig.setHour(tmpl, hour);
  36225. tmpl = generateConfig.setMinute(tmpl, minute);
  36226. tmpl = generateConfig.setSecond(tmpl, second);
  36227. tmpl = generateConfig.setMillisecond(tmpl, millisecond);
  36228. } else if (isNotNull(pickerHour)) {
  36229. tmpl = generateConfig.setHour(tmpl, pickerHour);
  36230. tmpl = generateConfig.setMinute(tmpl, pickerMinute);
  36231. tmpl = generateConfig.setSecond(tmpl, pickerSecond);
  36232. tmpl = generateConfig.setMillisecond(tmpl, pickerMillisecond);
  36233. } else if (isNotNull(validHour)) {
  36234. tmpl = generateConfig.setHour(tmpl, validHour);
  36235. tmpl = generateConfig.setMinute(tmpl, validMinute);
  36236. tmpl = generateConfig.setSecond(tmpl, validSecond);
  36237. tmpl = generateConfig.setMillisecond(tmpl, validMillisecond);
  36238. }
  36239. return tmpl;
  36240. }, [value, pickerValue, hour, minute, second, millisecond, validHour, validMinute, validSecond, validMillisecond, pickerHour, pickerMinute, pickerSecond, pickerMillisecond, generateConfig]);
  36241. // ===================== Columns Change =====================
  36242. var fillColumnValue = function fillColumnValue(val, func) {
  36243. if (val === null) {
  36244. return null;
  36245. }
  36246. return generateConfig[func](triggerDateTmpl, val);
  36247. };
  36248. var getNextHourTime = function getNextHourTime(val) {
  36249. return fillColumnValue(val, 'setHour');
  36250. };
  36251. var getNextMinuteTime = function getNextMinuteTime(val) {
  36252. return fillColumnValue(val, 'setMinute');
  36253. };
  36254. var getNextSecondTime = function getNextSecondTime(val) {
  36255. return fillColumnValue(val, 'setSecond');
  36256. };
  36257. var getNextMillisecondTime = function getNextMillisecondTime(val) {
  36258. return fillColumnValue(val, 'setMillisecond');
  36259. };
  36260. var getMeridiemTime = function getMeridiemTime(val) {
  36261. if (val === null) {
  36262. return null;
  36263. }
  36264. if (val === 'am' && !isAM(hour)) {
  36265. return generateConfig.setHour(triggerDateTmpl, hour - 12);
  36266. } else if (val === 'pm' && isAM(hour)) {
  36267. return generateConfig.setHour(triggerDateTmpl, hour + 12);
  36268. }
  36269. return triggerDateTmpl;
  36270. };
  36271. var onHourChange = function onHourChange(val) {
  36272. triggerChange(getNextHourTime(val));
  36273. };
  36274. var onMinuteChange = function onMinuteChange(val) {
  36275. triggerChange(getNextMinuteTime(val));
  36276. };
  36277. var onSecondChange = function onSecondChange(val) {
  36278. triggerChange(getNextSecondTime(val));
  36279. };
  36280. var onMillisecondChange = function onMillisecondChange(val) {
  36281. triggerChange(getNextMillisecondTime(val));
  36282. };
  36283. var onMeridiemChange = function onMeridiemChange(val) {
  36284. triggerChange(getMeridiemTime(val));
  36285. };
  36286. // ====================== Column Hover ======================
  36287. var onHourHover = function onHourHover(val) {
  36288. onHover(getNextHourTime(val));
  36289. };
  36290. var onMinuteHover = function onMinuteHover(val) {
  36291. onHover(getNextMinuteTime(val));
  36292. };
  36293. var onSecondHover = function onSecondHover(val) {
  36294. onHover(getNextSecondTime(val));
  36295. };
  36296. var onMillisecondHover = function onMillisecondHover(val) {
  36297. onHover(getNextMillisecondTime(val));
  36298. };
  36299. var onMeridiemHover = function onMeridiemHover(val) {
  36300. onHover(getMeridiemTime(val));
  36301. };
  36302. // ========================= Render =========================
  36303. var sharedColumnProps = {
  36304. onDblClick: onCellDblClick,
  36305. changeOnScroll: changeOnScroll
  36306. };
  36307. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36308. className: "".concat(prefixCls, "-content")
  36309. }, showHour && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
  36310. units: hourUnits,
  36311. value: hour,
  36312. optionalValue: pickerHour,
  36313. type: "hour",
  36314. onChange: onHourChange,
  36315. onHover: onHourHover
  36316. }, sharedColumnProps)), showMinute && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
  36317. units: minuteUnits,
  36318. value: minute,
  36319. optionalValue: pickerMinute,
  36320. type: "minute",
  36321. onChange: onMinuteChange,
  36322. onHover: onMinuteHover
  36323. }, sharedColumnProps)), showSecond && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
  36324. units: secondUnits,
  36325. value: second,
  36326. optionalValue: pickerSecond,
  36327. type: "second",
  36328. onChange: onSecondChange,
  36329. onHover: onSecondHover
  36330. }, sharedColumnProps)), showMillisecond && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
  36331. units: millisecondUnits,
  36332. value: millisecond,
  36333. optionalValue: pickerMillisecond,
  36334. type: "millisecond",
  36335. onChange: onMillisecondChange,
  36336. onHover: onMillisecondHover
  36337. }, sharedColumnProps)), showMeridiem && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimeColumn, (0,esm_extends["default"])({
  36338. units: meridiemUnits,
  36339. value: meridiem,
  36340. type: "meridiem",
  36341. onChange: onMeridiemChange,
  36342. onHover: onMeridiemHover
  36343. }, sharedColumnProps)));
  36344. }
  36345. ;// ./node_modules/rc-picker/es/PickerPanel/TimePanel/index.js
  36346. function TimePanel(props) {
  36347. var prefixCls = props.prefixCls,
  36348. value = props.value,
  36349. locale = props.locale,
  36350. generateConfig = props.generateConfig,
  36351. showTime = props.showTime;
  36352. var _ref = showTime || {},
  36353. format = _ref.format;
  36354. var panelPrefixCls = "".concat(prefixCls, "-time-panel");
  36355. // ========================== Base ==========================
  36356. var _useInfo = useInfo(props, 'time'),
  36357. _useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
  36358. info = _useInfo2[0];
  36359. // ========================= Render =========================
  36360. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
  36361. value: info
  36362. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36363. className: classnames_default()(panelPrefixCls)
  36364. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, null, value ? formatValue(value, {
  36365. locale: locale,
  36366. format: format,
  36367. generateConfig: generateConfig
  36368. }) : "\xA0"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimePanelBody, showTime)));
  36369. }
  36370. ;// ./node_modules/rc-picker/es/PickerPanel/DateTimePanel/index.js
  36371. function DateTimePanel(props) {
  36372. var prefixCls = props.prefixCls,
  36373. generateConfig = props.generateConfig,
  36374. showTime = props.showTime,
  36375. onSelect = props.onSelect,
  36376. value = props.value,
  36377. pickerValue = props.pickerValue,
  36378. onHover = props.onHover;
  36379. var panelPrefixCls = "".concat(prefixCls, "-datetime-panel");
  36380. // =============================== Time ===============================
  36381. var _useTimeInfo = useTimeInfo(generateConfig, showTime),
  36382. _useTimeInfo2 = (0,slicedToArray["default"])(_useTimeInfo, 1),
  36383. getValidTime = _useTimeInfo2[0];
  36384. // Merge the time info from `value` or `pickerValue`
  36385. var mergeTime = function mergeTime(date) {
  36386. if (value) {
  36387. return fillTime(generateConfig, date, value);
  36388. }
  36389. return fillTime(generateConfig, date, pickerValue);
  36390. };
  36391. // ============================== Hover ===============================
  36392. var onDateHover = function onDateHover(date) {
  36393. onHover === null || onHover === void 0 || onHover(date ? mergeTime(date) : date);
  36394. };
  36395. // ============================== Select ==============================
  36396. var onDateSelect = function onDateSelect(date) {
  36397. // Merge with current time
  36398. var cloneDate = mergeTime(date);
  36399. onSelect(getValidTime(cloneDate, cloneDate));
  36400. };
  36401. // ============================== Render ==============================
  36402. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36403. className: panelPrefixCls
  36404. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DatePanel, (0,esm_extends["default"])({}, props, {
  36405. onSelect: onDateSelect,
  36406. onHover: onDateHover
  36407. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TimePanel, props));
  36408. }
  36409. ;// ./node_modules/rc-picker/es/PickerPanel/DecadePanel/index.js
  36410. function DecadePanel(props) {
  36411. var prefixCls = props.prefixCls,
  36412. locale = props.locale,
  36413. generateConfig = props.generateConfig,
  36414. pickerValue = props.pickerValue,
  36415. disabledDate = props.disabledDate,
  36416. onPickerValueChange = props.onPickerValueChange;
  36417. var panelPrefixCls = "".concat(prefixCls, "-decade-panel");
  36418. // ========================== Base ==========================
  36419. var _useInfo = useInfo(props, 'decade'),
  36420. _useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
  36421. info = _useInfo2[0];
  36422. var getStartYear = function getStartYear(date) {
  36423. var startYear = Math.floor(generateConfig.getYear(date) / 100) * 100;
  36424. return generateConfig.setYear(date, startYear);
  36425. };
  36426. var getEndYear = function getEndYear(date) {
  36427. var startYear = getStartYear(date);
  36428. return generateConfig.addYear(startYear, 99);
  36429. };
  36430. var startYearDate = getStartYear(pickerValue);
  36431. var endYearDate = getEndYear(pickerValue);
  36432. var baseDate = generateConfig.addYear(startYearDate, -10);
  36433. // ========================= Cells ==========================
  36434. var getCellDate = function getCellDate(date, offset) {
  36435. return generateConfig.addYear(date, offset * 10);
  36436. };
  36437. var getCellText = function getCellText(date) {
  36438. var cellYearFormat = locale.cellYearFormat;
  36439. var startYearStr = formatValue(date, {
  36440. locale: locale,
  36441. format: cellYearFormat,
  36442. generateConfig: generateConfig
  36443. });
  36444. var endYearStr = formatValue(generateConfig.addYear(date, 9), {
  36445. locale: locale,
  36446. format: cellYearFormat,
  36447. generateConfig: generateConfig
  36448. });
  36449. return "".concat(startYearStr, "-").concat(endYearStr);
  36450. };
  36451. var getCellClassName = function getCellClassName(date) {
  36452. return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), isSameDecade(generateConfig, date, startYearDate) || isSameDecade(generateConfig, date, endYearDate) || isInRange(generateConfig, startYearDate, endYearDate, date));
  36453. };
  36454. // ======================== Disabled ========================
  36455. var mergedDisabledDate = disabledDate ? function (currentDate, disabledInfo) {
  36456. // Start
  36457. var baseStartDate = generateConfig.setDate(currentDate, 1);
  36458. var baseStartMonth = generateConfig.setMonth(baseStartDate, 0);
  36459. var baseStartYear = generateConfig.setYear(baseStartMonth, Math.floor(generateConfig.getYear(baseStartMonth) / 10) * 10);
  36460. // End
  36461. var baseEndYear = generateConfig.addYear(baseStartYear, 10);
  36462. var baseEndDate = generateConfig.addDate(baseEndYear, -1);
  36463. return disabledDate(baseStartYear, disabledInfo) && disabledDate(baseEndDate, disabledInfo);
  36464. } : null;
  36465. // ========================= Header =========================
  36466. var yearNode = "".concat(formatValue(startYearDate, {
  36467. locale: locale,
  36468. format: locale.yearFormat,
  36469. generateConfig: generateConfig
  36470. }), "-").concat(formatValue(endYearDate, {
  36471. locale: locale,
  36472. format: locale.yearFormat,
  36473. generateConfig: generateConfig
  36474. }));
  36475. // ========================= Render =========================
  36476. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
  36477. value: info
  36478. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36479. className: panelPrefixCls
  36480. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
  36481. superOffset: function superOffset(distance) {
  36482. return generateConfig.addYear(pickerValue, distance * 100);
  36483. },
  36484. onChange: onPickerValueChange
  36485. // Limitation
  36486. ,
  36487. getStart: getStartYear,
  36488. getEnd: getEndYear
  36489. }, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
  36490. disabledDate: mergedDisabledDate,
  36491. colNum: 3,
  36492. rowNum: 4,
  36493. baseDate: baseDate
  36494. // Body
  36495. ,
  36496. getCellDate: getCellDate,
  36497. getCellText: getCellText,
  36498. getCellClassName: getCellClassName
  36499. }))));
  36500. }
  36501. ;// ./node_modules/rc-picker/es/PickerPanel/MonthPanel/index.js
  36502. function MonthPanel(props) {
  36503. var prefixCls = props.prefixCls,
  36504. locale = props.locale,
  36505. generateConfig = props.generateConfig,
  36506. pickerValue = props.pickerValue,
  36507. disabledDate = props.disabledDate,
  36508. onPickerValueChange = props.onPickerValueChange,
  36509. onModeChange = props.onModeChange;
  36510. var panelPrefixCls = "".concat(prefixCls, "-month-panel");
  36511. // ========================== Base ==========================
  36512. var _useInfo = useInfo(props, 'month'),
  36513. _useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
  36514. info = _useInfo2[0];
  36515. var baseDate = generateConfig.setMonth(pickerValue, 0);
  36516. // ========================= Month ==========================
  36517. var monthsLocale = locale.shortMonths || (generateConfig.locale.getShortMonths ? generateConfig.locale.getShortMonths(locale.locale) : []);
  36518. // ========================= Cells ==========================
  36519. var getCellDate = function getCellDate(date, offset) {
  36520. return generateConfig.addMonth(date, offset);
  36521. };
  36522. var getCellText = function getCellText(date) {
  36523. var month = generateConfig.getMonth(date);
  36524. return locale.monthFormat ? formatValue(date, {
  36525. locale: locale,
  36526. format: locale.monthFormat,
  36527. generateConfig: generateConfig
  36528. }) : monthsLocale[month];
  36529. };
  36530. var getCellClassName = function getCellClassName() {
  36531. return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), true);
  36532. };
  36533. // ======================== Disabled ========================
  36534. var mergedDisabledDate = disabledDate ? function (currentDate, disabledInfo) {
  36535. var startDate = generateConfig.setDate(currentDate, 1);
  36536. var nextMonthStartDate = generateConfig.setMonth(startDate, generateConfig.getMonth(startDate) + 1);
  36537. var endDate = generateConfig.addDate(nextMonthStartDate, -1);
  36538. return disabledDate(startDate, disabledInfo) && disabledDate(endDate, disabledInfo);
  36539. } : null;
  36540. // ========================= Header =========================
  36541. var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  36542. type: "button",
  36543. key: "year",
  36544. "aria-label": locale.yearSelect,
  36545. onClick: function onClick() {
  36546. onModeChange('year');
  36547. },
  36548. tabIndex: -1,
  36549. className: "".concat(prefixCls, "-year-btn")
  36550. }, formatValue(pickerValue, {
  36551. locale: locale,
  36552. format: locale.yearFormat,
  36553. generateConfig: generateConfig
  36554. }));
  36555. // ========================= Render =========================
  36556. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
  36557. value: info
  36558. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36559. className: panelPrefixCls
  36560. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
  36561. superOffset: function superOffset(distance) {
  36562. return generateConfig.addYear(pickerValue, distance);
  36563. },
  36564. onChange: onPickerValueChange
  36565. // Limitation
  36566. ,
  36567. getStart: function getStart(date) {
  36568. return generateConfig.setMonth(date, 0);
  36569. },
  36570. getEnd: function getEnd(date) {
  36571. return generateConfig.setMonth(date, 11);
  36572. }
  36573. }, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
  36574. disabledDate: mergedDisabledDate,
  36575. titleFormat: locale.fieldMonthFormat,
  36576. colNum: 3,
  36577. rowNum: 4,
  36578. baseDate: baseDate
  36579. // Body
  36580. ,
  36581. getCellDate: getCellDate,
  36582. getCellText: getCellText,
  36583. getCellClassName: getCellClassName
  36584. }))));
  36585. }
  36586. ;// ./node_modules/rc-picker/es/PickerPanel/QuarterPanel/index.js
  36587. function QuarterPanel(props) {
  36588. var prefixCls = props.prefixCls,
  36589. locale = props.locale,
  36590. generateConfig = props.generateConfig,
  36591. pickerValue = props.pickerValue,
  36592. onPickerValueChange = props.onPickerValueChange,
  36593. onModeChange = props.onModeChange;
  36594. var panelPrefixCls = "".concat(prefixCls, "-quarter-panel");
  36595. // ========================== Base ==========================
  36596. var _useInfo = useInfo(props, 'quarter'),
  36597. _useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
  36598. info = _useInfo2[0];
  36599. var baseDate = generateConfig.setMonth(pickerValue, 0);
  36600. // ========================= Cells ==========================
  36601. var getCellDate = function getCellDate(date, offset) {
  36602. return generateConfig.addMonth(date, offset * 3);
  36603. };
  36604. var getCellText = function getCellText(date) {
  36605. return formatValue(date, {
  36606. locale: locale,
  36607. format: locale.cellQuarterFormat,
  36608. generateConfig: generateConfig
  36609. });
  36610. };
  36611. var getCellClassName = function getCellClassName() {
  36612. return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), true);
  36613. };
  36614. // ========================= Header =========================
  36615. var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  36616. type: "button",
  36617. key: "year",
  36618. "aria-label": locale.yearSelect,
  36619. onClick: function onClick() {
  36620. onModeChange('year');
  36621. },
  36622. tabIndex: -1,
  36623. className: "".concat(prefixCls, "-year-btn")
  36624. }, formatValue(pickerValue, {
  36625. locale: locale,
  36626. format: locale.yearFormat,
  36627. generateConfig: generateConfig
  36628. }));
  36629. // ========================= Render =========================
  36630. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
  36631. value: info
  36632. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36633. className: panelPrefixCls
  36634. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
  36635. superOffset: function superOffset(distance) {
  36636. return generateConfig.addYear(pickerValue, distance);
  36637. },
  36638. onChange: onPickerValueChange
  36639. // Limitation
  36640. ,
  36641. getStart: function getStart(date) {
  36642. return generateConfig.setMonth(date, 0);
  36643. },
  36644. getEnd: function getEnd(date) {
  36645. return generateConfig.setMonth(date, 11);
  36646. }
  36647. }, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
  36648. titleFormat: locale.fieldQuarterFormat,
  36649. colNum: 4,
  36650. rowNum: 1,
  36651. baseDate: baseDate
  36652. // Body
  36653. ,
  36654. getCellDate: getCellDate,
  36655. getCellText: getCellText,
  36656. getCellClassName: getCellClassName
  36657. }))));
  36658. }
  36659. ;// ./node_modules/rc-picker/es/PickerPanel/WeekPanel/index.js
  36660. function WeekPanel(props) {
  36661. var prefixCls = props.prefixCls,
  36662. generateConfig = props.generateConfig,
  36663. locale = props.locale,
  36664. value = props.value,
  36665. hoverValue = props.hoverValue,
  36666. hoverRangeValue = props.hoverRangeValue;
  36667. // =============================== Row ================================
  36668. var localeName = locale.locale;
  36669. var rowPrefixCls = "".concat(prefixCls, "-week-panel-row");
  36670. var rowClassName = function rowClassName(currentDate) {
  36671. var rangeCls = {};
  36672. if (hoverRangeValue) {
  36673. var _hoverRangeValue = (0,slicedToArray["default"])(hoverRangeValue, 2),
  36674. rangeStart = _hoverRangeValue[0],
  36675. rangeEnd = _hoverRangeValue[1];
  36676. var isRangeStart = isSameWeek(generateConfig, localeName, rangeStart, currentDate);
  36677. var isRangeEnd = isSameWeek(generateConfig, localeName, rangeEnd, currentDate);
  36678. rangeCls["".concat(rowPrefixCls, "-range-start")] = isRangeStart;
  36679. rangeCls["".concat(rowPrefixCls, "-range-end")] = isRangeEnd;
  36680. rangeCls["".concat(rowPrefixCls, "-range-hover")] = !isRangeStart && !isRangeEnd && isInRange(generateConfig, rangeStart, rangeEnd, currentDate);
  36681. }
  36682. if (hoverValue) {
  36683. rangeCls["".concat(rowPrefixCls, "-hover")] = hoverValue.some(function (date) {
  36684. return isSameWeek(generateConfig, localeName, currentDate, date);
  36685. });
  36686. }
  36687. return classnames_default()(rowPrefixCls, (0,defineProperty["default"])({}, "".concat(rowPrefixCls, "-selected"), !hoverRangeValue && isSameWeek(generateConfig, localeName, value, currentDate)),
  36688. // Patch for hover range
  36689. rangeCls);
  36690. };
  36691. // ============================== Render ==============================
  36692. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DatePanel, (0,esm_extends["default"])({}, props, {
  36693. mode: "week",
  36694. panelName: "week",
  36695. rowClassName: rowClassName
  36696. }));
  36697. }
  36698. ;// ./node_modules/rc-picker/es/PickerPanel/YearPanel/index.js
  36699. function YearPanel(props) {
  36700. var prefixCls = props.prefixCls,
  36701. locale = props.locale,
  36702. generateConfig = props.generateConfig,
  36703. pickerValue = props.pickerValue,
  36704. disabledDate = props.disabledDate,
  36705. onPickerValueChange = props.onPickerValueChange,
  36706. onModeChange = props.onModeChange;
  36707. var panelPrefixCls = "".concat(prefixCls, "-year-panel");
  36708. // ========================== Base ==========================
  36709. var _useInfo = useInfo(props, 'year'),
  36710. _useInfo2 = (0,slicedToArray["default"])(_useInfo, 1),
  36711. info = _useInfo2[0];
  36712. var getStartYear = function getStartYear(date) {
  36713. var startYear = Math.floor(generateConfig.getYear(date) / 10) * 10;
  36714. return generateConfig.setYear(date, startYear);
  36715. };
  36716. var getEndYear = function getEndYear(date) {
  36717. var startYear = getStartYear(date);
  36718. return generateConfig.addYear(startYear, 9);
  36719. };
  36720. var startYearDate = getStartYear(pickerValue);
  36721. var endYearDate = getEndYear(pickerValue);
  36722. var baseDate = generateConfig.addYear(startYearDate, -1);
  36723. // ========================= Cells ==========================
  36724. var getCellDate = function getCellDate(date, offset) {
  36725. return generateConfig.addYear(date, offset);
  36726. };
  36727. var getCellText = function getCellText(date) {
  36728. return formatValue(date, {
  36729. locale: locale,
  36730. format: locale.cellYearFormat,
  36731. generateConfig: generateConfig
  36732. });
  36733. };
  36734. var getCellClassName = function getCellClassName(date) {
  36735. return (0,defineProperty["default"])({}, "".concat(prefixCls, "-cell-in-view"), isSameYear(generateConfig, date, startYearDate) || isSameYear(generateConfig, date, endYearDate) || isInRange(generateConfig, startYearDate, endYearDate, date));
  36736. };
  36737. // ======================== Disabled ========================
  36738. var mergedDisabledDate = disabledDate ? function (currentDate, disabledInfo) {
  36739. // Start
  36740. var startMonth = generateConfig.setMonth(currentDate, 0);
  36741. var startDate = generateConfig.setDate(startMonth, 1);
  36742. // End
  36743. var endMonth = generateConfig.addYear(startDate, 1);
  36744. var endDate = generateConfig.addDate(endMonth, -1);
  36745. return disabledDate(startDate, disabledInfo) && disabledDate(endDate, disabledInfo);
  36746. } : null;
  36747. // ========================= Header =========================
  36748. var yearNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  36749. type: "button",
  36750. key: "decade",
  36751. "aria-label": locale.decadeSelect,
  36752. onClick: function onClick() {
  36753. onModeChange('decade');
  36754. },
  36755. tabIndex: -1,
  36756. className: "".concat(prefixCls, "-decade-btn")
  36757. }, formatValue(startYearDate, {
  36758. locale: locale,
  36759. format: locale.yearFormat,
  36760. generateConfig: generateConfig
  36761. }), "-", formatValue(endYearDate, {
  36762. locale: locale,
  36763. format: locale.yearFormat,
  36764. generateConfig: generateConfig
  36765. }));
  36766. // ========================= Render =========================
  36767. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelContext.Provider, {
  36768. value: info
  36769. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  36770. className: panelPrefixCls
  36771. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerPanel_PanelHeader, {
  36772. superOffset: function superOffset(distance) {
  36773. return generateConfig.addYear(pickerValue, distance * 10);
  36774. },
  36775. onChange: onPickerValueChange
  36776. // Limitation
  36777. ,
  36778. getStart: getStartYear,
  36779. getEnd: getEndYear
  36780. }, yearNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelBody, (0,esm_extends["default"])({}, props, {
  36781. disabledDate: mergedDisabledDate,
  36782. titleFormat: locale.fieldYearFormat,
  36783. colNum: 3,
  36784. rowNum: 4,
  36785. baseDate: baseDate
  36786. // Body
  36787. ,
  36788. getCellDate: getCellDate,
  36789. getCellText: getCellText,
  36790. getCellClassName: getCellClassName
  36791. }))));
  36792. }
  36793. ;// ./node_modules/rc-picker/es/PickerPanel/index.js
  36794. var DefaultComponents = {
  36795. date: DatePanel,
  36796. datetime: DateTimePanel,
  36797. week: WeekPanel,
  36798. month: MonthPanel,
  36799. quarter: QuarterPanel,
  36800. year: YearPanel,
  36801. decade: DecadePanel,
  36802. time: TimePanel
  36803. };
  36804. function PickerPanel(props, ref) {
  36805. var _React$useContext;
  36806. var locale = props.locale,
  36807. generateConfig = props.generateConfig,
  36808. direction = props.direction,
  36809. prefixCls = props.prefixCls,
  36810. _props$tabIndex = props.tabIndex,
  36811. tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
  36812. multiple = props.multiple,
  36813. defaultValue = props.defaultValue,
  36814. value = props.value,
  36815. onChange = props.onChange,
  36816. onSelect = props.onSelect,
  36817. defaultPickerValue = props.defaultPickerValue,
  36818. pickerValue = props.pickerValue,
  36819. onPickerValueChange = props.onPickerValueChange,
  36820. mode = props.mode,
  36821. onPanelChange = props.onPanelChange,
  36822. _props$picker = props.picker,
  36823. picker = _props$picker === void 0 ? 'date' : _props$picker,
  36824. showTime = props.showTime,
  36825. hoverValue = props.hoverValue,
  36826. hoverRangeValue = props.hoverRangeValue,
  36827. cellRender = props.cellRender,
  36828. dateRender = props.dateRender,
  36829. monthCellRender = props.monthCellRender,
  36830. _props$components = props.components,
  36831. components = _props$components === void 0 ? {} : _props$components,
  36832. hideHeader = props.hideHeader;
  36833. var mergedPrefixCls = ((_React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context)) === null || _React$useContext === void 0 ? void 0 : _React$useContext.prefixCls) || prefixCls || 'rc-picker';
  36834. // ========================== Refs ==========================
  36835. var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  36836. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  36837. return {
  36838. nativeElement: rootRef.current
  36839. };
  36840. });
  36841. // ========================== Time ==========================
  36842. // Auto `format` need to check `showTime.showXXX` first.
  36843. // And then merge the `locale` into `mergedShowTime`.
  36844. var _getTimeProps = getTimeProps(props),
  36845. _getTimeProps2 = (0,slicedToArray["default"])(_getTimeProps, 4),
  36846. timeProps = _getTimeProps2[0],
  36847. localeTimeProps = _getTimeProps2[1],
  36848. showTimeFormat = _getTimeProps2[2],
  36849. propFormat = _getTimeProps2[3];
  36850. // ========================= Locale =========================
  36851. var filledLocale = useLocale_useLocale(locale, localeTimeProps);
  36852. // ========================= Picker =========================
  36853. var internalPicker = picker === 'date' && showTime ? 'datetime' : picker;
  36854. // ======================== ShowTime ========================
  36855. var mergedShowTime = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36856. return fillShowTimeConfig(internalPicker, showTimeFormat, propFormat, timeProps, filledLocale);
  36857. }, [internalPicker, showTimeFormat, propFormat, timeProps, filledLocale]);
  36858. // ========================== Now ===========================
  36859. var now = generateConfig.getNow();
  36860. // ========================== Mode ==========================
  36861. var _useMergedState = (0,rc_util_es.useMergedState)(picker, {
  36862. value: mode,
  36863. postState: function postState(val) {
  36864. return val || 'date';
  36865. }
  36866. }),
  36867. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  36868. mergedMode = _useMergedState2[0],
  36869. setMergedMode = _useMergedState2[1];
  36870. var internalMode = mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;
  36871. // ========================= Toggle =========================
  36872. var toggleDates = useToggleDates(generateConfig, locale, internalPicker);
  36873. // ========================= Value ==========================
  36874. // >>> Real value
  36875. // Interactive with `onChange` event which only trigger when the `mode` is `picker`
  36876. var _useMergedState3 = (0,rc_util_es.useMergedState)(defaultValue, {
  36877. value: value
  36878. }),
  36879. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  36880. innerValue = _useMergedState4[0],
  36881. setMergedValue = _useMergedState4[1];
  36882. var mergedValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36883. // Clean up `[null]`
  36884. var values = miscUtil_toArray(innerValue).filter(function (val) {
  36885. return val;
  36886. });
  36887. return multiple ? values : values.slice(0, 1);
  36888. }, [innerValue, multiple]);
  36889. // Sync value and only trigger onChange event when changed
  36890. var triggerChange = (0,rc_util_es.useEvent)(function (nextValue) {
  36891. setMergedValue(nextValue);
  36892. if (onChange && (nextValue === null || mergedValue.length !== nextValue.length || mergedValue.some(function (ori, index) {
  36893. return !isSame(generateConfig, locale, ori, nextValue[index], internalPicker);
  36894. }))) {
  36895. onChange === null || onChange === void 0 || onChange(multiple ? nextValue : nextValue[0]);
  36896. }
  36897. });
  36898. // >>> CalendarValue
  36899. // CalendarValue is a temp value for user operation
  36900. // which will only trigger `onCalendarChange` but not `onChange`
  36901. var onInternalSelect = (0,rc_util_es.useEvent)(function (newDate) {
  36902. onSelect === null || onSelect === void 0 || onSelect(newDate);
  36903. if (mergedMode === picker) {
  36904. var nextValues = multiple ? toggleDates(mergedValue, newDate) : [newDate];
  36905. triggerChange(nextValues);
  36906. }
  36907. });
  36908. // >>> PickerValue
  36909. // PickerValue is used to control the current displaying panel
  36910. var _useMergedState5 = (0,rc_util_es.useMergedState)(defaultPickerValue || mergedValue[0] || now, {
  36911. value: pickerValue
  36912. }),
  36913. _useMergedState6 = (0,slicedToArray["default"])(_useMergedState5, 2),
  36914. mergedPickerValue = _useMergedState6[0],
  36915. setInternalPickerValue = _useMergedState6[1];
  36916. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  36917. if (mergedValue[0] && !pickerValue) {
  36918. setInternalPickerValue(mergedValue[0]);
  36919. }
  36920. }, [mergedValue[0]]);
  36921. // Both trigger when manually pickerValue or mode change
  36922. var triggerPanelChange = function triggerPanelChange(viewDate, nextMode) {
  36923. onPanelChange === null || onPanelChange === void 0 || onPanelChange(viewDate || pickerValue, nextMode || mergedMode);
  36924. };
  36925. var setPickerValue = function setPickerValue(nextPickerValue) {
  36926. var triggerPanelEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  36927. setInternalPickerValue(nextPickerValue);
  36928. onPickerValueChange === null || onPickerValueChange === void 0 || onPickerValueChange(nextPickerValue);
  36929. if (triggerPanelEvent) {
  36930. triggerPanelChange(nextPickerValue);
  36931. }
  36932. };
  36933. var triggerModeChange = function triggerModeChange(nextMode, viewDate) {
  36934. setMergedMode(nextMode);
  36935. if (viewDate) {
  36936. setPickerValue(viewDate);
  36937. }
  36938. triggerPanelChange(viewDate, nextMode);
  36939. };
  36940. var onPanelValueSelect = function onPanelValueSelect(nextValue) {
  36941. onInternalSelect(nextValue);
  36942. setPickerValue(nextValue);
  36943. // Update mode if needed
  36944. if (mergedMode !== picker) {
  36945. var decadeYearQueue = ['decade', 'year'];
  36946. var decadeYearMonthQueue = [].concat(decadeYearQueue, ['month']);
  36947. var pickerQueue = {
  36948. quarter: [].concat(decadeYearQueue, ['quarter']),
  36949. week: [].concat((0,toConsumableArray["default"])(decadeYearMonthQueue), ['week']),
  36950. date: [].concat((0,toConsumableArray["default"])(decadeYearMonthQueue), ['date'])
  36951. };
  36952. var queue = pickerQueue[picker] || decadeYearMonthQueue;
  36953. var index = queue.indexOf(mergedMode);
  36954. var nextMode = queue[index + 1];
  36955. if (nextMode) {
  36956. triggerModeChange(nextMode, nextValue);
  36957. }
  36958. }
  36959. };
  36960. // ======================= Hover Date =======================
  36961. var hoverRangeDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36962. var start;
  36963. var end;
  36964. if (Array.isArray(hoverRangeValue)) {
  36965. var _hoverRangeValue = (0,slicedToArray["default"])(hoverRangeValue, 2);
  36966. start = _hoverRangeValue[0];
  36967. end = _hoverRangeValue[1];
  36968. } else {
  36969. start = hoverRangeValue;
  36970. }
  36971. // Return for not exist
  36972. if (!start && !end) {
  36973. return null;
  36974. }
  36975. // Fill if has empty
  36976. start = start || end;
  36977. end = end || start;
  36978. return generateConfig.isAfter(start, end) ? [end, start] : [start, end];
  36979. }, [hoverRangeValue, generateConfig]);
  36980. // ======================= Components =======================
  36981. // >>> cellRender
  36982. var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender);
  36983. // ======================= Components =======================
  36984. var PanelComponent = components[internalMode] || DefaultComponents[internalMode] || DatePanel;
  36985. // ======================== Context =========================
  36986. var parentHackContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerHackContext);
  36987. var pickerPanelContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  36988. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, parentHackContext), {}, {
  36989. hideHeader: hideHeader
  36990. });
  36991. }, [parentHackContext, hideHeader]);
  36992. // ======================== Warnings ========================
  36993. if (true) {
  36994. (0,rc_util_es.warning)(!mergedValue || mergedValue.every(function (val) {
  36995. return generateConfig.isValidate(val);
  36996. }), 'Invalidate date pass to `value` or `defaultValue`.');
  36997. }
  36998. // ========================= Render =========================
  36999. var panelCls = "".concat(mergedPrefixCls, "-panel");
  37000. var panelProps = pickProps(props, [
  37001. // Week
  37002. 'showWeek',
  37003. // Icons
  37004. 'prevIcon', 'nextIcon', 'superPrevIcon', 'superNextIcon',
  37005. // Disabled
  37006. 'disabledDate', 'minDate', 'maxDate',
  37007. // Hover
  37008. 'onHover']);
  37009. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
  37010. value: pickerPanelContext
  37011. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37012. ref: rootRef,
  37013. tabIndex: tabIndex,
  37014. className: classnames_default()(panelCls, (0,defineProperty["default"])({}, "".concat(panelCls, "-rtl"), direction === 'rtl'))
  37015. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PanelComponent, (0,esm_extends["default"])({}, panelProps, {
  37016. // Time
  37017. showTime: mergedShowTime
  37018. // MISC
  37019. ,
  37020. prefixCls: mergedPrefixCls,
  37021. locale: filledLocale,
  37022. generateConfig: generateConfig
  37023. // Mode
  37024. ,
  37025. onModeChange: triggerModeChange
  37026. // Value
  37027. ,
  37028. pickerValue: mergedPickerValue,
  37029. onPickerValueChange: function onPickerValueChange(nextPickerValue) {
  37030. setPickerValue(nextPickerValue, true);
  37031. },
  37032. value: mergedValue[0],
  37033. onSelect: onPanelValueSelect,
  37034. values: mergedValue
  37035. // Render
  37036. ,
  37037. cellRender: onInternalCellRender
  37038. // Hover
  37039. ,
  37040. hoverRangeValue: hoverRangeDate,
  37041. hoverValue: hoverValue
  37042. }))));
  37043. }
  37044. var RefPanelPicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PickerPanel));
  37045. if (true) {
  37046. RefPanelPicker.displayName = 'PanelPicker';
  37047. }
  37048. // Make support generic
  37049. /* harmony default export */ var es_PickerPanel = (RefPanelPicker);
  37050. ;// ./node_modules/rc-picker/es/PickerInput/Popup/PopupPanel.js
  37051. function PopupPanel(props) {
  37052. var picker = props.picker,
  37053. multiplePanel = props.multiplePanel,
  37054. pickerValue = props.pickerValue,
  37055. onPickerValueChange = props.onPickerValueChange,
  37056. needConfirm = props.needConfirm,
  37057. onSubmit = props.onSubmit,
  37058. range = props.range,
  37059. hoverValue = props.hoverValue;
  37060. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  37061. prefixCls = _React$useContext.prefixCls,
  37062. generateConfig = _React$useContext.generateConfig;
  37063. // ======================== Offset ========================
  37064. var internalOffsetDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (date, offset) {
  37065. return offsetPanelDate(generateConfig, picker, date, offset);
  37066. }, [generateConfig, picker]);
  37067. var nextPickerValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37068. return internalOffsetDate(pickerValue, 1);
  37069. }, [pickerValue, internalOffsetDate]);
  37070. // Outside
  37071. var onSecondPickerValueChange = function onSecondPickerValueChange(nextDate) {
  37072. onPickerValueChange(internalOffsetDate(nextDate, -1));
  37073. };
  37074. // ======================= Context ========================
  37075. var sharedContext = {
  37076. onCellDblClick: function onCellDblClick() {
  37077. if (needConfirm) {
  37078. onSubmit();
  37079. }
  37080. }
  37081. };
  37082. var hideHeader = picker === 'time';
  37083. // ======================== Props =========================
  37084. var pickerProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  37085. hoverValue: null,
  37086. hoverRangeValue: null,
  37087. hideHeader: hideHeader
  37088. });
  37089. if (range) {
  37090. pickerProps.hoverRangeValue = hoverValue;
  37091. } else {
  37092. pickerProps.hoverValue = hoverValue;
  37093. }
  37094. // ======================== Render ========================
  37095. // Multiple
  37096. if (multiplePanel) {
  37097. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37098. className: "".concat(prefixCls, "-panels")
  37099. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
  37100. value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedContext), {}, {
  37101. hideNext: true
  37102. })
  37103. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, pickerProps)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
  37104. value: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedContext), {}, {
  37105. hidePrev: true
  37106. })
  37107. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, (0,esm_extends["default"])({}, pickerProps, {
  37108. pickerValue: nextPickerValue,
  37109. onPickerValueChange: onSecondPickerValueChange
  37110. }))));
  37111. }
  37112. // Single
  37113. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerHackContext.Provider, {
  37114. value: (0,objectSpread2["default"])({}, sharedContext)
  37115. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, pickerProps));
  37116. }
  37117. ;// ./node_modules/rc-picker/es/PickerInput/Popup/PresetPanel.js
  37118. function executeValue(value) {
  37119. return typeof value === 'function' ? value() : value;
  37120. }
  37121. function PresetPanel(props) {
  37122. var prefixCls = props.prefixCls,
  37123. presets = props.presets,
  37124. _onClick = props.onClick,
  37125. onHover = props.onHover;
  37126. if (!presets.length) {
  37127. return null;
  37128. }
  37129. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37130. className: "".concat(prefixCls, "-presets")
  37131. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", null, presets.map(function (_ref, index) {
  37132. var label = _ref.label,
  37133. value = _ref.value;
  37134. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  37135. key: index,
  37136. onClick: function onClick() {
  37137. _onClick(executeValue(value));
  37138. },
  37139. onMouseEnter: function onMouseEnter() {
  37140. onHover(executeValue(value));
  37141. },
  37142. onMouseLeave: function onMouseLeave() {
  37143. onHover(null);
  37144. }
  37145. }, label);
  37146. })));
  37147. }
  37148. ;// ./node_modules/rc-picker/es/PickerInput/Popup/index.js
  37149. function PickerInput_Popup_Popup(props) {
  37150. var panelRender = props.panelRender,
  37151. internalMode = props.internalMode,
  37152. picker = props.picker,
  37153. showNow = props.showNow,
  37154. range = props.range,
  37155. multiple = props.multiple,
  37156. _props$activeInfo = props.activeInfo,
  37157. activeInfo = _props$activeInfo === void 0 ? [0, 0, 0] : _props$activeInfo,
  37158. presets = props.presets,
  37159. onPresetHover = props.onPresetHover,
  37160. onPresetSubmit = props.onPresetSubmit,
  37161. onFocus = props.onFocus,
  37162. onBlur = props.onBlur,
  37163. onPanelMouseDown = props.onPanelMouseDown,
  37164. direction = props.direction,
  37165. value = props.value,
  37166. onSelect = props.onSelect,
  37167. isInvalid = props.isInvalid,
  37168. defaultOpenValue = props.defaultOpenValue,
  37169. onOk = props.onOk,
  37170. onSubmit = props.onSubmit;
  37171. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  37172. prefixCls = _React$useContext.prefixCls;
  37173. var panelPrefixCls = "".concat(prefixCls, "-panel");
  37174. var rtl = direction === 'rtl';
  37175. // ========================= Refs =========================
  37176. var arrowRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  37177. var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  37178. // ======================== Offset ========================
  37179. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  37180. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  37181. containerWidth = _React$useState2[0],
  37182. setContainerWidth = _React$useState2[1];
  37183. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  37184. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  37185. containerOffset = _React$useState4[0],
  37186. setContainerOffset = _React$useState4[1];
  37187. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  37188. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  37189. arrowOffset = _React$useState6[0],
  37190. setArrowOffset = _React$useState6[1];
  37191. var onResize = function onResize(info) {
  37192. if (info.width) {
  37193. setContainerWidth(info.width);
  37194. }
  37195. };
  37196. var _activeInfo = (0,slicedToArray["default"])(activeInfo, 3),
  37197. activeInputLeft = _activeInfo[0],
  37198. activeInputRight = _activeInfo[1],
  37199. selectorWidth = _activeInfo[2];
  37200. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  37201. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  37202. retryTimes = _React$useState8[0],
  37203. setRetryTimes = _React$useState8[1];
  37204. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  37205. setRetryTimes(10);
  37206. }, [activeInputLeft]);
  37207. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  37208. // `activeOffset` is always align with the active input element
  37209. // So we need only check container contains the `activeOffset`
  37210. if (range && wrapperRef.current) {
  37211. var _arrowRef$current;
  37212. // Offset in case container has border radius
  37213. var arrowWidth = ((_arrowRef$current = arrowRef.current) === null || _arrowRef$current === void 0 ? void 0 : _arrowRef$current.offsetWidth) || 0;
  37214. // Arrow Offset
  37215. var wrapperRect = wrapperRef.current.getBoundingClientRect();
  37216. if (!wrapperRect.height || wrapperRect.right < 0) {
  37217. setRetryTimes(function (times) {
  37218. return Math.max(0, times - 1);
  37219. });
  37220. return;
  37221. }
  37222. var nextArrowOffset = (rtl ? activeInputRight - arrowWidth : activeInputLeft) - wrapperRect.left;
  37223. setArrowOffset(nextArrowOffset);
  37224. // Container Offset
  37225. if (containerWidth && containerWidth < selectorWidth) {
  37226. var offset = rtl ? wrapperRect.right - (activeInputRight - arrowWidth + containerWidth) : activeInputLeft + arrowWidth - wrapperRect.left - containerWidth;
  37227. var safeOffset = Math.max(0, offset);
  37228. setContainerOffset(safeOffset);
  37229. } else {
  37230. setContainerOffset(0);
  37231. }
  37232. }
  37233. }, [retryTimes, rtl, containerWidth, activeInputLeft, activeInputRight, selectorWidth, range]);
  37234. // ======================== Custom ========================
  37235. function filterEmpty(list) {
  37236. return list.filter(function (item) {
  37237. return item;
  37238. });
  37239. }
  37240. var valueList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37241. return filterEmpty(miscUtil_toArray(value));
  37242. }, [value]);
  37243. var isTimePickerEmptyValue = picker === 'time' && !valueList.length;
  37244. var footerSubmitValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37245. if (isTimePickerEmptyValue) {
  37246. return filterEmpty([defaultOpenValue]);
  37247. }
  37248. return valueList;
  37249. }, [isTimePickerEmptyValue, valueList, defaultOpenValue]);
  37250. var popupPanelValue = isTimePickerEmptyValue ? defaultOpenValue : valueList;
  37251. var disableSubmit = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37252. // Empty is invalid
  37253. if (!footerSubmitValue.length) {
  37254. return true;
  37255. }
  37256. return footerSubmitValue.some(function (val) {
  37257. return isInvalid(val);
  37258. });
  37259. }, [footerSubmitValue, isInvalid]);
  37260. var onFooterSubmit = function onFooterSubmit() {
  37261. // For TimePicker, we will additional trigger the value update
  37262. if (isTimePickerEmptyValue) {
  37263. onSelect(defaultOpenValue);
  37264. }
  37265. onOk();
  37266. onSubmit();
  37267. };
  37268. var mergedNodes = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37269. className: "".concat(prefixCls, "-panel-layout")
  37270. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PresetPanel, {
  37271. prefixCls: prefixCls,
  37272. presets: presets,
  37273. onClick: onPresetSubmit,
  37274. onHover: onPresetHover
  37275. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PopupPanel, (0,esm_extends["default"])({}, props, {
  37276. value: popupPanelValue
  37277. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer_Footer, (0,esm_extends["default"])({}, props, {
  37278. showNow: multiple ? false : showNow,
  37279. invalid: disableSubmit,
  37280. onSubmit: onFooterSubmit
  37281. }))));
  37282. if (panelRender) {
  37283. mergedNodes = panelRender(mergedNodes);
  37284. }
  37285. // ======================== Render ========================
  37286. var containerPrefixCls = "".concat(panelPrefixCls, "-container");
  37287. var marginLeft = 'marginLeft';
  37288. var marginRight = 'marginRight';
  37289. // Container
  37290. var renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37291. onMouseDown: onPanelMouseDown,
  37292. tabIndex: -1,
  37293. className: classnames_default()(containerPrefixCls, // Used for Today Button style, safe to remove if no need
  37294. "".concat(prefixCls, "-").concat(internalMode, "-panel-container")),
  37295. style: (0,defineProperty["default"])((0,defineProperty["default"])({}, rtl ? marginRight : marginLeft, containerOffset), rtl ? marginLeft : marginRight, 'auto')
  37296. // Still wish not to lose focus on mouse down
  37297. // onMouseDown={(e) => {
  37298. // // e.preventDefault();
  37299. // }}
  37300. ,
  37301. onFocus: onFocus,
  37302. onBlur: onBlur
  37303. }, mergedNodes);
  37304. if (range) {
  37305. renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37306. onMouseDown: onPanelMouseDown,
  37307. ref: wrapperRef,
  37308. className: classnames_default()("".concat(prefixCls, "-range-wrapper"), "".concat(prefixCls, "-").concat(picker, "-range-wrapper"))
  37309. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37310. ref: arrowRef,
  37311. className: "".concat(prefixCls, "-range-arrow"),
  37312. style: {
  37313. left: arrowOffset
  37314. }
  37315. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  37316. onResize: onResize
  37317. }, renderNode));
  37318. }
  37319. return renderNode;
  37320. }
  37321. ;// ./node_modules/rc-picker/es/PickerInput/Selector/hooks/useInputProps.js
  37322. function useInputProps(props, /** Used for SinglePicker */
  37323. postProps) {
  37324. var format = props.format,
  37325. maskFormat = props.maskFormat,
  37326. generateConfig = props.generateConfig,
  37327. locale = props.locale,
  37328. preserveInvalidOnBlur = props.preserveInvalidOnBlur,
  37329. inputReadOnly = props.inputReadOnly,
  37330. required = props.required,
  37331. ariaRequired = props['aria-required'],
  37332. onSubmit = props.onSubmit,
  37333. _onFocus = props.onFocus,
  37334. _onBlur = props.onBlur,
  37335. onInputChange = props.onInputChange,
  37336. onInvalid = props.onInvalid,
  37337. open = props.open,
  37338. onOpenChange = props.onOpenChange,
  37339. _onKeyDown = props.onKeyDown,
  37340. _onChange = props.onChange,
  37341. activeHelp = props.activeHelp,
  37342. name = props.name,
  37343. autoComplete = props.autoComplete,
  37344. id = props.id,
  37345. value = props.value,
  37346. invalid = props.invalid,
  37347. placeholder = props.placeholder,
  37348. disabled = props.disabled,
  37349. activeIndex = props.activeIndex,
  37350. allHelp = props.allHelp,
  37351. picker = props.picker;
  37352. // ======================== Parser ========================
  37353. var parseDate = function parseDate(str, formatStr) {
  37354. var parsed = generateConfig.locale.parse(locale.locale, str, [formatStr]);
  37355. return parsed && generateConfig.isValidate(parsed) ? parsed : null;
  37356. };
  37357. // ========================= Text =========================
  37358. var firstFormat = format[0];
  37359. var getText = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (date) {
  37360. return formatValue(date, {
  37361. locale: locale,
  37362. format: firstFormat,
  37363. generateConfig: generateConfig
  37364. });
  37365. }, [locale, generateConfig, firstFormat]);
  37366. var valueTexts = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37367. return value.map(getText);
  37368. }, [value, getText]);
  37369. // ========================= Size =========================
  37370. var size = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37371. var defaultSize = picker === 'time' ? 8 : 10;
  37372. var length = typeof firstFormat === 'function' ? firstFormat(generateConfig.getNow()).length : firstFormat.length;
  37373. return Math.max(defaultSize, length) + 2;
  37374. }, [firstFormat, picker, generateConfig]);
  37375. // ======================= Validate =======================
  37376. var _validateFormat = function validateFormat(text) {
  37377. for (var i = 0; i < format.length; i += 1) {
  37378. var singleFormat = format[i];
  37379. // Only support string type
  37380. if (typeof singleFormat === 'string') {
  37381. var parsed = parseDate(text, singleFormat);
  37382. if (parsed) {
  37383. return parsed;
  37384. }
  37385. }
  37386. }
  37387. return false;
  37388. };
  37389. // ======================== Input =========================
  37390. var getInputProps = function getInputProps(index) {
  37391. function getProp(propValue) {
  37392. return index !== undefined ? propValue[index] : propValue;
  37393. }
  37394. var pickedAttrs = (0,pickAttrs["default"])(props, {
  37395. aria: true,
  37396. data: true
  37397. });
  37398. var inputProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, pickedAttrs), {}, {
  37399. // ============== Shared ==============
  37400. format: maskFormat,
  37401. validateFormat: function validateFormat(text) {
  37402. return !!_validateFormat(text);
  37403. },
  37404. preserveInvalidOnBlur: preserveInvalidOnBlur,
  37405. readOnly: inputReadOnly,
  37406. required: required,
  37407. 'aria-required': ariaRequired,
  37408. name: name,
  37409. autoComplete: autoComplete,
  37410. size: size,
  37411. // ============= By Index =============
  37412. id: getProp(id),
  37413. value: getProp(valueTexts) || '',
  37414. invalid: getProp(invalid),
  37415. placeholder: getProp(placeholder),
  37416. active: activeIndex === index,
  37417. helped: allHelp || activeHelp && activeIndex === index,
  37418. disabled: getProp(disabled),
  37419. onFocus: function onFocus(event) {
  37420. _onFocus(event, index);
  37421. },
  37422. onBlur: function onBlur(event) {
  37423. // Blur do not trigger close
  37424. // Since it may focus to the popup panel
  37425. _onBlur(event, index);
  37426. },
  37427. onSubmit: onSubmit,
  37428. // Get validate text value
  37429. onChange: function onChange(text) {
  37430. onInputChange();
  37431. var parsed = _validateFormat(text);
  37432. if (parsed) {
  37433. onInvalid(false, index);
  37434. _onChange(parsed, index);
  37435. return;
  37436. }
  37437. // Tell outer that the value typed is invalid.
  37438. // If text is empty, it means valid.
  37439. onInvalid(!!text, index);
  37440. },
  37441. onHelp: function onHelp() {
  37442. onOpenChange(true, {
  37443. index: index
  37444. });
  37445. },
  37446. onKeyDown: function onKeyDown(event) {
  37447. var prevented = false;
  37448. _onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(event, function () {
  37449. if (true) {
  37450. (0,rc_util_es.warning)(false, '`preventDefault` callback is deprecated. Please call `event.preventDefault` directly.');
  37451. }
  37452. prevented = true;
  37453. });
  37454. if (!event.defaultPrevented && !prevented) {
  37455. switch (event.key) {
  37456. case 'Escape':
  37457. onOpenChange(false, {
  37458. index: index
  37459. });
  37460. break;
  37461. case 'Enter':
  37462. if (!open) {
  37463. onOpenChange(true);
  37464. }
  37465. break;
  37466. }
  37467. }
  37468. }
  37469. }, postProps === null || postProps === void 0 ? void 0 : postProps({
  37470. valueTexts: valueTexts
  37471. }));
  37472. // ============== Clean Up ==============
  37473. Object.keys(inputProps).forEach(function (key) {
  37474. if (inputProps[key] === undefined) {
  37475. delete inputProps[key];
  37476. }
  37477. });
  37478. return inputProps;
  37479. };
  37480. return [getInputProps, getText];
  37481. }
  37482. ;// ./node_modules/rc-picker/es/PickerInput/Selector/hooks/useRootProps.js
  37483. var propNames = ['onMouseEnter', 'onMouseLeave'];
  37484. function useRootProps(props) {
  37485. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37486. return pickProps(props, propNames);
  37487. }, [props]);
  37488. }
  37489. ;// ./node_modules/rc-picker/es/PickerInput/Selector/Icon.js
  37490. var Icon_excluded = ["icon", "type"],
  37491. Icon_excluded2 = ["onClear"];
  37492. function Icon_Icon(props) {
  37493. var icon = props.icon,
  37494. type = props.type,
  37495. restProps = (0,objectWithoutProperties["default"])(props, Icon_excluded);
  37496. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  37497. prefixCls = _React$useContext.prefixCls;
  37498. return icon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({
  37499. className: "".concat(prefixCls, "-").concat(type)
  37500. }, restProps), icon) : null;
  37501. }
  37502. function ClearIcon(_ref) {
  37503. var onClear = _ref.onClear,
  37504. restProps = (0,objectWithoutProperties["default"])(_ref, Icon_excluded2);
  37505. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, (0,esm_extends["default"])({}, restProps, {
  37506. type: "clear",
  37507. role: "button",
  37508. onMouseDown: function onMouseDown(e) {
  37509. e.preventDefault();
  37510. },
  37511. onClick: function onClick(e) {
  37512. e.stopPropagation();
  37513. onClear();
  37514. }
  37515. }));
  37516. }
  37517. ;// ./node_modules/rc-picker/es/PickerInput/Selector/MaskFormat.js
  37518. var FORMAT_KEYS = ['YYYY', 'MM', 'DD', 'HH', 'mm', 'ss', 'SSS'];
  37519. // Use Chinese character to avoid conflict with the mask format
  37520. var REPLACE_KEY = '顧';
  37521. var MaskFormat = /*#__PURE__*/function () {
  37522. function MaskFormat(format) {
  37523. (0,classCallCheck["default"])(this, MaskFormat);
  37524. (0,defineProperty["default"])(this, "format", void 0);
  37525. (0,defineProperty["default"])(this, "maskFormat", void 0);
  37526. (0,defineProperty["default"])(this, "cells", void 0);
  37527. (0,defineProperty["default"])(this, "maskCells", void 0);
  37528. this.format = format;
  37529. // Generate mask format
  37530. var replaceKeys = FORMAT_KEYS.map(function (key) {
  37531. return "(".concat(key, ")");
  37532. }).join('|');
  37533. var replaceReg = new RegExp(replaceKeys, 'g');
  37534. this.maskFormat = format.replace(replaceReg,
  37535. // Use Chinese character to avoid user use it in format
  37536. function (key) {
  37537. return REPLACE_KEY.repeat(key.length);
  37538. });
  37539. // Generate cells
  37540. var cellReg = new RegExp("(".concat(FORMAT_KEYS.join('|'), ")"));
  37541. var strCells = (format.split(cellReg) || []).filter(function (str) {
  37542. return str;
  37543. });
  37544. var offset = 0;
  37545. this.cells = strCells.map(function (text) {
  37546. var mask = FORMAT_KEYS.includes(text);
  37547. var start = offset;
  37548. var end = offset + text.length;
  37549. offset = end;
  37550. return {
  37551. text: text,
  37552. mask: mask,
  37553. start: start,
  37554. end: end
  37555. };
  37556. });
  37557. // Mask cells
  37558. this.maskCells = this.cells.filter(function (cell) {
  37559. return cell.mask;
  37560. });
  37561. }
  37562. (0,createClass["default"])(MaskFormat, [{
  37563. key: "getSelection",
  37564. value: function getSelection(maskCellIndex) {
  37565. var _ref = this.maskCells[maskCellIndex] || {},
  37566. start = _ref.start,
  37567. end = _ref.end;
  37568. return [start || 0, end || 0];
  37569. }
  37570. /** Check given text match format */
  37571. }, {
  37572. key: "match",
  37573. value: function match(text) {
  37574. for (var i = 0; i < this.maskFormat.length; i += 1) {
  37575. var maskChar = this.maskFormat[i];
  37576. var textChar = text[i];
  37577. if (!textChar || maskChar !== REPLACE_KEY && maskChar !== textChar) {
  37578. return false;
  37579. }
  37580. }
  37581. return true;
  37582. }
  37583. /** Get mask cell count */
  37584. }, {
  37585. key: "size",
  37586. value: function size() {
  37587. return this.maskCells.length;
  37588. }
  37589. }, {
  37590. key: "getMaskCellIndex",
  37591. value: function getMaskCellIndex(anchorIndex) {
  37592. var closetDist = Number.MAX_SAFE_INTEGER;
  37593. var closetIndex = 0;
  37594. for (var i = 0; i < this.maskCells.length; i += 1) {
  37595. var _this$maskCells$i = this.maskCells[i],
  37596. start = _this$maskCells$i.start,
  37597. end = _this$maskCells$i.end;
  37598. if (anchorIndex >= start && anchorIndex <= end) {
  37599. return i;
  37600. }
  37601. var dist = Math.min(Math.abs(anchorIndex - start), Math.abs(anchorIndex - end));
  37602. if (dist < closetDist) {
  37603. closetDist = dist;
  37604. closetIndex = i;
  37605. }
  37606. }
  37607. return closetIndex;
  37608. }
  37609. }]);
  37610. return MaskFormat;
  37611. }();
  37612. ;// ./node_modules/rc-picker/es/PickerInput/Selector/util.js
  37613. function getMaskRange(key) {
  37614. var PresetRange = {
  37615. YYYY: [0, 9999, new Date().getFullYear()],
  37616. MM: [1, 12],
  37617. DD: [1, 31],
  37618. HH: [0, 23],
  37619. mm: [0, 59],
  37620. ss: [0, 59],
  37621. SSS: [0, 999]
  37622. };
  37623. return PresetRange[key];
  37624. }
  37625. ;// ./node_modules/rc-picker/es/PickerInput/Selector/Input.js
  37626. var Selector_Input_excluded = ["active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"];
  37627. // Format logic
  37628. //
  37629. // First time on focus:
  37630. // 1. check if the text is valid, if not fill with format
  37631. // 2. set highlight cell to the first cell
  37632. // Cells
  37633. // 1. Selection the index cell, set inner `cacheValue` to ''
  37634. // 2. Key input filter non-number char, patch after the `cacheValue`
  37635. // 1. Replace the `cacheValue` with input align the cell length
  37636. // 2. Re-selection the mask cell
  37637. // 3. If `cacheValue` match the limit length or cell format (like 1 ~ 12 month), go to next cell
  37638. var Selector_Input_Input = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  37639. var active = props.active,
  37640. _props$showActiveCls = props.showActiveCls,
  37641. showActiveCls = _props$showActiveCls === void 0 ? true : _props$showActiveCls,
  37642. suffixIcon = props.suffixIcon,
  37643. format = props.format,
  37644. validateFormat = props.validateFormat,
  37645. onChange = props.onChange,
  37646. onInput = props.onInput,
  37647. helped = props.helped,
  37648. onHelp = props.onHelp,
  37649. onSubmit = props.onSubmit,
  37650. onKeyDown = props.onKeyDown,
  37651. _props$preserveInvali = props.preserveInvalidOnBlur,
  37652. preserveInvalidOnBlur = _props$preserveInvali === void 0 ? false : _props$preserveInvali,
  37653. invalid = props.invalid,
  37654. clearIcon = props.clearIcon,
  37655. restProps = (0,objectWithoutProperties["default"])(props, Selector_Input_excluded);
  37656. var value = props.value,
  37657. onFocus = props.onFocus,
  37658. onBlur = props.onBlur,
  37659. onMouseUp = props.onMouseUp;
  37660. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  37661. prefixCls = _React$useContext.prefixCls,
  37662. _React$useContext$inp = _React$useContext.input,
  37663. Component = _React$useContext$inp === void 0 ? 'input' : _React$useContext$inp;
  37664. var inputPrefixCls = "".concat(prefixCls, "-input");
  37665. // ======================== Value =========================
  37666. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  37667. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  37668. focused = _React$useState2[0],
  37669. setFocused = _React$useState2[1];
  37670. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value),
  37671. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  37672. internalInputValue = _React$useState4[0],
  37673. setInputValue = _React$useState4[1];
  37674. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(''),
  37675. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  37676. focusCellText = _React$useState6[0],
  37677. setFocusCellText = _React$useState6[1];
  37678. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  37679. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  37680. focusCellIndex = _React$useState8[0],
  37681. setFocusCellIndex = _React$useState8[1];
  37682. var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  37683. _React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
  37684. forceSelectionSyncMark = _React$useState10[0],
  37685. forceSelectionSync = _React$useState10[1];
  37686. var inputValue = internalInputValue || '';
  37687. // Sync value if needed
  37688. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  37689. setInputValue(value);
  37690. }, [value]);
  37691. // ========================= Refs =========================
  37692. var holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  37693. var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  37694. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  37695. return {
  37696. nativeElement: holderRef.current,
  37697. inputElement: inputRef.current,
  37698. focus: function focus(options) {
  37699. inputRef.current.focus(options);
  37700. },
  37701. blur: function blur() {
  37702. inputRef.current.blur();
  37703. }
  37704. };
  37705. });
  37706. // ======================== Format ========================
  37707. var maskFormat = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37708. return new MaskFormat(format || '');
  37709. }, [format]);
  37710. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37711. if (helped) {
  37712. return [0, 0];
  37713. }
  37714. return maskFormat.getSelection(focusCellIndex);
  37715. }, [maskFormat, focusCellIndex, helped]),
  37716. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
  37717. selectionStart = _React$useMemo2[0],
  37718. selectionEnd = _React$useMemo2[1];
  37719. // ======================== Modify ========================
  37720. // When input modify content, trigger `onHelp` if is not the format
  37721. var onModify = function onModify(text) {
  37722. if (text && text !== format && text !== value) {
  37723. onHelp();
  37724. }
  37725. };
  37726. // ======================== Change ========================
  37727. /**
  37728. * Triggered by paste, keyDown and focus to show format
  37729. */
  37730. var triggerInputChange = (0,rc_util_es.useEvent)(function (text) {
  37731. if (validateFormat(text)) {
  37732. onChange(text);
  37733. }
  37734. setInputValue(text);
  37735. onModify(text);
  37736. });
  37737. // Directly trigger `onChange` if `format` is empty
  37738. var onInternalChange = function onInternalChange(event) {
  37739. // Hack `onChange` with format to do nothing
  37740. if (!format) {
  37741. var text = event.target.value;
  37742. onModify(text);
  37743. setInputValue(text);
  37744. onChange(text);
  37745. }
  37746. };
  37747. var onFormatPaste = function onFormatPaste(event) {
  37748. // Get paste text
  37749. var pasteText = event.clipboardData.getData('text');
  37750. if (validateFormat(pasteText)) {
  37751. triggerInputChange(pasteText);
  37752. }
  37753. };
  37754. // ======================== Mouse =========================
  37755. // When `mouseDown` get focus, it's better to not to change the selection
  37756. // Since the up position maybe not is the first cell
  37757. var mouseDownRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  37758. var onFormatMouseDown = function onFormatMouseDown() {
  37759. mouseDownRef.current = true;
  37760. };
  37761. var onFormatMouseUp = function onFormatMouseUp(event) {
  37762. var _ref = event.target,
  37763. start = _ref.selectionStart;
  37764. var closeMaskIndex = maskFormat.getMaskCellIndex(start);
  37765. setFocusCellIndex(closeMaskIndex);
  37766. // Force update the selection
  37767. forceSelectionSync({});
  37768. onMouseUp === null || onMouseUp === void 0 || onMouseUp(event);
  37769. mouseDownRef.current = false;
  37770. };
  37771. // ====================== Focus Blur ======================
  37772. var onFormatFocus = function onFormatFocus(event) {
  37773. setFocused(true);
  37774. setFocusCellIndex(0);
  37775. setFocusCellText('');
  37776. onFocus(event);
  37777. };
  37778. var onSharedBlur = function onSharedBlur(event) {
  37779. onBlur(event);
  37780. };
  37781. var onFormatBlur = function onFormatBlur(event) {
  37782. setFocused(false);
  37783. onSharedBlur(event);
  37784. };
  37785. // ======================== Active ========================
  37786. // Check if blur need reset input value
  37787. useLockEffect(active, function () {
  37788. if (!active && !preserveInvalidOnBlur) {
  37789. setInputValue(value);
  37790. }
  37791. });
  37792. // ======================= Keyboard =======================
  37793. var onSharedKeyDown = function onSharedKeyDown(event) {
  37794. if (event.key === 'Enter' && validateFormat(inputValue)) {
  37795. onSubmit();
  37796. }
  37797. onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
  37798. };
  37799. var onFormatKeyDown = function onFormatKeyDown(event) {
  37800. onSharedKeyDown(event);
  37801. var key = event.key;
  37802. // Save the cache with cell text
  37803. var nextCellText = null;
  37804. // Fill in the input
  37805. var nextFillText = null;
  37806. var maskCellLen = selectionEnd - selectionStart;
  37807. var cellFormat = format.slice(selectionStart, selectionEnd);
  37808. // Cell Index
  37809. var offsetCellIndex = function offsetCellIndex(offset) {
  37810. setFocusCellIndex(function (idx) {
  37811. var nextIndex = idx + offset;
  37812. nextIndex = Math.max(nextIndex, 0);
  37813. nextIndex = Math.min(nextIndex, maskFormat.size() - 1);
  37814. return nextIndex;
  37815. });
  37816. };
  37817. // Range
  37818. var offsetCellValue = function offsetCellValue(offset) {
  37819. var _getMaskRange = getMaskRange(cellFormat),
  37820. _getMaskRange2 = (0,slicedToArray["default"])(_getMaskRange, 3),
  37821. rangeStart = _getMaskRange2[0],
  37822. rangeEnd = _getMaskRange2[1],
  37823. rangeDefault = _getMaskRange2[2];
  37824. var currentText = inputValue.slice(selectionStart, selectionEnd);
  37825. var currentTextNum = Number(currentText);
  37826. if (isNaN(currentTextNum)) {
  37827. return String(rangeDefault ? rangeDefault : offset > 0 ? rangeStart : rangeEnd);
  37828. }
  37829. var num = currentTextNum + offset;
  37830. var range = rangeEnd - rangeStart + 1;
  37831. return String(rangeStart + (range + num - rangeStart) % range);
  37832. };
  37833. switch (key) {
  37834. // =============== Remove ===============
  37835. case 'Backspace':
  37836. case 'Delete':
  37837. nextCellText = '';
  37838. nextFillText = cellFormat;
  37839. break;
  37840. // =============== Arrows ===============
  37841. // Left key
  37842. case 'ArrowLeft':
  37843. nextCellText = '';
  37844. offsetCellIndex(-1);
  37845. break;
  37846. // Right key
  37847. case 'ArrowRight':
  37848. nextCellText = '';
  37849. offsetCellIndex(1);
  37850. break;
  37851. // Up key
  37852. case 'ArrowUp':
  37853. nextCellText = '';
  37854. nextFillText = offsetCellValue(1);
  37855. break;
  37856. // Down key
  37857. case 'ArrowDown':
  37858. nextCellText = '';
  37859. nextFillText = offsetCellValue(-1);
  37860. break;
  37861. // =============== Number ===============
  37862. default:
  37863. if (!isNaN(Number(key))) {
  37864. nextCellText = focusCellText + key;
  37865. nextFillText = nextCellText;
  37866. }
  37867. break;
  37868. }
  37869. // Update cell text
  37870. if (nextCellText !== null) {
  37871. setFocusCellText(nextCellText);
  37872. if (nextCellText.length >= maskCellLen) {
  37873. // Go to next cell
  37874. offsetCellIndex(1);
  37875. setFocusCellText('');
  37876. }
  37877. }
  37878. // Update the input text
  37879. if (nextFillText !== null) {
  37880. // Replace selection range with `nextCellText`
  37881. var nextFocusValue =
  37882. // before
  37883. inputValue.slice(0, selectionStart) +
  37884. // replace
  37885. leftPad(nextFillText, maskCellLen) +
  37886. // after
  37887. inputValue.slice(selectionEnd);
  37888. triggerInputChange(nextFocusValue.slice(0, format.length));
  37889. }
  37890. // Always trigger selection sync after key down
  37891. forceSelectionSync({});
  37892. };
  37893. // ======================== Format ========================
  37894. var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  37895. (0,useLayoutEffect["default"])(function () {
  37896. if (!focused || !format || mouseDownRef.current) {
  37897. return;
  37898. }
  37899. // Reset with format if not match
  37900. if (!maskFormat.match(inputValue)) {
  37901. triggerInputChange(format);
  37902. return;
  37903. }
  37904. // Match the selection range
  37905. inputRef.current.setSelectionRange(selectionStart, selectionEnd);
  37906. // Chrome has the bug anchor position looks not correct but actually correct
  37907. rafRef.current = (0,raf["default"])(function () {
  37908. inputRef.current.setSelectionRange(selectionStart, selectionEnd);
  37909. });
  37910. return function () {
  37911. raf["default"].cancel(rafRef.current);
  37912. };
  37913. }, [maskFormat, format, focused, inputValue, focusCellIndex, selectionStart, selectionEnd, forceSelectionSyncMark, triggerInputChange]);
  37914. // ======================== Render ========================
  37915. // Input props for format
  37916. var inputProps = format ? {
  37917. onFocus: onFormatFocus,
  37918. onBlur: onFormatBlur,
  37919. onKeyDown: onFormatKeyDown,
  37920. onMouseDown: onFormatMouseDown,
  37921. onMouseUp: onFormatMouseUp,
  37922. onPaste: onFormatPaste
  37923. } : {};
  37924. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  37925. ref: holderRef,
  37926. className: classnames_default()(inputPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped))
  37927. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({
  37928. ref: inputRef,
  37929. "aria-invalid": invalid,
  37930. autoComplete: "off"
  37931. }, restProps, {
  37932. onKeyDown: onSharedKeyDown,
  37933. onBlur: onSharedBlur
  37934. // Replace with format
  37935. }, inputProps, {
  37936. // Value
  37937. value: inputValue,
  37938. onChange: onInternalChange
  37939. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, {
  37940. type: "suffix",
  37941. icon: suffixIcon
  37942. }), clearIcon);
  37943. });
  37944. if (true) {
  37945. Selector_Input_Input.displayName = 'Input';
  37946. }
  37947. /* harmony default export */ var PickerInput_Selector_Input = (Selector_Input_Input);
  37948. ;// ./node_modules/rc-picker/es/PickerInput/Selector/RangeSelector.js
  37949. var RangeSelector_excluded = ["id", "prefix", "clearIcon", "suffixIcon", "separator", "activeIndex", "activeHelp", "allHelp", "focused", "onFocus", "onBlur", "onKeyDown", "locale", "generateConfig", "placeholder", "className", "style", "onClick", "onClear", "value", "onChange", "onSubmit", "onInputChange", "format", "maskFormat", "preserveInvalidOnBlur", "onInvalid", "disabled", "invalid", "inputReadOnly", "direction", "onOpenChange", "onActiveInfo", "placement", "onMouseDown", "required", "aria-required", "autoFocus", "tabIndex"],
  37950. RangeSelector_excluded2 = ["index"];
  37951. function RangeSelector(props, ref) {
  37952. var id = props.id,
  37953. prefix = props.prefix,
  37954. clearIcon = props.clearIcon,
  37955. suffixIcon = props.suffixIcon,
  37956. _props$separator = props.separator,
  37957. separator = _props$separator === void 0 ? '~' : _props$separator,
  37958. activeIndex = props.activeIndex,
  37959. activeHelp = props.activeHelp,
  37960. allHelp = props.allHelp,
  37961. focused = props.focused,
  37962. onFocus = props.onFocus,
  37963. onBlur = props.onBlur,
  37964. onKeyDown = props.onKeyDown,
  37965. locale = props.locale,
  37966. generateConfig = props.generateConfig,
  37967. placeholder = props.placeholder,
  37968. className = props.className,
  37969. style = props.style,
  37970. onClick = props.onClick,
  37971. onClear = props.onClear,
  37972. value = props.value,
  37973. onChange = props.onChange,
  37974. onSubmit = props.onSubmit,
  37975. onInputChange = props.onInputChange,
  37976. format = props.format,
  37977. maskFormat = props.maskFormat,
  37978. preserveInvalidOnBlur = props.preserveInvalidOnBlur,
  37979. onInvalid = props.onInvalid,
  37980. disabled = props.disabled,
  37981. invalid = props.invalid,
  37982. inputReadOnly = props.inputReadOnly,
  37983. direction = props.direction,
  37984. onOpenChange = props.onOpenChange,
  37985. onActiveInfo = props.onActiveInfo,
  37986. placement = props.placement,
  37987. _onMouseDown = props.onMouseDown,
  37988. required = props.required,
  37989. ariaRequired = props['aria-required'],
  37990. autoFocus = props.autoFocus,
  37991. tabIndex = props.tabIndex,
  37992. restProps = (0,objectWithoutProperties["default"])(props, RangeSelector_excluded);
  37993. var rtl = direction === 'rtl';
  37994. // ======================== Prefix ========================
  37995. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  37996. prefixCls = _React$useContext.prefixCls;
  37997. // ========================== Id ==========================
  37998. var ids = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  37999. if (typeof id === 'string') {
  38000. return [id];
  38001. }
  38002. var mergedId = id || {};
  38003. return [mergedId.start, mergedId.end];
  38004. }, [id]);
  38005. // ========================= Refs =========================
  38006. var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  38007. var inputStartRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  38008. var inputEndRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  38009. var getInput = function getInput(index) {
  38010. var _index;
  38011. return (_index = [inputStartRef, inputEndRef][index]) === null || _index === void 0 ? void 0 : _index.current;
  38012. };
  38013. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  38014. return {
  38015. nativeElement: rootRef.current,
  38016. focus: function focus(options) {
  38017. if ((0,esm_typeof["default"])(options) === 'object') {
  38018. var _getInput;
  38019. var _ref = options || {},
  38020. _ref$index = _ref.index,
  38021. _index2 = _ref$index === void 0 ? 0 : _ref$index,
  38022. rest = (0,objectWithoutProperties["default"])(_ref, RangeSelector_excluded2);
  38023. (_getInput = getInput(_index2)) === null || _getInput === void 0 || _getInput.focus(rest);
  38024. } else {
  38025. var _getInput2;
  38026. (_getInput2 = getInput(options !== null && options !== void 0 ? options : 0)) === null || _getInput2 === void 0 || _getInput2.focus();
  38027. }
  38028. },
  38029. blur: function blur() {
  38030. var _getInput3, _getInput4;
  38031. (_getInput3 = getInput(0)) === null || _getInput3 === void 0 || _getInput3.blur();
  38032. (_getInput4 = getInput(1)) === null || _getInput4 === void 0 || _getInput4.blur();
  38033. }
  38034. };
  38035. });
  38036. // ======================== Props =========================
  38037. var rootProps = useRootProps(restProps);
  38038. // ===================== Placeholder ======================
  38039. var mergedPlaceholder = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  38040. return Array.isArray(placeholder) ? placeholder : [placeholder, placeholder];
  38041. }, [placeholder]);
  38042. // ======================== Inputs ========================
  38043. var _useInputProps = useInputProps((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  38044. id: ids,
  38045. placeholder: mergedPlaceholder
  38046. })),
  38047. _useInputProps2 = (0,slicedToArray["default"])(_useInputProps, 1),
  38048. getInputProps = _useInputProps2[0];
  38049. // ====================== ActiveBar =======================
  38050. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({
  38051. position: 'absolute',
  38052. width: 0
  38053. }),
  38054. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  38055. activeBarStyle = _React$useState2[0],
  38056. setActiveBarStyle = _React$useState2[1];
  38057. var syncActiveOffset = (0,rc_util_es.useEvent)(function () {
  38058. var input = getInput(activeIndex);
  38059. if (input) {
  38060. var inputRect = input.nativeElement.getBoundingClientRect();
  38061. var parentRect = rootRef.current.getBoundingClientRect();
  38062. var rectOffset = inputRect.left - parentRect.left;
  38063. setActiveBarStyle(function (ori) {
  38064. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, ori), {}, {
  38065. width: inputRect.width,
  38066. left: rectOffset
  38067. });
  38068. });
  38069. onActiveInfo([inputRect.left, inputRect.right, parentRect.width]);
  38070. }
  38071. });
  38072. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  38073. syncActiveOffset();
  38074. }, [activeIndex]);
  38075. // ======================== Clear =========================
  38076. var showClear = clearIcon && (value[0] && !disabled[0] || value[1] && !disabled[1]);
  38077. // ======================= Disabled =======================
  38078. var startAutoFocus = autoFocus && !disabled[0];
  38079. var endAutoFocus = autoFocus && !startAutoFocus && !disabled[1];
  38080. // ======================== Render ========================
  38081. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  38082. onResize: syncActiveOffset
  38083. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, rootProps, {
  38084. className: classnames_default()(prefixCls, "".concat(prefixCls, "-range"), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled.every(function (i) {
  38085. return i;
  38086. })), "".concat(prefixCls, "-invalid"), invalid.some(function (i) {
  38087. return i;
  38088. })), "".concat(prefixCls, "-rtl"), rtl), className),
  38089. style: style,
  38090. ref: rootRef,
  38091. onClick: onClick
  38092. // Not lose current input focus
  38093. ,
  38094. onMouseDown: function onMouseDown(e) {
  38095. var target = e.target;
  38096. if (target !== inputStartRef.current.inputElement && target !== inputEndRef.current.inputElement) {
  38097. e.preventDefault();
  38098. }
  38099. _onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(e);
  38100. }
  38101. }), prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  38102. className: "".concat(prefixCls, "-prefix")
  38103. }, prefix), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_Input, (0,esm_extends["default"])({
  38104. ref: inputStartRef
  38105. }, getInputProps(0), {
  38106. autoFocus: startAutoFocus,
  38107. tabIndex: tabIndex,
  38108. "date-range": "start"
  38109. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  38110. className: "".concat(prefixCls, "-range-separator")
  38111. }, separator), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_Input, (0,esm_extends["default"])({
  38112. ref: inputEndRef
  38113. }, getInputProps(1), {
  38114. autoFocus: endAutoFocus,
  38115. tabIndex: tabIndex,
  38116. "date-range": "end"
  38117. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  38118. className: "".concat(prefixCls, "-active-bar"),
  38119. style: activeBarStyle
  38120. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, {
  38121. type: "suffix",
  38122. icon: suffixIcon
  38123. }), showClear && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ClearIcon, {
  38124. icon: clearIcon,
  38125. onClear: onClear
  38126. })));
  38127. }
  38128. var RefRangeSelector = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RangeSelector);
  38129. if (true) {
  38130. RefRangeSelector.displayName = 'RangeSelector';
  38131. }
  38132. /* harmony default export */ var Selector_RangeSelector = (RefRangeSelector);
  38133. ;// ./node_modules/rc-picker/es/PickerInput/RangePicker.js
  38134. function separateConfig(config, defaultConfig) {
  38135. var singleConfig = config !== null && config !== void 0 ? config : defaultConfig;
  38136. if (Array.isArray(singleConfig)) {
  38137. return singleConfig;
  38138. }
  38139. return [singleConfig, singleConfig];
  38140. }
  38141. /** Used for change event, it should always be not undefined */
  38142. function getActiveRange(activeIndex) {
  38143. return activeIndex === 1 ? 'end' : 'start';
  38144. }
  38145. function RangePicker(props, ref) {
  38146. // ========================= Prop =========================
  38147. var _useFilledProps = useFilledProps(props, function () {
  38148. var disabled = props.disabled,
  38149. allowEmpty = props.allowEmpty;
  38150. var mergedDisabled = separateConfig(disabled, false);
  38151. var mergedAllowEmpty = separateConfig(allowEmpty, false);
  38152. return {
  38153. disabled: mergedDisabled,
  38154. allowEmpty: mergedAllowEmpty
  38155. };
  38156. }),
  38157. _useFilledProps2 = (0,slicedToArray["default"])(_useFilledProps, 6),
  38158. filledProps = _useFilledProps2[0],
  38159. internalPicker = _useFilledProps2[1],
  38160. complexPicker = _useFilledProps2[2],
  38161. formatList = _useFilledProps2[3],
  38162. maskFormat = _useFilledProps2[4],
  38163. isInvalidateDate = _useFilledProps2[5];
  38164. var prefixCls = filledProps.prefixCls,
  38165. styles = filledProps.styles,
  38166. classNames = filledProps.classNames,
  38167. defaultValue = filledProps.defaultValue,
  38168. value = filledProps.value,
  38169. needConfirm = filledProps.needConfirm,
  38170. onKeyDown = filledProps.onKeyDown,
  38171. disabled = filledProps.disabled,
  38172. allowEmpty = filledProps.allowEmpty,
  38173. disabledDate = filledProps.disabledDate,
  38174. minDate = filledProps.minDate,
  38175. maxDate = filledProps.maxDate,
  38176. defaultOpen = filledProps.defaultOpen,
  38177. open = filledProps.open,
  38178. onOpenChange = filledProps.onOpenChange,
  38179. locale = filledProps.locale,
  38180. generateConfig = filledProps.generateConfig,
  38181. picker = filledProps.picker,
  38182. showNow = filledProps.showNow,
  38183. showToday = filledProps.showToday,
  38184. showTime = filledProps.showTime,
  38185. mode = filledProps.mode,
  38186. onPanelChange = filledProps.onPanelChange,
  38187. onCalendarChange = filledProps.onCalendarChange,
  38188. onOk = filledProps.onOk,
  38189. defaultPickerValue = filledProps.defaultPickerValue,
  38190. pickerValue = filledProps.pickerValue,
  38191. onPickerValueChange = filledProps.onPickerValueChange,
  38192. inputReadOnly = filledProps.inputReadOnly,
  38193. suffixIcon = filledProps.suffixIcon,
  38194. onFocus = filledProps.onFocus,
  38195. onBlur = filledProps.onBlur,
  38196. presets = filledProps.presets,
  38197. ranges = filledProps.ranges,
  38198. components = filledProps.components,
  38199. cellRender = filledProps.cellRender,
  38200. dateRender = filledProps.dateRender,
  38201. monthCellRender = filledProps.monthCellRender,
  38202. onClick = filledProps.onClick;
  38203. // ========================= Refs =========================
  38204. var selectorRef = usePickerRef(ref);
  38205. // ========================= Open =========================
  38206. var _useOpen = useOpen(open, defaultOpen, disabled, onOpenChange),
  38207. _useOpen2 = (0,slicedToArray["default"])(_useOpen, 2),
  38208. mergedOpen = _useOpen2[0],
  38209. setMergeOpen = _useOpen2[1];
  38210. var triggerOpen = function triggerOpen(nextOpen, config) {
  38211. // No need to open if all disabled
  38212. if (disabled.some(function (fieldDisabled) {
  38213. return !fieldDisabled;
  38214. }) || !nextOpen) {
  38215. setMergeOpen(nextOpen, config);
  38216. }
  38217. };
  38218. // ======================== Values ========================
  38219. var _useInnerValue = useInnerValue(generateConfig, locale, formatList, true, false, defaultValue, value, onCalendarChange, onOk),
  38220. _useInnerValue2 = (0,slicedToArray["default"])(_useInnerValue, 5),
  38221. mergedValue = _useInnerValue2[0],
  38222. setInnerValue = _useInnerValue2[1],
  38223. getCalendarValue = _useInnerValue2[2],
  38224. triggerCalendarChange = _useInnerValue2[3],
  38225. triggerOk = _useInnerValue2[4];
  38226. var calendarValue = getCalendarValue();
  38227. // ======================== Active ========================
  38228. var _useRangeActive = useRangeActive(disabled, allowEmpty, mergedOpen),
  38229. _useRangeActive2 = (0,slicedToArray["default"])(_useRangeActive, 9),
  38230. focused = _useRangeActive2[0],
  38231. triggerFocus = _useRangeActive2[1],
  38232. lastOperation = _useRangeActive2[2],
  38233. activeIndex = _useRangeActive2[3],
  38234. setActiveIndex = _useRangeActive2[4],
  38235. nextActiveIndex = _useRangeActive2[5],
  38236. activeIndexList = _useRangeActive2[6],
  38237. updateSubmitIndex = _useRangeActive2[7],
  38238. hasActiveSubmitValue = _useRangeActive2[8];
  38239. var onSharedFocus = function onSharedFocus(event, index) {
  38240. triggerFocus(true);
  38241. onFocus === null || onFocus === void 0 || onFocus(event, {
  38242. range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)
  38243. });
  38244. };
  38245. var onSharedBlur = function onSharedBlur(event, index) {
  38246. triggerFocus(false);
  38247. onBlur === null || onBlur === void 0 || onBlur(event, {
  38248. range: getActiveRange(index !== null && index !== void 0 ? index : activeIndex)
  38249. });
  38250. };
  38251. // ======================= ShowTime =======================
  38252. /** Used for Popup panel */
  38253. var mergedShowTime = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  38254. if (!showTime) {
  38255. return null;
  38256. }
  38257. var disabledTime = showTime.disabledTime;
  38258. var proxyDisabledTime = disabledTime ? function (date) {
  38259. var range = getActiveRange(activeIndex);
  38260. var fromDate = getFromDate(calendarValue, activeIndexList, activeIndex);
  38261. return disabledTime(date, range, {
  38262. from: fromDate
  38263. });
  38264. } : undefined;
  38265. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, showTime), {}, {
  38266. disabledTime: proxyDisabledTime
  38267. });
  38268. }, [showTime, activeIndex, calendarValue, activeIndexList]);
  38269. // ========================= Mode =========================
  38270. var _useMergedState = (0,rc_util_es.useMergedState)([picker, picker], {
  38271. value: mode
  38272. }),
  38273. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  38274. modes = _useMergedState2[0],
  38275. setModes = _useMergedState2[1];
  38276. var mergedMode = modes[activeIndex] || picker;
  38277. /** Extends from `mergedMode` to patch `datetime` mode */
  38278. var internalMode = mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;
  38279. // ====================== PanelCount ======================
  38280. var multiplePanel = internalMode === picker && internalMode !== 'time';
  38281. // ======================= Show Now =======================
  38282. var mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday, true);
  38283. // ======================== Value =========================
  38284. var _useRangeValue = useRangeValue(filledProps, mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, disabled, formatList, focused, mergedOpen, isInvalidateDate),
  38285. _useRangeValue2 = (0,slicedToArray["default"])(_useRangeValue, 2),
  38286. /** Trigger `onChange` by check `disabledDate` */
  38287. flushSubmit = _useRangeValue2[0],
  38288. /** Trigger `onChange` directly without check `disabledDate` */
  38289. triggerSubmitChange = _useRangeValue2[1];
  38290. // ===================== DisabledDate =====================
  38291. var mergedDisabledDate = useRangeDisabledDate(calendarValue, disabled, activeIndexList, generateConfig, locale, disabledDate);
  38292. // ======================= Validate =======================
  38293. var _useFieldsInvalidate = useFieldsInvalidate(calendarValue, isInvalidateDate, allowEmpty),
  38294. _useFieldsInvalidate2 = (0,slicedToArray["default"])(_useFieldsInvalidate, 2),
  38295. submitInvalidates = _useFieldsInvalidate2[0],
  38296. onSelectorInvalid = _useFieldsInvalidate2[1];
  38297. // ===================== Picker Value =====================
  38298. var _useRangePickerValue = useRangePickerValue(generateConfig, locale, calendarValue, modes, mergedOpen, activeIndex, internalPicker, multiplePanel, defaultPickerValue, pickerValue, mergedShowTime === null || mergedShowTime === void 0 ? void 0 : mergedShowTime.defaultOpenValue, onPickerValueChange, minDate, maxDate),
  38299. _useRangePickerValue2 = (0,slicedToArray["default"])(_useRangePickerValue, 2),
  38300. currentPickerValue = _useRangePickerValue2[0],
  38301. setCurrentPickerValue = _useRangePickerValue2[1];
  38302. // >>> Mode need wait for `pickerValue`
  38303. var triggerModeChange = (0,rc_util_es.useEvent)(function (nextPickerValue, nextMode, triggerEvent) {
  38304. var clone = fillIndex(modes, activeIndex, nextMode);
  38305. if (clone[0] !== modes[0] || clone[1] !== modes[1]) {
  38306. setModes(clone);
  38307. }
  38308. // Compatible with `onPanelChange`
  38309. if (onPanelChange && triggerEvent !== false) {
  38310. var clonePickerValue = (0,toConsumableArray["default"])(calendarValue);
  38311. if (nextPickerValue) {
  38312. clonePickerValue[activeIndex] = nextPickerValue;
  38313. }
  38314. onPanelChange(clonePickerValue, clone);
  38315. }
  38316. });
  38317. // ======================== Change ========================
  38318. var fillCalendarValue = function fillCalendarValue(date, index) {
  38319. return (
  38320. // Trigger change only when date changed
  38321. fillIndex(calendarValue, index, date)
  38322. );
  38323. };
  38324. // ======================== Submit ========================
  38325. /**
  38326. * Trigger by confirm operation.
  38327. * This function has already handle the `needConfirm` check logic.
  38328. * - Selector: enter key
  38329. * - Panel: OK button
  38330. */
  38331. var triggerPartConfirm = function triggerPartConfirm(date, skipFocus) {
  38332. var nextValue = calendarValue;
  38333. if (date) {
  38334. nextValue = fillCalendarValue(date, activeIndex);
  38335. }
  38336. updateSubmitIndex(activeIndex);
  38337. // Get next focus index
  38338. var nextIndex = nextActiveIndex(nextValue);
  38339. // Change calendar value and tell flush it
  38340. triggerCalendarChange(nextValue);
  38341. flushSubmit(activeIndex, nextIndex === null);
  38342. if (nextIndex === null) {
  38343. triggerOpen(false, {
  38344. force: true
  38345. });
  38346. } else if (!skipFocus) {
  38347. selectorRef.current.focus({
  38348. index: nextIndex
  38349. });
  38350. }
  38351. };
  38352. // ======================== Click =========================
  38353. var onSelectorClick = function onSelectorClick(event) {
  38354. var _activeElement;
  38355. var rootNode = event.target.getRootNode();
  38356. if (!selectorRef.current.nativeElement.contains((_activeElement = rootNode.activeElement) !== null && _activeElement !== void 0 ? _activeElement : document.activeElement)) {
  38357. // Click to focus the enabled input
  38358. var enabledIndex = disabled.findIndex(function (d) {
  38359. return !d;
  38360. });
  38361. if (enabledIndex >= 0) {
  38362. selectorRef.current.focus({
  38363. index: enabledIndex
  38364. });
  38365. }
  38366. }
  38367. triggerOpen(true);
  38368. onClick === null || onClick === void 0 || onClick(event);
  38369. };
  38370. var onSelectorClear = function onSelectorClear() {
  38371. triggerSubmitChange(null);
  38372. triggerOpen(false, {
  38373. force: true
  38374. });
  38375. };
  38376. // ======================== Hover =========================
  38377. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  38378. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  38379. hoverSource = _React$useState2[0],
  38380. setHoverSource = _React$useState2[1];
  38381. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  38382. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  38383. internalHoverValues = _React$useState4[0],
  38384. setInternalHoverValues = _React$useState4[1];
  38385. var hoverValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  38386. return internalHoverValues || calendarValue;
  38387. }, [calendarValue, internalHoverValues]);
  38388. // Clean up `internalHoverValues` when closed
  38389. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  38390. if (!mergedOpen) {
  38391. setInternalHoverValues(null);
  38392. }
  38393. }, [mergedOpen]);
  38394. // ========================================================
  38395. // == Panels ==
  38396. // ========================================================
  38397. // Save the offset with active bar position
  38398. // const [activeOffset, setActiveOffset] = React.useState(0);
  38399. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([0, 0, 0]),
  38400. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  38401. activeInfo = _React$useState6[0],
  38402. setActiveInfo = _React$useState6[1];
  38403. // ======================= Presets ========================
  38404. var presetList = usePresets(presets, ranges);
  38405. var onPresetHover = function onPresetHover(nextValues) {
  38406. setInternalHoverValues(nextValues);
  38407. setHoverSource('preset');
  38408. };
  38409. var onPresetSubmit = function onPresetSubmit(nextValues) {
  38410. var passed = triggerSubmitChange(nextValues);
  38411. if (passed) {
  38412. triggerOpen(false, {
  38413. force: true
  38414. });
  38415. }
  38416. };
  38417. var onNow = function onNow(now) {
  38418. triggerPartConfirm(now);
  38419. };
  38420. // ======================== Panel =========================
  38421. var onPanelHover = function onPanelHover(date) {
  38422. setInternalHoverValues(date ? fillCalendarValue(date, activeIndex) : null);
  38423. setHoverSource('cell');
  38424. };
  38425. // >>> Focus
  38426. var onPanelFocus = function onPanelFocus(event) {
  38427. triggerOpen(true);
  38428. onSharedFocus(event);
  38429. };
  38430. // >>> MouseDown
  38431. var onPanelMouseDown = function onPanelMouseDown() {
  38432. lastOperation('panel');
  38433. };
  38434. // >>> Calendar
  38435. var onPanelSelect = function onPanelSelect(date) {
  38436. var clone = fillIndex(calendarValue, activeIndex, date);
  38437. // Only trigger calendar event but not update internal `calendarValue` state
  38438. triggerCalendarChange(clone);
  38439. // >>> Trigger next active if !needConfirm
  38440. // Fully logic check `useRangeValue` hook
  38441. if (!needConfirm && !complexPicker && internalPicker === internalMode) {
  38442. triggerPartConfirm(date);
  38443. }
  38444. };
  38445. // >>> Close
  38446. var onPopupClose = function onPopupClose() {
  38447. // Close popup
  38448. triggerOpen(false);
  38449. };
  38450. // >>> cellRender
  38451. var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender, getActiveRange(activeIndex));
  38452. // >>> Value
  38453. var panelValue = calendarValue[activeIndex] || null;
  38454. // >>> invalid
  38455. var isPopupInvalidateDate = (0,rc_util_es.useEvent)(function (date) {
  38456. return isInvalidateDate(date, {
  38457. activeIndex: activeIndex
  38458. });
  38459. });
  38460. var panelProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  38461. var domProps = (0,pickAttrs["default"])(filledProps, false);
  38462. var restProps = (0,omit["default"])(filledProps, [].concat((0,toConsumableArray["default"])(Object.keys(domProps)), ['onChange', 'onCalendarChange', 'style', 'className', 'onPanelChange', 'disabledTime']));
  38463. return restProps;
  38464. }, [filledProps]);
  38465. // >>> Render
  38466. var panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Popup_Popup, (0,esm_extends["default"])({}, panelProps, {
  38467. showNow: mergedShowNow,
  38468. showTime: mergedShowTime
  38469. // Range
  38470. ,
  38471. range: true,
  38472. multiplePanel: multiplePanel,
  38473. activeInfo: activeInfo
  38474. // Disabled
  38475. ,
  38476. disabledDate: mergedDisabledDate
  38477. // Focus
  38478. ,
  38479. onFocus: onPanelFocus,
  38480. onBlur: onSharedBlur,
  38481. onPanelMouseDown: onPanelMouseDown
  38482. // Mode
  38483. ,
  38484. picker: picker,
  38485. mode: mergedMode,
  38486. internalMode: internalMode,
  38487. onPanelChange: triggerModeChange
  38488. // Value
  38489. ,
  38490. format: maskFormat,
  38491. value: panelValue,
  38492. isInvalid: isPopupInvalidateDate,
  38493. onChange: null,
  38494. onSelect: onPanelSelect
  38495. // PickerValue
  38496. ,
  38497. pickerValue: currentPickerValue,
  38498. defaultOpenValue: miscUtil_toArray(showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue)[activeIndex],
  38499. onPickerValueChange: setCurrentPickerValue
  38500. // Hover
  38501. ,
  38502. hoverValue: hoverValues,
  38503. onHover: onPanelHover
  38504. // Submit
  38505. ,
  38506. needConfirm: needConfirm,
  38507. onSubmit: triggerPartConfirm,
  38508. onOk: triggerOk
  38509. // Preset
  38510. ,
  38511. presets: presetList,
  38512. onPresetHover: onPresetHover,
  38513. onPresetSubmit: onPresetSubmit
  38514. // Now
  38515. ,
  38516. onNow: onNow
  38517. // Render
  38518. ,
  38519. cellRender: onInternalCellRender
  38520. }));
  38521. // ========================================================
  38522. // == Selector ==
  38523. // ========================================================
  38524. // ======================== Change ========================
  38525. var onSelectorChange = function onSelectorChange(date, index) {
  38526. var clone = fillCalendarValue(date, index);
  38527. triggerCalendarChange(clone);
  38528. };
  38529. var onSelectorInputChange = function onSelectorInputChange() {
  38530. lastOperation('input');
  38531. };
  38532. // ======================= Selector =======================
  38533. var onSelectorFocus = function onSelectorFocus(event, index) {
  38534. // Check if `needConfirm` but user not submit yet
  38535. var activeListLen = activeIndexList.length;
  38536. var lastActiveIndex = activeIndexList[activeListLen - 1];
  38537. if (activeListLen && lastActiveIndex !== index && needConfirm &&
  38538. // Not change index if is not filled
  38539. !allowEmpty[lastActiveIndex] && !hasActiveSubmitValue(lastActiveIndex) && calendarValue[lastActiveIndex]) {
  38540. selectorRef.current.focus({
  38541. index: lastActiveIndex
  38542. });
  38543. return;
  38544. }
  38545. lastOperation('input');
  38546. triggerOpen(true, {
  38547. inherit: true
  38548. });
  38549. // When click input to switch the field, it will not trigger close.
  38550. // Which means it will lose the part confirm and we need fill back.
  38551. // ref: https://github.com/ant-design/ant-design/issues/49512
  38552. if (activeIndex !== index && mergedOpen && !needConfirm && complexPicker) {
  38553. triggerPartConfirm(null, true);
  38554. }
  38555. setActiveIndex(index);
  38556. onSharedFocus(event, index);
  38557. };
  38558. var onSelectorBlur = function onSelectorBlur(event, index) {
  38559. triggerOpen(false);
  38560. if (!needConfirm && lastOperation() === 'input') {
  38561. var nextIndex = nextActiveIndex(calendarValue);
  38562. flushSubmit(activeIndex, nextIndex === null);
  38563. }
  38564. onSharedBlur(event, index);
  38565. };
  38566. var onSelectorKeyDown = function onSelectorKeyDown(event, preventDefault) {
  38567. if (event.key === 'Tab') {
  38568. triggerPartConfirm(null, true);
  38569. }
  38570. onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, preventDefault);
  38571. };
  38572. // ======================= Context ========================
  38573. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  38574. return {
  38575. prefixCls: prefixCls,
  38576. locale: locale,
  38577. generateConfig: generateConfig,
  38578. button: components.button,
  38579. input: components.input
  38580. };
  38581. }, [prefixCls, locale, generateConfig, components.button, components.input]);
  38582. // ======================== Effect ========================
  38583. // >>> Mode
  38584. // Reset for every active
  38585. (0,useLayoutEffect["default"])(function () {
  38586. if (mergedOpen && activeIndex !== undefined) {
  38587. // Legacy compatible. This effect update should not trigger `onPanelChange`
  38588. triggerModeChange(null, picker, false);
  38589. }
  38590. }, [mergedOpen, activeIndex, picker]);
  38591. // >>> For complex picker, we need check if need to focus next one
  38592. (0,useLayoutEffect["default"])(function () {
  38593. var lastOp = lastOperation();
  38594. // Trade as confirm on field leave
  38595. if (!mergedOpen && lastOp === 'input') {
  38596. triggerOpen(false);
  38597. triggerPartConfirm(null, true);
  38598. }
  38599. // Submit with complex picker
  38600. if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {
  38601. triggerOpen(true);
  38602. triggerPartConfirm();
  38603. }
  38604. }, [mergedOpen]);
  38605. // ====================== DevWarning ======================
  38606. if (true) {
  38607. var isIndexEmpty = function isIndexEmpty(index) {
  38608. return (
  38609. // Value is empty
  38610. !(value !== null && value !== void 0 && value[index]) &&
  38611. // DefaultValue is empty
  38612. !(defaultValue !== null && defaultValue !== void 0 && defaultValue[index])
  38613. );
  38614. };
  38615. if (disabled.some(function (fieldDisabled, index) {
  38616. return fieldDisabled && isIndexEmpty(index) && !allowEmpty[index];
  38617. })) {
  38618. (0,warning["default"])(false, '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.');
  38619. }
  38620. }
  38621. // ======================== Render ========================
  38622. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_context.Provider, {
  38623. value: context
  38624. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerTrigger, (0,esm_extends["default"])({}, pickTriggerProps(filledProps), {
  38625. popupElement: panel,
  38626. popupStyle: styles.popup,
  38627. popupClassName: classNames.popup
  38628. // Visible
  38629. ,
  38630. visible: mergedOpen,
  38631. onClose: onPopupClose
  38632. // Range
  38633. ,
  38634. range: true
  38635. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Selector_RangeSelector
  38636. // Shared
  38637. , (0,esm_extends["default"])({}, filledProps, {
  38638. // Ref
  38639. ref: selectorRef
  38640. // Icon
  38641. ,
  38642. suffixIcon: suffixIcon
  38643. // Active
  38644. ,
  38645. activeIndex: focused || mergedOpen ? activeIndex : null,
  38646. activeHelp: !!internalHoverValues,
  38647. allHelp: !!internalHoverValues && hoverSource === 'preset',
  38648. focused: focused,
  38649. onFocus: onSelectorFocus,
  38650. onBlur: onSelectorBlur,
  38651. onKeyDown: onSelectorKeyDown,
  38652. onSubmit: triggerPartConfirm
  38653. // Change
  38654. ,
  38655. value: hoverValues,
  38656. maskFormat: maskFormat,
  38657. onChange: onSelectorChange,
  38658. onInputChange: onSelectorInputChange
  38659. // Format
  38660. ,
  38661. format: formatList,
  38662. inputReadOnly: inputReadOnly
  38663. // Disabled
  38664. ,
  38665. disabled: disabled
  38666. // Open
  38667. ,
  38668. open: mergedOpen,
  38669. onOpenChange: triggerOpen
  38670. // Click
  38671. ,
  38672. onClick: onSelectorClick,
  38673. onClear: onSelectorClear
  38674. // Invalid
  38675. ,
  38676. invalid: submitInvalidates,
  38677. onInvalid: onSelectorInvalid
  38678. // Offset
  38679. ,
  38680. onActiveInfo: setActiveInfo
  38681. }))));
  38682. }
  38683. var RefRangePicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RangePicker);
  38684. if (true) {
  38685. RefRangePicker.displayName = 'RefRangePicker';
  38686. }
  38687. /* harmony default export */ var PickerInput_RangePicker = (RefRangePicker);
  38688. ;// ./node_modules/rc-picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js
  38689. function MultipleDates(props) {
  38690. var prefixCls = props.prefixCls,
  38691. value = props.value,
  38692. onRemove = props.onRemove,
  38693. _props$removeIcon = props.removeIcon,
  38694. removeIcon = _props$removeIcon === void 0 ? '×' : _props$removeIcon,
  38695. formatDate = props.formatDate,
  38696. disabled = props.disabled,
  38697. maxTagCount = props.maxTagCount,
  38698. placeholder = props.placeholder;
  38699. var selectorCls = "".concat(prefixCls, "-selector");
  38700. var selectionCls = "".concat(prefixCls, "-selection");
  38701. var overflowCls = "".concat(selectionCls, "-overflow");
  38702. // ========================= Item =========================
  38703. function renderSelector(content, onClose) {
  38704. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  38705. className: classnames_default()("".concat(selectionCls, "-item")),
  38706. title: typeof content === 'string' ? content : null
  38707. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  38708. className: "".concat(selectionCls, "-item-content")
  38709. }, content), !disabled && onClose && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  38710. onMouseDown: function onMouseDown(e) {
  38711. e.preventDefault();
  38712. },
  38713. onClick: onClose,
  38714. className: "".concat(selectionCls, "-item-remove")
  38715. }, removeIcon));
  38716. }
  38717. function renderItem(date) {
  38718. var displayLabel = formatDate(date);
  38719. var onClose = function onClose(event) {
  38720. if (event) event.stopPropagation();
  38721. onRemove(date);
  38722. };
  38723. return renderSelector(displayLabel, onClose);
  38724. }
  38725. // ========================= Rest =========================
  38726. function renderRest(omittedValues) {
  38727. var content = "+ ".concat(omittedValues.length, " ...");
  38728. return renderSelector(content);
  38729. }
  38730. // ======================== Render ========================
  38731. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  38732. className: selectorCls
  38733. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_overflow_es, {
  38734. prefixCls: overflowCls,
  38735. data: value,
  38736. renderItem: renderItem,
  38737. renderRest: renderRest
  38738. // suffix={inputNode}
  38739. ,
  38740. itemKey: function itemKey(date) {
  38741. return formatDate(date);
  38742. },
  38743. maxCount: maxTagCount
  38744. }), !value.length && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  38745. className: "".concat(prefixCls, "-selection-placeholder")
  38746. }, placeholder));
  38747. }
  38748. ;// ./node_modules/rc-picker/es/PickerInput/Selector/SingleSelector/index.js
  38749. var SingleSelector_excluded = ["id", "open", "prefix", "clearIcon", "suffixIcon", "activeHelp", "allHelp", "focused", "onFocus", "onBlur", "onKeyDown", "locale", "generateConfig", "placeholder", "className", "style", "onClick", "onClear", "internalPicker", "value", "onChange", "onSubmit", "onInputChange", "multiple", "maxTagCount", "format", "maskFormat", "preserveInvalidOnBlur", "onInvalid", "disabled", "invalid", "inputReadOnly", "direction", "onOpenChange", "onMouseDown", "required", "aria-required", "autoFocus", "tabIndex", "removeIcon"];
  38750. function SingleSelector_SingleSelector(props, ref) {
  38751. var id = props.id,
  38752. open = props.open,
  38753. prefix = props.prefix,
  38754. clearIcon = props.clearIcon,
  38755. suffixIcon = props.suffixIcon,
  38756. activeHelp = props.activeHelp,
  38757. allHelp = props.allHelp,
  38758. focused = props.focused,
  38759. onFocus = props.onFocus,
  38760. onBlur = props.onBlur,
  38761. onKeyDown = props.onKeyDown,
  38762. locale = props.locale,
  38763. generateConfig = props.generateConfig,
  38764. placeholder = props.placeholder,
  38765. className = props.className,
  38766. style = props.style,
  38767. onClick = props.onClick,
  38768. onClear = props.onClear,
  38769. internalPicker = props.internalPicker,
  38770. value = props.value,
  38771. onChange = props.onChange,
  38772. onSubmit = props.onSubmit,
  38773. onInputChange = props.onInputChange,
  38774. multiple = props.multiple,
  38775. maxTagCount = props.maxTagCount,
  38776. format = props.format,
  38777. maskFormat = props.maskFormat,
  38778. preserveInvalidOnBlur = props.preserveInvalidOnBlur,
  38779. onInvalid = props.onInvalid,
  38780. disabled = props.disabled,
  38781. invalid = props.invalid,
  38782. inputReadOnly = props.inputReadOnly,
  38783. direction = props.direction,
  38784. onOpenChange = props.onOpenChange,
  38785. _onMouseDown = props.onMouseDown,
  38786. required = props.required,
  38787. ariaRequired = props['aria-required'],
  38788. autoFocus = props.autoFocus,
  38789. tabIndex = props.tabIndex,
  38790. removeIcon = props.removeIcon,
  38791. restProps = (0,objectWithoutProperties["default"])(props, SingleSelector_excluded);
  38792. var rtl = direction === 'rtl';
  38793. // ======================== Prefix ========================
  38794. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PickerInput_context),
  38795. prefixCls = _React$useContext.prefixCls;
  38796. // ========================= Refs =========================
  38797. var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  38798. var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  38799. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  38800. return {
  38801. nativeElement: rootRef.current,
  38802. focus: function focus(options) {
  38803. var _inputRef$current;
  38804. (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus(options);
  38805. },
  38806. blur: function blur() {
  38807. var _inputRef$current2;
  38808. (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.blur();
  38809. }
  38810. };
  38811. });
  38812. // ======================== Props =========================
  38813. var rootProps = useRootProps(restProps);
  38814. // ======================== Change ========================
  38815. var onSingleChange = function onSingleChange(date) {
  38816. onChange([date]);
  38817. };
  38818. var onMultipleRemove = function onMultipleRemove(date) {
  38819. var nextValues = value.filter(function (oriDate) {
  38820. return oriDate && !isSame(generateConfig, locale, oriDate, date, internalPicker);
  38821. });
  38822. onChange(nextValues);
  38823. // When `open`, it means user is operating the
  38824. if (!open) {
  38825. onSubmit();
  38826. }
  38827. };
  38828. // ======================== Inputs ========================
  38829. var _useInputProps = useInputProps((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  38830. onChange: onSingleChange
  38831. }), function (_ref) {
  38832. var valueTexts = _ref.valueTexts;
  38833. return {
  38834. value: valueTexts[0] || '',
  38835. active: focused
  38836. };
  38837. }),
  38838. _useInputProps2 = (0,slicedToArray["default"])(_useInputProps, 2),
  38839. getInputProps = _useInputProps2[0],
  38840. getText = _useInputProps2[1];
  38841. // ======================== Clear =========================
  38842. var showClear = !!(clearIcon && value.length && !disabled);
  38843. // ======================= Multiple =======================
  38844. var selectorNode = multiple ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MultipleDates, {
  38845. prefixCls: prefixCls,
  38846. value: value,
  38847. onRemove: onMultipleRemove,
  38848. formatDate: getText,
  38849. maxTagCount: maxTagCount,
  38850. disabled: disabled,
  38851. removeIcon: removeIcon,
  38852. placeholder: placeholder
  38853. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", {
  38854. className: "".concat(prefixCls, "-multiple-input"),
  38855. value: value.map(getText).join(','),
  38856. ref: inputRef,
  38857. readOnly: true,
  38858. autoFocus: autoFocus,
  38859. tabIndex: tabIndex
  38860. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Icon_Icon, {
  38861. type: "suffix",
  38862. icon: suffixIcon
  38863. }), showClear && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ClearIcon, {
  38864. icon: clearIcon,
  38865. onClear: onClear
  38866. })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_Input, (0,esm_extends["default"])({
  38867. ref: inputRef
  38868. }, getInputProps(), {
  38869. autoFocus: autoFocus,
  38870. tabIndex: tabIndex,
  38871. suffixIcon: suffixIcon,
  38872. clearIcon: showClear && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ClearIcon, {
  38873. icon: clearIcon,
  38874. onClear: onClear
  38875. }),
  38876. showActiveCls: false
  38877. }));
  38878. // ======================== Render ========================
  38879. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, rootProps, {
  38880. className: classnames_default()(prefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-invalid"), invalid), "".concat(prefixCls, "-rtl"), rtl), className),
  38881. style: style,
  38882. ref: rootRef,
  38883. onClick: onClick
  38884. // Not lose current input focus
  38885. ,
  38886. onMouseDown: function onMouseDown(e) {
  38887. var _inputRef$current3;
  38888. var target = e.target;
  38889. if (target !== ((_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.inputElement)) {
  38890. e.preventDefault();
  38891. }
  38892. _onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(e);
  38893. }
  38894. }), prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  38895. className: "".concat(prefixCls, "-prefix")
  38896. }, prefix), selectorNode);
  38897. }
  38898. var RefSingleSelector = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SingleSelector_SingleSelector);
  38899. if (true) {
  38900. RefSingleSelector.displayName = 'SingleSelector';
  38901. }
  38902. /* harmony default export */ var PickerInput_Selector_SingleSelector = (RefSingleSelector);
  38903. ;// ./node_modules/rc-picker/es/PickerInput/SinglePicker.js
  38904. // TODO: isInvalidateDate with showTime.disabledTime should not provide `range` prop
  38905. /** Internal usage. For cross function get same aligned props */
  38906. function Picker(props, ref) {
  38907. // ========================= Prop =========================
  38908. var _useFilledProps = useFilledProps(props),
  38909. _useFilledProps2 = (0,slicedToArray["default"])(_useFilledProps, 6),
  38910. filledProps = _useFilledProps2[0],
  38911. internalPicker = _useFilledProps2[1],
  38912. complexPicker = _useFilledProps2[2],
  38913. formatList = _useFilledProps2[3],
  38914. maskFormat = _useFilledProps2[4],
  38915. isInvalidateDate = _useFilledProps2[5];
  38916. var _ref = filledProps,
  38917. prefixCls = _ref.prefixCls,
  38918. styles = _ref.styles,
  38919. classNames = _ref.classNames,
  38920. order = _ref.order,
  38921. defaultValue = _ref.defaultValue,
  38922. value = _ref.value,
  38923. needConfirm = _ref.needConfirm,
  38924. onChange = _ref.onChange,
  38925. onKeyDown = _ref.onKeyDown,
  38926. disabled = _ref.disabled,
  38927. disabledDate = _ref.disabledDate,
  38928. minDate = _ref.minDate,
  38929. maxDate = _ref.maxDate,
  38930. defaultOpen = _ref.defaultOpen,
  38931. open = _ref.open,
  38932. onOpenChange = _ref.onOpenChange,
  38933. locale = _ref.locale,
  38934. generateConfig = _ref.generateConfig,
  38935. picker = _ref.picker,
  38936. showNow = _ref.showNow,
  38937. showToday = _ref.showToday,
  38938. showTime = _ref.showTime,
  38939. mode = _ref.mode,
  38940. onPanelChange = _ref.onPanelChange,
  38941. onCalendarChange = _ref.onCalendarChange,
  38942. onOk = _ref.onOk,
  38943. multiple = _ref.multiple,
  38944. defaultPickerValue = _ref.defaultPickerValue,
  38945. pickerValue = _ref.pickerValue,
  38946. onPickerValueChange = _ref.onPickerValueChange,
  38947. inputReadOnly = _ref.inputReadOnly,
  38948. suffixIcon = _ref.suffixIcon,
  38949. removeIcon = _ref.removeIcon,
  38950. onFocus = _ref.onFocus,
  38951. onBlur = _ref.onBlur,
  38952. presets = _ref.presets,
  38953. components = _ref.components,
  38954. cellRender = _ref.cellRender,
  38955. dateRender = _ref.dateRender,
  38956. monthCellRender = _ref.monthCellRender,
  38957. onClick = _ref.onClick;
  38958. // ========================= Refs =========================
  38959. var selectorRef = usePickerRef(ref);
  38960. // ========================= Util =========================
  38961. function pickerParam(values) {
  38962. if (values === null) {
  38963. return null;
  38964. }
  38965. return multiple ? values : values[0];
  38966. }
  38967. var toggleDates = useToggleDates(generateConfig, locale, internalPicker);
  38968. // ========================= Open =========================
  38969. var _useOpen = useOpen(open, defaultOpen, [disabled], onOpenChange),
  38970. _useOpen2 = (0,slicedToArray["default"])(_useOpen, 2),
  38971. mergedOpen = _useOpen2[0],
  38972. triggerOpen = _useOpen2[1];
  38973. // ======================= Calendar =======================
  38974. var onInternalCalendarChange = function onInternalCalendarChange(dates, dateStrings, info) {
  38975. if (onCalendarChange) {
  38976. var filteredInfo = (0,objectSpread2["default"])({}, info);
  38977. delete filteredInfo.range;
  38978. onCalendarChange(pickerParam(dates), pickerParam(dateStrings), filteredInfo);
  38979. }
  38980. };
  38981. var onInternalOk = function onInternalOk(dates) {
  38982. onOk === null || onOk === void 0 || onOk(pickerParam(dates));
  38983. };
  38984. // ======================== Values ========================
  38985. var _useInnerValue = useInnerValue(generateConfig, locale, formatList, false, order, defaultValue, value, onInternalCalendarChange, onInternalOk),
  38986. _useInnerValue2 = (0,slicedToArray["default"])(_useInnerValue, 5),
  38987. mergedValue = _useInnerValue2[0],
  38988. setInnerValue = _useInnerValue2[1],
  38989. getCalendarValue = _useInnerValue2[2],
  38990. triggerCalendarChange = _useInnerValue2[3],
  38991. triggerOk = _useInnerValue2[4];
  38992. var calendarValue = getCalendarValue();
  38993. // ======================== Active ========================
  38994. // In SinglePicker, we will always get `activeIndex` is 0.
  38995. var _useRangeActive = useRangeActive([disabled]),
  38996. _useRangeActive2 = (0,slicedToArray["default"])(_useRangeActive, 4),
  38997. focused = _useRangeActive2[0],
  38998. triggerFocus = _useRangeActive2[1],
  38999. lastOperation = _useRangeActive2[2],
  39000. activeIndex = _useRangeActive2[3];
  39001. var onSharedFocus = function onSharedFocus(event) {
  39002. triggerFocus(true);
  39003. onFocus === null || onFocus === void 0 || onFocus(event, {});
  39004. };
  39005. var onSharedBlur = function onSharedBlur(event) {
  39006. triggerFocus(false);
  39007. onBlur === null || onBlur === void 0 || onBlur(event, {});
  39008. };
  39009. // ========================= Mode =========================
  39010. var _useMergedState = (0,rc_util_es.useMergedState)(picker, {
  39011. value: mode
  39012. }),
  39013. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  39014. mergedMode = _useMergedState2[0],
  39015. setMode = _useMergedState2[1];
  39016. /** Extends from `mergedMode` to patch `datetime` mode */
  39017. var internalMode = mergedMode === 'date' && showTime ? 'datetime' : mergedMode;
  39018. // ======================= Show Now =======================
  39019. var mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday);
  39020. // ======================== Value =========================
  39021. var onInternalChange = onChange && function (dates, dateStrings) {
  39022. onChange(pickerParam(dates), pickerParam(dateStrings));
  39023. };
  39024. var _useRangeValue = useRangeValue((0,objectSpread2["default"])((0,objectSpread2["default"])({}, filledProps), {}, {
  39025. onChange: onInternalChange
  39026. }), mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, [],
  39027. //disabled,
  39028. formatList, focused, mergedOpen, isInvalidateDate),
  39029. _useRangeValue2 = (0,slicedToArray["default"])(_useRangeValue, 2),
  39030. /** Trigger `onChange` directly without check `disabledDate` */
  39031. triggerSubmitChange = _useRangeValue2[1];
  39032. // ======================= Validate =======================
  39033. var _useFieldsInvalidate = useFieldsInvalidate(calendarValue, isInvalidateDate),
  39034. _useFieldsInvalidate2 = (0,slicedToArray["default"])(_useFieldsInvalidate, 2),
  39035. submitInvalidates = _useFieldsInvalidate2[0],
  39036. onSelectorInvalid = _useFieldsInvalidate2[1];
  39037. var submitInvalidate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  39038. return submitInvalidates.some(function (invalidated) {
  39039. return invalidated;
  39040. });
  39041. }, [submitInvalidates]);
  39042. // ===================== Picker Value =====================
  39043. // Proxy to single pickerValue
  39044. var onInternalPickerValueChange = function onInternalPickerValueChange(dates, info) {
  39045. if (onPickerValueChange) {
  39046. var cleanInfo = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, info), {}, {
  39047. mode: info.mode[0]
  39048. });
  39049. delete cleanInfo.range;
  39050. onPickerValueChange(dates[0], cleanInfo);
  39051. }
  39052. };
  39053. var _useRangePickerValue = useRangePickerValue(generateConfig, locale, calendarValue, [mergedMode], mergedOpen, activeIndex, internalPicker, false,
  39054. // multiplePanel,
  39055. defaultPickerValue, pickerValue, miscUtil_toArray(showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue), onInternalPickerValueChange, minDate, maxDate),
  39056. _useRangePickerValue2 = (0,slicedToArray["default"])(_useRangePickerValue, 2),
  39057. currentPickerValue = _useRangePickerValue2[0],
  39058. setCurrentPickerValue = _useRangePickerValue2[1];
  39059. // >>> Mode need wait for `pickerValue`
  39060. var triggerModeChange = (0,rc_util_es.useEvent)(function (nextPickerValue, nextMode, triggerEvent) {
  39061. setMode(nextMode);
  39062. // Compatible with `onPanelChange`
  39063. if (onPanelChange && triggerEvent !== false) {
  39064. var lastPickerValue = nextPickerValue || calendarValue[calendarValue.length - 1];
  39065. onPanelChange(lastPickerValue, nextMode);
  39066. }
  39067. });
  39068. // ======================== Submit ========================
  39069. /**
  39070. * Different with RangePicker, confirm should check `multiple` logic.
  39071. * This will never provide `date` instead.
  39072. */
  39073. var triggerConfirm = function triggerConfirm() {
  39074. triggerSubmitChange(getCalendarValue());
  39075. triggerOpen(false, {
  39076. force: true
  39077. });
  39078. };
  39079. // ======================== Click =========================
  39080. var onSelectorClick = function onSelectorClick(event) {
  39081. if (!disabled && !selectorRef.current.nativeElement.contains(document.activeElement)) {
  39082. // Click to focus the enabled input
  39083. selectorRef.current.focus();
  39084. }
  39085. triggerOpen(true);
  39086. onClick === null || onClick === void 0 || onClick(event);
  39087. };
  39088. var onSelectorClear = function onSelectorClear() {
  39089. triggerSubmitChange(null);
  39090. triggerOpen(false, {
  39091. force: true
  39092. });
  39093. };
  39094. // ======================== Hover =========================
  39095. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  39096. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  39097. hoverSource = _React$useState2[0],
  39098. setHoverSource = _React$useState2[1];
  39099. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  39100. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  39101. internalHoverValue = _React$useState4[0],
  39102. setInternalHoverValue = _React$useState4[1];
  39103. var hoverValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  39104. var values = [internalHoverValue].concat((0,toConsumableArray["default"])(calendarValue)).filter(function (date) {
  39105. return date;
  39106. });
  39107. return multiple ? values : values.slice(0, 1);
  39108. }, [calendarValue, internalHoverValue, multiple]);
  39109. // Selector values is different with RangePicker
  39110. // which can not use `hoverValue` directly
  39111. var selectorValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  39112. if (!multiple && internalHoverValue) {
  39113. return [internalHoverValue];
  39114. }
  39115. return calendarValue.filter(function (date) {
  39116. return date;
  39117. });
  39118. }, [calendarValue, internalHoverValue, multiple]);
  39119. // Clean up `internalHoverValues` when closed
  39120. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  39121. if (!mergedOpen) {
  39122. setInternalHoverValue(null);
  39123. }
  39124. }, [mergedOpen]);
  39125. // ========================================================
  39126. // == Panels ==
  39127. // ========================================================
  39128. // ======================= Presets ========================
  39129. var presetList = usePresets(presets);
  39130. var onPresetHover = function onPresetHover(nextValue) {
  39131. setInternalHoverValue(nextValue);
  39132. setHoverSource('preset');
  39133. };
  39134. // TODO: handle this
  39135. var onPresetSubmit = function onPresetSubmit(nextValue) {
  39136. var nextCalendarValues = multiple ? toggleDates(getCalendarValue(), nextValue) : [nextValue];
  39137. var passed = triggerSubmitChange(nextCalendarValues);
  39138. if (passed && !multiple) {
  39139. triggerOpen(false, {
  39140. force: true
  39141. });
  39142. }
  39143. };
  39144. var onNow = function onNow(now) {
  39145. onPresetSubmit(now);
  39146. };
  39147. // ======================== Panel =========================
  39148. var onPanelHover = function onPanelHover(date) {
  39149. setInternalHoverValue(date);
  39150. setHoverSource('cell');
  39151. };
  39152. // >>> Focus
  39153. var onPanelFocus = function onPanelFocus(event) {
  39154. triggerOpen(true);
  39155. onSharedFocus(event);
  39156. };
  39157. // >>> Calendar
  39158. var onPanelSelect = function onPanelSelect(date) {
  39159. lastOperation('panel');
  39160. // Not change values if multiple and current panel is to match with picker
  39161. if (multiple && internalMode !== picker) {
  39162. return;
  39163. }
  39164. var nextValues = multiple ? toggleDates(getCalendarValue(), date) : [date];
  39165. // Only trigger calendar event but not update internal `calendarValue` state
  39166. triggerCalendarChange(nextValues);
  39167. // >>> Trigger next active if !needConfirm
  39168. // Fully logic check `useRangeValue` hook
  39169. if (!needConfirm && !complexPicker && internalPicker === internalMode) {
  39170. triggerConfirm();
  39171. }
  39172. };
  39173. // >>> Close
  39174. var onPopupClose = function onPopupClose() {
  39175. // Close popup
  39176. triggerOpen(false);
  39177. };
  39178. // >>> cellRender
  39179. var onInternalCellRender = useCellRender(cellRender, dateRender, monthCellRender);
  39180. // >>> invalid
  39181. var panelProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  39182. var domProps = (0,pickAttrs["default"])(filledProps, false);
  39183. var restProps = (0,omit["default"])(filledProps, [].concat((0,toConsumableArray["default"])(Object.keys(domProps)), ['onChange', 'onCalendarChange', 'style', 'className', 'onPanelChange']));
  39184. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, restProps), {}, {
  39185. multiple: filledProps.multiple
  39186. });
  39187. }, [filledProps]);
  39188. // >>> Render
  39189. var panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Popup_Popup, (0,esm_extends["default"])({}, panelProps, {
  39190. showNow: mergedShowNow,
  39191. showTime: showTime
  39192. // Disabled
  39193. ,
  39194. disabledDate: disabledDate
  39195. // Focus
  39196. ,
  39197. onFocus: onPanelFocus,
  39198. onBlur: onSharedBlur
  39199. // Mode
  39200. ,
  39201. picker: picker,
  39202. mode: mergedMode,
  39203. internalMode: internalMode,
  39204. onPanelChange: triggerModeChange
  39205. // Value
  39206. ,
  39207. format: maskFormat,
  39208. value: calendarValue,
  39209. isInvalid: isInvalidateDate,
  39210. onChange: null,
  39211. onSelect: onPanelSelect
  39212. // PickerValue
  39213. ,
  39214. pickerValue: currentPickerValue,
  39215. defaultOpenValue: showTime === null || showTime === void 0 ? void 0 : showTime.defaultOpenValue,
  39216. onPickerValueChange: setCurrentPickerValue
  39217. // Hover
  39218. ,
  39219. hoverValue: hoverValues,
  39220. onHover: onPanelHover
  39221. // Submit
  39222. ,
  39223. needConfirm: needConfirm,
  39224. onSubmit: triggerConfirm,
  39225. onOk: triggerOk
  39226. // Preset
  39227. ,
  39228. presets: presetList,
  39229. onPresetHover: onPresetHover,
  39230. onPresetSubmit: onPresetSubmit,
  39231. onNow: onNow
  39232. // Render
  39233. ,
  39234. cellRender: onInternalCellRender
  39235. }));
  39236. // ========================================================
  39237. // == Selector ==
  39238. // ========================================================
  39239. // ======================== Change ========================
  39240. var onSelectorChange = function onSelectorChange(date) {
  39241. triggerCalendarChange(date);
  39242. };
  39243. var onSelectorInputChange = function onSelectorInputChange() {
  39244. lastOperation('input');
  39245. };
  39246. // ======================= Selector =======================
  39247. var onSelectorFocus = function onSelectorFocus(event) {
  39248. lastOperation('input');
  39249. triggerOpen(true, {
  39250. inherit: true
  39251. });
  39252. // setActiveIndex(index);
  39253. onSharedFocus(event);
  39254. };
  39255. var onSelectorBlur = function onSelectorBlur(event) {
  39256. triggerOpen(false);
  39257. onSharedBlur(event);
  39258. };
  39259. var onSelectorKeyDown = function onSelectorKeyDown(event, preventDefault) {
  39260. if (event.key === 'Tab') {
  39261. triggerConfirm();
  39262. }
  39263. onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, preventDefault);
  39264. };
  39265. // ======================= Context ========================
  39266. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  39267. return {
  39268. prefixCls: prefixCls,
  39269. locale: locale,
  39270. generateConfig: generateConfig,
  39271. button: components.button,
  39272. input: components.input
  39273. };
  39274. }, [prefixCls, locale, generateConfig, components.button, components.input]);
  39275. // ======================== Effect ========================
  39276. // >>> Mode
  39277. // Reset for every active
  39278. (0,useLayoutEffect["default"])(function () {
  39279. if (mergedOpen && activeIndex !== undefined) {
  39280. // Legacy compatible. This effect update should not trigger `onPanelChange`
  39281. triggerModeChange(null, picker, false);
  39282. }
  39283. }, [mergedOpen, activeIndex, picker]);
  39284. // >>> For complex picker, we need check if need to focus next one
  39285. (0,useLayoutEffect["default"])(function () {
  39286. var lastOp = lastOperation();
  39287. // Trade as confirm on field leave
  39288. if (!mergedOpen && lastOp === 'input') {
  39289. triggerOpen(false);
  39290. triggerConfirm();
  39291. }
  39292. // Submit with complex picker
  39293. if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {
  39294. triggerConfirm();
  39295. }
  39296. }, [mergedOpen]);
  39297. // ======================== Render ========================
  39298. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_context.Provider, {
  39299. value: context
  39300. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerTrigger, (0,esm_extends["default"])({}, pickTriggerProps(filledProps), {
  39301. popupElement: panel,
  39302. popupStyle: styles.popup,
  39303. popupClassName: classNames.popup
  39304. // Visible
  39305. ,
  39306. visible: mergedOpen,
  39307. onClose: onPopupClose
  39308. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_Selector_SingleSelector
  39309. // Shared
  39310. , (0,esm_extends["default"])({}, filledProps, {
  39311. // Ref
  39312. ref: selectorRef
  39313. // Icon
  39314. ,
  39315. suffixIcon: suffixIcon,
  39316. removeIcon: removeIcon
  39317. // Active
  39318. ,
  39319. activeHelp: !!internalHoverValue,
  39320. allHelp: !!internalHoverValue && hoverSource === 'preset',
  39321. focused: focused,
  39322. onFocus: onSelectorFocus,
  39323. onBlur: onSelectorBlur,
  39324. onKeyDown: onSelectorKeyDown,
  39325. onSubmit: triggerConfirm
  39326. // Change
  39327. ,
  39328. value: selectorValues,
  39329. maskFormat: maskFormat,
  39330. onChange: onSelectorChange,
  39331. onInputChange: onSelectorInputChange,
  39332. internalPicker: internalPicker
  39333. // Format
  39334. ,
  39335. format: formatList,
  39336. inputReadOnly: inputReadOnly
  39337. // Disabled
  39338. ,
  39339. disabled: disabled
  39340. // Open
  39341. ,
  39342. open: mergedOpen,
  39343. onOpenChange: triggerOpen
  39344. // Click
  39345. ,
  39346. onClick: onSelectorClick,
  39347. onClear: onSelectorClear
  39348. // Invalid
  39349. ,
  39350. invalid: submitInvalidate,
  39351. onInvalid: function onInvalid(invalid) {
  39352. // Only `single` mode support type date.
  39353. // `multiple` mode can not typing.
  39354. onSelectorInvalid(invalid, 0);
  39355. }
  39356. }))));
  39357. }
  39358. var RefPicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Picker);
  39359. if (true) {
  39360. RefPicker.displayName = 'RefPicker';
  39361. }
  39362. /* harmony default export */ var SinglePicker = (RefPicker);
  39363. ;// ./node_modules/rc-picker/es/index.js
  39364. /**
  39365. * What's new?
  39366. * - Common
  39367. * - [Break] Support special year format, all the year will follow the locale config.
  39368. * - Blur all of field will trigger `onChange` if validate
  39369. * - Support `preserveInvalidOnBlur` to not to clean input if invalid and remove `changeOnBlur`
  39370. * - `pickerValue` is now full controlled
  39371. * - `defaultPickerValue` will take effect on every field active with popup opening.
  39372. * - [Break] clear button return the event with `onClick`
  39373. *
  39374. * - Locale
  39375. * - Remove `dateFormat` since it's never used
  39376. * - Remove `dateTimeFormat` since it's never used
  39377. *
  39378. * - Picker
  39379. * - TimePicker support `changeOnScroll`
  39380. * - TimePicker support `millisecond`
  39381. * - Support cellMeridiemFormat for AM/PM
  39382. * - Get correct `disabledHours` when set `use12Hours`
  39383. * - Support `showWeek`
  39384. *
  39385. * - RangePicker
  39386. * - [Break] RangePicker is now not limit the range of clicked field.
  39387. * - Trigger `onCalendarChange` when type correct
  39388. * - [Break] Not order `value` if given `value` is wrong order.
  39389. * - Hover `presets` will show date in input field.
  39390. * - [Break] RangePicker go to end field, `pickerValue` will follow the start field if not controlled.
  39391. */
  39392. /* harmony default export */ var rc_picker_es = (SinglePicker);
  39393. ;// ./components/radio/context.ts
  39394. const RadioGroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  39395. const RadioGroupContextProvider = RadioGroupContext.Provider;
  39396. /* harmony default export */ var radio_context = (RadioGroupContext);
  39397. const RadioOptionTypeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  39398. const RadioOptionTypeContextProvider = RadioOptionTypeContext.Provider;
  39399. ;// ./node_modules/rc-checkbox/es/index.js
  39400. var rc_checkbox_es_excluded = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"];
  39401. var Checkbox = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
  39402. var _props$prefixCls = props.prefixCls,
  39403. prefixCls = _props$prefixCls === void 0 ? 'rc-checkbox' : _props$prefixCls,
  39404. className = props.className,
  39405. style = props.style,
  39406. checked = props.checked,
  39407. disabled = props.disabled,
  39408. _props$defaultChecked = props.defaultChecked,
  39409. defaultChecked = _props$defaultChecked === void 0 ? false : _props$defaultChecked,
  39410. _props$type = props.type,
  39411. type = _props$type === void 0 ? 'checkbox' : _props$type,
  39412. title = props.title,
  39413. onChange = props.onChange,
  39414. inputProps = (0,objectWithoutProperties["default"])(props, rc_checkbox_es_excluded);
  39415. var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  39416. var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  39417. var _useMergedState = (0,useMergedState["default"])(defaultChecked, {
  39418. value: checked
  39419. }),
  39420. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  39421. rawValue = _useMergedState2[0],
  39422. setRawValue = _useMergedState2[1];
  39423. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
  39424. return {
  39425. focus: function focus(options) {
  39426. var _inputRef$current;
  39427. (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus(options);
  39428. },
  39429. blur: function blur() {
  39430. var _inputRef$current2;
  39431. (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.blur();
  39432. },
  39433. input: inputRef.current,
  39434. nativeElement: holderRef.current
  39435. };
  39436. });
  39437. var classString = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-checked"), rawValue), "".concat(prefixCls, "-disabled"), disabled));
  39438. var handleChange = function handleChange(e) {
  39439. if (disabled) {
  39440. return;
  39441. }
  39442. if (!('checked' in props)) {
  39443. setRawValue(e.target.checked);
  39444. }
  39445. onChange === null || onChange === void 0 || onChange({
  39446. target: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  39447. type: type,
  39448. checked: e.target.checked
  39449. }),
  39450. stopPropagation: function stopPropagation() {
  39451. e.stopPropagation();
  39452. },
  39453. preventDefault: function preventDefault() {
  39454. e.preventDefault();
  39455. },
  39456. nativeEvent: e.nativeEvent
  39457. });
  39458. };
  39459. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  39460. className: classString,
  39461. title: title,
  39462. style: style,
  39463. ref: holderRef
  39464. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", (0,esm_extends["default"])({}, inputProps, {
  39465. className: "".concat(prefixCls, "-input"),
  39466. ref: inputRef,
  39467. onChange: handleChange,
  39468. disabled: disabled,
  39469. checked: !!rawValue,
  39470. type: type
  39471. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  39472. className: "".concat(prefixCls, "-inner")
  39473. }));
  39474. });
  39475. /* harmony default export */ var rc_checkbox_es = (Checkbox);
  39476. ;// ./components/checkbox/useBubbleLock.ts
  39477. /**
  39478. * When click on the label,
  39479. * the event will be stopped to prevent the label from being clicked twice.
  39480. * label click -> input click -> label click again
  39481. */
  39482. function useBubbleLock(onOriginInputClick) {
  39483. const labelClickLockRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  39484. const clearLock = () => {
  39485. raf["default"].cancel(labelClickLockRef.current);
  39486. labelClickLockRef.current = null;
  39487. };
  39488. const onLabelClick = () => {
  39489. clearLock();
  39490. labelClickLockRef.current = (0,raf["default"])(() => {
  39491. labelClickLockRef.current = null;
  39492. });
  39493. };
  39494. const onInputClick = e => {
  39495. if (labelClickLockRef.current) {
  39496. e.stopPropagation();
  39497. clearLock();
  39498. }
  39499. onOriginInputClick === null || onOriginInputClick === void 0 ? void 0 : onOriginInputClick(e);
  39500. };
  39501. return [onLabelClick, onInputClick];
  39502. }
  39503. // EXTERNAL MODULE: ./components/radio/style/index.ts
  39504. var radio_style = __webpack_require__("./components/radio/style/index.ts");
  39505. ;// ./components/radio/radio.tsx
  39506. var radio_rest = undefined && undefined.__rest || function (s, e) {
  39507. var t = {};
  39508. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  39509. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  39510. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  39511. }
  39512. return t;
  39513. };
  39514. const InternalRadio = (props, ref) => {
  39515. var _a, _b;
  39516. const groupContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(radio_context);
  39517. const radioOptionTypeContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(RadioOptionTypeContext);
  39518. const {
  39519. getPrefixCls,
  39520. direction,
  39521. radio
  39522. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  39523. const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  39524. const mergedRef = (0,es_ref.composeRef)(ref, innerRef);
  39525. const {
  39526. isFormItemInput
  39527. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  39528. if (true) {
  39529. const warning = (0,_util_warning.devUseWarning)('Radio');
  39530. true ? warning(!('optionType' in props), 'usage', '`optionType` is only support in Radio.Group.') : 0;
  39531. }
  39532. const onChange = e => {
  39533. var _a, _b;
  39534. (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);
  39535. (_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e);
  39536. };
  39537. const {
  39538. prefixCls: customizePrefixCls,
  39539. className,
  39540. rootClassName,
  39541. children,
  39542. style,
  39543. title
  39544. } = props,
  39545. restProps = radio_rest(props, ["prefixCls", "className", "rootClassName", "children", "style", "title"]);
  39546. const radioPrefixCls = getPrefixCls('radio', customizePrefixCls);
  39547. const isButtonType = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === 'button';
  39548. const prefixCls = isButtonType ? `${radioPrefixCls}-button` : radioPrefixCls;
  39549. // Style
  39550. const rootCls = hooks_useCSSVarCls(radioPrefixCls);
  39551. const [wrapCSSVar, hashId, cssVarCls] = (0,radio_style["default"])(radioPrefixCls, rootCls);
  39552. const radioProps = Object.assign({}, restProps);
  39553. // ===================== Disabled =====================
  39554. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  39555. if (groupContext) {
  39556. radioProps.name = groupContext.name;
  39557. radioProps.onChange = onChange;
  39558. radioProps.checked = props.value === groupContext.value;
  39559. radioProps.disabled = (_a = radioProps.disabled) !== null && _a !== void 0 ? _a : groupContext.disabled;
  39560. }
  39561. radioProps.disabled = (_b = radioProps.disabled) !== null && _b !== void 0 ? _b : disabled;
  39562. const wrapperClassString = classnames_default()(`${prefixCls}-wrapper`, {
  39563. [`${prefixCls}-wrapper-checked`]: radioProps.checked,
  39564. [`${prefixCls}-wrapper-disabled`]: radioProps.disabled,
  39565. [`${prefixCls}-wrapper-rtl`]: direction === 'rtl',
  39566. [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput,
  39567. [`${prefixCls}-wrapper-block`]: !!(groupContext === null || groupContext === void 0 ? void 0 : groupContext.block)
  39568. }, radio === null || radio === void 0 ? void 0 : radio.className, className, rootClassName, hashId, cssVarCls, rootCls);
  39569. // ============================ Event Lock ============================
  39570. const [onLabelClick, onInputClick] = useBubbleLock(radioProps.onClick);
  39571. // ============================== Render ==============================
  39572. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
  39573. component: "Radio",
  39574. disabled: radioProps.disabled
  39575. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
  39576. className: wrapperClassString,
  39577. style: Object.assign(Object.assign({}, radio === null || radio === void 0 ? void 0 : radio.style), style),
  39578. onMouseEnter: props.onMouseEnter,
  39579. onMouseLeave: props.onMouseLeave,
  39580. title: title,
  39581. onClick: onLabelClick
  39582. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_checkbox_es, Object.assign({}, radioProps, {
  39583. className: classnames_default()(radioProps.className, {
  39584. [TARGET_CLS]: !isButtonType
  39585. }),
  39586. type: "radio",
  39587. prefixCls: prefixCls,
  39588. ref: mergedRef,
  39589. onClick: onInputClick
  39590. })), children !== undefined ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  39591. className: `${prefixCls}-label`
  39592. }, children) : null)));
  39593. };
  39594. const Radio = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalRadio);
  39595. if (true) {
  39596. Radio.displayName = 'Radio';
  39597. }
  39598. /* harmony default export */ var radio_radio = (Radio);
  39599. ;// ./components/form/util.ts
  39600. // form item name black list. in form ,you can use form.id get the form item element.
  39601. // use object hasOwnProperty will get better performance if black list is longer.
  39602. const formItemNameBlackList = ['parentNode'];
  39603. // default form item id prefix.
  39604. const defaultItemNamePrefixCls = 'form_item';
  39605. function util_toArray(candidate) {
  39606. if (candidate === undefined || candidate === false) return [];
  39607. return Array.isArray(candidate) ? candidate : [candidate];
  39608. }
  39609. function getFieldId(namePath, formName) {
  39610. if (!namePath.length) {
  39611. return undefined;
  39612. }
  39613. const mergedId = namePath.join('_');
  39614. if (formName) {
  39615. return `${formName}_${mergedId}`;
  39616. }
  39617. const isIllegalName = formItemNameBlackList.includes(mergedId);
  39618. return isIllegalName ? `${defaultItemNamePrefixCls}_${mergedId}` : mergedId;
  39619. }
  39620. /**
  39621. * Get merged status by meta or passed `validateStatus`.
  39622. */
  39623. function getStatus(errors, warnings, meta, defaultValidateStatus, hasFeedback, validateStatus) {
  39624. let status = defaultValidateStatus;
  39625. if (validateStatus !== undefined) {
  39626. status = validateStatus;
  39627. } else if (meta.validating) {
  39628. status = 'validating';
  39629. } else if (errors.length) {
  39630. status = 'error';
  39631. } else if (warnings.length) {
  39632. status = 'warning';
  39633. } else if (meta.touched || hasFeedback && meta.validated) {
  39634. // success feedback should display when pass hasFeedback prop and current value is valid value
  39635. status = 'success';
  39636. }
  39637. return status;
  39638. }
  39639. ;// ./components/form/hooks/useForm.ts
  39640. var useForm_rest = undefined && undefined.__rest || function (s, e) {
  39641. var t = {};
  39642. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  39643. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  39644. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  39645. }
  39646. return t;
  39647. };
  39648. function toNamePathStr(name) {
  39649. const namePath = util_toArray(name);
  39650. return namePath.join('_');
  39651. }
  39652. function getFieldDOMNode(name, wrapForm) {
  39653. const field = wrapForm.getFieldInstance(name);
  39654. const fieldDom = (0,findDOMNode.getDOM)(field);
  39655. if (fieldDom) {
  39656. return fieldDom;
  39657. }
  39658. const fieldId = getFieldId(util_toArray(name), wrapForm.__INTERNAL__.name);
  39659. if (fieldId) {
  39660. return document.getElementById(fieldId);
  39661. }
  39662. }
  39663. function useForm_useForm(form) {
  39664. const [rcForm] = es_useForm();
  39665. const itemsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  39666. const wrapForm = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => form !== null && form !== void 0 ? form : Object.assign(Object.assign({}, rcForm), {
  39667. __INTERNAL__: {
  39668. itemRef: name => node => {
  39669. const namePathStr = toNamePathStr(name);
  39670. if (node) {
  39671. itemsRef.current[namePathStr] = node;
  39672. } else {
  39673. delete itemsRef.current[namePathStr];
  39674. }
  39675. }
  39676. },
  39677. scrollToField: (name, options = {}) => {
  39678. const {
  39679. focus
  39680. } = options,
  39681. restOpt = useForm_rest(options, ["focus"]);
  39682. const node = getFieldDOMNode(name, wrapForm);
  39683. if (node) {
  39684. dist_e(node, Object.assign({
  39685. scrollMode: 'if-needed',
  39686. block: 'nearest'
  39687. }, restOpt));
  39688. // Focus if scroll success
  39689. if (focus) {
  39690. wrapForm.focusField(name);
  39691. }
  39692. }
  39693. },
  39694. focusField: name => {
  39695. var _a, _b;
  39696. const itemRef = wrapForm.getFieldInstance(name);
  39697. if (typeof (itemRef === null || itemRef === void 0 ? void 0 : itemRef.focus) === 'function') {
  39698. itemRef.focus();
  39699. } else {
  39700. (_b = (_a = getFieldDOMNode(name, wrapForm)) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
  39701. }
  39702. },
  39703. getFieldInstance: name => {
  39704. const namePathStr = toNamePathStr(name);
  39705. return itemsRef.current[namePathStr];
  39706. }
  39707. }), [form, rcForm]);
  39708. return [wrapForm];
  39709. }
  39710. ;// ./components/radio/group.tsx
  39711. const RadioGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  39712. const {
  39713. getPrefixCls,
  39714. direction
  39715. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  39716. const {
  39717. name: formItemName
  39718. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  39719. const defaultName = hooks_useId(toNamePathStr(formItemName));
  39720. const {
  39721. prefixCls: customizePrefixCls,
  39722. className,
  39723. rootClassName,
  39724. options,
  39725. buttonStyle = 'outline',
  39726. disabled,
  39727. children,
  39728. size: customizeSize,
  39729. style,
  39730. id,
  39731. optionType,
  39732. name = defaultName,
  39733. defaultValue,
  39734. value: customizedValue,
  39735. block = false,
  39736. onChange,
  39737. onMouseEnter,
  39738. onMouseLeave,
  39739. onFocus,
  39740. onBlur
  39741. } = props;
  39742. const [value, setValue] = (0,useMergedState["default"])(defaultValue, {
  39743. value: customizedValue
  39744. });
  39745. const onRadioChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(event => {
  39746. const lastValue = value;
  39747. const val = event.target.value;
  39748. if (!('value' in props)) {
  39749. setValue(val);
  39750. }
  39751. if (val !== lastValue) {
  39752. onChange === null || onChange === void 0 ? void 0 : onChange(event);
  39753. }
  39754. }, [value, setValue, onChange]);
  39755. const prefixCls = getPrefixCls('radio', customizePrefixCls);
  39756. const groupPrefixCls = `${prefixCls}-group`;
  39757. // Style
  39758. const rootCls = hooks_useCSSVarCls(prefixCls);
  39759. const [wrapCSSVar, hashId, cssVarCls] = (0,radio_style["default"])(prefixCls, rootCls);
  39760. let childrenToRender = children;
  39761. // 如果存在 options, 优先使用
  39762. if (options && options.length > 0) {
  39763. childrenToRender = options.map(option => {
  39764. if (typeof option === 'string' || typeof option === 'number') {
  39765. // 此处类型自动推导为 string
  39766. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radio_radio, {
  39767. key: option.toString(),
  39768. prefixCls: prefixCls,
  39769. disabled: disabled,
  39770. value: option,
  39771. checked: value === option
  39772. }, option);
  39773. }
  39774. // 此处类型自动推导为 { label: string value: string }
  39775. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radio_radio, {
  39776. key: `radio-group-value-options-${option.value}`,
  39777. prefixCls: prefixCls,
  39778. disabled: option.disabled || disabled,
  39779. value: option.value,
  39780. checked: value === option.value,
  39781. title: option.title,
  39782. style: option.style,
  39783. className: option.className,
  39784. id: option.id,
  39785. required: option.required
  39786. }, option.label);
  39787. });
  39788. }
  39789. const mergedSize = (0,useSize["default"])(customizeSize);
  39790. const classString = classnames_default()(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {
  39791. [`${groupPrefixCls}-${mergedSize}`]: mergedSize,
  39792. [`${groupPrefixCls}-rtl`]: direction === 'rtl',
  39793. [`${groupPrefixCls}-block`]: block
  39794. }, className, rootClassName, hashId, cssVarCls, rootCls);
  39795. const memoizedValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  39796. onChange: onRadioChange,
  39797. value,
  39798. disabled,
  39799. name,
  39800. optionType,
  39801. block
  39802. }), [onRadioChange, value, disabled, name, optionType, block]);
  39803. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, (0,pickAttrs["default"])(props, {
  39804. aria: true,
  39805. data: true
  39806. }), {
  39807. className: classString,
  39808. style: style,
  39809. onMouseEnter: onMouseEnter,
  39810. onMouseLeave: onMouseLeave,
  39811. onFocus: onFocus,
  39812. onBlur: onBlur,
  39813. id: id,
  39814. ref: ref
  39815. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RadioGroupContextProvider, {
  39816. value: memoizedValue
  39817. }, childrenToRender)));
  39818. });
  39819. /* harmony default export */ var group = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(RadioGroup));
  39820. ;// ./components/radio/radioButton.tsx
  39821. var radioButton_rest = undefined && undefined.__rest || function (s, e) {
  39822. var t = {};
  39823. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  39824. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  39825. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  39826. }
  39827. return t;
  39828. };
  39829. const RadioButton = (props, ref) => {
  39830. const {
  39831. getPrefixCls
  39832. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  39833. const {
  39834. prefixCls: customizePrefixCls
  39835. } = props,
  39836. radioProps = radioButton_rest(props, ["prefixCls"]);
  39837. const prefixCls = getPrefixCls('radio', customizePrefixCls);
  39838. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RadioOptionTypeContextProvider, {
  39839. value: "button"
  39840. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radio_radio, Object.assign({
  39841. prefixCls: prefixCls
  39842. }, radioProps, {
  39843. type: "radio",
  39844. ref: ref
  39845. })));
  39846. };
  39847. /* harmony default export */ var radioButton = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RadioButton));
  39848. ;// ./components/calendar/Header.tsx
  39849. const YEAR_SELECT_OFFSET = 10;
  39850. const YEAR_SELECT_TOTAL = 20;
  39851. function YearSelect(props) {
  39852. const {
  39853. fullscreen,
  39854. validRange,
  39855. generateConfig,
  39856. locale,
  39857. prefixCls,
  39858. value,
  39859. onChange,
  39860. divRef
  39861. } = props;
  39862. const year = generateConfig.getYear(value || generateConfig.getNow());
  39863. let start = year - YEAR_SELECT_OFFSET;
  39864. let end = start + YEAR_SELECT_TOTAL;
  39865. if (validRange) {
  39866. start = generateConfig.getYear(validRange[0]);
  39867. end = generateConfig.getYear(validRange[1]) + 1;
  39868. }
  39869. const suffix = locale && locale.year === '年' ? '年' : '';
  39870. const options = [];
  39871. for (let index = start; index < end; index++) {
  39872. options.push({
  39873. label: `${index}${suffix}`,
  39874. value: index
  39875. });
  39876. }
  39877. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_select, {
  39878. size: fullscreen ? undefined : 'small',
  39879. options: options,
  39880. value: year,
  39881. className: `${prefixCls}-year-select`,
  39882. onChange: numYear => {
  39883. let newDate = generateConfig.setYear(value, numYear);
  39884. if (validRange) {
  39885. const [startDate, endDate] = validRange;
  39886. const newYear = generateConfig.getYear(newDate);
  39887. const newMonth = generateConfig.getMonth(newDate);
  39888. if (newYear === generateConfig.getYear(endDate) && newMonth > generateConfig.getMonth(endDate)) {
  39889. newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(endDate));
  39890. }
  39891. if (newYear === generateConfig.getYear(startDate) && newMonth < generateConfig.getMonth(startDate)) {
  39892. newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(startDate));
  39893. }
  39894. }
  39895. onChange(newDate);
  39896. },
  39897. getPopupContainer: () => divRef.current
  39898. });
  39899. }
  39900. function MonthSelect(props) {
  39901. const {
  39902. prefixCls,
  39903. fullscreen,
  39904. validRange,
  39905. value,
  39906. generateConfig,
  39907. locale,
  39908. onChange,
  39909. divRef
  39910. } = props;
  39911. const month = generateConfig.getMonth(value || generateConfig.getNow());
  39912. let start = 0;
  39913. let end = 11;
  39914. if (validRange) {
  39915. const [rangeStart, rangeEnd] = validRange;
  39916. const currentYear = generateConfig.getYear(value);
  39917. if (generateConfig.getYear(rangeEnd) === currentYear) {
  39918. end = generateConfig.getMonth(rangeEnd);
  39919. }
  39920. if (generateConfig.getYear(rangeStart) === currentYear) {
  39921. start = generateConfig.getMonth(rangeStart);
  39922. }
  39923. }
  39924. const months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale);
  39925. const options = [];
  39926. for (let index = start; index <= end; index += 1) {
  39927. options.push({
  39928. label: months[index],
  39929. value: index
  39930. });
  39931. }
  39932. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_select, {
  39933. size: fullscreen ? undefined : 'small',
  39934. className: `${prefixCls}-month-select`,
  39935. value: month,
  39936. options: options,
  39937. onChange: newMonth => {
  39938. onChange(generateConfig.setMonth(value, newMonth));
  39939. },
  39940. getPopupContainer: () => divRef.current
  39941. });
  39942. }
  39943. function ModeSwitch(props) {
  39944. const {
  39945. prefixCls,
  39946. locale,
  39947. mode,
  39948. fullscreen,
  39949. onModeChange
  39950. } = props;
  39951. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(group, {
  39952. onChange: ({
  39953. target: {
  39954. value
  39955. }
  39956. }) => {
  39957. onModeChange(value);
  39958. },
  39959. value: mode,
  39960. size: fullscreen ? undefined : 'small',
  39961. className: `${prefixCls}-mode-switch`
  39962. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radioButton, {
  39963. value: "month"
  39964. }, locale.month), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(radioButton, {
  39965. value: "year"
  39966. }, locale.year));
  39967. }
  39968. function CalendarHeader(props) {
  39969. const {
  39970. prefixCls,
  39971. fullscreen,
  39972. mode,
  39973. onChange,
  39974. onModeChange
  39975. } = props;
  39976. const divRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  39977. const formItemInputContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
  39978. const mergedFormItemInputContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Object.assign(Object.assign({}, formItemInputContext), {
  39979. isFormItemInput: false
  39980. }), [formItemInputContext]);
  39981. const sharedProps = Object.assign(Object.assign({}, props), {
  39982. fullscreen,
  39983. divRef
  39984. });
  39985. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  39986. className: `${prefixCls}-header`,
  39987. ref: divRef
  39988. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
  39989. value: mergedFormItemInputContext
  39990. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(YearSelect, Object.assign({}, sharedProps, {
  39991. onChange: v => {
  39992. onChange(v, 'year');
  39993. }
  39994. })), mode === 'month' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MonthSelect, Object.assign({}, sharedProps, {
  39995. onChange: v => {
  39996. onChange(v, 'month');
  39997. }
  39998. })))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ModeSwitch, Object.assign({}, sharedProps, {
  39999. onModeChange: onModeChange
  40000. })));
  40001. }
  40002. /* harmony default export */ var Header = (CalendarHeader);
  40003. // EXTERNAL MODULE: ./components/calendar/locale/en_US.ts
  40004. var locale_en_US = __webpack_require__("./components/calendar/locale/en_US.ts");
  40005. // EXTERNAL MODULE: ./components/calendar/style/index.ts
  40006. var calendar_style = __webpack_require__("./components/calendar/style/index.ts");
  40007. ;// ./components/calendar/generateCalendar.tsx
  40008. const generateCalendar_isSameYear = (date1, date2, config) => {
  40009. const {
  40010. getYear
  40011. } = config;
  40012. return date1 && date2 && getYear(date1) === getYear(date2);
  40013. };
  40014. const generateCalendar_isSameMonth = (date1, date2, config) => {
  40015. const {
  40016. getMonth
  40017. } = config;
  40018. return generateCalendar_isSameYear(date1, date2, config) && getMonth(date1) === getMonth(date2);
  40019. };
  40020. const generateCalendar_isSameDate = (date1, date2, config) => {
  40021. const {
  40022. getDate
  40023. } = config;
  40024. return generateCalendar_isSameMonth(date1, date2, config) && getDate(date1) === getDate(date2);
  40025. };
  40026. const generateCalendar = generateConfig => {
  40027. const Calendar = props => {
  40028. const {
  40029. prefixCls: customizePrefixCls,
  40030. className,
  40031. rootClassName,
  40032. style,
  40033. dateFullCellRender,
  40034. dateCellRender,
  40035. monthFullCellRender,
  40036. monthCellRender,
  40037. cellRender,
  40038. fullCellRender,
  40039. headerRender,
  40040. value,
  40041. defaultValue,
  40042. disabledDate,
  40043. mode,
  40044. validRange,
  40045. fullscreen = true,
  40046. showWeek,
  40047. onChange,
  40048. onPanelChange,
  40049. onSelect
  40050. } = props;
  40051. const {
  40052. getPrefixCls,
  40053. direction,
  40054. className: contextClassName,
  40055. style: contextStyle
  40056. } = (0,config_provider_context.useComponentConfig)('calendar');
  40057. const prefixCls = getPrefixCls('picker', customizePrefixCls);
  40058. const calendarPrefixCls = `${prefixCls}-calendar`;
  40059. const [wrapCSSVar, hashId, cssVarCls] = (0,calendar_style["default"])(prefixCls, calendarPrefixCls);
  40060. const today = generateConfig.getNow();
  40061. // ====================== Warning =======================
  40062. if (true) {
  40063. const warning = (0,_util_warning.devUseWarning)('Calendar');
  40064. [['dateFullCellRender', 'fullCellRender'], ['dateCellRender', 'cellRender'], ['monthFullCellRender', 'fullCellRender'], ['monthCellRender', 'cellRender']].forEach(([deprecatedName, newName]) => {
  40065. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  40066. });
  40067. }
  40068. // ====================== State =======================
  40069. // Value
  40070. const [mergedValue, setMergedValue] = (0,useMergedState["default"])(() => value || generateConfig.getNow(), {
  40071. defaultValue,
  40072. value
  40073. });
  40074. // Mode
  40075. const [mergedMode, setMergedMode] = (0,useMergedState["default"])('month', {
  40076. value: mode
  40077. });
  40078. const panelMode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => mergedMode === 'year' ? 'month' : 'date', [mergedMode]);
  40079. // Disabled Date
  40080. const mergedDisabledDate = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(date => {
  40081. const notInRange = validRange ? generateConfig.isAfter(validRange[0], date) || generateConfig.isAfter(date, validRange[1]) : false;
  40082. return notInRange || !!(disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date));
  40083. }, [disabledDate, validRange]);
  40084. // ====================== Events ======================
  40085. const triggerPanelChange = (date, newMode) => {
  40086. onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(date, newMode);
  40087. };
  40088. const triggerChange = date => {
  40089. setMergedValue(date);
  40090. if (!generateCalendar_isSameDate(date, mergedValue, generateConfig)) {
  40091. // Trigger when month panel switch month
  40092. if (panelMode === 'date' && !generateCalendar_isSameMonth(date, mergedValue, generateConfig) || panelMode === 'month' && !generateCalendar_isSameYear(date, mergedValue, generateConfig)) {
  40093. triggerPanelChange(date, mergedMode);
  40094. }
  40095. onChange === null || onChange === void 0 ? void 0 : onChange(date);
  40096. }
  40097. };
  40098. const triggerModeChange = newMode => {
  40099. setMergedMode(newMode);
  40100. triggerPanelChange(mergedValue, newMode);
  40101. };
  40102. const onInternalSelect = (date, source) => {
  40103. triggerChange(date);
  40104. onSelect === null || onSelect === void 0 ? void 0 : onSelect(date, {
  40105. source
  40106. });
  40107. };
  40108. // ====================== Render ======================
  40109. const dateRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((date, info) => {
  40110. if (fullCellRender) {
  40111. return fullCellRender(date, info);
  40112. }
  40113. if (dateFullCellRender) {
  40114. return dateFullCellRender(date);
  40115. }
  40116. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40117. className: classnames_default()(`${prefixCls}-cell-inner`, `${calendarPrefixCls}-date`, {
  40118. [`${calendarPrefixCls}-date-today`]: generateCalendar_isSameDate(today, date, generateConfig)
  40119. })
  40120. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40121. className: `${calendarPrefixCls}-date-value`
  40122. }, String(generateConfig.getDate(date)).padStart(2, '0')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40123. className: `${calendarPrefixCls}-date-content`
  40124. }, cellRender ? cellRender(date, info) : dateCellRender === null || dateCellRender === void 0 ? void 0 : dateCellRender(date)));
  40125. }, [dateFullCellRender, dateCellRender, cellRender, fullCellRender]);
  40126. const monthRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback((date, info) => {
  40127. if (fullCellRender) {
  40128. return fullCellRender(date, info);
  40129. }
  40130. if (monthFullCellRender) {
  40131. return monthFullCellRender(date);
  40132. }
  40133. const months = info.locale.shortMonths || generateConfig.locale.getShortMonths(info.locale.locale);
  40134. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40135. className: classnames_default()(`${prefixCls}-cell-inner`, `${calendarPrefixCls}-date`, {
  40136. [`${calendarPrefixCls}-date-today`]: generateCalendar_isSameMonth(today, date, generateConfig)
  40137. })
  40138. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40139. className: `${calendarPrefixCls}-date-value`
  40140. }, months[generateConfig.getMonth(date)]), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40141. className: `${calendarPrefixCls}-date-content`
  40142. }, cellRender ? cellRender(date, info) : monthCellRender === null || monthCellRender === void 0 ? void 0 : monthCellRender(date)));
  40143. }, [monthFullCellRender, monthCellRender, cellRender, fullCellRender]);
  40144. const [contextLocale] = (0,useLocale["default"])('Calendar', locale_en_US["default"]);
  40145. const locale = Object.assign(Object.assign({}, contextLocale), props.locale);
  40146. const mergedCellRender = (current, info) => {
  40147. if (info.type === 'date') {
  40148. return dateRender(current, info);
  40149. }
  40150. if (info.type === 'month') {
  40151. return monthRender(current, Object.assign(Object.assign({}, info), {
  40152. locale: locale === null || locale === void 0 ? void 0 : locale.lang
  40153. }));
  40154. }
  40155. };
  40156. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40157. className: classnames_default()(calendarPrefixCls, {
  40158. [`${calendarPrefixCls}-full`]: fullscreen,
  40159. [`${calendarPrefixCls}-mini`]: !fullscreen,
  40160. [`${calendarPrefixCls}-rtl`]: direction === 'rtl'
  40161. }, contextClassName, className, rootClassName, hashId, cssVarCls),
  40162. style: Object.assign(Object.assign({}, contextStyle), style)
  40163. }, headerRender ? headerRender({
  40164. value: mergedValue,
  40165. type: mergedMode,
  40166. onChange: nextDate => {
  40167. onInternalSelect(nextDate, 'customize');
  40168. },
  40169. onTypeChange: triggerModeChange
  40170. }) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Header, {
  40171. prefixCls: calendarPrefixCls,
  40172. value: mergedValue,
  40173. generateConfig: generateConfig,
  40174. mode: mergedMode,
  40175. fullscreen: fullscreen,
  40176. locale: locale === null || locale === void 0 ? void 0 : locale.lang,
  40177. validRange: validRange,
  40178. onChange: onInternalSelect,
  40179. onModeChange: triggerModeChange
  40180. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_PickerPanel, {
  40181. value: mergedValue,
  40182. prefixCls: prefixCls,
  40183. locale: locale === null || locale === void 0 ? void 0 : locale.lang,
  40184. generateConfig: generateConfig,
  40185. cellRender: mergedCellRender,
  40186. onSelect: nextDate => {
  40187. onInternalSelect(nextDate, panelMode);
  40188. },
  40189. mode: panelMode,
  40190. picker: panelMode,
  40191. disabledDate: mergedDisabledDate,
  40192. hideHeader: true,
  40193. showWeek: showWeek
  40194. })));
  40195. };
  40196. if (true) {
  40197. Calendar.displayName = 'Calendar';
  40198. }
  40199. return Calendar;
  40200. };
  40201. /* harmony default export */ var calendar_generateCalendar = (generateCalendar);
  40202. ;// ./components/calendar/index.tsx
  40203. const Calendar = calendar_generateCalendar(dayjs);
  40204. Calendar.generateCalendar = calendar_generateCalendar;
  40205. /* harmony default export */ var calendar = (Calendar);
  40206. ;// ./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js
  40207. // This icon file is generated automatically.
  40208. var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
  40209. /* harmony default export */ var asn_PlusOutlined = (PlusOutlined);
  40210. ;// ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js
  40211. // GENERATE BY ./scripts/generate.ts
  40212. // DON NOT EDIT IT MANUALLY
  40213. var PlusOutlined_PlusOutlined = function PlusOutlined(props, ref) {
  40214. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  40215. ref: ref,
  40216. icon: asn_PlusOutlined
  40217. }));
  40218. };
  40219. /**![plus](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ4MiAxNTJoNjBxOCAwIDggOHY3MDRxMCA4LTggOGgtNjBxLTggMC04LThWMTYwcTAtOCA4LTh6IiAvPjxwYXRoIGQ9Ik0xOTIgNDc0aDY3MnE4IDAgOCA4djYwcTAgOC04IDhIMTYwcS04IDAtOC04di02MHEwLTggOC04eiIgLz48L3N2Zz4=) */
  40220. var PlusOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PlusOutlined_PlusOutlined);
  40221. if (true) {
  40222. PlusOutlined_RefIcon.displayName = 'PlusOutlined';
  40223. }
  40224. /* harmony default export */ var icons_PlusOutlined = (PlusOutlined_RefIcon);
  40225. ;// ./node_modules/rc-tabs/es/TabContext.js
  40226. /* harmony default export */ var TabContext = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(null));
  40227. ;// ./node_modules/rc-tabs/es/hooks/useIndicator.js
  40228. var useIndicator = function useIndicator(options) {
  40229. var activeTabOffset = options.activeTabOffset,
  40230. horizontal = options.horizontal,
  40231. rtl = options.rtl,
  40232. _options$indicator = options.indicator,
  40233. indicator = _options$indicator === void 0 ? {} : _options$indicator;
  40234. var size = indicator.size,
  40235. _indicator$align = indicator.align,
  40236. align = _indicator$align === void 0 ? 'center' : _indicator$align;
  40237. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
  40238. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  40239. inkStyle = _useState2[0],
  40240. setInkStyle = _useState2[1];
  40241. var inkBarRafRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  40242. var getLength = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(function (origin) {
  40243. if (typeof size === 'function') {
  40244. return size(origin);
  40245. }
  40246. if (typeof size === 'number') {
  40247. return size;
  40248. }
  40249. return origin;
  40250. }, [size]);
  40251. // Delay set ink style to avoid remove tab blink
  40252. function cleanInkBarRaf() {
  40253. raf["default"].cancel(inkBarRafRef.current);
  40254. }
  40255. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  40256. var newInkStyle = {};
  40257. if (activeTabOffset) {
  40258. if (horizontal) {
  40259. newInkStyle.width = getLength(activeTabOffset.width);
  40260. var key = rtl ? 'right' : 'left';
  40261. if (align === 'start') {
  40262. newInkStyle[key] = activeTabOffset[key];
  40263. }
  40264. if (align === 'center') {
  40265. newInkStyle[key] = activeTabOffset[key] + activeTabOffset.width / 2;
  40266. newInkStyle.transform = rtl ? 'translateX(50%)' : 'translateX(-50%)';
  40267. }
  40268. if (align === 'end') {
  40269. newInkStyle[key] = activeTabOffset[key] + activeTabOffset.width;
  40270. newInkStyle.transform = 'translateX(-100%)';
  40271. }
  40272. } else {
  40273. newInkStyle.height = getLength(activeTabOffset.height);
  40274. if (align === 'start') {
  40275. newInkStyle.top = activeTabOffset.top;
  40276. }
  40277. if (align === 'center') {
  40278. newInkStyle.top = activeTabOffset.top + activeTabOffset.height / 2;
  40279. newInkStyle.transform = 'translateY(-50%)';
  40280. }
  40281. if (align === 'end') {
  40282. newInkStyle.top = activeTabOffset.top + activeTabOffset.height;
  40283. newInkStyle.transform = 'translateY(-100%)';
  40284. }
  40285. }
  40286. }
  40287. cleanInkBarRaf();
  40288. inkBarRafRef.current = (0,raf["default"])(function () {
  40289. // Avoid jitter caused by tiny numerical differences
  40290. // fix https://github.com/ant-design/ant-design/issues/53378
  40291. var isEqual = inkStyle && newInkStyle && Object.keys(newInkStyle).every(function (key) {
  40292. var newValue = newInkStyle[key];
  40293. var oldValue = inkStyle[key];
  40294. return typeof newValue === 'number' && typeof oldValue === 'number' ? Math.round(newValue) === Math.round(oldValue) : newValue === oldValue;
  40295. });
  40296. if (!isEqual) {
  40297. setInkStyle(newInkStyle);
  40298. }
  40299. });
  40300. return cleanInkBarRaf;
  40301. }, [JSON.stringify(activeTabOffset), horizontal, rtl, align, getLength]);
  40302. return {
  40303. style: inkStyle
  40304. };
  40305. };
  40306. /* harmony default export */ var hooks_useIndicator = (useIndicator);
  40307. ;// ./node_modules/rc-tabs/es/hooks/useOffsets.js
  40308. var DEFAULT_SIZE = {
  40309. width: 0,
  40310. height: 0,
  40311. left: 0,
  40312. top: 0
  40313. };
  40314. function useOffsets(tabs, tabSizes, holderScrollWidth) {
  40315. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  40316. var _tabs$;
  40317. var map = new Map();
  40318. var lastOffset = tabSizes.get((_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key) || DEFAULT_SIZE;
  40319. var rightOffset = lastOffset.left + lastOffset.width;
  40320. for (var i = 0; i < tabs.length; i += 1) {
  40321. var key = tabs[i].key;
  40322. var data = tabSizes.get(key);
  40323. // Reuse last one when not exist yet
  40324. if (!data) {
  40325. var _tabs;
  40326. data = tabSizes.get((_tabs = tabs[i - 1]) === null || _tabs === void 0 ? void 0 : _tabs.key) || DEFAULT_SIZE;
  40327. }
  40328. var entity = map.get(key) || (0,objectSpread2["default"])({}, data);
  40329. // Right
  40330. entity.right = rightOffset - entity.left - entity.width;
  40331. // Update entity
  40332. map.set(key, entity);
  40333. }
  40334. return map;
  40335. }, [tabs.map(function (tab) {
  40336. return tab.key;
  40337. }).join('_'), tabSizes, holderScrollWidth]);
  40338. }
  40339. ;// ./node_modules/rc-tabs/es/hooks/useSyncState.js
  40340. function useSyncState_useSyncState(defaultState, onChange) {
  40341. var stateRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(defaultState);
  40342. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  40343. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  40344. forceUpdate = _React$useState2[1];
  40345. function setState(updater) {
  40346. var newValue = typeof updater === 'function' ? updater(stateRef.current) : updater;
  40347. if (newValue !== stateRef.current) {
  40348. onChange(newValue, stateRef.current);
  40349. }
  40350. stateRef.current = newValue;
  40351. forceUpdate({});
  40352. }
  40353. return [stateRef.current, setState];
  40354. }
  40355. ;// ./node_modules/rc-tabs/es/hooks/useTouchMove.js
  40356. var MIN_SWIPE_DISTANCE = 0.1;
  40357. var STOP_SWIPE_DISTANCE = 0.01;
  40358. var REFRESH_INTERVAL = 20;
  40359. var SPEED_OFF_MULTIPLE = Math.pow(0.995, REFRESH_INTERVAL);
  40360. // ================================= Hook =================================
  40361. function useTouchMove(ref, onOffset) {
  40362. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
  40363. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  40364. touchPosition = _useState2[0],
  40365. setTouchPosition = _useState2[1];
  40366. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  40367. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  40368. lastTimestamp = _useState4[0],
  40369. setLastTimestamp = _useState4[1];
  40370. var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  40371. _useState6 = (0,slicedToArray["default"])(_useState5, 2),
  40372. lastTimeDiff = _useState6[0],
  40373. setLastTimeDiff = _useState6[1];
  40374. var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
  40375. _useState8 = (0,slicedToArray["default"])(_useState7, 2),
  40376. lastOffset = _useState8[0],
  40377. setLastOffset = _useState8[1];
  40378. var motionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  40379. // ========================= Events =========================
  40380. // >>> Touch events
  40381. function onTouchStart(e) {
  40382. var _e$touches$ = e.touches[0],
  40383. screenX = _e$touches$.screenX,
  40384. screenY = _e$touches$.screenY;
  40385. setTouchPosition({
  40386. x: screenX,
  40387. y: screenY
  40388. });
  40389. window.clearInterval(motionRef.current);
  40390. }
  40391. function onTouchMove(e) {
  40392. if (!touchPosition) return;
  40393. // e.preventDefault();
  40394. var _e$touches$2 = e.touches[0],
  40395. screenX = _e$touches$2.screenX,
  40396. screenY = _e$touches$2.screenY;
  40397. setTouchPosition({
  40398. x: screenX,
  40399. y: screenY
  40400. });
  40401. var offsetX = screenX - touchPosition.x;
  40402. var offsetY = screenY - touchPosition.y;
  40403. onOffset(offsetX, offsetY);
  40404. var now = Date.now();
  40405. setLastTimestamp(now);
  40406. setLastTimeDiff(now - lastTimestamp);
  40407. setLastOffset({
  40408. x: offsetX,
  40409. y: offsetY
  40410. });
  40411. }
  40412. function onTouchEnd() {
  40413. if (!touchPosition) return;
  40414. setTouchPosition(null);
  40415. setLastOffset(null);
  40416. // Swipe if needed
  40417. if (lastOffset) {
  40418. var distanceX = lastOffset.x / lastTimeDiff;
  40419. var distanceY = lastOffset.y / lastTimeDiff;
  40420. var absX = Math.abs(distanceX);
  40421. var absY = Math.abs(distanceY);
  40422. // Skip swipe if low distance
  40423. if (Math.max(absX, absY) < MIN_SWIPE_DISTANCE) return;
  40424. var currentX = distanceX;
  40425. var currentY = distanceY;
  40426. motionRef.current = window.setInterval(function () {
  40427. if (Math.abs(currentX) < STOP_SWIPE_DISTANCE && Math.abs(currentY) < STOP_SWIPE_DISTANCE) {
  40428. window.clearInterval(motionRef.current);
  40429. return;
  40430. }
  40431. currentX *= SPEED_OFF_MULTIPLE;
  40432. currentY *= SPEED_OFF_MULTIPLE;
  40433. onOffset(currentX * REFRESH_INTERVAL, currentY * REFRESH_INTERVAL);
  40434. }, REFRESH_INTERVAL);
  40435. }
  40436. }
  40437. // >>> Wheel event
  40438. var lastWheelDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  40439. function onWheel(e) {
  40440. var deltaX = e.deltaX,
  40441. deltaY = e.deltaY;
  40442. // Convert both to x & y since wheel only happened on PC
  40443. var mixed = 0;
  40444. var absX = Math.abs(deltaX);
  40445. var absY = Math.abs(deltaY);
  40446. if (absX === absY) {
  40447. mixed = lastWheelDirectionRef.current === 'x' ? deltaX : deltaY;
  40448. } else if (absX > absY) {
  40449. mixed = deltaX;
  40450. lastWheelDirectionRef.current = 'x';
  40451. } else {
  40452. mixed = deltaY;
  40453. lastWheelDirectionRef.current = 'y';
  40454. }
  40455. if (onOffset(-mixed, -mixed)) {
  40456. e.preventDefault();
  40457. }
  40458. }
  40459. // ========================= Effect =========================
  40460. var touchEventsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  40461. touchEventsRef.current = {
  40462. onTouchStart: onTouchStart,
  40463. onTouchMove: onTouchMove,
  40464. onTouchEnd: onTouchEnd,
  40465. onWheel: onWheel
  40466. };
  40467. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  40468. function onProxyTouchStart(e) {
  40469. touchEventsRef.current.onTouchStart(e);
  40470. }
  40471. function onProxyTouchMove(e) {
  40472. touchEventsRef.current.onTouchMove(e);
  40473. }
  40474. function onProxyTouchEnd(e) {
  40475. touchEventsRef.current.onTouchEnd(e);
  40476. }
  40477. function onProxyWheel(e) {
  40478. touchEventsRef.current.onWheel(e);
  40479. }
  40480. document.addEventListener('touchmove', onProxyTouchMove, {
  40481. passive: false
  40482. });
  40483. document.addEventListener('touchend', onProxyTouchEnd, {
  40484. passive: true
  40485. });
  40486. // No need to clean up since element removed
  40487. ref.current.addEventListener('touchstart', onProxyTouchStart, {
  40488. passive: true
  40489. });
  40490. ref.current.addEventListener('wheel', onProxyWheel, {
  40491. passive: false
  40492. });
  40493. return function () {
  40494. document.removeEventListener('touchmove', onProxyTouchMove);
  40495. document.removeEventListener('touchend', onProxyTouchEnd);
  40496. };
  40497. }, []);
  40498. }
  40499. ;// ./node_modules/rc-tabs/es/hooks/useUpdate.js
  40500. /**
  40501. * Help to merge callback with `useLayoutEffect`.
  40502. * One time will only trigger once.
  40503. */
  40504. function useUpdate(callback) {
  40505. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  40506. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  40507. count = _useState2[0],
  40508. setCount = _useState2[1];
  40509. var effectRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  40510. var callbackRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  40511. callbackRef.current = callback;
  40512. // Trigger on `useLayoutEffect`
  40513. (0,useLayoutEffect.useLayoutUpdateEffect)(function () {
  40514. var _callbackRef$current;
  40515. (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 || _callbackRef$current.call(callbackRef);
  40516. }, [count]);
  40517. // Trigger to update count
  40518. return function () {
  40519. if (effectRef.current !== count) {
  40520. return;
  40521. }
  40522. effectRef.current += 1;
  40523. setCount(effectRef.current);
  40524. };
  40525. }
  40526. function useUpdateState(defaultState) {
  40527. var batchRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
  40528. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
  40529. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  40530. forceUpdate = _useState4[1];
  40531. var state = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(typeof defaultState === 'function' ? defaultState() : defaultState);
  40532. var flushUpdate = useUpdate(function () {
  40533. var current = state.current;
  40534. batchRef.current.forEach(function (callback) {
  40535. current = callback(current);
  40536. });
  40537. batchRef.current = [];
  40538. state.current = current;
  40539. forceUpdate({});
  40540. });
  40541. function updater(callback) {
  40542. batchRef.current.push(callback);
  40543. flushUpdate();
  40544. }
  40545. return [state.current, updater];
  40546. }
  40547. ;// ./node_modules/rc-tabs/es/hooks/useVisibleRange.js
  40548. var useVisibleRange_DEFAULT_SIZE = {
  40549. width: 0,
  40550. height: 0,
  40551. left: 0,
  40552. top: 0,
  40553. right: 0
  40554. };
  40555. function useVisibleRange(tabOffsets, visibleTabContentValue, transform, tabContentSizeValue, addNodeSizeValue, operationNodeSizeValue, _ref) {
  40556. var tabs = _ref.tabs,
  40557. tabPosition = _ref.tabPosition,
  40558. rtl = _ref.rtl;
  40559. var charUnit;
  40560. var position;
  40561. var transformSize;
  40562. if (['top', 'bottom'].includes(tabPosition)) {
  40563. charUnit = 'width';
  40564. position = rtl ? 'right' : 'left';
  40565. transformSize = Math.abs(transform);
  40566. } else {
  40567. charUnit = 'height';
  40568. position = 'top';
  40569. transformSize = -transform;
  40570. }
  40571. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  40572. if (!tabs.length) {
  40573. return [0, 0];
  40574. }
  40575. var len = tabs.length;
  40576. var endIndex = len;
  40577. for (var i = 0; i < len; i += 1) {
  40578. var offset = tabOffsets.get(tabs[i].key) || useVisibleRange_DEFAULT_SIZE;
  40579. if (Math.floor(offset[position] + offset[charUnit]) > Math.floor(transformSize + visibleTabContentValue)) {
  40580. endIndex = i - 1;
  40581. break;
  40582. }
  40583. }
  40584. var startIndex = 0;
  40585. for (var _i = len - 1; _i >= 0; _i -= 1) {
  40586. var _offset = tabOffsets.get(tabs[_i].key) || useVisibleRange_DEFAULT_SIZE;
  40587. if (_offset[position] < transformSize) {
  40588. startIndex = _i + 1;
  40589. break;
  40590. }
  40591. }
  40592. return startIndex > endIndex ? [0, -1] : [startIndex, endIndex];
  40593. }, [tabOffsets, visibleTabContentValue, tabContentSizeValue, addNodeSizeValue, operationNodeSizeValue, transformSize, tabPosition, tabs.map(function (tab) {
  40594. return tab.key;
  40595. }).join('_'), rtl]);
  40596. }
  40597. ;// ./node_modules/rc-tabs/es/util.js
  40598. /**
  40599. * We trade Map as deps which may change with same value but different ref object.
  40600. * We should make it as hash for deps
  40601. * */
  40602. function util_stringify(obj) {
  40603. var tgt;
  40604. if (obj instanceof Map) {
  40605. tgt = {};
  40606. obj.forEach(function (v, k) {
  40607. tgt[k] = v;
  40608. });
  40609. } else {
  40610. tgt = obj;
  40611. }
  40612. return JSON.stringify(tgt);
  40613. }
  40614. var RC_TABS_DOUBLE_QUOTE = 'TABS_DQ';
  40615. function genDataNodeKey(key) {
  40616. return String(key).replace(/"/g, RC_TABS_DOUBLE_QUOTE);
  40617. }
  40618. function getRemovable(closable, closeIcon, editable, disabled) {
  40619. if (
  40620. // Only editable tabs can be removed
  40621. !editable ||
  40622. // Tabs cannot be removed when disabled
  40623. disabled ||
  40624. // closable is false
  40625. closable === false ||
  40626. // If closable is undefined, the remove button should be hidden when closeIcon is null or false
  40627. closable === undefined && (closeIcon === false || closeIcon === null)) {
  40628. return false;
  40629. }
  40630. return true;
  40631. }
  40632. ;// ./node_modules/rc-tabs/es/TabNavList/AddButton.js
  40633. var AddButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  40634. var prefixCls = props.prefixCls,
  40635. editable = props.editable,
  40636. locale = props.locale,
  40637. style = props.style;
  40638. if (!editable || editable.showAdd === false) {
  40639. return null;
  40640. }
  40641. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  40642. ref: ref,
  40643. type: "button",
  40644. className: "".concat(prefixCls, "-nav-add"),
  40645. style: style,
  40646. "aria-label": (locale === null || locale === void 0 ? void 0 : locale.addAriaLabel) || 'Add tab',
  40647. onClick: function onClick(event) {
  40648. editable.onEdit('add', {
  40649. event: event
  40650. });
  40651. }
  40652. }, editable.addIcon || '+');
  40653. });
  40654. /* harmony default export */ var TabNavList_AddButton = (AddButton);
  40655. ;// ./node_modules/rc-tabs/es/TabNavList/ExtraContent.js
  40656. var ExtraContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  40657. var position = props.position,
  40658. prefixCls = props.prefixCls,
  40659. extra = props.extra;
  40660. if (!extra) {
  40661. return null;
  40662. }
  40663. var content;
  40664. // Parse extra
  40665. var assertExtra = {};
  40666. if ((0,esm_typeof["default"])(extra) === 'object' && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(extra)) {
  40667. assertExtra = extra;
  40668. } else {
  40669. assertExtra.right = extra;
  40670. }
  40671. if (position === 'right') {
  40672. content = assertExtra.right;
  40673. }
  40674. if (position === 'left') {
  40675. content = assertExtra.left;
  40676. }
  40677. return content ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40678. className: "".concat(prefixCls, "-extra-content"),
  40679. ref: ref
  40680. }, content) : null;
  40681. });
  40682. if (true) {
  40683. ExtraContent.displayName = 'ExtraContent';
  40684. }
  40685. /* harmony default export */ var TabNavList_ExtraContent = (ExtraContent);
  40686. ;// ./node_modules/rc-tabs/es/TabNavList/OperationNode.js
  40687. var OperationNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  40688. var prefixCls = props.prefixCls,
  40689. id = props.id,
  40690. tabs = props.tabs,
  40691. locale = props.locale,
  40692. mobile = props.mobile,
  40693. _props$more = props.more,
  40694. moreProps = _props$more === void 0 ? {} : _props$more,
  40695. style = props.style,
  40696. className = props.className,
  40697. editable = props.editable,
  40698. tabBarGutter = props.tabBarGutter,
  40699. rtl = props.rtl,
  40700. removeAriaLabel = props.removeAriaLabel,
  40701. onTabClick = props.onTabClick,
  40702. getPopupContainer = props.getPopupContainer,
  40703. popupClassName = props.popupClassName;
  40704. // ======================== Dropdown ========================
  40705. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  40706. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  40707. open = _useState2[0],
  40708. setOpen = _useState2[1];
  40709. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  40710. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  40711. selectedKey = _useState4[0],
  40712. setSelectedKey = _useState4[1];
  40713. var _moreProps$icon = moreProps.icon,
  40714. moreIcon = _moreProps$icon === void 0 ? 'More' : _moreProps$icon;
  40715. var popupId = "".concat(id, "-more-popup");
  40716. var dropdownPrefix = "".concat(prefixCls, "-dropdown");
  40717. var selectedItemId = selectedKey !== null ? "".concat(popupId, "-").concat(selectedKey) : null;
  40718. var dropdownAriaLabel = locale === null || locale === void 0 ? void 0 : locale.dropdownAriaLabel;
  40719. function onRemoveTab(event, key) {
  40720. event.preventDefault();
  40721. event.stopPropagation();
  40722. editable.onEdit('remove', {
  40723. key: key,
  40724. event: event
  40725. });
  40726. }
  40727. var menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_menu_es, {
  40728. onClick: function onClick(_ref) {
  40729. var key = _ref.key,
  40730. domEvent = _ref.domEvent;
  40731. onTabClick(key, domEvent);
  40732. setOpen(false);
  40733. },
  40734. prefixCls: "".concat(dropdownPrefix, "-menu"),
  40735. id: popupId,
  40736. tabIndex: -1,
  40737. role: "listbox",
  40738. "aria-activedescendant": selectedItemId,
  40739. selectedKeys: [selectedKey],
  40740. "aria-label": dropdownAriaLabel !== undefined ? dropdownAriaLabel : 'expanded dropdown'
  40741. }, tabs.map(function (tab) {
  40742. var closable = tab.closable,
  40743. disabled = tab.disabled,
  40744. closeIcon = tab.closeIcon,
  40745. key = tab.key,
  40746. label = tab.label;
  40747. var removable = getRemovable(closable, closeIcon, editable, disabled);
  40748. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, {
  40749. key: key,
  40750. id: "".concat(popupId, "-").concat(key),
  40751. role: "option",
  40752. "aria-controls": id && "".concat(id, "-panel-").concat(key),
  40753. disabled: disabled
  40754. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, label), removable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  40755. type: "button",
  40756. "aria-label": removeAriaLabel || 'remove',
  40757. tabIndex: 0,
  40758. className: "".concat(dropdownPrefix, "-menu-item-remove"),
  40759. onClick: function onClick(e) {
  40760. e.stopPropagation();
  40761. onRemoveTab(e, key);
  40762. }
  40763. }, closeIcon || editable.removeIcon || '×'));
  40764. }));
  40765. function selectOffset(offset) {
  40766. var enabledTabs = tabs.filter(function (tab) {
  40767. return !tab.disabled;
  40768. });
  40769. var selectedIndex = enabledTabs.findIndex(function (tab) {
  40770. return tab.key === selectedKey;
  40771. }) || 0;
  40772. var len = enabledTabs.length;
  40773. for (var i = 0; i < len; i += 1) {
  40774. selectedIndex = (selectedIndex + offset + len) % len;
  40775. var tab = enabledTabs[selectedIndex];
  40776. if (!tab.disabled) {
  40777. setSelectedKey(tab.key);
  40778. return;
  40779. }
  40780. }
  40781. }
  40782. function onKeyDown(e) {
  40783. var which = e.which;
  40784. if (!open) {
  40785. if ([KeyCode["default"].DOWN, KeyCode["default"].SPACE, KeyCode["default"].ENTER].includes(which)) {
  40786. setOpen(true);
  40787. e.preventDefault();
  40788. }
  40789. return;
  40790. }
  40791. switch (which) {
  40792. case KeyCode["default"].UP:
  40793. selectOffset(-1);
  40794. e.preventDefault();
  40795. break;
  40796. case KeyCode["default"].DOWN:
  40797. selectOffset(1);
  40798. e.preventDefault();
  40799. break;
  40800. case KeyCode["default"].ESC:
  40801. setOpen(false);
  40802. break;
  40803. case KeyCode["default"].SPACE:
  40804. case KeyCode["default"].ENTER:
  40805. if (selectedKey !== null) {
  40806. onTabClick(selectedKey, e);
  40807. }
  40808. break;
  40809. }
  40810. }
  40811. // ========================= Effect =========================
  40812. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  40813. // We use query element here to avoid React strict warning
  40814. var ele = document.getElementById(selectedItemId);
  40815. if (ele && ele.scrollIntoView) {
  40816. ele.scrollIntoView(false);
  40817. }
  40818. }, [selectedKey]);
  40819. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  40820. if (!open) {
  40821. setSelectedKey(null);
  40822. }
  40823. }, [open]);
  40824. // ========================= Render =========================
  40825. var moreStyle = (0,defineProperty["default"])({}, rtl ? 'marginRight' : 'marginLeft', tabBarGutter);
  40826. if (!tabs.length) {
  40827. moreStyle.visibility = 'hidden';
  40828. moreStyle.order = 1;
  40829. }
  40830. var overlayClassName = classnames_default()((0,defineProperty["default"])({}, "".concat(dropdownPrefix, "-rtl"), rtl));
  40831. var moreNode = mobile ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_dropdown_es, (0,esm_extends["default"])({
  40832. prefixCls: dropdownPrefix,
  40833. overlay: menu,
  40834. visible: tabs.length ? open : false,
  40835. onVisibleChange: setOpen,
  40836. overlayClassName: classnames_default()(overlayClassName, popupClassName),
  40837. mouseEnterDelay: 0.1,
  40838. mouseLeaveDelay: 0.1,
  40839. getPopupContainer: getPopupContainer
  40840. }, moreProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  40841. type: "button",
  40842. className: "".concat(prefixCls, "-nav-more"),
  40843. style: moreStyle,
  40844. "aria-haspopup": "listbox",
  40845. "aria-controls": popupId,
  40846. id: "".concat(id, "-more"),
  40847. "aria-expanded": open,
  40848. onKeyDown: onKeyDown
  40849. }, moreIcon));
  40850. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40851. className: classnames_default()("".concat(prefixCls, "-nav-operations"), className),
  40852. style: style,
  40853. ref: ref
  40854. }, moreNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_AddButton, {
  40855. prefixCls: prefixCls,
  40856. locale: locale,
  40857. editable: editable
  40858. }));
  40859. });
  40860. /* harmony default export */ var TabNavList_OperationNode = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(OperationNode, function (_, next) {
  40861. return (
  40862. // https://github.com/ant-design/ant-design/issues/32544
  40863. // We'd better remove syntactic sugar in `rc-menu` since this has perf issue
  40864. next.tabMoving
  40865. );
  40866. }));
  40867. ;// ./node_modules/rc-tabs/es/TabNavList/TabNode.js
  40868. var TabNode = function TabNode(props) {
  40869. var prefixCls = props.prefixCls,
  40870. id = props.id,
  40871. active = props.active,
  40872. focus = props.focus,
  40873. _props$tab = props.tab,
  40874. key = _props$tab.key,
  40875. label = _props$tab.label,
  40876. disabled = _props$tab.disabled,
  40877. closeIcon = _props$tab.closeIcon,
  40878. icon = _props$tab.icon,
  40879. closable = props.closable,
  40880. renderWrapper = props.renderWrapper,
  40881. removeAriaLabel = props.removeAriaLabel,
  40882. editable = props.editable,
  40883. onClick = props.onClick,
  40884. onFocus = props.onFocus,
  40885. onBlur = props.onBlur,
  40886. onKeyDown = props.onKeyDown,
  40887. onMouseDown = props.onMouseDown,
  40888. onMouseUp = props.onMouseUp,
  40889. style = props.style,
  40890. tabCount = props.tabCount,
  40891. currentPosition = props.currentPosition;
  40892. var tabPrefix = "".concat(prefixCls, "-tab");
  40893. var removable = getRemovable(closable, closeIcon, editable, disabled);
  40894. function onInternalClick(e) {
  40895. if (disabled) {
  40896. return;
  40897. }
  40898. onClick(e);
  40899. }
  40900. function onRemoveTab(event) {
  40901. event.preventDefault();
  40902. event.stopPropagation();
  40903. editable.onEdit('remove', {
  40904. key: key,
  40905. event: event
  40906. });
  40907. }
  40908. var labelNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  40909. return icon && typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, label) : label;
  40910. }, [label, icon]);
  40911. var btnRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  40912. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  40913. if (focus && btnRef.current) {
  40914. btnRef.current.focus();
  40915. }
  40916. }, [focus]);
  40917. var node = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40918. key: key,
  40919. "data-node-key": genDataNodeKey(key),
  40920. className: classnames_default()(tabPrefix, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(tabPrefix, "-with-remove"), removable), "".concat(tabPrefix, "-active"), active), "".concat(tabPrefix, "-disabled"), disabled), "".concat(tabPrefix, "-focus"), focus)),
  40921. style: style,
  40922. onClick: onInternalClick
  40923. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40924. ref: btnRef,
  40925. role: "tab",
  40926. "aria-selected": active,
  40927. id: id && "".concat(id, "-tab-").concat(key),
  40928. className: "".concat(tabPrefix, "-btn"),
  40929. "aria-controls": id && "".concat(id, "-panel-").concat(key),
  40930. "aria-disabled": disabled,
  40931. tabIndex: disabled ? null : active ? 0 : -1,
  40932. onClick: function onClick(e) {
  40933. e.stopPropagation();
  40934. onInternalClick(e);
  40935. },
  40936. onKeyDown: onKeyDown,
  40937. onMouseDown: onMouseDown,
  40938. onMouseUp: onMouseUp,
  40939. onFocus: onFocus,
  40940. onBlur: onBlur
  40941. }, focus && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  40942. "aria-live": "polite",
  40943. style: {
  40944. width: 0,
  40945. height: 0,
  40946. position: 'absolute',
  40947. overflow: 'hidden',
  40948. opacity: 0
  40949. }
  40950. }, "Tab ".concat(currentPosition, " of ").concat(tabCount)), icon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  40951. className: "".concat(tabPrefix, "-icon")
  40952. }, icon), label && labelNode), removable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  40953. type: "button",
  40954. role: "tab",
  40955. "aria-label": removeAriaLabel || 'remove',
  40956. tabIndex: active ? 0 : -1,
  40957. className: "".concat(tabPrefix, "-remove"),
  40958. onClick: function onClick(e) {
  40959. e.stopPropagation();
  40960. onRemoveTab(e);
  40961. }
  40962. }, closeIcon || editable.removeIcon || '×'));
  40963. return renderWrapper ? renderWrapper(node) : node;
  40964. };
  40965. /* harmony default export */ var TabNavList_TabNode = (TabNode);
  40966. ;// ./node_modules/rc-tabs/es/TabNavList/index.js
  40967. /* eslint-disable react-hooks/exhaustive-deps */
  40968. var getTabSize = function getTabSize(tab, containerRect) {
  40969. // tabListRef
  40970. var offsetWidth = tab.offsetWidth,
  40971. offsetHeight = tab.offsetHeight,
  40972. offsetTop = tab.offsetTop,
  40973. offsetLeft = tab.offsetLeft;
  40974. var _tab$getBoundingClien = tab.getBoundingClientRect(),
  40975. width = _tab$getBoundingClien.width,
  40976. height = _tab$getBoundingClien.height,
  40977. left = _tab$getBoundingClien.left,
  40978. top = _tab$getBoundingClien.top;
  40979. // Use getBoundingClientRect to avoid decimal inaccuracy
  40980. if (Math.abs(width - offsetWidth) < 1) {
  40981. return [width, height, left - containerRect.left, top - containerRect.top];
  40982. }
  40983. return [offsetWidth, offsetHeight, offsetLeft, offsetTop];
  40984. };
  40985. var getSize = function getSize(refObj) {
  40986. var _ref = refObj.current || {},
  40987. _ref$offsetWidth = _ref.offsetWidth,
  40988. offsetWidth = _ref$offsetWidth === void 0 ? 0 : _ref$offsetWidth,
  40989. _ref$offsetHeight = _ref.offsetHeight,
  40990. offsetHeight = _ref$offsetHeight === void 0 ? 0 : _ref$offsetHeight;
  40991. // Use getBoundingClientRect to avoid decimal inaccuracy
  40992. if (refObj.current) {
  40993. var _refObj$current$getBo = refObj.current.getBoundingClientRect(),
  40994. width = _refObj$current$getBo.width,
  40995. height = _refObj$current$getBo.height;
  40996. if (Math.abs(width - offsetWidth) < 1) {
  40997. return [width, height];
  40998. }
  40999. }
  41000. return [offsetWidth, offsetHeight];
  41001. };
  41002. /**
  41003. * Convert `SizeInfo` to unit value. Such as [123, 456] with `top` position get `123`
  41004. */
  41005. var getUnitValue = function getUnitValue(size, tabPositionTopOrBottom) {
  41006. return size[tabPositionTopOrBottom ? 0 : 1];
  41007. };
  41008. var TabNavList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  41009. var className = props.className,
  41010. style = props.style,
  41011. id = props.id,
  41012. animated = props.animated,
  41013. activeKey = props.activeKey,
  41014. rtl = props.rtl,
  41015. extra = props.extra,
  41016. editable = props.editable,
  41017. locale = props.locale,
  41018. tabPosition = props.tabPosition,
  41019. tabBarGutter = props.tabBarGutter,
  41020. children = props.children,
  41021. onTabClick = props.onTabClick,
  41022. onTabScroll = props.onTabScroll,
  41023. indicator = props.indicator;
  41024. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TabContext),
  41025. prefixCls = _React$useContext.prefixCls,
  41026. tabs = _React$useContext.tabs;
  41027. var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41028. var extraLeftRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41029. var extraRightRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41030. var tabsWrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41031. var tabListRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41032. var operationsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41033. var innerAddButtonRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41034. var tabPositionTopOrBottom = tabPosition === 'top' || tabPosition === 'bottom';
  41035. var _useSyncState = useSyncState_useSyncState(0, function (next, prev) {
  41036. if (tabPositionTopOrBottom && onTabScroll) {
  41037. onTabScroll({
  41038. direction: next > prev ? 'left' : 'right'
  41039. });
  41040. }
  41041. }),
  41042. _useSyncState2 = (0,slicedToArray["default"])(_useSyncState, 2),
  41043. transformLeft = _useSyncState2[0],
  41044. setTransformLeft = _useSyncState2[1];
  41045. var _useSyncState3 = useSyncState_useSyncState(0, function (next, prev) {
  41046. if (!tabPositionTopOrBottom && onTabScroll) {
  41047. onTabScroll({
  41048. direction: next > prev ? 'top' : 'bottom'
  41049. });
  41050. }
  41051. }),
  41052. _useSyncState4 = (0,slicedToArray["default"])(_useSyncState3, 2),
  41053. transformTop = _useSyncState4[0],
  41054. setTransformTop = _useSyncState4[1];
  41055. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
  41056. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  41057. containerExcludeExtraSize = _useState2[0],
  41058. setContainerExcludeExtraSize = _useState2[1];
  41059. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
  41060. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  41061. tabContentSize = _useState4[0],
  41062. setTabContentSize = _useState4[1];
  41063. var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
  41064. _useState6 = (0,slicedToArray["default"])(_useState5, 2),
  41065. addSize = _useState6[0],
  41066. setAddSize = _useState6[1];
  41067. var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([0, 0]),
  41068. _useState8 = (0,slicedToArray["default"])(_useState7, 2),
  41069. operationSize = _useState8[0],
  41070. setOperationSize = _useState8[1];
  41071. var _useUpdateState = useUpdateState(new Map()),
  41072. _useUpdateState2 = (0,slicedToArray["default"])(_useUpdateState, 2),
  41073. tabSizes = _useUpdateState2[0],
  41074. setTabSizes = _useUpdateState2[1];
  41075. var tabOffsets = useOffsets(tabs, tabSizes, tabContentSize[0]);
  41076. // ========================== Unit =========================
  41077. var containerExcludeExtraSizeValue = getUnitValue(containerExcludeExtraSize, tabPositionTopOrBottom);
  41078. var tabContentSizeValue = getUnitValue(tabContentSize, tabPositionTopOrBottom);
  41079. var addSizeValue = getUnitValue(addSize, tabPositionTopOrBottom);
  41080. var operationSizeValue = getUnitValue(operationSize, tabPositionTopOrBottom);
  41081. var needScroll = Math.floor(containerExcludeExtraSizeValue) < Math.floor(tabContentSizeValue + addSizeValue);
  41082. var visibleTabContentValue = needScroll ? containerExcludeExtraSizeValue - operationSizeValue : containerExcludeExtraSizeValue - addSizeValue;
  41083. // ========================== Util =========================
  41084. var operationsHiddenClassName = "".concat(prefixCls, "-nav-operations-hidden");
  41085. var transformMin = 0;
  41086. var transformMax = 0;
  41087. if (!tabPositionTopOrBottom) {
  41088. transformMin = Math.min(0, visibleTabContentValue - tabContentSizeValue);
  41089. transformMax = 0;
  41090. } else if (rtl) {
  41091. transformMin = 0;
  41092. transformMax = Math.max(0, tabContentSizeValue - visibleTabContentValue);
  41093. } else {
  41094. transformMin = Math.min(0, visibleTabContentValue - tabContentSizeValue);
  41095. transformMax = 0;
  41096. }
  41097. function alignInRange(value) {
  41098. if (value < transformMin) {
  41099. return transformMin;
  41100. }
  41101. if (value > transformMax) {
  41102. return transformMax;
  41103. }
  41104. return value;
  41105. }
  41106. // ========================= Mobile ========================
  41107. var touchMovingRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  41108. var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
  41109. _useState10 = (0,slicedToArray["default"])(_useState9, 2),
  41110. lockAnimation = _useState10[0],
  41111. setLockAnimation = _useState10[1];
  41112. function doLockAnimation() {
  41113. setLockAnimation(Date.now());
  41114. }
  41115. function clearTouchMoving() {
  41116. if (touchMovingRef.current) {
  41117. clearTimeout(touchMovingRef.current);
  41118. }
  41119. }
  41120. useTouchMove(tabsWrapperRef, function (offsetX, offsetY) {
  41121. function doMove(setState, offset) {
  41122. setState(function (value) {
  41123. var newValue = alignInRange(value + offset);
  41124. return newValue;
  41125. });
  41126. }
  41127. // Skip scroll if place is enough
  41128. if (!needScroll) {
  41129. return false;
  41130. }
  41131. if (tabPositionTopOrBottom) {
  41132. doMove(setTransformLeft, offsetX);
  41133. } else {
  41134. doMove(setTransformTop, offsetY);
  41135. }
  41136. clearTouchMoving();
  41137. doLockAnimation();
  41138. return true;
  41139. });
  41140. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41141. clearTouchMoving();
  41142. if (lockAnimation) {
  41143. touchMovingRef.current = setTimeout(function () {
  41144. setLockAnimation(0);
  41145. }, 100);
  41146. }
  41147. return clearTouchMoving;
  41148. }, [lockAnimation]);
  41149. // ===================== Visible Range =====================
  41150. // Render tab node & collect tab offset
  41151. var _useVisibleRange = useVisibleRange(tabOffsets,
  41152. // Container
  41153. visibleTabContentValue,
  41154. // Transform
  41155. tabPositionTopOrBottom ? transformLeft : transformTop,
  41156. // Tabs
  41157. tabContentSizeValue,
  41158. // Add
  41159. addSizeValue,
  41160. // Operation
  41161. operationSizeValue, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  41162. tabs: tabs
  41163. })),
  41164. _useVisibleRange2 = (0,slicedToArray["default"])(_useVisibleRange, 2),
  41165. visibleStart = _useVisibleRange2[0],
  41166. visibleEnd = _useVisibleRange2[1];
  41167. // ========================= Scroll ========================
  41168. var scrollToTab = (0,useEvent["default"])(function () {
  41169. var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeKey;
  41170. var tabOffset = tabOffsets.get(key) || {
  41171. width: 0,
  41172. height: 0,
  41173. left: 0,
  41174. right: 0,
  41175. top: 0
  41176. };
  41177. if (tabPositionTopOrBottom) {
  41178. // ============ Align with top & bottom ============
  41179. var newTransform = transformLeft;
  41180. // RTL
  41181. if (rtl) {
  41182. if (tabOffset.right < transformLeft) {
  41183. newTransform = tabOffset.right;
  41184. } else if (tabOffset.right + tabOffset.width > transformLeft + visibleTabContentValue) {
  41185. newTransform = tabOffset.right + tabOffset.width - visibleTabContentValue;
  41186. }
  41187. }
  41188. // LTR
  41189. else if (tabOffset.left < -transformLeft) {
  41190. newTransform = -tabOffset.left;
  41191. } else if (tabOffset.left + tabOffset.width > -transformLeft + visibleTabContentValue) {
  41192. newTransform = -(tabOffset.left + tabOffset.width - visibleTabContentValue);
  41193. }
  41194. setTransformTop(0);
  41195. setTransformLeft(alignInRange(newTransform));
  41196. } else {
  41197. // ============ Align with left & right ============
  41198. var _newTransform = transformTop;
  41199. if (tabOffset.top < -transformTop) {
  41200. _newTransform = -tabOffset.top;
  41201. } else if (tabOffset.top + tabOffset.height > -transformTop + visibleTabContentValue) {
  41202. _newTransform = -(tabOffset.top + tabOffset.height - visibleTabContentValue);
  41203. }
  41204. setTransformLeft(0);
  41205. setTransformTop(alignInRange(_newTransform));
  41206. }
  41207. });
  41208. // ========================= Focus =========================
  41209. var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
  41210. _useState12 = (0,slicedToArray["default"])(_useState11, 2),
  41211. focusKey = _useState12[0],
  41212. setFocusKey = _useState12[1];
  41213. var _useState13 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  41214. _useState14 = (0,slicedToArray["default"])(_useState13, 2),
  41215. isMouse = _useState14[0],
  41216. setIsMouse = _useState14[1];
  41217. var enabledTabs = tabs.filter(function (tab) {
  41218. return !tab.disabled;
  41219. }).map(function (tab) {
  41220. return tab.key;
  41221. });
  41222. var onOffset = function onOffset(offset) {
  41223. var currentIndex = enabledTabs.indexOf(focusKey || activeKey);
  41224. var len = enabledTabs.length;
  41225. var nextIndex = (currentIndex + offset + len) % len;
  41226. var newKey = enabledTabs[nextIndex];
  41227. setFocusKey(newKey);
  41228. };
  41229. var handleRemoveTab = function handleRemoveTab(removalTabKey, e) {
  41230. var removeIndex = enabledTabs.indexOf(removalTabKey);
  41231. var removeTab = tabs.find(function (tab) {
  41232. return tab.key === removalTabKey;
  41233. });
  41234. var removable = getRemovable(removeTab === null || removeTab === void 0 ? void 0 : removeTab.closable, removeTab === null || removeTab === void 0 ? void 0 : removeTab.closeIcon, editable, removeTab === null || removeTab === void 0 ? void 0 : removeTab.disabled);
  41235. if (removable) {
  41236. e.preventDefault();
  41237. e.stopPropagation();
  41238. editable.onEdit('remove', {
  41239. key: removalTabKey,
  41240. event: e
  41241. });
  41242. // when remove last tab, focus previous tab
  41243. if (removeIndex === enabledTabs.length - 1) {
  41244. onOffset(-1);
  41245. } else {
  41246. onOffset(1);
  41247. }
  41248. }
  41249. };
  41250. var handleMouseDown = function handleMouseDown(key, e) {
  41251. setIsMouse(true);
  41252. // Middle mouse button
  41253. if (e.button === 1) {
  41254. handleRemoveTab(key, e);
  41255. }
  41256. };
  41257. var handleKeyDown = function handleKeyDown(e) {
  41258. var code = e.code;
  41259. var isRTL = rtl && tabPositionTopOrBottom;
  41260. var firstEnabledTab = enabledTabs[0];
  41261. var lastEnabledTab = enabledTabs[enabledTabs.length - 1];
  41262. switch (code) {
  41263. // LEFT
  41264. case 'ArrowLeft':
  41265. {
  41266. if (tabPositionTopOrBottom) {
  41267. onOffset(isRTL ? 1 : -1);
  41268. }
  41269. break;
  41270. }
  41271. // RIGHT
  41272. case 'ArrowRight':
  41273. {
  41274. if (tabPositionTopOrBottom) {
  41275. onOffset(isRTL ? -1 : 1);
  41276. }
  41277. break;
  41278. }
  41279. // UP
  41280. case 'ArrowUp':
  41281. {
  41282. e.preventDefault();
  41283. if (!tabPositionTopOrBottom) {
  41284. onOffset(-1);
  41285. }
  41286. break;
  41287. }
  41288. // DOWN
  41289. case 'ArrowDown':
  41290. {
  41291. e.preventDefault();
  41292. if (!tabPositionTopOrBottom) {
  41293. onOffset(1);
  41294. }
  41295. break;
  41296. }
  41297. // HOME
  41298. case 'Home':
  41299. {
  41300. e.preventDefault();
  41301. setFocusKey(firstEnabledTab);
  41302. break;
  41303. }
  41304. // END
  41305. case 'End':
  41306. {
  41307. e.preventDefault();
  41308. setFocusKey(lastEnabledTab);
  41309. break;
  41310. }
  41311. // Enter & Space
  41312. case 'Enter':
  41313. case 'Space':
  41314. {
  41315. e.preventDefault();
  41316. onTabClick(focusKey !== null && focusKey !== void 0 ? focusKey : activeKey, e);
  41317. break;
  41318. }
  41319. // Backspace
  41320. case 'Backspace':
  41321. case 'Delete':
  41322. {
  41323. handleRemoveTab(focusKey, e);
  41324. break;
  41325. }
  41326. }
  41327. };
  41328. // ========================== Tab ==========================
  41329. var tabNodeStyle = {};
  41330. if (tabPositionTopOrBottom) {
  41331. tabNodeStyle[rtl ? 'marginRight' : 'marginLeft'] = tabBarGutter;
  41332. } else {
  41333. tabNodeStyle.marginTop = tabBarGutter;
  41334. }
  41335. var tabNodes = tabs.map(function (tab, i) {
  41336. var key = tab.key;
  41337. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_TabNode, {
  41338. id: id,
  41339. prefixCls: prefixCls,
  41340. key: key,
  41341. tab: tab
  41342. /* first node should not have margin left */,
  41343. style: i === 0 ? undefined : tabNodeStyle,
  41344. closable: tab.closable,
  41345. editable: editable,
  41346. active: key === activeKey,
  41347. focus: key === focusKey,
  41348. renderWrapper: children,
  41349. removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel,
  41350. tabCount: enabledTabs.length,
  41351. currentPosition: i + 1,
  41352. onClick: function onClick(e) {
  41353. onTabClick(key, e);
  41354. },
  41355. onKeyDown: handleKeyDown,
  41356. onFocus: function onFocus() {
  41357. if (!isMouse) {
  41358. setFocusKey(key);
  41359. }
  41360. scrollToTab(key);
  41361. doLockAnimation();
  41362. if (!tabsWrapperRef.current) {
  41363. return;
  41364. }
  41365. // Focus element will make scrollLeft change which we should reset back
  41366. if (!rtl) {
  41367. tabsWrapperRef.current.scrollLeft = 0;
  41368. }
  41369. tabsWrapperRef.current.scrollTop = 0;
  41370. },
  41371. onBlur: function onBlur() {
  41372. setFocusKey(undefined);
  41373. },
  41374. onMouseDown: function onMouseDown(e) {
  41375. return handleMouseDown(key, e);
  41376. },
  41377. onMouseUp: function onMouseUp() {
  41378. setIsMouse(false);
  41379. }
  41380. });
  41381. });
  41382. // Update buttons records
  41383. var updateTabSizes = function updateTabSizes() {
  41384. return setTabSizes(function () {
  41385. var _tabListRef$current;
  41386. var newSizes = new Map();
  41387. var listRect = (_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.getBoundingClientRect();
  41388. tabs.forEach(function (_ref2) {
  41389. var _tabListRef$current2;
  41390. var key = _ref2.key;
  41391. var btnNode = (_tabListRef$current2 = tabListRef.current) === null || _tabListRef$current2 === void 0 ? void 0 : _tabListRef$current2.querySelector("[data-node-key=\"".concat(genDataNodeKey(key), "\"]"));
  41392. if (btnNode) {
  41393. var _getTabSize = getTabSize(btnNode, listRect),
  41394. _getTabSize2 = (0,slicedToArray["default"])(_getTabSize, 4),
  41395. width = _getTabSize2[0],
  41396. height = _getTabSize2[1],
  41397. left = _getTabSize2[2],
  41398. top = _getTabSize2[3];
  41399. newSizes.set(key, {
  41400. width: width,
  41401. height: height,
  41402. left: left,
  41403. top: top
  41404. });
  41405. }
  41406. });
  41407. return newSizes;
  41408. });
  41409. };
  41410. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41411. updateTabSizes();
  41412. }, [tabs.map(function (tab) {
  41413. return tab.key;
  41414. }).join('_')]);
  41415. var onListHolderResize = useUpdate(function () {
  41416. // Update wrapper records
  41417. var containerSize = getSize(containerRef);
  41418. var extraLeftSize = getSize(extraLeftRef);
  41419. var extraRightSize = getSize(extraRightRef);
  41420. setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]);
  41421. var newAddSize = getSize(innerAddButtonRef);
  41422. setAddSize(newAddSize);
  41423. var newOperationSize = getSize(operationsRef);
  41424. setOperationSize(newOperationSize);
  41425. // Which includes add button size
  41426. var tabContentFullSize = getSize(tabListRef);
  41427. setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]);
  41428. // Update buttons records
  41429. updateTabSizes();
  41430. });
  41431. // ======================== Dropdown =======================
  41432. var startHiddenTabs = tabs.slice(0, visibleStart);
  41433. var endHiddenTabs = tabs.slice(visibleEnd + 1);
  41434. var hiddenTabs = [].concat((0,toConsumableArray["default"])(startHiddenTabs), (0,toConsumableArray["default"])(endHiddenTabs));
  41435. // =================== Link & Operations ===================
  41436. var activeTabOffset = tabOffsets.get(activeKey);
  41437. var _useIndicator = hooks_useIndicator({
  41438. activeTabOffset: activeTabOffset,
  41439. horizontal: tabPositionTopOrBottom,
  41440. indicator: indicator,
  41441. rtl: rtl
  41442. }),
  41443. indicatorStyle = _useIndicator.style;
  41444. // ========================= Effect ========================
  41445. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41446. scrollToTab();
  41447. }, [activeKey, transformMin, transformMax, util_stringify(activeTabOffset), util_stringify(tabOffsets), tabPositionTopOrBottom]);
  41448. // Should recalculate when rtl changed
  41449. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41450. onListHolderResize();
  41451. // eslint-disable-next-line
  41452. }, [rtl]);
  41453. // ========================= Render ========================
  41454. var hasDropdown = !!hiddenTabs.length;
  41455. var wrapPrefix = "".concat(prefixCls, "-nav-wrap");
  41456. var pingLeft;
  41457. var pingRight;
  41458. var pingTop;
  41459. var pingBottom;
  41460. if (tabPositionTopOrBottom) {
  41461. if (rtl) {
  41462. pingRight = transformLeft > 0;
  41463. pingLeft = transformLeft !== transformMax;
  41464. } else {
  41465. pingLeft = transformLeft < 0;
  41466. pingRight = transformLeft !== transformMin;
  41467. }
  41468. } else {
  41469. pingTop = transformTop < 0;
  41470. pingBottom = transformTop !== transformMin;
  41471. }
  41472. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  41473. onResize: onListHolderResize
  41474. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41475. ref: (0,es_ref.useComposeRef)(ref, containerRef),
  41476. role: "tablist",
  41477. "aria-orientation": tabPositionTopOrBottom ? 'horizontal' : 'vertical',
  41478. className: classnames_default()("".concat(prefixCls, "-nav"), className),
  41479. style: style,
  41480. onKeyDown: function onKeyDown() {
  41481. // No need animation when use keyboard
  41482. doLockAnimation();
  41483. }
  41484. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_ExtraContent, {
  41485. ref: extraLeftRef,
  41486. position: "left",
  41487. extra: extra,
  41488. prefixCls: prefixCls
  41489. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  41490. onResize: onListHolderResize
  41491. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41492. className: classnames_default()(wrapPrefix, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(wrapPrefix, "-ping-left"), pingLeft), "".concat(wrapPrefix, "-ping-right"), pingRight), "".concat(wrapPrefix, "-ping-top"), pingTop), "".concat(wrapPrefix, "-ping-bottom"), pingBottom)),
  41493. ref: tabsWrapperRef
  41494. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  41495. onResize: onListHolderResize
  41496. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41497. ref: tabListRef,
  41498. className: "".concat(prefixCls, "-nav-list"),
  41499. style: {
  41500. transform: "translate(".concat(transformLeft, "px, ").concat(transformTop, "px)"),
  41501. transition: lockAnimation ? 'none' : undefined
  41502. }
  41503. }, tabNodes, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_AddButton, {
  41504. ref: innerAddButtonRef,
  41505. prefixCls: prefixCls,
  41506. locale: locale,
  41507. editable: editable,
  41508. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, tabNodes.length === 0 ? undefined : tabNodeStyle), {}, {
  41509. visibility: hasDropdown ? 'hidden' : null
  41510. })
  41511. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41512. className: classnames_default()("".concat(prefixCls, "-ink-bar"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-ink-bar-animated"), animated.inkBar)),
  41513. style: indicatorStyle
  41514. }))))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_OperationNode, (0,esm_extends["default"])({}, props, {
  41515. removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel,
  41516. ref: operationsRef,
  41517. prefixCls: prefixCls,
  41518. tabs: hiddenTabs,
  41519. className: !hasDropdown && operationsHiddenClassName,
  41520. tabMoving: !!lockAnimation
  41521. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_ExtraContent, {
  41522. ref: extraRightRef,
  41523. position: "right",
  41524. extra: extra,
  41525. prefixCls: prefixCls
  41526. })));
  41527. /* eslint-enable */
  41528. });
  41529. /* harmony default export */ var es_TabNavList = (TabNavList);
  41530. ;// ./node_modules/rc-tabs/es/TabPanelList/TabPane.js
  41531. var TabPane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  41532. var prefixCls = props.prefixCls,
  41533. className = props.className,
  41534. style = props.style,
  41535. id = props.id,
  41536. active = props.active,
  41537. tabKey = props.tabKey,
  41538. children = props.children;
  41539. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41540. id: id && "".concat(id, "-panel-").concat(tabKey),
  41541. role: "tabpanel",
  41542. tabIndex: active ? 0 : -1,
  41543. "aria-labelledby": id && "".concat(id, "-tab-").concat(tabKey),
  41544. "aria-hidden": !active,
  41545. style: style,
  41546. className: classnames_default()(prefixCls, active && "".concat(prefixCls, "-active"), className),
  41547. ref: ref
  41548. }, children);
  41549. });
  41550. if (true) {
  41551. TabPane.displayName = 'TabPane';
  41552. }
  41553. /* harmony default export */ var TabPanelList_TabPane = (TabPane);
  41554. ;// ./node_modules/rc-tabs/es/TabNavList/Wrapper.js
  41555. var Wrapper_excluded = ["renderTabBar"],
  41556. Wrapper_excluded2 = ["label", "key"];
  41557. // zombieJ: To compatible with `renderTabBar` usage.
  41558. // We have to create a TabNavList components.
  41559. var TabNavListWrapper = function TabNavListWrapper(_ref) {
  41560. var renderTabBar = _ref.renderTabBar,
  41561. restProps = (0,objectWithoutProperties["default"])(_ref, Wrapper_excluded);
  41562. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TabContext),
  41563. tabs = _React$useContext.tabs;
  41564. if (renderTabBar) {
  41565. var tabNavBarProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, restProps), {}, {
  41566. // Legacy support. We do not use this actually
  41567. panes: tabs.map(function (_ref2) {
  41568. var label = _ref2.label,
  41569. key = _ref2.key,
  41570. restTabProps = (0,objectWithoutProperties["default"])(_ref2, Wrapper_excluded2);
  41571. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabPanelList_TabPane, (0,esm_extends["default"])({
  41572. tab: label,
  41573. key: key,
  41574. tabKey: key
  41575. }, restTabProps));
  41576. })
  41577. });
  41578. return renderTabBar(tabNavBarProps, es_TabNavList);
  41579. }
  41580. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TabNavList, restProps);
  41581. };
  41582. if (true) {
  41583. TabNavListWrapper.displayName = 'TabNavListWrapper';
  41584. }
  41585. /* harmony default export */ var TabNavList_Wrapper = (TabNavListWrapper);
  41586. ;// ./node_modules/rc-tabs/es/TabPanelList/index.js
  41587. var TabPanelList_excluded = ["key", "forceRender", "style", "className", "destroyInactiveTabPane"];
  41588. var TabPanelList = function TabPanelList(props) {
  41589. var id = props.id,
  41590. activeKey = props.activeKey,
  41591. animated = props.animated,
  41592. tabPosition = props.tabPosition,
  41593. destroyInactiveTabPane = props.destroyInactiveTabPane;
  41594. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TabContext),
  41595. prefixCls = _React$useContext.prefixCls,
  41596. tabs = _React$useContext.tabs;
  41597. var tabPaneAnimated = animated.tabPane;
  41598. var tabPanePrefixCls = "".concat(prefixCls, "-tabpane");
  41599. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41600. className: classnames_default()("".concat(prefixCls, "-content-holder"))
  41601. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  41602. className: classnames_default()("".concat(prefixCls, "-content"), "".concat(prefixCls, "-content-").concat(tabPosition), (0,defineProperty["default"])({}, "".concat(prefixCls, "-content-animated"), tabPaneAnimated))
  41603. }, tabs.map(function (item) {
  41604. var key = item.key,
  41605. forceRender = item.forceRender,
  41606. paneStyle = item.style,
  41607. paneClassName = item.className,
  41608. itemDestroyInactiveTabPane = item.destroyInactiveTabPane,
  41609. restTabProps = (0,objectWithoutProperties["default"])(item, TabPanelList_excluded);
  41610. var active = key === activeKey;
  41611. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
  41612. key: key,
  41613. visible: active,
  41614. forceRender: forceRender,
  41615. removeOnLeave: !!(destroyInactiveTabPane || itemDestroyInactiveTabPane),
  41616. leavedClassName: "".concat(tabPanePrefixCls, "-hidden")
  41617. }, animated.tabPaneMotion), function (_ref, ref) {
  41618. var motionStyle = _ref.style,
  41619. motionClassName = _ref.className;
  41620. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabPanelList_TabPane, (0,esm_extends["default"])({}, restTabProps, {
  41621. prefixCls: tabPanePrefixCls,
  41622. id: id,
  41623. tabKey: key,
  41624. animated: tabPaneAnimated,
  41625. active: active,
  41626. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, paneStyle), motionStyle),
  41627. className: classnames_default()(paneClassName, motionClassName),
  41628. ref: ref
  41629. }));
  41630. });
  41631. })));
  41632. };
  41633. /* harmony default export */ var es_TabPanelList = (TabPanelList);
  41634. ;// ./node_modules/rc-tabs/es/hooks/useAnimateConfig.js
  41635. function useAnimateConfig() {
  41636. var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  41637. inkBar: true,
  41638. tabPane: false
  41639. };
  41640. var mergedAnimated;
  41641. if (animated === false) {
  41642. mergedAnimated = {
  41643. inkBar: false,
  41644. tabPane: false
  41645. };
  41646. } else if (animated === true) {
  41647. mergedAnimated = {
  41648. inkBar: true,
  41649. tabPane: false
  41650. };
  41651. } else {
  41652. mergedAnimated = (0,objectSpread2["default"])({
  41653. inkBar: true
  41654. }, (0,esm_typeof["default"])(animated) === 'object' ? animated : {});
  41655. }
  41656. // Enable tabPane animation if provide motion
  41657. if (mergedAnimated.tabPaneMotion && mergedAnimated.tabPane === undefined) {
  41658. mergedAnimated.tabPane = true;
  41659. }
  41660. if (!mergedAnimated.tabPaneMotion && mergedAnimated.tabPane) {
  41661. if (true) {
  41662. (0,warning["default"])(false, '`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work.');
  41663. }
  41664. mergedAnimated.tabPane = false;
  41665. }
  41666. return mergedAnimated;
  41667. }
  41668. ;// ./node_modules/rc-tabs/es/Tabs.js
  41669. var Tabs_excluded = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"];
  41670. // Accessibility https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role
  41671. /**
  41672. * Should added antd:
  41673. * - type
  41674. *
  41675. * Removed:
  41676. * - onNextClick
  41677. * - onPrevClick
  41678. * - keyboard
  41679. */
  41680. // Used for accessibility
  41681. var Tabs_uuid = 0;
  41682. var Tabs = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  41683. var id = props.id,
  41684. _props$prefixCls = props.prefixCls,
  41685. prefixCls = _props$prefixCls === void 0 ? 'rc-tabs' : _props$prefixCls,
  41686. className = props.className,
  41687. items = props.items,
  41688. direction = props.direction,
  41689. activeKey = props.activeKey,
  41690. defaultActiveKey = props.defaultActiveKey,
  41691. editable = props.editable,
  41692. animated = props.animated,
  41693. _props$tabPosition = props.tabPosition,
  41694. tabPosition = _props$tabPosition === void 0 ? 'top' : _props$tabPosition,
  41695. tabBarGutter = props.tabBarGutter,
  41696. tabBarStyle = props.tabBarStyle,
  41697. tabBarExtraContent = props.tabBarExtraContent,
  41698. locale = props.locale,
  41699. more = props.more,
  41700. destroyInactiveTabPane = props.destroyInactiveTabPane,
  41701. renderTabBar = props.renderTabBar,
  41702. onChange = props.onChange,
  41703. onTabClick = props.onTabClick,
  41704. onTabScroll = props.onTabScroll,
  41705. getPopupContainer = props.getPopupContainer,
  41706. popupClassName = props.popupClassName,
  41707. indicator = props.indicator,
  41708. restProps = (0,objectWithoutProperties["default"])(props, Tabs_excluded);
  41709. var tabs = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  41710. return (items || []).filter(function (item) {
  41711. return item && (0,esm_typeof["default"])(item) === 'object' && 'key' in item;
  41712. });
  41713. }, [items]);
  41714. var rtl = direction === 'rtl';
  41715. var mergedAnimated = useAnimateConfig(animated);
  41716. // ======================== Mobile ========================
  41717. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  41718. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  41719. mobile = _useState2[0],
  41720. setMobile = _useState2[1];
  41721. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41722. // Only update on the client side
  41723. setMobile(isMobile());
  41724. }, []);
  41725. // ====================== Active Key ======================
  41726. var _useMergedState = (0,useMergedState["default"])(function () {
  41727. var _tabs$;
  41728. return (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key;
  41729. }, {
  41730. value: activeKey,
  41731. defaultValue: defaultActiveKey
  41732. }),
  41733. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  41734. mergedActiveKey = _useMergedState2[0],
  41735. setMergedActiveKey = _useMergedState2[1];
  41736. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
  41737. return tabs.findIndex(function (tab) {
  41738. return tab.key === mergedActiveKey;
  41739. });
  41740. }),
  41741. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  41742. activeIndex = _useState4[0],
  41743. setActiveIndex = _useState4[1];
  41744. // Reset active key if not exist anymore
  41745. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41746. var newActiveIndex = tabs.findIndex(function (tab) {
  41747. return tab.key === mergedActiveKey;
  41748. });
  41749. if (newActiveIndex === -1) {
  41750. var _tabs$newActiveIndex;
  41751. newActiveIndex = Math.max(0, Math.min(activeIndex, tabs.length - 1));
  41752. setMergedActiveKey((_tabs$newActiveIndex = tabs[newActiveIndex]) === null || _tabs$newActiveIndex === void 0 ? void 0 : _tabs$newActiveIndex.key);
  41753. }
  41754. setActiveIndex(newActiveIndex);
  41755. }, [tabs.map(function (tab) {
  41756. return tab.key;
  41757. }).join('_'), mergedActiveKey, activeIndex]);
  41758. // ===================== Accessibility ====================
  41759. var _useMergedState3 = (0,useMergedState["default"])(null, {
  41760. value: id
  41761. }),
  41762. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  41763. mergedId = _useMergedState4[0],
  41764. setMergedId = _useMergedState4[1];
  41765. // Async generate id to avoid ssr mapping failed
  41766. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  41767. if (!id) {
  41768. setMergedId("rc-tabs-".concat( false ? 0 : Tabs_uuid));
  41769. Tabs_uuid += 1;
  41770. }
  41771. }, []);
  41772. // ======================== Events ========================
  41773. function onInternalTabClick(key, e) {
  41774. onTabClick === null || onTabClick === void 0 || onTabClick(key, e);
  41775. var isActiveChanged = key !== mergedActiveKey;
  41776. setMergedActiveKey(key);
  41777. if (isActiveChanged) {
  41778. onChange === null || onChange === void 0 || onChange(key);
  41779. }
  41780. }
  41781. // ======================== Render ========================
  41782. var sharedProps = {
  41783. id: mergedId,
  41784. activeKey: mergedActiveKey,
  41785. animated: mergedAnimated,
  41786. tabPosition: tabPosition,
  41787. rtl: rtl,
  41788. mobile: mobile
  41789. };
  41790. var tabNavBarProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedProps), {}, {
  41791. editable: editable,
  41792. locale: locale,
  41793. more: more,
  41794. tabBarGutter: tabBarGutter,
  41795. onTabClick: onInternalTabClick,
  41796. onTabScroll: onTabScroll,
  41797. extra: tabBarExtraContent,
  41798. style: tabBarStyle,
  41799. panes: null,
  41800. getPopupContainer: getPopupContainer,
  41801. popupClassName: popupClassName,
  41802. indicator: indicator
  41803. });
  41804. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabContext.Provider, {
  41805. value: {
  41806. tabs: tabs,
  41807. prefixCls: prefixCls
  41808. }
  41809. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  41810. ref: ref,
  41811. id: id,
  41812. className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(tabPosition), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-mobile"), mobile), "".concat(prefixCls, "-editable"), editable), "".concat(prefixCls, "-rtl"), rtl), className)
  41813. }, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TabNavList_Wrapper, (0,esm_extends["default"])({}, tabNavBarProps, {
  41814. renderTabBar: renderTabBar
  41815. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TabPanelList, (0,esm_extends["default"])({
  41816. destroyInactiveTabPane: destroyInactiveTabPane
  41817. }, sharedProps, {
  41818. animated: mergedAnimated
  41819. }))));
  41820. });
  41821. if (true) {
  41822. Tabs.displayName = 'Tabs';
  41823. }
  41824. /* harmony default export */ var es_Tabs = (Tabs);
  41825. ;// ./node_modules/rc-tabs/es/index.js
  41826. /* harmony default export */ var rc_tabs_es = (es_Tabs);
  41827. ;// ./components/tabs/hooks/useAnimateConfig.ts
  41828. const motion = {
  41829. motionAppear: false,
  41830. motionEnter: true,
  41831. motionLeave: true
  41832. };
  41833. function useAnimateConfig_useAnimateConfig(prefixCls, animated = {
  41834. inkBar: true,
  41835. tabPane: false
  41836. }) {
  41837. let mergedAnimated;
  41838. if (animated === false) {
  41839. mergedAnimated = {
  41840. inkBar: false,
  41841. tabPane: false
  41842. };
  41843. } else if (animated === true) {
  41844. mergedAnimated = {
  41845. inkBar: true,
  41846. tabPane: true
  41847. };
  41848. } else {
  41849. mergedAnimated = Object.assign({
  41850. inkBar: true
  41851. }, typeof animated === 'object' ? animated : {});
  41852. }
  41853. if (mergedAnimated.tabPane) {
  41854. mergedAnimated.tabPaneMotion = Object.assign(Object.assign({}, motion), {
  41855. motionName: (0,_util_motion.getTransitionName)(prefixCls, 'switch')
  41856. });
  41857. }
  41858. return mergedAnimated;
  41859. }
  41860. ;// ./components/tabs/hooks/useLegacyItems.ts
  41861. var useLegacyItems_rest = undefined && undefined.__rest || function (s, e) {
  41862. var t = {};
  41863. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  41864. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  41865. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  41866. }
  41867. return t;
  41868. };
  41869. function filter(items) {
  41870. return items.filter(item => item);
  41871. }
  41872. function useLegacyItems(items, children) {
  41873. if (true) {
  41874. const warning = (0,_util_warning.devUseWarning)('Tabs');
  41875. warning.deprecated(!children, 'Tabs.TabPane', 'items');
  41876. }
  41877. if (items) {
  41878. return items.map(item => {
  41879. var _a;
  41880. const mergedDestroyOnHidden = (_a = item.destroyOnHidden) !== null && _a !== void 0 ? _a : item.destroyInactiveTabPane;
  41881. return Object.assign(Object.assign({}, item), {
  41882. // TODO: In the future, destroyInactiveTabPane in rc-tabs needs to be upgrade to destroyOnHidden
  41883. destroyInactiveTabPane: mergedDestroyOnHidden
  41884. });
  41885. });
  41886. }
  41887. const childrenItems = (0,toArray["default"])(children).map(node => {
  41888. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node)) {
  41889. const {
  41890. key,
  41891. props
  41892. } = node;
  41893. const _a = props || {},
  41894. {
  41895. tab
  41896. } = _a,
  41897. restProps = useLegacyItems_rest(_a, ["tab"]);
  41898. const item = Object.assign(Object.assign({
  41899. key: String(key)
  41900. }, restProps), {
  41901. label: tab
  41902. });
  41903. return item;
  41904. }
  41905. return null;
  41906. });
  41907. return filter(childrenItems);
  41908. }
  41909. /* harmony default export */ var hooks_useLegacyItems = (useLegacyItems);
  41910. // EXTERNAL MODULE: ./components/tabs/style/index.ts + 1 modules
  41911. var tabs_style = __webpack_require__("./components/tabs/style/index.ts");
  41912. ;// ./components/tabs/TabPane.ts
  41913. const TabPane_TabPane = () => null;
  41914. if (true) {
  41915. TabPane_TabPane.displayName = 'DeprecatedTabPane';
  41916. }
  41917. /* harmony default export */ var tabs_TabPane = (TabPane_TabPane);
  41918. ;// ./components/tabs/index.tsx
  41919. var tabs_rest = undefined && undefined.__rest || function (s, e) {
  41920. var t = {};
  41921. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  41922. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  41923. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  41924. }
  41925. return t;
  41926. };
  41927. const InternalTabs = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  41928. var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
  41929. const {
  41930. type,
  41931. className,
  41932. rootClassName,
  41933. size: customSize,
  41934. onEdit,
  41935. hideAdd,
  41936. centered,
  41937. addIcon,
  41938. removeIcon,
  41939. moreIcon,
  41940. more,
  41941. popupClassName,
  41942. children,
  41943. items,
  41944. animated,
  41945. style,
  41946. indicatorSize,
  41947. indicator,
  41948. destroyInactiveTabPane,
  41949. destroyOnHidden
  41950. } = props,
  41951. otherProps = tabs_rest(props, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator", "destroyInactiveTabPane", "destroyOnHidden"]);
  41952. const {
  41953. prefixCls: customizePrefixCls
  41954. } = otherProps;
  41955. const {
  41956. direction,
  41957. tabs,
  41958. getPrefixCls,
  41959. getPopupContainer
  41960. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  41961. const prefixCls = getPrefixCls('tabs', customizePrefixCls);
  41962. const rootCls = hooks_useCSSVarCls(prefixCls);
  41963. const [wrapCSSVar, hashId, cssVarCls] = (0,tabs_style["default"])(prefixCls, rootCls);
  41964. const tabsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  41965. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  41966. nativeElement: tabsRef.current
  41967. }));
  41968. let editable;
  41969. if (type === 'editable-card') {
  41970. editable = {
  41971. onEdit: (editType, {
  41972. key,
  41973. event
  41974. }) => {
  41975. onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === 'add' ? event : key, editType);
  41976. },
  41977. removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null),
  41978. addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PlusOutlined, null),
  41979. showAdd: hideAdd !== true
  41980. };
  41981. }
  41982. const rootPrefixCls = getPrefixCls();
  41983. if (true) {
  41984. const warning = (0,_util_warning.devUseWarning)('Tabs');
  41985. true ? warning(!('onPrevClick' in props) && !('onNextClick' in props), 'breaking', '`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.') : 0;
  41986. true ? warning(!(indicatorSize || (tabs === null || tabs === void 0 ? void 0 : tabs.indicatorSize)), 'deprecated', '`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead.') : 0;
  41987. warning.deprecated(!('destroyInactiveTabPane' in props || (items === null || items === void 0 ? void 0 : items.some(item => 'destroyInactiveTabPane' in item))), 'destroyInactiveTabPane', 'destroyOnHidden');
  41988. }
  41989. const size = (0,useSize["default"])(customSize);
  41990. const mergedItems = hooks_useLegacyItems(items, children);
  41991. const mergedAnimated = useAnimateConfig_useAnimateConfig(prefixCls, animated);
  41992. const mergedStyle = Object.assign(Object.assign({}, tabs === null || tabs === void 0 ? void 0 : tabs.style), style);
  41993. const mergedIndicator = {
  41994. align: (_b = indicator === null || indicator === void 0 ? void 0 : indicator.align) !== null && _b !== void 0 ? _b : (_c = tabs === null || tabs === void 0 ? void 0 : tabs.indicator) === null || _c === void 0 ? void 0 : _c.align,
  41995. size: (_g = (_e = (_d = indicator === null || indicator === void 0 ? void 0 : indicator.size) !== null && _d !== void 0 ? _d : indicatorSize) !== null && _e !== void 0 ? _e : (_f = tabs === null || tabs === void 0 ? void 0 : tabs.indicator) === null || _f === void 0 ? void 0 : _f.size) !== null && _g !== void 0 ? _g : tabs === null || tabs === void 0 ? void 0 : tabs.indicatorSize
  41996. };
  41997. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tabs_es, Object.assign({
  41998. ref: tabsRef,
  41999. direction: direction,
  42000. getPopupContainer: getPopupContainer
  42001. }, otherProps, {
  42002. items: mergedItems,
  42003. className: classnames_default()({
  42004. [`${prefixCls}-${size}`]: size,
  42005. [`${prefixCls}-card`]: ['card', 'editable-card'].includes(type),
  42006. [`${prefixCls}-editable-card`]: type === 'editable-card',
  42007. [`${prefixCls}-centered`]: centered
  42008. }, tabs === null || tabs === void 0 ? void 0 : tabs.className, className, rootClassName, hashId, cssVarCls, rootCls),
  42009. popupClassName: classnames_default()(popupClassName, hashId, cssVarCls, rootCls),
  42010. style: mergedStyle,
  42011. editable: editable,
  42012. more: Object.assign({
  42013. icon: (_l = (_k = (_j = (_h = tabs === null || tabs === void 0 ? void 0 : tabs.more) === null || _h === void 0 ? void 0 : _h.icon) !== null && _j !== void 0 ? _j : tabs === null || tabs === void 0 ? void 0 : tabs.moreIcon) !== null && _k !== void 0 ? _k : moreIcon) !== null && _l !== void 0 ? _l : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EllipsisOutlined, null),
  42014. transitionName: `${rootPrefixCls}-slide-up`
  42015. }, more),
  42016. prefixCls: prefixCls,
  42017. animated: mergedAnimated,
  42018. indicator: mergedIndicator,
  42019. // TODO: In the future, destroyInactiveTabPane in rc-tabs needs to be upgrade to destroyOnHidden
  42020. destroyInactiveTabPane: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyInactiveTabPane
  42021. })));
  42022. });
  42023. const tabs_Tabs = InternalTabs;
  42024. tabs_Tabs.TabPane = tabs_TabPane;
  42025. if (true) {
  42026. tabs_Tabs.displayName = 'Tabs';
  42027. }
  42028. /* harmony default export */ var components_tabs = (tabs_Tabs);
  42029. ;// ./components/card/Grid.tsx
  42030. var Grid_rest = undefined && undefined.__rest || function (s, e) {
  42031. var t = {};
  42032. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  42033. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  42034. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  42035. }
  42036. return t;
  42037. };
  42038. const Grid = _a => {
  42039. var {
  42040. prefixCls,
  42041. className,
  42042. hoverable = true
  42043. } = _a,
  42044. props = Grid_rest(_a, ["prefixCls", "className", "hoverable"]);
  42045. const {
  42046. getPrefixCls
  42047. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  42048. const prefix = getPrefixCls('card', prefixCls);
  42049. const classString = classnames_default()(`${prefix}-grid`, className, {
  42050. [`${prefix}-grid-hoverable`]: hoverable
  42051. });
  42052. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, props, {
  42053. className: classString
  42054. }));
  42055. };
  42056. /* harmony default export */ var card_Grid = (Grid);
  42057. // EXTERNAL MODULE: ./components/card/style/index.ts
  42058. var card_style = __webpack_require__("./components/card/style/index.ts");
  42059. ;// ./components/card/Card.tsx
  42060. var Card_rest = undefined && undefined.__rest || function (s, e) {
  42061. var t = {};
  42062. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  42063. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  42064. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  42065. }
  42066. return t;
  42067. };
  42068. const ActionNode = props => {
  42069. const {
  42070. actionClasses,
  42071. actions = [],
  42072. actionStyle
  42073. } = props;
  42074. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  42075. className: actionClasses,
  42076. style: actionStyle
  42077. }, actions.map((action, index) => {
  42078. // Move this out since eslint not allow index key
  42079. // And eslint-disable makes conflict with rollup
  42080. // ref https://github.com/ant-design/ant-design/issues/46022
  42081. const key = `action-${index}`;
  42082. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  42083. style: {
  42084. width: `${100 / actions.length}%`
  42085. },
  42086. key: key
  42087. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, action));
  42088. }));
  42089. };
  42090. const Card = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  42091. const {
  42092. prefixCls: customizePrefixCls,
  42093. className,
  42094. rootClassName,
  42095. style,
  42096. extra,
  42097. headStyle = {},
  42098. bodyStyle = {},
  42099. title,
  42100. loading,
  42101. bordered,
  42102. variant: customVariant,
  42103. size: customizeSize,
  42104. type,
  42105. cover,
  42106. actions,
  42107. tabList,
  42108. children,
  42109. activeTabKey,
  42110. defaultActiveTabKey,
  42111. tabBarExtraContent,
  42112. hoverable,
  42113. tabProps = {},
  42114. classNames: customClassNames,
  42115. styles: customStyles
  42116. } = props,
  42117. others = Card_rest(props, ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "variant", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"]);
  42118. const {
  42119. getPrefixCls,
  42120. direction,
  42121. card
  42122. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  42123. const [variant] = useVariants('card', customVariant, bordered);
  42124. // =================Warning===================
  42125. if (true) {
  42126. const warning = (0,_util_warning.devUseWarning)('Card');
  42127. [['headStyle', 'styles.header'], ['bodyStyle', 'styles.body'], ['bordered', 'variant']].forEach(([deprecatedName, newName]) => {
  42128. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  42129. });
  42130. }
  42131. const onTabChange = key => {
  42132. var _a;
  42133. (_a = props.onTabChange) === null || _a === void 0 ? void 0 : _a.call(props, key);
  42134. };
  42135. const moduleClass = moduleName => {
  42136. var _a;
  42137. return classnames_default()((_a = card === null || card === void 0 ? void 0 : card.classNames) === null || _a === void 0 ? void 0 : _a[moduleName], customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames[moduleName]);
  42138. };
  42139. const moduleStyle = moduleName => {
  42140. var _a;
  42141. return Object.assign(Object.assign({}, (_a = card === null || card === void 0 ? void 0 : card.styles) === null || _a === void 0 ? void 0 : _a[moduleName]), customStyles === null || customStyles === void 0 ? void 0 : customStyles[moduleName]);
  42142. };
  42143. const isContainGrid = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  42144. let containGrid = false;
  42145. external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.forEach(children, element => {
  42146. if ((element === null || element === void 0 ? void 0 : element.type) === card_Grid) {
  42147. containGrid = true;
  42148. }
  42149. });
  42150. return containGrid;
  42151. }, [children]);
  42152. const prefixCls = getPrefixCls('card', customizePrefixCls);
  42153. const [wrapCSSVar, hashId, cssVarCls] = (0,card_style["default"])(prefixCls);
  42154. const loadingBlock = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
  42155. loading: true,
  42156. active: true,
  42157. paragraph: {
  42158. rows: 4
  42159. },
  42160. title: false
  42161. }, children);
  42162. const hasActiveTabKey = activeTabKey !== undefined;
  42163. const extraProps = Object.assign(Object.assign({}, tabProps), {
  42164. [hasActiveTabKey ? 'activeKey' : 'defaultActiveKey']: hasActiveTabKey ? activeTabKey : defaultActiveTabKey,
  42165. tabBarExtraContent
  42166. });
  42167. let head;
  42168. const mergedSize = (0,useSize["default"])(customizeSize);
  42169. const tabSize = !mergedSize || mergedSize === 'default' ? 'large' : mergedSize;
  42170. const tabs = tabList ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tabs, Object.assign({
  42171. size: tabSize
  42172. }, extraProps, {
  42173. className: `${prefixCls}-head-tabs`,
  42174. onChange: onTabChange,
  42175. items: tabList.map(_a => {
  42176. var {
  42177. tab
  42178. } = _a,
  42179. item = Card_rest(_a, ["tab"]);
  42180. return Object.assign({
  42181. label: tab
  42182. }, item);
  42183. })
  42184. }))) : null;
  42185. if (title || extra || tabs) {
  42186. const headClasses = classnames_default()(`${prefixCls}-head`, moduleClass('header'));
  42187. const titleClasses = classnames_default()(`${prefixCls}-head-title`, moduleClass('title'));
  42188. const extraClasses = classnames_default()(`${prefixCls}-extra`, moduleClass('extra'));
  42189. const mergedHeadStyle = Object.assign(Object.assign({}, headStyle), moduleStyle('header'));
  42190. head = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42191. className: headClasses,
  42192. style: mergedHeadStyle
  42193. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42194. className: `${prefixCls}-head-wrapper`
  42195. }, title && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42196. className: titleClasses,
  42197. style: moduleStyle('title')
  42198. }, title)), extra && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42199. className: extraClasses,
  42200. style: moduleStyle('extra')
  42201. }, extra))), tabs);
  42202. }
  42203. const coverClasses = classnames_default()(`${prefixCls}-cover`, moduleClass('cover'));
  42204. const coverDom = cover ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42205. className: coverClasses,
  42206. style: moduleStyle('cover')
  42207. }, cover)) : null;
  42208. const bodyClasses = classnames_default()(`${prefixCls}-body`, moduleClass('body'));
  42209. const mergedBodyStyle = Object.assign(Object.assign({}, bodyStyle), moduleStyle('body'));
  42210. const body = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42211. className: bodyClasses,
  42212. style: mergedBodyStyle
  42213. }, loading ? loadingBlock : children);
  42214. const actionClasses = classnames_default()(`${prefixCls}-actions`, moduleClass('actions'));
  42215. const actionDom = (actions === null || actions === void 0 ? void 0 : actions.length) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ActionNode, {
  42216. actionClasses: actionClasses,
  42217. actionStyle: moduleStyle('actions'),
  42218. actions: actions
  42219. })) : null;
  42220. const divProps = (0,omit["default"])(others, ['onTabChange']);
  42221. const classString = classnames_default()(prefixCls, card === null || card === void 0 ? void 0 : card.className, {
  42222. [`${prefixCls}-loading`]: loading,
  42223. [`${prefixCls}-bordered`]: variant !== 'borderless',
  42224. [`${prefixCls}-hoverable`]: hoverable,
  42225. [`${prefixCls}-contain-grid`]: isContainGrid,
  42226. [`${prefixCls}-contain-tabs`]: tabList === null || tabList === void 0 ? void 0 : tabList.length,
  42227. [`${prefixCls}-${mergedSize}`]: mergedSize,
  42228. [`${prefixCls}-type-${type}`]: !!type,
  42229. [`${prefixCls}-rtl`]: direction === 'rtl'
  42230. }, className, rootClassName, hashId, cssVarCls);
  42231. const mergedStyle = Object.assign(Object.assign({}, card === null || card === void 0 ? void 0 : card.style), style);
  42232. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  42233. ref: ref
  42234. }, divProps, {
  42235. className: classString,
  42236. style: mergedStyle
  42237. }), head, coverDom, body, actionDom));
  42238. });
  42239. /* harmony default export */ var card_Card = (Card);
  42240. ;// ./components/card/Meta.tsx
  42241. var Meta_rest = undefined && undefined.__rest || function (s, e) {
  42242. var t = {};
  42243. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  42244. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  42245. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  42246. }
  42247. return t;
  42248. };
  42249. const Meta = props => {
  42250. const {
  42251. prefixCls: customizePrefixCls,
  42252. className,
  42253. avatar,
  42254. title,
  42255. description
  42256. } = props,
  42257. others = Meta_rest(props, ["prefixCls", "className", "avatar", "title", "description"]);
  42258. const {
  42259. getPrefixCls
  42260. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  42261. const prefixCls = getPrefixCls('card', customizePrefixCls);
  42262. const classString = classnames_default()(`${prefixCls}-meta`, className);
  42263. const avatarDom = avatar ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42264. className: `${prefixCls}-meta-avatar`
  42265. }, avatar)) : null;
  42266. const titleDom = title ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42267. className: `${prefixCls}-meta-title`
  42268. }, title)) : null;
  42269. const descriptionDom = description ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42270. className: `${prefixCls}-meta-description`
  42271. }, description)) : null;
  42272. const MetaDetail = titleDom || descriptionDom ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  42273. className: `${prefixCls}-meta-detail`
  42274. }, titleDom, descriptionDom)) : null;
  42275. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
  42276. className: classString
  42277. }), avatarDom, MetaDetail);
  42278. };
  42279. /* harmony default export */ var card_Meta = (Meta);
  42280. ;// ./components/card/index.tsx
  42281. const components_card_Card = card_Card;
  42282. components_card_Card.Grid = card_Grid;
  42283. components_card_Card.Meta = card_Meta;
  42284. if (true) {
  42285. components_card_Card.displayName = 'Card';
  42286. }
  42287. /* harmony default export */ var card = (components_card_Card);
  42288. ;// ./node_modules/@ant-design/react-slick/es/initial-state.js
  42289. var initialState = {
  42290. animating: false,
  42291. autoplaying: null,
  42292. currentDirection: 0,
  42293. currentLeft: null,
  42294. currentSlide: 0,
  42295. direction: 1,
  42296. dragging: false,
  42297. edgeDragged: false,
  42298. initialized: false,
  42299. lazyLoadedList: [],
  42300. listHeight: null,
  42301. listWidth: null,
  42302. scrolling: false,
  42303. slideCount: null,
  42304. slideHeight: null,
  42305. slideWidth: null,
  42306. swipeLeft: null,
  42307. swiped: false,
  42308. // used by swipeEvent. differentites between touch and swipe.
  42309. swiping: false,
  42310. touchObject: {
  42311. startX: 0,
  42312. startY: 0,
  42313. curX: 0,
  42314. curY: 0
  42315. },
  42316. trackStyle: {},
  42317. trackWidth: 0,
  42318. targetSlide: 0
  42319. };
  42320. /* harmony default export */ var initial_state = (initialState);
  42321. ;// ./node_modules/throttle-debounce/esm/index.js
  42322. /* eslint-disable no-undefined,no-param-reassign,no-shadow */
  42323. /**
  42324. * Throttle execution of a function. Especially useful for rate limiting
  42325. * execution of handlers on events like resize and scroll.
  42326. *
  42327. * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
  42328. * are most useful.
  42329. * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
  42330. * as-is, to `callback` when the throttled-function is executed.
  42331. * @param {object} [options] - An object to configure options.
  42332. * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
  42333. * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
  42334. * one final time after the last throttled-function call. (After the throttled-function has not been called for
  42335. * `delay` milliseconds, the internal counter is reset).
  42336. * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
  42337. * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
  42338. * callback will never executed if both noLeading = true and noTrailing = true.
  42339. * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
  42340. * false (at end), schedule `callback` to execute after `delay` ms.
  42341. *
  42342. * @returns {Function} A new, throttled, function.
  42343. */
  42344. function esm_throttle (delay, callback, options) {
  42345. var _ref = options || {},
  42346. _ref$noTrailing = _ref.noTrailing,
  42347. noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
  42348. _ref$noLeading = _ref.noLeading,
  42349. noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
  42350. _ref$debounceMode = _ref.debounceMode,
  42351. debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
  42352. /*
  42353. * After wrapper has stopped being called, this timeout ensures that
  42354. * `callback` is executed at the proper times in `throttle` and `end`
  42355. * debounce modes.
  42356. */
  42357. var timeoutID;
  42358. var cancelled = false;
  42359. // Keep track of the last time `callback` was executed.
  42360. var lastExec = 0;
  42361. // Function to clear existing timeout
  42362. function clearExistingTimeout() {
  42363. if (timeoutID) {
  42364. clearTimeout(timeoutID);
  42365. }
  42366. }
  42367. // Function to cancel next exec
  42368. function cancel(options) {
  42369. var _ref2 = options || {},
  42370. _ref2$upcomingOnly = _ref2.upcomingOnly,
  42371. upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
  42372. clearExistingTimeout();
  42373. cancelled = !upcomingOnly;
  42374. }
  42375. /*
  42376. * The `wrapper` function encapsulates all of the throttling / debouncing
  42377. * functionality and when executed will limit the rate at which `callback`
  42378. * is executed.
  42379. */
  42380. function wrapper() {
  42381. for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
  42382. arguments_[_key] = arguments[_key];
  42383. }
  42384. var self = this;
  42385. var elapsed = Date.now() - lastExec;
  42386. if (cancelled) {
  42387. return;
  42388. }
  42389. // Execute `callback` and update the `lastExec` timestamp.
  42390. function exec() {
  42391. lastExec = Date.now();
  42392. callback.apply(self, arguments_);
  42393. }
  42394. /*
  42395. * If `debounceMode` is true (at begin) this is used to clear the flag
  42396. * to allow future `callback` executions.
  42397. */
  42398. function clear() {
  42399. timeoutID = undefined;
  42400. }
  42401. if (!noLeading && debounceMode && !timeoutID) {
  42402. /*
  42403. * Since `wrapper` is being called for the first time and
  42404. * `debounceMode` is true (at begin), execute `callback`
  42405. * and noLeading != true.
  42406. */
  42407. exec();
  42408. }
  42409. clearExistingTimeout();
  42410. if (debounceMode === undefined && elapsed > delay) {
  42411. if (noLeading) {
  42412. /*
  42413. * In throttle mode with noLeading, if `delay` time has
  42414. * been exceeded, update `lastExec` and schedule `callback`
  42415. * to execute after `delay` ms.
  42416. */
  42417. lastExec = Date.now();
  42418. if (!noTrailing) {
  42419. timeoutID = setTimeout(debounceMode ? clear : exec, delay);
  42420. }
  42421. } else {
  42422. /*
  42423. * In throttle mode without noLeading, if `delay` time has been exceeded, execute
  42424. * `callback`.
  42425. */
  42426. exec();
  42427. }
  42428. } else if (noTrailing !== true) {
  42429. /*
  42430. * In trailing throttle mode, since `delay` time has not been
  42431. * exceeded, schedule `callback` to execute `delay` ms after most
  42432. * recent execution.
  42433. *
  42434. * If `debounceMode` is true (at begin), schedule `clear` to execute
  42435. * after `delay` ms.
  42436. *
  42437. * If `debounceMode` is false (at end), schedule `callback` to
  42438. * execute after `delay` ms.
  42439. */
  42440. timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
  42441. }
  42442. }
  42443. wrapper.cancel = cancel;
  42444. // Return the wrapper function.
  42445. return wrapper;
  42446. }
  42447. /* eslint-disable no-undefined */
  42448. /**
  42449. * Debounce execution of a function. Debouncing, unlike throttling,
  42450. * guarantees that a function is only executed a single time, either at the
  42451. * very beginning of a series of calls, or at the very end.
  42452. *
  42453. * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
  42454. * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
  42455. * to `callback` when the debounced-function is executed.
  42456. * @param {object} [options] - An object to configure options.
  42457. * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
  42458. * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
  42459. * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
  42460. *
  42461. * @returns {Function} A new, debounced function.
  42462. */
  42463. function debounce (delay, callback, options) {
  42464. var _ref = options || {},
  42465. _ref$atBegin = _ref.atBegin,
  42466. atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
  42467. return esm_throttle(delay, callback, {
  42468. debounceMode: atBegin !== false
  42469. });
  42470. }
  42471. //# sourceMappingURL=index.js.map
  42472. ;// ./node_modules/@ant-design/react-slick/es/default-props.js
  42473. var defaultProps = {
  42474. accessibility: true,
  42475. adaptiveHeight: false,
  42476. afterChange: null,
  42477. appendDots: function appendDots(dots) {
  42478. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
  42479. style: {
  42480. display: "block"
  42481. }
  42482. }, dots);
  42483. },
  42484. arrows: true,
  42485. autoplay: false,
  42486. autoplaySpeed: 3000,
  42487. beforeChange: null,
  42488. centerMode: false,
  42489. centerPadding: "50px",
  42490. className: "",
  42491. cssEase: "ease",
  42492. customPaging: function customPaging(i) {
  42493. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", null, i + 1);
  42494. },
  42495. dots: false,
  42496. dotsClass: "slick-dots",
  42497. draggable: true,
  42498. easing: "linear",
  42499. edgeFriction: 0.35,
  42500. fade: false,
  42501. focusOnSelect: false,
  42502. infinite: true,
  42503. initialSlide: 0,
  42504. lazyLoad: null,
  42505. nextArrow: null,
  42506. onEdge: null,
  42507. onInit: null,
  42508. onLazyLoadError: null,
  42509. onReInit: null,
  42510. pauseOnDotsHover: false,
  42511. pauseOnFocus: false,
  42512. pauseOnHover: true,
  42513. prevArrow: null,
  42514. responsive: null,
  42515. rows: 1,
  42516. rtl: false,
  42517. slide: "div",
  42518. slidesPerRow: 1,
  42519. slidesToScroll: 1,
  42520. slidesToShow: 1,
  42521. speed: 500,
  42522. swipe: true,
  42523. swipeEvent: null,
  42524. swipeToSlide: false,
  42525. touchMove: true,
  42526. touchThreshold: 5,
  42527. useCSS: true,
  42528. useTransform: true,
  42529. variableWidth: false,
  42530. vertical: false,
  42531. waitForAnimate: true,
  42532. asNavFor: null
  42533. };
  42534. /* harmony default export */ var default_props = (defaultProps);
  42535. ;// ./node_modules/@ant-design/react-slick/es/utils/innerSliderUtils.js
  42536. function clamp(number, lowerBound, upperBound) {
  42537. return Math.max(lowerBound, Math.min(number, upperBound));
  42538. }
  42539. var safePreventDefault = function safePreventDefault(event) {
  42540. var passiveEvents = ["onTouchStart", "onTouchMove", "onWheel"];
  42541. if (!passiveEvents.includes(event._reactName)) {
  42542. event.preventDefault();
  42543. }
  42544. };
  42545. var getOnDemandLazySlides = function getOnDemandLazySlides(spec) {
  42546. var onDemandSlides = [];
  42547. var startIndex = lazyStartIndex(spec);
  42548. var endIndex = lazyEndIndex(spec);
  42549. for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
  42550. if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {
  42551. onDemandSlides.push(slideIndex);
  42552. }
  42553. }
  42554. return onDemandSlides;
  42555. };
  42556. // return list of slides that need to be present
  42557. var getRequiredLazySlides = function getRequiredLazySlides(spec) {
  42558. var requiredSlides = [];
  42559. var startIndex = lazyStartIndex(spec);
  42560. var endIndex = lazyEndIndex(spec);
  42561. for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
  42562. requiredSlides.push(slideIndex);
  42563. }
  42564. return requiredSlides;
  42565. };
  42566. // startIndex that needs to be present
  42567. var lazyStartIndex = function lazyStartIndex(spec) {
  42568. return spec.currentSlide - lazySlidesOnLeft(spec);
  42569. };
  42570. var lazyEndIndex = function lazyEndIndex(spec) {
  42571. return spec.currentSlide + lazySlidesOnRight(spec);
  42572. };
  42573. var lazySlidesOnLeft = function lazySlidesOnLeft(spec) {
  42574. return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;
  42575. };
  42576. var lazySlidesOnRight = function lazySlidesOnRight(spec) {
  42577. return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;
  42578. };
  42579. // get width of an element
  42580. var innerSliderUtils_getWidth = function getWidth(elem) {
  42581. return elem && elem.offsetWidth || 0;
  42582. };
  42583. var getHeight = function getHeight(elem) {
  42584. return elem && elem.offsetHeight || 0;
  42585. };
  42586. var getSwipeDirection = function getSwipeDirection(touchObject) {
  42587. var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  42588. var xDist, yDist, r, swipeAngle;
  42589. xDist = touchObject.startX - touchObject.curX;
  42590. yDist = touchObject.startY - touchObject.curY;
  42591. r = Math.atan2(yDist, xDist);
  42592. swipeAngle = Math.round(r * 180 / Math.PI);
  42593. if (swipeAngle < 0) {
  42594. swipeAngle = 360 - Math.abs(swipeAngle);
  42595. }
  42596. if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {
  42597. return "left";
  42598. }
  42599. if (swipeAngle >= 135 && swipeAngle <= 225) {
  42600. return "right";
  42601. }
  42602. if (verticalSwiping === true) {
  42603. if (swipeAngle >= 35 && swipeAngle <= 135) {
  42604. return "up";
  42605. } else {
  42606. return "down";
  42607. }
  42608. }
  42609. return "vertical";
  42610. };
  42611. // whether or not we can go next
  42612. var canGoNext = function canGoNext(spec) {
  42613. var canGo = true;
  42614. if (!spec.infinite) {
  42615. if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {
  42616. canGo = false;
  42617. } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {
  42618. canGo = false;
  42619. }
  42620. }
  42621. return canGo;
  42622. };
  42623. // given an object and a list of keys, return new object with given keys
  42624. var extractObject = function extractObject(spec, keys) {
  42625. var newObject = {};
  42626. keys.forEach(function (key) {
  42627. return newObject[key] = spec[key];
  42628. });
  42629. return newObject;
  42630. };
  42631. // get initialized state
  42632. var initializedState = function initializedState(spec) {
  42633. // spec also contains listRef, trackRef
  42634. var slideCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(spec.children);
  42635. var listNode = spec.listRef;
  42636. var listWidth = Math.ceil(innerSliderUtils_getWidth(listNode));
  42637. var trackNode = spec.trackRef && spec.trackRef.node;
  42638. var trackWidth = Math.ceil(innerSliderUtils_getWidth(trackNode));
  42639. var slideWidth;
  42640. if (!spec.vertical) {
  42641. var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;
  42642. if (typeof spec.centerPadding === "string" && spec.centerPadding.slice(-1) === "%") {
  42643. centerPaddingAdj *= listWidth / 100;
  42644. }
  42645. slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);
  42646. } else {
  42647. slideWidth = listWidth;
  42648. }
  42649. var slideHeight = listNode && getHeight(listNode.querySelector('[data-index="0"]'));
  42650. var listHeight = slideHeight * spec.slidesToShow;
  42651. var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;
  42652. if (spec.rtl && spec.currentSlide === undefined) {
  42653. currentSlide = slideCount - 1 - spec.initialSlide;
  42654. }
  42655. var lazyLoadedList = spec.lazyLoadedList || [];
  42656. var slidesToLoad = getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42657. currentSlide: currentSlide,
  42658. lazyLoadedList: lazyLoadedList
  42659. }));
  42660. lazyLoadedList = lazyLoadedList.concat(slidesToLoad);
  42661. var state = {
  42662. slideCount: slideCount,
  42663. slideWidth: slideWidth,
  42664. listWidth: listWidth,
  42665. trackWidth: trackWidth,
  42666. currentSlide: currentSlide,
  42667. slideHeight: slideHeight,
  42668. listHeight: listHeight,
  42669. lazyLoadedList: lazyLoadedList
  42670. };
  42671. if (spec.autoplaying === null && spec.autoplay) {
  42672. state["autoplaying"] = "playing";
  42673. }
  42674. return state;
  42675. };
  42676. var slideHandler = function slideHandler(spec) {
  42677. var waitForAnimate = spec.waitForAnimate,
  42678. animating = spec.animating,
  42679. fade = spec.fade,
  42680. infinite = spec.infinite,
  42681. index = spec.index,
  42682. slideCount = spec.slideCount,
  42683. lazyLoad = spec.lazyLoad,
  42684. currentSlide = spec.currentSlide,
  42685. centerMode = spec.centerMode,
  42686. slidesToScroll = spec.slidesToScroll,
  42687. slidesToShow = spec.slidesToShow,
  42688. useCSS = spec.useCSS;
  42689. var lazyLoadedList = spec.lazyLoadedList;
  42690. if (waitForAnimate && animating) return {};
  42691. var animationSlide = index,
  42692. finalSlide,
  42693. animationLeft,
  42694. finalLeft;
  42695. var state = {},
  42696. nextState = {};
  42697. var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);
  42698. if (fade) {
  42699. if (!infinite && (index < 0 || index >= slideCount)) return {};
  42700. if (index < 0) {
  42701. animationSlide = index + slideCount;
  42702. } else if (index >= slideCount) {
  42703. animationSlide = index - slideCount;
  42704. }
  42705. if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {
  42706. lazyLoadedList = lazyLoadedList.concat(animationSlide);
  42707. }
  42708. state = {
  42709. animating: true,
  42710. currentSlide: animationSlide,
  42711. lazyLoadedList: lazyLoadedList,
  42712. targetSlide: animationSlide
  42713. };
  42714. nextState = {
  42715. animating: false,
  42716. targetSlide: animationSlide
  42717. };
  42718. } else {
  42719. finalSlide = animationSlide;
  42720. if (animationSlide < 0) {
  42721. finalSlide = animationSlide + slideCount;
  42722. if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;
  42723. } else if (!canGoNext(spec) && animationSlide > currentSlide) {
  42724. animationSlide = finalSlide = currentSlide;
  42725. } else if (centerMode && animationSlide >= slideCount) {
  42726. animationSlide = infinite ? slideCount : slideCount - 1;
  42727. finalSlide = infinite ? 0 : slideCount - 1;
  42728. } else if (animationSlide >= slideCount) {
  42729. finalSlide = animationSlide - slideCount;
  42730. if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;
  42731. }
  42732. if (!infinite && animationSlide + slidesToShow >= slideCount) {
  42733. finalSlide = slideCount - slidesToShow;
  42734. }
  42735. animationLeft = getTrackLeft((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42736. slideIndex: animationSlide
  42737. }));
  42738. finalLeft = getTrackLeft((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42739. slideIndex: finalSlide
  42740. }));
  42741. if (!infinite) {
  42742. if (animationLeft === finalLeft) animationSlide = finalSlide;
  42743. animationLeft = finalLeft;
  42744. }
  42745. if (lazyLoad) {
  42746. lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42747. currentSlide: animationSlide
  42748. })));
  42749. }
  42750. if (!useCSS) {
  42751. state = {
  42752. currentSlide: finalSlide,
  42753. trackStyle: getTrackCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42754. left: finalLeft
  42755. })),
  42756. lazyLoadedList: lazyLoadedList,
  42757. targetSlide: targetSlide
  42758. };
  42759. } else {
  42760. state = {
  42761. animating: true,
  42762. currentSlide: finalSlide,
  42763. trackStyle: getTrackAnimateCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42764. left: animationLeft
  42765. })),
  42766. lazyLoadedList: lazyLoadedList,
  42767. targetSlide: targetSlide
  42768. };
  42769. nextState = {
  42770. animating: false,
  42771. currentSlide: finalSlide,
  42772. trackStyle: getTrackCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42773. left: finalLeft
  42774. })),
  42775. swipeLeft: null,
  42776. targetSlide: targetSlide
  42777. };
  42778. }
  42779. }
  42780. return {
  42781. state: state,
  42782. nextState: nextState
  42783. };
  42784. };
  42785. var changeSlide = function changeSlide(spec, options) {
  42786. var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
  42787. var slidesToScroll = spec.slidesToScroll,
  42788. slidesToShow = spec.slidesToShow,
  42789. slideCount = spec.slideCount,
  42790. currentSlide = spec.currentSlide,
  42791. previousTargetSlide = spec.targetSlide,
  42792. lazyLoad = spec.lazyLoad,
  42793. infinite = spec.infinite;
  42794. unevenOffset = slideCount % slidesToScroll !== 0;
  42795. indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;
  42796. if (options.message === "previous") {
  42797. slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;
  42798. targetSlide = currentSlide - slideOffset;
  42799. if (lazyLoad && !infinite) {
  42800. previousInt = currentSlide - slideOffset;
  42801. targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;
  42802. }
  42803. if (!infinite) {
  42804. targetSlide = previousTargetSlide - slidesToScroll;
  42805. }
  42806. } else if (options.message === "next") {
  42807. slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;
  42808. targetSlide = currentSlide + slideOffset;
  42809. if (lazyLoad && !infinite) {
  42810. targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;
  42811. }
  42812. if (!infinite) {
  42813. targetSlide = previousTargetSlide + slidesToScroll;
  42814. }
  42815. } else if (options.message === "dots") {
  42816. // Click on dots
  42817. targetSlide = options.index * options.slidesToScroll;
  42818. } else if (options.message === "children") {
  42819. // Click on the slides
  42820. targetSlide = options.index;
  42821. if (infinite) {
  42822. var direction = siblingDirection((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42823. targetSlide: targetSlide
  42824. }));
  42825. if (targetSlide > options.currentSlide && direction === "left") {
  42826. targetSlide = targetSlide - slideCount;
  42827. } else if (targetSlide < options.currentSlide && direction === "right") {
  42828. targetSlide = targetSlide + slideCount;
  42829. }
  42830. }
  42831. } else if (options.message === "index") {
  42832. targetSlide = Number(options.index);
  42833. }
  42834. return targetSlide;
  42835. };
  42836. var keyHandler = function keyHandler(e, accessibility, rtl) {
  42837. if (e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !accessibility) return "";
  42838. if (e.keyCode === 37) return rtl ? "next" : "previous";
  42839. if (e.keyCode === 39) return rtl ? "previous" : "next";
  42840. return "";
  42841. };
  42842. var swipeStart = function swipeStart(e, swipe, draggable) {
  42843. e.target.tagName === "IMG" && safePreventDefault(e);
  42844. if (!swipe || !draggable && e.type.indexOf("mouse") !== -1) return "";
  42845. return {
  42846. dragging: true,
  42847. touchObject: {
  42848. startX: e.touches ? e.touches[0].pageX : e.clientX,
  42849. startY: e.touches ? e.touches[0].pageY : e.clientY,
  42850. curX: e.touches ? e.touches[0].pageX : e.clientX,
  42851. curY: e.touches ? e.touches[0].pageY : e.clientY
  42852. }
  42853. };
  42854. };
  42855. var swipeMove = function swipeMove(e, spec) {
  42856. // spec also contains, trackRef and slideIndex
  42857. var scrolling = spec.scrolling,
  42858. animating = spec.animating,
  42859. vertical = spec.vertical,
  42860. swipeToSlide = spec.swipeToSlide,
  42861. verticalSwiping = spec.verticalSwiping,
  42862. rtl = spec.rtl,
  42863. currentSlide = spec.currentSlide,
  42864. edgeFriction = spec.edgeFriction,
  42865. edgeDragged = spec.edgeDragged,
  42866. onEdge = spec.onEdge,
  42867. swiped = spec.swiped,
  42868. swiping = spec.swiping,
  42869. slideCount = spec.slideCount,
  42870. slidesToScroll = spec.slidesToScroll,
  42871. infinite = spec.infinite,
  42872. touchObject = spec.touchObject,
  42873. swipeEvent = spec.swipeEvent,
  42874. listHeight = spec.listHeight,
  42875. listWidth = spec.listWidth;
  42876. if (scrolling) return;
  42877. if (animating) return safePreventDefault(e);
  42878. if (vertical && swipeToSlide && verticalSwiping) safePreventDefault(e);
  42879. var swipeLeft,
  42880. state = {};
  42881. var curLeft = getTrackLeft(spec);
  42882. touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;
  42883. touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;
  42884. touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));
  42885. var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));
  42886. if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {
  42887. return {
  42888. scrolling: true
  42889. };
  42890. }
  42891. if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;
  42892. var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);
  42893. if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;
  42894. var dotCount = Math.ceil(slideCount / slidesToScroll);
  42895. var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);
  42896. var touchSwipeLength = touchObject.swipeLength;
  42897. if (!infinite) {
  42898. if (currentSlide === 0 && (swipeDirection === "right" || swipeDirection === "down") || currentSlide + 1 >= dotCount && (swipeDirection === "left" || swipeDirection === "up") || !canGoNext(spec) && (swipeDirection === "left" || swipeDirection === "up")) {
  42899. touchSwipeLength = touchObject.swipeLength * edgeFriction;
  42900. if (edgeDragged === false && onEdge) {
  42901. onEdge(swipeDirection);
  42902. state["edgeDragged"] = true;
  42903. }
  42904. }
  42905. }
  42906. if (!swiped && swipeEvent) {
  42907. swipeEvent(swipeDirection);
  42908. state["swiped"] = true;
  42909. }
  42910. if (!vertical) {
  42911. if (!rtl) {
  42912. swipeLeft = curLeft + touchSwipeLength * positionOffset;
  42913. } else {
  42914. swipeLeft = curLeft - touchSwipeLength * positionOffset;
  42915. }
  42916. } else {
  42917. swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;
  42918. }
  42919. if (verticalSwiping) {
  42920. swipeLeft = curLeft + touchSwipeLength * positionOffset;
  42921. }
  42922. state = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
  42923. touchObject: touchObject,
  42924. swipeLeft: swipeLeft,
  42925. trackStyle: getTrackCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  42926. left: swipeLeft
  42927. }))
  42928. });
  42929. if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {
  42930. return state;
  42931. }
  42932. if (touchObject.swipeLength > 10) {
  42933. state["swiping"] = true;
  42934. safePreventDefault(e);
  42935. }
  42936. return state;
  42937. };
  42938. var swipeEnd = function swipeEnd(e, spec) {
  42939. var dragging = spec.dragging,
  42940. swipe = spec.swipe,
  42941. touchObject = spec.touchObject,
  42942. listWidth = spec.listWidth,
  42943. touchThreshold = spec.touchThreshold,
  42944. verticalSwiping = spec.verticalSwiping,
  42945. listHeight = spec.listHeight,
  42946. swipeToSlide = spec.swipeToSlide,
  42947. scrolling = spec.scrolling,
  42948. onSwipe = spec.onSwipe,
  42949. targetSlide = spec.targetSlide,
  42950. currentSlide = spec.currentSlide,
  42951. infinite = spec.infinite;
  42952. if (!dragging) {
  42953. if (swipe) safePreventDefault(e);
  42954. return {};
  42955. }
  42956. var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;
  42957. var swipeDirection = getSwipeDirection(touchObject, verticalSwiping);
  42958. // reset the state of touch related state variables.
  42959. var state = {
  42960. dragging: false,
  42961. edgeDragged: false,
  42962. scrolling: false,
  42963. swiping: false,
  42964. swiped: false,
  42965. swipeLeft: null,
  42966. touchObject: {}
  42967. };
  42968. if (scrolling) {
  42969. return state;
  42970. }
  42971. if (!touchObject.swipeLength) {
  42972. return state;
  42973. }
  42974. if (touchObject.swipeLength > minSwipe) {
  42975. safePreventDefault(e);
  42976. if (onSwipe) {
  42977. onSwipe(swipeDirection);
  42978. }
  42979. var slideCount, newSlide;
  42980. var activeSlide = infinite ? currentSlide : targetSlide;
  42981. switch (swipeDirection) {
  42982. case "left":
  42983. case "up":
  42984. newSlide = activeSlide + getSlideCount(spec);
  42985. slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
  42986. state["currentDirection"] = 0;
  42987. break;
  42988. case "right":
  42989. case "down":
  42990. newSlide = activeSlide - getSlideCount(spec);
  42991. slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
  42992. state["currentDirection"] = 1;
  42993. break;
  42994. default:
  42995. slideCount = activeSlide;
  42996. }
  42997. state["triggerSlideHandler"] = slideCount;
  42998. } else {
  42999. // Adjust the track back to it's original position.
  43000. var currentLeft = getTrackLeft(spec);
  43001. state["trackStyle"] = getTrackAnimateCSS((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  43002. left: currentLeft
  43003. }));
  43004. }
  43005. return state;
  43006. };
  43007. var getNavigableIndexes = function getNavigableIndexes(spec) {
  43008. var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;
  43009. var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;
  43010. var counter = spec.infinite ? spec.slidesToShow * -1 : 0;
  43011. var indexes = [];
  43012. while (breakpoint < max) {
  43013. indexes.push(breakpoint);
  43014. breakpoint = counter + spec.slidesToScroll;
  43015. counter += Math.min(spec.slidesToScroll, spec.slidesToShow);
  43016. }
  43017. return indexes;
  43018. };
  43019. var checkNavigable = function checkNavigable(spec, index) {
  43020. var navigables = getNavigableIndexes(spec);
  43021. var prevNavigable = 0;
  43022. if (index > navigables[navigables.length - 1]) {
  43023. index = navigables[navigables.length - 1];
  43024. } else {
  43025. for (var n in navigables) {
  43026. if (index < navigables[n]) {
  43027. index = prevNavigable;
  43028. break;
  43029. }
  43030. prevNavigable = navigables[n];
  43031. }
  43032. }
  43033. return index;
  43034. };
  43035. var getSlideCount = function getSlideCount(spec) {
  43036. var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;
  43037. if (spec.swipeToSlide) {
  43038. var swipedSlide;
  43039. var slickList = spec.listRef;
  43040. var slides = slickList.querySelectorAll && slickList.querySelectorAll(".slick-slide") || [];
  43041. Array.from(slides).every(function (slide) {
  43042. if (!spec.vertical) {
  43043. if (slide.offsetLeft - centerOffset + innerSliderUtils_getWidth(slide) / 2 > spec.swipeLeft * -1) {
  43044. swipedSlide = slide;
  43045. return false;
  43046. }
  43047. } else {
  43048. if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {
  43049. swipedSlide = slide;
  43050. return false;
  43051. }
  43052. }
  43053. return true;
  43054. });
  43055. if (!swipedSlide) {
  43056. return 0;
  43057. }
  43058. var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;
  43059. var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;
  43060. return slidesTraversed;
  43061. } else {
  43062. return spec.slidesToScroll;
  43063. }
  43064. };
  43065. var checkSpecKeys = function checkSpecKeys(spec, keysArray) {
  43066. return (
  43067. // eslint-disable-next-line no-prototype-builtins
  43068. keysArray.reduce(function (value, key) {
  43069. return value && spec.hasOwnProperty(key);
  43070. }, true) ? null : console.error("Keys Missing:", spec)
  43071. );
  43072. };
  43073. var getTrackCSS = function getTrackCSS(spec) {
  43074. checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth"]);
  43075. var trackWidth, trackHeight;
  43076. if (!spec.vertical) {
  43077. trackWidth = getTotalSlides(spec) * spec.slideWidth;
  43078. } else {
  43079. var trackChildren = spec.unslick ? spec.slideCount : spec.slideCount + 2 * spec.slidesToShow;
  43080. trackHeight = trackChildren * spec.slideHeight;
  43081. }
  43082. var style = {
  43083. opacity: 1,
  43084. transition: "",
  43085. WebkitTransition: ""
  43086. };
  43087. if (spec.useTransform) {
  43088. var WebkitTransform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
  43089. var transform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
  43090. var msTransform = !spec.vertical ? "translateX(" + spec.left + "px)" : "translateY(" + spec.left + "px)";
  43091. style = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
  43092. WebkitTransform: WebkitTransform,
  43093. transform: transform,
  43094. msTransform: msTransform
  43095. });
  43096. } else {
  43097. if (spec.vertical) {
  43098. style["top"] = spec.left;
  43099. } else {
  43100. style["left"] = spec.left;
  43101. }
  43102. }
  43103. if (spec.fade) style = {
  43104. opacity: 1
  43105. };
  43106. if (trackWidth) style.width = trackWidth;
  43107. if (trackHeight) style.height = trackHeight;
  43108. // Fallback for IE8
  43109. if (window && !window.addEventListener && window.attachEvent) {
  43110. if (!spec.vertical) {
  43111. style.marginLeft = spec.left + "px";
  43112. } else {
  43113. style.marginTop = spec.left + "px";
  43114. }
  43115. }
  43116. return style;
  43117. };
  43118. var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
  43119. checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth", "speed", "cssEase"]);
  43120. var style = getTrackCSS(spec);
  43121. // useCSS is true by default so it can be undefined
  43122. if (spec.useTransform) {
  43123. style.WebkitTransition = "-webkit-transform " + spec.speed + "ms " + spec.cssEase;
  43124. style.transition = "transform " + spec.speed + "ms " + spec.cssEase;
  43125. } else {
  43126. if (spec.vertical) {
  43127. style.transition = "top " + spec.speed + "ms " + spec.cssEase;
  43128. } else {
  43129. style.transition = "left " + spec.speed + "ms " + spec.cssEase;
  43130. }
  43131. }
  43132. return style;
  43133. };
  43134. var getTrackLeft = function getTrackLeft(spec) {
  43135. if (spec.unslick) {
  43136. return 0;
  43137. }
  43138. checkSpecKeys(spec, ["slideIndex", "trackRef", "infinite", "centerMode", "slideCount", "slidesToShow", "slidesToScroll", "slideWidth", "listWidth", "variableWidth", "slideHeight"]);
  43139. var slideIndex = spec.slideIndex,
  43140. trackRef = spec.trackRef,
  43141. infinite = spec.infinite,
  43142. centerMode = spec.centerMode,
  43143. slideCount = spec.slideCount,
  43144. slidesToShow = spec.slidesToShow,
  43145. slidesToScroll = spec.slidesToScroll,
  43146. slideWidth = spec.slideWidth,
  43147. listWidth = spec.listWidth,
  43148. variableWidth = spec.variableWidth,
  43149. slideHeight = spec.slideHeight,
  43150. fade = spec.fade,
  43151. vertical = spec.vertical;
  43152. var slideOffset = 0;
  43153. var targetLeft;
  43154. var targetSlide;
  43155. var verticalOffset = 0;
  43156. if (fade || spec.slideCount === 1) {
  43157. return 0;
  43158. }
  43159. var slidesToOffset = 0;
  43160. if (infinite) {
  43161. slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area
  43162. // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children
  43163. if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
  43164. slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);
  43165. }
  43166. // shift current slide to center of the frame
  43167. if (centerMode) {
  43168. slidesToOffset += parseInt(slidesToShow / 2);
  43169. }
  43170. } else {
  43171. if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
  43172. slidesToOffset = slidesToShow - slideCount % slidesToScroll;
  43173. }
  43174. if (centerMode) {
  43175. slidesToOffset = parseInt(slidesToShow / 2);
  43176. }
  43177. }
  43178. slideOffset = slidesToOffset * slideWidth;
  43179. verticalOffset = slidesToOffset * slideHeight;
  43180. if (!vertical) {
  43181. targetLeft = slideIndex * slideWidth * -1 + slideOffset;
  43182. } else {
  43183. targetLeft = slideIndex * slideHeight * -1 + verticalOffset;
  43184. }
  43185. if (variableWidth === true) {
  43186. var targetSlideIndex;
  43187. var trackElem = trackRef && trackRef.node;
  43188. targetSlideIndex = slideIndex + getPreClones(spec);
  43189. targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];
  43190. targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;
  43191. if (centerMode === true) {
  43192. targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;
  43193. targetSlide = trackElem && trackElem.children[targetSlideIndex];
  43194. targetLeft = 0;
  43195. for (var slide = 0; slide < targetSlideIndex; slide++) {
  43196. targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;
  43197. }
  43198. targetLeft -= parseInt(spec.centerPadding);
  43199. targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;
  43200. }
  43201. }
  43202. return targetLeft;
  43203. };
  43204. var getPreClones = function getPreClones(spec) {
  43205. if (spec.unslick || !spec.infinite) {
  43206. return 0;
  43207. }
  43208. if (spec.variableWidth) {
  43209. return spec.slideCount;
  43210. }
  43211. return spec.slidesToShow + (spec.centerMode ? 1 : 0);
  43212. };
  43213. var getPostClones = function getPostClones(spec) {
  43214. if (spec.unslick || !spec.infinite) {
  43215. return 0;
  43216. }
  43217. return spec.slideCount;
  43218. };
  43219. var getTotalSlides = function getTotalSlides(spec) {
  43220. return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);
  43221. };
  43222. var siblingDirection = function siblingDirection(spec) {
  43223. if (spec.targetSlide > spec.currentSlide) {
  43224. if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {
  43225. return "left";
  43226. }
  43227. return "right";
  43228. } else {
  43229. if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {
  43230. return "right";
  43231. }
  43232. return "left";
  43233. }
  43234. };
  43235. var slidesOnRight = function slidesOnRight(_ref) {
  43236. var slidesToShow = _ref.slidesToShow,
  43237. centerMode = _ref.centerMode,
  43238. rtl = _ref.rtl,
  43239. centerPadding = _ref.centerPadding;
  43240. // returns no of slides on the right of active slide
  43241. if (centerMode) {
  43242. var right = (slidesToShow - 1) / 2 + 1;
  43243. if (parseInt(centerPadding) > 0) right += 1;
  43244. if (rtl && slidesToShow % 2 === 0) right += 1;
  43245. return right;
  43246. }
  43247. if (rtl) {
  43248. return 0;
  43249. }
  43250. return slidesToShow - 1;
  43251. };
  43252. var slidesOnLeft = function slidesOnLeft(_ref2) {
  43253. var slidesToShow = _ref2.slidesToShow,
  43254. centerMode = _ref2.centerMode,
  43255. rtl = _ref2.rtl,
  43256. centerPadding = _ref2.centerPadding;
  43257. // returns no of slides on the left of active slide
  43258. if (centerMode) {
  43259. var left = (slidesToShow - 1) / 2 + 1;
  43260. if (parseInt(centerPadding) > 0) left += 1;
  43261. if (!rtl && slidesToShow % 2 === 0) left += 1;
  43262. return left;
  43263. }
  43264. if (rtl) {
  43265. return slidesToShow - 1;
  43266. }
  43267. return 0;
  43268. };
  43269. var canUseDOM = function canUseDOM() {
  43270. return !!(typeof window !== "undefined" && window.document && window.document.createElement);
  43271. };
  43272. var validSettings = Object.keys(default_props);
  43273. function filterSettings(settings) {
  43274. return validSettings.reduce(function (acc, settingName) {
  43275. if (settings.hasOwnProperty(settingName)) {
  43276. acc[settingName] = settings[settingName];
  43277. }
  43278. return acc;
  43279. }, {});
  43280. }
  43281. ;// ./node_modules/@ant-design/react-slick/es/track.js
  43282. function track_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
  43283. // given specifications/props for a slide, fetch all the classes that need to be applied to the slide
  43284. var getSlideClasses = function getSlideClasses(spec) {
  43285. var slickActive, slickCenter, slickCloned;
  43286. var centerOffset, index;
  43287. if (spec.rtl) {
  43288. index = spec.slideCount - 1 - spec.index;
  43289. } else {
  43290. index = spec.index;
  43291. }
  43292. slickCloned = index < 0 || index >= spec.slideCount;
  43293. if (spec.centerMode) {
  43294. centerOffset = Math.floor(spec.slidesToShow / 2);
  43295. slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;
  43296. if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {
  43297. slickActive = true;
  43298. }
  43299. } else {
  43300. slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;
  43301. }
  43302. var focusedSlide;
  43303. if (spec.targetSlide < 0) {
  43304. focusedSlide = spec.targetSlide + spec.slideCount;
  43305. } else if (spec.targetSlide >= spec.slideCount) {
  43306. focusedSlide = spec.targetSlide - spec.slideCount;
  43307. } else {
  43308. focusedSlide = spec.targetSlide;
  43309. }
  43310. var slickCurrent = index === focusedSlide;
  43311. return {
  43312. "slick-slide": true,
  43313. "slick-active": slickActive,
  43314. "slick-center": slickCenter,
  43315. "slick-cloned": slickCloned,
  43316. "slick-current": slickCurrent // dubious in case of RTL
  43317. };
  43318. };
  43319. var getSlideStyle = function getSlideStyle(spec) {
  43320. var style = {};
  43321. if (spec.variableWidth === undefined || spec.variableWidth === false) {
  43322. style.width = spec.slideWidth;
  43323. }
  43324. if (spec.fade) {
  43325. style.position = "relative";
  43326. if (spec.vertical && spec.slideHeight) {
  43327. style.top = -spec.index * parseInt(spec.slideHeight);
  43328. } else {
  43329. style.left = -spec.index * parseInt(spec.slideWidth);
  43330. }
  43331. style.opacity = spec.currentSlide === spec.index ? 1 : 0;
  43332. style.zIndex = spec.currentSlide === spec.index ? 999 : 998;
  43333. if (spec.useCSS) {
  43334. style.transition = "opacity " + spec.speed + "ms " + spec.cssEase + ", " + "visibility " + spec.speed + "ms " + spec.cssEase;
  43335. }
  43336. }
  43337. return style;
  43338. };
  43339. var track_getKey = function getKey(child, fallbackKey) {
  43340. return child.key + "-" + fallbackKey;
  43341. };
  43342. var renderSlides = function renderSlides(spec) {
  43343. var key;
  43344. var slides = [];
  43345. var preCloneSlides = [];
  43346. var postCloneSlides = [];
  43347. var childrenCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(spec.children);
  43348. var startIndex = lazyStartIndex(spec);
  43349. var endIndex = lazyEndIndex(spec);
  43350. external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(spec.children, function (elem, index) {
  43351. var child;
  43352. var childOnClickOptions = {
  43353. message: "children",
  43354. index: index,
  43355. slidesToScroll: spec.slidesToScroll,
  43356. currentSlide: spec.currentSlide
  43357. };
  43358. // in case of lazyLoad, whether or not we want to fetch the slide
  43359. if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {
  43360. child = elem;
  43361. } else {
  43362. child = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", null);
  43363. }
  43364. var childStyle = getSlideStyle((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  43365. index: index
  43366. }));
  43367. var slideClass = child.props.className || "";
  43368. var slideClasses = getSlideClasses((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  43369. index: index
  43370. }));
  43371. // push a cloned element of the desired slide
  43372. slides.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
  43373. key: "original" + track_getKey(child, index),
  43374. "data-index": index,
  43375. className: classnames_default()(slideClasses, slideClass),
  43376. tabIndex: "-1",
  43377. "aria-hidden": !slideClasses["slick-active"],
  43378. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({
  43379. outline: "none"
  43380. }, child.props.style || {}), childStyle),
  43381. onClick: function onClick(e) {
  43382. child.props && child.props.onClick && child.props.onClick(e);
  43383. if (spec.focusOnSelect) {
  43384. spec.focusOnSelect(childOnClickOptions);
  43385. }
  43386. }
  43387. }));
  43388. // if slide needs to be precloned or postcloned
  43389. if (spec.infinite && childrenCount > 1 && spec.fade === false && !spec.unslick) {
  43390. var preCloneNo = childrenCount - index;
  43391. if (preCloneNo <= getPreClones(spec)) {
  43392. key = -preCloneNo;
  43393. if (key >= startIndex) {
  43394. child = elem;
  43395. }
  43396. slideClasses = getSlideClasses((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  43397. index: key
  43398. }));
  43399. preCloneSlides.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
  43400. key: "precloned" + track_getKey(child, key),
  43401. "data-index": key,
  43402. tabIndex: "-1",
  43403. className: classnames_default()(slideClasses, slideClass),
  43404. "aria-hidden": !slideClasses["slick-active"],
  43405. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, child.props.style || {}), childStyle),
  43406. onClick: function onClick(e) {
  43407. child.props && child.props.onClick && child.props.onClick(e);
  43408. if (spec.focusOnSelect) {
  43409. spec.focusOnSelect(childOnClickOptions);
  43410. }
  43411. }
  43412. }));
  43413. }
  43414. key = childrenCount + index;
  43415. if (key < endIndex) {
  43416. child = elem;
  43417. }
  43418. slideClasses = getSlideClasses((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  43419. index: key
  43420. }));
  43421. postCloneSlides.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
  43422. key: "postcloned" + track_getKey(child, key),
  43423. "data-index": key,
  43424. tabIndex: "-1",
  43425. className: classnames_default()(slideClasses, slideClass),
  43426. "aria-hidden": !slideClasses["slick-active"],
  43427. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, child.props.style || {}), childStyle),
  43428. onClick: function onClick(e) {
  43429. child.props && child.props.onClick && child.props.onClick(e);
  43430. if (spec.focusOnSelect) {
  43431. spec.focusOnSelect(childOnClickOptions);
  43432. }
  43433. }
  43434. }));
  43435. }
  43436. });
  43437. if (spec.rtl) {
  43438. return preCloneSlides.concat(slides, postCloneSlides).reverse();
  43439. } else {
  43440. return preCloneSlides.concat(slides, postCloneSlides);
  43441. }
  43442. };
  43443. var Track = /*#__PURE__*/function (_React$PureComponent) {
  43444. function Track() {
  43445. var _this;
  43446. (0,classCallCheck["default"])(this, Track);
  43447. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  43448. args[_key] = arguments[_key];
  43449. }
  43450. _this = track_callSuper(this, Track, [].concat(args));
  43451. (0,defineProperty["default"])(_this, "node", null);
  43452. (0,defineProperty["default"])(_this, "handleRef", function (ref) {
  43453. _this.node = ref;
  43454. });
  43455. return _this;
  43456. }
  43457. (0,inherits["default"])(Track, _React$PureComponent);
  43458. return (0,createClass["default"])(Track, [{
  43459. key: "render",
  43460. value: function render() {
  43461. var slides = renderSlides(this.props);
  43462. var _this$props = this.props,
  43463. onMouseEnter = _this$props.onMouseEnter,
  43464. onMouseOver = _this$props.onMouseOver,
  43465. onMouseLeave = _this$props.onMouseLeave;
  43466. var mouseEvents = {
  43467. onMouseEnter: onMouseEnter,
  43468. onMouseOver: onMouseOver,
  43469. onMouseLeave: onMouseLeave
  43470. };
  43471. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  43472. ref: this.handleRef,
  43473. className: "slick-track",
  43474. style: this.props.trackStyle
  43475. }, mouseEvents), slides);
  43476. }
  43477. }]);
  43478. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
  43479. ;// ./node_modules/@ant-design/react-slick/es/dots.js
  43480. function dots_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
  43481. var getDotCount = function getDotCount(spec) {
  43482. var dots;
  43483. if (spec.infinite) {
  43484. dots = Math.ceil(spec.slideCount / spec.slidesToScroll);
  43485. } else {
  43486. dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;
  43487. }
  43488. return dots;
  43489. };
  43490. var Dots = /*#__PURE__*/function (_React$PureComponent) {
  43491. function Dots() {
  43492. (0,classCallCheck["default"])(this, Dots);
  43493. return dots_callSuper(this, Dots, arguments);
  43494. }
  43495. (0,inherits["default"])(Dots, _React$PureComponent);
  43496. return (0,createClass["default"])(Dots, [{
  43497. key: "clickHandler",
  43498. value: function clickHandler(options, e) {
  43499. // In Autoplay the focus stays on clicked button even after transition
  43500. // to next slide. That only goes away by click somewhere outside
  43501. e.preventDefault();
  43502. this.props.clickHandler(options);
  43503. }
  43504. }, {
  43505. key: "render",
  43506. value: function render() {
  43507. var _this$props = this.props,
  43508. onMouseEnter = _this$props.onMouseEnter,
  43509. onMouseOver = _this$props.onMouseOver,
  43510. onMouseLeave = _this$props.onMouseLeave,
  43511. infinite = _this$props.infinite,
  43512. slidesToScroll = _this$props.slidesToScroll,
  43513. slidesToShow = _this$props.slidesToShow,
  43514. slideCount = _this$props.slideCount,
  43515. currentSlide = _this$props.currentSlide;
  43516. var dotCount = getDotCount({
  43517. slideCount: slideCount,
  43518. slidesToScroll: slidesToScroll,
  43519. slidesToShow: slidesToShow,
  43520. infinite: infinite
  43521. });
  43522. var mouseEvents = {
  43523. onMouseEnter: onMouseEnter,
  43524. onMouseOver: onMouseOver,
  43525. onMouseLeave: onMouseLeave
  43526. };
  43527. var dots = [];
  43528. for (var i = 0; i < dotCount; i++) {
  43529. var _rightBound = (i + 1) * slidesToScroll - 1;
  43530. var rightBound = infinite ? _rightBound : clamp(_rightBound, 0, slideCount - 1);
  43531. var _leftBound = rightBound - (slidesToScroll - 1);
  43532. var leftBound = infinite ? _leftBound : clamp(_leftBound, 0, slideCount - 1);
  43533. var className = classnames_default()({
  43534. "slick-active": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound
  43535. });
  43536. var dotOptions = {
  43537. message: "dots",
  43538. index: i,
  43539. slidesToScroll: slidesToScroll,
  43540. currentSlide: currentSlide
  43541. };
  43542. var onClick = this.clickHandler.bind(this, dotOptions);
  43543. dots = dots.concat( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  43544. key: i,
  43545. className: className
  43546. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.customPaging(i), {
  43547. onClick: onClick
  43548. })));
  43549. }
  43550. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.appendDots(dots), (0,objectSpread2["default"])({
  43551. className: this.props.dotsClass
  43552. }, mouseEvents));
  43553. }
  43554. }]);
  43555. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
  43556. ;// ./node_modules/@ant-design/react-slick/es/arrows.js
  43557. function arrows_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
  43558. var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
  43559. function PrevArrow() {
  43560. (0,classCallCheck["default"])(this, PrevArrow);
  43561. return arrows_callSuper(this, PrevArrow, arguments);
  43562. }
  43563. (0,inherits["default"])(PrevArrow, _React$PureComponent);
  43564. return (0,createClass["default"])(PrevArrow, [{
  43565. key: "clickHandler",
  43566. value: function clickHandler(options, e) {
  43567. if (e) {
  43568. e.preventDefault();
  43569. }
  43570. this.props.clickHandler(options, e);
  43571. }
  43572. }, {
  43573. key: "render",
  43574. value: function render() {
  43575. var prevClasses = {
  43576. "slick-arrow": true,
  43577. "slick-prev": true
  43578. };
  43579. var prevHandler = this.clickHandler.bind(this, {
  43580. message: "previous"
  43581. });
  43582. if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) {
  43583. prevClasses["slick-disabled"] = true;
  43584. prevHandler = null;
  43585. }
  43586. var prevArrowProps = {
  43587. key: "0",
  43588. "data-role": "none",
  43589. className: classnames_default()(prevClasses),
  43590. style: {
  43591. display: "block"
  43592. },
  43593. onClick: prevHandler
  43594. };
  43595. var customProps = {
  43596. currentSlide: this.props.currentSlide,
  43597. slideCount: this.props.slideCount
  43598. };
  43599. var prevArrow;
  43600. if (this.props.prevArrow) {
  43601. prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.prevArrow, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, prevArrowProps), customProps));
  43602. } else {
  43603. prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", (0,esm_extends["default"])({
  43604. key: "0",
  43605. type: "button"
  43606. }, prevArrowProps), " ", "Previous");
  43607. }
  43608. return prevArrow;
  43609. }
  43610. }]);
  43611. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
  43612. var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
  43613. function NextArrow() {
  43614. (0,classCallCheck["default"])(this, NextArrow);
  43615. return arrows_callSuper(this, NextArrow, arguments);
  43616. }
  43617. (0,inherits["default"])(NextArrow, _React$PureComponent2);
  43618. return (0,createClass["default"])(NextArrow, [{
  43619. key: "clickHandler",
  43620. value: function clickHandler(options, e) {
  43621. if (e) {
  43622. e.preventDefault();
  43623. }
  43624. this.props.clickHandler(options, e);
  43625. }
  43626. }, {
  43627. key: "render",
  43628. value: function render() {
  43629. var nextClasses = {
  43630. "slick-arrow": true,
  43631. "slick-next": true
  43632. };
  43633. var nextHandler = this.clickHandler.bind(this, {
  43634. message: "next"
  43635. });
  43636. if (!canGoNext(this.props)) {
  43637. nextClasses["slick-disabled"] = true;
  43638. nextHandler = null;
  43639. }
  43640. var nextArrowProps = {
  43641. key: "1",
  43642. "data-role": "none",
  43643. className: classnames_default()(nextClasses),
  43644. style: {
  43645. display: "block"
  43646. },
  43647. onClick: nextHandler
  43648. };
  43649. var customProps = {
  43650. currentSlide: this.props.currentSlide,
  43651. slideCount: this.props.slideCount
  43652. };
  43653. var nextArrow;
  43654. if (this.props.nextArrow) {
  43655. nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(this.props.nextArrow, (0,objectSpread2["default"])((0,objectSpread2["default"])({}, nextArrowProps), customProps));
  43656. } else {
  43657. nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", (0,esm_extends["default"])({
  43658. key: "1",
  43659. type: "button"
  43660. }, nextArrowProps), " ", "Next");
  43661. }
  43662. return nextArrow;
  43663. }
  43664. }]);
  43665. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent);
  43666. ;// ./node_modules/@ant-design/react-slick/es/inner-slider.js
  43667. var inner_slider_excluded = ["animating"];
  43668. function inner_slider_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
  43669. var InnerSlider = /*#__PURE__*/function (_React$Component) {
  43670. function InnerSlider(props) {
  43671. var _this;
  43672. (0,classCallCheck["default"])(this, InnerSlider);
  43673. _this = inner_slider_callSuper(this, InnerSlider, [props]);
  43674. (0,defineProperty["default"])(_this, "listRefHandler", function (ref) {
  43675. return _this.list = ref;
  43676. });
  43677. (0,defineProperty["default"])(_this, "trackRefHandler", function (ref) {
  43678. return _this.track = ref;
  43679. });
  43680. (0,defineProperty["default"])(_this, "adaptHeight", function () {
  43681. if (_this.props.adaptiveHeight && _this.list) {
  43682. var elem = _this.list.querySelector("[data-index=\"".concat(_this.state.currentSlide, "\"]"));
  43683. _this.list.style.height = getHeight(elem) + "px";
  43684. }
  43685. });
  43686. (0,defineProperty["default"])(_this, "componentDidMount", function () {
  43687. _this.props.onInit && _this.props.onInit();
  43688. if (_this.props.lazyLoad) {
  43689. var slidesToLoad = getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state));
  43690. if (slidesToLoad.length > 0) {
  43691. _this.setState(function (prevState) {
  43692. return {
  43693. lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
  43694. };
  43695. });
  43696. if (_this.props.onLazyLoad) {
  43697. _this.props.onLazyLoad(slidesToLoad);
  43698. }
  43699. }
  43700. }
  43701. var spec = (0,objectSpread2["default"])({
  43702. listRef: _this.list,
  43703. trackRef: _this.track
  43704. }, _this.props);
  43705. _this.updateState(spec, true, function () {
  43706. _this.adaptHeight();
  43707. _this.props.autoplay && _this.autoPlay("playing");
  43708. });
  43709. if (_this.props.lazyLoad === "progressive") {
  43710. _this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000);
  43711. }
  43712. _this.ro = new ResizeObserver_es(function () {
  43713. if (_this.state.animating) {
  43714. _this.onWindowResized(false); // don't set trackStyle hence don't break animation
  43715. _this.callbackTimers.push(setTimeout(function () {
  43716. return _this.onWindowResized();
  43717. }, _this.props.speed));
  43718. } else {
  43719. _this.onWindowResized();
  43720. }
  43721. });
  43722. _this.ro.observe(_this.list);
  43723. document.querySelectorAll && Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"), function (slide) {
  43724. slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null;
  43725. slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null;
  43726. });
  43727. if (window.addEventListener) {
  43728. window.addEventListener("resize", _this.onWindowResized);
  43729. } else {
  43730. window.attachEvent("onresize", _this.onWindowResized);
  43731. }
  43732. });
  43733. (0,defineProperty["default"])(_this, "componentWillUnmount", function () {
  43734. if (_this.animationEndCallback) {
  43735. clearTimeout(_this.animationEndCallback);
  43736. }
  43737. if (_this.lazyLoadTimer) {
  43738. clearInterval(_this.lazyLoadTimer);
  43739. }
  43740. if (_this.callbackTimers.length) {
  43741. _this.callbackTimers.forEach(function (timer) {
  43742. return clearTimeout(timer);
  43743. });
  43744. _this.callbackTimers = [];
  43745. }
  43746. if (window.addEventListener) {
  43747. window.removeEventListener("resize", _this.onWindowResized);
  43748. } else {
  43749. window.detachEvent("onresize", _this.onWindowResized);
  43750. }
  43751. if (_this.autoplayTimer) {
  43752. clearInterval(_this.autoplayTimer);
  43753. }
  43754. _this.ro.disconnect();
  43755. });
  43756. (0,defineProperty["default"])(_this, "componentDidUpdate", function (prevProps) {
  43757. _this.checkImagesLoad();
  43758. _this.props.onReInit && _this.props.onReInit();
  43759. if (_this.props.lazyLoad) {
  43760. var slidesToLoad = getOnDemandLazySlides((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state));
  43761. if (slidesToLoad.length > 0) {
  43762. _this.setState(function (prevState) {
  43763. return {
  43764. lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
  43765. };
  43766. });
  43767. if (_this.props.onLazyLoad) {
  43768. _this.props.onLazyLoad(slidesToLoad);
  43769. }
  43770. }
  43771. }
  43772. // if (this.props.onLazyLoad) {
  43773. // this.props.onLazyLoad([leftMostSlide])
  43774. // }
  43775. _this.adaptHeight();
  43776. var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({
  43777. listRef: _this.list,
  43778. trackRef: _this.track
  43779. }, _this.props), _this.state);
  43780. var setTrackStyle = _this.didPropsChange(prevProps);
  43781. setTrackStyle && _this.updateState(spec, setTrackStyle, function () {
  43782. if (_this.state.currentSlide >= external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children)) {
  43783. _this.changeSlide({
  43784. message: "index",
  43785. index: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children) - _this.props.slidesToShow,
  43786. currentSlide: _this.state.currentSlide
  43787. });
  43788. }
  43789. if (prevProps.autoplay !== _this.props.autoplay || prevProps.autoplaySpeed !== _this.props.autoplaySpeed) {
  43790. if (!prevProps.autoplay && _this.props.autoplay) {
  43791. _this.autoPlay("playing");
  43792. } else if (_this.props.autoplay) {
  43793. _this.autoPlay("update");
  43794. } else {
  43795. _this.pause("paused");
  43796. }
  43797. }
  43798. });
  43799. });
  43800. (0,defineProperty["default"])(_this, "onWindowResized", function (setTrackStyle) {
  43801. if (_this.debouncedResize) _this.debouncedResize.cancel();
  43802. _this.debouncedResize = debounce(50, function () {
  43803. return _this.resizeWindow(setTrackStyle);
  43804. });
  43805. _this.debouncedResize();
  43806. });
  43807. (0,defineProperty["default"])(_this, "resizeWindow", function () {
  43808. var setTrackStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  43809. var isTrackMounted = Boolean(_this.track && _this.track.node);
  43810. // prevent warning: setting state on unmounted component (server side rendering)
  43811. if (!isTrackMounted) return;
  43812. var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({
  43813. listRef: _this.list,
  43814. trackRef: _this.track
  43815. }, _this.props), _this.state);
  43816. _this.updateState(spec, setTrackStyle, function () {
  43817. if (_this.props.autoplay) _this.autoPlay("update");else _this.pause("paused");
  43818. });
  43819. // animating state should be cleared while resizing, otherwise autoplay stops working
  43820. _this.setState({
  43821. animating: false
  43822. });
  43823. clearTimeout(_this.animationEndCallback);
  43824. delete _this.animationEndCallback;
  43825. });
  43826. (0,defineProperty["default"])(_this, "updateState", function (spec, setTrackStyle, callback) {
  43827. var updatedState = initializedState(spec);
  43828. spec = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), updatedState), {}, {
  43829. slideIndex: updatedState.currentSlide
  43830. });
  43831. var targetLeft = getTrackLeft(spec);
  43832. spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, spec), {}, {
  43833. left: targetLeft
  43834. });
  43835. var trackStyle = getTrackCSS(spec);
  43836. if (setTrackStyle || external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children) !== external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(spec.children)) {
  43837. updatedState["trackStyle"] = trackStyle;
  43838. }
  43839. _this.setState(updatedState, callback);
  43840. });
  43841. (0,defineProperty["default"])(_this, "ssrInit", function () {
  43842. if (_this.props.variableWidth) {
  43843. var _trackWidth = 0,
  43844. _trackLeft = 0;
  43845. var childrenWidths = [];
  43846. var preClones = getPreClones((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
  43847. slideCount: _this.props.children.length
  43848. }));
  43849. var postClones = getPostClones((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
  43850. slideCount: _this.props.children.length
  43851. }));
  43852. _this.props.children.forEach(function (child) {
  43853. childrenWidths.push(child.props.style.width);
  43854. _trackWidth += child.props.style.width;
  43855. });
  43856. for (var i = 0; i < preClones; i++) {
  43857. _trackLeft += childrenWidths[childrenWidths.length - 1 - i];
  43858. _trackWidth += childrenWidths[childrenWidths.length - 1 - i];
  43859. }
  43860. for (var _i = 0; _i < postClones; _i++) {
  43861. _trackWidth += childrenWidths[_i];
  43862. }
  43863. for (var _i2 = 0; _i2 < _this.state.currentSlide; _i2++) {
  43864. _trackLeft += childrenWidths[_i2];
  43865. }
  43866. var _trackStyle = {
  43867. width: _trackWidth + "px",
  43868. left: -_trackLeft + "px"
  43869. };
  43870. if (_this.props.centerMode) {
  43871. var currentWidth = "".concat(childrenWidths[_this.state.currentSlide], "px");
  43872. _trackStyle.left = "calc(".concat(_trackStyle.left, " + (100% - ").concat(currentWidth, ") / 2 ) ");
  43873. }
  43874. return {
  43875. trackStyle: _trackStyle
  43876. };
  43877. }
  43878. var childrenCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children);
  43879. var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
  43880. slideCount: childrenCount
  43881. });
  43882. var slideCount = getPreClones(spec) + getPostClones(spec) + childrenCount;
  43883. var trackWidth = 100 / _this.props.slidesToShow * slideCount;
  43884. var slideWidth = 100 / slideCount;
  43885. var trackLeft = -slideWidth * (getPreClones(spec) + _this.state.currentSlide) * trackWidth / 100;
  43886. if (_this.props.centerMode) {
  43887. trackLeft += (100 - slideWidth * trackWidth / 100) / 2;
  43888. }
  43889. var trackStyle = {
  43890. width: trackWidth + "%",
  43891. left: trackLeft + "%"
  43892. };
  43893. return {
  43894. slideWidth: slideWidth + "%",
  43895. trackStyle: trackStyle
  43896. };
  43897. });
  43898. (0,defineProperty["default"])(_this, "checkImagesLoad", function () {
  43899. var images = _this.list && _this.list.querySelectorAll && _this.list.querySelectorAll(".slick-slide img") || [];
  43900. var imagesCount = images.length,
  43901. loadedCount = 0;
  43902. Array.prototype.forEach.call(images, function (image) {
  43903. var handler = function handler() {
  43904. return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized();
  43905. };
  43906. if (!image.onclick) {
  43907. image.onclick = function () {
  43908. return image.parentNode.focus();
  43909. };
  43910. } else {
  43911. var prevClickHandler = image.onclick;
  43912. image.onclick = function (e) {
  43913. prevClickHandler(e);
  43914. image.parentNode.focus();
  43915. };
  43916. }
  43917. if (!image.onload) {
  43918. if (_this.props.lazyLoad) {
  43919. image.onload = function () {
  43920. _this.adaptHeight();
  43921. _this.callbackTimers.push(setTimeout(_this.onWindowResized, _this.props.speed));
  43922. };
  43923. } else {
  43924. image.onload = handler;
  43925. image.onerror = function () {
  43926. handler();
  43927. _this.props.onLazyLoadError && _this.props.onLazyLoadError();
  43928. };
  43929. }
  43930. }
  43931. });
  43932. });
  43933. (0,defineProperty["default"])(_this, "progressiveLazyLoad", function () {
  43934. var slidesToLoad = [];
  43935. var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state);
  43936. for (var index = _this.state.currentSlide; index < _this.state.slideCount + getPostClones(spec); index++) {
  43937. if (_this.state.lazyLoadedList.indexOf(index) < 0) {
  43938. slidesToLoad.push(index);
  43939. break;
  43940. }
  43941. }
  43942. for (var _index = _this.state.currentSlide - 1; _index >= -getPreClones(spec); _index--) {
  43943. if (_this.state.lazyLoadedList.indexOf(_index) < 0) {
  43944. slidesToLoad.push(_index);
  43945. break;
  43946. }
  43947. }
  43948. if (slidesToLoad.length > 0) {
  43949. _this.setState(function (state) {
  43950. return {
  43951. lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad)
  43952. };
  43953. });
  43954. if (_this.props.onLazyLoad) {
  43955. _this.props.onLazyLoad(slidesToLoad);
  43956. }
  43957. } else {
  43958. if (_this.lazyLoadTimer) {
  43959. clearInterval(_this.lazyLoadTimer);
  43960. delete _this.lazyLoadTimer;
  43961. }
  43962. }
  43963. });
  43964. (0,defineProperty["default"])(_this, "slideHandler", function (index) {
  43965. var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  43966. var _this$props = _this.props,
  43967. asNavFor = _this$props.asNavFor,
  43968. beforeChange = _this$props.beforeChange,
  43969. onLazyLoad = _this$props.onLazyLoad,
  43970. speed = _this$props.speed,
  43971. afterChange = _this$props.afterChange;
  43972. // capture currentslide before state is updated
  43973. var currentSlide = _this.state.currentSlide;
  43974. var _slideHandler = slideHandler((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
  43975. index: index
  43976. }, _this.props), _this.state), {}, {
  43977. trackRef: _this.track,
  43978. useCSS: _this.props.useCSS && !dontAnimate
  43979. })),
  43980. state = _slideHandler.state,
  43981. nextState = _slideHandler.nextState;
  43982. if (!state) return;
  43983. beforeChange && beforeChange(currentSlide, state.currentSlide);
  43984. var slidesToLoad = state.lazyLoadedList.filter(function (value) {
  43985. return _this.state.lazyLoadedList.indexOf(value) < 0;
  43986. });
  43987. onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);
  43988. if (!_this.props.waitForAnimate && _this.animationEndCallback) {
  43989. clearTimeout(_this.animationEndCallback);
  43990. afterChange && afterChange(currentSlide);
  43991. delete _this.animationEndCallback;
  43992. }
  43993. _this.setState(state, function () {
  43994. // asNavForIndex check is to avoid recursive calls of slideHandler in waitForAnimate=false mode
  43995. if (asNavFor && _this.asNavForIndex !== index) {
  43996. _this.asNavForIndex = index;
  43997. asNavFor.innerSlider.slideHandler(index);
  43998. }
  43999. if (!nextState) return;
  44000. _this.animationEndCallback = setTimeout(function () {
  44001. var animating = nextState.animating,
  44002. firstBatch = (0,objectWithoutProperties["default"])(nextState, inner_slider_excluded);
  44003. _this.setState(firstBatch, function () {
  44004. _this.callbackTimers.push(setTimeout(function () {
  44005. return _this.setState({
  44006. animating: animating
  44007. });
  44008. }, 10));
  44009. afterChange && afterChange(state.currentSlide);
  44010. delete _this.animationEndCallback;
  44011. });
  44012. }, speed);
  44013. });
  44014. });
  44015. (0,defineProperty["default"])(_this, "changeSlide", function (options) {
  44016. var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  44017. var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state);
  44018. var targetSlide = changeSlide(spec, options);
  44019. if (targetSlide !== 0 && !targetSlide) return;
  44020. if (dontAnimate === true) {
  44021. _this.slideHandler(targetSlide, dontAnimate);
  44022. } else {
  44023. _this.slideHandler(targetSlide);
  44024. }
  44025. _this.props.autoplay && _this.autoPlay("update");
  44026. if (_this.props.focusOnSelect) {
  44027. var nodes = _this.list.querySelectorAll(".slick-current");
  44028. nodes[0] && nodes[0].focus();
  44029. }
  44030. });
  44031. (0,defineProperty["default"])(_this, "clickHandler", function (e) {
  44032. if (_this.clickable === false) {
  44033. e.stopPropagation();
  44034. e.preventDefault();
  44035. }
  44036. _this.clickable = true;
  44037. });
  44038. (0,defineProperty["default"])(_this, "keyHandler", function (e) {
  44039. var dir = keyHandler(e, _this.props.accessibility, _this.props.rtl);
  44040. dir !== "" && _this.changeSlide({
  44041. message: dir
  44042. });
  44043. });
  44044. (0,defineProperty["default"])(_this, "selectHandler", function (options) {
  44045. _this.changeSlide(options);
  44046. });
  44047. (0,defineProperty["default"])(_this, "disableBodyScroll", function () {
  44048. var preventDefault = function preventDefault(e) {
  44049. e = e || window.event;
  44050. if (e.preventDefault) e.preventDefault();
  44051. e.returnValue = false;
  44052. };
  44053. window.ontouchmove = preventDefault;
  44054. });
  44055. (0,defineProperty["default"])(_this, "enableBodyScroll", function () {
  44056. window.ontouchmove = null;
  44057. });
  44058. (0,defineProperty["default"])(_this, "swipeStart", function (e) {
  44059. if (_this.props.verticalSwiping) {
  44060. _this.disableBodyScroll();
  44061. }
  44062. var state = swipeStart(e, _this.props.swipe, _this.props.draggable);
  44063. state !== "" && _this.setState(state);
  44064. });
  44065. (0,defineProperty["default"])(_this, "swipeMove", function (e) {
  44066. var state = swipeMove(e, (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
  44067. trackRef: _this.track,
  44068. listRef: _this.list,
  44069. slideIndex: _this.state.currentSlide
  44070. }));
  44071. if (!state) return;
  44072. if (state["swiping"]) {
  44073. _this.clickable = false;
  44074. }
  44075. _this.setState(state);
  44076. });
  44077. (0,defineProperty["default"])(_this, "swipeEnd", function (e) {
  44078. var state = swipeEnd(e, (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state), {}, {
  44079. trackRef: _this.track,
  44080. listRef: _this.list,
  44081. slideIndex: _this.state.currentSlide
  44082. }));
  44083. if (!state) return;
  44084. var triggerSlideHandler = state["triggerSlideHandler"];
  44085. delete state["triggerSlideHandler"];
  44086. _this.setState(state);
  44087. if (triggerSlideHandler === undefined) return;
  44088. _this.slideHandler(triggerSlideHandler);
  44089. if (_this.props.verticalSwiping) {
  44090. _this.enableBodyScroll();
  44091. }
  44092. });
  44093. (0,defineProperty["default"])(_this, "touchEnd", function (e) {
  44094. _this.swipeEnd(e);
  44095. _this.clickable = true;
  44096. });
  44097. (0,defineProperty["default"])(_this, "slickPrev", function () {
  44098. // this and fellow methods are wrapped in setTimeout
  44099. // to make sure initialize setState has happened before
  44100. // any of such methods are called
  44101. _this.callbackTimers.push(setTimeout(function () {
  44102. return _this.changeSlide({
  44103. message: "previous"
  44104. });
  44105. }, 0));
  44106. });
  44107. (0,defineProperty["default"])(_this, "slickNext", function () {
  44108. _this.callbackTimers.push(setTimeout(function () {
  44109. return _this.changeSlide({
  44110. message: "next"
  44111. });
  44112. }, 0));
  44113. });
  44114. (0,defineProperty["default"])(_this, "slickGoTo", function (slide) {
  44115. var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  44116. slide = Number(slide);
  44117. if (isNaN(slide)) return "";
  44118. _this.callbackTimers.push(setTimeout(function () {
  44119. return _this.changeSlide({
  44120. message: "index",
  44121. index: slide,
  44122. currentSlide: _this.state.currentSlide
  44123. }, dontAnimate);
  44124. }, 0));
  44125. });
  44126. (0,defineProperty["default"])(_this, "play", function () {
  44127. var nextIndex;
  44128. if (_this.props.rtl) {
  44129. nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;
  44130. } else {
  44131. if (canGoNext((0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state))) {
  44132. nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;
  44133. } else {
  44134. return false;
  44135. }
  44136. }
  44137. _this.slideHandler(nextIndex);
  44138. });
  44139. (0,defineProperty["default"])(_this, "autoPlay", function (playType) {
  44140. if (_this.autoplayTimer) {
  44141. clearInterval(_this.autoplayTimer);
  44142. }
  44143. var autoplaying = _this.state.autoplaying;
  44144. if (playType === "update") {
  44145. if (autoplaying === "hovered" || autoplaying === "focused" || autoplaying === "paused") {
  44146. return;
  44147. }
  44148. } else if (playType === "leave") {
  44149. if (autoplaying === "paused" || autoplaying === "focused") {
  44150. return;
  44151. }
  44152. } else if (playType === "blur") {
  44153. if (autoplaying === "paused" || autoplaying === "hovered") {
  44154. return;
  44155. }
  44156. }
  44157. _this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50);
  44158. _this.setState({
  44159. autoplaying: "playing"
  44160. });
  44161. });
  44162. (0,defineProperty["default"])(_this, "pause", function (pauseType) {
  44163. if (_this.autoplayTimer) {
  44164. clearInterval(_this.autoplayTimer);
  44165. _this.autoplayTimer = null;
  44166. }
  44167. var autoplaying = _this.state.autoplaying;
  44168. if (pauseType === "paused") {
  44169. _this.setState({
  44170. autoplaying: "paused"
  44171. });
  44172. } else if (pauseType === "focused") {
  44173. if (autoplaying === "hovered" || autoplaying === "playing") {
  44174. _this.setState({
  44175. autoplaying: "focused"
  44176. });
  44177. }
  44178. } else {
  44179. // pauseType is 'hovered'
  44180. if (autoplaying === "playing") {
  44181. _this.setState({
  44182. autoplaying: "hovered"
  44183. });
  44184. }
  44185. }
  44186. });
  44187. (0,defineProperty["default"])(_this, "onDotsOver", function () {
  44188. return _this.props.autoplay && _this.pause("hovered");
  44189. });
  44190. (0,defineProperty["default"])(_this, "onDotsLeave", function () {
  44191. return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
  44192. });
  44193. (0,defineProperty["default"])(_this, "onTrackOver", function () {
  44194. return _this.props.autoplay && _this.pause("hovered");
  44195. });
  44196. (0,defineProperty["default"])(_this, "onTrackLeave", function () {
  44197. return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
  44198. });
  44199. (0,defineProperty["default"])(_this, "onSlideFocus", function () {
  44200. return _this.props.autoplay && _this.pause("focused");
  44201. });
  44202. (0,defineProperty["default"])(_this, "onSlideBlur", function () {
  44203. return _this.props.autoplay && _this.state.autoplaying === "focused" && _this.autoPlay("blur");
  44204. });
  44205. (0,defineProperty["default"])(_this, "render", function () {
  44206. var className = classnames_default()("slick-slider", _this.props.className, {
  44207. "slick-vertical": _this.props.vertical,
  44208. "slick-initialized": true
  44209. });
  44210. var spec = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.props), _this.state);
  44211. var trackProps = extractObject(spec, ["fade", "cssEase", "speed", "infinite", "centerMode", "focusOnSelect", "currentSlide", "lazyLoad", "lazyLoadedList", "rtl", "slideWidth", "slideHeight", "listHeight", "vertical", "slidesToShow", "slidesToScroll", "slideCount", "trackStyle", "variableWidth", "unslick", "centerPadding", "targetSlide", "useCSS"]);
  44212. var pauseOnHover = _this.props.pauseOnHover;
  44213. trackProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, trackProps), {}, {
  44214. onMouseEnter: pauseOnHover ? _this.onTrackOver : null,
  44215. onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,
  44216. onMouseOver: pauseOnHover ? _this.onTrackOver : null,
  44217. focusOnSelect: _this.props.focusOnSelect && _this.clickable ? _this.selectHandler : null
  44218. });
  44219. var dots;
  44220. if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {
  44221. var dotProps = extractObject(spec, ["dotsClass", "slideCount", "slidesToShow", "currentSlide", "slidesToScroll", "clickHandler", "children", "customPaging", "infinite", "appendDots"]);
  44222. var pauseOnDotsHover = _this.props.pauseOnDotsHover;
  44223. dotProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, dotProps), {}, {
  44224. clickHandler: _this.changeSlide,
  44225. onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,
  44226. onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,
  44227. onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null
  44228. });
  44229. dots = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Dots, dotProps);
  44230. }
  44231. var prevArrow, nextArrow;
  44232. var arrowProps = extractObject(spec, ["infinite", "centerMode", "currentSlide", "slideCount", "slidesToShow", "prevArrow", "nextArrow"]);
  44233. arrowProps.clickHandler = _this.changeSlide;
  44234. if (_this.props.arrows) {
  44235. prevArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PrevArrow, arrowProps);
  44236. nextArrow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NextArrow, arrowProps);
  44237. }
  44238. var verticalHeightStyle = null;
  44239. if (_this.props.vertical) {
  44240. verticalHeightStyle = {
  44241. height: _this.state.listHeight
  44242. };
  44243. }
  44244. var centerPaddingStyle = null;
  44245. if (_this.props.vertical === false) {
  44246. if (_this.props.centerMode === true) {
  44247. centerPaddingStyle = {
  44248. padding: "0px " + _this.props.centerPadding
  44249. };
  44250. }
  44251. } else {
  44252. if (_this.props.centerMode === true) {
  44253. centerPaddingStyle = {
  44254. padding: _this.props.centerPadding + " 0px"
  44255. };
  44256. }
  44257. }
  44258. var listStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, verticalHeightStyle), centerPaddingStyle);
  44259. var touchMove = _this.props.touchMove;
  44260. var listProps = {
  44261. className: "slick-list",
  44262. style: listStyle,
  44263. onClick: _this.clickHandler,
  44264. onMouseDown: touchMove ? _this.swipeStart : null,
  44265. onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
  44266. onMouseUp: touchMove ? _this.swipeEnd : null,
  44267. onMouseLeave: _this.state.dragging && touchMove ? _this.swipeEnd : null,
  44268. onTouchStart: touchMove ? _this.swipeStart : null,
  44269. onTouchMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
  44270. onTouchEnd: touchMove ? _this.touchEnd : null,
  44271. onTouchCancel: _this.state.dragging && touchMove ? _this.swipeEnd : null,
  44272. onKeyDown: _this.props.accessibility ? _this.keyHandler : null
  44273. };
  44274. var innerSliderProps = {
  44275. className: className,
  44276. dir: "ltr",
  44277. style: _this.props.style
  44278. };
  44279. if (_this.props.unslick) {
  44280. listProps = {
  44281. className: "slick-list"
  44282. };
  44283. innerSliderProps = {
  44284. className: className,
  44285. style: _this.props.style
  44286. };
  44287. }
  44288. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", innerSliderProps, !_this.props.unslick ? prevArrow : "", /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  44289. ref: _this.listRefHandler
  44290. }, listProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Track, (0,esm_extends["default"])({
  44291. ref: _this.trackRefHandler
  44292. }, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : "", !_this.props.unslick ? dots : "");
  44293. });
  44294. _this.list = null;
  44295. _this.track = null;
  44296. _this.state = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, initial_state), {}, {
  44297. currentSlide: _this.props.initialSlide,
  44298. targetSlide: _this.props.initialSlide ? _this.props.initialSlide : 0,
  44299. slideCount: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(_this.props.children)
  44300. });
  44301. _this.callbackTimers = [];
  44302. _this.clickable = true;
  44303. _this.debouncedResize = null;
  44304. var ssrState = _this.ssrInit();
  44305. _this.state = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, _this.state), ssrState);
  44306. return _this;
  44307. }
  44308. (0,inherits["default"])(InnerSlider, _React$Component);
  44309. return (0,createClass["default"])(InnerSlider, [{
  44310. key: "didPropsChange",
  44311. value: function didPropsChange(prevProps) {
  44312. var setTrackStyle = false;
  44313. for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {
  44314. var key = _Object$keys[_i3];
  44315. // eslint-disable-next-line no-prototype-builtins
  44316. if (!prevProps.hasOwnProperty(key)) {
  44317. setTrackStyle = true;
  44318. break;
  44319. }
  44320. if ((0,esm_typeof["default"])(prevProps[key]) === "object" || typeof prevProps[key] === "function" || isNaN(prevProps[key])) {
  44321. continue;
  44322. }
  44323. if (prevProps[key] !== this.props[key]) {
  44324. setTrackStyle = true;
  44325. break;
  44326. }
  44327. }
  44328. return setTrackStyle || external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(this.props.children) !== external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(prevProps.children);
  44329. }
  44330. }]);
  44331. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
  44332. // EXTERNAL MODULE: ./node_modules/json2mq/index.js
  44333. var json2mq = __webpack_require__("./node_modules/json2mq/index.js");
  44334. var json2mq_default = /*#__PURE__*/__webpack_require__.n(json2mq);
  44335. ;// ./node_modules/@ant-design/react-slick/es/slider.js
  44336. function slider_callSuper(t, o, e) { return o = (0,getPrototypeOf["default"])(o), (0,possibleConstructorReturn["default"])(t, (0,isNativeReflectConstruct["default"])() ? Reflect.construct(o, e || [], (0,getPrototypeOf["default"])(t).constructor) : o.apply(t, e)); }
  44337. var Slider = /*#__PURE__*/function (_React$Component) {
  44338. function Slider(props) {
  44339. var _this;
  44340. (0,classCallCheck["default"])(this, Slider);
  44341. _this = slider_callSuper(this, Slider, [props]);
  44342. (0,defineProperty["default"])(_this, "innerSliderRefHandler", function (ref) {
  44343. return _this.innerSlider = ref;
  44344. });
  44345. (0,defineProperty["default"])(_this, "slickPrev", function () {
  44346. return _this.innerSlider.slickPrev();
  44347. });
  44348. (0,defineProperty["default"])(_this, "slickNext", function () {
  44349. return _this.innerSlider.slickNext();
  44350. });
  44351. (0,defineProperty["default"])(_this, "slickGoTo", function (slide) {
  44352. var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  44353. return _this.innerSlider.slickGoTo(slide, dontAnimate);
  44354. });
  44355. (0,defineProperty["default"])(_this, "slickPause", function () {
  44356. return _this.innerSlider.pause("paused");
  44357. });
  44358. (0,defineProperty["default"])(_this, "slickPlay", function () {
  44359. return _this.innerSlider.autoPlay("play");
  44360. });
  44361. _this.state = {
  44362. breakpoint: null
  44363. };
  44364. _this._responsiveMediaHandlers = [];
  44365. return _this;
  44366. }
  44367. (0,inherits["default"])(Slider, _React$Component);
  44368. return (0,createClass["default"])(Slider, [{
  44369. key: "media",
  44370. value: function media(query, handler) {
  44371. // javascript handler for css media query
  44372. var mql = window.matchMedia(query);
  44373. var listener = function listener(_ref) {
  44374. var matches = _ref.matches;
  44375. if (matches) {
  44376. handler();
  44377. }
  44378. };
  44379. mql.addListener(listener);
  44380. listener(mql);
  44381. this._responsiveMediaHandlers.push({
  44382. mql: mql,
  44383. query: query,
  44384. listener: listener
  44385. });
  44386. }
  44387. // handles responsive breakpoints
  44388. }, {
  44389. key: "componentDidMount",
  44390. value: function componentDidMount() {
  44391. var _this2 = this;
  44392. // performance monitoring
  44393. //if (process.env.NODE_ENV !== 'production') {
  44394. //const { whyDidYouUpdate } = require('why-did-you-update')
  44395. //whyDidYouUpdate(React)
  44396. //}
  44397. if (this.props.responsive) {
  44398. var breakpoints = this.props.responsive.map(function (breakpt) {
  44399. return breakpt.breakpoint;
  44400. });
  44401. // sort them in increasing order of their numerical value
  44402. breakpoints.sort(function (x, y) {
  44403. return x - y;
  44404. });
  44405. breakpoints.forEach(function (breakpoint, index) {
  44406. // media query for each breakpoint
  44407. var bQuery;
  44408. if (index === 0) {
  44409. bQuery = json2mq_default()({
  44410. minWidth: 0,
  44411. maxWidth: breakpoint
  44412. });
  44413. } else {
  44414. bQuery = json2mq_default()({
  44415. minWidth: breakpoints[index - 1] + 1,
  44416. maxWidth: breakpoint
  44417. });
  44418. }
  44419. // when not using server side rendering
  44420. canUseDOM() && _this2.media(bQuery, function () {
  44421. _this2.setState({
  44422. breakpoint: breakpoint
  44423. });
  44424. });
  44425. });
  44426. // Register media query for full screen. Need to support resize from small to large
  44427. // convert javascript object to media query string
  44428. var query = json2mq_default()({
  44429. minWidth: breakpoints.slice(-1)[0]
  44430. });
  44431. canUseDOM() && this.media(query, function () {
  44432. _this2.setState({
  44433. breakpoint: null
  44434. });
  44435. });
  44436. }
  44437. }
  44438. }, {
  44439. key: "componentWillUnmount",
  44440. value: function componentWillUnmount() {
  44441. this._responsiveMediaHandlers.forEach(function (obj) {
  44442. obj.mql.removeListener(obj.listener);
  44443. });
  44444. }
  44445. }, {
  44446. key: "render",
  44447. value: function render() {
  44448. var _this3 = this;
  44449. var settings;
  44450. var newProps;
  44451. if (this.state.breakpoint) {
  44452. newProps = this.props.responsive.filter(function (resp) {
  44453. return resp.breakpoint === _this3.state.breakpoint;
  44454. });
  44455. settings = newProps[0].settings === "unslick" ? "unslick" : (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, default_props), this.props), newProps[0].settings);
  44456. } else {
  44457. settings = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, default_props), this.props);
  44458. }
  44459. // force scrolling by one if centerMode is on
  44460. if (settings.centerMode) {
  44461. if (settings.slidesToScroll > 1 && "development" !== "production") {
  44462. console.warn("slidesToScroll should be equal to 1 in centerMode, you are using ".concat(settings.slidesToScroll));
  44463. }
  44464. settings.slidesToScroll = 1;
  44465. }
  44466. // force showing one slide and scrolling by one if the fade mode is on
  44467. if (settings.fade) {
  44468. if (settings.slidesToShow > 1 && "development" !== "production") {
  44469. console.warn("slidesToShow should be equal to 1 when fade is true, you're using ".concat(settings.slidesToShow));
  44470. }
  44471. if (settings.slidesToScroll > 1 && "development" !== "production") {
  44472. console.warn("slidesToScroll should be equal to 1 when fade is true, you're using ".concat(settings.slidesToScroll));
  44473. }
  44474. settings.slidesToShow = 1;
  44475. settings.slidesToScroll = 1;
  44476. }
  44477. // makes sure that children is an array, even when there is only 1 child
  44478. var children = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(this.props.children);
  44479. // Children may contain false or null, so we should filter them
  44480. // children may also contain string filled with spaces (in certain cases where we use jsx strings)
  44481. children = children.filter(function (child) {
  44482. if (typeof child === "string") {
  44483. return !!child.trim();
  44484. }
  44485. return !!child;
  44486. });
  44487. // rows and slidesPerRow logic is handled here
  44488. if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {
  44489. console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1");
  44490. settings.variableWidth = false;
  44491. }
  44492. var newChildren = [];
  44493. var currentWidth = null;
  44494. for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {
  44495. var newSlide = [];
  44496. for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {
  44497. var row = [];
  44498. for (var k = j; k < j + settings.slidesPerRow; k += 1) {
  44499. if (settings.variableWidth && children[k].props.style) {
  44500. currentWidth = children[k].props.style.width;
  44501. }
  44502. if (k >= children.length) break;
  44503. row.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children[k], {
  44504. key: 100 * i + 10 * j + k,
  44505. tabIndex: -1,
  44506. style: {
  44507. width: "".concat(100 / settings.slidesPerRow, "%"),
  44508. display: "inline-block"
  44509. }
  44510. }));
  44511. }
  44512. newSlide.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  44513. key: 10 * i + j
  44514. }, row));
  44515. }
  44516. if (settings.variableWidth) {
  44517. newChildren.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  44518. key: i,
  44519. style: {
  44520. width: currentWidth
  44521. }
  44522. }, newSlide));
  44523. } else {
  44524. newChildren.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  44525. key: i
  44526. }, newSlide));
  44527. }
  44528. }
  44529. if (settings === "unslick") {
  44530. var className = "regular slider " + (this.props.className || "");
  44531. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  44532. className: className
  44533. }, children);
  44534. } else if (newChildren.length <= settings.slidesToShow && !settings.infinite) {
  44535. settings.unslick = true;
  44536. }
  44537. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InnerSlider, (0,esm_extends["default"])({
  44538. style: this.props.style,
  44539. ref: this.innerSliderRefHandler
  44540. }, filterSettings(settings)), newChildren);
  44541. }
  44542. }]);
  44543. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
  44544. ;// ./node_modules/@ant-design/react-slick/es/index.js
  44545. /* harmony default export */ var react_slick_es = (Slider);
  44546. // EXTERNAL MODULE: ./components/carousel/style/index.ts
  44547. var carousel_style = __webpack_require__("./components/carousel/style/index.ts");
  44548. ;// ./components/carousel/index.tsx
  44549. var carousel_rest = undefined && undefined.__rest || function (s, e) {
  44550. var t = {};
  44551. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  44552. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  44553. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  44554. }
  44555. return t;
  44556. };
  44557. const dotsClass = 'slick-dots';
  44558. const ArrowButton = _a => {
  44559. var {
  44560. currentSlide,
  44561. slideCount
  44562. } = _a,
  44563. rest = carousel_rest(_a, ["currentSlide", "slideCount"]);
  44564. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", Object.assign({
  44565. type: "button"
  44566. }, rest));
  44567. };
  44568. const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  44569. const {
  44570. dots = true,
  44571. arrows = false,
  44572. prevArrow,
  44573. nextArrow,
  44574. draggable = false,
  44575. waitForAnimate = false,
  44576. dotPosition = 'bottom',
  44577. vertical = dotPosition === 'left' || dotPosition === 'right',
  44578. rootClassName,
  44579. className: customClassName,
  44580. style,
  44581. id,
  44582. autoplay = false,
  44583. autoplaySpeed = 3000,
  44584. rtl
  44585. } = props,
  44586. otherProps = carousel_rest(props, ["dots", "arrows", "prevArrow", "nextArrow", "draggable", "waitForAnimate", "dotPosition", "vertical", "rootClassName", "className", "style", "id", "autoplay", "autoplaySpeed", "rtl"]);
  44587. const {
  44588. getPrefixCls,
  44589. direction,
  44590. className: contextClassName,
  44591. style: contextStyle
  44592. } = (0,config_provider_context.useComponentConfig)('carousel');
  44593. const slickRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  44594. const goTo = (slide, dontAnimate = false) => {
  44595. slickRef.current.slickGoTo(slide, dontAnimate);
  44596. };
  44597. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  44598. goTo,
  44599. autoPlay: slickRef.current.innerSlider.autoPlay,
  44600. innerSlider: slickRef.current.innerSlider,
  44601. prev: slickRef.current.slickPrev,
  44602. next: slickRef.current.slickNext
  44603. }), [slickRef.current]);
  44604. const {
  44605. children,
  44606. initialSlide = 0
  44607. } = props;
  44608. const count = external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(children);
  44609. const isRTL = (rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl') && !vertical;
  44610. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  44611. if (count > 0) {
  44612. const newIndex = isRTL ? count - initialSlide - 1 : initialSlide;
  44613. goTo(newIndex, false);
  44614. }
  44615. }, [count, initialSlide, isRTL]);
  44616. const newProps = Object.assign({
  44617. vertical,
  44618. className: classnames_default()(customClassName, contextClassName),
  44619. style: Object.assign(Object.assign({}, contextStyle), style),
  44620. autoplay: !!autoplay
  44621. }, otherProps);
  44622. if (newProps.effect === 'fade') {
  44623. newProps.fade = true;
  44624. }
  44625. const prefixCls = getPrefixCls('carousel', newProps.prefixCls);
  44626. const enableDots = !!dots;
  44627. const dsClass = classnames_default()(dotsClass, `${dotsClass}-${dotPosition}`, typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className);
  44628. const [wrapCSSVar, hashId, cssVarCls] = (0,carousel_style["default"])(prefixCls);
  44629. const className = classnames_default()(prefixCls, {
  44630. [`${prefixCls}-rtl`]: isRTL,
  44631. [`${prefixCls}-vertical`]: newProps.vertical
  44632. }, hashId, cssVarCls, rootClassName);
  44633. const mergedShowDuration = autoplay && (typeof autoplay === 'object' ? autoplay.dotDuration : false);
  44634. const dotDurationStyle = mergedShowDuration ? {
  44635. [carousel_style.DotDuration]: `${autoplaySpeed}ms`
  44636. } : {};
  44637. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  44638. className: className,
  44639. id: id,
  44640. style: dotDurationStyle
  44641. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(react_slick_es, Object.assign({
  44642. ref: slickRef
  44643. }, newProps, {
  44644. dots: enableDots,
  44645. dotsClass: dsClass,
  44646. arrows: arrows,
  44647. prevArrow: prevArrow !== null && prevArrow !== void 0 ? prevArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ArrowButton, {
  44648. "aria-label": isRTL ? 'next' : 'prev'
  44649. }),
  44650. nextArrow: nextArrow !== null && nextArrow !== void 0 ? nextArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ArrowButton, {
  44651. "aria-label": isRTL ? 'prev' : 'next'
  44652. }),
  44653. draggable: draggable,
  44654. verticalSwiping: vertical,
  44655. autoplaySpeed: autoplaySpeed,
  44656. waitForAnimate: waitForAnimate,
  44657. rtl: isRTL
  44658. }))));
  44659. });
  44660. if (true) {
  44661. Carousel.displayName = 'Carousel';
  44662. }
  44663. /* harmony default export */ var carousel = (Carousel);
  44664. ;// ./node_modules/rc-cascader/es/context.js
  44665. var CascaderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  44666. /* harmony default export */ var rc_cascader_es_context = (CascaderContext);
  44667. ;// ./node_modules/rc-cascader/es/hooks/useSearchOptions.js
  44668. var SEARCH_MARK = '__rc_cascader_search_mark__';
  44669. var defaultFilter = function defaultFilter(search, options, _ref) {
  44670. var _ref$label = _ref.label,
  44671. label = _ref$label === void 0 ? '' : _ref$label;
  44672. return options.some(function (opt) {
  44673. return String(opt[label]).toLowerCase().includes(search.toLowerCase());
  44674. });
  44675. };
  44676. var defaultRender = function defaultRender(inputValue, path, prefixCls, fieldNames) {
  44677. return path.map(function (opt) {
  44678. return opt[fieldNames.label];
  44679. }).join(' / ');
  44680. };
  44681. var useSearchOptions = function useSearchOptions(search, options, fieldNames, prefixCls, config, enableHalfPath) {
  44682. var _config$filter = config.filter,
  44683. filter = _config$filter === void 0 ? defaultFilter : _config$filter,
  44684. _config$render = config.render,
  44685. render = _config$render === void 0 ? defaultRender : _config$render,
  44686. _config$limit = config.limit,
  44687. limit = _config$limit === void 0 ? 50 : _config$limit,
  44688. sort = config.sort;
  44689. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  44690. var filteredOptions = [];
  44691. if (!search) {
  44692. return [];
  44693. }
  44694. function dig(list, pathOptions) {
  44695. var parentDisabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  44696. list.forEach(function (option) {
  44697. // Perf saving when `sort` is disabled and `limit` is provided
  44698. if (!sort && limit !== false && limit > 0 && filteredOptions.length >= limit) {
  44699. return;
  44700. }
  44701. var connectedPathOptions = [].concat((0,toConsumableArray["default"])(pathOptions), [option]);
  44702. var children = option[fieldNames.children];
  44703. var mergedDisabled = parentDisabled || option.disabled;
  44704. // If current option is filterable
  44705. if (
  44706. // If is leaf option
  44707. !children || children.length === 0 ||
  44708. // If is changeOnSelect or multiple
  44709. enableHalfPath) {
  44710. if (filter(search, connectedPathOptions, {
  44711. label: fieldNames.label
  44712. })) {
  44713. var _objectSpread2;
  44714. filteredOptions.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, option), {}, (_objectSpread2 = {
  44715. disabled: mergedDisabled
  44716. }, (0,defineProperty["default"])(_objectSpread2, fieldNames.label, render(search, connectedPathOptions, prefixCls, fieldNames)), (0,defineProperty["default"])(_objectSpread2, SEARCH_MARK, connectedPathOptions), (0,defineProperty["default"])(_objectSpread2, fieldNames.children, undefined), _objectSpread2)));
  44717. }
  44718. }
  44719. if (children) {
  44720. dig(option[fieldNames.children], connectedPathOptions, mergedDisabled);
  44721. }
  44722. });
  44723. }
  44724. dig(options, []);
  44725. // Do sort
  44726. if (sort) {
  44727. filteredOptions.sort(function (a, b) {
  44728. return sort(a[SEARCH_MARK], b[SEARCH_MARK], search, fieldNames);
  44729. });
  44730. }
  44731. return limit !== false && limit > 0 ? filteredOptions.slice(0, limit) : filteredOptions;
  44732. }, [search, options, fieldNames, prefixCls, render, enableHalfPath, filter, sort, limit]);
  44733. };
  44734. /* harmony default export */ var hooks_useSearchOptions = (useSearchOptions);
  44735. ;// ./node_modules/rc-cascader/es/utils/commonUtil.js
  44736. var VALUE_SPLIT = '__RC_CASCADER_SPLIT__';
  44737. var SHOW_PARENT = 'SHOW_PARENT';
  44738. var SHOW_CHILD = 'SHOW_CHILD';
  44739. /**
  44740. * Will convert value to string, and join with `VALUE_SPLIT`
  44741. */
  44742. function toPathKey(value) {
  44743. return value.join(VALUE_SPLIT);
  44744. }
  44745. /**
  44746. * Batch convert value to string, and join with `VALUE_SPLIT`
  44747. */
  44748. function toPathKeys(value) {
  44749. return value.map(toPathKey);
  44750. }
  44751. function toPathValueStr(pathKey) {
  44752. return pathKey.split(VALUE_SPLIT);
  44753. }
  44754. function commonUtil_fillFieldNames(fieldNames) {
  44755. var _ref = fieldNames || {},
  44756. label = _ref.label,
  44757. value = _ref.value,
  44758. children = _ref.children;
  44759. var val = value || 'value';
  44760. return {
  44761. label: label || 'label',
  44762. value: val,
  44763. key: val,
  44764. children: children || 'children'
  44765. };
  44766. }
  44767. function isLeaf(option, fieldNames) {
  44768. var _option$isLeaf, _option;
  44769. return (_option$isLeaf = option.isLeaf) !== null && _option$isLeaf !== void 0 ? _option$isLeaf : !((_option = option[fieldNames.children]) !== null && _option !== void 0 && _option.length);
  44770. }
  44771. function scrollIntoParentView(element) {
  44772. var parent = element.parentElement;
  44773. if (!parent) {
  44774. return;
  44775. }
  44776. var elementToParent = element.offsetTop - parent.offsetTop; // offsetParent may not be parent.
  44777. if (elementToParent - parent.scrollTop < 0) {
  44778. parent.scrollTo({
  44779. top: elementToParent
  44780. });
  44781. } else if (elementToParent + element.offsetHeight - parent.scrollTop > parent.offsetHeight) {
  44782. parent.scrollTo({
  44783. top: elementToParent + element.offsetHeight - parent.offsetHeight
  44784. });
  44785. }
  44786. }
  44787. function getFullPathKeys(options, fieldNames) {
  44788. return options.map(function (item) {
  44789. var _item$SEARCH_MARK;
  44790. return (_item$SEARCH_MARK = item[SEARCH_MARK]) === null || _item$SEARCH_MARK === void 0 ? void 0 : _item$SEARCH_MARK.map(function (opt) {
  44791. return opt[fieldNames.value];
  44792. });
  44793. });
  44794. }
  44795. function isMultipleValue(value) {
  44796. return Array.isArray(value) && Array.isArray(value[0]);
  44797. }
  44798. function toRawValues(value) {
  44799. if (!value) {
  44800. return [];
  44801. }
  44802. if (isMultipleValue(value)) {
  44803. return value;
  44804. }
  44805. return (value.length === 0 ? [] : [value]).map(function (val) {
  44806. return Array.isArray(val) ? val : [val];
  44807. });
  44808. }
  44809. ;// ./node_modules/rc-cascader/es/utils/treeUtil.js
  44810. function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedStrategy) {
  44811. var valueSet = new Set(pathKeys);
  44812. var keyPathEntities = getKeyPathEntities();
  44813. return pathKeys.filter(function (key) {
  44814. var entity = keyPathEntities[key];
  44815. var parent = entity ? entity.parent : null;
  44816. var children = entity ? entity.children : null;
  44817. if (entity && entity.node.disabled) {
  44818. return true;
  44819. }
  44820. return showCheckedStrategy === SHOW_CHILD ? !(children && children.some(function (child) {
  44821. return child.key && valueSet.has(child.key);
  44822. })) : !(parent && !parent.node.disabled && valueSet.has(parent.key));
  44823. });
  44824. }
  44825. function toPathOptions(valueCells, options, fieldNames) {
  44826. var stringMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  44827. var currentList = options;
  44828. var valueOptions = [];
  44829. var _loop = function _loop() {
  44830. var _currentList, _currentList2, _foundOption$fieldNam;
  44831. var valueCell = valueCells[i];
  44832. var foundIndex = (_currentList = currentList) === null || _currentList === void 0 ? void 0 : _currentList.findIndex(function (option) {
  44833. var val = option[fieldNames.value];
  44834. return stringMode ? String(val) === String(valueCell) : val === valueCell;
  44835. });
  44836. var foundOption = foundIndex !== -1 ? (_currentList2 = currentList) === null || _currentList2 === void 0 ? void 0 : _currentList2[foundIndex] : null;
  44837. valueOptions.push({
  44838. value: (_foundOption$fieldNam = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.value]) !== null && _foundOption$fieldNam !== void 0 ? _foundOption$fieldNam : valueCell,
  44839. index: foundIndex,
  44840. option: foundOption
  44841. });
  44842. currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];
  44843. };
  44844. for (var i = 0; i < valueCells.length; i += 1) {
  44845. _loop();
  44846. }
  44847. return valueOptions;
  44848. }
  44849. ;// ./node_modules/rc-cascader/es/hooks/useDisplayValues.js
  44850. /* harmony default export */ var useDisplayValues = (function (rawValues, options, fieldNames, multiple, displayRender) {
  44851. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  44852. var mergedDisplayRender = displayRender ||
  44853. // Default displayRender
  44854. function (labels) {
  44855. var mergedLabels = multiple ? labels.slice(-1) : labels;
  44856. var SPLIT = ' / ';
  44857. if (mergedLabels.every(function (label) {
  44858. return ['string', 'number'].includes((0,esm_typeof["default"])(label));
  44859. })) {
  44860. return mergedLabels.join(SPLIT);
  44861. }
  44862. // If exist non-string value, use ReactNode instead
  44863. return mergedLabels.reduce(function (list, label, index) {
  44864. var keyedLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(label) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(label, {
  44865. key: index
  44866. }) : label;
  44867. if (index === 0) {
  44868. return [keyedLabel];
  44869. }
  44870. return [].concat((0,toConsumableArray["default"])(list), [SPLIT, keyedLabel]);
  44871. }, []);
  44872. };
  44873. return rawValues.map(function (valueCells) {
  44874. var _valueOptions;
  44875. var valueOptions = toPathOptions(valueCells, options, fieldNames);
  44876. var label = mergedDisplayRender(valueOptions.map(function (_ref) {
  44877. var _option$fieldNames$la;
  44878. var option = _ref.option,
  44879. value = _ref.value;
  44880. return (_option$fieldNames$la = option === null || option === void 0 ? void 0 : option[fieldNames.label]) !== null && _option$fieldNames$la !== void 0 ? _option$fieldNames$la : value;
  44881. }), valueOptions.map(function (_ref2) {
  44882. var option = _ref2.option;
  44883. return option;
  44884. }));
  44885. var value = toPathKey(valueCells);
  44886. return {
  44887. label: label,
  44888. value: value,
  44889. key: value,
  44890. valueCells: valueCells,
  44891. disabled: (_valueOptions = valueOptions[valueOptions.length - 1]) === null || _valueOptions === void 0 || (_valueOptions = _valueOptions.option) === null || _valueOptions === void 0 ? void 0 : _valueOptions.disabled
  44892. };
  44893. });
  44894. }, [rawValues, options, fieldNames, displayRender, multiple]);
  44895. });
  44896. ;// ./node_modules/rc-cascader/es/hooks/useMissingValues.js
  44897. function useMissingValues(options, fieldNames) {
  44898. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (rawValues) {
  44899. var missingValues = [];
  44900. var existsValues = [];
  44901. rawValues.forEach(function (valueCell) {
  44902. var pathOptions = toPathOptions(valueCell, options, fieldNames);
  44903. if (pathOptions.every(function (opt) {
  44904. return opt.option;
  44905. })) {
  44906. existsValues.push(valueCell);
  44907. } else {
  44908. missingValues.push(valueCell);
  44909. }
  44910. });
  44911. return [existsValues, missingValues];
  44912. }, [options, fieldNames]);
  44913. }
  44914. ;// ./node_modules/rc-tree/es/utils/keyUtil.js
  44915. function getEntity(keyEntities, key) {
  44916. return keyEntities[key];
  44917. }
  44918. ;// ./node_modules/rc-tree/es/utils/treeUtil.js
  44919. var treeUtil_excluded = ["children"];
  44920. function getPosition(level, index) {
  44921. return "".concat(level, "-").concat(index);
  44922. }
  44923. function isTreeNode(node) {
  44924. return node && node.type && node.type.isTreeNode;
  44925. }
  44926. function treeUtil_getKey(key, pos) {
  44927. if (key !== null && key !== undefined) {
  44928. return key;
  44929. }
  44930. return pos;
  44931. }
  44932. function treeUtil_fillFieldNames(fieldNames) {
  44933. var _ref = fieldNames || {},
  44934. title = _ref.title,
  44935. _title = _ref._title,
  44936. key = _ref.key,
  44937. children = _ref.children;
  44938. var mergedTitle = title || 'title';
  44939. return {
  44940. title: mergedTitle,
  44941. _title: _title || [mergedTitle],
  44942. key: key || 'key',
  44943. children: children || 'children'
  44944. };
  44945. }
  44946. /**
  44947. * Warning if TreeNode do not provides key
  44948. */
  44949. function warningWithoutKey(treeData, fieldNames) {
  44950. var keys = new Map();
  44951. function dig(list) {
  44952. var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  44953. (list || []).forEach(function (treeNode) {
  44954. var key = treeNode[fieldNames.key];
  44955. var children = treeNode[fieldNames.children];
  44956. (0,warning["default"])(key !== null && key !== undefined, "Tree node must have a certain key: [".concat(path).concat(key, "]"));
  44957. var recordKey = String(key);
  44958. (0,warning["default"])(!keys.has(recordKey) || key === null || key === undefined, "Same 'key' exist in the Tree: ".concat(recordKey));
  44959. keys.set(recordKey, true);
  44960. dig(children, "".concat(path).concat(recordKey, " > "));
  44961. });
  44962. }
  44963. dig(treeData);
  44964. }
  44965. /**
  44966. * Convert `children` of Tree into `treeData` structure.
  44967. */
  44968. function convertTreeToData(rootNodes) {
  44969. function dig(node) {
  44970. var treeNodes = (0,toArray["default"])(node);
  44971. return treeNodes.map(function (treeNode) {
  44972. // Filter invalidate node
  44973. if (!isTreeNode(treeNode)) {
  44974. (0,warning["default"])(!treeNode, 'Tree/TreeNode can only accept TreeNode as children.');
  44975. return null;
  44976. }
  44977. var key = treeNode.key;
  44978. var _treeNode$props = treeNode.props,
  44979. children = _treeNode$props.children,
  44980. rest = (0,objectWithoutProperties["default"])(_treeNode$props, treeUtil_excluded);
  44981. var dataNode = (0,objectSpread2["default"])({
  44982. key: key
  44983. }, rest);
  44984. var parsedChildren = dig(children);
  44985. if (parsedChildren.length) {
  44986. dataNode.children = parsedChildren;
  44987. }
  44988. return dataNode;
  44989. }).filter(function (dataNode) {
  44990. return dataNode;
  44991. });
  44992. }
  44993. return dig(rootNodes);
  44994. }
  44995. /**
  44996. * Flat nest tree data into flatten list. This is used for virtual list render.
  44997. * @param treeNodeList Origin data node list
  44998. * @param expandedKeys
  44999. * need expanded keys, provides `true` means all expanded (used in `rc-tree-select`).
  45000. */
  45001. function flattenTreeData(treeNodeList, expandedKeys, fieldNames) {
  45002. var _fillFieldNames = treeUtil_fillFieldNames(fieldNames),
  45003. fieldTitles = _fillFieldNames._title,
  45004. fieldKey = _fillFieldNames.key,
  45005. fieldChildren = _fillFieldNames.children;
  45006. var expandedKeySet = new Set(expandedKeys === true ? [] : expandedKeys);
  45007. var flattenList = [];
  45008. function dig(list) {
  45009. var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  45010. return list.map(function (treeNode, index) {
  45011. var pos = getPosition(parent ? parent.pos : '0', index);
  45012. var mergedKey = treeUtil_getKey(treeNode[fieldKey], pos);
  45013. // Pick matched title in field title list
  45014. var mergedTitle;
  45015. for (var i = 0; i < fieldTitles.length; i += 1) {
  45016. var fieldTitle = fieldTitles[i];
  45017. if (treeNode[fieldTitle] !== undefined) {
  45018. mergedTitle = treeNode[fieldTitle];
  45019. break;
  45020. }
  45021. }
  45022. // Add FlattenDataNode into list
  45023. // We use `Object.assign` here to save perf since babel's `objectSpread` has perf issue
  45024. var flattenNode = Object.assign((0,omit["default"])(treeNode, [].concat((0,toConsumableArray["default"])(fieldTitles), [fieldKey, fieldChildren])), {
  45025. title: mergedTitle,
  45026. key: mergedKey,
  45027. parent: parent,
  45028. pos: pos,
  45029. children: null,
  45030. data: treeNode,
  45031. isStart: [].concat((0,toConsumableArray["default"])(parent ? parent.isStart : []), [index === 0]),
  45032. isEnd: [].concat((0,toConsumableArray["default"])(parent ? parent.isEnd : []), [index === list.length - 1])
  45033. });
  45034. flattenList.push(flattenNode);
  45035. // Loop treeNode children
  45036. if (expandedKeys === true || expandedKeySet.has(mergedKey)) {
  45037. flattenNode.children = dig(treeNode[fieldChildren] || [], flattenNode);
  45038. } else {
  45039. flattenNode.children = [];
  45040. }
  45041. return flattenNode;
  45042. });
  45043. }
  45044. dig(treeNodeList);
  45045. return flattenList;
  45046. }
  45047. /**
  45048. * Traverse all the data by `treeData`.
  45049. * Please not use it out of the `rc-tree` since we may refactor this code.
  45050. */
  45051. function traverseDataNodes(dataNodes, callback,
  45052. // To avoid too many params, let use config instead of origin param
  45053. config) {
  45054. var mergedConfig = {};
  45055. if ((0,esm_typeof["default"])(config) === 'object') {
  45056. mergedConfig = config;
  45057. } else {
  45058. mergedConfig = {
  45059. externalGetKey: config
  45060. };
  45061. }
  45062. mergedConfig = mergedConfig || {};
  45063. // Init config
  45064. var _mergedConfig = mergedConfig,
  45065. childrenPropName = _mergedConfig.childrenPropName,
  45066. externalGetKey = _mergedConfig.externalGetKey,
  45067. fieldNames = _mergedConfig.fieldNames;
  45068. var _fillFieldNames2 = treeUtil_fillFieldNames(fieldNames),
  45069. fieldKey = _fillFieldNames2.key,
  45070. fieldChildren = _fillFieldNames2.children;
  45071. var mergeChildrenPropName = childrenPropName || fieldChildren;
  45072. // Get keys
  45073. var syntheticGetKey;
  45074. if (externalGetKey) {
  45075. if (typeof externalGetKey === 'string') {
  45076. syntheticGetKey = function syntheticGetKey(node) {
  45077. return node[externalGetKey];
  45078. };
  45079. } else if (typeof externalGetKey === 'function') {
  45080. syntheticGetKey = function syntheticGetKey(node) {
  45081. return externalGetKey(node);
  45082. };
  45083. }
  45084. } else {
  45085. syntheticGetKey = function syntheticGetKey(node, pos) {
  45086. return treeUtil_getKey(node[fieldKey], pos);
  45087. };
  45088. }
  45089. // Process
  45090. function processNode(node, index, parent, pathNodes) {
  45091. var children = node ? node[mergeChildrenPropName] : dataNodes;
  45092. var pos = node ? getPosition(parent.pos, index) : '0';
  45093. var connectNodes = node ? [].concat((0,toConsumableArray["default"])(pathNodes), [node]) : [];
  45094. // Process node if is not root
  45095. if (node) {
  45096. var key = syntheticGetKey(node, pos);
  45097. var _data = {
  45098. node: node,
  45099. index: index,
  45100. pos: pos,
  45101. key: key,
  45102. parentPos: parent.node ? parent.pos : null,
  45103. level: parent.level + 1,
  45104. nodes: connectNodes
  45105. };
  45106. callback(_data);
  45107. }
  45108. // Process children node
  45109. if (children) {
  45110. children.forEach(function (subNode, subIndex) {
  45111. processNode(subNode, subIndex, {
  45112. node: node,
  45113. pos: pos,
  45114. level: parent ? parent.level + 1 : -1
  45115. }, connectNodes);
  45116. });
  45117. }
  45118. }
  45119. processNode(null);
  45120. }
  45121. /**
  45122. * Convert `treeData` into entity records.
  45123. */
  45124. function convertDataToEntities(dataNodes) {
  45125. var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  45126. initWrapper = _ref2.initWrapper,
  45127. processEntity = _ref2.processEntity,
  45128. onProcessFinished = _ref2.onProcessFinished,
  45129. externalGetKey = _ref2.externalGetKey,
  45130. childrenPropName = _ref2.childrenPropName,
  45131. fieldNames = _ref2.fieldNames;
  45132. var /** @deprecated Use `config.externalGetKey` instead */
  45133. legacyExternalGetKey = arguments.length > 2 ? arguments[2] : undefined;
  45134. // Init config
  45135. var mergedExternalGetKey = externalGetKey || legacyExternalGetKey;
  45136. var posEntities = {};
  45137. var keyEntities = {};
  45138. var wrapper = {
  45139. posEntities: posEntities,
  45140. keyEntities: keyEntities
  45141. };
  45142. if (initWrapper) {
  45143. wrapper = initWrapper(wrapper) || wrapper;
  45144. }
  45145. traverseDataNodes(dataNodes, function (item) {
  45146. var node = item.node,
  45147. index = item.index,
  45148. pos = item.pos,
  45149. key = item.key,
  45150. parentPos = item.parentPos,
  45151. level = item.level,
  45152. nodes = item.nodes;
  45153. var entity = {
  45154. node: node,
  45155. nodes: nodes,
  45156. index: index,
  45157. key: key,
  45158. pos: pos,
  45159. level: level
  45160. };
  45161. var mergedKey = treeUtil_getKey(key, pos);
  45162. posEntities[pos] = entity;
  45163. keyEntities[mergedKey] = entity;
  45164. // Fill children
  45165. entity.parent = posEntities[parentPos];
  45166. if (entity.parent) {
  45167. entity.parent.children = entity.parent.children || [];
  45168. entity.parent.children.push(entity);
  45169. }
  45170. if (processEntity) {
  45171. processEntity(entity, wrapper);
  45172. }
  45173. }, {
  45174. externalGetKey: mergedExternalGetKey,
  45175. childrenPropName: childrenPropName,
  45176. fieldNames: fieldNames
  45177. });
  45178. if (onProcessFinished) {
  45179. onProcessFinished(wrapper);
  45180. }
  45181. return wrapper;
  45182. }
  45183. /**
  45184. * Get TreeNode props with Tree props.
  45185. */
  45186. function getTreeNodeProps(key, _ref3) {
  45187. var expandedKeys = _ref3.expandedKeys,
  45188. selectedKeys = _ref3.selectedKeys,
  45189. loadedKeys = _ref3.loadedKeys,
  45190. loadingKeys = _ref3.loadingKeys,
  45191. checkedKeys = _ref3.checkedKeys,
  45192. halfCheckedKeys = _ref3.halfCheckedKeys,
  45193. dragOverNodeKey = _ref3.dragOverNodeKey,
  45194. dropPosition = _ref3.dropPosition,
  45195. keyEntities = _ref3.keyEntities;
  45196. var entity = getEntity(keyEntities, key);
  45197. var treeNodeProps = {
  45198. eventKey: key,
  45199. expanded: expandedKeys.indexOf(key) !== -1,
  45200. selected: selectedKeys.indexOf(key) !== -1,
  45201. loaded: loadedKeys.indexOf(key) !== -1,
  45202. loading: loadingKeys.indexOf(key) !== -1,
  45203. checked: checkedKeys.indexOf(key) !== -1,
  45204. halfChecked: halfCheckedKeys.indexOf(key) !== -1,
  45205. pos: String(entity ? entity.pos : ''),
  45206. // [Legacy] Drag props
  45207. // Since the interaction of drag is changed, the semantic of the props are
  45208. // not accuracy, I think it should be finally removed
  45209. dragOver: dragOverNodeKey === key && dropPosition === 0,
  45210. dragOverGapTop: dragOverNodeKey === key && dropPosition === -1,
  45211. dragOverGapBottom: dragOverNodeKey === key && dropPosition === 1
  45212. };
  45213. return treeNodeProps;
  45214. }
  45215. function convertNodePropsToEventData(props) {
  45216. var data = props.data,
  45217. expanded = props.expanded,
  45218. selected = props.selected,
  45219. checked = props.checked,
  45220. loaded = props.loaded,
  45221. loading = props.loading,
  45222. halfChecked = props.halfChecked,
  45223. dragOver = props.dragOver,
  45224. dragOverGapTop = props.dragOverGapTop,
  45225. dragOverGapBottom = props.dragOverGapBottom,
  45226. pos = props.pos,
  45227. active = props.active,
  45228. eventKey = props.eventKey;
  45229. var eventData = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, data), {}, {
  45230. expanded: expanded,
  45231. selected: selected,
  45232. checked: checked,
  45233. loaded: loaded,
  45234. loading: loading,
  45235. halfChecked: halfChecked,
  45236. dragOver: dragOver,
  45237. dragOverGapTop: dragOverGapTop,
  45238. dragOverGapBottom: dragOverGapBottom,
  45239. pos: pos,
  45240. active: active,
  45241. key: eventKey
  45242. });
  45243. if (!('props' in eventData)) {
  45244. Object.defineProperty(eventData, 'props', {
  45245. get: function get() {
  45246. (0,warning["default"])(false, 'Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`.');
  45247. return props;
  45248. }
  45249. });
  45250. }
  45251. return eventData;
  45252. }
  45253. ;// ./node_modules/rc-cascader/es/hooks/useEntities.js
  45254. /** Lazy parse options data into conduct-able info to avoid perf issue in single mode */
  45255. /* harmony default export */ var useEntities = (function (options, fieldNames) {
  45256. var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  45257. options: [],
  45258. info: {
  45259. keyEntities: {},
  45260. pathKeyEntities: {}
  45261. }
  45262. });
  45263. var getEntities = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
  45264. if (cacheRef.current.options !== options) {
  45265. cacheRef.current.options = options;
  45266. cacheRef.current.info = convertDataToEntities(options, {
  45267. fieldNames: fieldNames,
  45268. initWrapper: function initWrapper(wrapper) {
  45269. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, wrapper), {}, {
  45270. pathKeyEntities: {}
  45271. });
  45272. },
  45273. processEntity: function processEntity(entity, wrapper) {
  45274. var pathKey = entity.nodes.map(function (node) {
  45275. return node[fieldNames.value];
  45276. }).join(VALUE_SPLIT);
  45277. wrapper.pathKeyEntities[pathKey] = entity;
  45278. // Overwrite origin key.
  45279. // this is very hack but we need let conduct logic work with connect path
  45280. entity.key = pathKey;
  45281. }
  45282. });
  45283. }
  45284. return cacheRef.current.info.pathKeyEntities;
  45285. }, [fieldNames, options]);
  45286. return getEntities;
  45287. });
  45288. ;// ./node_modules/rc-cascader/es/hooks/useOptions.js
  45289. function useOptions_useOptions(mergedFieldNames, options) {
  45290. var mergedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  45291. return options || [];
  45292. }, [options]);
  45293. // Only used in multiple mode, this fn will not call in single mode
  45294. var getPathKeyEntities = useEntities(mergedOptions, mergedFieldNames);
  45295. /** Convert path key back to value format */
  45296. var getValueByKeyPath = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (pathKeys) {
  45297. var keyPathEntities = getPathKeyEntities();
  45298. return pathKeys.map(function (pathKey) {
  45299. var nodes = keyPathEntities[pathKey].nodes;
  45300. return nodes.map(function (node) {
  45301. return node[mergedFieldNames.value];
  45302. });
  45303. });
  45304. }, [getPathKeyEntities, mergedFieldNames]);
  45305. return [mergedOptions, getPathKeyEntities, getValueByKeyPath];
  45306. }
  45307. ;// ./node_modules/rc-cascader/es/hooks/useSearchConfig.js
  45308. // Convert `showSearch` to unique config
  45309. function useSearchConfig(showSearch) {
  45310. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  45311. if (!showSearch) {
  45312. return [false, {}];
  45313. }
  45314. var searchConfig = {
  45315. matchInputWidth: true,
  45316. limit: 50
  45317. };
  45318. if (showSearch && (0,esm_typeof["default"])(showSearch) === 'object') {
  45319. searchConfig = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, searchConfig), showSearch);
  45320. }
  45321. if (searchConfig.limit <= 0) {
  45322. searchConfig.limit = false;
  45323. if (true) {
  45324. (0,warning["default"])(false, "'limit' of showSearch should be positive number or false.");
  45325. }
  45326. }
  45327. return [true, searchConfig];
  45328. }, [showSearch]);
  45329. }
  45330. ;// ./node_modules/rc-tree/es/utils/conductUtil.js
  45331. function removeFromCheckedKeys(halfCheckedKeys, checkedKeys) {
  45332. var filteredKeys = new Set();
  45333. halfCheckedKeys.forEach(function (key) {
  45334. if (!checkedKeys.has(key)) {
  45335. filteredKeys.add(key);
  45336. }
  45337. });
  45338. return filteredKeys;
  45339. }
  45340. function isCheckDisabled(node) {
  45341. var _ref = node || {},
  45342. disabled = _ref.disabled,
  45343. disableCheckbox = _ref.disableCheckbox,
  45344. checkable = _ref.checkable;
  45345. return !!(disabled || disableCheckbox) || checkable === false;
  45346. }
  45347. // Fill miss keys
  45348. function fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled) {
  45349. var checkedKeys = new Set(keys);
  45350. var halfCheckedKeys = new Set();
  45351. // Add checked keys top to bottom
  45352. for (var level = 0; level <= maxLevel; level += 1) {
  45353. var entities = levelEntities.get(level) || new Set();
  45354. entities.forEach(function (entity) {
  45355. var key = entity.key,
  45356. node = entity.node,
  45357. _entity$children = entity.children,
  45358. children = _entity$children === void 0 ? [] : _entity$children;
  45359. if (checkedKeys.has(key) && !syntheticGetCheckDisabled(node)) {
  45360. children.filter(function (childEntity) {
  45361. return !syntheticGetCheckDisabled(childEntity.node);
  45362. }).forEach(function (childEntity) {
  45363. checkedKeys.add(childEntity.key);
  45364. });
  45365. }
  45366. });
  45367. }
  45368. // Add checked keys from bottom to top
  45369. var visitedKeys = new Set();
  45370. for (var _level = maxLevel; _level >= 0; _level -= 1) {
  45371. var _entities = levelEntities.get(_level) || new Set();
  45372. _entities.forEach(function (entity) {
  45373. var parent = entity.parent,
  45374. node = entity.node;
  45375. // Skip if no need to check
  45376. if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {
  45377. return;
  45378. }
  45379. // Skip if parent is disabled
  45380. if (syntheticGetCheckDisabled(entity.parent.node)) {
  45381. visitedKeys.add(parent.key);
  45382. return;
  45383. }
  45384. var allChecked = true;
  45385. var partialChecked = false;
  45386. (parent.children || []).filter(function (childEntity) {
  45387. return !syntheticGetCheckDisabled(childEntity.node);
  45388. }).forEach(function (_ref2) {
  45389. var key = _ref2.key;
  45390. var checked = checkedKeys.has(key);
  45391. if (allChecked && !checked) {
  45392. allChecked = false;
  45393. }
  45394. if (!partialChecked && (checked || halfCheckedKeys.has(key))) {
  45395. partialChecked = true;
  45396. }
  45397. });
  45398. if (allChecked) {
  45399. checkedKeys.add(parent.key);
  45400. }
  45401. if (partialChecked) {
  45402. halfCheckedKeys.add(parent.key);
  45403. }
  45404. visitedKeys.add(parent.key);
  45405. });
  45406. }
  45407. return {
  45408. checkedKeys: Array.from(checkedKeys),
  45409. halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))
  45410. };
  45411. }
  45412. // Remove useless key
  45413. function cleanConductCheck(keys, halfKeys, levelEntities, maxLevel, syntheticGetCheckDisabled) {
  45414. var checkedKeys = new Set(keys);
  45415. var halfCheckedKeys = new Set(halfKeys);
  45416. // Remove checked keys from top to bottom
  45417. for (var level = 0; level <= maxLevel; level += 1) {
  45418. var entities = levelEntities.get(level) || new Set();
  45419. entities.forEach(function (entity) {
  45420. var key = entity.key,
  45421. node = entity.node,
  45422. _entity$children2 = entity.children,
  45423. children = _entity$children2 === void 0 ? [] : _entity$children2;
  45424. if (!checkedKeys.has(key) && !halfCheckedKeys.has(key) && !syntheticGetCheckDisabled(node)) {
  45425. children.filter(function (childEntity) {
  45426. return !syntheticGetCheckDisabled(childEntity.node);
  45427. }).forEach(function (childEntity) {
  45428. checkedKeys.delete(childEntity.key);
  45429. });
  45430. }
  45431. });
  45432. }
  45433. // Remove checked keys form bottom to top
  45434. halfCheckedKeys = new Set();
  45435. var visitedKeys = new Set();
  45436. for (var _level2 = maxLevel; _level2 >= 0; _level2 -= 1) {
  45437. var _entities2 = levelEntities.get(_level2) || new Set();
  45438. _entities2.forEach(function (entity) {
  45439. var parent = entity.parent,
  45440. node = entity.node;
  45441. // Skip if no need to check
  45442. if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) {
  45443. return;
  45444. }
  45445. // Skip if parent is disabled
  45446. if (syntheticGetCheckDisabled(entity.parent.node)) {
  45447. visitedKeys.add(parent.key);
  45448. return;
  45449. }
  45450. var allChecked = true;
  45451. var partialChecked = false;
  45452. (parent.children || []).filter(function (childEntity) {
  45453. return !syntheticGetCheckDisabled(childEntity.node);
  45454. }).forEach(function (_ref3) {
  45455. var key = _ref3.key;
  45456. var checked = checkedKeys.has(key);
  45457. if (allChecked && !checked) {
  45458. allChecked = false;
  45459. }
  45460. if (!partialChecked && (checked || halfCheckedKeys.has(key))) {
  45461. partialChecked = true;
  45462. }
  45463. });
  45464. if (!allChecked) {
  45465. checkedKeys.delete(parent.key);
  45466. }
  45467. if (partialChecked) {
  45468. halfCheckedKeys.add(parent.key);
  45469. }
  45470. visitedKeys.add(parent.key);
  45471. });
  45472. }
  45473. return {
  45474. checkedKeys: Array.from(checkedKeys),
  45475. halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys))
  45476. };
  45477. }
  45478. /**
  45479. * Conduct with keys.
  45480. * @param keyList current key list
  45481. * @param keyEntities key - dataEntity map
  45482. * @param mode `fill` to fill missing key, `clean` to remove useless key
  45483. */
  45484. function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {
  45485. var warningMissKeys = [];
  45486. var syntheticGetCheckDisabled;
  45487. if (getCheckDisabled) {
  45488. syntheticGetCheckDisabled = getCheckDisabled;
  45489. } else {
  45490. syntheticGetCheckDisabled = isCheckDisabled;
  45491. }
  45492. // We only handle exist keys
  45493. var keys = new Set(keyList.filter(function (key) {
  45494. var hasEntity = !!getEntity(keyEntities, key);
  45495. if (!hasEntity) {
  45496. warningMissKeys.push(key);
  45497. }
  45498. return hasEntity;
  45499. }));
  45500. var levelEntities = new Map();
  45501. var maxLevel = 0;
  45502. // Convert entities by level for calculation
  45503. Object.keys(keyEntities).forEach(function (key) {
  45504. var entity = keyEntities[key];
  45505. var level = entity.level;
  45506. var levelSet = levelEntities.get(level);
  45507. if (!levelSet) {
  45508. levelSet = new Set();
  45509. levelEntities.set(level, levelSet);
  45510. }
  45511. levelSet.add(entity);
  45512. maxLevel = Math.max(maxLevel, level);
  45513. });
  45514. (0,warning["default"])(!warningMissKeys.length, "Tree missing follow keys: ".concat(warningMissKeys.slice(0, 100).map(function (key) {
  45515. return "'".concat(key, "'");
  45516. }).join(', ')));
  45517. var result;
  45518. if (checked === true) {
  45519. result = fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled);
  45520. } else {
  45521. result = cleanConductCheck(keys, checked.halfCheckedKeys, levelEntities, maxLevel, syntheticGetCheckDisabled);
  45522. }
  45523. return result;
  45524. }
  45525. ;// ./node_modules/rc-cascader/es/hooks/useSelect.js
  45526. function useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy) {
  45527. return function (valuePath) {
  45528. if (!multiple) {
  45529. triggerChange(valuePath);
  45530. } else {
  45531. // Prepare conduct required info
  45532. var pathKey = toPathKey(valuePath);
  45533. var checkedPathKeys = toPathKeys(checkedValues);
  45534. var halfCheckedPathKeys = toPathKeys(halfCheckedValues);
  45535. var existInChecked = checkedPathKeys.includes(pathKey);
  45536. var existInMissing = missingCheckedValues.some(function (valueCells) {
  45537. return toPathKey(valueCells) === pathKey;
  45538. });
  45539. // Do update
  45540. var nextCheckedValues = checkedValues;
  45541. var nextMissingValues = missingCheckedValues;
  45542. if (existInMissing && !existInChecked) {
  45543. // Missing value only do filter
  45544. nextMissingValues = missingCheckedValues.filter(function (valueCells) {
  45545. return toPathKey(valueCells) !== pathKey;
  45546. });
  45547. } else {
  45548. // Update checked key first
  45549. var nextRawCheckedKeys = existInChecked ? checkedPathKeys.filter(function (key) {
  45550. return key !== pathKey;
  45551. }) : [].concat((0,toConsumableArray["default"])(checkedPathKeys), [pathKey]);
  45552. var pathKeyEntities = getPathKeyEntities();
  45553. // Conduction by selected or not
  45554. var checkedKeys;
  45555. if (existInChecked) {
  45556. var _conductCheck = conductCheck(nextRawCheckedKeys, {
  45557. checked: false,
  45558. halfCheckedKeys: halfCheckedPathKeys
  45559. }, pathKeyEntities);
  45560. checkedKeys = _conductCheck.checkedKeys;
  45561. } else {
  45562. var _conductCheck2 = conductCheck(nextRawCheckedKeys, true, pathKeyEntities);
  45563. checkedKeys = _conductCheck2.checkedKeys;
  45564. }
  45565. // Roll up to parent level keys
  45566. var deDuplicatedKeys = formatStrategyValues(checkedKeys, getPathKeyEntities, showCheckedStrategy);
  45567. nextCheckedValues = getValueByKeyPath(deDuplicatedKeys);
  45568. }
  45569. triggerChange([].concat((0,toConsumableArray["default"])(nextMissingValues), (0,toConsumableArray["default"])(nextCheckedValues)));
  45570. }
  45571. };
  45572. }
  45573. ;// ./node_modules/rc-cascader/es/hooks/useValues.js
  45574. function useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues) {
  45575. // Fill `rawValues` with checked conduction values
  45576. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  45577. var _getMissingValues = getMissingValues(rawValues),
  45578. _getMissingValues2 = (0,slicedToArray["default"])(_getMissingValues, 2),
  45579. existValues = _getMissingValues2[0],
  45580. missingValues = _getMissingValues2[1];
  45581. if (!multiple || !rawValues.length) {
  45582. return [existValues, [], missingValues];
  45583. }
  45584. var keyPathValues = toPathKeys(existValues);
  45585. var keyPathEntities = getPathKeyEntities();
  45586. var _conductCheck = conductCheck(keyPathValues, true, keyPathEntities),
  45587. checkedKeys = _conductCheck.checkedKeys,
  45588. halfCheckedKeys = _conductCheck.halfCheckedKeys;
  45589. // Convert key back to value cells
  45590. return [getValueByKeyPath(checkedKeys), getValueByKeyPath(halfCheckedKeys), missingValues];
  45591. }, [multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues]);
  45592. }
  45593. ;// ./node_modules/rc-cascader/es/OptionList/CacheContent.js
  45594. var CacheContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function (_ref) {
  45595. var children = _ref.children;
  45596. return children;
  45597. }, function (_, next) {
  45598. return !next.open;
  45599. });
  45600. if (true) {
  45601. CacheContent.displayName = 'CacheContent';
  45602. }
  45603. /* harmony default export */ var OptionList_CacheContent = (CacheContent);
  45604. ;// ./node_modules/rc-cascader/es/OptionList/Checkbox.js
  45605. function Checkbox_Checkbox(_ref) {
  45606. var _classNames;
  45607. var prefixCls = _ref.prefixCls,
  45608. checked = _ref.checked,
  45609. halfChecked = _ref.halfChecked,
  45610. disabled = _ref.disabled,
  45611. onClick = _ref.onClick,
  45612. disableCheckbox = _ref.disableCheckbox;
  45613. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
  45614. checkable = _React$useContext.checkable;
  45615. var customCheckbox = typeof checkable !== 'boolean' ? checkable : null;
  45616. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  45617. className: classnames_default()("".concat(prefixCls), (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-checked"), checked), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-indeterminate"), !checked && halfChecked), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled || disableCheckbox), _classNames)),
  45618. onClick: onClick
  45619. }, customCheckbox);
  45620. }
  45621. ;// ./node_modules/rc-cascader/es/OptionList/Column.js
  45622. var FIX_LABEL = '__cascader_fix_label__';
  45623. function Column(_ref) {
  45624. var prefixCls = _ref.prefixCls,
  45625. multiple = _ref.multiple,
  45626. options = _ref.options,
  45627. activeValue = _ref.activeValue,
  45628. prevValuePath = _ref.prevValuePath,
  45629. onToggleOpen = _ref.onToggleOpen,
  45630. onSelect = _ref.onSelect,
  45631. onActive = _ref.onActive,
  45632. checkedSet = _ref.checkedSet,
  45633. halfCheckedSet = _ref.halfCheckedSet,
  45634. loadingKeys = _ref.loadingKeys,
  45635. isSelectable = _ref.isSelectable,
  45636. propsDisabled = _ref.disabled;
  45637. var menuPrefixCls = "".concat(prefixCls, "-menu");
  45638. var menuItemPrefixCls = "".concat(prefixCls, "-menu-item");
  45639. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
  45640. fieldNames = _React$useContext.fieldNames,
  45641. changeOnSelect = _React$useContext.changeOnSelect,
  45642. expandTrigger = _React$useContext.expandTrigger,
  45643. expandIcon = _React$useContext.expandIcon,
  45644. loadingIcon = _React$useContext.loadingIcon,
  45645. dropdownMenuColumnStyle = _React$useContext.dropdownMenuColumnStyle,
  45646. optionRender = _React$useContext.optionRender;
  45647. var hoverOpen = expandTrigger === 'hover';
  45648. var isOptionDisabled = function isOptionDisabled(disabled) {
  45649. return propsDisabled || disabled;
  45650. };
  45651. // ============================ Option ============================
  45652. var optionInfoList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  45653. return options.map(function (option) {
  45654. var _option$FIX_LABEL;
  45655. var disabled = option.disabled,
  45656. disableCheckbox = option.disableCheckbox;
  45657. var searchOptions = option[SEARCH_MARK];
  45658. var label = (_option$FIX_LABEL = option[FIX_LABEL]) !== null && _option$FIX_LABEL !== void 0 ? _option$FIX_LABEL : option[fieldNames.label];
  45659. var value = option[fieldNames.value];
  45660. var isMergedLeaf = isLeaf(option, fieldNames);
  45661. // Get real value of option. Search option is different way.
  45662. var fullPath = searchOptions ? searchOptions.map(function (opt) {
  45663. return opt[fieldNames.value];
  45664. }) : [].concat((0,toConsumableArray["default"])(prevValuePath), [value]);
  45665. var fullPathKey = toPathKey(fullPath);
  45666. var isLoading = loadingKeys.includes(fullPathKey);
  45667. // >>>>> checked
  45668. var checked = checkedSet.has(fullPathKey);
  45669. // >>>>> halfChecked
  45670. var halfChecked = halfCheckedSet.has(fullPathKey);
  45671. return {
  45672. disabled: disabled,
  45673. label: label,
  45674. value: value,
  45675. isLeaf: isMergedLeaf,
  45676. isLoading: isLoading,
  45677. checked: checked,
  45678. halfChecked: halfChecked,
  45679. option: option,
  45680. disableCheckbox: disableCheckbox,
  45681. fullPath: fullPath,
  45682. fullPathKey: fullPathKey
  45683. };
  45684. });
  45685. }, [options, checkedSet, fieldNames, halfCheckedSet, loadingKeys, prevValuePath]);
  45686. // ============================ Render ============================
  45687. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  45688. className: menuPrefixCls,
  45689. role: "menu"
  45690. }, optionInfoList.map(function (_ref2) {
  45691. var _classNames;
  45692. var disabled = _ref2.disabled,
  45693. label = _ref2.label,
  45694. value = _ref2.value,
  45695. isMergedLeaf = _ref2.isLeaf,
  45696. isLoading = _ref2.isLoading,
  45697. checked = _ref2.checked,
  45698. halfChecked = _ref2.halfChecked,
  45699. option = _ref2.option,
  45700. fullPath = _ref2.fullPath,
  45701. fullPathKey = _ref2.fullPathKey,
  45702. disableCheckbox = _ref2.disableCheckbox;
  45703. // >>>>> Open
  45704. var triggerOpenPath = function triggerOpenPath() {
  45705. if (isOptionDisabled(disabled)) {
  45706. return;
  45707. }
  45708. var nextValueCells = (0,toConsumableArray["default"])(fullPath);
  45709. if (hoverOpen && isMergedLeaf) {
  45710. nextValueCells.pop();
  45711. }
  45712. onActive(nextValueCells);
  45713. };
  45714. // >>>>> Selection
  45715. var triggerSelect = function triggerSelect() {
  45716. if (isSelectable(option) && !isOptionDisabled(disabled)) {
  45717. onSelect(fullPath, isMergedLeaf);
  45718. }
  45719. };
  45720. // >>>>> Title
  45721. var title;
  45722. if (typeof option.title === 'string') {
  45723. title = option.title;
  45724. } else if (typeof label === 'string') {
  45725. title = label;
  45726. }
  45727. // >>>>> Render
  45728. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", {
  45729. key: fullPathKey,
  45730. className: classnames_default()(menuItemPrefixCls, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-expand"), !isMergedLeaf), (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-active"), activeValue === value || activeValue === fullPathKey), (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-disabled"), isOptionDisabled(disabled)), (0,defineProperty["default"])(_classNames, "".concat(menuItemPrefixCls, "-loading"), isLoading), _classNames)),
  45731. style: dropdownMenuColumnStyle,
  45732. role: "menuitemcheckbox",
  45733. title: title,
  45734. "aria-checked": checked,
  45735. "data-path-key": fullPathKey,
  45736. onClick: function onClick() {
  45737. triggerOpenPath();
  45738. if (disableCheckbox) {
  45739. return;
  45740. }
  45741. if (!multiple || isMergedLeaf) {
  45742. triggerSelect();
  45743. }
  45744. },
  45745. onDoubleClick: function onDoubleClick() {
  45746. if (changeOnSelect) {
  45747. onToggleOpen(false);
  45748. }
  45749. },
  45750. onMouseEnter: function onMouseEnter() {
  45751. if (hoverOpen) {
  45752. triggerOpenPath();
  45753. }
  45754. },
  45755. onMouseDown: function onMouseDown(e) {
  45756. // Prevent selector from blurring
  45757. e.preventDefault();
  45758. }
  45759. }, multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Checkbox_Checkbox, {
  45760. prefixCls: "".concat(prefixCls, "-checkbox"),
  45761. checked: checked,
  45762. halfChecked: halfChecked,
  45763. disabled: isOptionDisabled(disabled) || disableCheckbox,
  45764. disableCheckbox: disableCheckbox,
  45765. onClick: function onClick(e) {
  45766. if (disableCheckbox) {
  45767. return;
  45768. }
  45769. e.stopPropagation();
  45770. triggerSelect();
  45771. }
  45772. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  45773. className: "".concat(menuItemPrefixCls, "-content")
  45774. }, optionRender ? optionRender(option) : label), !isLoading && expandIcon && !isMergedLeaf && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  45775. className: "".concat(menuItemPrefixCls, "-expand-icon")
  45776. }, expandIcon), isLoading && loadingIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  45777. className: "".concat(menuItemPrefixCls, "-loading-icon")
  45778. }, loadingIcon));
  45779. }));
  45780. }
  45781. ;// ./node_modules/rc-cascader/es/OptionList/useActive.js
  45782. /**
  45783. * Control the active open options path.
  45784. */
  45785. var useActive_useActive = function useActive(multiple, open) {
  45786. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
  45787. values = _React$useContext.values;
  45788. var firstValueCells = values[0];
  45789. // Record current dropdown active options
  45790. // This also control the open status
  45791. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
  45792. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  45793. activeValueCells = _React$useState2[0],
  45794. setActiveValueCells = _React$useState2[1];
  45795. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  45796. if (!multiple) {
  45797. setActiveValueCells(firstValueCells || []);
  45798. }
  45799. }, /* eslint-disable react-hooks/exhaustive-deps */
  45800. [open, firstValueCells]
  45801. /* eslint-enable react-hooks/exhaustive-deps */);
  45802. return [activeValueCells, setActiveValueCells];
  45803. };
  45804. /* harmony default export */ var OptionList_useActive = (useActive_useActive);
  45805. ;// ./node_modules/rc-cascader/es/OptionList/useKeyboard.js
  45806. /* harmony default export */ var useKeyboard = (function (ref, options, fieldNames, activeValueCells, setActiveValueCells, onKeyBoardSelect, contextProps) {
  45807. var direction = contextProps.direction,
  45808. searchValue = contextProps.searchValue,
  45809. toggleOpen = contextProps.toggleOpen,
  45810. open = contextProps.open;
  45811. var rtl = direction === 'rtl';
  45812. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  45813. var activeIndex = -1;
  45814. var currentOptions = options;
  45815. var mergedActiveIndexes = [];
  45816. var mergedActiveValueCells = [];
  45817. var len = activeValueCells.length;
  45818. var pathKeys = getFullPathKeys(options, fieldNames);
  45819. // Fill validate active value cells and index
  45820. var _loop = function _loop(i) {
  45821. // Mark the active index for current options
  45822. var nextActiveIndex = currentOptions.findIndex(function (option, index) {
  45823. return (pathKeys[index] ? toPathKey(pathKeys[index]) : option[fieldNames.value]) === activeValueCells[i];
  45824. });
  45825. if (nextActiveIndex === -1) {
  45826. return 1; // break
  45827. }
  45828. activeIndex = nextActiveIndex;
  45829. mergedActiveIndexes.push(activeIndex);
  45830. mergedActiveValueCells.push(activeValueCells[i]);
  45831. currentOptions = currentOptions[activeIndex][fieldNames.children];
  45832. };
  45833. for (var i = 0; i < len && currentOptions; i += 1) {
  45834. if (_loop(i)) break;
  45835. }
  45836. // Fill last active options
  45837. var activeOptions = options;
  45838. for (var _i = 0; _i < mergedActiveIndexes.length - 1; _i += 1) {
  45839. activeOptions = activeOptions[mergedActiveIndexes[_i]][fieldNames.children];
  45840. }
  45841. return [mergedActiveValueCells, activeIndex, activeOptions, pathKeys];
  45842. }, [activeValueCells, fieldNames, options]),
  45843. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 4),
  45844. validActiveValueCells = _React$useMemo2[0],
  45845. lastActiveIndex = _React$useMemo2[1],
  45846. lastActiveOptions = _React$useMemo2[2],
  45847. fullPathKeys = _React$useMemo2[3];
  45848. // Update active value cells and scroll to target element
  45849. var internalSetActiveValueCells = function internalSetActiveValueCells(next) {
  45850. setActiveValueCells(next);
  45851. };
  45852. // Same options offset
  45853. var offsetActiveOption = function offsetActiveOption(offset) {
  45854. var len = lastActiveOptions.length;
  45855. var currentIndex = lastActiveIndex;
  45856. if (currentIndex === -1 && offset < 0) {
  45857. currentIndex = len;
  45858. }
  45859. for (var i = 0; i < len; i += 1) {
  45860. currentIndex = (currentIndex + offset + len) % len;
  45861. var _option = lastActiveOptions[currentIndex];
  45862. if (_option && !_option.disabled) {
  45863. var nextActiveCells = validActiveValueCells.slice(0, -1).concat(fullPathKeys[currentIndex] ? toPathKey(fullPathKeys[currentIndex]) : _option[fieldNames.value]);
  45864. internalSetActiveValueCells(nextActiveCells);
  45865. return;
  45866. }
  45867. }
  45868. };
  45869. // Different options offset
  45870. var prevColumn = function prevColumn() {
  45871. if (validActiveValueCells.length > 1) {
  45872. var nextActiveCells = validActiveValueCells.slice(0, -1);
  45873. internalSetActiveValueCells(nextActiveCells);
  45874. } else {
  45875. toggleOpen(false);
  45876. }
  45877. };
  45878. var nextColumn = function nextColumn() {
  45879. var _lastActiveOptions$la;
  45880. var nextOptions = ((_lastActiveOptions$la = lastActiveOptions[lastActiveIndex]) === null || _lastActiveOptions$la === void 0 ? void 0 : _lastActiveOptions$la[fieldNames.children]) || [];
  45881. var nextOption = nextOptions.find(function (option) {
  45882. return !option.disabled;
  45883. });
  45884. if (nextOption) {
  45885. var nextActiveCells = [].concat((0,toConsumableArray["default"])(validActiveValueCells), [nextOption[fieldNames.value]]);
  45886. internalSetActiveValueCells(nextActiveCells);
  45887. }
  45888. };
  45889. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  45890. return {
  45891. // scrollTo: treeRef.current?.scrollTo,
  45892. onKeyDown: function onKeyDown(event) {
  45893. var which = event.which;
  45894. switch (which) {
  45895. // >>> Arrow keys
  45896. case KeyCode["default"].UP:
  45897. case KeyCode["default"].DOWN:
  45898. {
  45899. var offset = 0;
  45900. if (which === KeyCode["default"].UP) {
  45901. offset = -1;
  45902. } else if (which === KeyCode["default"].DOWN) {
  45903. offset = 1;
  45904. }
  45905. if (offset !== 0) {
  45906. offsetActiveOption(offset);
  45907. }
  45908. break;
  45909. }
  45910. case KeyCode["default"].LEFT:
  45911. {
  45912. if (searchValue) {
  45913. break;
  45914. }
  45915. if (rtl) {
  45916. nextColumn();
  45917. } else {
  45918. prevColumn();
  45919. }
  45920. break;
  45921. }
  45922. case KeyCode["default"].RIGHT:
  45923. {
  45924. if (searchValue) {
  45925. break;
  45926. }
  45927. if (rtl) {
  45928. prevColumn();
  45929. } else {
  45930. nextColumn();
  45931. }
  45932. break;
  45933. }
  45934. case KeyCode["default"].BACKSPACE:
  45935. {
  45936. if (!searchValue) {
  45937. prevColumn();
  45938. }
  45939. break;
  45940. }
  45941. // >>> Select
  45942. case KeyCode["default"].ENTER:
  45943. {
  45944. if (validActiveValueCells.length) {
  45945. var _option2 = lastActiveOptions[lastActiveIndex];
  45946. // Search option should revert back of origin options
  45947. var originOptions = (_option2 === null || _option2 === void 0 ? void 0 : _option2[SEARCH_MARK]) || [];
  45948. if (originOptions.length) {
  45949. onKeyBoardSelect(originOptions.map(function (opt) {
  45950. return opt[fieldNames.value];
  45951. }), originOptions[originOptions.length - 1]);
  45952. } else {
  45953. onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
  45954. }
  45955. }
  45956. break;
  45957. }
  45958. // >>> Close
  45959. case KeyCode["default"].ESC:
  45960. {
  45961. toggleOpen(false);
  45962. if (open) {
  45963. event.stopPropagation();
  45964. }
  45965. }
  45966. }
  45967. },
  45968. onKeyUp: function onKeyUp() {}
  45969. };
  45970. });
  45971. });
  45972. ;// ./node_modules/rc-cascader/es/OptionList/List.js
  45973. /* eslint-disable default-case */
  45974. var RawOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  45975. var _optionColumns$, _ref3, _classNames;
  45976. var prefixCls = props.prefixCls,
  45977. multiple = props.multiple,
  45978. searchValue = props.searchValue,
  45979. toggleOpen = props.toggleOpen,
  45980. notFoundContent = props.notFoundContent,
  45981. direction = props.direction,
  45982. open = props.open,
  45983. disabled = props.disabled;
  45984. var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  45985. var rtl = direction === 'rtl';
  45986. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_cascader_es_context),
  45987. options = _React$useContext.options,
  45988. values = _React$useContext.values,
  45989. halfValues = _React$useContext.halfValues,
  45990. fieldNames = _React$useContext.fieldNames,
  45991. changeOnSelect = _React$useContext.changeOnSelect,
  45992. onSelect = _React$useContext.onSelect,
  45993. searchOptions = _React$useContext.searchOptions,
  45994. dropdownPrefixCls = _React$useContext.dropdownPrefixCls,
  45995. loadData = _React$useContext.loadData,
  45996. expandTrigger = _React$useContext.expandTrigger;
  45997. var mergedPrefixCls = dropdownPrefixCls || prefixCls;
  45998. // ========================= loadData =========================
  45999. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
  46000. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  46001. loadingKeys = _React$useState2[0],
  46002. setLoadingKeys = _React$useState2[1];
  46003. var internalLoadData = function internalLoadData(valueCells) {
  46004. // Do not load when search
  46005. if (!loadData || searchValue) {
  46006. return;
  46007. }
  46008. var optionList = toPathOptions(valueCells, options, fieldNames);
  46009. var rawOptions = optionList.map(function (_ref) {
  46010. var option = _ref.option;
  46011. return option;
  46012. });
  46013. var lastOption = rawOptions[rawOptions.length - 1];
  46014. if (lastOption && !isLeaf(lastOption, fieldNames)) {
  46015. var pathKey = toPathKey(valueCells);
  46016. setLoadingKeys(function (keys) {
  46017. return [].concat((0,toConsumableArray["default"])(keys), [pathKey]);
  46018. });
  46019. loadData(rawOptions);
  46020. }
  46021. };
  46022. // zombieJ: This is bad. We should make this same as `rc-tree` to use Promise instead.
  46023. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  46024. if (loadingKeys.length) {
  46025. loadingKeys.forEach(function (loadingKey) {
  46026. var valueStrCells = toPathValueStr(loadingKey);
  46027. var optionList = toPathOptions(valueStrCells, options, fieldNames, true).map(function (_ref2) {
  46028. var option = _ref2.option;
  46029. return option;
  46030. });
  46031. var lastOption = optionList[optionList.length - 1];
  46032. if (!lastOption || lastOption[fieldNames.children] || isLeaf(lastOption, fieldNames)) {
  46033. setLoadingKeys(function (keys) {
  46034. return keys.filter(function (key) {
  46035. return key !== loadingKey;
  46036. });
  46037. });
  46038. }
  46039. });
  46040. }
  46041. }, [options, loadingKeys, fieldNames]);
  46042. // ========================== Values ==========================
  46043. var checkedSet = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46044. return new Set(toPathKeys(values));
  46045. }, [values]);
  46046. var halfCheckedSet = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46047. return new Set(toPathKeys(halfValues));
  46048. }, [halfValues]);
  46049. // ====================== Accessibility =======================
  46050. var _useActive = OptionList_useActive(multiple, open),
  46051. _useActive2 = (0,slicedToArray["default"])(_useActive, 2),
  46052. activeValueCells = _useActive2[0],
  46053. setActiveValueCells = _useActive2[1];
  46054. // =========================== Path ===========================
  46055. var onPathOpen = function onPathOpen(nextValueCells) {
  46056. setActiveValueCells(nextValueCells);
  46057. // Trigger loadData
  46058. internalLoadData(nextValueCells);
  46059. };
  46060. var isSelectable = function isSelectable(option) {
  46061. if (disabled) {
  46062. return false;
  46063. }
  46064. var optionDisabled = option.disabled;
  46065. var isMergedLeaf = isLeaf(option, fieldNames);
  46066. return !optionDisabled && (isMergedLeaf || changeOnSelect || multiple);
  46067. };
  46068. var onPathSelect = function onPathSelect(valuePath, leaf) {
  46069. var fromKeyboard = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  46070. onSelect(valuePath);
  46071. if (!multiple && (leaf || changeOnSelect && (expandTrigger === 'hover' || fromKeyboard))) {
  46072. toggleOpen(false);
  46073. }
  46074. };
  46075. // ========================== Option ==========================
  46076. var mergedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46077. if (searchValue) {
  46078. return searchOptions;
  46079. }
  46080. return options;
  46081. }, [searchValue, searchOptions, options]);
  46082. // ========================== Column ==========================
  46083. var optionColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46084. var optionList = [{
  46085. options: mergedOptions
  46086. }];
  46087. var currentList = mergedOptions;
  46088. var fullPathKeys = getFullPathKeys(currentList, fieldNames);
  46089. var _loop = function _loop() {
  46090. var activeValueCell = activeValueCells[i];
  46091. var currentOption = currentList.find(function (option, index) {
  46092. return (fullPathKeys[index] ? toPathKey(fullPathKeys[index]) : option[fieldNames.value]) === activeValueCell;
  46093. });
  46094. var subOptions = currentOption === null || currentOption === void 0 ? void 0 : currentOption[fieldNames.children];
  46095. if (!(subOptions !== null && subOptions !== void 0 && subOptions.length)) {
  46096. return 1; // break
  46097. }
  46098. currentList = subOptions;
  46099. optionList.push({
  46100. options: subOptions
  46101. });
  46102. };
  46103. for (var i = 0; i < activeValueCells.length; i += 1) {
  46104. if (_loop()) break;
  46105. }
  46106. return optionList;
  46107. }, [mergedOptions, activeValueCells, fieldNames]);
  46108. // ========================= Keyboard =========================
  46109. var onKeyboardSelect = function onKeyboardSelect(selectValueCells, option) {
  46110. if (isSelectable(option)) {
  46111. onPathSelect(selectValueCells, isLeaf(option, fieldNames), true);
  46112. }
  46113. };
  46114. useKeyboard(ref, mergedOptions, fieldNames, activeValueCells, onPathOpen, onKeyboardSelect, {
  46115. direction: direction,
  46116. searchValue: searchValue,
  46117. toggleOpen: toggleOpen,
  46118. open: open
  46119. });
  46120. // >>>>> Active Scroll
  46121. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  46122. if (searchValue) {
  46123. return;
  46124. }
  46125. for (var i = 0; i < activeValueCells.length; i += 1) {
  46126. var _containerRef$current;
  46127. var cellPath = activeValueCells.slice(0, i + 1);
  46128. var cellKeyPath = toPathKey(cellPath);
  46129. var ele = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelector("li[data-path-key=\"".concat(cellKeyPath.replace(/\\{0,2}"/g, '\\"'), "\"]") // matches unescaped double quotes
  46130. );
  46131. if (ele) {
  46132. scrollIntoParentView(ele);
  46133. }
  46134. }
  46135. }, [activeValueCells, searchValue]);
  46136. // ========================== Render ==========================
  46137. // >>>>> Empty
  46138. var isEmpty = !((_optionColumns$ = optionColumns[0]) !== null && _optionColumns$ !== void 0 && (_optionColumns$ = _optionColumns$.options) !== null && _optionColumns$ !== void 0 && _optionColumns$.length);
  46139. var emptyList = [(_ref3 = {}, (0,defineProperty["default"])(_ref3, fieldNames.value, '__EMPTY__'), (0,defineProperty["default"])(_ref3, FIX_LABEL, notFoundContent), (0,defineProperty["default"])(_ref3, "disabled", true), _ref3)];
  46140. var columnProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  46141. multiple: !isEmpty && multiple,
  46142. onSelect: onPathSelect,
  46143. onActive: onPathOpen,
  46144. onToggleOpen: toggleOpen,
  46145. checkedSet: checkedSet,
  46146. halfCheckedSet: halfCheckedSet,
  46147. loadingKeys: loadingKeys,
  46148. isSelectable: isSelectable
  46149. });
  46150. // >>>>> Columns
  46151. var mergedOptionColumns = isEmpty ? [{
  46152. options: emptyList
  46153. }] : optionColumns;
  46154. var columnNodes = mergedOptionColumns.map(function (col, index) {
  46155. var prevValuePath = activeValueCells.slice(0, index);
  46156. var activeValue = activeValueCells[index];
  46157. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Column, (0,esm_extends["default"])({
  46158. key: index
  46159. }, columnProps, {
  46160. prefixCls: mergedPrefixCls,
  46161. options: col.options,
  46162. prevValuePath: prevValuePath,
  46163. activeValue: activeValue
  46164. }));
  46165. });
  46166. // >>>>> Render
  46167. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList_CacheContent, {
  46168. open: open
  46169. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  46170. className: classnames_default()("".concat(mergedPrefixCls, "-menus"), (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(mergedPrefixCls, "-menu-empty"), isEmpty), (0,defineProperty["default"])(_classNames, "".concat(mergedPrefixCls, "-rtl"), rtl), _classNames)),
  46171. ref: containerRef
  46172. }, columnNodes));
  46173. });
  46174. if (true) {
  46175. RawOptionList.displayName = 'RawOptionList';
  46176. }
  46177. /* harmony default export */ var OptionList_List = (RawOptionList);
  46178. ;// ./node_modules/rc-cascader/es/OptionList/index.js
  46179. var OptionList_RefOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  46180. var baseProps = useBaseProps();
  46181. // >>>>> Render
  46182. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList_List, (0,esm_extends["default"])({}, props, baseProps, {
  46183. ref: ref
  46184. }));
  46185. });
  46186. /* harmony default export */ var rc_cascader_es_OptionList = (OptionList_RefOptionList);
  46187. ;// ./node_modules/rc-cascader/es/Panel.js
  46188. function noop() {}
  46189. function Panel_Panel(props) {
  46190. var _classNames;
  46191. var _ref = props,
  46192. _ref$prefixCls = _ref.prefixCls,
  46193. prefixCls = _ref$prefixCls === void 0 ? 'rc-cascader' : _ref$prefixCls,
  46194. style = _ref.style,
  46195. className = _ref.className,
  46196. options = _ref.options,
  46197. checkable = _ref.checkable,
  46198. defaultValue = _ref.defaultValue,
  46199. value = _ref.value,
  46200. fieldNames = _ref.fieldNames,
  46201. changeOnSelect = _ref.changeOnSelect,
  46202. onChange = _ref.onChange,
  46203. showCheckedStrategy = _ref.showCheckedStrategy,
  46204. loadData = _ref.loadData,
  46205. expandTrigger = _ref.expandTrigger,
  46206. _ref$expandIcon = _ref.expandIcon,
  46207. expandIcon = _ref$expandIcon === void 0 ? '>' : _ref$expandIcon,
  46208. loadingIcon = _ref.loadingIcon,
  46209. direction = _ref.direction,
  46210. _ref$notFoundContent = _ref.notFoundContent,
  46211. notFoundContent = _ref$notFoundContent === void 0 ? 'Not Found' : _ref$notFoundContent,
  46212. disabled = _ref.disabled;
  46213. // ======================== Multiple ========================
  46214. var multiple = !!checkable;
  46215. // ========================= Values =========================
  46216. var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
  46217. value: value,
  46218. postState: toRawValues
  46219. }),
  46220. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  46221. rawValues = _useMergedState2[0],
  46222. setRawValues = _useMergedState2[1];
  46223. // ========================= FieldNames =========================
  46224. var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46225. return commonUtil_fillFieldNames(fieldNames);
  46226. }, /* eslint-disable react-hooks/exhaustive-deps */
  46227. [JSON.stringify(fieldNames)]
  46228. /* eslint-enable react-hooks/exhaustive-deps */);
  46229. // =========================== Option ===========================
  46230. var _useOptions = useOptions_useOptions(mergedFieldNames, options),
  46231. _useOptions2 = (0,slicedToArray["default"])(_useOptions, 3),
  46232. mergedOptions = _useOptions2[0],
  46233. getPathKeyEntities = _useOptions2[1],
  46234. getValueByKeyPath = _useOptions2[2];
  46235. // ========================= Values =========================
  46236. var getMissingValues = useMissingValues(mergedOptions, mergedFieldNames);
  46237. // Fill `rawValues` with checked conduction values
  46238. var _useValues = useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues),
  46239. _useValues2 = (0,slicedToArray["default"])(_useValues, 3),
  46240. checkedValues = _useValues2[0],
  46241. halfCheckedValues = _useValues2[1],
  46242. missingCheckedValues = _useValues2[2];
  46243. // =========================== Change ===========================
  46244. var triggerChange = (0,rc_util_es.useEvent)(function (nextValues) {
  46245. setRawValues(nextValues);
  46246. // Save perf if no need trigger event
  46247. if (onChange) {
  46248. var nextRawValues = toRawValues(nextValues);
  46249. var valueOptions = nextRawValues.map(function (valueCells) {
  46250. return toPathOptions(valueCells, mergedOptions, mergedFieldNames).map(function (valueOpt) {
  46251. return valueOpt.option;
  46252. });
  46253. });
  46254. var triggerValues = multiple ? nextRawValues : nextRawValues[0];
  46255. var triggerOptions = multiple ? valueOptions : valueOptions[0];
  46256. onChange(triggerValues, triggerOptions);
  46257. }
  46258. });
  46259. // =========================== Select ===========================
  46260. var handleSelection = useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy);
  46261. var onInternalSelect = (0,rc_util_es.useEvent)(function (valuePath) {
  46262. handleSelection(valuePath);
  46263. });
  46264. // ======================== Context =========================
  46265. var cascaderContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46266. return {
  46267. options: mergedOptions,
  46268. fieldNames: mergedFieldNames,
  46269. values: checkedValues,
  46270. halfValues: halfCheckedValues,
  46271. changeOnSelect: changeOnSelect,
  46272. onSelect: onInternalSelect,
  46273. checkable: checkable,
  46274. searchOptions: [],
  46275. dropdownPrefixCls: undefined,
  46276. loadData: loadData,
  46277. expandTrigger: expandTrigger,
  46278. expandIcon: expandIcon,
  46279. loadingIcon: loadingIcon,
  46280. dropdownMenuColumnStyle: undefined
  46281. };
  46282. }, [mergedOptions, mergedFieldNames, checkedValues, halfCheckedValues, changeOnSelect, onInternalSelect, checkable, loadData, expandTrigger, expandIcon, loadingIcon]);
  46283. // ========================= Render =========================
  46284. var panelPrefixCls = "".concat(prefixCls, "-panel");
  46285. var isEmpty = !mergedOptions.length;
  46286. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_cascader_es_context.Provider, {
  46287. value: cascaderContext
  46288. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  46289. className: classnames_default()(panelPrefixCls, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(panelPrefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty["default"])(_classNames, "".concat(panelPrefixCls, "-empty"), isEmpty), _classNames), className),
  46290. style: style
  46291. }, isEmpty ? notFoundContent : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OptionList_List, {
  46292. prefixCls: prefixCls,
  46293. searchValue: "",
  46294. multiple: multiple,
  46295. toggleOpen: noop,
  46296. open: true,
  46297. direction: direction,
  46298. disabled: disabled
  46299. })));
  46300. }
  46301. ;// ./node_modules/rc-cascader/es/utils/warningPropsUtil.js
  46302. function warningPropsUtil_warningProps(props) {
  46303. var onPopupVisibleChange = props.onPopupVisibleChange,
  46304. popupVisible = props.popupVisible,
  46305. popupClassName = props.popupClassName,
  46306. popupPlacement = props.popupPlacement,
  46307. onDropdownVisibleChange = props.onDropdownVisibleChange;
  46308. (0,warning["default"])(!onPopupVisibleChange, '`onPopupVisibleChange` is deprecated. Please use `onOpenChange` instead.');
  46309. (0,warning["default"])(!onDropdownVisibleChange, '`onDropdownVisibleChange` is deprecated. Please use `onOpenChange` instead.');
  46310. (0,warning["default"])(popupVisible === undefined, '`popupVisible` is deprecated. Please use `open` instead.');
  46311. (0,warning["default"])(popupClassName === undefined, '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
  46312. (0,warning["default"])(popupPlacement === undefined, '`popupPlacement` is deprecated. Please use `placement` instead.');
  46313. }
  46314. // value in Cascader options should not be null
  46315. function warningPropsUtil_warningNullOptions(options, fieldNames) {
  46316. if (options) {
  46317. var recursiveOptions = function recursiveOptions(optionsList) {
  46318. for (var i = 0; i < optionsList.length; i++) {
  46319. var option = optionsList[i];
  46320. if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
  46321. (0,warning["default"])(false, '`value` in Cascader options should not be `null`.');
  46322. return true;
  46323. }
  46324. if (Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]) && recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children])) {
  46325. return true;
  46326. }
  46327. }
  46328. };
  46329. recursiveOptions(options);
  46330. }
  46331. }
  46332. /* harmony default export */ var utils_warningPropsUtil = (warningPropsUtil_warningProps);
  46333. ;// ./node_modules/rc-cascader/es/Cascader.js
  46334. var Cascader_excluded = ["id", "prefixCls", "fieldNames", "defaultValue", "value", "changeOnSelect", "onChange", "displayRender", "checkable", "autoClearSearchValue", "searchValue", "onSearch", "showSearch", "expandTrigger", "options", "dropdownPrefixCls", "loadData", "popupVisible", "open", "popupClassName", "dropdownClassName", "dropdownMenuColumnStyle", "dropdownStyle", "popupPlacement", "placement", "onDropdownVisibleChange", "onPopupVisibleChange", "onOpenChange", "expandIcon", "loadingIcon", "children", "dropdownMatchSelectWidth", "showCheckedStrategy", "optionRender"];
  46335. var Cascader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  46336. var id = props.id,
  46337. _props$prefixCls = props.prefixCls,
  46338. prefixCls = _props$prefixCls === void 0 ? 'rc-cascader' : _props$prefixCls,
  46339. fieldNames = props.fieldNames,
  46340. defaultValue = props.defaultValue,
  46341. value = props.value,
  46342. changeOnSelect = props.changeOnSelect,
  46343. onChange = props.onChange,
  46344. displayRender = props.displayRender,
  46345. checkable = props.checkable,
  46346. _props$autoClearSearc = props.autoClearSearchValue,
  46347. autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
  46348. searchValue = props.searchValue,
  46349. onSearch = props.onSearch,
  46350. showSearch = props.showSearch,
  46351. expandTrigger = props.expandTrigger,
  46352. options = props.options,
  46353. dropdownPrefixCls = props.dropdownPrefixCls,
  46354. loadData = props.loadData,
  46355. popupVisible = props.popupVisible,
  46356. open = props.open,
  46357. popupClassName = props.popupClassName,
  46358. dropdownClassName = props.dropdownClassName,
  46359. dropdownMenuColumnStyle = props.dropdownMenuColumnStyle,
  46360. customDropdownStyle = props.dropdownStyle,
  46361. popupPlacement = props.popupPlacement,
  46362. placement = props.placement,
  46363. onDropdownVisibleChange = props.onDropdownVisibleChange,
  46364. onPopupVisibleChange = props.onPopupVisibleChange,
  46365. onOpenChange = props.onOpenChange,
  46366. _props$expandIcon = props.expandIcon,
  46367. expandIcon = _props$expandIcon === void 0 ? '>' : _props$expandIcon,
  46368. loadingIcon = props.loadingIcon,
  46369. children = props.children,
  46370. _props$dropdownMatchS = props.dropdownMatchSelectWidth,
  46371. dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? false : _props$dropdownMatchS,
  46372. _props$showCheckedStr = props.showCheckedStrategy,
  46373. showCheckedStrategy = _props$showCheckedStr === void 0 ? SHOW_PARENT : _props$showCheckedStr,
  46374. optionRender = props.optionRender,
  46375. restProps = (0,objectWithoutProperties["default"])(props, Cascader_excluded);
  46376. var mergedId = useId_useId(id);
  46377. var multiple = !!checkable;
  46378. // =========================== Values ===========================
  46379. var _useMergedState = (0,useMergedState["default"])(defaultValue, {
  46380. value: value,
  46381. postState: toRawValues
  46382. }),
  46383. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  46384. rawValues = _useMergedState2[0],
  46385. setRawValues = _useMergedState2[1];
  46386. // ========================= FieldNames =========================
  46387. var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46388. return commonUtil_fillFieldNames(fieldNames);
  46389. }, /* eslint-disable react-hooks/exhaustive-deps */
  46390. [JSON.stringify(fieldNames)]
  46391. /* eslint-enable react-hooks/exhaustive-deps */);
  46392. // =========================== Option ===========================
  46393. var _useOptions = useOptions_useOptions(mergedFieldNames, options),
  46394. _useOptions2 = (0,slicedToArray["default"])(_useOptions, 3),
  46395. mergedOptions = _useOptions2[0],
  46396. getPathKeyEntities = _useOptions2[1],
  46397. getValueByKeyPath = _useOptions2[2];
  46398. // =========================== Search ===========================
  46399. var _useMergedState3 = (0,useMergedState["default"])('', {
  46400. value: searchValue,
  46401. postState: function postState(search) {
  46402. return search || '';
  46403. }
  46404. }),
  46405. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  46406. mergedSearchValue = _useMergedState4[0],
  46407. setSearchValue = _useMergedState4[1];
  46408. var onInternalSearch = function onInternalSearch(searchText, info) {
  46409. setSearchValue(searchText);
  46410. if (info.source !== 'blur' && onSearch) {
  46411. onSearch(searchText);
  46412. }
  46413. };
  46414. var _useSearchConfig = useSearchConfig(showSearch),
  46415. _useSearchConfig2 = (0,slicedToArray["default"])(_useSearchConfig, 2),
  46416. mergedShowSearch = _useSearchConfig2[0],
  46417. searchConfig = _useSearchConfig2[1];
  46418. var searchOptions = hooks_useSearchOptions(mergedSearchValue, mergedOptions, mergedFieldNames, dropdownPrefixCls || prefixCls, searchConfig, changeOnSelect || multiple);
  46419. // =========================== Values ===========================
  46420. var getMissingValues = useMissingValues(mergedOptions, mergedFieldNames);
  46421. // Fill `rawValues` with checked conduction values
  46422. var _useValues = useValues(multiple, rawValues, getPathKeyEntities, getValueByKeyPath, getMissingValues),
  46423. _useValues2 = (0,slicedToArray["default"])(_useValues, 3),
  46424. checkedValues = _useValues2[0],
  46425. halfCheckedValues = _useValues2[1],
  46426. missingCheckedValues = _useValues2[2];
  46427. var deDuplicatedValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46428. var checkedKeys = toPathKeys(checkedValues);
  46429. var deduplicateKeys = formatStrategyValues(checkedKeys, getPathKeyEntities, showCheckedStrategy);
  46430. return [].concat((0,toConsumableArray["default"])(missingCheckedValues), (0,toConsumableArray["default"])(getValueByKeyPath(deduplicateKeys)));
  46431. }, [checkedValues, getPathKeyEntities, getValueByKeyPath, missingCheckedValues, showCheckedStrategy]);
  46432. var displayValues = useDisplayValues(deDuplicatedValues, mergedOptions, mergedFieldNames, multiple, displayRender);
  46433. // =========================== Change ===========================
  46434. var triggerChange = (0,useEvent["default"])(function (nextValues) {
  46435. setRawValues(nextValues);
  46436. // Save perf if no need trigger event
  46437. if (onChange) {
  46438. var nextRawValues = toRawValues(nextValues);
  46439. var valueOptions = nextRawValues.map(function (valueCells) {
  46440. return toPathOptions(valueCells, mergedOptions, mergedFieldNames).map(function (valueOpt) {
  46441. return valueOpt.option;
  46442. });
  46443. });
  46444. var triggerValues = multiple ? nextRawValues : nextRawValues[0];
  46445. var triggerOptions = multiple ? valueOptions : valueOptions[0];
  46446. onChange(triggerValues, triggerOptions);
  46447. }
  46448. });
  46449. // =========================== Select ===========================
  46450. var handleSelection = useSelect(multiple, triggerChange, checkedValues, halfCheckedValues, missingCheckedValues, getPathKeyEntities, getValueByKeyPath, showCheckedStrategy);
  46451. var onInternalSelect = (0,useEvent["default"])(function (valuePath) {
  46452. if (!multiple || autoClearSearchValue) {
  46453. setSearchValue('');
  46454. }
  46455. handleSelection(valuePath);
  46456. });
  46457. // Display Value change logic
  46458. var onDisplayValuesChange = function onDisplayValuesChange(_, info) {
  46459. if (info.type === 'clear') {
  46460. triggerChange([]);
  46461. return;
  46462. }
  46463. // Cascader do not support `add` type. Only support `remove`
  46464. var _ref = info.values[0],
  46465. valueCells = _ref.valueCells;
  46466. onInternalSelect(valueCells);
  46467. };
  46468. // ============================ Open ============================
  46469. var mergedOpen = open !== undefined ? open : popupVisible;
  46470. var mergedDropdownClassName = dropdownClassName || popupClassName;
  46471. var mergedPlacement = placement || popupPlacement;
  46472. var onInternalDropdownVisibleChange = function onInternalDropdownVisibleChange(nextVisible) {
  46473. onOpenChange === null || onOpenChange === void 0 || onOpenChange(nextVisible);
  46474. onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(nextVisible);
  46475. onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextVisible);
  46476. };
  46477. // ========================== Warning ===========================
  46478. if (true) {
  46479. utils_warningPropsUtil(props);
  46480. warningPropsUtil_warningNullOptions(mergedOptions, mergedFieldNames);
  46481. }
  46482. // ========================== Context ===========================
  46483. var cascaderContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  46484. return {
  46485. options: mergedOptions,
  46486. fieldNames: mergedFieldNames,
  46487. values: checkedValues,
  46488. halfValues: halfCheckedValues,
  46489. changeOnSelect: changeOnSelect,
  46490. onSelect: onInternalSelect,
  46491. checkable: checkable,
  46492. searchOptions: searchOptions,
  46493. dropdownPrefixCls: dropdownPrefixCls,
  46494. loadData: loadData,
  46495. expandTrigger: expandTrigger,
  46496. expandIcon: expandIcon,
  46497. loadingIcon: loadingIcon,
  46498. dropdownMenuColumnStyle: dropdownMenuColumnStyle,
  46499. optionRender: optionRender
  46500. };
  46501. }, [mergedOptions, mergedFieldNames, checkedValues, halfCheckedValues, changeOnSelect, onInternalSelect, checkable, searchOptions, dropdownPrefixCls, loadData, expandTrigger, expandIcon, loadingIcon, dropdownMenuColumnStyle, optionRender]);
  46502. // ==============================================================
  46503. // == Render ==
  46504. // ==============================================================
  46505. var emptyOptions = !(mergedSearchValue ? searchOptions : mergedOptions).length;
  46506. var dropdownStyle =
  46507. // Search to match width
  46508. mergedSearchValue && searchConfig.matchInputWidth ||
  46509. // Empty keep the width
  46510. emptyOptions ? {} : {
  46511. minWidth: 'auto'
  46512. };
  46513. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_cascader_es_context.Provider, {
  46514. value: cascaderContext
  46515. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseSelect, (0,esm_extends["default"])({}, restProps, {
  46516. // MISC
  46517. ref: ref,
  46518. id: mergedId,
  46519. prefixCls: prefixCls,
  46520. autoClearSearchValue: autoClearSearchValue,
  46521. dropdownMatchSelectWidth: dropdownMatchSelectWidth,
  46522. dropdownStyle: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, dropdownStyle), customDropdownStyle)
  46523. // Value
  46524. ,
  46525. displayValues: displayValues,
  46526. onDisplayValuesChange: onDisplayValuesChange,
  46527. mode: multiple ? 'multiple' : undefined
  46528. // Search
  46529. ,
  46530. searchValue: mergedSearchValue,
  46531. onSearch: onInternalSearch,
  46532. showSearch: mergedShowSearch
  46533. // Options
  46534. ,
  46535. OptionList: rc_cascader_es_OptionList,
  46536. emptyOptions: emptyOptions
  46537. // Open
  46538. ,
  46539. open: mergedOpen,
  46540. dropdownClassName: mergedDropdownClassName,
  46541. placement: mergedPlacement,
  46542. onDropdownVisibleChange: onInternalDropdownVisibleChange
  46543. // Children
  46544. ,
  46545. getRawInputElement: function getRawInputElement() {
  46546. return children;
  46547. }
  46548. })));
  46549. });
  46550. if (true) {
  46551. Cascader.displayName = 'Cascader';
  46552. }
  46553. Cascader.SHOW_PARENT = SHOW_PARENT;
  46554. Cascader.SHOW_CHILD = SHOW_CHILD;
  46555. Cascader.Panel = Panel_Panel;
  46556. /* harmony default export */ var es_Cascader = (Cascader);
  46557. ;// ./node_modules/rc-cascader/es/index.js
  46558. /* harmony default export */ var rc_cascader_es = (es_Cascader);
  46559. ;// ./components/cascader/hooks/useBase.ts
  46560. function useBase(customizePrefixCls, direction) {
  46561. const {
  46562. getPrefixCls,
  46563. direction: rootDirection,
  46564. renderEmpty
  46565. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  46566. const mergedDirection = direction || rootDirection;
  46567. const prefixCls = getPrefixCls('select', customizePrefixCls);
  46568. const cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls);
  46569. return [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty];
  46570. }
  46571. /* harmony default export */ var hooks_useBase = (useBase);
  46572. ;// ./components/cascader/hooks/useCheckable.tsx
  46573. function useCheckable(cascaderPrefixCls, multiple) {
  46574. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => multiple ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  46575. className: `${cascaderPrefixCls}-checkbox-inner`
  46576. }) : false, [multiple]);
  46577. }
  46578. ;// ./components/cascader/hooks/useColumnIcons.tsx
  46579. const useColumnIcons = (prefixCls, rtl, expandIcon) => {
  46580. let mergedExpandIcon = expandIcon;
  46581. if (!expandIcon) {
  46582. mergedExpandIcon = rtl ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null);
  46583. }
  46584. const loadingIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  46585. className: `${prefixCls}-menu-item-loading-icon`
  46586. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
  46587. spin: true
  46588. }));
  46589. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => [mergedExpandIcon, loadingIcon], [mergedExpandIcon]);
  46590. };
  46591. /* harmony default export */ var hooks_useColumnIcons = (useColumnIcons);
  46592. // EXTERNAL MODULE: ./components/cascader/style/index.ts
  46593. var cascader_style = __webpack_require__("./components/cascader/style/index.ts");
  46594. // EXTERNAL MODULE: ./components/cascader/style/columns.ts
  46595. var columns = __webpack_require__("./components/cascader/style/columns.ts");
  46596. ;// ./components/cascader/style/panel.ts
  46597. // ============================== Panel ===============================
  46598. const genPanelStyle = token => {
  46599. const {
  46600. componentCls
  46601. } = token;
  46602. return {
  46603. [`${componentCls}-panel`]: [(0,columns["default"])(token), {
  46604. display: 'inline-flex',
  46605. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  46606. borderRadius: token.borderRadiusLG,
  46607. overflowX: 'auto',
  46608. maxWidth: '100%',
  46609. [`${componentCls}-menus`]: {
  46610. alignItems: 'stretch'
  46611. },
  46612. [`${componentCls}-menu`]: {
  46613. height: 'auto'
  46614. },
  46615. '&-empty': {
  46616. padding: token.paddingXXS
  46617. }
  46618. }]
  46619. };
  46620. };
  46621. // ============================== Export ==============================
  46622. /* harmony default export */ var panel = ((0,genStyleUtils.genComponentStyleHook)(['Cascader', 'Panel'], genPanelStyle, cascader_style.prepareComponentToken));
  46623. ;// ./components/cascader/Panel.tsx
  46624. function CascaderPanel(props) {
  46625. const {
  46626. prefixCls: customizePrefixCls,
  46627. className,
  46628. multiple,
  46629. rootClassName,
  46630. notFoundContent,
  46631. direction,
  46632. expandIcon,
  46633. disabled: customDisabled
  46634. } = props;
  46635. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  46636. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  46637. const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = hooks_useBase(customizePrefixCls, direction);
  46638. const rootCls = hooks_useCSSVarCls(cascaderPrefixCls);
  46639. const [wrapCSSVar, hashId, cssVarCls] = (0,cascader_style["default"])(cascaderPrefixCls, rootCls);
  46640. panel(cascaderPrefixCls);
  46641. const isRtl = mergedDirection === 'rtl';
  46642. // ===================== Icon ======================
  46643. const [mergedExpandIcon, loadingIcon] = hooks_useColumnIcons(prefixCls, isRtl, expandIcon);
  46644. // ===================== Empty =====================
  46645. const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  46646. componentName: "Cascader"
  46647. }));
  46648. // =================== Multiple ====================
  46649. const checkable = useCheckable(cascaderPrefixCls, multiple);
  46650. // ==================== Render =====================
  46651. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Panel_Panel, Object.assign({}, props, {
  46652. checkable: checkable,
  46653. prefixCls: cascaderPrefixCls,
  46654. className: classnames_default()(className, hashId, rootClassName, cssVarCls, rootCls),
  46655. notFoundContent: mergedNotFoundContent,
  46656. direction: mergedDirection,
  46657. expandIcon: mergedExpandIcon,
  46658. loadingIcon: loadingIcon,
  46659. disabled: mergedDisabled
  46660. })));
  46661. }
  46662. /* harmony default export */ var cascader_Panel = (CascaderPanel);
  46663. ;// ./components/cascader/index.tsx
  46664. var cascader_rest = undefined && undefined.__rest || function (s, e) {
  46665. var t = {};
  46666. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  46667. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  46668. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  46669. }
  46670. return t;
  46671. };
  46672. const {
  46673. SHOW_CHILD: cascader_SHOW_CHILD,
  46674. SHOW_PARENT: cascader_SHOW_PARENT
  46675. } = rc_cascader_es;
  46676. function highlightKeyword(str, lowerKeyword, prefixCls) {
  46677. const cells = str.toLowerCase().split(lowerKeyword).reduce((list, cur, index) => index === 0 ? [cur] : [].concat((0,toConsumableArray["default"])(list), [lowerKeyword, cur]), []);
  46678. const fillCells = [];
  46679. let start = 0;
  46680. cells.forEach((cell, index) => {
  46681. const end = start + cell.length;
  46682. let originWorld = str.slice(start, end);
  46683. start = end;
  46684. if (index % 2 === 1) {
  46685. originWorld =
  46686. /*#__PURE__*/
  46687. // eslint-disable-next-line react/no-array-index-key
  46688. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  46689. className: `${prefixCls}-menu-item-keyword`,
  46690. key: `separator-${index}`
  46691. }, originWorld);
  46692. }
  46693. fillCells.push(originWorld);
  46694. });
  46695. return fillCells;
  46696. }
  46697. const defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {
  46698. const optionList = [];
  46699. // We do lower here to save perf
  46700. const lower = inputValue.toLowerCase();
  46701. path.forEach((node, index) => {
  46702. if (index !== 0) {
  46703. optionList.push(' / ');
  46704. }
  46705. let label = node[fieldNames.label];
  46706. const type = typeof label;
  46707. if (type === 'string' || type === 'number') {
  46708. label = highlightKeyword(String(label), lower, prefixCls);
  46709. }
  46710. optionList.push(label);
  46711. });
  46712. return optionList;
  46713. };
  46714. const cascader_Cascader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  46715. var _a, _b, _c, _d;
  46716. const {
  46717. prefixCls: customizePrefixCls,
  46718. size: customizeSize,
  46719. disabled: customDisabled,
  46720. className,
  46721. rootClassName,
  46722. multiple,
  46723. bordered = true,
  46724. transitionName,
  46725. choiceTransitionName = '',
  46726. popupClassName,
  46727. dropdownClassName,
  46728. expandIcon,
  46729. placement,
  46730. showSearch,
  46731. allowClear = true,
  46732. notFoundContent,
  46733. direction,
  46734. getPopupContainer,
  46735. status: customStatus,
  46736. showArrow,
  46737. builtinPlacements,
  46738. style,
  46739. variant: customVariant,
  46740. dropdownRender,
  46741. onDropdownVisibleChange,
  46742. dropdownMenuColumnStyle,
  46743. popupRender,
  46744. dropdownStyle,
  46745. popupMenuColumnStyle,
  46746. onOpenChange,
  46747. styles,
  46748. classNames
  46749. } = props,
  46750. rest = cascader_rest(props, ["prefixCls", "size", "disabled", "className", "rootClassName", "multiple", "bordered", "transitionName", "choiceTransitionName", "popupClassName", "dropdownClassName", "expandIcon", "placement", "showSearch", "allowClear", "notFoundContent", "direction", "getPopupContainer", "status", "showArrow", "builtinPlacements", "style", "variant", "dropdownRender", "onDropdownVisibleChange", "dropdownMenuColumnStyle", "popupRender", "dropdownStyle", "popupMenuColumnStyle", "onOpenChange", "styles", "classNames"]);
  46751. const restProps = (0,omit["default"])(rest, ['suffixIcon']);
  46752. const {
  46753. getPrefixCls,
  46754. getPopupContainer: getContextPopupContainer,
  46755. className: contextClassName,
  46756. style: contextStyle,
  46757. classNames: contextClassNames,
  46758. styles: contextStyles
  46759. } = (0,config_provider_context.useComponentConfig)('cascader');
  46760. const {
  46761. popupOverflow
  46762. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  46763. // =================== Form =====================
  46764. const {
  46765. status: contextStatus,
  46766. hasFeedback,
  46767. isFormItemInput,
  46768. feedbackIcon
  46769. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  46770. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  46771. // =================== Warning =====================
  46772. if (true) {
  46773. const warning = (0,_util_warning.devUseWarning)('Cascader');
  46774. // v5 deprecated dropdown api
  46775. const deprecatedProps = {
  46776. dropdownClassName: 'classNames.popup.root',
  46777. dropdownStyle: 'styles.popup.root',
  46778. dropdownRender: 'popupRender',
  46779. dropdownMenuColumnStyle: 'popupMenuColumnStyle',
  46780. onDropdownVisibleChange: 'onOpenChange',
  46781. bordered: 'variant'
  46782. };
  46783. Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
  46784. warning.deprecated(!(oldProp in props), oldProp, newProp);
  46785. });
  46786. true ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : 0;
  46787. }
  46788. // ==================== Prefix =====================
  46789. const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = hooks_useBase(customizePrefixCls, direction);
  46790. const isRtl = mergedDirection === 'rtl';
  46791. const rootPrefixCls = getPrefixCls();
  46792. const rootCls = hooks_useCSSVarCls(prefixCls);
  46793. const [wrapSelectCSSVar, hashId, cssVarCls] = (0,select_style["default"])(prefixCls, rootCls);
  46794. const cascaderRootCls = hooks_useCSSVarCls(cascaderPrefixCls);
  46795. const [wrapCascaderCSSVar] = (0,cascader_style["default"])(cascaderPrefixCls, cascaderRootCls);
  46796. const {
  46797. compactSize,
  46798. compactItemClassnames
  46799. } = useCompactItemContext(prefixCls, direction);
  46800. const [variant, enableVariantCls] = useVariants('cascader', customVariant, bordered);
  46801. // =================== No Found ====================
  46802. const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  46803. componentName: "Cascader"
  46804. }));
  46805. // =================== Dropdown ====================
  46806. const mergedPopupClassName = classnames_default()(((_a = classNames === null || classNames === void 0 ? void 0 : classNames.popup) === null || _a === void 0 ? void 0 : _a.root) || ((_b = contextClassNames.popup) === null || _b === void 0 ? void 0 : _b.root) || popupClassName || dropdownClassName, `${cascaderPrefixCls}-dropdown`, {
  46807. [`${cascaderPrefixCls}-dropdown-rtl`]: mergedDirection === 'rtl'
  46808. }, rootClassName, rootCls, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cascaderRootCls, hashId, cssVarCls);
  46809. const mergedPopupRender = select_usePopupRender(popupRender || dropdownRender);
  46810. const mergedPopupMenuColumnStyle = popupMenuColumnStyle || dropdownMenuColumnStyle;
  46811. const mergedOnOpenChange = onOpenChange || onDropdownVisibleChange;
  46812. const mergedPopupStyle = ((_c = styles === null || styles === void 0 ? void 0 : styles.popup) === null || _c === void 0 ? void 0 : _c.root) || ((_d = contextStyles.popup) === null || _d === void 0 ? void 0 : _d.root) || dropdownStyle;
  46813. // ==================== Search =====================
  46814. const mergedShowSearch = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  46815. if (!showSearch) {
  46816. return showSearch;
  46817. }
  46818. let searchConfig = {
  46819. render: defaultSearchRender
  46820. };
  46821. if (typeof showSearch === 'object') {
  46822. searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
  46823. }
  46824. return searchConfig;
  46825. }, [showSearch]);
  46826. // ===================== Size ======================
  46827. const mergedSize = (0,useSize["default"])(ctx => {
  46828. var _a;
  46829. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  46830. });
  46831. // ===================== Disabled =====================
  46832. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  46833. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  46834. // ===================== Icon ======================
  46835. const [mergedExpandIcon, loadingIcon] = hooks_useColumnIcons(prefixCls, isRtl, expandIcon);
  46836. // =================== Multiple ====================
  46837. const checkable = useCheckable(cascaderPrefixCls, multiple);
  46838. // ===================== Icons =====================
  46839. const showSuffixIcon = useShowArrow(props.suffixIcon, showArrow);
  46840. const {
  46841. suffixIcon,
  46842. removeIcon,
  46843. clearIcon
  46844. } = useIcons(Object.assign(Object.assign({}, props), {
  46845. hasFeedback,
  46846. feedbackIcon,
  46847. showSuffixIcon,
  46848. multiple,
  46849. prefixCls,
  46850. componentName: 'Cascader'
  46851. }));
  46852. // ===================== Placement =====================
  46853. const memoPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  46854. if (placement !== undefined) {
  46855. return placement;
  46856. }
  46857. return isRtl ? 'bottomRight' : 'bottomLeft';
  46858. }, [placement, isRtl]);
  46859. const mergedAllowClear = allowClear === true ? {
  46860. clearIcon
  46861. } : allowClear;
  46862. // ============================ zIndex ============================
  46863. const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', mergedPopupStyle === null || mergedPopupStyle === void 0 ? void 0 : mergedPopupStyle.zIndex);
  46864. // ==================== Render =====================
  46865. const renderNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_cascader_es, Object.assign({
  46866. prefixCls: prefixCls,
  46867. className: classnames_default()(!customizePrefixCls && cascaderPrefixCls, {
  46868. [`${prefixCls}-lg`]: mergedSize === 'large',
  46869. [`${prefixCls}-sm`]: mergedSize === 'small',
  46870. [`${prefixCls}-rtl`]: isRtl,
  46871. [`${prefixCls}-${variant}`]: enableVariantCls,
  46872. [`${prefixCls}-in-form-item`]: isFormItemInput
  46873. }, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, contextClassName, className, rootClassName, classNames === null || classNames === void 0 ? void 0 : classNames.root, contextClassNames.root, rootCls, cascaderRootCls, hashId, cssVarCls),
  46874. disabled: mergedDisabled,
  46875. style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), styles === null || styles === void 0 ? void 0 : styles.root), contextStyle), style)
  46876. }, restProps, {
  46877. builtinPlacements: select_mergedBuiltinPlacements(builtinPlacements, popupOverflow),
  46878. direction: mergedDirection,
  46879. placement: memoPlacement,
  46880. notFoundContent: mergedNotFoundContent,
  46881. allowClear: mergedAllowClear,
  46882. showSearch: mergedShowSearch,
  46883. expandIcon: mergedExpandIcon,
  46884. suffixIcon: suffixIcon,
  46885. removeIcon: removeIcon,
  46886. loadingIcon: loadingIcon,
  46887. checkable: checkable,
  46888. dropdownClassName: mergedPopupClassName,
  46889. dropdownPrefixCls: customizePrefixCls || cascaderPrefixCls,
  46890. dropdownStyle: Object.assign(Object.assign({}, mergedPopupStyle), {
  46891. zIndex
  46892. }),
  46893. dropdownRender: mergedPopupRender,
  46894. dropdownMenuColumnStyle: mergedPopupMenuColumnStyle,
  46895. onOpenChange: mergedOnOpenChange,
  46896. choiceTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, '', choiceTransitionName),
  46897. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),
  46898. getPopupContainer: getPopupContainer || getContextPopupContainer,
  46899. ref: ref
  46900. }));
  46901. return wrapCascaderCSSVar(wrapSelectCSSVar(renderNode));
  46902. });
  46903. if (true) {
  46904. cascader_Cascader.displayName = 'Cascader';
  46905. }
  46906. // We don't care debug panel
  46907. /* istanbul ignore next */
  46908. const cascader_PurePanel = _util_PurePanel(cascader_Cascader, 'dropdownAlign', props => (0,omit["default"])(props, ['visible']));
  46909. cascader_Cascader.SHOW_PARENT = cascader_SHOW_PARENT;
  46910. cascader_Cascader.SHOW_CHILD = cascader_SHOW_CHILD;
  46911. cascader_Cascader.Panel = cascader_Panel;
  46912. cascader_Cascader._InternalPanelDoNotUseOrYouWillBeFired = cascader_PurePanel;
  46913. /* harmony default export */ var cascader = (cascader_Cascader);
  46914. ;// ./components/checkbox/GroupContext.ts
  46915. const GroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
  46916. /* harmony default export */ var checkbox_GroupContext = (GroupContext);
  46917. // EXTERNAL MODULE: ./components/checkbox/style/index.ts
  46918. var checkbox_style = __webpack_require__("./components/checkbox/style/index.ts");
  46919. ;// ./components/checkbox/Checkbox.tsx
  46920. var Checkbox_rest = undefined && undefined.__rest || function (s, e) {
  46921. var t = {};
  46922. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  46923. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  46924. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  46925. }
  46926. return t;
  46927. };
  46928. const InternalCheckbox = (props, ref) => {
  46929. var _a;
  46930. const {
  46931. prefixCls: customizePrefixCls,
  46932. className,
  46933. rootClassName,
  46934. children,
  46935. indeterminate = false,
  46936. style,
  46937. onMouseEnter,
  46938. onMouseLeave,
  46939. skipGroup = false,
  46940. disabled
  46941. } = props,
  46942. restProps = Checkbox_rest(props, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]);
  46943. const {
  46944. getPrefixCls,
  46945. direction,
  46946. checkbox
  46947. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  46948. const checkboxGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(checkbox_GroupContext);
  46949. const {
  46950. isFormItemInput
  46951. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  46952. const contextDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  46953. const mergedDisabled = (_a = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _a !== void 0 ? _a : contextDisabled;
  46954. const prevValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(restProps.value);
  46955. const checkboxRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  46956. const mergedRef = (0,es_ref.composeRef)(ref, checkboxRef);
  46957. if (true) {
  46958. const warning = (0,_util_warning.devUseWarning)('Checkbox');
  46959. true ? warning('checked' in restProps || !!checkboxGroup || !('value' in restProps), 'usage', '`value` is not a valid prop, do you mean `checked`?') : 0;
  46960. }
  46961. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  46962. checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);
  46963. }, []);
  46964. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  46965. if (skipGroup) {
  46966. return;
  46967. }
  46968. if (restProps.value !== prevValue.current) {
  46969. checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current);
  46970. checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);
  46971. prevValue.current = restProps.value;
  46972. }
  46973. return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value);
  46974. }, [restProps.value]);
  46975. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  46976. var _a;
  46977. if ((_a = checkboxRef.current) === null || _a === void 0 ? void 0 : _a.input) {
  46978. checkboxRef.current.input.indeterminate = indeterminate;
  46979. }
  46980. }, [indeterminate]);
  46981. const prefixCls = getPrefixCls('checkbox', customizePrefixCls);
  46982. const rootCls = hooks_useCSSVarCls(prefixCls);
  46983. const [wrapCSSVar, hashId, cssVarCls] = (0,checkbox_style["default"])(prefixCls, rootCls);
  46984. const checkboxProps = Object.assign({}, restProps);
  46985. if (checkboxGroup && !skipGroup) {
  46986. checkboxProps.onChange = (...args) => {
  46987. if (restProps.onChange) {
  46988. restProps.onChange.apply(restProps, args);
  46989. }
  46990. if (checkboxGroup.toggleOption) {
  46991. checkboxGroup.toggleOption({
  46992. label: children,
  46993. value: restProps.value
  46994. });
  46995. }
  46996. };
  46997. checkboxProps.name = checkboxGroup.name;
  46998. checkboxProps.checked = checkboxGroup.value.includes(restProps.value);
  46999. }
  47000. const classString = classnames_default()(`${prefixCls}-wrapper`, {
  47001. [`${prefixCls}-rtl`]: direction === 'rtl',
  47002. [`${prefixCls}-wrapper-checked`]: checkboxProps.checked,
  47003. [`${prefixCls}-wrapper-disabled`]: mergedDisabled,
  47004. [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput
  47005. }, checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, cssVarCls, rootCls, hashId);
  47006. const checkboxClass = classnames_default()({
  47007. [`${prefixCls}-indeterminate`]: indeterminate
  47008. }, TARGET_CLS, hashId);
  47009. // ============================ Event Lock ============================
  47010. const [onLabelClick, onInputClick] = useBubbleLock(checkboxProps.onClick);
  47011. // ============================== Render ==============================
  47012. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
  47013. component: "Checkbox",
  47014. disabled: mergedDisabled
  47015. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
  47016. className: classString,
  47017. style: Object.assign(Object.assign({}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.style), style),
  47018. onMouseEnter: onMouseEnter,
  47019. onMouseLeave: onMouseLeave,
  47020. onClick: onLabelClick
  47021. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_checkbox_es, Object.assign({}, checkboxProps, {
  47022. onClick: onInputClick,
  47023. prefixCls: prefixCls,
  47024. className: checkboxClass,
  47025. disabled: mergedDisabled,
  47026. ref: mergedRef
  47027. })), children !== undefined && children !== null && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  47028. className: `${prefixCls}-label`
  47029. }, children)))));
  47030. };
  47031. const checkbox_Checkbox_Checkbox = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalCheckbox);
  47032. if (true) {
  47033. checkbox_Checkbox_Checkbox.displayName = 'Checkbox';
  47034. }
  47035. /* harmony default export */ var checkbox_Checkbox = (checkbox_Checkbox_Checkbox);
  47036. ;// ./components/checkbox/Group.tsx
  47037. var Group_rest = undefined && undefined.__rest || function (s, e) {
  47038. var t = {};
  47039. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  47040. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  47041. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  47042. }
  47043. return t;
  47044. };
  47045. const CheckboxGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  47046. const {
  47047. defaultValue,
  47048. children,
  47049. options = [],
  47050. prefixCls: customizePrefixCls,
  47051. className,
  47052. rootClassName,
  47053. style,
  47054. onChange
  47055. } = props,
  47056. restProps = Group_rest(props, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]);
  47057. const {
  47058. getPrefixCls,
  47059. direction
  47060. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  47061. const [value, setValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(restProps.value || defaultValue || []);
  47062. const [registeredValues, setRegisteredValues] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  47063. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  47064. if ('value' in restProps) {
  47065. setValue(restProps.value || []);
  47066. }
  47067. }, [restProps.value]);
  47068. const memoizedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => options.map(option => {
  47069. if (typeof option === 'string' || typeof option === 'number') {
  47070. return {
  47071. label: option,
  47072. value: option
  47073. };
  47074. }
  47075. return option;
  47076. }), [options]);
  47077. const cancelValue = val => {
  47078. setRegisteredValues(prevValues => prevValues.filter(v => v !== val));
  47079. };
  47080. const registerValue = val => {
  47081. setRegisteredValues(prevValues => [].concat((0,toConsumableArray["default"])(prevValues), [val]));
  47082. };
  47083. const toggleOption = option => {
  47084. const optionIndex = value.indexOf(option.value);
  47085. const newValue = (0,toConsumableArray["default"])(value);
  47086. if (optionIndex === -1) {
  47087. newValue.push(option.value);
  47088. } else {
  47089. newValue.splice(optionIndex, 1);
  47090. }
  47091. if (!('value' in restProps)) {
  47092. setValue(newValue);
  47093. }
  47094. onChange === null || onChange === void 0 ? void 0 : onChange(newValue.filter(val => registeredValues.includes(val)).sort((a, b) => {
  47095. const indexA = memoizedOptions.findIndex(opt => opt.value === a);
  47096. const indexB = memoizedOptions.findIndex(opt => opt.value === b);
  47097. return indexA - indexB;
  47098. }));
  47099. };
  47100. const prefixCls = getPrefixCls('checkbox', customizePrefixCls);
  47101. const groupPrefixCls = `${prefixCls}-group`;
  47102. const rootCls = hooks_useCSSVarCls(prefixCls);
  47103. const [wrapCSSVar, hashId, cssVarCls] = (0,checkbox_style["default"])(prefixCls, rootCls);
  47104. const domProps = (0,omit["default"])(restProps, ['value', 'disabled']);
  47105. const childrenNode = options.length ? memoizedOptions.map(option => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(checkbox_Checkbox, {
  47106. prefixCls: prefixCls,
  47107. key: option.value.toString(),
  47108. disabled: 'disabled' in option ? option.disabled : restProps.disabled,
  47109. value: option.value,
  47110. checked: value.includes(option.value),
  47111. onChange: option.onChange,
  47112. className: classnames_default()(`${groupPrefixCls}-item`, option.className),
  47113. style: option.style,
  47114. title: option.title,
  47115. id: option.id,
  47116. required: option.required
  47117. }, option.label))) : children;
  47118. const memoizedContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  47119. toggleOption,
  47120. value,
  47121. disabled: restProps.disabled,
  47122. name: restProps.name,
  47123. // https://github.com/ant-design/ant-design/issues/16376
  47124. registerValue,
  47125. cancelValue
  47126. }), [toggleOption, value, restProps.disabled, restProps.name, registerValue, cancelValue]);
  47127. const classString = classnames_default()(groupPrefixCls, {
  47128. [`${groupPrefixCls}-rtl`]: direction === 'rtl'
  47129. }, className, rootClassName, cssVarCls, rootCls, hashId);
  47130. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  47131. className: classString,
  47132. style: style
  47133. }, domProps, {
  47134. ref: ref
  47135. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(checkbox_GroupContext.Provider, {
  47136. value: memoizedContext
  47137. }, childrenNode)));
  47138. });
  47139. /* harmony default export */ var Group = (CheckboxGroup);
  47140. ;// ./components/checkbox/index.tsx
  47141. const components_checkbox_Checkbox = checkbox_Checkbox;
  47142. components_checkbox_Checkbox.Group = Group;
  47143. components_checkbox_Checkbox.__ANT_CHECKBOX = true;
  47144. if (true) {
  47145. components_checkbox_Checkbox.displayName = 'Checkbox';
  47146. }
  47147. /* harmony default export */ var components_checkbox = (components_checkbox_Checkbox);
  47148. ;// ./components/grid/RowContext.ts
  47149. const RowContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
  47150. /* harmony default export */ var grid_RowContext = (RowContext);
  47151. // EXTERNAL MODULE: ./components/grid/style/index.ts
  47152. var grid_style = __webpack_require__("./components/grid/style/index.ts");
  47153. ;// ./components/grid/col.tsx
  47154. var col_rest = undefined && undefined.__rest || function (s, e) {
  47155. var t = {};
  47156. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  47157. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  47158. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  47159. }
  47160. return t;
  47161. };
  47162. function parseFlex(flex) {
  47163. if (typeof flex === 'number') {
  47164. return `${flex} ${flex} auto`;
  47165. }
  47166. if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
  47167. return `0 0 ${flex}`;
  47168. }
  47169. return flex;
  47170. }
  47171. const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
  47172. const Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  47173. const {
  47174. getPrefixCls,
  47175. direction
  47176. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  47177. const {
  47178. gutter,
  47179. wrap
  47180. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(grid_RowContext);
  47181. const {
  47182. prefixCls: customizePrefixCls,
  47183. span,
  47184. order,
  47185. offset,
  47186. push,
  47187. pull,
  47188. className,
  47189. children,
  47190. flex,
  47191. style
  47192. } = props,
  47193. others = col_rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]);
  47194. const prefixCls = getPrefixCls('col', customizePrefixCls);
  47195. const [wrapCSSVar, hashId, cssVarCls] = (0,grid_style.useColStyle)(prefixCls);
  47196. // ===================== Size ======================
  47197. const sizeStyle = {};
  47198. let sizeClassObj = {};
  47199. sizes.forEach(size => {
  47200. let sizeProps = {};
  47201. const propSize = props[size];
  47202. if (typeof propSize === 'number') {
  47203. sizeProps.span = propSize;
  47204. } else if (typeof propSize === 'object') {
  47205. sizeProps = propSize || {};
  47206. }
  47207. delete others[size];
  47208. sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {
  47209. [`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span !== undefined,
  47210. [`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
  47211. [`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
  47212. [`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
  47213. [`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,
  47214. [`${prefixCls}-rtl`]: direction === 'rtl'
  47215. });
  47216. // Responsive flex layout
  47217. if (sizeProps.flex) {
  47218. sizeClassObj[`${prefixCls}-${size}-flex`] = true;
  47219. sizeStyle[`--${prefixCls}-${size}-flex`] = parseFlex(sizeProps.flex);
  47220. }
  47221. });
  47222. // ==================== Normal =====================
  47223. const classes = classnames_default()(prefixCls, {
  47224. [`${prefixCls}-${span}`]: span !== undefined,
  47225. [`${prefixCls}-order-${order}`]: order,
  47226. [`${prefixCls}-offset-${offset}`]: offset,
  47227. [`${prefixCls}-push-${push}`]: push,
  47228. [`${prefixCls}-pull-${pull}`]: pull
  47229. }, className, sizeClassObj, hashId, cssVarCls);
  47230. const mergedStyle = {};
  47231. // Horizontal gutter use padding
  47232. if (gutter && gutter[0] > 0) {
  47233. const horizontalGutter = gutter[0] / 2;
  47234. mergedStyle.paddingLeft = horizontalGutter;
  47235. mergedStyle.paddingRight = horizontalGutter;
  47236. }
  47237. if (flex) {
  47238. mergedStyle.flex = parseFlex(flex);
  47239. // Hack for Firefox to avoid size issue
  47240. // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
  47241. if (wrap === false && !mergedStyle.minWidth) {
  47242. mergedStyle.minWidth = 0;
  47243. }
  47244. }
  47245. // ==================== Render =====================
  47246. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
  47247. style: Object.assign(Object.assign(Object.assign({}, mergedStyle), style), sizeStyle),
  47248. className: classes,
  47249. ref: ref
  47250. }), children));
  47251. });
  47252. if (true) {
  47253. Col.displayName = 'Col';
  47254. }
  47255. /* harmony default export */ var col = (Col);
  47256. ;// ./components/col/index.tsx
  47257. /* harmony default export */ var components_col = (col);
  47258. // EXTERNAL MODULE: ./components/collapse/index.tsx + 7 modules
  47259. var collapse = __webpack_require__("./components/collapse/index.tsx");
  47260. // EXTERNAL MODULE: ./components/color-picker/color.ts
  47261. var color = __webpack_require__("./components/color-picker/color.ts");
  47262. // EXTERNAL MODULE: ./components/divider/style/index.ts
  47263. var divider_style = __webpack_require__("./components/divider/style/index.ts");
  47264. ;// ./components/divider/index.tsx
  47265. var divider_rest = undefined && undefined.__rest || function (s, e) {
  47266. var t = {};
  47267. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  47268. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  47269. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  47270. }
  47271. return t;
  47272. };
  47273. const sizeClassNameMap = {
  47274. small: 'sm',
  47275. middle: 'md'
  47276. };
  47277. const divider_Divider = props => {
  47278. const {
  47279. getPrefixCls,
  47280. direction,
  47281. className: dividerClassName,
  47282. style: dividerStyle
  47283. } = (0,config_provider_context.useComponentConfig)('divider');
  47284. const {
  47285. prefixCls: customizePrefixCls,
  47286. type = 'horizontal',
  47287. orientation = 'center',
  47288. orientationMargin,
  47289. className,
  47290. rootClassName,
  47291. children,
  47292. dashed,
  47293. variant = 'solid',
  47294. plain,
  47295. style,
  47296. size: customSize
  47297. } = props,
  47298. restProps = divider_rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "variant", "plain", "style", "size"]);
  47299. const prefixCls = getPrefixCls('divider', customizePrefixCls);
  47300. const [wrapCSSVar, hashId, cssVarCls] = (0,divider_style["default"])(prefixCls);
  47301. const sizeFullName = (0,useSize["default"])(customSize);
  47302. const sizeCls = sizeClassNameMap[sizeFullName];
  47303. const hasChildren = !!children;
  47304. const mergedOrientation = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  47305. if (orientation === 'left') {
  47306. return direction === 'rtl' ? 'end' : 'start';
  47307. }
  47308. if (orientation === 'right') {
  47309. return direction === 'rtl' ? 'start' : 'end';
  47310. }
  47311. return orientation;
  47312. }, [direction, orientation]);
  47313. const hasMarginStart = mergedOrientation === 'start' && orientationMargin != null;
  47314. const hasMarginEnd = mergedOrientation === 'end' && orientationMargin != null;
  47315. const classString = classnames_default()(prefixCls, dividerClassName, hashId, cssVarCls, `${prefixCls}-${type}`, {
  47316. [`${prefixCls}-with-text`]: hasChildren,
  47317. [`${prefixCls}-with-text-${mergedOrientation}`]: hasChildren,
  47318. [`${prefixCls}-dashed`]: !!dashed,
  47319. [`${prefixCls}-${variant}`]: variant !== 'solid',
  47320. [`${prefixCls}-plain`]: !!plain,
  47321. [`${prefixCls}-rtl`]: direction === 'rtl',
  47322. [`${prefixCls}-no-default-orientation-margin-start`]: hasMarginStart,
  47323. [`${prefixCls}-no-default-orientation-margin-end`]: hasMarginEnd,
  47324. [`${prefixCls}-${sizeCls}`]: !!sizeCls
  47325. }, className, rootClassName);
  47326. const memoizedOrientationMargin = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  47327. if (typeof orientationMargin === 'number') {
  47328. return orientationMargin;
  47329. }
  47330. if (/^\d+$/.test(orientationMargin)) {
  47331. return Number(orientationMargin);
  47332. }
  47333. return orientationMargin;
  47334. }, [orientationMargin]);
  47335. const innerStyle = {
  47336. marginInlineStart: hasMarginStart ? memoizedOrientationMargin : undefined,
  47337. marginInlineEnd: hasMarginEnd ? memoizedOrientationMargin : undefined
  47338. };
  47339. // Warning children not work in vertical mode
  47340. if (true) {
  47341. const warning = (0,_util_warning.devUseWarning)('Divider');
  47342. true ? warning(!children || type !== 'vertical', 'usage', '`children` not working in `vertical` mode.') : 0;
  47343. }
  47344. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  47345. className: classString,
  47346. style: Object.assign(Object.assign({}, dividerStyle), style)
  47347. }, restProps, {
  47348. role: "separator"
  47349. }), children && type !== 'vertical' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  47350. className: `${prefixCls}-inner-text`,
  47351. style: innerStyle
  47352. }, children))));
  47353. };
  47354. if (true) {
  47355. divider_Divider.displayName = 'Divider';
  47356. }
  47357. /* harmony default export */ var divider = (divider_Divider);
  47358. // EXTERNAL MODULE: ./node_modules/@rc-component/color-picker/es/index.js + 14 modules
  47359. var color_picker_es = __webpack_require__("./node_modules/@rc-component/color-picker/es/index.js");
  47360. ;// ./node_modules/rc-segmented/es/MotionThumb.js
  47361. var calcThumbStyle = function calcThumbStyle(targetElement, vertical) {
  47362. if (!targetElement) return null;
  47363. var style = {
  47364. left: targetElement.offsetLeft,
  47365. right: targetElement.parentElement.clientWidth - targetElement.clientWidth - targetElement.offsetLeft,
  47366. width: targetElement.clientWidth,
  47367. top: targetElement.offsetTop,
  47368. bottom: targetElement.parentElement.clientHeight - targetElement.clientHeight - targetElement.offsetTop,
  47369. height: targetElement.clientHeight
  47370. };
  47371. if (vertical) {
  47372. // Adjusts positioning and size for vertical layout by setting horizontal properties to 0 and using vertical properties from the style object.
  47373. return {
  47374. left: 0,
  47375. right: 0,
  47376. width: 0,
  47377. top: style.top,
  47378. bottom: style.bottom,
  47379. height: style.height
  47380. };
  47381. }
  47382. return {
  47383. left: style.left,
  47384. right: style.right,
  47385. width: style.width,
  47386. top: 0,
  47387. bottom: 0,
  47388. height: 0
  47389. };
  47390. };
  47391. var toPX = function toPX(value) {
  47392. return value !== undefined ? "".concat(value, "px") : undefined;
  47393. };
  47394. function MotionThumb(props) {
  47395. var prefixCls = props.prefixCls,
  47396. containerRef = props.containerRef,
  47397. value = props.value,
  47398. getValueIndex = props.getValueIndex,
  47399. motionName = props.motionName,
  47400. onMotionStart = props.onMotionStart,
  47401. onMotionEnd = props.onMotionEnd,
  47402. direction = props.direction,
  47403. _props$vertical = props.vertical,
  47404. vertical = _props$vertical === void 0 ? false : _props$vertical;
  47405. var thumbRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  47406. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value),
  47407. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  47408. prevValue = _React$useState2[0],
  47409. setPrevValue = _React$useState2[1];
  47410. // =========================== Effect ===========================
  47411. var findValueElement = function findValueElement(val) {
  47412. var _containerRef$current;
  47413. var index = getValueIndex(val);
  47414. var ele = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelectorAll(".".concat(prefixCls, "-item"))[index];
  47415. return (ele === null || ele === void 0 ? void 0 : ele.offsetParent) && ele;
  47416. };
  47417. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  47418. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  47419. prevStyle = _React$useState4[0],
  47420. setPrevStyle = _React$useState4[1];
  47421. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  47422. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  47423. nextStyle = _React$useState6[0],
  47424. setNextStyle = _React$useState6[1];
  47425. (0,useLayoutEffect["default"])(function () {
  47426. if (prevValue !== value) {
  47427. var prev = findValueElement(prevValue);
  47428. var next = findValueElement(value);
  47429. var calcPrevStyle = calcThumbStyle(prev, vertical);
  47430. var calcNextStyle = calcThumbStyle(next, vertical);
  47431. setPrevValue(value);
  47432. setPrevStyle(calcPrevStyle);
  47433. setNextStyle(calcNextStyle);
  47434. if (prev && next) {
  47435. onMotionStart();
  47436. } else {
  47437. onMotionEnd();
  47438. }
  47439. }
  47440. }, [value]);
  47441. var thumbStart = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  47442. if (vertical) {
  47443. var _prevStyle$top;
  47444. return toPX((_prevStyle$top = prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.top) !== null && _prevStyle$top !== void 0 ? _prevStyle$top : 0);
  47445. }
  47446. if (direction === 'rtl') {
  47447. return toPX(-(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.right));
  47448. }
  47449. return toPX(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.left);
  47450. }, [vertical, direction, prevStyle]);
  47451. var thumbActive = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  47452. if (vertical) {
  47453. var _nextStyle$top;
  47454. return toPX((_nextStyle$top = nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.top) !== null && _nextStyle$top !== void 0 ? _nextStyle$top : 0);
  47455. }
  47456. if (direction === 'rtl') {
  47457. return toPX(-(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.right));
  47458. }
  47459. return toPX(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.left);
  47460. }, [vertical, direction, nextStyle]);
  47461. // =========================== Motion ===========================
  47462. var onAppearStart = function onAppearStart() {
  47463. if (vertical) {
  47464. return {
  47465. transform: 'translateY(var(--thumb-start-top))',
  47466. height: 'var(--thumb-start-height)'
  47467. };
  47468. }
  47469. return {
  47470. transform: 'translateX(var(--thumb-start-left))',
  47471. width: 'var(--thumb-start-width)'
  47472. };
  47473. };
  47474. var onAppearActive = function onAppearActive() {
  47475. if (vertical) {
  47476. return {
  47477. transform: 'translateY(var(--thumb-active-top))',
  47478. height: 'var(--thumb-active-height)'
  47479. };
  47480. }
  47481. return {
  47482. transform: 'translateX(var(--thumb-active-left))',
  47483. width: 'var(--thumb-active-width)'
  47484. };
  47485. };
  47486. var onVisibleChanged = function onVisibleChanged() {
  47487. setPrevStyle(null);
  47488. setNextStyle(null);
  47489. onMotionEnd();
  47490. };
  47491. // =========================== Render ===========================
  47492. // No need motion when nothing exist in queue
  47493. if (!prevStyle || !nextStyle) {
  47494. return null;
  47495. }
  47496. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  47497. visible: true,
  47498. motionName: motionName,
  47499. motionAppear: true,
  47500. onAppearStart: onAppearStart,
  47501. onAppearActive: onAppearActive,
  47502. onVisibleChanged: onVisibleChanged
  47503. }, function (_ref, ref) {
  47504. var motionClassName = _ref.className,
  47505. motionStyle = _ref.style;
  47506. var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionStyle), {}, {
  47507. '--thumb-start-left': thumbStart,
  47508. '--thumb-start-width': toPX(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.width),
  47509. '--thumb-active-left': thumbActive,
  47510. '--thumb-active-width': toPX(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.width),
  47511. '--thumb-start-top': thumbStart,
  47512. '--thumb-start-height': toPX(prevStyle === null || prevStyle === void 0 ? void 0 : prevStyle.height),
  47513. '--thumb-active-top': thumbActive,
  47514. '--thumb-active-height': toPX(nextStyle === null || nextStyle === void 0 ? void 0 : nextStyle.height)
  47515. });
  47516. // It's little ugly which should be refactor when @umi/test update to latest jsdom
  47517. var motionProps = {
  47518. ref: (0,es_ref.composeRef)(thumbRef, ref),
  47519. style: mergedStyle,
  47520. className: classnames_default()("".concat(prefixCls, "-thumb"), motionClassName)
  47521. };
  47522. if (false) // removed by dead control flow
  47523. {}
  47524. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", motionProps);
  47525. });
  47526. }
  47527. ;// ./node_modules/rc-segmented/es/index.js
  47528. var rc_segmented_es_excluded = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
  47529. function getValidTitle(option) {
  47530. if (typeof option.title !== 'undefined') {
  47531. return option.title;
  47532. }
  47533. // read `label` when title is `undefined`
  47534. if ((0,esm_typeof["default"])(option.label) !== 'object') {
  47535. var _option$label;
  47536. return (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toString();
  47537. }
  47538. }
  47539. function normalizeOptions(options) {
  47540. return options.map(function (option) {
  47541. if ((0,esm_typeof["default"])(option) === 'object' && option !== null) {
  47542. var validTitle = getValidTitle(option);
  47543. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, option), {}, {
  47544. title: validTitle
  47545. });
  47546. }
  47547. return {
  47548. label: option === null || option === void 0 ? void 0 : option.toString(),
  47549. title: option === null || option === void 0 ? void 0 : option.toString(),
  47550. value: option
  47551. };
  47552. });
  47553. }
  47554. var InternalSegmentedOption = function InternalSegmentedOption(_ref) {
  47555. var prefixCls = _ref.prefixCls,
  47556. className = _ref.className,
  47557. disabled = _ref.disabled,
  47558. checked = _ref.checked,
  47559. label = _ref.label,
  47560. title = _ref.title,
  47561. value = _ref.value,
  47562. name = _ref.name,
  47563. onChange = _ref.onChange,
  47564. onFocus = _ref.onFocus,
  47565. onBlur = _ref.onBlur,
  47566. onKeyDown = _ref.onKeyDown,
  47567. onKeyUp = _ref.onKeyUp,
  47568. onMouseDown = _ref.onMouseDown;
  47569. var handleChange = function handleChange(event) {
  47570. if (disabled) {
  47571. return;
  47572. }
  47573. onChange(event, value);
  47574. };
  47575. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
  47576. className: classnames_default()(className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-item-disabled"), disabled)),
  47577. onMouseDown: onMouseDown
  47578. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", {
  47579. name: name,
  47580. className: "".concat(prefixCls, "-item-input"),
  47581. type: "radio",
  47582. disabled: disabled,
  47583. checked: checked,
  47584. onChange: handleChange,
  47585. onFocus: onFocus,
  47586. onBlur: onBlur,
  47587. onKeyDown: onKeyDown,
  47588. onKeyUp: onKeyUp
  47589. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  47590. className: "".concat(prefixCls, "-item-label"),
  47591. title: title,
  47592. "aria-selected": checked
  47593. }, label));
  47594. };
  47595. var Segmented = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  47596. var _segmentedOptions$, _classNames2;
  47597. var _props$prefixCls = props.prefixCls,
  47598. prefixCls = _props$prefixCls === void 0 ? 'rc-segmented' : _props$prefixCls,
  47599. direction = props.direction,
  47600. vertical = props.vertical,
  47601. _props$options = props.options,
  47602. options = _props$options === void 0 ? [] : _props$options,
  47603. disabled = props.disabled,
  47604. defaultValue = props.defaultValue,
  47605. value = props.value,
  47606. name = props.name,
  47607. onChange = props.onChange,
  47608. _props$className = props.className,
  47609. className = _props$className === void 0 ? '' : _props$className,
  47610. _props$motionName = props.motionName,
  47611. motionName = _props$motionName === void 0 ? 'thumb-motion' : _props$motionName,
  47612. restProps = (0,objectWithoutProperties["default"])(props, rc_segmented_es_excluded);
  47613. var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  47614. var mergedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  47615. return (0,es_ref.composeRef)(containerRef, ref);
  47616. }, [containerRef, ref]);
  47617. var segmentedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  47618. return normalizeOptions(options);
  47619. }, [options]);
  47620. // Note: We should not auto switch value when value not exist in options
  47621. // which may break single source of truth.
  47622. var _useMergedState = (0,useMergedState["default"])((_segmentedOptions$ = segmentedOptions[0]) === null || _segmentedOptions$ === void 0 ? void 0 : _segmentedOptions$.value, {
  47623. value: value,
  47624. defaultValue: defaultValue
  47625. }),
  47626. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  47627. rawValue = _useMergedState2[0],
  47628. setRawValue = _useMergedState2[1];
  47629. // ======================= Change ========================
  47630. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  47631. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  47632. thumbShow = _React$useState2[0],
  47633. setThumbShow = _React$useState2[1];
  47634. var handleChange = function handleChange(event, val) {
  47635. setRawValue(val);
  47636. onChange === null || onChange === void 0 || onChange(val);
  47637. };
  47638. var divProps = (0,omit["default"])(restProps, ['children']);
  47639. // ======================= Focus ========================
  47640. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  47641. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  47642. isKeyboard = _React$useState4[0],
  47643. setIsKeyboard = _React$useState4[1];
  47644. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  47645. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  47646. isFocused = _React$useState6[0],
  47647. setIsFocused = _React$useState6[1];
  47648. var handleFocus = function handleFocus() {
  47649. setIsFocused(true);
  47650. };
  47651. var handleBlur = function handleBlur() {
  47652. setIsFocused(false);
  47653. };
  47654. var handleMouseDown = function handleMouseDown() {
  47655. setIsKeyboard(false);
  47656. };
  47657. // capture keyboard tab interaction for correct focus style
  47658. var handleKeyUp = function handleKeyUp(event) {
  47659. if (event.key === 'Tab') {
  47660. setIsKeyboard(true);
  47661. }
  47662. };
  47663. // ======================= Keyboard ========================
  47664. var onOffset = function onOffset(offset) {
  47665. var currentIndex = segmentedOptions.findIndex(function (option) {
  47666. return option.value === rawValue;
  47667. });
  47668. var total = segmentedOptions.length;
  47669. var nextIndex = (currentIndex + offset + total) % total;
  47670. var nextOption = segmentedOptions[nextIndex];
  47671. if (nextOption) {
  47672. setRawValue(nextOption.value);
  47673. onChange === null || onChange === void 0 || onChange(nextOption.value);
  47674. }
  47675. };
  47676. var handleKeyDown = function handleKeyDown(event) {
  47677. switch (event.key) {
  47678. case 'ArrowLeft':
  47679. case 'ArrowUp':
  47680. onOffset(-1);
  47681. break;
  47682. case 'ArrowRight':
  47683. case 'ArrowDown':
  47684. onOffset(1);
  47685. break;
  47686. }
  47687. };
  47688. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  47689. role: "radiogroup",
  47690. "aria-label": "segmented control",
  47691. tabIndex: disabled ? undefined : 0
  47692. }, divProps, {
  47693. className: classnames_default()(prefixCls, (_classNames2 = {}, (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-disabled"), disabled), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-vertical"), vertical), _classNames2), className),
  47694. ref: mergedRef
  47695. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  47696. className: "".concat(prefixCls, "-group")
  47697. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MotionThumb, {
  47698. vertical: vertical,
  47699. prefixCls: prefixCls,
  47700. value: rawValue,
  47701. containerRef: containerRef,
  47702. motionName: "".concat(prefixCls, "-").concat(motionName),
  47703. direction: direction,
  47704. getValueIndex: function getValueIndex(val) {
  47705. return segmentedOptions.findIndex(function (n) {
  47706. return n.value === val;
  47707. });
  47708. },
  47709. onMotionStart: function onMotionStart() {
  47710. setThumbShow(true);
  47711. },
  47712. onMotionEnd: function onMotionEnd() {
  47713. setThumbShow(false);
  47714. }
  47715. }), segmentedOptions.map(function (segmentedOption) {
  47716. var _classNames3;
  47717. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalSegmentedOption, (0,esm_extends["default"])({}, segmentedOption, {
  47718. name: name,
  47719. key: segmentedOption.value,
  47720. prefixCls: prefixCls,
  47721. className: classnames_default()(segmentedOption.className, "".concat(prefixCls, "-item"), (_classNames3 = {}, (0,defineProperty["default"])(_classNames3, "".concat(prefixCls, "-item-selected"), segmentedOption.value === rawValue && !thumbShow), (0,defineProperty["default"])(_classNames3, "".concat(prefixCls, "-item-focused"), isFocused && isKeyboard && segmentedOption.value === rawValue), _classNames3)),
  47722. checked: segmentedOption.value === rawValue,
  47723. onChange: handleChange,
  47724. onFocus: handleFocus,
  47725. onBlur: handleBlur,
  47726. onKeyDown: handleKeyDown,
  47727. onKeyUp: handleKeyUp,
  47728. onMouseDown: handleMouseDown,
  47729. disabled: !!disabled || !!segmentedOption.disabled
  47730. }));
  47731. })));
  47732. });
  47733. if (true) {
  47734. Segmented.displayName = 'Segmented';
  47735. }
  47736. var TypedSegmented = Segmented;
  47737. /* harmony default export */ var rc_segmented_es = (TypedSegmented);
  47738. // EXTERNAL MODULE: ./components/segmented/style/index.ts
  47739. var segmented_style = __webpack_require__("./components/segmented/style/index.ts");
  47740. ;// ./components/segmented/index.tsx
  47741. var segmented_rest = undefined && undefined.__rest || function (s, e) {
  47742. var t = {};
  47743. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  47744. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  47745. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  47746. }
  47747. return t;
  47748. };
  47749. function isSegmentedLabeledOptionWithIcon(option) {
  47750. return typeof option === 'object' && !!(option === null || option === void 0 ? void 0 : option.icon);
  47751. }
  47752. const InternalSegmented = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  47753. const defaultName = hooks_useId();
  47754. const {
  47755. prefixCls: customizePrefixCls,
  47756. className,
  47757. rootClassName,
  47758. block,
  47759. options = [],
  47760. size: customSize = 'middle',
  47761. style,
  47762. vertical,
  47763. shape = 'default',
  47764. name = defaultName
  47765. } = props,
  47766. restProps = segmented_rest(props, ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical", "shape", "name"]);
  47767. const {
  47768. getPrefixCls,
  47769. direction,
  47770. className: contextClassName,
  47771. style: contextStyle
  47772. } = (0,config_provider_context.useComponentConfig)('segmented');
  47773. const prefixCls = getPrefixCls('segmented', customizePrefixCls);
  47774. // Style
  47775. const [wrapCSSVar, hashId, cssVarCls] = (0,segmented_style["default"])(prefixCls);
  47776. // ===================== Size =====================
  47777. const mergedSize = (0,useSize["default"])(customSize);
  47778. // syntactic sugar to support `icon` for Segmented Item
  47779. const extendedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => options.map(option => {
  47780. if (isSegmentedLabeledOptionWithIcon(option)) {
  47781. const {
  47782. icon,
  47783. label
  47784. } = option,
  47785. restOption = segmented_rest(option, ["icon", "label"]);
  47786. return Object.assign(Object.assign({}, restOption), {
  47787. label: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  47788. className: `${prefixCls}-item-icon`
  47789. }, icon), label && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, label)))
  47790. });
  47791. }
  47792. return option;
  47793. }), [options, prefixCls]);
  47794. const cls = classnames_default()(className, rootClassName, contextClassName, {
  47795. [`${prefixCls}-block`]: block,
  47796. [`${prefixCls}-sm`]: mergedSize === 'small',
  47797. [`${prefixCls}-lg`]: mergedSize === 'large',
  47798. [`${prefixCls}-vertical`]: vertical,
  47799. [`${prefixCls}-shape-${shape}`]: shape === 'round'
  47800. }, hashId, cssVarCls);
  47801. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  47802. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_segmented_es, Object.assign({}, restProps, {
  47803. name: name,
  47804. className: cls,
  47805. style: mergedStyle,
  47806. options: extendedOptions,
  47807. ref: ref,
  47808. prefixCls: prefixCls,
  47809. direction: direction,
  47810. vertical: vertical
  47811. })));
  47812. });
  47813. const segmented_Segmented = InternalSegmented;
  47814. if (true) {
  47815. segmented_Segmented.displayName = 'Segmented';
  47816. }
  47817. /* harmony default export */ var segmented = (segmented_Segmented);
  47818. ;// ./components/color-picker/context.ts
  47819. const PanelPickerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  47820. const PanelPresetsContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  47821. ;// ./components/color-picker/components/ColorClear.tsx
  47822. const ColorClear = ({
  47823. prefixCls,
  47824. value,
  47825. onChange
  47826. }) => {
  47827. const handleClick = () => {
  47828. if (onChange && value && !value.cleared) {
  47829. const hsba = value.toHsb();
  47830. hsba.a = 0;
  47831. const genColor = (0,util.generateColor)(hsba);
  47832. genColor.cleared = true;
  47833. onChange(genColor);
  47834. }
  47835. };
  47836. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  47837. className: `${prefixCls}-clear`,
  47838. onClick: handleClick
  47839. });
  47840. };
  47841. /* harmony default export */ var components_ColorClear = (ColorClear);
  47842. ;// ./components/color-picker/interface.ts
  47843. const FORMAT_HEX = 'hex';
  47844. const FORMAT_RGB = 'rgb';
  47845. const FORMAT_HSB = 'hsb';
  47846. ;// ./node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js
  47847. // This icon file is generated automatically.
  47848. var UpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
  47849. /* harmony default export */ var asn_UpOutlined = (UpOutlined);
  47850. ;// ./node_modules/@ant-design/icons/es/icons/UpOutlined.js
  47851. // GENERATE BY ./scripts/generate.ts
  47852. // DON NOT EDIT IT MANUALLY
  47853. var UpOutlined_UpOutlined = function UpOutlined(props, ref) {
  47854. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  47855. ref: ref,
  47856. icon: asn_UpOutlined
  47857. }));
  47858. };
  47859. /**![up](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg5MC41IDc1NS4zTDUzNy45IDI2OS4yYy0xMi44LTE3LjYtMzktMTcuNi01MS43IDBMMTMzLjUgNzU1LjNBOCA4IDAgMDAxNDAgNzY4aDc1YzUuMSAwIDkuOS0yLjUgMTIuOS02LjZMNTEyIDM2OS44bDI4NC4xIDM5MS42YzMgNC4xIDcuOCA2LjYgMTIuOSA2LjZoNzVjNi41IDAgMTAuMy03LjQgNi41LTEyLjd6IiAvPjwvc3ZnPg==) */
  47860. var UpOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(UpOutlined_UpOutlined);
  47861. if (true) {
  47862. UpOutlined_RefIcon.displayName = 'UpOutlined';
  47863. }
  47864. /* harmony default export */ var icons_UpOutlined = (UpOutlined_RefIcon);
  47865. ;// ./node_modules/@rc-component/mini-decimal/es/supportUtil.js
  47866. function supportBigInt() {
  47867. return typeof BigInt === 'function';
  47868. }
  47869. ;// ./node_modules/@rc-component/mini-decimal/es/numberUtil.js
  47870. function isEmpty(value) {
  47871. return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
  47872. }
  47873. /**
  47874. * Format string number to readable number
  47875. */
  47876. function trimNumber(numStr) {
  47877. var str = numStr.trim();
  47878. var negative = str.startsWith('-');
  47879. if (negative) {
  47880. str = str.slice(1);
  47881. }
  47882. str = str
  47883. // Remove decimal 0. `1.000` => `1.`, `1.100` => `1.1`
  47884. .replace(/(\.\d*[^0])0*$/, '$1')
  47885. // Remove useless decimal. `1.` => `1`
  47886. .replace(/\.0*$/, '')
  47887. // Remove integer 0. `0001` => `1`, 000.1' => `.1`
  47888. .replace(/^0+/, '');
  47889. if (str.startsWith('.')) {
  47890. str = "0".concat(str);
  47891. }
  47892. var trimStr = str || '0';
  47893. var splitNumber = trimStr.split('.');
  47894. var integerStr = splitNumber[0] || '0';
  47895. var decimalStr = splitNumber[1] || '0';
  47896. if (integerStr === '0' && decimalStr === '0') {
  47897. negative = false;
  47898. }
  47899. var negativeStr = negative ? '-' : '';
  47900. return {
  47901. negative: negative,
  47902. negativeStr: negativeStr,
  47903. trimStr: trimStr,
  47904. integerStr: integerStr,
  47905. decimalStr: decimalStr,
  47906. fullStr: "".concat(negativeStr).concat(trimStr)
  47907. };
  47908. }
  47909. function isE(number) {
  47910. var str = String(number);
  47911. return !Number.isNaN(Number(str)) && str.includes('e');
  47912. }
  47913. /**
  47914. * [Legacy] Convert 1e-9 to 0.000000001.
  47915. * This may lose some precision if user really want 1e-9.
  47916. */
  47917. function getNumberPrecision(number) {
  47918. var numStr = String(number);
  47919. if (isE(number)) {
  47920. var precision = Number(numStr.slice(numStr.indexOf('e-') + 2));
  47921. var decimalMatch = numStr.match(/\.(\d+)/);
  47922. if (decimalMatch !== null && decimalMatch !== void 0 && decimalMatch[1]) {
  47923. precision += decimalMatch[1].length;
  47924. }
  47925. return precision;
  47926. }
  47927. return numStr.includes('.') && validateNumber(numStr) ? numStr.length - numStr.indexOf('.') - 1 : 0;
  47928. }
  47929. /**
  47930. * Convert number (includes scientific notation) to -xxx.yyy format
  47931. */
  47932. function num2str(number) {
  47933. var numStr = String(number);
  47934. if (isE(number)) {
  47935. if (number > Number.MAX_SAFE_INTEGER) {
  47936. return String(supportBigInt() ? BigInt(number).toString() : Number.MAX_SAFE_INTEGER);
  47937. }
  47938. if (number < Number.MIN_SAFE_INTEGER) {
  47939. return String(supportBigInt() ? BigInt(number).toString() : Number.MIN_SAFE_INTEGER);
  47940. }
  47941. numStr = number.toFixed(getNumberPrecision(numStr));
  47942. }
  47943. return trimNumber(numStr).fullStr;
  47944. }
  47945. function validateNumber(num) {
  47946. if (typeof num === 'number') {
  47947. return !Number.isNaN(num);
  47948. }
  47949. // Empty
  47950. if (!num) {
  47951. return false;
  47952. }
  47953. return (
  47954. // Normal type: 11.28
  47955. /^\s*-?\d+(\.\d+)?\s*$/.test(num) ||
  47956. // Pre-number: 1.
  47957. /^\s*-?\d+\.\s*$/.test(num) ||
  47958. // Post-number: .1
  47959. /^\s*-?\.\d+\s*$/.test(num)
  47960. );
  47961. }
  47962. ;// ./node_modules/@rc-component/mini-decimal/es/BigIntDecimal.js
  47963. var BigIntDecimal = /*#__PURE__*/function () {
  47964. /** BigInt will convert `0009` to `9`. We need record the len of decimal */
  47965. function BigIntDecimal(value) {
  47966. (0,classCallCheck["default"])(this, BigIntDecimal);
  47967. (0,defineProperty["default"])(this, "origin", '');
  47968. (0,defineProperty["default"])(this, "negative", void 0);
  47969. (0,defineProperty["default"])(this, "integer", void 0);
  47970. (0,defineProperty["default"])(this, "decimal", void 0);
  47971. (0,defineProperty["default"])(this, "decimalLen", void 0);
  47972. (0,defineProperty["default"])(this, "empty", void 0);
  47973. (0,defineProperty["default"])(this, "nan", void 0);
  47974. if (isEmpty(value)) {
  47975. this.empty = true;
  47976. return;
  47977. }
  47978. this.origin = String(value);
  47979. // Act like Number convert
  47980. if (value === '-' || Number.isNaN(value)) {
  47981. this.nan = true;
  47982. return;
  47983. }
  47984. var mergedValue = value;
  47985. // We need convert back to Number since it require `toFixed` to handle this
  47986. if (isE(mergedValue)) {
  47987. mergedValue = Number(mergedValue);
  47988. }
  47989. mergedValue = typeof mergedValue === 'string' ? mergedValue : num2str(mergedValue);
  47990. if (validateNumber(mergedValue)) {
  47991. var trimRet = trimNumber(mergedValue);
  47992. this.negative = trimRet.negative;
  47993. var numbers = trimRet.trimStr.split('.');
  47994. this.integer = BigInt(numbers[0]);
  47995. var decimalStr = numbers[1] || '0';
  47996. this.decimal = BigInt(decimalStr);
  47997. this.decimalLen = decimalStr.length;
  47998. } else {
  47999. this.nan = true;
  48000. }
  48001. }
  48002. (0,createClass["default"])(BigIntDecimal, [{
  48003. key: "getMark",
  48004. value: function getMark() {
  48005. return this.negative ? '-' : '';
  48006. }
  48007. }, {
  48008. key: "getIntegerStr",
  48009. value: function getIntegerStr() {
  48010. return this.integer.toString();
  48011. }
  48012. /**
  48013. * @private get decimal string
  48014. */
  48015. }, {
  48016. key: "getDecimalStr",
  48017. value: function getDecimalStr() {
  48018. return this.decimal.toString().padStart(this.decimalLen, '0');
  48019. }
  48020. /**
  48021. * @private Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
  48022. * This is used for add function only.
  48023. */
  48024. }, {
  48025. key: "alignDecimal",
  48026. value: function alignDecimal(decimalLength) {
  48027. var str = "".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(decimalLength, '0'));
  48028. return BigInt(str);
  48029. }
  48030. }, {
  48031. key: "negate",
  48032. value: function negate() {
  48033. var clone = new BigIntDecimal(this.toString());
  48034. clone.negative = !clone.negative;
  48035. return clone;
  48036. }
  48037. }, {
  48038. key: "cal",
  48039. value: function cal(offset, calculator, calDecimalLen) {
  48040. var maxDecimalLength = Math.max(this.getDecimalStr().length, offset.getDecimalStr().length);
  48041. var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
  48042. var offsetAlignedDecimal = offset.alignDecimal(maxDecimalLength);
  48043. var valueStr = calculator(myAlignedDecimal, offsetAlignedDecimal).toString();
  48044. var nextDecimalLength = calDecimalLen(maxDecimalLength);
  48045. // We need fill string length back to `maxDecimalLength` to avoid parser failed
  48046. var _trimNumber = trimNumber(valueStr),
  48047. negativeStr = _trimNumber.negativeStr,
  48048. trimStr = _trimNumber.trimStr;
  48049. var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(nextDecimalLength + 1, '0'));
  48050. return new BigIntDecimal("".concat(hydrateValueStr.slice(0, -nextDecimalLength), ".").concat(hydrateValueStr.slice(-nextDecimalLength)));
  48051. }
  48052. }, {
  48053. key: "add",
  48054. value: function add(value) {
  48055. if (this.isInvalidate()) {
  48056. return new BigIntDecimal(value);
  48057. }
  48058. var offset = new BigIntDecimal(value);
  48059. if (offset.isInvalidate()) {
  48060. return this;
  48061. }
  48062. return this.cal(offset, function (num1, num2) {
  48063. return num1 + num2;
  48064. }, function (len) {
  48065. return len;
  48066. });
  48067. }
  48068. }, {
  48069. key: "multi",
  48070. value: function multi(value) {
  48071. var target = new BigIntDecimal(value);
  48072. if (this.isInvalidate() || target.isInvalidate()) {
  48073. return new BigIntDecimal(NaN);
  48074. }
  48075. return this.cal(target, function (num1, num2) {
  48076. return num1 * num2;
  48077. }, function (len) {
  48078. return len * 2;
  48079. });
  48080. }
  48081. }, {
  48082. key: "isEmpty",
  48083. value: function isEmpty() {
  48084. return this.empty;
  48085. }
  48086. }, {
  48087. key: "isNaN",
  48088. value: function isNaN() {
  48089. return this.nan;
  48090. }
  48091. }, {
  48092. key: "isInvalidate",
  48093. value: function isInvalidate() {
  48094. return this.isEmpty() || this.isNaN();
  48095. }
  48096. }, {
  48097. key: "equals",
  48098. value: function equals(target) {
  48099. return this.toString() === (target === null || target === void 0 ? void 0 : target.toString());
  48100. }
  48101. }, {
  48102. key: "lessEquals",
  48103. value: function lessEquals(target) {
  48104. return this.add(target.negate().toString()).toNumber() <= 0;
  48105. }
  48106. }, {
  48107. key: "toNumber",
  48108. value: function toNumber() {
  48109. if (this.isNaN()) {
  48110. return NaN;
  48111. }
  48112. return Number(this.toString());
  48113. }
  48114. }, {
  48115. key: "toString",
  48116. value: function toString() {
  48117. var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  48118. if (!safe) {
  48119. return this.origin;
  48120. }
  48121. if (this.isInvalidate()) {
  48122. return '';
  48123. }
  48124. return trimNumber("".concat(this.getMark()).concat(this.getIntegerStr(), ".").concat(this.getDecimalStr())).fullStr;
  48125. }
  48126. }]);
  48127. return BigIntDecimal;
  48128. }();
  48129. ;// ./node_modules/@rc-component/mini-decimal/es/NumberDecimal.js
  48130. /**
  48131. * We can remove this when IE not support anymore
  48132. */
  48133. var NumberDecimal = /*#__PURE__*/function () {
  48134. function NumberDecimal(value) {
  48135. (0,classCallCheck["default"])(this, NumberDecimal);
  48136. (0,defineProperty["default"])(this, "origin", '');
  48137. (0,defineProperty["default"])(this, "number", void 0);
  48138. (0,defineProperty["default"])(this, "empty", void 0);
  48139. if (isEmpty(value)) {
  48140. this.empty = true;
  48141. return;
  48142. }
  48143. this.origin = String(value);
  48144. this.number = Number(value);
  48145. }
  48146. (0,createClass["default"])(NumberDecimal, [{
  48147. key: "negate",
  48148. value: function negate() {
  48149. return new NumberDecimal(-this.toNumber());
  48150. }
  48151. }, {
  48152. key: "add",
  48153. value: function add(value) {
  48154. if (this.isInvalidate()) {
  48155. return new NumberDecimal(value);
  48156. }
  48157. var target = Number(value);
  48158. if (Number.isNaN(target)) {
  48159. return this;
  48160. }
  48161. var number = this.number + target;
  48162. // [Legacy] Back to safe integer
  48163. if (number > Number.MAX_SAFE_INTEGER) {
  48164. return new NumberDecimal(Number.MAX_SAFE_INTEGER);
  48165. }
  48166. if (number < Number.MIN_SAFE_INTEGER) {
  48167. return new NumberDecimal(Number.MIN_SAFE_INTEGER);
  48168. }
  48169. var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
  48170. return new NumberDecimal(number.toFixed(maxPrecision));
  48171. }
  48172. }, {
  48173. key: "multi",
  48174. value: function multi(value) {
  48175. var target = Number(value);
  48176. if (this.isInvalidate() || Number.isNaN(target)) {
  48177. return new NumberDecimal(NaN);
  48178. }
  48179. var number = this.number * target;
  48180. // [Legacy] Back to safe integer
  48181. if (number > Number.MAX_SAFE_INTEGER) {
  48182. return new NumberDecimal(Number.MAX_SAFE_INTEGER);
  48183. }
  48184. if (number < Number.MIN_SAFE_INTEGER) {
  48185. return new NumberDecimal(Number.MIN_SAFE_INTEGER);
  48186. }
  48187. var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
  48188. return new NumberDecimal(number.toFixed(maxPrecision));
  48189. }
  48190. }, {
  48191. key: "isEmpty",
  48192. value: function isEmpty() {
  48193. return this.empty;
  48194. }
  48195. }, {
  48196. key: "isNaN",
  48197. value: function isNaN() {
  48198. return Number.isNaN(this.number);
  48199. }
  48200. }, {
  48201. key: "isInvalidate",
  48202. value: function isInvalidate() {
  48203. return this.isEmpty() || this.isNaN();
  48204. }
  48205. }, {
  48206. key: "equals",
  48207. value: function equals(target) {
  48208. return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
  48209. }
  48210. }, {
  48211. key: "lessEquals",
  48212. value: function lessEquals(target) {
  48213. return this.add(target.negate().toString()).toNumber() <= 0;
  48214. }
  48215. }, {
  48216. key: "toNumber",
  48217. value: function toNumber() {
  48218. return this.number;
  48219. }
  48220. }, {
  48221. key: "toString",
  48222. value: function toString() {
  48223. var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  48224. if (!safe) {
  48225. return this.origin;
  48226. }
  48227. if (this.isInvalidate()) {
  48228. return '';
  48229. }
  48230. return num2str(this.number);
  48231. }
  48232. }]);
  48233. return NumberDecimal;
  48234. }();
  48235. ;// ./node_modules/@rc-component/mini-decimal/es/MiniDecimal.js
  48236. /* eslint-disable max-classes-per-file */
  48237. // Still support origin export
  48238. function getMiniDecimal(value) {
  48239. // We use BigInt here.
  48240. // Will fallback to Number if not support.
  48241. if (supportBigInt()) {
  48242. return new BigIntDecimal(value);
  48243. }
  48244. return new NumberDecimal(value);
  48245. }
  48246. /**
  48247. * Align the logic of toFixed to around like 1.5 => 2.
  48248. * If set `cutOnly`, will just remove the over decimal part.
  48249. */
  48250. function toFixed(numStr, separatorStr, precision) {
  48251. var cutOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  48252. if (numStr === '') {
  48253. return '';
  48254. }
  48255. var _trimNumber = trimNumber(numStr),
  48256. negativeStr = _trimNumber.negativeStr,
  48257. integerStr = _trimNumber.integerStr,
  48258. decimalStr = _trimNumber.decimalStr;
  48259. var precisionDecimalStr = "".concat(separatorStr).concat(decimalStr);
  48260. var numberWithoutDecimal = "".concat(negativeStr).concat(integerStr);
  48261. if (precision >= 0) {
  48262. // We will get last + 1 number to check if need advanced number
  48263. var advancedNum = Number(decimalStr[precision]);
  48264. if (advancedNum >= 5 && !cutOnly) {
  48265. var advancedDecimal = getMiniDecimal(numStr).add("".concat(negativeStr, "0.").concat('0'.repeat(precision)).concat(10 - advancedNum));
  48266. return toFixed(advancedDecimal.toString(), separatorStr, precision, cutOnly);
  48267. }
  48268. if (precision === 0) {
  48269. return numberWithoutDecimal;
  48270. }
  48271. return "".concat(numberWithoutDecimal).concat(separatorStr).concat(decimalStr.padEnd(precision, '0').slice(0, precision));
  48272. }
  48273. if (precisionDecimalStr === '.0') {
  48274. return numberWithoutDecimal;
  48275. }
  48276. return "".concat(numberWithoutDecimal).concat(precisionDecimalStr);
  48277. }
  48278. ;// ./node_modules/@rc-component/mini-decimal/es/index.js
  48279. /* harmony default export */ var mini_decimal_es = (getMiniDecimal);
  48280. ;// ./node_modules/rc-input/es/utils/commonUtils.js
  48281. function hasAddon(props) {
  48282. return !!(props.addonBefore || props.addonAfter);
  48283. }
  48284. function hasPrefixSuffix(props) {
  48285. return !!(props.prefix || props.suffix || props.allowClear);
  48286. }
  48287. // TODO: It's better to use `Proxy` replace the `element.value`. But we still need support IE11.
  48288. function cloneEvent(event, target, value) {
  48289. // A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
  48290. // As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
  48291. // https://bugs.webkit.org/show_bug.cgi?id=28123
  48292. var currentTarget = target.cloneNode(true);
  48293. // click clear icon
  48294. var newEvent = Object.create(event, {
  48295. target: {
  48296. value: currentTarget
  48297. },
  48298. currentTarget: {
  48299. value: currentTarget
  48300. }
  48301. });
  48302. // Fill data
  48303. currentTarget.value = value;
  48304. // Fill selection. Some type like `email` not support selection
  48305. // https://github.com/ant-design/ant-design/issues/47833
  48306. if (typeof target.selectionStart === 'number' && typeof target.selectionEnd === 'number') {
  48307. currentTarget.selectionStart = target.selectionStart;
  48308. currentTarget.selectionEnd = target.selectionEnd;
  48309. }
  48310. currentTarget.setSelectionRange = function () {
  48311. target.setSelectionRange.apply(target, arguments);
  48312. };
  48313. return newEvent;
  48314. }
  48315. function resolveOnChange(target, e, onChange, targetValue) {
  48316. if (!onChange) {
  48317. return;
  48318. }
  48319. var event = e;
  48320. if (e.type === 'click') {
  48321. // Clone a new target for event.
  48322. // Avoid the following usage, the setQuery method gets the original value.
  48323. //
  48324. // const [query, setQuery] = React.useState('');
  48325. // <Input
  48326. // allowClear
  48327. // value={query}
  48328. // onChange={(e)=> {
  48329. // setQuery((prevStatus) => e.target.value);
  48330. // }}
  48331. // />
  48332. event = cloneEvent(e, target, '');
  48333. onChange(event);
  48334. return;
  48335. }
  48336. // Trigger by composition event, this means we need force change the input value
  48337. // https://github.com/ant-design/ant-design/issues/45737
  48338. // https://github.com/ant-design/ant-design/issues/46598
  48339. if (target.type !== 'file' && targetValue !== undefined) {
  48340. event = cloneEvent(e, target, targetValue);
  48341. onChange(event);
  48342. return;
  48343. }
  48344. onChange(event);
  48345. }
  48346. function triggerFocus(element, option) {
  48347. if (!element) return;
  48348. element.focus(option);
  48349. // Selection content
  48350. var _ref = option || {},
  48351. cursor = _ref.cursor;
  48352. if (cursor) {
  48353. var len = element.value.length;
  48354. switch (cursor) {
  48355. case 'start':
  48356. element.setSelectionRange(0, 0);
  48357. break;
  48358. case 'end':
  48359. element.setSelectionRange(len, len);
  48360. break;
  48361. default:
  48362. element.setSelectionRange(0, len);
  48363. }
  48364. }
  48365. }
  48366. ;// ./node_modules/rc-input/es/BaseInput.js
  48367. var BaseInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
  48368. var _props, _props2, _props3;
  48369. var inputEl = props.inputElement,
  48370. children = props.children,
  48371. prefixCls = props.prefixCls,
  48372. prefix = props.prefix,
  48373. suffix = props.suffix,
  48374. addonBefore = props.addonBefore,
  48375. addonAfter = props.addonAfter,
  48376. className = props.className,
  48377. style = props.style,
  48378. disabled = props.disabled,
  48379. readOnly = props.readOnly,
  48380. focused = props.focused,
  48381. triggerFocus = props.triggerFocus,
  48382. allowClear = props.allowClear,
  48383. value = props.value,
  48384. handleReset = props.handleReset,
  48385. hidden = props.hidden,
  48386. classes = props.classes,
  48387. classNames = props.classNames,
  48388. dataAttrs = props.dataAttrs,
  48389. styles = props.styles,
  48390. components = props.components,
  48391. onClear = props.onClear;
  48392. var inputElement = children !== null && children !== void 0 ? children : inputEl;
  48393. var AffixWrapperComponent = (components === null || components === void 0 ? void 0 : components.affixWrapper) || 'span';
  48394. var GroupWrapperComponent = (components === null || components === void 0 ? void 0 : components.groupWrapper) || 'span';
  48395. var WrapperComponent = (components === null || components === void 0 ? void 0 : components.wrapper) || 'span';
  48396. var GroupAddonComponent = (components === null || components === void 0 ? void 0 : components.groupAddon) || 'span';
  48397. var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  48398. var onInputClick = function onInputClick(e) {
  48399. var _containerRef$current;
  48400. if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {
  48401. triggerFocus === null || triggerFocus === void 0 || triggerFocus();
  48402. }
  48403. };
  48404. var hasAffix = hasPrefixSuffix(props);
  48405. var element = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inputElement, {
  48406. value: value,
  48407. className: classnames_default()((_props = inputElement.props) === null || _props === void 0 ? void 0 : _props.className, !hasAffix && (classNames === null || classNames === void 0 ? void 0 : classNames.variant)) || null
  48408. });
  48409. // ======================== Ref ======================== //
  48410. var groupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  48411. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
  48412. return {
  48413. nativeElement: groupRef.current || containerRef.current
  48414. };
  48415. });
  48416. // ================== Prefix & Suffix ================== //
  48417. if (hasAffix) {
  48418. // ================== Clear Icon ================== //
  48419. var clearIcon = null;
  48420. if (allowClear) {
  48421. var needClear = !disabled && !readOnly && value;
  48422. var clearIconCls = "".concat(prefixCls, "-clear-icon");
  48423. var iconNode = (0,esm_typeof["default"])(allowClear) === 'object' && allowClear !== null && allowClear !== void 0 && allowClear.clearIcon ? allowClear.clearIcon : '✖';
  48424. clearIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
  48425. type: "button",
  48426. tabIndex: -1,
  48427. onClick: function onClick(event) {
  48428. handleReset === null || handleReset === void 0 || handleReset(event);
  48429. onClear === null || onClear === void 0 || onClear();
  48430. }
  48431. // Do not trigger onBlur when clear input
  48432. // https://github.com/ant-design/ant-design/issues/31200
  48433. ,
  48434. onMouseDown: function onMouseDown(e) {
  48435. return e.preventDefault();
  48436. },
  48437. className: classnames_default()(clearIconCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(clearIconCls, "-hidden"), !needClear), "".concat(clearIconCls, "-has-suffix"), !!suffix))
  48438. }, iconNode);
  48439. }
  48440. var affixWrapperPrefixCls = "".concat(prefixCls, "-affix-wrapper");
  48441. var affixWrapperCls = classnames_default()(affixWrapperPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(affixWrapperPrefixCls, "-disabled"), disabled), "".concat(affixWrapperPrefixCls, "-focused"), focused), "".concat(affixWrapperPrefixCls, "-readonly"), readOnly), "".concat(affixWrapperPrefixCls, "-input-with-clear-btn"), suffix && allowClear && value), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.variant);
  48442. var suffixNode = (suffix || allowClear) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  48443. className: classnames_default()("".concat(prefixCls, "-suffix"), classNames === null || classNames === void 0 ? void 0 : classNames.suffix),
  48444. style: styles === null || styles === void 0 ? void 0 : styles.suffix
  48445. }, clearIcon, suffix);
  48446. element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AffixWrapperComponent, (0,esm_extends["default"])({
  48447. className: affixWrapperCls,
  48448. style: styles === null || styles === void 0 ? void 0 : styles.affixWrapper,
  48449. onClick: onInputClick
  48450. }, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.affixWrapper, {
  48451. ref: containerRef
  48452. }), prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  48453. className: classnames_default()("".concat(prefixCls, "-prefix"), classNames === null || classNames === void 0 ? void 0 : classNames.prefix),
  48454. style: styles === null || styles === void 0 ? void 0 : styles.prefix
  48455. }, prefix), element, suffixNode);
  48456. }
  48457. // ================== Addon ================== //
  48458. if (hasAddon(props)) {
  48459. var wrapperCls = "".concat(prefixCls, "-group");
  48460. var addonCls = "".concat(wrapperCls, "-addon");
  48461. var groupWrapperCls = "".concat(wrapperCls, "-wrapper");
  48462. var mergedWrapperClassName = classnames_default()("".concat(prefixCls, "-wrapper"), wrapperCls, classes === null || classes === void 0 ? void 0 : classes.wrapper, classNames === null || classNames === void 0 ? void 0 : classNames.wrapper);
  48463. var mergedGroupClassName = classnames_default()(groupWrapperCls, (0,defineProperty["default"])({}, "".concat(groupWrapperCls, "-disabled"), disabled), classes === null || classes === void 0 ? void 0 : classes.group, classNames === null || classNames === void 0 ? void 0 : classNames.groupWrapper);
  48464. // Need another wrapper for changing display:table to display:inline-block
  48465. // and put style prop in wrapper
  48466. element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GroupWrapperComponent, {
  48467. className: mergedGroupClassName,
  48468. ref: groupRef
  48469. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(WrapperComponent, {
  48470. className: mergedWrapperClassName
  48471. }, addonBefore && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GroupAddonComponent, {
  48472. className: addonCls
  48473. }, addonBefore), element, addonAfter && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GroupAddonComponent, {
  48474. className: addonCls
  48475. }, addonAfter)));
  48476. }
  48477. // `className` and `style` are always on the root element
  48478. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(element, {
  48479. className: classnames_default()((_props2 = element.props) === null || _props2 === void 0 ? void 0 : _props2.className, className) || null,
  48480. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, (_props3 = element.props) === null || _props3 === void 0 ? void 0 : _props3.style), style),
  48481. hidden: hidden
  48482. });
  48483. });
  48484. /* harmony default export */ var es_BaseInput = (BaseInput);
  48485. ;// ./node_modules/rc-input/es/hooks/useCount.js
  48486. var useCount_excluded = ["show"];
  48487. /**
  48488. * Cut `value` by the `count.max` prop.
  48489. */
  48490. function inCountRange(value, countConfig) {
  48491. if (!countConfig.max) {
  48492. return true;
  48493. }
  48494. var count = countConfig.strategy(value);
  48495. return count <= countConfig.max;
  48496. }
  48497. function useCount(count, showCount) {
  48498. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  48499. var mergedConfig = {};
  48500. if (showCount) {
  48501. mergedConfig.show = (0,esm_typeof["default"])(showCount) === 'object' && showCount.formatter ? showCount.formatter : !!showCount;
  48502. }
  48503. mergedConfig = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedConfig), count);
  48504. var _ref = mergedConfig,
  48505. show = _ref.show,
  48506. rest = (0,objectWithoutProperties["default"])(_ref, useCount_excluded);
  48507. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rest), {}, {
  48508. show: !!show,
  48509. showFormatter: typeof show === 'function' ? show : undefined,
  48510. strategy: rest.strategy || function (value) {
  48511. return value.length;
  48512. }
  48513. });
  48514. }, [count, showCount]);
  48515. }
  48516. ;// ./node_modules/rc-input/es/Input.js
  48517. var es_Input_excluded = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "onKeyUp", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"];
  48518. var es_Input_Input = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
  48519. var autoComplete = props.autoComplete,
  48520. onChange = props.onChange,
  48521. onFocus = props.onFocus,
  48522. onBlur = props.onBlur,
  48523. onPressEnter = props.onPressEnter,
  48524. onKeyDown = props.onKeyDown,
  48525. onKeyUp = props.onKeyUp,
  48526. _props$prefixCls = props.prefixCls,
  48527. prefixCls = _props$prefixCls === void 0 ? 'rc-input' : _props$prefixCls,
  48528. disabled = props.disabled,
  48529. htmlSize = props.htmlSize,
  48530. className = props.className,
  48531. maxLength = props.maxLength,
  48532. suffix = props.suffix,
  48533. showCount = props.showCount,
  48534. count = props.count,
  48535. _props$type = props.type,
  48536. type = _props$type === void 0 ? 'text' : _props$type,
  48537. classes = props.classes,
  48538. classNames = props.classNames,
  48539. styles = props.styles,
  48540. _onCompositionStart = props.onCompositionStart,
  48541. onCompositionEnd = props.onCompositionEnd,
  48542. rest = (0,objectWithoutProperties["default"])(props, es_Input_excluded);
  48543. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  48544. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  48545. focused = _useState2[0],
  48546. setFocused = _useState2[1];
  48547. var compositionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  48548. var keyLockRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  48549. var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  48550. var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  48551. var focus = function focus(option) {
  48552. if (inputRef.current) {
  48553. triggerFocus(inputRef.current, option);
  48554. }
  48555. };
  48556. // ====================== Value =======================
  48557. var _useMergedState = (0,useMergedState["default"])(props.defaultValue, {
  48558. value: props.value
  48559. }),
  48560. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  48561. value = _useMergedState2[0],
  48562. setValue = _useMergedState2[1];
  48563. var formatValue = value === undefined || value === null ? '' : String(value);
  48564. // =================== Select Range ===================
  48565. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  48566. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  48567. selection = _useState4[0],
  48568. setSelection = _useState4[1];
  48569. // ====================== Count =======================
  48570. var countConfig = useCount(count, showCount);
  48571. var mergedMax = countConfig.max || maxLength;
  48572. var valueLength = countConfig.strategy(formatValue);
  48573. var isOutOfRange = !!mergedMax && valueLength > mergedMax;
  48574. // ======================= Ref ========================
  48575. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
  48576. var _holderRef$current;
  48577. return {
  48578. focus: focus,
  48579. blur: function blur() {
  48580. var _inputRef$current;
  48581. (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
  48582. },
  48583. setSelectionRange: function setSelectionRange(start, end, direction) {
  48584. var _inputRef$current2;
  48585. (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.setSelectionRange(start, end, direction);
  48586. },
  48587. select: function select() {
  48588. var _inputRef$current3;
  48589. (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
  48590. },
  48591. input: inputRef.current,
  48592. nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || inputRef.current
  48593. };
  48594. });
  48595. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  48596. if (keyLockRef.current) {
  48597. keyLockRef.current = false;
  48598. }
  48599. setFocused(function (prev) {
  48600. return prev && disabled ? false : prev;
  48601. });
  48602. }, [disabled]);
  48603. var triggerChange = function triggerChange(e, currentValue, info) {
  48604. var cutValue = currentValue;
  48605. if (!compositionRef.current && countConfig.exceedFormatter && countConfig.max && countConfig.strategy(currentValue) > countConfig.max) {
  48606. cutValue = countConfig.exceedFormatter(currentValue, {
  48607. max: countConfig.max
  48608. });
  48609. if (currentValue !== cutValue) {
  48610. var _inputRef$current4, _inputRef$current5;
  48611. setSelection([((_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.selectionStart) || 0, ((_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.selectionEnd) || 0]);
  48612. }
  48613. } else if (info.source === 'compositionEnd') {
  48614. // Avoid triggering twice
  48615. // https://github.com/ant-design/ant-design/issues/46587
  48616. return;
  48617. }
  48618. setValue(cutValue);
  48619. if (inputRef.current) {
  48620. resolveOnChange(inputRef.current, e, onChange, cutValue);
  48621. }
  48622. };
  48623. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  48624. if (selection) {
  48625. var _inputRef$current6;
  48626. (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 || _inputRef$current6.setSelectionRange.apply(_inputRef$current6, (0,toConsumableArray["default"])(selection));
  48627. }
  48628. }, [selection]);
  48629. var onInternalChange = function onInternalChange(e) {
  48630. triggerChange(e, e.target.value, {
  48631. source: 'change'
  48632. });
  48633. };
  48634. var onInternalCompositionEnd = function onInternalCompositionEnd(e) {
  48635. compositionRef.current = false;
  48636. triggerChange(e, e.currentTarget.value, {
  48637. source: 'compositionEnd'
  48638. });
  48639. onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
  48640. };
  48641. var handleKeyDown = function handleKeyDown(e) {
  48642. if (onPressEnter && e.key === 'Enter' && !keyLockRef.current) {
  48643. keyLockRef.current = true;
  48644. onPressEnter(e);
  48645. }
  48646. onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
  48647. };
  48648. var handleKeyUp = function handleKeyUp(e) {
  48649. if (e.key === 'Enter') {
  48650. keyLockRef.current = false;
  48651. }
  48652. onKeyUp === null || onKeyUp === void 0 || onKeyUp(e);
  48653. };
  48654. var handleFocus = function handleFocus(e) {
  48655. setFocused(true);
  48656. onFocus === null || onFocus === void 0 || onFocus(e);
  48657. };
  48658. var handleBlur = function handleBlur(e) {
  48659. if (keyLockRef.current) {
  48660. keyLockRef.current = false;
  48661. }
  48662. setFocused(false);
  48663. onBlur === null || onBlur === void 0 || onBlur(e);
  48664. };
  48665. var handleReset = function handleReset(e) {
  48666. setValue('');
  48667. focus();
  48668. if (inputRef.current) {
  48669. resolveOnChange(inputRef.current, e, onChange);
  48670. }
  48671. };
  48672. // ====================== Input =======================
  48673. var outOfRangeCls = isOutOfRange && "".concat(prefixCls, "-out-of-range");
  48674. var getInputElement = function getInputElement() {
  48675. // Fix https://fb.me/react-unknown-prop
  48676. var otherProps = (0,omit["default"])(props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear',
  48677. // Input elements must be either controlled or uncontrolled,
  48678. // specify either the value prop, or the defaultValue prop, but not both.
  48679. 'defaultValue', 'showCount', 'count', 'classes', 'htmlSize', 'styles', 'classNames', 'onClear']);
  48680. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", (0,esm_extends["default"])({
  48681. autoComplete: autoComplete
  48682. }, otherProps, {
  48683. onChange: onInternalChange,
  48684. onFocus: handleFocus,
  48685. onBlur: handleBlur,
  48686. onKeyDown: handleKeyDown,
  48687. onKeyUp: handleKeyUp,
  48688. className: classnames_default()(prefixCls, (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), classNames === null || classNames === void 0 ? void 0 : classNames.input),
  48689. style: styles === null || styles === void 0 ? void 0 : styles.input,
  48690. ref: inputRef,
  48691. size: htmlSize,
  48692. type: type,
  48693. onCompositionStart: function onCompositionStart(e) {
  48694. compositionRef.current = true;
  48695. _onCompositionStart === null || _onCompositionStart === void 0 || _onCompositionStart(e);
  48696. },
  48697. onCompositionEnd: onInternalCompositionEnd
  48698. }));
  48699. };
  48700. var getSuffix = function getSuffix() {
  48701. // Max length value
  48702. var hasMaxLength = Number(mergedMax) > 0;
  48703. if (suffix || countConfig.show) {
  48704. var dataCount = countConfig.showFormatter ? countConfig.showFormatter({
  48705. value: formatValue,
  48706. count: valueLength,
  48707. maxLength: mergedMax
  48708. }) : "".concat(valueLength).concat(hasMaxLength ? " / ".concat(mergedMax) : '');
  48709. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, countConfig.show && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  48710. className: classnames_default()("".concat(prefixCls, "-show-count-suffix"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-show-count-has-suffix"), !!suffix), classNames === null || classNames === void 0 ? void 0 : classNames.count),
  48711. style: (0,objectSpread2["default"])({}, styles === null || styles === void 0 ? void 0 : styles.count)
  48712. }, dataCount), suffix);
  48713. }
  48714. return null;
  48715. };
  48716. // ====================== Render ======================
  48717. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_BaseInput, (0,esm_extends["default"])({}, rest, {
  48718. prefixCls: prefixCls,
  48719. className: classnames_default()(className, outOfRangeCls),
  48720. handleReset: handleReset,
  48721. value: formatValue,
  48722. focused: focused,
  48723. triggerFocus: focus,
  48724. suffix: getSuffix(),
  48725. disabled: disabled,
  48726. classes: classes,
  48727. classNames: classNames,
  48728. styles: styles,
  48729. ref: holderRef
  48730. }), getInputElement());
  48731. });
  48732. /* harmony default export */ var es_Input = (es_Input_Input);
  48733. ;// ./node_modules/rc-input/es/index.js
  48734. /* harmony default export */ var rc_input_es = (es_Input);
  48735. ;// ./node_modules/rc-util/es/proxyObject.js
  48736. /**
  48737. * Proxy object if environment supported
  48738. */
  48739. function proxyObject(obj, extendProps) {
  48740. if (typeof Proxy !== 'undefined' && obj) {
  48741. return new Proxy(obj, {
  48742. get: function get(target, prop) {
  48743. if (extendProps[prop]) {
  48744. return extendProps[prop];
  48745. }
  48746. // Proxy origin property
  48747. var originProp = target[prop];
  48748. return typeof originProp === 'function' ? originProp.bind(target) : originProp;
  48749. }
  48750. });
  48751. }
  48752. return obj;
  48753. }
  48754. ;// ./node_modules/rc-input-number/es/hooks/useCursor.js
  48755. /**
  48756. * Keep input cursor in the correct position if possible.
  48757. * Is this necessary since we have `formatter` which may mass the content?
  48758. */
  48759. function useCursor(input, focused) {
  48760. var selectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  48761. function recordCursor() {
  48762. // Record position
  48763. try {
  48764. var start = input.selectionStart,
  48765. end = input.selectionEnd,
  48766. value = input.value;
  48767. var beforeTxt = value.substring(0, start);
  48768. var afterTxt = value.substring(end);
  48769. selectionRef.current = {
  48770. start: start,
  48771. end: end,
  48772. value: value,
  48773. beforeTxt: beforeTxt,
  48774. afterTxt: afterTxt
  48775. };
  48776. } catch (e) {
  48777. // Fix error in Chrome:
  48778. // Failed to read the 'selectionStart' property from 'HTMLInputElement'
  48779. // http://stackoverflow.com/q/21177489/3040605
  48780. }
  48781. }
  48782. /**
  48783. * Restore logic:
  48784. * 1. back string same
  48785. * 2. start string same
  48786. */
  48787. function restoreCursor() {
  48788. if (input && selectionRef.current && focused) {
  48789. try {
  48790. var value = input.value;
  48791. var _selectionRef$current = selectionRef.current,
  48792. beforeTxt = _selectionRef$current.beforeTxt,
  48793. afterTxt = _selectionRef$current.afterTxt,
  48794. start = _selectionRef$current.start;
  48795. var startPos = value.length;
  48796. if (value.startsWith(beforeTxt)) {
  48797. startPos = beforeTxt.length;
  48798. } else if (value.endsWith(afterTxt)) {
  48799. startPos = value.length - selectionRef.current.afterTxt.length;
  48800. } else {
  48801. var beforeLastChar = beforeTxt[start - 1];
  48802. var newIndex = value.indexOf(beforeLastChar, start - 1);
  48803. if (newIndex !== -1) {
  48804. startPos = newIndex + 1;
  48805. }
  48806. }
  48807. input.setSelectionRange(startPos, startPos);
  48808. } catch (e) {
  48809. (0,warning["default"])(false, "Something warning of cursor restore. Please fire issue about this: ".concat(e.message));
  48810. }
  48811. }
  48812. }
  48813. return [recordCursor, restoreCursor];
  48814. }
  48815. ;// ./node_modules/rc-util/es/hooks/useMobile.js
  48816. /**
  48817. * Hook to detect if the user is on a mobile device
  48818. * Notice that this hook will only detect the device type in effect, so it will always be false in server side
  48819. */
  48820. var useMobile = function useMobile() {
  48821. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  48822. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  48823. mobile = _useState2[0],
  48824. setMobile = _useState2[1];
  48825. (0,useLayoutEffect["default"])(function () {
  48826. setMobile(isMobile());
  48827. }, []);
  48828. return mobile;
  48829. };
  48830. /* harmony default export */ var hooks_useMobile = (useMobile);
  48831. ;// ./node_modules/rc-input-number/es/StepHandler.js
  48832. /* eslint-disable react/no-unknown-property */
  48833. /**
  48834. * When click and hold on a button - the speed of auto changing the value.
  48835. */
  48836. var STEP_INTERVAL = 200;
  48837. /**
  48838. * When click and hold on a button - the delay before auto changing the value.
  48839. */
  48840. var STEP_DELAY = 600;
  48841. function StepHandler(_ref) {
  48842. var prefixCls = _ref.prefixCls,
  48843. upNode = _ref.upNode,
  48844. downNode = _ref.downNode,
  48845. upDisabled = _ref.upDisabled,
  48846. downDisabled = _ref.downDisabled,
  48847. onStep = _ref.onStep;
  48848. // ======================== Step ========================
  48849. var stepTimeoutRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  48850. var frameIds = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  48851. var onStepRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  48852. onStepRef.current = onStep;
  48853. var onStopStep = function onStopStep() {
  48854. clearTimeout(stepTimeoutRef.current);
  48855. };
  48856. // We will interval update step when hold mouse down
  48857. var onStepMouseDown = function onStepMouseDown(e, up) {
  48858. e.preventDefault();
  48859. onStopStep();
  48860. onStepRef.current(up);
  48861. // Loop step for interval
  48862. function loopStep() {
  48863. onStepRef.current(up);
  48864. stepTimeoutRef.current = setTimeout(loopStep, STEP_INTERVAL);
  48865. }
  48866. // First time press will wait some time to trigger loop step update
  48867. stepTimeoutRef.current = setTimeout(loopStep, STEP_DELAY);
  48868. };
  48869. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  48870. return function () {
  48871. onStopStep();
  48872. frameIds.current.forEach(function (id) {
  48873. return raf["default"].cancel(id);
  48874. });
  48875. };
  48876. }, []);
  48877. // ======================= Render =======================
  48878. var isMobile = hooks_useMobile();
  48879. if (isMobile) {
  48880. return null;
  48881. }
  48882. var handlerClassName = "".concat(prefixCls, "-handler");
  48883. var upClassName = classnames_default()(handlerClassName, "".concat(handlerClassName, "-up"), (0,defineProperty["default"])({}, "".concat(handlerClassName, "-up-disabled"), upDisabled));
  48884. var downClassName = classnames_default()(handlerClassName, "".concat(handlerClassName, "-down"), (0,defineProperty["default"])({}, "".concat(handlerClassName, "-down-disabled"), downDisabled));
  48885. // fix: https://github.com/ant-design/ant-design/issues/43088
  48886. // In Safari, When we fire onmousedown and onmouseup events in quick succession,
  48887. // there may be a problem that the onmouseup events are executed first,
  48888. // resulting in a disordered program execution.
  48889. // So, we need to use requestAnimationFrame to ensure that the onmouseup event is executed after the onmousedown event.
  48890. var safeOnStopStep = function safeOnStopStep() {
  48891. return frameIds.current.push((0,raf["default"])(onStopStep));
  48892. };
  48893. var sharedHandlerProps = {
  48894. unselectable: 'on',
  48895. role: 'button',
  48896. onMouseUp: safeOnStopStep,
  48897. onMouseLeave: safeOnStopStep
  48898. };
  48899. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  48900. className: "".concat(handlerClassName, "-wrap")
  48901. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({}, sharedHandlerProps, {
  48902. onMouseDown: function onMouseDown(e) {
  48903. onStepMouseDown(e, true);
  48904. },
  48905. "aria-label": "Increase Value",
  48906. "aria-disabled": upDisabled,
  48907. className: upClassName
  48908. }), upNode || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  48909. unselectable: "on",
  48910. className: "".concat(prefixCls, "-handler-up-inner")
  48911. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({}, sharedHandlerProps, {
  48912. onMouseDown: function onMouseDown(e) {
  48913. onStepMouseDown(e, false);
  48914. },
  48915. "aria-label": "Decrease Value",
  48916. "aria-disabled": downDisabled,
  48917. className: downClassName
  48918. }), downNode || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  48919. unselectable: "on",
  48920. className: "".concat(prefixCls, "-handler-down-inner")
  48921. })));
  48922. }
  48923. ;// ./node_modules/rc-input-number/es/utils/numberUtil.js
  48924. function getDecupleSteps(step) {
  48925. var stepStr = typeof step === 'number' ? num2str(step) : trimNumber(step).fullStr;
  48926. var hasPoint = stepStr.includes('.');
  48927. if (!hasPoint) {
  48928. return step + '0';
  48929. }
  48930. return trimNumber(stepStr.replace(/(\d)\.(\d)/g, '$1$2.')).fullStr;
  48931. }
  48932. ;// ./node_modules/rc-input-number/es/hooks/useFrame.js
  48933. /**
  48934. * Always trigger latest once when call multiple time
  48935. */
  48936. /* harmony default export */ var useFrame = (function () {
  48937. var idRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
  48938. var cleanUp = function cleanUp() {
  48939. raf["default"].cancel(idRef.current);
  48940. };
  48941. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  48942. return cleanUp;
  48943. }, []);
  48944. return function (callback) {
  48945. cleanUp();
  48946. idRef.current = (0,raf["default"])(function () {
  48947. callback();
  48948. });
  48949. };
  48950. });
  48951. ;// ./node_modules/rc-input-number/es/InputNumber.js
  48952. var InputNumber_excluded = ["prefixCls", "className", "style", "min", "max", "step", "defaultValue", "value", "disabled", "readOnly", "upHandler", "downHandler", "keyboard", "changeOnWheel", "controls", "classNames", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "changeOnBlur", "domRef"],
  48953. InputNumber_excluded2 = ["disabled", "style", "prefixCls", "value", "prefix", "suffix", "addonBefore", "addonAfter", "className", "classNames"];
  48954. /**
  48955. * We support `stringMode` which need handle correct type when user call in onChange
  48956. * format max or min value
  48957. * 1. if isInvalid return null
  48958. * 2. if precision is undefined, return decimal
  48959. * 3. format with precision
  48960. * I. if max > 0, round down with precision. Example: max= 3.5, precision=0 afterFormat: 3
  48961. * II. if max < 0, round up with precision. Example: max= -3.5, precision=0 afterFormat: -4
  48962. * III. if min > 0, round up with precision. Example: min= 3.5, precision=0 afterFormat: 4
  48963. * IV. if min < 0, round down with precision. Example: max= -3.5, precision=0 afterFormat: -3
  48964. */
  48965. var getDecimalValue = function getDecimalValue(stringMode, decimalValue) {
  48966. if (stringMode || decimalValue.isEmpty()) {
  48967. return decimalValue.toString();
  48968. }
  48969. return decimalValue.toNumber();
  48970. };
  48971. var getDecimalIfValidate = function getDecimalIfValidate(value) {
  48972. var decimal = mini_decimal_es(value);
  48973. return decimal.isInvalidate() ? null : decimal;
  48974. };
  48975. var InternalInputNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  48976. var prefixCls = props.prefixCls,
  48977. className = props.className,
  48978. style = props.style,
  48979. min = props.min,
  48980. max = props.max,
  48981. _props$step = props.step,
  48982. step = _props$step === void 0 ? 1 : _props$step,
  48983. defaultValue = props.defaultValue,
  48984. value = props.value,
  48985. disabled = props.disabled,
  48986. readOnly = props.readOnly,
  48987. upHandler = props.upHandler,
  48988. downHandler = props.downHandler,
  48989. keyboard = props.keyboard,
  48990. _props$changeOnWheel = props.changeOnWheel,
  48991. changeOnWheel = _props$changeOnWheel === void 0 ? false : _props$changeOnWheel,
  48992. _props$controls = props.controls,
  48993. controls = _props$controls === void 0 ? true : _props$controls,
  48994. classNames = props.classNames,
  48995. stringMode = props.stringMode,
  48996. parser = props.parser,
  48997. formatter = props.formatter,
  48998. precision = props.precision,
  48999. decimalSeparator = props.decimalSeparator,
  49000. onChange = props.onChange,
  49001. onInput = props.onInput,
  49002. onPressEnter = props.onPressEnter,
  49003. onStep = props.onStep,
  49004. _props$changeOnBlur = props.changeOnBlur,
  49005. changeOnBlur = _props$changeOnBlur === void 0 ? true : _props$changeOnBlur,
  49006. domRef = props.domRef,
  49007. inputProps = (0,objectWithoutProperties["default"])(props, InputNumber_excluded);
  49008. var inputClassName = "".concat(prefixCls, "-input");
  49009. var inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  49010. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  49011. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  49012. focus = _React$useState2[0],
  49013. setFocus = _React$useState2[1];
  49014. var userTypingRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  49015. var compositionRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  49016. var shiftKeyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  49017. // ============================ Value =============================
  49018. // Real value control
  49019. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  49020. return mini_decimal_es(value !== null && value !== void 0 ? value : defaultValue);
  49021. }),
  49022. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  49023. decimalValue = _React$useState4[0],
  49024. setDecimalValue = _React$useState4[1];
  49025. function setUncontrolledDecimalValue(newDecimal) {
  49026. if (value === undefined) {
  49027. setDecimalValue(newDecimal);
  49028. }
  49029. }
  49030. // ====================== Parser & Formatter ======================
  49031. /**
  49032. * `precision` is used for formatter & onChange.
  49033. * It will auto generate by `value` & `step`.
  49034. * But it will not block user typing.
  49035. *
  49036. * Note: Auto generate `precision` is used for legacy logic.
  49037. * We should remove this since we already support high precision with BigInt.
  49038. *
  49039. * @param number Provide which number should calculate precision
  49040. * @param userTyping Change by user typing
  49041. */
  49042. var getPrecision = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (numStr, userTyping) {
  49043. if (userTyping) {
  49044. return undefined;
  49045. }
  49046. if (precision >= 0) {
  49047. return precision;
  49048. }
  49049. return Math.max(getNumberPrecision(numStr), getNumberPrecision(step));
  49050. }, [precision, step]);
  49051. // >>> Parser
  49052. var mergedParser = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (num) {
  49053. var numStr = String(num);
  49054. if (parser) {
  49055. return parser(numStr);
  49056. }
  49057. var parsedStr = numStr;
  49058. if (decimalSeparator) {
  49059. parsedStr = parsedStr.replace(decimalSeparator, '.');
  49060. }
  49061. // [Legacy] We still support auto convert `$ 123,456` to `123456`
  49062. return parsedStr.replace(/[^\w.-]+/g, '');
  49063. }, [parser, decimalSeparator]);
  49064. // >>> Formatter
  49065. var inputValueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef('');
  49066. var mergedFormatter = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (number, userTyping) {
  49067. if (formatter) {
  49068. return formatter(number, {
  49069. userTyping: userTyping,
  49070. input: String(inputValueRef.current)
  49071. });
  49072. }
  49073. var str = typeof number === 'number' ? num2str(number) : number;
  49074. // User typing will not auto format with precision directly
  49075. if (!userTyping) {
  49076. var mergedPrecision = getPrecision(str, userTyping);
  49077. if (validateNumber(str) && (decimalSeparator || mergedPrecision >= 0)) {
  49078. // Separator
  49079. var separatorStr = decimalSeparator || '.';
  49080. str = toFixed(str, separatorStr, mergedPrecision);
  49081. }
  49082. }
  49083. return str;
  49084. }, [formatter, getPrecision, decimalSeparator]);
  49085. // ========================== InputValue ==========================
  49086. /**
  49087. * Input text value control
  49088. *
  49089. * User can not update input content directly. It updates with follow rules by priority:
  49090. * 1. controlled `value` changed
  49091. * * [SPECIAL] Typing like `1.` should not immediately convert to `1`
  49092. * 2. User typing with format (not precision)
  49093. * 3. Blur or Enter trigger revalidate
  49094. */
  49095. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  49096. var initValue = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
  49097. if (decimalValue.isInvalidate() && ['string', 'number'].includes((0,esm_typeof["default"])(initValue))) {
  49098. return Number.isNaN(initValue) ? '' : initValue;
  49099. }
  49100. return mergedFormatter(decimalValue.toString(), false);
  49101. }),
  49102. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  49103. inputValue = _React$useState6[0],
  49104. setInternalInputValue = _React$useState6[1];
  49105. inputValueRef.current = inputValue;
  49106. // Should always be string
  49107. function setInputValue(newValue, userTyping) {
  49108. setInternalInputValue(mergedFormatter(
  49109. // Invalidate number is sometime passed by external control, we should let it go
  49110. // Otherwise is controlled by internal interactive logic which check by userTyping
  49111. // You can ref 'show limited value when input is not focused' test for more info.
  49112. newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping));
  49113. }
  49114. // >>> Max & Min limit
  49115. var maxDecimal = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  49116. return getDecimalIfValidate(max);
  49117. }, [max, precision]);
  49118. var minDecimal = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  49119. return getDecimalIfValidate(min);
  49120. }, [min, precision]);
  49121. var upDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  49122. if (!maxDecimal || !decimalValue || decimalValue.isInvalidate()) {
  49123. return false;
  49124. }
  49125. return maxDecimal.lessEquals(decimalValue);
  49126. }, [maxDecimal, decimalValue]);
  49127. var downDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  49128. if (!minDecimal || !decimalValue || decimalValue.isInvalidate()) {
  49129. return false;
  49130. }
  49131. return decimalValue.lessEquals(minDecimal);
  49132. }, [minDecimal, decimalValue]);
  49133. // Cursor controller
  49134. var _useCursor = useCursor(inputRef.current, focus),
  49135. _useCursor2 = (0,slicedToArray["default"])(_useCursor, 2),
  49136. recordCursor = _useCursor2[0],
  49137. restoreCursor = _useCursor2[1];
  49138. // ============================= Data =============================
  49139. /**
  49140. * Find target value closet within range.
  49141. * e.g. [11, 28]:
  49142. * 3 => 11
  49143. * 23 => 23
  49144. * 99 => 28
  49145. */
  49146. var getRangeValue = function getRangeValue(target) {
  49147. // target > max
  49148. if (maxDecimal && !target.lessEquals(maxDecimal)) {
  49149. return maxDecimal;
  49150. }
  49151. // target < min
  49152. if (minDecimal && !minDecimal.lessEquals(target)) {
  49153. return minDecimal;
  49154. }
  49155. return null;
  49156. };
  49157. /**
  49158. * Check value is in [min, max] range
  49159. */
  49160. var isInRange = function isInRange(target) {
  49161. return !getRangeValue(target);
  49162. };
  49163. /**
  49164. * Trigger `onChange` if value validated and not equals of origin.
  49165. * Return the value that re-align in range.
  49166. */
  49167. var triggerValueUpdate = function triggerValueUpdate(newValue, userTyping) {
  49168. var updateValue = newValue;
  49169. var isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();
  49170. // Skip align value when trigger value is empty.
  49171. // We just trigger onChange(null)
  49172. // This should not block user typing
  49173. if (!updateValue.isEmpty() && !userTyping) {
  49174. // Revert value in range if needed
  49175. updateValue = getRangeValue(updateValue) || updateValue;
  49176. isRangeValidate = true;
  49177. }
  49178. if (!readOnly && !disabled && isRangeValidate) {
  49179. var numStr = updateValue.toString();
  49180. var mergedPrecision = getPrecision(numStr, userTyping);
  49181. if (mergedPrecision >= 0) {
  49182. updateValue = mini_decimal_es(toFixed(numStr, '.', mergedPrecision));
  49183. // When to fixed. The value may out of min & max range.
  49184. // 4 in [0, 3.8] => 3.8 => 4 (toFixed)
  49185. if (!isInRange(updateValue)) {
  49186. updateValue = mini_decimal_es(toFixed(numStr, '.', mergedPrecision, true));
  49187. }
  49188. }
  49189. // Trigger event
  49190. if (!updateValue.equals(decimalValue)) {
  49191. setUncontrolledDecimalValue(updateValue);
  49192. onChange === null || onChange === void 0 || onChange(updateValue.isEmpty() ? null : getDecimalValue(stringMode, updateValue));
  49193. // Reformat input if value is not controlled
  49194. if (value === undefined) {
  49195. setInputValue(updateValue, userTyping);
  49196. }
  49197. }
  49198. return updateValue;
  49199. }
  49200. return decimalValue;
  49201. };
  49202. // ========================== User Input ==========================
  49203. var onNextPromise = useFrame();
  49204. // >>> Collect input value
  49205. var collectInputValue = function collectInputValue(inputStr) {
  49206. recordCursor();
  49207. // Update inputValue in case input can not parse as number
  49208. // Refresh ref value immediately since it may used by formatter
  49209. inputValueRef.current = inputStr;
  49210. setInternalInputValue(inputStr);
  49211. // Parse number
  49212. if (!compositionRef.current) {
  49213. var finalValue = mergedParser(inputStr);
  49214. var finalDecimal = mini_decimal_es(finalValue);
  49215. if (!finalDecimal.isNaN()) {
  49216. triggerValueUpdate(finalDecimal, true);
  49217. }
  49218. }
  49219. // Trigger onInput later to let user customize value if they want to handle something after onChange
  49220. onInput === null || onInput === void 0 || onInput(inputStr);
  49221. // optimize for chinese input experience
  49222. // https://github.com/ant-design/ant-design/issues/8196
  49223. onNextPromise(function () {
  49224. var nextInputStr = inputStr;
  49225. if (!parser) {
  49226. nextInputStr = inputStr.replace(/。/g, '.');
  49227. }
  49228. if (nextInputStr !== inputStr) {
  49229. collectInputValue(nextInputStr);
  49230. }
  49231. });
  49232. };
  49233. // >>> Composition
  49234. var onCompositionStart = function onCompositionStart() {
  49235. compositionRef.current = true;
  49236. };
  49237. var onCompositionEnd = function onCompositionEnd() {
  49238. compositionRef.current = false;
  49239. collectInputValue(inputRef.current.value);
  49240. };
  49241. // >>> Input
  49242. var onInternalInput = function onInternalInput(e) {
  49243. collectInputValue(e.target.value);
  49244. };
  49245. // ============================= Step =============================
  49246. var onInternalStep = function onInternalStep(up) {
  49247. var _inputRef$current;
  49248. // Ignore step since out of range
  49249. if (up && upDisabled || !up && downDisabled) {
  49250. return;
  49251. }
  49252. // Clear typing status since it may be caused by up & down key.
  49253. // We should sync with input value.
  49254. userTypingRef.current = false;
  49255. var stepDecimal = mini_decimal_es(shiftKeyRef.current ? getDecupleSteps(step) : step);
  49256. if (!up) {
  49257. stepDecimal = stepDecimal.negate();
  49258. }
  49259. var target = (decimalValue || mini_decimal_es(0)).add(stepDecimal.toString());
  49260. var updatedValue = triggerValueUpdate(target, false);
  49261. onStep === null || onStep === void 0 || onStep(getDecimalValue(stringMode, updatedValue), {
  49262. offset: shiftKeyRef.current ? getDecupleSteps(step) : step,
  49263. type: up ? 'up' : 'down'
  49264. });
  49265. (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
  49266. };
  49267. // ============================ Flush =============================
  49268. /**
  49269. * Flush current input content to trigger value change & re-formatter input if needed.
  49270. * This will always flush input value for update.
  49271. * If it's invalidate, will fallback to last validate value.
  49272. */
  49273. var flushInputValue = function flushInputValue(userTyping) {
  49274. var parsedValue = mini_decimal_es(mergedParser(inputValue));
  49275. var formatValue;
  49276. if (!parsedValue.isNaN()) {
  49277. // Only validate value or empty value can be re-fill to inputValue
  49278. // Reassign the formatValue within ranged of trigger control
  49279. formatValue = triggerValueUpdate(parsedValue, userTyping);
  49280. } else {
  49281. formatValue = triggerValueUpdate(decimalValue, userTyping);
  49282. }
  49283. if (value !== undefined) {
  49284. // Reset back with controlled value first
  49285. setInputValue(decimalValue, false);
  49286. } else if (!formatValue.isNaN()) {
  49287. // Reset input back since no validate value
  49288. setInputValue(formatValue, false);
  49289. }
  49290. };
  49291. // Solve the issue of the event triggering sequence when entering numbers in chinese input (Safari)
  49292. var onBeforeInput = function onBeforeInput() {
  49293. userTypingRef.current = true;
  49294. };
  49295. var onKeyDown = function onKeyDown(event) {
  49296. var key = event.key,
  49297. shiftKey = event.shiftKey;
  49298. userTypingRef.current = true;
  49299. shiftKeyRef.current = shiftKey;
  49300. if (key === 'Enter') {
  49301. if (!compositionRef.current) {
  49302. userTypingRef.current = false;
  49303. }
  49304. flushInputValue(false);
  49305. onPressEnter === null || onPressEnter === void 0 || onPressEnter(event);
  49306. }
  49307. if (keyboard === false) {
  49308. return;
  49309. }
  49310. // Do step
  49311. if (!compositionRef.current && ['Up', 'ArrowUp', 'Down', 'ArrowDown'].includes(key)) {
  49312. onInternalStep(key === 'Up' || key === 'ArrowUp');
  49313. event.preventDefault();
  49314. }
  49315. };
  49316. var onKeyUp = function onKeyUp() {
  49317. userTypingRef.current = false;
  49318. shiftKeyRef.current = false;
  49319. };
  49320. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  49321. if (changeOnWheel && focus) {
  49322. var onWheel = function onWheel(event) {
  49323. // moving mouse wheel rises wheel event with deltaY < 0
  49324. // scroll value grows from top to bottom, as screen Y coordinate
  49325. onInternalStep(event.deltaY < 0);
  49326. event.preventDefault();
  49327. };
  49328. var input = inputRef.current;
  49329. if (input) {
  49330. // React onWheel is passive and we can't preventDefault() in it.
  49331. // That's why we should subscribe with DOM listener
  49332. // https://stackoverflow.com/questions/63663025/react-onwheel-handler-cant-preventdefault-because-its-a-passive-event-listenev
  49333. input.addEventListener('wheel', onWheel, {
  49334. passive: false
  49335. });
  49336. return function () {
  49337. return input.removeEventListener('wheel', onWheel);
  49338. };
  49339. }
  49340. }
  49341. });
  49342. // >>> Focus & Blur
  49343. var onBlur = function onBlur() {
  49344. if (changeOnBlur) {
  49345. flushInputValue(false);
  49346. }
  49347. setFocus(false);
  49348. userTypingRef.current = false;
  49349. };
  49350. // ========================== Controlled ==========================
  49351. // Input by precision & formatter
  49352. (0,useLayoutEffect.useLayoutUpdateEffect)(function () {
  49353. if (!decimalValue.isInvalidate()) {
  49354. setInputValue(decimalValue, false);
  49355. }
  49356. }, [precision, formatter]);
  49357. // Input by value
  49358. (0,useLayoutEffect.useLayoutUpdateEffect)(function () {
  49359. var newValue = mini_decimal_es(value);
  49360. setDecimalValue(newValue);
  49361. var currentParsedValue = mini_decimal_es(mergedParser(inputValue));
  49362. // When user typing from `1.2` to `1.`, we should not convert to `1` immediately.
  49363. // But let it go if user set `formatter`
  49364. if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {
  49365. // Update value as effect
  49366. setInputValue(newValue, userTypingRef.current);
  49367. }
  49368. }, [value]);
  49369. // ============================ Cursor ============================
  49370. (0,useLayoutEffect.useLayoutUpdateEffect)(function () {
  49371. if (formatter) {
  49372. restoreCursor();
  49373. }
  49374. }, [inputValue]);
  49375. // ============================ Render ============================
  49376. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  49377. ref: domRef,
  49378. className: classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-focused"), focus), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-readonly"), readOnly), "".concat(prefixCls, "-not-a-number"), decimalValue.isNaN()), "".concat(prefixCls, "-out-of-range"), !decimalValue.isInvalidate() && !isInRange(decimalValue))),
  49379. style: style,
  49380. onFocus: function onFocus() {
  49381. setFocus(true);
  49382. },
  49383. onBlur: onBlur,
  49384. onKeyDown: onKeyDown,
  49385. onKeyUp: onKeyUp,
  49386. onCompositionStart: onCompositionStart,
  49387. onCompositionEnd: onCompositionEnd,
  49388. onBeforeInput: onBeforeInput
  49389. }, controls && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StepHandler, {
  49390. prefixCls: prefixCls,
  49391. upNode: upHandler,
  49392. downNode: downHandler,
  49393. upDisabled: upDisabled,
  49394. downDisabled: downDisabled,
  49395. onStep: onInternalStep
  49396. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  49397. className: "".concat(inputClassName, "-wrap")
  49398. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", (0,esm_extends["default"])({
  49399. autoComplete: "off",
  49400. role: "spinbutton",
  49401. "aria-valuemin": min,
  49402. "aria-valuemax": max,
  49403. "aria-valuenow": decimalValue.isInvalidate() ? null : decimalValue.toString(),
  49404. step: step
  49405. }, inputProps, {
  49406. ref: (0,es_ref.composeRef)(inputRef, ref),
  49407. className: inputClassName,
  49408. value: inputValue,
  49409. onChange: onInternalInput,
  49410. disabled: disabled,
  49411. readOnly: readOnly
  49412. }))));
  49413. });
  49414. var InputNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  49415. var disabled = props.disabled,
  49416. style = props.style,
  49417. _props$prefixCls = props.prefixCls,
  49418. prefixCls = _props$prefixCls === void 0 ? 'rc-input-number' : _props$prefixCls,
  49419. value = props.value,
  49420. prefix = props.prefix,
  49421. suffix = props.suffix,
  49422. addonBefore = props.addonBefore,
  49423. addonAfter = props.addonAfter,
  49424. className = props.className,
  49425. classNames = props.classNames,
  49426. rest = (0,objectWithoutProperties["default"])(props, InputNumber_excluded2);
  49427. var holderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  49428. var inputNumberDomRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  49429. var inputFocusRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  49430. var focus = function focus(option) {
  49431. if (inputFocusRef.current) {
  49432. triggerFocus(inputFocusRef.current, option);
  49433. }
  49434. };
  49435. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  49436. return proxyObject(inputFocusRef.current, {
  49437. focus: focus,
  49438. nativeElement: holderRef.current.nativeElement || inputNumberDomRef.current
  49439. });
  49440. });
  49441. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseInput, {
  49442. className: className,
  49443. triggerFocus: focus,
  49444. prefixCls: prefixCls,
  49445. value: value,
  49446. disabled: disabled,
  49447. style: style,
  49448. prefix: prefix,
  49449. suffix: suffix,
  49450. addonAfter: addonAfter,
  49451. addonBefore: addonBefore,
  49452. classNames: classNames,
  49453. components: {
  49454. affixWrapper: 'div',
  49455. groupWrapper: 'div',
  49456. wrapper: 'div',
  49457. groupAddon: 'div'
  49458. },
  49459. ref: holderRef
  49460. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalInputNumber, (0,esm_extends["default"])({
  49461. prefixCls: prefixCls,
  49462. disabled: disabled,
  49463. ref: inputFocusRef,
  49464. domRef: inputNumberDomRef,
  49465. className: classNames === null || classNames === void 0 ? void 0 : classNames.input
  49466. }, rest)));
  49467. });
  49468. if (true) {
  49469. InputNumber.displayName = 'InputNumber';
  49470. }
  49471. /* harmony default export */ var es_InputNumber = (InputNumber);
  49472. ;// ./node_modules/rc-input-number/es/index.js
  49473. /* harmony default export */ var rc_input_number_es = (es_InputNumber);
  49474. // EXTERNAL MODULE: ./components/input-number/style/index.ts + 1 modules
  49475. var input_number_style = __webpack_require__("./components/input-number/style/index.ts");
  49476. ;// ./components/input-number/index.tsx
  49477. var input_number_rest = undefined && undefined.__rest || function (s, e) {
  49478. var t = {};
  49479. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  49480. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  49481. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  49482. }
  49483. return t;
  49484. };
  49485. const input_number_InputNumber = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  49486. if (true) {
  49487. const typeWarning = (0,_util_warning.devUseWarning)('InputNumber');
  49488. typeWarning.deprecated(!('bordered' in props), 'bordered', 'variant');
  49489. typeWarning(!(props.type === 'number' && props.changeOnWheel), 'usage', 'When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.');
  49490. }
  49491. const {
  49492. getPrefixCls,
  49493. direction
  49494. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  49495. const inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  49496. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => inputRef.current);
  49497. const {
  49498. className,
  49499. rootClassName,
  49500. size: customizeSize,
  49501. disabled: customDisabled,
  49502. prefixCls: customizePrefixCls,
  49503. addonBefore,
  49504. addonAfter,
  49505. prefix,
  49506. suffix,
  49507. bordered,
  49508. readOnly,
  49509. status: customStatus,
  49510. controls,
  49511. variant: customVariant
  49512. } = props,
  49513. others = input_number_rest(props, ["className", "rootClassName", "size", "disabled", "prefixCls", "addonBefore", "addonAfter", "prefix", "suffix", "bordered", "readOnly", "status", "controls", "variant"]);
  49514. const prefixCls = getPrefixCls('input-number', customizePrefixCls);
  49515. // Style
  49516. const rootCls = hooks_useCSSVarCls(prefixCls);
  49517. const [wrapCSSVar, hashId, cssVarCls] = (0,input_number_style["default"])(prefixCls, rootCls);
  49518. const {
  49519. compactSize,
  49520. compactItemClassnames
  49521. } = useCompactItemContext(prefixCls, direction);
  49522. let upIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_UpOutlined, {
  49523. className: `${prefixCls}-handler-up-inner`
  49524. });
  49525. let downIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, {
  49526. className: `${prefixCls}-handler-down-inner`
  49527. });
  49528. const controlsTemp = typeof controls === 'boolean' ? controls : undefined;
  49529. if (typeof controls === 'object') {
  49530. upIcon = typeof controls.upIcon === 'undefined' ? upIcon : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  49531. className: `${prefixCls}-handler-up-inner`
  49532. }, controls.upIcon));
  49533. downIcon = typeof controls.downIcon === 'undefined' ? downIcon : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  49534. className: `${prefixCls}-handler-down-inner`
  49535. }, controls.downIcon));
  49536. }
  49537. const {
  49538. hasFeedback,
  49539. status: contextStatus,
  49540. isFormItemInput,
  49541. feedbackIcon
  49542. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  49543. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  49544. const mergedSize = (0,useSize["default"])(ctx => {
  49545. var _a;
  49546. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  49547. });
  49548. // ===================== Disabled =====================
  49549. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  49550. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  49551. const [variant, enableVariantCls] = useVariants('inputNumber', customVariant, bordered);
  49552. const suffixNode = hasFeedback && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, feedbackIcon);
  49553. const inputNumberClass = classnames_default()({
  49554. [`${prefixCls}-lg`]: mergedSize === 'large',
  49555. [`${prefixCls}-sm`]: mergedSize === 'small',
  49556. [`${prefixCls}-rtl`]: direction === 'rtl',
  49557. [`${prefixCls}-in-form-item`]: isFormItemInput
  49558. }, hashId);
  49559. const wrapperClassName = `${prefixCls}-group`;
  49560. const element = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_input_number_es, Object.assign({
  49561. ref: inputRef,
  49562. disabled: mergedDisabled,
  49563. className: classnames_default()(cssVarCls, rootCls, className, rootClassName, compactItemClassnames),
  49564. upHandler: upIcon,
  49565. downHandler: downIcon,
  49566. prefixCls: prefixCls,
  49567. readOnly: readOnly,
  49568. controls: controlsTemp,
  49569. prefix: prefix,
  49570. suffix: suffixNode || suffix,
  49571. addonBefore: addonBefore && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  49572. form: true,
  49573. space: true
  49574. }, addonBefore)),
  49575. addonAfter: addonAfter && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  49576. form: true,
  49577. space: true
  49578. }, addonAfter)),
  49579. classNames: {
  49580. input: inputNumberClass,
  49581. variant: classnames_default()({
  49582. [`${prefixCls}-${variant}`]: enableVariantCls
  49583. }, getStatusClassNames(prefixCls, mergedStatus, hasFeedback)),
  49584. affixWrapper: classnames_default()({
  49585. [`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
  49586. [`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
  49587. [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
  49588. [`${prefixCls}-affix-wrapper-without-controls`]: controls === false || mergedDisabled || readOnly
  49589. }, hashId),
  49590. wrapper: classnames_default()({
  49591. [`${wrapperClassName}-rtl`]: direction === 'rtl'
  49592. }, hashId),
  49593. groupWrapper: classnames_default()({
  49594. [`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',
  49595. [`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',
  49596. [`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
  49597. [`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls
  49598. }, getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)
  49599. }
  49600. }, others));
  49601. return wrapCSSVar(element);
  49602. });
  49603. const TypedInputNumber = input_number_InputNumber;
  49604. /** @private Internal Component. Do not use in your production. */
  49605. const PureInputNumber = props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
  49606. theme: {
  49607. components: {
  49608. InputNumber: {
  49609. handleVisible: true
  49610. }
  49611. }
  49612. }
  49613. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_number_InputNumber, Object.assign({}, props))));
  49614. if (true) {
  49615. TypedInputNumber.displayName = 'InputNumber';
  49616. }
  49617. TypedInputNumber._InternalPanelDoNotUseOrYouWillBeFired = PureInputNumber;
  49618. /* harmony default export */ var input_number = (TypedInputNumber);
  49619. ;// ./components/color-picker/components/ColorSteppers.tsx
  49620. const ColorSteppers = ({
  49621. prefixCls,
  49622. min = 0,
  49623. max = 100,
  49624. value,
  49625. onChange,
  49626. className,
  49627. formatter
  49628. }) => {
  49629. const colorSteppersPrefixCls = `${prefixCls}-steppers`;
  49630. const [internalValue, setInternalValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0);
  49631. const stepValue = !Number.isNaN(value) ? value : internalValue;
  49632. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(input_number, {
  49633. className: classnames_default()(colorSteppersPrefixCls, className),
  49634. min: min,
  49635. max: max,
  49636. value: stepValue,
  49637. formatter: formatter,
  49638. size: "small",
  49639. onChange: step => {
  49640. setInternalValue(step || 0);
  49641. onChange === null || onChange === void 0 ? void 0 : onChange(step);
  49642. }
  49643. });
  49644. };
  49645. /* harmony default export */ var components_ColorSteppers = (ColorSteppers);
  49646. ;// ./components/color-picker/components/ColorAlphaInput.tsx
  49647. const ColorAlphaInput = ({
  49648. prefixCls,
  49649. value,
  49650. onChange
  49651. }) => {
  49652. const colorAlphaInputPrefixCls = `${prefixCls}-alpha-input`;
  49653. const [internalValue, setInternalValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => (0,util.generateColor)(value || '#000'));
  49654. const alphaValue = value || internalValue;
  49655. const handleAlphaChange = step => {
  49656. const hsba = alphaValue.toHsb();
  49657. hsba.a = (step || 0) / 100;
  49658. const genColor = (0,util.generateColor)(hsba);
  49659. setInternalValue(genColor);
  49660. onChange === null || onChange === void 0 ? void 0 : onChange(genColor);
  49661. };
  49662. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49663. value: (0,util.getColorAlpha)(alphaValue),
  49664. prefixCls: prefixCls,
  49665. formatter: step => `${step}%`,
  49666. className: colorAlphaInputPrefixCls,
  49667. onChange: handleAlphaChange
  49668. });
  49669. };
  49670. /* harmony default export */ var components_ColorAlphaInput = (ColorAlphaInput);
  49671. ;// ./components/_util/getAllowClear.tsx
  49672. const getAllowClear = allowClear => {
  49673. let mergedAllowClear;
  49674. if (typeof allowClear === 'object' && (allowClear === null || allowClear === void 0 ? void 0 : allowClear.clearIcon)) {
  49675. mergedAllowClear = allowClear;
  49676. } else if (allowClear) {
  49677. mergedAllowClear = {
  49678. clearIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseCircleFilled, null)
  49679. };
  49680. }
  49681. return mergedAllowClear;
  49682. };
  49683. /* harmony default export */ var _util_getAllowClear = (getAllowClear);
  49684. ;// ./components/input/hooks/useRemovePasswordTimeout.ts
  49685. function useRemovePasswordTimeout(inputRef, triggerOnMount) {
  49686. const removePasswordTimeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
  49687. const removePasswordTimeout = () => {
  49688. removePasswordTimeoutRef.current.push(setTimeout(() => {
  49689. var _a, _b, _c, _d;
  49690. if (((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) && ((_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.input.getAttribute('type')) === 'password' && ((_c = inputRef.current) === null || _c === void 0 ? void 0 : _c.input.hasAttribute('value'))) {
  49691. (_d = inputRef.current) === null || _d === void 0 ? void 0 : _d.input.removeAttribute('value');
  49692. }
  49693. }));
  49694. };
  49695. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  49696. if (triggerOnMount) {
  49697. removePasswordTimeout();
  49698. }
  49699. return () => removePasswordTimeoutRef.current.forEach(timer => {
  49700. if (timer) {
  49701. clearTimeout(timer);
  49702. }
  49703. });
  49704. }, []);
  49705. return removePasswordTimeout;
  49706. }
  49707. // EXTERNAL MODULE: ./components/input/style/index.ts
  49708. var input_style = __webpack_require__("./components/input/style/index.ts");
  49709. ;// ./components/input/utils.ts
  49710. function utils_hasPrefixSuffix(props) {
  49711. return !!(props.prefix || props.suffix || props.allowClear || props.showCount);
  49712. }
  49713. ;// ./components/input/Input.tsx
  49714. var Input_rest = undefined && undefined.__rest || function (s, e) {
  49715. var t = {};
  49716. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  49717. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  49718. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  49719. }
  49720. return t;
  49721. };
  49722. const input_Input_Input = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  49723. const {
  49724. prefixCls: customizePrefixCls,
  49725. bordered = true,
  49726. status: customStatus,
  49727. size: customSize,
  49728. disabled: customDisabled,
  49729. onBlur,
  49730. onFocus,
  49731. suffix,
  49732. allowClear,
  49733. addonAfter,
  49734. addonBefore,
  49735. className,
  49736. style,
  49737. styles,
  49738. rootClassName,
  49739. onChange,
  49740. classNames,
  49741. variant: customVariant
  49742. } = props,
  49743. rest = Input_rest(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant"]);
  49744. if (true) {
  49745. const {
  49746. deprecated
  49747. } = (0,_util_warning.devUseWarning)('Input');
  49748. deprecated(!('bordered' in props), 'bordered', 'variant');
  49749. }
  49750. const {
  49751. getPrefixCls,
  49752. direction,
  49753. allowClear: contextAllowClear,
  49754. autoComplete: contextAutoComplete,
  49755. className: contextClassName,
  49756. style: contextStyle,
  49757. classNames: contextClassNames,
  49758. styles: contextStyles
  49759. } = (0,config_provider_context.useComponentConfig)('input');
  49760. const prefixCls = getPrefixCls('input', customizePrefixCls);
  49761. const inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  49762. // Style
  49763. const rootCls = hooks_useCSSVarCls(prefixCls);
  49764. const [wrapSharedCSSVar, hashId, cssVarCls] = (0,input_style.useSharedStyle)(prefixCls, rootClassName);
  49765. const [wrapCSSVar] = (0,input_style["default"])(prefixCls, rootCls);
  49766. // ===================== Compact Item =====================
  49767. const {
  49768. compactSize,
  49769. compactItemClassnames
  49770. } = useCompactItemContext(prefixCls, direction);
  49771. // ===================== Size =====================
  49772. const mergedSize = (0,useSize["default"])(ctx => {
  49773. var _a;
  49774. return (_a = customSize !== null && customSize !== void 0 ? customSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  49775. });
  49776. // ===================== Disabled =====================
  49777. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_DisabledContext);
  49778. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  49779. // ===================== Status =====================
  49780. const {
  49781. status: contextStatus,
  49782. hasFeedback,
  49783. feedbackIcon
  49784. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
  49785. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  49786. // ===================== Focus warning =====================
  49787. const inputHasPrefixSuffix = utils_hasPrefixSuffix(props) || !!hasFeedback;
  49788. const prevHasPrefixSuffix = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(inputHasPrefixSuffix);
  49789. /* eslint-disable react-hooks/rules-of-hooks */
  49790. if (true) {
  49791. const warning = (0,_util_warning.devUseWarning)('Input');
  49792. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  49793. var _a;
  49794. if (inputHasPrefixSuffix && !prevHasPrefixSuffix.current) {
  49795. true ? warning(document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input), 'usage', `When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ`) : 0;
  49796. }
  49797. prevHasPrefixSuffix.current = inputHasPrefixSuffix;
  49798. }, [inputHasPrefixSuffix]);
  49799. }
  49800. /* eslint-enable */
  49801. // ===================== Remove Password value =====================
  49802. const removePasswordTimeout = useRemovePasswordTimeout(inputRef, true);
  49803. const handleBlur = e => {
  49804. removePasswordTimeout();
  49805. onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
  49806. };
  49807. const handleFocus = e => {
  49808. removePasswordTimeout();
  49809. onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
  49810. };
  49811. const handleChange = e => {
  49812. removePasswordTimeout();
  49813. onChange === null || onChange === void 0 ? void 0 : onChange(e);
  49814. };
  49815. const suffixNode = (hasFeedback || suffix) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, suffix, hasFeedback && feedbackIcon));
  49816. const mergedAllowClear = _util_getAllowClear(allowClear !== null && allowClear !== void 0 ? allowClear : contextAllowClear);
  49817. const [variant, enableVariantCls] = useVariants('input', customVariant, bordered);
  49818. return wrapSharedCSSVar(wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_input_es, Object.assign({
  49819. ref: (0,es_ref.composeRef)(ref, inputRef),
  49820. prefixCls: prefixCls,
  49821. autoComplete: contextAutoComplete
  49822. }, rest, {
  49823. disabled: mergedDisabled,
  49824. onBlur: handleBlur,
  49825. onFocus: handleFocus,
  49826. style: Object.assign(Object.assign({}, contextStyle), style),
  49827. styles: Object.assign(Object.assign({}, contextStyles), styles),
  49828. suffix: suffixNode,
  49829. allowClear: mergedAllowClear,
  49830. className: classnames_default()(className, rootClassName, cssVarCls, rootCls, compactItemClassnames, contextClassName),
  49831. onChange: handleChange,
  49832. addonBefore: addonBefore && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
  49833. form: true,
  49834. space: true
  49835. }, addonBefore)),
  49836. addonAfter: addonAfter && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
  49837. form: true,
  49838. space: true
  49839. }, addonAfter)),
  49840. classNames: Object.assign(Object.assign(Object.assign({}, classNames), contextClassNames), {
  49841. input: classnames_default()({
  49842. [`${prefixCls}-sm`]: mergedSize === 'small',
  49843. [`${prefixCls}-lg`]: mergedSize === 'large',
  49844. [`${prefixCls}-rtl`]: direction === 'rtl'
  49845. }, classNames === null || classNames === void 0 ? void 0 : classNames.input, contextClassNames.input, hashId),
  49846. variant: classnames_default()({
  49847. [`${prefixCls}-${variant}`]: enableVariantCls
  49848. }, getStatusClassNames(prefixCls, mergedStatus)),
  49849. affixWrapper: classnames_default()({
  49850. [`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
  49851. [`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
  49852. [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl'
  49853. }, hashId),
  49854. wrapper: classnames_default()({
  49855. [`${prefixCls}-group-rtl`]: direction === 'rtl'
  49856. }, hashId),
  49857. groupWrapper: classnames_default()({
  49858. [`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',
  49859. [`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',
  49860. [`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
  49861. [`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls
  49862. }, getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)
  49863. })
  49864. }))));
  49865. });
  49866. if (true) {
  49867. input_Input_Input.displayName = 'Input';
  49868. }
  49869. /* harmony default export */ var input_Input = (input_Input_Input);
  49870. ;// ./components/color-picker/components/ColorHexInput.tsx
  49871. const hexReg = /(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i;
  49872. const isHexString = hex => hexReg.test(`#${hex}`);
  49873. const ColorHexInput = ({
  49874. prefixCls,
  49875. value,
  49876. onChange
  49877. }) => {
  49878. const colorHexInputPrefixCls = `${prefixCls}-hex-input`;
  49879. const [hexValue, setHexValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => value ? (0,color.toHexFormat)(value.toHexString()) : undefined);
  49880. // Update step value
  49881. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  49882. if (value) {
  49883. setHexValue((0,color.toHexFormat)(value.toHexString()));
  49884. }
  49885. }, [value]);
  49886. const handleHexChange = e => {
  49887. const originValue = e.target.value;
  49888. setHexValue((0,color.toHexFormat)(originValue));
  49889. if (isHexString((0,color.toHexFormat)(originValue, true))) {
  49890. onChange === null || onChange === void 0 ? void 0 : onChange((0,util.generateColor)(originValue));
  49891. }
  49892. };
  49893. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(input_Input, {
  49894. className: colorHexInputPrefixCls,
  49895. value: hexValue,
  49896. prefix: "#",
  49897. onChange: handleHexChange,
  49898. size: "small"
  49899. });
  49900. };
  49901. /* harmony default export */ var components_ColorHexInput = (ColorHexInput);
  49902. ;// ./components/color-picker/components/ColorHsbInput.tsx
  49903. const ColorHsbInput = ({
  49904. prefixCls,
  49905. value,
  49906. onChange
  49907. }) => {
  49908. const colorHsbInputPrefixCls = `${prefixCls}-hsb-input`;
  49909. const [internalValue, setInternalValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => (0,util.generateColor)(value || '#000'));
  49910. const hsbValue = value || internalValue;
  49911. const handleHsbChange = (step, type) => {
  49912. const hsb = hsbValue.toHsb();
  49913. hsb[type] = type === 'h' ? step : (step || 0) / 100;
  49914. const genColor = (0,util.generateColor)(hsb);
  49915. setInternalValue(genColor);
  49916. onChange === null || onChange === void 0 ? void 0 : onChange(genColor);
  49917. };
  49918. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  49919. className: colorHsbInputPrefixCls
  49920. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49921. max: 360,
  49922. min: 0,
  49923. value: Number(hsbValue.toHsb().h),
  49924. prefixCls: prefixCls,
  49925. className: colorHsbInputPrefixCls,
  49926. formatter: step => (0,util.getRoundNumber)(step || 0).toString(),
  49927. onChange: step => handleHsbChange(Number(step), 'h')
  49928. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49929. max: 100,
  49930. min: 0,
  49931. value: Number(hsbValue.toHsb().s) * 100,
  49932. prefixCls: prefixCls,
  49933. className: colorHsbInputPrefixCls,
  49934. formatter: step => `${(0,util.getRoundNumber)(step || 0)}%`,
  49935. onChange: step => handleHsbChange(Number(step), 's')
  49936. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49937. max: 100,
  49938. min: 0,
  49939. value: Number(hsbValue.toHsb().b) * 100,
  49940. prefixCls: prefixCls,
  49941. className: colorHsbInputPrefixCls,
  49942. formatter: step => `${(0,util.getRoundNumber)(step || 0)}%`,
  49943. onChange: step => handleHsbChange(Number(step), 'b')
  49944. }));
  49945. };
  49946. /* harmony default export */ var components_ColorHsbInput = (ColorHsbInput);
  49947. ;// ./components/color-picker/components/ColorRgbInput.tsx
  49948. const ColorRgbInput = ({
  49949. prefixCls,
  49950. value,
  49951. onChange
  49952. }) => {
  49953. const colorRgbInputPrefixCls = `${prefixCls}-rgb-input`;
  49954. const [internalValue, setInternalValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => (0,util.generateColor)(value || '#000'));
  49955. const rgbValue = value || internalValue;
  49956. const handleRgbChange = (step, type) => {
  49957. const rgb = rgbValue.toRgb();
  49958. rgb[type] = step || 0;
  49959. const genColor = (0,util.generateColor)(rgb);
  49960. setInternalValue(genColor);
  49961. onChange === null || onChange === void 0 ? void 0 : onChange(genColor);
  49962. };
  49963. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  49964. className: colorRgbInputPrefixCls
  49965. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49966. max: 255,
  49967. min: 0,
  49968. value: Number(rgbValue.toRgb().r),
  49969. prefixCls: prefixCls,
  49970. className: colorRgbInputPrefixCls,
  49971. onChange: step => handleRgbChange(Number(step), 'r')
  49972. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49973. max: 255,
  49974. min: 0,
  49975. value: Number(rgbValue.toRgb().g),
  49976. prefixCls: prefixCls,
  49977. className: colorRgbInputPrefixCls,
  49978. onChange: step => handleRgbChange(Number(step), 'g')
  49979. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorSteppers, {
  49980. max: 255,
  49981. min: 0,
  49982. value: Number(rgbValue.toRgb().b),
  49983. prefixCls: prefixCls,
  49984. className: colorRgbInputPrefixCls,
  49985. onChange: step => handleRgbChange(Number(step), 'b')
  49986. }));
  49987. };
  49988. /* harmony default export */ var components_ColorRgbInput = (ColorRgbInput);
  49989. ;// ./components/color-picker/components/ColorInput.tsx
  49990. const selectOptions = [FORMAT_HEX, FORMAT_HSB, FORMAT_RGB].map(format => ({
  49991. value: format,
  49992. label: format.toUpperCase()
  49993. }));
  49994. const ColorInput = props => {
  49995. const {
  49996. prefixCls,
  49997. format,
  49998. value,
  49999. disabledAlpha,
  50000. onFormatChange,
  50001. onChange,
  50002. disabledFormat
  50003. } = props;
  50004. const [colorFormat, setColorFormat] = (0,useMergedState["default"])(FORMAT_HEX, {
  50005. value: format,
  50006. onChange: onFormatChange
  50007. });
  50008. const colorInputPrefixCls = `${prefixCls}-input`;
  50009. const handleFormatChange = newFormat => {
  50010. setColorFormat(newFormat);
  50011. };
  50012. const steppersNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  50013. const inputProps = {
  50014. value,
  50015. prefixCls,
  50016. onChange
  50017. };
  50018. switch (colorFormat) {
  50019. case FORMAT_HSB:
  50020. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorHsbInput, Object.assign({}, inputProps));
  50021. case FORMAT_RGB:
  50022. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorRgbInput, Object.assign({}, inputProps));
  50023. // case FORMAT_HEX:
  50024. default:
  50025. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorHexInput, Object.assign({}, inputProps));
  50026. }
  50027. }, [colorFormat, prefixCls, value, onChange]);
  50028. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  50029. className: `${colorInputPrefixCls}-container`
  50030. }, !disabledFormat && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_select, {
  50031. value: colorFormat,
  50032. variant: "borderless",
  50033. getPopupContainer: current => current,
  50034. popupMatchSelectWidth: 68,
  50035. placement: "bottomRight",
  50036. onChange: handleFormatChange,
  50037. className: `${prefixCls}-format-select`,
  50038. size: "small",
  50039. options: selectOptions
  50040. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  50041. className: colorInputPrefixCls
  50042. }, steppersNode), !disabledAlpha && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorAlphaInput, {
  50043. prefixCls: prefixCls,
  50044. value: value,
  50045. onChange: onChange
  50046. })));
  50047. };
  50048. /* harmony default export */ var components_ColorInput = (ColorInput);
  50049. ;// ./node_modules/rc-slider/es/util.js
  50050. function util_getOffset(value, min, max) {
  50051. return (value - min) / (max - min);
  50052. }
  50053. function getDirectionStyle(direction, value, min, max) {
  50054. var offset = util_getOffset(value, min, max);
  50055. var positionStyle = {};
  50056. switch (direction) {
  50057. case 'rtl':
  50058. positionStyle.right = "".concat(offset * 100, "%");
  50059. positionStyle.transform = 'translateX(50%)';
  50060. break;
  50061. case 'btt':
  50062. positionStyle.bottom = "".concat(offset * 100, "%");
  50063. positionStyle.transform = 'translateY(50%)';
  50064. break;
  50065. case 'ttb':
  50066. positionStyle.top = "".concat(offset * 100, "%");
  50067. positionStyle.transform = 'translateY(-50%)';
  50068. break;
  50069. default:
  50070. positionStyle.left = "".concat(offset * 100, "%");
  50071. positionStyle.transform = 'translateX(-50%)';
  50072. break;
  50073. }
  50074. return positionStyle;
  50075. }
  50076. /** Return index value if is list or return value directly */
  50077. function getIndex(value, index) {
  50078. return Array.isArray(value) ? value[index] : value;
  50079. }
  50080. ;// ./node_modules/rc-slider/es/context.js
  50081. var SliderContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  50082. min: 0,
  50083. max: 0,
  50084. direction: 'ltr',
  50085. step: 1,
  50086. includedStart: 0,
  50087. includedEnd: 0,
  50088. tabIndex: 0,
  50089. keyboard: true,
  50090. styles: {},
  50091. classNames: {}
  50092. });
  50093. /* harmony default export */ var rc_slider_es_context = (SliderContext);
  50094. /** @private NOT PROMISE AVAILABLE. DO NOT USE IN PRODUCTION. */
  50095. var UnstableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  50096. ;// ./node_modules/rc-slider/es/Handles/Handle.js
  50097. var Handle_excluded = ["prefixCls", "value", "valueIndex", "onStartMove", "onDelete", "style", "render", "dragging", "draggingDelete", "onOffsetChange", "onChangeComplete", "onFocus", "onMouseEnter"];
  50098. var Handle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  50099. var prefixCls = props.prefixCls,
  50100. value = props.value,
  50101. valueIndex = props.valueIndex,
  50102. onStartMove = props.onStartMove,
  50103. onDelete = props.onDelete,
  50104. style = props.style,
  50105. render = props.render,
  50106. dragging = props.dragging,
  50107. draggingDelete = props.draggingDelete,
  50108. onOffsetChange = props.onOffsetChange,
  50109. onChangeComplete = props.onChangeComplete,
  50110. onFocus = props.onFocus,
  50111. onMouseEnter = props.onMouseEnter,
  50112. restProps = (0,objectWithoutProperties["default"])(props, Handle_excluded);
  50113. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
  50114. min = _React$useContext.min,
  50115. max = _React$useContext.max,
  50116. direction = _React$useContext.direction,
  50117. disabled = _React$useContext.disabled,
  50118. keyboard = _React$useContext.keyboard,
  50119. range = _React$useContext.range,
  50120. tabIndex = _React$useContext.tabIndex,
  50121. ariaLabelForHandle = _React$useContext.ariaLabelForHandle,
  50122. ariaLabelledByForHandle = _React$useContext.ariaLabelledByForHandle,
  50123. ariaRequired = _React$useContext.ariaRequired,
  50124. ariaValueTextFormatterForHandle = _React$useContext.ariaValueTextFormatterForHandle,
  50125. styles = _React$useContext.styles,
  50126. classNames = _React$useContext.classNames;
  50127. var handlePrefixCls = "".concat(prefixCls, "-handle");
  50128. // ============================ Events ============================
  50129. var onInternalStartMove = function onInternalStartMove(e) {
  50130. if (!disabled) {
  50131. onStartMove(e, valueIndex);
  50132. }
  50133. };
  50134. var onInternalFocus = function onInternalFocus(e) {
  50135. onFocus === null || onFocus === void 0 || onFocus(e, valueIndex);
  50136. };
  50137. var onInternalMouseEnter = function onInternalMouseEnter(e) {
  50138. onMouseEnter(e, valueIndex);
  50139. };
  50140. // =========================== Keyboard ===========================
  50141. var onKeyDown = function onKeyDown(e) {
  50142. if (!disabled && keyboard) {
  50143. var offset = null;
  50144. // Change the value
  50145. switch (e.which || e.keyCode) {
  50146. case KeyCode["default"].LEFT:
  50147. offset = direction === 'ltr' || direction === 'btt' ? -1 : 1;
  50148. break;
  50149. case KeyCode["default"].RIGHT:
  50150. offset = direction === 'ltr' || direction === 'btt' ? 1 : -1;
  50151. break;
  50152. // Up is plus
  50153. case KeyCode["default"].UP:
  50154. offset = direction !== 'ttb' ? 1 : -1;
  50155. break;
  50156. // Down is minus
  50157. case KeyCode["default"].DOWN:
  50158. offset = direction !== 'ttb' ? -1 : 1;
  50159. break;
  50160. case KeyCode["default"].HOME:
  50161. offset = 'min';
  50162. break;
  50163. case KeyCode["default"].END:
  50164. offset = 'max';
  50165. break;
  50166. case KeyCode["default"].PAGE_UP:
  50167. offset = 2;
  50168. break;
  50169. case KeyCode["default"].PAGE_DOWN:
  50170. offset = -2;
  50171. break;
  50172. case KeyCode["default"].BACKSPACE:
  50173. case KeyCode["default"].DELETE:
  50174. onDelete === null || onDelete === void 0 || onDelete(valueIndex);
  50175. break;
  50176. }
  50177. if (offset !== null) {
  50178. e.preventDefault();
  50179. onOffsetChange(offset, valueIndex);
  50180. }
  50181. }
  50182. };
  50183. var handleKeyUp = function handleKeyUp(e) {
  50184. switch (e.which || e.keyCode) {
  50185. case KeyCode["default"].LEFT:
  50186. case KeyCode["default"].RIGHT:
  50187. case KeyCode["default"].UP:
  50188. case KeyCode["default"].DOWN:
  50189. case KeyCode["default"].HOME:
  50190. case KeyCode["default"].END:
  50191. case KeyCode["default"].PAGE_UP:
  50192. case KeyCode["default"].PAGE_DOWN:
  50193. onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete();
  50194. break;
  50195. }
  50196. };
  50197. // ============================ Offset ============================
  50198. var positionStyle = getDirectionStyle(direction, value, min, max);
  50199. // ============================ Render ============================
  50200. var divProps = {};
  50201. if (valueIndex !== null) {
  50202. var _getIndex;
  50203. divProps = {
  50204. tabIndex: disabled ? null : getIndex(tabIndex, valueIndex),
  50205. role: 'slider',
  50206. 'aria-valuemin': min,
  50207. 'aria-valuemax': max,
  50208. 'aria-valuenow': value,
  50209. 'aria-disabled': disabled,
  50210. 'aria-label': getIndex(ariaLabelForHandle, valueIndex),
  50211. 'aria-labelledby': getIndex(ariaLabelledByForHandle, valueIndex),
  50212. 'aria-required': getIndex(ariaRequired, valueIndex),
  50213. 'aria-valuetext': (_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value),
  50214. 'aria-orientation': direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical',
  50215. onMouseDown: onInternalStartMove,
  50216. onTouchStart: onInternalStartMove,
  50217. onFocus: onInternalFocus,
  50218. onMouseEnter: onInternalMouseEnter,
  50219. onKeyDown: onKeyDown,
  50220. onKeyUp: handleKeyUp
  50221. };
  50222. }
  50223. var handleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  50224. ref: ref,
  50225. className: classnames_default()(handlePrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), valueIndex !== null && range), "".concat(handlePrefixCls, "-dragging"), dragging), "".concat(handlePrefixCls, "-dragging-delete"), draggingDelete), classNames.handle),
  50226. style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, positionStyle), style), styles.handle)
  50227. }, divProps, restProps));
  50228. // Customize
  50229. if (render) {
  50230. handleNode = render(handleNode, {
  50231. index: valueIndex,
  50232. prefixCls: prefixCls,
  50233. value: value,
  50234. dragging: dragging,
  50235. draggingDelete: draggingDelete
  50236. });
  50237. }
  50238. return handleNode;
  50239. });
  50240. if (true) {
  50241. Handle.displayName = 'Handle';
  50242. }
  50243. /* harmony default export */ var Handles_Handle = (Handle);
  50244. ;// ./node_modules/rc-slider/es/Handles/index.js
  50245. var Handles_excluded = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "draggingDelete", "onFocus"];
  50246. var Handles = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  50247. var prefixCls = props.prefixCls,
  50248. style = props.style,
  50249. onStartMove = props.onStartMove,
  50250. onOffsetChange = props.onOffsetChange,
  50251. values = props.values,
  50252. handleRender = props.handleRender,
  50253. activeHandleRender = props.activeHandleRender,
  50254. draggingIndex = props.draggingIndex,
  50255. draggingDelete = props.draggingDelete,
  50256. onFocus = props.onFocus,
  50257. restProps = (0,objectWithoutProperties["default"])(props, Handles_excluded);
  50258. var handlesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  50259. // =========================== Active ===========================
  50260. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  50261. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  50262. activeVisible = _React$useState2[0],
  50263. setActiveVisible = _React$useState2[1];
  50264. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
  50265. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  50266. activeIndex = _React$useState4[0],
  50267. setActiveIndex = _React$useState4[1];
  50268. var onActive = function onActive(index) {
  50269. setActiveIndex(index);
  50270. setActiveVisible(true);
  50271. };
  50272. var onHandleFocus = function onHandleFocus(e, index) {
  50273. onActive(index);
  50274. onFocus === null || onFocus === void 0 || onFocus(e);
  50275. };
  50276. var onHandleMouseEnter = function onHandleMouseEnter(e, index) {
  50277. onActive(index);
  50278. };
  50279. // =========================== Render ===========================
  50280. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  50281. return {
  50282. focus: function focus(index) {
  50283. var _handlesRef$current$i;
  50284. (_handlesRef$current$i = handlesRef.current[index]) === null || _handlesRef$current$i === void 0 || _handlesRef$current$i.focus();
  50285. },
  50286. hideHelp: function hideHelp() {
  50287. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(function () {
  50288. setActiveVisible(false);
  50289. });
  50290. }
  50291. };
  50292. });
  50293. // =========================== Render ===========================
  50294. // Handle Props
  50295. var handleProps = (0,objectSpread2["default"])({
  50296. prefixCls: prefixCls,
  50297. onStartMove: onStartMove,
  50298. onOffsetChange: onOffsetChange,
  50299. render: handleRender,
  50300. onFocus: onHandleFocus,
  50301. onMouseEnter: onHandleMouseEnter
  50302. }, restProps);
  50303. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, values.map(function (value, index) {
  50304. var dragging = draggingIndex === index;
  50305. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Handles_Handle, (0,esm_extends["default"])({
  50306. ref: function ref(node) {
  50307. if (!node) {
  50308. delete handlesRef.current[index];
  50309. } else {
  50310. handlesRef.current[index] = node;
  50311. }
  50312. },
  50313. dragging: dragging,
  50314. draggingDelete: dragging && draggingDelete,
  50315. style: getIndex(style, index),
  50316. key: index,
  50317. value: value,
  50318. valueIndex: index
  50319. }, handleProps));
  50320. }), activeHandleRender && activeVisible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Handles_Handle, (0,esm_extends["default"])({
  50321. key: "a11y"
  50322. }, handleProps, {
  50323. value: values[activeIndex],
  50324. valueIndex: null,
  50325. dragging: draggingIndex !== -1,
  50326. draggingDelete: draggingDelete,
  50327. render: activeHandleRender,
  50328. style: {
  50329. pointerEvents: 'none'
  50330. },
  50331. tabIndex: null,
  50332. "aria-hidden": true
  50333. })));
  50334. });
  50335. if (true) {
  50336. Handles.displayName = 'Handles';
  50337. }
  50338. /* harmony default export */ var es_Handles = (Handles);
  50339. ;// ./node_modules/rc-slider/es/Marks/Mark.js
  50340. var Mark = function Mark(props) {
  50341. var prefixCls = props.prefixCls,
  50342. style = props.style,
  50343. children = props.children,
  50344. value = props.value,
  50345. _onClick = props.onClick;
  50346. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
  50347. min = _React$useContext.min,
  50348. max = _React$useContext.max,
  50349. direction = _React$useContext.direction,
  50350. includedStart = _React$useContext.includedStart,
  50351. includedEnd = _React$useContext.includedEnd,
  50352. included = _React$useContext.included;
  50353. var textCls = "".concat(prefixCls, "-text");
  50354. // ============================ Offset ============================
  50355. var positionStyle = getDirectionStyle(direction, value, min, max);
  50356. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  50357. className: classnames_default()(textCls, (0,defineProperty["default"])({}, "".concat(textCls, "-active"), included && includedStart <= value && value <= includedEnd)),
  50358. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, positionStyle), style),
  50359. onMouseDown: function onMouseDown(e) {
  50360. e.stopPropagation();
  50361. },
  50362. onClick: function onClick() {
  50363. _onClick(value);
  50364. }
  50365. }, children);
  50366. };
  50367. /* harmony default export */ var Marks_Mark = (Mark);
  50368. ;// ./node_modules/rc-slider/es/Marks/index.js
  50369. var Marks = function Marks(props) {
  50370. var prefixCls = props.prefixCls,
  50371. marks = props.marks,
  50372. onClick = props.onClick;
  50373. var markPrefixCls = "".concat(prefixCls, "-mark");
  50374. // Not render mark if empty
  50375. if (!marks.length) {
  50376. return null;
  50377. }
  50378. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  50379. className: markPrefixCls
  50380. }, marks.map(function (_ref) {
  50381. var value = _ref.value,
  50382. style = _ref.style,
  50383. label = _ref.label;
  50384. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Marks_Mark, {
  50385. key: value,
  50386. prefixCls: markPrefixCls,
  50387. style: style,
  50388. value: value,
  50389. onClick: onClick
  50390. }, label);
  50391. }));
  50392. };
  50393. /* harmony default export */ var es_Marks = (Marks);
  50394. ;// ./node_modules/rc-slider/es/Steps/Dot.js
  50395. var Dot = function Dot(props) {
  50396. var prefixCls = props.prefixCls,
  50397. value = props.value,
  50398. style = props.style,
  50399. activeStyle = props.activeStyle;
  50400. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
  50401. min = _React$useContext.min,
  50402. max = _React$useContext.max,
  50403. direction = _React$useContext.direction,
  50404. included = _React$useContext.included,
  50405. includedStart = _React$useContext.includedStart,
  50406. includedEnd = _React$useContext.includedEnd;
  50407. var dotClassName = "".concat(prefixCls, "-dot");
  50408. var active = included && includedStart <= value && value <= includedEnd;
  50409. // ============================ Offset ============================
  50410. var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getDirectionStyle(direction, value, min, max)), typeof style === 'function' ? style(value) : style);
  50411. if (active) {
  50412. mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedStyle), typeof activeStyle === 'function' ? activeStyle(value) : activeStyle);
  50413. }
  50414. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  50415. className: classnames_default()(dotClassName, (0,defineProperty["default"])({}, "".concat(dotClassName, "-active"), active)),
  50416. style: mergedStyle
  50417. });
  50418. };
  50419. /* harmony default export */ var Steps_Dot = (Dot);
  50420. ;// ./node_modules/rc-slider/es/Steps/index.js
  50421. var Steps = function Steps(props) {
  50422. var prefixCls = props.prefixCls,
  50423. marks = props.marks,
  50424. dots = props.dots,
  50425. style = props.style,
  50426. activeStyle = props.activeStyle;
  50427. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
  50428. min = _React$useContext.min,
  50429. max = _React$useContext.max,
  50430. step = _React$useContext.step;
  50431. var stepDots = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  50432. var dotSet = new Set();
  50433. // Add marks
  50434. marks.forEach(function (mark) {
  50435. dotSet.add(mark.value);
  50436. });
  50437. // Fill dots
  50438. if (dots && step !== null) {
  50439. var current = min;
  50440. while (current <= max) {
  50441. dotSet.add(current);
  50442. current += step;
  50443. }
  50444. }
  50445. return Array.from(dotSet);
  50446. }, [min, max, step, dots, marks]);
  50447. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  50448. className: "".concat(prefixCls, "-step")
  50449. }, stepDots.map(function (dotValue) {
  50450. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Steps_Dot, {
  50451. prefixCls: prefixCls,
  50452. key: dotValue,
  50453. value: dotValue,
  50454. style: style,
  50455. activeStyle: activeStyle
  50456. });
  50457. }));
  50458. };
  50459. /* harmony default export */ var es_Steps = (Steps);
  50460. ;// ./node_modules/rc-slider/es/Tracks/Track.js
  50461. var Track_Track = function Track(props) {
  50462. var prefixCls = props.prefixCls,
  50463. style = props.style,
  50464. start = props.start,
  50465. end = props.end,
  50466. index = props.index,
  50467. onStartMove = props.onStartMove,
  50468. replaceCls = props.replaceCls;
  50469. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
  50470. direction = _React$useContext.direction,
  50471. min = _React$useContext.min,
  50472. max = _React$useContext.max,
  50473. disabled = _React$useContext.disabled,
  50474. range = _React$useContext.range,
  50475. classNames = _React$useContext.classNames;
  50476. var trackPrefixCls = "".concat(prefixCls, "-track");
  50477. var offsetStart = util_getOffset(start, min, max);
  50478. var offsetEnd = util_getOffset(end, min, max);
  50479. // ============================ Events ============================
  50480. var onInternalStartMove = function onInternalStartMove(e) {
  50481. if (!disabled && onStartMove) {
  50482. onStartMove(e, -1);
  50483. }
  50484. };
  50485. // ============================ Render ============================
  50486. var positionStyle = {};
  50487. switch (direction) {
  50488. case 'rtl':
  50489. positionStyle.right = "".concat(offsetStart * 100, "%");
  50490. positionStyle.width = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
  50491. break;
  50492. case 'btt':
  50493. positionStyle.bottom = "".concat(offsetStart * 100, "%");
  50494. positionStyle.height = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
  50495. break;
  50496. case 'ttb':
  50497. positionStyle.top = "".concat(offsetStart * 100, "%");
  50498. positionStyle.height = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
  50499. break;
  50500. default:
  50501. positionStyle.left = "".concat(offsetStart * 100, "%");
  50502. positionStyle.width = "".concat(offsetEnd * 100 - offsetStart * 100, "%");
  50503. }
  50504. var className = replaceCls || classnames_default()(trackPrefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(trackPrefixCls, "-").concat(index + 1), index !== null && range), "".concat(prefixCls, "-track-draggable"), onStartMove), classNames.track);
  50505. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  50506. className: className,
  50507. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, positionStyle), style),
  50508. onMouseDown: onInternalStartMove,
  50509. onTouchStart: onInternalStartMove
  50510. });
  50511. };
  50512. /* harmony default export */ var Tracks_Track = (Track_Track);
  50513. ;// ./node_modules/rc-slider/es/Tracks/index.js
  50514. var Tracks = function Tracks(props) {
  50515. var prefixCls = props.prefixCls,
  50516. style = props.style,
  50517. values = props.values,
  50518. startPoint = props.startPoint,
  50519. onStartMove = props.onStartMove;
  50520. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_slider_es_context),
  50521. included = _React$useContext.included,
  50522. range = _React$useContext.range,
  50523. min = _React$useContext.min,
  50524. styles = _React$useContext.styles,
  50525. classNames = _React$useContext.classNames;
  50526. // =========================== List ===========================
  50527. var trackList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  50528. if (!range) {
  50529. // null value do not have track
  50530. if (values.length === 0) {
  50531. return [];
  50532. }
  50533. var startValue = startPoint !== null && startPoint !== void 0 ? startPoint : min;
  50534. var endValue = values[0];
  50535. return [{
  50536. start: Math.min(startValue, endValue),
  50537. end: Math.max(startValue, endValue)
  50538. }];
  50539. }
  50540. // Multiple
  50541. var list = [];
  50542. for (var i = 0; i < values.length - 1; i += 1) {
  50543. list.push({
  50544. start: values[i],
  50545. end: values[i + 1]
  50546. });
  50547. }
  50548. return list;
  50549. }, [values, range, startPoint, min]);
  50550. if (!included) {
  50551. return null;
  50552. }
  50553. // ========================== Render ==========================
  50554. var tracksNode = trackList !== null && trackList !== void 0 && trackList.length && (classNames.tracks || styles.tracks) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Tracks_Track, {
  50555. index: null,
  50556. prefixCls: prefixCls,
  50557. start: trackList[0].start,
  50558. end: trackList[trackList.length - 1].end,
  50559. replaceCls: classnames_default()(classNames.tracks, "".concat(prefixCls, "-tracks")),
  50560. style: styles.tracks
  50561. }) : null;
  50562. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, tracksNode, trackList.map(function (_ref, index) {
  50563. var start = _ref.start,
  50564. end = _ref.end;
  50565. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Tracks_Track, {
  50566. index: index,
  50567. prefixCls: prefixCls,
  50568. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getIndex(style, index)), styles.track),
  50569. start: start,
  50570. end: end,
  50571. key: index,
  50572. onStartMove: onStartMove
  50573. });
  50574. }));
  50575. };
  50576. /* harmony default export */ var es_Tracks = (Tracks);
  50577. ;// ./node_modules/rc-slider/es/hooks/useDrag.js
  50578. /** Drag to delete offset. It's a user experience number for dragging out */
  50579. var REMOVE_DIST = 130;
  50580. function useDrag_getPosition(e) {
  50581. var obj = 'targetTouches' in e ? e.targetTouches[0] : e;
  50582. return {
  50583. pageX: obj.pageX,
  50584. pageY: obj.pageY
  50585. };
  50586. }
  50587. function useDrag(containerRef, direction, rawValues, min, max, formatValue, triggerChange, finishChange, offsetValues, editable, minCount) {
  50588. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  50589. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  50590. draggingValue = _React$useState2[0],
  50591. setDraggingValue = _React$useState2[1];
  50592. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
  50593. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  50594. draggingIndex = _React$useState4[0],
  50595. setDraggingIndex = _React$useState4[1];
  50596. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  50597. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  50598. draggingDelete = _React$useState6[0],
  50599. setDraggingDelete = _React$useState6[1];
  50600. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(rawValues),
  50601. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  50602. cacheValues = _React$useState8[0],
  50603. setCacheValues = _React$useState8[1];
  50604. var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(rawValues),
  50605. _React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
  50606. originValues = _React$useState10[0],
  50607. setOriginValues = _React$useState10[1];
  50608. var mouseMoveEventRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  50609. var mouseUpEventRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  50610. var touchEventTargetRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  50611. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(UnstableContext),
  50612. onDragStart = _React$useContext.onDragStart,
  50613. onDragChange = _React$useContext.onDragChange;
  50614. (0,useLayoutEffect["default"])(function () {
  50615. if (draggingIndex === -1) {
  50616. setCacheValues(rawValues);
  50617. }
  50618. }, [rawValues, draggingIndex]);
  50619. // Clean up event
  50620. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  50621. return function () {
  50622. document.removeEventListener('mousemove', mouseMoveEventRef.current);
  50623. document.removeEventListener('mouseup', mouseUpEventRef.current);
  50624. if (touchEventTargetRef.current) {
  50625. touchEventTargetRef.current.removeEventListener('touchmove', mouseMoveEventRef.current);
  50626. touchEventTargetRef.current.removeEventListener('touchend', mouseUpEventRef.current);
  50627. }
  50628. };
  50629. }, []);
  50630. var flushValues = function flushValues(nextValues, nextValue, deleteMark) {
  50631. // Perf: Only update state when value changed
  50632. if (nextValue !== undefined) {
  50633. setDraggingValue(nextValue);
  50634. }
  50635. setCacheValues(nextValues);
  50636. var changeValues = nextValues;
  50637. if (deleteMark) {
  50638. changeValues = nextValues.filter(function (_, i) {
  50639. return i !== draggingIndex;
  50640. });
  50641. }
  50642. triggerChange(changeValues);
  50643. if (onDragChange) {
  50644. onDragChange({
  50645. rawValues: nextValues,
  50646. deleteIndex: deleteMark ? draggingIndex : -1,
  50647. draggingIndex: draggingIndex,
  50648. draggingValue: nextValue
  50649. });
  50650. }
  50651. };
  50652. var updateCacheValue = (0,useEvent["default"])(function (valueIndex, offsetPercent, deleteMark) {
  50653. if (valueIndex === -1) {
  50654. // >>>> Dragging on the track
  50655. var startValue = originValues[0];
  50656. var endValue = originValues[originValues.length - 1];
  50657. var maxStartOffset = min - startValue;
  50658. var maxEndOffset = max - endValue;
  50659. // Get valid offset
  50660. var offset = offsetPercent * (max - min);
  50661. offset = Math.max(offset, maxStartOffset);
  50662. offset = Math.min(offset, maxEndOffset);
  50663. // Use first value to revert back of valid offset (like steps marks)
  50664. var formatStartValue = formatValue(startValue + offset);
  50665. offset = formatStartValue - startValue;
  50666. var cloneCacheValues = originValues.map(function (val) {
  50667. return val + offset;
  50668. });
  50669. flushValues(cloneCacheValues);
  50670. } else {
  50671. // >>>> Dragging on the handle
  50672. var offsetDist = (max - min) * offsetPercent;
  50673. // Always start with the valueIndex origin value
  50674. var cloneValues = (0,toConsumableArray["default"])(cacheValues);
  50675. cloneValues[valueIndex] = originValues[valueIndex];
  50676. var next = offsetValues(cloneValues, offsetDist, valueIndex, 'dist');
  50677. flushValues(next.values, next.value, deleteMark);
  50678. }
  50679. });
  50680. var onStartMove = function onStartMove(e, valueIndex, startValues) {
  50681. e.stopPropagation();
  50682. // 如果是点击 track 触发的,需要传入变化后的初始值,而不能直接用 rawValues
  50683. var initialValues = startValues || rawValues;
  50684. var originValue = initialValues[valueIndex];
  50685. setDraggingIndex(valueIndex);
  50686. setDraggingValue(originValue);
  50687. setOriginValues(initialValues);
  50688. setCacheValues(initialValues);
  50689. setDraggingDelete(false);
  50690. var _getPosition = useDrag_getPosition(e),
  50691. startX = _getPosition.pageX,
  50692. startY = _getPosition.pageY;
  50693. // We declare it here since closure can't get outer latest value
  50694. var deleteMark = false;
  50695. // Internal trigger event
  50696. if (onDragStart) {
  50697. onDragStart({
  50698. rawValues: initialValues,
  50699. draggingIndex: valueIndex,
  50700. draggingValue: originValue
  50701. });
  50702. }
  50703. // Moving
  50704. var onMouseMove = function onMouseMove(event) {
  50705. event.preventDefault();
  50706. var _getPosition2 = useDrag_getPosition(event),
  50707. moveX = _getPosition2.pageX,
  50708. moveY = _getPosition2.pageY;
  50709. var offsetX = moveX - startX;
  50710. var offsetY = moveY - startY;
  50711. var _containerRef$current = containerRef.current.getBoundingClientRect(),
  50712. width = _containerRef$current.width,
  50713. height = _containerRef$current.height;
  50714. var offSetPercent;
  50715. var removeDist;
  50716. switch (direction) {
  50717. case 'btt':
  50718. offSetPercent = -offsetY / height;
  50719. removeDist = offsetX;
  50720. break;
  50721. case 'ttb':
  50722. offSetPercent = offsetY / height;
  50723. removeDist = offsetX;
  50724. break;
  50725. case 'rtl':
  50726. offSetPercent = -offsetX / width;
  50727. removeDist = offsetY;
  50728. break;
  50729. default:
  50730. offSetPercent = offsetX / width;
  50731. removeDist = offsetY;
  50732. }
  50733. // Check if need mark remove
  50734. deleteMark = editable ? Math.abs(removeDist) > REMOVE_DIST && minCount < cacheValues.length : false;
  50735. setDraggingDelete(deleteMark);
  50736. updateCacheValue(valueIndex, offSetPercent, deleteMark);
  50737. };
  50738. // End
  50739. var onMouseUp = function onMouseUp(event) {
  50740. event.preventDefault();
  50741. document.removeEventListener('mouseup', onMouseUp);
  50742. document.removeEventListener('mousemove', onMouseMove);
  50743. if (touchEventTargetRef.current) {
  50744. touchEventTargetRef.current.removeEventListener('touchmove', mouseMoveEventRef.current);
  50745. touchEventTargetRef.current.removeEventListener('touchend', mouseUpEventRef.current);
  50746. }
  50747. mouseMoveEventRef.current = null;
  50748. mouseUpEventRef.current = null;
  50749. touchEventTargetRef.current = null;
  50750. finishChange(deleteMark);
  50751. setDraggingIndex(-1);
  50752. setDraggingDelete(false);
  50753. };
  50754. document.addEventListener('mouseup', onMouseUp);
  50755. document.addEventListener('mousemove', onMouseMove);
  50756. e.currentTarget.addEventListener('touchend', onMouseUp);
  50757. e.currentTarget.addEventListener('touchmove', onMouseMove);
  50758. mouseMoveEventRef.current = onMouseMove;
  50759. mouseUpEventRef.current = onMouseUp;
  50760. touchEventTargetRef.current = e.currentTarget;
  50761. };
  50762. // Only return cache value when it mapping with rawValues
  50763. var returnValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  50764. var sourceValues = (0,toConsumableArray["default"])(rawValues).sort(function (a, b) {
  50765. return a - b;
  50766. });
  50767. var targetValues = (0,toConsumableArray["default"])(cacheValues).sort(function (a, b) {
  50768. return a - b;
  50769. });
  50770. var counts = {};
  50771. targetValues.forEach(function (val) {
  50772. counts[val] = (counts[val] || 0) + 1;
  50773. });
  50774. sourceValues.forEach(function (val) {
  50775. counts[val] = (counts[val] || 0) - 1;
  50776. });
  50777. var maxDiffCount = editable ? 1 : 0;
  50778. var diffCount = Object.values(counts).reduce(function (prev, next) {
  50779. return prev + Math.abs(next);
  50780. }, 0);
  50781. return diffCount <= maxDiffCount ? cacheValues : rawValues;
  50782. }, [rawValues, cacheValues, editable]);
  50783. return [draggingIndex, draggingValue, draggingDelete, returnValues, onStartMove];
  50784. }
  50785. /* harmony default export */ var hooks_useDrag = (useDrag);
  50786. ;// ./node_modules/rc-slider/es/hooks/useOffset.js
  50787. /** Format the value in the range of [min, max] */
  50788. /** Format value align with step */
  50789. /** Format value align with step & marks */
  50790. function useOffset(min, max, step, markList, allowCross, pushable) {
  50791. var formatRangeValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
  50792. return Math.max(min, Math.min(max, val));
  50793. }, [min, max]);
  50794. var formatStepValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
  50795. if (step !== null) {
  50796. var stepValue = min + Math.round((formatRangeValue(val) - min) / step) * step;
  50797. // Cut number in case to be like 0.30000000000000004
  50798. var getDecimal = function getDecimal(num) {
  50799. return (String(num).split('.')[1] || '').length;
  50800. };
  50801. var maxDecimal = Math.max(getDecimal(step), getDecimal(max), getDecimal(min));
  50802. var fixedValue = Number(stepValue.toFixed(maxDecimal));
  50803. return min <= fixedValue && fixedValue <= max ? fixedValue : null;
  50804. }
  50805. return null;
  50806. }, [step, min, max, formatRangeValue]);
  50807. var formatValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (val) {
  50808. var formatNextValue = formatRangeValue(val);
  50809. // List align values
  50810. var alignValues = markList.map(function (mark) {
  50811. return mark.value;
  50812. });
  50813. if (step !== null) {
  50814. alignValues.push(formatStepValue(val));
  50815. }
  50816. // min & max
  50817. alignValues.push(min, max);
  50818. // Align with marks
  50819. var closeValue = alignValues[0];
  50820. var closeDist = max - min;
  50821. alignValues.forEach(function (alignValue) {
  50822. var dist = Math.abs(formatNextValue - alignValue);
  50823. if (dist <= closeDist) {
  50824. closeValue = alignValue;
  50825. closeDist = dist;
  50826. }
  50827. });
  50828. return closeValue;
  50829. }, [min, max, markList, step, formatRangeValue, formatStepValue]);
  50830. // ========================== Offset ==========================
  50831. // Single Value
  50832. var offsetValue = function offsetValue(values, offset, valueIndex) {
  50833. var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
  50834. if (typeof offset === 'number') {
  50835. var nextValue;
  50836. var originValue = values[valueIndex];
  50837. // Only used for `dist` mode
  50838. var targetDistValue = originValue + offset;
  50839. // Compare next step value & mark value which is best match
  50840. var potentialValues = [];
  50841. markList.forEach(function (mark) {
  50842. potentialValues.push(mark.value);
  50843. });
  50844. // Min & Max
  50845. potentialValues.push(min, max);
  50846. // In case origin value is align with mark but not with step
  50847. potentialValues.push(formatStepValue(originValue));
  50848. // Put offset step value also
  50849. var sign = offset > 0 ? 1 : -1;
  50850. if (mode === 'unit') {
  50851. potentialValues.push(formatStepValue(originValue + sign * step));
  50852. } else {
  50853. potentialValues.push(formatStepValue(targetDistValue));
  50854. }
  50855. // Find close one
  50856. potentialValues = potentialValues.filter(function (val) {
  50857. return val !== null;
  50858. })
  50859. // Remove reverse value
  50860. .filter(function (val) {
  50861. return offset < 0 ? val <= originValue : val >= originValue;
  50862. });
  50863. if (mode === 'unit') {
  50864. // `unit` mode can not contain itself
  50865. potentialValues = potentialValues.filter(function (val) {
  50866. return val !== originValue;
  50867. });
  50868. }
  50869. var compareValue = mode === 'unit' ? originValue : targetDistValue;
  50870. nextValue = potentialValues[0];
  50871. var valueDist = Math.abs(nextValue - compareValue);
  50872. potentialValues.forEach(function (potentialValue) {
  50873. var dist = Math.abs(potentialValue - compareValue);
  50874. if (dist < valueDist) {
  50875. nextValue = potentialValue;
  50876. valueDist = dist;
  50877. }
  50878. });
  50879. // Out of range will back to range
  50880. if (nextValue === undefined) {
  50881. return offset < 0 ? min : max;
  50882. }
  50883. // `dist` mode
  50884. if (mode === 'dist') {
  50885. return nextValue;
  50886. }
  50887. // `unit` mode may need another round
  50888. if (Math.abs(offset) > 1) {
  50889. var cloneValues = (0,toConsumableArray["default"])(values);
  50890. cloneValues[valueIndex] = nextValue;
  50891. return offsetValue(cloneValues, offset - sign, valueIndex, mode);
  50892. }
  50893. return nextValue;
  50894. } else if (offset === 'min') {
  50895. return min;
  50896. } else if (offset === 'max') {
  50897. return max;
  50898. }
  50899. };
  50900. /** Same as `offsetValue` but return `changed` mark to tell value changed */
  50901. var offsetChangedValue = function offsetChangedValue(values, offset, valueIndex) {
  50902. var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
  50903. var originValue = values[valueIndex];
  50904. var nextValue = offsetValue(values, offset, valueIndex, mode);
  50905. return {
  50906. value: nextValue,
  50907. changed: nextValue !== originValue
  50908. };
  50909. };
  50910. var needPush = function needPush(dist) {
  50911. return pushable === null && dist === 0 || typeof pushable === 'number' && dist < pushable;
  50912. };
  50913. // Values
  50914. var offsetValues = function offsetValues(values, offset, valueIndex) {
  50915. var mode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'unit';
  50916. var nextValues = values.map(formatValue);
  50917. var originValue = nextValues[valueIndex];
  50918. var nextValue = offsetValue(nextValues, offset, valueIndex, mode);
  50919. nextValues[valueIndex] = nextValue;
  50920. if (allowCross === false) {
  50921. // >>>>> Allow Cross
  50922. var pushNum = pushable || 0;
  50923. // ============ AllowCross ===============
  50924. if (valueIndex > 0 && nextValues[valueIndex - 1] !== originValue) {
  50925. nextValues[valueIndex] = Math.max(nextValues[valueIndex], nextValues[valueIndex - 1] + pushNum);
  50926. }
  50927. if (valueIndex < nextValues.length - 1 && nextValues[valueIndex + 1] !== originValue) {
  50928. nextValues[valueIndex] = Math.min(nextValues[valueIndex], nextValues[valueIndex + 1] - pushNum);
  50929. }
  50930. } else if (typeof pushable === 'number' || pushable === null) {
  50931. // >>>>> Pushable
  50932. // =============== Push ==================
  50933. // >>>>>> Basic push
  50934. // End values
  50935. for (var i = valueIndex + 1; i < nextValues.length; i += 1) {
  50936. var changed = true;
  50937. while (needPush(nextValues[i] - nextValues[i - 1]) && changed) {
  50938. var _offsetChangedValue = offsetChangedValue(nextValues, 1, i);
  50939. nextValues[i] = _offsetChangedValue.value;
  50940. changed = _offsetChangedValue.changed;
  50941. }
  50942. }
  50943. // Start values
  50944. for (var _i = valueIndex; _i > 0; _i -= 1) {
  50945. var _changed = true;
  50946. while (needPush(nextValues[_i] - nextValues[_i - 1]) && _changed) {
  50947. var _offsetChangedValue2 = offsetChangedValue(nextValues, -1, _i - 1);
  50948. nextValues[_i - 1] = _offsetChangedValue2.value;
  50949. _changed = _offsetChangedValue2.changed;
  50950. }
  50951. }
  50952. // >>>>> Revert back to safe push range
  50953. // End to Start
  50954. for (var _i2 = nextValues.length - 1; _i2 > 0; _i2 -= 1) {
  50955. var _changed2 = true;
  50956. while (needPush(nextValues[_i2] - nextValues[_i2 - 1]) && _changed2) {
  50957. var _offsetChangedValue3 = offsetChangedValue(nextValues, -1, _i2 - 1);
  50958. nextValues[_i2 - 1] = _offsetChangedValue3.value;
  50959. _changed2 = _offsetChangedValue3.changed;
  50960. }
  50961. }
  50962. // Start to End
  50963. for (var _i3 = 0; _i3 < nextValues.length - 1; _i3 += 1) {
  50964. var _changed3 = true;
  50965. while (needPush(nextValues[_i3 + 1] - nextValues[_i3]) && _changed3) {
  50966. var _offsetChangedValue4 = offsetChangedValue(nextValues, 1, _i3 + 1);
  50967. nextValues[_i3 + 1] = _offsetChangedValue4.value;
  50968. _changed3 = _offsetChangedValue4.changed;
  50969. }
  50970. }
  50971. }
  50972. return {
  50973. value: nextValues[valueIndex],
  50974. values: nextValues
  50975. };
  50976. };
  50977. return [formatValue, offsetValues];
  50978. }
  50979. ;// ./node_modules/rc-slider/es/hooks/useRange.js
  50980. function useRange(range) {
  50981. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  50982. if (range === true || !range) {
  50983. return [!!range, false, false, 0];
  50984. }
  50985. var editable = range.editable,
  50986. draggableTrack = range.draggableTrack,
  50987. minCount = range.minCount,
  50988. maxCount = range.maxCount;
  50989. if (true) {
  50990. (0,warning.warning)(!editable || !draggableTrack, '`editable` can not work with `draggableTrack`.');
  50991. }
  50992. return [true, editable, !editable && draggableTrack, minCount || 0, maxCount];
  50993. }, [range]);
  50994. }
  50995. ;// ./node_modules/rc-slider/es/Slider.js
  50996. /**
  50997. * New:
  50998. * - click mark to update range value
  50999. * - handleRender
  51000. * - Fix handle with count not correct
  51001. * - Fix pushable not work in some case
  51002. * - No more FindDOMNode
  51003. * - Move all position related style into inline style
  51004. * - Key: up is plus, down is minus
  51005. * - fix Key with step = null not align with marks
  51006. * - Change range should not trigger onChange
  51007. * - keyboard support pushable
  51008. */
  51009. var Slider_Slider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  51010. var _props$prefixCls = props.prefixCls,
  51011. prefixCls = _props$prefixCls === void 0 ? 'rc-slider' : _props$prefixCls,
  51012. className = props.className,
  51013. style = props.style,
  51014. classNames = props.classNames,
  51015. styles = props.styles,
  51016. id = props.id,
  51017. _props$disabled = props.disabled,
  51018. disabled = _props$disabled === void 0 ? false : _props$disabled,
  51019. _props$keyboard = props.keyboard,
  51020. keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
  51021. autoFocus = props.autoFocus,
  51022. onFocus = props.onFocus,
  51023. onBlur = props.onBlur,
  51024. _props$min = props.min,
  51025. min = _props$min === void 0 ? 0 : _props$min,
  51026. _props$max = props.max,
  51027. max = _props$max === void 0 ? 100 : _props$max,
  51028. _props$step = props.step,
  51029. step = _props$step === void 0 ? 1 : _props$step,
  51030. value = props.value,
  51031. defaultValue = props.defaultValue,
  51032. range = props.range,
  51033. count = props.count,
  51034. onChange = props.onChange,
  51035. onBeforeChange = props.onBeforeChange,
  51036. onAfterChange = props.onAfterChange,
  51037. onChangeComplete = props.onChangeComplete,
  51038. _props$allowCross = props.allowCross,
  51039. allowCross = _props$allowCross === void 0 ? true : _props$allowCross,
  51040. _props$pushable = props.pushable,
  51041. pushable = _props$pushable === void 0 ? false : _props$pushable,
  51042. reverse = props.reverse,
  51043. vertical = props.vertical,
  51044. _props$included = props.included,
  51045. included = _props$included === void 0 ? true : _props$included,
  51046. startPoint = props.startPoint,
  51047. trackStyle = props.trackStyle,
  51048. handleStyle = props.handleStyle,
  51049. railStyle = props.railStyle,
  51050. dotStyle = props.dotStyle,
  51051. activeDotStyle = props.activeDotStyle,
  51052. marks = props.marks,
  51053. dots = props.dots,
  51054. handleRender = props.handleRender,
  51055. activeHandleRender = props.activeHandleRender,
  51056. track = props.track,
  51057. _props$tabIndex = props.tabIndex,
  51058. tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
  51059. ariaLabelForHandle = props.ariaLabelForHandle,
  51060. ariaLabelledByForHandle = props.ariaLabelledByForHandle,
  51061. ariaRequired = props.ariaRequired,
  51062. ariaValueTextFormatterForHandle = props.ariaValueTextFormatterForHandle;
  51063. var handlesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  51064. var containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  51065. var direction = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51066. if (vertical) {
  51067. return reverse ? 'ttb' : 'btt';
  51068. }
  51069. return reverse ? 'rtl' : 'ltr';
  51070. }, [reverse, vertical]);
  51071. // ============================ Range =============================
  51072. var _useRange = useRange(range),
  51073. _useRange2 = (0,slicedToArray["default"])(_useRange, 5),
  51074. rangeEnabled = _useRange2[0],
  51075. rangeEditable = _useRange2[1],
  51076. rangeDraggableTrack = _useRange2[2],
  51077. minCount = _useRange2[3],
  51078. maxCount = _useRange2[4];
  51079. var mergedMin = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51080. return isFinite(min) ? min : 0;
  51081. }, [min]);
  51082. var mergedMax = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51083. return isFinite(max) ? max : 100;
  51084. }, [max]);
  51085. // ============================= Step =============================
  51086. var mergedStep = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51087. return step !== null && step <= 0 ? 1 : step;
  51088. }, [step]);
  51089. // ============================= Push =============================
  51090. var mergedPush = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51091. if (typeof pushable === 'boolean') {
  51092. return pushable ? mergedStep : false;
  51093. }
  51094. return pushable >= 0 ? pushable : false;
  51095. }, [pushable, mergedStep]);
  51096. // ============================ Marks =============================
  51097. var markList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51098. return Object.keys(marks || {}).map(function (key) {
  51099. var mark = marks[key];
  51100. var markObj = {
  51101. value: Number(key)
  51102. };
  51103. if (mark && (0,esm_typeof["default"])(mark) === 'object' && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mark) && ('label' in mark || 'style' in mark)) {
  51104. markObj.style = mark.style;
  51105. markObj.label = mark.label;
  51106. } else {
  51107. markObj.label = mark;
  51108. }
  51109. return markObj;
  51110. }).filter(function (_ref) {
  51111. var label = _ref.label;
  51112. return label || typeof label === 'number';
  51113. }).sort(function (a, b) {
  51114. return a.value - b.value;
  51115. });
  51116. }, [marks]);
  51117. // ============================ Format ============================
  51118. var _useOffset = useOffset(mergedMin, mergedMax, mergedStep, markList, allowCross, mergedPush),
  51119. _useOffset2 = (0,slicedToArray["default"])(_useOffset, 2),
  51120. formatValue = _useOffset2[0],
  51121. offsetValues = _useOffset2[1];
  51122. // ============================ Values ============================
  51123. var _useMergedState = (0,useMergedState["default"])(defaultValue, {
  51124. value: value
  51125. }),
  51126. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  51127. mergedValue = _useMergedState2[0],
  51128. setValue = _useMergedState2[1];
  51129. var rawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51130. var valueList = mergedValue === null || mergedValue === undefined ? [] : Array.isArray(mergedValue) ? mergedValue : [mergedValue];
  51131. var _valueList = (0,slicedToArray["default"])(valueList, 1),
  51132. _valueList$ = _valueList[0],
  51133. val0 = _valueList$ === void 0 ? mergedMin : _valueList$;
  51134. var returnValues = mergedValue === null ? [] : [val0];
  51135. // Format as range
  51136. if (rangeEnabled) {
  51137. returnValues = (0,toConsumableArray["default"])(valueList);
  51138. // When count provided or value is `undefined`, we fill values
  51139. if (count || mergedValue === undefined) {
  51140. var pointCount = count >= 0 ? count + 1 : 2;
  51141. returnValues = returnValues.slice(0, pointCount);
  51142. // Fill with count
  51143. while (returnValues.length < pointCount) {
  51144. var _returnValues;
  51145. returnValues.push((_returnValues = returnValues[returnValues.length - 1]) !== null && _returnValues !== void 0 ? _returnValues : mergedMin);
  51146. }
  51147. }
  51148. returnValues.sort(function (a, b) {
  51149. return a - b;
  51150. });
  51151. }
  51152. // Align in range
  51153. returnValues.forEach(function (val, index) {
  51154. returnValues[index] = formatValue(val);
  51155. });
  51156. return returnValues;
  51157. }, [mergedValue, rangeEnabled, mergedMin, count, formatValue]);
  51158. // =========================== onChange ===========================
  51159. var getTriggerValue = function getTriggerValue(triggerValues) {
  51160. return rangeEnabled ? triggerValues : triggerValues[0];
  51161. };
  51162. var triggerChange = (0,useEvent["default"])(function (nextValues) {
  51163. // Order first
  51164. var cloneNextValues = (0,toConsumableArray["default"])(nextValues).sort(function (a, b) {
  51165. return a - b;
  51166. });
  51167. // Trigger event if needed
  51168. if (onChange && !(0,isEqual["default"])(cloneNextValues, rawValues, true)) {
  51169. onChange(getTriggerValue(cloneNextValues));
  51170. }
  51171. // We set this later since it will re-render component immediately
  51172. setValue(cloneNextValues);
  51173. });
  51174. var finishChange = (0,useEvent["default"])(function (draggingDelete) {
  51175. // Trigger from `useDrag` will tell if it's a delete action
  51176. if (draggingDelete) {
  51177. handlesRef.current.hideHelp();
  51178. }
  51179. var finishValue = getTriggerValue(rawValues);
  51180. onAfterChange === null || onAfterChange === void 0 || onAfterChange(finishValue);
  51181. (0,warning["default"])(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');
  51182. onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(finishValue);
  51183. });
  51184. var onDelete = function onDelete(index) {
  51185. if (disabled || !rangeEditable || rawValues.length <= minCount) {
  51186. return;
  51187. }
  51188. var cloneNextValues = (0,toConsumableArray["default"])(rawValues);
  51189. cloneNextValues.splice(index, 1);
  51190. onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(cloneNextValues));
  51191. triggerChange(cloneNextValues);
  51192. var nextFocusIndex = Math.max(0, index - 1);
  51193. handlesRef.current.hideHelp();
  51194. handlesRef.current.focus(nextFocusIndex);
  51195. };
  51196. var _useDrag = hooks_useDrag(containerRef, direction, rawValues, mergedMin, mergedMax, formatValue, triggerChange, finishChange, offsetValues, rangeEditable, minCount),
  51197. _useDrag2 = (0,slicedToArray["default"])(_useDrag, 5),
  51198. draggingIndex = _useDrag2[0],
  51199. draggingValue = _useDrag2[1],
  51200. draggingDelete = _useDrag2[2],
  51201. cacheValues = _useDrag2[3],
  51202. onStartDrag = _useDrag2[4];
  51203. /**
  51204. * When `rangeEditable` will insert a new value in the values array.
  51205. * Else it will replace the value in the values array.
  51206. */
  51207. var changeToCloseValue = function changeToCloseValue(newValue, e) {
  51208. if (!disabled) {
  51209. // Create new values
  51210. var cloneNextValues = (0,toConsumableArray["default"])(rawValues);
  51211. var valueIndex = 0;
  51212. var valueBeforeIndex = 0; // Record the index which value < newValue
  51213. var valueDist = mergedMax - mergedMin;
  51214. rawValues.forEach(function (val, index) {
  51215. var dist = Math.abs(newValue - val);
  51216. if (dist <= valueDist) {
  51217. valueDist = dist;
  51218. valueIndex = index;
  51219. }
  51220. if (val < newValue) {
  51221. valueBeforeIndex = index;
  51222. }
  51223. });
  51224. var focusIndex = valueIndex;
  51225. if (rangeEditable && valueDist !== 0 && (!maxCount || rawValues.length < maxCount)) {
  51226. cloneNextValues.splice(valueBeforeIndex + 1, 0, newValue);
  51227. focusIndex = valueBeforeIndex + 1;
  51228. } else {
  51229. cloneNextValues[valueIndex] = newValue;
  51230. }
  51231. // Fill value to match default 2 (only when `rawValues` is empty)
  51232. if (rangeEnabled && !rawValues.length && count === undefined) {
  51233. cloneNextValues.push(newValue);
  51234. }
  51235. var nextValue = getTriggerValue(cloneNextValues);
  51236. onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(nextValue);
  51237. triggerChange(cloneNextValues);
  51238. if (e) {
  51239. var _document$activeEleme, _document$activeEleme2;
  51240. (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || (_document$activeEleme2 = _document$activeEleme.blur) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.call(_document$activeEleme);
  51241. handlesRef.current.focus(focusIndex);
  51242. onStartDrag(e, focusIndex, cloneNextValues);
  51243. } else {
  51244. // https://github.com/ant-design/ant-design/issues/49997
  51245. onAfterChange === null || onAfterChange === void 0 || onAfterChange(nextValue);
  51246. (0,warning["default"])(!onAfterChange, '[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead.');
  51247. onChangeComplete === null || onChangeComplete === void 0 || onChangeComplete(nextValue);
  51248. }
  51249. }
  51250. };
  51251. // ============================ Click =============================
  51252. var onSliderMouseDown = function onSliderMouseDown(e) {
  51253. e.preventDefault();
  51254. var _containerRef$current = containerRef.current.getBoundingClientRect(),
  51255. width = _containerRef$current.width,
  51256. height = _containerRef$current.height,
  51257. left = _containerRef$current.left,
  51258. top = _containerRef$current.top,
  51259. bottom = _containerRef$current.bottom,
  51260. right = _containerRef$current.right;
  51261. var clientX = e.clientX,
  51262. clientY = e.clientY;
  51263. var percent;
  51264. switch (direction) {
  51265. case 'btt':
  51266. percent = (bottom - clientY) / height;
  51267. break;
  51268. case 'ttb':
  51269. percent = (clientY - top) / height;
  51270. break;
  51271. case 'rtl':
  51272. percent = (right - clientX) / width;
  51273. break;
  51274. default:
  51275. percent = (clientX - left) / width;
  51276. }
  51277. var nextValue = mergedMin + percent * (mergedMax - mergedMin);
  51278. changeToCloseValue(formatValue(nextValue), e);
  51279. };
  51280. // =========================== Keyboard ===========================
  51281. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  51282. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  51283. keyboardValue = _React$useState2[0],
  51284. setKeyboardValue = _React$useState2[1];
  51285. var onHandleOffsetChange = function onHandleOffsetChange(offset, valueIndex) {
  51286. if (!disabled) {
  51287. var next = offsetValues(rawValues, offset, valueIndex);
  51288. onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));
  51289. triggerChange(next.values);
  51290. setKeyboardValue(next.value);
  51291. }
  51292. };
  51293. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  51294. if (keyboardValue !== null) {
  51295. var valueIndex = rawValues.indexOf(keyboardValue);
  51296. if (valueIndex >= 0) {
  51297. handlesRef.current.focus(valueIndex);
  51298. }
  51299. }
  51300. setKeyboardValue(null);
  51301. }, [keyboardValue]);
  51302. // ============================= Drag =============================
  51303. var mergedDraggableTrack = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51304. if (rangeDraggableTrack && mergedStep === null) {
  51305. if (true) {
  51306. (0,warning["default"])(false, '`draggableTrack` is not supported when `step` is `null`.');
  51307. }
  51308. return false;
  51309. }
  51310. return rangeDraggableTrack;
  51311. }, [rangeDraggableTrack, mergedStep]);
  51312. var onStartMove = (0,useEvent["default"])(function (e, valueIndex) {
  51313. onStartDrag(e, valueIndex);
  51314. onBeforeChange === null || onBeforeChange === void 0 || onBeforeChange(getTriggerValue(rawValues));
  51315. });
  51316. // Auto focus for updated handle
  51317. var dragging = draggingIndex !== -1;
  51318. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  51319. if (!dragging) {
  51320. var valueIndex = rawValues.lastIndexOf(draggingValue);
  51321. handlesRef.current.focus(valueIndex);
  51322. }
  51323. }, [dragging]);
  51324. // =========================== Included ===========================
  51325. var sortedCacheValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51326. return (0,toConsumableArray["default"])(cacheValues).sort(function (a, b) {
  51327. return a - b;
  51328. });
  51329. }, [cacheValues]);
  51330. // Provide a range values with included [min, max]
  51331. // Used for Track, Mark & Dot
  51332. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51333. if (!rangeEnabled) {
  51334. return [mergedMin, sortedCacheValues[0]];
  51335. }
  51336. return [sortedCacheValues[0], sortedCacheValues[sortedCacheValues.length - 1]];
  51337. }, [sortedCacheValues, rangeEnabled, mergedMin]),
  51338. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
  51339. includedStart = _React$useMemo2[0],
  51340. includedEnd = _React$useMemo2[1];
  51341. // ============================= Refs =============================
  51342. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  51343. return {
  51344. focus: function focus() {
  51345. handlesRef.current.focus(0);
  51346. },
  51347. blur: function blur() {
  51348. var _containerRef$current2;
  51349. var _document = document,
  51350. activeElement = _document.activeElement;
  51351. if ((_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(activeElement)) {
  51352. activeElement === null || activeElement === void 0 || activeElement.blur();
  51353. }
  51354. }
  51355. };
  51356. });
  51357. // ========================== Auto Focus ==========================
  51358. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  51359. if (autoFocus) {
  51360. handlesRef.current.focus(0);
  51361. }
  51362. }, []);
  51363. // =========================== Context ============================
  51364. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  51365. return {
  51366. min: mergedMin,
  51367. max: mergedMax,
  51368. direction: direction,
  51369. disabled: disabled,
  51370. keyboard: keyboard,
  51371. step: mergedStep,
  51372. included: included,
  51373. includedStart: includedStart,
  51374. includedEnd: includedEnd,
  51375. range: rangeEnabled,
  51376. tabIndex: tabIndex,
  51377. ariaLabelForHandle: ariaLabelForHandle,
  51378. ariaLabelledByForHandle: ariaLabelledByForHandle,
  51379. ariaRequired: ariaRequired,
  51380. ariaValueTextFormatterForHandle: ariaValueTextFormatterForHandle,
  51381. styles: styles || {},
  51382. classNames: classNames || {}
  51383. };
  51384. }, [mergedMin, mergedMax, direction, disabled, keyboard, mergedStep, included, includedStart, includedEnd, rangeEnabled, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaRequired, ariaValueTextFormatterForHandle, styles, classNames]);
  51385. // ============================ Render ============================
  51386. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_slider_es_context.Provider, {
  51387. value: context
  51388. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  51389. ref: containerRef,
  51390. className: classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-vertical"), vertical), "".concat(prefixCls, "-horizontal"), !vertical), "".concat(prefixCls, "-with-marks"), markList.length)),
  51391. style: style,
  51392. onMouseDown: onSliderMouseDown,
  51393. id: id
  51394. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  51395. className: classnames_default()("".concat(prefixCls, "-rail"), classNames === null || classNames === void 0 ? void 0 : classNames.rail),
  51396. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, railStyle), styles === null || styles === void 0 ? void 0 : styles.rail)
  51397. }), track !== false && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Tracks, {
  51398. prefixCls: prefixCls,
  51399. style: trackStyle,
  51400. values: rawValues,
  51401. startPoint: startPoint,
  51402. onStartMove: mergedDraggableTrack ? onStartMove : undefined
  51403. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Steps, {
  51404. prefixCls: prefixCls,
  51405. marks: markList,
  51406. dots: dots,
  51407. style: dotStyle,
  51408. activeStyle: activeDotStyle
  51409. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Handles, {
  51410. ref: handlesRef,
  51411. prefixCls: prefixCls,
  51412. style: handleStyle,
  51413. values: cacheValues,
  51414. draggingIndex: draggingIndex,
  51415. draggingDelete: draggingDelete,
  51416. onStartMove: onStartMove,
  51417. onOffsetChange: onHandleOffsetChange,
  51418. onFocus: onFocus,
  51419. onBlur: onBlur,
  51420. handleRender: handleRender,
  51421. activeHandleRender: activeHandleRender,
  51422. onChangeComplete: finishChange,
  51423. onDelete: rangeEditable ? onDelete : undefined
  51424. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Marks, {
  51425. prefixCls: prefixCls,
  51426. marks: markList,
  51427. onClick: changeToCloseValue
  51428. })));
  51429. });
  51430. if (true) {
  51431. Slider_Slider.displayName = 'Slider';
  51432. }
  51433. /* harmony default export */ var es_Slider = (Slider_Slider);
  51434. ;// ./node_modules/rc-slider/es/index.js
  51435. /* harmony default export */ var rc_slider_es = (es_Slider);
  51436. ;// ./components/slider/Context.ts
  51437. /** @private Internal context. Do not use in your production. */
  51438. const SliderInternalContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
  51439. /* harmony default export */ var slider_Context = (SliderInternalContext);
  51440. ;// ./components/slider/SliderTooltip.tsx
  51441. const SliderTooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  51442. const {
  51443. open,
  51444. draggingDelete,
  51445. value
  51446. } = props;
  51447. const innerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  51448. const mergedOpen = open && !draggingDelete;
  51449. const rafRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  51450. function cancelKeepAlign() {
  51451. raf["default"].cancel(rafRef.current);
  51452. rafRef.current = null;
  51453. }
  51454. function keepAlign() {
  51455. rafRef.current = (0,raf["default"])(() => {
  51456. var _a;
  51457. (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.forceAlign();
  51458. rafRef.current = null;
  51459. });
  51460. }
  51461. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  51462. if (mergedOpen) {
  51463. keepAlign();
  51464. } else {
  51465. cancelKeepAlign();
  51466. }
  51467. return cancelKeepAlign;
  51468. }, [mergedOpen, props.title, value]);
  51469. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({
  51470. ref: (0,es_ref.composeRef)(innerRef, ref)
  51471. }, props, {
  51472. open: mergedOpen
  51473. }));
  51474. });
  51475. if (true) {
  51476. SliderTooltip.displayName = 'SliderTooltip';
  51477. }
  51478. /* harmony default export */ var slider_SliderTooltip = (SliderTooltip);
  51479. // EXTERNAL MODULE: ./components/slider/style/index.ts
  51480. var slider_style = __webpack_require__("./components/slider/style/index.ts");
  51481. ;// ./components/slider/useRafLock.ts
  51482. function useRafLock() {
  51483. const [state, setState] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  51484. const rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  51485. const cleanup = () => {
  51486. raf["default"].cancel(rafRef.current);
  51487. };
  51488. const setDelayState = nextState => {
  51489. cleanup();
  51490. if (nextState) {
  51491. setState(nextState);
  51492. } else {
  51493. rafRef.current = (0,raf["default"])(() => {
  51494. setState(nextState);
  51495. });
  51496. }
  51497. };
  51498. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => cleanup, []);
  51499. return [state, setDelayState];
  51500. }
  51501. ;// ./components/slider/index.tsx
  51502. var slider_rest = undefined && undefined.__rest || function (s, e) {
  51503. var t = {};
  51504. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  51505. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  51506. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  51507. }
  51508. return t;
  51509. };
  51510. function getTipFormatter(tipFormatter, legacyTipFormatter) {
  51511. if (tipFormatter || tipFormatter === null) {
  51512. return tipFormatter;
  51513. }
  51514. if (legacyTipFormatter || legacyTipFormatter === null) {
  51515. return legacyTipFormatter;
  51516. }
  51517. return val => typeof val === 'number' ? val.toString() : '';
  51518. }
  51519. const slider_Slider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  51520. const {
  51521. prefixCls: customizePrefixCls,
  51522. range,
  51523. className,
  51524. rootClassName,
  51525. style,
  51526. disabled,
  51527. // Deprecated Props
  51528. tooltipPrefixCls: legacyTooltipPrefixCls,
  51529. tipFormatter: legacyTipFormatter,
  51530. tooltipVisible: legacyTooltipVisible,
  51531. getTooltipPopupContainer: legacyGetTooltipPopupContainer,
  51532. tooltipPlacement: legacyTooltipPlacement,
  51533. tooltip = {},
  51534. onChangeComplete,
  51535. classNames: sliderClassNames,
  51536. styles
  51537. } = props,
  51538. restProps = slider_rest(props, ["prefixCls", "range", "className", "rootClassName", "style", "disabled", "tooltipPrefixCls", "tipFormatter", "tooltipVisible", "getTooltipPopupContainer", "tooltipPlacement", "tooltip", "onChangeComplete", "classNames", "styles"]);
  51539. const {
  51540. vertical
  51541. } = props;
  51542. const {
  51543. getPrefixCls,
  51544. direction: contextDirection,
  51545. className: contextClassName,
  51546. style: contextStyle,
  51547. classNames: contextClassNames,
  51548. styles: contextStyles,
  51549. getPopupContainer
  51550. } = (0,config_provider_context.useComponentConfig)('slider');
  51551. const contextDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_DisabledContext);
  51552. const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;
  51553. // ============================= Context ==============================
  51554. const {
  51555. handleRender: contextHandleRender,
  51556. direction: internalContextDirection
  51557. } = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(slider_Context);
  51558. const mergedDirection = internalContextDirection || contextDirection;
  51559. const isRTL = mergedDirection === 'rtl';
  51560. // =============================== Open ===============================
  51561. const [hoverOpen, setHoverOpen] = useRafLock();
  51562. const [focusOpen, setFocusOpen] = useRafLock();
  51563. const tooltipProps = Object.assign({}, tooltip);
  51564. const {
  51565. open: tooltipOpen,
  51566. placement: tooltipPlacement,
  51567. getPopupContainer: getTooltipPopupContainer,
  51568. prefixCls: customizeTooltipPrefixCls,
  51569. formatter: tipFormatter
  51570. } = tooltipProps;
  51571. const lockOpen = tooltipOpen !== null && tooltipOpen !== void 0 ? tooltipOpen : legacyTooltipVisible;
  51572. const activeOpen = (hoverOpen || focusOpen) && lockOpen !== false;
  51573. const mergedTipFormatter = getTipFormatter(tipFormatter, legacyTipFormatter);
  51574. // ============================= Change ==============================
  51575. const [dragging, setDragging] = useRafLock();
  51576. const onInternalChangeComplete = nextValues => {
  51577. onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(nextValues);
  51578. setDragging(false);
  51579. };
  51580. // ============================ Placement ============================
  51581. const getTooltipPlacement = (placement, vert) => {
  51582. if (placement) {
  51583. return placement;
  51584. }
  51585. if (!vert) {
  51586. return 'top';
  51587. }
  51588. return isRTL ? 'left' : 'right';
  51589. };
  51590. // ============================== Style ===============================
  51591. const prefixCls = getPrefixCls('slider', customizePrefixCls);
  51592. const [wrapCSSVar, hashId, cssVarCls] = (0,slider_style["default"])(prefixCls);
  51593. const rootClassNames = classnames_default()(className, contextClassName, contextClassNames.root, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.root, rootClassName, {
  51594. [`${prefixCls}-rtl`]: isRTL,
  51595. [`${prefixCls}-lock`]: dragging
  51596. }, hashId, cssVarCls);
  51597. // make reverse default on rtl direction
  51598. if (isRTL && !restProps.vertical) {
  51599. restProps.reverse = !restProps.reverse;
  51600. }
  51601. // ============================= Warning ==============================
  51602. // Warning for deprecated usage
  51603. if (true) {
  51604. const warning = (0,_util_warning.devUseWarning)('Slider');
  51605. [['tooltipPrefixCls', 'prefixCls'], ['getTooltipPopupContainer', 'getPopupContainer'], ['tipFormatter', 'formatter'], ['tooltipPlacement', 'placement'], ['tooltipVisible', 'open']].forEach(([deprecatedName, newName]) => {
  51606. warning.deprecated(!(deprecatedName in props), deprecatedName, `tooltip.${newName}`);
  51607. });
  51608. }
  51609. // ============================== Handle ==============================
  51610. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  51611. const onMouseUp = () => {
  51612. // Delay for 1 frame to make the click to enable hide tooltip
  51613. // even when the handle is focused
  51614. (0,raf["default"])(() => {
  51615. setFocusOpen(false);
  51616. }, 1);
  51617. };
  51618. document.addEventListener('mouseup', onMouseUp);
  51619. return () => {
  51620. document.removeEventListener('mouseup', onMouseUp);
  51621. };
  51622. }, []);
  51623. const useActiveTooltipHandle = range && !lockOpen;
  51624. const handleRender = contextHandleRender || ((node, info) => {
  51625. const {
  51626. index
  51627. } = info;
  51628. const nodeProps = node.props;
  51629. function proxyEvent(eventName, event, triggerRestPropsEvent) {
  51630. var _a, _b, _c, _d;
  51631. if (triggerRestPropsEvent) {
  51632. (_b = (_a = restProps)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, event);
  51633. }
  51634. (_d = (_c = nodeProps)[eventName]) === null || _d === void 0 ? void 0 : _d.call(_c, event);
  51635. }
  51636. const passedProps = Object.assign(Object.assign({}, nodeProps), {
  51637. onMouseEnter: e => {
  51638. setHoverOpen(true);
  51639. proxyEvent('onMouseEnter', e);
  51640. },
  51641. onMouseLeave: e => {
  51642. setHoverOpen(false);
  51643. proxyEvent('onMouseLeave', e);
  51644. },
  51645. onMouseDown: e => {
  51646. setFocusOpen(true);
  51647. setDragging(true);
  51648. proxyEvent('onMouseDown', e);
  51649. },
  51650. onFocus: e => {
  51651. var _a;
  51652. setFocusOpen(true);
  51653. (_a = restProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(restProps, e);
  51654. proxyEvent('onFocus', e, true);
  51655. },
  51656. onBlur: e => {
  51657. var _a;
  51658. setFocusOpen(false);
  51659. (_a = restProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(restProps, e);
  51660. proxyEvent('onBlur', e, true);
  51661. }
  51662. });
  51663. const cloneNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(node, passedProps);
  51664. const open = (!!lockOpen || activeOpen) && mergedTipFormatter !== null;
  51665. // Wrap on handle with Tooltip when is single mode or multiple with all show tooltip
  51666. if (!useActiveTooltipHandle) {
  51667. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(slider_SliderTooltip, Object.assign({}, tooltipProps, {
  51668. prefixCls: getPrefixCls('tooltip', customizeTooltipPrefixCls !== null && customizeTooltipPrefixCls !== void 0 ? customizeTooltipPrefixCls : legacyTooltipPrefixCls),
  51669. title: mergedTipFormatter ? mergedTipFormatter(info.value) : '',
  51670. value: info.value,
  51671. open: open,
  51672. placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),
  51673. key: index,
  51674. classNames: {
  51675. root: `${prefixCls}-tooltip`
  51676. },
  51677. getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer
  51678. }), cloneNode);
  51679. }
  51680. return cloneNode;
  51681. });
  51682. // ========================== Active Handle ===========================
  51683. const activeHandleRender = useActiveTooltipHandle ? (handle, info) => {
  51684. const cloneNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(handle, {
  51685. style: Object.assign(Object.assign({}, handle.props.style), {
  51686. visibility: 'hidden'
  51687. })
  51688. });
  51689. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(slider_SliderTooltip, Object.assign({}, tooltipProps, {
  51690. prefixCls: getPrefixCls('tooltip', customizeTooltipPrefixCls !== null && customizeTooltipPrefixCls !== void 0 ? customizeTooltipPrefixCls : legacyTooltipPrefixCls),
  51691. title: mergedTipFormatter ? mergedTipFormatter(info.value) : '',
  51692. open: mergedTipFormatter !== null && activeOpen,
  51693. placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),
  51694. key: "tooltip",
  51695. classNames: {
  51696. root: `${prefixCls}-tooltip`
  51697. },
  51698. getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer,
  51699. draggingDelete: info.draggingDelete
  51700. }), cloneNode);
  51701. } : undefined;
  51702. // ============================== Render ==============================
  51703. const rootStyle = Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), styles === null || styles === void 0 ? void 0 : styles.root), style);
  51704. const mergedTracks = Object.assign(Object.assign({}, contextStyles.tracks), styles === null || styles === void 0 ? void 0 : styles.tracks);
  51705. const mergedTracksClassNames = classnames_default()(contextClassNames.tracks, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.tracks);
  51706. return wrapCSSVar(
  51707. /*#__PURE__*/
  51708. // @ts-ignore
  51709. external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_slider_es, Object.assign({}, restProps, {
  51710. classNames: Object.assign({
  51711. handle: classnames_default()(contextClassNames.handle, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.handle),
  51712. rail: classnames_default()(contextClassNames.rail, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.rail),
  51713. track: classnames_default()(contextClassNames.track, sliderClassNames === null || sliderClassNames === void 0 ? void 0 : sliderClassNames.track)
  51714. }, mergedTracksClassNames ? {
  51715. tracks: mergedTracksClassNames
  51716. } : {}),
  51717. styles: Object.assign({
  51718. handle: Object.assign(Object.assign({}, contextStyles.handle), styles === null || styles === void 0 ? void 0 : styles.handle),
  51719. rail: Object.assign(Object.assign({}, contextStyles.rail), styles === null || styles === void 0 ? void 0 : styles.rail),
  51720. track: Object.assign(Object.assign({}, contextStyles.track), styles === null || styles === void 0 ? void 0 : styles.track)
  51721. }, Object.keys(mergedTracks).length ? {
  51722. tracks: mergedTracks
  51723. } : {}),
  51724. step: restProps.step,
  51725. range: range,
  51726. className: rootClassNames,
  51727. style: rootStyle,
  51728. disabled: mergedDisabled,
  51729. ref: ref,
  51730. prefixCls: prefixCls,
  51731. handleRender: handleRender,
  51732. activeHandleRender: activeHandleRender,
  51733. onChangeComplete: onInternalChangeComplete
  51734. })));
  51735. });
  51736. if (true) {
  51737. slider_Slider.displayName = 'Slider';
  51738. }
  51739. /* harmony default export */ var slider = (slider_Slider);
  51740. ;// ./components/color-picker/components/ColorSlider.tsx
  51741. var ColorSlider_rest = undefined && undefined.__rest || function (s, e) {
  51742. var t = {};
  51743. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  51744. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  51745. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  51746. }
  51747. return t;
  51748. };
  51749. const GradientColorSlider = props => {
  51750. const {
  51751. prefixCls,
  51752. colors,
  51753. type,
  51754. color,
  51755. range = false,
  51756. className,
  51757. activeIndex,
  51758. onActive,
  51759. onDragStart,
  51760. onDragChange,
  51761. onKeyDelete
  51762. } = props,
  51763. restProps = ColorSlider_rest(props, ["prefixCls", "colors", "type", "color", "range", "className", "activeIndex", "onActive", "onDragStart", "onDragChange", "onKeyDelete"]);
  51764. const sliderProps = Object.assign(Object.assign({}, restProps), {
  51765. track: false
  51766. });
  51767. // ========================== Background ==========================
  51768. const linearCss = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  51769. const colorsStr = colors.map(c => `${c.color} ${c.percent}%`).join(', ');
  51770. return `linear-gradient(90deg, ${colorsStr})`;
  51771. }, [colors]);
  51772. const pointColor = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  51773. if (!color || !type) {
  51774. return null;
  51775. }
  51776. if (type === 'alpha') {
  51777. return color.toRgbString();
  51778. }
  51779. return `hsl(${color.toHsb().h}, 100%, 50%)`;
  51780. }, [color, type]);
  51781. // ======================= Context: Slider ========================
  51782. const onInternalDragStart = (0,useEvent["default"])(onDragStart);
  51783. const onInternalDragChange = (0,useEvent["default"])(onDragChange);
  51784. const unstableContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  51785. onDragStart: onInternalDragStart,
  51786. onDragChange: onInternalDragChange
  51787. }), []);
  51788. // ======================= Context: Render ========================
  51789. const handleRender = (0,useEvent["default"])((ori, info) => {
  51790. const {
  51791. onFocus,
  51792. style,
  51793. className: handleCls,
  51794. onKeyDown
  51795. } = ori.props;
  51796. // Point Color
  51797. const mergedStyle = Object.assign({}, style);
  51798. if (type === 'gradient') {
  51799. mergedStyle.background = (0,util.getGradientPercentColor)(colors, info.value);
  51800. }
  51801. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(ori, {
  51802. onFocus: e => {
  51803. onActive === null || onActive === void 0 ? void 0 : onActive(info.index);
  51804. onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
  51805. },
  51806. style: mergedStyle,
  51807. className: classnames_default()(handleCls, {
  51808. [`${prefixCls}-slider-handle-active`]: activeIndex === info.index
  51809. }),
  51810. onKeyDown: e => {
  51811. if ((e.key === 'Delete' || e.key === 'Backspace') && onKeyDelete) {
  51812. onKeyDelete(info.index);
  51813. }
  51814. onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
  51815. }
  51816. });
  51817. });
  51818. const sliderContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  51819. direction: 'ltr',
  51820. handleRender
  51821. }), []);
  51822. // ============================ Render ============================
  51823. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(slider_Context.Provider, {
  51824. value: sliderContext
  51825. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UnstableContext.Provider, {
  51826. value: unstableContext
  51827. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(slider, Object.assign({}, sliderProps, {
  51828. className: classnames_default()(className, `${prefixCls}-slider`),
  51829. tooltip: {
  51830. open: false
  51831. },
  51832. range: {
  51833. editable: range,
  51834. minCount: 2
  51835. },
  51836. styles: {
  51837. rail: {
  51838. background: linearCss
  51839. },
  51840. handle: pointColor ? {
  51841. background: pointColor
  51842. } : {}
  51843. },
  51844. classNames: {
  51845. rail: `${prefixCls}-slider-rail`,
  51846. handle: `${prefixCls}-slider-handle`
  51847. }
  51848. }))));
  51849. };
  51850. const SingleColorSlider = props => {
  51851. const {
  51852. value,
  51853. onChange,
  51854. onChangeComplete
  51855. } = props;
  51856. const singleOnChange = v => onChange(v[0]);
  51857. const singleOnChangeComplete = v => onChangeComplete(v[0]);
  51858. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GradientColorSlider, Object.assign({}, props, {
  51859. value: [value],
  51860. onChange: singleOnChange,
  51861. onChangeComplete: singleOnChangeComplete
  51862. }));
  51863. };
  51864. /* harmony default export */ var ColorSlider = (SingleColorSlider);
  51865. ;// ./components/color-picker/components/PanelPicker/GradientColorBar.tsx
  51866. function sortColors(colors) {
  51867. return (0,toConsumableArray["default"])(colors).sort((a, b) => a.percent - b.percent);
  51868. }
  51869. /**
  51870. * GradientColorBar will auto show when the mode is `gradient`.
  51871. */
  51872. const GradientColorBar = props => {
  51873. const {
  51874. prefixCls,
  51875. mode,
  51876. onChange,
  51877. onChangeComplete,
  51878. onActive,
  51879. activeIndex,
  51880. onGradientDragging,
  51881. colors
  51882. } = props;
  51883. const isGradient = mode === 'gradient';
  51884. // ============================= Colors =============================
  51885. const colorList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => colors.map(info => ({
  51886. percent: info.percent,
  51887. color: info.color.toRgbString()
  51888. })), [colors]);
  51889. const values = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => colorList.map(info => info.percent), [colorList]);
  51890. // ============================== Drag ==============================
  51891. const colorsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(colorList);
  51892. // Record current colors
  51893. const onDragStart = ({
  51894. rawValues,
  51895. draggingIndex,
  51896. draggingValue
  51897. }) => {
  51898. if (rawValues.length > colorList.length) {
  51899. // Add new node
  51900. const newPointColor = (0,util.getGradientPercentColor)(colorList, draggingValue);
  51901. const nextColors = (0,toConsumableArray["default"])(colorList);
  51902. nextColors.splice(draggingIndex, 0, {
  51903. percent: draggingValue,
  51904. color: newPointColor
  51905. });
  51906. colorsRef.current = nextColors;
  51907. } else {
  51908. colorsRef.current = colorList;
  51909. }
  51910. onGradientDragging(true);
  51911. onChange(new color.AggregationColor(sortColors(colorsRef.current)), true);
  51912. };
  51913. // Adjust color when dragging
  51914. const onDragChange = ({
  51915. deleteIndex,
  51916. draggingIndex,
  51917. draggingValue
  51918. }) => {
  51919. let nextColors = (0,toConsumableArray["default"])(colorsRef.current);
  51920. if (deleteIndex !== -1) {
  51921. nextColors.splice(deleteIndex, 1);
  51922. } else {
  51923. nextColors[draggingIndex] = Object.assign(Object.assign({}, nextColors[draggingIndex]), {
  51924. percent: draggingValue
  51925. });
  51926. nextColors = sortColors(nextColors);
  51927. }
  51928. onChange(new color.AggregationColor(nextColors), true);
  51929. };
  51930. // ============================== Key ===============================
  51931. const onKeyDelete = index => {
  51932. const nextColors = (0,toConsumableArray["default"])(colorList);
  51933. nextColors.splice(index, 1);
  51934. const nextColor = new color.AggregationColor(nextColors);
  51935. onChange(nextColor);
  51936. onChangeComplete(nextColor);
  51937. };
  51938. // ============================= Change =============================
  51939. const onInternalChangeComplete = nextValues => {
  51940. onChangeComplete(new color.AggregationColor(colorList));
  51941. // Reset `activeIndex` if out of range
  51942. if (activeIndex >= nextValues.length) {
  51943. onActive(nextValues.length - 1);
  51944. }
  51945. onGradientDragging(false);
  51946. };
  51947. // ============================= Render =============================
  51948. if (!isGradient) {
  51949. return null;
  51950. }
  51951. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GradientColorSlider, {
  51952. min: 0,
  51953. max: 100,
  51954. prefixCls: prefixCls,
  51955. className: `${prefixCls}-gradient-slider`,
  51956. colors: colorList,
  51957. color: null,
  51958. value: values,
  51959. range: true,
  51960. onChangeComplete: onInternalChangeComplete,
  51961. disabled: false,
  51962. type: "gradient",
  51963. // Active
  51964. activeIndex: activeIndex,
  51965. onActive: onActive,
  51966. // Drag
  51967. onDragStart: onDragStart,
  51968. onDragChange: onDragChange,
  51969. onKeyDelete: onKeyDelete
  51970. });
  51971. };
  51972. /* harmony default export */ var PanelPicker_GradientColorBar = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(GradientColorBar));
  51973. ;// ./components/color-picker/components/PanelPicker/index.tsx
  51974. var PanelPicker_rest = undefined && undefined.__rest || function (s, e) {
  51975. var t = {};
  51976. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  51977. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  51978. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  51979. }
  51980. return t;
  51981. };
  51982. const components = {
  51983. slider: ColorSlider
  51984. };
  51985. const PanelPicker = () => {
  51986. const panelPickerContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PanelPickerContext);
  51987. const {
  51988. mode,
  51989. onModeChange,
  51990. modeOptions,
  51991. prefixCls,
  51992. allowClear,
  51993. value,
  51994. disabledAlpha,
  51995. onChange,
  51996. onClear,
  51997. onChangeComplete,
  51998. activeIndex,
  51999. gradientDragging
  52000. } = panelPickerContext,
  52001. injectProps = PanelPicker_rest(panelPickerContext, ["mode", "onModeChange", "modeOptions", "prefixCls", "allowClear", "value", "disabledAlpha", "onChange", "onClear", "onChangeComplete", "activeIndex", "gradientDragging"]);
  52002. // ============================ Colors ============================
  52003. const colors = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  52004. if (!value.cleared) {
  52005. return value.getColors();
  52006. }
  52007. return [{
  52008. percent: 0,
  52009. color: new color.AggregationColor('')
  52010. }, {
  52011. percent: 100,
  52012. color: new color.AggregationColor('')
  52013. }];
  52014. }, [value]);
  52015. // ========================= Single Color =========================
  52016. const isSingle = !value.isGradient();
  52017. // We cache the point color in case user drag the gradient point across another one
  52018. const [lockedColor, setLockedColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(value);
  52019. // Use layout effect here since `useEffect` will cause a blink when mouseDown
  52020. (0,useLayoutEffect["default"])(() => {
  52021. var _a;
  52022. if (!isSingle) {
  52023. setLockedColor((_a = colors[activeIndex]) === null || _a === void 0 ? void 0 : _a.color);
  52024. }
  52025. }, [gradientDragging, activeIndex]);
  52026. const activeColor = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  52027. var _a;
  52028. if (isSingle) {
  52029. return value;
  52030. }
  52031. // Use cache when dragging. User can not operation panel when dragging.
  52032. if (gradientDragging) {
  52033. return lockedColor;
  52034. }
  52035. return (_a = colors[activeIndex]) === null || _a === void 0 ? void 0 : _a.color;
  52036. }, [value, activeIndex, isSingle, lockedColor, gradientDragging]);
  52037. // ========================= Picker Color =========================
  52038. const [pickerColor, setPickerColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(activeColor);
  52039. const [forceSync, setForceSync] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0);
  52040. const mergedPickerColor = (pickerColor === null || pickerColor === void 0 ? void 0 : pickerColor.equals(activeColor)) ? activeColor : pickerColor;
  52041. (0,useLayoutEffect["default"])(() => {
  52042. setPickerColor(activeColor);
  52043. }, [forceSync, activeColor === null || activeColor === void 0 ? void 0 : activeColor.toHexString()]);
  52044. // ============================ Change ============================
  52045. const fillColor = (nextColor, info) => {
  52046. let submitColor = (0,util.generateColor)(nextColor);
  52047. // Fill alpha color to 100% if origin is cleared color
  52048. if (value.cleared) {
  52049. const rgb = submitColor.toRgb();
  52050. // Auto fill color if origin is `0/0/0` to enhance user experience
  52051. if (!rgb.r && !rgb.g && !rgb.b && info) {
  52052. const {
  52053. type: infoType,
  52054. value: infoValue = 0
  52055. } = info;
  52056. submitColor = new color.AggregationColor({
  52057. h: infoType === 'hue' ? infoValue : 0,
  52058. s: 1,
  52059. b: 1,
  52060. a: infoType === 'alpha' ? infoValue / 100 : 1
  52061. });
  52062. } else {
  52063. submitColor = (0,util.genAlphaColor)(submitColor);
  52064. }
  52065. }
  52066. if (mode === 'single') {
  52067. return submitColor;
  52068. }
  52069. const nextColors = (0,toConsumableArray["default"])(colors);
  52070. nextColors[activeIndex] = Object.assign(Object.assign({}, nextColors[activeIndex]), {
  52071. color: submitColor
  52072. });
  52073. return new color.AggregationColor(nextColors);
  52074. };
  52075. const onPickerChange = (colorValue, fromPicker, info) => {
  52076. const nextColor = fillColor(colorValue, info);
  52077. setPickerColor(nextColor.isGradient() ? nextColor.getColors()[activeIndex].color : nextColor);
  52078. onChange(nextColor, fromPicker);
  52079. };
  52080. const onInternalChangeComplete = (nextColor, info) => {
  52081. // Trigger complete event
  52082. onChangeComplete(fillColor(nextColor, info));
  52083. // Back of origin color in case in controlled
  52084. // This will set after `onChangeComplete` to avoid `setState` trigger rerender
  52085. // which will make `fillColor` get wrong `color.cleared` state
  52086. setForceSync(ori => ori + 1);
  52087. };
  52088. const onInputChange = colorValue => {
  52089. onChange(fillColor(colorValue));
  52090. };
  52091. // ============================ Render ============================
  52092. // Operation bar
  52093. let operationNode = null;
  52094. const showMode = modeOptions.length > 1;
  52095. if (allowClear || showMode) {
  52096. operationNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  52097. className: `${prefixCls}-operation`
  52098. }, showMode && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(segmented, {
  52099. size: "small",
  52100. options: modeOptions,
  52101. value: mode,
  52102. onChange: onModeChange
  52103. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorClear, Object.assign({
  52104. prefixCls: prefixCls,
  52105. value: value,
  52106. onChange: clearColor => {
  52107. onChange(clearColor);
  52108. onClear === null || onClear === void 0 ? void 0 : onClear();
  52109. }
  52110. }, injectProps)));
  52111. }
  52112. // Return
  52113. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, operationNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PanelPicker_GradientColorBar, Object.assign({}, panelPickerContext, {
  52114. colors: colors
  52115. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(color_picker_es["default"], {
  52116. prefixCls: prefixCls,
  52117. value: mergedPickerColor === null || mergedPickerColor === void 0 ? void 0 : mergedPickerColor.toHsb(),
  52118. disabledAlpha: disabledAlpha,
  52119. onChange: (colorValue, info) => {
  52120. onPickerChange(colorValue, true, info);
  52121. },
  52122. onChangeComplete: (colorValue, info) => {
  52123. onInternalChangeComplete(colorValue, info);
  52124. },
  52125. components: components
  52126. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorInput, Object.assign({
  52127. value: activeColor,
  52128. onChange: onInputChange,
  52129. prefixCls: prefixCls,
  52130. disabledAlpha: disabledAlpha
  52131. }, injectProps)));
  52132. };
  52133. /* harmony default export */ var components_PanelPicker = (PanelPicker);
  52134. // EXTERNAL MODULE: ./components/color-picker/components/ColorPresets.tsx
  52135. var ColorPresets = __webpack_require__("./components/color-picker/components/ColorPresets.tsx");
  52136. ;// ./components/color-picker/components/PanelPresets.tsx
  52137. const PanelPresets = () => {
  52138. const {
  52139. prefixCls,
  52140. value,
  52141. presets,
  52142. onChange
  52143. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PanelPresetsContext);
  52144. return Array.isArray(presets) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ColorPresets["default"], {
  52145. value: value,
  52146. presets: presets,
  52147. prefixCls: prefixCls,
  52148. onChange: onChange
  52149. })) : null;
  52150. };
  52151. /* harmony default export */ var components_PanelPresets = (PanelPresets);
  52152. ;// ./components/color-picker/ColorPickerPanel.tsx
  52153. const ColorPickerPanel = props => {
  52154. const {
  52155. prefixCls,
  52156. presets,
  52157. panelRender,
  52158. value,
  52159. onChange,
  52160. onClear,
  52161. allowClear,
  52162. disabledAlpha,
  52163. mode,
  52164. onModeChange,
  52165. modeOptions,
  52166. onChangeComplete,
  52167. activeIndex,
  52168. onActive,
  52169. format,
  52170. onFormatChange,
  52171. gradientDragging,
  52172. onGradientDragging,
  52173. disabledFormat
  52174. } = props;
  52175. const colorPickerPanelPrefixCls = `${prefixCls}-inner`;
  52176. // ===================== Context ======================
  52177. const panelContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
  52178. prefixCls,
  52179. value,
  52180. onChange,
  52181. onClear,
  52182. allowClear,
  52183. disabledAlpha,
  52184. mode,
  52185. onModeChange,
  52186. modeOptions,
  52187. onChangeComplete,
  52188. activeIndex,
  52189. onActive,
  52190. format,
  52191. onFormatChange,
  52192. gradientDragging,
  52193. onGradientDragging,
  52194. disabledFormat
  52195. }), [prefixCls, value, onChange, onClear, allowClear, disabledAlpha, mode, onModeChange, modeOptions, onChangeComplete, activeIndex, onActive, format, onFormatChange, gradientDragging, onGradientDragging, disabledFormat]);
  52196. const presetContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
  52197. prefixCls,
  52198. value,
  52199. presets,
  52200. onChange
  52201. }), [prefixCls, value, presets, onChange]);
  52202. // ====================== Render ======================
  52203. const innerPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  52204. className: `${colorPickerPanelPrefixCls}-content`
  52205. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_PanelPicker, null), Array.isArray(presets) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(divider, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_PanelPresets, null));
  52206. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PanelPickerContext.Provider, {
  52207. value: panelContext
  52208. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PanelPresetsContext.Provider, {
  52209. value: presetContext
  52210. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  52211. className: colorPickerPanelPrefixCls
  52212. }, typeof panelRender === 'function' ? panelRender(innerPanel, {
  52213. components: {
  52214. Picker: components_PanelPicker,
  52215. Presets: components_PanelPresets
  52216. }
  52217. }) : innerPanel)));
  52218. };
  52219. if (true) {
  52220. ColorPickerPanel.displayName = 'ColorPickerPanel';
  52221. }
  52222. /* harmony default export */ var color_picker_ColorPickerPanel = (ColorPickerPanel);
  52223. ;// ./components/color-picker/components/ColorTrigger.tsx
  52224. var ColorTrigger_rest = undefined && undefined.__rest || function (s, e) {
  52225. var t = {};
  52226. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  52227. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  52228. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  52229. }
  52230. return t;
  52231. };
  52232. const ColorTrigger = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  52233. const {
  52234. color,
  52235. prefixCls,
  52236. open,
  52237. disabled,
  52238. format,
  52239. className,
  52240. showText,
  52241. activeIndex
  52242. } = props,
  52243. rest = ColorTrigger_rest(props, ["color", "prefixCls", "open", "disabled", "format", "className", "showText", "activeIndex"]);
  52244. const colorTriggerPrefixCls = `${prefixCls}-trigger`;
  52245. const colorTextPrefixCls = `${colorTriggerPrefixCls}-text`;
  52246. const colorTextCellPrefixCls = `${colorTextPrefixCls}-cell`;
  52247. const [locale] = (0,useLocale["default"])('ColorPicker');
  52248. // ============================== Text ==============================
  52249. const desc = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  52250. if (!showText) {
  52251. return '';
  52252. }
  52253. if (typeof showText === 'function') {
  52254. return showText(color);
  52255. }
  52256. if (color.cleared) {
  52257. return locale.transparent;
  52258. }
  52259. if (color.isGradient()) {
  52260. return color.getColors().map((c, index) => {
  52261. const inactive = activeIndex !== -1 && activeIndex !== index;
  52262. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  52263. key: index,
  52264. className: classnames_default()(colorTextCellPrefixCls, inactive && `${colorTextCellPrefixCls}-inactive`)
  52265. }, c.color.toRgbString(), " ", c.percent, "%");
  52266. });
  52267. }
  52268. const hexString = color.toHexString().toUpperCase();
  52269. const alpha = (0,util.getColorAlpha)(color);
  52270. switch (format) {
  52271. case 'rgb':
  52272. return color.toRgbString();
  52273. case 'hsb':
  52274. return color.toHsbString();
  52275. // case 'hex':
  52276. default:
  52277. return alpha < 100 ? `${hexString.slice(0, 7)},${alpha}%` : hexString;
  52278. }
  52279. }, [color, format, showText, activeIndex]);
  52280. // ============================= Render =============================
  52281. const containerNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => color.cleared ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorClear, {
  52282. prefixCls: prefixCls
  52283. })) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(color_picker_es.ColorBlock, {
  52284. prefixCls: prefixCls,
  52285. color: color.toCssString()
  52286. })), [color, prefixCls]);
  52287. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
  52288. ref: ref,
  52289. className: classnames_default()(colorTriggerPrefixCls, className, {
  52290. [`${colorTriggerPrefixCls}-active`]: open,
  52291. [`${colorTriggerPrefixCls}-disabled`]: disabled
  52292. })
  52293. }, (0,pickAttrs["default"])(rest)), containerNode, showText && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  52294. className: colorTextPrefixCls
  52295. }, desc));
  52296. });
  52297. /* harmony default export */ var components_ColorTrigger = (ColorTrigger);
  52298. ;// ./components/color-picker/hooks/useModeColor.ts
  52299. /**
  52300. * Combine the `color` and `mode` to make sure sync of state.
  52301. */
  52302. function useModeColor(defaultValue, value, mode) {
  52303. const [locale] = (0,useLocale["default"])('ColorPicker');
  52304. // ======================== Base ========================
  52305. // Color
  52306. const [mergedColor, setMergedColor] = (0,useMergedState["default"])(defaultValue, {
  52307. value
  52308. });
  52309. // Mode
  52310. const [modeState, setModeState] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('single');
  52311. const [modeOptionList, modeSet] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52312. const list = (Array.isArray(mode) ? mode : [mode]).filter(m => m);
  52313. if (!list.length) {
  52314. list.push('single');
  52315. }
  52316. const modes = new Set(list);
  52317. const optionList = [];
  52318. const pushOption = (modeType, localeTxt) => {
  52319. if (modes.has(modeType)) {
  52320. optionList.push({
  52321. label: localeTxt,
  52322. value: modeType
  52323. });
  52324. }
  52325. };
  52326. pushOption('single', locale.singleColor);
  52327. pushOption('gradient', locale.gradientColor);
  52328. return [optionList, modes];
  52329. }, [mode]);
  52330. // ======================== Post ========================
  52331. // We need align `mode` with `color` state
  52332. // >>>>> Color
  52333. const [cacheColor, setCacheColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  52334. const setColor = (0,useEvent["default"])(nextColor => {
  52335. setCacheColor(nextColor);
  52336. setMergedColor(nextColor);
  52337. });
  52338. const postColor = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52339. const colorObj = (0,util.generateColor)(mergedColor || '');
  52340. // Use `cacheColor` in case the color is `cleared`
  52341. return colorObj.equals(cacheColor) ? cacheColor : colorObj;
  52342. }, [mergedColor, cacheColor]);
  52343. // >>>>> Mode
  52344. const postMode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52345. var _a;
  52346. if (modeSet.has(modeState)) {
  52347. return modeState;
  52348. }
  52349. return (_a = modeOptionList[0]) === null || _a === void 0 ? void 0 : _a.value;
  52350. }, [modeSet, modeState, modeOptionList]);
  52351. // ======================= Effect =======================
  52352. // Dynamic update mode when color change
  52353. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  52354. setModeState(postColor.isGradient() ? 'gradient' : 'single');
  52355. }, [postColor]);
  52356. // ======================= Return =======================
  52357. return [postColor, setColor, postMode, setModeState, modeOptionList];
  52358. }
  52359. // EXTERNAL MODULE: ./components/color-picker/style/index.ts + 5 modules
  52360. var color_picker_style = __webpack_require__("./components/color-picker/style/index.ts");
  52361. ;// ./components/color-picker/ColorPicker.tsx
  52362. var ColorPicker_rest = undefined && undefined.__rest || function (s, e) {
  52363. var t = {};
  52364. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  52365. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  52366. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  52367. }
  52368. return t;
  52369. };
  52370. const ColorPicker = props => {
  52371. const {
  52372. mode,
  52373. value,
  52374. defaultValue,
  52375. format,
  52376. defaultFormat,
  52377. allowClear = false,
  52378. presets,
  52379. children,
  52380. trigger = 'click',
  52381. open,
  52382. disabled,
  52383. placement = 'bottomLeft',
  52384. arrow = true,
  52385. panelRender,
  52386. showText,
  52387. style,
  52388. className,
  52389. size: customizeSize,
  52390. rootClassName,
  52391. prefixCls: customizePrefixCls,
  52392. styles,
  52393. disabledAlpha = false,
  52394. onFormatChange,
  52395. onChange,
  52396. onClear,
  52397. onOpenChange,
  52398. onChangeComplete,
  52399. getPopupContainer,
  52400. autoAdjustOverflow = true,
  52401. destroyTooltipOnHide,
  52402. destroyOnHidden,
  52403. disabledFormat
  52404. } = props,
  52405. rest = ColorPicker_rest(props, ["mode", "value", "defaultValue", "format", "defaultFormat", "allowClear", "presets", "children", "trigger", "open", "disabled", "placement", "arrow", "panelRender", "showText", "style", "className", "size", "rootClassName", "prefixCls", "styles", "disabledAlpha", "onFormatChange", "onChange", "onClear", "onOpenChange", "onChangeComplete", "getPopupContainer", "autoAdjustOverflow", "destroyTooltipOnHide", "destroyOnHidden", "disabledFormat"]);
  52406. const {
  52407. getPrefixCls,
  52408. direction,
  52409. colorPicker
  52410. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  52411. const contextDisabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_DisabledContext);
  52412. const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;
  52413. const [popupOpen, setPopupOpen] = (0,useMergedState["default"])(false, {
  52414. value: open,
  52415. postState: openData => !mergedDisabled && openData,
  52416. onChange: onOpenChange
  52417. });
  52418. const [formatValue, setFormatValue] = (0,useMergedState["default"])(format, {
  52419. value: format,
  52420. defaultValue: defaultFormat,
  52421. onChange: onFormatChange
  52422. });
  52423. const prefixCls = getPrefixCls('color-picker', customizePrefixCls);
  52424. // ================== Value & Mode =================
  52425. const [mergedColor, setColor, modeState, setModeState, modeOptions] = useModeColor(defaultValue, value, mode);
  52426. const isAlphaColor = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => (0,util.getColorAlpha)(mergedColor) < 100, [mergedColor]);
  52427. // ==================== Change =====================
  52428. // To enhance user experience, we cache the gradient color when switch from gradient to single
  52429. // If user not modify single color, we will use the cached gradient color.
  52430. const [cachedGradientColor, setCachedGradientColor] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null);
  52431. const onInternalChangeComplete = color => {
  52432. if (onChangeComplete) {
  52433. let changeColor = (0,util.generateColor)(color);
  52434. // ignore alpha color
  52435. if (disabledAlpha && isAlphaColor) {
  52436. changeColor = (0,util.genAlphaColor)(color);
  52437. }
  52438. onChangeComplete(changeColor);
  52439. }
  52440. };
  52441. const onInternalChange = (data, changeFromPickerDrag) => {
  52442. let color = (0,util.generateColor)(data);
  52443. // ignore alpha color
  52444. if (disabledAlpha && isAlphaColor) {
  52445. color = (0,util.genAlphaColor)(color);
  52446. }
  52447. setColor(color);
  52448. setCachedGradientColor(null);
  52449. // Trigger change event
  52450. if (onChange) {
  52451. onChange(color, color.toCssString());
  52452. }
  52453. // Only for drag-and-drop color picking
  52454. if (!changeFromPickerDrag) {
  52455. onInternalChangeComplete(color);
  52456. }
  52457. };
  52458. // =================== Gradient ====================
  52459. const [activeIndex, setActiveIndex] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0);
  52460. const [gradientDragging, setGradientDragging] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false);
  52461. // Mode change should also trigger color change
  52462. const onInternalModeChange = newMode => {
  52463. setModeState(newMode);
  52464. if (newMode === 'single' && mergedColor.isGradient()) {
  52465. setActiveIndex(0);
  52466. onInternalChange(new color.AggregationColor(mergedColor.getColors()[0].color));
  52467. // Should after `onInternalChange` since it will clear the cached color
  52468. setCachedGradientColor(mergedColor);
  52469. } else if (newMode === 'gradient' && !mergedColor.isGradient()) {
  52470. const baseColor = isAlphaColor ? (0,util.genAlphaColor)(mergedColor) : mergedColor;
  52471. onInternalChange(new color.AggregationColor(cachedGradientColor || [{
  52472. percent: 0,
  52473. color: baseColor
  52474. }, {
  52475. percent: 100,
  52476. color: baseColor
  52477. }]));
  52478. }
  52479. };
  52480. // ================== Form Status ==================
  52481. const {
  52482. status: contextStatus
  52483. } = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(FormItemInputContext);
  52484. // ==================== Compact ====================
  52485. const {
  52486. compactSize,
  52487. compactItemClassnames
  52488. } = useCompactItemContext(prefixCls, direction);
  52489. // ===================== Style =====================
  52490. const mergedSize = (0,useSize["default"])(ctx => {
  52491. var _a;
  52492. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  52493. });
  52494. const rootCls = hooks_useCSSVarCls(prefixCls);
  52495. const [wrapCSSVar, hashId, cssVarCls] = (0,color_picker_style["default"])(prefixCls, rootCls);
  52496. const rtlCls = {
  52497. [`${prefixCls}-rtl`]: direction
  52498. };
  52499. const mergedRootCls = classnames_default()(rootClassName, cssVarCls, rootCls, rtlCls);
  52500. const mergedCls = classnames_default()(getStatusClassNames(prefixCls, contextStatus), {
  52501. [`${prefixCls}-sm`]: mergedSize === 'small',
  52502. [`${prefixCls}-lg`]: mergedSize === 'large'
  52503. }, compactItemClassnames, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.className, mergedRootCls, className, hashId);
  52504. const mergedPopupCls = classnames_default()(prefixCls, mergedRootCls);
  52505. // ===================== Warning ======================
  52506. if (true) {
  52507. const warning = (0,_util_warning.devUseWarning)('ColorPicker');
  52508. true ? warning(!(disabledAlpha && isAlphaColor), 'usage', '`disabledAlpha` will make the alpha to be 100% when use alpha color.') : 0;
  52509. }
  52510. const popoverProps = {
  52511. open: popupOpen,
  52512. trigger,
  52513. placement,
  52514. arrow,
  52515. rootClassName,
  52516. getPopupContainer,
  52517. autoAdjustOverflow,
  52518. destroyOnHidden: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : !!destroyTooltipOnHide
  52519. };
  52520. const mergedStyle = Object.assign(Object.assign({}, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.style), style);
  52521. // ============================ zIndex ============================
  52522. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(popover, Object.assign({
  52523. style: styles === null || styles === void 0 ? void 0 : styles.popup,
  52524. styles: {
  52525. body: styles === null || styles === void 0 ? void 0 : styles.popupOverlayInner
  52526. },
  52527. onOpenChange: visible => {
  52528. if (!visible || !mergedDisabled) {
  52529. setPopupOpen(visible);
  52530. }
  52531. },
  52532. content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_util_ContextIsolator, {
  52533. form: true
  52534. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(color_picker_ColorPickerPanel, {
  52535. mode: modeState,
  52536. onModeChange: onInternalModeChange,
  52537. modeOptions: modeOptions,
  52538. prefixCls: prefixCls,
  52539. value: mergedColor,
  52540. allowClear: allowClear,
  52541. disabled: mergedDisabled,
  52542. disabledAlpha: disabledAlpha,
  52543. presets: presets,
  52544. panelRender: panelRender,
  52545. format: formatValue,
  52546. onFormatChange: setFormatValue,
  52547. onChange: onInternalChange,
  52548. onChangeComplete: onInternalChangeComplete,
  52549. onClear: onClear,
  52550. activeIndex: activeIndex,
  52551. onActive: setActiveIndex,
  52552. gradientDragging: gradientDragging,
  52553. onGradientDragging: setGradientDragging,
  52554. disabledFormat: disabledFormat
  52555. })),
  52556. classNames: {
  52557. root: mergedPopupCls
  52558. }
  52559. }, popoverProps), children || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorTrigger, Object.assign({
  52560. activeIndex: popupOpen ? activeIndex : -1,
  52561. open: popupOpen,
  52562. className: mergedCls,
  52563. style: mergedStyle,
  52564. prefixCls: prefixCls,
  52565. disabled: mergedDisabled,
  52566. showText: showText,
  52567. format: formatValue
  52568. }, rest, {
  52569. color: mergedColor
  52570. })))));
  52571. };
  52572. if (true) {
  52573. ColorPicker.displayName = 'ColorPicker';
  52574. }
  52575. const ColorPicker_PurePanel = _util_PurePanel(ColorPicker, undefined, props => Object.assign(Object.assign({}, props), {
  52576. placement: 'bottom',
  52577. autoAdjustOverflow: false
  52578. }), 'color-picker', /* istanbul ignore next */
  52579. prefixCls => prefixCls);
  52580. ColorPicker._InternalPanelDoNotUseOrYouWillBeFired = ColorPicker_PurePanel;
  52581. /* harmony default export */ var color_picker_ColorPicker = (ColorPicker);
  52582. ;// ./components/color-picker/index.tsx
  52583. /* harmony default export */ var color_picker = (color_picker_ColorPicker);
  52584. ;// ./node_modules/@ant-design/icons-svg/es/asn/CalendarOutlined.js
  52585. // This icon file is generated automatically.
  52586. var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
  52587. /* harmony default export */ var asn_CalendarOutlined = (CalendarOutlined);
  52588. ;// ./node_modules/@ant-design/icons/es/icons/CalendarOutlined.js
  52589. // GENERATE BY ./scripts/generate.ts
  52590. // DON NOT EDIT IT MANUALLY
  52591. var CalendarOutlined_CalendarOutlined = function CalendarOutlined(props, ref) {
  52592. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  52593. ref: ref,
  52594. icon: asn_CalendarOutlined
  52595. }));
  52596. };
  52597. /**![calendar](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg4MCAxODRINzEydi02NGMwLTQuNC0zLjYtOC04LThoLTU2Yy00LjQgMC04IDMuNi04IDh2NjRIMzg0di02NGMwLTQuNC0zLjYtOC04LThoLTU2Yy00LjQgMC04IDMuNi04IDh2NjRIMTQ0Yy0xNy43IDAtMzIgMTQuMy0zMiAzMnY2NjRjMCAxNy43IDE0LjMgMzIgMzIgMzJoNzM2YzE3LjcgMCAzMi0xNC4zIDMyLTMyVjIxNmMwLTE3LjctMTQuMy0zMi0zMi0zMnptLTQwIDY1NkgxODRWNDYwaDY1NnYzODB6TTE4NCAzOTJWMjU2aDEyOHY0OGMwIDQuNCAzLjYgOCA4IDhoNTZjNC40IDAgOC0zLjYgOC04di00OGgyNTZ2NDhjMCA0LjQgMy42IDggOCA4aDU2YzQuNCAwIDgtMy42IDgtOHYtNDhoMTI4djEzNkgxODR6IiAvPjwvc3ZnPg==) */
  52598. var CalendarOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CalendarOutlined_CalendarOutlined);
  52599. if (true) {
  52600. CalendarOutlined_RefIcon.displayName = 'CalendarOutlined';
  52601. }
  52602. /* harmony default export */ var icons_CalendarOutlined = (CalendarOutlined_RefIcon);
  52603. ;// ./node_modules/@ant-design/icons-svg/es/asn/ClockCircleOutlined.js
  52604. // This icon file is generated automatically.
  52605. var ClockCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, "name": "clock-circle", "theme": "outlined" };
  52606. /* harmony default export */ var asn_ClockCircleOutlined = (ClockCircleOutlined);
  52607. ;// ./node_modules/@ant-design/icons/es/icons/ClockCircleOutlined.js
  52608. // GENERATE BY ./scripts/generate.ts
  52609. // DON NOT EDIT IT MANUALLY
  52610. var ClockCircleOutlined_ClockCircleOutlined = function ClockCircleOutlined(props, ref) {
  52611. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  52612. ref: ref,
  52613. icon: asn_ClockCircleOutlined
  52614. }));
  52615. };
  52616. /**![clock-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0wIDgyMGMtMjA1LjQgMC0zNzItMTY2LjYtMzcyLTM3MnMxNjYuNi0zNzIgMzcyLTM3MiAzNzIgMTY2LjYgMzcyIDM3Mi0xNjYuNiAzNzItMzcyIDM3MnoiIC8+PHBhdGggZD0iTTY4Ni43IDYzOC42TDU0NC4xIDUzNS41VjI4OGMwLTQuNC0zLjYtOC04LThINDg4Yy00LjQgMC04IDMuNi04IDh2Mjc1LjRjMCAyLjYgMS4yIDUgMy4zIDYuNWwxNjUuNCAxMjAuNmMzLjYgMi42IDguNiAxLjggMTEuMi0xLjdsMjguNi0zOWMyLjYtMy43IDEuOC04LjctMS44LTExLjJ6IiAvPjwvc3ZnPg==) */
  52617. var ClockCircleOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ClockCircleOutlined_ClockCircleOutlined);
  52618. if (true) {
  52619. ClockCircleOutlined_RefIcon.displayName = 'ClockCircleOutlined';
  52620. }
  52621. /* harmony default export */ var icons_ClockCircleOutlined = (ClockCircleOutlined_RefIcon);
  52622. ;// ./node_modules/@ant-design/icons-svg/es/asn/SwapRightOutlined.js
  52623. // This icon file is generated automatically.
  52624. var SwapRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" } }] }, "name": "swap-right", "theme": "outlined" };
  52625. /* harmony default export */ var asn_SwapRightOutlined = (SwapRightOutlined);
  52626. ;// ./node_modules/@ant-design/icons/es/icons/SwapRightOutlined.js
  52627. // GENERATE BY ./scripts/generate.ts
  52628. // DON NOT EDIT IT MANUALLY
  52629. var SwapRightOutlined_SwapRightOutlined = function SwapRightOutlined(props, ref) {
  52630. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  52631. ref: ref,
  52632. icon: asn_SwapRightOutlined
  52633. }));
  52634. };
  52635. /**![swap-right](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg3My4xIDU5Ni4ybC0xNjQtMjA4QTMyIDMyIDAgMDA2ODQgMzc2aC02NC44Yy02LjcgMC0xMC40IDcuNy02LjMgMTNsMTQ0LjMgMTgzSDE1MmMtNC40IDAtOCAzLjYtOCA4djYwYzAgNC40IDMuNiA4IDggOGg2OTUuOWMyNi44IDAgNDEuNy0zMC44IDI1LjItNTEuOHoiIC8+PC9zdmc+) */
  52636. var SwapRightOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SwapRightOutlined_SwapRightOutlined);
  52637. if (true) {
  52638. SwapRightOutlined_RefIcon.displayName = 'SwapRightOutlined';
  52639. }
  52640. /* harmony default export */ var icons_SwapRightOutlined = (SwapRightOutlined_RefIcon);
  52641. // EXTERNAL MODULE: ./components/date-picker/locale/en_US.ts + 1 modules
  52642. var date_picker_locale_en_US = __webpack_require__("./components/date-picker/locale/en_US.ts");
  52643. // EXTERNAL MODULE: ./components/date-picker/style/index.ts + 2 modules
  52644. var date_picker_style = __webpack_require__("./components/date-picker/style/index.ts");
  52645. ;// ./components/date-picker/util.ts
  52646. function getPlaceholder(locale, picker, customizePlaceholder) {
  52647. if (customizePlaceholder !== undefined) {
  52648. return customizePlaceholder;
  52649. }
  52650. if (picker === 'year' && locale.lang.yearPlaceholder) {
  52651. return locale.lang.yearPlaceholder;
  52652. }
  52653. if (picker === 'quarter' && locale.lang.quarterPlaceholder) {
  52654. return locale.lang.quarterPlaceholder;
  52655. }
  52656. if (picker === 'month' && locale.lang.monthPlaceholder) {
  52657. return locale.lang.monthPlaceholder;
  52658. }
  52659. if (picker === 'week' && locale.lang.weekPlaceholder) {
  52660. return locale.lang.weekPlaceholder;
  52661. }
  52662. if (picker === 'time' && locale.timePickerLocale.placeholder) {
  52663. return locale.timePickerLocale.placeholder;
  52664. }
  52665. return locale.lang.placeholder;
  52666. }
  52667. function getRangePlaceholder(locale, picker, customizePlaceholder) {
  52668. if (customizePlaceholder !== undefined) {
  52669. return customizePlaceholder;
  52670. }
  52671. if (picker === 'year' && locale.lang.yearPlaceholder) {
  52672. return locale.lang.rangeYearPlaceholder;
  52673. }
  52674. if (picker === 'quarter' && locale.lang.quarterPlaceholder) {
  52675. return locale.lang.rangeQuarterPlaceholder;
  52676. }
  52677. if (picker === 'month' && locale.lang.monthPlaceholder) {
  52678. return locale.lang.rangeMonthPlaceholder;
  52679. }
  52680. if (picker === 'week' && locale.lang.weekPlaceholder) {
  52681. return locale.lang.rangeWeekPlaceholder;
  52682. }
  52683. if (picker === 'time' && locale.timePickerLocale.placeholder) {
  52684. return locale.timePickerLocale.rangePlaceholder;
  52685. }
  52686. return locale.lang.rangePlaceholder;
  52687. }
  52688. function util_useIcons(props, prefixCls) {
  52689. const {
  52690. allowClear = true
  52691. } = props;
  52692. const {
  52693. clearIcon,
  52694. removeIcon
  52695. } = useIcons(Object.assign(Object.assign({}, props), {
  52696. prefixCls,
  52697. componentName: 'DatePicker'
  52698. }));
  52699. const mergedAllowClear = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52700. if (allowClear === false) {
  52701. return false;
  52702. }
  52703. const allowClearConfig = allowClear === true ? {} : allowClear;
  52704. return Object.assign({
  52705. clearIcon: clearIcon
  52706. }, allowClearConfig);
  52707. }, [allowClear, clearIcon]);
  52708. return [mergedAllowClear, removeIcon];
  52709. }
  52710. ;// ./components/date-picker/generatePicker/constant.ts
  52711. const [WEEK, WEEKPICKER] = ['week', 'WeekPicker'];
  52712. const [MONTH, MONTHPICKER] = ['month', 'MonthPicker'];
  52713. const [YEAR, YEARPICKER] = ['year', 'YearPicker'];
  52714. const [QUARTER, QUARTERPICKER] = ['quarter', 'QuarterPicker'];
  52715. const [TIME, TIMEPICKER] = ['time', 'TimePicker'];
  52716. ;// ./components/date-picker/PickerButton.tsx
  52717. const PickerButton = props => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({
  52718. size: "small",
  52719. type: "primary"
  52720. }, props)));
  52721. /* harmony default export */ var date_picker_PickerButton = (PickerButton);
  52722. ;// ./components/date-picker/generatePicker/useComponents.ts
  52723. function useComponents(components) {
  52724. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Object.assign({
  52725. button: date_picker_PickerButton
  52726. }, components), [components]);
  52727. }
  52728. ;// ./components/_util/hooks/useMergeSemantic/index.ts
  52729. // ========================= ClassNames =========================
  52730. function mergeClassNames(schema, ...classNames) {
  52731. const mergedSchema = schema || {};
  52732. return classNames.reduce((acc, cur) => {
  52733. // Loop keys of the current classNames
  52734. Object.keys(cur || {}).forEach(key => {
  52735. const keySchema = mergedSchema[key];
  52736. const curVal = cur[key];
  52737. if (keySchema && typeof keySchema === 'object') {
  52738. if (curVal && typeof curVal === 'object') {
  52739. // Loop fill
  52740. acc[key] = mergeClassNames(keySchema, acc[key], curVal);
  52741. } else {
  52742. // Covert string to object structure
  52743. const {
  52744. _default: defaultField
  52745. } = keySchema;
  52746. acc[key] = acc[key] || {};
  52747. acc[key][defaultField] = classnames_default()(acc[key][defaultField], curVal);
  52748. }
  52749. } else {
  52750. // Flatten fill
  52751. acc[key] = classnames_default()(acc[key], curVal);
  52752. }
  52753. });
  52754. return acc;
  52755. }, {});
  52756. }
  52757. function useSemanticClassNames(schema, ...classNames) {
  52758. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => mergeClassNames.apply(void 0, [schema].concat(classNames)), [classNames]);
  52759. }
  52760. // =========================== Styles ===========================
  52761. function useSemanticStyles(...styles) {
  52762. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52763. return styles.reduce((acc, cur = {}) => {
  52764. Object.keys(cur).forEach(key => {
  52765. acc[key] = Object.assign(Object.assign({}, acc[key]), cur[key]);
  52766. });
  52767. return acc;
  52768. }, {});
  52769. }, [styles]);
  52770. }
  52771. // =========================== Export ===========================
  52772. function fillObjectBySchema(obj, schema) {
  52773. const newObj = Object.assign({}, obj);
  52774. Object.keys(schema).forEach(key => {
  52775. if (key !== '_default') {
  52776. const nestSchema = schema[key];
  52777. const nextValue = newObj[key] || {};
  52778. newObj[key] = nestSchema ? fillObjectBySchema(nextValue, nestSchema) : nextValue;
  52779. }
  52780. });
  52781. return newObj;
  52782. }
  52783. /**
  52784. * Merge classNames and styles from multiple sources.
  52785. * When `schema` is provided, it will **must** provide the nest object structure.
  52786. */
  52787. function useMergeSemantic(classNamesList, stylesList, schema) {
  52788. const mergedClassNames = useSemanticClassNames.apply(void 0, [schema].concat((0,toConsumableArray["default"])(classNamesList)));
  52789. const mergedStyles = useSemanticStyles.apply(void 0, (0,toConsumableArray["default"])(stylesList));
  52790. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52791. return [fillObjectBySchema(mergedClassNames, schema), fillObjectBySchema(mergedStyles, schema)];
  52792. }, [mergedClassNames, mergedStyles]);
  52793. }
  52794. ;// ./components/date-picker/hooks/useMergedPickerSemantic.ts
  52795. const useMergedPickerSemantic = (pickerType, classNames, styles, popupClassName, popupStyle) => {
  52796. const {
  52797. classNames: contextClassNames,
  52798. styles: contextStyles
  52799. } = (0,config_provider_context.useComponentConfig)(pickerType);
  52800. const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, styles], {
  52801. popup: {
  52802. _default: 'root'
  52803. }
  52804. });
  52805. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  52806. var _a, _b;
  52807. // ClassNames
  52808. const filledClassNames = Object.assign(Object.assign({}, mergedClassNames), {
  52809. popup: Object.assign(Object.assign({}, mergedClassNames.popup), {
  52810. root: classnames_default()((_a = mergedClassNames.popup) === null || _a === void 0 ? void 0 : _a.root, popupClassName)
  52811. })
  52812. });
  52813. // Styles
  52814. const filledStyles = Object.assign(Object.assign({}, mergedStyles), {
  52815. popup: Object.assign(Object.assign({}, mergedStyles.popup), {
  52816. root: Object.assign(Object.assign({}, (_b = mergedStyles.popup) === null || _b === void 0 ? void 0 : _b.root), popupStyle)
  52817. })
  52818. });
  52819. // Return
  52820. return [filledClassNames, filledStyles];
  52821. }, [mergedClassNames, mergedStyles, popupClassName, popupStyle]);
  52822. };
  52823. /* harmony default export */ var hooks_useMergedPickerSemantic = (useMergedPickerSemantic);
  52824. ;// ./components/date-picker/generatePicker/generateRangePicker.tsx
  52825. var generateRangePicker_rest = undefined && undefined.__rest || function (s, e) {
  52826. var t = {};
  52827. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  52828. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  52829. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  52830. }
  52831. return t;
  52832. };
  52833. const generateRangePicker = generateConfig => {
  52834. const RangePicker = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  52835. var _a;
  52836. const {
  52837. prefixCls: customizePrefixCls,
  52838. getPopupContainer: customGetPopupContainer,
  52839. components,
  52840. className,
  52841. style,
  52842. placement,
  52843. size: customizeSize,
  52844. disabled: customDisabled,
  52845. bordered = true,
  52846. placeholder,
  52847. popupStyle,
  52848. popupClassName,
  52849. dropdownClassName,
  52850. status: customStatus,
  52851. rootClassName,
  52852. variant: customVariant,
  52853. picker,
  52854. styles,
  52855. classNames
  52856. } = props,
  52857. restProps = generateRangePicker_rest(props, ["prefixCls", "getPopupContainer", "components", "className", "style", "placement", "size", "disabled", "bordered", "placeholder", "popupStyle", "popupClassName", "dropdownClassName", "status", "rootClassName", "variant", "picker", "styles", "classNames"]);
  52858. const pickerType = picker === TIME ? 'timePicker' : 'datePicker';
  52859. const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  52860. const {
  52861. getPrefixCls,
  52862. direction,
  52863. getPopupContainer,
  52864. rangePicker
  52865. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  52866. const prefixCls = getPrefixCls('picker', customizePrefixCls);
  52867. const {
  52868. compactSize,
  52869. compactItemClassnames
  52870. } = useCompactItemContext(prefixCls, direction);
  52871. const rootPrefixCls = getPrefixCls();
  52872. const [variant, enableVariantCls] = useVariants('rangePicker', customVariant, bordered);
  52873. const rootCls = hooks_useCSSVarCls(prefixCls);
  52874. const [wrapCSSVar, hashId, cssVarCls] = (0,date_picker_style["default"])(prefixCls, rootCls);
  52875. // =================== Warning =====================
  52876. if (true) {
  52877. const warning = (0,_util_warning.devUseWarning)('DatePicker.RangePicker');
  52878. // ==================== Deprecated =====================
  52879. const deprecatedProps = {
  52880. dropdownClassName: 'classNames.popup.root',
  52881. popupClassName: 'classNames.popup.root',
  52882. popupStyle: 'styles.popup.root',
  52883. bordered: 'variant',
  52884. onSelect: 'onCalendarChange'
  52885. };
  52886. Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
  52887. warning.deprecated(!(oldProp in props), oldProp, newProp);
  52888. });
  52889. }
  52890. const [mergedClassNames, mergedStyles] = hooks_useMergedPickerSemantic(pickerType, classNames, styles, popupClassName || dropdownClassName, popupStyle);
  52891. // ===================== Icon =====================
  52892. const [mergedAllowClear] = util_useIcons(props, prefixCls);
  52893. // ================== components ==================
  52894. const mergedComponents = useComponents(components);
  52895. // ===================== Size =====================
  52896. const mergedSize = (0,useSize["default"])(ctx => {
  52897. var _a;
  52898. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  52899. });
  52900. // ===================== Disabled =====================
  52901. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  52902. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  52903. // ===================== FormItemInput =====================
  52904. const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
  52905. const {
  52906. hasFeedback,
  52907. status: contextStatus,
  52908. feedbackIcon
  52909. } = formItemContext;
  52910. const suffixNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, picker === TIME ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ClockCircleOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CalendarOutlined, null), hasFeedback && feedbackIcon);
  52911. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => innerRef.current);
  52912. const [contextLocale] = (0,useLocale["default"])('Calendar', date_picker_locale_en_US["default"]);
  52913. const locale = Object.assign(Object.assign({}, contextLocale), props.locale);
  52914. // ============================ zIndex ============================
  52915. const [zIndex] = (0,useZIndex.useZIndex)('DatePicker', (_a = mergedStyles.popup.root) === null || _a === void 0 ? void 0 : _a.zIndex);
  52916. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  52917. space: true
  52918. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PickerInput_RangePicker, Object.assign({
  52919. separator: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  52920. "aria-label": "to",
  52921. className: `${prefixCls}-separator`
  52922. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SwapRightOutlined, null)),
  52923. disabled: mergedDisabled,
  52924. ref: innerRef,
  52925. placement: placement,
  52926. placeholder: getRangePlaceholder(locale, picker, placeholder),
  52927. suffixIcon: suffixNode,
  52928. prevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  52929. className: `${prefixCls}-prev-icon`
  52930. }),
  52931. nextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  52932. className: `${prefixCls}-next-icon`
  52933. }),
  52934. superPrevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  52935. className: `${prefixCls}-super-prev-icon`
  52936. }),
  52937. superNextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  52938. className: `${prefixCls}-super-next-icon`
  52939. }),
  52940. transitionName: `${rootPrefixCls}-slide-up`,
  52941. picker: picker
  52942. }, restProps, {
  52943. className: classnames_default()({
  52944. [`${prefixCls}-${mergedSize}`]: mergedSize,
  52945. [`${prefixCls}-${variant}`]: enableVariantCls
  52946. }, getStatusClassNames(prefixCls, getMergedStatus(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, className, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.className, cssVarCls, rootCls, rootClassName, mergedClassNames.root),
  52947. style: Object.assign(Object.assign(Object.assign({}, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.style), style), mergedStyles.root),
  52948. locale: locale.lang,
  52949. prefixCls: prefixCls,
  52950. getPopupContainer: customGetPopupContainer || getPopupContainer,
  52951. generateConfig: generateConfig,
  52952. components: mergedComponents,
  52953. direction: direction,
  52954. classNames: {
  52955. popup: classnames_default()(hashId, cssVarCls, rootCls, rootClassName, mergedClassNames.popup.root)
  52956. },
  52957. styles: {
  52958. popup: Object.assign(Object.assign({}, mergedStyles.popup.root), {
  52959. zIndex
  52960. })
  52961. },
  52962. allowClear: mergedAllowClear
  52963. }))));
  52964. });
  52965. if (true) {
  52966. RangePicker.displayName = 'RangePicker';
  52967. }
  52968. return RangePicker;
  52969. };
  52970. /* harmony default export */ var generatePicker_generateRangePicker = (generateRangePicker);
  52971. ;// ./components/date-picker/generatePicker/generateSinglePicker.tsx
  52972. var generateSinglePicker_rest = undefined && undefined.__rest || function (s, e) {
  52973. var t = {};
  52974. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  52975. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  52976. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  52977. }
  52978. return t;
  52979. };
  52980. const generatePicker = generateConfig => {
  52981. const getPicker = (picker, displayName) => {
  52982. const consumerName = displayName === TIMEPICKER ? 'timePicker' : 'datePicker';
  52983. const Picker = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  52984. var _a;
  52985. const {
  52986. prefixCls: customizePrefixCls,
  52987. getPopupContainer: customizeGetPopupContainer,
  52988. components,
  52989. style,
  52990. className,
  52991. rootClassName,
  52992. size: customizeSize,
  52993. bordered,
  52994. placement,
  52995. placeholder,
  52996. popupStyle,
  52997. popupClassName,
  52998. dropdownClassName,
  52999. disabled: customDisabled,
  53000. status: customStatus,
  53001. variant: customVariant,
  53002. onCalendarChange,
  53003. styles,
  53004. classNames
  53005. } = props,
  53006. restProps = generateSinglePicker_rest(props, ["prefixCls", "getPopupContainer", "components", "style", "className", "rootClassName", "size", "bordered", "placement", "placeholder", "popupStyle", "popupClassName", "dropdownClassName", "disabled", "status", "variant", "onCalendarChange", "styles", "classNames"]);
  53007. const {
  53008. getPrefixCls,
  53009. direction,
  53010. getPopupContainer,
  53011. // Consume different styles according to different names
  53012. [consumerName]: consumerStyle
  53013. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  53014. const prefixCls = getPrefixCls('picker', customizePrefixCls);
  53015. const {
  53016. compactSize,
  53017. compactItemClassnames
  53018. } = useCompactItemContext(prefixCls, direction);
  53019. const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  53020. const [variant, enableVariantCls] = useVariants('datePicker', customVariant, bordered);
  53021. const rootCls = hooks_useCSSVarCls(prefixCls);
  53022. const [wrapCSSVar, hashId, cssVarCls] = (0,date_picker_style["default"])(prefixCls, rootCls);
  53023. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => innerRef.current);
  53024. const additionalProps = {
  53025. showToday: true
  53026. };
  53027. const mergedPicker = picker || props.picker;
  53028. const rootPrefixCls = getPrefixCls();
  53029. // ==================== Legacy =====================
  53030. const {
  53031. onSelect,
  53032. multiple
  53033. } = restProps;
  53034. const hasLegacyOnSelect = onSelect && picker === 'time' && !multiple;
  53035. const onInternalCalendarChange = (date, dateStr, info) => {
  53036. onCalendarChange === null || onCalendarChange === void 0 ? void 0 : onCalendarChange(date, dateStr, info);
  53037. if (hasLegacyOnSelect) {
  53038. onSelect(date);
  53039. }
  53040. };
  53041. // =================== Warning =====================
  53042. if (true) {
  53043. const warning = (0,_util_warning.devUseWarning)(displayName || 'DatePicker');
  53044. true ? warning(picker !== 'quarter', 'deprecated', `DatePicker.${displayName} is legacy usage. Please use DatePicker[picker='${picker}'] directly.`) : 0;
  53045. // ==================== Deprecated =====================
  53046. const deprecatedProps = {
  53047. dropdownClassName: 'classNames.popup.root',
  53048. popupClassName: 'classNames.popup.root',
  53049. popupStyle: 'styles.popup.root',
  53050. bordered: 'variant',
  53051. onSelect: 'onCalendarChange'
  53052. };
  53053. Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
  53054. warning.deprecated(!(oldProp in props), oldProp, newProp);
  53055. });
  53056. }
  53057. const [mergedClassNames, mergedStyles] = hooks_useMergedPickerSemantic(consumerName, classNames, styles, popupClassName || dropdownClassName, popupStyle);
  53058. // ===================== Icon =====================
  53059. const [mergedAllowClear, removeIcon] = util_useIcons(props, prefixCls);
  53060. // ================== components ==================
  53061. const mergedComponents = useComponents(components);
  53062. // ===================== Size =====================
  53063. const mergedSize = (0,useSize["default"])(ctx => {
  53064. var _a;
  53065. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  53066. });
  53067. // ===================== Disabled =====================
  53068. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  53069. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  53070. // ===================== FormItemInput =====================
  53071. const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
  53072. const {
  53073. hasFeedback,
  53074. status: contextStatus,
  53075. feedbackIcon
  53076. } = formItemContext;
  53077. const suffixNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, mergedPicker === 'time' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ClockCircleOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CalendarOutlined, null), hasFeedback && feedbackIcon);
  53078. const [contextLocale] = (0,useLocale["default"])('DatePicker', date_picker_locale_en_US["default"]);
  53079. const locale = Object.assign(Object.assign({}, contextLocale), props.locale);
  53080. // ============================ zIndex ============================
  53081. const [zIndex] = (0,useZIndex.useZIndex)('DatePicker', (_a = mergedStyles.popup.root) === null || _a === void 0 ? void 0 : _a.zIndex);
  53082. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  53083. space: true
  53084. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_picker_es, Object.assign({
  53085. ref: innerRef,
  53086. placeholder: getPlaceholder(locale, mergedPicker, placeholder),
  53087. suffixIcon: suffixNode,
  53088. placement: placement,
  53089. prevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53090. className: `${prefixCls}-prev-icon`
  53091. }),
  53092. nextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53093. className: `${prefixCls}-next-icon`
  53094. }),
  53095. superPrevIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53096. className: `${prefixCls}-super-prev-icon`
  53097. }),
  53098. superNextIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53099. className: `${prefixCls}-super-next-icon`
  53100. }),
  53101. transitionName: `${rootPrefixCls}-slide-up`,
  53102. picker: picker,
  53103. onCalendarChange: onInternalCalendarChange
  53104. }, additionalProps, restProps, {
  53105. locale: locale.lang,
  53106. className: classnames_default()({
  53107. [`${prefixCls}-${mergedSize}`]: mergedSize,
  53108. [`${prefixCls}-${variant}`]: enableVariantCls
  53109. }, getStatusClassNames(prefixCls, getMergedStatus(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, consumerStyle === null || consumerStyle === void 0 ? void 0 : consumerStyle.className, className, cssVarCls, rootCls, rootClassName, mergedClassNames.root),
  53110. style: Object.assign(Object.assign(Object.assign({}, consumerStyle === null || consumerStyle === void 0 ? void 0 : consumerStyle.style), style), mergedStyles.root),
  53111. prefixCls: prefixCls,
  53112. getPopupContainer: customizeGetPopupContainer || getPopupContainer,
  53113. generateConfig: generateConfig,
  53114. components: mergedComponents,
  53115. direction: direction,
  53116. disabled: mergedDisabled,
  53117. classNames: {
  53118. popup: classnames_default()(hashId, cssVarCls, rootCls, rootClassName, mergedClassNames.popup.root)
  53119. },
  53120. styles: {
  53121. popup: Object.assign(Object.assign({}, mergedStyles.popup.root), {
  53122. zIndex
  53123. })
  53124. },
  53125. allowClear: mergedAllowClear,
  53126. removeIcon: removeIcon
  53127. }))));
  53128. });
  53129. if ( true && displayName) {
  53130. Picker.displayName = displayName;
  53131. }
  53132. return Picker;
  53133. };
  53134. const DatePicker = getPicker();
  53135. const WeekPicker = getPicker(WEEK, WEEKPICKER);
  53136. const MonthPicker = getPicker(MONTH, MONTHPICKER);
  53137. const YearPicker = getPicker(YEAR, YEARPICKER);
  53138. const QuarterPicker = getPicker(QUARTER, QUARTERPICKER);
  53139. const TimePicker = getPicker(TIME, TIMEPICKER);
  53140. return {
  53141. DatePicker,
  53142. WeekPicker,
  53143. MonthPicker,
  53144. YearPicker,
  53145. TimePicker,
  53146. QuarterPicker
  53147. };
  53148. };
  53149. /* harmony default export */ var generateSinglePicker = (generatePicker);
  53150. ;// ./components/date-picker/generatePicker/index.tsx
  53151. const generatePicker_generatePicker = generateConfig => {
  53152. // =========================== Picker ===========================
  53153. const {
  53154. DatePicker,
  53155. WeekPicker,
  53156. MonthPicker,
  53157. YearPicker,
  53158. TimePicker,
  53159. QuarterPicker
  53160. } = generateSinglePicker(generateConfig);
  53161. // ======================== Range Picker ========================
  53162. const RangePicker = generatePicker_generateRangePicker(generateConfig);
  53163. const MergedDatePicker = DatePicker;
  53164. MergedDatePicker.WeekPicker = WeekPicker;
  53165. MergedDatePicker.MonthPicker = MonthPicker;
  53166. MergedDatePicker.YearPicker = YearPicker;
  53167. MergedDatePicker.RangePicker = RangePicker;
  53168. MergedDatePicker.TimePicker = TimePicker;
  53169. MergedDatePicker.QuarterPicker = QuarterPicker;
  53170. if (true) {
  53171. MergedDatePicker.displayName = 'DatePicker';
  53172. }
  53173. return MergedDatePicker;
  53174. };
  53175. /* harmony default export */ var date_picker_generatePicker = (generatePicker_generatePicker);
  53176. ;// ./components/date-picker/index.tsx
  53177. const DatePicker = date_picker_generatePicker(dayjs);
  53178. // We don't care debug panel
  53179. /* istanbul ignore next */
  53180. const date_picker_PurePanel = _util_PurePanel(DatePicker, 'popupAlign', undefined, 'picker');
  53181. DatePicker._InternalPanelDoNotUseOrYouWillBeFired = date_picker_PurePanel;
  53182. const PureRangePanel = _util_PurePanel(DatePicker.RangePicker, 'popupAlign', undefined, 'picker');
  53183. DatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = PureRangePanel;
  53184. DatePicker.generatePicker = date_picker_generatePicker;
  53185. /* harmony default export */ var date_picker = (DatePicker);
  53186. ;// ./components/descriptions/constant.ts
  53187. const DEFAULT_COLUMN_MAP = {
  53188. xxl: 3,
  53189. xl: 3,
  53190. lg: 3,
  53191. md: 3,
  53192. sm: 2,
  53193. xs: 1
  53194. };
  53195. /* harmony default export */ var constant = (DEFAULT_COLUMN_MAP);
  53196. ;// ./components/descriptions/DescriptionsContext.ts
  53197. const DescriptionsContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  53198. /* harmony default export */ var descriptions_DescriptionsContext = (DescriptionsContext);
  53199. ;// ./components/descriptions/hooks/useItems.ts
  53200. var hooks_useItems_rest = undefined && undefined.__rest || function (s, e) {
  53201. var t = {};
  53202. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  53203. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  53204. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  53205. }
  53206. return t;
  53207. };
  53208. // Convert children into items
  53209. const transChildren2Items = childNodes => (0,toArray["default"])(childNodes).map(node => Object.assign(Object.assign({}, node === null || node === void 0 ? void 0 : node.props), {
  53210. key: node.key
  53211. }));
  53212. function useItems_useItems(screens, items, children) {
  53213. const mergedItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() =>
  53214. // Take `items` first or convert `children` into items
  53215. items || transChildren2Items(children), [items, children]);
  53216. const responsiveItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => mergedItems.map(_a => {
  53217. var {
  53218. span
  53219. } = _a,
  53220. restItem = hooks_useItems_rest(_a, ["span"]);
  53221. if (span === 'filled') {
  53222. return Object.assign(Object.assign({}, restItem), {
  53223. filled: true
  53224. });
  53225. }
  53226. return Object.assign(Object.assign({}, restItem), {
  53227. span: typeof span === 'number' ? span : matchScreen(screens, span)
  53228. });
  53229. }), [mergedItems, screens]);
  53230. return responsiveItems;
  53231. }
  53232. ;// ./components/descriptions/hooks/useRow.ts
  53233. var useRow_rest = undefined && undefined.__rest || function (s, e) {
  53234. var t = {};
  53235. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  53236. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  53237. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  53238. }
  53239. return t;
  53240. };
  53241. // Calculate the sum of span in a row
  53242. function getCalcRows(rowItems, mergedColumn) {
  53243. let rows = [];
  53244. let tmpRow = [];
  53245. let exceed = false;
  53246. let count = 0;
  53247. rowItems.filter(n => n).forEach(rowItem => {
  53248. const {
  53249. filled
  53250. } = rowItem,
  53251. restItem = useRow_rest(rowItem, ["filled"]);
  53252. if (filled) {
  53253. tmpRow.push(restItem);
  53254. rows.push(tmpRow);
  53255. // reset
  53256. tmpRow = [];
  53257. count = 0;
  53258. return;
  53259. }
  53260. const restSpan = mergedColumn - count;
  53261. count += rowItem.span || 1;
  53262. if (count >= mergedColumn) {
  53263. if (count > mergedColumn) {
  53264. exceed = true;
  53265. tmpRow.push(Object.assign(Object.assign({}, restItem), {
  53266. span: restSpan
  53267. }));
  53268. } else {
  53269. tmpRow.push(restItem);
  53270. }
  53271. rows.push(tmpRow);
  53272. // reset
  53273. tmpRow = [];
  53274. count = 0;
  53275. } else {
  53276. tmpRow.push(restItem);
  53277. }
  53278. });
  53279. if (tmpRow.length > 0) {
  53280. rows.push(tmpRow);
  53281. }
  53282. rows = rows.map(rows => {
  53283. const count = rows.reduce((acc, item) => acc + (item.span || 1), 0);
  53284. if (count < mergedColumn) {
  53285. // If the span of the last element in the current row is less than the column, then add its span to the remaining columns
  53286. const last = rows[rows.length - 1];
  53287. last.span = mergedColumn - (count - (last.span || 1));
  53288. return rows;
  53289. }
  53290. return rows;
  53291. });
  53292. return [rows, exceed];
  53293. }
  53294. const useRow = (mergedColumn, items) => {
  53295. const [rows, exceed] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => getCalcRows(items, mergedColumn), [items, mergedColumn]);
  53296. if (true) {
  53297. const warning = (0,_util_warning.devUseWarning)('Descriptions');
  53298. true ? warning(!exceed, 'usage', 'Sum of column `span` in a line not match `column` of Descriptions.') : 0;
  53299. }
  53300. return rows;
  53301. };
  53302. /* harmony default export */ var hooks_useRow = (useRow);
  53303. ;// ./components/descriptions/Item.ts
  53304. // JSX Structure Syntactic Sugar. Never reach the render code.
  53305. /* istanbul ignore next */
  53306. const DescriptionsItem = ({
  53307. children
  53308. }) => children;
  53309. /* harmony default export */ var descriptions_Item = (DescriptionsItem);
  53310. ;// ./components/descriptions/Cell.tsx
  53311. function notEmpty(val) {
  53312. return val !== undefined && val !== null;
  53313. }
  53314. const Cell = props => {
  53315. const {
  53316. itemPrefixCls,
  53317. component,
  53318. span,
  53319. className,
  53320. style,
  53321. labelStyle,
  53322. contentStyle,
  53323. bordered,
  53324. label,
  53325. content,
  53326. colon,
  53327. type,
  53328. styles
  53329. } = props;
  53330. const Component = component;
  53331. const descContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(descriptions_DescriptionsContext);
  53332. const {
  53333. classNames: descriptionsClassNames
  53334. } = descContext;
  53335. if (bordered) {
  53336. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
  53337. className: classnames_default()({
  53338. [`${itemPrefixCls}-item-label`]: type === 'label',
  53339. [`${itemPrefixCls}-item-content`]: type === 'content',
  53340. [`${descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.label}`]: type === 'label',
  53341. [`${descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.content}`]: type === 'content'
  53342. }, className),
  53343. style: style,
  53344. colSpan: span
  53345. }, notEmpty(label) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53346. style: Object.assign(Object.assign({}, labelStyle), styles === null || styles === void 0 ? void 0 : styles.label)
  53347. }, label), notEmpty(content) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53348. style: Object.assign(Object.assign({}, labelStyle), styles === null || styles === void 0 ? void 0 : styles.content)
  53349. }, content));
  53350. }
  53351. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
  53352. className: classnames_default()(`${itemPrefixCls}-item`, className),
  53353. style: style,
  53354. colSpan: span
  53355. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53356. className: `${itemPrefixCls}-item-container`
  53357. }, (label || label === 0) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53358. className: classnames_default()(`${itemPrefixCls}-item-label`, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.label, {
  53359. [`${itemPrefixCls}-item-no-colon`]: !colon
  53360. }),
  53361. style: Object.assign(Object.assign({}, labelStyle), styles === null || styles === void 0 ? void 0 : styles.label)
  53362. }, label)), (content || content === 0) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  53363. className: classnames_default()(`${itemPrefixCls}-item-content`, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.content),
  53364. style: Object.assign(Object.assign({}, contentStyle), styles === null || styles === void 0 ? void 0 : styles.content)
  53365. }, content))));
  53366. };
  53367. /* harmony default export */ var descriptions_Cell = (Cell);
  53368. ;// ./components/descriptions/Row.tsx
  53369. function renderCells(items, {
  53370. colon,
  53371. prefixCls,
  53372. bordered
  53373. }, {
  53374. component,
  53375. type,
  53376. showLabel,
  53377. showContent,
  53378. labelStyle: rootLabelStyle,
  53379. contentStyle: rootContentStyle,
  53380. styles: rootStyles
  53381. }) {
  53382. return items.map(({
  53383. label,
  53384. children,
  53385. prefixCls: itemPrefixCls = prefixCls,
  53386. className,
  53387. style,
  53388. labelStyle,
  53389. contentStyle,
  53390. span = 1,
  53391. key,
  53392. styles
  53393. }, index) => {
  53394. if (typeof component === 'string') {
  53395. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Cell, {
  53396. key: `${type}-${key || index}`,
  53397. className: className,
  53398. style: style,
  53399. styles: {
  53400. label: Object.assign(Object.assign(Object.assign(Object.assign({}, rootLabelStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.label), labelStyle), styles === null || styles === void 0 ? void 0 : styles.label),
  53401. content: Object.assign(Object.assign(Object.assign(Object.assign({}, rootContentStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.content), contentStyle), styles === null || styles === void 0 ? void 0 : styles.content)
  53402. },
  53403. span: span,
  53404. colon: colon,
  53405. component: component,
  53406. itemPrefixCls: itemPrefixCls,
  53407. bordered: bordered,
  53408. label: showLabel ? label : null,
  53409. content: showContent ? children : null,
  53410. type: type
  53411. });
  53412. }
  53413. return [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Cell, {
  53414. key: `label-${key || index}`,
  53415. className: className,
  53416. style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, rootLabelStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.label), style), labelStyle), styles === null || styles === void 0 ? void 0 : styles.label),
  53417. span: 1,
  53418. colon: colon,
  53419. component: component[0],
  53420. itemPrefixCls: itemPrefixCls,
  53421. bordered: bordered,
  53422. label: label,
  53423. type: "label"
  53424. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Cell, {
  53425. key: `content-${key || index}`,
  53426. className: className,
  53427. style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, rootContentStyle), rootStyles === null || rootStyles === void 0 ? void 0 : rootStyles.content), style), contentStyle), styles === null || styles === void 0 ? void 0 : styles.content),
  53428. span: span * 2 - 1,
  53429. component: component[1],
  53430. itemPrefixCls: itemPrefixCls,
  53431. bordered: bordered,
  53432. content: children,
  53433. type: "content"
  53434. })];
  53435. });
  53436. }
  53437. const Row = props => {
  53438. const descContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(descriptions_DescriptionsContext);
  53439. const {
  53440. prefixCls,
  53441. vertical,
  53442. row,
  53443. index,
  53444. bordered
  53445. } = props;
  53446. if (vertical) {
  53447. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
  53448. key: `label-${index}`,
  53449. className: `${prefixCls}-row`
  53450. }, renderCells(row, props, Object.assign({
  53451. component: 'th',
  53452. type: 'label',
  53453. showLabel: true
  53454. }, descContext))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
  53455. key: `content-${index}`,
  53456. className: `${prefixCls}-row`
  53457. }, renderCells(row, props, Object.assign({
  53458. component: 'td',
  53459. type: 'content',
  53460. showContent: true
  53461. }, descContext))));
  53462. }
  53463. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
  53464. key: index,
  53465. className: `${prefixCls}-row`
  53466. }, renderCells(row, props, Object.assign({
  53467. component: bordered ? ['th', 'td'] : 'td',
  53468. type: 'item',
  53469. showLabel: true,
  53470. showContent: true
  53471. }, descContext)));
  53472. };
  53473. /* harmony default export */ var descriptions_Row = (Row);
  53474. // EXTERNAL MODULE: ./components/descriptions/style/index.ts
  53475. var descriptions_style = __webpack_require__("./components/descriptions/style/index.ts");
  53476. ;// ./components/descriptions/index.tsx
  53477. var descriptions_rest = undefined && undefined.__rest || function (s, e) {
  53478. var t = {};
  53479. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  53480. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  53481. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  53482. }
  53483. return t;
  53484. };
  53485. /* eslint-disable react/no-array-index-key */
  53486. const Descriptions = props => {
  53487. const {
  53488. prefixCls: customizePrefixCls,
  53489. title,
  53490. extra,
  53491. column,
  53492. colon = true,
  53493. bordered,
  53494. layout,
  53495. children,
  53496. className,
  53497. rootClassName,
  53498. style,
  53499. size: customizeSize,
  53500. labelStyle,
  53501. contentStyle,
  53502. styles,
  53503. items,
  53504. classNames: descriptionsClassNames
  53505. } = props,
  53506. restProps = descriptions_rest(props, ["prefixCls", "title", "extra", "column", "colon", "bordered", "layout", "children", "className", "rootClassName", "style", "size", "labelStyle", "contentStyle", "styles", "items", "classNames"]);
  53507. const {
  53508. getPrefixCls,
  53509. direction,
  53510. className: contextClassName,
  53511. style: contextStyle,
  53512. classNames: contextClassNames,
  53513. styles: contextStyles
  53514. } = (0,config_provider_context.useComponentConfig)('descriptions');
  53515. const prefixCls = getPrefixCls('descriptions', customizePrefixCls);
  53516. const screens = hooks_useBreakpoint();
  53517. // ============================== Warn ==============================
  53518. if (true) {
  53519. const warning = (0,_util_warning.devUseWarning)('Descriptions');
  53520. [['labelStyle', 'styles={{ label: {} }}'], ['contentStyle', 'styles={{ content: {} }}']].forEach(([deprecatedName, newName]) => {
  53521. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  53522. });
  53523. }
  53524. // Column count
  53525. const mergedColumn = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  53526. var _a;
  53527. if (typeof column === 'number') {
  53528. return column;
  53529. }
  53530. return (_a = matchScreen(screens, Object.assign(Object.assign({}, constant), column))) !== null && _a !== void 0 ? _a : 3;
  53531. }, [screens, column]);
  53532. // Items with responsive
  53533. const mergedItems = useItems_useItems(screens, items, children);
  53534. const mergedSize = (0,useSize["default"])(customizeSize);
  53535. const rows = hooks_useRow(mergedColumn, mergedItems);
  53536. const [wrapCSSVar, hashId, cssVarCls] = (0,descriptions_style["default"])(prefixCls);
  53537. // ======================== Render ========================
  53538. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  53539. labelStyle,
  53540. contentStyle,
  53541. styles: {
  53542. content: Object.assign(Object.assign({}, contextStyles.content), styles === null || styles === void 0 ? void 0 : styles.content),
  53543. label: Object.assign(Object.assign({}, contextStyles.label), styles === null || styles === void 0 ? void 0 : styles.label)
  53544. },
  53545. classNames: {
  53546. label: classnames_default()(contextClassNames.label, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.label),
  53547. content: classnames_default()(contextClassNames.content, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.content)
  53548. }
  53549. }), [labelStyle, contentStyle, styles, descriptionsClassNames, contextClassNames, contextStyles]);
  53550. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_DescriptionsContext.Provider, {
  53551. value: contextValue
  53552. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  53553. className: classnames_default()(prefixCls, contextClassName, contextClassNames.root, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.root, {
  53554. [`${prefixCls}-${mergedSize}`]: mergedSize && mergedSize !== 'default',
  53555. [`${prefixCls}-bordered`]: !!bordered,
  53556. [`${prefixCls}-rtl`]: direction === 'rtl'
  53557. }, className, rootClassName, hashId, cssVarCls),
  53558. style: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyle), contextStyles.root), styles === null || styles === void 0 ? void 0 : styles.root), style)
  53559. }, restProps), (title || extra) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53560. className: classnames_default()(`${prefixCls}-header`, contextClassNames.header, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.header),
  53561. style: Object.assign(Object.assign({}, contextStyles.header), styles === null || styles === void 0 ? void 0 : styles.header)
  53562. }, title && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53563. className: classnames_default()(`${prefixCls}-title`, contextClassNames.title, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.title),
  53564. style: Object.assign(Object.assign({}, contextStyles.title), styles === null || styles === void 0 ? void 0 : styles.title)
  53565. }, title)), extra && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53566. className: classnames_default()(`${prefixCls}-extra`, contextClassNames.extra, descriptionsClassNames === null || descriptionsClassNames === void 0 ? void 0 : descriptionsClassNames.extra),
  53567. style: Object.assign(Object.assign({}, contextStyles.extra), styles === null || styles === void 0 ? void 0 : styles.extra)
  53568. }, extra)))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53569. className: `${prefixCls}-view`
  53570. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("table", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tbody", null, rows.map((row, index) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(descriptions_Row, {
  53571. key: index,
  53572. index: index,
  53573. colon: colon,
  53574. prefixCls: prefixCls,
  53575. vertical: layout === 'vertical',
  53576. bordered: bordered,
  53577. row: row
  53578. })))))))));
  53579. };
  53580. if (true) {
  53581. Descriptions.displayName = 'Descriptions';
  53582. }
  53583. Descriptions.Item = descriptions_Item;
  53584. /* harmony default export */ var descriptions = (Descriptions);
  53585. ;// ./node_modules/rc-drawer/es/context.js
  53586. var DrawerContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  53587. var context_RefContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  53588. /* harmony default export */ var rc_drawer_es_context = (DrawerContext);
  53589. ;// ./node_modules/rc-drawer/es/DrawerPanel.js
  53590. var DrawerPanel_excluded = ["prefixCls", "className", "containerRef"];
  53591. var DrawerPanel = function DrawerPanel(props) {
  53592. var prefixCls = props.prefixCls,
  53593. className = props.className,
  53594. containerRef = props.containerRef,
  53595. restProps = (0,objectWithoutProperties["default"])(props, DrawerPanel_excluded);
  53596. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_RefContext),
  53597. panelRef = _React$useContext.panel;
  53598. var mergedRef = (0,es_ref.useComposeRef)(panelRef, containerRef);
  53599. // =============================== Render ===============================
  53600. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  53601. className: classnames_default()("".concat(prefixCls, "-content"), className),
  53602. role: "dialog",
  53603. ref: mergedRef
  53604. }, (0,pickAttrs["default"])(props, {
  53605. aria: true
  53606. }), {
  53607. "aria-modal": "true"
  53608. }, restProps));
  53609. };
  53610. if (true) {
  53611. DrawerPanel.displayName = 'DrawerPanel';
  53612. }
  53613. /* harmony default export */ var es_DrawerPanel = (DrawerPanel);
  53614. ;// ./node_modules/rc-drawer/es/util.js
  53615. function parseWidthHeight(value) {
  53616. if (typeof value === 'string' && String(Number(value)) === value) {
  53617. (0,warning["default"])(false, 'Invalid value type of `width` or `height` which should be number type instead.');
  53618. return Number(value);
  53619. }
  53620. return value;
  53621. }
  53622. function warnCheck(props) {
  53623. (0,warning["default"])(!('wrapperClassName' in props), "'wrapperClassName' is removed. Please use 'rootClassName' instead.");
  53624. (0,warning["default"])((0,canUseDom["default"])() || !props.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.");
  53625. }
  53626. ;// ./node_modules/rc-drawer/es/DrawerPopup.js
  53627. var DrawerPopup_sentinelStyle = {
  53628. width: 0,
  53629. height: 0,
  53630. overflow: 'hidden',
  53631. outline: 'none',
  53632. position: 'absolute'
  53633. };
  53634. function DrawerPopup(props, ref) {
  53635. var _ref, _pushConfig$distance, _pushConfig;
  53636. var prefixCls = props.prefixCls,
  53637. open = props.open,
  53638. placement = props.placement,
  53639. inline = props.inline,
  53640. push = props.push,
  53641. forceRender = props.forceRender,
  53642. autoFocus = props.autoFocus,
  53643. keyboard = props.keyboard,
  53644. drawerClassNames = props.classNames,
  53645. rootClassName = props.rootClassName,
  53646. rootStyle = props.rootStyle,
  53647. zIndex = props.zIndex,
  53648. className = props.className,
  53649. id = props.id,
  53650. style = props.style,
  53651. motion = props.motion,
  53652. width = props.width,
  53653. height = props.height,
  53654. children = props.children,
  53655. mask = props.mask,
  53656. maskClosable = props.maskClosable,
  53657. maskMotion = props.maskMotion,
  53658. maskClassName = props.maskClassName,
  53659. maskStyle = props.maskStyle,
  53660. afterOpenChange = props.afterOpenChange,
  53661. onClose = props.onClose,
  53662. onMouseEnter = props.onMouseEnter,
  53663. onMouseOver = props.onMouseOver,
  53664. onMouseLeave = props.onMouseLeave,
  53665. onClick = props.onClick,
  53666. onKeyDown = props.onKeyDown,
  53667. onKeyUp = props.onKeyUp,
  53668. styles = props.styles,
  53669. drawerRender = props.drawerRender;
  53670. // ================================ Refs ================================
  53671. var panelRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  53672. var sentinelStartRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  53673. var sentinelEndRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  53674. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  53675. return panelRef.current;
  53676. });
  53677. var onPanelKeyDown = function onPanelKeyDown(event) {
  53678. var keyCode = event.keyCode,
  53679. shiftKey = event.shiftKey;
  53680. switch (keyCode) {
  53681. // Tab active
  53682. case KeyCode["default"].TAB:
  53683. {
  53684. if (keyCode === KeyCode["default"].TAB) {
  53685. if (!shiftKey && document.activeElement === sentinelEndRef.current) {
  53686. var _sentinelStartRef$cur;
  53687. (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 || _sentinelStartRef$cur.focus({
  53688. preventScroll: true
  53689. });
  53690. } else if (shiftKey && document.activeElement === sentinelStartRef.current) {
  53691. var _sentinelEndRef$curre;
  53692. (_sentinelEndRef$curre = sentinelEndRef.current) === null || _sentinelEndRef$curre === void 0 || _sentinelEndRef$curre.focus({
  53693. preventScroll: true
  53694. });
  53695. }
  53696. }
  53697. break;
  53698. }
  53699. // Close
  53700. case KeyCode["default"].ESC:
  53701. {
  53702. if (onClose && keyboard) {
  53703. event.stopPropagation();
  53704. onClose(event);
  53705. }
  53706. break;
  53707. }
  53708. }
  53709. };
  53710. // ========================== Control ===========================
  53711. // Auto Focus
  53712. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  53713. if (open && autoFocus) {
  53714. var _panelRef$current;
  53715. (_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 || _panelRef$current.focus({
  53716. preventScroll: true
  53717. });
  53718. }
  53719. }, [open]);
  53720. // ============================ Push ============================
  53721. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  53722. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  53723. pushed = _React$useState2[0],
  53724. setPushed = _React$useState2[1];
  53725. var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(rc_drawer_es_context);
  53726. // Merge push distance
  53727. var pushConfig;
  53728. if (typeof push === 'boolean') {
  53729. pushConfig = push ? {} : {
  53730. distance: 0
  53731. };
  53732. } else {
  53733. pushConfig = push || {};
  53734. }
  53735. var pushDistance = (_ref = (_pushConfig$distance = (_pushConfig = pushConfig) === null || _pushConfig === void 0 ? void 0 : _pushConfig.distance) !== null && _pushConfig$distance !== void 0 ? _pushConfig$distance : parentContext === null || parentContext === void 0 ? void 0 : parentContext.pushDistance) !== null && _ref !== void 0 ? _ref : 180;
  53736. var mergedContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  53737. return {
  53738. pushDistance: pushDistance,
  53739. push: function push() {
  53740. setPushed(true);
  53741. },
  53742. pull: function pull() {
  53743. setPushed(false);
  53744. }
  53745. };
  53746. }, [pushDistance]);
  53747. // ========================= ScrollLock =========================
  53748. // Tell parent to push
  53749. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  53750. if (open) {
  53751. var _parentContext$push;
  53752. parentContext === null || parentContext === void 0 || (_parentContext$push = parentContext.push) === null || _parentContext$push === void 0 || _parentContext$push.call(parentContext);
  53753. } else {
  53754. var _parentContext$pull;
  53755. parentContext === null || parentContext === void 0 || (_parentContext$pull = parentContext.pull) === null || _parentContext$pull === void 0 || _parentContext$pull.call(parentContext);
  53756. }
  53757. }, [open]);
  53758. // Clean up
  53759. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  53760. return function () {
  53761. var _parentContext$pull2;
  53762. parentContext === null || parentContext === void 0 || (_parentContext$pull2 = parentContext.pull) === null || _parentContext$pull2 === void 0 || _parentContext$pull2.call(parentContext);
  53763. };
  53764. }, []);
  53765. // ============================ Mask ============================
  53766. var maskNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
  53767. key: "mask"
  53768. }, maskMotion, {
  53769. visible: mask && open
  53770. }), function (_ref2, maskRef) {
  53771. var motionMaskClassName = _ref2.className,
  53772. motionMaskStyle = _ref2.style;
  53773. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53774. className: classnames_default()("".concat(prefixCls, "-mask"), motionMaskClassName, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.mask, maskClassName),
  53775. style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, motionMaskStyle), maskStyle), styles === null || styles === void 0 ? void 0 : styles.mask),
  53776. onClick: maskClosable && open ? onClose : undefined,
  53777. ref: maskRef
  53778. });
  53779. });
  53780. // =========================== Panel ============================
  53781. var motionProps = typeof motion === 'function' ? motion(placement) : motion;
  53782. var wrapperStyle = {};
  53783. if (pushed && pushDistance) {
  53784. switch (placement) {
  53785. case 'top':
  53786. wrapperStyle.transform = "translateY(".concat(pushDistance, "px)");
  53787. break;
  53788. case 'bottom':
  53789. wrapperStyle.transform = "translateY(".concat(-pushDistance, "px)");
  53790. break;
  53791. case 'left':
  53792. wrapperStyle.transform = "translateX(".concat(pushDistance, "px)");
  53793. break;
  53794. default:
  53795. wrapperStyle.transform = "translateX(".concat(-pushDistance, "px)");
  53796. break;
  53797. }
  53798. }
  53799. if (placement === 'left' || placement === 'right') {
  53800. wrapperStyle.width = parseWidthHeight(width);
  53801. } else {
  53802. wrapperStyle.height = parseWidthHeight(height);
  53803. }
  53804. var eventHandlers = {
  53805. onMouseEnter: onMouseEnter,
  53806. onMouseOver: onMouseOver,
  53807. onMouseLeave: onMouseLeave,
  53808. onClick: onClick,
  53809. onKeyDown: onKeyDown,
  53810. onKeyUp: onKeyUp
  53811. };
  53812. var panelNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
  53813. key: "panel"
  53814. }, motionProps, {
  53815. visible: open,
  53816. forceRender: forceRender,
  53817. onVisibleChanged: function onVisibleChanged(nextVisible) {
  53818. afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(nextVisible);
  53819. },
  53820. removeOnLeave: false,
  53821. leavedClassName: "".concat(prefixCls, "-content-wrapper-hidden")
  53822. }), function (_ref3, motionRef) {
  53823. var motionClassName = _ref3.className,
  53824. motionStyle = _ref3.style;
  53825. var content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DrawerPanel, (0,esm_extends["default"])({
  53826. id: id,
  53827. containerRef: motionRef,
  53828. prefixCls: prefixCls,
  53829. className: classnames_default()(className, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.content),
  53830. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), styles === null || styles === void 0 ? void 0 : styles.content)
  53831. }, (0,pickAttrs["default"])(props, {
  53832. aria: true
  53833. }), eventHandlers), children);
  53834. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  53835. className: classnames_default()("".concat(prefixCls, "-content-wrapper"), drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.wrapper, motionClassName),
  53836. style: (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, wrapperStyle), motionStyle), styles === null || styles === void 0 ? void 0 : styles.wrapper)
  53837. }, (0,pickAttrs["default"])(props, {
  53838. data: true
  53839. })), drawerRender ? drawerRender(content) : content);
  53840. });
  53841. // =========================== Render ===========================
  53842. var containerStyle = (0,objectSpread2["default"])({}, rootStyle);
  53843. if (zIndex) {
  53844. containerStyle.zIndex = zIndex;
  53845. }
  53846. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_drawer_es_context.Provider, {
  53847. value: mergedContext
  53848. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53849. className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(placement), rootClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-open"), open), "".concat(prefixCls, "-inline"), inline)),
  53850. style: containerStyle,
  53851. tabIndex: -1,
  53852. ref: panelRef,
  53853. onKeyDown: onPanelKeyDown
  53854. }, maskNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53855. tabIndex: 0,
  53856. ref: sentinelStartRef,
  53857. style: DrawerPopup_sentinelStyle,
  53858. "aria-hidden": "true",
  53859. "data-sentinel": "start"
  53860. }), panelNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  53861. tabIndex: 0,
  53862. ref: sentinelEndRef,
  53863. style: DrawerPopup_sentinelStyle,
  53864. "aria-hidden": "true",
  53865. "data-sentinel": "end"
  53866. })));
  53867. }
  53868. var RefDrawerPopup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DrawerPopup);
  53869. if (true) {
  53870. RefDrawerPopup.displayName = 'DrawerPopup';
  53871. }
  53872. /* harmony default export */ var es_DrawerPopup = (RefDrawerPopup);
  53873. ;// ./node_modules/rc-drawer/es/Drawer.js
  53874. var Drawer = function Drawer(props) {
  53875. var _props$open = props.open,
  53876. open = _props$open === void 0 ? false : _props$open,
  53877. _props$prefixCls = props.prefixCls,
  53878. prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls,
  53879. _props$placement = props.placement,
  53880. placement = _props$placement === void 0 ? 'right' : _props$placement,
  53881. _props$autoFocus = props.autoFocus,
  53882. autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,
  53883. _props$keyboard = props.keyboard,
  53884. keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
  53885. _props$width = props.width,
  53886. width = _props$width === void 0 ? 378 : _props$width,
  53887. _props$mask = props.mask,
  53888. mask = _props$mask === void 0 ? true : _props$mask,
  53889. _props$maskClosable = props.maskClosable,
  53890. maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,
  53891. getContainer = props.getContainer,
  53892. forceRender = props.forceRender,
  53893. afterOpenChange = props.afterOpenChange,
  53894. destroyOnClose = props.destroyOnClose,
  53895. onMouseEnter = props.onMouseEnter,
  53896. onMouseOver = props.onMouseOver,
  53897. onMouseLeave = props.onMouseLeave,
  53898. onClick = props.onClick,
  53899. onKeyDown = props.onKeyDown,
  53900. onKeyUp = props.onKeyUp,
  53901. panelRef = props.panelRef;
  53902. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  53903. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  53904. animatedVisible = _React$useState2[0],
  53905. setAnimatedVisible = _React$useState2[1];
  53906. // ============================= Warn =============================
  53907. if (true) {
  53908. warnCheck(props);
  53909. }
  53910. // ============================= Open =============================
  53911. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  53912. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  53913. mounted = _React$useState4[0],
  53914. setMounted = _React$useState4[1];
  53915. (0,useLayoutEffect["default"])(function () {
  53916. setMounted(true);
  53917. }, []);
  53918. var mergedOpen = mounted ? open : false;
  53919. // ============================ Focus =============================
  53920. var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  53921. var lastActiveRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  53922. (0,useLayoutEffect["default"])(function () {
  53923. if (mergedOpen) {
  53924. lastActiveRef.current = document.activeElement;
  53925. }
  53926. }, [mergedOpen]);
  53927. // ============================= Open =============================
  53928. var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) {
  53929. var _popupRef$current;
  53930. setAnimatedVisible(nextVisible);
  53931. afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(nextVisible);
  53932. if (!nextVisible && lastActiveRef.current && !((_popupRef$current = popupRef.current) !== null && _popupRef$current !== void 0 && _popupRef$current.contains(lastActiveRef.current))) {
  53933. var _lastActiveRef$curren;
  53934. (_lastActiveRef$curren = lastActiveRef.current) === null || _lastActiveRef$curren === void 0 || _lastActiveRef$curren.focus({
  53935. preventScroll: true
  53936. });
  53937. }
  53938. };
  53939. // =========================== Context ============================
  53940. var refContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  53941. return {
  53942. panel: panelRef
  53943. };
  53944. }, [panelRef]);
  53945. // ============================ Render ============================
  53946. if (!forceRender && !animatedVisible && !mergedOpen && destroyOnClose) {
  53947. return null;
  53948. }
  53949. var eventHandlers = {
  53950. onMouseEnter: onMouseEnter,
  53951. onMouseOver: onMouseOver,
  53952. onMouseLeave: onMouseLeave,
  53953. onClick: onClick,
  53954. onKeyDown: onKeyDown,
  53955. onKeyUp: onKeyUp
  53956. };
  53957. var drawerPopupProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  53958. open: mergedOpen,
  53959. prefixCls: prefixCls,
  53960. placement: placement,
  53961. autoFocus: autoFocus,
  53962. keyboard: keyboard,
  53963. width: width,
  53964. mask: mask,
  53965. maskClosable: maskClosable,
  53966. inline: getContainer === false,
  53967. afterOpenChange: internalAfterOpenChange,
  53968. ref: popupRef
  53969. }, eventHandlers);
  53970. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_RefContext.Provider, {
  53971. value: refContext
  53972. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
  53973. open: mergedOpen || forceRender || animatedVisible,
  53974. autoDestroy: false,
  53975. getContainer: getContainer,
  53976. autoLock: mask && (mergedOpen || animatedVisible)
  53977. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DrawerPopup, drawerPopupProps)));
  53978. };
  53979. if (true) {
  53980. Drawer.displayName = 'Drawer';
  53981. }
  53982. /* harmony default export */ var es_Drawer = (Drawer);
  53983. ;// ./node_modules/rc-drawer/es/index.js
  53984. // export this package's api
  53985. /* harmony default export */ var rc_drawer_es = (es_Drawer);
  53986. ;// ./components/drawer/DrawerPanel.tsx
  53987. const DrawerPanel_DrawerPanel = props => {
  53988. var _a, _b;
  53989. const {
  53990. prefixCls,
  53991. title,
  53992. footer,
  53993. extra,
  53994. loading,
  53995. onClose,
  53996. headerStyle,
  53997. bodyStyle,
  53998. footerStyle,
  53999. children,
  54000. classNames: drawerClassNames,
  54001. styles: drawerStyles
  54002. } = props;
  54003. const drawerContext = (0,config_provider_context.useComponentConfig)('drawer');
  54004. const customCloseIconRender = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(icon => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  54005. type: "button",
  54006. onClick: onClose,
  54007. className: `${prefixCls}-close`
  54008. }, icon)), [onClose]);
  54009. const [mergedClosable, mergedCloseIcon] = useClosable(pickClosable(props), pickClosable(drawerContext), {
  54010. closable: true,
  54011. closeIconRender: customCloseIconRender
  54012. });
  54013. const headerNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  54014. var _a, _b;
  54015. if (!title && !mergedClosable) {
  54016. return null;
  54017. }
  54018. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54019. style: Object.assign(Object.assign(Object.assign({}, (_a = drawerContext.styles) === null || _a === void 0 ? void 0 : _a.header), headerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.header),
  54020. className: classnames_default()(`${prefixCls}-header`, {
  54021. [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra
  54022. }, (_b = drawerContext.classNames) === null || _b === void 0 ? void 0 : _b.header, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.header)
  54023. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54024. className: `${prefixCls}-header-title`
  54025. }, mergedCloseIcon, title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54026. className: `${prefixCls}-title`
  54027. }, title)), extra && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54028. className: `${prefixCls}-extra`
  54029. }, extra));
  54030. }, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]);
  54031. const footerNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  54032. var _a, _b;
  54033. if (!footer) {
  54034. return null;
  54035. }
  54036. const footerClassName = `${prefixCls}-footer`;
  54037. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54038. className: classnames_default()(footerClassName, (_a = drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.footer, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.footer),
  54039. style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext.styles) === null || _b === void 0 ? void 0 : _b.footer), footerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.footer)
  54040. }, footer);
  54041. }, [footer, footerStyle, prefixCls]);
  54042. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, headerNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54043. className: classnames_default()(`${prefixCls}-body`, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.body, (_a = drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.body),
  54044. style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext.styles) === null || _b === void 0 ? void 0 : _b.body), bodyStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.body)
  54045. }, loading ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
  54046. active: true,
  54047. title: false,
  54048. paragraph: {
  54049. rows: 5
  54050. },
  54051. className: `${prefixCls}-body-skeleton`
  54052. })) : children), footerNode);
  54053. };
  54054. /* harmony default export */ var drawer_DrawerPanel = (DrawerPanel_DrawerPanel);
  54055. // EXTERNAL MODULE: ./components/drawer/style/index.ts + 1 modules
  54056. var drawer_style = __webpack_require__("./components/drawer/style/index.ts");
  54057. ;// ./components/drawer/index.tsx
  54058. var drawer_rest = undefined && undefined.__rest || function (s, e) {
  54059. var t = {};
  54060. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54061. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54062. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54063. }
  54064. return t;
  54065. };
  54066. const _SizeTypes = ['default', 'large'];
  54067. const defaultPushState = {
  54068. distance: 180
  54069. };
  54070. const drawer_Drawer = props => {
  54071. var _a;
  54072. const {
  54073. rootClassName,
  54074. width,
  54075. height,
  54076. size = 'default',
  54077. mask = true,
  54078. push = defaultPushState,
  54079. open,
  54080. afterOpenChange,
  54081. onClose,
  54082. prefixCls: customizePrefixCls,
  54083. getContainer: customizeGetContainer,
  54084. panelRef = null,
  54085. style,
  54086. className,
  54087. // Deprecated
  54088. visible,
  54089. afterVisibleChange,
  54090. maskStyle,
  54091. drawerStyle,
  54092. contentWrapperStyle,
  54093. destroyOnClose,
  54094. destroyOnHidden
  54095. } = props,
  54096. rest = drawer_rest(props, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "panelRef", "style", "className", "visible", "afterVisibleChange", "maskStyle", "drawerStyle", "contentWrapperStyle", "destroyOnClose", "destroyOnHidden"]);
  54097. const {
  54098. getPopupContainer,
  54099. getPrefixCls,
  54100. direction,
  54101. className: contextClassName,
  54102. style: contextStyle,
  54103. classNames: contextClassNames,
  54104. styles: contextStyles
  54105. } = (0,config_provider_context.useComponentConfig)('drawer');
  54106. const prefixCls = getPrefixCls('drawer', customizePrefixCls);
  54107. const [wrapCSSVar, hashId, cssVarCls] = (0,drawer_style["default"])(prefixCls);
  54108. const getContainer =
  54109. // 有可能为 false,所以不能直接判断
  54110. customizeGetContainer === undefined && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer;
  54111. const drawerClassName = classnames_default()({
  54112. 'no-mask': !mask,
  54113. [`${prefixCls}-rtl`]: direction === 'rtl'
  54114. }, rootClassName, hashId, cssVarCls);
  54115. // ========================== Warning ===========================
  54116. if (true) {
  54117. const warning = (0,_util_warning.devUseWarning)('Drawer');
  54118. [['visible', 'open'], ['afterVisibleChange', 'afterOpenChange'], ['headerStyle', 'styles.header'], ['bodyStyle', 'styles.body'], ['footerStyle', 'styles.footer'], ['contentWrapperStyle', 'styles.wrapper'], ['maskStyle', 'styles.mask'], ['drawerStyle', 'styles.content'], ['destroyInactivePanel', 'destroyOnHidden']].forEach(([deprecatedName, newName]) => {
  54119. warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
  54120. });
  54121. if (getContainer !== undefined && ((_a = props.style) === null || _a === void 0 ? void 0 : _a.position) === 'absolute') {
  54122. true ? warning(false, 'breaking', '`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.') : 0;
  54123. }
  54124. }
  54125. // ============================ Size ============================
  54126. const mergedWidth = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => width !== null && width !== void 0 ? width : size === 'large' ? 736 : 378, [width, size]);
  54127. const mergedHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => height !== null && height !== void 0 ? height : size === 'large' ? 736 : 378, [height, size]);
  54128. // =========================== Motion ===========================
  54129. const maskMotion = {
  54130. motionName: (0,_util_motion.getTransitionName)(prefixCls, 'mask-motion'),
  54131. motionAppear: true,
  54132. motionEnter: true,
  54133. motionLeave: true,
  54134. motionDeadline: 500
  54135. };
  54136. const panelMotion = motionPlacement => ({
  54137. motionName: (0,_util_motion.getTransitionName)(prefixCls, `panel-motion-${motionPlacement}`),
  54138. motionAppear: true,
  54139. motionEnter: true,
  54140. motionLeave: true,
  54141. motionDeadline: 500
  54142. });
  54143. // ============================ Refs ============================
  54144. // Select `ant-drawer-content` by `panelRef`
  54145. const innerPanelRef = usePanelRef();
  54146. const mergedPanelRef = (0,es_ref.composeRef)(panelRef, innerPanelRef);
  54147. // ============================ zIndex ============================
  54148. const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Drawer', rest.zIndex);
  54149. // =========================== Render ===========================
  54150. const {
  54151. classNames: propClassNames = {},
  54152. styles: propStyles = {}
  54153. } = rest;
  54154. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ContextIsolator, {
  54155. form: true,
  54156. space: true
  54157. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(zindexContext["default"].Provider, {
  54158. value: contextZIndex
  54159. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_drawer_es, Object.assign({
  54160. prefixCls: prefixCls,
  54161. onClose: onClose,
  54162. maskMotion: maskMotion,
  54163. motion: panelMotion
  54164. }, rest, {
  54165. classNames: {
  54166. mask: classnames_default()(propClassNames.mask, contextClassNames.mask),
  54167. content: classnames_default()(propClassNames.content, contextClassNames.content),
  54168. wrapper: classnames_default()(propClassNames.wrapper, contextClassNames.wrapper)
  54169. },
  54170. styles: {
  54171. mask: Object.assign(Object.assign(Object.assign({}, propStyles.mask), maskStyle), contextStyles.mask),
  54172. content: Object.assign(Object.assign(Object.assign({}, propStyles.content), drawerStyle), contextStyles.content),
  54173. wrapper: Object.assign(Object.assign(Object.assign({}, propStyles.wrapper), contentWrapperStyle), contextStyles.wrapper)
  54174. },
  54175. open: open !== null && open !== void 0 ? open : visible,
  54176. mask: mask,
  54177. push: push,
  54178. width: mergedWidth,
  54179. height: mergedHeight,
  54180. style: Object.assign(Object.assign({}, contextStyle), style),
  54181. className: classnames_default()(contextClassName, className),
  54182. rootClassName: drawerClassName,
  54183. getContainer: getContainer,
  54184. afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,
  54185. panelRef: mergedPanelRef,
  54186. zIndex: zIndex,
  54187. // TODO: In the future, destroyOnClose in rc-drawer needs to be upgrade to destroyOnHidden
  54188. destroyOnClose: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyOnClose
  54189. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(drawer_DrawerPanel, Object.assign({
  54190. prefixCls: prefixCls
  54191. }, rest, {
  54192. onClose: onClose
  54193. }))))));
  54194. };
  54195. /** @private Internal Component. Do not use in your production. */
  54196. const drawer_PurePanel = props => {
  54197. const {
  54198. prefixCls: customizePrefixCls,
  54199. style,
  54200. className,
  54201. placement = 'right'
  54202. } = props,
  54203. restProps = drawer_rest(props, ["prefixCls", "style", "className", "placement"]);
  54204. const {
  54205. getPrefixCls
  54206. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  54207. const prefixCls = getPrefixCls('drawer', customizePrefixCls);
  54208. const [wrapCSSVar, hashId, cssVarCls] = (0,drawer_style["default"])(prefixCls);
  54209. const cls = classnames_default()(prefixCls, `${prefixCls}-pure`, `${prefixCls}-${placement}`, hashId, cssVarCls, className);
  54210. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54211. className: cls,
  54212. style: style
  54213. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(drawer_DrawerPanel, Object.assign({
  54214. prefixCls: prefixCls
  54215. }, restProps))));
  54216. };
  54217. drawer_Drawer._InternalPanelDoNotUseOrYouWillBeFired = drawer_PurePanel;
  54218. if (true) {
  54219. drawer_Drawer.displayName = 'Drawer';
  54220. }
  54221. /* harmony default export */ var drawer = (drawer_Drawer);
  54222. ;// ./components/_util/gapSize.ts
  54223. function isPresetSize(size) {
  54224. return ['small', 'middle', 'large'].includes(size);
  54225. }
  54226. function isValidGapNumber(size) {
  54227. if (!size) {
  54228. // The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.
  54229. return false;
  54230. }
  54231. return typeof size === 'number' && !Number.isNaN(size);
  54232. }
  54233. ;// ./components/space/context.ts
  54234. const SpaceContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
  54235. latestIndex: 0
  54236. });
  54237. const SpaceContextProvider = SpaceContext.Provider;
  54238. ;// ./components/space/Item.tsx
  54239. const space_Item_Item = ({
  54240. className,
  54241. index,
  54242. children,
  54243. split,
  54244. style
  54245. }) => {
  54246. const {
  54247. latestIndex
  54248. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(SpaceContext);
  54249. if (children === null || children === undefined) {
  54250. return null;
  54251. }
  54252. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  54253. className: className,
  54254. style: style
  54255. }, children), index < latestIndex && split && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  54256. className: `${className}-split`
  54257. }, split));
  54258. };
  54259. /* harmony default export */ var space_Item = (space_Item_Item);
  54260. ;// ./components/space/index.tsx
  54261. var space_rest = undefined && undefined.__rest || function (s, e) {
  54262. var t = {};
  54263. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54264. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54265. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54266. }
  54267. return t;
  54268. };
  54269. const InternalSpace = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  54270. var _a;
  54271. const {
  54272. getPrefixCls,
  54273. direction: directionConfig,
  54274. size: contextSize,
  54275. className: contextClassName,
  54276. style: contextStyle,
  54277. classNames: contextClassNames,
  54278. styles: contextStyles
  54279. } = (0,config_provider_context.useComponentConfig)('space');
  54280. const {
  54281. size = contextSize !== null && contextSize !== void 0 ? contextSize : 'small',
  54282. align,
  54283. className,
  54284. rootClassName,
  54285. children,
  54286. direction = 'horizontal',
  54287. prefixCls: customizePrefixCls,
  54288. split,
  54289. style,
  54290. wrap = false,
  54291. classNames: customClassNames,
  54292. styles
  54293. } = props,
  54294. otherProps = space_rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]);
  54295. const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];
  54296. const isPresetVerticalSize = isPresetSize(verticalSize);
  54297. const isPresetHorizontalSize = isPresetSize(horizontalSize);
  54298. const isValidVerticalSize = isValidGapNumber(verticalSize);
  54299. const isValidHorizontalSize = isValidGapNumber(horizontalSize);
  54300. const childNodes = (0,toArray["default"])(children, {
  54301. keepEmpty: true
  54302. });
  54303. const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;
  54304. const prefixCls = getPrefixCls('space', customizePrefixCls);
  54305. const [wrapCSSVar, hashId, cssVarCls] = (0,space_style["default"])(prefixCls);
  54306. const cls = classnames_default()(prefixCls, contextClassName, hashId, `${prefixCls}-${direction}`, {
  54307. [`${prefixCls}-rtl`]: directionConfig === 'rtl',
  54308. [`${prefixCls}-align-${mergedAlign}`]: mergedAlign,
  54309. [`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,
  54310. [`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize
  54311. }, className, rootClassName, cssVarCls);
  54312. const itemClassName = classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : contextClassNames.item);
  54313. // Calculate latest one
  54314. let latestIndex = 0;
  54315. const nodes = childNodes.map((child, i) => {
  54316. var _a;
  54317. if (child !== null && child !== undefined) {
  54318. latestIndex = i;
  54319. }
  54320. const key = (child === null || child === void 0 ? void 0 : child.key) || `${itemClassName}-${i}`;
  54321. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(space_Item, {
  54322. className: itemClassName,
  54323. key: key,
  54324. index: i,
  54325. split: split,
  54326. style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : contextStyles.item
  54327. }, child);
  54328. });
  54329. const spaceContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  54330. latestIndex
  54331. }), [latestIndex]);
  54332. // =========================== Render ===========================
  54333. if (childNodes.length === 0) {
  54334. return null;
  54335. }
  54336. const gapStyle = {};
  54337. if (wrap) {
  54338. gapStyle.flexWrap = 'wrap';
  54339. }
  54340. if (!isPresetHorizontalSize && isValidHorizontalSize) {
  54341. gapStyle.columnGap = horizontalSize;
  54342. }
  54343. if (!isPresetVerticalSize && isValidVerticalSize) {
  54344. gapStyle.rowGap = verticalSize;
  54345. }
  54346. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  54347. ref: ref,
  54348. className: cls,
  54349. style: Object.assign(Object.assign(Object.assign({}, gapStyle), contextStyle), style)
  54350. }, otherProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SpaceContextProvider, {
  54351. value: spaceContext
  54352. }, nodes)));
  54353. });
  54354. const Space = InternalSpace;
  54355. Space.Compact = space_Compact;
  54356. if (true) {
  54357. Space.displayName = 'Space';
  54358. }
  54359. /* harmony default export */ var space = (Space);
  54360. ;// ./components/dropdown/dropdown-button.tsx
  54361. var dropdown_button_rest = undefined && undefined.__rest || function (s, e) {
  54362. var t = {};
  54363. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54364. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54365. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54366. }
  54367. return t;
  54368. };
  54369. const DropdownButton = props => {
  54370. const {
  54371. getPopupContainer: getContextPopupContainer,
  54372. getPrefixCls,
  54373. direction
  54374. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  54375. const {
  54376. prefixCls: customizePrefixCls,
  54377. type = 'default',
  54378. danger,
  54379. disabled,
  54380. loading,
  54381. onClick,
  54382. htmlType,
  54383. children,
  54384. className,
  54385. menu,
  54386. arrow,
  54387. autoFocus,
  54388. overlay,
  54389. trigger,
  54390. align,
  54391. open,
  54392. onOpenChange,
  54393. placement,
  54394. getPopupContainer,
  54395. href,
  54396. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EllipsisOutlined, null),
  54397. title,
  54398. buttonsRender = buttons => buttons,
  54399. mouseEnterDelay,
  54400. mouseLeaveDelay,
  54401. overlayClassName,
  54402. overlayStyle,
  54403. destroyOnHidden,
  54404. destroyPopupOnHide,
  54405. dropdownRender,
  54406. popupRender
  54407. } = props,
  54408. restProps = dropdown_button_rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyOnHidden", "destroyPopupOnHide", "dropdownRender", "popupRender"]);
  54409. const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
  54410. const buttonPrefixCls = `${prefixCls}-button`;
  54411. const mergedPopupRender = popupRender || dropdownRender;
  54412. const dropdownProps = {
  54413. menu,
  54414. arrow,
  54415. autoFocus,
  54416. align,
  54417. disabled,
  54418. trigger: disabled ? [] : trigger,
  54419. onOpenChange,
  54420. getPopupContainer: getPopupContainer || getContextPopupContainer,
  54421. mouseEnterDelay,
  54422. mouseLeaveDelay,
  54423. overlayClassName,
  54424. overlayStyle,
  54425. destroyOnHidden,
  54426. popupRender: mergedPopupRender
  54427. };
  54428. const {
  54429. compactSize,
  54430. compactItemClassnames
  54431. } = useCompactItemContext(prefixCls, direction);
  54432. const classes = classnames_default()(buttonPrefixCls, compactItemClassnames, className);
  54433. if ('destroyPopupOnHide' in props) {
  54434. dropdownProps.destroyPopupOnHide = destroyPopupOnHide;
  54435. }
  54436. if ('overlay' in props) {
  54437. dropdownProps.overlay = overlay;
  54438. }
  54439. if ('open' in props) {
  54440. dropdownProps.open = open;
  54441. }
  54442. if ('placement' in props) {
  54443. dropdownProps.placement = placement;
  54444. } else {
  54445. dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';
  54446. }
  54447. const leftButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  54448. type: type,
  54449. danger: danger,
  54450. disabled: disabled,
  54451. loading: loading,
  54452. onClick: onClick,
  54453. htmlType: htmlType,
  54454. href: href,
  54455. title: title
  54456. }, children);
  54457. const rightButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  54458. type: type,
  54459. danger: danger,
  54460. icon: icon
  54461. });
  54462. const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);
  54463. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(space.Compact, Object.assign({
  54464. className: classes,
  54465. size: compactSize,
  54466. block: true
  54467. }, restProps), leftButtonToRender, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(dropdown, Object.assign({}, dropdownProps), rightButtonToRender));
  54468. };
  54469. DropdownButton.__ANT_BUTTON = true;
  54470. /* harmony default export */ var dropdown_button = (DropdownButton);
  54471. ;// ./components/dropdown/index.tsx
  54472. const components_dropdown_Dropdown = dropdown;
  54473. components_dropdown_Dropdown.Button = dropdown_button;
  54474. /* harmony default export */ var components_dropdown = (components_dropdown_Dropdown);
  54475. // EXTERNAL MODULE: ./components/flex/style/index.ts
  54476. var flex_style = __webpack_require__("./components/flex/style/index.ts");
  54477. // EXTERNAL MODULE: ./components/flex/utils.ts
  54478. var utils = __webpack_require__("./components/flex/utils.ts");
  54479. ;// ./components/flex/index.tsx
  54480. var flex_rest = undefined && undefined.__rest || function (s, e) {
  54481. var t = {};
  54482. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54483. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54484. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54485. }
  54486. return t;
  54487. };
  54488. const Flex = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  54489. const {
  54490. prefixCls: customizePrefixCls,
  54491. rootClassName,
  54492. className,
  54493. style,
  54494. flex,
  54495. gap,
  54496. vertical = false,
  54497. component: Component = 'div'
  54498. } = props,
  54499. othersProps = flex_rest(props, ["prefixCls", "rootClassName", "className", "style", "flex", "gap", "vertical", "component"]);
  54500. const {
  54501. flex: ctxFlex,
  54502. direction: ctxDirection,
  54503. getPrefixCls
  54504. } = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
  54505. const prefixCls = getPrefixCls('flex', customizePrefixCls);
  54506. const [wrapCSSVar, hashId, cssVarCls] = (0,flex_style["default"])(prefixCls);
  54507. const mergedVertical = vertical !== null && vertical !== void 0 ? vertical : ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.vertical;
  54508. const mergedCls = classnames_default()(className, rootClassName, ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.className, prefixCls, hashId, cssVarCls, (0,utils["default"])(prefixCls, props), {
  54509. [`${prefixCls}-rtl`]: ctxDirection === 'rtl',
  54510. [`${prefixCls}-gap-${gap}`]: isPresetSize(gap),
  54511. [`${prefixCls}-vertical`]: mergedVertical
  54512. });
  54513. const mergedStyle = Object.assign(Object.assign({}, ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.style), style);
  54514. if (flex) {
  54515. mergedStyle.flex = flex;
  54516. }
  54517. if (gap && !isPresetSize(gap)) {
  54518. mergedStyle.gap = gap;
  54519. }
  54520. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, Object.assign({
  54521. ref: ref,
  54522. className: mergedCls,
  54523. style: mergedStyle
  54524. }, (0,omit["default"])(othersProps, ['justify', 'wrap', 'align']))));
  54525. });
  54526. if (true) {
  54527. Flex.displayName = 'Flex';
  54528. }
  54529. /* harmony default export */ var flex = (Flex);
  54530. ;// ./components/float-button/context.ts
  54531. const FloatButtonGroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(undefined);
  54532. const {
  54533. Provider: FloatButtonGroupProvider
  54534. } = FloatButtonGroupContext;
  54535. /* harmony default export */ var float_button_context = (FloatButtonGroupContext);
  54536. ;// ./components/_util/convertToTooltipProps.ts
  54537. function convertToTooltipProps(tooltip) {
  54538. // isNil
  54539. if (tooltip === undefined || tooltip === null) {
  54540. return null;
  54541. }
  54542. if (typeof tooltip === 'object' && ! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(tooltip)) {
  54543. return tooltip;
  54544. }
  54545. return {
  54546. title: tooltip
  54547. };
  54548. }
  54549. /* harmony default export */ var _util_convertToTooltipProps = (convertToTooltipProps);
  54550. ;// ./node_modules/@ant-design/icons-svg/es/asn/FileTextOutlined.js
  54551. // This icon file is generated automatically.
  54552. var FileTextOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" };
  54553. /* harmony default export */ var asn_FileTextOutlined = (FileTextOutlined);
  54554. ;// ./node_modules/@ant-design/icons/es/icons/FileTextOutlined.js
  54555. // GENERATE BY ./scripts/generate.ts
  54556. // DON NOT EDIT IT MANUALLY
  54557. var FileTextOutlined_FileTextOutlined = function FileTextOutlined(props, ref) {
  54558. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  54559. ref: ref,
  54560. icon: asn_FileTextOutlined
  54561. }));
  54562. };
  54563. /**![file-text](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg1NC42IDI4OC42TDYzOS40IDczLjRjLTYtNi0xNC4xLTkuNC0yMi42LTkuNEgxOTJjLTE3LjcgMC0zMiAxNC4zLTMyIDMydjgzMmMwIDE3LjcgMTQuMyAzMiAzMiAzMmg2NDBjMTcuNyAwIDMyLTE0LjMgMzItMzJWMzExLjNjMC04LjUtMy40LTE2LjctOS40LTIyLjd6TTc5MC4yIDMyNkg2MDJWMTM3LjhMNzkwLjIgMzI2em0xLjggNTYySDIzMlYxMzZoMzAydjIxNmE0MiA0MiAwIDAwNDIgNDJoMjE2djQ5NHpNNTA0IDYxOEgzMjBjLTQuNCAwLTggMy42LTggOHY0OGMwIDQuNCAzLjYgOCA4IDhoMTg0YzQuNCAwIDgtMy42IDgtOHYtNDhjMC00LjQtMy42LTgtOC04ek0zMTIgNDkwdjQ4YzAgNC40IDMuNiA4IDggOGgzODRjNC40IDAgOC0zLjYgOC04di00OGMwLTQuNC0zLjYtOC04LThIMzIwYy00LjQgMC04IDMuNi04IDh6IiAvPjwvc3ZnPg==) */
  54564. var FileTextOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FileTextOutlined_FileTextOutlined);
  54565. if (true) {
  54566. FileTextOutlined_RefIcon.displayName = 'FileTextOutlined';
  54567. }
  54568. /* harmony default export */ var icons_FileTextOutlined = (FileTextOutlined_RefIcon);
  54569. ;// ./components/float-button/FloatButtonContent.tsx
  54570. var FloatButtonContent_rest = undefined && undefined.__rest || function (s, e) {
  54571. var t = {};
  54572. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54573. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54574. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54575. }
  54576. return t;
  54577. };
  54578. const FloatButtonContent = props => {
  54579. const {
  54580. icon,
  54581. description,
  54582. prefixCls,
  54583. className
  54584. } = props,
  54585. rest = FloatButtonContent_rest(props, ["icon", "description", "prefixCls", "className"]);
  54586. const defaultElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  54587. className: `${prefixCls}-icon`
  54588. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_FileTextOutlined, null));
  54589. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({}, rest, {
  54590. className: classnames_default()(className, `${prefixCls}-content`)
  54591. }), icon || description ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, icon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  54592. className: `${prefixCls}-icon`
  54593. }, icon), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  54594. className: `${prefixCls}-description`
  54595. }, description))) : defaultElement);
  54596. };
  54597. /* harmony default export */ var float_button_FloatButtonContent = (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.memo)(FloatButtonContent));
  54598. // EXTERNAL MODULE: ./components/float-button/style/index.ts + 2 modules
  54599. var float_button_style = __webpack_require__("./components/float-button/style/index.ts");
  54600. ;// ./components/float-button/FloatButton.tsx
  54601. var FloatButton_rest = undefined && undefined.__rest || function (s, e) {
  54602. var t = {};
  54603. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54604. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54605. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54606. }
  54607. return t;
  54608. };
  54609. const floatButtonPrefixCls = 'float-btn';
  54610. const InternalFloatButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  54611. const {
  54612. prefixCls: customizePrefixCls,
  54613. className,
  54614. rootClassName,
  54615. style,
  54616. type = 'default',
  54617. shape = 'circle',
  54618. icon,
  54619. description,
  54620. tooltip,
  54621. htmlType = 'button',
  54622. badge = {}
  54623. } = props,
  54624. restProps = FloatButton_rest(props, ["prefixCls", "className", "rootClassName", "style", "type", "shape", "icon", "description", "tooltip", "htmlType", "badge"]);
  54625. const {
  54626. getPrefixCls,
  54627. direction
  54628. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  54629. const groupShape = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(float_button_context);
  54630. const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
  54631. const rootCls = hooks_useCSSVarCls(prefixCls);
  54632. const [wrapCSSVar, hashId, cssVarCls] = (0,float_button_style["default"])(prefixCls, rootCls);
  54633. const mergedShape = groupShape || shape;
  54634. const classString = classnames_default()(hashId, cssVarCls, rootCls, prefixCls, className, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${mergedShape}`, {
  54635. [`${prefixCls}-rtl`]: direction === 'rtl'
  54636. });
  54637. // ============================ zIndex ============================
  54638. const [zIndex] = (0,useZIndex.useZIndex)('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex);
  54639. const mergedStyle = Object.assign(Object.assign({}, style), {
  54640. zIndex
  54641. });
  54642. // 虽然在 ts 中已经 omit 过了,但是为了防止多余的属性被透传进来,这里再 omit 一遍,以防万一
  54643. const badgeProps = (0,omit["default"])(badge, ['title', 'children', 'status', 'text']);
  54644. let buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  54645. className: `${prefixCls}-body`
  54646. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(float_button_FloatButtonContent, {
  54647. prefixCls: prefixCls,
  54648. description: description,
  54649. icon: icon
  54650. }));
  54651. if ('badge' in props) {
  54652. buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_badge, Object.assign({}, badgeProps), buttonNode);
  54653. }
  54654. // ============================ Tooltip ============================
  54655. const tooltipProps = _util_convertToTooltipProps(tooltip);
  54656. if (tooltipProps) {
  54657. buttonNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_tooltip, Object.assign({}, tooltipProps), buttonNode);
  54658. }
  54659. if (true) {
  54660. const warning = (0,_util_warning.devUseWarning)('FloatButton');
  54661. true ? warning(!(mergedShape === 'circle' && description), 'usage', 'supported only when `shape` is `square`. Due to narrow space for text, short sentence is recommended.') : 0;
  54662. }
  54663. return wrapCSSVar(props.href ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", Object.assign({
  54664. ref: ref
  54665. }, restProps, {
  54666. className: classString,
  54667. style: mergedStyle
  54668. }), buttonNode)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", Object.assign({
  54669. ref: ref
  54670. }, restProps, {
  54671. className: classString,
  54672. style: mergedStyle,
  54673. type: htmlType
  54674. }), buttonNode)));
  54675. });
  54676. const FloatButton = InternalFloatButton;
  54677. if (true) {
  54678. FloatButton.displayName = 'FloatButton';
  54679. }
  54680. /* harmony default export */ var float_button_FloatButton = (FloatButton);
  54681. ;// ./components/float-button/BackTop.tsx
  54682. var BackTop_rest = undefined && undefined.__rest || function (s, e) {
  54683. var t = {};
  54684. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54685. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54686. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54687. }
  54688. return t;
  54689. };
  54690. const defaultIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_VerticalAlignTopOutlined, null);
  54691. const BackTop_BackTop = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  54692. var _a;
  54693. const {
  54694. backTopIcon: contextIcon
  54695. } = (0,config_provider_context.useComponentConfig)('floatButton');
  54696. const {
  54697. prefixCls: customizePrefixCls,
  54698. className,
  54699. type = 'default',
  54700. shape = 'circle',
  54701. visibilityHeight = 400,
  54702. icon,
  54703. target,
  54704. onClick,
  54705. duration = 450
  54706. } = props,
  54707. restProps = BackTop_rest(props, ["prefixCls", "className", "type", "shape", "visibilityHeight", "icon", "target", "onClick", "duration"]);
  54708. const mergedIcon = (_a = icon !== null && icon !== void 0 ? icon : contextIcon) !== null && _a !== void 0 ? _a : defaultIcon;
  54709. const [visible, setVisible] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(visibilityHeight === 0);
  54710. const internalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  54711. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => ({
  54712. nativeElement: internalRef.current
  54713. }));
  54714. const getDefaultTarget = () => {
  54715. var _a;
  54716. return ((_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window;
  54717. };
  54718. const handleScroll = _util_throttleByAnimationFrame(e => {
  54719. const scrollTop = _util_getScroll(e.target);
  54720. setVisible(scrollTop >= visibilityHeight);
  54721. });
  54722. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  54723. const getTarget = target || getDefaultTarget;
  54724. const container = getTarget();
  54725. handleScroll({
  54726. target: container
  54727. });
  54728. container === null || container === void 0 ? void 0 : container.addEventListener('scroll', handleScroll);
  54729. return () => {
  54730. handleScroll.cancel();
  54731. container === null || container === void 0 ? void 0 : container.removeEventListener('scroll', handleScroll);
  54732. };
  54733. }, [target]);
  54734. const scrollToTop = e => {
  54735. scrollTo(0, {
  54736. getContainer: target || getDefaultTarget,
  54737. duration
  54738. });
  54739. onClick === null || onClick === void 0 ? void 0 : onClick(e);
  54740. };
  54741. const {
  54742. getPrefixCls
  54743. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  54744. const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
  54745. const rootPrefixCls = getPrefixCls();
  54746. const groupShape = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(float_button_context);
  54747. const mergedShape = groupShape || shape;
  54748. const contentProps = Object.assign({
  54749. prefixCls,
  54750. icon: mergedIcon,
  54751. type,
  54752. shape: mergedShape
  54753. }, restProps);
  54754. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es["default"], {
  54755. visible: visible,
  54756. motionName: `${rootPrefixCls}-fade`
  54757. }, ({
  54758. className: motionClassName
  54759. }, setRef) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(float_button_FloatButton, Object.assign({
  54760. ref: (0,es_ref.composeRef)(internalRef, setRef)
  54761. }, contentProps, {
  54762. onClick: scrollToTop,
  54763. className: classnames_default()(className, motionClassName)
  54764. }))));
  54765. });
  54766. if (true) {
  54767. BackTop_BackTop.displayName = 'BackTop';
  54768. }
  54769. /* harmony default export */ var float_button_BackTop = (BackTop_BackTop);
  54770. ;// ./components/float-button/FloatButtonGroup.tsx
  54771. var FloatButtonGroup_rest = undefined && undefined.__rest || function (s, e) {
  54772. var t = {};
  54773. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54774. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54775. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54776. }
  54777. return t;
  54778. };
  54779. const FloatButtonGroup = props => {
  54780. var _a;
  54781. const {
  54782. prefixCls: customizePrefixCls,
  54783. className,
  54784. style,
  54785. shape = 'circle',
  54786. type = 'default',
  54787. placement = 'top',
  54788. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_FileTextOutlined, null),
  54789. closeIcon,
  54790. description,
  54791. trigger,
  54792. children,
  54793. onOpenChange,
  54794. open: customOpen,
  54795. onClick: onTriggerButtonClick
  54796. } = props,
  54797. floatButtonProps = FloatButtonGroup_rest(props, ["prefixCls", "className", "style", "shape", "type", "placement", "icon", "closeIcon", "description", "trigger", "children", "onOpenChange", "open", "onClick"]);
  54798. const {
  54799. direction,
  54800. getPrefixCls,
  54801. closeIcon: contextCloseIcon
  54802. } = (0,config_provider_context.useComponentConfig)('floatButtonGroup');
  54803. const mergedCloseIcon = (_a = closeIcon !== null && closeIcon !== void 0 ? closeIcon : contextCloseIcon) !== null && _a !== void 0 ? _a : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, null);
  54804. const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
  54805. const rootCls = hooks_useCSSVarCls(prefixCls);
  54806. const [wrapCSSVar, hashId, cssVarCls] = (0,float_button_style["default"])(prefixCls, rootCls);
  54807. const groupPrefixCls = `${prefixCls}-group`;
  54808. const isMenuMode = trigger && ['click', 'hover'].includes(trigger);
  54809. const isValidPlacement = placement && ['top', 'left', 'right', 'bottom'].includes(placement);
  54810. const groupCls = classnames_default()(groupPrefixCls, hashId, cssVarCls, rootCls, className, {
  54811. [`${groupPrefixCls}-rtl`]: direction === 'rtl',
  54812. [`${groupPrefixCls}-${shape}`]: shape,
  54813. [`${groupPrefixCls}-${shape}-shadow`]: !isMenuMode,
  54814. [`${groupPrefixCls}-${placement}`]: isMenuMode && isValidPlacement // 只有菜单模式才支持弹出方向
  54815. });
  54816. // ============================ zIndex ============================
  54817. const [zIndex] = (0,useZIndex.useZIndex)('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex);
  54818. const mergedStyle = Object.assign(Object.assign({}, style), {
  54819. zIndex
  54820. });
  54821. const wrapperCls = classnames_default()(hashId, `${groupPrefixCls}-wrap`);
  54822. const [open, setOpen] = (0,useMergedState["default"])(false, {
  54823. value: customOpen
  54824. });
  54825. const floatButtonGroupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  54826. // ========================== Open ==========================
  54827. const hoverTrigger = trigger === 'hover';
  54828. const clickTrigger = trigger === 'click';
  54829. const triggerOpen = (0,useEvent["default"])(nextOpen => {
  54830. if (open !== nextOpen) {
  54831. setOpen(nextOpen);
  54832. onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen);
  54833. }
  54834. });
  54835. // ===================== Trigger: Hover =====================
  54836. const onMouseEnter = () => {
  54837. if (hoverTrigger) {
  54838. triggerOpen(true);
  54839. }
  54840. };
  54841. const onMouseLeave = () => {
  54842. if (hoverTrigger) {
  54843. triggerOpen(false);
  54844. }
  54845. };
  54846. // ===================== Trigger: Click =====================
  54847. const onInternalTriggerButtonClick = e => {
  54848. if (clickTrigger) {
  54849. triggerOpen(!open);
  54850. }
  54851. onTriggerButtonClick === null || onTriggerButtonClick === void 0 ? void 0 : onTriggerButtonClick(e);
  54852. };
  54853. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
  54854. if (clickTrigger) {
  54855. const onDocClick = e => {
  54856. var _a;
  54857. // Skip if click on the group
  54858. if ((_a = floatButtonGroupRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
  54859. return;
  54860. }
  54861. triggerOpen(false);
  54862. };
  54863. document.addEventListener('click', onDocClick, {
  54864. capture: true
  54865. });
  54866. return () => document.removeEventListener('click', onDocClick, {
  54867. capture: true
  54868. });
  54869. }
  54870. }, [clickTrigger]);
  54871. // ======================== Warning =========================
  54872. if (true) {
  54873. const warning = (0,_util_warning.devUseWarning)('FloatButton.Group');
  54874. true ? warning(!('open' in props) || !!trigger, 'usage', '`open` need to be used together with `trigger`') : 0;
  54875. }
  54876. // ========================= Render =========================
  54877. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(FloatButtonGroupProvider, {
  54878. value: shape
  54879. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  54880. ref: floatButtonGroupRef,
  54881. className: groupCls,
  54882. style: mergedStyle,
  54883. // Hover trigger
  54884. onMouseEnter: onMouseEnter,
  54885. onMouseLeave: onMouseLeave
  54886. }, isMenuMode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_motion_es["default"], {
  54887. visible: open,
  54888. motionName: `${groupPrefixCls}-wrap`
  54889. }, ({
  54890. className: motionClassName
  54891. }) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  54892. className: classnames_default()(motionClassName, wrapperCls)
  54893. }, children))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(float_button_FloatButton, Object.assign({
  54894. type: type,
  54895. icon: open ? mergedCloseIcon : icon,
  54896. description: description,
  54897. "aria-label": props['aria-label'],
  54898. className: `${groupPrefixCls}-trigger`,
  54899. onClick: onInternalTriggerButtonClick
  54900. }, floatButtonProps)))) : children)));
  54901. };
  54902. /* harmony default export */ var float_button_FloatButtonGroup = (FloatButtonGroup);
  54903. ;// ./components/float-button/PurePanel.tsx
  54904. var float_button_PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  54905. var t = {};
  54906. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  54907. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  54908. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  54909. }
  54910. return t;
  54911. };
  54912. /* eslint-disable react/no-array-index-key */
  54913. const PureFloatButton = _a => {
  54914. var {
  54915. backTop
  54916. } = _a,
  54917. props = float_button_PurePanel_rest(_a, ["backTop"]);
  54918. return backTop ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(float_button_BackTop, Object.assign({}, props, {
  54919. visibilityHeight: 0
  54920. })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(float_button_FloatButton, Object.assign({}, props));
  54921. };
  54922. /** @private Internal Component. Do not use in your production. */
  54923. const float_button_PurePanel_PurePanel = _a => {
  54924. var {
  54925. className,
  54926. items
  54927. } = _a,
  54928. props = float_button_PurePanel_rest(_a, ["className", "items"]);
  54929. const {
  54930. prefixCls: customizePrefixCls
  54931. } = props;
  54932. const {
  54933. getPrefixCls
  54934. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  54935. const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
  54936. const pureCls = `${prefixCls}-pure`;
  54937. if (items) {
  54938. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(float_button_FloatButtonGroup, Object.assign({
  54939. className: classnames_default()(className, pureCls)
  54940. }, props), items.map((item, index) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureFloatButton, Object.assign({
  54941. key: index
  54942. }, item)))));
  54943. }
  54944. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PureFloatButton, Object.assign({
  54945. className: classnames_default()(className, pureCls)
  54946. }, props));
  54947. };
  54948. /* harmony default export */ var float_button_PurePanel = (float_button_PurePanel_PurePanel);
  54949. ;// ./components/float-button/index.tsx
  54950. float_button_FloatButton.BackTop = float_button_BackTop;
  54951. float_button_FloatButton.Group = float_button_FloatButtonGroup;
  54952. float_button_FloatButton._InternalPanelDoNotUseOrYouWillBeFired = float_button_PurePanel;
  54953. /* harmony default export */ var float_button = (float_button_FloatButton);
  54954. ;// ./components/form/hooks/useDebounce.ts
  54955. function useDebounce(value) {
  54956. const [cacheValue, setCacheValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value);
  54957. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  54958. const timeout = setTimeout(() => {
  54959. setCacheValue(value);
  54960. }, value.length ? 0 : 10);
  54961. return () => {
  54962. clearTimeout(timeout);
  54963. };
  54964. }, [value]);
  54965. return cacheValue;
  54966. }
  54967. // EXTERNAL MODULE: ./components/form/style/index.ts + 1 modules
  54968. var form_style = __webpack_require__("./components/form/style/index.ts");
  54969. ;// ./components/form/ErrorList.tsx
  54970. const ErrorList_EMPTY_LIST = [];
  54971. function toErrorEntity(error, prefix, errorStatus, index = 0) {
  54972. return {
  54973. key: typeof error === 'string' ? error : `${prefix}-${index}`,
  54974. error,
  54975. errorStatus
  54976. };
  54977. }
  54978. const ErrorList = ({
  54979. help,
  54980. helpStatus,
  54981. errors = ErrorList_EMPTY_LIST,
  54982. warnings = ErrorList_EMPTY_LIST,
  54983. className: rootClassName,
  54984. fieldId,
  54985. onVisibleChanged
  54986. }) => {
  54987. const {
  54988. prefixCls
  54989. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemPrefixContext);
  54990. const baseClassName = `${prefixCls}-item-explain`;
  54991. const rootCls = hooks_useCSSVarCls(prefixCls);
  54992. const [wrapCSSVar, hashId, cssVarCls] = (0,form_style["default"])(prefixCls, rootCls);
  54993. const collapseMotion = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,_util_motion["default"])(prefixCls), [prefixCls]);
  54994. // We have to debounce here again since somewhere use ErrorList directly still need no shaking
  54995. // ref: https://github.com/ant-design/ant-design/issues/36336
  54996. const debounceErrors = useDebounce(errors);
  54997. const debounceWarnings = useDebounce(warnings);
  54998. const fullKeyList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  54999. if (help !== undefined && help !== null) {
  55000. return [toErrorEntity(help, 'help', helpStatus)];
  55001. }
  55002. return [].concat((0,toConsumableArray["default"])(debounceErrors.map((error, index) => toErrorEntity(error, 'error', 'error', index))), (0,toConsumableArray["default"])(debounceWarnings.map((warning, index) => toErrorEntity(warning, 'warning', 'warning', index))));
  55003. }, [help, helpStatus, debounceErrors, debounceWarnings]);
  55004. const filledKeyFullKeyList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  55005. const keysCount = {};
  55006. fullKeyList.forEach(({
  55007. key
  55008. }) => {
  55009. keysCount[key] = (keysCount[key] || 0) + 1;
  55010. });
  55011. return fullKeyList.map((entity, index) => Object.assign(Object.assign({}, entity), {
  55012. key: keysCount[entity.key] > 1 ? `${entity.key}-fallback-${index}` : entity.key
  55013. }));
  55014. }, [fullKeyList]);
  55015. const helpProps = {};
  55016. if (fieldId) {
  55017. helpProps.id = `${fieldId}_help`;
  55018. }
  55019. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  55020. motionDeadline: collapseMotion.motionDeadline,
  55021. motionName: `${prefixCls}-show-help`,
  55022. visible: !!filledKeyFullKeyList.length,
  55023. onVisibleChanged: onVisibleChanged
  55024. }, holderProps => {
  55025. const {
  55026. className: holderClassName,
  55027. style: holderStyle
  55028. } = holderProps;
  55029. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, helpProps, {
  55030. className: classnames_default()(baseClassName, holderClassName, cssVarCls, rootCls, rootClassName, hashId),
  55031. style: holderStyle
  55032. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es.CSSMotionList, Object.assign({
  55033. keys: filledKeyFullKeyList
  55034. }, (0,_util_motion["default"])(prefixCls), {
  55035. motionName: `${prefixCls}-show-help-item`,
  55036. component: false
  55037. }), itemProps => {
  55038. const {
  55039. key,
  55040. error,
  55041. errorStatus,
  55042. className: itemClassName,
  55043. style: itemStyle
  55044. } = itemProps;
  55045. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  55046. key: key,
  55047. className: classnames_default()(itemClassName, {
  55048. [`${baseClassName}-${errorStatus}`]: errorStatus
  55049. }),
  55050. style: itemStyle
  55051. }, error);
  55052. }));
  55053. }));
  55054. };
  55055. /* harmony default export */ var form_ErrorList = (ErrorList);
  55056. ;// ./components/form/hooks/useFormWarning.ts
  55057. const names = {};
  55058. function useFormWarning({
  55059. name
  55060. }) {
  55061. const warning = (0,_util_warning.devUseWarning)('Form');
  55062. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  55063. if (name) {
  55064. names[name] = (names[name] || 0) + 1;
  55065. true ? warning(names[name] <= 1, 'usage', 'There exist multiple Form with same `name`.') : 0;
  55066. return () => {
  55067. names[name] -= 1;
  55068. };
  55069. }
  55070. }, [name]);
  55071. }
  55072. ;// ./components/form/Form.tsx
  55073. var Form_rest = undefined && undefined.__rest || function (s, e) {
  55074. var t = {};
  55075. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  55076. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  55077. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  55078. }
  55079. return t;
  55080. };
  55081. const Form_InternalForm = (props, ref) => {
  55082. const contextDisabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  55083. const {
  55084. getPrefixCls,
  55085. direction,
  55086. requiredMark: contextRequiredMark,
  55087. colon: contextColon,
  55088. scrollToFirstError: contextScrollToFirstError,
  55089. className: contextClassName,
  55090. style: contextStyle
  55091. } = (0,config_provider_context.useComponentConfig)('form');
  55092. const {
  55093. prefixCls: customizePrefixCls,
  55094. className,
  55095. rootClassName,
  55096. size,
  55097. disabled = contextDisabled,
  55098. form,
  55099. colon,
  55100. labelAlign,
  55101. labelWrap,
  55102. labelCol,
  55103. wrapperCol,
  55104. hideRequiredMark,
  55105. layout = 'horizontal',
  55106. scrollToFirstError,
  55107. requiredMark,
  55108. onFinishFailed,
  55109. name,
  55110. style,
  55111. feedbackIcons,
  55112. variant
  55113. } = props,
  55114. restFormProps = Form_rest(props, ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons", "variant"]);
  55115. const mergedSize = (0,useSize["default"])(size);
  55116. const contextValidateMessages = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(validateMessagesContext);
  55117. if (true) {
  55118. // eslint-disable-next-line react-hooks/rules-of-hooks
  55119. useFormWarning(props);
  55120. }
  55121. const mergedRequiredMark = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  55122. if (requiredMark !== undefined) {
  55123. return requiredMark;
  55124. }
  55125. if (hideRequiredMark) {
  55126. return false;
  55127. }
  55128. if (contextRequiredMark !== undefined) {
  55129. return contextRequiredMark;
  55130. }
  55131. return true;
  55132. }, [hideRequiredMark, requiredMark, contextRequiredMark]);
  55133. const mergedColon = colon !== null && colon !== void 0 ? colon : contextColon;
  55134. const prefixCls = getPrefixCls('form', customizePrefixCls);
  55135. // Style
  55136. const rootCls = hooks_useCSSVarCls(prefixCls);
  55137. const [wrapCSSVar, hashId, cssVarCls] = (0,form_style["default"])(prefixCls, rootCls);
  55138. const formClassName = classnames_default()(prefixCls, `${prefixCls}-${layout}`, {
  55139. [`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,
  55140. // todo: remove in next major version
  55141. [`${prefixCls}-rtl`]: direction === 'rtl',
  55142. [`${prefixCls}-${mergedSize}`]: mergedSize
  55143. }, cssVarCls, rootCls, hashId, contextClassName, className, rootClassName);
  55144. const [wrapForm] = useForm_useForm(form);
  55145. const {
  55146. __INTERNAL__
  55147. } = wrapForm;
  55148. __INTERNAL__.name = name;
  55149. const formContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  55150. name,
  55151. labelAlign,
  55152. labelCol,
  55153. labelWrap,
  55154. wrapperCol,
  55155. layout,
  55156. colon: mergedColon,
  55157. requiredMark: mergedRequiredMark,
  55158. itemRef: __INTERNAL__.itemRef,
  55159. form: wrapForm,
  55160. feedbackIcons
  55161. }), [name, labelAlign, labelCol, wrapperCol, layout, mergedColon, mergedRequiredMark, wrapForm, feedbackIcons]);
  55162. const nativeElementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  55163. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => {
  55164. var _a;
  55165. return Object.assign(Object.assign({}, wrapForm), {
  55166. nativeElement: (_a = nativeElementRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement
  55167. });
  55168. });
  55169. const scrollToField = (options, fieldName) => {
  55170. if (options) {
  55171. let defaultScrollToFirstError = {
  55172. block: 'nearest'
  55173. };
  55174. if (typeof options === 'object') {
  55175. defaultScrollToFirstError = Object.assign(Object.assign({}, defaultScrollToFirstError), options);
  55176. }
  55177. wrapForm.scrollToField(fieldName, defaultScrollToFirstError);
  55178. }
  55179. };
  55180. const onInternalFinishFailed = errorInfo => {
  55181. onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errorInfo);
  55182. if (errorInfo.errorFields.length) {
  55183. const fieldName = errorInfo.errorFields[0].name;
  55184. if (scrollToFirstError !== undefined) {
  55185. scrollToField(scrollToFirstError, fieldName);
  55186. return;
  55187. }
  55188. if (contextScrollToFirstError !== undefined) {
  55189. scrollToField(contextScrollToFirstError, fieldName);
  55190. }
  55191. }
  55192. };
  55193. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VariantContext.Provider, {
  55194. value: variant
  55195. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DisabledContextProvider, {
  55196. disabled: disabled
  55197. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SizeContext["default"].Provider, {
  55198. value: mergedSize
  55199. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_FormProvider, {
  55200. // This is not list in API, we pass with spread
  55201. validateMessages: contextValidateMessages
  55202. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_FormContext.Provider, {
  55203. value: formContextValue
  55204. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(NoFormStyle, {
  55205. status: true
  55206. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_field_form_es, Object.assign({
  55207. id: name
  55208. }, restFormProps, {
  55209. name: name,
  55210. onFinishFailed: onInternalFinishFailed,
  55211. form: wrapForm,
  55212. ref: nativeElementRef,
  55213. style: Object.assign(Object.assign({}, contextStyle), style),
  55214. className: formClassName
  55215. })))))))));
  55216. };
  55217. const Form_Form = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Form_InternalForm);
  55218. if (true) {
  55219. Form_Form.displayName = 'Form';
  55220. }
  55221. /* harmony default export */ var form_Form = (Form_Form);
  55222. ;// ./components/form/hooks/useChildren.ts
  55223. function useChildren_useChildren(children) {
  55224. if (typeof children === 'function') {
  55225. return children;
  55226. }
  55227. const childList = (0,toArray["default"])(children);
  55228. return childList.length <= 1 ? childList[0] : childList;
  55229. }
  55230. ;// ./components/form/hooks/useFormItemStatus.ts
  55231. const useFormItemStatus = () => {
  55232. const {
  55233. status,
  55234. errors = [],
  55235. warnings = []
  55236. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  55237. if (true) {
  55238. const warning = (0,_util_warning.devUseWarning)('Form.Item');
  55239. true ? warning(status !== undefined, 'usage', 'Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus') : 0;
  55240. }
  55241. return {
  55242. status,
  55243. errors,
  55244. warnings
  55245. };
  55246. };
  55247. // Only used for compatible package. Not promise this will work on future version.
  55248. useFormItemStatus.Context = FormItemInputContext;
  55249. /* harmony default export */ var hooks_useFormItemStatus = (useFormItemStatus);
  55250. ;// ./components/form/hooks/useFrameState.ts
  55251. function useFrameState(defaultValue) {
  55252. const [value, setValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(defaultValue);
  55253. const frameRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  55254. const batchRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  55255. const destroyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  55256. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  55257. destroyRef.current = false;
  55258. return () => {
  55259. destroyRef.current = true;
  55260. raf["default"].cancel(frameRef.current);
  55261. frameRef.current = null;
  55262. };
  55263. }, []);
  55264. function setFrameValue(updater) {
  55265. if (destroyRef.current) {
  55266. return;
  55267. }
  55268. if (frameRef.current === null) {
  55269. batchRef.current = [];
  55270. frameRef.current = (0,raf["default"])(() => {
  55271. frameRef.current = null;
  55272. setValue(prevValue => {
  55273. let current = prevValue;
  55274. batchRef.current.forEach(func => {
  55275. current = func(current);
  55276. });
  55277. return current;
  55278. });
  55279. });
  55280. }
  55281. batchRef.current.push(updater);
  55282. }
  55283. return [value, setFrameValue];
  55284. }
  55285. ;// ./components/form/hooks/useItemRef.ts
  55286. function useItemRef() {
  55287. const {
  55288. itemRef
  55289. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  55290. const cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  55291. function getRef(name, children) {
  55292. // Outer caller already check the `supportRef`
  55293. const childrenRef = children && typeof children === 'object' && (0,es_ref.getNodeRef)(children);
  55294. const nameStr = name.join('_');
  55295. if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {
  55296. cacheRef.current.name = nameStr;
  55297. cacheRef.current.originRef = childrenRef;
  55298. cacheRef.current.ref = (0,es_ref.composeRef)(itemRef(name), childrenRef);
  55299. }
  55300. return cacheRef.current.ref;
  55301. }
  55302. return getRef;
  55303. }
  55304. ;// ./components/grid/hooks/useGutter.ts
  55305. function useGutter(gutter, screens) {
  55306. const results = [undefined, undefined];
  55307. const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, undefined];
  55308. // By default use as `xs`
  55309. const mergedScreens = screens || {
  55310. xs: true,
  55311. sm: true,
  55312. md: true,
  55313. lg: true,
  55314. xl: true,
  55315. xxl: true
  55316. };
  55317. normalizedGutter.forEach((g, index) => {
  55318. if (typeof g === 'object' && g !== null) {
  55319. for (let i = 0; i < responsiveArray.length; i++) {
  55320. const breakpoint = responsiveArray[i];
  55321. if (mergedScreens[breakpoint] && g[breakpoint] !== undefined) {
  55322. results[index] = g[breakpoint];
  55323. break;
  55324. }
  55325. }
  55326. } else {
  55327. results[index] = g;
  55328. }
  55329. });
  55330. return results;
  55331. }
  55332. ;// ./components/grid/row.tsx
  55333. var row_rest = undefined && undefined.__rest || function (s, e) {
  55334. var t = {};
  55335. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  55336. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  55337. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  55338. }
  55339. return t;
  55340. };
  55341. const _RowAligns = ['top', 'middle', 'bottom', 'stretch'];
  55342. const _RowJustify = ['start', 'end', 'center', 'space-around', 'space-between', 'space-evenly'];
  55343. function useMergedPropByScreen(oriProp, screen) {
  55344. const [prop, setProp] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(typeof oriProp === 'string' ? oriProp : '');
  55345. const calcMergedAlignOrJustify = () => {
  55346. if (typeof oriProp === 'string') {
  55347. setProp(oriProp);
  55348. }
  55349. if (typeof oriProp !== 'object') {
  55350. return;
  55351. }
  55352. for (let i = 0; i < responsiveArray.length; i++) {
  55353. const breakpoint = responsiveArray[i];
  55354. // if do not match, do nothing
  55355. if (!screen || !screen[breakpoint]) {
  55356. continue;
  55357. }
  55358. const curVal = oriProp[breakpoint];
  55359. if (curVal !== undefined) {
  55360. setProp(curVal);
  55361. return;
  55362. }
  55363. }
  55364. };
  55365. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  55366. calcMergedAlignOrJustify();
  55367. }, [JSON.stringify(oriProp), screen]);
  55368. return prop;
  55369. }
  55370. const row_Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  55371. const {
  55372. prefixCls: customizePrefixCls,
  55373. justify,
  55374. align,
  55375. className,
  55376. style,
  55377. children,
  55378. gutter = 0,
  55379. wrap
  55380. } = props,
  55381. others = row_rest(props, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]);
  55382. const {
  55383. getPrefixCls,
  55384. direction
  55385. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  55386. const screens = hooks_useBreakpoint(true, null);
  55387. const mergedAlign = useMergedPropByScreen(align, screens);
  55388. const mergedJustify = useMergedPropByScreen(justify, screens);
  55389. const prefixCls = getPrefixCls('row', customizePrefixCls);
  55390. const [wrapCSSVar, hashId, cssVarCls] = (0,grid_style.useRowStyle)(prefixCls);
  55391. const gutters = useGutter(gutter, screens);
  55392. const classes = classnames_default()(prefixCls, {
  55393. [`${prefixCls}-no-wrap`]: wrap === false,
  55394. [`${prefixCls}-${mergedJustify}`]: mergedJustify,
  55395. [`${prefixCls}-${mergedAlign}`]: mergedAlign,
  55396. [`${prefixCls}-rtl`]: direction === 'rtl'
  55397. }, className, hashId, cssVarCls);
  55398. // Add gutter related style
  55399. const rowStyle = {};
  55400. const horizontalGutter = gutters[0] != null && gutters[0] > 0 ? gutters[0] / -2 : undefined;
  55401. if (horizontalGutter) {
  55402. rowStyle.marginLeft = horizontalGutter;
  55403. rowStyle.marginRight = horizontalGutter;
  55404. }
  55405. // "gutters" is a new array in each rendering phase, it'll make 'React.useMemo' effectless.
  55406. // So we deconstruct "gutters" variable here.
  55407. const [gutterH, gutterV] = gutters;
  55408. rowStyle.rowGap = gutterV;
  55409. const rowContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  55410. gutter: [gutterH, gutterV],
  55411. wrap
  55412. }), [gutterH, gutterV, wrap]);
  55413. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(grid_RowContext.Provider, {
  55414. value: rowContext
  55415. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, others, {
  55416. className: classes,
  55417. style: Object.assign(Object.assign({}, rowStyle), style),
  55418. ref: ref
  55419. }), children)));
  55420. });
  55421. if (true) {
  55422. row_Row.displayName = 'Row';
  55423. }
  55424. /* harmony default export */ var row = (row_Row);
  55425. ;// ./components/form/style/fallbackCmp.ts
  55426. /**
  55427. * Fallback of IE.
  55428. * Safe to remove.
  55429. */
  55430. // Style as inline component
  55431. // ============================= Fallback =============================
  55432. const genFallbackStyle = token => {
  55433. const {
  55434. formItemCls
  55435. } = token;
  55436. return {
  55437. '@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)': {
  55438. // Fallback for IE, safe to remove we not support it anymore
  55439. [`${formItemCls}-control`]: {
  55440. display: 'flex'
  55441. }
  55442. }
  55443. };
  55444. };
  55445. // ============================== Export ==============================
  55446. /* harmony default export */ var fallbackCmp = ((0,genStyleUtils.genSubStyleComponent)(['Form', 'item-item'], (token, {
  55447. rootPrefixCls
  55448. }) => {
  55449. const formToken = (0,form_style.prepareToken)(token, rootPrefixCls);
  55450. return genFallbackStyle(formToken);
  55451. }));
  55452. ;// ./components/form/FormItemInput.tsx
  55453. var FormItemInput_rest = undefined && undefined.__rest || function (s, e) {
  55454. var t = {};
  55455. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  55456. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  55457. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  55458. }
  55459. return t;
  55460. };
  55461. const GRID_MAX = 24;
  55462. const FormItemInput = props => {
  55463. const {
  55464. prefixCls,
  55465. status,
  55466. labelCol,
  55467. wrapperCol,
  55468. children,
  55469. errors,
  55470. warnings,
  55471. _internalItemRender: formItemRender,
  55472. extra,
  55473. help,
  55474. fieldId,
  55475. marginBottom,
  55476. onErrorVisibleChanged,
  55477. label
  55478. } = props;
  55479. const baseClassName = `${prefixCls}-item`;
  55480. const formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  55481. const mergedWrapperCol = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  55482. let mergedWrapper = Object.assign({}, wrapperCol || formContext.wrapperCol || {});
  55483. if (label === null && !labelCol && !wrapperCol && formContext.labelCol) {
  55484. const list = [undefined, 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
  55485. list.forEach(size => {
  55486. const _size = size ? [size] : [];
  55487. const formLabel = (0,rc_util_es.get)(formContext.labelCol, _size);
  55488. const formLabelObj = typeof formLabel === 'object' ? formLabel : {};
  55489. const wrapper = (0,rc_util_es.get)(mergedWrapper, _size);
  55490. const wrapperObj = typeof wrapper === 'object' ? wrapper : {};
  55491. if ('span' in formLabelObj && !('offset' in wrapperObj) && formLabelObj.span < GRID_MAX) {
  55492. mergedWrapper = (0,rc_util_es.set)(mergedWrapper, [].concat(_size, ['offset']), formLabelObj.span);
  55493. }
  55494. });
  55495. }
  55496. return mergedWrapper;
  55497. }, [wrapperCol, formContext]);
  55498. const className = classnames_default()(`${baseClassName}-control`, mergedWrapperCol.className);
  55499. // Pass to sub FormItem should not with col info
  55500. const subFormContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  55501. const {
  55502. labelCol,
  55503. wrapperCol
  55504. } = formContext,
  55505. rest = FormItemInput_rest(formContext, ["labelCol", "wrapperCol"]);
  55506. return rest;
  55507. }, [formContext]);
  55508. const extraRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  55509. const [extraHeight, setExtraHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  55510. (0,useLayoutEffect["default"])(() => {
  55511. if (extra && extraRef.current) {
  55512. setExtraHeight(extraRef.current.clientHeight);
  55513. } else {
  55514. setExtraHeight(0);
  55515. }
  55516. }, [extra]);
  55517. const inputDom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  55518. className: `${baseClassName}-control-input`
  55519. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  55520. className: `${baseClassName}-control-input-content`
  55521. }, children));
  55522. const formItemContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  55523. prefixCls,
  55524. status
  55525. }), [prefixCls, status]);
  55526. const errorListDom = marginBottom !== null || errors.length || warnings.length ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemPrefixContext.Provider, {
  55527. value: formItemContext
  55528. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(form_ErrorList, {
  55529. fieldId: fieldId,
  55530. errors: errors,
  55531. warnings: warnings,
  55532. help: help,
  55533. helpStatus: status,
  55534. className: `${baseClassName}-explain-connected`,
  55535. onVisibleChanged: onErrorVisibleChanged
  55536. }))) : null;
  55537. const extraProps = {};
  55538. if (fieldId) {
  55539. extraProps.id = `${fieldId}_extra`;
  55540. }
  55541. // If extra = 0, && will goes wrong
  55542. // 0&&error -> 0
  55543. const extraDom = extra ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, extraProps, {
  55544. className: `${baseClassName}-extra`,
  55545. ref: extraRef
  55546. }), extra)) : null;
  55547. const additionalDom = errorListDom || extraDom ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  55548. className: `${baseClassName}-additional`,
  55549. style: marginBottom ? {
  55550. minHeight: marginBottom + extraHeight
  55551. } : {}
  55552. }, errorListDom, extraDom)) : null;
  55553. const dom = formItemRender && formItemRender.mark === 'pro_table_render' && formItemRender.render ? formItemRender.render(props, {
  55554. input: inputDom,
  55555. errorList: errorListDom,
  55556. extra: extraDom
  55557. }) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, inputDom, additionalDom));
  55558. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_FormContext.Provider, {
  55559. value: subFormContext
  55560. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(col, Object.assign({}, mergedWrapperCol, {
  55561. className: className
  55562. }), dom), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(fallbackCmp, {
  55563. prefixCls: prefixCls
  55564. }));
  55565. };
  55566. /* harmony default export */ var form_FormItemInput = (FormItemInput);
  55567. ;// ./node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js
  55568. // This icon file is generated automatically.
  55569. var QuestionCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" };
  55570. /* harmony default export */ var asn_QuestionCircleOutlined = (QuestionCircleOutlined);
  55571. ;// ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js
  55572. // GENERATE BY ./scripts/generate.ts
  55573. // DON NOT EDIT IT MANUALLY
  55574. var QuestionCircleOutlined_QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
  55575. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  55576. ref: ref,
  55577. icon: asn_QuestionCircleOutlined
  55578. }));
  55579. };
  55580. /**![question-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0wIDgyMGMtMjA1LjQgMC0zNzItMTY2LjYtMzcyLTM3MnMxNjYuNi0zNzIgMzcyLTM3MiAzNzIgMTY2LjYgMzcyIDM3Mi0xNjYuNiAzNzItMzcyIDM3MnoiIC8+PHBhdGggZD0iTTYyMy42IDMxNi43QzU5My42IDI5MC40IDU1NCAyNzYgNTEyIDI3NnMtODEuNiAxNC41LTExMS42IDQwLjdDMzY5LjIgMzQ0IDM1MiAzODAuNyAzNTIgNDIwdjcuNmMwIDQuNCAzLjYgOCA4IDhoNDhjNC40IDAgOC0zLjYgOC04VjQyMGMwLTQ0LjEgNDMuMS04MCA5Ni04MHM5NiAzNS45IDk2IDgwYzAgMzEuMS0yMiA1OS42LTU2LjEgNzIuNy0yMS4yIDguMS0zOS4yIDIyLjMtNTIuMSA0MC45LTEzLjEgMTktMTkuOSA0MS44LTE5LjkgNjQuOVY2MjBjMCA0LjQgMy42IDggOCA4aDQ4YzQuNCAwIDgtMy42IDgtOHYtMjIuN2E0OC4zIDQ4LjMgMCAwMTMwLjktNDQuOGM1OS0yMi43IDk3LjEtNzQuNyA5Ny4xLTEzMi41LjEtMzkuMy0xNy4xLTc2LTQ4LjMtMTAzLjN6TTQ3MiA3MzJhNDAgNDAgMCAxMDgwIDAgNDAgNDAgMCAxMC04MCAweiIgLz48L3N2Zz4=) */
  55581. var QuestionCircleOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(QuestionCircleOutlined_QuestionCircleOutlined);
  55582. if (true) {
  55583. QuestionCircleOutlined_RefIcon.displayName = 'QuestionCircleOutlined';
  55584. }
  55585. /* harmony default export */ var icons_QuestionCircleOutlined = (QuestionCircleOutlined_RefIcon);
  55586. ;// ./components/form/FormItemLabel.tsx
  55587. var FormItemLabel_rest = undefined && undefined.__rest || function (s, e) {
  55588. var t = {};
  55589. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  55590. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  55591. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  55592. }
  55593. return t;
  55594. };
  55595. const FormItemLabel = ({
  55596. prefixCls,
  55597. label,
  55598. htmlFor,
  55599. labelCol,
  55600. labelAlign,
  55601. colon,
  55602. required,
  55603. requiredMark,
  55604. tooltip,
  55605. vertical
  55606. }) => {
  55607. var _a;
  55608. const [formLocale] = (0,useLocale["default"])('Form');
  55609. const {
  55610. labelAlign: contextLabelAlign,
  55611. labelCol: contextLabelCol,
  55612. labelWrap,
  55613. colon: contextColon
  55614. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  55615. if (!label) {
  55616. return null;
  55617. }
  55618. const mergedLabelCol = labelCol || contextLabelCol || {};
  55619. const mergedLabelAlign = labelAlign || contextLabelAlign;
  55620. const labelClsBasic = `${prefixCls}-item-label`;
  55621. const labelColClassName = classnames_default()(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {
  55622. [`${labelClsBasic}-wrap`]: !!labelWrap
  55623. });
  55624. let labelChildren = label;
  55625. // Keep label is original where there should have no colon
  55626. const computedColon = colon === true || contextColon !== false && colon !== false;
  55627. const haveColon = computedColon && !vertical;
  55628. // Remove duplicated user input colon
  55629. if (haveColon && typeof label === 'string' && label.trim()) {
  55630. labelChildren = label.replace(/[:|:]\s*$/, '');
  55631. }
  55632. // Tooltip
  55633. const tooltipProps = _util_convertToTooltipProps(tooltip);
  55634. if (tooltipProps) {
  55635. const {
  55636. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_QuestionCircleOutlined, null)
  55637. } = tooltipProps,
  55638. restTooltipProps = FormItemLabel_rest(tooltipProps, ["icon"]);
  55639. const tooltipNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, restTooltipProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(icon, {
  55640. className: `${prefixCls}-item-tooltip`,
  55641. title: '',
  55642. onClick: e => {
  55643. // Prevent label behavior in tooltip icon
  55644. // https://github.com/ant-design/ant-design/issues/46154
  55645. e.preventDefault();
  55646. },
  55647. tabIndex: null
  55648. }));
  55649. labelChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, labelChildren, tooltipNode);
  55650. }
  55651. // Required Mark
  55652. const isOptionalMark = requiredMark === 'optional';
  55653. const isRenderMark = typeof requiredMark === 'function';
  55654. const hideRequiredMark = requiredMark === false;
  55655. if (isRenderMark) {
  55656. labelChildren = requiredMark(labelChildren, {
  55657. required: !!required
  55658. });
  55659. } else if (isOptionalMark && !required) {
  55660. labelChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, labelChildren, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  55661. className: `${prefixCls}-item-optional`,
  55662. title: ""
  55663. }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = en_US["default"].Form) === null || _a === void 0 ? void 0 : _a.optional)));
  55664. }
  55665. // https://github.com/ant-design/ant-design/pull/52950#discussion_r1980880316
  55666. let markType;
  55667. if (hideRequiredMark) {
  55668. markType = 'hidden';
  55669. } else if (isOptionalMark || isRenderMark) {
  55670. markType = 'optional';
  55671. }
  55672. const labelClassName = classnames_default()({
  55673. [`${prefixCls}-item-required`]: required,
  55674. [`${prefixCls}-item-required-mark-${markType}`]: markType,
  55675. [`${prefixCls}-item-no-colon`]: !computedColon
  55676. });
  55677. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(col, Object.assign({}, mergedLabelCol, {
  55678. className: labelColClassName
  55679. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("label", {
  55680. htmlFor: htmlFor,
  55681. className: labelClassName,
  55682. title: typeof label === 'string' ? label : ''
  55683. }, labelChildren));
  55684. };
  55685. /* harmony default export */ var form_FormItemLabel = (FormItemLabel);
  55686. ;// ./components/form/FormItem/StatusProvider.tsx
  55687. const iconMap = {
  55688. success: icons_CheckCircleFilled,
  55689. warning: icons_ExclamationCircleFilled,
  55690. error: icons_CloseCircleFilled,
  55691. validating: icons_LoadingOutlined
  55692. };
  55693. function StatusProvider({
  55694. children,
  55695. errors,
  55696. warnings,
  55697. hasFeedback,
  55698. validateStatus,
  55699. prefixCls,
  55700. meta,
  55701. noStyle,
  55702. name
  55703. }) {
  55704. const itemPrefixCls = `${prefixCls}-item`;
  55705. const {
  55706. feedbackIcons
  55707. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  55708. const mergedValidateStatus = getStatus(errors, warnings, meta, null, !!hasFeedback, validateStatus);
  55709. const {
  55710. isFormItemInput: parentIsFormItemInput,
  55711. status: parentStatus,
  55712. hasFeedback: parentHasFeedback,
  55713. feedbackIcon: parentFeedbackIcon,
  55714. name: parentName
  55715. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  55716. // ====================== Context =======================
  55717. const formItemStatusContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  55718. var _a;
  55719. let feedbackIcon;
  55720. if (hasFeedback) {
  55721. const customIcons = hasFeedback !== true && hasFeedback.icons || feedbackIcons;
  55722. const customIconNode = mergedValidateStatus && ((_a = customIcons === null || customIcons === void 0 ? void 0 : customIcons({
  55723. status: mergedValidateStatus,
  55724. errors,
  55725. warnings
  55726. })) === null || _a === void 0 ? void 0 : _a[mergedValidateStatus]);
  55727. const IconNode = mergedValidateStatus && iconMap[mergedValidateStatus];
  55728. feedbackIcon = customIconNode !== false && IconNode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  55729. className: classnames_default()(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)
  55730. }, customIconNode || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IconNode, null))) : null;
  55731. }
  55732. const context = {
  55733. status: mergedValidateStatus || '',
  55734. errors,
  55735. warnings,
  55736. hasFeedback: !!hasFeedback,
  55737. feedbackIcon,
  55738. isFormItemInput: true,
  55739. name
  55740. };
  55741. // No style will follow parent context
  55742. if (noStyle) {
  55743. context.status = (mergedValidateStatus !== null && mergedValidateStatus !== void 0 ? mergedValidateStatus : parentStatus) || '';
  55744. context.isFormItemInput = parentIsFormItemInput;
  55745. context.hasFeedback = !!(hasFeedback !== null && hasFeedback !== void 0 ? hasFeedback : parentHasFeedback);
  55746. context.feedbackIcon = hasFeedback !== undefined ? context.feedbackIcon : parentFeedbackIcon;
  55747. context.name = name !== null && name !== void 0 ? name : parentName;
  55748. }
  55749. return context;
  55750. }, [mergedValidateStatus, hasFeedback, noStyle, parentIsFormItemInput, parentStatus]);
  55751. // ======================= Render =======================
  55752. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
  55753. value: formItemStatusContext
  55754. }, children);
  55755. }
  55756. ;// ./components/form/FormItem/ItemHolder.tsx
  55757. var ItemHolder_rest = undefined && undefined.__rest || function (s, e) {
  55758. var t = {};
  55759. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  55760. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  55761. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  55762. }
  55763. return t;
  55764. };
  55765. function ItemHolder(props) {
  55766. const {
  55767. prefixCls,
  55768. className,
  55769. rootClassName,
  55770. style,
  55771. help,
  55772. errors,
  55773. warnings,
  55774. validateStatus,
  55775. meta,
  55776. hasFeedback,
  55777. hidden,
  55778. children,
  55779. fieldId,
  55780. required,
  55781. isRequired,
  55782. onSubItemMetaChange,
  55783. layout: propsLayout,
  55784. name
  55785. } = props,
  55786. restProps = ItemHolder_rest(props, ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange", "layout", "name"]);
  55787. const itemPrefixCls = `${prefixCls}-item`;
  55788. const {
  55789. requiredMark,
  55790. layout: formLayout
  55791. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  55792. const layout = propsLayout || formLayout;
  55793. const vertical = layout === 'vertical';
  55794. // ======================== Margin ========================
  55795. const itemRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  55796. const debounceErrors = useDebounce(errors);
  55797. const debounceWarnings = useDebounce(warnings);
  55798. const hasHelp = help !== undefined && help !== null;
  55799. const hasError = !!(hasHelp || errors.length || warnings.length);
  55800. const isOnScreen = !!itemRef.current && isVisible(itemRef.current);
  55801. const [marginBottom, setMarginBottom] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  55802. (0,useLayoutEffect["default"])(() => {
  55803. if (hasError && itemRef.current) {
  55804. // The element must be part of the DOMTree to use getComputedStyle
  55805. // https://stackoverflow.com/questions/35360711/getcomputedstyle-returns-a-cssstyledeclaration-but-all-properties-are-empty-on-a
  55806. const itemStyle = getComputedStyle(itemRef.current);
  55807. setMarginBottom(parseInt(itemStyle.marginBottom, 10));
  55808. }
  55809. }, [hasError, isOnScreen]);
  55810. const onErrorVisibleChanged = nextVisible => {
  55811. if (!nextVisible) {
  55812. setMarginBottom(null);
  55813. }
  55814. };
  55815. // ======================== Status ========================
  55816. const getValidateState = (isDebounce = false) => {
  55817. const _errors = isDebounce ? debounceErrors : meta.errors;
  55818. const _warnings = isDebounce ? debounceWarnings : meta.warnings;
  55819. return getStatus(_errors, _warnings, meta, '', !!hasFeedback, validateStatus);
  55820. };
  55821. const mergedValidateStatus = getValidateState();
  55822. // ======================== Render ========================
  55823. const itemClassName = classnames_default()(itemPrefixCls, className, rootClassName, {
  55824. [`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,
  55825. // Status
  55826. [`${itemPrefixCls}-has-feedback`]: mergedValidateStatus && hasFeedback,
  55827. [`${itemPrefixCls}-has-success`]: mergedValidateStatus === 'success',
  55828. [`${itemPrefixCls}-has-warning`]: mergedValidateStatus === 'warning',
  55829. [`${itemPrefixCls}-has-error`]: mergedValidateStatus === 'error',
  55830. [`${itemPrefixCls}-is-validating`]: mergedValidateStatus === 'validating',
  55831. [`${itemPrefixCls}-hidden`]: hidden,
  55832. // Layout
  55833. [`${itemPrefixCls}-${layout}`]: layout
  55834. });
  55835. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  55836. className: itemClassName,
  55837. style: style,
  55838. ref: itemRef
  55839. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(row, Object.assign({
  55840. className: `${itemPrefixCls}-row`
  55841. }, (0,omit["default"])(restProps, ['_internalItemRender', 'colon', 'dependencies', 'extra', 'fieldKey', 'getValueFromEvent', 'getValueProps', 'htmlFor', 'id',
  55842. // It is deprecated because `htmlFor` is its replacement.
  55843. 'initialValue', 'isListField', 'label', 'labelAlign', 'labelCol', 'labelWrap', 'messageVariables', 'name', 'normalize', 'noStyle', 'preserve', 'requiredMark', 'rules', 'shouldUpdate', 'trigger', 'tooltip', 'validateFirst', 'validateTrigger', 'valuePropName', 'wrapperCol', 'validateDebounce'])), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(form_FormItemLabel, Object.assign({
  55844. htmlFor: fieldId
  55845. }, props, {
  55846. requiredMark: requiredMark,
  55847. required: required !== null && required !== void 0 ? required : isRequired,
  55848. prefixCls: prefixCls,
  55849. vertical: vertical
  55850. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(form_FormItemInput, Object.assign({}, props, meta, {
  55851. errors: debounceErrors,
  55852. warnings: debounceWarnings,
  55853. prefixCls: prefixCls,
  55854. status: mergedValidateStatus,
  55855. help: help,
  55856. marginBottom: marginBottom,
  55857. onErrorVisibleChanged: onErrorVisibleChanged
  55858. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(NoStyleItemContext.Provider, {
  55859. value: onSubItemMetaChange
  55860. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StatusProvider, {
  55861. prefixCls: prefixCls,
  55862. meta: meta,
  55863. errors: meta.errors,
  55864. warnings: meta.warnings,
  55865. hasFeedback: hasFeedback,
  55866. // Already calculated
  55867. validateStatus: mergedValidateStatus,
  55868. name: name
  55869. }, children)))), !!marginBottom && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  55870. className: `${itemPrefixCls}-margin-offset`,
  55871. style: {
  55872. marginBottom: -marginBottom
  55873. }
  55874. })));
  55875. }
  55876. ;// ./components/form/FormItem/index.tsx
  55877. const NAME_SPLIT = '__SPLIT__';
  55878. const _ValidateStatuses = ['success', 'warning', 'error', 'validating', ''];
  55879. // https://github.com/ant-design/ant-design/issues/46417
  55880. // `getValueProps` may modify the value props name,
  55881. // we should check if the control is similar.
  55882. function isSimilarControl(a, b) {
  55883. const keysA = Object.keys(a);
  55884. const keysB = Object.keys(b);
  55885. return keysA.length === keysB.length && keysA.every(key => {
  55886. const propValueA = a[key];
  55887. const propValueB = b[key];
  55888. return propValueA === propValueB || typeof propValueA === 'function' || typeof propValueB === 'function';
  55889. });
  55890. }
  55891. const MemoInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(({
  55892. children
  55893. }) => children, (prev, next) => isSimilarControl(prev.control, next.control) && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));
  55894. function genEmptyMeta() {
  55895. return {
  55896. errors: [],
  55897. warnings: [],
  55898. touched: false,
  55899. validating: false,
  55900. name: [],
  55901. validated: false
  55902. };
  55903. }
  55904. function InternalFormItem(props) {
  55905. const {
  55906. name,
  55907. noStyle,
  55908. className,
  55909. dependencies,
  55910. prefixCls: customizePrefixCls,
  55911. shouldUpdate,
  55912. rules,
  55913. children,
  55914. required,
  55915. label,
  55916. messageVariables,
  55917. trigger = 'onChange',
  55918. validateTrigger,
  55919. hidden,
  55920. help,
  55921. layout
  55922. } = props;
  55923. const {
  55924. getPrefixCls
  55925. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  55926. const {
  55927. name: formName
  55928. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  55929. const mergedChildren = useChildren_useChildren(children);
  55930. const isRenderProps = typeof mergedChildren === 'function';
  55931. const notifyParentMetaChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(NoStyleItemContext);
  55932. const {
  55933. validateTrigger: contextValidateTrigger
  55934. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FieldContext);
  55935. const mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;
  55936. const hasName = !(name === undefined || name === null);
  55937. const prefixCls = getPrefixCls('form', customizePrefixCls);
  55938. // Style
  55939. const rootCls = hooks_useCSSVarCls(prefixCls);
  55940. const [wrapCSSVar, hashId, cssVarCls] = (0,form_style["default"])(prefixCls, rootCls);
  55941. // ========================= Warn =========================
  55942. const warning = (0,_util_warning.devUseWarning)('Form.Item');
  55943. if (true) {
  55944. true ? warning(name !== null, 'usage', '`null` is passed as `name` property') : 0;
  55945. }
  55946. // ========================= MISC =========================
  55947. // Get `noStyle` required info
  55948. const listContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_ListContext);
  55949. const fieldKeyPathRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  55950. // ======================== Errors ========================
  55951. // >>>>> Collect sub field errors
  55952. const [subFieldErrors, setSubFieldErrors] = useFrameState({});
  55953. // >>>>> Current field errors
  55954. const [meta, setMeta] = (0,useState["default"])(() => genEmptyMeta());
  55955. const onMetaChange = nextMeta => {
  55956. // This keyInfo is not correct when field is removed
  55957. // Since origin keyManager no longer keep the origin key anymore
  55958. // Which means we need cache origin one and reuse when removed
  55959. const keyInfo = listContext === null || listContext === void 0 ? void 0 : listContext.getKey(nextMeta.name);
  55960. // Destroy will reset all the meta
  55961. setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);
  55962. // Bump to parent since noStyle
  55963. if (noStyle && help !== false && notifyParentMetaChange) {
  55964. let namePath = nextMeta.name;
  55965. if (!nextMeta.destroy) {
  55966. if (keyInfo !== undefined) {
  55967. const [fieldKey, restPath] = keyInfo;
  55968. namePath = [fieldKey].concat((0,toConsumableArray["default"])(restPath));
  55969. fieldKeyPathRef.current = namePath;
  55970. }
  55971. } else {
  55972. // Use origin cache data
  55973. namePath = fieldKeyPathRef.current || namePath;
  55974. }
  55975. notifyParentMetaChange(nextMeta, namePath);
  55976. }
  55977. };
  55978. // >>>>> Collect noStyle Field error to the top FormItem
  55979. const onSubItemMetaChange = (subMeta, uniqueKeys) => {
  55980. // Only `noStyle` sub item will trigger
  55981. setSubFieldErrors(prevSubFieldErrors => {
  55982. const clone = Object.assign({}, prevSubFieldErrors);
  55983. // name: ['user', 1] + key: [4] = ['user', 4]
  55984. const mergedNamePath = [].concat((0,toConsumableArray["default"])(subMeta.name.slice(0, -1)), (0,toConsumableArray["default"])(uniqueKeys));
  55985. const mergedNameKey = mergedNamePath.join(NAME_SPLIT);
  55986. if (subMeta.destroy) {
  55987. // Remove
  55988. delete clone[mergedNameKey];
  55989. } else {
  55990. // Update
  55991. clone[mergedNameKey] = subMeta;
  55992. }
  55993. return clone;
  55994. });
  55995. };
  55996. // >>>>> Get merged errors
  55997. const [mergedErrors, mergedWarnings] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  55998. const errorList = (0,toConsumableArray["default"])(meta.errors);
  55999. const warningList = (0,toConsumableArray["default"])(meta.warnings);
  56000. Object.values(subFieldErrors).forEach(subFieldError => {
  56001. errorList.push.apply(errorList, (0,toConsumableArray["default"])(subFieldError.errors || []));
  56002. warningList.push.apply(warningList, (0,toConsumableArray["default"])(subFieldError.warnings || []));
  56003. });
  56004. return [errorList, warningList];
  56005. }, [subFieldErrors, meta.errors, meta.warnings]);
  56006. // ===================== Children Ref =====================
  56007. const getItemRef = useItemRef();
  56008. // ======================== Render ========================
  56009. function renderLayout(baseChildren, fieldId, isRequired) {
  56010. if (noStyle && !hidden) {
  56011. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StatusProvider, {
  56012. prefixCls: prefixCls,
  56013. hasFeedback: props.hasFeedback,
  56014. validateStatus: props.validateStatus,
  56015. meta: meta,
  56016. errors: mergedErrors,
  56017. warnings: mergedWarnings,
  56018. noStyle: true,
  56019. name: name
  56020. }, baseChildren);
  56021. }
  56022. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ItemHolder, Object.assign({
  56023. key: "row"
  56024. }, props, {
  56025. className: classnames_default()(className, cssVarCls, rootCls, hashId),
  56026. prefixCls: prefixCls,
  56027. fieldId: fieldId,
  56028. isRequired: isRequired,
  56029. errors: mergedErrors,
  56030. warnings: mergedWarnings,
  56031. meta: meta,
  56032. onSubItemMetaChange: onSubItemMetaChange,
  56033. layout: layout,
  56034. name: name
  56035. }), baseChildren);
  56036. }
  56037. if (!hasName && !isRenderProps && !dependencies) {
  56038. return wrapCSSVar(renderLayout(mergedChildren));
  56039. }
  56040. let variables = {};
  56041. if (typeof label === 'string') {
  56042. variables.label = label;
  56043. } else if (name) {
  56044. variables.label = String(name);
  56045. }
  56046. if (messageVariables) {
  56047. variables = Object.assign(Object.assign({}, variables), messageVariables);
  56048. }
  56049. // >>>>> With Field
  56050. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Field, Object.assign({}, props, {
  56051. messageVariables: variables,
  56052. trigger: trigger,
  56053. validateTrigger: mergedValidateTrigger,
  56054. onMetaChange: onMetaChange
  56055. }), (control, renderMeta, context) => {
  56056. const mergedName = util_toArray(name).length && renderMeta ? renderMeta.name : [];
  56057. const fieldId = getFieldId(mergedName, formName);
  56058. const isRequired = required !== undefined ? required : !!(rules === null || rules === void 0 ? void 0 : rules.some(rule => {
  56059. if (rule && typeof rule === 'object' && rule.required && !rule.warningOnly) {
  56060. return true;
  56061. }
  56062. if (typeof rule === 'function') {
  56063. const ruleEntity = rule(context);
  56064. return (ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.required) && !(ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.warningOnly);
  56065. }
  56066. return false;
  56067. }));
  56068. // ======================= Children =======================
  56069. const mergedControl = Object.assign({}, control);
  56070. let childNode = null;
  56071. true ? warning(!(shouldUpdate && dependencies), 'usage', "`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.") : 0;
  56072. if (Array.isArray(mergedChildren) && hasName) {
  56073. true ? warning(false, 'usage', 'A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item.') : 0;
  56074. childNode = mergedChildren;
  56075. } else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {
  56076. true ? warning(!!(shouldUpdate || dependencies), 'usage', 'A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.') : 0;
  56077. true ? warning(!hasName, 'usage', 'A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.') : 0;
  56078. } else if (dependencies && !isRenderProps && !hasName) {
  56079. true ? warning(false, 'usage', 'Must set `name` or use a render function when `dependencies` is set.') : 0;
  56080. } else if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedChildren)) {
  56081. true ? warning(mergedChildren.props.defaultValue === undefined, 'usage', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.') : 0;
  56082. const childProps = Object.assign(Object.assign({}, mergedChildren.props), mergedControl);
  56083. if (!childProps.id) {
  56084. childProps.id = fieldId;
  56085. }
  56086. if (help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {
  56087. const describedbyArr = [];
  56088. if (help || mergedErrors.length > 0) {
  56089. describedbyArr.push(`${fieldId}_help`);
  56090. }
  56091. if (props.extra) {
  56092. describedbyArr.push(`${fieldId}_extra`);
  56093. }
  56094. childProps['aria-describedby'] = describedbyArr.join(' ');
  56095. }
  56096. if (mergedErrors.length > 0) {
  56097. childProps['aria-invalid'] = 'true';
  56098. }
  56099. if (isRequired) {
  56100. childProps['aria-required'] = 'true';
  56101. }
  56102. if ((0,es_ref.supportRef)(mergedChildren)) {
  56103. childProps.ref = getItemRef(mergedName, mergedChildren);
  56104. }
  56105. // We should keep user origin event handler
  56106. const triggers = new Set([].concat((0,toConsumableArray["default"])(util_toArray(trigger)), (0,toConsumableArray["default"])(util_toArray(mergedValidateTrigger))));
  56107. triggers.forEach(eventName => {
  56108. childProps[eventName] = (...args) => {
  56109. var _a2, _c2;
  56110. var _a, _b, _c;
  56111. (_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));
  56112. (_c = (_b = mergedChildren.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));
  56113. };
  56114. });
  56115. // List of props that need to be watched for changes -> if changes are detected in MemoInput -> rerender
  56116. const watchingChildProps = [childProps['aria-required'], childProps['aria-invalid'], childProps['aria-describedby']];
  56117. childNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MemoInput, {
  56118. control: mergedControl,
  56119. update: mergedChildren,
  56120. childProps: watchingChildProps
  56121. }, (0,reactNode.cloneElement)(mergedChildren, childProps));
  56122. } else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {
  56123. childNode = mergedChildren(context);
  56124. } else {
  56125. true ? warning(!mergedName.length || !!noStyle, 'usage', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.') : 0;
  56126. childNode = mergedChildren;
  56127. }
  56128. return renderLayout(childNode, fieldId, isRequired);
  56129. }));
  56130. }
  56131. const FormItem = InternalFormItem;
  56132. FormItem.useStatus = hooks_useFormItemStatus;
  56133. /* harmony default export */ var form_FormItem = (FormItem);
  56134. ;// ./components/form/FormList.tsx
  56135. var FormList_rest = undefined && undefined.__rest || function (s, e) {
  56136. var t = {};
  56137. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  56138. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  56139. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  56140. }
  56141. return t;
  56142. };
  56143. const FormList = _a => {
  56144. var {
  56145. prefixCls: customizePrefixCls,
  56146. children
  56147. } = _a,
  56148. props = FormList_rest(_a, ["prefixCls", "children"]);
  56149. if (true) {
  56150. const warning = (0,_util_warning.devUseWarning)('Form.List');
  56151. true ? warning(typeof props.name === 'number' || (Array.isArray(props.name) ? !!props.name.length : !!props.name), 'usage', 'Miss `name` prop.') : 0;
  56152. }
  56153. const {
  56154. getPrefixCls
  56155. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  56156. const prefixCls = getPrefixCls('form', customizePrefixCls);
  56157. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  56158. prefixCls,
  56159. status: 'error'
  56160. }), [prefixCls]);
  56161. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_List, Object.assign({}, props), (fields, operation, meta) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemPrefixContext.Provider, {
  56162. value: contextValue
  56163. }, children(fields.map(field => Object.assign(Object.assign({}, field), {
  56164. fieldKey: field.key
  56165. })), operation, {
  56166. errors: meta.errors,
  56167. warnings: meta.warnings
  56168. }))));
  56169. };
  56170. /* harmony default export */ var form_FormList = (FormList);
  56171. ;// ./components/form/hooks/useFormInstance.ts
  56172. function useFormInstance() {
  56173. const {
  56174. form
  56175. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_FormContext);
  56176. return form;
  56177. }
  56178. ;// ./components/form/index.tsx
  56179. const components_form_Form = form_Form;
  56180. components_form_Form.Item = form_FormItem;
  56181. components_form_Form.List = form_FormList;
  56182. components_form_Form.ErrorList = form_ErrorList;
  56183. components_form_Form.useForm = useForm_useForm;
  56184. components_form_Form.useFormInstance = useFormInstance;
  56185. components_form_Form.useWatch = es_useWatch;
  56186. components_form_Form.Provider = context_FormProvider;
  56187. components_form_Form.create = () => {
  56188. true ? (0,_util_warning["default"])(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.') : 0;
  56189. };
  56190. /* harmony default export */ var components_form = (components_form_Form);
  56191. ;// ./components/grid/index.tsx
  56192. // Do not export params
  56193. function grid_useBreakpoint() {
  56194. return hooks_useBreakpoint();
  56195. }
  56196. /* harmony default export */ var grid = ({
  56197. useBreakpoint: grid_useBreakpoint
  56198. });
  56199. ;// ./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js
  56200. // This icon file is generated automatically.
  56201. var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
  56202. /* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
  56203. ;// ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js
  56204. // GENERATE BY ./scripts/generate.ts
  56205. // DON NOT EDIT IT MANUALLY
  56206. var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
  56207. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  56208. ref: ref,
  56209. icon: asn_EyeOutlined
  56210. }));
  56211. };
  56212. /**![eye](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk0Mi4yIDQ4Ni4yQzg0Ny40IDI4Ni41IDcwNC4xIDE4NiA1MTIgMTg2Yy0xOTIuMiAwLTMzNS40IDEwMC41LTQzMC4yIDMwMC4zYTYwLjMgNjAuMyAwIDAwMCA1MS41QzE3Ni42IDczNy41IDMxOS45IDgzOCA1MTIgODM4YzE5Mi4yIDAgMzM1LjQtMTAwLjUgNDMwLjItMzAwLjMgNy43LTE2LjIgNy43LTM1IDAtNTEuNXpNNTEyIDc2NmMtMTYxLjMgMC0yNzkuNC04MS44LTM2Mi43LTI1NEMyMzIuNiAzMzkuOCAzNTAuNyAyNTggNTEyIDI1OGMxNjEuMyAwIDI3OS40IDgxLjggMzYyLjcgMjU0Qzc5MS41IDY4NC4yIDY3My40IDc2NiA1MTIgNzY2em0tNC00MzBjLTk3LjIgMC0xNzYgNzguOC0xNzYgMTc2czc4LjggMTc2IDE3NiAxNzYgMTc2LTc4LjggMTc2LTE3Ni03OC44LTE3Ni0xNzYtMTc2em0wIDI4OGMtNjEuOSAwLTExMi01MC4xLTExMi0xMTJzNTAuMS0xMTIgMTEyLTExMiAxMTIgNTAuMSAxMTIgMTEyLTUwLjEgMTEyLTExMiAxMTJ6IiAvPjwvc3ZnPg==) */
  56213. var EyeOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EyeOutlined_EyeOutlined);
  56214. if (true) {
  56215. EyeOutlined_RefIcon.displayName = 'EyeOutlined';
  56216. }
  56217. /* harmony default export */ var icons_EyeOutlined = (EyeOutlined_RefIcon);
  56218. ;// ./node_modules/rc-util/es/Dom/css.js
  56219. /* eslint-disable no-nested-ternary */
  56220. var PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;
  56221. var removePixel = {
  56222. left: true,
  56223. top: true
  56224. };
  56225. var floatMap = {
  56226. cssFloat: 1,
  56227. styleFloat: 1,
  56228. float: 1
  56229. };
  56230. function css_getComputedStyle(node) {
  56231. return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
  56232. }
  56233. function getStyleValue(node, type, value) {
  56234. type = type.toLowerCase();
  56235. if (value === 'auto') {
  56236. if (type === 'height') {
  56237. return node.offsetHeight;
  56238. }
  56239. if (type === 'width') {
  56240. return node.offsetWidth;
  56241. }
  56242. }
  56243. if (!(type in removePixel)) {
  56244. removePixel[type] = PIXEL_PATTERN.test(type);
  56245. }
  56246. return removePixel[type] ? parseFloat(value) || 0 : value;
  56247. }
  56248. function css_get(node, name) {
  56249. var length = arguments.length;
  56250. var style = css_getComputedStyle(node);
  56251. name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
  56252. return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);
  56253. }
  56254. function css_set(node, name, value) {
  56255. var length = arguments.length;
  56256. name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
  56257. if (length === 3) {
  56258. if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {
  56259. value = "".concat(value, "px");
  56260. }
  56261. node.style[name] = value; // Number
  56262. return value;
  56263. }
  56264. for (var x in name) {
  56265. if (name.hasOwnProperty(x)) {
  56266. css_set(node, x, name[x]);
  56267. }
  56268. }
  56269. return css_getComputedStyle(node);
  56270. }
  56271. function getOuterWidth(el) {
  56272. if (el === document.body) {
  56273. return document.documentElement.clientWidth;
  56274. }
  56275. return el.offsetWidth;
  56276. }
  56277. function getOuterHeight(el) {
  56278. if (el === document.body) {
  56279. return window.innerHeight || document.documentElement.clientHeight;
  56280. }
  56281. return el.offsetHeight;
  56282. }
  56283. function getDocSize() {
  56284. var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
  56285. var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
  56286. return {
  56287. width: width,
  56288. height: height
  56289. };
  56290. }
  56291. function getClientSize() {
  56292. var width = document.documentElement.clientWidth;
  56293. var height = window.innerHeight || document.documentElement.clientHeight;
  56294. return {
  56295. width: width,
  56296. height: height
  56297. };
  56298. }
  56299. function css_getScroll() {
  56300. return {
  56301. scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),
  56302. scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)
  56303. };
  56304. }
  56305. function css_getOffset(node) {
  56306. var box = node.getBoundingClientRect();
  56307. var docElem = document.documentElement;
  56308. // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft
  56309. return {
  56310. left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
  56311. top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
  56312. };
  56313. }
  56314. ;// ./node_modules/rc-util/es/Dom/addEventListener.js
  56315. function addEventListenerWrap(target, eventType, cb, option) {
  56316. /* eslint camelcase: 2 */
  56317. var callback = (external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default()).unstable_batchedUpdates ? function run(e) {
  56318. external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().unstable_batchedUpdates(cb, e);
  56319. } : cb;
  56320. if (target !== null && target !== void 0 && target.addEventListener) {
  56321. target.addEventListener(eventType, callback, option);
  56322. }
  56323. return {
  56324. remove: function remove() {
  56325. if (target !== null && target !== void 0 && target.removeEventListener) {
  56326. target.removeEventListener(eventType, callback, option);
  56327. }
  56328. }
  56329. };
  56330. }
  56331. ;// ./node_modules/rc-image/es/context.js
  56332. var PreviewGroupContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  56333. ;// ./node_modules/rc-image/es/Operations.js
  56334. var Operations = function Operations(props) {
  56335. var visible = props.visible,
  56336. maskTransitionName = props.maskTransitionName,
  56337. getContainer = props.getContainer,
  56338. prefixCls = props.prefixCls,
  56339. rootClassName = props.rootClassName,
  56340. icons = props.icons,
  56341. countRender = props.countRender,
  56342. showSwitch = props.showSwitch,
  56343. showProgress = props.showProgress,
  56344. current = props.current,
  56345. transform = props.transform,
  56346. count = props.count,
  56347. scale = props.scale,
  56348. minScale = props.minScale,
  56349. maxScale = props.maxScale,
  56350. closeIcon = props.closeIcon,
  56351. onActive = props.onActive,
  56352. onClose = props.onClose,
  56353. onZoomIn = props.onZoomIn,
  56354. onZoomOut = props.onZoomOut,
  56355. onRotateRight = props.onRotateRight,
  56356. onRotateLeft = props.onRotateLeft,
  56357. onFlipX = props.onFlipX,
  56358. onFlipY = props.onFlipY,
  56359. onReset = props.onReset,
  56360. toolbarRender = props.toolbarRender,
  56361. zIndex = props.zIndex,
  56362. image = props.image;
  56363. var groupContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PreviewGroupContext);
  56364. var rotateLeft = icons.rotateLeft,
  56365. rotateRight = icons.rotateRight,
  56366. zoomIn = icons.zoomIn,
  56367. zoomOut = icons.zoomOut,
  56368. close = icons.close,
  56369. left = icons.left,
  56370. right = icons.right,
  56371. flipX = icons.flipX,
  56372. flipY = icons.flipY;
  56373. var toolClassName = "".concat(prefixCls, "-operations-operation");
  56374. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  56375. var onKeyDown = function onKeyDown(e) {
  56376. if (e.keyCode === KeyCode["default"].ESC) {
  56377. onClose();
  56378. }
  56379. };
  56380. if (visible) {
  56381. window.addEventListener('keydown', onKeyDown);
  56382. }
  56383. return function () {
  56384. window.removeEventListener('keydown', onKeyDown);
  56385. };
  56386. }, [visible]);
  56387. var handleActive = function handleActive(e, offset) {
  56388. e.preventDefault();
  56389. e.stopPropagation();
  56390. onActive(offset);
  56391. };
  56392. var renderOperation = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (_ref) {
  56393. var type = _ref.type,
  56394. disabled = _ref.disabled,
  56395. onClick = _ref.onClick,
  56396. icon = _ref.icon;
  56397. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56398. key: type,
  56399. className: classnames_default()(toolClassName, "".concat(prefixCls, "-operations-operation-").concat(type), (0,defineProperty["default"])({}, "".concat(prefixCls, "-operations-operation-disabled"), !!disabled)),
  56400. onClick: onClick
  56401. }, icon);
  56402. }, [toolClassName, prefixCls]);
  56403. var switchPrevNode = showSwitch ? renderOperation({
  56404. icon: left,
  56405. onClick: function onClick(e) {
  56406. return handleActive(e, -1);
  56407. },
  56408. type: 'prev',
  56409. disabled: current === 0
  56410. }) : undefined;
  56411. var switchNextNode = showSwitch ? renderOperation({
  56412. icon: right,
  56413. onClick: function onClick(e) {
  56414. return handleActive(e, 1);
  56415. },
  56416. type: 'next',
  56417. disabled: current === count - 1
  56418. }) : undefined;
  56419. var flipYNode = renderOperation({
  56420. icon: flipY,
  56421. onClick: onFlipY,
  56422. type: 'flipY'
  56423. });
  56424. var flipXNode = renderOperation({
  56425. icon: flipX,
  56426. onClick: onFlipX,
  56427. type: 'flipX'
  56428. });
  56429. var rotateLeftNode = renderOperation({
  56430. icon: rotateLeft,
  56431. onClick: onRotateLeft,
  56432. type: 'rotateLeft'
  56433. });
  56434. var rotateRightNode = renderOperation({
  56435. icon: rotateRight,
  56436. onClick: onRotateRight,
  56437. type: 'rotateRight'
  56438. });
  56439. var zoomOutNode = renderOperation({
  56440. icon: zoomOut,
  56441. onClick: onZoomOut,
  56442. type: 'zoomOut',
  56443. disabled: scale <= minScale
  56444. });
  56445. var zoomInNode = renderOperation({
  56446. icon: zoomIn,
  56447. onClick: onZoomIn,
  56448. type: 'zoomIn',
  56449. disabled: scale === maxScale
  56450. });
  56451. var toolbarNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56452. className: "".concat(prefixCls, "-operations")
  56453. }, flipYNode, flipXNode, rotateLeftNode, rotateRightNode, zoomOutNode, zoomInNode);
  56454. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  56455. visible: visible,
  56456. motionName: maskTransitionName
  56457. }, function (_ref2) {
  56458. var className = _ref2.className,
  56459. style = _ref2.style;
  56460. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
  56461. open: true,
  56462. getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : document.body
  56463. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56464. className: classnames_default()("".concat(prefixCls, "-operations-wrapper"), className, rootClassName),
  56465. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
  56466. zIndex: zIndex
  56467. })
  56468. }, closeIcon === null ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  56469. className: "".concat(prefixCls, "-close"),
  56470. onClick: onClose
  56471. }, closeIcon || close), showSwitch && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56472. className: classnames_default()("".concat(prefixCls, "-switch-left"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-switch-left-disabled"), current === 0)),
  56473. onClick: function onClick(e) {
  56474. return handleActive(e, -1);
  56475. }
  56476. }, left), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56477. className: classnames_default()("".concat(prefixCls, "-switch-right"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-switch-right-disabled"), current === count - 1)),
  56478. onClick: function onClick(e) {
  56479. return handleActive(e, 1);
  56480. }
  56481. }, right)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56482. className: "".concat(prefixCls, "-footer")
  56483. }, showProgress && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  56484. className: "".concat(prefixCls, "-progress")
  56485. }, countRender ? countRender(current + 1, count) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("bdi", null, "".concat(current + 1, " / ").concat(count))), toolbarRender ? toolbarRender(toolbarNode, (0,objectSpread2["default"])((0,objectSpread2["default"])({
  56486. icons: {
  56487. prevIcon: switchPrevNode,
  56488. nextIcon: switchNextNode,
  56489. flipYIcon: flipYNode,
  56490. flipXIcon: flipXNode,
  56491. rotateLeftIcon: rotateLeftNode,
  56492. rotateRightIcon: rotateRightNode,
  56493. zoomOutIcon: zoomOutNode,
  56494. zoomInIcon: zoomInNode
  56495. },
  56496. actions: {
  56497. onActive: onActive,
  56498. onFlipY: onFlipY,
  56499. onFlipX: onFlipX,
  56500. onRotateLeft: onRotateLeft,
  56501. onRotateRight: onRotateRight,
  56502. onZoomOut: onZoomOut,
  56503. onZoomIn: onZoomIn,
  56504. onReset: onReset,
  56505. onClose: onClose
  56506. },
  56507. transform: transform
  56508. }, groupContext ? {
  56509. current: current,
  56510. total: count
  56511. } : {}), {}, {
  56512. image: image
  56513. })) : toolbarNode)));
  56514. });
  56515. };
  56516. /* harmony default export */ var es_Operations = (Operations);
  56517. ;// ./node_modules/rc-image/es/hooks/useImageTransform.js
  56518. var initialTransform = {
  56519. x: 0,
  56520. y: 0,
  56521. rotate: 0,
  56522. scale: 1,
  56523. flipX: false,
  56524. flipY: false
  56525. };
  56526. function useImageTransform(imgRef, minScale, maxScale, onTransform) {
  56527. var frame = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  56528. var queue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
  56529. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(initialTransform),
  56530. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  56531. transform = _useState2[0],
  56532. setTransform = _useState2[1];
  56533. var resetTransform = function resetTransform(action) {
  56534. setTransform(initialTransform);
  56535. if (!(0,isEqual["default"])(initialTransform, transform)) {
  56536. onTransform === null || onTransform === void 0 || onTransform({
  56537. transform: initialTransform,
  56538. action: action
  56539. });
  56540. }
  56541. };
  56542. /** Direct update transform */
  56543. var updateTransform = function updateTransform(newTransform, action) {
  56544. if (frame.current === null) {
  56545. queue.current = [];
  56546. frame.current = (0,raf["default"])(function () {
  56547. setTransform(function (preState) {
  56548. var memoState = preState;
  56549. queue.current.forEach(function (queueState) {
  56550. memoState = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, memoState), queueState);
  56551. });
  56552. frame.current = null;
  56553. onTransform === null || onTransform === void 0 || onTransform({
  56554. transform: memoState,
  56555. action: action
  56556. });
  56557. return memoState;
  56558. });
  56559. });
  56560. }
  56561. queue.current.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, transform), newTransform));
  56562. };
  56563. /** Scale according to the position of centerX and centerY */
  56564. var dispatchZoomChange = function dispatchZoomChange(ratio, action, centerX, centerY, isTouch) {
  56565. var _imgRef$current = imgRef.current,
  56566. width = _imgRef$current.width,
  56567. height = _imgRef$current.height,
  56568. offsetWidth = _imgRef$current.offsetWidth,
  56569. offsetHeight = _imgRef$current.offsetHeight,
  56570. offsetLeft = _imgRef$current.offsetLeft,
  56571. offsetTop = _imgRef$current.offsetTop;
  56572. var newRatio = ratio;
  56573. var newScale = transform.scale * ratio;
  56574. if (newScale > maxScale) {
  56575. newScale = maxScale;
  56576. newRatio = maxScale / transform.scale;
  56577. } else if (newScale < minScale) {
  56578. // For mobile interactions, allow scaling down to the minimum scale.
  56579. newScale = isTouch ? newScale : minScale;
  56580. newRatio = newScale / transform.scale;
  56581. }
  56582. /** Default center point scaling */
  56583. var mergedCenterX = centerX !== null && centerX !== void 0 ? centerX : innerWidth / 2;
  56584. var mergedCenterY = centerY !== null && centerY !== void 0 ? centerY : innerHeight / 2;
  56585. var diffRatio = newRatio - 1;
  56586. /** Deviation calculated from image size */
  56587. var diffImgX = diffRatio * width * 0.5;
  56588. var diffImgY = diffRatio * height * 0.5;
  56589. /** The difference between the click position and the edge of the document */
  56590. var diffOffsetLeft = diffRatio * (mergedCenterX - transform.x - offsetLeft);
  56591. var diffOffsetTop = diffRatio * (mergedCenterY - transform.y - offsetTop);
  56592. /** Final positioning */
  56593. var newX = transform.x - (diffOffsetLeft - diffImgX);
  56594. var newY = transform.y - (diffOffsetTop - diffImgY);
  56595. /**
  56596. * When zooming the image
  56597. * When the image size is smaller than the width and height of the window, the position is initialized
  56598. */
  56599. if (ratio < 1 && newScale === 1) {
  56600. var mergedWidth = offsetWidth * newScale;
  56601. var mergedHeight = offsetHeight * newScale;
  56602. var _getClientSize = getClientSize(),
  56603. clientWidth = _getClientSize.width,
  56604. clientHeight = _getClientSize.height;
  56605. if (mergedWidth <= clientWidth && mergedHeight <= clientHeight) {
  56606. newX = 0;
  56607. newY = 0;
  56608. }
  56609. }
  56610. updateTransform({
  56611. x: newX,
  56612. y: newY,
  56613. scale: newScale
  56614. }, action);
  56615. };
  56616. return {
  56617. transform: transform,
  56618. resetTransform: resetTransform,
  56619. updateTransform: updateTransform,
  56620. dispatchZoomChange: dispatchZoomChange
  56621. };
  56622. }
  56623. ;// ./node_modules/rc-image/es/getFixScaleEleTransPosition.js
  56624. function fixPoint(key, start, width, clientWidth) {
  56625. var startAddWidth = start + width;
  56626. var offsetStart = (width - clientWidth) / 2;
  56627. if (width > clientWidth) {
  56628. if (start > 0) {
  56629. return (0,defineProperty["default"])({}, key, offsetStart);
  56630. }
  56631. if (start < 0 && startAddWidth < clientWidth) {
  56632. return (0,defineProperty["default"])({}, key, -offsetStart);
  56633. }
  56634. } else if (start < 0 || startAddWidth > clientWidth) {
  56635. return (0,defineProperty["default"])({}, key, start < 0 ? offsetStart : -offsetStart);
  56636. }
  56637. return {};
  56638. }
  56639. /**
  56640. * Fix positon x,y point when
  56641. *
  56642. * Ele width && height < client
  56643. * - Back origin
  56644. *
  56645. * - Ele width | height > clientWidth | clientHeight
  56646. * - left | top > 0 -> Back 0
  56647. * - left | top + width | height < clientWidth | clientHeight -> Back left | top + width | height === clientWidth | clientHeight
  56648. *
  56649. * Regardless of other
  56650. */
  56651. function getFixScaleEleTransPosition(width, height, left, top) {
  56652. var _getClientSize = getClientSize(),
  56653. clientWidth = _getClientSize.width,
  56654. clientHeight = _getClientSize.height;
  56655. var fixPos = null;
  56656. if (width <= clientWidth && height <= clientHeight) {
  56657. fixPos = {
  56658. x: 0,
  56659. y: 0
  56660. };
  56661. } else if (width > clientWidth || height > clientHeight) {
  56662. fixPos = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, fixPoint('x', left, width, clientWidth)), fixPoint('y', top, height, clientHeight));
  56663. }
  56664. return fixPos;
  56665. }
  56666. ;// ./node_modules/rc-image/es/previewConfig.js
  56667. /** Scale the ratio base */
  56668. var BASE_SCALE_RATIO = 1;
  56669. /** The maximum zoom ratio when the mouse zooms in, adjustable */
  56670. var WHEEL_MAX_SCALE_RATIO = 1;
  56671. ;// ./node_modules/rc-image/es/hooks/useMouseEvent.js
  56672. function useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTransform, dispatchZoomChange) {
  56673. var rotate = transform.rotate,
  56674. scale = transform.scale,
  56675. x = transform.x,
  56676. y = transform.y;
  56677. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  56678. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  56679. isMoving = _useState2[0],
  56680. setMoving = _useState2[1];
  56681. var startPositionInfo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
  56682. diffX: 0,
  56683. diffY: 0,
  56684. transformX: 0,
  56685. transformY: 0
  56686. });
  56687. var onMouseDown = function onMouseDown(event) {
  56688. // Only allow main button
  56689. if (!movable || event.button !== 0) return;
  56690. event.preventDefault();
  56691. event.stopPropagation();
  56692. startPositionInfo.current = {
  56693. diffX: event.pageX - x,
  56694. diffY: event.pageY - y,
  56695. transformX: x,
  56696. transformY: y
  56697. };
  56698. setMoving(true);
  56699. };
  56700. var onMouseMove = function onMouseMove(event) {
  56701. if (visible && isMoving) {
  56702. updateTransform({
  56703. x: event.pageX - startPositionInfo.current.diffX,
  56704. y: event.pageY - startPositionInfo.current.diffY
  56705. }, 'move');
  56706. }
  56707. };
  56708. var onMouseUp = function onMouseUp() {
  56709. if (visible && isMoving) {
  56710. setMoving(false);
  56711. /** No need to restore the position when the picture is not moved, So as not to interfere with the click */
  56712. var _startPositionInfo$cu = startPositionInfo.current,
  56713. transformX = _startPositionInfo$cu.transformX,
  56714. transformY = _startPositionInfo$cu.transformY;
  56715. var hasChangedPosition = x !== transformX && y !== transformY;
  56716. if (!hasChangedPosition) return;
  56717. var width = imgRef.current.offsetWidth * scale;
  56718. var height = imgRef.current.offsetHeight * scale;
  56719. // eslint-disable-next-line @typescript-eslint/no-shadow
  56720. var _imgRef$current$getBo = imgRef.current.getBoundingClientRect(),
  56721. left = _imgRef$current$getBo.left,
  56722. top = _imgRef$current$getBo.top;
  56723. var isRotate = rotate % 180 !== 0;
  56724. var fixState = getFixScaleEleTransPosition(isRotate ? height : width, isRotate ? width : height, left, top);
  56725. if (fixState) {
  56726. updateTransform((0,objectSpread2["default"])({}, fixState), 'dragRebound');
  56727. }
  56728. }
  56729. };
  56730. var onWheel = function onWheel(event) {
  56731. if (!visible || event.deltaY == 0) return;
  56732. // Scale ratio depends on the deltaY size
  56733. var scaleRatio = Math.abs(event.deltaY / 100);
  56734. // Limit the maximum scale ratio
  56735. var mergedScaleRatio = Math.min(scaleRatio, WHEEL_MAX_SCALE_RATIO);
  56736. // Scale the ratio each time
  56737. var ratio = BASE_SCALE_RATIO + mergedScaleRatio * scaleStep;
  56738. if (event.deltaY > 0) {
  56739. ratio = BASE_SCALE_RATIO / ratio;
  56740. }
  56741. dispatchZoomChange(ratio, 'wheel', event.clientX, event.clientY);
  56742. };
  56743. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  56744. var onTopMouseUpListener;
  56745. var onTopMouseMoveListener;
  56746. var onMouseUpListener;
  56747. var onMouseMoveListener;
  56748. if (movable) {
  56749. onMouseUpListener = addEventListenerWrap(window, 'mouseup', onMouseUp, false);
  56750. onMouseMoveListener = addEventListenerWrap(window, 'mousemove', onMouseMove, false);
  56751. try {
  56752. // Resolve if in iframe lost event
  56753. /* istanbul ignore next */
  56754. if (window.top !== window.self) {
  56755. onTopMouseUpListener = addEventListenerWrap(window.top, 'mouseup', onMouseUp, false);
  56756. onTopMouseMoveListener = addEventListenerWrap(window.top, 'mousemove', onMouseMove, false);
  56757. }
  56758. } catch (error) {
  56759. /* istanbul ignore next */
  56760. (0,warning.warning)(false, "[rc-image] ".concat(error));
  56761. }
  56762. }
  56763. return function () {
  56764. var _onMouseUpListener, _onMouseMoveListener, _onTopMouseUpListener, _onTopMouseMoveListen;
  56765. (_onMouseUpListener = onMouseUpListener) === null || _onMouseUpListener === void 0 || _onMouseUpListener.remove();
  56766. (_onMouseMoveListener = onMouseMoveListener) === null || _onMouseMoveListener === void 0 || _onMouseMoveListener.remove();
  56767. /* istanbul ignore next */
  56768. (_onTopMouseUpListener = onTopMouseUpListener) === null || _onTopMouseUpListener === void 0 || _onTopMouseUpListener.remove();
  56769. /* istanbul ignore next */
  56770. (_onTopMouseMoveListen = onTopMouseMoveListener) === null || _onTopMouseMoveListen === void 0 || _onTopMouseMoveListen.remove();
  56771. };
  56772. }, [visible, isMoving, x, y, rotate, movable]);
  56773. return {
  56774. isMoving: isMoving,
  56775. onMouseDown: onMouseDown,
  56776. onMouseMove: onMouseMove,
  56777. onMouseUp: onMouseUp,
  56778. onWheel: onWheel
  56779. };
  56780. }
  56781. ;// ./node_modules/rc-image/es/util.js
  56782. function isImageValid(src) {
  56783. return new Promise(function (resolve) {
  56784. if (!src) {
  56785. resolve(false);
  56786. return;
  56787. }
  56788. var img = document.createElement('img');
  56789. img.onerror = function () {
  56790. return resolve(false);
  56791. };
  56792. img.onload = function () {
  56793. return resolve(true);
  56794. };
  56795. img.src = src;
  56796. });
  56797. }
  56798. ;// ./node_modules/rc-image/es/hooks/useStatus.js
  56799. function useStatus(_ref) {
  56800. var src = _ref.src,
  56801. isCustomPlaceholder = _ref.isCustomPlaceholder,
  56802. fallback = _ref.fallback;
  56803. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(isCustomPlaceholder ? 'loading' : 'normal'),
  56804. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  56805. status = _useState2[0],
  56806. setStatus = _useState2[1];
  56807. var isLoaded = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  56808. var isError = status === 'error';
  56809. // https://github.com/react-component/image/pull/187
  56810. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  56811. var isCurrentSrc = true;
  56812. isImageValid(src).then(function (isValid) {
  56813. // https://github.com/ant-design/ant-design/issues/44948
  56814. // If src changes, the previous setStatus should not be triggered
  56815. if (!isValid && isCurrentSrc) {
  56816. setStatus('error');
  56817. }
  56818. });
  56819. return function () {
  56820. isCurrentSrc = false;
  56821. };
  56822. }, [src]);
  56823. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  56824. if (isCustomPlaceholder && !isLoaded.current) {
  56825. setStatus('loading');
  56826. } else if (isError) {
  56827. setStatus('normal');
  56828. }
  56829. }, [src]);
  56830. var onLoad = function onLoad() {
  56831. setStatus('normal');
  56832. };
  56833. var getImgRef = function getImgRef(img) {
  56834. isLoaded.current = false;
  56835. if (status === 'loading' && img !== null && img !== void 0 && img.complete && (img.naturalWidth || img.naturalHeight)) {
  56836. isLoaded.current = true;
  56837. onLoad();
  56838. }
  56839. };
  56840. var srcAndOnload = isError && fallback ? {
  56841. src: fallback
  56842. } : {
  56843. onLoad: onLoad,
  56844. src: src
  56845. };
  56846. return [getImgRef, srcAndOnload, status];
  56847. }
  56848. ;// ./node_modules/rc-image/es/hooks/useTouchEvent.js
  56849. function getDistance(a, b) {
  56850. var x = a.x - b.x;
  56851. var y = a.y - b.y;
  56852. return Math.hypot(x, y);
  56853. }
  56854. function getCenter(oldPoint1, oldPoint2, newPoint1, newPoint2) {
  56855. // Calculate the distance each point has moved
  56856. var distance1 = getDistance(oldPoint1, newPoint1);
  56857. var distance2 = getDistance(oldPoint2, newPoint2);
  56858. // If both distances are 0, return the original points
  56859. if (distance1 === 0 && distance2 === 0) {
  56860. return [oldPoint1.x, oldPoint1.y];
  56861. }
  56862. // Calculate the ratio of the distances
  56863. var ratio = distance1 / (distance1 + distance2);
  56864. // Calculate the new center point based on the ratio
  56865. var x = oldPoint1.x + ratio * (oldPoint2.x - oldPoint1.x);
  56866. var y = oldPoint1.y + ratio * (oldPoint2.y - oldPoint1.y);
  56867. return [x, y];
  56868. }
  56869. function useTouchEvent(imgRef, movable, visible, minScale, transform, updateTransform, dispatchZoomChange) {
  56870. var rotate = transform.rotate,
  56871. scale = transform.scale,
  56872. x = transform.x,
  56873. y = transform.y;
  56874. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  56875. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  56876. isTouching = _useState2[0],
  56877. setIsTouching = _useState2[1];
  56878. var touchPointInfo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
  56879. point1: {
  56880. x: 0,
  56881. y: 0
  56882. },
  56883. point2: {
  56884. x: 0,
  56885. y: 0
  56886. },
  56887. eventType: 'none'
  56888. });
  56889. var updateTouchPointInfo = function updateTouchPointInfo(values) {
  56890. touchPointInfo.current = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, touchPointInfo.current), values);
  56891. };
  56892. var onTouchStart = function onTouchStart(event) {
  56893. if (!movable) return;
  56894. event.stopPropagation();
  56895. setIsTouching(true);
  56896. var _event$touches = event.touches,
  56897. touches = _event$touches === void 0 ? [] : _event$touches;
  56898. if (touches.length > 1) {
  56899. // touch zoom
  56900. updateTouchPointInfo({
  56901. point1: {
  56902. x: touches[0].clientX,
  56903. y: touches[0].clientY
  56904. },
  56905. point2: {
  56906. x: touches[1].clientX,
  56907. y: touches[1].clientY
  56908. },
  56909. eventType: 'touchZoom'
  56910. });
  56911. } else {
  56912. // touch move
  56913. updateTouchPointInfo({
  56914. point1: {
  56915. x: touches[0].clientX - x,
  56916. y: touches[0].clientY - y
  56917. },
  56918. eventType: 'move'
  56919. });
  56920. }
  56921. };
  56922. var onTouchMove = function onTouchMove(event) {
  56923. var _event$touches2 = event.touches,
  56924. touches = _event$touches2 === void 0 ? [] : _event$touches2;
  56925. var _touchPointInfo$curre = touchPointInfo.current,
  56926. point1 = _touchPointInfo$curre.point1,
  56927. point2 = _touchPointInfo$curre.point2,
  56928. eventType = _touchPointInfo$curre.eventType;
  56929. if (touches.length > 1 && eventType === 'touchZoom') {
  56930. // touch zoom
  56931. var newPoint1 = {
  56932. x: touches[0].clientX,
  56933. y: touches[0].clientY
  56934. };
  56935. var newPoint2 = {
  56936. x: touches[1].clientX,
  56937. y: touches[1].clientY
  56938. };
  56939. var _getCenter = getCenter(point1, point2, newPoint1, newPoint2),
  56940. _getCenter2 = (0,slicedToArray["default"])(_getCenter, 2),
  56941. centerX = _getCenter2[0],
  56942. centerY = _getCenter2[1];
  56943. var ratio = getDistance(newPoint1, newPoint2) / getDistance(point1, point2);
  56944. dispatchZoomChange(ratio, 'touchZoom', centerX, centerY, true);
  56945. updateTouchPointInfo({
  56946. point1: newPoint1,
  56947. point2: newPoint2,
  56948. eventType: 'touchZoom'
  56949. });
  56950. } else if (eventType === 'move') {
  56951. // touch move
  56952. updateTransform({
  56953. x: touches[0].clientX - point1.x,
  56954. y: touches[0].clientY - point1.y
  56955. }, 'move');
  56956. updateTouchPointInfo({
  56957. eventType: 'move'
  56958. });
  56959. }
  56960. };
  56961. var onTouchEnd = function onTouchEnd() {
  56962. if (!visible) return;
  56963. if (isTouching) {
  56964. setIsTouching(false);
  56965. }
  56966. updateTouchPointInfo({
  56967. eventType: 'none'
  56968. });
  56969. if (minScale > scale) {
  56970. /** When the scaling ratio is less than the minimum scaling ratio, reset the scaling ratio */
  56971. return updateTransform({
  56972. x: 0,
  56973. y: 0,
  56974. scale: minScale
  56975. }, 'touchZoom');
  56976. }
  56977. var width = imgRef.current.offsetWidth * scale;
  56978. var height = imgRef.current.offsetHeight * scale;
  56979. // eslint-disable-next-line @typescript-eslint/no-shadow
  56980. var _imgRef$current$getBo = imgRef.current.getBoundingClientRect(),
  56981. left = _imgRef$current$getBo.left,
  56982. top = _imgRef$current$getBo.top;
  56983. var isRotate = rotate % 180 !== 0;
  56984. var fixState = getFixScaleEleTransPosition(isRotate ? height : width, isRotate ? width : height, left, top);
  56985. if (fixState) {
  56986. updateTransform((0,objectSpread2["default"])({}, fixState), 'dragRebound');
  56987. }
  56988. };
  56989. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  56990. var onTouchMoveListener;
  56991. if (visible && movable) {
  56992. onTouchMoveListener = addEventListenerWrap(window, 'touchmove', function (e) {
  56993. return e.preventDefault();
  56994. }, {
  56995. passive: false
  56996. });
  56997. }
  56998. return function () {
  56999. var _onTouchMoveListener;
  57000. (_onTouchMoveListener = onTouchMoveListener) === null || _onTouchMoveListener === void 0 || _onTouchMoveListener.remove();
  57001. };
  57002. }, [visible, movable]);
  57003. return {
  57004. isTouching: isTouching,
  57005. onTouchStart: onTouchStart,
  57006. onTouchMove: onTouchMove,
  57007. onTouchEnd: onTouchEnd
  57008. };
  57009. }
  57010. ;// ./node_modules/rc-image/es/Preview.js
  57011. var Preview_excluded = ["fallback", "src", "imgRef"],
  57012. Preview_excluded2 = ["prefixCls", "src", "alt", "imageInfo", "fallback", "movable", "onClose", "visible", "icons", "rootClassName", "closeIcon", "getContainer", "current", "count", "countRender", "scaleStep", "minScale", "maxScale", "transitionName", "maskTransitionName", "imageRender", "imgCommonProps", "toolbarRender", "onTransform", "onChange"];
  57013. var PreviewImage = function PreviewImage(_ref) {
  57014. var fallback = _ref.fallback,
  57015. src = _ref.src,
  57016. imgRef = _ref.imgRef,
  57017. props = (0,objectWithoutProperties["default"])(_ref, Preview_excluded);
  57018. var _useStatus = useStatus({
  57019. src: src,
  57020. fallback: fallback
  57021. }),
  57022. _useStatus2 = (0,slicedToArray["default"])(_useStatus, 2),
  57023. getImgRef = _useStatus2[0],
  57024. srcAndOnload = _useStatus2[1];
  57025. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("img", (0,esm_extends["default"])({
  57026. ref: function ref(_ref2) {
  57027. imgRef.current = _ref2;
  57028. getImgRef(_ref2);
  57029. }
  57030. }, props, srcAndOnload));
  57031. };
  57032. var Preview = function Preview(props) {
  57033. var prefixCls = props.prefixCls,
  57034. src = props.src,
  57035. alt = props.alt,
  57036. imageInfo = props.imageInfo,
  57037. fallback = props.fallback,
  57038. _props$movable = props.movable,
  57039. movable = _props$movable === void 0 ? true : _props$movable,
  57040. onClose = props.onClose,
  57041. visible = props.visible,
  57042. _props$icons = props.icons,
  57043. icons = _props$icons === void 0 ? {} : _props$icons,
  57044. rootClassName = props.rootClassName,
  57045. closeIcon = props.closeIcon,
  57046. getContainer = props.getContainer,
  57047. _props$current = props.current,
  57048. current = _props$current === void 0 ? 0 : _props$current,
  57049. _props$count = props.count,
  57050. count = _props$count === void 0 ? 1 : _props$count,
  57051. countRender = props.countRender,
  57052. _props$scaleStep = props.scaleStep,
  57053. scaleStep = _props$scaleStep === void 0 ? 0.5 : _props$scaleStep,
  57054. _props$minScale = props.minScale,
  57055. minScale = _props$minScale === void 0 ? 1 : _props$minScale,
  57056. _props$maxScale = props.maxScale,
  57057. maxScale = _props$maxScale === void 0 ? 50 : _props$maxScale,
  57058. _props$transitionName = props.transitionName,
  57059. transitionName = _props$transitionName === void 0 ? 'zoom' : _props$transitionName,
  57060. _props$maskTransition = props.maskTransitionName,
  57061. maskTransitionName = _props$maskTransition === void 0 ? 'fade' : _props$maskTransition,
  57062. imageRender = props.imageRender,
  57063. imgCommonProps = props.imgCommonProps,
  57064. toolbarRender = props.toolbarRender,
  57065. onTransform = props.onTransform,
  57066. onChange = props.onChange,
  57067. restProps = (0,objectWithoutProperties["default"])(props, Preview_excluded2);
  57068. var imgRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  57069. var groupContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PreviewGroupContext);
  57070. var showLeftOrRightSwitches = groupContext && count > 1;
  57071. var showOperationsProgress = groupContext && count >= 1;
  57072. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(true),
  57073. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  57074. enableTransition = _useState2[0],
  57075. setEnableTransition = _useState2[1];
  57076. var _useImageTransform = useImageTransform(imgRef, minScale, maxScale, onTransform),
  57077. transform = _useImageTransform.transform,
  57078. resetTransform = _useImageTransform.resetTransform,
  57079. updateTransform = _useImageTransform.updateTransform,
  57080. dispatchZoomChange = _useImageTransform.dispatchZoomChange;
  57081. var _useMouseEvent = useMouseEvent(imgRef, movable, visible, scaleStep, transform, updateTransform, dispatchZoomChange),
  57082. isMoving = _useMouseEvent.isMoving,
  57083. onMouseDown = _useMouseEvent.onMouseDown,
  57084. onWheel = _useMouseEvent.onWheel;
  57085. var _useTouchEvent = useTouchEvent(imgRef, movable, visible, minScale, transform, updateTransform, dispatchZoomChange),
  57086. isTouching = _useTouchEvent.isTouching,
  57087. onTouchStart = _useTouchEvent.onTouchStart,
  57088. onTouchMove = _useTouchEvent.onTouchMove,
  57089. onTouchEnd = _useTouchEvent.onTouchEnd;
  57090. var rotate = transform.rotate,
  57091. scale = transform.scale;
  57092. var wrapClassName = classnames_default()((0,defineProperty["default"])({}, "".concat(prefixCls, "-moving"), isMoving));
  57093. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  57094. if (!enableTransition) {
  57095. setEnableTransition(true);
  57096. }
  57097. }, [enableTransition]);
  57098. var onAfterClose = function onAfterClose() {
  57099. resetTransform('close');
  57100. };
  57101. var onZoomIn = function onZoomIn() {
  57102. dispatchZoomChange(BASE_SCALE_RATIO + scaleStep, 'zoomIn');
  57103. };
  57104. var onZoomOut = function onZoomOut() {
  57105. dispatchZoomChange(BASE_SCALE_RATIO / (BASE_SCALE_RATIO + scaleStep), 'zoomOut');
  57106. };
  57107. var onRotateRight = function onRotateRight() {
  57108. updateTransform({
  57109. rotate: rotate + 90
  57110. }, 'rotateRight');
  57111. };
  57112. var onRotateLeft = function onRotateLeft() {
  57113. updateTransform({
  57114. rotate: rotate - 90
  57115. }, 'rotateLeft');
  57116. };
  57117. var onFlipX = function onFlipX() {
  57118. updateTransform({
  57119. flipX: !transform.flipX
  57120. }, 'flipX');
  57121. };
  57122. var onFlipY = function onFlipY() {
  57123. updateTransform({
  57124. flipY: !transform.flipY
  57125. }, 'flipY');
  57126. };
  57127. var onReset = function onReset() {
  57128. resetTransform('reset');
  57129. };
  57130. var onActive = function onActive(offset) {
  57131. var position = current + offset;
  57132. if (!Number.isInteger(position) || position < 0 || position > count - 1) {
  57133. return;
  57134. }
  57135. setEnableTransition(false);
  57136. resetTransform(offset < 0 ? 'prev' : 'next');
  57137. onChange === null || onChange === void 0 || onChange(position, current);
  57138. };
  57139. var onKeyDown = function onKeyDown(event) {
  57140. if (!visible || !showLeftOrRightSwitches) return;
  57141. if (event.keyCode === KeyCode["default"].LEFT) {
  57142. onActive(-1);
  57143. } else if (event.keyCode === KeyCode["default"].RIGHT) {
  57144. onActive(1);
  57145. }
  57146. };
  57147. var onDoubleClick = function onDoubleClick(event) {
  57148. if (visible) {
  57149. if (scale !== 1) {
  57150. updateTransform({
  57151. x: 0,
  57152. y: 0,
  57153. scale: 1
  57154. }, 'doubleClick');
  57155. } else {
  57156. dispatchZoomChange(BASE_SCALE_RATIO + scaleStep, 'doubleClick', event.clientX, event.clientY);
  57157. }
  57158. }
  57159. };
  57160. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  57161. var onKeyDownListener = addEventListenerWrap(window, 'keydown', onKeyDown, false);
  57162. return function () {
  57163. onKeyDownListener.remove();
  57164. };
  57165. }, [visible, showLeftOrRightSwitches, current]);
  57166. var imgNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewImage, (0,esm_extends["default"])({}, imgCommonProps, {
  57167. width: props.width,
  57168. height: props.height,
  57169. imgRef: imgRef,
  57170. className: "".concat(prefixCls, "-img"),
  57171. alt: alt,
  57172. style: {
  57173. transform: "translate3d(".concat(transform.x, "px, ").concat(transform.y, "px, 0) scale3d(").concat(transform.flipX ? '-' : '').concat(scale, ", ").concat(transform.flipY ? '-' : '').concat(scale, ", 1) rotate(").concat(rotate, "deg)"),
  57174. transitionDuration: (!enableTransition || isTouching) && '0s'
  57175. },
  57176. fallback: fallback,
  57177. src: src,
  57178. onWheel: onWheel,
  57179. onMouseDown: onMouseDown,
  57180. onDoubleClick: onDoubleClick,
  57181. onTouchStart: onTouchStart,
  57182. onTouchMove: onTouchMove,
  57183. onTouchEnd: onTouchEnd,
  57184. onTouchCancel: onTouchEnd
  57185. }));
  57186. var image = (0,objectSpread2["default"])({
  57187. url: src,
  57188. alt: alt
  57189. }, imageInfo);
  57190. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_dialog_es, (0,esm_extends["default"])({
  57191. transitionName: transitionName,
  57192. maskTransitionName: maskTransitionName,
  57193. closable: false,
  57194. keyboard: true,
  57195. prefixCls: prefixCls,
  57196. onClose: onClose,
  57197. visible: visible,
  57198. classNames: {
  57199. wrapper: wrapClassName
  57200. },
  57201. rootClassName: rootClassName,
  57202. getContainer: getContainer
  57203. }, restProps, {
  57204. afterClose: onAfterClose
  57205. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  57206. className: "".concat(prefixCls, "-img-wrapper")
  57207. }, imageRender ? imageRender(imgNode, (0,objectSpread2["default"])({
  57208. transform: transform,
  57209. image: image
  57210. }, groupContext ? {
  57211. current: current
  57212. } : {})) : imgNode)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Operations, {
  57213. visible: visible,
  57214. transform: transform,
  57215. maskTransitionName: maskTransitionName,
  57216. closeIcon: closeIcon,
  57217. getContainer: getContainer,
  57218. prefixCls: prefixCls,
  57219. rootClassName: rootClassName,
  57220. icons: icons,
  57221. countRender: countRender,
  57222. showSwitch: showLeftOrRightSwitches,
  57223. showProgress: showOperationsProgress,
  57224. current: current,
  57225. count: count,
  57226. scale: scale,
  57227. minScale: minScale,
  57228. maxScale: maxScale,
  57229. toolbarRender: toolbarRender,
  57230. onActive: onActive,
  57231. onZoomIn: onZoomIn,
  57232. onZoomOut: onZoomOut,
  57233. onRotateRight: onRotateRight,
  57234. onRotateLeft: onRotateLeft,
  57235. onFlipX: onFlipX,
  57236. onFlipY: onFlipY,
  57237. onClose: onClose,
  57238. onReset: onReset,
  57239. zIndex: restProps.zIndex !== undefined ? restProps.zIndex + 1 : undefined,
  57240. image: image
  57241. }));
  57242. };
  57243. /* harmony default export */ var es_Preview = (Preview);
  57244. ;// ./node_modules/rc-image/es/common.js
  57245. var COMMON_PROPS = ['crossOrigin', 'decoding', 'draggable', 'loading', 'referrerPolicy', 'sizes', 'srcSet', 'useMap', 'alt'];
  57246. ;// ./node_modules/rc-image/es/hooks/usePreviewItems.js
  57247. /**
  57248. * Merge props provided `items` or context collected images
  57249. */
  57250. function usePreviewItems(items) {
  57251. // Context collection image data
  57252. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  57253. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  57254. images = _React$useState2[0],
  57255. setImages = _React$useState2[1];
  57256. var registerImage = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (id, data) {
  57257. setImages(function (imgs) {
  57258. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, imgs), {}, (0,defineProperty["default"])({}, id, data));
  57259. });
  57260. return function () {
  57261. setImages(function (imgs) {
  57262. var cloneImgs = (0,objectSpread2["default"])({}, imgs);
  57263. delete cloneImgs[id];
  57264. return cloneImgs;
  57265. });
  57266. };
  57267. }, []);
  57268. // items
  57269. var mergedItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  57270. // use `items` first
  57271. if (items) {
  57272. return items.map(function (item) {
  57273. if (typeof item === 'string') {
  57274. return {
  57275. data: {
  57276. src: item
  57277. }
  57278. };
  57279. }
  57280. var data = {};
  57281. Object.keys(item).forEach(function (key) {
  57282. if (['src'].concat((0,toConsumableArray["default"])(COMMON_PROPS)).includes(key)) {
  57283. data[key] = item[key];
  57284. }
  57285. });
  57286. return {
  57287. data: data
  57288. };
  57289. });
  57290. }
  57291. // use registered images secondly
  57292. return Object.keys(images).reduce(function (total, id) {
  57293. var _images$id = images[id],
  57294. canPreview = _images$id.canPreview,
  57295. data = _images$id.data;
  57296. if (canPreview) {
  57297. total.push({
  57298. data: data,
  57299. id: id
  57300. });
  57301. }
  57302. return total;
  57303. }, []);
  57304. }, [items, images]);
  57305. return [mergedItems, registerImage, !!items];
  57306. }
  57307. ;// ./node_modules/rc-image/es/PreviewGroup.js
  57308. var PreviewGroup_excluded = ["visible", "onVisibleChange", "getContainer", "current", "movable", "minScale", "maxScale", "countRender", "closeIcon", "onChange", "onTransform", "toolbarRender", "imageRender"],
  57309. PreviewGroup_excluded2 = ["src"];
  57310. var PreviewGroup_Group = function Group(_ref) {
  57311. var _mergedItems$current;
  57312. var _ref$previewPrefixCls = _ref.previewPrefixCls,
  57313. previewPrefixCls = _ref$previewPrefixCls === void 0 ? 'rc-image-preview' : _ref$previewPrefixCls,
  57314. children = _ref.children,
  57315. _ref$icons = _ref.icons,
  57316. icons = _ref$icons === void 0 ? {} : _ref$icons,
  57317. items = _ref.items,
  57318. preview = _ref.preview,
  57319. fallback = _ref.fallback;
  57320. var _ref2 = (0,esm_typeof["default"])(preview) === 'object' ? preview : {},
  57321. previewVisible = _ref2.visible,
  57322. onVisibleChange = _ref2.onVisibleChange,
  57323. getContainer = _ref2.getContainer,
  57324. currentIndex = _ref2.current,
  57325. movable = _ref2.movable,
  57326. minScale = _ref2.minScale,
  57327. maxScale = _ref2.maxScale,
  57328. countRender = _ref2.countRender,
  57329. closeIcon = _ref2.closeIcon,
  57330. onChange = _ref2.onChange,
  57331. onTransform = _ref2.onTransform,
  57332. toolbarRender = _ref2.toolbarRender,
  57333. imageRender = _ref2.imageRender,
  57334. dialogProps = (0,objectWithoutProperties["default"])(_ref2, PreviewGroup_excluded);
  57335. // ========================== Items ===========================
  57336. var _usePreviewItems = usePreviewItems(items),
  57337. _usePreviewItems2 = (0,slicedToArray["default"])(_usePreviewItems, 3),
  57338. mergedItems = _usePreviewItems2[0],
  57339. register = _usePreviewItems2[1],
  57340. fromItems = _usePreviewItems2[2];
  57341. // ========================= Preview ==========================
  57342. // >>> Index
  57343. var _useMergedState = (0,useMergedState["default"])(0, {
  57344. value: currentIndex
  57345. }),
  57346. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  57347. current = _useMergedState2[0],
  57348. setCurrent = _useMergedState2[1];
  57349. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  57350. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  57351. keepOpenIndex = _useState2[0],
  57352. setKeepOpenIndex = _useState2[1];
  57353. // >>> Image
  57354. var _ref3 = ((_mergedItems$current = mergedItems[current]) === null || _mergedItems$current === void 0 ? void 0 : _mergedItems$current.data) || {},
  57355. src = _ref3.src,
  57356. imgCommonProps = (0,objectWithoutProperties["default"])(_ref3, PreviewGroup_excluded2);
  57357. // >>> Visible
  57358. var _useMergedState3 = (0,useMergedState["default"])(!!previewVisible, {
  57359. value: previewVisible,
  57360. onChange: function onChange(val, prevVal) {
  57361. onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(val, prevVal, current);
  57362. }
  57363. }),
  57364. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  57365. isShowPreview = _useMergedState4[0],
  57366. setShowPreview = _useMergedState4[1];
  57367. // >>> Position
  57368. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  57369. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  57370. mousePosition = _useState4[0],
  57371. setMousePosition = _useState4[1];
  57372. var onPreviewFromImage = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (id, imageSrc, mouseX, mouseY) {
  57373. var index = fromItems ? mergedItems.findIndex(function (item) {
  57374. return item.data.src === imageSrc;
  57375. }) : mergedItems.findIndex(function (item) {
  57376. return item.id === id;
  57377. });
  57378. setCurrent(index < 0 ? 0 : index);
  57379. setShowPreview(true);
  57380. setMousePosition({
  57381. x: mouseX,
  57382. y: mouseY
  57383. });
  57384. setKeepOpenIndex(true);
  57385. }, [mergedItems, fromItems]);
  57386. // Reset current when reopen
  57387. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  57388. if (isShowPreview) {
  57389. if (!keepOpenIndex) {
  57390. setCurrent(0);
  57391. }
  57392. } else {
  57393. setKeepOpenIndex(false);
  57394. }
  57395. }, [isShowPreview]);
  57396. // ========================== Events ==========================
  57397. var onInternalChange = function onInternalChange(next, prev) {
  57398. setCurrent(next);
  57399. onChange === null || onChange === void 0 || onChange(next, prev);
  57400. };
  57401. var onPreviewClose = function onPreviewClose() {
  57402. setShowPreview(false);
  57403. setMousePosition(null);
  57404. };
  57405. // ========================= Context ==========================
  57406. var previewGroupContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  57407. return {
  57408. register: register,
  57409. onPreview: onPreviewFromImage
  57410. };
  57411. }, [register, onPreviewFromImage]);
  57412. // ========================== Render ==========================
  57413. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PreviewGroupContext.Provider, {
  57414. value: previewGroupContext
  57415. }, children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Preview, (0,esm_extends["default"])({
  57416. "aria-hidden": !isShowPreview,
  57417. movable: movable,
  57418. visible: isShowPreview,
  57419. prefixCls: previewPrefixCls,
  57420. closeIcon: closeIcon,
  57421. onClose: onPreviewClose,
  57422. mousePosition: mousePosition,
  57423. imgCommonProps: imgCommonProps,
  57424. src: src,
  57425. fallback: fallback,
  57426. icons: icons,
  57427. minScale: minScale,
  57428. maxScale: maxScale,
  57429. getContainer: getContainer,
  57430. current: current,
  57431. count: mergedItems.length,
  57432. countRender: countRender,
  57433. onTransform: onTransform,
  57434. toolbarRender: toolbarRender,
  57435. imageRender: imageRender,
  57436. onChange: onInternalChange
  57437. }, dialogProps)));
  57438. };
  57439. /* harmony default export */ var PreviewGroup = (PreviewGroup_Group);
  57440. ;// ./node_modules/rc-image/es/hooks/useRegisterImage.js
  57441. var uid = 0;
  57442. function useRegisterImage(canPreview, data) {
  57443. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  57444. uid += 1;
  57445. return String(uid);
  57446. }),
  57447. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
  57448. id = _React$useState2[0];
  57449. var groupContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(PreviewGroupContext);
  57450. var registerData = {
  57451. data: data,
  57452. canPreview: canPreview
  57453. };
  57454. // Keep order start
  57455. // Resolve https://github.com/ant-design/ant-design/issues/28881
  57456. // Only need unRegister when component unMount
  57457. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  57458. if (groupContext) {
  57459. return groupContext.register(id, registerData);
  57460. }
  57461. }, []);
  57462. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  57463. if (groupContext) {
  57464. groupContext.register(id, registerData);
  57465. }
  57466. }, [canPreview, data]);
  57467. return id;
  57468. }
  57469. ;// ./node_modules/rc-image/es/Image.js
  57470. var Image_excluded = ["src", "alt", "onPreviewClose", "prefixCls", "previewPrefixCls", "placeholder", "fallback", "width", "height", "style", "preview", "className", "onClick", "onError", "wrapperClassName", "wrapperStyle", "rootClassName"],
  57471. Image_excluded2 = ["src", "visible", "onVisibleChange", "getContainer", "mask", "maskClassName", "movable", "icons", "scaleStep", "minScale", "maxScale", "imageRender", "toolbarRender"];
  57472. var ImageInternal = function ImageInternal(props) {
  57473. var imgSrc = props.src,
  57474. alt = props.alt,
  57475. onInitialPreviewClose = props.onPreviewClose,
  57476. _props$prefixCls = props.prefixCls,
  57477. prefixCls = _props$prefixCls === void 0 ? 'rc-image' : _props$prefixCls,
  57478. _props$previewPrefixC = props.previewPrefixCls,
  57479. previewPrefixCls = _props$previewPrefixC === void 0 ? "".concat(prefixCls, "-preview") : _props$previewPrefixC,
  57480. placeholder = props.placeholder,
  57481. fallback = props.fallback,
  57482. width = props.width,
  57483. height = props.height,
  57484. style = props.style,
  57485. _props$preview = props.preview,
  57486. preview = _props$preview === void 0 ? true : _props$preview,
  57487. className = props.className,
  57488. onClick = props.onClick,
  57489. onError = props.onError,
  57490. wrapperClassName = props.wrapperClassName,
  57491. wrapperStyle = props.wrapperStyle,
  57492. rootClassName = props.rootClassName,
  57493. otherProps = (0,objectWithoutProperties["default"])(props, Image_excluded);
  57494. var isCustomPlaceholder = placeholder && placeholder !== true;
  57495. var _ref = (0,esm_typeof["default"])(preview) === 'object' ? preview : {},
  57496. previewSrc = _ref.src,
  57497. _ref$visible = _ref.visible,
  57498. previewVisible = _ref$visible === void 0 ? undefined : _ref$visible,
  57499. _ref$onVisibleChange = _ref.onVisibleChange,
  57500. onPreviewVisibleChange = _ref$onVisibleChange === void 0 ? onInitialPreviewClose : _ref$onVisibleChange,
  57501. _ref$getContainer = _ref.getContainer,
  57502. getPreviewContainer = _ref$getContainer === void 0 ? undefined : _ref$getContainer,
  57503. previewMask = _ref.mask,
  57504. maskClassName = _ref.maskClassName,
  57505. movable = _ref.movable,
  57506. icons = _ref.icons,
  57507. scaleStep = _ref.scaleStep,
  57508. minScale = _ref.minScale,
  57509. maxScale = _ref.maxScale,
  57510. imageRender = _ref.imageRender,
  57511. toolbarRender = _ref.toolbarRender,
  57512. dialogProps = (0,objectWithoutProperties["default"])(_ref, Image_excluded2);
  57513. var src = previewSrc !== null && previewSrc !== void 0 ? previewSrc : imgSrc;
  57514. var _useMergedState = (0,useMergedState["default"])(!!previewVisible, {
  57515. value: previewVisible,
  57516. onChange: onPreviewVisibleChange
  57517. }),
  57518. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  57519. isShowPreview = _useMergedState2[0],
  57520. setShowPreview = _useMergedState2[1];
  57521. var _useStatus = useStatus({
  57522. src: imgSrc,
  57523. isCustomPlaceholder: isCustomPlaceholder,
  57524. fallback: fallback
  57525. }),
  57526. _useStatus2 = (0,slicedToArray["default"])(_useStatus, 3),
  57527. getImgRef = _useStatus2[0],
  57528. srcAndOnload = _useStatus2[1],
  57529. status = _useStatus2[2];
  57530. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  57531. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  57532. mousePosition = _useState2[0],
  57533. setMousePosition = _useState2[1];
  57534. var groupContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(PreviewGroupContext);
  57535. var canPreview = !!preview;
  57536. var onPreviewClose = function onPreviewClose() {
  57537. setShowPreview(false);
  57538. setMousePosition(null);
  57539. };
  57540. var wrapperClass = classnames_default()(prefixCls, wrapperClassName, rootClassName, (0,defineProperty["default"])({}, "".concat(prefixCls, "-error"), status === 'error'));
  57541. // ========================= ImageProps =========================
  57542. var imgCommonProps = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  57543. var obj = {};
  57544. COMMON_PROPS.forEach(function (prop) {
  57545. if (props[prop] !== undefined) {
  57546. obj[prop] = props[prop];
  57547. }
  57548. });
  57549. return obj;
  57550. }, COMMON_PROPS.map(function (prop) {
  57551. return props[prop];
  57552. }));
  57553. // ========================== Register ==========================
  57554. var registerData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  57555. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, imgCommonProps), {}, {
  57556. src: src
  57557. });
  57558. }, [src, imgCommonProps]);
  57559. var imageId = useRegisterImage(canPreview, registerData);
  57560. // ========================== Preview ===========================
  57561. var onPreview = function onPreview(e) {
  57562. var _getOffset = css_getOffset(e.target),
  57563. left = _getOffset.left,
  57564. top = _getOffset.top;
  57565. if (groupContext) {
  57566. groupContext.onPreview(imageId, src, left, top);
  57567. } else {
  57568. setMousePosition({
  57569. x: left,
  57570. y: top
  57571. });
  57572. setShowPreview(true);
  57573. }
  57574. onClick === null || onClick === void 0 || onClick(e);
  57575. };
  57576. // =========================== Render ===========================
  57577. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, otherProps, {
  57578. className: wrapperClass,
  57579. onClick: canPreview ? onPreview : onClick,
  57580. style: (0,objectSpread2["default"])({
  57581. width: width,
  57582. height: height
  57583. }, wrapperStyle)
  57584. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", (0,esm_extends["default"])({}, imgCommonProps, {
  57585. className: classnames_default()("".concat(prefixCls, "-img"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-img-placeholder"), placeholder === true), className),
  57586. style: (0,objectSpread2["default"])({
  57587. height: height
  57588. }, style),
  57589. ref: getImgRef
  57590. }, srcAndOnload, {
  57591. width: width,
  57592. height: height,
  57593. onError: onError
  57594. })), status === 'loading' && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  57595. "aria-hidden": "true",
  57596. className: "".concat(prefixCls, "-placeholder")
  57597. }, placeholder), previewMask && canPreview && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  57598. className: classnames_default()("".concat(prefixCls, "-mask"), maskClassName),
  57599. style: {
  57600. display: (style === null || style === void 0 ? void 0 : style.display) === 'none' ? 'none' : undefined
  57601. }
  57602. }, previewMask)), !groupContext && canPreview && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Preview, (0,esm_extends["default"])({
  57603. "aria-hidden": !isShowPreview,
  57604. visible: isShowPreview,
  57605. prefixCls: previewPrefixCls,
  57606. onClose: onPreviewClose,
  57607. mousePosition: mousePosition,
  57608. src: src,
  57609. alt: alt,
  57610. imageInfo: {
  57611. width: width,
  57612. height: height
  57613. },
  57614. fallback: fallback,
  57615. getContainer: getPreviewContainer,
  57616. icons: icons,
  57617. movable: movable,
  57618. scaleStep: scaleStep,
  57619. minScale: minScale,
  57620. maxScale: maxScale,
  57621. rootClassName: rootClassName,
  57622. imageRender: imageRender,
  57623. imgCommonProps: imgCommonProps,
  57624. toolbarRender: toolbarRender
  57625. }, dialogProps)));
  57626. };
  57627. ImageInternal.PreviewGroup = PreviewGroup;
  57628. if (true) {
  57629. ImageInternal.displayName = 'Image';
  57630. }
  57631. /* harmony default export */ var es_Image = (ImageInternal);
  57632. ;// ./node_modules/rc-image/es/index.js
  57633. /* harmony default export */ var rc_image_es = (es_Image);
  57634. ;// ./node_modules/@ant-design/icons-svg/es/asn/RotateLeftOutlined.js
  57635. // This icon file is generated automatically.
  57636. var RotateLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { "tag": "path", "attrs": { "d": "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, "name": "rotate-left", "theme": "outlined" };
  57637. /* harmony default export */ var asn_RotateLeftOutlined = (RotateLeftOutlined);
  57638. ;// ./node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.js
  57639. // GENERATE BY ./scripts/generate.ts
  57640. // DON NOT EDIT IT MANUALLY
  57641. var RotateLeftOutlined_RotateLeftOutlined = function RotateLeftOutlined(props, ref) {
  57642. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  57643. ref: ref,
  57644. icon: asn_RotateLeftOutlined
  57645. }));
  57646. };
  57647. /**![rotate-left](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHN0eWxlIC8+PC9kZWZzPjxwYXRoIGQ9Ik02NzIgNDE4SDE0NGMtMTcuNyAwLTMyIDE0LjMtMzIgMzJ2NDE0YzAgMTcuNyAxNC4zIDMyIDMyIDMyaDUyOGMxNy43IDAgMzItMTQuMyAzMi0zMlY0NTBjMC0xNy43LTE0LjMtMzItMzItMzJ6bS00NCA0MDJIMTg4VjQ5NGg0NDB2MzI2eiIgLz48cGF0aCBkPSJNODE5LjMgMzI4LjVjLTc4LjgtMTAwLjctMTk2LTE1My42LTMxNC42LTE1NC4ybC0uMi02NGMwLTYuNS03LjYtMTAuMS0xMi42LTYuMWwtMTI4IDEwMWMtNCAzLjEtMy45IDkuMSAwIDEyLjNMNDkyIDMxOC42YzUuMSA0IDEyLjcuNCAxMi42LTYuMXYtNjMuOWMxMi45LjEgMjUuOS45IDM4LjggMi41IDQyLjEgNS4yIDgyLjEgMTguMiAxMTkgMzguNyAzOC4xIDIxLjIgNzEuMiA0OS43IDk4LjQgODQuMyAyNy4xIDM0LjcgNDYuNyA3My43IDU4LjEgMTE1LjhhMzI1Ljk1IDMyNS45NSAwIDAxNi41IDE0MC45aDc0LjljMTQuOC0xMDMuNi0xMS4zLTIxMy04MS0zMDIuM3oiIC8+PC9zdmc+) */
  57648. var RotateLeftOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RotateLeftOutlined_RotateLeftOutlined);
  57649. if (true) {
  57650. RotateLeftOutlined_RefIcon.displayName = 'RotateLeftOutlined';
  57651. }
  57652. /* harmony default export */ var icons_RotateLeftOutlined = (RotateLeftOutlined_RefIcon);
  57653. ;// ./node_modules/@ant-design/icons-svg/es/asn/RotateRightOutlined.js
  57654. // This icon file is generated automatically.
  57655. var RotateRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { "tag": "path", "attrs": { "d": "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, "name": "rotate-right", "theme": "outlined" };
  57656. /* harmony default export */ var asn_RotateRightOutlined = (RotateRightOutlined);
  57657. ;// ./node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js
  57658. // GENERATE BY ./scripts/generate.ts
  57659. // DON NOT EDIT IT MANUALLY
  57660. var RotateRightOutlined_RotateRightOutlined = function RotateRightOutlined(props, ref) {
  57661. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  57662. ref: ref,
  57663. icon: asn_RotateRightOutlined
  57664. }));
  57665. };
  57666. /**![rotate-right](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHN0eWxlIC8+PC9kZWZzPjxwYXRoIGQ9Ik00ODAuNSAyNTEuMmMxMy0xLjYgMjUuOS0yLjQgMzguOC0yLjV2NjMuOWMwIDYuNSA3LjUgMTAuMSAxMi42IDYuMUw2NjAgMjE3LjZjNC0zLjIgNC05LjIgMC0xMi4zbC0xMjgtMTAxYy01LjEtNC0xMi42LS40LTEyLjYgNi4xbC0uMiA2NGMtMTE4LjYuNS0yMzUuOCA1My40LTMxNC42IDE1NC4yQTM5OS43NSAzOTkuNzUgMCAwMDEyMy41IDYzMWg3NC45Yy0uOS01LjMtMS43LTEwLjctMi40LTE2LjEtNS4xLTQyLjEtMi4xLTg0LjEgOC45LTEyNC44IDExLjQtNDIuMiAzMS04MS4xIDU4LjEtMTE1LjggMjcuMi0zNC43IDYwLjMtNjMuMiA5OC40LTg0LjMgMzctMjAuNiA3Ni45LTMzLjYgMTE5LjEtMzguOHoiIC8+PHBhdGggZD0iTTg4MCA0MThIMzUyYy0xNy43IDAtMzIgMTQuMy0zMiAzMnY0MTRjMCAxNy43IDE0LjMgMzIgMzIgMzJoNTI4YzE3LjcgMCAzMi0xNC4zIDMyLTMyVjQ1MGMwLTE3LjctMTQuMy0zMi0zMi0zMnptLTQ0IDQwMkgzOTZWNDk0aDQ0MHYzMjZ6IiAvPjwvc3ZnPg==) */
  57667. var RotateRightOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RotateRightOutlined_RotateRightOutlined);
  57668. if (true) {
  57669. RotateRightOutlined_RefIcon.displayName = 'RotateRightOutlined';
  57670. }
  57671. /* harmony default export */ var icons_RotateRightOutlined = (RotateRightOutlined_RefIcon);
  57672. ;// ./node_modules/@ant-design/icons-svg/es/asn/SwapOutlined.js
  57673. // This icon file is generated automatically.
  57674. var SwapOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "swap", "theme": "outlined" };
  57675. /* harmony default export */ var asn_SwapOutlined = (SwapOutlined);
  57676. ;// ./node_modules/@ant-design/icons/es/icons/SwapOutlined.js
  57677. // GENERATE BY ./scripts/generate.ts
  57678. // DON NOT EDIT IT MANUALLY
  57679. var SwapOutlined_SwapOutlined = function SwapOutlined(props, ref) {
  57680. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  57681. ref: ref,
  57682. icon: asn_SwapOutlined
  57683. }));
  57684. };
  57685. /**![swap](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg0Ny45IDU5MkgxNTJjLTQuNCAwLTggMy42LTggOHY2MGMwIDQuNCAzLjYgOCA4IDhoNjA1LjJMNjEyLjkgODUxYy00LjEgNS4yLS40IDEzIDYuMyAxM2g3Mi41YzQuOSAwIDkuNS0yLjIgMTIuNi02LjFsMTY4LjgtMjE0LjFjMTYuNS0yMSAxLjYtNTEuOC0yNS4yLTUxLjh6TTg3MiAzNTZIMjY2LjhsMTQ0LjMtMTgzYzQuMS01LjIuNC0xMy02LjMtMTNoLTcyLjVjLTQuOSAwLTkuNSAyLjItMTIuNiA2LjFMMTUwLjkgMzgwLjJjLTE2LjUgMjEtMS42IDUxLjggMjUuMSA1MS44aDY5NmM0LjQgMCA4LTMuNiA4LTh2LTYwYzAtNC40LTMuNi04LTgtOHoiIC8+PC9zdmc+) */
  57686. var SwapOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(SwapOutlined_SwapOutlined);
  57687. if (true) {
  57688. SwapOutlined_RefIcon.displayName = 'SwapOutlined';
  57689. }
  57690. /* harmony default export */ var icons_SwapOutlined = (SwapOutlined_RefIcon);
  57691. ;// ./node_modules/@ant-design/icons-svg/es/asn/ZoomInOutlined.js
  57692. // This icon file is generated automatically.
  57693. var ZoomInOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-in", "theme": "outlined" };
  57694. /* harmony default export */ var asn_ZoomInOutlined = (ZoomInOutlined);
  57695. ;// ./node_modules/@ant-design/icons/es/icons/ZoomInOutlined.js
  57696. // GENERATE BY ./scripts/generate.ts
  57697. // DON NOT EDIT IT MANUALLY
  57698. var ZoomInOutlined_ZoomInOutlined = function ZoomInOutlined(props, ref) {
  57699. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  57700. ref: ref,
  57701. icon: asn_ZoomInOutlined
  57702. }));
  57703. };
  57704. /**![zoom-in](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYzNyA0NDNINTE5VjMwOWMwLTQuNC0zLjYtOC04LThoLTYwYy00LjQgMC04IDMuNi04IDh2MTM0SDMyNWMtNC40IDAtOCAzLjYtOCA4djYwYzAgNC40IDMuNiA4IDggOGgxMTh2MTM0YzAgNC40IDMuNiA4IDggOGg2MGM0LjQgMCA4LTMuNiA4LThWNTE5aDExOGM0LjQgMCA4LTMuNiA4LTh2LTYwYzAtNC40LTMuNi04LTgtOHptMjg0IDQyNEw3NzUgNzIxYzEyMi4xLTE0OC45IDExMy42LTM2OS41LTI2LTUwOS0xNDgtMTQ4LjEtMzg4LjQtMTQ4LjEtNTM3IDAtMTQ4LjEgMTQ4LjYtMTQ4LjEgMzg5IDAgNTM3IDEzOS41IDEzOS42IDM2MC4xIDE0OC4xIDUwOSAyNmwxNDYgMTQ2YzMuMiAyLjggOC4zIDIuOCAxMSAwbDQzLTQzYzIuOC0yLjcgMi44LTcuOCAwLTExek02OTYgNjk2Yy0xMTguOCAxMTguNy0zMTEuMiAxMTguNy00MzAgMC0xMTguNy0xMTguOC0xMTguNy0zMTEuMiAwLTQzMCAxMTguOC0xMTguNyAzMTEuMi0xMTguNyA0MzAgMCAxMTguNyAxMTguOCAxMTguNyAzMTEuMiAwIDQzMHoiIC8+PC9zdmc+) */
  57705. var ZoomInOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ZoomInOutlined_ZoomInOutlined);
  57706. if (true) {
  57707. ZoomInOutlined_RefIcon.displayName = 'ZoomInOutlined';
  57708. }
  57709. /* harmony default export */ var icons_ZoomInOutlined = (ZoomInOutlined_RefIcon);
  57710. ;// ./node_modules/@ant-design/icons-svg/es/asn/ZoomOutOutlined.js
  57711. // This icon file is generated automatically.
  57712. var ZoomOutOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, "name": "zoom-out", "theme": "outlined" };
  57713. /* harmony default export */ var asn_ZoomOutOutlined = (ZoomOutOutlined);
  57714. ;// ./node_modules/@ant-design/icons/es/icons/ZoomOutOutlined.js
  57715. // GENERATE BY ./scripts/generate.ts
  57716. // DON NOT EDIT IT MANUALLY
  57717. var ZoomOutOutlined_ZoomOutOutlined = function ZoomOutOutlined(props, ref) {
  57718. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  57719. ref: ref,
  57720. icon: asn_ZoomOutOutlined
  57721. }));
  57722. };
  57723. /**![zoom-out](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYzNyA0NDNIMzI1Yy00LjQgMC04IDMuNi04IDh2NjBjMCA0LjQgMy42IDggOCA4aDMxMmM0LjQgMCA4LTMuNiA4LTh2LTYwYzAtNC40LTMuNi04LTgtOHptMjg0IDQyNEw3NzUgNzIxYzEyMi4xLTE0OC45IDExMy42LTM2OS41LTI2LTUwOS0xNDgtMTQ4LjEtMzg4LjQtMTQ4LjEtNTM3IDAtMTQ4LjEgMTQ4LjYtMTQ4LjEgMzg5IDAgNTM3IDEzOS41IDEzOS42IDM2MC4xIDE0OC4xIDUwOSAyNmwxNDYgMTQ2YzMuMiAyLjggOC4zIDIuOCAxMSAwbDQzLTQzYzIuOC0yLjcgMi44LTcuOCAwLTExek02OTYgNjk2Yy0xMTguOCAxMTguNy0zMTEuMiAxMTguNy00MzAgMC0xMTguNy0xMTguOC0xMTguNy0zMTEuMiAwLTQzMCAxMTguOC0xMTguNyAzMTEuMi0xMTguNyA0MzAgMCAxMTguNyAxMTguOCAxMTguNyAzMTEuMiAwIDQzMHoiIC8+PC9zdmc+) */
  57724. var ZoomOutOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ZoomOutOutlined_ZoomOutOutlined);
  57725. if (true) {
  57726. ZoomOutOutlined_RefIcon.displayName = 'ZoomOutOutlined';
  57727. }
  57728. /* harmony default export */ var icons_ZoomOutOutlined = (ZoomOutOutlined_RefIcon);
  57729. // EXTERNAL MODULE: ./components/image/style/index.ts
  57730. var image_style = __webpack_require__("./components/image/style/index.ts");
  57731. ;// ./components/image/PreviewGroup.tsx
  57732. var PreviewGroup_rest = undefined && undefined.__rest || function (s, e) {
  57733. var t = {};
  57734. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  57735. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  57736. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  57737. }
  57738. return t;
  57739. };
  57740. const icons = {
  57741. rotateLeft: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_RotateLeftOutlined, null),
  57742. rotateRight: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_RotateRightOutlined, null),
  57743. zoomIn: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ZoomInOutlined, null),
  57744. zoomOut: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ZoomOutOutlined, null),
  57745. close: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null),
  57746. left: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null),
  57747. right: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null),
  57748. flipX: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SwapOutlined, null),
  57749. flipY: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SwapOutlined, {
  57750. rotate: 90
  57751. })
  57752. };
  57753. const InternalPreviewGroup = _a => {
  57754. var {
  57755. previewPrefixCls: customizePrefixCls,
  57756. preview
  57757. } = _a,
  57758. otherProps = PreviewGroup_rest(_a, ["previewPrefixCls", "preview"]);
  57759. const {
  57760. getPrefixCls,
  57761. direction
  57762. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  57763. const prefixCls = getPrefixCls('image', customizePrefixCls);
  57764. const previewPrefixCls = `${prefixCls}-preview`;
  57765. const rootPrefixCls = getPrefixCls();
  57766. const rootCls = hooks_useCSSVarCls(prefixCls);
  57767. const [wrapCSSVar, hashId, cssVarCls] = (0,image_style["default"])(prefixCls, rootCls);
  57768. const [zIndex] = (0,useZIndex.useZIndex)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);
  57769. const memoizedIcons = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, icons), {
  57770. left: direction === 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null),
  57771. right: direction === 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null)
  57772. }), [direction]);
  57773. const mergedPreview = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  57774. var _a;
  57775. if (preview === false) {
  57776. return preview;
  57777. }
  57778. const _preview = typeof preview === 'object' ? preview : {};
  57779. const mergedRootClassName = classnames_default()(hashId, cssVarCls, rootCls, (_a = _preview.rootClassName) !== null && _a !== void 0 ? _a : '');
  57780. return Object.assign(Object.assign({}, _preview), {
  57781. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom', _preview.transitionName),
  57782. maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'fade', _preview.maskTransitionName),
  57783. rootClassName: mergedRootClassName,
  57784. zIndex
  57785. });
  57786. }, [preview]);
  57787. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_image_es.PreviewGroup, Object.assign({
  57788. preview: mergedPreview,
  57789. previewPrefixCls: previewPrefixCls,
  57790. icons: memoizedIcons
  57791. }, otherProps)));
  57792. };
  57793. /* harmony default export */ var image_PreviewGroup = (InternalPreviewGroup);
  57794. ;// ./components/image/index.tsx
  57795. var image_rest = undefined && undefined.__rest || function (s, e) {
  57796. var t = {};
  57797. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  57798. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  57799. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  57800. }
  57801. return t;
  57802. };
  57803. const image_Image = props => {
  57804. const {
  57805. prefixCls: customizePrefixCls,
  57806. preview,
  57807. className,
  57808. rootClassName,
  57809. style
  57810. } = props,
  57811. otherProps = image_rest(props, ["prefixCls", "preview", "className", "rootClassName", "style"]);
  57812. if (true) {
  57813. const warning = (0,_util_warning.devUseWarning)('Image');
  57814. warning.deprecated(!(preview && typeof preview === 'object' && 'destroyOnClose' in preview), 'destroyOnClose', 'destroyOnHidden');
  57815. }
  57816. const {
  57817. getPrefixCls,
  57818. getPopupContainer: getContextPopupContainer,
  57819. className: contextClassName,
  57820. style: contextStyle,
  57821. preview: contextPreview
  57822. } = (0,config_provider_context.useComponentConfig)('image');
  57823. const [imageLocale] = (0,useLocale["default"])('Image');
  57824. const prefixCls = getPrefixCls('image', customizePrefixCls);
  57825. const rootPrefixCls = getPrefixCls();
  57826. // Style
  57827. const rootCls = hooks_useCSSVarCls(prefixCls);
  57828. const [wrapCSSVar, hashId, cssVarCls] = (0,image_style["default"])(prefixCls, rootCls);
  57829. const mergedRootClassName = classnames_default()(rootClassName, hashId, cssVarCls, rootCls);
  57830. const mergedClassName = classnames_default()(className, hashId, contextClassName);
  57831. const [zIndex] = (0,useZIndex.useZIndex)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);
  57832. const mergedPreview = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  57833. if (preview === false) {
  57834. return preview;
  57835. }
  57836. const _preview = typeof preview === 'object' ? preview : {};
  57837. const {
  57838. getContainer,
  57839. closeIcon,
  57840. rootClassName,
  57841. destroyOnClose,
  57842. destroyOnHidden
  57843. } = _preview,
  57844. restPreviewProps = image_rest(_preview, ["getContainer", "closeIcon", "rootClassName", "destroyOnClose", "destroyOnHidden"]);
  57845. return Object.assign(Object.assign({
  57846. mask: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  57847. className: `${prefixCls}-mask-info`
  57848. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeOutlined, null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview)),
  57849. icons: icons
  57850. }, restPreviewProps), {
  57851. // TODO: In the future, destroyOnClose in rc-image needs to be upgrade to destroyOnHidden
  57852. destroyOnClose: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyOnClose,
  57853. rootClassName: classnames_default()(mergedRootClassName, rootClassName),
  57854. getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,
  57855. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'zoom', _preview.transitionName),
  57856. maskTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'fade', _preview.maskTransitionName),
  57857. zIndex,
  57858. closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : contextPreview === null || contextPreview === void 0 ? void 0 : contextPreview.closeIcon
  57859. });
  57860. }, [preview, imageLocale, contextPreview === null || contextPreview === void 0 ? void 0 : contextPreview.closeIcon]);
  57861. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  57862. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_image_es, Object.assign({
  57863. prefixCls: prefixCls,
  57864. preview: mergedPreview,
  57865. rootClassName: mergedRootClassName,
  57866. className: mergedClassName,
  57867. style: mergedStyle
  57868. }, otherProps)));
  57869. };
  57870. image_Image.PreviewGroup = image_PreviewGroup;
  57871. if (true) {
  57872. image_Image.displayName = 'Image';
  57873. }
  57874. /* harmony default export */ var components_image = (image_Image);
  57875. ;// ./components/input/Group.tsx
  57876. /** @deprecated Please use `Space.Compact` */
  57877. const Group_Group = props => {
  57878. const {
  57879. getPrefixCls,
  57880. direction
  57881. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  57882. const {
  57883. prefixCls: customizePrefixCls,
  57884. className
  57885. } = props;
  57886. const prefixCls = getPrefixCls('input-group', customizePrefixCls);
  57887. const inputPrefixCls = getPrefixCls('input');
  57888. const [wrapCSSVar, hashId, cssVarCls] = (0,input_style["default"])(inputPrefixCls);
  57889. const cls = classnames_default()(prefixCls, cssVarCls, {
  57890. [`${prefixCls}-lg`]: props.size === 'large',
  57891. [`${prefixCls}-sm`]: props.size === 'small',
  57892. [`${prefixCls}-compact`]: props.compact,
  57893. [`${prefixCls}-rtl`]: direction === 'rtl'
  57894. }, hashId, className);
  57895. const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
  57896. const groupFormItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
  57897. isFormItemInput: false
  57898. }), [formItemContext]);
  57899. if (true) {
  57900. const warning = (0,_util_warning.devUseWarning)('Input.Group');
  57901. warning.deprecated(false, 'Input.Group', 'Space.Compact');
  57902. }
  57903. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  57904. className: cls,
  57905. style: props.style,
  57906. onMouseEnter: props.onMouseEnter,
  57907. onMouseLeave: props.onMouseLeave,
  57908. onFocus: props.onFocus,
  57909. onBlur: props.onBlur
  57910. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
  57911. value: groupFormItemContext
  57912. }, props.children)));
  57913. };
  57914. /* harmony default export */ var input_Group = (Group_Group);
  57915. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  57916. var cssinjs_utils_es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  57917. // EXTERNAL MODULE: ./components/input/style/token.ts
  57918. var input_style_token = __webpack_require__("./components/input/style/token.ts");
  57919. ;// ./components/input/style/otp.ts
  57920. // =============================== OTP ================================
  57921. const genOTPStyle = token => {
  57922. const {
  57923. componentCls,
  57924. paddingXS
  57925. } = token;
  57926. return {
  57927. [componentCls]: {
  57928. display: 'inline-flex',
  57929. alignItems: 'center',
  57930. flexWrap: 'nowrap',
  57931. columnGap: paddingXS,
  57932. [`${componentCls}-input-wrapper`]: {
  57933. position: 'relative',
  57934. [`${componentCls}-mask-icon`]: {
  57935. position: 'absolute',
  57936. zIndex: '1',
  57937. top: '50%',
  57938. right: '50%',
  57939. transform: 'translate(50%, -50%)',
  57940. pointerEvents: 'none'
  57941. },
  57942. [`${componentCls}-mask-input`]: {
  57943. color: 'transparent',
  57944. caretColor: token.colorText
  57945. },
  57946. [`${componentCls}-mask-input[type=number]::-webkit-inner-spin-button`]: {
  57947. '-webkit-appearance': 'none',
  57948. margin: 0
  57949. },
  57950. [`${componentCls}-mask-input[type=number]`]: {
  57951. '-moz-appearance': 'textfield'
  57952. }
  57953. },
  57954. '&-rtl': {
  57955. direction: 'rtl'
  57956. },
  57957. [`${componentCls}-input`]: {
  57958. textAlign: 'center',
  57959. paddingInline: token.paddingXXS
  57960. },
  57961. // ================= Size =================
  57962. [`&${componentCls}-sm ${componentCls}-input`]: {
  57963. paddingInline: token.calc(token.paddingXXS).div(2).equal()
  57964. },
  57965. [`&${componentCls}-lg ${componentCls}-input`]: {
  57966. paddingInline: token.paddingXS
  57967. }
  57968. }
  57969. };
  57970. };
  57971. // ============================== Export ==============================
  57972. /* harmony default export */ var otp = ((0,genStyleUtils.genStyleHooks)(['Input', 'OTP'], token => {
  57973. const inputToken = (0,cssinjs_utils_es.mergeToken)(token, (0,input_style_token.initInputToken)(token));
  57974. return genOTPStyle(inputToken);
  57975. }, input_style_token.initComponentToken));
  57976. ;// ./components/input/OTP/OTPInput.tsx
  57977. var OTPInput_rest = undefined && undefined.__rest || function (s, e) {
  57978. var t = {};
  57979. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  57980. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  57981. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  57982. }
  57983. return t;
  57984. };
  57985. const OTPInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  57986. const {
  57987. className,
  57988. value,
  57989. onChange,
  57990. onActiveChange,
  57991. index,
  57992. mask
  57993. } = props,
  57994. restProps = OTPInput_rest(props, ["className", "value", "onChange", "onActiveChange", "index", "mask"]);
  57995. const {
  57996. getPrefixCls
  57997. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  57998. const prefixCls = getPrefixCls('otp');
  57999. const maskValue = typeof mask === 'string' ? mask : value;
  58000. // ========================== Ref ===========================
  58001. const inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  58002. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => inputRef.current);
  58003. // ========================= Input ==========================
  58004. const onInternalChange = e => {
  58005. onChange(index, e.target.value);
  58006. };
  58007. // ========================= Focus ==========================
  58008. const syncSelection = () => {
  58009. (0,raf["default"])(() => {
  58010. var _a;
  58011. const inputEle = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input;
  58012. if (document.activeElement === inputEle && inputEle) {
  58013. inputEle.select();
  58014. }
  58015. });
  58016. };
  58017. // ======================== Keyboard ========================
  58018. const onInternalKeyDown = event => {
  58019. const {
  58020. key,
  58021. ctrlKey,
  58022. metaKey
  58023. } = event;
  58024. if (key === 'ArrowLeft') {
  58025. onActiveChange(index - 1);
  58026. } else if (key === 'ArrowRight') {
  58027. onActiveChange(index + 1);
  58028. } else if (key === 'z' && (ctrlKey || metaKey)) {
  58029. event.preventDefault();
  58030. } else if (key === 'Backspace' && !value) {
  58031. onActiveChange(index - 1);
  58032. }
  58033. syncSelection();
  58034. };
  58035. // ========================= Render =========================
  58036. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  58037. className: `${prefixCls}-input-wrapper`,
  58038. role: "presentation"
  58039. }, mask && value !== '' && value !== undefined && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  58040. className: `${prefixCls}-mask-icon`,
  58041. "aria-hidden": "true"
  58042. }, maskValue)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, Object.assign({
  58043. "aria-label": `OTP Input ${index + 1}`,
  58044. type: mask === true ? 'password' : 'text'
  58045. }, restProps, {
  58046. ref: inputRef,
  58047. value: value,
  58048. onInput: onInternalChange,
  58049. onFocus: syncSelection,
  58050. onKeyDown: onInternalKeyDown,
  58051. onMouseDown: syncSelection,
  58052. onMouseUp: syncSelection,
  58053. className: classnames_default()(className, {
  58054. [`${prefixCls}-mask-input`]: mask
  58055. })
  58056. })));
  58057. });
  58058. /* harmony default export */ var OTP_OTPInput = (OTPInput);
  58059. ;// ./components/input/OTP/index.tsx
  58060. var OTP_rest = undefined && undefined.__rest || function (s, e) {
  58061. var t = {};
  58062. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  58063. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  58064. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  58065. }
  58066. return t;
  58067. };
  58068. function strToArr(str) {
  58069. return (str || '').split('');
  58070. }
  58071. const Separator = props => {
  58072. const {
  58073. index,
  58074. prefixCls,
  58075. separator
  58076. } = props;
  58077. const separatorNode = typeof separator === 'function' ? separator(index) : separator;
  58078. if (!separatorNode) {
  58079. return null;
  58080. }
  58081. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  58082. className: `${prefixCls}-separator`
  58083. }, separatorNode);
  58084. };
  58085. const OTP = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  58086. const {
  58087. prefixCls: customizePrefixCls,
  58088. length = 6,
  58089. size: customSize,
  58090. defaultValue,
  58091. value,
  58092. onChange,
  58093. formatter,
  58094. separator,
  58095. variant,
  58096. disabled,
  58097. status: customStatus,
  58098. autoFocus,
  58099. mask,
  58100. type,
  58101. onInput,
  58102. inputMode
  58103. } = props,
  58104. restProps = OTP_rest(props, ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "separator", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"]);
  58105. if (true) {
  58106. const warning = (0,_util_warning.devUseWarning)('Input.OTP');
  58107. true ? warning(!(typeof mask === 'string' && mask.length > 1), 'usage', '`mask` prop should be a single character.') : 0;
  58108. }
  58109. const {
  58110. getPrefixCls,
  58111. direction
  58112. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  58113. const prefixCls = getPrefixCls('otp', customizePrefixCls);
  58114. const domAttrs = (0,pickAttrs["default"])(restProps, {
  58115. aria: true,
  58116. data: true,
  58117. attr: true
  58118. });
  58119. // ========================= Root =========================
  58120. // Style
  58121. const [wrapCSSVar, hashId, cssVarCls] = otp(prefixCls);
  58122. // ========================= Size =========================
  58123. const mergedSize = (0,useSize["default"])(ctx => customSize !== null && customSize !== void 0 ? customSize : ctx);
  58124. // ======================== Status ========================
  58125. const formContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  58126. const mergedStatus = getMergedStatus(formContext.status, customStatus);
  58127. const proxyFormContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => Object.assign(Object.assign({}, formContext), {
  58128. status: mergedStatus,
  58129. hasFeedback: false,
  58130. feedbackIcon: null
  58131. }), [formContext, mergedStatus]);
  58132. // ========================= Refs =========================
  58133. const containerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  58134. const refs = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  58135. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  58136. focus: () => {
  58137. var _a;
  58138. (_a = refs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
  58139. },
  58140. blur: () => {
  58141. var _a;
  58142. for (let i = 0; i < length; i += 1) {
  58143. (_a = refs.current[i]) === null || _a === void 0 ? void 0 : _a.blur();
  58144. }
  58145. },
  58146. nativeElement: containerRef.current
  58147. }));
  58148. // ======================= Formatter ======================
  58149. const internalFormatter = txt => formatter ? formatter(txt) : txt;
  58150. // ======================== Values ========================
  58151. const [valueCells, setValueCells] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => strToArr(internalFormatter(defaultValue || '')));
  58152. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  58153. if (value !== undefined) {
  58154. setValueCells(strToArr(value));
  58155. }
  58156. }, [value]);
  58157. const triggerValueCellsChange = (0,useEvent["default"])(nextValueCells => {
  58158. setValueCells(nextValueCells);
  58159. if (onInput) {
  58160. onInput(nextValueCells);
  58161. }
  58162. // Trigger if all cells are filled
  58163. if (onChange && nextValueCells.length === length && nextValueCells.every(c => c) && nextValueCells.some((c, index) => valueCells[index] !== c)) {
  58164. onChange(nextValueCells.join(''));
  58165. }
  58166. });
  58167. const patchValue = (0,useEvent["default"])((index, txt) => {
  58168. let nextCells = (0,toConsumableArray["default"])(valueCells);
  58169. // Fill cells till index
  58170. for (let i = 0; i < index; i += 1) {
  58171. if (!nextCells[i]) {
  58172. nextCells[i] = '';
  58173. }
  58174. }
  58175. if (txt.length <= 1) {
  58176. nextCells[index] = txt;
  58177. } else {
  58178. nextCells = nextCells.slice(0, index).concat(strToArr(txt));
  58179. }
  58180. nextCells = nextCells.slice(0, length);
  58181. // Clean the last empty cell
  58182. for (let i = nextCells.length - 1; i >= 0; i -= 1) {
  58183. if (nextCells[i]) {
  58184. break;
  58185. }
  58186. nextCells.pop();
  58187. }
  58188. // Format if needed
  58189. const formattedValue = internalFormatter(nextCells.map(c => c || ' ').join(''));
  58190. nextCells = strToArr(formattedValue).map((c, i) => {
  58191. if (c === ' ' && !nextCells[i]) {
  58192. return nextCells[i];
  58193. }
  58194. return c;
  58195. });
  58196. return nextCells;
  58197. });
  58198. // ======================== Change ========================
  58199. const onInputChange = (index, txt) => {
  58200. var _a;
  58201. const nextCells = patchValue(index, txt);
  58202. const nextIndex = Math.min(index + txt.length, length - 1);
  58203. if (nextIndex !== index && nextCells[index] !== undefined) {
  58204. (_a = refs.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
  58205. }
  58206. triggerValueCellsChange(nextCells);
  58207. };
  58208. const onInputActiveChange = nextIndex => {
  58209. var _a;
  58210. (_a = refs.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
  58211. };
  58212. // ======================== Render ========================
  58213. const inputSharedProps = {
  58214. variant,
  58215. disabled,
  58216. status: mergedStatus,
  58217. mask,
  58218. type,
  58219. inputMode
  58220. };
  58221. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, domAttrs, {
  58222. ref: containerRef,
  58223. className: classnames_default()(prefixCls, {
  58224. [`${prefixCls}-sm`]: mergedSize === 'small',
  58225. [`${prefixCls}-lg`]: mergedSize === 'large',
  58226. [`${prefixCls}-rtl`]: direction === 'rtl'
  58227. }, cssVarCls, hashId),
  58228. role: "group"
  58229. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FormItemInputContext.Provider, {
  58230. value: proxyFormContext
  58231. }, Array.from({
  58232. length
  58233. }).map((_, index) => {
  58234. const key = `otp-${index}`;
  58235. const singleValue = valueCells[index] || '';
  58236. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
  58237. key: key
  58238. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OTP_OTPInput, Object.assign({
  58239. ref: inputEle => {
  58240. refs.current[index] = inputEle;
  58241. },
  58242. index: index,
  58243. size: mergedSize,
  58244. htmlSize: 1,
  58245. className: `${prefixCls}-input`,
  58246. onChange: onInputChange,
  58247. value: singleValue,
  58248. onActiveChange: onInputActiveChange,
  58249. autoFocus: index === 0 && autoFocus
  58250. }, inputSharedProps)), index < length - 1 && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Separator, {
  58251. separator: separator,
  58252. index: index,
  58253. prefixCls: prefixCls
  58254. })));
  58255. }))));
  58256. });
  58257. /* harmony default export */ var input_OTP = (OTP);
  58258. ;// ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
  58259. // This icon file is generated automatically.
  58260. var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
  58261. /* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
  58262. ;// ./node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js
  58263. // GENERATE BY ./scripts/generate.ts
  58264. // DON NOT EDIT IT MANUALLY
  58265. var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
  58266. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  58267. ref: ref,
  58268. icon: asn_EyeInvisibleOutlined
  58269. }));
  58270. };
  58271. /**![eye-invisible](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk0Mi4yIDQ4Ni4yUTg4OS40NyAzNzUuMTEgODE2LjcgMzA1bC01MC44OCA1MC44OEM4MDcuMzEgMzk1LjUzIDg0My40NSA0NDcuNCA4NzQuNyA1MTIgNzkxLjUgNjg0LjIgNjczLjQgNzY2IDUxMiA3NjZxLTcyLjY3IDAtMTMzLjg3LTIyLjM4TDMyMyA3OTguNzVRNDA4IDgzOCA1MTIgODM4cTI4OC4zIDAgNDMwLjItMzAwLjNhNjAuMjkgNjAuMjkgMCAwMDAtNTEuNXptLTYzLjU3LTMyMC42NEw4MzYgMTIyLjg4YTggOCAwIDAwLTExLjMyIDBMNzE1LjMxIDIzMi4yUTYyNC44NiAxODYgNTEyIDE4NnEtMjg4LjMgMC00MzAuMiAzMDAuM2E2MC4zIDYwLjMgMCAwMDAgNTEuNXE1Ni42OSAxMTkuNCAxMzYuNSAxOTEuNDFMMTEyLjQ4IDgzNWE4IDggMCAwMDAgMTEuMzFMMTU1LjE3IDg4OWE4IDggMCAwMDExLjMxIDBsNzEyLjE1LTcxMi4xMmE4IDggMCAwMDAtMTEuMzJ6TTE0OS4zIDUxMkMyMzIuNiAzMzkuOCAzNTAuNyAyNTggNTEyIDI1OGM1NC41NCAwIDEwNC4xMyA5LjM2IDE0OS4xMiAyOC4zOWwtNzAuMyA3MC4zYTE3NiAxNzYgMCAwMC0yMzguMTMgMjM4LjEzbC04My40MiA4My40MkMyMjMuMSA2MzcuNDkgMTgzLjMgNTgyLjI4IDE0OS4zIDUxMnptMjQ2LjcgMGExMTIuMTEgMTEyLjExIDAgMDExNDYuMi0xMDYuNjlMNDAxLjMxIDU0Ni4yQTExMiAxMTIgMCAwMTM5NiA1MTJ6IiAvPjxwYXRoIGQ9Ik01MDggNjI0Yy0zLjQ2IDAtNi44Ny0uMTYtMTAuMjUtLjQ3bC01Mi44MiA1Mi44MmExNzYuMDkgMTc2LjA5IDAgMDAyMjcuNDItMjI3LjQybC01Mi44MiA1Mi44MmMuMzEgMy4zOC40NyA2Ljc5LjQ3IDEwLjI1YTExMS45NCAxMTEuOTQgMCAwMS0xMTIgMTEyeiIgLz48L3N2Zz4=) */
  58272. var EyeInvisibleOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined);
  58273. if (true) {
  58274. EyeInvisibleOutlined_RefIcon.displayName = 'EyeInvisibleOutlined';
  58275. }
  58276. /* harmony default export */ var icons_EyeInvisibleOutlined = (EyeInvisibleOutlined_RefIcon);
  58277. ;// ./components/input/Password.tsx
  58278. var Password_rest = undefined && undefined.__rest || function (s, e) {
  58279. var t = {};
  58280. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  58281. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  58282. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  58283. }
  58284. return t;
  58285. };
  58286. const defaultIconRender = visible => visible ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeInvisibleOutlined, null);
  58287. const actionMap = {
  58288. click: 'onClick',
  58289. hover: 'onMouseOver'
  58290. };
  58291. const Password = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  58292. const {
  58293. disabled: customDisabled,
  58294. action = 'click',
  58295. visibilityToggle = true,
  58296. iconRender = defaultIconRender,
  58297. suffix
  58298. } = props;
  58299. // ===================== Disabled =====================
  58300. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  58301. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  58302. const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
  58303. const [visible, setVisible] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
  58304. const inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  58305. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  58306. if (visibilityControlled) {
  58307. setVisible(visibilityToggle.visible);
  58308. }
  58309. }, [visibilityControlled, visibilityToggle]);
  58310. // Remove Password value
  58311. const removePasswordTimeout = useRemovePasswordTimeout(inputRef);
  58312. const onVisibleChange = () => {
  58313. var _a;
  58314. if (mergedDisabled) {
  58315. return;
  58316. }
  58317. if (visible) {
  58318. removePasswordTimeout();
  58319. }
  58320. const nextVisible = !visible;
  58321. setVisible(nextVisible);
  58322. if (typeof visibilityToggle === 'object') {
  58323. (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, nextVisible);
  58324. }
  58325. };
  58326. const getIcon = prefixCls => {
  58327. const iconTrigger = actionMap[action] || '';
  58328. const icon = iconRender(visible);
  58329. const iconProps = {
  58330. [iconTrigger]: onVisibleChange,
  58331. className: `${prefixCls}-icon`,
  58332. key: 'passwordIcon',
  58333. onMouseDown: e => {
  58334. // Prevent focused state lost
  58335. // https://github.com/ant-design/ant-design/issues/15173
  58336. e.preventDefault();
  58337. },
  58338. onMouseUp: e => {
  58339. // Prevent caret position change
  58340. // https://github.com/ant-design/ant-design/issues/23524
  58341. e.preventDefault();
  58342. }
  58343. };
  58344. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? icon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, icon), iconProps);
  58345. };
  58346. const {
  58347. className,
  58348. prefixCls: customizePrefixCls,
  58349. inputPrefixCls: customizeInputPrefixCls,
  58350. size
  58351. } = props,
  58352. restProps = Password_rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
  58353. const {
  58354. getPrefixCls
  58355. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  58356. const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
  58357. const prefixCls = getPrefixCls('input-password', customizePrefixCls);
  58358. const suffixIcon = visibilityToggle && getIcon(prefixCls);
  58359. const inputClassName = classnames_default()(prefixCls, className, {
  58360. [`${prefixCls}-${size}`]: !!size
  58361. });
  58362. const omittedProps = Object.assign(Object.assign({}, (0,omit["default"])(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
  58363. type: visible ? 'text' : 'password',
  58364. className: inputClassName,
  58365. prefixCls: inputPrefixCls,
  58366. suffix: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, suffixIcon, suffix))
  58367. });
  58368. if (size) {
  58369. omittedProps.size = size;
  58370. }
  58371. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, Object.assign({
  58372. ref: (0,es_ref.composeRef)(ref, inputRef)
  58373. }, omittedProps));
  58374. });
  58375. if (true) {
  58376. Password.displayName = 'Input.Password';
  58377. }
  58378. /* harmony default export */ var input_Password = (Password);
  58379. ;// ./components/input/Search.tsx
  58380. var Search_rest = undefined && undefined.__rest || function (s, e) {
  58381. var t = {};
  58382. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  58383. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  58384. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  58385. }
  58386. return t;
  58387. };
  58388. const Search = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  58389. const {
  58390. prefixCls: customizePrefixCls,
  58391. inputPrefixCls: customizeInputPrefixCls,
  58392. className,
  58393. size: customizeSize,
  58394. suffix,
  58395. enterButton = false,
  58396. addonAfter,
  58397. loading,
  58398. disabled,
  58399. onSearch: customOnSearch,
  58400. onChange: customOnChange,
  58401. onCompositionStart,
  58402. onCompositionEnd,
  58403. variant,
  58404. onPressEnter: customOnPressEnter
  58405. } = props,
  58406. restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd", "variant", "onPressEnter"]);
  58407. const {
  58408. getPrefixCls,
  58409. direction
  58410. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  58411. const composedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  58412. const prefixCls = getPrefixCls('input-search', customizePrefixCls);
  58413. const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
  58414. const {
  58415. compactSize
  58416. } = useCompactItemContext(prefixCls, direction);
  58417. const size = (0,useSize["default"])(ctx => {
  58418. var _a;
  58419. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  58420. });
  58421. const inputRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  58422. const onChange = e => {
  58423. if ((e === null || e === void 0 ? void 0 : e.target) && e.type === 'click' && customOnSearch) {
  58424. customOnSearch(e.target.value, e, {
  58425. source: 'clear'
  58426. });
  58427. }
  58428. customOnChange === null || customOnChange === void 0 ? void 0 : customOnChange(e);
  58429. };
  58430. const onMouseDown = e => {
  58431. var _a;
  58432. if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
  58433. e.preventDefault();
  58434. }
  58435. };
  58436. const onSearch = e => {
  58437. var _a, _b;
  58438. if (customOnSearch) {
  58439. customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {
  58440. source: 'input'
  58441. });
  58442. }
  58443. };
  58444. const onPressEnter = e => {
  58445. if (composedRef.current || loading) {
  58446. return;
  58447. }
  58448. customOnPressEnter === null || customOnPressEnter === void 0 ? void 0 : customOnPressEnter(e);
  58449. onSearch(e);
  58450. };
  58451. const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, null) : null;
  58452. const btnClassName = `${prefixCls}-button`;
  58453. let button;
  58454. const enterButtonAsElement = enterButton || {};
  58455. const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
  58456. if (isAntdButton || enterButtonAsElement.type === 'button') {
  58457. button = (0,reactNode.cloneElement)(enterButtonAsElement, Object.assign({
  58458. onMouseDown,
  58459. onClick: e => {
  58460. var _a, _b;
  58461. (_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
  58462. onSearch(e);
  58463. },
  58464. key: 'enterButton'
  58465. }, isAntdButton ? {
  58466. className: btnClassName,
  58467. size
  58468. } : {}));
  58469. } else {
  58470. button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  58471. className: btnClassName,
  58472. color: enterButton ? 'primary' : 'default',
  58473. size: size,
  58474. disabled: disabled,
  58475. key: "enterButton",
  58476. onMouseDown: onMouseDown,
  58477. onClick: onSearch,
  58478. loading: loading,
  58479. icon: searchIcon,
  58480. variant: variant === 'borderless' || variant === 'filled' || variant === 'underlined' ? 'text' : enterButton ? 'solid' : undefined
  58481. }, enterButton);
  58482. }
  58483. if (addonAfter) {
  58484. button = [button, (0,reactNode.cloneElement)(addonAfter, {
  58485. key: 'addonAfter'
  58486. })];
  58487. }
  58488. const cls = classnames_default()(prefixCls, {
  58489. [`${prefixCls}-rtl`]: direction === 'rtl',
  58490. [`${prefixCls}-${size}`]: !!size,
  58491. [`${prefixCls}-with-button`]: !!enterButton
  58492. }, className);
  58493. const handleOnCompositionStart = e => {
  58494. composedRef.current = true;
  58495. onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
  58496. };
  58497. const handleOnCompositionEnd = e => {
  58498. composedRef.current = false;
  58499. onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
  58500. };
  58501. const inputProps = Object.assign(Object.assign({}, restProps), {
  58502. className: cls,
  58503. prefixCls: inputPrefixCls,
  58504. type: 'search',
  58505. size,
  58506. variant,
  58507. onPressEnter,
  58508. onCompositionStart: handleOnCompositionStart,
  58509. onCompositionEnd: handleOnCompositionEnd,
  58510. addonAfter: button,
  58511. suffix,
  58512. onChange,
  58513. disabled
  58514. });
  58515. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, Object.assign({
  58516. ref: (0,es_ref.composeRef)(inputRef, ref)
  58517. }, inputProps));
  58518. });
  58519. if (true) {
  58520. Search.displayName = 'Search';
  58521. }
  58522. /* harmony default export */ var input_Search = (Search);
  58523. ;// ./node_modules/rc-textarea/es/calculateNodeHeight.js
  58524. // Thanks to https://github.com/andreypopp/react-textarea-autosize/
  58525. /**
  58526. * calculateNodeHeight(uiTextNode, useCache = false)
  58527. */
  58528. var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n";
  58529. var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', 'word-break', 'white-space'];
  58530. var computedStyleCache = {};
  58531. var hiddenTextarea;
  58532. function calculateNodeStyling(node) {
  58533. var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  58534. var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
  58535. if (useCache && computedStyleCache[nodeRef]) {
  58536. return computedStyleCache[nodeRef];
  58537. }
  58538. var style = window.getComputedStyle(node);
  58539. var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
  58540. var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
  58541. var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
  58542. var sizingStyle = SIZING_STYLE.map(function (name) {
  58543. return "".concat(name, ":").concat(style.getPropertyValue(name));
  58544. }).join(';');
  58545. var nodeInfo = {
  58546. sizingStyle: sizingStyle,
  58547. paddingSize: paddingSize,
  58548. borderSize: borderSize,
  58549. boxSizing: boxSizing
  58550. };
  58551. if (useCache && nodeRef) {
  58552. computedStyleCache[nodeRef] = nodeInfo;
  58553. }
  58554. return nodeInfo;
  58555. }
  58556. function calculateAutoSizeStyle(uiTextNode) {
  58557. var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  58558. var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  58559. var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  58560. if (!hiddenTextarea) {
  58561. hiddenTextarea = document.createElement('textarea');
  58562. hiddenTextarea.setAttribute('tab-index', '-1');
  58563. hiddenTextarea.setAttribute('aria-hidden', 'true');
  58564. // fix: A form field element should have an id or name attribute
  58565. // A form field element has neither an id nor a name attribute. This might prevent the browser from correctly autofilling the form.
  58566. // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
  58567. hiddenTextarea.setAttribute('name', 'hiddenTextarea');
  58568. document.body.appendChild(hiddenTextarea);
  58569. }
  58570. // Fix wrap="off" issue
  58571. // https://github.com/ant-design/ant-design/issues/6577
  58572. if (uiTextNode.getAttribute('wrap')) {
  58573. hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
  58574. } else {
  58575. hiddenTextarea.removeAttribute('wrap');
  58576. }
  58577. // Copy all CSS properties that have an impact on the height of the content in
  58578. // the textbox
  58579. var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
  58580. paddingSize = _calculateNodeStyling.paddingSize,
  58581. borderSize = _calculateNodeStyling.borderSize,
  58582. boxSizing = _calculateNodeStyling.boxSizing,
  58583. sizingStyle = _calculateNodeStyling.sizingStyle;
  58584. // Need to have the overflow attribute to hide the scrollbar otherwise
  58585. // text-lines will not calculated properly as the shadow will technically be
  58586. // narrower for content
  58587. hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
  58588. hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
  58589. var minHeight = undefined;
  58590. var maxHeight = undefined;
  58591. var overflowY;
  58592. var height = hiddenTextarea.scrollHeight;
  58593. if (boxSizing === 'border-box') {
  58594. // border-box: add border, since height = content + padding + border
  58595. height += borderSize;
  58596. } else if (boxSizing === 'content-box') {
  58597. // remove padding, since height = content
  58598. height -= paddingSize;
  58599. }
  58600. if (minRows !== null || maxRows !== null) {
  58601. // measure height of a textarea with a single row
  58602. hiddenTextarea.value = ' ';
  58603. var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  58604. if (minRows !== null) {
  58605. minHeight = singleRowHeight * minRows;
  58606. if (boxSizing === 'border-box') {
  58607. minHeight = minHeight + paddingSize + borderSize;
  58608. }
  58609. height = Math.max(minHeight, height);
  58610. }
  58611. if (maxRows !== null) {
  58612. maxHeight = singleRowHeight * maxRows;
  58613. if (boxSizing === 'border-box') {
  58614. maxHeight = maxHeight + paddingSize + borderSize;
  58615. }
  58616. overflowY = height > maxHeight ? '' : 'hidden';
  58617. height = Math.min(maxHeight, height);
  58618. }
  58619. }
  58620. var style = {
  58621. height: height,
  58622. overflowY: overflowY,
  58623. resize: 'none'
  58624. };
  58625. if (minHeight) {
  58626. style.minHeight = minHeight;
  58627. }
  58628. if (maxHeight) {
  58629. style.maxHeight = maxHeight;
  58630. }
  58631. return style;
  58632. }
  58633. ;// ./node_modules/rc-textarea/es/ResizableTextArea.js
  58634. var ResizableTextArea_excluded = ["prefixCls", "defaultValue", "value", "autoSize", "onResize", "className", "style", "disabled", "onChange", "onInternalAutoSize"];
  58635. var RESIZE_START = 0;
  58636. var RESIZE_MEASURING = 1;
  58637. var RESIZE_STABLE = 2;
  58638. var ResizableTextArea = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  58639. var _ref = props,
  58640. prefixCls = _ref.prefixCls,
  58641. defaultValue = _ref.defaultValue,
  58642. value = _ref.value,
  58643. autoSize = _ref.autoSize,
  58644. onResize = _ref.onResize,
  58645. className = _ref.className,
  58646. style = _ref.style,
  58647. disabled = _ref.disabled,
  58648. onChange = _ref.onChange,
  58649. onInternalAutoSize = _ref.onInternalAutoSize,
  58650. restProps = (0,objectWithoutProperties["default"])(_ref, ResizableTextArea_excluded);
  58651. // =============================== Value ================================
  58652. var _useMergedState = (0,useMergedState["default"])(defaultValue, {
  58653. value: value,
  58654. postState: function postState(val) {
  58655. return val !== null && val !== void 0 ? val : '';
  58656. }
  58657. }),
  58658. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  58659. mergedValue = _useMergedState2[0],
  58660. setMergedValue = _useMergedState2[1];
  58661. var onInternalChange = function onInternalChange(event) {
  58662. setMergedValue(event.target.value);
  58663. onChange === null || onChange === void 0 || onChange(event);
  58664. };
  58665. // ================================ Ref =================================
  58666. var textareaRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  58667. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  58668. return {
  58669. textArea: textareaRef.current
  58670. };
  58671. });
  58672. // ============================== AutoSize ==============================
  58673. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  58674. if (autoSize && (0,esm_typeof["default"])(autoSize) === 'object') {
  58675. return [autoSize.minRows, autoSize.maxRows];
  58676. }
  58677. return [];
  58678. }, [autoSize]),
  58679. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
  58680. minRows = _React$useMemo2[0],
  58681. maxRows = _React$useMemo2[1];
  58682. var needAutoSize = !!autoSize;
  58683. // =============================== Resize ===============================
  58684. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(RESIZE_STABLE),
  58685. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  58686. resizeState = _React$useState2[0],
  58687. setResizeState = _React$useState2[1];
  58688. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
  58689. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  58690. autoSizeStyle = _React$useState4[0],
  58691. setAutoSizeStyle = _React$useState4[1];
  58692. var startResize = function startResize() {
  58693. setResizeState(RESIZE_START);
  58694. if (false) // removed by dead control flow
  58695. {}
  58696. };
  58697. // Change to trigger resize measure
  58698. (0,useLayoutEffect["default"])(function () {
  58699. if (needAutoSize) {
  58700. startResize();
  58701. }
  58702. }, [value, minRows, maxRows, needAutoSize]);
  58703. (0,useLayoutEffect["default"])(function () {
  58704. if (resizeState === RESIZE_START) {
  58705. setResizeState(RESIZE_MEASURING);
  58706. } else if (resizeState === RESIZE_MEASURING) {
  58707. var textareaStyles = calculateAutoSizeStyle(textareaRef.current, false, minRows, maxRows);
  58708. // Safari has bug that text will keep break line on text cut when it's prev is break line.
  58709. // ZombieJ: This not often happen. So we just skip it.
  58710. // const { selectionStart, selectionEnd, scrollTop } = textareaRef.current;
  58711. // const { value: tmpValue } = textareaRef.current;
  58712. // textareaRef.current.value = '';
  58713. // textareaRef.current.value = tmpValue;
  58714. // if (document.activeElement === textareaRef.current) {
  58715. // textareaRef.current.scrollTop = scrollTop;
  58716. // textareaRef.current.setSelectionRange(selectionStart, selectionEnd);
  58717. // }
  58718. setResizeState(RESIZE_STABLE);
  58719. setAutoSizeStyle(textareaStyles);
  58720. } else {
  58721. // https://github.com/react-component/textarea/pull/23
  58722. // Firefox has blink issue before but fixed in latest version.
  58723. }
  58724. }, [resizeState]);
  58725. // We lock resize trigger by raf to avoid Safari warning
  58726. var resizeRafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  58727. var cleanRaf = function cleanRaf() {
  58728. raf["default"].cancel(resizeRafRef.current);
  58729. };
  58730. var onInternalResize = function onInternalResize(size) {
  58731. if (resizeState === RESIZE_STABLE) {
  58732. onResize === null || onResize === void 0 || onResize(size);
  58733. if (autoSize) {
  58734. cleanRaf();
  58735. resizeRafRef.current = (0,raf["default"])(function () {
  58736. startResize();
  58737. });
  58738. }
  58739. }
  58740. };
  58741. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  58742. return cleanRaf;
  58743. }, []);
  58744. // =============================== Render ===============================
  58745. var mergedAutoSizeStyle = needAutoSize ? autoSizeStyle : null;
  58746. var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), mergedAutoSizeStyle);
  58747. if (resizeState === RESIZE_START || resizeState === RESIZE_MEASURING) {
  58748. mergedStyle.overflowY = 'hidden';
  58749. mergedStyle.overflowX = 'hidden';
  58750. }
  58751. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  58752. onResize: onInternalResize,
  58753. disabled: !(autoSize || onResize)
  58754. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("textarea", (0,esm_extends["default"])({}, restProps, {
  58755. ref: textareaRef,
  58756. style: mergedStyle,
  58757. className: classnames_default()(prefixCls, className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled)),
  58758. disabled: disabled,
  58759. value: mergedValue,
  58760. onChange: onInternalChange
  58761. })));
  58762. });
  58763. /* harmony default export */ var es_ResizableTextArea = (ResizableTextArea);
  58764. ;// ./node_modules/rc-textarea/es/TextArea.js
  58765. var TextArea_excluded = ["defaultValue", "value", "onFocus", "onBlur", "onChange", "allowClear", "maxLength", "onCompositionStart", "onCompositionEnd", "suffix", "prefixCls", "showCount", "count", "className", "style", "disabled", "hidden", "classNames", "styles", "onResize", "onClear", "onPressEnter", "readOnly", "autoSize", "onKeyDown"];
  58766. var TextArea = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
  58767. var _countConfig$max;
  58768. var defaultValue = _ref.defaultValue,
  58769. customValue = _ref.value,
  58770. onFocus = _ref.onFocus,
  58771. onBlur = _ref.onBlur,
  58772. onChange = _ref.onChange,
  58773. allowClear = _ref.allowClear,
  58774. maxLength = _ref.maxLength,
  58775. onCompositionStart = _ref.onCompositionStart,
  58776. onCompositionEnd = _ref.onCompositionEnd,
  58777. suffix = _ref.suffix,
  58778. _ref$prefixCls = _ref.prefixCls,
  58779. prefixCls = _ref$prefixCls === void 0 ? 'rc-textarea' : _ref$prefixCls,
  58780. showCount = _ref.showCount,
  58781. count = _ref.count,
  58782. className = _ref.className,
  58783. style = _ref.style,
  58784. disabled = _ref.disabled,
  58785. hidden = _ref.hidden,
  58786. classNames = _ref.classNames,
  58787. styles = _ref.styles,
  58788. onResize = _ref.onResize,
  58789. onClear = _ref.onClear,
  58790. onPressEnter = _ref.onPressEnter,
  58791. readOnly = _ref.readOnly,
  58792. autoSize = _ref.autoSize,
  58793. onKeyDown = _ref.onKeyDown,
  58794. rest = (0,objectWithoutProperties["default"])(_ref, TextArea_excluded);
  58795. var _useMergedState = (0,useMergedState["default"])(defaultValue, {
  58796. value: customValue,
  58797. defaultValue: defaultValue
  58798. }),
  58799. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  58800. value = _useMergedState2[0],
  58801. setValue = _useMergedState2[1];
  58802. var formatValue = value === undefined || value === null ? '' : String(value);
  58803. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
  58804. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  58805. focused = _React$useState2[0],
  58806. setFocused = _React$useState2[1];
  58807. var compositionRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(false);
  58808. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
  58809. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  58810. textareaResized = _React$useState4[0],
  58811. setTextareaResized = _React$useState4[1];
  58812. // =============================== Ref ================================
  58813. var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  58814. var resizableTextAreaRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  58815. var getTextArea = function getTextArea() {
  58816. var _resizableTextAreaRef;
  58817. return (_resizableTextAreaRef = resizableTextAreaRef.current) === null || _resizableTextAreaRef === void 0 ? void 0 : _resizableTextAreaRef.textArea;
  58818. };
  58819. var focus = function focus() {
  58820. getTextArea().focus();
  58821. };
  58822. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
  58823. var _holderRef$current;
  58824. return {
  58825. resizableTextArea: resizableTextAreaRef.current,
  58826. focus: focus,
  58827. blur: function blur() {
  58828. getTextArea().blur();
  58829. },
  58830. nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || getTextArea()
  58831. };
  58832. });
  58833. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  58834. setFocused(function (prev) {
  58835. return !disabled && prev;
  58836. });
  58837. }, [disabled]);
  58838. // =========================== Select Range ===========================
  58839. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
  58840. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  58841. selection = _React$useState6[0],
  58842. setSelection = _React$useState6[1];
  58843. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
  58844. if (selection) {
  58845. var _getTextArea;
  58846. (_getTextArea = getTextArea()).setSelectionRange.apply(_getTextArea, (0,toConsumableArray["default"])(selection));
  58847. }
  58848. }, [selection]);
  58849. // ============================== Count ===============================
  58850. var countConfig = useCount(count, showCount);
  58851. var mergedMax = (_countConfig$max = countConfig.max) !== null && _countConfig$max !== void 0 ? _countConfig$max : maxLength;
  58852. // Max length value
  58853. var hasMaxLength = Number(mergedMax) > 0;
  58854. var valueLength = countConfig.strategy(formatValue);
  58855. var isOutOfRange = !!mergedMax && valueLength > mergedMax;
  58856. // ============================== Change ==============================
  58857. var triggerChange = function triggerChange(e, currentValue) {
  58858. var cutValue = currentValue;
  58859. if (!compositionRef.current && countConfig.exceedFormatter && countConfig.max && countConfig.strategy(currentValue) > countConfig.max) {
  58860. cutValue = countConfig.exceedFormatter(currentValue, {
  58861. max: countConfig.max
  58862. });
  58863. if (currentValue !== cutValue) {
  58864. setSelection([getTextArea().selectionStart || 0, getTextArea().selectionEnd || 0]);
  58865. }
  58866. }
  58867. setValue(cutValue);
  58868. resolveOnChange(e.currentTarget, e, onChange, cutValue);
  58869. };
  58870. // =========================== Value Update ===========================
  58871. var onInternalCompositionStart = function onInternalCompositionStart(e) {
  58872. compositionRef.current = true;
  58873. onCompositionStart === null || onCompositionStart === void 0 || onCompositionStart(e);
  58874. };
  58875. var onInternalCompositionEnd = function onInternalCompositionEnd(e) {
  58876. compositionRef.current = false;
  58877. triggerChange(e, e.currentTarget.value);
  58878. onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
  58879. };
  58880. var onInternalChange = function onInternalChange(e) {
  58881. triggerChange(e, e.target.value);
  58882. };
  58883. var handleKeyDown = function handleKeyDown(e) {
  58884. if (e.key === 'Enter' && onPressEnter) {
  58885. onPressEnter(e);
  58886. }
  58887. onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
  58888. };
  58889. var handleFocus = function handleFocus(e) {
  58890. setFocused(true);
  58891. onFocus === null || onFocus === void 0 || onFocus(e);
  58892. };
  58893. var handleBlur = function handleBlur(e) {
  58894. setFocused(false);
  58895. onBlur === null || onBlur === void 0 || onBlur(e);
  58896. };
  58897. // ============================== Reset ===============================
  58898. var handleReset = function handleReset(e) {
  58899. setValue('');
  58900. focus();
  58901. resolveOnChange(getTextArea(), e, onChange);
  58902. };
  58903. var suffixNode = suffix;
  58904. var dataCount;
  58905. if (countConfig.show) {
  58906. if (countConfig.showFormatter) {
  58907. dataCount = countConfig.showFormatter({
  58908. value: formatValue,
  58909. count: valueLength,
  58910. maxLength: mergedMax
  58911. });
  58912. } else {
  58913. dataCount = "".concat(valueLength).concat(hasMaxLength ? " / ".concat(mergedMax) : '');
  58914. }
  58915. suffixNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, suffixNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  58916. className: classnames_default()("".concat(prefixCls, "-data-count"), classNames === null || classNames === void 0 ? void 0 : classNames.count),
  58917. style: styles === null || styles === void 0 ? void 0 : styles.count
  58918. }, dataCount));
  58919. }
  58920. var handleResize = function handleResize(size) {
  58921. var _getTextArea2;
  58922. onResize === null || onResize === void 0 || onResize(size);
  58923. if ((_getTextArea2 = getTextArea()) !== null && _getTextArea2 !== void 0 && _getTextArea2.style.height) {
  58924. setTextareaResized(true);
  58925. }
  58926. };
  58927. var isPureTextArea = !autoSize && !showCount && !allowClear;
  58928. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_BaseInput, {
  58929. ref: holderRef,
  58930. value: formatValue,
  58931. allowClear: allowClear,
  58932. handleReset: handleReset,
  58933. suffix: suffixNode,
  58934. prefixCls: prefixCls,
  58935. classNames: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, classNames), {}, {
  58936. affixWrapper: classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-show-count"), showCount), "".concat(prefixCls, "-textarea-allow-clear"), allowClear))
  58937. }),
  58938. disabled: disabled,
  58939. focused: focused,
  58940. className: classnames_default()(className, isOutOfRange && "".concat(prefixCls, "-out-of-range")),
  58941. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), textareaResized && !isPureTextArea ? {
  58942. height: 'auto'
  58943. } : {}),
  58944. dataAttrs: {
  58945. affixWrapper: {
  58946. 'data-count': typeof dataCount === 'string' ? dataCount : undefined
  58947. }
  58948. },
  58949. hidden: hidden,
  58950. readOnly: readOnly,
  58951. onClear: onClear
  58952. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_ResizableTextArea, (0,esm_extends["default"])({}, rest, {
  58953. autoSize: autoSize,
  58954. maxLength: maxLength,
  58955. onKeyDown: handleKeyDown,
  58956. onChange: onInternalChange,
  58957. onFocus: handleFocus,
  58958. onBlur: handleBlur,
  58959. onCompositionStart: onInternalCompositionStart,
  58960. onCompositionEnd: onInternalCompositionEnd,
  58961. className: classnames_default()(classNames === null || classNames === void 0 ? void 0 : classNames.textarea),
  58962. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, styles === null || styles === void 0 ? void 0 : styles.textarea), {}, {
  58963. resize: style === null || style === void 0 ? void 0 : style.resize
  58964. }),
  58965. disabled: disabled,
  58966. prefixCls: prefixCls,
  58967. onResize: handleResize,
  58968. ref: resizableTextAreaRef,
  58969. readOnly: readOnly
  58970. })));
  58971. });
  58972. /* harmony default export */ var es_TextArea = (TextArea);
  58973. ;// ./node_modules/rc-textarea/es/index.js
  58974. /* harmony default export */ var rc_textarea_es = (es_TextArea);
  58975. ;// ./components/input/style/textarea.ts
  58976. const genTextAreaStyle = token => {
  58977. const {
  58978. componentCls,
  58979. paddingLG
  58980. } = token;
  58981. const textareaPrefixCls = `${componentCls}-textarea`;
  58982. return {
  58983. // Raw Textarea
  58984. [`textarea${componentCls}`]: {
  58985. maxWidth: '100%',
  58986. // prevent textarea resize from coming out of its container
  58987. height: 'auto',
  58988. minHeight: token.controlHeight,
  58989. lineHeight: token.lineHeight,
  58990. verticalAlign: 'bottom',
  58991. transition: `all ${token.motionDurationSlow}`,
  58992. resize: 'vertical',
  58993. [`&${componentCls}-mouse-active`]: {
  58994. transition: `all ${token.motionDurationSlow}, height 0s, width 0s`
  58995. }
  58996. },
  58997. // Wrapper for resize
  58998. [`${componentCls}-textarea-affix-wrapper-resize-dirty`]: {
  58999. width: 'auto'
  59000. },
  59001. [textareaPrefixCls]: {
  59002. position: 'relative',
  59003. '&-show-count': {
  59004. [`${componentCls}-data-count`]: {
  59005. position: 'absolute',
  59006. bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),
  59007. insetInlineEnd: 0,
  59008. color: token.colorTextDescription,
  59009. whiteSpace: 'nowrap',
  59010. pointerEvents: 'none'
  59011. }
  59012. },
  59013. [`
  59014. &-allow-clear > ${componentCls},
  59015. &-affix-wrapper${textareaPrefixCls}-has-feedback ${componentCls}
  59016. `]: {
  59017. paddingInlineEnd: paddingLG
  59018. },
  59019. [`&-affix-wrapper${componentCls}-affix-wrapper`]: {
  59020. padding: 0,
  59021. [`> textarea${componentCls}`]: {
  59022. fontSize: 'inherit',
  59023. border: 'none',
  59024. outline: 'none',
  59025. background: 'transparent',
  59026. minHeight: token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal(),
  59027. '&:focus': {
  59028. boxShadow: 'none !important'
  59029. }
  59030. },
  59031. [`${componentCls}-suffix`]: {
  59032. margin: 0,
  59033. '> *:not(:last-child)': {
  59034. marginInline: 0
  59035. },
  59036. // Clear Icon
  59037. [`${componentCls}-clear-icon`]: {
  59038. position: 'absolute',
  59039. insetInlineEnd: token.paddingInline,
  59040. insetBlockStart: token.paddingXS
  59041. },
  59042. // Feedback Icon
  59043. [`${textareaPrefixCls}-suffix`]: {
  59044. position: 'absolute',
  59045. top: 0,
  59046. insetInlineEnd: token.paddingInline,
  59047. bottom: 0,
  59048. zIndex: 1,
  59049. display: 'inline-flex',
  59050. alignItems: 'center',
  59051. margin: 'auto',
  59052. pointerEvents: 'none'
  59053. }
  59054. }
  59055. },
  59056. [`&-affix-wrapper${componentCls}-affix-wrapper-rtl`]: {
  59057. [`${componentCls}-suffix`]: {
  59058. [`${componentCls}-data-count`]: {
  59059. direction: 'ltr',
  59060. insetInlineStart: 0
  59061. }
  59062. }
  59063. },
  59064. [`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {
  59065. [`${componentCls}-suffix`]: {
  59066. [`${componentCls}-clear-icon`]: {
  59067. insetInlineEnd: token.paddingInlineSM
  59068. }
  59069. }
  59070. }
  59071. }
  59072. };
  59073. };
  59074. // ============================== Export ==============================
  59075. /* harmony default export */ var style_textarea = ((0,genStyleUtils.genStyleHooks)(['Input', 'TextArea'], token => {
  59076. const inputToken = (0,cssinjs_utils_es.mergeToken)(token, (0,input_style_token.initInputToken)(token));
  59077. return genTextAreaStyle(inputToken);
  59078. }, input_style_token.initComponentToken, {
  59079. resetFont: false
  59080. }));
  59081. ;// ./components/input/TextArea.tsx
  59082. var TextArea_rest = undefined && undefined.__rest || function (s, e) {
  59083. var t = {};
  59084. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  59085. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  59086. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  59087. }
  59088. return t;
  59089. };
  59090. const TextArea_TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  59091. var _a;
  59092. const {
  59093. prefixCls: customizePrefixCls,
  59094. bordered = true,
  59095. size: customizeSize,
  59096. disabled: customDisabled,
  59097. status: customStatus,
  59098. allowClear,
  59099. classNames: classes,
  59100. rootClassName,
  59101. className,
  59102. style,
  59103. styles,
  59104. variant: customVariant,
  59105. showCount,
  59106. onMouseDown,
  59107. onResize
  59108. } = props,
  59109. rest = TextArea_rest(props, ["prefixCls", "bordered", "size", "disabled", "status", "allowClear", "classNames", "rootClassName", "className", "style", "styles", "variant", "showCount", "onMouseDown", "onResize"]);
  59110. if (true) {
  59111. const {
  59112. deprecated
  59113. } = (0,_util_warning.devUseWarning)('TextArea');
  59114. deprecated(!('bordered' in props), 'bordered', 'variant');
  59115. }
  59116. const {
  59117. getPrefixCls,
  59118. direction,
  59119. allowClear: contextAllowClear,
  59120. autoComplete: contextAutoComplete,
  59121. className: contextClassName,
  59122. style: contextStyle,
  59123. classNames: contextClassNames,
  59124. styles: contextStyles
  59125. } = (0,config_provider_context.useComponentConfig)('textArea');
  59126. // =================== Disabled ===================
  59127. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  59128. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  59129. // ==================== Status ====================
  59130. const {
  59131. status: contextStatus,
  59132. hasFeedback,
  59133. feedbackIcon
  59134. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  59135. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  59136. // ===================== Ref ======================
  59137. const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  59138. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => {
  59139. var _a;
  59140. return {
  59141. resizableTextArea: (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea,
  59142. focus: option => {
  59143. var _a, _b;
  59144. triggerFocus((_b = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) === null || _b === void 0 ? void 0 : _b.textArea, option);
  59145. },
  59146. blur: () => {
  59147. var _a;
  59148. return (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.blur();
  59149. }
  59150. };
  59151. });
  59152. const prefixCls = getPrefixCls('input', customizePrefixCls);
  59153. // ==================== Style =====================
  59154. const rootCls = hooks_useCSSVarCls(prefixCls);
  59155. const [wrapSharedCSSVar, hashId, cssVarCls] = (0,input_style.useSharedStyle)(prefixCls, rootClassName);
  59156. const [wrapCSSVar] = style_textarea(prefixCls, rootCls);
  59157. // ================= Compact Item =================
  59158. const {
  59159. compactSize,
  59160. compactItemClassnames
  59161. } = useCompactItemContext(prefixCls, direction);
  59162. // ===================== Size =====================
  59163. const mergedSize = (0,useSize["default"])(ctx => {
  59164. var _a;
  59165. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  59166. });
  59167. const [variant, enableVariantCls] = useVariants('textArea', customVariant, bordered);
  59168. const mergedAllowClear = _util_getAllowClear(allowClear !== null && allowClear !== void 0 ? allowClear : contextAllowClear);
  59169. // ==================== Resize ====================
  59170. // https://github.com/ant-design/ant-design/issues/51594
  59171. const [isMouseDown, setIsMouseDown] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  59172. // When has wrapper, resize will make as dirty for `resize: both` style
  59173. const [resizeDirty, setResizeDirty] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  59174. const onInternalMouseDown = e => {
  59175. setIsMouseDown(true);
  59176. onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e);
  59177. const onMouseUp = () => {
  59178. setIsMouseDown(false);
  59179. document.removeEventListener('mouseup', onMouseUp);
  59180. };
  59181. document.addEventListener('mouseup', onMouseUp);
  59182. };
  59183. const onInternalResize = size => {
  59184. var _a, _b;
  59185. onResize === null || onResize === void 0 ? void 0 : onResize(size);
  59186. // Change to dirty since this maybe from the `resize: both` style
  59187. if (isMouseDown && typeof getComputedStyle === 'function') {
  59188. const ele = (_b = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.querySelector('textarea');
  59189. if (ele && getComputedStyle(ele).resize === 'both') {
  59190. setResizeDirty(true);
  59191. }
  59192. }
  59193. };
  59194. // ==================== Render ====================
  59195. return wrapSharedCSSVar(wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_textarea_es, Object.assign({
  59196. autoComplete: contextAutoComplete
  59197. }, rest, {
  59198. style: Object.assign(Object.assign({}, contextStyle), style),
  59199. styles: Object.assign(Object.assign({}, contextStyles), styles),
  59200. disabled: mergedDisabled,
  59201. allowClear: mergedAllowClear,
  59202. className: classnames_default()(cssVarCls, rootCls, className, rootClassName, compactItemClassnames, contextClassName,
  59203. // Only for wrapper
  59204. resizeDirty && `${prefixCls}-textarea-affix-wrapper-resize-dirty`),
  59205. classNames: Object.assign(Object.assign(Object.assign({}, classes), contextClassNames), {
  59206. textarea: classnames_default()({
  59207. [`${prefixCls}-sm`]: mergedSize === 'small',
  59208. [`${prefixCls}-lg`]: mergedSize === 'large'
  59209. }, hashId, classes === null || classes === void 0 ? void 0 : classes.textarea, contextClassNames.textarea, isMouseDown && `${prefixCls}-mouse-active`),
  59210. variant: classnames_default()({
  59211. [`${prefixCls}-${variant}`]: enableVariantCls
  59212. }, getStatusClassNames(prefixCls, mergedStatus)),
  59213. affixWrapper: classnames_default()(`${prefixCls}-textarea-affix-wrapper`, {
  59214. [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
  59215. [`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',
  59216. [`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',
  59217. [`${prefixCls}-textarea-show-count`]: showCount || ((_a = props.count) === null || _a === void 0 ? void 0 : _a.show)
  59218. }, hashId)
  59219. }),
  59220. prefixCls: prefixCls,
  59221. suffix: hasFeedback && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  59222. className: `${prefixCls}-textarea-suffix`
  59223. }, feedbackIcon),
  59224. showCount: showCount,
  59225. ref: innerRef,
  59226. onResize: onInternalResize,
  59227. onMouseDown: onInternalMouseDown
  59228. }))));
  59229. });
  59230. /* harmony default export */ var input_TextArea = (TextArea_TextArea);
  59231. ;// ./components/input/index.tsx
  59232. const components_input_Input = input_Input;
  59233. components_input_Input.Group = input_Group;
  59234. components_input_Input.Search = input_Search;
  59235. components_input_Input.TextArea = input_TextArea;
  59236. components_input_Input.Password = input_Password;
  59237. components_input_Input.OTP = input_OTP;
  59238. /* harmony default export */ var input = (components_input_Input);
  59239. ;// ./components/layout/hooks/useHasSider.ts
  59240. function useHasSider(siders, children, hasSider) {
  59241. if (typeof hasSider === 'boolean') {
  59242. return hasSider;
  59243. }
  59244. if (siders.length) {
  59245. return true;
  59246. }
  59247. const childNodes = (0,toArray["default"])(children);
  59248. return childNodes.some(node => node.type === layout_Sider);
  59249. }
  59250. ;// ./components/layout/layout.tsx
  59251. var layout_rest = undefined && undefined.__rest || function (s, e) {
  59252. var t = {};
  59253. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  59254. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  59255. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  59256. }
  59257. return t;
  59258. };
  59259. function generator({
  59260. suffixCls,
  59261. tagName,
  59262. displayName
  59263. }) {
  59264. return BasicComponent => {
  59265. const Adapter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(BasicComponent, Object.assign({
  59266. ref: ref,
  59267. suffixCls: suffixCls,
  59268. tagName: tagName
  59269. }, props))));
  59270. if (true) {
  59271. Adapter.displayName = displayName;
  59272. }
  59273. return Adapter;
  59274. };
  59275. }
  59276. const Basic = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  59277. const {
  59278. prefixCls: customizePrefixCls,
  59279. suffixCls,
  59280. className,
  59281. tagName: TagName
  59282. } = props,
  59283. others = layout_rest(props, ["prefixCls", "suffixCls", "className", "tagName"]);
  59284. const {
  59285. getPrefixCls
  59286. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  59287. const prefixCls = getPrefixCls('layout', customizePrefixCls);
  59288. const [wrapSSR, hashId, cssVarCls] = (0,layout_style["default"])(prefixCls);
  59289. const prefixWithSuffixCls = suffixCls ? `${prefixCls}-${suffixCls}` : prefixCls;
  59290. return wrapSSR(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TagName, Object.assign({
  59291. className: classnames_default()(customizePrefixCls || prefixWithSuffixCls, className, hashId, cssVarCls),
  59292. ref: ref
  59293. }, others)));
  59294. });
  59295. const BasicLayout = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  59296. const {
  59297. direction
  59298. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  59299. const [siders, setSiders] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  59300. const {
  59301. prefixCls: customizePrefixCls,
  59302. className,
  59303. rootClassName,
  59304. children,
  59305. hasSider,
  59306. tagName: Tag,
  59307. style
  59308. } = props,
  59309. others = layout_rest(props, ["prefixCls", "className", "rootClassName", "children", "hasSider", "tagName", "style"]);
  59310. const passedProps = (0,omit["default"])(others, ['suffixCls']);
  59311. const {
  59312. getPrefixCls,
  59313. className: contextClassName,
  59314. style: contextStyle
  59315. } = (0,config_provider_context.useComponentConfig)('layout');
  59316. const prefixCls = getPrefixCls('layout', customizePrefixCls);
  59317. const mergedHasSider = useHasSider(siders, children, hasSider);
  59318. const [wrapCSSVar, hashId, cssVarCls] = (0,layout_style["default"])(prefixCls);
  59319. const classString = classnames_default()(prefixCls, {
  59320. [`${prefixCls}-has-sider`]: mergedHasSider,
  59321. [`${prefixCls}-rtl`]: direction === 'rtl'
  59322. }, contextClassName, className, rootClassName, hashId, cssVarCls);
  59323. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  59324. siderHook: {
  59325. addSider: id => {
  59326. setSiders(prev => [].concat((0,toConsumableArray["default"])(prev), [id]));
  59327. },
  59328. removeSider: id => {
  59329. setSiders(prev => prev.filter(currentId => currentId !== id));
  59330. }
  59331. }
  59332. }), []);
  59333. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(LayoutContext.Provider, {
  59334. value: contextValue
  59335. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Tag, Object.assign({
  59336. ref: ref,
  59337. className: classString,
  59338. style: Object.assign(Object.assign({}, contextStyle), style)
  59339. }, passedProps), children)));
  59340. });
  59341. const Layout = generator({
  59342. tagName: 'div',
  59343. displayName: 'Layout'
  59344. })(BasicLayout);
  59345. const layout_Header = generator({
  59346. suffixCls: 'header',
  59347. tagName: 'header',
  59348. displayName: 'Header'
  59349. })(Basic);
  59350. const layout_Footer = generator({
  59351. suffixCls: 'footer',
  59352. tagName: 'footer',
  59353. displayName: 'Footer'
  59354. })(Basic);
  59355. const layout_Content = generator({
  59356. suffixCls: 'content',
  59357. tagName: 'main',
  59358. displayName: 'Content'
  59359. })(Basic);
  59360. /* harmony default export */ var layout = (Layout);
  59361. ;// ./components/layout/index.tsx
  59362. const layout_Layout = layout;
  59363. layout_Layout.Header = layout_Header;
  59364. layout_Layout.Footer = layout_Footer;
  59365. layout_Layout.Content = layout_Content;
  59366. layout_Layout.Sider = layout_Sider;
  59367. layout_Layout._InternalSiderContext = SiderContext;
  59368. /* harmony default export */ var components_layout = (layout_Layout);
  59369. ;// ./node_modules/@ant-design/icons-svg/es/asn/DoubleLeftOutlined.js
  59370. // This icon file is generated automatically.
  59371. var DoubleLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, "name": "double-left", "theme": "outlined" };
  59372. /* harmony default export */ var asn_DoubleLeftOutlined = (DoubleLeftOutlined);
  59373. ;// ./node_modules/@ant-design/icons/es/icons/DoubleLeftOutlined.js
  59374. // GENERATE BY ./scripts/generate.ts
  59375. // DON NOT EDIT IT MANUALLY
  59376. var DoubleLeftOutlined_DoubleLeftOutlined = function DoubleLeftOutlined(props, ref) {
  59377. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  59378. ref: ref,
  59379. icon: asn_DoubleLeftOutlined
  59380. }));
  59381. };
  59382. /**![double-left](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI3Mi45IDUxMmwyNjUuNC0zMzkuMWM0LjEtNS4yLjQtMTIuOS02LjMtMTIuOWgtNzcuM2MtNC45IDAtOS42IDIuMy0xMi42IDYuMUwxODYuOCA0OTIuM2EzMS45OSAzMS45OSAwIDAwMCAzOS41bDI1NS4zIDMyNi4xYzMgMy45IDcuNyA2LjEgMTIuNiA2LjFINTMyYzYuNyAwIDEwLjQtNy43IDYuMy0xMi45TDI3Mi45IDUxMnptMzA0IDBsMjY1LjQtMzM5LjFjNC4xLTUuMi40LTEyLjktNi4zLTEyLjloLTc3LjNjLTQuOSAwLTkuNiAyLjMtMTIuNiA2LjFMNDkwLjggNDkyLjNhMzEuOTkgMzEuOTkgMCAwMDAgMzkuNWwyNTUuMyAzMjYuMWMzIDMuOSA3LjcgNi4xIDEyLjYgNi4xSDgzNmM2LjcgMCAxMC40LTcuNyA2LjMtMTIuOUw1NzYuOSA1MTJ6IiAvPjwvc3ZnPg==) */
  59383. var DoubleLeftOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DoubleLeftOutlined_DoubleLeftOutlined);
  59384. if (true) {
  59385. DoubleLeftOutlined_RefIcon.displayName = 'DoubleLeftOutlined';
  59386. }
  59387. /* harmony default export */ var icons_DoubleLeftOutlined = (DoubleLeftOutlined_RefIcon);
  59388. ;// ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js
  59389. // This icon file is generated automatically.
  59390. var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" };
  59391. /* harmony default export */ var asn_DoubleRightOutlined = (DoubleRightOutlined);
  59392. ;// ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js
  59393. // GENERATE BY ./scripts/generate.ts
  59394. // DON NOT EDIT IT MANUALLY
  59395. var DoubleRightOutlined_DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
  59396. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  59397. ref: ref,
  59398. icon: asn_DoubleRightOutlined
  59399. }));
  59400. };
  59401. /**![double-right](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUzMy4yIDQ5Mi4zTDI3Ny45IDE2Ni4xYy0zLTMuOS03LjctNi4xLTEyLjYtNi4xSDE4OGMtNi43IDAtMTAuNCA3LjctNi4zIDEyLjlMNDQ3LjEgNTEyIDE4MS43IDg1MS4xQTcuOTggNy45OCAwIDAwMTg4IDg2NGg3Ny4zYzQuOSAwIDkuNi0yLjMgMTIuNi02LjFsMjU1LjMtMzI2LjFjOS4xLTExLjcgOS4xLTI3LjkgMC0zOS41em0zMDQgMEw1ODEuOSAxNjYuMWMtMy0zLjktNy43LTYuMS0xMi42LTYuMUg0OTJjLTYuNyAwLTEwLjQgNy43LTYuMyAxMi45TDc1MS4xIDUxMiA0ODUuNyA4NTEuMUE3Ljk4IDcuOTggMCAwMDQ5MiA4NjRoNzcuM2M0LjkgMCA5LjYtMi4zIDEyLjYtNi4xbDI1NS4zLTMyNi4xYzkuMS0xMS43IDkuMS0yNy45IDAtMzkuNXoiIC8+PC9zdmc+) */
  59402. var DoubleRightOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DoubleRightOutlined_DoubleRightOutlined);
  59403. if (true) {
  59404. DoubleRightOutlined_RefIcon.displayName = 'DoubleRightOutlined';
  59405. }
  59406. /* harmony default export */ var icons_DoubleRightOutlined = (DoubleRightOutlined_RefIcon);
  59407. // EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
  59408. var zh_CN = __webpack_require__("./node_modules/rc-pagination/es/locale/zh_CN.js");
  59409. ;// ./node_modules/rc-pagination/es/Options.js
  59410. var defaultPageSizeOptions = [10, 20, 50, 100];
  59411. var Options = function Options(props) {
  59412. var _props$pageSizeOption = props.pageSizeOptions,
  59413. pageSizeOptions = _props$pageSizeOption === void 0 ? defaultPageSizeOptions : _props$pageSizeOption,
  59414. locale = props.locale,
  59415. changeSize = props.changeSize,
  59416. pageSize = props.pageSize,
  59417. goButton = props.goButton,
  59418. quickGo = props.quickGo,
  59419. rootPrefixCls = props.rootPrefixCls,
  59420. disabled = props.disabled,
  59421. buildOptionText = props.buildOptionText,
  59422. showSizeChanger = props.showSizeChanger,
  59423. sizeChangerRender = props.sizeChangerRender;
  59424. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(''),
  59425. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  59426. goInputText = _React$useState2[0],
  59427. setGoInputText = _React$useState2[1];
  59428. var getValidValue = function getValidValue() {
  59429. return !goInputText || Number.isNaN(goInputText) ? undefined : Number(goInputText);
  59430. };
  59431. var mergeBuildOptionText = typeof buildOptionText === 'function' ? buildOptionText : function (value) {
  59432. return "".concat(value, " ").concat(locale.items_per_page);
  59433. };
  59434. var handleChange = function handleChange(e) {
  59435. setGoInputText(e.target.value);
  59436. };
  59437. var handleBlur = function handleBlur(e) {
  59438. if (goButton || goInputText === '') {
  59439. return;
  59440. }
  59441. setGoInputText('');
  59442. if (e.relatedTarget && (e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-item-link")) >= 0 || e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-item")) >= 0)) {
  59443. return;
  59444. }
  59445. quickGo === null || quickGo === void 0 || quickGo(getValidValue());
  59446. };
  59447. var go = function go(e) {
  59448. if (goInputText === '') {
  59449. return;
  59450. }
  59451. if (e.keyCode === KeyCode["default"].ENTER || e.type === 'click') {
  59452. setGoInputText('');
  59453. quickGo === null || quickGo === void 0 || quickGo(getValidValue());
  59454. }
  59455. };
  59456. var getPageSizeOptions = function getPageSizeOptions() {
  59457. if (pageSizeOptions.some(function (option) {
  59458. return option.toString() === pageSize.toString();
  59459. })) {
  59460. return pageSizeOptions;
  59461. }
  59462. return pageSizeOptions.concat([pageSize]).sort(function (a, b) {
  59463. var numberA = Number.isNaN(Number(a)) ? 0 : Number(a);
  59464. var numberB = Number.isNaN(Number(b)) ? 0 : Number(b);
  59465. return numberA - numberB;
  59466. });
  59467. };
  59468. // ============== cls ==============
  59469. var prefixCls = "".concat(rootPrefixCls, "-options");
  59470. // ============== render ==============
  59471. if (!showSizeChanger && !quickGo) {
  59472. return null;
  59473. }
  59474. var changeSelect = null;
  59475. var goInput = null;
  59476. var gotoButton = null;
  59477. // >>>>> Size Changer
  59478. if (showSizeChanger && sizeChangerRender) {
  59479. changeSelect = sizeChangerRender({
  59480. disabled: disabled,
  59481. size: pageSize,
  59482. onSizeChange: function onSizeChange(nextValue) {
  59483. changeSize === null || changeSize === void 0 || changeSize(Number(nextValue));
  59484. },
  59485. 'aria-label': locale.page_size,
  59486. className: "".concat(prefixCls, "-size-changer"),
  59487. options: getPageSizeOptions().map(function (opt) {
  59488. return {
  59489. label: mergeBuildOptionText(opt),
  59490. value: opt
  59491. };
  59492. })
  59493. });
  59494. }
  59495. // >>>>> Quick Go
  59496. if (quickGo) {
  59497. if (goButton) {
  59498. gotoButton = typeof goButton === 'boolean' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
  59499. type: "button",
  59500. onClick: go,
  59501. onKeyUp: go,
  59502. disabled: disabled,
  59503. className: "".concat(prefixCls, "-quick-jumper-button")
  59504. }, locale.jump_to_confirm) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  59505. onClick: go,
  59506. onKeyUp: go
  59507. }, goButton);
  59508. }
  59509. goInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  59510. className: "".concat(prefixCls, "-quick-jumper")
  59511. }, locale.jump_to, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
  59512. disabled: disabled,
  59513. type: "text",
  59514. value: goInputText,
  59515. onChange: handleChange,
  59516. onKeyUp: go,
  59517. onBlur: handleBlur,
  59518. "aria-label": locale.page
  59519. }), locale.page, gotoButton);
  59520. }
  59521. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59522. className: prefixCls
  59523. }, changeSelect, goInput);
  59524. };
  59525. if (true) {
  59526. Options.displayName = 'Options';
  59527. }
  59528. /* harmony default export */ var es_Options = (Options);
  59529. ;// ./node_modules/rc-pagination/es/Pager.js
  59530. /* eslint react/prop-types: 0 */
  59531. var Pager = function Pager(props) {
  59532. var rootPrefixCls = props.rootPrefixCls,
  59533. page = props.page,
  59534. active = props.active,
  59535. className = props.className,
  59536. showTitle = props.showTitle,
  59537. onClick = props.onClick,
  59538. onKeyPress = props.onKeyPress,
  59539. itemRender = props.itemRender;
  59540. var prefixCls = "".concat(rootPrefixCls, "-item");
  59541. var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(page), (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-active"), active), "".concat(prefixCls, "-disabled"), !page), className);
  59542. var handleClick = function handleClick() {
  59543. onClick(page);
  59544. };
  59545. var handleKeyPress = function handleKeyPress(e) {
  59546. onKeyPress(e, onClick, page);
  59547. };
  59548. var pager = itemRender(page, 'page', /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
  59549. rel: "nofollow"
  59550. }, page));
  59551. return pager ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59552. title: showTitle ? String(page) : null,
  59553. className: cls,
  59554. onClick: handleClick,
  59555. onKeyDown: handleKeyPress,
  59556. tabIndex: 0
  59557. }, pager) : null;
  59558. };
  59559. if (true) {
  59560. Pager.displayName = 'Pager';
  59561. }
  59562. /* harmony default export */ var es_Pager = (Pager);
  59563. ;// ./node_modules/rc-pagination/es/Pagination.js
  59564. var defaultItemRender = function defaultItemRender(page, type, element) {
  59565. return element;
  59566. };
  59567. function Pagination_noop() {}
  59568. function isInteger(v) {
  59569. var value = Number(v);
  59570. return typeof value === 'number' && !Number.isNaN(value) && isFinite(value) && Math.floor(value) === value;
  59571. }
  59572. function calculatePage(p, pageSize, total) {
  59573. var _pageSize = typeof p === 'undefined' ? pageSize : p;
  59574. return Math.floor((total - 1) / _pageSize) + 1;
  59575. }
  59576. var Pagination = function Pagination(props) {
  59577. var _props$prefixCls = props.prefixCls,
  59578. prefixCls = _props$prefixCls === void 0 ? 'rc-pagination' : _props$prefixCls,
  59579. _props$selectPrefixCl = props.selectPrefixCls,
  59580. selectPrefixCls = _props$selectPrefixCl === void 0 ? 'rc-select' : _props$selectPrefixCl,
  59581. className = props.className,
  59582. currentProp = props.current,
  59583. _props$defaultCurrent = props.defaultCurrent,
  59584. defaultCurrent = _props$defaultCurrent === void 0 ? 1 : _props$defaultCurrent,
  59585. _props$total = props.total,
  59586. total = _props$total === void 0 ? 0 : _props$total,
  59587. pageSizeProp = props.pageSize,
  59588. _props$defaultPageSiz = props.defaultPageSize,
  59589. defaultPageSize = _props$defaultPageSiz === void 0 ? 10 : _props$defaultPageSiz,
  59590. _props$onChange = props.onChange,
  59591. onChange = _props$onChange === void 0 ? Pagination_noop : _props$onChange,
  59592. hideOnSinglePage = props.hideOnSinglePage,
  59593. align = props.align,
  59594. _props$showPrevNextJu = props.showPrevNextJumpers,
  59595. showPrevNextJumpers = _props$showPrevNextJu === void 0 ? true : _props$showPrevNextJu,
  59596. showQuickJumper = props.showQuickJumper,
  59597. showLessItems = props.showLessItems,
  59598. _props$showTitle = props.showTitle,
  59599. showTitle = _props$showTitle === void 0 ? true : _props$showTitle,
  59600. _props$onShowSizeChan = props.onShowSizeChange,
  59601. onShowSizeChange = _props$onShowSizeChan === void 0 ? Pagination_noop : _props$onShowSizeChan,
  59602. _props$locale = props.locale,
  59603. locale = _props$locale === void 0 ? zh_CN["default"] : _props$locale,
  59604. style = props.style,
  59605. _props$totalBoundaryS = props.totalBoundaryShowSizeChanger,
  59606. totalBoundaryShowSizeChanger = _props$totalBoundaryS === void 0 ? 50 : _props$totalBoundaryS,
  59607. disabled = props.disabled,
  59608. simple = props.simple,
  59609. showTotal = props.showTotal,
  59610. _props$showSizeChange = props.showSizeChanger,
  59611. showSizeChanger = _props$showSizeChange === void 0 ? total > totalBoundaryShowSizeChanger : _props$showSizeChange,
  59612. sizeChangerRender = props.sizeChangerRender,
  59613. pageSizeOptions = props.pageSizeOptions,
  59614. _props$itemRender = props.itemRender,
  59615. itemRender = _props$itemRender === void 0 ? defaultItemRender : _props$itemRender,
  59616. jumpPrevIcon = props.jumpPrevIcon,
  59617. jumpNextIcon = props.jumpNextIcon,
  59618. prevIcon = props.prevIcon,
  59619. nextIcon = props.nextIcon;
  59620. var paginationRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  59621. var _useMergedState = (0,useMergedState["default"])(10, {
  59622. value: pageSizeProp,
  59623. defaultValue: defaultPageSize
  59624. }),
  59625. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  59626. pageSize = _useMergedState2[0],
  59627. setPageSize = _useMergedState2[1];
  59628. var _useMergedState3 = (0,useMergedState["default"])(1, {
  59629. value: currentProp,
  59630. defaultValue: defaultCurrent,
  59631. postState: function postState(c) {
  59632. return Math.max(1, Math.min(c, calculatePage(undefined, pageSize, total)));
  59633. }
  59634. }),
  59635. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  59636. current = _useMergedState4[0],
  59637. setCurrent = _useMergedState4[1];
  59638. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(current),
  59639. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  59640. internalInputVal = _React$useState2[0],
  59641. setInternalInputVal = _React$useState2[1];
  59642. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  59643. setInternalInputVal(current);
  59644. }, [current]);
  59645. var hasOnChange = onChange !== Pagination_noop;
  59646. var hasCurrent = ('current' in props);
  59647. if (true) {
  59648. (0,warning["default"])(hasCurrent ? hasOnChange : true, 'You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.');
  59649. }
  59650. var jumpPrevPage = Math.max(1, current - (showLessItems ? 3 : 5));
  59651. var jumpNextPage = Math.min(calculatePage(undefined, pageSize, total), current + (showLessItems ? 3 : 5));
  59652. function getItemIcon(icon, label) {
  59653. var iconNode = icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
  59654. type: "button",
  59655. "aria-label": label,
  59656. className: "".concat(prefixCls, "-item-link")
  59657. });
  59658. if (typeof icon === 'function') {
  59659. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icon, (0,objectSpread2["default"])({}, props));
  59660. }
  59661. return iconNode;
  59662. }
  59663. function getValidValue(e) {
  59664. var inputValue = e.target.value;
  59665. var allPages = calculatePage(undefined, pageSize, total);
  59666. var value;
  59667. if (inputValue === '') {
  59668. value = inputValue;
  59669. } else if (Number.isNaN(Number(inputValue))) {
  59670. value = internalInputVal;
  59671. } else if (inputValue >= allPages) {
  59672. value = allPages;
  59673. } else {
  59674. value = Number(inputValue);
  59675. }
  59676. return value;
  59677. }
  59678. function isValid(page) {
  59679. return isInteger(page) && page !== current && isInteger(total) && total > 0;
  59680. }
  59681. var shouldDisplayQuickJumper = total > pageSize ? showQuickJumper : false;
  59682. /**
  59683. * prevent "up arrow" key reseting cursor position within textbox
  59684. * @see https://stackoverflow.com/a/1081114
  59685. */
  59686. function handleKeyDown(event) {
  59687. if (event.keyCode === KeyCode["default"].UP || event.keyCode === KeyCode["default"].DOWN) {
  59688. event.preventDefault();
  59689. }
  59690. }
  59691. function handleKeyUp(event) {
  59692. var value = getValidValue(event);
  59693. if (value !== internalInputVal) {
  59694. setInternalInputVal(value);
  59695. }
  59696. switch (event.keyCode) {
  59697. case KeyCode["default"].ENTER:
  59698. handleChange(value);
  59699. break;
  59700. case KeyCode["default"].UP:
  59701. handleChange(value - 1);
  59702. break;
  59703. case KeyCode["default"].DOWN:
  59704. handleChange(value + 1);
  59705. break;
  59706. default:
  59707. break;
  59708. }
  59709. }
  59710. function handleBlur(event) {
  59711. handleChange(getValidValue(event));
  59712. }
  59713. function changePageSize(size) {
  59714. var newCurrent = calculatePage(size, pageSize, total);
  59715. var nextCurrent = current > newCurrent && newCurrent !== 0 ? newCurrent : current;
  59716. setPageSize(size);
  59717. setInternalInputVal(nextCurrent);
  59718. onShowSizeChange === null || onShowSizeChange === void 0 || onShowSizeChange(current, size);
  59719. setCurrent(nextCurrent);
  59720. onChange === null || onChange === void 0 || onChange(nextCurrent, size);
  59721. }
  59722. function handleChange(page) {
  59723. if (isValid(page) && !disabled) {
  59724. var currentPage = calculatePage(undefined, pageSize, total);
  59725. var newPage = page;
  59726. if (page > currentPage) {
  59727. newPage = currentPage;
  59728. } else if (page < 1) {
  59729. newPage = 1;
  59730. }
  59731. if (newPage !== internalInputVal) {
  59732. setInternalInputVal(newPage);
  59733. }
  59734. setCurrent(newPage);
  59735. onChange === null || onChange === void 0 || onChange(newPage, pageSize);
  59736. return newPage;
  59737. }
  59738. return current;
  59739. }
  59740. var hasPrev = current > 1;
  59741. var hasNext = current < calculatePage(undefined, pageSize, total);
  59742. function prevHandle() {
  59743. if (hasPrev) handleChange(current - 1);
  59744. }
  59745. function nextHandle() {
  59746. if (hasNext) handleChange(current + 1);
  59747. }
  59748. function jumpPrevHandle() {
  59749. handleChange(jumpPrevPage);
  59750. }
  59751. function jumpNextHandle() {
  59752. handleChange(jumpNextPage);
  59753. }
  59754. function runIfEnter(event, callback) {
  59755. if (event.key === 'Enter' || event.charCode === KeyCode["default"].ENTER || event.keyCode === KeyCode["default"].ENTER) {
  59756. for (var _len = arguments.length, restParams = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  59757. restParams[_key - 2] = arguments[_key];
  59758. }
  59759. callback.apply(void 0, restParams);
  59760. }
  59761. }
  59762. function runIfEnterPrev(event) {
  59763. runIfEnter(event, prevHandle);
  59764. }
  59765. function runIfEnterNext(event) {
  59766. runIfEnter(event, nextHandle);
  59767. }
  59768. function runIfEnterJumpPrev(event) {
  59769. runIfEnter(event, jumpPrevHandle);
  59770. }
  59771. function runIfEnterJumpNext(event) {
  59772. runIfEnter(event, jumpNextHandle);
  59773. }
  59774. function renderPrev(prevPage) {
  59775. var prevButton = itemRender(prevPage, 'prev', getItemIcon(prevIcon, 'prev page'));
  59776. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(prevButton) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(prevButton, {
  59777. disabled: !hasPrev
  59778. }) : prevButton;
  59779. }
  59780. function renderNext(nextPage) {
  59781. var nextButton = itemRender(nextPage, 'next', getItemIcon(nextIcon, 'next page'));
  59782. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(nextButton) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(nextButton, {
  59783. disabled: !hasNext
  59784. }) : nextButton;
  59785. }
  59786. function handleGoTO(event) {
  59787. if (event.type === 'click' || event.keyCode === KeyCode["default"].ENTER) {
  59788. handleChange(internalInputVal);
  59789. }
  59790. }
  59791. var jumpPrev = null;
  59792. var dataOrAriaAttributeProps = (0,pickAttrs["default"])(props, {
  59793. aria: true,
  59794. data: true
  59795. });
  59796. var totalText = showTotal && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59797. className: "".concat(prefixCls, "-total-text")
  59798. }, showTotal(total, [total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > total ? total : current * pageSize]));
  59799. var jumpNext = null;
  59800. var allPages = calculatePage(undefined, pageSize, total);
  59801. // ================== Render ==================
  59802. // When hideOnSinglePage is true and there is only 1 page, hide the pager
  59803. if (hideOnSinglePage && total <= pageSize) {
  59804. return null;
  59805. }
  59806. var pagerList = [];
  59807. var pagerProps = {
  59808. rootPrefixCls: prefixCls,
  59809. onClick: handleChange,
  59810. onKeyPress: runIfEnter,
  59811. showTitle: showTitle,
  59812. itemRender: itemRender,
  59813. page: -1
  59814. };
  59815. var prevPage = current - 1 > 0 ? current - 1 : 0;
  59816. var nextPage = current + 1 < allPages ? current + 1 : allPages;
  59817. var goButton = showQuickJumper && showQuickJumper.goButton;
  59818. // ================== Simple ==================
  59819. // FIXME: ts type
  59820. var isReadOnly = (0,esm_typeof["default"])(simple) === 'object' ? simple.readOnly : !simple;
  59821. var gotoButton = goButton;
  59822. var simplePager = null;
  59823. if (simple) {
  59824. // ====== Simple quick jump ======
  59825. if (goButton) {
  59826. if (typeof goButton === 'boolean') {
  59827. gotoButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
  59828. type: "button",
  59829. onClick: handleGoTO,
  59830. onKeyUp: handleGoTO
  59831. }, locale.jump_to_confirm);
  59832. } else {
  59833. gotoButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  59834. onClick: handleGoTO,
  59835. onKeyUp: handleGoTO
  59836. }, goButton);
  59837. }
  59838. gotoButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59839. title: showTitle ? "".concat(locale.jump_to).concat(current, "/").concat(allPages) : null,
  59840. className: "".concat(prefixCls, "-simple-pager")
  59841. }, gotoButton);
  59842. }
  59843. simplePager = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59844. title: showTitle ? "".concat(current, "/").concat(allPages) : null,
  59845. className: "".concat(prefixCls, "-simple-pager")
  59846. }, isReadOnly ? internalInputVal : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
  59847. type: "text",
  59848. "aria-label": locale.jump_to,
  59849. value: internalInputVal,
  59850. disabled: disabled,
  59851. onKeyDown: handleKeyDown,
  59852. onKeyUp: handleKeyUp,
  59853. onChange: handleKeyUp,
  59854. onBlur: handleBlur,
  59855. size: 3
  59856. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  59857. className: "".concat(prefixCls, "-slash")
  59858. }, "/"), allPages);
  59859. }
  59860. // ====================== Normal ======================
  59861. var pageBufferSize = showLessItems ? 1 : 2;
  59862. if (allPages <= 3 + pageBufferSize * 2) {
  59863. if (!allPages) {
  59864. pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
  59865. key: "noPager",
  59866. page: 1,
  59867. className: "".concat(prefixCls, "-item-disabled")
  59868. })));
  59869. }
  59870. for (var i = 1; i <= allPages; i += 1) {
  59871. pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
  59872. key: i,
  59873. page: i,
  59874. active: current === i
  59875. })));
  59876. }
  59877. } else {
  59878. var prevItemTitle = showLessItems ? locale.prev_3 : locale.prev_5;
  59879. var nextItemTitle = showLessItems ? locale.next_3 : locale.next_5;
  59880. var jumpPrevContent = itemRender(jumpPrevPage, 'jump-prev', getItemIcon(jumpPrevIcon, 'prev page'));
  59881. var jumpNextContent = itemRender(jumpNextPage, 'jump-next', getItemIcon(jumpNextIcon, 'next page'));
  59882. if (showPrevNextJumpers) {
  59883. jumpPrev = jumpPrevContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59884. title: showTitle ? prevItemTitle : null,
  59885. key: "prev",
  59886. onClick: jumpPrevHandle,
  59887. tabIndex: 0,
  59888. onKeyDown: runIfEnterJumpPrev,
  59889. className: classnames_default()("".concat(prefixCls, "-jump-prev"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-jump-prev-custom-icon"), !!jumpPrevIcon))
  59890. }, jumpPrevContent) : null;
  59891. jumpNext = jumpNextContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59892. title: showTitle ? nextItemTitle : null,
  59893. key: "next",
  59894. onClick: jumpNextHandle,
  59895. tabIndex: 0,
  59896. onKeyDown: runIfEnterJumpNext,
  59897. className: classnames_default()("".concat(prefixCls, "-jump-next"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-jump-next-custom-icon"), !!jumpNextIcon))
  59898. }, jumpNextContent) : null;
  59899. }
  59900. var left = Math.max(1, current - pageBufferSize);
  59901. var right = Math.min(current + pageBufferSize, allPages);
  59902. if (current - 1 <= pageBufferSize) {
  59903. right = 1 + pageBufferSize * 2;
  59904. }
  59905. if (allPages - current <= pageBufferSize) {
  59906. left = allPages - pageBufferSize * 2;
  59907. }
  59908. for (var _i = left; _i <= right; _i += 1) {
  59909. pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
  59910. key: _i,
  59911. page: _i,
  59912. active: current === _i
  59913. })));
  59914. }
  59915. if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) {
  59916. pagerList[0] = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(pagerList[0], {
  59917. className: classnames_default()("".concat(prefixCls, "-item-after-jump-prev"), pagerList[0].props.className)
  59918. });
  59919. pagerList.unshift(jumpPrev);
  59920. }
  59921. if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
  59922. var lastOne = pagerList[pagerList.length - 1];
  59923. pagerList[pagerList.length - 1] = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(lastOne, {
  59924. className: classnames_default()("".concat(prefixCls, "-item-before-jump-next"), lastOne.props.className)
  59925. });
  59926. pagerList.push(jumpNext);
  59927. }
  59928. if (left !== 1) {
  59929. pagerList.unshift( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
  59930. key: 1,
  59931. page: 1
  59932. })));
  59933. }
  59934. if (right !== allPages) {
  59935. pagerList.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Pager, (0,esm_extends["default"])({}, pagerProps, {
  59936. key: allPages,
  59937. page: allPages
  59938. })));
  59939. }
  59940. }
  59941. var prev = renderPrev(prevPage);
  59942. if (prev) {
  59943. var prevDisabled = !hasPrev || !allPages;
  59944. prev = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59945. title: showTitle ? locale.prev_page : null,
  59946. onClick: prevHandle,
  59947. tabIndex: prevDisabled ? null : 0,
  59948. onKeyDown: runIfEnterPrev,
  59949. className: classnames_default()("".concat(prefixCls, "-prev"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), prevDisabled)),
  59950. "aria-disabled": prevDisabled
  59951. }, prev);
  59952. }
  59953. var next = renderNext(nextPage);
  59954. if (next) {
  59955. var nextDisabled, nextTabIndex;
  59956. if (simple) {
  59957. nextDisabled = !hasNext;
  59958. nextTabIndex = hasPrev ? 0 : null;
  59959. } else {
  59960. nextDisabled = !hasNext || !allPages;
  59961. nextTabIndex = nextDisabled ? null : 0;
  59962. }
  59963. next = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  59964. title: showTitle ? locale.next_page : null,
  59965. onClick: nextHandle,
  59966. tabIndex: nextTabIndex,
  59967. onKeyDown: runIfEnterNext,
  59968. className: classnames_default()("".concat(prefixCls, "-next"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), nextDisabled)),
  59969. "aria-disabled": nextDisabled
  59970. }, next);
  59971. }
  59972. var cls = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-start"), align === 'start'), "".concat(prefixCls, "-center"), align === 'center'), "".concat(prefixCls, "-end"), align === 'end'), "".concat(prefixCls, "-simple"), simple), "".concat(prefixCls, "-disabled"), disabled));
  59973. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", (0,esm_extends["default"])({
  59974. className: cls,
  59975. style: style,
  59976. ref: paginationRef
  59977. }, dataOrAriaAttributeProps), totalText, prev, simple ? simplePager : pagerList, next, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Options, {
  59978. locale: locale,
  59979. rootPrefixCls: prefixCls,
  59980. disabled: disabled,
  59981. selectPrefixCls: selectPrefixCls,
  59982. changeSize: changePageSize,
  59983. pageSize: pageSize,
  59984. pageSizeOptions: pageSizeOptions,
  59985. quickGo: shouldDisplayQuickJumper ? handleChange : null,
  59986. goButton: gotoButton,
  59987. showSizeChanger: showSizeChanger,
  59988. sizeChangerRender: sizeChangerRender
  59989. }));
  59990. };
  59991. if (true) {
  59992. Pagination.displayName = 'Pagination';
  59993. }
  59994. /* harmony default export */ var es_Pagination = (Pagination);
  59995. ;// ./node_modules/rc-pagination/es/index.js
  59996. // EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/en_US.js
  59997. var es_locale_en_US = __webpack_require__("./node_modules/rc-pagination/es/locale/en_US.js");
  59998. // EXTERNAL MODULE: ./components/pagination/style/index.ts
  59999. var pagination_style = __webpack_require__("./components/pagination/style/index.ts");
  60000. ;// ./components/pagination/style/bordered.ts
  60001. const genBorderedStyle = token => {
  60002. const {
  60003. componentCls
  60004. } = token;
  60005. return {
  60006. [`${componentCls}${componentCls}-bordered${componentCls}-disabled:not(${componentCls}-mini)`]: {
  60007. '&, &:hover': {
  60008. [`${componentCls}-item-link`]: {
  60009. borderColor: token.colorBorder
  60010. }
  60011. },
  60012. '&:focus-visible': {
  60013. [`${componentCls}-item-link`]: {
  60014. borderColor: token.colorBorder
  60015. }
  60016. },
  60017. [`${componentCls}-item, ${componentCls}-item-link`]: {
  60018. backgroundColor: token.colorBgContainerDisabled,
  60019. borderColor: token.colorBorder,
  60020. [`&:hover:not(${componentCls}-item-active)`]: {
  60021. backgroundColor: token.colorBgContainerDisabled,
  60022. borderColor: token.colorBorder,
  60023. a: {
  60024. color: token.colorTextDisabled
  60025. }
  60026. },
  60027. [`&${componentCls}-item-active`]: {
  60028. backgroundColor: token.itemActiveBgDisabled
  60029. }
  60030. },
  60031. [`${componentCls}-prev, ${componentCls}-next`]: {
  60032. '&:hover button': {
  60033. backgroundColor: token.colorBgContainerDisabled,
  60034. borderColor: token.colorBorder,
  60035. color: token.colorTextDisabled
  60036. },
  60037. [`${componentCls}-item-link`]: {
  60038. backgroundColor: token.colorBgContainerDisabled,
  60039. borderColor: token.colorBorder
  60040. }
  60041. }
  60042. },
  60043. [`${componentCls}${componentCls}-bordered:not(${componentCls}-mini)`]: {
  60044. [`${componentCls}-prev, ${componentCls}-next`]: {
  60045. '&:hover button': {
  60046. borderColor: token.colorPrimaryHover,
  60047. backgroundColor: token.itemBg
  60048. },
  60049. [`${componentCls}-item-link`]: {
  60050. backgroundColor: token.itemLinkBg,
  60051. borderColor: token.colorBorder
  60052. },
  60053. [`&:hover ${componentCls}-item-link`]: {
  60054. borderColor: token.colorPrimary,
  60055. backgroundColor: token.itemBg,
  60056. color: token.colorPrimary
  60057. },
  60058. [`&${componentCls}-disabled`]: {
  60059. [`${componentCls}-item-link`]: {
  60060. borderColor: token.colorBorder,
  60061. color: token.colorTextDisabled
  60062. }
  60063. }
  60064. },
  60065. [`${componentCls}-item`]: {
  60066. backgroundColor: token.itemBg,
  60067. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  60068. [`&:hover:not(${componentCls}-item-active)`]: {
  60069. borderColor: token.colorPrimary,
  60070. backgroundColor: token.itemBg,
  60071. a: {
  60072. color: token.colorPrimary
  60073. }
  60074. },
  60075. '&-active': {
  60076. borderColor: token.colorPrimary
  60077. }
  60078. }
  60079. }
  60080. };
  60081. };
  60082. /* harmony default export */ var bordered = ((0,genStyleUtils.genSubStyleComponent)(['Pagination', 'bordered'], token => {
  60083. const paginationToken = (0,pagination_style.prepareToken)(token);
  60084. return genBorderedStyle(paginationToken);
  60085. }, pagination_style.prepareComponentToken));
  60086. ;// ./components/pagination/useShowSizeChanger.ts
  60087. function useShowSizeChanger(showSizeChanger) {
  60088. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  60089. if (typeof showSizeChanger === 'boolean') {
  60090. return [showSizeChanger, {}];
  60091. }
  60092. if (showSizeChanger && typeof showSizeChanger === 'object') {
  60093. return [true, showSizeChanger];
  60094. }
  60095. return [undefined, undefined];
  60096. }, [showSizeChanger]);
  60097. }
  60098. ;// ./components/pagination/Pagination.tsx
  60099. var Pagination_rest = undefined && undefined.__rest || function (s, e) {
  60100. var t = {};
  60101. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  60102. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  60103. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  60104. }
  60105. return t;
  60106. };
  60107. const Pagination_Pagination = props => {
  60108. const {
  60109. align,
  60110. prefixCls: customizePrefixCls,
  60111. selectPrefixCls: customizeSelectPrefixCls,
  60112. className,
  60113. rootClassName,
  60114. style,
  60115. size: customizeSize,
  60116. locale: customLocale,
  60117. responsive,
  60118. showSizeChanger,
  60119. selectComponentClass,
  60120. pageSizeOptions
  60121. } = props,
  60122. restProps = Pagination_rest(props, ["align", "prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "responsive", "showSizeChanger", "selectComponentClass", "pageSizeOptions"]);
  60123. const {
  60124. xs
  60125. } = hooks_useBreakpoint(responsive);
  60126. const [, token] = (0,useToken["default"])();
  60127. const {
  60128. getPrefixCls,
  60129. direction,
  60130. showSizeChanger: contextShowSizeChangerConfig,
  60131. className: contextClassName,
  60132. style: contextStyle
  60133. } = (0,config_provider_context.useComponentConfig)('pagination');
  60134. const prefixCls = getPrefixCls('pagination', customizePrefixCls);
  60135. // Style
  60136. const [wrapCSSVar, hashId, cssVarCls] = (0,pagination_style["default"])(prefixCls);
  60137. // ============================== Size ==============================
  60138. const mergedSize = (0,useSize["default"])(customizeSize);
  60139. const isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);
  60140. // ============================= Locale =============================
  60141. const [contextLocale] = (0,useLocale["default"])('Pagination', es_locale_en_US["default"]);
  60142. const locale = Object.assign(Object.assign({}, contextLocale), customLocale);
  60143. // ========================== Size Changer ==========================
  60144. // Merge the props showSizeChanger
  60145. const [propShowSizeChanger, propSizeChangerSelectProps] = useShowSizeChanger(showSizeChanger);
  60146. const [contextShowSizeChanger, contextSizeChangerSelectProps] = useShowSizeChanger(contextShowSizeChangerConfig);
  60147. const mergedShowSizeChanger = propShowSizeChanger !== null && propShowSizeChanger !== void 0 ? propShowSizeChanger : contextShowSizeChanger;
  60148. const mergedShowSizeChangerSelectProps = propSizeChangerSelectProps !== null && propSizeChangerSelectProps !== void 0 ? propSizeChangerSelectProps : contextSizeChangerSelectProps;
  60149. const SizeChanger = selectComponentClass || components_select;
  60150. // Generate options
  60151. const mergedPageSizeOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  60152. return pageSizeOptions ? pageSizeOptions.map(option => Number(option)) : undefined;
  60153. }, [pageSizeOptions]);
  60154. // Render size changer
  60155. const sizeChangerRender = info => {
  60156. var _a;
  60157. const {
  60158. disabled,
  60159. size: pageSize,
  60160. onSizeChange,
  60161. 'aria-label': ariaLabel,
  60162. className: sizeChangerClassName,
  60163. options
  60164. } = info;
  60165. const {
  60166. className: propSizeChangerClassName,
  60167. onChange: propSizeChangerOnChange
  60168. } = mergedShowSizeChangerSelectProps || {};
  60169. // Origin Select is using Select.Option,
  60170. // So it make the option value must be string
  60171. // Just for compatible
  60172. const selectedValue = (_a = options.find(option => String(option.value) === String(pageSize))) === null || _a === void 0 ? void 0 : _a.value;
  60173. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SizeChanger, Object.assign({
  60174. disabled: disabled,
  60175. showSearch: true,
  60176. popupMatchSelectWidth: false,
  60177. getPopupContainer: triggerNode => triggerNode.parentNode,
  60178. "aria-label": ariaLabel,
  60179. options: options
  60180. }, mergedShowSizeChangerSelectProps, {
  60181. value: selectedValue,
  60182. onChange: (nextSize, option) => {
  60183. onSizeChange === null || onSizeChange === void 0 ? void 0 : onSizeChange(nextSize);
  60184. propSizeChangerOnChange === null || propSizeChangerOnChange === void 0 ? void 0 : propSizeChangerOnChange(nextSize, option);
  60185. },
  60186. size: isSmall ? 'small' : 'middle',
  60187. className: classnames_default()(sizeChangerClassName, propSizeChangerClassName)
  60188. }));
  60189. };
  60190. if (true) {
  60191. const warning = (0,_util_warning.devUseWarning)('Pagination');
  60192. true ? warning(!selectComponentClass, 'usage', '`selectComponentClass` is not official api which will be removed.') : 0;
  60193. }
  60194. // ============================= Render =============================
  60195. const iconsProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  60196. const ellipsis = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  60197. className: `${prefixCls}-item-ellipsis`
  60198. }, "\u2022\u2022\u2022");
  60199. const prevIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  60200. className: `${prefixCls}-item-link`,
  60201. type: "button",
  60202. tabIndex: -1
  60203. }, direction === 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null));
  60204. const nextIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  60205. className: `${prefixCls}-item-link`,
  60206. type: "button",
  60207. tabIndex: -1
  60208. }, direction === 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null));
  60209. const jumpPrevIcon =
  60210. /*#__PURE__*/
  60211. // biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
  60212. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  60213. className: `${prefixCls}-item-link`
  60214. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60215. className: `${prefixCls}-item-container`
  60216. }, direction === 'rtl' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleRightOutlined, {
  60217. className: `${prefixCls}-item-link-icon`
  60218. })) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleLeftOutlined, {
  60219. className: `${prefixCls}-item-link-icon`
  60220. })), ellipsis));
  60221. const jumpNextIcon =
  60222. /*#__PURE__*/
  60223. // biome-ignore lint/a11y/useValidAnchor: it is hard to refactor
  60224. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  60225. className: `${prefixCls}-item-link`
  60226. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60227. className: `${prefixCls}-item-container`
  60228. }, direction === 'rtl' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleLeftOutlined, {
  60229. className: `${prefixCls}-item-link-icon`
  60230. })) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DoubleRightOutlined, {
  60231. className: `${prefixCls}-item-link-icon`
  60232. })), ellipsis));
  60233. return {
  60234. prevIcon,
  60235. nextIcon,
  60236. jumpPrevIcon,
  60237. jumpNextIcon
  60238. };
  60239. }, [direction, prefixCls]);
  60240. const selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
  60241. const extendedClassName = classnames_default()({
  60242. [`${prefixCls}-${align}`]: !!align,
  60243. [`${prefixCls}-mini`]: isSmall,
  60244. [`${prefixCls}-rtl`]: direction === 'rtl',
  60245. [`${prefixCls}-bordered`]: token.wireframe
  60246. }, contextClassName, className, rootClassName, hashId, cssVarCls);
  60247. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  60248. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, token.wireframe && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(bordered, {
  60249. prefixCls: prefixCls
  60250. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Pagination, Object.assign({}, iconsProps, restProps, {
  60251. style: mergedStyle,
  60252. prefixCls: prefixCls,
  60253. selectPrefixCls: selectPrefixCls,
  60254. className: extendedClassName,
  60255. locale: locale,
  60256. pageSizeOptions: mergedPageSizeOptions,
  60257. showSizeChanger: mergedShowSizeChanger,
  60258. sizeChangerRender: sizeChangerRender
  60259. }))));
  60260. };
  60261. if (true) {
  60262. Pagination_Pagination.displayName = 'Pagination';
  60263. }
  60264. /* harmony default export */ var pagination_Pagination = (Pagination_Pagination);
  60265. ;// ./components/pagination/index.tsx
  60266. /* harmony default export */ var components_pagination = (pagination_Pagination);
  60267. ;// ./components/spin/Indicator/Progress.tsx
  60268. const viewSize = 100;
  60269. const borderWidth = viewSize / 5;
  60270. const radius = viewSize / 2 - borderWidth / 2;
  60271. const circumference = radius * 2 * Math.PI;
  60272. const position = 50;
  60273. const CustomCircle = props => {
  60274. const {
  60275. dotClassName,
  60276. style,
  60277. hasCircleCls
  60278. } = props;
  60279. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  60280. className: classnames_default()(`${dotClassName}-circle`, {
  60281. [`${dotClassName}-circle-bg`]: hasCircleCls
  60282. }),
  60283. r: radius,
  60284. cx: position,
  60285. cy: position,
  60286. strokeWidth: borderWidth,
  60287. style: style
  60288. });
  60289. };
  60290. const Progress = ({
  60291. percent,
  60292. prefixCls
  60293. }) => {
  60294. const dotClassName = `${prefixCls}-dot`;
  60295. const holderClassName = `${dotClassName}-holder`;
  60296. const hideClassName = `${holderClassName}-hidden`;
  60297. const [render, setRender] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  60298. // ==================== Visible =====================
  60299. (0,useLayoutEffect["default"])(() => {
  60300. if (percent !== 0) {
  60301. setRender(true);
  60302. }
  60303. }, [percent !== 0]);
  60304. // ==================== Progress ====================
  60305. const safePtg = Math.max(Math.min(percent, 100), 0);
  60306. // ===================== Render =====================
  60307. if (!render) {
  60308. return null;
  60309. }
  60310. const circleStyle = {
  60311. strokeDashoffset: `${circumference / 4}`,
  60312. strokeDasharray: `${circumference * safePtg / 100} ${circumference * (100 - safePtg) / 100}`
  60313. };
  60314. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  60315. className: classnames_default()(holderClassName, `${dotClassName}-progress`, safePtg <= 0 && hideClassName)
  60316. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  60317. viewBox: `0 0 ${viewSize} ${viewSize}`,
  60318. role: "progressbar",
  60319. "aria-valuemin": 0,
  60320. "aria-valuemax": 100,
  60321. "aria-valuenow": safePtg
  60322. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CustomCircle, {
  60323. dotClassName: dotClassName,
  60324. hasCircleCls: true
  60325. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CustomCircle, {
  60326. dotClassName: dotClassName,
  60327. style: circleStyle
  60328. })));
  60329. };
  60330. /* harmony default export */ var Indicator_Progress = (Progress);
  60331. ;// ./components/spin/Indicator/Looper.tsx
  60332. function Looper(props) {
  60333. const {
  60334. prefixCls,
  60335. percent = 0
  60336. } = props;
  60337. const dotClassName = `${prefixCls}-dot`;
  60338. const holderClassName = `${dotClassName}-holder`;
  60339. const hideClassName = `${holderClassName}-hidden`;
  60340. // ===================== Render =====================
  60341. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  60342. className: classnames_default()(holderClassName, percent > 0 && hideClassName)
  60343. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  60344. className: classnames_default()(dotClassName, `${prefixCls}-dot-spin`)
  60345. }, [1, 2, 3, 4].map(i => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("i", {
  60346. className: `${prefixCls}-dot-item`,
  60347. key: i
  60348. }))))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Indicator_Progress, {
  60349. prefixCls: prefixCls,
  60350. percent: percent
  60351. }));
  60352. }
  60353. ;// ./components/spin/Indicator/index.tsx
  60354. function Indicator(props) {
  60355. var _a;
  60356. const {
  60357. prefixCls,
  60358. indicator,
  60359. percent
  60360. } = props;
  60361. const dotClassName = `${prefixCls}-dot`;
  60362. if (indicator && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(indicator)) {
  60363. return (0,reactNode.cloneElement)(indicator, {
  60364. className: classnames_default()((_a = indicator.props) === null || _a === void 0 ? void 0 : _a.className, dotClassName),
  60365. percent
  60366. });
  60367. }
  60368. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Looper, {
  60369. prefixCls: prefixCls,
  60370. percent: percent
  60371. });
  60372. }
  60373. // EXTERNAL MODULE: ./components/spin/style/index.ts
  60374. var spin_style = __webpack_require__("./components/spin/style/index.ts");
  60375. ;// ./components/spin/usePercent.ts
  60376. const AUTO_INTERVAL = 200;
  60377. const STEP_BUCKETS = [[30, 0.05], [70, 0.03], [96, 0.01]];
  60378. function usePercent(spinning, percent) {
  60379. const [mockPercent, setMockPercent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  60380. const mockIntervalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  60381. const isAuto = percent === 'auto';
  60382. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  60383. if (isAuto && spinning) {
  60384. setMockPercent(0);
  60385. mockIntervalRef.current = setInterval(() => {
  60386. setMockPercent(prev => {
  60387. const restPTG = 100 - prev;
  60388. for (let i = 0; i < STEP_BUCKETS.length; i += 1) {
  60389. const [limit, stepPtg] = STEP_BUCKETS[i];
  60390. if (prev <= limit) {
  60391. return prev + restPTG * stepPtg;
  60392. }
  60393. }
  60394. return prev;
  60395. });
  60396. }, AUTO_INTERVAL);
  60397. }
  60398. return () => {
  60399. clearInterval(mockIntervalRef.current);
  60400. };
  60401. }, [isAuto, spinning]);
  60402. return isAuto ? mockPercent : percent;
  60403. }
  60404. ;// ./components/spin/index.tsx
  60405. var spin_rest = undefined && undefined.__rest || function (s, e) {
  60406. var t = {};
  60407. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  60408. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  60409. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  60410. }
  60411. return t;
  60412. };
  60413. const _SpinSizes = ['small', 'default', 'large'];
  60414. // Render indicator
  60415. let defaultIndicator;
  60416. function shouldDelay(spinning, delay) {
  60417. return !!spinning && !!delay && !Number.isNaN(Number(delay));
  60418. }
  60419. const Spin = props => {
  60420. var _a;
  60421. const {
  60422. prefixCls: customizePrefixCls,
  60423. spinning: customSpinning = true,
  60424. delay = 0,
  60425. className,
  60426. rootClassName,
  60427. size = 'default',
  60428. tip,
  60429. wrapperClassName,
  60430. style,
  60431. children,
  60432. fullscreen = false,
  60433. indicator,
  60434. percent
  60435. } = props,
  60436. restProps = spin_rest(props, ["prefixCls", "spinning", "delay", "className", "rootClassName", "size", "tip", "wrapperClassName", "style", "children", "fullscreen", "indicator", "percent"]);
  60437. const {
  60438. getPrefixCls,
  60439. direction,
  60440. className: contextClassName,
  60441. style: contextStyle,
  60442. indicator: contextIndicator
  60443. } = (0,config_provider_context.useComponentConfig)('spin');
  60444. const prefixCls = getPrefixCls('spin', customizePrefixCls);
  60445. const [wrapCSSVar, hashId, cssVarCls] = (0,spin_style["default"])(prefixCls);
  60446. const [spinning, setSpinning] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => customSpinning && !shouldDelay(customSpinning, delay));
  60447. const mergedPercent = usePercent(spinning, percent);
  60448. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  60449. if (customSpinning) {
  60450. const showSpinning = debounce(delay, () => {
  60451. setSpinning(true);
  60452. });
  60453. showSpinning();
  60454. return () => {
  60455. var _a;
  60456. (_a = showSpinning === null || showSpinning === void 0 ? void 0 : showSpinning.cancel) === null || _a === void 0 ? void 0 : _a.call(showSpinning);
  60457. };
  60458. }
  60459. setSpinning(false);
  60460. }, [delay, customSpinning]);
  60461. const isNestedPattern = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => typeof children !== 'undefined' && !fullscreen, [children, fullscreen]);
  60462. if (true) {
  60463. const warning = (0,_util_warning.devUseWarning)('Spin');
  60464. true ? warning(!tip || isNestedPattern || fullscreen, 'usage', '`tip` only work in nest or fullscreen pattern.') : 0;
  60465. }
  60466. const spinClassName = classnames_default()(prefixCls, contextClassName, {
  60467. [`${prefixCls}-sm`]: size === 'small',
  60468. [`${prefixCls}-lg`]: size === 'large',
  60469. [`${prefixCls}-spinning`]: spinning,
  60470. [`${prefixCls}-show-text`]: !!tip,
  60471. [`${prefixCls}-rtl`]: direction === 'rtl'
  60472. }, className, !fullscreen && rootClassName, hashId, cssVarCls);
  60473. const containerClassName = classnames_default()(`${prefixCls}-container`, {
  60474. [`${prefixCls}-blur`]: spinning
  60475. });
  60476. const mergedIndicator = (_a = indicator !== null && indicator !== void 0 ? indicator : contextIndicator) !== null && _a !== void 0 ? _a : defaultIndicator;
  60477. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  60478. const spinElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, restProps, {
  60479. style: mergedStyle,
  60480. className: spinClassName,
  60481. "aria-live": "polite",
  60482. "aria-busy": spinning
  60483. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Indicator, {
  60484. prefixCls: prefixCls,
  60485. indicator: mergedIndicator,
  60486. percent: mergedPercent
  60487. }), tip && (isNestedPattern || fullscreen) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60488. className: `${prefixCls}-text`
  60489. }, tip)) : null);
  60490. if (isNestedPattern) {
  60491. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, restProps, {
  60492. className: classnames_default()(`${prefixCls}-nested-loading`, wrapperClassName, hashId, cssVarCls)
  60493. }), spinning && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60494. key: "loading"
  60495. }, spinElement), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60496. className: containerClassName,
  60497. key: "container"
  60498. }, children)));
  60499. }
  60500. if (fullscreen) {
  60501. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60502. className: classnames_default()(`${prefixCls}-fullscreen`, {
  60503. [`${prefixCls}-fullscreen-show`]: spinning
  60504. }, rootClassName, hashId, cssVarCls)
  60505. }, spinElement));
  60506. }
  60507. return wrapCSSVar(spinElement);
  60508. };
  60509. Spin.setDefaultIndicator = indicator => {
  60510. defaultIndicator = indicator;
  60511. };
  60512. if (true) {
  60513. Spin.displayName = 'Spin';
  60514. }
  60515. /* harmony default export */ var spin = (Spin);
  60516. ;// ./components/list/context.ts
  60517. const context_ListContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
  60518. const ListConsumer = context_ListContext.Consumer;
  60519. ;// ./components/list/Item.tsx
  60520. var Item_rest = undefined && undefined.__rest || function (s, e) {
  60521. var t = {};
  60522. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  60523. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  60524. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  60525. }
  60526. return t;
  60527. };
  60528. const Item_Meta = _a => {
  60529. var {
  60530. prefixCls: customizePrefixCls,
  60531. className,
  60532. avatar,
  60533. title,
  60534. description
  60535. } = _a,
  60536. others = Item_rest(_a, ["prefixCls", "className", "avatar", "title", "description"]);
  60537. const {
  60538. getPrefixCls
  60539. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  60540. const prefixCls = getPrefixCls('list', customizePrefixCls);
  60541. const classString = classnames_default()(`${prefixCls}-item-meta`, className);
  60542. const content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  60543. className: `${prefixCls}-item-meta-content`
  60544. }, title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("h4", {
  60545. className: `${prefixCls}-item-meta-title`
  60546. }, title), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  60547. className: `${prefixCls}-item-meta-description`
  60548. }, description));
  60549. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({}, others, {
  60550. className: classString
  60551. }), avatar && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  60552. className: `${prefixCls}-item-meta-avatar`
  60553. }, avatar), (title || description) && content);
  60554. };
  60555. const Item_InternalItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  60556. const {
  60557. prefixCls: customizePrefixCls,
  60558. children,
  60559. actions,
  60560. extra,
  60561. styles,
  60562. className,
  60563. classNames: customizeClassNames,
  60564. colStyle
  60565. } = props,
  60566. others = Item_rest(props, ["prefixCls", "children", "actions", "extra", "styles", "className", "classNames", "colStyle"]);
  60567. const {
  60568. grid,
  60569. itemLayout
  60570. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(context_ListContext);
  60571. const {
  60572. getPrefixCls,
  60573. list
  60574. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  60575. const moduleClass = moduleName => {
  60576. var _a, _b;
  60577. return classnames_default()((_b = (_a = list === null || list === void 0 ? void 0 : list.item) === null || _a === void 0 ? void 0 : _a.classNames) === null || _b === void 0 ? void 0 : _b[moduleName], customizeClassNames === null || customizeClassNames === void 0 ? void 0 : customizeClassNames[moduleName]);
  60578. };
  60579. const moduleStyle = moduleName => {
  60580. var _a, _b;
  60581. return Object.assign(Object.assign({}, (_b = (_a = list === null || list === void 0 ? void 0 : list.item) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b[moduleName]), styles === null || styles === void 0 ? void 0 : styles[moduleName]);
  60582. };
  60583. const isItemContainsTextNodeAndNotSingular = () => {
  60584. let result = false;
  60585. external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.forEach(children, element => {
  60586. if (typeof element === 'string') {
  60587. result = true;
  60588. }
  60589. });
  60590. return result && external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.count(children) > 1;
  60591. };
  60592. const isFlexMode = () => {
  60593. if (itemLayout === 'vertical') {
  60594. return !!extra;
  60595. }
  60596. return !isItemContainsTextNodeAndNotSingular();
  60597. };
  60598. const prefixCls = getPrefixCls('list', customizePrefixCls);
  60599. const actionsContent = actions && actions.length > 0 && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
  60600. className: classnames_default()(`${prefixCls}-item-action`, moduleClass('actions')),
  60601. key: "actions",
  60602. style: moduleStyle('actions')
  60603. }, actions.map((action, i) => (
  60604. /*#__PURE__*/
  60605. // eslint-disable-next-line react/no-array-index-key
  60606. external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  60607. key: `${prefixCls}-item-action-${i}`
  60608. }, action, i !== actions.length - 1 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("em", {
  60609. className: `${prefixCls}-item-action-split`
  60610. }))))));
  60611. const Element = grid ? 'div' : 'li';
  60612. const itemChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Element, Object.assign({}, others, !grid ? {
  60613. ref
  60614. } : {}, {
  60615. className: classnames_default()(`${prefixCls}-item`, {
  60616. [`${prefixCls}-item-no-flex`]: !isFlexMode()
  60617. }, className)
  60618. }), itemLayout === 'vertical' && extra ? [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  60619. className: `${prefixCls}-item-main`,
  60620. key: "content"
  60621. }, children, actionsContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  60622. className: classnames_default()(`${prefixCls}-item-extra`, moduleClass('extra')),
  60623. key: "extra",
  60624. style: moduleStyle('extra')
  60625. }, extra)] : [children, actionsContent, (0,reactNode.cloneElement)(extra, {
  60626. key: 'extra'
  60627. })]);
  60628. return grid ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(col, {
  60629. ref: ref,
  60630. flex: 1,
  60631. style: colStyle
  60632. }, itemChildren)) : itemChildren;
  60633. });
  60634. const list_Item_Item = Item_InternalItem;
  60635. list_Item_Item.Meta = Item_Meta;
  60636. /* harmony default export */ var list_Item = (list_Item_Item);
  60637. // EXTERNAL MODULE: ./components/list/style/index.ts
  60638. var list_style = __webpack_require__("./components/list/style/index.ts");
  60639. ;// ./components/list/index.tsx
  60640. var list_rest = undefined && undefined.__rest || function (s, e) {
  60641. var t = {};
  60642. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  60643. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  60644. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  60645. }
  60646. return t;
  60647. };
  60648. function InternalList(props, ref) {
  60649. const {
  60650. pagination = false,
  60651. prefixCls: customizePrefixCls,
  60652. bordered = false,
  60653. split = true,
  60654. className,
  60655. rootClassName,
  60656. style,
  60657. children,
  60658. itemLayout,
  60659. loadMore,
  60660. grid,
  60661. dataSource = [],
  60662. size: customizeSize,
  60663. header,
  60664. footer,
  60665. loading = false,
  60666. rowKey,
  60667. renderItem,
  60668. locale
  60669. } = props,
  60670. rest = list_rest(props, ["pagination", "prefixCls", "bordered", "split", "className", "rootClassName", "style", "children", "itemLayout", "loadMore", "grid", "dataSource", "size", "header", "footer", "loading", "rowKey", "renderItem", "locale"]);
  60671. const paginationObj = pagination && typeof pagination === 'object' ? pagination : {};
  60672. const [paginationCurrent, setPaginationCurrent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(paginationObj.defaultCurrent || 1);
  60673. const [paginationSize, setPaginationSize] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(paginationObj.defaultPageSize || 10);
  60674. const {
  60675. getPrefixCls,
  60676. direction,
  60677. className: contextClassName,
  60678. style: contextStyle
  60679. } = (0,config_provider_context.useComponentConfig)('list');
  60680. const {
  60681. renderEmpty
  60682. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  60683. const defaultPaginationProps = {
  60684. current: 1,
  60685. total: 0,
  60686. position: 'bottom'
  60687. };
  60688. const triggerPaginationEvent = eventName => (page, pageSize) => {
  60689. var _a;
  60690. setPaginationCurrent(page);
  60691. setPaginationSize(pageSize);
  60692. if (pagination) {
  60693. (_a = pagination === null || pagination === void 0 ? void 0 : pagination[eventName]) === null || _a === void 0 ? void 0 : _a.call(pagination, page, pageSize);
  60694. }
  60695. };
  60696. const onPaginationChange = triggerPaginationEvent('onChange');
  60697. const onPaginationShowSizeChange = triggerPaginationEvent('onShowSizeChange');
  60698. const renderInternalItem = (item, index) => {
  60699. if (!renderItem) {
  60700. return null;
  60701. }
  60702. let key;
  60703. if (typeof rowKey === 'function') {
  60704. key = rowKey(item);
  60705. } else if (rowKey) {
  60706. key = item[rowKey];
  60707. } else {
  60708. key = item.key;
  60709. }
  60710. if (!key) {
  60711. key = `list-item-${index}`;
  60712. }
  60713. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
  60714. key: key
  60715. }, renderItem(item, index));
  60716. };
  60717. const isSomethingAfterLastItem = !!(loadMore || pagination || footer);
  60718. const prefixCls = getPrefixCls('list', customizePrefixCls);
  60719. // Style
  60720. const [wrapCSSVar, hashId, cssVarCls] = (0,list_style["default"])(prefixCls);
  60721. let loadingProp = loading;
  60722. if (typeof loadingProp === 'boolean') {
  60723. loadingProp = {
  60724. spinning: loadingProp
  60725. };
  60726. }
  60727. const isLoading = !!(loadingProp === null || loadingProp === void 0 ? void 0 : loadingProp.spinning);
  60728. const mergedSize = (0,useSize["default"])(customizeSize);
  60729. // large => lg
  60730. // small => sm
  60731. let sizeCls = '';
  60732. switch (mergedSize) {
  60733. case 'large':
  60734. sizeCls = 'lg';
  60735. break;
  60736. case 'small':
  60737. sizeCls = 'sm';
  60738. break;
  60739. default:
  60740. break;
  60741. }
  60742. const classString = classnames_default()(prefixCls, {
  60743. [`${prefixCls}-vertical`]: itemLayout === 'vertical',
  60744. [`${prefixCls}-${sizeCls}`]: sizeCls,
  60745. [`${prefixCls}-split`]: split,
  60746. [`${prefixCls}-bordered`]: bordered,
  60747. [`${prefixCls}-loading`]: isLoading,
  60748. [`${prefixCls}-grid`]: !!grid,
  60749. [`${prefixCls}-something-after-last-item`]: isSomethingAfterLastItem,
  60750. [`${prefixCls}-rtl`]: direction === 'rtl'
  60751. }, contextClassName, className, rootClassName, hashId, cssVarCls);
  60752. const paginationProps = extendsObject(defaultPaginationProps, {
  60753. total: dataSource.length,
  60754. current: paginationCurrent,
  60755. pageSize: paginationSize
  60756. }, pagination || {});
  60757. const largestPage = Math.ceil(paginationProps.total / paginationProps.pageSize);
  60758. paginationProps.current = Math.min(paginationProps.current, largestPage);
  60759. const paginationContent = pagination && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60760. className: classnames_default()(`${prefixCls}-pagination`)
  60761. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_pagination, Object.assign({
  60762. align: "end"
  60763. }, paginationProps, {
  60764. onChange: onPaginationChange,
  60765. onShowSizeChange: onPaginationShowSizeChange
  60766. }))));
  60767. let splitDataSource = (0,toConsumableArray["default"])(dataSource);
  60768. if (pagination) {
  60769. if (dataSource.length > (paginationProps.current - 1) * paginationProps.pageSize) {
  60770. splitDataSource = (0,toConsumableArray["default"])(dataSource).splice((paginationProps.current - 1) * paginationProps.pageSize, paginationProps.pageSize);
  60771. }
  60772. }
  60773. const needResponsive = Object.keys(grid || {}).some(key => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key));
  60774. const screens = hooks_useBreakpoint(needResponsive);
  60775. const currentBreakpoint = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  60776. for (let i = 0; i < responsiveArray.length; i += 1) {
  60777. const breakpoint = responsiveArray[i];
  60778. if (screens[breakpoint]) {
  60779. return breakpoint;
  60780. }
  60781. }
  60782. return undefined;
  60783. }, [screens]);
  60784. const colStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  60785. if (!grid) {
  60786. return undefined;
  60787. }
  60788. const columnCount = currentBreakpoint && grid[currentBreakpoint] ? grid[currentBreakpoint] : grid.column;
  60789. if (columnCount) {
  60790. return {
  60791. width: `${100 / columnCount}%`,
  60792. maxWidth: `${100 / columnCount}%`
  60793. };
  60794. }
  60795. }, [JSON.stringify(grid), currentBreakpoint]);
  60796. let childrenContent = isLoading && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60797. style: {
  60798. minHeight: 53
  60799. }
  60800. });
  60801. if (splitDataSource.length > 0) {
  60802. const items = splitDataSource.map(renderInternalItem);
  60803. childrenContent = grid ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(row, {
  60804. gutter: grid.gutter
  60805. }, external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.map(items, child => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60806. key: child === null || child === void 0 ? void 0 : child.key,
  60807. style: colStyle
  60808. }, child))))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  60809. className: `${prefixCls}-items`
  60810. }, items));
  60811. } else if (!children && !isLoading) {
  60812. childrenContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60813. className: `${prefixCls}-empty-text`
  60814. }, (locale === null || locale === void 0 ? void 0 : locale.emptyText) || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('List')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  60815. componentName: "List"
  60816. }));
  60817. }
  60818. const paginationPosition = paginationProps.position;
  60819. const contextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => ({
  60820. grid,
  60821. itemLayout
  60822. }), [JSON.stringify(grid), itemLayout]);
  60823. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_ListContext.Provider, {
  60824. value: contextValue
  60825. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  60826. ref: ref,
  60827. style: Object.assign(Object.assign({}, contextStyle), style),
  60828. className: classString
  60829. }, rest), (paginationPosition === 'top' || paginationPosition === 'both') && paginationContent, header && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60830. className: `${prefixCls}-header`
  60831. }, header), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, Object.assign({}, loadingProp), childrenContent, children), footer && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  60832. className: `${prefixCls}-footer`
  60833. }, footer), loadMore || (paginationPosition === 'bottom' || paginationPosition === 'both') && paginationContent)));
  60834. }
  60835. const ListWithForwardRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalList);
  60836. if (true) {
  60837. ListWithForwardRef.displayName = 'List';
  60838. }
  60839. const list_List = ListWithForwardRef;
  60840. list_List.Item = list_Item;
  60841. /* harmony default export */ var list = (list_List);
  60842. ;// ./node_modules/rc-mentions/es/hooks/useEffectState.js
  60843. /**
  60844. * Trigger a callback on state change
  60845. */
  60846. function useEffectState_useEffectState() {
  60847. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
  60848. id: 0,
  60849. callback: null
  60850. }),
  60851. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  60852. effectId = _useState2[0],
  60853. setEffectId = _useState2[1];
  60854. var update = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (callback) {
  60855. setEffectId(function (_ref) {
  60856. var id = _ref.id;
  60857. return {
  60858. id: id + 1,
  60859. callback: callback
  60860. };
  60861. });
  60862. }, []);
  60863. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  60864. var _effectId$callback;
  60865. (_effectId$callback = effectId.callback) === null || _effectId$callback === void 0 || _effectId$callback.call(effectId);
  60866. }, [effectId]);
  60867. return update;
  60868. }
  60869. ;// ./node_modules/rc-mentions/es/MentionsContext.js
  60870. /* tslint:disable: no-object-literal-type-assertion */
  60871. // We will never use default, here only to fix TypeScript warning
  60872. var MentionsContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  60873. /* harmony default export */ var es_MentionsContext = (MentionsContext);
  60874. ;// ./node_modules/rc-mentions/es/DropdownMenu.js
  60875. /**
  60876. * We only use Menu to display the candidate.
  60877. * The focus is controlled by textarea to make accessibility easy.
  60878. */
  60879. function DropdownMenu(props) {
  60880. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_MentionsContext),
  60881. notFoundContent = _React$useContext.notFoundContent,
  60882. activeIndex = _React$useContext.activeIndex,
  60883. setActiveIndex = _React$useContext.setActiveIndex,
  60884. selectOption = _React$useContext.selectOption,
  60885. onFocus = _React$useContext.onFocus,
  60886. onBlur = _React$useContext.onBlur,
  60887. onScroll = _React$useContext.onScroll;
  60888. var prefixCls = props.prefixCls,
  60889. options = props.options;
  60890. var activeOption = options[activeIndex] || {};
  60891. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_menu_es, {
  60892. prefixCls: "".concat(prefixCls, "-menu"),
  60893. activeKey: activeOption.key,
  60894. onSelect: function onSelect(_ref) {
  60895. var key = _ref.key;
  60896. var option = options.find(function (_ref2) {
  60897. var optionKey = _ref2.key;
  60898. return optionKey === key;
  60899. });
  60900. selectOption(option);
  60901. },
  60902. onFocus: onFocus,
  60903. onBlur: onBlur,
  60904. onScroll: onScroll
  60905. }, options.map(function (option, index) {
  60906. var key = option.key,
  60907. disabled = option.disabled,
  60908. className = option.className,
  60909. style = option.style,
  60910. label = option.label;
  60911. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, {
  60912. key: key,
  60913. disabled: disabled,
  60914. className: className,
  60915. style: style,
  60916. onMouseEnter: function onMouseEnter() {
  60917. setActiveIndex(index);
  60918. }
  60919. }, label);
  60920. }), !options.length && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MenuItem, {
  60921. disabled: true
  60922. }, notFoundContent));
  60923. }
  60924. /* harmony default export */ var es_DropdownMenu = (DropdownMenu);
  60925. ;// ./node_modules/rc-mentions/es/KeywordTrigger.js
  60926. var KeywordTrigger_BUILT_IN_PLACEMENTS = {
  60927. bottomRight: {
  60928. points: ['tl', 'br'],
  60929. offset: [0, 4],
  60930. overflow: {
  60931. adjustX: 1,
  60932. adjustY: 1
  60933. }
  60934. },
  60935. bottomLeft: {
  60936. points: ['tr', 'bl'],
  60937. offset: [0, 4],
  60938. overflow: {
  60939. adjustX: 1,
  60940. adjustY: 1
  60941. }
  60942. },
  60943. topRight: {
  60944. points: ['bl', 'tr'],
  60945. offset: [0, -4],
  60946. overflow: {
  60947. adjustX: 1,
  60948. adjustY: 1
  60949. }
  60950. },
  60951. topLeft: {
  60952. points: ['br', 'tl'],
  60953. offset: [0, -4],
  60954. overflow: {
  60955. adjustX: 1,
  60956. adjustY: 1
  60957. }
  60958. }
  60959. };
  60960. var KeywordTrigger = function KeywordTrigger(props) {
  60961. var prefixCls = props.prefixCls,
  60962. options = props.options,
  60963. children = props.children,
  60964. visible = props.visible,
  60965. transitionName = props.transitionName,
  60966. getPopupContainer = props.getPopupContainer,
  60967. dropdownClassName = props.dropdownClassName,
  60968. direction = props.direction,
  60969. placement = props.placement;
  60970. var dropdownPrefix = "".concat(prefixCls, "-dropdown");
  60971. var dropdownElement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DropdownMenu, {
  60972. prefixCls: dropdownPrefix,
  60973. options: options
  60974. });
  60975. var dropdownPlacement = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  60976. var popupPlacement;
  60977. if (direction === 'rtl') {
  60978. popupPlacement = placement === 'top' ? 'topLeft' : 'bottomLeft';
  60979. } else {
  60980. popupPlacement = placement === 'top' ? 'topRight' : 'bottomRight';
  60981. }
  60982. return popupPlacement;
  60983. }, [direction, placement]);
  60984. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, {
  60985. prefixCls: dropdownPrefix,
  60986. popupVisible: visible,
  60987. popup: dropdownElement,
  60988. popupPlacement: dropdownPlacement,
  60989. popupTransitionName: transitionName,
  60990. builtinPlacements: KeywordTrigger_BUILT_IN_PLACEMENTS,
  60991. getPopupContainer: getPopupContainer,
  60992. popupClassName: dropdownClassName
  60993. }, children);
  60994. };
  60995. /* harmony default export */ var es_KeywordTrigger = (KeywordTrigger);
  60996. ;// ./node_modules/rc-mentions/es/Option.js
  60997. var Option_Option = function Option() {
  60998. return null;
  60999. };
  61000. /* harmony default export */ var rc_mentions_es_Option = (Option_Option);
  61001. ;// ./node_modules/rc-mentions/es/util.js
  61002. /**
  61003. * Cut input selection into 2 part and return text before selection start
  61004. */
  61005. function getBeforeSelectionText(input) {
  61006. var selectionStart = input.selectionStart;
  61007. return input.value.slice(0, selectionStart);
  61008. }
  61009. /**
  61010. * Find the last match prefix index
  61011. */
  61012. function getLastMeasureIndex(text, prefix) {
  61013. return prefix.reduce(function (lastMatch, prefixStr) {
  61014. var lastIndex = text.lastIndexOf(prefixStr);
  61015. if (lastIndex > lastMatch.location) {
  61016. return {
  61017. location: lastIndex,
  61018. prefix: prefixStr
  61019. };
  61020. }
  61021. return lastMatch;
  61022. }, {
  61023. location: -1,
  61024. prefix: ''
  61025. });
  61026. }
  61027. function lower(char) {
  61028. return (char || '').toLowerCase();
  61029. }
  61030. function reduceText(text, targetText, split) {
  61031. var firstChar = text[0];
  61032. if (!firstChar || firstChar === split) {
  61033. return text;
  61034. }
  61035. // Reuse rest text as it can
  61036. var restText = text;
  61037. var targetTextLen = targetText.length;
  61038. for (var i = 0; i < targetTextLen; i += 1) {
  61039. if (lower(restText[i]) !== lower(targetText[i])) {
  61040. restText = restText.slice(i);
  61041. break;
  61042. } else if (i === targetTextLen - 1) {
  61043. restText = restText.slice(targetTextLen);
  61044. }
  61045. }
  61046. return restText;
  61047. }
  61048. /**
  61049. * Paint targetText into current text:
  61050. * text: little@litest
  61051. * targetText: light
  61052. * => little @light test
  61053. */
  61054. function replaceWithMeasure(text, measureConfig) {
  61055. var measureLocation = measureConfig.measureLocation,
  61056. prefix = measureConfig.prefix,
  61057. targetText = measureConfig.targetText,
  61058. selectionStart = measureConfig.selectionStart,
  61059. split = measureConfig.split;
  61060. // Before text will append one space if have other text
  61061. var beforeMeasureText = text.slice(0, measureLocation);
  61062. if (beforeMeasureText[beforeMeasureText.length - split.length] === split) {
  61063. beforeMeasureText = beforeMeasureText.slice(0, beforeMeasureText.length - split.length);
  61064. }
  61065. if (beforeMeasureText) {
  61066. beforeMeasureText = "".concat(beforeMeasureText).concat(split);
  61067. }
  61068. // Cut duplicate string with current targetText
  61069. var restText = reduceText(text.slice(selectionStart), targetText.slice(selectionStart - measureLocation - prefix.length), split);
  61070. if (restText.slice(0, split.length) === split) {
  61071. restText = restText.slice(split.length);
  61072. }
  61073. var connectedStartText = "".concat(beforeMeasureText).concat(prefix).concat(targetText).concat(split);
  61074. return {
  61075. text: "".concat(connectedStartText).concat(restText),
  61076. selectionLocation: connectedStartText.length
  61077. };
  61078. }
  61079. function setInputSelection(input, location) {
  61080. input.setSelectionRange(location, location);
  61081. /**
  61082. * Reset caret into view.
  61083. * Since this function always called by user control, it's safe to focus element.
  61084. */
  61085. input.blur();
  61086. input.focus();
  61087. }
  61088. function util_validateSearch(text, split) {
  61089. return !split || text.indexOf(split) === -1;
  61090. }
  61091. function util_filterOption(input, _ref) {
  61092. var _ref$value = _ref.value,
  61093. value = _ref$value === void 0 ? '' : _ref$value;
  61094. var lowerCase = input.toLowerCase();
  61095. return value.toLowerCase().indexOf(lowerCase) !== -1;
  61096. }
  61097. ;// ./node_modules/rc-mentions/es/Mentions.js
  61098. var Mentions_excluded = ["prefixCls", "className", "style", "prefix", "split", "notFoundContent", "value", "defaultValue", "children", "options", "open", "allowClear", "silent", "validateSearch", "filterOption", "onChange", "onKeyDown", "onKeyUp", "onPressEnter", "onSearch", "onSelect", "onFocus", "onBlur", "transitionName", "placement", "direction", "getPopupContainer", "dropdownClassName", "rows", "visible", "onPopupScroll"],
  61099. Mentions_excluded2 = ["suffix", "prefixCls", "defaultValue", "value", "allowClear", "onChange", "classNames", "className", "disabled", "onClear"];
  61100. var InternalMentions = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
  61101. var prefixCls = props.prefixCls,
  61102. className = props.className,
  61103. style = props.style,
  61104. _props$prefix = props.prefix,
  61105. prefix = _props$prefix === void 0 ? '@' : _props$prefix,
  61106. _props$split = props.split,
  61107. split = _props$split === void 0 ? ' ' : _props$split,
  61108. _props$notFoundConten = props.notFoundContent,
  61109. notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,
  61110. value = props.value,
  61111. defaultValue = props.defaultValue,
  61112. children = props.children,
  61113. options = props.options,
  61114. open = props.open,
  61115. allowClear = props.allowClear,
  61116. silent = props.silent,
  61117. _props$validateSearch = props.validateSearch,
  61118. validateSearch = _props$validateSearch === void 0 ? util_validateSearch : _props$validateSearch,
  61119. _props$filterOption = props.filterOption,
  61120. filterOption = _props$filterOption === void 0 ? util_filterOption : _props$filterOption,
  61121. onChange = props.onChange,
  61122. onKeyDown = props.onKeyDown,
  61123. onKeyUp = props.onKeyUp,
  61124. onPressEnter = props.onPressEnter,
  61125. onSearch = props.onSearch,
  61126. onSelect = props.onSelect,
  61127. onFocus = props.onFocus,
  61128. onBlur = props.onBlur,
  61129. transitionName = props.transitionName,
  61130. placement = props.placement,
  61131. direction = props.direction,
  61132. getPopupContainer = props.getPopupContainer,
  61133. dropdownClassName = props.dropdownClassName,
  61134. _props$rows = props.rows,
  61135. rows = _props$rows === void 0 ? 1 : _props$rows,
  61136. visible = props.visible,
  61137. onPopupScroll = props.onPopupScroll,
  61138. restProps = (0,objectWithoutProperties["default"])(props, Mentions_excluded);
  61139. var mergedPrefix = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  61140. return Array.isArray(prefix) ? prefix : [prefix];
  61141. }, [prefix]);
  61142. // =============================== Refs ===============================
  61143. var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  61144. var textareaRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  61145. var measureRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  61146. var getTextArea = function getTextArea() {
  61147. var _textareaRef$current;
  61148. return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 || (_textareaRef$current = _textareaRef$current.resizableTextArea) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.textArea;
  61149. };
  61150. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
  61151. var _textareaRef$current4;
  61152. return {
  61153. focus: function focus() {
  61154. var _textareaRef$current2;
  61155. return (_textareaRef$current2 = textareaRef.current) === null || _textareaRef$current2 === void 0 ? void 0 : _textareaRef$current2.focus();
  61156. },
  61157. blur: function blur() {
  61158. var _textareaRef$current3;
  61159. return (_textareaRef$current3 = textareaRef.current) === null || _textareaRef$current3 === void 0 ? void 0 : _textareaRef$current3.blur();
  61160. },
  61161. textarea: (_textareaRef$current4 = textareaRef.current) === null || _textareaRef$current4 === void 0 || (_textareaRef$current4 = _textareaRef$current4.resizableTextArea) === null || _textareaRef$current4 === void 0 ? void 0 : _textareaRef$current4.textArea,
  61162. nativeElement: containerRef.current
  61163. };
  61164. });
  61165. // ============================== State ===============================
  61166. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  61167. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  61168. measuring = _useState2[0],
  61169. setMeasuring = _useState2[1];
  61170. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
  61171. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  61172. measureText = _useState4[0],
  61173. setMeasureText = _useState4[1];
  61174. var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
  61175. _useState6 = (0,slicedToArray["default"])(_useState5, 2),
  61176. measurePrefix = _useState6[0],
  61177. setMeasurePrefix = _useState6[1];
  61178. var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  61179. _useState8 = (0,slicedToArray["default"])(_useState7, 2),
  61180. measureLocation = _useState8[0],
  61181. setMeasureLocation = _useState8[1];
  61182. var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
  61183. _useState10 = (0,slicedToArray["default"])(_useState9, 2),
  61184. activeIndex = _useState10[0],
  61185. setActiveIndex = _useState10[1];
  61186. var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  61187. _useState12 = (0,slicedToArray["default"])(_useState11, 2),
  61188. isFocus = _useState12[0],
  61189. setIsFocus = _useState12[1];
  61190. // ============================== Value ===============================
  61191. var _useMergedState = (0,useMergedState["default"])('', {
  61192. defaultValue: defaultValue,
  61193. value: value
  61194. }),
  61195. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  61196. mergedValue = _useMergedState2[0],
  61197. setMergedValue = _useMergedState2[1];
  61198. // =============================== Open ===============================
  61199. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  61200. // Sync measure div top with textarea for rc-trigger usage
  61201. if (measuring && measureRef.current) {
  61202. measureRef.current.scrollTop = getTextArea().scrollTop;
  61203. }
  61204. }, [measuring]);
  61205. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  61206. if (open) {
  61207. if (true) {
  61208. (0,warning["default"])(false, '`open` of Mentions is only used for debug usage. Do not use in you production.');
  61209. }
  61210. for (var i = 0; i < mergedPrefix.length; i += 1) {
  61211. var curPrefix = mergedPrefix[i];
  61212. var index = mergedValue.lastIndexOf(curPrefix);
  61213. if (index >= 0) {
  61214. return [true, '', curPrefix, index];
  61215. }
  61216. }
  61217. }
  61218. return [measuring, measureText, measurePrefix, measureLocation];
  61219. }, [open, measuring, mergedPrefix, mergedValue, measureText, measurePrefix, measureLocation]),
  61220. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 4),
  61221. mergedMeasuring = _React$useMemo2[0],
  61222. mergedMeasureText = _React$useMemo2[1],
  61223. mergedMeasurePrefix = _React$useMemo2[2],
  61224. mergedMeasureLocation = _React$useMemo2[3];
  61225. // ============================== Option ==============================
  61226. var getOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(function (targetMeasureText) {
  61227. var list;
  61228. if (options && options.length > 0) {
  61229. list = options.map(function (item) {
  61230. var _item$key;
  61231. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
  61232. key: (_item$key = item === null || item === void 0 ? void 0 : item.key) !== null && _item$key !== void 0 ? _item$key : item.value
  61233. });
  61234. });
  61235. } else {
  61236. list = (0,toArray["default"])(children).map(function (_ref) {
  61237. var optionProps = _ref.props,
  61238. key = _ref.key;
  61239. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, optionProps), {}, {
  61240. label: optionProps.children,
  61241. key: key || optionProps.value
  61242. });
  61243. });
  61244. }
  61245. return list.filter(function (option) {
  61246. /** Return all result if `filterOption` is false. */
  61247. if (filterOption === false) {
  61248. return true;
  61249. }
  61250. return filterOption(targetMeasureText, option);
  61251. });
  61252. }, [children, options, filterOption]);
  61253. var mergedOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  61254. return getOptions(mergedMeasureText);
  61255. }, [getOptions, mergedMeasureText]);
  61256. // ============================= Measure ==============================
  61257. // Mark that we will reset input selection to target position when user select option
  61258. var onSelectionEffect = useEffectState_useEffectState();
  61259. var startMeasure = function startMeasure(nextMeasureText, nextMeasurePrefix, nextMeasureLocation) {
  61260. setMeasuring(true);
  61261. setMeasureText(nextMeasureText);
  61262. setMeasurePrefix(nextMeasurePrefix);
  61263. setMeasureLocation(nextMeasureLocation);
  61264. setActiveIndex(0);
  61265. };
  61266. var stopMeasure = function stopMeasure(callback) {
  61267. setMeasuring(false);
  61268. setMeasureLocation(0);
  61269. setMeasureText('');
  61270. onSelectionEffect(callback);
  61271. };
  61272. // ============================== Change ==============================
  61273. var triggerChange = function triggerChange(nextValue) {
  61274. setMergedValue(nextValue);
  61275. onChange === null || onChange === void 0 || onChange(nextValue);
  61276. };
  61277. var onInternalChange = function onInternalChange(_ref2) {
  61278. var nextValue = _ref2.target.value;
  61279. triggerChange(nextValue);
  61280. };
  61281. var selectOption = function selectOption(option) {
  61282. var _getTextArea;
  61283. var _option$value = option.value,
  61284. mentionValue = _option$value === void 0 ? '' : _option$value;
  61285. var _replaceWithMeasure = replaceWithMeasure(mergedValue, {
  61286. measureLocation: mergedMeasureLocation,
  61287. targetText: mentionValue,
  61288. prefix: mergedMeasurePrefix,
  61289. selectionStart: (_getTextArea = getTextArea()) === null || _getTextArea === void 0 ? void 0 : _getTextArea.selectionStart,
  61290. split: split
  61291. }),
  61292. text = _replaceWithMeasure.text,
  61293. selectionLocation = _replaceWithMeasure.selectionLocation;
  61294. triggerChange(text);
  61295. stopMeasure(function () {
  61296. // We need restore the selection position
  61297. setInputSelection(getTextArea(), selectionLocation);
  61298. });
  61299. onSelect === null || onSelect === void 0 || onSelect(option, mergedMeasurePrefix);
  61300. };
  61301. // ============================= KeyEvent =============================
  61302. // Check if hit the measure keyword
  61303. var onInternalKeyDown = function onInternalKeyDown(event) {
  61304. var which = event.which;
  61305. onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
  61306. // Skip if not measuring
  61307. if (!mergedMeasuring) {
  61308. return;
  61309. }
  61310. if (which === KeyCode["default"].UP || which === KeyCode["default"].DOWN) {
  61311. // Control arrow function
  61312. var optionLen = mergedOptions.length;
  61313. var offset = which === KeyCode["default"].UP ? -1 : 1;
  61314. var newActiveIndex = (activeIndex + offset + optionLen) % optionLen;
  61315. setActiveIndex(newActiveIndex);
  61316. event.preventDefault();
  61317. } else if (which === KeyCode["default"].ESC) {
  61318. stopMeasure();
  61319. } else if (which === KeyCode["default"].ENTER) {
  61320. // Measure hit
  61321. event.preventDefault();
  61322. // loading skip
  61323. if (silent) {
  61324. return;
  61325. }
  61326. if (!mergedOptions.length) {
  61327. stopMeasure();
  61328. return;
  61329. }
  61330. var _option = mergedOptions[activeIndex];
  61331. selectOption(_option);
  61332. }
  61333. };
  61334. /**
  61335. * When to start measure:
  61336. * 1. When user press `prefix`
  61337. * 2. When measureText !== prevMeasureText
  61338. * - If measure hit
  61339. * - If measuring
  61340. *
  61341. * When to stop measure:
  61342. * 1. Selection is out of range
  61343. * 2. Contains `space`
  61344. * 3. ESC or select one
  61345. */
  61346. var onInternalKeyUp = function onInternalKeyUp(event) {
  61347. var key = event.key,
  61348. which = event.which;
  61349. var target = event.target;
  61350. var selectionStartText = getBeforeSelectionText(target);
  61351. var _getLastMeasureIndex = getLastMeasureIndex(selectionStartText, mergedPrefix),
  61352. measureIndex = _getLastMeasureIndex.location,
  61353. nextMeasurePrefix = _getLastMeasureIndex.prefix;
  61354. // If the client implements an onKeyUp handler, call it
  61355. onKeyUp === null || onKeyUp === void 0 || onKeyUp(event);
  61356. // Skip if match the white key list
  61357. if ([KeyCode["default"].ESC, KeyCode["default"].UP, KeyCode["default"].DOWN, KeyCode["default"].ENTER].indexOf(which) !== -1) {
  61358. return;
  61359. }
  61360. if (measureIndex !== -1) {
  61361. var nextMeasureText = selectionStartText.slice(measureIndex + nextMeasurePrefix.length);
  61362. var validateMeasure = validateSearch(nextMeasureText, split);
  61363. var matchOption = !!getOptions(nextMeasureText).length;
  61364. if (validateMeasure) {
  61365. // adding AltGraph also fort azert keyboard
  61366. if (key === nextMeasurePrefix || key === 'Shift' || which === KeyCode["default"].ALT || key === 'AltGraph' || mergedMeasuring || nextMeasureText !== mergedMeasureText && matchOption) {
  61367. startMeasure(nextMeasureText, nextMeasurePrefix, measureIndex);
  61368. }
  61369. } else if (mergedMeasuring) {
  61370. // Stop if measureText is invalidate
  61371. stopMeasure();
  61372. }
  61373. /**
  61374. * We will trigger `onSearch` to developer since they may use for async update.
  61375. * If met `space` means user finished searching.
  61376. */
  61377. if (onSearch && validateMeasure) {
  61378. onSearch(nextMeasureText, nextMeasurePrefix);
  61379. }
  61380. } else if (mergedMeasuring) {
  61381. stopMeasure();
  61382. }
  61383. };
  61384. var onInternalPressEnter = function onInternalPressEnter(event) {
  61385. if (!mergedMeasuring && onPressEnter) {
  61386. onPressEnter(event);
  61387. }
  61388. };
  61389. // ============================ Focus Blur ============================
  61390. var focusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  61391. var onInternalFocus = function onInternalFocus(event) {
  61392. window.clearTimeout(focusRef.current);
  61393. if (!isFocus && event && onFocus) {
  61394. onFocus(event);
  61395. }
  61396. setIsFocus(true);
  61397. };
  61398. var onInternalBlur = function onInternalBlur(event) {
  61399. focusRef.current = window.setTimeout(function () {
  61400. setIsFocus(false);
  61401. stopMeasure();
  61402. onBlur === null || onBlur === void 0 || onBlur(event);
  61403. }, 0);
  61404. };
  61405. var onDropdownFocus = function onDropdownFocus() {
  61406. onInternalFocus();
  61407. };
  61408. var onDropdownBlur = function onDropdownBlur() {
  61409. onInternalBlur();
  61410. };
  61411. // ============================== Scroll ===============================
  61412. var onInternalPopupScroll = function onInternalPopupScroll(event) {
  61413. onPopupScroll === null || onPopupScroll === void 0 || onPopupScroll(event);
  61414. };
  61415. // ============================== Render ==============================
  61416. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  61417. className: classnames_default()(prefixCls, className),
  61418. style: style,
  61419. ref: containerRef
  61420. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_textarea_es, (0,esm_extends["default"])({
  61421. ref: textareaRef,
  61422. value: mergedValue
  61423. }, restProps, {
  61424. rows: rows,
  61425. onChange: onInternalChange,
  61426. onKeyDown: onInternalKeyDown,
  61427. onKeyUp: onInternalKeyUp,
  61428. onPressEnter: onInternalPressEnter,
  61429. onFocus: onInternalFocus,
  61430. onBlur: onInternalBlur
  61431. })), mergedMeasuring && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  61432. ref: measureRef,
  61433. className: "".concat(prefixCls, "-measure")
  61434. }, mergedValue.slice(0, mergedMeasureLocation), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_MentionsContext.Provider, {
  61435. value: {
  61436. notFoundContent: notFoundContent,
  61437. activeIndex: activeIndex,
  61438. setActiveIndex: setActiveIndex,
  61439. selectOption: selectOption,
  61440. onFocus: onDropdownFocus,
  61441. onBlur: onDropdownBlur,
  61442. onScroll: onInternalPopupScroll
  61443. }
  61444. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_KeywordTrigger, {
  61445. prefixCls: prefixCls,
  61446. transitionName: transitionName,
  61447. placement: placement,
  61448. direction: direction,
  61449. options: mergedOptions,
  61450. visible: true,
  61451. getPopupContainer: getPopupContainer,
  61452. dropdownClassName: dropdownClassName
  61453. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, mergedMeasurePrefix))), mergedValue.slice(mergedMeasureLocation + mergedMeasurePrefix.length)));
  61454. });
  61455. var Mentions = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (_ref3, ref) {
  61456. var suffix = _ref3.suffix,
  61457. _ref3$prefixCls = _ref3.prefixCls,
  61458. prefixCls = _ref3$prefixCls === void 0 ? 'rc-mentions' : _ref3$prefixCls,
  61459. defaultValue = _ref3.defaultValue,
  61460. customValue = _ref3.value,
  61461. allowClear = _ref3.allowClear,
  61462. onChange = _ref3.onChange,
  61463. classes = _ref3.classNames,
  61464. className = _ref3.className,
  61465. disabled = _ref3.disabled,
  61466. onClear = _ref3.onClear,
  61467. rest = (0,objectWithoutProperties["default"])(_ref3, Mentions_excluded2);
  61468. // =============================== Ref ================================
  61469. var holderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  61470. var mentionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  61471. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
  61472. var _holderRef$current, _mentionRef$current;
  61473. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mentionRef.current), {}, {
  61474. nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || ((_mentionRef$current = mentionRef.current) === null || _mentionRef$current === void 0 ? void 0 : _mentionRef$current.nativeElement)
  61475. });
  61476. });
  61477. // ============================== Value ===============================
  61478. var _useMergedState3 = (0,useMergedState["default"])('', {
  61479. defaultValue: defaultValue,
  61480. value: customValue
  61481. }),
  61482. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  61483. mergedValue = _useMergedState4[0],
  61484. setMergedValue = _useMergedState4[1];
  61485. // ============================== Change ==============================
  61486. var triggerChange = function triggerChange(currentValue) {
  61487. setMergedValue(currentValue);
  61488. onChange === null || onChange === void 0 || onChange(currentValue);
  61489. };
  61490. // ============================== Reset ===============================
  61491. var handleReset = function handleReset() {
  61492. triggerChange('');
  61493. };
  61494. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_BaseInput, {
  61495. suffix: suffix,
  61496. prefixCls: prefixCls,
  61497. value: mergedValue,
  61498. allowClear: allowClear,
  61499. handleReset: handleReset,
  61500. className: className,
  61501. classNames: classes,
  61502. disabled: disabled,
  61503. ref: holderRef,
  61504. onClear: onClear
  61505. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InternalMentions, (0,esm_extends["default"])({
  61506. className: classes === null || classes === void 0 ? void 0 : classes.mentions,
  61507. prefixCls: prefixCls,
  61508. ref: mentionRef,
  61509. onChange: triggerChange,
  61510. disabled: disabled
  61511. }, rest)));
  61512. });
  61513. Mentions.Option = rc_mentions_es_Option;
  61514. /* harmony default export */ var es_Mentions = (Mentions);
  61515. ;// ./node_modules/rc-mentions/es/index.js
  61516. /* harmony default export */ var rc_mentions_es = (es_Mentions);
  61517. ;// ./components/_util/toList.ts
  61518. const toList = (candidate, skipEmpty = false) => {
  61519. if (skipEmpty && (candidate === undefined || candidate === null)) {
  61520. return [];
  61521. }
  61522. return Array.isArray(candidate) ? candidate : [candidate];
  61523. };
  61524. /* harmony default export */ var _util_toList = (toList);
  61525. // EXTERNAL MODULE: ./components/mentions/style/index.ts
  61526. var mentions_style = __webpack_require__("./components/mentions/style/index.ts");
  61527. ;// ./components/mentions/index.tsx
  61528. var mentions_rest = undefined && undefined.__rest || function (s, e) {
  61529. var t = {};
  61530. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  61531. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  61532. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  61533. }
  61534. return t;
  61535. };
  61536. const {
  61537. Option: mentions_Option
  61538. } = rc_mentions_es;
  61539. function loadingFilterOption() {
  61540. return true;
  61541. }
  61542. const mentions_InternalMentions = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  61543. const {
  61544. prefixCls: customizePrefixCls,
  61545. className,
  61546. rootClassName,
  61547. disabled,
  61548. loading,
  61549. filterOption,
  61550. children,
  61551. notFoundContent,
  61552. options,
  61553. status: customStatus,
  61554. allowClear = false,
  61555. popupClassName,
  61556. style,
  61557. variant: customVariant
  61558. } = props,
  61559. restProps = mentions_rest(props, ["prefixCls", "className", "rootClassName", "disabled", "loading", "filterOption", "children", "notFoundContent", "options", "status", "allowClear", "popupClassName", "style", "variant"]);
  61560. const [focused, setFocused] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  61561. const innerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  61562. const mergedRef = (0,es_ref.composeRef)(ref, innerRef);
  61563. // =================== Warning =====================
  61564. if (true) {
  61565. const warning = (0,_util_warning.devUseWarning)('Mentions');
  61566. warning.deprecated(!children, 'Mentions.Option', 'options');
  61567. }
  61568. const {
  61569. getPrefixCls,
  61570. renderEmpty,
  61571. direction,
  61572. mentions: contextMentions
  61573. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  61574. const {
  61575. status: contextStatus,
  61576. hasFeedback,
  61577. feedbackIcon
  61578. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  61579. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  61580. const onFocus = (...args) => {
  61581. if (restProps.onFocus) {
  61582. restProps.onFocus.apply(restProps, args);
  61583. }
  61584. setFocused(true);
  61585. };
  61586. const onBlur = (...args) => {
  61587. if (restProps.onBlur) {
  61588. restProps.onBlur.apply(restProps, args);
  61589. }
  61590. setFocused(false);
  61591. };
  61592. const notFoundContentEle = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  61593. if (notFoundContent !== undefined) {
  61594. return notFoundContent;
  61595. }
  61596. return (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  61597. componentName: "Select"
  61598. });
  61599. }, [notFoundContent, renderEmpty]);
  61600. const mentionOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  61601. if (loading) {
  61602. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(mentions_Option, {
  61603. value: "ANTD_SEARCHING",
  61604. disabled: true
  61605. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, {
  61606. size: "small"
  61607. }));
  61608. }
  61609. return children;
  61610. }, [loading, children]);
  61611. const mergedOptions = loading ? [{
  61612. value: 'ANTD_SEARCHING',
  61613. disabled: true,
  61614. label: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, {
  61615. size: "small"
  61616. })
  61617. }] : options;
  61618. const mentionsfilterOption = loading ? loadingFilterOption : filterOption;
  61619. const prefixCls = getPrefixCls('mentions', customizePrefixCls);
  61620. const mergedAllowClear = _util_getAllowClear(allowClear);
  61621. // Style
  61622. const rootCls = hooks_useCSSVarCls(prefixCls);
  61623. const [wrapCSSVar, hashId, cssVarCls] = (0,mentions_style["default"])(prefixCls, rootCls);
  61624. const [variant, enableVariantCls] = useVariants('mentions', customVariant);
  61625. const suffixNode = hasFeedback && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, feedbackIcon);
  61626. const mergedClassName = classnames_default()(contextMentions === null || contextMentions === void 0 ? void 0 : contextMentions.className, className, rootClassName, cssVarCls, rootCls);
  61627. const mentions = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_mentions_es, Object.assign({
  61628. silent: loading,
  61629. prefixCls: prefixCls,
  61630. notFoundContent: notFoundContentEle,
  61631. className: mergedClassName,
  61632. disabled: disabled,
  61633. allowClear: mergedAllowClear,
  61634. direction: direction,
  61635. style: Object.assign(Object.assign({}, contextMentions === null || contextMentions === void 0 ? void 0 : contextMentions.style), style)
  61636. }, restProps, {
  61637. filterOption: mentionsfilterOption,
  61638. onFocus: onFocus,
  61639. onBlur: onBlur,
  61640. dropdownClassName: classnames_default()(popupClassName, rootClassName, hashId, cssVarCls, rootCls),
  61641. ref: mergedRef,
  61642. options: mergedOptions,
  61643. suffix: suffixNode,
  61644. classNames: {
  61645. mentions: classnames_default()({
  61646. [`${prefixCls}-disabled`]: disabled,
  61647. [`${prefixCls}-focused`]: focused,
  61648. [`${prefixCls}-rtl`]: direction === 'rtl'
  61649. }, hashId),
  61650. variant: classnames_default()({
  61651. [`${prefixCls}-${variant}`]: enableVariantCls
  61652. }, getStatusClassNames(prefixCls, mergedStatus)),
  61653. affixWrapper: hashId
  61654. }
  61655. }), mentionOptions);
  61656. return wrapCSSVar(mentions);
  61657. });
  61658. const mentions_Mentions = mentions_InternalMentions;
  61659. if (true) {
  61660. mentions_Mentions.displayName = 'Mentions';
  61661. }
  61662. mentions_Mentions.Option = mentions_Option;
  61663. // We don't care debug panel
  61664. /* istanbul ignore next */
  61665. const mentions_PurePanel = _util_PurePanel(mentions_Mentions, undefined, undefined, 'mentions');
  61666. mentions_Mentions._InternalPanelDoNotUseOrYouWillBeFired = mentions_PurePanel;
  61667. mentions_Mentions.getMentions = (value = '', config = {}) => {
  61668. const {
  61669. prefix = '@',
  61670. split = ' '
  61671. } = config;
  61672. const prefixList = _util_toList(prefix);
  61673. return value.split(split).map((str = '') => {
  61674. let hitPrefix = null;
  61675. prefixList.some(prefixStr => {
  61676. const startStr = str.slice(0, prefixStr.length);
  61677. if (startStr === prefixStr) {
  61678. hitPrefix = prefixStr;
  61679. return true;
  61680. }
  61681. return false;
  61682. });
  61683. if (hitPrefix !== null) {
  61684. return {
  61685. prefix: hitPrefix,
  61686. value: str.slice(hitPrefix.length)
  61687. };
  61688. }
  61689. return null;
  61690. }).filter(entity => !!entity && !!entity.value);
  61691. };
  61692. /* harmony default export */ var mentions = (mentions_Mentions);
  61693. ;// ./components/message/index.tsx
  61694. let message = null;
  61695. let act = callback => callback();
  61696. let taskQueue = [];
  61697. let defaultGlobalConfig = {};
  61698. function getGlobalContext() {
  61699. const {
  61700. getContainer,
  61701. duration,
  61702. rtl,
  61703. maxCount,
  61704. top
  61705. } = defaultGlobalConfig;
  61706. const mergedContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || document.body;
  61707. return {
  61708. getContainer: () => mergedContainer,
  61709. duration,
  61710. rtl,
  61711. maxCount,
  61712. top
  61713. };
  61714. }
  61715. const GlobalHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  61716. const {
  61717. messageConfig,
  61718. sync
  61719. } = props;
  61720. const {
  61721. getPrefixCls
  61722. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  61723. const prefixCls = defaultGlobalConfig.prefixCls || getPrefixCls('message');
  61724. const appConfig = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AppConfigContext);
  61725. const [api, holder] = useInternalMessage(Object.assign(Object.assign(Object.assign({}, messageConfig), {
  61726. prefixCls
  61727. }), appConfig.message));
  61728. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => {
  61729. const instance = Object.assign({}, api);
  61730. Object.keys(instance).forEach(method => {
  61731. instance[method] = (...args) => {
  61732. sync();
  61733. return api[method].apply(api, args);
  61734. };
  61735. });
  61736. return {
  61737. instance,
  61738. sync
  61739. };
  61740. });
  61741. return holder;
  61742. });
  61743. const GlobalHolderWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((_, ref) => {
  61744. const [messageConfig, setMessageConfig] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(getGlobalContext);
  61745. const sync = () => {
  61746. setMessageConfig(getGlobalContext);
  61747. };
  61748. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(sync, []);
  61749. const global = globalConfig();
  61750. const rootPrefixCls = global.getRootPrefixCls();
  61751. const rootIconPrefixCls = global.getIconPrefixCls();
  61752. const theme = global.getTheme();
  61753. const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GlobalHolder, {
  61754. ref: ref,
  61755. sync: sync,
  61756. messageConfig: messageConfig
  61757. });
  61758. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(config_provider, {
  61759. prefixCls: rootPrefixCls,
  61760. iconPrefixCls: rootIconPrefixCls,
  61761. theme: theme
  61762. }, global.holderRender ? global.holderRender(dom) : dom);
  61763. });
  61764. const flushMessageQueue = () => {
  61765. if (!message) {
  61766. const holderFragment = document.createDocumentFragment();
  61767. const newMessage = {
  61768. fragment: holderFragment
  61769. };
  61770. message = newMessage;
  61771. // Delay render to avoid sync issue
  61772. act(() => {
  61773. const reactRender = unstableSetRender();
  61774. reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(GlobalHolderWrapper, {
  61775. ref: node => {
  61776. const {
  61777. instance,
  61778. sync
  61779. } = node || {};
  61780. // React 18 test env will throw if call immediately in ref
  61781. Promise.resolve().then(() => {
  61782. if (!newMessage.instance && instance) {
  61783. newMessage.instance = instance;
  61784. newMessage.sync = sync;
  61785. flushMessageQueue();
  61786. }
  61787. });
  61788. }
  61789. }), holderFragment);
  61790. });
  61791. return;
  61792. }
  61793. // Notification not ready
  61794. if (!message.instance) {
  61795. return;
  61796. }
  61797. // >>> Execute task
  61798. taskQueue.forEach(task => {
  61799. const {
  61800. type,
  61801. skipped
  61802. } = task;
  61803. // Only `skipped` when user call notice but cancel it immediately
  61804. // and instance not ready
  61805. if (!skipped) {
  61806. switch (type) {
  61807. case 'open':
  61808. {
  61809. act(() => {
  61810. const closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));
  61811. closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);
  61812. task.setCloseFn(closeFn);
  61813. });
  61814. break;
  61815. }
  61816. case 'destroy':
  61817. act(() => {
  61818. message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);
  61819. });
  61820. break;
  61821. // Other type open
  61822. default:
  61823. {
  61824. act(() => {
  61825. var _message$instance;
  61826. const closeFn = (_message$instance = message.instance)[type].apply(_message$instance, (0,toConsumableArray["default"])(task.args));
  61827. closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);
  61828. task.setCloseFn(closeFn);
  61829. });
  61830. }
  61831. }
  61832. }
  61833. });
  61834. // Clean up
  61835. taskQueue = [];
  61836. };
  61837. // ==============================================================================
  61838. // == Export ==
  61839. // ==============================================================================
  61840. function setMessageGlobalConfig(config) {
  61841. defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);
  61842. // Trigger sync for it
  61843. act(() => {
  61844. var _a;
  61845. (_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);
  61846. });
  61847. }
  61848. function message_open(config) {
  61849. const result = wrapPromiseFn(resolve => {
  61850. let closeFn;
  61851. const task = {
  61852. type: 'open',
  61853. config,
  61854. resolve,
  61855. setCloseFn: fn => {
  61856. closeFn = fn;
  61857. }
  61858. };
  61859. taskQueue.push(task);
  61860. return () => {
  61861. if (closeFn) {
  61862. act(() => {
  61863. closeFn();
  61864. });
  61865. } else {
  61866. task.skipped = true;
  61867. }
  61868. };
  61869. });
  61870. flushMessageQueue();
  61871. return result;
  61872. }
  61873. function typeOpen(type, args) {
  61874. const global = globalConfig();
  61875. if ( true && !global.holderRender) {
  61876. warnContext('message');
  61877. }
  61878. const result = wrapPromiseFn(resolve => {
  61879. let closeFn;
  61880. const task = {
  61881. type,
  61882. args,
  61883. resolve,
  61884. setCloseFn: fn => {
  61885. closeFn = fn;
  61886. }
  61887. };
  61888. taskQueue.push(task);
  61889. return () => {
  61890. if (closeFn) {
  61891. act(() => {
  61892. closeFn();
  61893. });
  61894. } else {
  61895. task.skipped = true;
  61896. }
  61897. };
  61898. });
  61899. flushMessageQueue();
  61900. return result;
  61901. }
  61902. const destroy = key => {
  61903. taskQueue.push({
  61904. type: 'destroy',
  61905. key
  61906. });
  61907. flushMessageQueue();
  61908. };
  61909. const methods = ['success', 'info', 'warning', 'error', 'loading'];
  61910. const baseStaticMethods = {
  61911. open: message_open,
  61912. destroy,
  61913. config: setMessageGlobalConfig,
  61914. useMessage: useMessage,
  61915. _InternalPanelDoNotUseOrYouWillBeFired: message_PurePanel
  61916. };
  61917. const staticMethods = baseStaticMethods;
  61918. methods.forEach(type => {
  61919. staticMethods[type] = (...args) => typeOpen(type, args);
  61920. });
  61921. // ==============================================================================
  61922. // == Test ==
  61923. // ==============================================================================
  61924. const message_noop = () => {};
  61925. let _actWrapper = message_noop;
  61926. if (false) // removed by dead control flow
  61927. {}
  61928. const actWrapper = _actWrapper;
  61929. let _actDestroy = message_noop;
  61930. if (false) // removed by dead control flow
  61931. {}
  61932. const actDestroy = _actDestroy;
  61933. /* harmony default export */ var components_message = (staticMethods);
  61934. ;// ./components/modal/PurePanel.tsx
  61935. var modal_PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  61936. var t = {};
  61937. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  61938. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  61939. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  61940. }
  61941. return t;
  61942. };
  61943. const modal_PurePanel_PurePanel = props => {
  61944. const {
  61945. prefixCls: customizePrefixCls,
  61946. className,
  61947. closeIcon,
  61948. closable,
  61949. type,
  61950. title,
  61951. children,
  61952. footer
  61953. } = props,
  61954. restProps = modal_PurePanel_rest(props, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]);
  61955. const {
  61956. getPrefixCls
  61957. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  61958. const rootPrefixCls = getPrefixCls();
  61959. const prefixCls = customizePrefixCls || getPrefixCls('modal');
  61960. const rootCls = hooks_useCSSVarCls(rootPrefixCls);
  61961. const [wrapCSSVar, hashId, cssVarCls] = (0,modal_style["default"])(prefixCls, rootCls);
  61962. const confirmPrefixCls = `${prefixCls}-confirm`;
  61963. // Choose target props by confirm mark
  61964. let additionalProps = {};
  61965. if (type) {
  61966. additionalProps = {
  61967. closable: closable !== null && closable !== void 0 ? closable : false,
  61968. title: '',
  61969. footer: '',
  61970. children: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ConfirmContent, Object.assign({}, props, {
  61971. prefixCls: prefixCls,
  61972. confirmPrefixCls: confirmPrefixCls,
  61973. rootPrefixCls: rootPrefixCls,
  61974. content: children
  61975. })))
  61976. };
  61977. } else {
  61978. additionalProps = {
  61979. closable: closable !== null && closable !== void 0 ? closable : true,
  61980. title,
  61981. footer: footer !== null && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer, Object.assign({}, props)),
  61982. children
  61983. };
  61984. }
  61985. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Content_Panel, Object.assign({
  61986. prefixCls: prefixCls,
  61987. className: classnames_default()(hashId, `${prefixCls}-pure-panel`, type && confirmPrefixCls, type && `${confirmPrefixCls}-${type}`, className, cssVarCls, rootCls)
  61988. }, restProps, {
  61989. closeIcon: renderCloseIcon(prefixCls, closeIcon),
  61990. closable: closable
  61991. }, additionalProps)));
  61992. };
  61993. /* harmony default export */ var modal_PurePanel = (withPureRenderTheme(modal_PurePanel_PurePanel));
  61994. ;// ./components/modal/index.tsx
  61995. function modalWarn(props) {
  61996. return confirm_confirm(withWarn(props));
  61997. }
  61998. const components_modal_Modal = modal_Modal;
  61999. components_modal_Modal.useModal = modal_useModal;
  62000. components_modal_Modal.info = function infoFn(props) {
  62001. return confirm_confirm(withInfo(props));
  62002. };
  62003. components_modal_Modal.success = function successFn(props) {
  62004. return confirm_confirm(withSuccess(props));
  62005. };
  62006. components_modal_Modal.error = function errorFn(props) {
  62007. return confirm_confirm(withError(props));
  62008. };
  62009. components_modal_Modal.warning = modalWarn;
  62010. components_modal_Modal.warn = modalWarn;
  62011. components_modal_Modal.confirm = function confirmFn(props) {
  62012. return confirm_confirm(withConfirm(props));
  62013. };
  62014. components_modal_Modal.destroyAll = function destroyAllFn() {
  62015. while (modal_destroyFns.length) {
  62016. const close = modal_destroyFns.pop();
  62017. if (close) {
  62018. close();
  62019. }
  62020. }
  62021. };
  62022. components_modal_Modal.config = modalGlobalConfig;
  62023. components_modal_Modal._InternalPanelDoNotUseOrYouWillBeFired = modal_PurePanel;
  62024. if (true) {
  62025. components_modal_Modal.displayName = 'Modal';
  62026. }
  62027. /* harmony default export */ var modal = (components_modal_Modal);
  62028. ;// ./components/notification/index.tsx
  62029. let notification = null;
  62030. let notification_act = callback => callback();
  62031. let notification_taskQueue = [];
  62032. let notification_defaultGlobalConfig = {};
  62033. function notification_getGlobalContext() {
  62034. const {
  62035. getContainer,
  62036. rtl,
  62037. maxCount,
  62038. top,
  62039. bottom,
  62040. showProgress,
  62041. pauseOnHover
  62042. } = notification_defaultGlobalConfig;
  62043. const mergedContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || document.body;
  62044. return {
  62045. getContainer: () => mergedContainer,
  62046. rtl,
  62047. maxCount,
  62048. top,
  62049. bottom,
  62050. showProgress,
  62051. pauseOnHover
  62052. };
  62053. }
  62054. const notification_GlobalHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  62055. const {
  62056. notificationConfig,
  62057. sync
  62058. } = props;
  62059. const {
  62060. getPrefixCls
  62061. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  62062. const prefixCls = notification_defaultGlobalConfig.prefixCls || getPrefixCls('notification');
  62063. const appConfig = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AppConfigContext);
  62064. const [api, holder] = useInternalNotification(Object.assign(Object.assign(Object.assign({}, notificationConfig), {
  62065. prefixCls
  62066. }), appConfig.notification));
  62067. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(sync, []);
  62068. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => {
  62069. const instance = Object.assign({}, api);
  62070. Object.keys(instance).forEach(method => {
  62071. instance[method] = (...args) => {
  62072. sync();
  62073. return api[method].apply(api, args);
  62074. };
  62075. });
  62076. return {
  62077. instance,
  62078. sync
  62079. };
  62080. });
  62081. return holder;
  62082. });
  62083. const notification_GlobalHolderWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((_, ref) => {
  62084. const [notificationConfig, setNotificationConfig] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(notification_getGlobalContext);
  62085. const sync = () => {
  62086. setNotificationConfig(notification_getGlobalContext);
  62087. };
  62088. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(sync, []);
  62089. const global = globalConfig();
  62090. const rootPrefixCls = global.getRootPrefixCls();
  62091. const rootIconPrefixCls = global.getIconPrefixCls();
  62092. const theme = global.getTheme();
  62093. const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(notification_GlobalHolder, {
  62094. ref: ref,
  62095. sync: sync,
  62096. notificationConfig: notificationConfig
  62097. });
  62098. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(config_provider, {
  62099. prefixCls: rootPrefixCls,
  62100. iconPrefixCls: rootIconPrefixCls,
  62101. theme: theme
  62102. }, global.holderRender ? global.holderRender(dom) : dom);
  62103. });
  62104. const flushNotificationQueue = () => {
  62105. if (!notification) {
  62106. const holderFragment = document.createDocumentFragment();
  62107. const newNotification = {
  62108. fragment: holderFragment
  62109. };
  62110. notification = newNotification;
  62111. // Delay render to avoid sync issue
  62112. notification_act(() => {
  62113. const reactRender = unstableSetRender();
  62114. reactRender(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(notification_GlobalHolderWrapper, {
  62115. ref: node => {
  62116. const {
  62117. instance,
  62118. sync
  62119. } = node || {};
  62120. Promise.resolve().then(() => {
  62121. if (!newNotification.instance && instance) {
  62122. newNotification.instance = instance;
  62123. newNotification.sync = sync;
  62124. flushNotificationQueue();
  62125. }
  62126. });
  62127. }
  62128. }), holderFragment);
  62129. });
  62130. return;
  62131. }
  62132. // Notification not ready
  62133. if (!notification.instance) {
  62134. return;
  62135. }
  62136. // >>> Execute task
  62137. notification_taskQueue.forEach(task => {
  62138. switch (task.type) {
  62139. case 'open':
  62140. {
  62141. notification_act(() => {
  62142. notification.instance.open(Object.assign(Object.assign({}, notification_defaultGlobalConfig), task.config));
  62143. });
  62144. break;
  62145. }
  62146. case 'destroy':
  62147. notification_act(() => {
  62148. var _a;
  62149. (_a = notification === null || notification === void 0 ? void 0 : notification.instance) === null || _a === void 0 ? void 0 : _a.destroy(task.key);
  62150. });
  62151. break;
  62152. }
  62153. });
  62154. // Clean up
  62155. notification_taskQueue = [];
  62156. };
  62157. // ==============================================================================
  62158. // == Export ==
  62159. // ==============================================================================
  62160. function setNotificationGlobalConfig(config) {
  62161. notification_defaultGlobalConfig = Object.assign(Object.assign({}, notification_defaultGlobalConfig), config);
  62162. // Trigger sync for it
  62163. notification_act(() => {
  62164. var _a;
  62165. (_a = notification === null || notification === void 0 ? void 0 : notification.sync) === null || _a === void 0 ? void 0 : _a.call(notification);
  62166. });
  62167. }
  62168. function notification_open(config) {
  62169. const global = globalConfig();
  62170. if ( true && !global.holderRender) {
  62171. warnContext('notification');
  62172. }
  62173. notification_taskQueue.push({
  62174. type: 'open',
  62175. config
  62176. });
  62177. flushNotificationQueue();
  62178. }
  62179. const notification_destroy = key => {
  62180. notification_taskQueue.push({
  62181. type: 'destroy',
  62182. key
  62183. });
  62184. flushNotificationQueue();
  62185. };
  62186. const notification_methods = ['success', 'info', 'warning', 'error'];
  62187. const notification_baseStaticMethods = {
  62188. open: notification_open,
  62189. destroy: notification_destroy,
  62190. config: setNotificationGlobalConfig,
  62191. useNotification: useNotification_useNotification,
  62192. _InternalPanelDoNotUseOrYouWillBeFired: notification_PurePanel
  62193. };
  62194. const notification_staticMethods = notification_baseStaticMethods;
  62195. notification_methods.forEach(type => {
  62196. notification_staticMethods[type] = config => notification_open(Object.assign(Object.assign({}, config), {
  62197. type
  62198. }));
  62199. });
  62200. // ==============================================================================
  62201. // == Test ==
  62202. // ==============================================================================
  62203. const notification_noop = () => {};
  62204. let notification_actWrapper = notification_noop;
  62205. if (false) // removed by dead control flow
  62206. {}
  62207. const components_notification_actWrapper = notification_actWrapper;
  62208. let notification_actDestroy = notification_noop;
  62209. if (false) // removed by dead control flow
  62210. {}
  62211. const components_notification_actDestroy = notification_actDestroy;
  62212. /* harmony default export */ var components_notification = (notification_staticMethods);
  62213. // EXTERNAL MODULE: ./components/popconfirm/style/index.ts
  62214. var popconfirm_style = __webpack_require__("./components/popconfirm/style/index.ts");
  62215. ;// ./components/popconfirm/PurePanel.tsx
  62216. var popconfirm_PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  62217. var t = {};
  62218. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  62219. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  62220. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  62221. }
  62222. return t;
  62223. };
  62224. const PurePanel_Overlay = props => {
  62225. const {
  62226. prefixCls,
  62227. okButtonProps,
  62228. cancelButtonProps,
  62229. title,
  62230. description,
  62231. cancelText,
  62232. okText,
  62233. okType = 'primary',
  62234. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
  62235. showCancel = true,
  62236. close,
  62237. onConfirm,
  62238. onCancel,
  62239. onPopupClick
  62240. } = props;
  62241. const {
  62242. getPrefixCls
  62243. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  62244. const [contextLocale] = (0,useLocale["default"])('Popconfirm', en_US["default"].Popconfirm);
  62245. const titleNode = getRenderPropValue(title);
  62246. const descriptionNode = getRenderPropValue(description);
  62247. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62248. className: `${prefixCls}-inner-content`,
  62249. onClick: onPopupClick
  62250. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62251. className: `${prefixCls}-message`
  62252. }, icon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  62253. className: `${prefixCls}-message-icon`
  62254. }, icon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62255. className: `${prefixCls}-message-text`
  62256. }, titleNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62257. className: `${prefixCls}-title`
  62258. }, titleNode), descriptionNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62259. className: `${prefixCls}-description`
  62260. }, descriptionNode))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62261. className: `${prefixCls}-buttons`
  62262. }, showCancel && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({
  62263. onClick: onCancel,
  62264. size: "small"
  62265. }, cancelButtonProps), cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(_util_ActionButton, {
  62266. buttonProps: Object.assign(Object.assign({
  62267. size: 'small'
  62268. }, convertLegacyProps(okType)), okButtonProps),
  62269. actionFn: onConfirm,
  62270. close: close,
  62271. prefixCls: getPrefixCls('btn'),
  62272. quitOnNullishReturnValue: true,
  62273. emitEvent: true
  62274. }, okText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText))));
  62275. };
  62276. const popconfirm_PurePanel_PurePanel = props => {
  62277. const {
  62278. prefixCls: customizePrefixCls,
  62279. placement,
  62280. className,
  62281. style
  62282. } = props,
  62283. restProps = popconfirm_PurePanel_rest(props, ["prefixCls", "placement", "className", "style"]);
  62284. const {
  62285. getPrefixCls
  62286. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  62287. const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
  62288. const [wrapCSSVar] = (0,popconfirm_style["default"])(prefixCls);
  62289. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(popover_PurePanel, {
  62290. placement: placement,
  62291. className: classnames_default()(prefixCls, className),
  62292. style: style,
  62293. content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PurePanel_Overlay, Object.assign({
  62294. prefixCls: prefixCls
  62295. }, restProps))
  62296. }));
  62297. };
  62298. /* harmony default export */ var popconfirm_PurePanel = (popconfirm_PurePanel_PurePanel);
  62299. ;// ./components/popconfirm/index.tsx
  62300. var popconfirm_rest = undefined && undefined.__rest || function (s, e) {
  62301. var t = {};
  62302. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  62303. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  62304. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  62305. }
  62306. return t;
  62307. };
  62308. const InternalPopconfirm = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  62309. var _a, _b;
  62310. const {
  62311. prefixCls: customizePrefixCls,
  62312. placement = 'top',
  62313. trigger = 'click',
  62314. okType = 'primary',
  62315. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_ExclamationCircleFilled, null),
  62316. children,
  62317. overlayClassName,
  62318. onOpenChange,
  62319. onVisibleChange,
  62320. overlayStyle,
  62321. styles,
  62322. classNames: popconfirmClassNames
  62323. } = props,
  62324. restProps = popconfirm_rest(props, ["prefixCls", "placement", "trigger", "okType", "icon", "children", "overlayClassName", "onOpenChange", "onVisibleChange", "overlayStyle", "styles", "classNames"]);
  62325. const {
  62326. getPrefixCls,
  62327. className: contextClassName,
  62328. style: contextStyle,
  62329. classNames: contextClassNames,
  62330. styles: contextStyles
  62331. } = (0,config_provider_context.useComponentConfig)('popconfirm');
  62332. const [open, setOpen] = (0,useMergedState["default"])(false, {
  62333. value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,
  62334. defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible
  62335. });
  62336. const settingOpen = (value, e) => {
  62337. setOpen(value, true);
  62338. onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(value);
  62339. onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);
  62340. };
  62341. const close = e => {
  62342. settingOpen(false, e);
  62343. };
  62344. const onConfirm = e => {
  62345. var _a;
  62346. return (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
  62347. };
  62348. const onCancel = e => {
  62349. var _a;
  62350. settingOpen(false, e);
  62351. (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
  62352. };
  62353. const onInternalOpenChange = (value, e) => {
  62354. const {
  62355. disabled = false
  62356. } = props;
  62357. if (disabled) {
  62358. return;
  62359. }
  62360. settingOpen(value, e);
  62361. };
  62362. const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
  62363. const rootClassNames = classnames_default()(prefixCls, contextClassName, overlayClassName, contextClassNames.root, popconfirmClassNames === null || popconfirmClassNames === void 0 ? void 0 : popconfirmClassNames.root);
  62364. const bodyClassNames = classnames_default()(contextClassNames.body, popconfirmClassNames === null || popconfirmClassNames === void 0 ? void 0 : popconfirmClassNames.body);
  62365. const [wrapCSSVar] = (0,popconfirm_style["default"])(prefixCls);
  62366. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(popover, Object.assign({}, (0,omit["default"])(restProps, ['title']), {
  62367. trigger: trigger,
  62368. placement: placement,
  62369. onOpenChange: onInternalOpenChange,
  62370. open: open,
  62371. ref: ref,
  62372. classNames: {
  62373. root: rootClassNames,
  62374. body: bodyClassNames
  62375. },
  62376. styles: {
  62377. root: Object.assign(Object.assign(Object.assign(Object.assign({}, contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
  62378. body: Object.assign(Object.assign({}, contextStyles.body), styles === null || styles === void 0 ? void 0 : styles.body)
  62379. },
  62380. content: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(PurePanel_Overlay, Object.assign({
  62381. okType: okType,
  62382. icon: icon
  62383. }, props, {
  62384. prefixCls: prefixCls,
  62385. close: close,
  62386. onConfirm: onConfirm,
  62387. onCancel: onCancel
  62388. })),
  62389. "data-popover-inject": true
  62390. }), children));
  62391. });
  62392. const Popconfirm = InternalPopconfirm;
  62393. // We don't care debug panel
  62394. /* istanbul ignore next */
  62395. Popconfirm._InternalPanelDoNotUseOrYouWillBeFired = popconfirm_PurePanel;
  62396. if (true) {
  62397. Popconfirm.displayName = 'Popconfirm';
  62398. }
  62399. /* harmony default export */ var popconfirm = (Popconfirm);
  62400. ;// ./node_modules/rc-progress/es/common.js
  62401. var common_defaultProps = {
  62402. percent: 0,
  62403. prefixCls: 'rc-progress',
  62404. strokeColor: '#2db7f5',
  62405. strokeLinecap: 'round',
  62406. strokeWidth: 1,
  62407. trailColor: '#D9D9D9',
  62408. trailWidth: 1,
  62409. gapPosition: 'bottom'
  62410. };
  62411. var useTransitionDuration = function useTransitionDuration() {
  62412. var pathsRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
  62413. var prevTimeStamp = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  62414. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  62415. var now = Date.now();
  62416. var updated = false;
  62417. pathsRef.current.forEach(function (path) {
  62418. if (!path) {
  62419. return;
  62420. }
  62421. updated = true;
  62422. var pathStyle = path.style;
  62423. pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
  62424. if (prevTimeStamp.current && now - prevTimeStamp.current < 100) {
  62425. pathStyle.transitionDuration = '0s, 0s';
  62426. }
  62427. });
  62428. if (updated) {
  62429. prevTimeStamp.current = Date.now();
  62430. }
  62431. });
  62432. return pathsRef.current;
  62433. };
  62434. ;// ./node_modules/rc-progress/es/Line.js
  62435. var Line_excluded = ["className", "percent", "prefixCls", "strokeColor", "strokeLinecap", "strokeWidth", "style", "trailColor", "trailWidth", "transition"];
  62436. var Line = function Line(props) {
  62437. var _defaultProps$props = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common_defaultProps), props),
  62438. className = _defaultProps$props.className,
  62439. percent = _defaultProps$props.percent,
  62440. prefixCls = _defaultProps$props.prefixCls,
  62441. strokeColor = _defaultProps$props.strokeColor,
  62442. strokeLinecap = _defaultProps$props.strokeLinecap,
  62443. strokeWidth = _defaultProps$props.strokeWidth,
  62444. style = _defaultProps$props.style,
  62445. trailColor = _defaultProps$props.trailColor,
  62446. trailWidth = _defaultProps$props.trailWidth,
  62447. transition = _defaultProps$props.transition,
  62448. restProps = (0,objectWithoutProperties["default"])(_defaultProps$props, Line_excluded);
  62449. // eslint-disable-next-line no-param-reassign
  62450. delete restProps.gapPosition;
  62451. var percentList = Array.isArray(percent) ? percent : [percent];
  62452. var strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor];
  62453. var paths = useTransitionDuration();
  62454. var center = strokeWidth / 2;
  62455. var right = 100 - strokeWidth / 2;
  62456. var pathString = "M ".concat(strokeLinecap === 'round' ? center : 0, ",").concat(center, "\n L ").concat(strokeLinecap === 'round' ? right : 100, ",").concat(center);
  62457. var viewBoxString = "0 0 100 ".concat(strokeWidth);
  62458. var stackPtg = 0;
  62459. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", (0,esm_extends["default"])({
  62460. className: classnames_default()("".concat(prefixCls, "-line"), className),
  62461. viewBox: viewBoxString,
  62462. preserveAspectRatio: "none",
  62463. style: style
  62464. }, restProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  62465. className: "".concat(prefixCls, "-line-trail"),
  62466. d: pathString,
  62467. strokeLinecap: strokeLinecap,
  62468. stroke: trailColor,
  62469. strokeWidth: trailWidth || strokeWidth,
  62470. fillOpacity: "0"
  62471. }), percentList.map(function (ptg, index) {
  62472. var dashPercent = 1;
  62473. switch (strokeLinecap) {
  62474. case 'round':
  62475. dashPercent = 1 - strokeWidth / 100;
  62476. break;
  62477. case 'square':
  62478. dashPercent = 1 - strokeWidth / 2 / 100;
  62479. break;
  62480. default:
  62481. dashPercent = 1;
  62482. break;
  62483. }
  62484. var pathStyle = {
  62485. strokeDasharray: "".concat(ptg * dashPercent, "px, 100px"),
  62486. strokeDashoffset: "-".concat(stackPtg, "px"),
  62487. transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear'
  62488. };
  62489. var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
  62490. stackPtg += ptg;
  62491. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  62492. key: index,
  62493. className: "".concat(prefixCls, "-line-path"),
  62494. d: pathString,
  62495. strokeLinecap: strokeLinecap,
  62496. stroke: color,
  62497. strokeWidth: strokeWidth,
  62498. fillOpacity: "0",
  62499. ref: function ref(elem) {
  62500. // https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
  62501. // React will call the ref callback with the DOM element when the component mounts,
  62502. // and call it with `null` when it unmounts.
  62503. // Refs are guaranteed to be up-to-date before componentDidMount or componentDidUpdate fires.
  62504. paths[index] = elem;
  62505. },
  62506. style: pathStyle
  62507. });
  62508. }));
  62509. };
  62510. if (true) {
  62511. Line.displayName = 'Line';
  62512. }
  62513. /* harmony default export */ var es_Line = (Line);
  62514. ;// ./node_modules/rc-progress/es/hooks/useId.js
  62515. var es_hooks_useId_uuid = 0;
  62516. /** Is client side and not jsdom */
  62517. var hooks_useId_isBrowserClient = true && (0,canUseDom["default"])();
  62518. /** Get unique id for accessibility usage */
  62519. function useId_getUUID() {
  62520. var retId;
  62521. // Test never reach
  62522. /* istanbul ignore if */
  62523. if (hooks_useId_isBrowserClient) {
  62524. retId = es_hooks_useId_uuid;
  62525. es_hooks_useId_uuid += 1;
  62526. } else {
  62527. retId = 'TEST_OR_SSR';
  62528. }
  62529. return retId;
  62530. }
  62531. /* harmony default export */ var es_hooks_useId = (function (id) {
  62532. // Inner id for accessibility usage. Only work in client side
  62533. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(),
  62534. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  62535. innerId = _React$useState2[0],
  62536. setInnerId = _React$useState2[1];
  62537. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  62538. setInnerId("rc_progress_".concat(useId_getUUID()));
  62539. }, []);
  62540. return id || innerId;
  62541. });
  62542. ;// ./node_modules/rc-progress/es/Circle/PtgCircle.js
  62543. var Block = function Block(_ref) {
  62544. var bg = _ref.bg,
  62545. children = _ref.children;
  62546. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62547. style: {
  62548. width: '100%',
  62549. height: '100%',
  62550. background: bg
  62551. }
  62552. }, children);
  62553. };
  62554. function getPtgColors(color, scale) {
  62555. return Object.keys(color).map(function (key) {
  62556. var parsedKey = parseFloat(key);
  62557. var ptgKey = "".concat(Math.floor(parsedKey * scale), "%");
  62558. return "".concat(color[key], " ").concat(ptgKey);
  62559. });
  62560. }
  62561. var PtgCircle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  62562. var prefixCls = props.prefixCls,
  62563. color = props.color,
  62564. gradientId = props.gradientId,
  62565. radius = props.radius,
  62566. circleStyleForStack = props.style,
  62567. ptg = props.ptg,
  62568. strokeLinecap = props.strokeLinecap,
  62569. strokeWidth = props.strokeWidth,
  62570. size = props.size,
  62571. gapDegree = props.gapDegree;
  62572. var isGradient = color && (0,esm_typeof["default"])(color) === 'object';
  62573. var stroke = isGradient ? "#FFF" : undefined;
  62574. // ========================== Circle ==========================
  62575. var halfSize = size / 2;
  62576. var circleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  62577. className: "".concat(prefixCls, "-circle-path"),
  62578. r: radius,
  62579. cx: halfSize,
  62580. cy: halfSize,
  62581. stroke: stroke,
  62582. strokeLinecap: strokeLinecap,
  62583. strokeWidth: strokeWidth,
  62584. opacity: ptg === 0 ? 0 : 1,
  62585. style: circleStyleForStack,
  62586. ref: ref
  62587. });
  62588. // ========================== Render ==========================
  62589. if (!isGradient) {
  62590. return circleNode;
  62591. }
  62592. var maskId = "".concat(gradientId, "-conic");
  62593. var fromDeg = gapDegree ? "".concat(180 + gapDegree / 2, "deg") : '0deg';
  62594. var conicColors = getPtgColors(color, (360 - gapDegree) / 360);
  62595. var linearColors = getPtgColors(color, 1);
  62596. var conicColorBg = "conic-gradient(from ".concat(fromDeg, ", ").concat(conicColors.join(', '), ")");
  62597. var linearColorBg = "linear-gradient(to ".concat(gapDegree ? 'bottom' : 'top', ", ").concat(linearColors.join(', '), ")");
  62598. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("mask", {
  62599. id: maskId
  62600. }, circleNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("foreignObject", {
  62601. x: 0,
  62602. y: 0,
  62603. width: size,
  62604. height: size,
  62605. mask: "url(#".concat(maskId, ")")
  62606. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Block, {
  62607. bg: linearColorBg
  62608. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Block, {
  62609. bg: conicColorBg
  62610. }))));
  62611. });
  62612. if (true) {
  62613. PtgCircle.displayName = 'PtgCircle';
  62614. }
  62615. /* harmony default export */ var Circle_PtgCircle = (PtgCircle);
  62616. ;// ./node_modules/rc-progress/es/Circle/util.js
  62617. var VIEW_BOX_SIZE = 100;
  62618. var getCircleStyle = function getCircleStyle(perimeter, perimeterWithoutGap, offset, percent, rotateDeg, gapDegree, gapPosition, strokeColor, strokeLinecap, strokeWidth) {
  62619. var stepSpace = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
  62620. var offsetDeg = offset / 100 * 360 * ((360 - gapDegree) / 360);
  62621. var positionDeg = gapDegree === 0 ? 0 : {
  62622. bottom: 0,
  62623. top: 180,
  62624. left: 90,
  62625. right: -90
  62626. }[gapPosition];
  62627. var strokeDashoffset = (100 - percent) / 100 * perimeterWithoutGap;
  62628. // Fix percent accuracy when strokeLinecap is round
  62629. // https://github.com/ant-design/ant-design/issues/35009
  62630. if (strokeLinecap === 'round' && percent !== 100) {
  62631. strokeDashoffset += strokeWidth / 2;
  62632. // when percent is small enough (<= 1%), keep smallest value to avoid it's disappearance
  62633. if (strokeDashoffset >= perimeterWithoutGap) {
  62634. strokeDashoffset = perimeterWithoutGap - 0.01;
  62635. }
  62636. }
  62637. var halfSize = VIEW_BOX_SIZE / 2;
  62638. return {
  62639. stroke: typeof strokeColor === 'string' ? strokeColor : undefined,
  62640. strokeDasharray: "".concat(perimeterWithoutGap, "px ").concat(perimeter),
  62641. strokeDashoffset: strokeDashoffset + stepSpace,
  62642. transform: "rotate(".concat(rotateDeg + offsetDeg + positionDeg, "deg)"),
  62643. transformOrigin: "".concat(halfSize, "px ").concat(halfSize, "px"),
  62644. transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s',
  62645. fillOpacity: 0
  62646. };
  62647. };
  62648. ;// ./node_modules/rc-progress/es/Circle/index.js
  62649. var Circle_excluded = ["id", "prefixCls", "steps", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor", "percent"];
  62650. function Circle_toArray(value) {
  62651. var mergedValue = value !== null && value !== void 0 ? value : [];
  62652. return Array.isArray(mergedValue) ? mergedValue : [mergedValue];
  62653. }
  62654. var Circle = function Circle(props) {
  62655. var _defaultProps$props = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, common_defaultProps), props),
  62656. id = _defaultProps$props.id,
  62657. prefixCls = _defaultProps$props.prefixCls,
  62658. steps = _defaultProps$props.steps,
  62659. strokeWidth = _defaultProps$props.strokeWidth,
  62660. trailWidth = _defaultProps$props.trailWidth,
  62661. _defaultProps$props$g = _defaultProps$props.gapDegree,
  62662. gapDegree = _defaultProps$props$g === void 0 ? 0 : _defaultProps$props$g,
  62663. gapPosition = _defaultProps$props.gapPosition,
  62664. trailColor = _defaultProps$props.trailColor,
  62665. strokeLinecap = _defaultProps$props.strokeLinecap,
  62666. style = _defaultProps$props.style,
  62667. className = _defaultProps$props.className,
  62668. strokeColor = _defaultProps$props.strokeColor,
  62669. percent = _defaultProps$props.percent,
  62670. restProps = (0,objectWithoutProperties["default"])(_defaultProps$props, Circle_excluded);
  62671. var halfSize = VIEW_BOX_SIZE / 2;
  62672. var mergedId = es_hooks_useId(id);
  62673. var gradientId = "".concat(mergedId, "-gradient");
  62674. var radius = halfSize - strokeWidth / 2;
  62675. var perimeter = Math.PI * 2 * radius;
  62676. var rotateDeg = gapDegree > 0 ? 90 + gapDegree / 2 : -90;
  62677. var perimeterWithoutGap = perimeter * ((360 - gapDegree) / 360);
  62678. var _ref = (0,esm_typeof["default"])(steps) === 'object' ? steps : {
  62679. count: steps,
  62680. gap: 2
  62681. },
  62682. stepCount = _ref.count,
  62683. stepGap = _ref.gap;
  62684. var percentList = Circle_toArray(percent);
  62685. var strokeColorList = Circle_toArray(strokeColor);
  62686. var gradient = strokeColorList.find(function (color) {
  62687. return color && (0,esm_typeof["default"])(color) === 'object';
  62688. });
  62689. var isConicGradient = gradient && (0,esm_typeof["default"])(gradient) === 'object';
  62690. var mergedStrokeLinecap = isConicGradient ? 'butt' : strokeLinecap;
  62691. var circleStyle = getCircleStyle(perimeter, perimeterWithoutGap, 0, 100, rotateDeg, gapDegree, gapPosition, trailColor, mergedStrokeLinecap, strokeWidth);
  62692. var paths = useTransitionDuration();
  62693. var getStokeList = function getStokeList() {
  62694. var stackPtg = 0;
  62695. return percentList.map(function (ptg, index) {
  62696. var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
  62697. var circleStyleForStack = getCircleStyle(perimeter, perimeterWithoutGap, stackPtg, ptg, rotateDeg, gapDegree, gapPosition, color, mergedStrokeLinecap, strokeWidth);
  62698. stackPtg += ptg;
  62699. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Circle_PtgCircle, {
  62700. key: index,
  62701. color: color,
  62702. ptg: ptg,
  62703. radius: radius,
  62704. prefixCls: prefixCls,
  62705. gradientId: gradientId,
  62706. style: circleStyleForStack,
  62707. strokeLinecap: mergedStrokeLinecap,
  62708. strokeWidth: strokeWidth,
  62709. gapDegree: gapDegree,
  62710. ref: function ref(elem) {
  62711. // https://reactjs.org/docs/refs-and-the-dom.html#callback-refs
  62712. // React will call the ref callback with the DOM element when the component mounts,
  62713. // and call it with `null` when it unmounts.
  62714. // Refs are guaranteed to be up-to-date before componentDidMount or componentDidUpdate fires.
  62715. paths[index] = elem;
  62716. },
  62717. size: VIEW_BOX_SIZE
  62718. });
  62719. }).reverse();
  62720. };
  62721. var getStepStokeList = function getStepStokeList() {
  62722. // only show the first percent when pass steps
  62723. var current = Math.round(stepCount * (percentList[0] / 100));
  62724. var stepPtg = 100 / stepCount;
  62725. var stackPtg = 0;
  62726. return new Array(stepCount).fill(null).map(function (_, index) {
  62727. var color = index <= current - 1 ? strokeColorList[0] : trailColor;
  62728. var stroke = color && (0,esm_typeof["default"])(color) === 'object' ? "url(#".concat(gradientId, ")") : undefined;
  62729. var circleStyleForStack = getCircleStyle(perimeter, perimeterWithoutGap, stackPtg, stepPtg, rotateDeg, gapDegree, gapPosition, color, 'butt', strokeWidth, stepGap);
  62730. stackPtg += (perimeterWithoutGap - circleStyleForStack.strokeDashoffset + stepGap) * 100 / perimeterWithoutGap;
  62731. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  62732. key: index,
  62733. className: "".concat(prefixCls, "-circle-path"),
  62734. r: radius,
  62735. cx: halfSize,
  62736. cy: halfSize,
  62737. stroke: stroke,
  62738. strokeWidth: strokeWidth,
  62739. opacity: 1,
  62740. style: circleStyleForStack,
  62741. ref: function ref(elem) {
  62742. paths[index] = elem;
  62743. }
  62744. });
  62745. });
  62746. };
  62747. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", (0,esm_extends["default"])({
  62748. className: classnames_default()("".concat(prefixCls, "-circle"), className),
  62749. viewBox: "0 0 ".concat(VIEW_BOX_SIZE, " ").concat(VIEW_BOX_SIZE),
  62750. style: style,
  62751. id: id,
  62752. role: "presentation"
  62753. }, restProps), !stepCount && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  62754. className: "".concat(prefixCls, "-circle-trail"),
  62755. r: radius,
  62756. cx: halfSize,
  62757. cy: halfSize,
  62758. stroke: trailColor,
  62759. strokeLinecap: mergedStrokeLinecap,
  62760. strokeWidth: trailWidth || strokeWidth,
  62761. style: circleStyle
  62762. }), stepCount ? getStepStokeList() : getStokeList());
  62763. };
  62764. if (true) {
  62765. Circle.displayName = 'Circle';
  62766. }
  62767. /* harmony default export */ var es_Circle = (Circle);
  62768. ;// ./node_modules/rc-progress/es/index.js
  62769. /* harmony default export */ var rc_progress_es = ({
  62770. Line: es_Line,
  62771. Circle: es_Circle
  62772. });
  62773. ;// ./components/progress/utils.ts
  62774. function validProgress(progress) {
  62775. if (!progress || progress < 0) {
  62776. return 0;
  62777. }
  62778. if (progress > 100) {
  62779. return 100;
  62780. }
  62781. return progress;
  62782. }
  62783. function getSuccessPercent({
  62784. success,
  62785. successPercent
  62786. }) {
  62787. let percent = successPercent;
  62788. /** @deprecated Use `percent` instead */
  62789. if (success && 'progress' in success) {
  62790. percent = success.progress;
  62791. }
  62792. if (success && 'percent' in success) {
  62793. percent = success.percent;
  62794. }
  62795. return percent;
  62796. }
  62797. const getPercentage = ({
  62798. percent,
  62799. success,
  62800. successPercent
  62801. }) => {
  62802. const realSuccessPercent = validProgress(getSuccessPercent({
  62803. success,
  62804. successPercent
  62805. }));
  62806. return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];
  62807. };
  62808. const getStrokeColor = ({
  62809. success = {},
  62810. strokeColor
  62811. }) => {
  62812. const {
  62813. strokeColor: successColor
  62814. } = success;
  62815. return [successColor || colors_es.presetPrimaryColors.green, strokeColor || null];
  62816. };
  62817. const utils_getSize = (size, type, extra) => {
  62818. var _a, _b, _c, _d;
  62819. let width = -1;
  62820. let height = -1;
  62821. if (type === 'step') {
  62822. const steps = extra.steps;
  62823. const strokeWidth = extra.strokeWidth;
  62824. if (typeof size === 'string' || typeof size === 'undefined') {
  62825. width = size === 'small' ? 2 : 14;
  62826. height = strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : 8;
  62827. } else if (typeof size === 'number') {
  62828. [width, height] = [size, size];
  62829. } else {
  62830. [width = 14, height = 8] = Array.isArray(size) ? size : [size.width, size.height];
  62831. }
  62832. width *= steps;
  62833. } else if (type === 'line') {
  62834. const strokeWidth = extra === null || extra === void 0 ? void 0 : extra.strokeWidth;
  62835. if (typeof size === 'string' || typeof size === 'undefined') {
  62836. height = strokeWidth || (size === 'small' ? 6 : 8);
  62837. } else if (typeof size === 'number') {
  62838. [width, height] = [size, size];
  62839. } else {
  62840. [width = -1, height = 8] = Array.isArray(size) ? size : [size.width, size.height];
  62841. }
  62842. } else if (type === 'circle' || type === 'dashboard') {
  62843. if (typeof size === 'string' || typeof size === 'undefined') {
  62844. [width, height] = size === 'small' ? [60, 60] : [120, 120];
  62845. } else if (typeof size === 'number') {
  62846. [width, height] = [size, size];
  62847. } else if (Array.isArray(size)) {
  62848. width = (_b = (_a = size[0]) !== null && _a !== void 0 ? _a : size[1]) !== null && _b !== void 0 ? _b : 120;
  62849. height = (_d = (_c = size[0]) !== null && _c !== void 0 ? _c : size[1]) !== null && _d !== void 0 ? _d : 120;
  62850. }
  62851. }
  62852. return [width, height];
  62853. };
  62854. ;// ./components/progress/Circle.tsx
  62855. const CIRCLE_MIN_STROKE_WIDTH = 3;
  62856. const getMinPercent = width => CIRCLE_MIN_STROKE_WIDTH / width * 100;
  62857. const Circle_Circle = props => {
  62858. const {
  62859. prefixCls,
  62860. trailColor = null,
  62861. strokeLinecap = 'round',
  62862. gapPosition,
  62863. gapDegree,
  62864. width: originWidth = 120,
  62865. type,
  62866. children,
  62867. success,
  62868. size = originWidth,
  62869. steps
  62870. } = props;
  62871. const [width, height] = utils_getSize(size, 'circle');
  62872. let {
  62873. strokeWidth
  62874. } = props;
  62875. if (strokeWidth === undefined) {
  62876. strokeWidth = Math.max(getMinPercent(width), 6);
  62877. }
  62878. const circleStyle = {
  62879. width,
  62880. height,
  62881. fontSize: width * 0.15 + 6
  62882. };
  62883. const realGapDegree = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  62884. // Support gapDeg = 0 when type = 'dashboard'
  62885. if (gapDegree || gapDegree === 0) {
  62886. return gapDegree;
  62887. }
  62888. if (type === 'dashboard') {
  62889. return 75;
  62890. }
  62891. return undefined;
  62892. }, [gapDegree, type]);
  62893. const percentArray = getPercentage(props);
  62894. const gapPos = gapPosition || type === 'dashboard' && 'bottom' || undefined;
  62895. // using className to style stroke color
  62896. const isGradient = Object.prototype.toString.call(props.strokeColor) === '[object Object]';
  62897. const strokeColor = getStrokeColor({
  62898. success,
  62899. strokeColor: props.strokeColor
  62900. });
  62901. const wrapperClassName = classnames_default()(`${prefixCls}-inner`, {
  62902. [`${prefixCls}-circle-gradient`]: isGradient
  62903. });
  62904. const circleContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Circle, {
  62905. steps: steps,
  62906. percent: steps ? percentArray[1] : percentArray,
  62907. strokeWidth: strokeWidth,
  62908. trailWidth: strokeWidth,
  62909. strokeColor: steps ? strokeColor[1] : strokeColor,
  62910. strokeLinecap: strokeLinecap,
  62911. trailColor: trailColor,
  62912. prefixCls: prefixCls,
  62913. gapDegree: realGapDegree,
  62914. gapPosition: gapPos
  62915. });
  62916. const smallCircle = width <= 20;
  62917. const node = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  62918. className: wrapperClassName,
  62919. style: circleStyle
  62920. }, circleContent, !smallCircle && children);
  62921. if (smallCircle) {
  62922. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
  62923. title: children
  62924. }, node);
  62925. }
  62926. return node;
  62927. };
  62928. /* harmony default export */ var progress_Circle = (Circle_Circle);
  62929. // EXTERNAL MODULE: ./components/progress/style/index.ts
  62930. var progress_style = __webpack_require__("./components/progress/style/index.ts");
  62931. ;// ./components/progress/Line.tsx
  62932. var Line_rest = undefined && undefined.__rest || function (s, e) {
  62933. var t = {};
  62934. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  62935. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  62936. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  62937. }
  62938. return t;
  62939. };
  62940. /**
  62941. * @example
  62942. * {
  62943. * "0%": "#afc163",
  62944. * "75%": "#009900",
  62945. * "50%": "green", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
  62946. * "25%": "#66FF00",
  62947. * "100%": "#ffffff"
  62948. * }
  62949. */
  62950. const sortGradient = gradients => {
  62951. let tempArr = [];
  62952. Object.keys(gradients).forEach(key => {
  62953. const formattedKey = parseFloat(key.replace(/%/g, ''));
  62954. if (!Number.isNaN(formattedKey)) {
  62955. tempArr.push({
  62956. key: formattedKey,
  62957. value: gradients[key]
  62958. });
  62959. }
  62960. });
  62961. tempArr = tempArr.sort((a, b) => a.key - b.key);
  62962. return tempArr.map(({
  62963. key,
  62964. value
  62965. }) => `${value} ${key}%`).join(', ');
  62966. };
  62967. /**
  62968. * Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and
  62969. * butter, there is the bug. And... Besides women, there is the code.
  62970. *
  62971. * @example
  62972. * {
  62973. * "0%": "#afc163",
  62974. * "25%": "#66FF00",
  62975. * "50%": "#00CC00", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
  62976. * "75%": "#009900", // #00CC00 50%, #009900 75%, #ffffff 100%)
  62977. * "100%": "#ffffff"
  62978. * }
  62979. */
  62980. const handleGradient = (strokeColor, directionConfig) => {
  62981. const {
  62982. from = colors_es.presetPrimaryColors.blue,
  62983. to = colors_es.presetPrimaryColors.blue,
  62984. direction = directionConfig === 'rtl' ? 'to left' : 'to right'
  62985. } = strokeColor,
  62986. rest = Line_rest(strokeColor, ["from", "to", "direction"]);
  62987. if (Object.keys(rest).length !== 0) {
  62988. const sortedGradients = sortGradient(rest);
  62989. const background = `linear-gradient(${direction}, ${sortedGradients})`;
  62990. return {
  62991. background,
  62992. [progress_style.LineStrokeColorVar]: background
  62993. };
  62994. }
  62995. const background = `linear-gradient(${direction}, ${from}, ${to})`;
  62996. return {
  62997. background,
  62998. [progress_style.LineStrokeColorVar]: background
  62999. };
  63000. };
  63001. const Line_Line = props => {
  63002. const {
  63003. prefixCls,
  63004. direction: directionConfig,
  63005. percent,
  63006. size,
  63007. strokeWidth,
  63008. strokeColor,
  63009. strokeLinecap = 'round',
  63010. children,
  63011. trailColor = null,
  63012. percentPosition,
  63013. success
  63014. } = props;
  63015. const {
  63016. align: infoAlign,
  63017. type: infoPosition
  63018. } = percentPosition;
  63019. const backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : {
  63020. [progress_style.LineStrokeColorVar]: strokeColor,
  63021. background: strokeColor
  63022. };
  63023. const borderRadius = strokeLinecap === 'square' || strokeLinecap === 'butt' ? 0 : undefined;
  63024. const mergedSize = size !== null && size !== void 0 ? size : [-1, strokeWidth || (size === 'small' ? 6 : 8)];
  63025. const [width, height] = utils_getSize(mergedSize, 'line', {
  63026. strokeWidth
  63027. });
  63028. if (true) {
  63029. const warning = (0,_util_warning.devUseWarning)('Progress');
  63030. warning.deprecated(!('strokeWidth' in props), 'strokeWidth', 'size');
  63031. }
  63032. const trailStyle = {
  63033. backgroundColor: trailColor || undefined,
  63034. borderRadius
  63035. };
  63036. const percentStyle = Object.assign(Object.assign({
  63037. width: `${validProgress(percent)}%`,
  63038. height,
  63039. borderRadius
  63040. }, backgroundProps), {
  63041. [progress_style.Percent]: validProgress(percent) / 100
  63042. });
  63043. const successPercent = getSuccessPercent(props);
  63044. const successPercentStyle = {
  63045. width: `${validProgress(successPercent)}%`,
  63046. height,
  63047. borderRadius,
  63048. backgroundColor: success === null || success === void 0 ? void 0 : success.strokeColor
  63049. };
  63050. const outerStyle = {
  63051. width: width < 0 ? '100%' : width
  63052. };
  63053. const lineInner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63054. className: `${prefixCls}-inner`,
  63055. style: trailStyle
  63056. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63057. className: classnames_default()(`${prefixCls}-bg`, `${prefixCls}-bg-${infoPosition}`),
  63058. style: percentStyle
  63059. }, infoPosition === 'inner' && children), successPercent !== undefined && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63060. className: `${prefixCls}-success-bg`,
  63061. style: successPercentStyle
  63062. })));
  63063. const isOuterStart = infoPosition === 'outer' && infoAlign === 'start';
  63064. const isOuterEnd = infoPosition === 'outer' && infoAlign === 'end';
  63065. return infoPosition === 'outer' && infoAlign === 'center' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63066. className: `${prefixCls}-layout-bottom`
  63067. }, lineInner, children)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63068. className: `${prefixCls}-outer`,
  63069. style: outerStyle
  63070. }, isOuterStart && children, lineInner, isOuterEnd && children));
  63071. };
  63072. /* harmony default export */ var progress_Line = (Line_Line);
  63073. ;// ./components/progress/Steps.tsx
  63074. const Steps_Steps = props => {
  63075. const {
  63076. size,
  63077. steps,
  63078. rounding: customRounding = Math.round,
  63079. percent = 0,
  63080. strokeWidth = 8,
  63081. strokeColor,
  63082. trailColor = null,
  63083. prefixCls,
  63084. children
  63085. } = props;
  63086. const current = customRounding(steps * (percent / 100));
  63087. const stepWidth = size === 'small' ? 2 : 14;
  63088. const mergedSize = size !== null && size !== void 0 ? size : [stepWidth, strokeWidth];
  63089. const [width, height] = utils_getSize(mergedSize, 'step', {
  63090. steps,
  63091. strokeWidth
  63092. });
  63093. const unitWidth = width / steps;
  63094. const styledSteps = Array.from({
  63095. length: steps
  63096. });
  63097. for (let i = 0; i < steps; i++) {
  63098. const color = Array.isArray(strokeColor) ? strokeColor[i] : strokeColor;
  63099. styledSteps[i] = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63100. key: i,
  63101. className: classnames_default()(`${prefixCls}-steps-item`, {
  63102. [`${prefixCls}-steps-item-active`]: i <= current - 1
  63103. }),
  63104. style: {
  63105. backgroundColor: i <= current - 1 ? color : trailColor,
  63106. width: unitWidth,
  63107. height
  63108. }
  63109. });
  63110. }
  63111. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  63112. className: `${prefixCls}-steps-outer`
  63113. }, styledSteps, children);
  63114. };
  63115. /* harmony default export */ var progress_Steps = (Steps_Steps);
  63116. ;// ./components/progress/progress.tsx
  63117. var progress_rest = undefined && undefined.__rest || function (s, e) {
  63118. var t = {};
  63119. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  63120. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  63121. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  63122. }
  63123. return t;
  63124. };
  63125. const ProgressTypes = ['line', 'circle', 'dashboard'];
  63126. const ProgressStatuses = ['normal', 'exception', 'active', 'success'];
  63127. const progress_Progress = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  63128. const {
  63129. prefixCls: customizePrefixCls,
  63130. className,
  63131. rootClassName,
  63132. steps,
  63133. strokeColor,
  63134. percent = 0,
  63135. size = 'default',
  63136. showInfo = true,
  63137. type = 'line',
  63138. status,
  63139. format,
  63140. style,
  63141. percentPosition = {}
  63142. } = props,
  63143. restProps = progress_rest(props, ["prefixCls", "className", "rootClassName", "steps", "strokeColor", "percent", "size", "showInfo", "type", "status", "format", "style", "percentPosition"]);
  63144. const {
  63145. align: infoAlign = 'end',
  63146. type: infoPosition = 'outer'
  63147. } = percentPosition;
  63148. const strokeColorNotArray = Array.isArray(strokeColor) ? strokeColor[0] : strokeColor;
  63149. const strokeColorNotGradient = typeof strokeColor === 'string' || Array.isArray(strokeColor) ? strokeColor : undefined;
  63150. const strokeColorIsBright = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  63151. if (strokeColorNotArray) {
  63152. const color = typeof strokeColorNotArray === 'string' ? strokeColorNotArray : Object.values(strokeColorNotArray)[0];
  63153. return new fast_color_es.FastColor(color).isLight();
  63154. }
  63155. return false;
  63156. }, [strokeColor]);
  63157. const percentNumber = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  63158. var _a, _b;
  63159. const successPercent = getSuccessPercent(props);
  63160. return parseInt(successPercent !== undefined ? (_a = successPercent !== null && successPercent !== void 0 ? successPercent : 0) === null || _a === void 0 ? void 0 : _a.toString() : (_b = percent !== null && percent !== void 0 ? percent : 0) === null || _b === void 0 ? void 0 : _b.toString(), 10);
  63161. }, [percent, props.success, props.successPercent]);
  63162. const progressStatus = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  63163. if (!ProgressStatuses.includes(status) && percentNumber >= 100) {
  63164. return 'success';
  63165. }
  63166. return status || 'normal';
  63167. }, [status, percentNumber]);
  63168. const {
  63169. getPrefixCls,
  63170. direction,
  63171. progress: progressStyle
  63172. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  63173. const prefixCls = getPrefixCls('progress', customizePrefixCls);
  63174. const [wrapCSSVar, hashId, cssVarCls] = (0,progress_style["default"])(prefixCls);
  63175. const isLineType = type === 'line';
  63176. const isPureLineType = isLineType && !steps;
  63177. const progressInfo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  63178. if (!showInfo) {
  63179. return null;
  63180. }
  63181. const successPercent = getSuccessPercent(props);
  63182. let text;
  63183. const textFormatter = format || (number => `${number}%`);
  63184. const isBrightInnerColor = isLineType && strokeColorIsBright && infoPosition === 'inner';
  63185. if (infoPosition === 'inner' || format || progressStatus !== 'exception' && progressStatus !== 'success') {
  63186. text = textFormatter(validProgress(percent), validProgress(successPercent));
  63187. } else if (progressStatus === 'exception') {
  63188. text = isLineType ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseCircleFilled, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, null);
  63189. } else if (progressStatus === 'success') {
  63190. text = isLineType ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckCircleFilled, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, null);
  63191. }
  63192. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  63193. className: classnames_default()(`${prefixCls}-text`, {
  63194. [`${prefixCls}-text-bright`]: isBrightInnerColor,
  63195. [`${prefixCls}-text-${infoAlign}`]: isPureLineType,
  63196. [`${prefixCls}-text-${infoPosition}`]: isPureLineType
  63197. }),
  63198. title: typeof text === 'string' ? text : undefined
  63199. }, text);
  63200. }, [showInfo, percent, percentNumber, progressStatus, type, prefixCls, format]);
  63201. if (true) {
  63202. const warning = (0,_util_warning.devUseWarning)('Progress');
  63203. warning.deprecated(!('successPercent' in props), 'successPercent', 'success.percent');
  63204. warning.deprecated(!('width' in props), 'width', 'size');
  63205. if (type === 'circle' || type === 'dashboard') {
  63206. if (Array.isArray(size)) {
  63207. true ? warning(false, 'usage', 'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.') : 0;
  63208. } else if (typeof size === 'object') {
  63209. true ? warning(false, 'usage', 'Type "circle" and "dashboard" do not accept object as `size`, please use number or preset size instead.') : 0;
  63210. }
  63211. }
  63212. if (props.success && 'progress' in props.success) {
  63213. warning.deprecated(false, 'success.progress', 'success.percent');
  63214. }
  63215. }
  63216. let progress;
  63217. // Render progress shape
  63218. if (type === 'line') {
  63219. progress = steps ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(progress_Steps, Object.assign({}, props, {
  63220. strokeColor: strokeColorNotGradient,
  63221. prefixCls: prefixCls,
  63222. steps: typeof steps === 'object' ? steps.count : steps
  63223. }), progressInfo)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(progress_Line, Object.assign({}, props, {
  63224. strokeColor: strokeColorNotArray,
  63225. prefixCls: prefixCls,
  63226. direction: direction,
  63227. percentPosition: {
  63228. align: infoAlign,
  63229. type: infoPosition
  63230. }
  63231. }), progressInfo));
  63232. } else if (type === 'circle' || type === 'dashboard') {
  63233. progress = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(progress_Circle, Object.assign({}, props, {
  63234. strokeColor: strokeColorNotArray,
  63235. prefixCls: prefixCls,
  63236. progressStatus: progressStatus
  63237. }), progressInfo);
  63238. }
  63239. const classString = classnames_default()(prefixCls, `${prefixCls}-status-${progressStatus}`, {
  63240. [`${prefixCls}-${type === 'dashboard' && 'circle' || type}`]: type !== 'line',
  63241. [`${prefixCls}-inline-circle`]: type === 'circle' && utils_getSize(size, 'circle')[0] <= 20,
  63242. [`${prefixCls}-line`]: isPureLineType,
  63243. [`${prefixCls}-line-align-${infoAlign}`]: isPureLineType,
  63244. [`${prefixCls}-line-position-${infoPosition}`]: isPureLineType,
  63245. [`${prefixCls}-steps`]: steps,
  63246. [`${prefixCls}-show-info`]: showInfo,
  63247. [`${prefixCls}-${size}`]: typeof size === 'string',
  63248. [`${prefixCls}-rtl`]: direction === 'rtl'
  63249. }, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.className, className, rootClassName, hashId, cssVarCls);
  63250. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({
  63251. ref: ref,
  63252. style: Object.assign(Object.assign({}, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.style), style),
  63253. className: classString,
  63254. role: "progressbar",
  63255. "aria-valuenow": percentNumber,
  63256. "aria-valuemin": 0,
  63257. "aria-valuemax": 100
  63258. }, (0,omit["default"])(restProps, ['trailColor', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeLinecap', 'success', 'successPercent'])), progress));
  63259. });
  63260. if (true) {
  63261. progress_Progress.displayName = 'Progress';
  63262. }
  63263. /* harmony default export */ var progress = (progress_Progress);
  63264. ;// ./components/progress/index.tsx
  63265. /* harmony default export */ var components_progress = (progress);
  63266. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
  63267. var unsupportedIterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  63268. ;// ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
  63269. function _createForOfIteratorHelper(r, e) {
  63270. var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  63271. if (!t) {
  63272. if (Array.isArray(r) || (t = (0,unsupportedIterableToArray["default"])(r)) || e && r && "number" == typeof r.length) {
  63273. t && (r = t);
  63274. var _n = 0,
  63275. F = function F() {};
  63276. return {
  63277. s: F,
  63278. n: function n() {
  63279. return _n >= r.length ? {
  63280. done: !0
  63281. } : {
  63282. done: !1,
  63283. value: r[_n++]
  63284. };
  63285. },
  63286. e: function e(r) {
  63287. throw r;
  63288. },
  63289. f: F
  63290. };
  63291. }
  63292. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  63293. }
  63294. var o,
  63295. a = !0,
  63296. u = !1;
  63297. return {
  63298. s: function s() {
  63299. t = t.call(r);
  63300. },
  63301. n: function n() {
  63302. var r = t.next();
  63303. return a = r.done, r;
  63304. },
  63305. e: function e(r) {
  63306. u = !0, o = r;
  63307. },
  63308. f: function f() {
  63309. try {
  63310. a || null == t["return"] || t["return"]();
  63311. } finally {
  63312. if (u) throw o;
  63313. }
  63314. }
  63315. };
  63316. }
  63317. ;// ./node_modules/@rc-component/qrcode/es/libs/qrcodegen.js
  63318. var _class, _class2;
  63319. // Copyright (c) Project Nayuki. (MIT License)
  63320. // https://www.nayuki.io/page/qr-code-generator-library
  63321. // Modification with code reorder and prettier
  63322. // --------------------------------------------
  63323. // Appends the given number of low-order bits of the given value
  63324. // to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.
  63325. function appendBits(val, len, bb) {
  63326. if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError('Value out of range');
  63327. for (var i = len - 1; i >= 0; i-- // Append bit by bit
  63328. ) bb.push(val >>> i & 1);
  63329. }
  63330. // Returns true iff the i'th bit of x is set to 1.
  63331. function getBit(x, i) {
  63332. return (x >>> i & 1) != 0;
  63333. }
  63334. // Throws an exception if the given condition is false.
  63335. function assert(cond) {
  63336. if (!cond) throw new Error('Assertion error');
  63337. }
  63338. /*---- Public helper enumeration ----*/
  63339. /*
  63340. * Describes how a segment's data bits are numbererpreted. Immutable.
  63341. */
  63342. var Mode = /*#__PURE__*/function () {
  63343. function Mode(modeBits, numBitsCharCount) {
  63344. (0,classCallCheck["default"])(this, Mode);
  63345. /*-- Constructor and fields --*/
  63346. // The mode indicator bits, which is a unumber4 value (range 0 to 15).
  63347. (0,defineProperty["default"])(this, "modeBits", void 0);
  63348. // Number of character count bits for three different version ranges.
  63349. (0,defineProperty["default"])(this, "numBitsCharCount", void 0);
  63350. this.modeBits = modeBits;
  63351. this.numBitsCharCount = numBitsCharCount;
  63352. }
  63353. /*-- Method --*/
  63354. // (Package-private) Returns the bit width of the character count field for a segment in
  63355. // this mode in a QR Code at the given version number. The result is in the range [0, 16].
  63356. (0,createClass["default"])(Mode, [{
  63357. key: "numCharCountBits",
  63358. value: function numCharCountBits(ver) {
  63359. return this.numBitsCharCount[Math.floor((ver + 7) / 17)];
  63360. }
  63361. }]);
  63362. return Mode;
  63363. }();
  63364. /*---- Public helper enumeration ----*/
  63365. /*
  63366. * The error correction level in a QR Code symbol. Immutable.
  63367. */
  63368. _class = Mode;
  63369. /*-- Constants --*/
  63370. (0,defineProperty["default"])(Mode, "NUMERIC", new _class(0x1, [10, 12, 14]));
  63371. (0,defineProperty["default"])(Mode, "ALPHANUMERIC", new _class(0x2, [9, 11, 13]));
  63372. (0,defineProperty["default"])(Mode, "BYTE", new _class(0x4, [8, 16, 16]));
  63373. (0,defineProperty["default"])(Mode, "KANJI", new _class(0x8, [8, 10, 12]));
  63374. (0,defineProperty["default"])(Mode, "ECI", new _class(0x7, [0, 0, 0]));
  63375. var Ecc = /*#__PURE__*/(0,createClass["default"])(function Ecc(ordinal, formatBits) {
  63376. (0,classCallCheck["default"])(this, Ecc);
  63377. // The QR Code can tolerate about 30% erroneous codewords
  63378. /*-- Constructor and fields --*/
  63379. // In the range 0 to 3 (unsigned 2-bit numbereger).
  63380. (0,defineProperty["default"])(this, "ordinal", void 0);
  63381. // (Package-private) In the range 0 to 3 (unsigned 2-bit numbereger).
  63382. (0,defineProperty["default"])(this, "formatBits", void 0);
  63383. this.ordinal = ordinal;
  63384. this.formatBits = formatBits;
  63385. });
  63386. /*
  63387. * A segment of character/binary/control data in a QR Code symbol.
  63388. * Instances of this class are immutable.
  63389. * The mid-level way to create a segment is to take the payload data
  63390. * and call a static factory function such as QrSegment.makeNumeric().
  63391. * The low-level way to create a segment is to custom-make the bit buffer
  63392. * and call the QrSegment() constructor with appropriate values.
  63393. * This segment class imposes no length restrictions, but QR Codes have restrictions.
  63394. * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
  63395. * Any segment longer than this is meaningless for the purpose of generating QR Codes.
  63396. */
  63397. _class2 = Ecc;
  63398. /*-- Constants --*/
  63399. (0,defineProperty["default"])(Ecc, "LOW", new _class2(0, 1));
  63400. // The QR Code can tolerate about 7% erroneous codewords
  63401. (0,defineProperty["default"])(Ecc, "MEDIUM", new _class2(1, 0));
  63402. // The QR Code can tolerate about 15% erroneous codewords
  63403. (0,defineProperty["default"])(Ecc, "QUARTILE", new _class2(2, 3));
  63404. // The QR Code can tolerate about 25% erroneous codewords
  63405. (0,defineProperty["default"])(Ecc, "HIGH", new _class2(3, 2));
  63406. var QrSegment = /*#__PURE__*/function () {
  63407. // Creates a new QR Code segment with the given attributes and data.
  63408. // The character count (numChars) must agree with the mode and the bit buffer length,
  63409. // but the constranumber isn't checked. The given bit buffer is cloned and stored.
  63410. function QrSegment(mode, numChars, bitData) {
  63411. (0,classCallCheck["default"])(this, QrSegment);
  63412. /*-- Constructor (low level) and fields --*/
  63413. // The mode indicator of this segment.
  63414. (0,defineProperty["default"])(this, "mode", void 0);
  63415. // The length of this segment's unencoded data. Measured in characters for
  63416. // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
  63417. // Always zero or positive. Not the same as the data's bit length.
  63418. (0,defineProperty["default"])(this, "numChars", void 0);
  63419. // The data bits of this segment. Accessed through getData().
  63420. (0,defineProperty["default"])(this, "bitData", void 0);
  63421. this.mode = mode;
  63422. this.numChars = numChars;
  63423. this.bitData = bitData;
  63424. if (numChars < 0) throw new RangeError('Invalid argument');
  63425. this.bitData = bitData.slice(); // Make defensive copy
  63426. }
  63427. /*-- Methods --*/
  63428. // Returns a new copy of the data bits of this segment.
  63429. (0,createClass["default"])(QrSegment, [{
  63430. key: "getData",
  63431. value: function getData() {
  63432. return this.bitData.slice(); // Make defensive copy
  63433. }
  63434. // (Package-private) Calculates and returns the number of bits needed to encode the given segments at
  63435. // the given version. The result is infinity if a segment has too many characters to fit its length field.
  63436. }], [{
  63437. key: "makeBytes",
  63438. value: /*-- Static factory functions (mid level) --*/
  63439. // Returns a segment representing the given binary data encoded in
  63440. // byte mode. All input byte arrays are acceptable. Any text string
  63441. // can be converted to UTF-8 bytes and encoded as a byte mode segment.
  63442. function makeBytes(data) {
  63443. var bb = [];
  63444. var _iterator = _createForOfIteratorHelper(data),
  63445. _step;
  63446. try {
  63447. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  63448. var b = _step.value;
  63449. appendBits(b, 8, bb);
  63450. }
  63451. } catch (err) {
  63452. _iterator.e(err);
  63453. } finally {
  63454. _iterator.f();
  63455. }
  63456. return new QrSegment(Mode.BYTE, data.length, bb);
  63457. }
  63458. // Returns a segment representing the given string of decimal digits encoded in numeric mode.
  63459. }, {
  63460. key: "makeNumeric",
  63461. value: function makeNumeric(digits) {
  63462. if (!QrSegment.isNumeric(digits)) throw new RangeError('String contains non-numeric characters');
  63463. var bb = [];
  63464. for (var i = 0; i < digits.length;) {
  63465. // Consume up to 3 digits per iteration
  63466. var n = Math.min(digits.length - i, 3);
  63467. appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);
  63468. i += n;
  63469. }
  63470. return new QrSegment(Mode.NUMERIC, digits.length, bb);
  63471. }
  63472. // Returns a segment representing the given text string encoded in alphanumeric mode.
  63473. // The characters allowed are: 0 to 9, A to Z (uppercase only), space,
  63474. // dollar, percent, asterisk, plus, hyphen, period, slash, colon.
  63475. }, {
  63476. key: "makeAlphanumeric",
  63477. value: function makeAlphanumeric(text) {
  63478. if (!QrSegment.isAlphanumeric(text)) throw new RangeError('String contains unencodable characters in alphanumeric mode');
  63479. var bb = [];
  63480. var i;
  63481. for (i = 0; i + 2 <= text.length; i += 2) {
  63482. // Process groups of 2
  63483. var temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;
  63484. temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));
  63485. appendBits(temp, 11, bb);
  63486. }
  63487. if (i < text.length)
  63488. // 1 character remaining
  63489. appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);
  63490. return new QrSegment(Mode.ALPHANUMERIC, text.length, bb);
  63491. }
  63492. // Returns a new mutable list of zero or more segments to represent the given Unicode text string.
  63493. // The result may use various segment modes and switch modes to optimize the length of the bit stream.
  63494. }, {
  63495. key: "makeSegments",
  63496. value: function makeSegments(text) {
  63497. // Select the most efficient segment encoding automatically
  63498. if (text == '') return [];else if (QrSegment.isNumeric(text)) return [QrSegment.makeNumeric(text)];else if (QrSegment.isAlphanumeric(text)) return [QrSegment.makeAlphanumeric(text)];else return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];
  63499. }
  63500. // Returns a segment representing an Extended Channel Interpretation
  63501. // (ECI) designator with the given assignment value.
  63502. }, {
  63503. key: "makeEci",
  63504. value: function makeEci(assignVal) {
  63505. var bb = [];
  63506. if (assignVal < 0) throw new RangeError('ECI assignment value out of range');else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);else if (assignVal < 1 << 14) {
  63507. appendBits(2, 2, bb);
  63508. appendBits(assignVal, 14, bb);
  63509. } else if (assignVal < 1000000) {
  63510. appendBits(6, 3, bb);
  63511. appendBits(assignVal, 21, bb);
  63512. } else throw new RangeError('ECI assignment value out of range');
  63513. return new QrSegment(Mode.ECI, 0, bb);
  63514. }
  63515. // Tests whether the given string can be encoded as a segment in numeric mode.
  63516. // A string is encodable iff each character is in the range 0 to 9.
  63517. }, {
  63518. key: "isNumeric",
  63519. value: function isNumeric(text) {
  63520. return QrSegment.NUMERIC_REGEX.test(text);
  63521. }
  63522. // Tests whether the given string can be encoded as a segment in alphanumeric mode.
  63523. // A string is encodable iff each character is in the following set: 0 to 9, A to Z
  63524. // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
  63525. }, {
  63526. key: "isAlphanumeric",
  63527. value: function isAlphanumeric(text) {
  63528. return QrSegment.ALPHANUMERIC_REGEX.test(text);
  63529. }
  63530. }, {
  63531. key: "getTotalBits",
  63532. value: function getTotalBits(segs, version) {
  63533. var result = 0;
  63534. var _iterator2 = _createForOfIteratorHelper(segs),
  63535. _step2;
  63536. try {
  63537. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  63538. var seg = _step2.value;
  63539. var ccbits = seg.mode.numCharCountBits(version);
  63540. if (seg.numChars >= 1 << ccbits) return Infinity; // The segment's length doesn't fit the field's bit width
  63541. result += 4 + ccbits + seg.bitData.length;
  63542. }
  63543. } catch (err) {
  63544. _iterator2.e(err);
  63545. } finally {
  63546. _iterator2.f();
  63547. }
  63548. return result;
  63549. }
  63550. // Returns a new array of bytes representing the given string encoded in UTF-8.
  63551. }, {
  63552. key: "toUtf8ByteArray",
  63553. value: function toUtf8ByteArray(input) {
  63554. var str = encodeURI(input);
  63555. var result = [];
  63556. for (var i = 0; i < str.length; i++) {
  63557. if (str.charAt(i) != '%') result.push(str.charCodeAt(i));else {
  63558. result.push(parseInt(str.substring(i + 1, i + 3), 16));
  63559. i += 2;
  63560. }
  63561. }
  63562. return result;
  63563. }
  63564. /*-- Constants --*/
  63565. // Describes precisely all strings that are encodable in numeric mode.
  63566. }]);
  63567. return QrSegment;
  63568. }();
  63569. /*
  63570. * A QR Code symbol, which is a type of two-dimension barcode.
  63571. * Invented by Denso Wave and described in the ISO/IEC 18004 standard.
  63572. * Instances of this class represent an immutable square grid of dark and light cells.
  63573. * The class provides static factory functions to create a QR Code from text or binary data.
  63574. * The class covers the QR Code Model 2 specification, supporting all versions (sizes)
  63575. * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.
  63576. *
  63577. * Ways to create a QR Code object:
  63578. * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().
  63579. * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().
  63580. * - Low level: Custom-make the array of data codeword bytes (including
  63581. * segment headers and final padding, excluding error correction codewords),
  63582. * supply the appropriate version number, and call the QrCode() constructor.
  63583. * (Note that all ways require supplying the desired error correction level.)
  63584. */
  63585. (0,defineProperty["default"])(QrSegment, "NUMERIC_REGEX", /^[0-9]*$/);
  63586. // Describes precisely all strings that are encodable in alphanumeric mode.
  63587. (0,defineProperty["default"])(QrSegment, "ALPHANUMERIC_REGEX", /^[A-Z0-9 $%*+.\/:-]*$/);
  63588. // The set of all legal characters in alphanumeric mode,
  63589. // where each character value maps to the index in the string.
  63590. (0,defineProperty["default"])(QrSegment, "ALPHANUMERIC_CHARSET", '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:');
  63591. var QrCode = /*#__PURE__*/function () {
  63592. // Creates a new QR Code with the given version number,
  63593. // error correction level, data codeword bytes, and mask number.
  63594. // This is a low-level API that most users should not use directly.
  63595. // A mid-level API is the encodeSegments() function.
  63596. function QrCode(
  63597. // The version number of this QR Code, which is between 1 and 40 (inclusive).
  63598. // This determines the size of this barcode.
  63599. version,
  63600. // The error correction level used in this QR Code.
  63601. errorCorrectionLevel, dataCodewords, oriMsk) {
  63602. (0,classCallCheck["default"])(this, QrCode);
  63603. /*-- Fields --*/
  63604. // The width and height of this QR Code, measured in modules, between
  63605. // 21 and 177 (inclusive). This is equal to version * 4 + 17.
  63606. (0,defineProperty["default"])(this, "size", void 0);
  63607. // The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).
  63608. // Even if a QR Code is created with automatic masking requested (mask = -1),
  63609. // the resulting object still has a mask value between 0 and 7.
  63610. (0,defineProperty["default"])(this, "mask", void 0);
  63611. // The modules of this QR Code (false = light, true = dark).
  63612. // Immutable after constructor finishes. Accessed through getModule().
  63613. (0,defineProperty["default"])(this, "modules", []);
  63614. // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.
  63615. (0,defineProperty["default"])(this, "isFunction", []);
  63616. /*-- Constructor (low level) and fields --*/
  63617. // The version number of this QR Code, which is between 1 and 40 (inclusive).
  63618. // This determines the size of this barcode.
  63619. (0,defineProperty["default"])(this, "version", void 0);
  63620. // The error correction level used in this QR Code.
  63621. (0,defineProperty["default"])(this, "errorCorrectionLevel", void 0);
  63622. var msk = oriMsk;
  63623. this.version = version;
  63624. this.errorCorrectionLevel = errorCorrectionLevel;
  63625. // Check scalar arguments
  63626. if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION) throw new RangeError('Version value out of range');
  63627. if (msk < -1 || msk > 7) throw new RangeError('Mask value out of range');
  63628. this.size = version * 4 + 17;
  63629. // Initialize both grids to be size*size arrays of Boolean false
  63630. var row = [];
  63631. for (var i = 0; i < this.size; i++) row.push(false);
  63632. for (var _i = 0; _i < this.size; _i++) {
  63633. this.modules.push(row.slice()); // Initially all light
  63634. this.isFunction.push(row.slice());
  63635. }
  63636. // Compute ECC, draw modules
  63637. this.drawFunctionPatterns();
  63638. var allCodewords = this.addEccAndInterleave(dataCodewords);
  63639. this.drawCodewords(allCodewords);
  63640. // Do masking
  63641. if (msk == -1) {
  63642. // Automatically choose best mask
  63643. var minPenalty = 1000000000;
  63644. for (var _i2 = 0; _i2 < 8; _i2++) {
  63645. this.applyMask(_i2);
  63646. this.drawFormatBits(_i2);
  63647. var penalty = this.getPenaltyScore();
  63648. if (penalty < minPenalty) {
  63649. msk = _i2;
  63650. minPenalty = penalty;
  63651. }
  63652. this.applyMask(_i2); // Undoes the mask due to XOR
  63653. }
  63654. }
  63655. assert(0 <= msk && msk <= 7);
  63656. this.mask = msk;
  63657. this.applyMask(msk); // Apply the final choice of mask
  63658. this.drawFormatBits(msk); // Overwrite old format bits
  63659. this.isFunction = [];
  63660. }
  63661. /*-- Accessor methods --*/
  63662. // Returns the color of the module (pixel) at the given coordinates, which is false
  63663. // for light or true for dark. The top left corner has the coordinates (x=0, y=0).
  63664. // If the given coordinates are out of bounds, then false (light) is returned.
  63665. (0,createClass["default"])(QrCode, [{
  63666. key: "getModule",
  63667. value: function getModule(x, y) {
  63668. return 0 <= x && x < this.size && 0 <= y && y < this.size && this.modules[y][x];
  63669. }
  63670. // Modified to expose modules for easy access
  63671. }, {
  63672. key: "getModules",
  63673. value: function getModules() {
  63674. return this.modules;
  63675. }
  63676. /*-- Private helper methods for constructor: Drawing function modules --*/
  63677. // Reads this object's version field, and draws and marks all function modules.
  63678. }, {
  63679. key: "drawFunctionPatterns",
  63680. value: function drawFunctionPatterns() {
  63681. // Draw horizontal and vertical timing patterns
  63682. for (var i = 0; i < this.size; i++) {
  63683. this.setFunctionModule(6, i, i % 2 == 0);
  63684. this.setFunctionModule(i, 6, i % 2 == 0);
  63685. }
  63686. // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
  63687. this.drawFinderPattern(3, 3);
  63688. this.drawFinderPattern(this.size - 4, 3);
  63689. this.drawFinderPattern(3, this.size - 4);
  63690. // Draw numerous alignment patterns
  63691. var alignPatPos = this.getAlignmentPatternPositions();
  63692. var numAlign = alignPatPos.length;
  63693. for (var _i3 = 0; _i3 < numAlign; _i3++) {
  63694. for (var j = 0; j < numAlign; j++) {
  63695. // Don't draw on the three finder corners
  63696. if (!(_i3 == 0 && j == 0 || _i3 == 0 && j == numAlign - 1 || _i3 == numAlign - 1 && j == 0)) this.drawAlignmentPattern(alignPatPos[_i3], alignPatPos[j]);
  63697. }
  63698. }
  63699. // Draw configuration data
  63700. this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor
  63701. this.drawVersion();
  63702. }
  63703. // Draws two copies of the format bits (with its own error correction code)
  63704. // based on the given mask and this object's error correction level field.
  63705. }, {
  63706. key: "drawFormatBits",
  63707. value: function drawFormatBits(mask) {
  63708. // Calculate error correction code and pack bits
  63709. var data = this.errorCorrectionLevel.formatBits << 3 | mask; // errCorrLvl is unumber2, mask is unumber3
  63710. var rem = data;
  63711. for (var i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 0x537;
  63712. var bits = (data << 10 | rem) ^ 0x5412; // unumber15
  63713. assert(bits >>> 15 == 0);
  63714. // Draw first copy
  63715. for (var _i4 = 0; _i4 <= 5; _i4++) this.setFunctionModule(8, _i4, getBit(bits, _i4));
  63716. this.setFunctionModule(8, 7, getBit(bits, 6));
  63717. this.setFunctionModule(8, 8, getBit(bits, 7));
  63718. this.setFunctionModule(7, 8, getBit(bits, 8));
  63719. for (var _i5 = 9; _i5 < 15; _i5++) this.setFunctionModule(14 - _i5, 8, getBit(bits, _i5));
  63720. // Draw second copy
  63721. for (var _i6 = 0; _i6 < 8; _i6++) this.setFunctionModule(this.size - 1 - _i6, 8, getBit(bits, _i6));
  63722. for (var _i7 = 8; _i7 < 15; _i7++) this.setFunctionModule(8, this.size - 15 + _i7, getBit(bits, _i7));
  63723. this.setFunctionModule(8, this.size - 8, true); // Always dark
  63724. }
  63725. // Draws two copies of the version bits (with its own error correction code),
  63726. // based on this object's version field, iff 7 <= version <= 40.
  63727. }, {
  63728. key: "drawVersion",
  63729. value: function drawVersion() {
  63730. if (this.version < 7) return;
  63731. // Calculate error correction code and pack bits
  63732. var rem = this.version; // version is unumber6, in the range [7, 40]
  63733. for (var i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 0x1f25;
  63734. var bits = this.version << 12 | rem; // unumber18
  63735. assert(bits >>> 18 == 0);
  63736. // Draw two copies
  63737. for (var _i8 = 0; _i8 < 18; _i8++) {
  63738. var color = getBit(bits, _i8);
  63739. var a = this.size - 11 + _i8 % 3;
  63740. var b = Math.floor(_i8 / 3);
  63741. this.setFunctionModule(a, b, color);
  63742. this.setFunctionModule(b, a, color);
  63743. }
  63744. }
  63745. // Draws a 9*9 finder pattern including the border separator,
  63746. // with the center module at (x, y). Modules can be out of bounds.
  63747. }, {
  63748. key: "drawFinderPattern",
  63749. value: function drawFinderPattern(x, y) {
  63750. for (var dy = -4; dy <= 4; dy++) {
  63751. for (var dx = -4; dx <= 4; dx++) {
  63752. var dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm
  63753. var xx = x + dx;
  63754. var yy = y + dy;
  63755. if (0 <= xx && xx < this.size && 0 <= yy && yy < this.size) this.setFunctionModule(xx, yy, dist != 2 && dist != 4);
  63756. }
  63757. }
  63758. }
  63759. // Draws a 5*5 alignment pattern, with the center module
  63760. // at (x, y). All modules must be in bounds.
  63761. }, {
  63762. key: "drawAlignmentPattern",
  63763. value: function drawAlignmentPattern(x, y) {
  63764. for (var dy = -2; dy <= 2; dy++) {
  63765. for (var dx = -2; dx <= 2; dx++) this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);
  63766. }
  63767. }
  63768. // Sets the color of a module and marks it as a function module.
  63769. // Only used by the constructor. Coordinates must be in bounds.
  63770. }, {
  63771. key: "setFunctionModule",
  63772. value: function setFunctionModule(x, y, isDark) {
  63773. this.modules[y][x] = isDark;
  63774. this.isFunction[y][x] = true;
  63775. }
  63776. /*-- Private helper methods for constructor: Codewords and masking --*/
  63777. // Returns a new byte string representing the given data with the appropriate error correction
  63778. // codewords appended to it, based on this object's version and error correction level.
  63779. }, {
  63780. key: "addEccAndInterleave",
  63781. value: function addEccAndInterleave(data) {
  63782. var ver = this.version;
  63783. var ecl = this.errorCorrectionLevel;
  63784. if (data.length != QrCode.getNumDataCodewords(ver, ecl)) throw new RangeError('Invalid argument');
  63785. // Calculate parameter numbers
  63786. var numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
  63787. var blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];
  63788. var rawCodewords = Math.floor(QrCode.getNumRawDataModules(ver) / 8);
  63789. var numShortBlocks = numBlocks - rawCodewords % numBlocks;
  63790. var shortBlockLen = Math.floor(rawCodewords / numBlocks);
  63791. // Split data numbero blocks and append ECC to each block
  63792. var blocks = [];
  63793. var rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);
  63794. for (var i = 0, k = 0; i < numBlocks; i++) {
  63795. var dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));
  63796. k += dat.length;
  63797. var ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);
  63798. if (i < numShortBlocks) dat.push(0);
  63799. blocks.push(dat.concat(ecc));
  63800. }
  63801. // Interleave (not concatenate) the bytes from every block numbero a single sequence
  63802. var result = [];
  63803. var _loop = function _loop(_i9) {
  63804. blocks.forEach(function (block, j) {
  63805. // Skip the padding byte in short blocks
  63806. if (_i9 != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[_i9]);
  63807. });
  63808. };
  63809. for (var _i9 = 0; _i9 < blocks[0].length; _i9++) {
  63810. _loop(_i9);
  63811. }
  63812. assert(result.length == rawCodewords);
  63813. return result;
  63814. }
  63815. // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
  63816. // data area of this QR Code. Function modules need to be marked off before this is called.
  63817. }, {
  63818. key: "drawCodewords",
  63819. value: function drawCodewords(data) {
  63820. if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8)) throw new RangeError('Invalid argument');
  63821. var i = 0; // Bit index numbero the data
  63822. // Do the funny zigzag scan
  63823. for (var right = this.size - 1; right >= 1; right -= 2) {
  63824. // Index of right column in each column pair
  63825. if (right == 6) right = 5;
  63826. for (var vert = 0; vert < this.size; vert++) {
  63827. // Vertical counter
  63828. for (var j = 0; j < 2; j++) {
  63829. var x = right - j; // Actual x coordinate
  63830. var upward = (right + 1 & 2) == 0;
  63831. var y = upward ? this.size - 1 - vert : vert; // Actual y coordinate
  63832. if (!this.isFunction[y][x] && i < data.length * 8) {
  63833. this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));
  63834. i++;
  63835. }
  63836. // If this QR Code has any remainder bits (0 to 7), they were assigned as
  63837. // 0/false/light by the constructor and are left unchanged by this method
  63838. }
  63839. }
  63840. }
  63841. assert(i == data.length * 8);
  63842. }
  63843. // XORs the codeword modules in this QR Code with the given mask pattern.
  63844. // The function modules must be marked and the codeword bits must be drawn
  63845. // before masking. Due to the arithmetic of XOR, calling applyMask() with
  63846. // the same mask value a second time will undo the mask. A final well-formed
  63847. // QR Code needs exactly one (not zero, two, etc.) mask applied.
  63848. }, {
  63849. key: "applyMask",
  63850. value: function applyMask(mask) {
  63851. if (mask < 0 || mask > 7) throw new RangeError('Mask value out of range');
  63852. for (var y = 0; y < this.size; y++) {
  63853. for (var x = 0; x < this.size; x++) {
  63854. var invert = void 0;
  63855. switch (mask) {
  63856. case 0:
  63857. invert = (x + y) % 2 == 0;
  63858. break;
  63859. case 1:
  63860. invert = y % 2 == 0;
  63861. break;
  63862. case 2:
  63863. invert = x % 3 == 0;
  63864. break;
  63865. case 3:
  63866. invert = (x + y) % 3 == 0;
  63867. break;
  63868. case 4:
  63869. invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;
  63870. break;
  63871. case 5:
  63872. invert = x * y % 2 + x * y % 3 == 0;
  63873. break;
  63874. case 6:
  63875. invert = (x * y % 2 + x * y % 3) % 2 == 0;
  63876. break;
  63877. case 7:
  63878. invert = ((x + y) % 2 + x * y % 3) % 2 == 0;
  63879. break;
  63880. default:
  63881. throw new Error('Unreachable');
  63882. }
  63883. if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x];
  63884. }
  63885. }
  63886. }
  63887. // Calculates and returns the penalty score based on state of this QR Code's current modules.
  63888. // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
  63889. }, {
  63890. key: "getPenaltyScore",
  63891. value: function getPenaltyScore() {
  63892. var result = 0;
  63893. // Adjacent modules in row having same color, and finder-like patterns
  63894. for (var y = 0; y < this.size; y++) {
  63895. var runColor = false;
  63896. var runX = 0;
  63897. var runHistory = [0, 0, 0, 0, 0, 0, 0];
  63898. for (var x = 0; x < this.size; x++) {
  63899. if (this.modules[y][x] == runColor) {
  63900. runX++;
  63901. if (runX == 5) result += QrCode.PENALTY_N1;else if (runX > 5) result++;
  63902. } else {
  63903. this.finderPenaltyAddHistory(runX, runHistory);
  63904. if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;
  63905. runColor = this.modules[y][x];
  63906. runX = 1;
  63907. }
  63908. }
  63909. result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;
  63910. }
  63911. // Adjacent modules in column having same color, and finder-like patterns
  63912. for (var _x = 0; _x < this.size; _x++) {
  63913. var _runColor = false;
  63914. var runY = 0;
  63915. var _runHistory = [0, 0, 0, 0, 0, 0, 0];
  63916. for (var _y = 0; _y < this.size; _y++) {
  63917. if (this.modules[_y][_x] == _runColor) {
  63918. runY++;
  63919. if (runY == 5) result += QrCode.PENALTY_N1;else if (runY > 5) result++;
  63920. } else {
  63921. this.finderPenaltyAddHistory(runY, _runHistory);
  63922. if (!_runColor) result += this.finderPenaltyCountPatterns(_runHistory) * QrCode.PENALTY_N3;
  63923. _runColor = this.modules[_y][_x];
  63924. runY = 1;
  63925. }
  63926. }
  63927. result += this.finderPenaltyTerminateAndCount(_runColor, runY, _runHistory) * QrCode.PENALTY_N3;
  63928. }
  63929. // 2*2 blocks of modules having same color
  63930. for (var _y2 = 0; _y2 < this.size - 1; _y2++) {
  63931. for (var _x2 = 0; _x2 < this.size - 1; _x2++) {
  63932. var color = this.modules[_y2][_x2];
  63933. if (color == this.modules[_y2][_x2 + 1] && color == this.modules[_y2 + 1][_x2] && color == this.modules[_y2 + 1][_x2 + 1]) result += QrCode.PENALTY_N2;
  63934. }
  63935. }
  63936. // Balance of dark and light modules
  63937. var dark = 0;
  63938. var _iterator3 = _createForOfIteratorHelper(this.modules),
  63939. _step3;
  63940. try {
  63941. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  63942. var row = _step3.value;
  63943. dark = row.reduce(function (sum, color) {
  63944. return sum + (color ? 1 : 0);
  63945. }, dark);
  63946. }
  63947. } catch (err) {
  63948. _iterator3.e(err);
  63949. } finally {
  63950. _iterator3.f();
  63951. }
  63952. var total = this.size * this.size; // Note that size is odd, so dark/total != 1/2
  63953. // Compute the smallest numbereger k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
  63954. var k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;
  63955. assert(0 <= k && k <= 9);
  63956. result += k * QrCode.PENALTY_N4;
  63957. assert(0 <= result && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4
  63958. return result;
  63959. }
  63960. /*-- Private helper functions --*/
  63961. // Returns an ascending list of positions of alignment patterns for this version number.
  63962. // Each position is in the range [0,177), and are used on both the x and y axes.
  63963. // This could be implemented as lookup table of 40 variable-length lists of numberegers.
  63964. }, {
  63965. key: "getAlignmentPatternPositions",
  63966. value: function getAlignmentPatternPositions() {
  63967. if (this.version == 1) return [];else {
  63968. var numAlign = Math.floor(this.version / 7) + 2;
  63969. var step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
  63970. var result = [6];
  63971. for (var pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);
  63972. return result;
  63973. }
  63974. }
  63975. // Returns the number of data bits that can be stored in a QR Code of the given version number, after
  63976. // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
  63977. // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
  63978. }, {
  63979. key: "finderPenaltyCountPatterns",
  63980. value:
  63981. // Can only be called immediately after a light run is added, and
  63982. // returns either 0, 1, or 2. A helper function for getPenaltyScore().
  63983. function finderPenaltyCountPatterns(runHistory) {
  63984. var n = runHistory[1];
  63985. assert(n <= this.size * 3);
  63986. var core = n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;
  63987. return (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) + (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0);
  63988. }
  63989. // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().
  63990. }, {
  63991. key: "finderPenaltyTerminateAndCount",
  63992. value: function finderPenaltyTerminateAndCount(currentRunColor, oriCurrentRunLength, runHistory) {
  63993. var currentRunLength = oriCurrentRunLength;
  63994. if (currentRunColor) {
  63995. // Terminate dark run
  63996. this.finderPenaltyAddHistory(currentRunLength, runHistory);
  63997. currentRunLength = 0;
  63998. }
  63999. currentRunLength += this.size; // Add light border to final run
  64000. this.finderPenaltyAddHistory(currentRunLength, runHistory);
  64001. return this.finderPenaltyCountPatterns(runHistory);
  64002. }
  64003. // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
  64004. }, {
  64005. key: "finderPenaltyAddHistory",
  64006. value: function finderPenaltyAddHistory(oriCurrentRunLength, runHistory) {
  64007. var currentRunLength = oriCurrentRunLength;
  64008. if (runHistory[0] == 0) currentRunLength += this.size; // Add light border to initial run
  64009. runHistory.pop();
  64010. runHistory.unshift(currentRunLength);
  64011. }
  64012. /*-- Constants and tables --*/
  64013. // The minimum version number supported in the QR Code Model 2 standard.
  64014. }], [{
  64015. key: "encodeText",
  64016. value: /*-- Static factory functions (high level) --*/
  64017. // Returns a QR Code representing the given Unicode text string at the given error correction level.
  64018. // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer
  64019. // Unicode code ponumbers (not UTF-16 code units) if the low error correction level is used. The smallest possible
  64020. // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the
  64021. // ecl argument if it can be done without increasing the version.
  64022. function encodeText(text, ecl) {
  64023. var segs = QrSegment.makeSegments(text);
  64024. return QrCode.encodeSegments(segs, ecl);
  64025. }
  64026. // Returns a QR Code representing the given binary data at the given error correction level.
  64027. // This function always encodes using the binary segment mode, not any text mode. The maximum number of
  64028. // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.
  64029. // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
  64030. }, {
  64031. key: "encodeBinary",
  64032. value: function encodeBinary(data, ecl) {
  64033. var seg = QrSegment.makeBytes(data);
  64034. return QrCode.encodeSegments([seg], ecl);
  64035. }
  64036. /*-- Static factory functions (mid level) --*/
  64037. // Returns a QR Code representing the given segments with the given encoding parameters.
  64038. // The smallest possible QR Code version within the given range is automatically
  64039. // chosen for the output. Iff boostEcl is true, then the ECC level of the result
  64040. // may be higher than the ecl argument if it can be done without increasing the
  64041. // version. The mask number is either between 0 to 7 (inclusive) to force that
  64042. // mask, or -1 to automatically choose an appropriate mask (which may be slow).
  64043. // This function allows the user to create a custom sequence of segments that switches
  64044. // between modes (such as alphanumeric and byte) to encode text in less space.
  64045. // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
  64046. }, {
  64047. key: "encodeSegments",
  64048. value: function encodeSegments(segs, oriEcl) {
  64049. var minVersion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  64050. var maxVersion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 40;
  64051. var mask = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
  64052. var boostEcl = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
  64053. if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) || mask < -1 || mask > 7) throw new RangeError('Invalid value');
  64054. // Find the minimal version number to use
  64055. var version;
  64056. var dataUsedBits;
  64057. for (version = minVersion;; version++) {
  64058. var _dataCapacityBits = QrCode.getNumDataCodewords(version, oriEcl) * 8; // Number of data bits available
  64059. var usedBits = QrSegment.getTotalBits(segs, version);
  64060. if (usedBits <= _dataCapacityBits) {
  64061. dataUsedBits = usedBits;
  64062. break; // This version number is found to be suitable
  64063. }
  64064. if (version >= maxVersion)
  64065. // All versions in the range could not fit the given data
  64066. throw new RangeError('Data too long');
  64067. }
  64068. var ecl = oriEcl;
  64069. // Increase the error correction level while the data still fits in the current version number
  64070. for (var _i10 = 0, _arr = [Ecc.MEDIUM, Ecc.QUARTILE, Ecc.HIGH]; _i10 < _arr.length; _i10++) {
  64071. var newEcl = _arr[_i10];
  64072. // From low to high
  64073. if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8) ecl = newEcl;
  64074. }
  64075. // Concatenate all segments to create the data bit string
  64076. var bb = [];
  64077. var _iterator4 = _createForOfIteratorHelper(segs),
  64078. _step4;
  64079. try {
  64080. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  64081. var seg = _step4.value;
  64082. appendBits(seg.mode.modeBits, 4, bb);
  64083. appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
  64084. var _iterator5 = _createForOfIteratorHelper(seg.getData()),
  64085. _step5;
  64086. try {
  64087. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  64088. var b = _step5.value;
  64089. bb.push(b);
  64090. }
  64091. } catch (err) {
  64092. _iterator5.e(err);
  64093. } finally {
  64094. _iterator5.f();
  64095. }
  64096. }
  64097. } catch (err) {
  64098. _iterator4.e(err);
  64099. } finally {
  64100. _iterator4.f();
  64101. }
  64102. assert(bb.length == dataUsedBits);
  64103. // Add terminator and pad up to a byte if applicable
  64104. var dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;
  64105. assert(bb.length <= dataCapacityBits);
  64106. appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);
  64107. appendBits(0, (8 - bb.length % 8) % 8, bb);
  64108. assert(bb.length % 8 == 0);
  64109. // Pad with alternating bytes until data capacity is reached
  64110. for (var padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11) appendBits(padByte, 8, bb);
  64111. // Pack bits numbero bytes in big endian
  64112. var dataCodewords = [];
  64113. while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);
  64114. bb.forEach(function (b, i) {
  64115. return dataCodewords[i >>> 3] |= b << 7 - (i & 7);
  64116. });
  64117. // Create the QR Code object
  64118. return new QrCode(version, ecl, dataCodewords, mask);
  64119. }
  64120. }, {
  64121. key: "getNumRawDataModules",
  64122. value: function getNumRawDataModules(ver) {
  64123. if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) throw new RangeError('Version number out of range');
  64124. var result = (16 * ver + 128) * ver + 64;
  64125. if (ver >= 2) {
  64126. var numAlign = Math.floor(ver / 7) + 2;
  64127. result -= (25 * numAlign - 10) * numAlign - 55;
  64128. if (ver >= 7) result -= 36;
  64129. }
  64130. assert(208 <= result && result <= 29648);
  64131. return result;
  64132. }
  64133. // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any
  64134. // QR Code of the given version number and error correction level, with remainder bits discarded.
  64135. // This stateless pure function could be implemented as a (40*4)-cell lookup table.
  64136. }, {
  64137. key: "getNumDataCodewords",
  64138. value: function getNumDataCodewords(ver, ecl) {
  64139. return Math.floor(QrCode.getNumRawDataModules(ver) / 8) - QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
  64140. }
  64141. // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
  64142. // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
  64143. }, {
  64144. key: "reedSolomonComputeDivisor",
  64145. value: function reedSolomonComputeDivisor(degree) {
  64146. if (degree < 1 || degree > 255) throw new RangeError('Degree out of range');
  64147. // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.
  64148. // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the unumber8 array [255, 8, 93].
  64149. var result = [];
  64150. for (var i = 0; i < degree - 1; i++) result.push(0);
  64151. result.push(1); // Start off with the monomial x^0
  64152. // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),
  64153. // and drop the highest monomial term which is always 1x^degree.
  64154. // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
  64155. var root = 1;
  64156. for (var _i11 = 0; _i11 < degree; _i11++) {
  64157. // Multiply the current product by (x - r^i)
  64158. for (var j = 0; j < result.length; j++) {
  64159. result[j] = QrCode.reedSolomonMultiply(result[j], root);
  64160. if (j + 1 < result.length) result[j] ^= result[j + 1];
  64161. }
  64162. root = QrCode.reedSolomonMultiply(root, 0x02);
  64163. }
  64164. return result;
  64165. }
  64166. // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
  64167. }, {
  64168. key: "reedSolomonComputeRemainder",
  64169. value: function reedSolomonComputeRemainder(data, divisor) {
  64170. var result = divisor.map(function () {
  64171. return 0;
  64172. });
  64173. var _iterator6 = _createForOfIteratorHelper(data),
  64174. _step6;
  64175. try {
  64176. var _loop2 = function _loop2() {
  64177. var b = _step6.value;
  64178. // Polynomial division
  64179. var factor = b ^ result.shift();
  64180. result.push(0);
  64181. divisor.forEach(function (coef, i) {
  64182. return result[i] ^= QrCode.reedSolomonMultiply(coef, factor);
  64183. });
  64184. };
  64185. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  64186. _loop2();
  64187. }
  64188. } catch (err) {
  64189. _iterator6.e(err);
  64190. } finally {
  64191. _iterator6.f();
  64192. }
  64193. return result;
  64194. }
  64195. // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
  64196. // are unsigned 8-bit numberegers. This could be implemented as a lookup table of 256*256 entries of unumber8.
  64197. }, {
  64198. key: "reedSolomonMultiply",
  64199. value: function reedSolomonMultiply(x, y) {
  64200. if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError('Byte out of range');
  64201. // Russian peasant multiplication
  64202. var z = 0;
  64203. for (var i = 7; i >= 0; i--) {
  64204. z = z << 1 ^ (z >>> 7) * 0x11d;
  64205. z ^= (y >>> i & 1) * x;
  64206. }
  64207. assert(z >>> 8 == 0);
  64208. return z;
  64209. }
  64210. }]);
  64211. return QrCode;
  64212. }();
  64213. (0,defineProperty["default"])(QrCode, "MIN_VERSION", 1);
  64214. // The maximum version number supported in the QR Code Model 2 standard.
  64215. (0,defineProperty["default"])(QrCode, "MAX_VERSION", 40);
  64216. // For use in getPenaltyScore(), when evaluating which mask is best.
  64217. (0,defineProperty["default"])(QrCode, "PENALTY_N1", 3);
  64218. (0,defineProperty["default"])(QrCode, "PENALTY_N2", 3);
  64219. (0,defineProperty["default"])(QrCode, "PENALTY_N3", 40);
  64220. (0,defineProperty["default"])(QrCode, "PENALTY_N4", 10);
  64221. (0,defineProperty["default"])(QrCode, "ECC_CODEWORDS_PER_BLOCK", [
  64222. // Version: (note that index 0 is for padding, and is set to an illegal value)
  64223. //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
  64224. [-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
  64225. // Low
  64226. [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
  64227. // Medium
  64228. [-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
  64229. // Quartile
  64230. [-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30] // High
  64231. ]);
  64232. (0,defineProperty["default"])(QrCode, "NUM_ERROR_CORRECTION_BLOCKS", [
  64233. // Version: (note that index 0 is for padding, and is set to an illegal value)
  64234. //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
  64235. [-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],
  64236. // Low
  64237. [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],
  64238. // Medium
  64239. [-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68],
  64240. // Quartile
  64241. [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81] // High
  64242. ]);
  64243. ;// ./node_modules/@rc-component/qrcode/es/utils.js
  64244. // Part logic is from `qrcode.react`. (ISC License)
  64245. // https://github.com/zpao/qrcode.react
  64246. // ==========================================================
  64247. // =================== ERROR_LEVEL ==========================
  64248. var ERROR_LEVEL_MAP = {
  64249. L: Ecc.LOW,
  64250. M: Ecc.MEDIUM,
  64251. Q: Ecc.QUARTILE,
  64252. H: Ecc.HIGH
  64253. };
  64254. // =================== DEFAULT_VALUE ==========================
  64255. var utils_DEFAULT_SIZE = 128;
  64256. var DEFAULT_LEVEL = 'L';
  64257. var DEFAULT_BACKGROUND_COLOR = '#FFFFFF';
  64258. var DEFAULT_FRONT_COLOR = '#000000';
  64259. var DEFAULT_NEED_MARGIN = false;
  64260. var DEFAULT_MINVERSION = 1;
  64261. var SPEC_MARGIN_SIZE = 4;
  64262. var DEFAULT_MARGIN_SIZE = 0;
  64263. var DEFAULT_IMG_SCALE = 0.1;
  64264. // =================== UTILS ==========================
  64265. /**
  64266. * Generate a path string from modules
  64267. * @param modules
  64268. * @param margin
  64269. * @returns
  64270. */
  64271. function generatePath(modules) {
  64272. var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  64273. var ops = [];
  64274. modules.forEach(function (row, y) {
  64275. var start = null;
  64276. row.forEach(function (cell, x) {
  64277. if (!cell && start !== null) {
  64278. ops.push("M".concat(start + margin, " ").concat(y + margin, "h").concat(x - start, "v1H").concat(start + margin, "z"));
  64279. start = null;
  64280. return;
  64281. }
  64282. if (x === row.length - 1) {
  64283. if (!cell) {
  64284. return;
  64285. }
  64286. if (start === null) {
  64287. ops.push("M".concat(x + margin, ",").concat(y + margin, " h1v1H").concat(x + margin, "z"));
  64288. } else {
  64289. ops.push("M".concat(start + margin, ",").concat(y + margin, " h").concat(x + 1 - start, "v1H").concat(start + margin, "z"));
  64290. }
  64291. return;
  64292. }
  64293. if (cell && start === null) {
  64294. start = x;
  64295. }
  64296. });
  64297. });
  64298. return ops.join('');
  64299. }
  64300. /**
  64301. * Excavate modules
  64302. * @param modules
  64303. * @param excavation
  64304. * @returns
  64305. */
  64306. function excavateModules(modules, excavation) {
  64307. return modules.slice().map(function (row, y) {
  64308. if (y < excavation.y || y >= excavation.y + excavation.h) {
  64309. return row;
  64310. }
  64311. return row.map(function (cell, x) {
  64312. if (x < excavation.x || x >= excavation.x + excavation.w) {
  64313. return cell;
  64314. }
  64315. return false;
  64316. });
  64317. });
  64318. }
  64319. /**
  64320. * Get image settings
  64321. * @param cells The modules of the QR code
  64322. * @param size The size of the QR code
  64323. * @param margin
  64324. * @param imageSettings
  64325. * @returns
  64326. */
  64327. function getImageSettings(cells, size, margin, imageSettings) {
  64328. if (imageSettings == null) {
  64329. return null;
  64330. }
  64331. var numCells = cells.length + margin * 2;
  64332. var defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);
  64333. var scale = numCells / size;
  64334. var w = (imageSettings.width || defaultSize) * scale;
  64335. var h = (imageSettings.height || defaultSize) * scale;
  64336. var x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;
  64337. var y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;
  64338. var opacity = imageSettings.opacity == null ? 1 : imageSettings.opacity;
  64339. var excavation = null;
  64340. if (imageSettings.excavate) {
  64341. var floorX = Math.floor(x);
  64342. var floorY = Math.floor(y);
  64343. var ceilW = Math.ceil(w + x - floorX);
  64344. var ceilH = Math.ceil(h + y - floorY);
  64345. excavation = {
  64346. x: floorX,
  64347. y: floorY,
  64348. w: ceilW,
  64349. h: ceilH
  64350. };
  64351. }
  64352. var crossOrigin = imageSettings.crossOrigin;
  64353. return {
  64354. x: x,
  64355. y: y,
  64356. h: h,
  64357. w: w,
  64358. excavation: excavation,
  64359. opacity: opacity,
  64360. crossOrigin: crossOrigin
  64361. };
  64362. }
  64363. /**
  64364. * Get margin size
  64365. * @param needMargin Whether need margin
  64366. * @param marginSize Custom margin size
  64367. * @returns
  64368. */
  64369. function getMarginSize(needMargin, marginSize) {
  64370. if (marginSize != null) {
  64371. return Math.floor(marginSize);
  64372. }
  64373. return needMargin ? SPEC_MARGIN_SIZE : DEFAULT_MARGIN_SIZE;
  64374. }
  64375. /**
  64376. * Check if Path2D is supported
  64377. */
  64378. var isSupportPath2d = function () {
  64379. try {
  64380. new Path2D().addPath(new Path2D());
  64381. } catch (e) {
  64382. return false;
  64383. }
  64384. return true;
  64385. }();
  64386. ;// ./node_modules/@rc-component/qrcode/es/hooks/useQRCode.js
  64387. function useQRCode(_ref) {
  64388. var value = _ref.value,
  64389. level = _ref.level,
  64390. minVersion = _ref.minVersion,
  64391. includeMargin = _ref.includeMargin,
  64392. marginSize = _ref.marginSize,
  64393. imageSettings = _ref.imageSettings,
  64394. size = _ref.size;
  64395. var qrcode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  64396. var segments = QrSegment.makeSegments(value);
  64397. return QrCode.encodeSegments(segments, ERROR_LEVEL_MAP[level], minVersion);
  64398. }, [value, level, minVersion]);
  64399. var _useMemo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  64400. var cs = qrcode.getModules();
  64401. var mg = getMarginSize(includeMargin, marginSize);
  64402. var ncs = cs.length + mg * 2;
  64403. var cis = getImageSettings(cs, size, mg, imageSettings);
  64404. return {
  64405. cells: cs,
  64406. margin: mg,
  64407. numCells: ncs,
  64408. calculatedImageSettings: cis
  64409. };
  64410. }, [qrcode, size, imageSettings, includeMargin, marginSize]),
  64411. cells = _useMemo.cells,
  64412. margin = _useMemo.margin,
  64413. numCells = _useMemo.numCells,
  64414. calculatedImageSettings = _useMemo.calculatedImageSettings;
  64415. return {
  64416. qrcode: qrcode,
  64417. margin: margin,
  64418. cells: cells,
  64419. numCells: numCells,
  64420. calculatedImageSettings: calculatedImageSettings
  64421. };
  64422. }
  64423. ;// ./node_modules/@rc-component/qrcode/es/QRCodeCanvas.js
  64424. var QRCodeCanvas_excluded = ["value", "size", "level", "bgColor", "fgColor", "includeMargin", "minVersion", "marginSize", "style", "imageSettings"];
  64425. var QRCodeCanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function QRCodeCanvas(props, forwardedRef) {
  64426. var value = props.value,
  64427. _props$size = props.size,
  64428. size = _props$size === void 0 ? utils_DEFAULT_SIZE : _props$size,
  64429. _props$level = props.level,
  64430. level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,
  64431. _props$bgColor = props.bgColor,
  64432. bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,
  64433. _props$fgColor = props.fgColor,
  64434. fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,
  64435. _props$includeMargin = props.includeMargin,
  64436. includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,
  64437. _props$minVersion = props.minVersion,
  64438. minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,
  64439. marginSize = props.marginSize,
  64440. style = props.style,
  64441. imageSettings = props.imageSettings,
  64442. otherProps = (0,objectWithoutProperties["default"])(props, QRCodeCanvas_excluded);
  64443. var imgSrc = imageSettings === null || imageSettings === void 0 ? void 0 : imageSettings.src;
  64444. var _canvas = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  64445. var _image = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  64446. var setCanvasRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) {
  64447. _canvas.current = node;
  64448. if (typeof forwardedRef === 'function') {
  64449. forwardedRef(node);
  64450. } else if (forwardedRef) {
  64451. forwardedRef.current = node;
  64452. }
  64453. }, [forwardedRef]);
  64454. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
  64455. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  64456. setIsImageLoaded = _useState2[1];
  64457. var _useQRCode = useQRCode({
  64458. value: value,
  64459. level: level,
  64460. minVersion: minVersion,
  64461. includeMargin: includeMargin,
  64462. marginSize: marginSize,
  64463. imageSettings: imageSettings,
  64464. size: size
  64465. }),
  64466. margin = _useQRCode.margin,
  64467. cells = _useQRCode.cells,
  64468. numCells = _useQRCode.numCells,
  64469. calculatedImageSettings = _useQRCode.calculatedImageSettings;
  64470. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  64471. if (_canvas.current != null) {
  64472. var canvas = _canvas.current;
  64473. var ctx = canvas.getContext('2d');
  64474. if (!ctx) {
  64475. return;
  64476. }
  64477. var cellsToDraw = cells;
  64478. var image = _image.current;
  64479. var haveImageToRender = calculatedImageSettings != null && image !== null && image.complete && image.naturalHeight !== 0 && image.naturalWidth !== 0;
  64480. if (haveImageToRender) {
  64481. if (calculatedImageSettings.excavation != null) {
  64482. cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);
  64483. }
  64484. }
  64485. var pixelRatio = window.devicePixelRatio || 1;
  64486. canvas.height = canvas.width = size * pixelRatio;
  64487. var scale = size / numCells * pixelRatio;
  64488. ctx.scale(scale, scale);
  64489. ctx.fillStyle = bgColor;
  64490. ctx.fillRect(0, 0, numCells, numCells);
  64491. ctx.fillStyle = fgColor;
  64492. if (isSupportPath2d) {
  64493. ctx.fill(new Path2D(generatePath(cellsToDraw, margin)));
  64494. } else {
  64495. cells.forEach(function (row, rdx) {
  64496. row.forEach(function (cell, cdx) {
  64497. if (cell) {
  64498. ctx.fillRect(cdx + margin, rdx + margin, 1, 1);
  64499. }
  64500. });
  64501. });
  64502. }
  64503. if (calculatedImageSettings) {
  64504. ctx.globalAlpha = calculatedImageSettings.opacity;
  64505. }
  64506. if (haveImageToRender) {
  64507. ctx.drawImage(image, calculatedImageSettings.x + margin, calculatedImageSettings.y + margin, calculatedImageSettings.w, calculatedImageSettings.h);
  64508. }
  64509. }
  64510. });
  64511. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  64512. setIsImageLoaded(false);
  64513. }, [imgSrc]);
  64514. var canvasStyle = (0,objectSpread2["default"])({
  64515. height: size,
  64516. width: size
  64517. }, style);
  64518. var img = null;
  64519. if (imgSrc != null) {
  64520. img = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("img", {
  64521. src: imgSrc,
  64522. key: imgSrc,
  64523. style: {
  64524. display: 'none'
  64525. },
  64526. onLoad: function onLoad() {
  64527. setIsImageLoaded(true);
  64528. },
  64529. ref: _image
  64530. // when crossOrigin is not set, the image will be tainted
  64531. // and the canvas cannot be exported to an image
  64532. ,
  64533. crossOrigin: calculatedImageSettings === null || calculatedImageSettings === void 0 ? void 0 : calculatedImageSettings.crossOrigin
  64534. });
  64535. }
  64536. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("canvas", (0,esm_extends["default"])({
  64537. style: canvasStyle,
  64538. height: size,
  64539. width: size,
  64540. ref: setCanvasRef,
  64541. role: "img"
  64542. }, otherProps)), img);
  64543. });
  64544. QRCodeCanvas.displayName = 'QRCodeCanvas';
  64545. ;// ./node_modules/@rc-component/qrcode/es/QRCodeSVG.js
  64546. var QRCodeSVG_excluded = ["value", "size", "level", "bgColor", "fgColor", "includeMargin", "minVersion", "title", "marginSize", "imageSettings"];
  64547. var QRCodeSVG = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function QRCodeSVG(props, forwardedRef) {
  64548. var value = props.value,
  64549. _props$size = props.size,
  64550. size = _props$size === void 0 ? utils_DEFAULT_SIZE : _props$size,
  64551. _props$level = props.level,
  64552. level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,
  64553. _props$bgColor = props.bgColor,
  64554. bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,
  64555. _props$fgColor = props.fgColor,
  64556. fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,
  64557. _props$includeMargin = props.includeMargin,
  64558. includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,
  64559. _props$minVersion = props.minVersion,
  64560. minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,
  64561. title = props.title,
  64562. marginSize = props.marginSize,
  64563. imageSettings = props.imageSettings,
  64564. otherProps = (0,objectWithoutProperties["default"])(props, QRCodeSVG_excluded);
  64565. var _useQRCode = useQRCode({
  64566. value: value,
  64567. level: level,
  64568. minVersion: minVersion,
  64569. includeMargin: includeMargin,
  64570. marginSize: marginSize,
  64571. imageSettings: imageSettings,
  64572. size: size
  64573. }),
  64574. margin = _useQRCode.margin,
  64575. cells = _useQRCode.cells,
  64576. numCells = _useQRCode.numCells,
  64577. calculatedImageSettings = _useQRCode.calculatedImageSettings;
  64578. var cellsToDraw = cells;
  64579. var image = null;
  64580. if (imageSettings != null && calculatedImageSettings != null) {
  64581. if (calculatedImageSettings.excavation != null) {
  64582. cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);
  64583. }
  64584. image = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("image", {
  64585. href: imageSettings.src,
  64586. height: calculatedImageSettings.h,
  64587. width: calculatedImageSettings.w,
  64588. x: calculatedImageSettings.x + margin,
  64589. y: calculatedImageSettings.y + margin,
  64590. preserveAspectRatio: "none",
  64591. opacity: calculatedImageSettings.opacity
  64592. // when crossOrigin is not set, the image will be tainted
  64593. // and the canvas cannot be exported to an image
  64594. ,
  64595. crossOrigin: calculatedImageSettings.crossOrigin
  64596. });
  64597. }
  64598. var fgPath = generatePath(cellsToDraw, margin);
  64599. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", (0,esm_extends["default"])({
  64600. height: size,
  64601. width: size,
  64602. viewBox: "0 0 ".concat(numCells, " ").concat(numCells),
  64603. ref: forwardedRef,
  64604. role: "img"
  64605. }, otherProps), !!title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("title", null, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
  64606. fill: bgColor,
  64607. d: "M0,0 h".concat(numCells, "v").concat(numCells, "H0z"),
  64608. shapeRendering: "crispEdges"
  64609. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
  64610. fill: fgColor,
  64611. d: fgPath,
  64612. shapeRendering: "crispEdges"
  64613. }), image);
  64614. });
  64615. QRCodeSVG.displayName = 'QRCodeSVG';
  64616. ;// ./node_modules/@rc-component/qrcode/es/index.js
  64617. ;// ./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js
  64618. // This icon file is generated automatically.
  64619. var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
  64620. /* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
  64621. ;// ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js
  64622. // GENERATE BY ./scripts/generate.ts
  64623. // DON NOT EDIT IT MANUALLY
  64624. var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
  64625. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  64626. ref: ref,
  64627. icon: asn_ReloadOutlined
  64628. }));
  64629. };
  64630. /**![reload](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkwOS4xIDIwOS4zbC01Ni40IDQ0LjFDNzc1LjggMTU1LjEgNjU2LjIgOTIgNTIxLjkgOTIgMjkwIDkyIDEwMi4zIDI3OS41IDEwMiA1MTEuNSAxMDEuNyA3NDMuNyAyODkuOCA5MzIgNTIxLjkgOTMyYzE4MS4zIDAgMzM1LjgtMTE1IDM5NC42LTI3Ni4xIDEuNS00LjItLjctOC45LTQuOS0xMC4zbC01Ni43LTE5LjVhOCA4IDAgMDAtMTAuMSA0LjhjLTEuOCA1LTMuOCAxMC01LjkgMTQuOS0xNy4zIDQxLTQyLjEgNzcuOC03My43IDEwOS40QTM0NC43NyAzNDQuNzcgMCAwMTY1NS45IDgyOWMtNDIuMyAxNy45LTg3LjQgMjctMTMzLjggMjctNDYuNSAwLTkxLjUtOS4xLTEzMy44LTI3QTM0MS41IDM0MS41IDAgMDEyNzkgNzU1LjJhMzQyLjE2IDM0Mi4xNiAwIDAxLTczLjctMTA5LjRjLTE3LjktNDIuNC0yNy04Ny40LTI3LTEzMy45czkuMS05MS41IDI3LTEzMy45YzE3LjMtNDEgNDIuMS03Ny44IDczLjctMTA5LjQgMzEuNi0zMS42IDY4LjQtNTYuNCAxMDkuMy03My44IDQyLjMtMTcuOSA4Ny40LTI3IDEzMy44LTI3IDQ2LjUgMCA5MS41IDkuMSAxMzMuOCAyN2EzNDEuNSAzNDEuNSAwIDAxMTA5LjMgNzMuOGM5LjkgOS45IDE5LjIgMjAuNCAyNy44IDMxLjRsLTYwLjIgNDdhOCA4IDAgMDAzIDE0LjFsMTc1LjYgNDNjNSAxLjIgOS45LTIuNiA5LjktNy43bC44LTE4MC45Yy0uMS02LjYtNy44LTEwLjMtMTMtNi4yeiIgLz48L3N2Zz4=) */
  64631. var ReloadOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ReloadOutlined_ReloadOutlined);
  64632. if (true) {
  64633. ReloadOutlined_RefIcon.displayName = 'ReloadOutlined';
  64634. }
  64635. /* harmony default export */ var icons_ReloadOutlined = (ReloadOutlined_RefIcon);
  64636. ;// ./components/qr-code/QrcodeStatus.tsx
  64637. const defaultSpin = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(spin, null);
  64638. function QRcodeStatus({
  64639. prefixCls,
  64640. locale,
  64641. onRefresh,
  64642. statusRender,
  64643. status
  64644. }) {
  64645. const defaultExpiredNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("p", {
  64646. className: `${prefixCls}-expired`
  64647. }, locale === null || locale === void 0 ? void 0 : locale.expired), onRefresh && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, {
  64648. type: "link",
  64649. icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_ReloadOutlined, null),
  64650. onClick: onRefresh
  64651. }, locale === null || locale === void 0 ? void 0 : locale.refresh)));
  64652. const defaultScannedNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("p", {
  64653. className: `${prefixCls}-scanned`
  64654. }, locale === null || locale === void 0 ? void 0 : locale.scanned);
  64655. const defaultNodes = {
  64656. expired: defaultExpiredNode,
  64657. loading: defaultSpin,
  64658. scanned: defaultScannedNode
  64659. };
  64660. const defaultStatusRender = info => defaultNodes[info.status];
  64661. const mergedStatusRender = statusRender !== null && statusRender !== void 0 ? statusRender : defaultStatusRender;
  64662. return mergedStatusRender({
  64663. status,
  64664. locale,
  64665. onRefresh
  64666. });
  64667. }
  64668. // EXTERNAL MODULE: ./components/qr-code/style/index.ts
  64669. var qr_code_style = __webpack_require__("./components/qr-code/style/index.ts");
  64670. ;// ./components/qr-code/index.tsx
  64671. var qr_code_rest = undefined && undefined.__rest || function (s, e) {
  64672. var t = {};
  64673. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  64674. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  64675. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  64676. }
  64677. return t;
  64678. };
  64679. const QRCode = props => {
  64680. var _a, _b, _c, _d;
  64681. const [, token] = (0,useToken["default"])();
  64682. const {
  64683. value,
  64684. type = 'canvas',
  64685. icon = '',
  64686. size = 160,
  64687. iconSize,
  64688. color = token.colorText,
  64689. errorLevel = 'M',
  64690. status = 'active',
  64691. bordered = true,
  64692. onRefresh,
  64693. style,
  64694. className,
  64695. rootClassName,
  64696. prefixCls: customizePrefixCls,
  64697. bgColor = 'transparent',
  64698. statusRender
  64699. } = props,
  64700. rest = qr_code_rest(props, ["value", "type", "icon", "size", "iconSize", "color", "errorLevel", "status", "bordered", "onRefresh", "style", "className", "rootClassName", "prefixCls", "bgColor", "statusRender"]);
  64701. const {
  64702. getPrefixCls
  64703. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  64704. const prefixCls = getPrefixCls('qrcode', customizePrefixCls);
  64705. const [wrapCSSVar, hashId, cssVarCls] = (0,qr_code_style["default"])(prefixCls);
  64706. const imageSettings = {
  64707. src: icon,
  64708. x: undefined,
  64709. y: undefined,
  64710. height: typeof iconSize === 'number' ? iconSize : (_a = iconSize === null || iconSize === void 0 ? void 0 : iconSize.height) !== null && _a !== void 0 ? _a : 40,
  64711. width: typeof iconSize === 'number' ? iconSize : (_b = iconSize === null || iconSize === void 0 ? void 0 : iconSize.width) !== null && _b !== void 0 ? _b : 40,
  64712. excavate: true,
  64713. crossOrigin: 'anonymous'
  64714. };
  64715. const a11yProps = (0,pickAttrs["default"])(rest, true);
  64716. const restProps = (0,omit["default"])(rest, Object.keys(a11yProps));
  64717. const qrCodeProps = Object.assign({
  64718. value,
  64719. size,
  64720. level: errorLevel,
  64721. bgColor,
  64722. fgColor: color,
  64723. style: {
  64724. width: style === null || style === void 0 ? void 0 : style.width,
  64725. height: style === null || style === void 0 ? void 0 : style.height
  64726. },
  64727. imageSettings: icon ? imageSettings : undefined
  64728. }, a11yProps);
  64729. const [locale] = (0,useLocale["default"])('QRCode');
  64730. if (true) {
  64731. const warning = (0,_util_warning.devUseWarning)('QRCode');
  64732. true ? warning(!!value, 'usage', 'need to receive `value` props') : 0;
  64733. true ? warning(!(icon && errorLevel === 'L'), 'usage', 'ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.') : 0;
  64734. }
  64735. if (!value) {
  64736. return null;
  64737. }
  64738. const mergedCls = classnames_default()(prefixCls, className, rootClassName, hashId, cssVarCls, {
  64739. [`${prefixCls}-borderless`]: !bordered
  64740. });
  64741. const mergedStyle = Object.assign(Object.assign({
  64742. backgroundColor: bgColor
  64743. }, style), {
  64744. width: (_c = style === null || style === void 0 ? void 0 : style.width) !== null && _c !== void 0 ? _c : size,
  64745. height: (_d = style === null || style === void 0 ? void 0 : style.height) !== null && _d !== void 0 ? _d : size
  64746. });
  64747. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({}, restProps, {
  64748. className: mergedCls,
  64749. style: mergedStyle
  64750. }), status !== 'active' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  64751. className: `${prefixCls}-mask`
  64752. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(QRcodeStatus, {
  64753. prefixCls: prefixCls,
  64754. locale: locale,
  64755. status: status,
  64756. onRefresh: onRefresh,
  64757. statusRender: statusRender
  64758. }))), type === 'canvas' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(QRCodeCanvas, Object.assign({}, qrCodeProps)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(QRCodeSVG, Object.assign({}, qrCodeProps))));
  64759. };
  64760. if (true) {
  64761. QRCode.displayName = 'QRCode';
  64762. }
  64763. /* harmony default export */ var qr_code = (QRCode);
  64764. ;// ./components/radio/index.tsx
  64765. const radio_Radio = radio_radio;
  64766. radio_Radio.Button = radioButton;
  64767. radio_Radio.Group = group;
  64768. radio_Radio.__ANT_RADIO = true;
  64769. /* harmony default export */ var components_radio = (radio_Radio);
  64770. ;// ./node_modules/@ant-design/icons-svg/es/asn/StarFilled.js
  64771. // This icon file is generated automatically.
  64772. var StarFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" } }] }, "name": "star", "theme": "filled" };
  64773. /* harmony default export */ var asn_StarFilled = (StarFilled);
  64774. ;// ./node_modules/@ant-design/icons/es/icons/StarFilled.js
  64775. // GENERATE BY ./scripts/generate.ts
  64776. // DON NOT EDIT IT MANUALLY
  64777. var StarFilled_StarFilled = function StarFilled(props, ref) {
  64778. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  64779. ref: ref,
  64780. icon: asn_StarFilled
  64781. }));
  64782. };
  64783. /**![star](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkwOC4xIDM1My4xbC0yNTMuOS0zNi45TDU0MC43IDg2LjFjLTMuMS02LjMtOC4yLTExLjQtMTQuNS0xNC41LTE1LjgtNy44LTM1LTEuMy00Mi45IDE0LjVMMzY5LjggMzE2LjJsLTI1My45IDM2LjljLTcgMS0xMy40IDQuMy0xOC4zIDkuM2EzMi4wNSAzMi4wNSAwIDAwLjYgNDUuM2wxODMuNyAxNzkuMS00My40IDI1Mi45YTMxLjk1IDMxLjk1IDAgMDA0Ni40IDMzLjdMNTEyIDc1NGwyMjcuMSAxMTkuNGM2LjIgMy4zIDEzLjQgNC40IDIwLjMgMy4yIDE3LjQtMyAyOS4xLTE5LjUgMjYuMS0zNi45bC00My40LTI1Mi45IDE4My43LTE3OS4xYzUtNC45IDguMy0xMS4zIDkuMy0xOC4zIDIuNy0xNy41LTkuNS0zMy43LTI3LTM2LjN6IiAvPjwvc3ZnPg==) */
  64784. var StarFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(StarFilled_StarFilled);
  64785. if (true) {
  64786. StarFilled_RefIcon.displayName = 'StarFilled';
  64787. }
  64788. /* harmony default export */ var icons_StarFilled = (StarFilled_RefIcon);
  64789. ;// ./node_modules/rc-rate/es/Star.js
  64790. function Star(props, ref) {
  64791. var disabled = props.disabled,
  64792. prefixCls = props.prefixCls,
  64793. character = props.character,
  64794. characterRender = props.characterRender,
  64795. index = props.index,
  64796. count = props.count,
  64797. value = props.value,
  64798. allowHalf = props.allowHalf,
  64799. focused = props.focused,
  64800. onHover = props.onHover,
  64801. onClick = props.onClick;
  64802. // =========================== Events ===========================
  64803. var onInternalHover = function onInternalHover(e) {
  64804. onHover(e, index);
  64805. };
  64806. var onInternalClick = function onInternalClick(e) {
  64807. onClick(e, index);
  64808. };
  64809. var onInternalKeyDown = function onInternalKeyDown(e) {
  64810. if (e.keyCode === KeyCode["default"].ENTER) {
  64811. onClick(e, index);
  64812. }
  64813. };
  64814. // =========================== Render ===========================
  64815. // >>>>> ClassName
  64816. var starValue = index + 1;
  64817. var classNameList = new Set([prefixCls]);
  64818. // TODO: Current we just refactor from CC to FC. This logic seems can be optimized.
  64819. if (value === 0 && index === 0 && focused) {
  64820. classNameList.add("".concat(prefixCls, "-focused"));
  64821. } else if (allowHalf && value + 0.5 >= starValue && value < starValue) {
  64822. classNameList.add("".concat(prefixCls, "-half"));
  64823. classNameList.add("".concat(prefixCls, "-active"));
  64824. if (focused) {
  64825. classNameList.add("".concat(prefixCls, "-focused"));
  64826. }
  64827. } else {
  64828. if (starValue <= value) {
  64829. classNameList.add("".concat(prefixCls, "-full"));
  64830. } else {
  64831. classNameList.add("".concat(prefixCls, "-zero"));
  64832. }
  64833. if (starValue === value && focused) {
  64834. classNameList.add("".concat(prefixCls, "-focused"));
  64835. }
  64836. }
  64837. // >>>>> Node
  64838. var characterNode = typeof character === 'function' ? character(props) : character;
  64839. var start = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
  64840. className: classnames_default()(Array.from(classNameList)),
  64841. ref: ref
  64842. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  64843. onClick: disabled ? null : onInternalClick,
  64844. onKeyDown: disabled ? null : onInternalKeyDown,
  64845. onMouseMove: disabled ? null : onInternalHover,
  64846. role: "radio",
  64847. "aria-checked": value > index ? 'true' : 'false',
  64848. "aria-posinset": index + 1,
  64849. "aria-setsize": count,
  64850. tabIndex: disabled ? -1 : 0
  64851. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  64852. className: "".concat(prefixCls, "-first")
  64853. }, characterNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  64854. className: "".concat(prefixCls, "-second")
  64855. }, characterNode)));
  64856. if (characterRender) {
  64857. start = characterRender(start, props);
  64858. }
  64859. return start;
  64860. }
  64861. /* harmony default export */ var es_Star = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Star));
  64862. ;// ./node_modules/rc-rate/es/useRefs.js
  64863. function useRefs() {
  64864. var nodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  64865. function getRef(index) {
  64866. return nodeRef.current[index];
  64867. }
  64868. function setRef(index) {
  64869. return function (node) {
  64870. nodeRef.current[index] = node;
  64871. };
  64872. }
  64873. return [getRef, setRef];
  64874. }
  64875. ;// ./node_modules/rc-rate/es/util.js
  64876. function es_util_getScroll(w) {
  64877. var ret = w.pageXOffset;
  64878. var method = 'scrollLeft';
  64879. if (typeof ret !== 'number') {
  64880. var d = w.document;
  64881. // ie6,7,8 standard mode
  64882. ret = d.documentElement[method];
  64883. if (typeof ret !== 'number') {
  64884. // quirks mode
  64885. ret = d.body[method];
  64886. }
  64887. }
  64888. return ret;
  64889. }
  64890. function getClientPosition(elem) {
  64891. var x;
  64892. var y;
  64893. var doc = elem.ownerDocument;
  64894. var body = doc.body;
  64895. var docElem = doc && doc.documentElement;
  64896. var box = elem.getBoundingClientRect();
  64897. x = box.left;
  64898. y = box.top;
  64899. x -= docElem.clientLeft || body.clientLeft || 0;
  64900. y -= docElem.clientTop || body.clientTop || 0;
  64901. return {
  64902. left: x,
  64903. top: y
  64904. };
  64905. }
  64906. function getOffsetLeft(el) {
  64907. var pos = getClientPosition(el);
  64908. var doc = el.ownerDocument;
  64909. // Only IE use `parentWindow`
  64910. var w = doc.defaultView || doc.parentWindow;
  64911. pos.left += es_util_getScroll(w);
  64912. return pos.left;
  64913. }
  64914. ;// ./node_modules/rc-rate/es/Rate.js
  64915. var Rate_excluded = ["prefixCls", "className", "defaultValue", "value", "count", "allowHalf", "allowClear", "keyboard", "character", "characterRender", "disabled", "direction", "tabIndex", "autoFocus", "onHoverChange", "onChange", "onFocus", "onBlur", "onKeyDown", "onMouseLeave"];
  64916. function Rate(props, ref) {
  64917. var _props$prefixCls = props.prefixCls,
  64918. prefixCls = _props$prefixCls === void 0 ? 'rc-rate' : _props$prefixCls,
  64919. className = props.className,
  64920. defaultValue = props.defaultValue,
  64921. propValue = props.value,
  64922. _props$count = props.count,
  64923. count = _props$count === void 0 ? 5 : _props$count,
  64924. _props$allowHalf = props.allowHalf,
  64925. allowHalf = _props$allowHalf === void 0 ? false : _props$allowHalf,
  64926. _props$allowClear = props.allowClear,
  64927. allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
  64928. _props$keyboard = props.keyboard,
  64929. keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
  64930. _props$character = props.character,
  64931. character = _props$character === void 0 ? '★' : _props$character,
  64932. characterRender = props.characterRender,
  64933. disabled = props.disabled,
  64934. _props$direction = props.direction,
  64935. direction = _props$direction === void 0 ? 'ltr' : _props$direction,
  64936. _props$tabIndex = props.tabIndex,
  64937. tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
  64938. autoFocus = props.autoFocus,
  64939. onHoverChange = props.onHoverChange,
  64940. onChange = props.onChange,
  64941. onFocus = props.onFocus,
  64942. onBlur = props.onBlur,
  64943. onKeyDown = props.onKeyDown,
  64944. onMouseLeave = props.onMouseLeave,
  64945. restProps = (0,objectWithoutProperties["default"])(props, Rate_excluded);
  64946. var _useRefs = useRefs(),
  64947. _useRefs2 = (0,slicedToArray["default"])(_useRefs, 2),
  64948. getStarRef = _useRefs2[0],
  64949. setStarRef = _useRefs2[1];
  64950. var rateRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  64951. // ============================ Ref =============================
  64952. var triggerFocus = function triggerFocus() {
  64953. if (!disabled) {
  64954. var _rateRef$current;
  64955. (_rateRef$current = rateRef.current) === null || _rateRef$current === void 0 || _rateRef$current.focus();
  64956. }
  64957. };
  64958. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, function () {
  64959. return {
  64960. focus: triggerFocus,
  64961. blur: function blur() {
  64962. if (!disabled) {
  64963. var _rateRef$current2;
  64964. (_rateRef$current2 = rateRef.current) === null || _rateRef$current2 === void 0 || _rateRef$current2.blur();
  64965. }
  64966. }
  64967. };
  64968. });
  64969. // =========================== Value ============================
  64970. var _useMergedState = (0,useMergedState["default"])(defaultValue || 0, {
  64971. value: propValue
  64972. }),
  64973. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  64974. value = _useMergedState2[0],
  64975. setValue = _useMergedState2[1];
  64976. var _useMergedState3 = (0,useMergedState["default"])(null),
  64977. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  64978. cleanedValue = _useMergedState4[0],
  64979. setCleanedValue = _useMergedState4[1];
  64980. var getStarValue = function getStarValue(index, x) {
  64981. var reverse = direction === 'rtl';
  64982. var starValue = index + 1;
  64983. if (allowHalf) {
  64984. var starEle = getStarRef(index);
  64985. var leftDis = getOffsetLeft(starEle);
  64986. var width = starEle.clientWidth;
  64987. if (reverse && x - leftDis > width / 2) {
  64988. starValue -= 0.5;
  64989. } else if (!reverse && x - leftDis < width / 2) {
  64990. starValue -= 0.5;
  64991. }
  64992. }
  64993. return starValue;
  64994. };
  64995. // >>>>> Change
  64996. var changeValue = function changeValue(nextValue) {
  64997. setValue(nextValue);
  64998. onChange === null || onChange === void 0 || onChange(nextValue);
  64999. };
  65000. // =========================== Focus ============================
  65001. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
  65002. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  65003. focused = _React$useState2[0],
  65004. setFocused = _React$useState2[1];
  65005. var onInternalFocus = function onInternalFocus() {
  65006. setFocused(true);
  65007. onFocus === null || onFocus === void 0 || onFocus();
  65008. };
  65009. var onInternalBlur = function onInternalBlur() {
  65010. setFocused(false);
  65011. onBlur === null || onBlur === void 0 || onBlur();
  65012. };
  65013. // =========================== Hover ============================
  65014. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
  65015. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  65016. hoverValue = _React$useState4[0],
  65017. setHoverValue = _React$useState4[1];
  65018. var onHover = function onHover(event, index) {
  65019. var nextHoverValue = getStarValue(index, event.pageX);
  65020. if (nextHoverValue !== cleanedValue) {
  65021. setHoverValue(nextHoverValue);
  65022. setCleanedValue(null);
  65023. }
  65024. onHoverChange === null || onHoverChange === void 0 || onHoverChange(nextHoverValue);
  65025. };
  65026. var onMouseLeaveCallback = function onMouseLeaveCallback(event) {
  65027. if (!disabled) {
  65028. setHoverValue(null);
  65029. setCleanedValue(null);
  65030. onHoverChange === null || onHoverChange === void 0 || onHoverChange(undefined);
  65031. }
  65032. if (event) {
  65033. onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(event);
  65034. }
  65035. };
  65036. // =========================== Click ============================
  65037. var onClick = function onClick(event, index) {
  65038. var newValue = getStarValue(index, event.pageX);
  65039. var isReset = false;
  65040. if (allowClear) {
  65041. isReset = newValue === value;
  65042. }
  65043. onMouseLeaveCallback();
  65044. changeValue(isReset ? 0 : newValue);
  65045. setCleanedValue(isReset ? newValue : null);
  65046. };
  65047. var onInternalKeyDown = function onInternalKeyDown(event) {
  65048. var keyCode = event.keyCode;
  65049. var reverse = direction === 'rtl';
  65050. var step = allowHalf ? 0.5 : 1;
  65051. if (keyboard) {
  65052. if (keyCode === KeyCode["default"].RIGHT && value < count && !reverse) {
  65053. changeValue(value + step);
  65054. event.preventDefault();
  65055. } else if (keyCode === KeyCode["default"].LEFT && value > 0 && !reverse) {
  65056. changeValue(value - step);
  65057. event.preventDefault();
  65058. } else if (keyCode === KeyCode["default"].RIGHT && value > 0 && reverse) {
  65059. changeValue(value - step);
  65060. event.preventDefault();
  65061. } else if (keyCode === KeyCode["default"].LEFT && value < count && reverse) {
  65062. changeValue(value + step);
  65063. event.preventDefault();
  65064. }
  65065. }
  65066. onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
  65067. };
  65068. // =========================== Effect ===========================
  65069. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
  65070. if (autoFocus && !disabled) {
  65071. triggerFocus();
  65072. }
  65073. }, []);
  65074. // =========================== Render ===========================
  65075. // >>> Star
  65076. var starNodes = new Array(count).fill(0).map(function (item, index) {
  65077. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Star, {
  65078. ref: setStarRef(index),
  65079. index: index,
  65080. count: count,
  65081. disabled: disabled,
  65082. prefixCls: "".concat(prefixCls, "-star"),
  65083. allowHalf: allowHalf,
  65084. value: hoverValue === null ? value : hoverValue,
  65085. onClick: onClick,
  65086. onHover: onHover,
  65087. key: item || index,
  65088. character: character,
  65089. characterRender: characterRender,
  65090. focused: focused
  65091. });
  65092. });
  65093. var classString = classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-rtl"), direction === 'rtl'));
  65094. // >>> Node
  65095. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", (0,esm_extends["default"])({
  65096. className: classString,
  65097. onMouseLeave: onMouseLeaveCallback,
  65098. tabIndex: disabled ? -1 : tabIndex,
  65099. onFocus: disabled ? null : onInternalFocus,
  65100. onBlur: disabled ? null : onInternalBlur,
  65101. onKeyDown: disabled ? null : onInternalKeyDown,
  65102. ref: rateRef
  65103. }, (0,pickAttrs["default"])(restProps, {
  65104. aria: true,
  65105. data: true,
  65106. attr: true
  65107. })), starNodes);
  65108. }
  65109. /* harmony default export */ var es_Rate = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Rate));
  65110. ;// ./node_modules/rc-rate/es/index.js
  65111. /* harmony default export */ var rc_rate_es = (es_Rate);
  65112. // EXTERNAL MODULE: ./components/rate/style/index.ts
  65113. var rate_style = __webpack_require__("./components/rate/style/index.ts");
  65114. ;// ./components/rate/index.tsx
  65115. var rate_rest = undefined && undefined.__rest || function (s, e) {
  65116. var t = {};
  65117. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  65118. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  65119. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  65120. }
  65121. return t;
  65122. };
  65123. const rate_Rate = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  65124. const {
  65125. prefixCls,
  65126. className,
  65127. rootClassName,
  65128. style,
  65129. tooltips,
  65130. character = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_StarFilled, null),
  65131. disabled: customDisabled
  65132. } = props,
  65133. rest = rate_rest(props, ["prefixCls", "className", "rootClassName", "style", "tooltips", "character", "disabled"]);
  65134. const characterRender = (node, {
  65135. index
  65136. }) => {
  65137. if (!tooltips) {
  65138. return node;
  65139. }
  65140. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
  65141. title: tooltips[index]
  65142. }, node);
  65143. };
  65144. const {
  65145. getPrefixCls,
  65146. direction,
  65147. rate
  65148. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  65149. const ratePrefixCls = getPrefixCls('rate', prefixCls);
  65150. // Style
  65151. const [wrapCSSVar, hashId, cssVarCls] = (0,rate_style["default"])(ratePrefixCls);
  65152. const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);
  65153. // ===================== Disabled =====================
  65154. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  65155. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  65156. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_rate_es, Object.assign({
  65157. ref: ref,
  65158. character: character,
  65159. characterRender: characterRender,
  65160. disabled: mergedDisabled
  65161. }, rest, {
  65162. className: classnames_default()(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),
  65163. style: mergedStyle,
  65164. prefixCls: ratePrefixCls,
  65165. direction: direction
  65166. })));
  65167. });
  65168. if (true) {
  65169. rate_Rate.displayName = 'Rate';
  65170. }
  65171. /* harmony default export */ var rate = (rate_Rate);
  65172. ;// ./node_modules/@ant-design/icons-svg/es/asn/WarningFilled.js
  65173. // This icon file is generated automatically.
  65174. var WarningFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "warning", "theme": "filled" };
  65175. /* harmony default export */ var asn_WarningFilled = (WarningFilled);
  65176. ;// ./node_modules/@ant-design/icons/es/icons/WarningFilled.js
  65177. // GENERATE BY ./scripts/generate.ts
  65178. // DON NOT EDIT IT MANUALLY
  65179. var WarningFilled_WarningFilled = function WarningFilled(props, ref) {
  65180. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  65181. ref: ref,
  65182. icon: asn_WarningFilled
  65183. }));
  65184. };
  65185. /**![warning](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk1NS43IDg1NmwtNDE2LTcyMGMtNi4yLTEwLjctMTYuOS0xNi0yNy43LTE2cy0yMS42IDUuMy0yNy43IDE2bC00MTYgNzIwQzU2IDg3Ny40IDcxLjQgOTA0IDk2IDkwNGg4MzJjMjQuNiAwIDQwLTI2LjYgMjcuNy00OHpNNDgwIDQxNmMwLTQuNCAzLjYtOCA4LThoNDhjNC40IDAgOCAzLjYgOCA4djE4NGMwIDQuNC0zLjYgOC04IDhoLTQ4Yy00LjQgMC04LTMuNi04LThWNDE2em0zMiAzNTJhNDguMDEgNDguMDEgMCAwMTAtOTYgNDguMDEgNDguMDEgMCAwMTAgOTZ6IiAvPjwvc3ZnPg==) */
  65186. var WarningFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(WarningFilled_WarningFilled);
  65187. if (true) {
  65188. WarningFilled_RefIcon.displayName = 'WarningFilled';
  65189. }
  65190. /* harmony default export */ var icons_WarningFilled = (WarningFilled_RefIcon);
  65191. ;// ./components/result/noFound.tsx
  65192. const NoFound = () => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  65193. width: "252",
  65194. height: "294"
  65195. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "No Found"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  65196. fill: "none",
  65197. fillRule: "evenodd"
  65198. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  65199. cx: "126.75",
  65200. cy: "128.1",
  65201. r: "126",
  65202. fill: "#E4EBF7"
  65203. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  65204. cx: "31.55",
  65205. cy: "130.8",
  65206. r: "8.3",
  65207. fill: "#FFF"
  65208. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65209. stroke: "#FFF",
  65210. d: "m37 134.3 10.5 6m.9 6.2-12.7 10.8",
  65211. strokeWidth: "2"
  65212. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65213. fill: "#FFF",
  65214. d: "M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2"
  65215. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65216. fill: "#FFF",
  65217. d: "M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2"
  65218. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65219. stroke: "#FFF",
  65220. d: "m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13",
  65221. strokeWidth: "2"
  65222. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65223. fill: "#FFF",
  65224. d: "M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4"
  65225. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65226. stroke: "#FFF",
  65227. d: "M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z",
  65228. strokeWidth: "2"
  65229. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65230. stroke: "#FFF",
  65231. d: "m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4",
  65232. strokeWidth: "2"
  65233. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65234. fill: "#FFF",
  65235. d: "M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7"
  65236. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  65237. cx: "204.3",
  65238. cy: "30",
  65239. r: "29.5",
  65240. fill: "#1677ff"
  65241. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65242. fill: "#FFF",
  65243. d: "M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2"
  65244. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65245. fill: "#FFB594",
  65246. d: "M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76"
  65247. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65248. fill: "#FFC6A0",
  65249. d: "m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6"
  65250. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65251. fill: "#FFF",
  65252. d: "M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6"
  65253. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65254. fill: "#CBD1D1",
  65255. d: "M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6"
  65256. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65257. fill: "#2B0849",
  65258. d: "M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z"
  65259. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65260. fill: "#A4AABA",
  65261. d: "M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6"
  65262. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65263. fill: "#CBD1D1",
  65264. d: "M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z"
  65265. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65266. fill: "#2B0849",
  65267. d: "M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1"
  65268. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65269. fill: "#A4AABA",
  65270. d: "M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1"
  65271. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65272. fill: "#7BB2F9",
  65273. d: "m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2"
  65274. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65275. stroke: "#648BD8",
  65276. d: "M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8",
  65277. strokeLinecap: "round",
  65278. strokeLinejoin: "round",
  65279. strokeWidth: "1.1"
  65280. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65281. stroke: "#648BD8",
  65282. d: "M107.3 222.1s2.7-1.1 6-3.9",
  65283. strokeLinecap: "round",
  65284. strokeLinejoin: "round"
  65285. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65286. stroke: "#648BD8",
  65287. d: "M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3",
  65288. strokeLinecap: "round",
  65289. strokeLinejoin: "round",
  65290. strokeWidth: "1.1"
  65291. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65292. fill: "#192064",
  65293. d: "M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4"
  65294. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65295. fill: "#FFF",
  65296. d: "M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8"
  65297. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65298. fill: "#192064",
  65299. d: "M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7"
  65300. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65301. stroke: "#648BD8",
  65302. d: "M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2",
  65303. strokeLinecap: "round",
  65304. strokeLinejoin: "round",
  65305. strokeWidth: "1.1"
  65306. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65307. fill: "#FFC6A0",
  65308. d: "M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2"
  65309. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65310. fill: "#FFC6A0",
  65311. d: "M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5"
  65312. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65313. fill: "#520038",
  65314. d: "M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z"
  65315. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65316. fill: "#552950",
  65317. d: "M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3"
  65318. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65319. stroke: "#DB836E",
  65320. d: "m110.1 74.8-.9 1.7-.3 4.3h-2.2",
  65321. strokeLinecap: "round",
  65322. strokeLinejoin: "round",
  65323. strokeWidth: "1.1"
  65324. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65325. stroke: "#5C2552",
  65326. d: "M110.8 74.5s1.8-.7 2.6.5",
  65327. strokeLinecap: "round",
  65328. strokeLinejoin: "round",
  65329. strokeWidth: "1.1"
  65330. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65331. stroke: "#DB836E",
  65332. d: "M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6",
  65333. strokeLinecap: "round",
  65334. strokeLinejoin: "round",
  65335. strokeWidth: "1.1"
  65336. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65337. stroke: "#5C2552",
  65338. d: "M103.3 73s1.8 1 4.1.9",
  65339. strokeLinecap: "round",
  65340. strokeLinejoin: "round",
  65341. strokeWidth: "1.1"
  65342. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65343. stroke: "#DB836E",
  65344. d: "M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6",
  65345. strokeLinecap: "round",
  65346. strokeLinejoin: "round",
  65347. strokeWidth: "1.1"
  65348. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65349. stroke: "#E4EBF7",
  65350. d: "M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32",
  65351. strokeLinecap: "round",
  65352. strokeLinejoin: "round",
  65353. strokeWidth: "1.1"
  65354. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65355. fill: "#F2D7AD",
  65356. d: "M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1"
  65357. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65358. fill: "#F4D19D",
  65359. d: "M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1"
  65360. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65361. fill: "#F2D7AD",
  65362. d: "M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z"
  65363. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65364. fill: "#CC9B6E",
  65365. d: "M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z"
  65366. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65367. fill: "#F4D19D",
  65368. d: "M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8"
  65369. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65370. fill: "#CC9B6E",
  65371. d: "M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z"
  65372. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65373. fill: "#FFC6A0",
  65374. d: "m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2"
  65375. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65376. stroke: "#DB836E",
  65377. d: "M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0",
  65378. strokeLinecap: "round",
  65379. strokeLinejoin: "round",
  65380. strokeWidth: "1.1"
  65381. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65382. stroke: "#DB836E",
  65383. d: "M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8",
  65384. strokeLinecap: "round",
  65385. strokeLinejoin: "round",
  65386. strokeWidth: "1.1"
  65387. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65388. fill: "#5BA02E",
  65389. d: "M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6"
  65390. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65391. fill: "#92C110",
  65392. d: "M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7"
  65393. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65394. fill: "#F2D7AD",
  65395. d: "M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2"
  65396. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65397. stroke: "#E4EBF7",
  65398. d: "M89 89.5s7.8 5.4 16.6 2.8",
  65399. strokeLinecap: "round",
  65400. strokeLinejoin: "round",
  65401. strokeWidth: "1.1"
  65402. }))));
  65403. /* harmony default export */ var noFound = (NoFound);
  65404. ;// ./components/result/serverError.tsx
  65405. const ServerError = () => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  65406. width: "254",
  65407. height: "294"
  65408. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "Server Error"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  65409. fill: "none",
  65410. fillRule: "evenodd"
  65411. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65412. fill: "#E4EBF7",
  65413. d: "M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1"
  65414. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65415. fill: "#FFF",
  65416. d: "M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7"
  65417. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65418. stroke: "#FFF",
  65419. d: "m37.2 135.6 10.5 6m1 6.3-12.8 10.8",
  65420. strokeWidth: "2"
  65421. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65422. fill: "#FFF",
  65423. d: "M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8"
  65424. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("circle", {
  65425. cx: "201.35",
  65426. cy: "30.2",
  65427. r: "29.7",
  65428. fill: "#FF603B"
  65429. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65430. fill: "#FFF",
  65431. d: "m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7"
  65432. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65433. fill: "#FFB594",
  65434. d: "M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5"
  65435. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65436. fill: "#FFF",
  65437. d: "M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2"
  65438. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65439. fill: "#FFB594",
  65440. d: "m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2"
  65441. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65442. fill: "#FFC6A0",
  65443. d: "M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6"
  65444. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65445. fill: "#520038",
  65446. d: "M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z"
  65447. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65448. fill: "#552950",
  65449. d: "M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3"
  65450. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65451. stroke: "#DB836E",
  65452. d: "m99.2 73.6-.9 1.7-.3 4.3h-2.2",
  65453. strokeLinecap: "round",
  65454. strokeLinejoin: "round",
  65455. strokeWidth: "1.1"
  65456. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65457. stroke: "#5C2552",
  65458. d: "M100 73.3s1.7-.7 2.4.5",
  65459. strokeLinecap: "round",
  65460. strokeLinejoin: "round",
  65461. strokeWidth: "1.1"
  65462. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65463. stroke: "#DB836E",
  65464. d: "M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6",
  65465. strokeLinecap: "round",
  65466. strokeLinejoin: "round",
  65467. strokeWidth: "1.1"
  65468. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65469. stroke: "#5C2552",
  65470. d: "M92.3 71.7s1.9 1.1 4.2 1",
  65471. strokeLinecap: "round",
  65472. strokeLinejoin: "round",
  65473. strokeWidth: "1.1"
  65474. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65475. stroke: "#DB836E",
  65476. d: "M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8",
  65477. strokeLinecap: "round",
  65478. strokeLinejoin: "round",
  65479. strokeWidth: "1.1"
  65480. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65481. stroke: "#E4EBF7",
  65482. d: "M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5",
  65483. strokeLinecap: "round",
  65484. strokeLinejoin: "round",
  65485. strokeWidth: "1.1"
  65486. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65487. fill: "#FFF",
  65488. d: "M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6"
  65489. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65490. fill: "#FFC6A0",
  65491. d: "M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7"
  65492. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65493. fill: "#FFC6A0",
  65494. d: "M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7"
  65495. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65496. stroke: "#E4EBF7",
  65497. d: "M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5",
  65498. strokeLinecap: "round",
  65499. strokeLinejoin: "round",
  65500. strokeWidth: "1.1"
  65501. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65502. fill: "#FFC6A0",
  65503. d: "M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1"
  65504. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65505. fill: "#FFF",
  65506. d: "M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5"
  65507. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65508. fill: "#CBD1D1",
  65509. d: "M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5"
  65510. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65511. fill: "#2B0849",
  65512. d: "M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z"
  65513. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65514. fill: "#A4AABA",
  65515. d: "M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6"
  65516. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65517. fill: "#CBD1D1",
  65518. d: "M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z"
  65519. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65520. fill: "#2B0849",
  65521. d: "M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1"
  65522. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65523. fill: "#A4AABA",
  65524. d: "M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1"
  65525. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65526. fill: "#7BB2F9",
  65527. d: "M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7"
  65528. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65529. stroke: "#648BD8",
  65530. d: "M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4",
  65531. strokeLinecap: "round",
  65532. strokeLinejoin: "round",
  65533. strokeWidth: "1.1"
  65534. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65535. stroke: "#648BD8",
  65536. d: "M97 219.4s2.9-1.2 6.3-4",
  65537. strokeLinecap: "round",
  65538. strokeLinejoin: "round",
  65539. strokeWidth: "1"
  65540. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65541. stroke: "#648BD8",
  65542. d: "M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9",
  65543. strokeLinecap: "round",
  65544. strokeLinejoin: "round",
  65545. strokeWidth: "1.1"
  65546. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65547. fill: "#192064",
  65548. d: "M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7"
  65549. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65550. fill: "#FFF",
  65551. d: "M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8"
  65552. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65553. fill: "#192064",
  65554. d: "M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7"
  65555. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65556. stroke: "#648BD8",
  65557. d: "M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5",
  65558. strokeLinecap: "round",
  65559. strokeLinejoin: "round",
  65560. strokeWidth: "1.1"
  65561. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65562. stroke: "#E4EBF7",
  65563. d: "M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7",
  65564. strokeLinecap: "round",
  65565. strokeLinejoin: "round",
  65566. strokeWidth: "1.1"
  65567. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65568. fill: "#FFC6A0",
  65569. d: "M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7"
  65570. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65571. stroke: "#DB836E",
  65572. d: "M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6",
  65573. strokeLinecap: "round",
  65574. strokeLinejoin: "round",
  65575. strokeWidth: ".8"
  65576. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65577. stroke: "#E59788",
  65578. d: "M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7",
  65579. strokeLinecap: "round",
  65580. strokeLinejoin: "round",
  65581. strokeWidth: ".8"
  65582. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65583. fill: "#FFC6A0",
  65584. d: "M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6"
  65585. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65586. stroke: "#E59788",
  65587. d: "M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1",
  65588. strokeLinecap: "round",
  65589. strokeLinejoin: "round",
  65590. strokeWidth: ".8"
  65591. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65592. stroke: "#E4EBF7",
  65593. d: "M109.3 112.5s3.4-3.6 7.6-4.6",
  65594. strokeLinecap: "round",
  65595. strokeLinejoin: "round",
  65596. strokeWidth: "1.1"
  65597. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65598. stroke: "#E59788",
  65599. d: "M107.4 123s9.7-2.7 11.4-.9",
  65600. strokeLinecap: "round",
  65601. strokeLinejoin: "round",
  65602. strokeWidth: ".8"
  65603. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65604. stroke: "#BFCDDD",
  65605. d: "m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4",
  65606. strokeLinecap: "round",
  65607. strokeLinejoin: "round",
  65608. strokeWidth: "2"
  65609. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65610. fill: "#A3B4C6",
  65611. d: "M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4"
  65612. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65613. fill: "#A3B4C6",
  65614. d: "M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8"
  65615. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65616. fill: "#A3B4C6",
  65617. d: "M154.1 190.1h70.5v-84.6h-70.5z"
  65618. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65619. fill: "#BFCDDD",
  65620. d: "M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1"
  65621. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65622. fill: "#FFF",
  65623. d: "M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8"
  65624. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65625. fill: "#BFCDDD",
  65626. d: "M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2"
  65627. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65628. stroke: "#7C90A5",
  65629. d: "M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7",
  65630. strokeLinecap: "round",
  65631. strokeLinejoin: "round",
  65632. strokeWidth: "1.1"
  65633. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65634. fill: "#FFF",
  65635. d: "M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8"
  65636. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65637. fill: "#BFCDDD",
  65638. d: "M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4"
  65639. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65640. stroke: "#A3B4C6",
  65641. d: "M177.3 207.2v11.5m23.8-11.5v11.5",
  65642. strokeLinecap: "round",
  65643. strokeLinejoin: "round",
  65644. strokeWidth: "1.1"
  65645. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65646. fill: "#5BA02E",
  65647. d: "M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4"
  65648. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65649. fill: "#92C110",
  65650. d: "M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4"
  65651. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65652. fill: "#F2D7AD",
  65653. d: "M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2"
  65654. }))));
  65655. /* harmony default export */ var serverError = (ServerError);
  65656. // EXTERNAL MODULE: ./components/result/style/index.ts
  65657. var result_style = __webpack_require__("./components/result/style/index.ts");
  65658. ;// ./components/result/unauthorized.tsx
  65659. const Unauthorized = () => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("svg", {
  65660. width: "251",
  65661. height: "294"
  65662. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("title", null, "Unauthorized"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("g", {
  65663. fill: "none",
  65664. fillRule: "evenodd"
  65665. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65666. fill: "#E4EBF7",
  65667. d: "M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129"
  65668. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65669. fill: "#FFF",
  65670. d: "M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6"
  65671. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65672. stroke: "#FFF",
  65673. d: "m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7",
  65674. strokeWidth: "2"
  65675. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65676. fill: "#FFF",
  65677. d: "M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2"
  65678. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65679. fill: "#FFF",
  65680. d: "M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2"
  65681. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65682. stroke: "#FFF",
  65683. d: "m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13",
  65684. strokeWidth: "2"
  65685. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65686. fill: "#FFF",
  65687. d: "M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4"
  65688. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65689. stroke: "#FFF",
  65690. d: "M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z",
  65691. strokeWidth: "2"
  65692. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65693. stroke: "#FFF",
  65694. d: "m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7",
  65695. strokeWidth: "2"
  65696. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65697. fill: "#A26EF4",
  65698. d: "M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0"
  65699. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65700. fill: "#FFF",
  65701. d: "m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7"
  65702. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65703. fill: "#FFF",
  65704. d: "M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7"
  65705. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65706. fill: "#5BA02E",
  65707. d: "M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6"
  65708. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65709. fill: "#92C110",
  65710. d: "M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6"
  65711. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65712. fill: "#F2D7AD",
  65713. d: "M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3"
  65714. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65715. fill: "#FFF",
  65716. d: "M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7"
  65717. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65718. fill: "#FFC6A0",
  65719. d: "m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2"
  65720. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65721. fill: "#FFB594",
  65722. d: "M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4"
  65723. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65724. fill: "#FFC6A0",
  65725. d: "m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26"
  65726. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65727. fill: "#FFF",
  65728. d: "M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3"
  65729. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65730. stroke: "#E4EBF7",
  65731. d: "M78.2 94.7s.9 7.4-5 13",
  65732. strokeLinecap: "round",
  65733. strokeLinejoin: "round",
  65734. strokeWidth: "1.1"
  65735. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65736. stroke: "#E4EBF7",
  65737. d: "M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5",
  65738. strokeLinecap: "round",
  65739. strokeLinejoin: "round",
  65740. strokeWidth: ".9"
  65741. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65742. fill: "#FFC6A0",
  65743. d: "m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z"
  65744. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65745. fill: "#FFB594",
  65746. d: "m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9"
  65747. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65748. fill: "#5C2552",
  65749. d: "M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7"
  65750. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65751. fill: "#FFC6A0",
  65752. d: "M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1"
  65753. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65754. stroke: "#DB836E",
  65755. d: "m100.8 77.1 1.7-1-1-4.3.7-1.4",
  65756. strokeLinecap: "round",
  65757. strokeLinejoin: "round",
  65758. strokeWidth: "1.1"
  65759. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65760. fill: "#552950",
  65761. d: "M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3"
  65762. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65763. stroke: "#DB836E",
  65764. d: "M91.1 86.8s5.3 5 12.7 2.3",
  65765. strokeLinecap: "round",
  65766. strokeLinejoin: "round",
  65767. strokeWidth: "1.1"
  65768. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65769. fill: "#DB836E",
  65770. d: "M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2"
  65771. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65772. stroke: "#5C2552",
  65773. d: "M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1",
  65774. strokeLinecap: "round",
  65775. strokeLinejoin: "round",
  65776. strokeWidth: "1.5"
  65777. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65778. stroke: "#DB836E",
  65779. d: "M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2",
  65780. strokeLinecap: "round",
  65781. strokeLinejoin: "round",
  65782. strokeWidth: "1.1"
  65783. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65784. stroke: "#E4EBF7",
  65785. d: "m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7",
  65786. strokeLinecap: "round",
  65787. strokeLinejoin: "round",
  65788. strokeWidth: "1.1"
  65789. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65790. stroke: "#DB836E",
  65791. d: "M64 84.8s-6 10-13.5 10",
  65792. strokeLinecap: "round",
  65793. strokeLinejoin: "round",
  65794. strokeWidth: ".8"
  65795. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65796. fill: "#FFC6A0",
  65797. d: "m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7"
  65798. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65799. stroke: "#DB836E",
  65800. d: "M130.5 85.5s4.6 5.7 11.7 6.2",
  65801. strokeLinecap: "round",
  65802. strokeLinejoin: "round",
  65803. strokeWidth: ".8"
  65804. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65805. stroke: "#E4EBF7",
  65806. d: "M121.7 105.7s-.4 8.6-1.3 13.6",
  65807. strokeLinecap: "round",
  65808. strokeLinejoin: "round",
  65809. strokeWidth: "1.1"
  65810. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65811. stroke: "#648BD8",
  65812. d: "M115.8 161.5s-3.6-1.5-2.7-7.1",
  65813. strokeLinecap: "round",
  65814. strokeLinejoin: "round",
  65815. strokeWidth: "1.1"
  65816. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65817. fill: "#CBD1D1",
  65818. d: "M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6"
  65819. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65820. fill: "#2B0849",
  65821. d: "M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z"
  65822. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65823. fill: "#A4AABA",
  65824. d: "M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6"
  65825. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65826. fill: "#CBD1D1",
  65827. d: "M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z"
  65828. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65829. fill: "#2B0849",
  65830. d: "M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2"
  65831. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65832. fill: "#A4AABA",
  65833. d: "M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1"
  65834. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65835. fill: "#7BB2F9",
  65836. d: "m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39"
  65837. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65838. stroke: "#648BD8",
  65839. d: "M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8",
  65840. strokeLinecap: "round",
  65841. strokeLinejoin: "round",
  65842. strokeWidth: "1.1"
  65843. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65844. stroke: "#648BD8",
  65845. d: "M108.5 221s2.7-1.2 6-4",
  65846. strokeLinecap: "round",
  65847. strokeLinejoin: "round"
  65848. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65849. stroke: "#648BD8",
  65850. d: "M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2",
  65851. strokeLinecap: "round",
  65852. strokeLinejoin: "round",
  65853. strokeWidth: "1.1"
  65854. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65855. fill: "#192064",
  65856. d: "M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4"
  65857. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65858. fill: "#FFF",
  65859. d: "M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7"
  65860. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65861. fill: "#192064",
  65862. d: "M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7"
  65863. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("path", {
  65864. stroke: "#648BD8",
  65865. d: "M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35",
  65866. strokeLinecap: "round",
  65867. strokeLinejoin: "round",
  65868. strokeWidth: "1.1"
  65869. }))));
  65870. /* harmony default export */ var unauthorized = (Unauthorized);
  65871. ;// ./components/result/index.tsx
  65872. const IconMap = {
  65873. success: icons_CheckCircleFilled,
  65874. error: icons_CloseCircleFilled,
  65875. info: icons_ExclamationCircleFilled,
  65876. warning: icons_WarningFilled
  65877. };
  65878. const ExceptionMap = {
  65879. '404': noFound,
  65880. '500': serverError,
  65881. '403': unauthorized
  65882. };
  65883. // ExceptionImageMap keys
  65884. const ExceptionStatus = Object.keys(ExceptionMap);
  65885. const result_Icon = ({
  65886. prefixCls,
  65887. icon,
  65888. status
  65889. }) => {
  65890. const className = classnames_default()(`${prefixCls}-icon`);
  65891. if (true) {
  65892. const warning = (0,_util_warning.devUseWarning)('Result');
  65893. true ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : 0;
  65894. }
  65895. if (ExceptionStatus.includes(`${status}`)) {
  65896. const SVGComponent = ExceptionMap[status];
  65897. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65898. className: `${className} ${prefixCls}-image`
  65899. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(SVGComponent, null));
  65900. }
  65901. const iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(IconMap[status]);
  65902. if (icon === null || icon === false) {
  65903. return null;
  65904. }
  65905. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65906. className: className
  65907. }, icon || iconNode);
  65908. };
  65909. const Extra = ({
  65910. prefixCls,
  65911. extra
  65912. }) => {
  65913. if (!extra) {
  65914. return null;
  65915. }
  65916. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65917. className: `${prefixCls}-extra`
  65918. }, extra);
  65919. };
  65920. const Result = ({
  65921. prefixCls: customizePrefixCls,
  65922. className: customizeClassName,
  65923. rootClassName,
  65924. subTitle,
  65925. title,
  65926. style,
  65927. children,
  65928. status = 'info',
  65929. icon,
  65930. extra
  65931. }) => {
  65932. const {
  65933. getPrefixCls,
  65934. direction,
  65935. result
  65936. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  65937. const prefixCls = getPrefixCls('result', customizePrefixCls);
  65938. // Style
  65939. const [wrapCSSVar, hashId, cssVarCls] = (0,result_style["default"])(prefixCls);
  65940. const className = classnames_default()(prefixCls, `${prefixCls}-${status}`, customizeClassName, result === null || result === void 0 ? void 0 : result.className, rootClassName, {
  65941. [`${prefixCls}-rtl`]: direction === 'rtl'
  65942. }, hashId, cssVarCls);
  65943. const mergedStyle = Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.style), style);
  65944. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65945. className: className,
  65946. style: mergedStyle
  65947. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(result_Icon, {
  65948. prefixCls: prefixCls,
  65949. status: status,
  65950. icon: icon
  65951. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65952. className: `${prefixCls}-title`
  65953. }, title), subTitle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65954. className: `${prefixCls}-subtitle`
  65955. }, subTitle), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Extra, {
  65956. prefixCls: prefixCls,
  65957. extra: extra
  65958. }), children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  65959. className: `${prefixCls}-content`
  65960. }, children)));
  65961. };
  65962. Result.PRESENTED_IMAGE_403 = ExceptionMap['403'];
  65963. Result.PRESENTED_IMAGE_404 = ExceptionMap['404'];
  65964. Result.PRESENTED_IMAGE_500 = ExceptionMap['500'];
  65965. if (true) {
  65966. Result.displayName = 'Result';
  65967. }
  65968. /* harmony default export */ var result = (Result);
  65969. ;// ./components/row/index.tsx
  65970. /* harmony default export */ var components_row = (row);
  65971. ;// ./components/statistic/Number.tsx
  65972. const StatisticNumber = props => {
  65973. const {
  65974. value,
  65975. formatter,
  65976. precision,
  65977. decimalSeparator,
  65978. groupSeparator = '',
  65979. prefixCls
  65980. } = props;
  65981. let valueNode;
  65982. if (typeof formatter === 'function') {
  65983. // Customize formatter
  65984. valueNode = formatter(value);
  65985. } else {
  65986. // Internal formatter
  65987. const val = String(value);
  65988. const cells = val.match(/^(-?)(\d*)(\.(\d+))?$/);
  65989. // Process if illegal number
  65990. if (!cells || val === '-') {
  65991. valueNode = val;
  65992. } else {
  65993. const negative = cells[1];
  65994. let int = cells[2] || '0';
  65995. let decimal = cells[4] || '';
  65996. int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
  65997. if (typeof precision === 'number') {
  65998. decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
  65999. }
  66000. if (decimal) {
  66001. decimal = `${decimalSeparator}${decimal}`;
  66002. }
  66003. valueNode = [/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66004. key: "int",
  66005. className: `${prefixCls}-content-value-int`
  66006. }, negative, int), decimal && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66007. key: "decimal",
  66008. className: `${prefixCls}-content-value-decimal`
  66009. }, decimal))];
  66010. }
  66011. }
  66012. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66013. className: `${prefixCls}-content-value`
  66014. }, valueNode);
  66015. };
  66016. /* harmony default export */ var statistic_Number = (StatisticNumber);
  66017. // EXTERNAL MODULE: ./components/statistic/style/index.ts
  66018. var statistic_style = __webpack_require__("./components/statistic/style/index.ts");
  66019. ;// ./components/statistic/Statistic.tsx
  66020. var Statistic_rest = undefined && undefined.__rest || function (s, e) {
  66021. var t = {};
  66022. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  66023. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  66024. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  66025. }
  66026. return t;
  66027. };
  66028. const Statistic = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  66029. const {
  66030. prefixCls: customizePrefixCls,
  66031. className,
  66032. rootClassName,
  66033. style,
  66034. valueStyle,
  66035. value = 0,
  66036. title,
  66037. valueRender,
  66038. prefix,
  66039. suffix,
  66040. loading = false,
  66041. /* --- FormatConfig starts --- */
  66042. formatter,
  66043. precision,
  66044. decimalSeparator = '.',
  66045. groupSeparator = ',',
  66046. /* --- FormatConfig starts --- */
  66047. onMouseEnter,
  66048. onMouseLeave
  66049. } = props,
  66050. rest = Statistic_rest(props, ["prefixCls", "className", "rootClassName", "style", "valueStyle", "value", "title", "valueRender", "prefix", "suffix", "loading", "formatter", "precision", "decimalSeparator", "groupSeparator", "onMouseEnter", "onMouseLeave"]);
  66051. const {
  66052. getPrefixCls,
  66053. direction,
  66054. className: contextClassName,
  66055. style: contextStyle
  66056. } = (0,config_provider_context.useComponentConfig)('statistic');
  66057. const prefixCls = getPrefixCls('statistic', customizePrefixCls);
  66058. const [wrapCSSVar, hashId, cssVarCls] = (0,statistic_style["default"])(prefixCls);
  66059. const valueNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(statistic_Number, {
  66060. decimalSeparator: decimalSeparator,
  66061. groupSeparator: groupSeparator,
  66062. prefixCls: prefixCls,
  66063. formatter: formatter,
  66064. precision: precision,
  66065. value: value
  66066. });
  66067. const cls = classnames_default()(prefixCls, {
  66068. [`${prefixCls}-rtl`]: direction === 'rtl'
  66069. }, contextClassName, className, rootClassName, hashId, cssVarCls);
  66070. const internalRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  66071. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  66072. nativeElement: internalRef.current
  66073. }));
  66074. const restProps = (0,pickAttrs["default"])(rest, {
  66075. aria: true,
  66076. data: true
  66077. });
  66078. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", Object.assign({}, restProps, {
  66079. ref: internalRef,
  66080. className: cls,
  66081. style: Object.assign(Object.assign({}, contextStyle), style),
  66082. onMouseEnter: onMouseEnter,
  66083. onMouseLeave: onMouseLeave
  66084. }), title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66085. className: `${prefixCls}-title`
  66086. }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(skeleton, {
  66087. paragraph: false,
  66088. loading: loading,
  66089. className: `${prefixCls}-skeleton`
  66090. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66091. style: valueStyle,
  66092. className: `${prefixCls}-content`
  66093. }, prefix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66094. className: `${prefixCls}-content-prefix`
  66095. }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66096. className: `${prefixCls}-content-suffix`
  66097. }, suffix)))));
  66098. });
  66099. if (true) {
  66100. Statistic.displayName = 'Statistic';
  66101. }
  66102. /* harmony default export */ var statistic_Statistic = (Statistic);
  66103. ;// ./components/statistic/utils.ts
  66104. // Countdown
  66105. const timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365],
  66106. // years
  66107. ['M', 1000 * 60 * 60 * 24 * 30],
  66108. // months
  66109. ['D', 1000 * 60 * 60 * 24],
  66110. // days
  66111. ['H', 1000 * 60 * 60],
  66112. // hours
  66113. ['m', 1000 * 60],
  66114. // minutes
  66115. ['s', 1000],
  66116. // seconds
  66117. ['S', 1] // million seconds
  66118. ];
  66119. function formatTimeStr(duration, format) {
  66120. let leftDuration = duration;
  66121. const escapeRegex = /\[[^\]]*]/g;
  66122. const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
  66123. const templateText = format.replace(escapeRegex, '[]');
  66124. const replacedText = timeUnits.reduce((current, [name, unit]) => {
  66125. if (current.includes(name)) {
  66126. const value = Math.floor(leftDuration / unit);
  66127. leftDuration -= value * unit;
  66128. return current.replace(new RegExp(`${name}+`, 'g'), match => {
  66129. const len = match.length;
  66130. return value.toString().padStart(len, '0');
  66131. });
  66132. }
  66133. return current;
  66134. }, templateText);
  66135. let index = 0;
  66136. return replacedText.replace(escapeRegex, () => {
  66137. const match = keepList[index];
  66138. index += 1;
  66139. return match;
  66140. });
  66141. }
  66142. function formatCounter(value, config, down) {
  66143. const {
  66144. format = ''
  66145. } = config;
  66146. const target = new Date(value).getTime();
  66147. const current = Date.now();
  66148. const diff = down ? Math.max(target - current, 0) : Math.max(current - target, 0);
  66149. return formatTimeStr(diff, format);
  66150. }
  66151. ;// ./components/statistic/Timer.tsx
  66152. var Timer_rest = undefined && undefined.__rest || function (s, e) {
  66153. var t = {};
  66154. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  66155. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  66156. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  66157. }
  66158. return t;
  66159. };
  66160. function getTime(value) {
  66161. return new Date(value).getTime();
  66162. }
  66163. const StatisticTimer = props => {
  66164. const {
  66165. value,
  66166. format = 'HH:mm:ss',
  66167. onChange,
  66168. onFinish,
  66169. type
  66170. } = props,
  66171. rest = Timer_rest(props, ["value", "format", "onChange", "onFinish", "type"]);
  66172. const down = type === 'countdown';
  66173. // We reuse state here to do same as `forceUpdate`
  66174. const [showTime, setShowTime] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  66175. // ======================== Update ========================
  66176. const update = (0,rc_util_es.useEvent)(() => {
  66177. const now = Date.now();
  66178. const timestamp = getTime(value);
  66179. setShowTime({});
  66180. const timeDiff = !down ? now - timestamp : timestamp - now;
  66181. onChange === null || onChange === void 0 ? void 0 : onChange(timeDiff);
  66182. // Only countdown will trigger `onFinish`
  66183. if (down && timestamp < now) {
  66184. onFinish === null || onFinish === void 0 ? void 0 : onFinish();
  66185. return false;
  66186. }
  66187. return true;
  66188. });
  66189. // Effect trigger
  66190. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  66191. let rafId;
  66192. const clear = () => raf["default"].cancel(rafId);
  66193. const rafUpdate = () => {
  66194. rafId = (0,raf["default"])(() => {
  66195. if (update()) {
  66196. rafUpdate();
  66197. }
  66198. });
  66199. };
  66200. rafUpdate();
  66201. return clear;
  66202. }, [value, down]);
  66203. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  66204. setShowTime({});
  66205. }, []);
  66206. // ======================== Format ========================
  66207. const formatter = (formatValue, config) => showTime ? formatCounter(formatValue, Object.assign(Object.assign({}, config), {
  66208. format
  66209. }), down) : '-';
  66210. const valueRender = node => (0,reactNode.cloneElement)(node, {
  66211. title: undefined
  66212. });
  66213. // ======================== Render ========================
  66214. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(statistic_Statistic, Object.assign({}, rest, {
  66215. value: value,
  66216. valueRender: valueRender,
  66217. formatter: formatter
  66218. }));
  66219. };
  66220. /* harmony default export */ var Timer = (StatisticTimer);
  66221. ;// ./components/statistic/Countdown.tsx
  66222. const Countdown = props => {
  66223. if (true) {
  66224. const warning = (0,_util_warning.devUseWarning)('Countdown');
  66225. warning.deprecated(false, '<Statistic.Countdown />', '<Statistic.Timer type="countdown" />');
  66226. }
  66227. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Timer, Object.assign({}, props, {
  66228. type: "countdown"
  66229. }));
  66230. };
  66231. /* harmony default export */ var statistic_Countdown = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(Countdown));
  66232. ;// ./components/statistic/index.tsx
  66233. statistic_Statistic.Timer = Timer;
  66234. statistic_Statistic.Countdown = statistic_Countdown;
  66235. /* harmony default export */ var statistic = (statistic_Statistic);
  66236. ;// ./node_modules/rc-steps/es/Step.js
  66237. var Step_excluded = ["className", "prefixCls", "style", "active", "status", "iconPrefix", "icon", "wrapperStyle", "stepNumber", "disabled", "description", "title", "subTitle", "progressDot", "stepIcon", "tailContent", "icons", "stepIndex", "onStepClick", "onClick", "render"];
  66238. /* eslint react/prop-types: 0 */
  66239. function Step_isString(str) {
  66240. return typeof str === 'string';
  66241. }
  66242. function Step(props) {
  66243. var _classNames2;
  66244. var className = props.className,
  66245. prefixCls = props.prefixCls,
  66246. style = props.style,
  66247. active = props.active,
  66248. status = props.status,
  66249. iconPrefix = props.iconPrefix,
  66250. icon = props.icon,
  66251. wrapperStyle = props.wrapperStyle,
  66252. stepNumber = props.stepNumber,
  66253. disabled = props.disabled,
  66254. description = props.description,
  66255. title = props.title,
  66256. subTitle = props.subTitle,
  66257. progressDot = props.progressDot,
  66258. stepIcon = props.stepIcon,
  66259. tailContent = props.tailContent,
  66260. icons = props.icons,
  66261. stepIndex = props.stepIndex,
  66262. onStepClick = props.onStepClick,
  66263. onClick = props.onClick,
  66264. render = props.render,
  66265. restProps = (0,objectWithoutProperties["default"])(props, Step_excluded);
  66266. // ========================= Click ==========================
  66267. var clickable = !!onStepClick && !disabled;
  66268. var accessibilityProps = {};
  66269. if (clickable) {
  66270. accessibilityProps.role = 'button';
  66271. accessibilityProps.tabIndex = 0;
  66272. accessibilityProps.onClick = function (e) {
  66273. onClick === null || onClick === void 0 ? void 0 : onClick(e);
  66274. onStepClick(stepIndex);
  66275. };
  66276. accessibilityProps.onKeyDown = function (e) {
  66277. var which = e.which;
  66278. if (which === KeyCode["default"].ENTER || which === KeyCode["default"].SPACE) {
  66279. onStepClick(stepIndex);
  66280. }
  66281. };
  66282. }
  66283. // ========================= Render =========================
  66284. var renderIconNode = function renderIconNode() {
  66285. var _classNames;
  66286. var iconNode;
  66287. var iconClassName = classnames_default()("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && Step_isString(icon)), (0,defineProperty["default"])(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && (icons && !icons.finish || !icons)), (0,defineProperty["default"])(_classNames, "".concat(iconPrefix, "icon-cross"), !icon && status === 'error' && (icons && !icons.error || !icons)), _classNames));
  66288. var iconDot = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66289. className: "".concat(prefixCls, "-icon-dot")
  66290. });
  66291. // `progressDot` enjoy the highest priority
  66292. if (progressDot) {
  66293. if (typeof progressDot === 'function') {
  66294. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66295. className: "".concat(prefixCls, "-icon")
  66296. }, progressDot(iconDot, {
  66297. index: stepNumber - 1,
  66298. status: status,
  66299. title: title,
  66300. description: description
  66301. }));
  66302. } else {
  66303. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66304. className: "".concat(prefixCls, "-icon")
  66305. }, iconDot);
  66306. }
  66307. } else if (icon && !Step_isString(icon)) {
  66308. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66309. className: "".concat(prefixCls, "-icon")
  66310. }, icon);
  66311. } else if (icons && icons.finish && status === 'finish') {
  66312. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66313. className: "".concat(prefixCls, "-icon")
  66314. }, icons.finish);
  66315. } else if (icons && icons.error && status === 'error') {
  66316. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66317. className: "".concat(prefixCls, "-icon")
  66318. }, icons.error);
  66319. } else if (icon || status === 'finish' || status === 'error') {
  66320. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66321. className: iconClassName
  66322. });
  66323. } else {
  66324. iconNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66325. className: "".concat(prefixCls, "-icon")
  66326. }, stepNumber);
  66327. }
  66328. if (stepIcon) {
  66329. iconNode = stepIcon({
  66330. index: stepNumber - 1,
  66331. status: status,
  66332. title: title,
  66333. description: description,
  66334. node: iconNode
  66335. });
  66336. }
  66337. return iconNode;
  66338. };
  66339. var mergedStatus = status || 'wait';
  66340. var classString = classnames_default()("".concat(prefixCls, "-item"), "".concat(prefixCls, "-item-").concat(mergedStatus), className, (_classNames2 = {}, (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-item-custom"), icon), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-item-active"), active), (0,defineProperty["default"])(_classNames2, "".concat(prefixCls, "-item-disabled"), disabled === true), _classNames2));
  66341. var stepItemStyle = (0,objectSpread2["default"])({}, style);
  66342. var stepNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({}, restProps, {
  66343. className: classString,
  66344. style: stepItemStyle
  66345. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  66346. onClick: onClick
  66347. }, accessibilityProps, {
  66348. className: "".concat(prefixCls, "-item-container")
  66349. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66350. className: "".concat(prefixCls, "-item-tail")
  66351. }, tailContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66352. className: "".concat(prefixCls, "-item-icon")
  66353. }, renderIconNode()), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66354. className: "".concat(prefixCls, "-item-content")
  66355. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66356. className: "".concat(prefixCls, "-item-title")
  66357. }, title, subTitle && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66358. title: typeof subTitle === 'string' ? subTitle : undefined,
  66359. className: "".concat(prefixCls, "-item-subtitle")
  66360. }, subTitle)), description && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66361. className: "".concat(prefixCls, "-item-description")
  66362. }, description))));
  66363. if (render) {
  66364. stepNode = render(stepNode) || null;
  66365. }
  66366. return stepNode;
  66367. }
  66368. /* harmony default export */ var es_Step = (Step);
  66369. ;// ./node_modules/rc-steps/es/Steps.js
  66370. var Steps_excluded = ["prefixCls", "style", "className", "children", "direction", "type", "labelPlacement", "iconPrefix", "status", "size", "current", "progressDot", "stepIcon", "initial", "icons", "onChange", "itemRender", "items"];
  66371. /* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */
  66372. function es_Steps_Steps(props) {
  66373. var _classNames;
  66374. var _props$prefixCls = props.prefixCls,
  66375. prefixCls = _props$prefixCls === void 0 ? 'rc-steps' : _props$prefixCls,
  66376. _props$style = props.style,
  66377. style = _props$style === void 0 ? {} : _props$style,
  66378. className = props.className,
  66379. children = props.children,
  66380. _props$direction = props.direction,
  66381. direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
  66382. _props$type = props.type,
  66383. type = _props$type === void 0 ? 'default' : _props$type,
  66384. _props$labelPlacement = props.labelPlacement,
  66385. labelPlacement = _props$labelPlacement === void 0 ? 'horizontal' : _props$labelPlacement,
  66386. _props$iconPrefix = props.iconPrefix,
  66387. iconPrefix = _props$iconPrefix === void 0 ? 'rc' : _props$iconPrefix,
  66388. _props$status = props.status,
  66389. status = _props$status === void 0 ? 'process' : _props$status,
  66390. size = props.size,
  66391. _props$current = props.current,
  66392. current = _props$current === void 0 ? 0 : _props$current,
  66393. _props$progressDot = props.progressDot,
  66394. progressDot = _props$progressDot === void 0 ? false : _props$progressDot,
  66395. stepIcon = props.stepIcon,
  66396. _props$initial = props.initial,
  66397. initial = _props$initial === void 0 ? 0 : _props$initial,
  66398. icons = props.icons,
  66399. onChange = props.onChange,
  66400. itemRender = props.itemRender,
  66401. _props$items = props.items,
  66402. items = _props$items === void 0 ? [] : _props$items,
  66403. restProps = (0,objectWithoutProperties["default"])(props, Steps_excluded);
  66404. var isNav = type === 'navigation';
  66405. var isInline = type === 'inline';
  66406. // inline type requires fixed progressDot direction size.
  66407. var mergedProgressDot = isInline || progressDot;
  66408. var mergedDirection = isInline ? 'horizontal' : direction;
  66409. var mergedSize = isInline ? undefined : size;
  66410. var adjustedLabelPlacement = mergedProgressDot ? 'vertical' : labelPlacement;
  66411. var classString = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(mergedDirection), className, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-label-").concat(adjustedLabelPlacement), mergedDirection === 'horizontal'), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-dot"), !!mergedProgressDot), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-navigation"), isNav), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-inline"), isInline), _classNames));
  66412. var onStepClick = function onStepClick(next) {
  66413. if (onChange && current !== next) {
  66414. onChange(next);
  66415. }
  66416. };
  66417. var renderStep = function renderStep(item, index) {
  66418. var mergedItem = (0,objectSpread2["default"])({}, item);
  66419. var stepNumber = initial + index;
  66420. // fix tail color
  66421. if (status === 'error' && index === current - 1) {
  66422. mergedItem.className = "".concat(prefixCls, "-next-error");
  66423. }
  66424. if (!mergedItem.status) {
  66425. if (stepNumber === current) {
  66426. mergedItem.status = status;
  66427. } else if (stepNumber < current) {
  66428. mergedItem.status = 'finish';
  66429. } else {
  66430. mergedItem.status = 'wait';
  66431. }
  66432. }
  66433. if (isInline) {
  66434. mergedItem.icon = undefined;
  66435. mergedItem.subTitle = undefined;
  66436. }
  66437. if (!mergedItem.render && itemRender) {
  66438. mergedItem.render = function (stepItem) {
  66439. return itemRender(mergedItem, stepItem);
  66440. };
  66441. }
  66442. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Step, (0,esm_extends["default"])({}, mergedItem, {
  66443. active: stepNumber === current,
  66444. stepNumber: stepNumber + 1,
  66445. stepIndex: stepNumber,
  66446. key: stepNumber,
  66447. prefixCls: prefixCls,
  66448. iconPrefix: iconPrefix,
  66449. wrapperStyle: style,
  66450. progressDot: mergedProgressDot,
  66451. stepIcon: stepIcon,
  66452. icons: icons,
  66453. onStepClick: onChange && onStepClick
  66454. }));
  66455. };
  66456. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  66457. className: classString,
  66458. style: style
  66459. }, restProps), items.filter(function (item) {
  66460. return item;
  66461. }).map(renderStep));
  66462. }
  66463. es_Steps_Steps.Step = es_Step;
  66464. /* harmony default export */ var rc_steps_es_Steps = (es_Steps_Steps);
  66465. ;// ./node_modules/rc-steps/es/index.js
  66466. /* harmony default export */ var rc_steps_es = (rc_steps_es_Steps);
  66467. // EXTERNAL MODULE: ./components/steps/style/index.ts + 10 modules
  66468. var steps_style = __webpack_require__("./components/steps/style/index.ts");
  66469. ;// ./components/steps/useLegacyItems.ts
  66470. function useLegacyItems_filter(items) {
  66471. return items.filter(item => item);
  66472. }
  66473. function useLegacyItems_useLegacyItems(items, children) {
  66474. if (false) // removed by dead control flow
  66475. {}
  66476. if (items) {
  66477. return items;
  66478. }
  66479. const childrenItems = (0,toArray["default"])(children).map(node => {
  66480. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node)) {
  66481. const {
  66482. props
  66483. } = node;
  66484. const item = Object.assign({}, props);
  66485. return item;
  66486. }
  66487. return null;
  66488. });
  66489. return useLegacyItems_filter(childrenItems);
  66490. }
  66491. /* harmony default export */ var steps_useLegacyItems = (useLegacyItems_useLegacyItems);
  66492. ;// ./components/steps/index.tsx
  66493. var steps_rest = undefined && undefined.__rest || function (s, e) {
  66494. var t = {};
  66495. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  66496. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  66497. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  66498. }
  66499. return t;
  66500. };
  66501. const steps_Steps = props => {
  66502. const {
  66503. percent,
  66504. size: customizeSize,
  66505. className,
  66506. rootClassName,
  66507. direction,
  66508. items,
  66509. responsive = true,
  66510. current = 0,
  66511. children,
  66512. style
  66513. } = props,
  66514. restProps = steps_rest(props, ["percent", "size", "className", "rootClassName", "direction", "items", "responsive", "current", "children", "style"]);
  66515. const {
  66516. xs
  66517. } = hooks_useBreakpoint(responsive);
  66518. const {
  66519. getPrefixCls,
  66520. direction: rtlDirection,
  66521. className: contextClassName,
  66522. style: contextStyle
  66523. } = (0,config_provider_context.useComponentConfig)('steps');
  66524. const realDirectionValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => responsive && xs ? 'vertical' : direction, [xs, direction]);
  66525. const size = (0,useSize["default"])(customizeSize);
  66526. const prefixCls = getPrefixCls('steps', props.prefixCls);
  66527. const [wrapCSSVar, hashId, cssVarCls] = (0,steps_style["default"])(prefixCls);
  66528. const isInline = props.type === 'inline';
  66529. const iconPrefix = getPrefixCls('', props.iconPrefix);
  66530. const mergedItems = steps_useLegacyItems(items, children);
  66531. const mergedPercent = isInline ? undefined : percent;
  66532. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  66533. const stepsClassName = classnames_default()(contextClassName, {
  66534. [`${prefixCls}-rtl`]: rtlDirection === 'rtl',
  66535. [`${prefixCls}-with-progress`]: mergedPercent !== undefined
  66536. }, className, rootClassName, hashId, cssVarCls);
  66537. const icons = {
  66538. finish: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, {
  66539. className: `${prefixCls}-finish-icon`
  66540. }),
  66541. error: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CloseOutlined, {
  66542. className: `${prefixCls}-error-icon`
  66543. })
  66544. };
  66545. const stepIconRender = ({
  66546. node,
  66547. status
  66548. }) => {
  66549. if (status === 'process' && mergedPercent !== undefined) {
  66550. // currently it's hard-coded, since we can't easily read the actually width of icon
  66551. const progressWidth = size === 'small' ? 32 : 40;
  66552. // iconWithProgress
  66553. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66554. className: `${prefixCls}-progress-icon`
  66555. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_progress, {
  66556. type: "circle",
  66557. percent: mergedPercent,
  66558. size: progressWidth,
  66559. strokeWidth: 4,
  66560. format: () => null
  66561. }), node);
  66562. }
  66563. return node;
  66564. };
  66565. const itemRender = (item, stepItem) => item.description ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
  66566. title: item.description
  66567. }, stepItem) : stepItem;
  66568. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_steps_es, Object.assign({
  66569. icons: icons
  66570. }, restProps, {
  66571. style: mergedStyle,
  66572. current: current,
  66573. size: size,
  66574. items: mergedItems,
  66575. itemRender: isInline ? itemRender : undefined,
  66576. stepIcon: stepIconRender,
  66577. direction: realDirectionValue,
  66578. prefixCls: prefixCls,
  66579. iconPrefix: iconPrefix,
  66580. className: stepsClassName
  66581. })));
  66582. };
  66583. steps_Steps.Step = rc_steps_es.Step;
  66584. if (true) {
  66585. steps_Steps.displayName = 'Steps';
  66586. }
  66587. /* harmony default export */ var steps = (steps_Steps);
  66588. ;// ./node_modules/rc-switch/es/index.js
  66589. var rc_switch_es_excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
  66590. var Switch = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (_ref, ref) {
  66591. var _classNames;
  66592. var _ref$prefixCls = _ref.prefixCls,
  66593. prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
  66594. className = _ref.className,
  66595. checked = _ref.checked,
  66596. defaultChecked = _ref.defaultChecked,
  66597. disabled = _ref.disabled,
  66598. loadingIcon = _ref.loadingIcon,
  66599. checkedChildren = _ref.checkedChildren,
  66600. unCheckedChildren = _ref.unCheckedChildren,
  66601. onClick = _ref.onClick,
  66602. onChange = _ref.onChange,
  66603. onKeyDown = _ref.onKeyDown,
  66604. restProps = (0,objectWithoutProperties["default"])(_ref, rc_switch_es_excluded);
  66605. var _useMergedState = (0,useMergedState["default"])(false, {
  66606. value: checked,
  66607. defaultValue: defaultChecked
  66608. }),
  66609. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  66610. innerChecked = _useMergedState2[0],
  66611. setInnerChecked = _useMergedState2[1];
  66612. function triggerChange(newChecked, event) {
  66613. var mergedChecked = innerChecked;
  66614. if (!disabled) {
  66615. mergedChecked = newChecked;
  66616. setInnerChecked(mergedChecked);
  66617. onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
  66618. }
  66619. return mergedChecked;
  66620. }
  66621. function onInternalKeyDown(e) {
  66622. if (e.which === KeyCode["default"].LEFT) {
  66623. triggerChange(false, e);
  66624. } else if (e.which === KeyCode["default"].RIGHT) {
  66625. triggerChange(true, e);
  66626. }
  66627. onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
  66628. }
  66629. function onInternalClick(e) {
  66630. var ret = triggerChange(!innerChecked, e);
  66631. // [Legacy] trigger onClick with value
  66632. onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
  66633. }
  66634. var switchClassName = classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0,defineProperty["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
  66635. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", (0,esm_extends["default"])({}, restProps, {
  66636. type: "button",
  66637. role: "switch",
  66638. "aria-checked": innerChecked,
  66639. disabled: disabled,
  66640. className: switchClassName,
  66641. ref: ref,
  66642. onKeyDown: onInternalKeyDown,
  66643. onClick: onInternalClick
  66644. }), loadingIcon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66645. className: "".concat(prefixCls, "-inner")
  66646. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66647. className: "".concat(prefixCls, "-inner-checked")
  66648. }, checkedChildren), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  66649. className: "".concat(prefixCls, "-inner-unchecked")
  66650. }, unCheckedChildren)));
  66651. });
  66652. Switch.displayName = 'Switch';
  66653. /* harmony default export */ var rc_switch_es = (Switch);
  66654. // EXTERNAL MODULE: ./components/switch/style/index.ts
  66655. var switch_style = __webpack_require__("./components/switch/style/index.ts");
  66656. ;// ./components/switch/index.tsx
  66657. var switch_rest = undefined && undefined.__rest || function (s, e) {
  66658. var t = {};
  66659. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  66660. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  66661. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  66662. }
  66663. return t;
  66664. };
  66665. const InternalSwitch = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  66666. const {
  66667. prefixCls: customizePrefixCls,
  66668. size: customizeSize,
  66669. disabled: customDisabled,
  66670. loading,
  66671. className,
  66672. rootClassName,
  66673. style,
  66674. checked: checkedProp,
  66675. value,
  66676. defaultChecked: defaultCheckedProp,
  66677. defaultValue,
  66678. onChange
  66679. } = props,
  66680. restProps = switch_rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style", "checked", "value", "defaultChecked", "defaultValue", "onChange"]);
  66681. const [checked, setChecked] = (0,useMergedState["default"])(false, {
  66682. value: checkedProp !== null && checkedProp !== void 0 ? checkedProp : value,
  66683. defaultValue: defaultCheckedProp !== null && defaultCheckedProp !== void 0 ? defaultCheckedProp : defaultValue
  66684. });
  66685. const {
  66686. getPrefixCls,
  66687. direction,
  66688. switch: SWITCH
  66689. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  66690. // ===================== Disabled =====================
  66691. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  66692. const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
  66693. const prefixCls = getPrefixCls('switch', customizePrefixCls);
  66694. const loadingIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  66695. className: `${prefixCls}-handle`
  66696. }, loading && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
  66697. className: `${prefixCls}-loading-icon`
  66698. }));
  66699. // Style
  66700. const [wrapCSSVar, hashId, cssVarCls] = (0,switch_style["default"])(prefixCls);
  66701. const mergedSize = (0,useSize["default"])(customizeSize);
  66702. const classes = classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
  66703. [`${prefixCls}-small`]: mergedSize === 'small',
  66704. [`${prefixCls}-loading`]: loading,
  66705. [`${prefixCls}-rtl`]: direction === 'rtl'
  66706. }, className, rootClassName, hashId, cssVarCls);
  66707. const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
  66708. const changeHandler = (...args) => {
  66709. setChecked(args[0]);
  66710. onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, args);
  66711. };
  66712. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
  66713. component: "Switch",
  66714. disabled: mergedDisabled
  66715. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_switch_es, Object.assign({}, restProps, {
  66716. checked: checked,
  66717. onChange: changeHandler,
  66718. prefixCls: prefixCls,
  66719. className: classes,
  66720. style: mergedStyle,
  66721. disabled: mergedDisabled,
  66722. ref: ref,
  66723. loadingIcon: loadingIcon
  66724. }))));
  66725. });
  66726. const switch_Switch = InternalSwitch;
  66727. switch_Switch.__ANT_SWITCH = true;
  66728. if (true) {
  66729. switch_Switch.displayName = 'Switch';
  66730. }
  66731. /* harmony default export */ var components_switch = (switch_Switch);
  66732. ;// ./node_modules/rc-table/es/constant.js
  66733. var EXPAND_COLUMN = {};
  66734. var INTERNAL_HOOKS = 'rc-table-internal-hook';
  66735. ;// ./node_modules/@rc-component/context/es/context.js
  66736. function createContext(defaultValue) {
  66737. var Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(undefined);
  66738. var Provider = function Provider(_ref) {
  66739. var value = _ref.value,
  66740. children = _ref.children;
  66741. var valueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(value);
  66742. valueRef.current = value;
  66743. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  66744. return {
  66745. getValue: function getValue() {
  66746. return valueRef.current;
  66747. },
  66748. listeners: new Set()
  66749. };
  66750. }),
  66751. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 1),
  66752. context = _React$useState2[0];
  66753. (0,useLayoutEffect["default"])(function () {
  66754. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.unstable_batchedUpdates)(function () {
  66755. context.listeners.forEach(function (listener) {
  66756. listener(value);
  66757. });
  66758. });
  66759. }, [value]);
  66760. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Context.Provider, {
  66761. value: context
  66762. }, children);
  66763. };
  66764. return {
  66765. Context: Context,
  66766. Provider: Provider,
  66767. defaultValue: defaultValue
  66768. };
  66769. }
  66770. /** e.g. useSelect(userContext) => user */
  66771. /** e.g. useSelect(userContext, user => user.name) => user.name */
  66772. /** e.g. useSelect(userContext, ['name', 'age']) => user { name, age } */
  66773. /** e.g. useSelect(userContext, 'name') => user.name */
  66774. function useContext(holder, selector) {
  66775. var eventSelector = (0,useEvent["default"])(typeof selector === 'function' ? selector : function (ctx) {
  66776. if (selector === undefined) {
  66777. return ctx;
  66778. }
  66779. if (!Array.isArray(selector)) {
  66780. return ctx[selector];
  66781. }
  66782. var obj = {};
  66783. selector.forEach(function (key) {
  66784. obj[key] = ctx[key];
  66785. });
  66786. return obj;
  66787. });
  66788. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(holder === null || holder === void 0 ? void 0 : holder.Context);
  66789. var _ref2 = context || {},
  66790. listeners = _ref2.listeners,
  66791. getValue = _ref2.getValue;
  66792. var valueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  66793. valueRef.current = eventSelector(context ? getValue() : holder === null || holder === void 0 ? void 0 : holder.defaultValue);
  66794. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState({}),
  66795. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  66796. forceUpdate = _React$useState4[1];
  66797. (0,useLayoutEffect["default"])(function () {
  66798. if (!context) {
  66799. return;
  66800. }
  66801. function trigger(nextValue) {
  66802. var nextSelectorValue = eventSelector(nextValue);
  66803. if (!(0,isEqual["default"])(valueRef.current, nextSelectorValue, true)) {
  66804. forceUpdate({});
  66805. }
  66806. }
  66807. listeners.add(trigger);
  66808. return function () {
  66809. listeners.delete(trigger);
  66810. };
  66811. }, [context]);
  66812. return valueRef.current;
  66813. }
  66814. ;// ./node_modules/@rc-component/context/es/Immutable.js
  66815. /**
  66816. * Create Immutable pair for `makeImmutable` and `responseImmutable`.
  66817. */
  66818. function createImmutable() {
  66819. var ImmutableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  66820. /**
  66821. * Get render update mark by `makeImmutable` root.
  66822. * Do not deps on the return value as render times
  66823. * but only use for `useMemo` or `useCallback` deps.
  66824. */
  66825. function useImmutableMark() {
  66826. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(ImmutableContext);
  66827. }
  66828. /**
  66829. * Wrapped Component will be marked as Immutable.
  66830. * When Component parent trigger render,
  66831. * it will notice children component (use with `responseImmutable`) node that parent has updated.
  66832. * @param Component Passed Component
  66833. * @param triggerRender Customize trigger `responseImmutable` children re-render logic. Default will always trigger re-render when this component re-render.
  66834. */
  66835. function makeImmutable(Component, shouldTriggerRender) {
  66836. var refAble = (0,es_ref.supportRef)(Component);
  66837. var ImmutableComponent = function ImmutableComponent(props, ref) {
  66838. var refProps = refAble ? {
  66839. ref: ref
  66840. } : {};
  66841. var renderTimesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
  66842. var prevProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(props);
  66843. // If parent has the context, we do not wrap it
  66844. var mark = useImmutableMark();
  66845. if (mark !== null) {
  66846. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, props, refProps));
  66847. }
  66848. if (
  66849. // Always trigger re-render if not provide `notTriggerRender`
  66850. !shouldTriggerRender || shouldTriggerRender(prevProps.current, props)) {
  66851. renderTimesRef.current += 1;
  66852. }
  66853. prevProps.current = props;
  66854. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(ImmutableContext.Provider, {
  66855. value: renderTimesRef.current
  66856. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, props, refProps)));
  66857. };
  66858. if (true) {
  66859. ImmutableComponent.displayName = "ImmutableRoot(".concat(Component.displayName || Component.name, ")");
  66860. }
  66861. return refAble ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ImmutableComponent) : ImmutableComponent;
  66862. }
  66863. /**
  66864. * Wrapped Component with `React.memo`.
  66865. * But will rerender when parent with `makeImmutable` rerender.
  66866. */
  66867. function responseImmutable(Component, propsAreEqual) {
  66868. var refAble = (0,es_ref.supportRef)(Component);
  66869. var ImmutableComponent = function ImmutableComponent(props, ref) {
  66870. var refProps = refAble ? {
  66871. ref: ref
  66872. } : {};
  66873. useImmutableMark();
  66874. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, props, refProps));
  66875. };
  66876. if (true) {
  66877. ImmutableComponent.displayName = "ImmutableResponse(".concat(Component.displayName || Component.name, ")");
  66878. }
  66879. return refAble ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(ImmutableComponent), propsAreEqual) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(ImmutableComponent, propsAreEqual);
  66880. }
  66881. return {
  66882. makeImmutable: makeImmutable,
  66883. responseImmutable: responseImmutable,
  66884. useImmutableMark: useImmutableMark
  66885. };
  66886. }
  66887. ;// ./node_modules/@rc-component/context/es/index.js
  66888. // For legacy usage, we export it directly
  66889. var _createImmutable = createImmutable(),
  66890. makeImmutable = _createImmutable.makeImmutable,
  66891. responseImmutable = _createImmutable.responseImmutable,
  66892. useImmutableMark = _createImmutable.useImmutableMark;
  66893. ;// ./node_modules/rc-table/es/context/TableContext.js
  66894. var TableContext_createImmutable = createImmutable(),
  66895. TableContext_makeImmutable = TableContext_createImmutable.makeImmutable,
  66896. TableContext_responseImmutable = TableContext_createImmutable.responseImmutable,
  66897. TableContext_useImmutableMark = TableContext_createImmutable.useImmutableMark;
  66898. var TableContext = createContext();
  66899. /* harmony default export */ var context_TableContext = (TableContext);
  66900. ;// ./node_modules/rc-table/es/hooks/useRenderTimes.js
  66901. /* istanbul ignore file */
  66902. function useRenderTimes(props, debug) {
  66903. // Render times
  66904. var timesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
  66905. timesRef.current += 1;
  66906. // Props changed
  66907. var propsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(props);
  66908. var keys = [];
  66909. Object.keys(props || {}).map(function (key) {
  66910. var _propsRef$current;
  66911. if ((props === null || props === void 0 ? void 0 : props[key]) !== ((_propsRef$current = propsRef.current) === null || _propsRef$current === void 0 ? void 0 : _propsRef$current[key])) {
  66912. keys.push(key);
  66913. }
  66914. });
  66915. propsRef.current = props;
  66916. // Cache keys since React rerender may cause it lost
  66917. var keysRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  66918. if (keys.length) {
  66919. keysRef.current = keys;
  66920. }
  66921. external_root_React_commonjs2_react_commonjs_react_amd_react_.useDebugValue(timesRef.current);
  66922. external_root_React_commonjs2_react_commonjs_react_amd_react_.useDebugValue(keysRef.current.join(', '));
  66923. if (debug) {
  66924. console.log("".concat(debug, ":"), timesRef.current, keysRef.current);
  66925. }
  66926. return timesRef.current;
  66927. }
  66928. /* harmony default export */ var hooks_useRenderTimes = ( true ? useRenderTimes : 0);
  66929. var RenderBlock = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(function () {
  66930. var times = useRenderTimes();
  66931. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("h1", null, "Render Times: ", times);
  66932. });
  66933. if (true) {
  66934. RenderBlock.displayName = 'RenderBlock';
  66935. }
  66936. ;// ./node_modules/rc-table/es/context/PerfContext.js
  66937. // TODO: Remove when use `responsiveImmutable`
  66938. var PerfContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  66939. renderWithProps: false
  66940. });
  66941. /* harmony default export */ var context_PerfContext = (PerfContext);
  66942. ;// ./node_modules/rc-table/es/utils/valueUtil.js
  66943. var INTERNAL_KEY_PREFIX = 'RC_TABLE_KEY';
  66944. function valueUtil_toArray(arr) {
  66945. if (arr === undefined || arr === null) {
  66946. return [];
  66947. }
  66948. return Array.isArray(arr) ? arr : [arr];
  66949. }
  66950. function getColumnsKey(columns) {
  66951. var columnKeys = [];
  66952. var keys = {};
  66953. columns.forEach(function (column) {
  66954. var _ref = column || {},
  66955. key = _ref.key,
  66956. dataIndex = _ref.dataIndex;
  66957. var mergedKey = key || valueUtil_toArray(dataIndex).join('-') || INTERNAL_KEY_PREFIX;
  66958. while (keys[mergedKey]) {
  66959. mergedKey = "".concat(mergedKey, "_next");
  66960. }
  66961. keys[mergedKey] = true;
  66962. columnKeys.push(mergedKey);
  66963. });
  66964. return columnKeys;
  66965. }
  66966. function validateValue(val) {
  66967. return val !== null && val !== undefined;
  66968. }
  66969. function validNumberValue(value) {
  66970. return typeof value === 'number' && !Number.isNaN(value);
  66971. }
  66972. ;// ./node_modules/rc-table/es/Cell/useCellRender.js
  66973. function isRenderCell(data) {
  66974. return data && (0,esm_typeof["default"])(data) === 'object' && !Array.isArray(data) && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(data);
  66975. }
  66976. function useCellRender_useCellRender(record, dataIndex, renderIndex, children, render, shouldCellUpdate) {
  66977. // TODO: Remove this after next major version
  66978. var perfRecord = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(context_PerfContext);
  66979. var mark = TableContext_useImmutableMark();
  66980. // ======================== Render ========================
  66981. var retData = (0,useMemo["default"])(function () {
  66982. if (validateValue(children)) {
  66983. return [children];
  66984. }
  66985. var path = dataIndex === null || dataIndex === undefined || dataIndex === '' ? [] : Array.isArray(dataIndex) ? dataIndex : [dataIndex];
  66986. var value = (0,get["default"])(record, path);
  66987. // Customize render node
  66988. var returnChildNode = value;
  66989. var returnCellProps = undefined;
  66990. if (render) {
  66991. var renderData = render(value, record, renderIndex);
  66992. if (isRenderCell(renderData)) {
  66993. if (true) {
  66994. (0,warning["default"])(false, '`columns.render` return cell props is deprecated with perf issue, please use `onCell` instead.');
  66995. }
  66996. returnChildNode = renderData.children;
  66997. returnCellProps = renderData.props;
  66998. perfRecord.renderWithProps = true;
  66999. } else {
  67000. returnChildNode = renderData;
  67001. }
  67002. }
  67003. return [returnChildNode, returnCellProps];
  67004. }, [
  67005. // Force update deps
  67006. mark,
  67007. // Normal deps
  67008. record, children, dataIndex, render, renderIndex], function (prev, next) {
  67009. if (shouldCellUpdate) {
  67010. var _prev = (0,slicedToArray["default"])(prev, 2),
  67011. prevRecord = _prev[1];
  67012. var _next = (0,slicedToArray["default"])(next, 2),
  67013. nextRecord = _next[1];
  67014. return shouldCellUpdate(nextRecord, prevRecord);
  67015. }
  67016. // Legacy mode should always update
  67017. if (perfRecord.renderWithProps) {
  67018. return true;
  67019. }
  67020. return !(0,isEqual["default"])(prev, next, true);
  67021. });
  67022. return retData;
  67023. }
  67024. ;// ./node_modules/rc-table/es/Cell/useHoverState.js
  67025. /** Check if cell is in hover range */
  67026. function inHoverRange(cellStartRow, cellRowSpan, startRow, endRow) {
  67027. var cellEndRow = cellStartRow + cellRowSpan - 1;
  67028. return cellStartRow <= endRow && cellEndRow >= startRow;
  67029. }
  67030. function useHoverState(rowIndex, rowSpan) {
  67031. return useContext(context_TableContext, function (ctx) {
  67032. var hovering = inHoverRange(rowIndex, rowSpan || 1, ctx.hoverStartRow, ctx.hoverEndRow);
  67033. return [hovering, ctx.onHover];
  67034. });
  67035. }
  67036. ;// ./node_modules/rc-table/es/Cell/index.js
  67037. var getTitleFromCellRenderChildren = function getTitleFromCellRenderChildren(_ref) {
  67038. var ellipsis = _ref.ellipsis,
  67039. rowType = _ref.rowType,
  67040. children = _ref.children;
  67041. var title;
  67042. var ellipsisConfig = ellipsis === true ? {
  67043. showTitle: true
  67044. } : ellipsis;
  67045. if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) {
  67046. if (typeof children === 'string' || typeof children === 'number') {
  67047. title = children.toString();
  67048. } else if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(children) && typeof children.props.children === 'string') {
  67049. title = children.props.children;
  67050. }
  67051. }
  67052. return title;
  67053. };
  67054. function Cell_Cell(props) {
  67055. var _ref2, _ref3, _legacyCellProps$colS, _ref4, _ref5, _legacyCellProps$rowS, _additionalProps$titl, _classNames;
  67056. if (true) {
  67057. hooks_useRenderTimes(props);
  67058. }
  67059. var Component = props.component,
  67060. children = props.children,
  67061. ellipsis = props.ellipsis,
  67062. scope = props.scope,
  67063. prefixCls = props.prefixCls,
  67064. className = props.className,
  67065. align = props.align,
  67066. record = props.record,
  67067. render = props.render,
  67068. dataIndex = props.dataIndex,
  67069. renderIndex = props.renderIndex,
  67070. shouldCellUpdate = props.shouldCellUpdate,
  67071. index = props.index,
  67072. rowType = props.rowType,
  67073. colSpan = props.colSpan,
  67074. rowSpan = props.rowSpan,
  67075. fixLeft = props.fixLeft,
  67076. fixRight = props.fixRight,
  67077. firstFixLeft = props.firstFixLeft,
  67078. lastFixLeft = props.lastFixLeft,
  67079. firstFixRight = props.firstFixRight,
  67080. lastFixRight = props.lastFixRight,
  67081. appendNode = props.appendNode,
  67082. _props$additionalProp = props.additionalProps,
  67083. additionalProps = _props$additionalProp === void 0 ? {} : _props$additionalProp,
  67084. isSticky = props.isSticky;
  67085. var cellPrefixCls = "".concat(prefixCls, "-cell");
  67086. var _useContext = useContext(context_TableContext, ['supportSticky', 'allColumnsFixedLeft', 'rowHoverable']),
  67087. supportSticky = _useContext.supportSticky,
  67088. allColumnsFixedLeft = _useContext.allColumnsFixedLeft,
  67089. rowHoverable = _useContext.rowHoverable;
  67090. // ====================== Value =======================
  67091. var _useCellRender = useCellRender_useCellRender(record, dataIndex, renderIndex, children, render, shouldCellUpdate),
  67092. _useCellRender2 = (0,slicedToArray["default"])(_useCellRender, 2),
  67093. childNode = _useCellRender2[0],
  67094. legacyCellProps = _useCellRender2[1];
  67095. // ====================== Fixed =======================
  67096. var fixedStyle = {};
  67097. var isFixLeft = typeof fixLeft === 'number' && supportSticky;
  67098. var isFixRight = typeof fixRight === 'number' && supportSticky;
  67099. if (isFixLeft) {
  67100. fixedStyle.position = 'sticky';
  67101. fixedStyle.left = fixLeft;
  67102. }
  67103. if (isFixRight) {
  67104. fixedStyle.position = 'sticky';
  67105. fixedStyle.right = fixRight;
  67106. }
  67107. // ================ RowSpan & ColSpan =================
  67108. var mergedColSpan = (_ref2 = (_ref3 = (_legacyCellProps$colS = legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.colSpan) !== null && _legacyCellProps$colS !== void 0 ? _legacyCellProps$colS : additionalProps.colSpan) !== null && _ref3 !== void 0 ? _ref3 : colSpan) !== null && _ref2 !== void 0 ? _ref2 : 1;
  67109. var mergedRowSpan = (_ref4 = (_ref5 = (_legacyCellProps$rowS = legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.rowSpan) !== null && _legacyCellProps$rowS !== void 0 ? _legacyCellProps$rowS : additionalProps.rowSpan) !== null && _ref5 !== void 0 ? _ref5 : rowSpan) !== null && _ref4 !== void 0 ? _ref4 : 1;
  67110. // ====================== Hover =======================
  67111. var _useHoverState = useHoverState(index, mergedRowSpan),
  67112. _useHoverState2 = (0,slicedToArray["default"])(_useHoverState, 2),
  67113. hovering = _useHoverState2[0],
  67114. onHover = _useHoverState2[1];
  67115. var onMouseEnter = (0,rc_util_es.useEvent)(function (event) {
  67116. var _additionalProps$onMo;
  67117. if (record) {
  67118. onHover(index, index + mergedRowSpan - 1);
  67119. }
  67120. additionalProps === null || additionalProps === void 0 || (_additionalProps$onMo = additionalProps.onMouseEnter) === null || _additionalProps$onMo === void 0 || _additionalProps$onMo.call(additionalProps, event);
  67121. });
  67122. var onMouseLeave = (0,rc_util_es.useEvent)(function (event) {
  67123. var _additionalProps$onMo2;
  67124. if (record) {
  67125. onHover(-1, -1);
  67126. }
  67127. additionalProps === null || additionalProps === void 0 || (_additionalProps$onMo2 = additionalProps.onMouseLeave) === null || _additionalProps$onMo2 === void 0 || _additionalProps$onMo2.call(additionalProps, event);
  67128. });
  67129. // ====================== Render ======================
  67130. if (mergedColSpan === 0 || mergedRowSpan === 0) {
  67131. return null;
  67132. }
  67133. // >>>>> Title
  67134. var title = (_additionalProps$titl = additionalProps.title) !== null && _additionalProps$titl !== void 0 ? _additionalProps$titl : getTitleFromCellRenderChildren({
  67135. rowType: rowType,
  67136. ellipsis: ellipsis,
  67137. children: childNode
  67138. });
  67139. // >>>>> ClassName
  67140. var mergedClassName = classnames_default()(cellPrefixCls, className, (_classNames = {}, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])(_classNames, "".concat(cellPrefixCls, "-fix-left"), isFixLeft && supportSticky), "".concat(cellPrefixCls, "-fix-left-first"), firstFixLeft && supportSticky), "".concat(cellPrefixCls, "-fix-left-last"), lastFixLeft && supportSticky), "".concat(cellPrefixCls, "-fix-left-all"), lastFixLeft && allColumnsFixedLeft && supportSticky), "".concat(cellPrefixCls, "-fix-right"), isFixRight && supportSticky), "".concat(cellPrefixCls, "-fix-right-first"), firstFixRight && supportSticky), "".concat(cellPrefixCls, "-fix-right-last"), lastFixRight && supportSticky), "".concat(cellPrefixCls, "-ellipsis"), ellipsis), "".concat(cellPrefixCls, "-with-append"), appendNode), "".concat(cellPrefixCls, "-fix-sticky"), (isFixLeft || isFixRight) && isSticky && supportSticky), (0,defineProperty["default"])(_classNames, "".concat(cellPrefixCls, "-row-hover"), !legacyCellProps && hovering)), additionalProps.className, legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.className);
  67141. // >>>>> Style
  67142. var alignStyle = {};
  67143. if (align) {
  67144. alignStyle.textAlign = align;
  67145. }
  67146. // The order is important since user can overwrite style.
  67147. // For example ant-design/ant-design#51763
  67148. var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, legacyCellProps === null || legacyCellProps === void 0 ? void 0 : legacyCellProps.style), fixedStyle), alignStyle), additionalProps.style);
  67149. // >>>>> Children Node
  67150. var mergedChildNode = childNode;
  67151. // Not crash if final `childNode` is not validate ReactNode
  67152. if ((0,esm_typeof["default"])(mergedChildNode) === 'object' && !Array.isArray(mergedChildNode) && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(mergedChildNode)) {
  67153. mergedChildNode = null;
  67154. }
  67155. if (ellipsis && (lastFixLeft || firstFixRight)) {
  67156. mergedChildNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  67157. className: "".concat(cellPrefixCls, "-content")
  67158. }, mergedChildNode);
  67159. }
  67160. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, (0,esm_extends["default"])({}, legacyCellProps, additionalProps, {
  67161. className: mergedClassName,
  67162. style: mergedStyle
  67163. // A11y
  67164. ,
  67165. title: title,
  67166. scope: scope
  67167. // Hover
  67168. ,
  67169. onMouseEnter: rowHoverable ? onMouseEnter : undefined,
  67170. onMouseLeave: rowHoverable ? onMouseLeave : undefined
  67171. //Span
  67172. ,
  67173. colSpan: mergedColSpan !== 1 ? mergedColSpan : null,
  67174. rowSpan: mergedRowSpan !== 1 ? mergedRowSpan : null
  67175. }), appendNode, mergedChildNode);
  67176. }
  67177. /* harmony default export */ var es_Cell = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(Cell_Cell));
  67178. ;// ./node_modules/rc-table/es/utils/fixUtil.js
  67179. function getCellFixedInfo(colStart, colEnd, columns, stickyOffsets, direction) {
  67180. var startColumn = columns[colStart] || {};
  67181. var endColumn = columns[colEnd] || {};
  67182. var fixLeft;
  67183. var fixRight;
  67184. if (startColumn.fixed === 'left') {
  67185. fixLeft = stickyOffsets.left[direction === 'rtl' ? colEnd : colStart];
  67186. } else if (endColumn.fixed === 'right') {
  67187. fixRight = stickyOffsets.right[direction === 'rtl' ? colStart : colEnd];
  67188. }
  67189. var lastFixLeft = false;
  67190. var firstFixRight = false;
  67191. var lastFixRight = false;
  67192. var firstFixLeft = false;
  67193. var nextColumn = columns[colEnd + 1];
  67194. var prevColumn = columns[colStart - 1];
  67195. // need show shadow only when canLastFix is true
  67196. var canLastFix = nextColumn && !nextColumn.fixed || prevColumn && !prevColumn.fixed || columns.every(function (col) {
  67197. return col.fixed === 'left';
  67198. });
  67199. if (direction === 'rtl') {
  67200. if (fixLeft !== undefined) {
  67201. var prevFixLeft = prevColumn && prevColumn.fixed === 'left';
  67202. firstFixLeft = !prevFixLeft && canLastFix;
  67203. } else if (fixRight !== undefined) {
  67204. var nextFixRight = nextColumn && nextColumn.fixed === 'right';
  67205. lastFixRight = !nextFixRight && canLastFix;
  67206. }
  67207. } else if (fixLeft !== undefined) {
  67208. var nextFixLeft = nextColumn && nextColumn.fixed === 'left';
  67209. lastFixLeft = !nextFixLeft && canLastFix;
  67210. } else if (fixRight !== undefined) {
  67211. var prevFixRight = prevColumn && prevColumn.fixed === 'right';
  67212. firstFixRight = !prevFixRight && canLastFix;
  67213. }
  67214. return {
  67215. fixLeft: fixLeft,
  67216. fixRight: fixRight,
  67217. lastFixLeft: lastFixLeft,
  67218. firstFixRight: firstFixRight,
  67219. lastFixRight: lastFixRight,
  67220. firstFixLeft: firstFixLeft,
  67221. isSticky: stickyOffsets.isSticky
  67222. };
  67223. }
  67224. ;// ./node_modules/rc-table/es/Footer/SummaryContext.js
  67225. var SummaryContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  67226. /* harmony default export */ var Footer_SummaryContext = (SummaryContext);
  67227. ;// ./node_modules/rc-table/es/Footer/Cell.js
  67228. function SummaryCell(_ref) {
  67229. var className = _ref.className,
  67230. index = _ref.index,
  67231. children = _ref.children,
  67232. _ref$colSpan = _ref.colSpan,
  67233. colSpan = _ref$colSpan === void 0 ? 1 : _ref$colSpan,
  67234. rowSpan = _ref.rowSpan,
  67235. align = _ref.align;
  67236. var _useContext = useContext(context_TableContext, ['prefixCls', 'direction']),
  67237. prefixCls = _useContext.prefixCls,
  67238. direction = _useContext.direction;
  67239. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(Footer_SummaryContext),
  67240. scrollColumnIndex = _React$useContext.scrollColumnIndex,
  67241. stickyOffsets = _React$useContext.stickyOffsets,
  67242. flattenColumns = _React$useContext.flattenColumns;
  67243. var lastIndex = index + colSpan - 1;
  67244. var mergedColSpan = lastIndex + 1 === scrollColumnIndex ? colSpan + 1 : colSpan;
  67245. var fixedInfo = getCellFixedInfo(index, index + mergedColSpan - 1, flattenColumns, stickyOffsets, direction);
  67246. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({
  67247. className: className,
  67248. index: index,
  67249. component: "td",
  67250. prefixCls: prefixCls,
  67251. record: null,
  67252. dataIndex: null,
  67253. align: align,
  67254. colSpan: mergedColSpan,
  67255. rowSpan: rowSpan,
  67256. render: function render() {
  67257. return children;
  67258. }
  67259. }, fixedInfo));
  67260. }
  67261. ;// ./node_modules/rc-table/es/Footer/Row.js
  67262. var Row_excluded = ["children"];
  67263. function FooterRow(_ref) {
  67264. var children = _ref.children,
  67265. props = (0,objectWithoutProperties["default"])(_ref, Row_excluded);
  67266. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", props, children);
  67267. }
  67268. ;// ./node_modules/rc-table/es/Footer/Summary.js
  67269. /**
  67270. * Syntactic sugar. Do not support HOC.
  67271. */
  67272. function Summary(_ref) {
  67273. var children = _ref.children;
  67274. return children;
  67275. }
  67276. Summary.Row = FooterRow;
  67277. Summary.Cell = SummaryCell;
  67278. /* harmony default export */ var Footer_Summary = (Summary);
  67279. ;// ./node_modules/rc-table/es/Footer/index.js
  67280. function es_Footer_Footer(props) {
  67281. if (true) {
  67282. hooks_useRenderTimes(props);
  67283. }
  67284. var children = props.children,
  67285. stickyOffsets = props.stickyOffsets,
  67286. flattenColumns = props.flattenColumns;
  67287. var prefixCls = useContext(context_TableContext, 'prefixCls');
  67288. var lastColumnIndex = flattenColumns.length - 1;
  67289. var scrollColumn = flattenColumns[lastColumnIndex];
  67290. var summaryContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  67291. return {
  67292. stickyOffsets: stickyOffsets,
  67293. flattenColumns: flattenColumns,
  67294. scrollColumnIndex: scrollColumn !== null && scrollColumn !== void 0 && scrollColumn.scrollbar ? lastColumnIndex : null
  67295. };
  67296. }, [scrollColumn, flattenColumns, lastColumnIndex, stickyOffsets]);
  67297. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Footer_SummaryContext.Provider, {
  67298. value: summaryContext
  67299. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tfoot", {
  67300. className: "".concat(prefixCls, "-summary")
  67301. }, children));
  67302. }
  67303. /* harmony default export */ var es_Footer = (TableContext_responseImmutable(es_Footer_Footer));
  67304. var FooterComponents = Footer_Summary;
  67305. ;// ./node_modules/rc-table/es/sugar/Column.js
  67306. /* istanbul ignore next */
  67307. /**
  67308. * This is a syntactic sugar for `columns` prop.
  67309. * So HOC will not work on this.
  67310. */
  67311. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  67312. function Column_Column(_) {
  67313. return null;
  67314. }
  67315. /* harmony default export */ var sugar_Column = (Column_Column);
  67316. ;// ./node_modules/rc-table/es/sugar/ColumnGroup.js
  67317. /* istanbul ignore next */
  67318. /**
  67319. * This is a syntactic sugar for `columns` prop.
  67320. * So HOC will not work on this.
  67321. */
  67322. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  67323. function ColumnGroup(_) {
  67324. return null;
  67325. }
  67326. /* harmony default export */ var sugar_ColumnGroup = (ColumnGroup);
  67327. ;// ./node_modules/rc-table/es/hooks/useFlattenRecords.js
  67328. // recursion (flat tree structure)
  67329. function fillRecords(list, record, indent, childrenColumnName, expandedKeys, getRowKey, index) {
  67330. var key = getRowKey(record, index);
  67331. list.push({
  67332. record: record,
  67333. indent: indent,
  67334. index: index,
  67335. rowKey: key
  67336. });
  67337. var expanded = expandedKeys === null || expandedKeys === void 0 ? void 0 : expandedKeys.has(key);
  67338. if (record && Array.isArray(record[childrenColumnName]) && expanded) {
  67339. // expanded state, flat record
  67340. for (var i = 0; i < record[childrenColumnName].length; i += 1) {
  67341. fillRecords(list, record[childrenColumnName][i], indent + 1, childrenColumnName, expandedKeys, getRowKey, i);
  67342. }
  67343. }
  67344. }
  67345. /**
  67346. * flat tree data on expanded state
  67347. *
  67348. * @export
  67349. * @template T
  67350. * @param {*} data : table data
  67351. * @param {string} childrenColumnName : 指定树形结构的列名
  67352. * @param {Set<Key>} expandedKeys : 展开的行对应的keys
  67353. * @param {GetRowKey<T>} getRowKey : 获取当前rowKey的方法
  67354. * @returns flattened data
  67355. */
  67356. function useFlattenRecords(data, childrenColumnName, expandedKeys, getRowKey) {
  67357. var arr = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  67358. if (expandedKeys !== null && expandedKeys !== void 0 && expandedKeys.size) {
  67359. var list = [];
  67360. // collect flattened record
  67361. for (var i = 0; i < (data === null || data === void 0 ? void 0 : data.length); i += 1) {
  67362. var record = data[i];
  67363. // using array.push or spread operator may cause "Maximum call stack size exceeded" exception if array size is big enough.
  67364. fillRecords(list, record, 0, childrenColumnName, expandedKeys, getRowKey, i);
  67365. }
  67366. return list;
  67367. }
  67368. return data === null || data === void 0 ? void 0 : data.map(function (item, index) {
  67369. return {
  67370. record: item,
  67371. indent: 0,
  67372. index: index,
  67373. rowKey: getRowKey(item, index)
  67374. };
  67375. });
  67376. }, [data, childrenColumnName, expandedKeys, getRowKey]);
  67377. return arr;
  67378. }
  67379. ;// ./node_modules/rc-table/es/hooks/useRowInfo.js
  67380. function useRowInfo(record, rowKey, recordIndex, indent) {
  67381. var context = useContext(context_TableContext, ['prefixCls', 'fixedInfoList', 'flattenColumns', 'expandableType', 'expandRowByClick', 'onTriggerExpand', 'rowClassName', 'expandedRowClassName', 'indentSize', 'expandIcon', 'expandedRowRender', 'expandIconColumnIndex', 'expandedKeys', 'childrenColumnName', 'rowExpandable', 'onRow']);
  67382. var flattenColumns = context.flattenColumns,
  67383. expandableType = context.expandableType,
  67384. expandedKeys = context.expandedKeys,
  67385. childrenColumnName = context.childrenColumnName,
  67386. onTriggerExpand = context.onTriggerExpand,
  67387. rowExpandable = context.rowExpandable,
  67388. onRow = context.onRow,
  67389. expandRowByClick = context.expandRowByClick,
  67390. rowClassName = context.rowClassName;
  67391. // ======================= Expandable =======================
  67392. // Only when row is not expandable and `children` exist in record
  67393. var nestExpandable = expandableType === 'nest';
  67394. var rowSupportExpand = expandableType === 'row' && (!rowExpandable || rowExpandable(record));
  67395. var mergedExpandable = rowSupportExpand || nestExpandable;
  67396. var expanded = expandedKeys && expandedKeys.has(rowKey);
  67397. var hasNestChildren = childrenColumnName && record && record[childrenColumnName];
  67398. var onInternalTriggerExpand = (0,rc_util_es.useEvent)(onTriggerExpand);
  67399. // ========================= onRow ==========================
  67400. var rowProps = onRow === null || onRow === void 0 ? void 0 : onRow(record, recordIndex);
  67401. var onRowClick = rowProps === null || rowProps === void 0 ? void 0 : rowProps.onClick;
  67402. var onClick = function onClick(event) {
  67403. if (expandRowByClick && mergedExpandable) {
  67404. onTriggerExpand(record, event);
  67405. }
  67406. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  67407. args[_key - 1] = arguments[_key];
  67408. }
  67409. onRowClick === null || onRowClick === void 0 || onRowClick.apply(void 0, [event].concat(args));
  67410. };
  67411. // ====================== RowClassName ======================
  67412. var computeRowClassName;
  67413. if (typeof rowClassName === 'string') {
  67414. computeRowClassName = rowClassName;
  67415. } else if (typeof rowClassName === 'function') {
  67416. computeRowClassName = rowClassName(record, recordIndex, indent);
  67417. }
  67418. // ========================= Column =========================
  67419. var columnsKey = getColumnsKey(flattenColumns);
  67420. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, context), {}, {
  67421. columnsKey: columnsKey,
  67422. nestExpandable: nestExpandable,
  67423. expanded: expanded,
  67424. hasNestChildren: hasNestChildren,
  67425. record: record,
  67426. onTriggerExpand: onInternalTriggerExpand,
  67427. rowSupportExpand: rowSupportExpand,
  67428. expandable: mergedExpandable,
  67429. rowProps: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rowProps), {}, {
  67430. className: classnames_default()(computeRowClassName, rowProps === null || rowProps === void 0 ? void 0 : rowProps.className),
  67431. onClick: onClick
  67432. })
  67433. });
  67434. }
  67435. ;// ./node_modules/rc-table/es/Body/ExpandedRow.js
  67436. function ExpandedRow(props) {
  67437. if (true) {
  67438. hooks_useRenderTimes(props);
  67439. }
  67440. var prefixCls = props.prefixCls,
  67441. children = props.children,
  67442. Component = props.component,
  67443. cellComponent = props.cellComponent,
  67444. className = props.className,
  67445. expanded = props.expanded,
  67446. colSpan = props.colSpan,
  67447. isEmpty = props.isEmpty,
  67448. _props$stickyOffset = props.stickyOffset,
  67449. stickyOffset = _props$stickyOffset === void 0 ? 0 : _props$stickyOffset;
  67450. var _useContext = useContext(context_TableContext, ['scrollbarSize', 'fixHeader', 'fixColumn', 'componentWidth', 'horizonScroll']),
  67451. scrollbarSize = _useContext.scrollbarSize,
  67452. fixHeader = _useContext.fixHeader,
  67453. fixColumn = _useContext.fixColumn,
  67454. componentWidth = _useContext.componentWidth,
  67455. horizonScroll = _useContext.horizonScroll;
  67456. // Cache render node
  67457. var contentNode = children;
  67458. if (isEmpty ? horizonScroll && componentWidth : fixColumn) {
  67459. contentNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  67460. style: {
  67461. width: componentWidth - stickyOffset - (fixHeader && !isEmpty ? scrollbarSize : 0),
  67462. position: 'sticky',
  67463. left: stickyOffset,
  67464. overflow: 'hidden'
  67465. },
  67466. className: "".concat(prefixCls, "-expanded-row-fixed")
  67467. }, contentNode);
  67468. }
  67469. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
  67470. className: className,
  67471. style: {
  67472. display: expanded ? null : 'none'
  67473. }
  67474. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, {
  67475. component: cellComponent,
  67476. prefixCls: prefixCls,
  67477. colSpan: colSpan
  67478. }, contentNode));
  67479. }
  67480. /* harmony default export */ var Body_ExpandedRow = (ExpandedRow);
  67481. ;// ./node_modules/rc-table/es/utils/expandUtil.js
  67482. function renderExpandIcon(_ref) {
  67483. var prefixCls = _ref.prefixCls,
  67484. record = _ref.record,
  67485. onExpand = _ref.onExpand,
  67486. expanded = _ref.expanded,
  67487. expandable = _ref.expandable;
  67488. var expandClassName = "".concat(prefixCls, "-row-expand-icon");
  67489. if (!expandable) {
  67490. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  67491. className: classnames_default()(expandClassName, "".concat(prefixCls, "-row-spaced"))
  67492. });
  67493. }
  67494. var onClick = function onClick(event) {
  67495. onExpand(record, event);
  67496. event.stopPropagation();
  67497. };
  67498. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  67499. className: classnames_default()(expandClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-row-expanded"), expanded), "".concat(prefixCls, "-row-collapsed"), !expanded)),
  67500. onClick: onClick
  67501. });
  67502. }
  67503. function findAllChildrenKeys(data, getRowKey, childrenColumnName) {
  67504. var keys = [];
  67505. function dig(list) {
  67506. (list || []).forEach(function (item, index) {
  67507. keys.push(getRowKey(item, index));
  67508. dig(item[childrenColumnName]);
  67509. });
  67510. }
  67511. dig(data);
  67512. return keys;
  67513. }
  67514. function computedExpandedClassName(cls, record, index, indent) {
  67515. if (typeof cls === 'string') {
  67516. return cls;
  67517. }
  67518. if (typeof cls === 'function') {
  67519. return cls(record, index, indent);
  67520. }
  67521. return '';
  67522. }
  67523. ;// ./node_modules/rc-table/es/Body/BodyRow.js
  67524. // ==================================================================================
  67525. // == getCellProps ==
  67526. // ==================================================================================
  67527. function getCellProps(rowInfo, column, colIndex, indent, index) {
  67528. var _column$onCell;
  67529. var rowKeys = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
  67530. var expandedRowOffset = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
  67531. var record = rowInfo.record,
  67532. prefixCls = rowInfo.prefixCls,
  67533. columnsKey = rowInfo.columnsKey,
  67534. fixedInfoList = rowInfo.fixedInfoList,
  67535. expandIconColumnIndex = rowInfo.expandIconColumnIndex,
  67536. nestExpandable = rowInfo.nestExpandable,
  67537. indentSize = rowInfo.indentSize,
  67538. expandIcon = rowInfo.expandIcon,
  67539. expanded = rowInfo.expanded,
  67540. hasNestChildren = rowInfo.hasNestChildren,
  67541. onTriggerExpand = rowInfo.onTriggerExpand,
  67542. expandable = rowInfo.expandable,
  67543. expandedKeys = rowInfo.expandedKeys;
  67544. var key = columnsKey[colIndex];
  67545. var fixedInfo = fixedInfoList[colIndex];
  67546. // ============= Used for nest expandable =============
  67547. var appendCellNode;
  67548. if (colIndex === (expandIconColumnIndex || 0) && nestExpandable) {
  67549. appendCellNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  67550. style: {
  67551. paddingLeft: "".concat(indentSize * indent, "px")
  67552. },
  67553. className: "".concat(prefixCls, "-row-indent indent-level-").concat(indent)
  67554. }), expandIcon({
  67555. prefixCls: prefixCls,
  67556. expanded: expanded,
  67557. expandable: hasNestChildren,
  67558. record: record,
  67559. onExpand: onTriggerExpand
  67560. }));
  67561. }
  67562. var additionalCellProps = ((_column$onCell = column.onCell) === null || _column$onCell === void 0 ? void 0 : _column$onCell.call(column, record, index)) || {};
  67563. // Expandable row has offset
  67564. if (expandedRowOffset) {
  67565. var _additionalCellProps$ = additionalCellProps.rowSpan,
  67566. rowSpan = _additionalCellProps$ === void 0 ? 1 : _additionalCellProps$;
  67567. // For expandable row with rowSpan,
  67568. // We should increase the rowSpan if the row is expanded
  67569. if (expandable && rowSpan && colIndex < expandedRowOffset) {
  67570. var currentRowSpan = rowSpan;
  67571. for (var i = index; i < index + rowSpan; i += 1) {
  67572. var rowKey = rowKeys[i];
  67573. if (expandedKeys.has(rowKey)) {
  67574. currentRowSpan += 1;
  67575. }
  67576. }
  67577. additionalCellProps.rowSpan = currentRowSpan;
  67578. }
  67579. }
  67580. return {
  67581. key: key,
  67582. fixedInfo: fixedInfo,
  67583. appendCellNode: appendCellNode,
  67584. additionalCellProps: additionalCellProps
  67585. };
  67586. }
  67587. // ==================================================================================
  67588. // == getCellProps ==
  67589. // ==================================================================================
  67590. function BodyRow(props) {
  67591. if (true) {
  67592. hooks_useRenderTimes(props);
  67593. }
  67594. var className = props.className,
  67595. style = props.style,
  67596. record = props.record,
  67597. index = props.index,
  67598. renderIndex = props.renderIndex,
  67599. rowKey = props.rowKey,
  67600. rowKeys = props.rowKeys,
  67601. _props$indent = props.indent,
  67602. indent = _props$indent === void 0 ? 0 : _props$indent,
  67603. RowComponent = props.rowComponent,
  67604. cellComponent = props.cellComponent,
  67605. scopeCellComponent = props.scopeCellComponent,
  67606. expandedRowInfo = props.expandedRowInfo;
  67607. var rowInfo = useRowInfo(record, rowKey, index, indent);
  67608. var prefixCls = rowInfo.prefixCls,
  67609. flattenColumns = rowInfo.flattenColumns,
  67610. expandedRowClassName = rowInfo.expandedRowClassName,
  67611. expandedRowRender = rowInfo.expandedRowRender,
  67612. rowProps = rowInfo.rowProps,
  67613. expanded = rowInfo.expanded,
  67614. rowSupportExpand = rowInfo.rowSupportExpand;
  67615. // Force render expand row if expanded before
  67616. var expandedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  67617. expandedRef.current || (expandedRef.current = expanded);
  67618. if (true) {
  67619. hooks_useRenderTimes(props);
  67620. }
  67621. // 若没有 expandedRowRender 参数, 将使用 baseRowNode 渲染 Children
  67622. // 此时如果 level > 1 则说明是 expandedRow, 一样需要附加 computedExpandedRowClassName
  67623. var expandedClsName = computedExpandedClassName(expandedRowClassName, record, index, indent);
  67624. // ======================== Base tr row ========================
  67625. var baseRowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, (0,esm_extends["default"])({}, rowProps, {
  67626. "data-row-key": rowKey,
  67627. className: classnames_default()(className, "".concat(prefixCls, "-row"), "".concat(prefixCls, "-row-level-").concat(indent), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className, (0,defineProperty["default"])({}, expandedClsName, indent >= 1)),
  67628. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), rowProps === null || rowProps === void 0 ? void 0 : rowProps.style)
  67629. }), flattenColumns.map(function (column, colIndex) {
  67630. var render = column.render,
  67631. dataIndex = column.dataIndex,
  67632. columnClassName = column.className;
  67633. var _getCellProps = getCellProps(rowInfo, column, colIndex, indent, index, rowKeys, expandedRowInfo === null || expandedRowInfo === void 0 ? void 0 : expandedRowInfo.offset),
  67634. key = _getCellProps.key,
  67635. fixedInfo = _getCellProps.fixedInfo,
  67636. appendCellNode = _getCellProps.appendCellNode,
  67637. additionalCellProps = _getCellProps.additionalCellProps;
  67638. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({
  67639. className: columnClassName,
  67640. ellipsis: column.ellipsis,
  67641. align: column.align,
  67642. scope: column.rowScope,
  67643. component: column.rowScope ? scopeCellComponent : cellComponent,
  67644. prefixCls: prefixCls,
  67645. key: key,
  67646. record: record,
  67647. index: index,
  67648. renderIndex: renderIndex,
  67649. dataIndex: dataIndex,
  67650. render: render,
  67651. shouldCellUpdate: column.shouldCellUpdate
  67652. }, fixedInfo, {
  67653. appendNode: appendCellNode,
  67654. additionalProps: additionalCellProps
  67655. }));
  67656. }));
  67657. // ======================== Expand Row =========================
  67658. var expandRowNode;
  67659. if (rowSupportExpand && (expandedRef.current || expanded)) {
  67660. var expandContent = expandedRowRender(record, index, indent + 1, expanded);
  67661. expandRowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Body_ExpandedRow, {
  67662. expanded: expanded,
  67663. className: classnames_default()("".concat(prefixCls, "-expanded-row"), "".concat(prefixCls, "-expanded-row-level-").concat(indent + 1), expandedClsName),
  67664. prefixCls: prefixCls,
  67665. component: RowComponent,
  67666. cellComponent: cellComponent,
  67667. colSpan: expandedRowInfo ? expandedRowInfo.colSpan : flattenColumns.length,
  67668. stickyOffset: expandedRowInfo === null || expandedRowInfo === void 0 ? void 0 : expandedRowInfo.sticky,
  67669. isEmpty: false
  67670. }, expandContent);
  67671. }
  67672. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, baseRowNode, expandRowNode);
  67673. }
  67674. if (true) {
  67675. BodyRow.displayName = 'BodyRow';
  67676. }
  67677. /* harmony default export */ var Body_BodyRow = (TableContext_responseImmutable(BodyRow));
  67678. ;// ./node_modules/rc-table/es/Body/MeasureCell.js
  67679. function MeasureCell(_ref) {
  67680. var columnKey = _ref.columnKey,
  67681. onColumnResize = _ref.onColumnResize,
  67682. column = _ref.column;
  67683. var cellRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  67684. (0,useLayoutEffect["default"])(function () {
  67685. if (cellRef.current) {
  67686. onColumnResize(columnKey, cellRef.current.offsetWidth);
  67687. }
  67688. }, []);
  67689. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  67690. data: columnKey
  67691. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("td", {
  67692. ref: cellRef,
  67693. style: {
  67694. paddingTop: 0,
  67695. paddingBottom: 0,
  67696. borderTop: 0,
  67697. borderBottom: 0,
  67698. height: 0
  67699. }
  67700. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  67701. style: {
  67702. height: 0,
  67703. overflow: 'hidden',
  67704. fontWeight: 'bold'
  67705. }
  67706. }, (column === null || column === void 0 ? void 0 : column.title) || '\xa0')));
  67707. }
  67708. ;// ./node_modules/rc-table/es/Body/MeasureRow.js
  67709. function MeasureRow(_ref) {
  67710. var prefixCls = _ref.prefixCls,
  67711. columnsKey = _ref.columnsKey,
  67712. onColumnResize = _ref.onColumnResize,
  67713. columns = _ref.columns;
  67714. var ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  67715. var _useContext = useContext(context_TableContext, ['measureRowRender']),
  67716. measureRowRender = _useContext.measureRowRender;
  67717. var measureRow = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("tr", {
  67718. "aria-hidden": "true",
  67719. className: "".concat(prefixCls, "-measure-row"),
  67720. style: {
  67721. height: 0
  67722. },
  67723. ref: ref
  67724. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es.Collection, {
  67725. onBatchResize: function onBatchResize(infoList) {
  67726. if (isVisible(ref.current)) {
  67727. infoList.forEach(function (_ref2) {
  67728. var columnKey = _ref2.data,
  67729. size = _ref2.size;
  67730. onColumnResize(columnKey, size.offsetWidth);
  67731. });
  67732. }
  67733. }
  67734. }, columnsKey.map(function (columnKey) {
  67735. var column = columns.find(function (col) {
  67736. return col.key === columnKey;
  67737. });
  67738. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureCell, {
  67739. key: columnKey,
  67740. columnKey: columnKey,
  67741. onColumnResize: onColumnResize,
  67742. column: column
  67743. });
  67744. })));
  67745. return measureRowRender ? measureRowRender(measureRow) : measureRow;
  67746. }
  67747. ;// ./node_modules/rc-table/es/Body/index.js
  67748. function Body(props) {
  67749. if (true) {
  67750. hooks_useRenderTimes(props);
  67751. }
  67752. var data = props.data,
  67753. measureColumnWidth = props.measureColumnWidth;
  67754. var _useContext = useContext(context_TableContext, ['prefixCls', 'getComponent', 'onColumnResize', 'flattenColumns', 'getRowKey', 'expandedKeys', 'childrenColumnName', 'emptyNode', 'expandedRowOffset', 'fixedInfoList', 'colWidths']),
  67755. prefixCls = _useContext.prefixCls,
  67756. getComponent = _useContext.getComponent,
  67757. onColumnResize = _useContext.onColumnResize,
  67758. flattenColumns = _useContext.flattenColumns,
  67759. getRowKey = _useContext.getRowKey,
  67760. expandedKeys = _useContext.expandedKeys,
  67761. childrenColumnName = _useContext.childrenColumnName,
  67762. emptyNode = _useContext.emptyNode,
  67763. _useContext$expandedR = _useContext.expandedRowOffset,
  67764. expandedRowOffset = _useContext$expandedR === void 0 ? 0 : _useContext$expandedR,
  67765. colWidths = _useContext.colWidths;
  67766. var flattenData = useFlattenRecords(data, childrenColumnName, expandedKeys, getRowKey);
  67767. var rowKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  67768. return flattenData.map(function (item) {
  67769. return item.rowKey;
  67770. });
  67771. }, [flattenData]);
  67772. // =================== Performance ====================
  67773. var perfRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  67774. renderWithProps: false
  67775. });
  67776. // ===================== Expanded =====================
  67777. // `expandedRowOffset` data is same for all the rows.
  67778. // Let's calc on Body side to save performance.
  67779. var expandedRowInfo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  67780. var expandedColSpan = flattenColumns.length - expandedRowOffset;
  67781. var expandedStickyStart = 0;
  67782. for (var i = 0; i < expandedRowOffset; i += 1) {
  67783. expandedStickyStart += colWidths[i] || 0;
  67784. }
  67785. return {
  67786. offset: expandedRowOffset,
  67787. colSpan: expandedColSpan,
  67788. sticky: expandedStickyStart
  67789. };
  67790. }, [flattenColumns.length, expandedRowOffset, colWidths]);
  67791. // ====================== Render ======================
  67792. var WrapperComponent = getComponent(['body', 'wrapper'], 'tbody');
  67793. var trComponent = getComponent(['body', 'row'], 'tr');
  67794. var tdComponent = getComponent(['body', 'cell'], 'td');
  67795. var thComponent = getComponent(['body', 'cell'], 'th');
  67796. var rows;
  67797. if (data.length) {
  67798. rows = flattenData.map(function (item, idx) {
  67799. var record = item.record,
  67800. indent = item.indent,
  67801. renderIndex = item.index,
  67802. rowKey = item.rowKey;
  67803. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Body_BodyRow, {
  67804. key: rowKey,
  67805. rowKey: rowKey,
  67806. rowKeys: rowKeys,
  67807. record: record,
  67808. index: idx,
  67809. renderIndex: renderIndex,
  67810. rowComponent: trComponent,
  67811. cellComponent: tdComponent,
  67812. scopeCellComponent: thComponent,
  67813. indent: indent
  67814. // Expanded row info
  67815. ,
  67816. expandedRowInfo: expandedRowInfo
  67817. });
  67818. });
  67819. } else {
  67820. rows = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Body_ExpandedRow, {
  67821. expanded: true,
  67822. className: "".concat(prefixCls, "-placeholder"),
  67823. prefixCls: prefixCls,
  67824. component: trComponent,
  67825. cellComponent: tdComponent,
  67826. colSpan: flattenColumns.length,
  67827. isEmpty: true
  67828. }, emptyNode);
  67829. }
  67830. var columnsKey = getColumnsKey(flattenColumns);
  67831. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_PerfContext.Provider, {
  67832. value: perfRef.current
  67833. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WrapperComponent, {
  67834. className: "".concat(prefixCls, "-tbody")
  67835. }, measureColumnWidth && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureRow, {
  67836. prefixCls: prefixCls,
  67837. columnsKey: columnsKey,
  67838. onColumnResize: onColumnResize,
  67839. columns: flattenColumns
  67840. }), rows));
  67841. }
  67842. if (true) {
  67843. Body.displayName = 'Body';
  67844. }
  67845. /* harmony default export */ var es_Body = (TableContext_responseImmutable(Body));
  67846. ;// ./node_modules/rc-table/es/utils/legacyUtil.js
  67847. var utils_legacyUtil_excluded = ["expandable"];
  67848. var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';
  67849. function getExpandableProps(props) {
  67850. var expandable = props.expandable,
  67851. legacyExpandableConfig = (0,objectWithoutProperties["default"])(props, utils_legacyUtil_excluded);
  67852. var config;
  67853. if ('expandable' in props) {
  67854. config = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, legacyExpandableConfig), expandable);
  67855. } else {
  67856. if ( true && ['indentSize', 'expandedRowKeys', 'defaultExpandedRowKeys', 'defaultExpandAllRows', 'expandedRowRender', 'expandRowByClick', 'expandIcon', 'onExpand', 'onExpandedRowsChange', 'expandedRowClassName', 'expandIconColumnIndex', 'showExpandColumn', 'title'].some(function (prop) {
  67857. return prop in props;
  67858. })) {
  67859. (0,warning["default"])(false, 'expanded related props have been moved into `expandable`.');
  67860. }
  67861. config = legacyExpandableConfig;
  67862. }
  67863. if (config.showExpandColumn === false) {
  67864. config.expandIconColumnIndex = -1;
  67865. }
  67866. return config;
  67867. }
  67868. ;// ./node_modules/rc-table/es/ColGroup.js
  67869. var ColGroup_excluded = ["columnType"];
  67870. function ColGroup(_ref) {
  67871. var colWidths = _ref.colWidths,
  67872. columns = _ref.columns,
  67873. columCount = _ref.columCount;
  67874. var _useContext = useContext(context_TableContext, ['tableLayout']),
  67875. tableLayout = _useContext.tableLayout;
  67876. var cols = [];
  67877. var len = columCount || columns.length;
  67878. // Only insert col with width & additional props
  67879. // Skip if rest col do not have any useful info
  67880. var mustInsert = false;
  67881. for (var i = len - 1; i >= 0; i -= 1) {
  67882. var width = colWidths[i];
  67883. var column = columns && columns[i];
  67884. var additionalProps = void 0;
  67885. var minWidth = void 0;
  67886. if (column) {
  67887. additionalProps = column[INTERNAL_COL_DEFINE];
  67888. // fixed will cause layout problems
  67889. if (tableLayout === 'auto') {
  67890. minWidth = column.minWidth;
  67891. }
  67892. }
  67893. if (width || minWidth || additionalProps || mustInsert) {
  67894. var _ref2 = additionalProps || {},
  67895. columnType = _ref2.columnType,
  67896. restAdditionalProps = (0,objectWithoutProperties["default"])(_ref2, ColGroup_excluded);
  67897. cols.unshift( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("col", (0,esm_extends["default"])({
  67898. key: i,
  67899. style: {
  67900. width: width,
  67901. minWidth: minWidth
  67902. }
  67903. }, restAdditionalProps)));
  67904. mustInsert = true;
  67905. }
  67906. }
  67907. return cols.length > 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("colgroup", null, cols) : null;
  67908. }
  67909. /* harmony default export */ var es_ColGroup = (ColGroup);
  67910. ;// ./node_modules/rc-table/es/FixedHolder/index.js
  67911. var FixedHolder_excluded = ["className", "noData", "columns", "flattenColumns", "colWidths", "colGroup", "columCount", "stickyOffsets", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName", "scrollX", "tableLayout", "onScroll", "children"];
  67912. function useColumnWidth(colWidths, columCount) {
  67913. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  67914. var cloneColumns = [];
  67915. for (var i = 0; i < columCount; i += 1) {
  67916. var val = colWidths[i];
  67917. if (val !== undefined) {
  67918. cloneColumns[i] = val;
  67919. } else {
  67920. return null;
  67921. }
  67922. }
  67923. return cloneColumns;
  67924. }, [colWidths.join('_'), columCount]);
  67925. }
  67926. var FixedHolder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  67927. if (true) {
  67928. hooks_useRenderTimes(props);
  67929. }
  67930. var className = props.className,
  67931. noData = props.noData,
  67932. columns = props.columns,
  67933. flattenColumns = props.flattenColumns,
  67934. colWidths = props.colWidths,
  67935. colGroup = props.colGroup,
  67936. columCount = props.columCount,
  67937. stickyOffsets = props.stickyOffsets,
  67938. direction = props.direction,
  67939. fixHeader = props.fixHeader,
  67940. stickyTopOffset = props.stickyTopOffset,
  67941. stickyBottomOffset = props.stickyBottomOffset,
  67942. stickyClassName = props.stickyClassName,
  67943. scrollX = props.scrollX,
  67944. _props$tableLayout = props.tableLayout,
  67945. tableLayout = _props$tableLayout === void 0 ? 'fixed' : _props$tableLayout,
  67946. onScroll = props.onScroll,
  67947. children = props.children,
  67948. restProps = (0,objectWithoutProperties["default"])(props, FixedHolder_excluded);
  67949. var _useContext = useContext(context_TableContext, ['prefixCls', 'scrollbarSize', 'isSticky', 'getComponent']),
  67950. prefixCls = _useContext.prefixCls,
  67951. scrollbarSize = _useContext.scrollbarSize,
  67952. isSticky = _useContext.isSticky,
  67953. getComponent = _useContext.getComponent;
  67954. var TableComponent = getComponent(['header', 'table'], 'table');
  67955. var combinationScrollBarSize = isSticky && !fixHeader ? 0 : scrollbarSize;
  67956. // Pass wheel to scroll event
  67957. var scrollRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  67958. var setScrollRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (element) {
  67959. (0,es_ref.fillRef)(ref, element);
  67960. (0,es_ref.fillRef)(scrollRef, element);
  67961. }, []);
  67962. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  67963. function onWheel(e) {
  67964. var _ref = e,
  67965. currentTarget = _ref.currentTarget,
  67966. deltaX = _ref.deltaX;
  67967. if (deltaX) {
  67968. onScroll({
  67969. currentTarget: currentTarget,
  67970. scrollLeft: currentTarget.scrollLeft + deltaX
  67971. });
  67972. e.preventDefault();
  67973. }
  67974. }
  67975. var scrollEle = scrollRef.current;
  67976. scrollEle === null || scrollEle === void 0 || scrollEle.addEventListener('wheel', onWheel, {
  67977. passive: false
  67978. });
  67979. return function () {
  67980. scrollEle === null || scrollEle === void 0 || scrollEle.removeEventListener('wheel', onWheel);
  67981. };
  67982. }, []);
  67983. // Add scrollbar column
  67984. var lastColumn = flattenColumns[flattenColumns.length - 1];
  67985. var ScrollBarColumn = {
  67986. fixed: lastColumn ? lastColumn.fixed : null,
  67987. scrollbar: true,
  67988. onHeaderCell: function onHeaderCell() {
  67989. return {
  67990. className: "".concat(prefixCls, "-cell-scrollbar")
  67991. };
  67992. }
  67993. };
  67994. var columnsWithScrollbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  67995. return combinationScrollBarSize ? [].concat((0,toConsumableArray["default"])(columns), [ScrollBarColumn]) : columns;
  67996. }, [combinationScrollBarSize, columns]);
  67997. var flattenColumnsWithScrollbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  67998. return combinationScrollBarSize ? [].concat((0,toConsumableArray["default"])(flattenColumns), [ScrollBarColumn]) : flattenColumns;
  67999. }, [combinationScrollBarSize, flattenColumns]);
  68000. // Calculate the sticky offsets
  68001. var headerStickyOffsets = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  68002. var right = stickyOffsets.right,
  68003. left = stickyOffsets.left;
  68004. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, stickyOffsets), {}, {
  68005. left: direction === 'rtl' ? [].concat((0,toConsumableArray["default"])(left.map(function (width) {
  68006. return width + combinationScrollBarSize;
  68007. })), [0]) : left,
  68008. right: direction === 'rtl' ? right : [].concat((0,toConsumableArray["default"])(right.map(function (width) {
  68009. return width + combinationScrollBarSize;
  68010. })), [0]),
  68011. isSticky: isSticky
  68012. });
  68013. }, [combinationScrollBarSize, stickyOffsets, isSticky]);
  68014. var mergedColumnWidth = useColumnWidth(colWidths, columCount);
  68015. var colGroupNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  68016. // use original ColGroup if no data or no calculated column width, otherwise use calculated column width
  68017. // Return original colGroup if no data, or mergedColumnWidth is empty, or all widths are falsy
  68018. if (noData || !mergedColumnWidth || mergedColumnWidth.length === 0 || mergedColumnWidth.every(function (width) {
  68019. return !width;
  68020. })) {
  68021. return colGroup;
  68022. }
  68023. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ColGroup, {
  68024. colWidths: [].concat((0,toConsumableArray["default"])(mergedColumnWidth), [combinationScrollBarSize]),
  68025. columCount: columCount + 1,
  68026. columns: flattenColumnsWithScrollbar
  68027. });
  68028. }, [noData, mergedColumnWidth, colGroup, combinationScrollBarSize, columCount, flattenColumnsWithScrollbar]);
  68029. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  68030. style: (0,objectSpread2["default"])({
  68031. overflow: 'hidden'
  68032. }, isSticky ? {
  68033. top: stickyTopOffset,
  68034. bottom: stickyBottomOffset
  68035. } : {}),
  68036. ref: setScrollRef,
  68037. className: classnames_default()(className, (0,defineProperty["default"])({}, stickyClassName, !!stickyClassName))
  68038. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, {
  68039. style: {
  68040. tableLayout: tableLayout,
  68041. minWidth: '100%',
  68042. // https://github.com/ant-design/ant-design/issues/54894
  68043. width: scrollX
  68044. }
  68045. }, colGroupNode, children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, restProps), {}, {
  68046. stickyOffsets: headerStickyOffsets,
  68047. columns: columnsWithScrollbar,
  68048. flattenColumns: flattenColumnsWithScrollbar
  68049. }))));
  68050. });
  68051. if (true) {
  68052. FixedHolder.displayName = 'FixedHolder';
  68053. }
  68054. /** Return a table in div as fixed element which contains sticky info */
  68055. // export default responseImmutable(FixedHolder);
  68056. /* harmony default export */ var es_FixedHolder = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(FixedHolder));
  68057. ;// ./node_modules/rc-table/es/Header/HeaderRow.js
  68058. var HeaderRow = function HeaderRow(props) {
  68059. var cells = props.cells,
  68060. stickyOffsets = props.stickyOffsets,
  68061. flattenColumns = props.flattenColumns,
  68062. RowComponent = props.rowComponent,
  68063. CellComponent = props.cellComponent,
  68064. onHeaderRow = props.onHeaderRow,
  68065. index = props.index;
  68066. var _useContext = useContext(context_TableContext, ['prefixCls', 'direction']),
  68067. prefixCls = _useContext.prefixCls,
  68068. direction = _useContext.direction;
  68069. var rowProps;
  68070. if (onHeaderRow) {
  68071. rowProps = onHeaderRow(cells.map(function (cell) {
  68072. return cell.column;
  68073. }), index);
  68074. }
  68075. var columnsKey = getColumnsKey(cells.map(function (cell) {
  68076. return cell.column;
  68077. }));
  68078. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, rowProps, cells.map(function (cell, cellIndex) {
  68079. var column = cell.column;
  68080. var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction);
  68081. var additionalProps;
  68082. if (column && column.onHeaderCell) {
  68083. additionalProps = cell.column.onHeaderCell(column);
  68084. }
  68085. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({}, cell, {
  68086. scope: column.title ? cell.colSpan > 1 ? 'colgroup' : 'col' : null,
  68087. ellipsis: column.ellipsis,
  68088. align: column.align,
  68089. component: CellComponent,
  68090. prefixCls: prefixCls,
  68091. key: columnsKey[cellIndex]
  68092. }, fixedInfo, {
  68093. additionalProps: additionalProps,
  68094. rowType: "header"
  68095. }));
  68096. }));
  68097. };
  68098. if (true) {
  68099. HeaderRow.displayName = 'HeaderRow';
  68100. }
  68101. /* harmony default export */ var Header_HeaderRow = (HeaderRow);
  68102. ;// ./node_modules/rc-table/es/Header/Header.js
  68103. function parseHeaderRows(rootColumns) {
  68104. var rows = [];
  68105. function fillRowCells(columns, colIndex) {
  68106. var rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  68107. // Init rows
  68108. rows[rowIndex] = rows[rowIndex] || [];
  68109. var currentColIndex = colIndex;
  68110. var colSpans = columns.filter(Boolean).map(function (column) {
  68111. var cell = {
  68112. key: column.key,
  68113. className: column.className || '',
  68114. children: column.title,
  68115. column: column,
  68116. colStart: currentColIndex
  68117. };
  68118. var colSpan = 1;
  68119. var subColumns = column.children;
  68120. if (subColumns && subColumns.length > 0) {
  68121. colSpan = fillRowCells(subColumns, currentColIndex, rowIndex + 1).reduce(function (total, count) {
  68122. return total + count;
  68123. }, 0);
  68124. cell.hasSubColumns = true;
  68125. }
  68126. if ('colSpan' in column) {
  68127. colSpan = column.colSpan;
  68128. }
  68129. if ('rowSpan' in column) {
  68130. cell.rowSpan = column.rowSpan;
  68131. }
  68132. cell.colSpan = colSpan;
  68133. cell.colEnd = cell.colStart + colSpan - 1;
  68134. rows[rowIndex].push(cell);
  68135. currentColIndex += colSpan;
  68136. return colSpan;
  68137. });
  68138. return colSpans;
  68139. }
  68140. // Generate `rows` cell data
  68141. fillRowCells(rootColumns, 0);
  68142. // Handle `rowSpan`
  68143. var rowCount = rows.length;
  68144. var _loop = function _loop(rowIndex) {
  68145. rows[rowIndex].forEach(function (cell) {
  68146. if (!('rowSpan' in cell) && !cell.hasSubColumns) {
  68147. // eslint-disable-next-line no-param-reassign
  68148. cell.rowSpan = rowCount - rowIndex;
  68149. }
  68150. });
  68151. };
  68152. for (var rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
  68153. _loop(rowIndex);
  68154. }
  68155. return rows;
  68156. }
  68157. var Header_Header = function Header(props) {
  68158. if (true) {
  68159. hooks_useRenderTimes(props);
  68160. }
  68161. var stickyOffsets = props.stickyOffsets,
  68162. columns = props.columns,
  68163. flattenColumns = props.flattenColumns,
  68164. onHeaderRow = props.onHeaderRow;
  68165. var _useContext = useContext(context_TableContext, ['prefixCls', 'getComponent']),
  68166. prefixCls = _useContext.prefixCls,
  68167. getComponent = _useContext.getComponent;
  68168. var rows = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68169. return parseHeaderRows(columns);
  68170. }, [columns]);
  68171. var WrapperComponent = getComponent(['header', 'wrapper'], 'thead');
  68172. var trComponent = getComponent(['header', 'row'], 'tr');
  68173. var thComponent = getComponent(['header', 'cell'], 'th');
  68174. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WrapperComponent, {
  68175. className: "".concat(prefixCls, "-thead")
  68176. }, rows.map(function (row, rowIndex) {
  68177. var rowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Header_HeaderRow, {
  68178. key: rowIndex,
  68179. flattenColumns: flattenColumns,
  68180. cells: row,
  68181. stickyOffsets: stickyOffsets,
  68182. rowComponent: trComponent,
  68183. cellComponent: thComponent,
  68184. onHeaderRow: onHeaderRow,
  68185. index: rowIndex
  68186. });
  68187. return rowNode;
  68188. }));
  68189. };
  68190. /* harmony default export */ var es_Header_Header = (TableContext_responseImmutable(Header_Header));
  68191. ;// ./node_modules/rc-table/es/hooks/useColumns/useWidthColumns.js
  68192. function parseColWidth(totalWidth) {
  68193. var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  68194. if (typeof width === 'number') {
  68195. return width;
  68196. }
  68197. if (width.endsWith('%')) {
  68198. return totalWidth * parseFloat(width) / 100;
  68199. }
  68200. return null;
  68201. }
  68202. /**
  68203. * Fill all column with width
  68204. */
  68205. function useWidthColumns(flattenColumns, scrollWidth, clientWidth) {
  68206. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68207. // Fill width if needed
  68208. if (scrollWidth && scrollWidth > 0) {
  68209. var totalWidth = 0;
  68210. var missWidthCount = 0;
  68211. // collect not given width column
  68212. flattenColumns.forEach(function (col) {
  68213. var colWidth = parseColWidth(scrollWidth, col.width);
  68214. if (colWidth) {
  68215. totalWidth += colWidth;
  68216. } else {
  68217. missWidthCount += 1;
  68218. }
  68219. });
  68220. // Fill width
  68221. var maxFitWidth = Math.max(scrollWidth, clientWidth);
  68222. var restWidth = Math.max(maxFitWidth - totalWidth, missWidthCount);
  68223. var restCount = missWidthCount;
  68224. var avgWidth = restWidth / missWidthCount;
  68225. var realTotal = 0;
  68226. var filledColumns = flattenColumns.map(function (col) {
  68227. var clone = (0,objectSpread2["default"])({}, col);
  68228. var colWidth = parseColWidth(scrollWidth, clone.width);
  68229. if (colWidth) {
  68230. clone.width = colWidth;
  68231. } else {
  68232. var colAvgWidth = Math.floor(avgWidth);
  68233. clone.width = restCount === 1 ? restWidth : colAvgWidth;
  68234. restWidth -= colAvgWidth;
  68235. restCount -= 1;
  68236. }
  68237. realTotal += clone.width;
  68238. return clone;
  68239. });
  68240. // If realTotal is less than clientWidth,
  68241. // We need extend column width
  68242. if (realTotal < maxFitWidth) {
  68243. var scale = maxFitWidth / realTotal;
  68244. restWidth = maxFitWidth;
  68245. filledColumns.forEach(function (col, index) {
  68246. var colWidth = Math.floor(col.width * scale);
  68247. col.width = index === filledColumns.length - 1 ? restWidth : colWidth;
  68248. restWidth -= colWidth;
  68249. });
  68250. }
  68251. return [filledColumns, Math.max(realTotal, maxFitWidth)];
  68252. }
  68253. return [flattenColumns, scrollWidth];
  68254. }, [flattenColumns, scrollWidth, clientWidth]);
  68255. }
  68256. ;// ./node_modules/rc-table/es/hooks/useColumns/index.js
  68257. var useColumns_excluded = ["children"],
  68258. useColumns_excluded2 = ["fixed"];
  68259. function convertChildrenToColumns(children) {
  68260. return (0,toArray["default"])(children).filter(function (node) {
  68261. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node);
  68262. }).map(function (_ref) {
  68263. var key = _ref.key,
  68264. props = _ref.props;
  68265. var nodeChildren = props.children,
  68266. restProps = (0,objectWithoutProperties["default"])(props, useColumns_excluded);
  68267. var column = (0,objectSpread2["default"])({
  68268. key: key
  68269. }, restProps);
  68270. if (nodeChildren) {
  68271. column.children = convertChildrenToColumns(nodeChildren);
  68272. }
  68273. return column;
  68274. });
  68275. }
  68276. function filterHiddenColumns(columns) {
  68277. return columns.filter(function (column) {
  68278. return column && (0,esm_typeof["default"])(column) === 'object' && !column.hidden;
  68279. }).map(function (column) {
  68280. var subColumns = column.children;
  68281. if (subColumns && subColumns.length > 0) {
  68282. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, column), {}, {
  68283. children: filterHiddenColumns(subColumns)
  68284. });
  68285. }
  68286. return column;
  68287. });
  68288. }
  68289. function flatColumns(columns) {
  68290. var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key';
  68291. return columns.filter(function (column) {
  68292. return column && (0,esm_typeof["default"])(column) === 'object';
  68293. }).reduce(function (list, column, index) {
  68294. var fixed = column.fixed;
  68295. // Convert `fixed='true'` to `fixed='left'` instead
  68296. var parsedFixed = fixed === true ? 'left' : fixed;
  68297. var mergedKey = "".concat(parentKey, "-").concat(index);
  68298. var subColumns = column.children;
  68299. if (subColumns && subColumns.length > 0) {
  68300. return [].concat((0,toConsumableArray["default"])(list), (0,toConsumableArray["default"])(flatColumns(subColumns, mergedKey).map(function (subColum) {
  68301. var _subColum$fixed;
  68302. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, subColum), {}, {
  68303. fixed: (_subColum$fixed = subColum.fixed) !== null && _subColum$fixed !== void 0 ? _subColum$fixed : parsedFixed
  68304. });
  68305. })));
  68306. }
  68307. return [].concat((0,toConsumableArray["default"])(list), [(0,objectSpread2["default"])((0,objectSpread2["default"])({
  68308. key: mergedKey
  68309. }, column), {}, {
  68310. fixed: parsedFixed
  68311. })]);
  68312. }, []);
  68313. }
  68314. function revertForRtl(columns) {
  68315. return columns.map(function (column) {
  68316. var fixed = column.fixed,
  68317. restProps = (0,objectWithoutProperties["default"])(column, useColumns_excluded2);
  68318. // Convert `fixed='left'` to `fixed='right'` instead
  68319. var parsedFixed = fixed;
  68320. if (fixed === 'left') {
  68321. parsedFixed = 'right';
  68322. } else if (fixed === 'right') {
  68323. parsedFixed = 'left';
  68324. }
  68325. return (0,objectSpread2["default"])({
  68326. fixed: parsedFixed
  68327. }, restProps);
  68328. });
  68329. }
  68330. /**
  68331. * Parse `columns` & `children` into `columns`.
  68332. */
  68333. function useColumns(_ref2, transformColumns) {
  68334. var prefixCls = _ref2.prefixCls,
  68335. columns = _ref2.columns,
  68336. children = _ref2.children,
  68337. expandable = _ref2.expandable,
  68338. expandedKeys = _ref2.expandedKeys,
  68339. columnTitle = _ref2.columnTitle,
  68340. getRowKey = _ref2.getRowKey,
  68341. onTriggerExpand = _ref2.onTriggerExpand,
  68342. expandIcon = _ref2.expandIcon,
  68343. rowExpandable = _ref2.rowExpandable,
  68344. expandIconColumnIndex = _ref2.expandIconColumnIndex,
  68345. _ref2$expandedRowOffs = _ref2.expandedRowOffset,
  68346. expandedRowOffset = _ref2$expandedRowOffs === void 0 ? 0 : _ref2$expandedRowOffs,
  68347. direction = _ref2.direction,
  68348. expandRowByClick = _ref2.expandRowByClick,
  68349. columnWidth = _ref2.columnWidth,
  68350. fixed = _ref2.fixed,
  68351. scrollWidth = _ref2.scrollWidth,
  68352. clientWidth = _ref2.clientWidth;
  68353. var baseColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68354. var newColumns = columns || convertChildrenToColumns(children) || [];
  68355. return filterHiddenColumns(newColumns.slice());
  68356. }, [columns, children]);
  68357. // ========================== Expand ==========================
  68358. var withExpandColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68359. if (expandable) {
  68360. var cloneColumns = baseColumns.slice();
  68361. // >>> Warning if use `expandIconColumnIndex`
  68362. if ( true && expandIconColumnIndex >= 0) {
  68363. (0,warning["default"])(false, '`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead.');
  68364. }
  68365. // >>> Insert expand column if not exist
  68366. if (!cloneColumns.includes(EXPAND_COLUMN)) {
  68367. var expandColIndex = expandIconColumnIndex || 0;
  68368. var insertIndex = expandColIndex === 0 && fixed === 'right' ? baseColumns.length : expandColIndex;
  68369. if (insertIndex >= 0) {
  68370. cloneColumns.splice(insertIndex, 0, EXPAND_COLUMN);
  68371. }
  68372. }
  68373. // >>> Deduplicate additional expand column
  68374. if ( true && cloneColumns.filter(function (c) {
  68375. return c === EXPAND_COLUMN;
  68376. }).length > 1) {
  68377. (0,warning["default"])(false, 'There exist more than one `EXPAND_COLUMN` in `columns`.');
  68378. }
  68379. var expandColumnIndex = cloneColumns.indexOf(EXPAND_COLUMN);
  68380. cloneColumns = cloneColumns.filter(function (column, index) {
  68381. return column !== EXPAND_COLUMN || index === expandColumnIndex;
  68382. });
  68383. // >>> Check if expand column need to fixed
  68384. var prevColumn = baseColumns[expandColumnIndex];
  68385. var fixedColumn;
  68386. if (fixed) {
  68387. fixedColumn = fixed;
  68388. } else {
  68389. fixedColumn = prevColumn ? prevColumn.fixed : null;
  68390. }
  68391. // >>> Create expandable column
  68392. var expandColumn = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, INTERNAL_COL_DEFINE, {
  68393. className: "".concat(prefixCls, "-expand-icon-col"),
  68394. columnType: 'EXPAND_COLUMN'
  68395. }), "title", columnTitle), "fixed", fixedColumn), "className", "".concat(prefixCls, "-row-expand-icon-cell")), "width", columnWidth), "render", function render(_, record, index) {
  68396. var rowKey = getRowKey(record, index);
  68397. var expanded = expandedKeys.has(rowKey);
  68398. var recordExpandable = rowExpandable ? rowExpandable(record) : true;
  68399. var icon = expandIcon({
  68400. prefixCls: prefixCls,
  68401. expanded: expanded,
  68402. expandable: recordExpandable,
  68403. record: record,
  68404. onExpand: onTriggerExpand
  68405. });
  68406. if (expandRowByClick) {
  68407. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  68408. onClick: function onClick(e) {
  68409. return e.stopPropagation();
  68410. }
  68411. }, icon);
  68412. }
  68413. return icon;
  68414. });
  68415. return cloneColumns.map(function (col, index) {
  68416. var column = col === EXPAND_COLUMN ? expandColumn : col;
  68417. if (index < expandedRowOffset) {
  68418. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, column), {}, {
  68419. fixed: column.fixed || 'left'
  68420. });
  68421. }
  68422. return column;
  68423. });
  68424. }
  68425. if ( true && baseColumns.includes(EXPAND_COLUMN)) {
  68426. (0,warning["default"])(false, '`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`.');
  68427. }
  68428. return baseColumns.filter(function (col) {
  68429. return col !== EXPAND_COLUMN;
  68430. });
  68431. // eslint-disable-next-line react-hooks/exhaustive-deps
  68432. }, [expandable, baseColumns, getRowKey, expandedKeys, expandIcon, direction, expandedRowOffset]);
  68433. // ========================= Transform ========================
  68434. var mergedColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68435. var finalColumns = withExpandColumns;
  68436. if (transformColumns) {
  68437. finalColumns = transformColumns(finalColumns);
  68438. }
  68439. // Always provides at least one column for table display
  68440. if (!finalColumns.length) {
  68441. finalColumns = [{
  68442. render: function render() {
  68443. return null;
  68444. }
  68445. }];
  68446. }
  68447. return finalColumns;
  68448. // eslint-disable-next-line react-hooks/exhaustive-deps
  68449. }, [transformColumns, withExpandColumns, direction]);
  68450. // ========================== Flatten =========================
  68451. var flattenColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68452. if (direction === 'rtl') {
  68453. return revertForRtl(flatColumns(mergedColumns));
  68454. }
  68455. return flatColumns(mergedColumns);
  68456. // eslint-disable-next-line react-hooks/exhaustive-deps
  68457. }, [mergedColumns, direction, scrollWidth]);
  68458. // ========================= Gap Fixed ========================
  68459. var hasGapFixed = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68460. // Fixed: left, since old browser not support `findLastIndex`, we should use reverse loop
  68461. var lastLeftIndex = -1;
  68462. for (var i = flattenColumns.length - 1; i >= 0; i -= 1) {
  68463. var colFixed = flattenColumns[i].fixed;
  68464. if (colFixed === 'left' || colFixed === true) {
  68465. lastLeftIndex = i;
  68466. break;
  68467. }
  68468. }
  68469. if (lastLeftIndex >= 0) {
  68470. for (var _i = 0; _i <= lastLeftIndex; _i += 1) {
  68471. var _colFixed = flattenColumns[_i].fixed;
  68472. if (_colFixed !== 'left' && _colFixed !== true) {
  68473. return true;
  68474. }
  68475. }
  68476. }
  68477. // Fixed: right
  68478. var firstRightIndex = flattenColumns.findIndex(function (_ref3) {
  68479. var colFixed = _ref3.fixed;
  68480. return colFixed === 'right';
  68481. });
  68482. if (firstRightIndex >= 0) {
  68483. for (var _i2 = firstRightIndex; _i2 < flattenColumns.length; _i2 += 1) {
  68484. var _colFixed2 = flattenColumns[_i2].fixed;
  68485. if (_colFixed2 !== 'right') {
  68486. return true;
  68487. }
  68488. }
  68489. }
  68490. return false;
  68491. }, [flattenColumns]);
  68492. // ========================= FillWidth ========================
  68493. var _useWidthColumns = useWidthColumns(flattenColumns, scrollWidth, clientWidth),
  68494. _useWidthColumns2 = (0,slicedToArray["default"])(_useWidthColumns, 2),
  68495. filledColumns = _useWidthColumns2[0],
  68496. realScrollWidth = _useWidthColumns2[1];
  68497. return [mergedColumns, filledColumns, realScrollWidth, hasGapFixed];
  68498. }
  68499. /* harmony default export */ var hooks_useColumns = (useColumns);
  68500. ;// ./node_modules/rc-table/es/hooks/useExpand.js
  68501. function useExpand(props, mergedData, getRowKey) {
  68502. var expandableConfig = getExpandableProps(props);
  68503. var expandIcon = expandableConfig.expandIcon,
  68504. expandedRowKeys = expandableConfig.expandedRowKeys,
  68505. defaultExpandedRowKeys = expandableConfig.defaultExpandedRowKeys,
  68506. defaultExpandAllRows = expandableConfig.defaultExpandAllRows,
  68507. expandedRowRender = expandableConfig.expandedRowRender,
  68508. onExpand = expandableConfig.onExpand,
  68509. onExpandedRowsChange = expandableConfig.onExpandedRowsChange,
  68510. childrenColumnName = expandableConfig.childrenColumnName;
  68511. var mergedExpandIcon = expandIcon || renderExpandIcon;
  68512. var mergedChildrenColumnName = childrenColumnName || 'children';
  68513. var expandableType = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68514. if (expandedRowRender) {
  68515. return 'row';
  68516. }
  68517. /* eslint-disable no-underscore-dangle */
  68518. /**
  68519. * Fix https://github.com/ant-design/ant-design/issues/21154
  68520. * This is a workaround to not to break current behavior.
  68521. * We can remove follow code after final release.
  68522. *
  68523. * To other developer:
  68524. * Do not use `__PARENT_RENDER_ICON__` in prod since we will remove this when refactor
  68525. */
  68526. if (props.expandable && props.internalHooks === INTERNAL_HOOKS && props.expandable.__PARENT_RENDER_ICON__ || mergedData.some(function (record) {
  68527. return record && (0,esm_typeof["default"])(record) === 'object' && record[mergedChildrenColumnName];
  68528. })) {
  68529. return 'nest';
  68530. }
  68531. /* eslint-enable */
  68532. return false;
  68533. }, [!!expandedRowRender, mergedData]);
  68534. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  68535. if (defaultExpandedRowKeys) {
  68536. return defaultExpandedRowKeys;
  68537. }
  68538. if (defaultExpandAllRows) {
  68539. return findAllChildrenKeys(mergedData, getRowKey, mergedChildrenColumnName);
  68540. }
  68541. return [];
  68542. }),
  68543. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  68544. innerExpandedKeys = _React$useState2[0],
  68545. setInnerExpandedKeys = _React$useState2[1];
  68546. var mergedExpandedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68547. return new Set(expandedRowKeys || innerExpandedKeys || []);
  68548. }, [expandedRowKeys, innerExpandedKeys]);
  68549. var onTriggerExpand = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (record) {
  68550. var key = getRowKey(record, mergedData.indexOf(record));
  68551. var newExpandedKeys;
  68552. var hasKey = mergedExpandedKeys.has(key);
  68553. if (hasKey) {
  68554. mergedExpandedKeys.delete(key);
  68555. newExpandedKeys = (0,toConsumableArray["default"])(mergedExpandedKeys);
  68556. } else {
  68557. newExpandedKeys = [].concat((0,toConsumableArray["default"])(mergedExpandedKeys), [key]);
  68558. }
  68559. setInnerExpandedKeys(newExpandedKeys);
  68560. if (onExpand) {
  68561. onExpand(!hasKey, record);
  68562. }
  68563. if (onExpandedRowsChange) {
  68564. onExpandedRowsChange(newExpandedKeys);
  68565. }
  68566. }, [getRowKey, mergedExpandedKeys, mergedData, onExpand, onExpandedRowsChange]);
  68567. // Warning if use `expandedRowRender` and nest children in the same time
  68568. if ( true && expandedRowRender && mergedData.some(function (record) {
  68569. return Array.isArray(record === null || record === void 0 ? void 0 : record[mergedChildrenColumnName]);
  68570. })) {
  68571. (0,warning["default"])(false, '`expandedRowRender` should not use with nested Table');
  68572. }
  68573. return [expandableConfig, expandableType, mergedExpandedKeys, mergedExpandIcon, mergedChildrenColumnName, onTriggerExpand];
  68574. }
  68575. ;// ./node_modules/rc-table/es/hooks/useFixedInfo.js
  68576. function useFixedInfo(flattenColumns, stickyOffsets, direction) {
  68577. var fixedInfoList = flattenColumns.map(function (_, colIndex) {
  68578. return getCellFixedInfo(colIndex, colIndex, flattenColumns, stickyOffsets, direction);
  68579. });
  68580. return (0,useMemo["default"])(function () {
  68581. return fixedInfoList;
  68582. }, [fixedInfoList], function (prev, next) {
  68583. return !(0,isEqual["default"])(prev, next);
  68584. });
  68585. }
  68586. ;// ./node_modules/rc-table/es/hooks/useFrame.js
  68587. /**
  68588. * Execute code before next frame but async
  68589. */
  68590. function useLayoutState(defaultState) {
  68591. var stateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(defaultState);
  68592. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
  68593. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  68594. forceUpdate = _useState2[1];
  68595. var lastPromiseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  68596. var updateBatchRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
  68597. function setFrameState(updater) {
  68598. updateBatchRef.current.push(updater);
  68599. var promise = Promise.resolve();
  68600. lastPromiseRef.current = promise;
  68601. promise.then(function () {
  68602. if (lastPromiseRef.current === promise) {
  68603. var prevBatch = updateBatchRef.current;
  68604. var prevState = stateRef.current;
  68605. updateBatchRef.current = [];
  68606. prevBatch.forEach(function (batchUpdater) {
  68607. stateRef.current = batchUpdater(stateRef.current);
  68608. });
  68609. lastPromiseRef.current = null;
  68610. if (prevState !== stateRef.current) {
  68611. forceUpdate({});
  68612. }
  68613. }
  68614. });
  68615. }
  68616. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  68617. return function () {
  68618. lastPromiseRef.current = null;
  68619. };
  68620. }, []);
  68621. return [stateRef.current, setFrameState];
  68622. }
  68623. /** Lock frame, when frame pass reset the lock. */
  68624. function useTimeoutLock(defaultState) {
  68625. var frameRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(defaultState || null);
  68626. var timeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  68627. function cleanUp() {
  68628. window.clearTimeout(timeoutRef.current);
  68629. }
  68630. function setState(newState) {
  68631. frameRef.current = newState;
  68632. cleanUp();
  68633. timeoutRef.current = window.setTimeout(function () {
  68634. frameRef.current = null;
  68635. timeoutRef.current = undefined;
  68636. }, 100);
  68637. }
  68638. function getState() {
  68639. return frameRef.current;
  68640. }
  68641. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  68642. return cleanUp;
  68643. }, []);
  68644. return [setState, getState];
  68645. }
  68646. ;// ./node_modules/rc-table/es/hooks/useHover.js
  68647. function useHover() {
  68648. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
  68649. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  68650. startRow = _React$useState2[0],
  68651. setStartRow = _React$useState2[1];
  68652. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(-1),
  68653. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  68654. endRow = _React$useState4[0],
  68655. setEndRow = _React$useState4[1];
  68656. var onHover = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (start, end) {
  68657. setStartRow(start);
  68658. setEndRow(end);
  68659. }, []);
  68660. return [startRow, endRow, onHover];
  68661. }
  68662. ;// ./node_modules/rc-table/es/hooks/useSticky.js
  68663. // fix ssr render
  68664. var defaultContainer = (0,canUseDom["default"])() ? window : null;
  68665. /** Sticky header hooks */
  68666. function useSticky(sticky, prefixCls) {
  68667. var _ref = (0,esm_typeof["default"])(sticky) === 'object' ? sticky : {},
  68668. _ref$offsetHeader = _ref.offsetHeader,
  68669. offsetHeader = _ref$offsetHeader === void 0 ? 0 : _ref$offsetHeader,
  68670. _ref$offsetSummary = _ref.offsetSummary,
  68671. offsetSummary = _ref$offsetSummary === void 0 ? 0 : _ref$offsetSummary,
  68672. _ref$offsetScroll = _ref.offsetScroll,
  68673. offsetScroll = _ref$offsetScroll === void 0 ? 0 : _ref$offsetScroll,
  68674. _ref$getContainer = _ref.getContainer,
  68675. getContainer = _ref$getContainer === void 0 ? function () {
  68676. return defaultContainer;
  68677. } : _ref$getContainer;
  68678. var container = getContainer() || defaultContainer;
  68679. var isSticky = !!sticky;
  68680. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68681. return {
  68682. isSticky: isSticky,
  68683. stickyClassName: isSticky ? "".concat(prefixCls, "-sticky-holder") : '',
  68684. offsetHeader: offsetHeader,
  68685. offsetSummary: offsetSummary,
  68686. offsetScroll: offsetScroll,
  68687. container: container
  68688. };
  68689. }, [isSticky, offsetScroll, offsetHeader, offsetSummary, prefixCls, container]);
  68690. }
  68691. ;// ./node_modules/rc-table/es/hooks/useStickyOffsets.js
  68692. /**
  68693. * Get sticky column offset width
  68694. */
  68695. function useStickyOffsets(colWidths, flattenColumns, direction) {
  68696. var stickyOffsets = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  68697. var columnCount = flattenColumns.length;
  68698. var getOffsets = function getOffsets(startIndex, endIndex, offset) {
  68699. var offsets = [];
  68700. var total = 0;
  68701. for (var i = startIndex; i !== endIndex; i += offset) {
  68702. offsets.push(total);
  68703. if (flattenColumns[i].fixed) {
  68704. total += colWidths[i] || 0;
  68705. }
  68706. }
  68707. return offsets;
  68708. };
  68709. var startOffsets = getOffsets(0, columnCount, 1);
  68710. var endOffsets = getOffsets(columnCount - 1, -1, -1).reverse();
  68711. return direction === 'rtl' ? {
  68712. left: endOffsets,
  68713. right: startOffsets
  68714. } : {
  68715. left: startOffsets,
  68716. right: endOffsets
  68717. };
  68718. }, [colWidths, flattenColumns, direction]);
  68719. return stickyOffsets;
  68720. }
  68721. /* harmony default export */ var hooks_useStickyOffsets = (useStickyOffsets);
  68722. ;// ./node_modules/rc-table/es/Panel/index.js
  68723. function es_Panel_Panel(_ref) {
  68724. var className = _ref.className,
  68725. children = _ref.children;
  68726. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  68727. className: className
  68728. }, children);
  68729. }
  68730. /* harmony default export */ var es_Panel = (es_Panel_Panel);
  68731. ;// ./node_modules/rc-table/es/utils/offsetUtil.js
  68732. // Copy from `rc-util/Dom/css.js`
  68733. function offsetUtil_getOffset(node) {
  68734. var element = (0,findDOMNode.getDOM)(node);
  68735. var box = element.getBoundingClientRect();
  68736. var docElem = document.documentElement;
  68737. // < ie8 not support win.pageXOffset, use docElem.scrollLeft instead
  68738. return {
  68739. left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
  68740. top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
  68741. };
  68742. }
  68743. ;// ./node_modules/rc-table/es/stickyScrollBar.js
  68744. var StickyScrollBar = function StickyScrollBar(_ref, ref) {
  68745. var _scrollBodyRef$curren, _scrollBodyRef$curren2;
  68746. var scrollBodyRef = _ref.scrollBodyRef,
  68747. onScroll = _ref.onScroll,
  68748. offsetScroll = _ref.offsetScroll,
  68749. container = _ref.container,
  68750. direction = _ref.direction;
  68751. var prefixCls = useContext(context_TableContext, 'prefixCls');
  68752. var bodyScrollWidth = ((_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 ? void 0 : _scrollBodyRef$curren.scrollWidth) || 0;
  68753. var bodyWidth = ((_scrollBodyRef$curren2 = scrollBodyRef.current) === null || _scrollBodyRef$curren2 === void 0 ? void 0 : _scrollBodyRef$curren2.clientWidth) || 0;
  68754. var scrollBarWidth = bodyScrollWidth && bodyWidth * (bodyWidth / bodyScrollWidth);
  68755. var scrollBarRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  68756. var _useLayoutState = useLayoutState({
  68757. scrollLeft: 0,
  68758. isHiddenScrollBar: true
  68759. }),
  68760. _useLayoutState2 = (0,slicedToArray["default"])(_useLayoutState, 2),
  68761. scrollState = _useLayoutState2[0],
  68762. setScrollState = _useLayoutState2[1];
  68763. var refState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  68764. delta: 0,
  68765. x: 0
  68766. });
  68767. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  68768. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  68769. isActive = _React$useState2[0],
  68770. setActive = _React$useState2[1];
  68771. var rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  68772. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  68773. return function () {
  68774. raf["default"].cancel(rafRef.current);
  68775. };
  68776. }, []);
  68777. var onMouseUp = function onMouseUp() {
  68778. setActive(false);
  68779. };
  68780. var onMouseDown = function onMouseDown(event) {
  68781. event.persist();
  68782. refState.current.delta = event.pageX - scrollState.scrollLeft;
  68783. refState.current.x = 0;
  68784. setActive(true);
  68785. event.preventDefault();
  68786. };
  68787. var onMouseMove = function onMouseMove(event) {
  68788. var _window;
  68789. // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
  68790. var _ref2 = event || ((_window = window) === null || _window === void 0 ? void 0 : _window.event),
  68791. buttons = _ref2.buttons;
  68792. if (!isActive || buttons === 0) {
  68793. // If out body mouse up, we can set isActive false when mouse move
  68794. if (isActive) {
  68795. setActive(false);
  68796. }
  68797. return;
  68798. }
  68799. var left = refState.current.x + event.pageX - refState.current.x - refState.current.delta;
  68800. var isRTL = direction === 'rtl';
  68801. // Limit scroll range
  68802. left = Math.max(isRTL ? scrollBarWidth - bodyWidth : 0, Math.min(isRTL ? 0 : bodyWidth - scrollBarWidth, left));
  68803. // Calculate the scroll position and update
  68804. var shouldScroll = !isRTL || Math.abs(left) + Math.abs(scrollBarWidth) < bodyWidth;
  68805. if (shouldScroll) {
  68806. onScroll({
  68807. scrollLeft: left / bodyWidth * (bodyScrollWidth + 2)
  68808. });
  68809. refState.current.x = event.pageX;
  68810. }
  68811. };
  68812. var checkScrollBarVisible = function checkScrollBarVisible() {
  68813. raf["default"].cancel(rafRef.current);
  68814. rafRef.current = (0,raf["default"])(function () {
  68815. if (!scrollBodyRef.current) {
  68816. return;
  68817. }
  68818. var tableOffsetTop = offsetUtil_getOffset(scrollBodyRef.current).top;
  68819. var tableBottomOffset = tableOffsetTop + scrollBodyRef.current.offsetHeight;
  68820. var currentClientOffset = container === window ? document.documentElement.scrollTop + window.innerHeight : offsetUtil_getOffset(container).top + container.clientHeight;
  68821. setScrollState(function (state) {
  68822. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
  68823. isHiddenScrollBar: tableBottomOffset - getScrollBarSize() <= currentClientOffset || tableOffsetTop >= currentClientOffset - offsetScroll
  68824. });
  68825. });
  68826. });
  68827. };
  68828. var setScrollLeft = function setScrollLeft(left) {
  68829. setScrollState(function (state) {
  68830. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
  68831. scrollLeft: bodyScrollWidth ? left / bodyScrollWidth * bodyWidth : 0
  68832. });
  68833. });
  68834. };
  68835. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  68836. return {
  68837. setScrollLeft: setScrollLeft,
  68838. checkScrollBarVisible: checkScrollBarVisible
  68839. };
  68840. });
  68841. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  68842. var onMouseUpListener = addEventListenerWrap(document.body, 'mouseup', onMouseUp, false);
  68843. var onMouseMoveListener = addEventListenerWrap(document.body, 'mousemove', onMouseMove, false);
  68844. checkScrollBarVisible();
  68845. return function () {
  68846. onMouseUpListener.remove();
  68847. onMouseMoveListener.remove();
  68848. };
  68849. }, [scrollBarWidth, isActive]);
  68850. // Loop for scroll event check
  68851. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  68852. if (!scrollBodyRef.current) return;
  68853. var scrollParents = [];
  68854. var parent = (0,findDOMNode.getDOM)(scrollBodyRef.current);
  68855. while (parent) {
  68856. scrollParents.push(parent);
  68857. parent = parent.parentElement;
  68858. }
  68859. scrollParents.forEach(function (p) {
  68860. return p.addEventListener('scroll', checkScrollBarVisible, false);
  68861. });
  68862. window.addEventListener('resize', checkScrollBarVisible, false);
  68863. window.addEventListener('scroll', checkScrollBarVisible, false);
  68864. container.addEventListener('scroll', checkScrollBarVisible, false);
  68865. return function () {
  68866. scrollParents.forEach(function (p) {
  68867. return p.removeEventListener('scroll', checkScrollBarVisible);
  68868. });
  68869. window.removeEventListener('resize', checkScrollBarVisible);
  68870. window.removeEventListener('scroll', checkScrollBarVisible);
  68871. container.removeEventListener('scroll', checkScrollBarVisible);
  68872. };
  68873. }, [container]);
  68874. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  68875. if (!scrollState.isHiddenScrollBar) {
  68876. setScrollState(function (state) {
  68877. var bodyNode = scrollBodyRef.current;
  68878. if (!bodyNode) {
  68879. return state;
  68880. }
  68881. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, state), {}, {
  68882. scrollLeft: bodyNode.scrollLeft / bodyNode.scrollWidth * bodyNode.clientWidth
  68883. });
  68884. });
  68885. }
  68886. }, [scrollState.isHiddenScrollBar]);
  68887. if (bodyScrollWidth <= bodyWidth || !scrollBarWidth || scrollState.isHiddenScrollBar) {
  68888. return null;
  68889. }
  68890. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  68891. style: {
  68892. height: getScrollBarSize(),
  68893. width: bodyWidth,
  68894. bottom: offsetScroll
  68895. },
  68896. className: "".concat(prefixCls, "-sticky-scroll")
  68897. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  68898. onMouseDown: onMouseDown,
  68899. ref: scrollBarRef,
  68900. className: classnames_default()("".concat(prefixCls, "-sticky-scroll-bar"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-sticky-scroll-bar-active"), isActive)),
  68901. style: {
  68902. width: "".concat(scrollBarWidth, "px"),
  68903. transform: "translate3d(".concat(scrollState.scrollLeft, "px, 0, 0)")
  68904. }
  68905. }));
  68906. };
  68907. /* harmony default export */ var stickyScrollBar = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(StickyScrollBar));
  68908. ;// ./node_modules/rc-table/es/Table.js
  68909. /**
  68910. * Feature:
  68911. * - fixed not need to set width
  68912. * - support `rowExpandable` to config row expand logic
  68913. * - add `summary` to support `() => ReactNode`
  68914. *
  68915. * Update:
  68916. * - `dataIndex` is `array[]` now
  68917. * - `expandable` wrap all the expand related props
  68918. *
  68919. * Removed:
  68920. * - expandIconAsCell
  68921. * - useFixedHeader
  68922. * - rowRef
  68923. * - columns[number].onCellClick
  68924. * - onRowClick
  68925. * - onRowDoubleClick
  68926. * - onRowMouseEnter
  68927. * - onRowMouseLeave
  68928. * - getBodyWrapper
  68929. * - bodyStyle
  68930. *
  68931. * Deprecated:
  68932. * - All expanded props, move into expandable
  68933. */
  68934. var DEFAULT_PREFIX = 'rc-table';
  68935. // Used for conditions cache
  68936. var Table_EMPTY_DATA = [];
  68937. // Used for customize scroll
  68938. var EMPTY_SCROLL_TARGET = {};
  68939. function defaultEmpty() {
  68940. return 'No Data';
  68941. }
  68942. function Table(tableProps, ref) {
  68943. var props = (0,objectSpread2["default"])({
  68944. rowKey: 'key',
  68945. prefixCls: DEFAULT_PREFIX,
  68946. emptyText: defaultEmpty
  68947. }, tableProps);
  68948. var prefixCls = props.prefixCls,
  68949. className = props.className,
  68950. rowClassName = props.rowClassName,
  68951. style = props.style,
  68952. data = props.data,
  68953. rowKey = props.rowKey,
  68954. scroll = props.scroll,
  68955. tableLayout = props.tableLayout,
  68956. direction = props.direction,
  68957. title = props.title,
  68958. footer = props.footer,
  68959. summary = props.summary,
  68960. caption = props.caption,
  68961. id = props.id,
  68962. showHeader = props.showHeader,
  68963. components = props.components,
  68964. emptyText = props.emptyText,
  68965. onRow = props.onRow,
  68966. onHeaderRow = props.onHeaderRow,
  68967. measureRowRender = props.measureRowRender,
  68968. onScroll = props.onScroll,
  68969. internalHooks = props.internalHooks,
  68970. transformColumns = props.transformColumns,
  68971. internalRefs = props.internalRefs,
  68972. tailor = props.tailor,
  68973. getContainerWidth = props.getContainerWidth,
  68974. sticky = props.sticky,
  68975. _props$rowHoverable = props.rowHoverable,
  68976. rowHoverable = _props$rowHoverable === void 0 ? true : _props$rowHoverable;
  68977. var mergedData = data || Table_EMPTY_DATA;
  68978. var hasData = !!mergedData.length;
  68979. var useInternalHooks = internalHooks === INTERNAL_HOOKS;
  68980. // ===================== Warning ======================
  68981. if (true) {
  68982. ['onRowClick', 'onRowDoubleClick', 'onRowContextMenu', 'onRowMouseEnter', 'onRowMouseLeave'].forEach(function (name) {
  68983. (0,warning["default"])(props[name] === undefined, "`".concat(name, "` is removed, please use `onRow` instead."));
  68984. });
  68985. (0,warning["default"])(!('getBodyWrapper' in props), '`getBodyWrapper` is deprecated, please use custom `components` instead.');
  68986. }
  68987. // ==================== Customize =====================
  68988. var getComponent = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (path, defaultComponent) {
  68989. return (0,get["default"])(components, path) || defaultComponent;
  68990. }, [components]);
  68991. var getRowKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  68992. if (typeof rowKey === 'function') {
  68993. return rowKey;
  68994. }
  68995. return function (record) {
  68996. var key = record && record[rowKey];
  68997. if (true) {
  68998. (0,warning["default"])(key !== undefined, 'Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key.');
  68999. }
  69000. return key;
  69001. };
  69002. }, [rowKey]);
  69003. var customizeScrollBody = getComponent(['body']);
  69004. // ====================== Hover =======================
  69005. var _useHover = useHover(),
  69006. _useHover2 = (0,slicedToArray["default"])(_useHover, 3),
  69007. startRow = _useHover2[0],
  69008. endRow = _useHover2[1],
  69009. onHover = _useHover2[2];
  69010. // ====================== Expand ======================
  69011. var _useExpand = useExpand(props, mergedData, getRowKey),
  69012. _useExpand2 = (0,slicedToArray["default"])(_useExpand, 6),
  69013. expandableConfig = _useExpand2[0],
  69014. expandableType = _useExpand2[1],
  69015. mergedExpandedKeys = _useExpand2[2],
  69016. mergedExpandIcon = _useExpand2[3],
  69017. mergedChildrenColumnName = _useExpand2[4],
  69018. onTriggerExpand = _useExpand2[5];
  69019. // ====================== Column ======================
  69020. var scrollX = scroll === null || scroll === void 0 ? void 0 : scroll.x;
  69021. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  69022. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  69023. componentWidth = _React$useState2[0],
  69024. setComponentWidth = _React$useState2[1];
  69025. var _useColumns = hooks_useColumns((0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), expandableConfig), {}, {
  69026. expandable: !!expandableConfig.expandedRowRender,
  69027. columnTitle: expandableConfig.columnTitle,
  69028. expandedKeys: mergedExpandedKeys,
  69029. getRowKey: getRowKey,
  69030. // https://github.com/ant-design/ant-design/issues/23894
  69031. onTriggerExpand: onTriggerExpand,
  69032. expandIcon: mergedExpandIcon,
  69033. expandIconColumnIndex: expandableConfig.expandIconColumnIndex,
  69034. direction: direction,
  69035. scrollWidth: useInternalHooks && tailor && typeof scrollX === 'number' ? scrollX : null,
  69036. clientWidth: componentWidth
  69037. }), useInternalHooks ? transformColumns : null),
  69038. _useColumns2 = (0,slicedToArray["default"])(_useColumns, 4),
  69039. columns = _useColumns2[0],
  69040. flattenColumns = _useColumns2[1],
  69041. flattenScrollX = _useColumns2[2],
  69042. hasGapFixed = _useColumns2[3];
  69043. var mergedScrollX = flattenScrollX !== null && flattenScrollX !== void 0 ? flattenScrollX : scrollX;
  69044. var columnContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69045. return {
  69046. columns: columns,
  69047. flattenColumns: flattenColumns
  69048. };
  69049. }, [columns, flattenColumns]);
  69050. // ======================= Refs =======================
  69051. var fullTableRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69052. var scrollHeaderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69053. var scrollBodyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69054. var scrollBodyContainerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69055. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  69056. return {
  69057. nativeElement: fullTableRef.current,
  69058. scrollTo: function scrollTo(config) {
  69059. var _scrollBodyRef$curren3;
  69060. if (scrollBodyRef.current instanceof HTMLElement) {
  69061. // Native scroll
  69062. var index = config.index,
  69063. top = config.top,
  69064. key = config.key;
  69065. if (validNumberValue(top)) {
  69066. var _scrollBodyRef$curren;
  69067. (_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 || _scrollBodyRef$curren.scrollTo({
  69068. top: top
  69069. });
  69070. } else {
  69071. var _scrollBodyRef$curren2;
  69072. var mergedKey = key !== null && key !== void 0 ? key : getRowKey(mergedData[index]);
  69073. (_scrollBodyRef$curren2 = scrollBodyRef.current.querySelector("[data-row-key=\"".concat(mergedKey, "\"]"))) === null || _scrollBodyRef$curren2 === void 0 || _scrollBodyRef$curren2.scrollIntoView();
  69074. }
  69075. } else if ((_scrollBodyRef$curren3 = scrollBodyRef.current) !== null && _scrollBodyRef$curren3 !== void 0 && _scrollBodyRef$curren3.scrollTo) {
  69076. // Pass to proxy
  69077. scrollBodyRef.current.scrollTo(config);
  69078. }
  69079. }
  69080. };
  69081. });
  69082. // ====================== Scroll ======================
  69083. var scrollSummaryRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69084. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  69085. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  69086. pingedLeft = _React$useState4[0],
  69087. setPingedLeft = _React$useState4[1];
  69088. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  69089. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  69090. pingedRight = _React$useState6[0],
  69091. setPingedRight = _React$useState6[1];
  69092. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(new Map()),
  69093. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  69094. colsWidths = _React$useState8[0],
  69095. updateColsWidths = _React$useState8[1];
  69096. // Convert map to number width
  69097. var colsKeys = getColumnsKey(flattenColumns);
  69098. var pureColWidths = colsKeys.map(function (columnKey) {
  69099. return colsWidths.get(columnKey);
  69100. });
  69101. var colWidths = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69102. return pureColWidths;
  69103. }, [pureColWidths.join('_')]);
  69104. var stickyOffsets = hooks_useStickyOffsets(colWidths, flattenColumns, direction);
  69105. var fixHeader = scroll && validateValue(scroll.y);
  69106. var horizonScroll = scroll && validateValue(mergedScrollX) || Boolean(expandableConfig.fixed);
  69107. var fixColumn = horizonScroll && flattenColumns.some(function (_ref) {
  69108. var fixed = _ref.fixed;
  69109. return fixed;
  69110. });
  69111. // Sticky
  69112. var stickyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69113. var _useSticky = useSticky(sticky, prefixCls),
  69114. isSticky = _useSticky.isSticky,
  69115. offsetHeader = _useSticky.offsetHeader,
  69116. offsetSummary = _useSticky.offsetSummary,
  69117. offsetScroll = _useSticky.offsetScroll,
  69118. stickyClassName = _useSticky.stickyClassName,
  69119. container = _useSticky.container;
  69120. // Footer (Fix footer must fixed header)
  69121. var summaryNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69122. return summary === null || summary === void 0 ? void 0 : summary(mergedData);
  69123. }, [summary, mergedData]);
  69124. var fixFooter = (fixHeader || isSticky) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(summaryNode) && summaryNode.type === Footer_Summary && summaryNode.props.fixed;
  69125. // Scroll
  69126. var scrollXStyle;
  69127. var scrollYStyle;
  69128. var scrollTableStyle;
  69129. if (fixHeader) {
  69130. scrollYStyle = {
  69131. overflowY: hasData ? 'scroll' : 'auto',
  69132. maxHeight: scroll.y
  69133. };
  69134. }
  69135. if (horizonScroll) {
  69136. scrollXStyle = {
  69137. overflowX: 'auto'
  69138. };
  69139. // When no vertical scrollbar, should hide it
  69140. // https://github.com/ant-design/ant-design/pull/20705
  69141. // https://github.com/ant-design/ant-design/issues/21879
  69142. if (!fixHeader) {
  69143. scrollYStyle = {
  69144. overflowY: 'hidden'
  69145. };
  69146. }
  69147. scrollTableStyle = {
  69148. width: mergedScrollX === true ? 'auto' : mergedScrollX,
  69149. minWidth: '100%'
  69150. };
  69151. }
  69152. var onColumnResize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (columnKey, width) {
  69153. updateColsWidths(function (widths) {
  69154. if (widths.get(columnKey) !== width) {
  69155. var newWidths = new Map(widths);
  69156. newWidths.set(columnKey, width);
  69157. return newWidths;
  69158. }
  69159. return widths;
  69160. });
  69161. }, []);
  69162. var _useTimeoutLock = useTimeoutLock(null),
  69163. _useTimeoutLock2 = (0,slicedToArray["default"])(_useTimeoutLock, 2),
  69164. setScrollTarget = _useTimeoutLock2[0],
  69165. getScrollTarget = _useTimeoutLock2[1];
  69166. function forceScroll(scrollLeft, target) {
  69167. if (!target) {
  69168. return;
  69169. }
  69170. if (typeof target === 'function') {
  69171. target(scrollLeft);
  69172. } else if (target.scrollLeft !== scrollLeft) {
  69173. target.scrollLeft = scrollLeft;
  69174. // Delay to force scroll position if not sync
  69175. // ref: https://github.com/ant-design/ant-design/issues/37179
  69176. if (target.scrollLeft !== scrollLeft) {
  69177. setTimeout(function () {
  69178. target.scrollLeft = scrollLeft;
  69179. }, 0);
  69180. }
  69181. }
  69182. }
  69183. var onInternalScroll = (0,useEvent["default"])(function (_ref2) {
  69184. var currentTarget = _ref2.currentTarget,
  69185. scrollLeft = _ref2.scrollLeft;
  69186. var isRTL = direction === 'rtl';
  69187. var mergedScrollLeft = typeof scrollLeft === 'number' ? scrollLeft : currentTarget.scrollLeft;
  69188. var compareTarget = currentTarget || EMPTY_SCROLL_TARGET;
  69189. if (!getScrollTarget() || getScrollTarget() === compareTarget) {
  69190. var _stickyRef$current;
  69191. setScrollTarget(compareTarget);
  69192. forceScroll(mergedScrollLeft, scrollHeaderRef.current);
  69193. forceScroll(mergedScrollLeft, scrollBodyRef.current);
  69194. forceScroll(mergedScrollLeft, scrollSummaryRef.current);
  69195. forceScroll(mergedScrollLeft, (_stickyRef$current = stickyRef.current) === null || _stickyRef$current === void 0 ? void 0 : _stickyRef$current.setScrollLeft);
  69196. }
  69197. var measureTarget = currentTarget || scrollHeaderRef.current;
  69198. if (measureTarget) {
  69199. var scrollWidth =
  69200. // Should use mergedScrollX in virtual table(useInternalHooks && tailor === true)
  69201. useInternalHooks && tailor && typeof mergedScrollX === 'number' ? mergedScrollX : measureTarget.scrollWidth;
  69202. var clientWidth = measureTarget.clientWidth;
  69203. // There is no space to scroll
  69204. if (scrollWidth === clientWidth) {
  69205. setPingedLeft(false);
  69206. setPingedRight(false);
  69207. return;
  69208. }
  69209. if (isRTL) {
  69210. setPingedLeft(-mergedScrollLeft < scrollWidth - clientWidth);
  69211. setPingedRight(-mergedScrollLeft > 0);
  69212. } else {
  69213. setPingedLeft(mergedScrollLeft > 0);
  69214. setPingedRight(mergedScrollLeft < scrollWidth - clientWidth);
  69215. }
  69216. }
  69217. });
  69218. var onBodyScroll = (0,useEvent["default"])(function (e) {
  69219. onInternalScroll(e);
  69220. onScroll === null || onScroll === void 0 || onScroll(e);
  69221. });
  69222. var triggerOnScroll = function triggerOnScroll() {
  69223. if (horizonScroll && scrollBodyRef.current) {
  69224. var _scrollBodyRef$curren4;
  69225. onInternalScroll({
  69226. currentTarget: (0,findDOMNode.getDOM)(scrollBodyRef.current),
  69227. scrollLeft: (_scrollBodyRef$curren4 = scrollBodyRef.current) === null || _scrollBodyRef$curren4 === void 0 ? void 0 : _scrollBodyRef$curren4.scrollLeft
  69228. });
  69229. } else {
  69230. setPingedLeft(false);
  69231. setPingedRight(false);
  69232. }
  69233. };
  69234. var onFullTableResize = function onFullTableResize(_ref3) {
  69235. var _stickyRef$current2;
  69236. var width = _ref3.width;
  69237. (_stickyRef$current2 = stickyRef.current) === null || _stickyRef$current2 === void 0 || _stickyRef$current2.checkScrollBarVisible();
  69238. var mergedWidth = fullTableRef.current ? fullTableRef.current.offsetWidth : width;
  69239. if (useInternalHooks && getContainerWidth && fullTableRef.current) {
  69240. mergedWidth = getContainerWidth(fullTableRef.current, mergedWidth) || mergedWidth;
  69241. }
  69242. if (mergedWidth !== componentWidth) {
  69243. triggerOnScroll();
  69244. setComponentWidth(mergedWidth);
  69245. }
  69246. };
  69247. // Sync scroll bar when init or `horizonScroll`, `data` and `columns.length` changed
  69248. var mounted = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  69249. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  69250. // onFullTableResize will be trigger once when ResizeObserver is mounted
  69251. // This will reduce one duplicated triggerOnScroll time
  69252. if (mounted.current) {
  69253. triggerOnScroll();
  69254. }
  69255. }, [horizonScroll, data, columns.length]);
  69256. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  69257. mounted.current = true;
  69258. }, []);
  69259. // ===================== Effects ======================
  69260. var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0),
  69261. _React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
  69262. scrollbarSize = _React$useState10[0],
  69263. setScrollbarSize = _React$useState10[1];
  69264. var _React$useState11 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true),
  69265. _React$useState12 = (0,slicedToArray["default"])(_React$useState11, 2),
  69266. supportSticky = _React$useState12[0],
  69267. setSupportSticky = _React$useState12[1]; // Only IE not support, we mark as support first
  69268. (0,useLayoutEffect["default"])(function () {
  69269. if (!tailor || !useInternalHooks) {
  69270. if (scrollBodyRef.current instanceof Element) {
  69271. setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current).width);
  69272. } else {
  69273. setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current).width);
  69274. }
  69275. }
  69276. setSupportSticky(isStyleSupport('position', 'sticky'));
  69277. }, []);
  69278. // ================== INTERNAL HOOKS ==================
  69279. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  69280. if (useInternalHooks && internalRefs) {
  69281. internalRefs.body.current = scrollBodyRef.current;
  69282. }
  69283. });
  69284. // ========================================================================
  69285. // == Render ==
  69286. // ========================================================================
  69287. // =================== Render: Func ===================
  69288. var renderFixedHeaderTable = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (fixedHolderPassProps) {
  69289. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Header_Header, fixedHolderPassProps), fixFooter === 'top' && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, fixedHolderPassProps, summaryNode));
  69290. }, [fixFooter, summaryNode]);
  69291. var renderFixedFooterTable = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (fixedHolderPassProps) {
  69292. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, fixedHolderPassProps, summaryNode);
  69293. }, [summaryNode]);
  69294. // =================== Render: Node ===================
  69295. var TableComponent = getComponent(['table'], 'table');
  69296. // Table layout
  69297. var mergedTableLayout = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69298. if (tableLayout) {
  69299. return tableLayout;
  69300. }
  69301. // https://github.com/ant-design/ant-design/issues/25227
  69302. // When scroll.x is max-content, no need to fix table layout
  69303. // it's width should stretch out to fit content
  69304. if (fixColumn) {
  69305. return mergedScrollX === 'max-content' ? 'auto' : 'fixed';
  69306. }
  69307. if (fixHeader || isSticky || flattenColumns.some(function (_ref4) {
  69308. var ellipsis = _ref4.ellipsis;
  69309. return ellipsis;
  69310. })) {
  69311. return 'fixed';
  69312. }
  69313. return 'auto';
  69314. }, [fixHeader, fixColumn, flattenColumns, tableLayout, isSticky]);
  69315. var groupTableNode;
  69316. // Header props
  69317. var headerProps = {
  69318. colWidths: colWidths,
  69319. columCount: flattenColumns.length,
  69320. stickyOffsets: stickyOffsets,
  69321. onHeaderRow: onHeaderRow,
  69322. fixHeader: fixHeader,
  69323. scroll: scroll
  69324. };
  69325. // Empty
  69326. var emptyNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69327. if (hasData) {
  69328. return null;
  69329. }
  69330. if (typeof emptyText === 'function') {
  69331. return emptyText();
  69332. }
  69333. return emptyText;
  69334. }, [hasData, emptyText]);
  69335. // Body
  69336. var bodyTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Body, {
  69337. data: mergedData,
  69338. measureColumnWidth: fixHeader || horizonScroll || isSticky
  69339. });
  69340. var bodyColGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_ColGroup, {
  69341. colWidths: flattenColumns.map(function (_ref5) {
  69342. var width = _ref5.width;
  69343. return width;
  69344. }),
  69345. columns: flattenColumns
  69346. });
  69347. var captionElement = caption !== null && caption !== undefined ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("caption", {
  69348. className: "".concat(prefixCls, "-caption")
  69349. }, caption) : undefined;
  69350. var dataProps = (0,pickAttrs["default"])(props, {
  69351. data: true
  69352. });
  69353. var ariaProps = (0,pickAttrs["default"])(props, {
  69354. aria: true
  69355. });
  69356. if (fixHeader || isSticky) {
  69357. // >>>>>> Fixed Header
  69358. var bodyContent;
  69359. if (typeof customizeScrollBody === 'function') {
  69360. bodyContent = customizeScrollBody(mergedData, {
  69361. scrollbarSize: scrollbarSize,
  69362. ref: scrollBodyRef,
  69363. onScroll: onInternalScroll
  69364. });
  69365. headerProps.colWidths = flattenColumns.map(function (_ref6, index) {
  69366. var width = _ref6.width;
  69367. var colWidth = index === flattenColumns.length - 1 ? width - scrollbarSize : width;
  69368. if (typeof colWidth === 'number' && !Number.isNaN(colWidth)) {
  69369. return colWidth;
  69370. }
  69371. if (true) {
  69372. (0,warning["default"])(props.columns.length === 0, 'When use `components.body` with render props. Each column should have a fixed `width` value.');
  69373. }
  69374. return 0;
  69375. });
  69376. } else {
  69377. bodyContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  69378. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollXStyle), scrollYStyle),
  69379. onScroll: onBodyScroll,
  69380. ref: scrollBodyRef,
  69381. className: classnames_default()("".concat(prefixCls, "-body"))
  69382. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, (0,esm_extends["default"])({
  69383. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollTableStyle), {}, {
  69384. tableLayout: mergedTableLayout
  69385. })
  69386. }, ariaProps), captionElement, bodyColGroup, bodyTable, !fixFooter && summaryNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, {
  69387. stickyOffsets: stickyOffsets,
  69388. flattenColumns: flattenColumns
  69389. }, summaryNode)));
  69390. }
  69391. // Fixed holder share the props
  69392. var fixedHolderProps = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({
  69393. noData: !mergedData.length
  69394. }, headerProps), columnContext), {}, {
  69395. direction: direction,
  69396. stickyClassName: stickyClassName,
  69397. scrollX: mergedScrollX,
  69398. tableLayout: mergedTableLayout,
  69399. onScroll: onInternalScroll
  69400. });
  69401. groupTableNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, showHeader !== false && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_FixedHolder, (0,esm_extends["default"])({}, fixedHolderProps, {
  69402. stickyTopOffset: offsetHeader,
  69403. className: "".concat(prefixCls, "-header"),
  69404. ref: scrollHeaderRef,
  69405. colGroup: bodyColGroup
  69406. }), renderFixedHeaderTable), bodyContent, fixFooter && fixFooter !== 'top' && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_FixedHolder, (0,esm_extends["default"])({}, fixedHolderProps, {
  69407. stickyBottomOffset: offsetSummary,
  69408. className: "".concat(prefixCls, "-summary"),
  69409. ref: scrollSummaryRef,
  69410. colGroup: bodyColGroup
  69411. }), renderFixedFooterTable), isSticky && scrollBodyRef.current && scrollBodyRef.current instanceof Element && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(stickyScrollBar, {
  69412. ref: stickyRef,
  69413. offsetScroll: offsetScroll,
  69414. scrollBodyRef: scrollBodyRef,
  69415. onScroll: onInternalScroll,
  69416. container: container,
  69417. direction: direction
  69418. }));
  69419. } else {
  69420. // >>>>>> Unique table
  69421. groupTableNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  69422. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollXStyle), scrollYStyle),
  69423. className: classnames_default()("".concat(prefixCls, "-content")),
  69424. onScroll: onInternalScroll,
  69425. ref: scrollBodyRef
  69426. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, (0,esm_extends["default"])({
  69427. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scrollTableStyle), {}, {
  69428. tableLayout: mergedTableLayout
  69429. })
  69430. }, ariaProps), captionElement, bodyColGroup, showHeader !== false && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Header_Header, (0,esm_extends["default"])({}, headerProps, columnContext)), bodyTable, summaryNode && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Footer, {
  69431. stickyOffsets: stickyOffsets,
  69432. flattenColumns: flattenColumns
  69433. }, summaryNode)));
  69434. }
  69435. var fullTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", (0,esm_extends["default"])({
  69436. className: classnames_default()(prefixCls, className, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-ping-left"), pingedLeft), "".concat(prefixCls, "-ping-right"), pingedRight), "".concat(prefixCls, "-layout-fixed"), tableLayout === 'fixed'), "".concat(prefixCls, "-fixed-header"), fixHeader), "".concat(prefixCls, "-fixed-column"), fixColumn), "".concat(prefixCls, "-fixed-column-gapped"), fixColumn && hasGapFixed), "".concat(prefixCls, "-scroll-horizontal"), horizonScroll), "".concat(prefixCls, "-has-fix-left"), flattenColumns[0] && flattenColumns[0].fixed), "".concat(prefixCls, "-has-fix-right"), flattenColumns[flattenColumns.length - 1] && flattenColumns[flattenColumns.length - 1].fixed === 'right')),
  69437. style: style,
  69438. id: id,
  69439. ref: fullTableRef
  69440. }, dataProps), title && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Panel, {
  69441. className: "".concat(prefixCls, "-title")
  69442. }, title(mergedData)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  69443. ref: scrollBodyContainerRef,
  69444. className: "".concat(prefixCls, "-container")
  69445. }, groupTableNode), footer && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Panel, {
  69446. className: "".concat(prefixCls, "-footer")
  69447. }, footer(mergedData)));
  69448. if (horizonScroll) {
  69449. fullTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  69450. onResize: onFullTableResize
  69451. }, fullTable);
  69452. }
  69453. var fixedInfoList = useFixedInfo(flattenColumns, stickyOffsets, direction);
  69454. var TableContextValue = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69455. return {
  69456. // Scroll
  69457. scrollX: mergedScrollX,
  69458. // Table
  69459. prefixCls: prefixCls,
  69460. getComponent: getComponent,
  69461. scrollbarSize: scrollbarSize,
  69462. direction: direction,
  69463. fixedInfoList: fixedInfoList,
  69464. isSticky: isSticky,
  69465. supportSticky: supportSticky,
  69466. componentWidth: componentWidth,
  69467. fixHeader: fixHeader,
  69468. fixColumn: fixColumn,
  69469. horizonScroll: horizonScroll,
  69470. // Body
  69471. tableLayout: mergedTableLayout,
  69472. rowClassName: rowClassName,
  69473. expandedRowClassName: expandableConfig.expandedRowClassName,
  69474. expandIcon: mergedExpandIcon,
  69475. expandableType: expandableType,
  69476. expandRowByClick: expandableConfig.expandRowByClick,
  69477. expandedRowRender: expandableConfig.expandedRowRender,
  69478. expandedRowOffset: expandableConfig.expandedRowOffset,
  69479. onTriggerExpand: onTriggerExpand,
  69480. expandIconColumnIndex: expandableConfig.expandIconColumnIndex,
  69481. indentSize: expandableConfig.indentSize,
  69482. allColumnsFixedLeft: flattenColumns.every(function (col) {
  69483. return col.fixed === 'left';
  69484. }),
  69485. emptyNode: emptyNode,
  69486. // Column
  69487. columns: columns,
  69488. flattenColumns: flattenColumns,
  69489. onColumnResize: onColumnResize,
  69490. colWidths: colWidths,
  69491. // Row
  69492. hoverStartRow: startRow,
  69493. hoverEndRow: endRow,
  69494. onHover: onHover,
  69495. rowExpandable: expandableConfig.rowExpandable,
  69496. onRow: onRow,
  69497. getRowKey: getRowKey,
  69498. expandedKeys: mergedExpandedKeys,
  69499. childrenColumnName: mergedChildrenColumnName,
  69500. rowHoverable: rowHoverable,
  69501. // Measure Row
  69502. measureRowRender: measureRowRender
  69503. };
  69504. }, [
  69505. // Scroll
  69506. mergedScrollX,
  69507. // Table
  69508. prefixCls, getComponent, scrollbarSize, direction, fixedInfoList, isSticky, supportSticky, componentWidth, fixHeader, fixColumn, horizonScroll,
  69509. // Body
  69510. mergedTableLayout, rowClassName, expandableConfig.expandedRowClassName, mergedExpandIcon, expandableType, expandableConfig.expandRowByClick, expandableConfig.expandedRowRender, expandableConfig.expandedRowOffset, onTriggerExpand, expandableConfig.expandIconColumnIndex, expandableConfig.indentSize, emptyNode,
  69511. // Column
  69512. columns, flattenColumns, onColumnResize, colWidths,
  69513. // Row
  69514. startRow, endRow, onHover, expandableConfig.rowExpandable, onRow, getRowKey, mergedExpandedKeys, mergedChildrenColumnName, rowHoverable, measureRowRender]);
  69515. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(context_TableContext.Provider, {
  69516. value: TableContextValue
  69517. }, fullTable);
  69518. }
  69519. var RefTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Table);
  69520. if (true) {
  69521. RefTable.displayName = 'Table';
  69522. }
  69523. function genTable(shouldTriggerRender) {
  69524. return TableContext_makeImmutable(RefTable, shouldTriggerRender);
  69525. }
  69526. var ImmutableTable = genTable();
  69527. ImmutableTable.EXPAND_COLUMN = EXPAND_COLUMN;
  69528. ImmutableTable.INTERNAL_HOOKS = INTERNAL_HOOKS;
  69529. ImmutableTable.Column = sugar_Column;
  69530. ImmutableTable.ColumnGroup = sugar_ColumnGroup;
  69531. ImmutableTable.Summary = FooterComponents;
  69532. /* harmony default export */ var es_Table = (ImmutableTable);
  69533. ;// ./node_modules/rc-table/es/VirtualTable/context.js
  69534. var StaticContext = createContext(null);
  69535. var GridContext = createContext(null);
  69536. ;// ./node_modules/rc-table/es/VirtualTable/VirtualCell.js
  69537. /**
  69538. * Return the width of the column by `colSpan`.
  69539. * When `colSpan` is `0` will be trade as `1`.
  69540. */
  69541. function getColumnWidth(colIndex, colSpan, columnsOffset) {
  69542. var mergedColSpan = colSpan || 1;
  69543. return columnsOffset[colIndex + mergedColSpan] - (columnsOffset[colIndex] || 0);
  69544. }
  69545. function VirtualCell(props) {
  69546. var rowInfo = props.rowInfo,
  69547. column = props.column,
  69548. colIndex = props.colIndex,
  69549. indent = props.indent,
  69550. index = props.index,
  69551. component = props.component,
  69552. renderIndex = props.renderIndex,
  69553. record = props.record,
  69554. style = props.style,
  69555. className = props.className,
  69556. inverse = props.inverse,
  69557. getHeight = props.getHeight;
  69558. var render = column.render,
  69559. dataIndex = column.dataIndex,
  69560. columnClassName = column.className,
  69561. colWidth = column.width;
  69562. var _useContext = useContext(GridContext, ['columnsOffset']),
  69563. columnsOffset = _useContext.columnsOffset;
  69564. // TODO: support `expandableRowOffset`
  69565. var _getCellProps = getCellProps(rowInfo, column, colIndex, indent, index),
  69566. key = _getCellProps.key,
  69567. fixedInfo = _getCellProps.fixedInfo,
  69568. appendCellNode = _getCellProps.appendCellNode,
  69569. additionalCellProps = _getCellProps.additionalCellProps;
  69570. var cellStyle = additionalCellProps.style,
  69571. _additionalCellProps$ = additionalCellProps.colSpan,
  69572. colSpan = _additionalCellProps$ === void 0 ? 1 : _additionalCellProps$,
  69573. _additionalCellProps$2 = additionalCellProps.rowSpan,
  69574. rowSpan = _additionalCellProps$2 === void 0 ? 1 : _additionalCellProps$2;
  69575. // ========================= ColWidth =========================
  69576. // column width
  69577. var startColIndex = colIndex - 1;
  69578. var concatColWidth = getColumnWidth(startColIndex, colSpan, columnsOffset);
  69579. // margin offset
  69580. var marginOffset = colSpan > 1 ? colWidth - concatColWidth : 0;
  69581. // ========================== Style ===========================
  69582. var mergedStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])((0,objectSpread2["default"])({}, cellStyle), style), {}, {
  69583. flex: "0 0 ".concat(concatColWidth, "px"),
  69584. width: "".concat(concatColWidth, "px"),
  69585. marginRight: marginOffset,
  69586. pointerEvents: 'auto'
  69587. });
  69588. // When `colSpan` or `rowSpan` is `0`, should skip render.
  69589. var needHide = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69590. if (inverse) {
  69591. return rowSpan <= 1;
  69592. } else {
  69593. return colSpan === 0 || rowSpan === 0 || rowSpan > 1;
  69594. }
  69595. }, [rowSpan, colSpan, inverse]);
  69596. // 0 rowSpan or colSpan should not render
  69597. if (needHide) {
  69598. mergedStyle.visibility = 'hidden';
  69599. } else if (inverse) {
  69600. mergedStyle.height = getHeight === null || getHeight === void 0 ? void 0 : getHeight(rowSpan);
  69601. }
  69602. var mergedRender = needHide ? function () {
  69603. return null;
  69604. } : render;
  69605. // ========================== Render ==========================
  69606. var cellSpan = {};
  69607. // Virtual should reset `colSpan` & `rowSpan`
  69608. if (rowSpan === 0 || colSpan === 0) {
  69609. cellSpan.rowSpan = 1;
  69610. cellSpan.colSpan = 1;
  69611. }
  69612. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, (0,esm_extends["default"])({
  69613. className: classnames_default()(columnClassName, className),
  69614. ellipsis: column.ellipsis,
  69615. align: column.align,
  69616. scope: column.rowScope,
  69617. component: component,
  69618. prefixCls: rowInfo.prefixCls,
  69619. key: key,
  69620. record: record,
  69621. index: index,
  69622. renderIndex: renderIndex,
  69623. dataIndex: dataIndex,
  69624. render: mergedRender,
  69625. shouldCellUpdate: column.shouldCellUpdate
  69626. }, fixedInfo, {
  69627. appendNode: appendCellNode,
  69628. additionalProps: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, additionalCellProps), {}, {
  69629. style: mergedStyle
  69630. }, cellSpan)
  69631. }));
  69632. }
  69633. /* harmony default export */ var VirtualTable_VirtualCell = (VirtualCell);
  69634. ;// ./node_modules/rc-table/es/VirtualTable/BodyLine.js
  69635. var BodyLine_excluded = ["data", "index", "className", "rowKey", "style", "extra", "getHeight"];
  69636. var BodyLine = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  69637. var data = props.data,
  69638. index = props.index,
  69639. className = props.className,
  69640. rowKey = props.rowKey,
  69641. style = props.style,
  69642. extra = props.extra,
  69643. getHeight = props.getHeight,
  69644. restProps = (0,objectWithoutProperties["default"])(props, BodyLine_excluded);
  69645. var record = data.record,
  69646. indent = data.indent,
  69647. renderIndex = data.index;
  69648. var _useContext = useContext(context_TableContext, ['prefixCls', 'flattenColumns', 'fixColumn', 'componentWidth', 'scrollX']),
  69649. scrollX = _useContext.scrollX,
  69650. flattenColumns = _useContext.flattenColumns,
  69651. prefixCls = _useContext.prefixCls,
  69652. fixColumn = _useContext.fixColumn,
  69653. componentWidth = _useContext.componentWidth;
  69654. var _useContext2 = useContext(StaticContext, ['getComponent']),
  69655. getComponent = _useContext2.getComponent;
  69656. var rowInfo = useRowInfo(record, rowKey, index, indent);
  69657. var RowComponent = getComponent(['body', 'row'], 'div');
  69658. var cellComponent = getComponent(['body', 'cell'], 'div');
  69659. // ========================== Expand ==========================
  69660. var rowSupportExpand = rowInfo.rowSupportExpand,
  69661. expanded = rowInfo.expanded,
  69662. rowProps = rowInfo.rowProps,
  69663. expandedRowRender = rowInfo.expandedRowRender,
  69664. expandedRowClassName = rowInfo.expandedRowClassName;
  69665. var expandRowNode;
  69666. if (rowSupportExpand && expanded) {
  69667. var expandContent = expandedRowRender(record, index, indent + 1, expanded);
  69668. var expandedClsName = computedExpandedClassName(expandedRowClassName, record, index, indent);
  69669. var additionalProps = {};
  69670. if (fixColumn) {
  69671. additionalProps = {
  69672. style: (0,defineProperty["default"])({}, '--virtual-width', "".concat(componentWidth, "px"))
  69673. };
  69674. }
  69675. var rowCellCls = "".concat(prefixCls, "-expanded-row-cell");
  69676. expandRowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, {
  69677. className: classnames_default()("".concat(prefixCls, "-expanded-row"), "".concat(prefixCls, "-expanded-row-level-").concat(indent + 1), expandedClsName)
  69678. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Cell, {
  69679. component: cellComponent,
  69680. prefixCls: prefixCls,
  69681. className: classnames_default()(rowCellCls, (0,defineProperty["default"])({}, "".concat(rowCellCls, "-fixed"), fixColumn)),
  69682. additionalProps: additionalProps
  69683. }, expandContent));
  69684. }
  69685. // ========================== Render ==========================
  69686. var rowStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, style), {}, {
  69687. width: scrollX
  69688. });
  69689. if (extra) {
  69690. rowStyle.position = 'absolute';
  69691. rowStyle.pointerEvents = 'none';
  69692. }
  69693. var rowNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RowComponent, (0,esm_extends["default"])({}, rowProps, restProps, {
  69694. "data-row-key": rowKey,
  69695. ref: rowSupportExpand ? null : ref,
  69696. className: classnames_default()(className, "".concat(prefixCls, "-row"), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-row-extra"), extra)),
  69697. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, rowStyle), rowProps === null || rowProps === void 0 ? void 0 : rowProps.style)
  69698. }), flattenColumns.map(function (column, colIndex) {
  69699. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VirtualTable_VirtualCell, {
  69700. key: colIndex,
  69701. component: cellComponent,
  69702. rowInfo: rowInfo,
  69703. column: column,
  69704. colIndex: colIndex,
  69705. indent: indent,
  69706. index: index,
  69707. renderIndex: renderIndex,
  69708. record: record,
  69709. inverse: extra,
  69710. getHeight: getHeight
  69711. });
  69712. }));
  69713. if (rowSupportExpand) {
  69714. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  69715. ref: ref
  69716. }, rowNode, expandRowNode);
  69717. }
  69718. return rowNode;
  69719. });
  69720. var ResponseBodyLine = TableContext_responseImmutable(BodyLine);
  69721. if (true) {
  69722. ResponseBodyLine.displayName = 'BodyLine';
  69723. }
  69724. /* harmony default export */ var VirtualTable_BodyLine = (ResponseBodyLine);
  69725. ;// ./node_modules/rc-table/es/VirtualTable/BodyGrid.js
  69726. var BodyGrid_Grid = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  69727. var data = props.data,
  69728. onScroll = props.onScroll;
  69729. var _useContext = useContext(context_TableContext, ['flattenColumns', 'onColumnResize', 'getRowKey', 'prefixCls', 'expandedKeys', 'childrenColumnName', 'scrollX', 'direction']),
  69730. flattenColumns = _useContext.flattenColumns,
  69731. onColumnResize = _useContext.onColumnResize,
  69732. getRowKey = _useContext.getRowKey,
  69733. expandedKeys = _useContext.expandedKeys,
  69734. prefixCls = _useContext.prefixCls,
  69735. childrenColumnName = _useContext.childrenColumnName,
  69736. scrollX = _useContext.scrollX,
  69737. direction = _useContext.direction;
  69738. var _useContext2 = useContext(StaticContext),
  69739. sticky = _useContext2.sticky,
  69740. scrollY = _useContext2.scrollY,
  69741. listItemHeight = _useContext2.listItemHeight,
  69742. getComponent = _useContext2.getComponent,
  69743. onTablePropScroll = _useContext2.onScroll;
  69744. // =========================== Ref ============================
  69745. var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  69746. // =========================== Data ===========================
  69747. var flattenData = useFlattenRecords(data, childrenColumnName, expandedKeys, getRowKey);
  69748. // ========================== Column ==========================
  69749. var columnsWidth = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69750. var total = 0;
  69751. return flattenColumns.map(function (_ref) {
  69752. var width = _ref.width,
  69753. minWidth = _ref.minWidth,
  69754. key = _ref.key;
  69755. var finalWidth = Math.max(width || 0, minWidth || 0);
  69756. total += finalWidth;
  69757. return [key, finalWidth, total];
  69758. });
  69759. }, [flattenColumns]);
  69760. var columnsOffset = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69761. return columnsWidth.map(function (colWidth) {
  69762. return colWidth[2];
  69763. });
  69764. }, [columnsWidth]);
  69765. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  69766. columnsWidth.forEach(function (_ref2) {
  69767. var _ref3 = (0,slicedToArray["default"])(_ref2, 2),
  69768. key = _ref3[0],
  69769. width = _ref3[1];
  69770. onColumnResize(key, width);
  69771. });
  69772. }, [columnsWidth]);
  69773. // =========================== Ref ============================
  69774. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  69775. var _listRef$current2;
  69776. var obj = {
  69777. scrollTo: function scrollTo(config) {
  69778. var _listRef$current;
  69779. (_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollTo(config);
  69780. },
  69781. nativeElement: (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.nativeElement
  69782. };
  69783. Object.defineProperty(obj, 'scrollLeft', {
  69784. get: function get() {
  69785. var _listRef$current3;
  69786. return ((_listRef$current3 = listRef.current) === null || _listRef$current3 === void 0 ? void 0 : _listRef$current3.getScrollInfo().x) || 0;
  69787. },
  69788. set: function set(value) {
  69789. var _listRef$current4;
  69790. (_listRef$current4 = listRef.current) === null || _listRef$current4 === void 0 || _listRef$current4.scrollTo({
  69791. left: value
  69792. });
  69793. }
  69794. });
  69795. // https://github.com/ant-design/ant-design/issues/54734
  69796. Object.defineProperty(obj, 'scrollTop', {
  69797. get: function get() {
  69798. var _listRef$current5;
  69799. return ((_listRef$current5 = listRef.current) === null || _listRef$current5 === void 0 ? void 0 : _listRef$current5.getScrollInfo().y) || 0;
  69800. },
  69801. set: function set(value) {
  69802. var _listRef$current6;
  69803. (_listRef$current6 = listRef.current) === null || _listRef$current6 === void 0 || _listRef$current6.scrollTo({
  69804. top: value
  69805. });
  69806. }
  69807. });
  69808. return obj;
  69809. });
  69810. // ======================= Col/Row Span =======================
  69811. var getRowSpan = function getRowSpan(column, index) {
  69812. var _flattenData$index;
  69813. var record = (_flattenData$index = flattenData[index]) === null || _flattenData$index === void 0 ? void 0 : _flattenData$index.record;
  69814. var onCell = column.onCell;
  69815. if (onCell) {
  69816. var _cellProps$rowSpan;
  69817. var cellProps = onCell(record, index);
  69818. return (_cellProps$rowSpan = cellProps === null || cellProps === void 0 ? void 0 : cellProps.rowSpan) !== null && _cellProps$rowSpan !== void 0 ? _cellProps$rowSpan : 1;
  69819. }
  69820. return 1;
  69821. };
  69822. var extraRender = function extraRender(info) {
  69823. var start = info.start,
  69824. end = info.end,
  69825. getSize = info.getSize,
  69826. offsetY = info.offsetY;
  69827. // Do nothing if no data
  69828. if (end < 0) {
  69829. return null;
  69830. }
  69831. // Find first rowSpan column
  69832. var firstRowSpanColumns = flattenColumns.filter(
  69833. // rowSpan is 0
  69834. function (column) {
  69835. return getRowSpan(column, start) === 0;
  69836. });
  69837. var startIndex = start;
  69838. var _loop = function _loop(i) {
  69839. firstRowSpanColumns = firstRowSpanColumns.filter(function (column) {
  69840. return getRowSpan(column, i) === 0;
  69841. });
  69842. if (!firstRowSpanColumns.length) {
  69843. startIndex = i;
  69844. return 1; // break
  69845. }
  69846. };
  69847. for (var i = start; i >= 0; i -= 1) {
  69848. if (_loop(i)) break;
  69849. }
  69850. // Find last rowSpan column
  69851. var lastRowSpanColumns = flattenColumns.filter(
  69852. // rowSpan is not 1
  69853. function (column) {
  69854. return getRowSpan(column, end) !== 1;
  69855. });
  69856. var endIndex = end;
  69857. var _loop2 = function _loop2(_i) {
  69858. lastRowSpanColumns = lastRowSpanColumns.filter(function (column) {
  69859. return getRowSpan(column, _i) !== 1;
  69860. });
  69861. if (!lastRowSpanColumns.length) {
  69862. endIndex = Math.max(_i - 1, end);
  69863. return 1; // break
  69864. }
  69865. };
  69866. for (var _i = end; _i < flattenData.length; _i += 1) {
  69867. if (_loop2(_i)) break;
  69868. }
  69869. // Collect the line who has rowSpan
  69870. var spanLines = [];
  69871. var _loop3 = function _loop3(_i2) {
  69872. var item = flattenData[_i2];
  69873. // This code will never reach, just incase
  69874. if (!item) {
  69875. return 1; // continue
  69876. }
  69877. if (flattenColumns.some(function (column) {
  69878. return getRowSpan(column, _i2) > 1;
  69879. })) {
  69880. spanLines.push(_i2);
  69881. }
  69882. };
  69883. for (var _i2 = startIndex; _i2 <= endIndex; _i2 += 1) {
  69884. if (_loop3(_i2)) continue;
  69885. }
  69886. // Patch extra line on the page
  69887. var nodes = spanLines.map(function (index) {
  69888. var item = flattenData[index];
  69889. var rowKey = getRowKey(item.record, index);
  69890. var getHeight = function getHeight(rowSpan) {
  69891. var endItemIndex = index + rowSpan - 1;
  69892. var endItemKey = getRowKey(flattenData[endItemIndex].record, endItemIndex);
  69893. var sizeInfo = getSize(rowKey, endItemKey);
  69894. return sizeInfo.bottom - sizeInfo.top;
  69895. };
  69896. var sizeInfo = getSize(rowKey);
  69897. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VirtualTable_BodyLine, {
  69898. key: index,
  69899. data: item,
  69900. rowKey: rowKey,
  69901. index: index,
  69902. style: {
  69903. top: -offsetY + sizeInfo.top
  69904. },
  69905. extra: true,
  69906. getHeight: getHeight
  69907. });
  69908. });
  69909. return nodes;
  69910. };
  69911. // ========================= Context ==========================
  69912. var gridContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  69913. return {
  69914. columnsOffset: columnsOffset
  69915. };
  69916. }, [columnsOffset]);
  69917. // ========================== Render ==========================
  69918. var tblPrefixCls = "".concat(prefixCls, "-tbody");
  69919. // default 'div' in rc-virtual-list
  69920. var wrapperComponent = getComponent(['body', 'wrapper']);
  69921. // ========================== Sticky Scroll Bar ==========================
  69922. var horizontalScrollBarStyle = {};
  69923. if (sticky) {
  69924. horizontalScrollBarStyle.position = 'sticky';
  69925. horizontalScrollBarStyle.bottom = 0;
  69926. if ((0,esm_typeof["default"])(sticky) === 'object' && sticky.offsetScroll) {
  69927. horizontalScrollBarStyle.bottom = sticky.offsetScroll;
  69928. }
  69929. }
  69930. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(GridContext.Provider, {
  69931. value: gridContext
  69932. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_virtual_list_es, {
  69933. fullHeight: false,
  69934. ref: listRef,
  69935. prefixCls: "".concat(tblPrefixCls, "-virtual"),
  69936. styles: {
  69937. horizontalScrollBar: horizontalScrollBarStyle
  69938. },
  69939. className: tblPrefixCls,
  69940. height: scrollY,
  69941. itemHeight: listItemHeight || 24,
  69942. data: flattenData,
  69943. itemKey: function itemKey(item) {
  69944. return getRowKey(item.record);
  69945. },
  69946. component: wrapperComponent,
  69947. scrollWidth: scrollX,
  69948. direction: direction,
  69949. onVirtualScroll: function onVirtualScroll(_ref4) {
  69950. var _listRef$current7;
  69951. var x = _ref4.x;
  69952. onScroll({
  69953. currentTarget: (_listRef$current7 = listRef.current) === null || _listRef$current7 === void 0 ? void 0 : _listRef$current7.nativeElement,
  69954. scrollLeft: x
  69955. });
  69956. },
  69957. onScroll: onTablePropScroll,
  69958. extraRender: extraRender
  69959. }, function (item, index, itemProps) {
  69960. var rowKey = getRowKey(item.record, index);
  69961. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(VirtualTable_BodyLine, {
  69962. data: item,
  69963. rowKey: rowKey,
  69964. index: index,
  69965. style: itemProps.style
  69966. });
  69967. }));
  69968. });
  69969. var ResponseGrid = TableContext_responseImmutable(BodyGrid_Grid);
  69970. if (true) {
  69971. ResponseGrid.displayName = 'ResponseGrid';
  69972. }
  69973. /* harmony default export */ var BodyGrid = (ResponseGrid);
  69974. ;// ./node_modules/rc-table/es/VirtualTable/index.js
  69975. var renderBody = function renderBody(rawData, props) {
  69976. var ref = props.ref,
  69977. onScroll = props.onScroll;
  69978. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(BodyGrid, {
  69979. ref: ref,
  69980. data: rawData,
  69981. onScroll: onScroll
  69982. });
  69983. };
  69984. function VirtualTable(props, ref) {
  69985. var data = props.data,
  69986. columns = props.columns,
  69987. scroll = props.scroll,
  69988. sticky = props.sticky,
  69989. _props$prefixCls = props.prefixCls,
  69990. prefixCls = _props$prefixCls === void 0 ? DEFAULT_PREFIX : _props$prefixCls,
  69991. className = props.className,
  69992. listItemHeight = props.listItemHeight,
  69993. components = props.components,
  69994. onScroll = props.onScroll;
  69995. var _ref = scroll || {},
  69996. scrollX = _ref.x,
  69997. scrollY = _ref.y;
  69998. // Fill scrollX
  69999. if (typeof scrollX !== 'number') {
  70000. if (true) {
  70001. (0,rc_util_es.warning)(!scrollX, '`scroll.x` in virtual table must be number.');
  70002. }
  70003. scrollX = 1;
  70004. }
  70005. // Fill scrollY
  70006. if (typeof scrollY !== 'number') {
  70007. scrollY = 500;
  70008. if (true) {
  70009. (0,rc_util_es.warning)(false, '`scroll.y` in virtual table must be number.');
  70010. }
  70011. }
  70012. var getComponent = (0,rc_util_es.useEvent)(function (path, defaultComponent) {
  70013. return (0,get["default"])(components, path) || defaultComponent;
  70014. });
  70015. // Memo this
  70016. var onInternalScroll = (0,rc_util_es.useEvent)(onScroll);
  70017. // ========================= Context ==========================
  70018. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  70019. return {
  70020. sticky: sticky,
  70021. scrollY: scrollY,
  70022. listItemHeight: listItemHeight,
  70023. getComponent: getComponent,
  70024. onScroll: onInternalScroll
  70025. };
  70026. }, [sticky, scrollY, listItemHeight, getComponent, onInternalScroll]);
  70027. // ========================== Render ==========================
  70028. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StaticContext.Provider, {
  70029. value: context
  70030. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Table, (0,esm_extends["default"])({}, props, {
  70031. className: classnames_default()(className, "".concat(prefixCls, "-virtual")),
  70032. scroll: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, scroll), {}, {
  70033. x: scrollX
  70034. }),
  70035. components: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, components), {}, {
  70036. // fix https://github.com/ant-design/ant-design/issues/48991
  70037. body: data !== null && data !== void 0 && data.length ? renderBody : undefined
  70038. }),
  70039. columns: columns,
  70040. internalHooks: INTERNAL_HOOKS,
  70041. tailor: true,
  70042. ref: ref
  70043. })));
  70044. }
  70045. var RefVirtualTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(VirtualTable);
  70046. if (true) {
  70047. RefVirtualTable.displayName = 'VirtualTable';
  70048. }
  70049. function genVirtualTable(shouldTriggerRender) {
  70050. return TableContext_makeImmutable(RefVirtualTable, shouldTriggerRender);
  70051. }
  70052. /* harmony default export */ var es_VirtualTable = (genVirtualTable());
  70053. ;// ./node_modules/rc-table/es/index.js
  70054. /* harmony default export */ var rc_table_es = (es_Table);
  70055. ;// ./components/table/Column.ts
  70056. /* istanbul ignore next */
  70057. /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */
  70058. const table_Column_Column = _ => null;
  70059. /* harmony default export */ var table_Column = (table_Column_Column);
  70060. ;// ./components/table/ColumnGroup.ts
  70061. /* istanbul ignore next */
  70062. /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */
  70063. const ColumnGroup_ColumnGroup = _ => null;
  70064. /* harmony default export */ var table_ColumnGroup = (ColumnGroup_ColumnGroup);
  70065. ;// ./node_modules/rc-tree/es/contextTypes.js
  70066. /**
  70067. * Webpack has bug for import loop, which is not the same behavior as ES module.
  70068. * When util.js imports the TreeNode for tree generate will cause treeContextTypes be empty.
  70069. */
  70070. var TreeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  70071. /** Internal usage, safe to remove. Do not use in prod */
  70072. var contextTypes_UnstableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  70073. ;// ./node_modules/rc-tree/es/Indent.js
  70074. var Indent = function Indent(_ref) {
  70075. var prefixCls = _ref.prefixCls,
  70076. level = _ref.level,
  70077. isStart = _ref.isStart,
  70078. isEnd = _ref.isEnd;
  70079. var baseClassName = "".concat(prefixCls, "-indent-unit");
  70080. var list = [];
  70081. for (var i = 0; i < level; i += 1) {
  70082. list.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  70083. key: i,
  70084. className: classnames_default()(baseClassName, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(baseClassName, "-start"), isStart[i]), "".concat(baseClassName, "-end"), isEnd[i]))
  70085. }));
  70086. }
  70087. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  70088. "aria-hidden": "true",
  70089. className: "".concat(prefixCls, "-indent")
  70090. }, list);
  70091. };
  70092. /* harmony default export */ var es_Indent = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(Indent));
  70093. ;// ./node_modules/rc-tree/es/TreeNode.js
  70094. var TreeNode_excluded = ["eventKey", "className", "style", "dragOver", "dragOverGapTop", "dragOverGapBottom", "isLeaf", "isStart", "isEnd", "expanded", "selected", "checked", "halfChecked", "loading", "domRef", "active", "data", "onMouseMove", "selectable"];
  70095. var ICON_OPEN = 'open';
  70096. var ICON_CLOSE = 'close';
  70097. var defaultTitle = '---';
  70098. var TreeNode = function TreeNode(props) {
  70099. var _unstableContext$node, _context$filterTreeNo, _classNames4;
  70100. var eventKey = props.eventKey,
  70101. className = props.className,
  70102. style = props.style,
  70103. dragOver = props.dragOver,
  70104. dragOverGapTop = props.dragOverGapTop,
  70105. dragOverGapBottom = props.dragOverGapBottom,
  70106. isLeaf = props.isLeaf,
  70107. isStart = props.isStart,
  70108. isEnd = props.isEnd,
  70109. expanded = props.expanded,
  70110. selected = props.selected,
  70111. checked = props.checked,
  70112. halfChecked = props.halfChecked,
  70113. loading = props.loading,
  70114. domRef = props.domRef,
  70115. active = props.active,
  70116. data = props.data,
  70117. onMouseMove = props.onMouseMove,
  70118. selectable = props.selectable,
  70119. otherProps = (0,objectWithoutProperties["default"])(props, TreeNode_excluded);
  70120. var context = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(TreeContext);
  70121. var unstableContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(contextTypes_UnstableContext);
  70122. var selectHandleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  70123. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
  70124. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  70125. dragNodeHighlight = _React$useState2[0],
  70126. setDragNodeHighlight = _React$useState2[1];
  70127. // ======= State: Disabled State =======
  70128. var isDisabled = !!(context.disabled || props.disabled || (_unstableContext$node = unstableContext.nodeDisabled) !== null && _unstableContext$node !== void 0 && _unstableContext$node.call(unstableContext, data));
  70129. var isCheckable = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70130. // Return false if tree or treeNode is not checkable
  70131. if (!context.checkable || props.checkable === false) {
  70132. return false;
  70133. }
  70134. return context.checkable;
  70135. }, [context.checkable, props.checkable]);
  70136. // ======= Event Handlers: Selection and Check =======
  70137. var onSelect = function onSelect(e) {
  70138. if (isDisabled) {
  70139. return;
  70140. }
  70141. context.onNodeSelect(e, convertNodePropsToEventData(props));
  70142. };
  70143. var onCheck = function onCheck(e) {
  70144. if (isDisabled) {
  70145. return;
  70146. }
  70147. if (!isCheckable || props.disableCheckbox) {
  70148. return;
  70149. }
  70150. context.onNodeCheck(e, convertNodePropsToEventData(props), !checked);
  70151. };
  70152. // ======= State: Selectable Check =======
  70153. var isSelectable = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70154. // Ignore when selectable is undefined or null
  70155. if (typeof selectable === 'boolean') {
  70156. return selectable;
  70157. }
  70158. return context.selectable;
  70159. }, [selectable, context.selectable]);
  70160. var onSelectorClick = function onSelectorClick(e) {
  70161. // Click trigger before select/check operation
  70162. context.onNodeClick(e, convertNodePropsToEventData(props));
  70163. if (isSelectable) {
  70164. onSelect(e);
  70165. } else {
  70166. onCheck(e);
  70167. }
  70168. };
  70169. var onSelectorDoubleClick = function onSelectorDoubleClick(e) {
  70170. context.onNodeDoubleClick(e, convertNodePropsToEventData(props));
  70171. };
  70172. var onMouseEnter = function onMouseEnter(e) {
  70173. context.onNodeMouseEnter(e, convertNodePropsToEventData(props));
  70174. };
  70175. var onMouseLeave = function onMouseLeave(e) {
  70176. context.onNodeMouseLeave(e, convertNodePropsToEventData(props));
  70177. };
  70178. var onContextMenu = function onContextMenu(e) {
  70179. context.onNodeContextMenu(e, convertNodePropsToEventData(props));
  70180. };
  70181. // ======= Drag: Drag Enabled =======
  70182. var isDraggable = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70183. return !!(context.draggable && (!context.draggable.nodeDraggable || context.draggable.nodeDraggable(data)));
  70184. }, [context.draggable, data]);
  70185. // ======= Drag: Drag Event Handlers =======
  70186. var onDragStart = function onDragStart(e) {
  70187. e.stopPropagation();
  70188. setDragNodeHighlight(true);
  70189. context.onNodeDragStart(e, props);
  70190. try {
  70191. // ie throw error
  70192. // firefox-need-it
  70193. e.dataTransfer.setData('text/plain', '');
  70194. } catch (_unused) {
  70195. // empty
  70196. }
  70197. };
  70198. var onDragEnter = function onDragEnter(e) {
  70199. e.preventDefault();
  70200. e.stopPropagation();
  70201. context.onNodeDragEnter(e, props);
  70202. };
  70203. var onDragOver = function onDragOver(e) {
  70204. e.preventDefault();
  70205. e.stopPropagation();
  70206. context.onNodeDragOver(e, props);
  70207. };
  70208. var onDragLeave = function onDragLeave(e) {
  70209. e.stopPropagation();
  70210. context.onNodeDragLeave(e, props);
  70211. };
  70212. var onDragEnd = function onDragEnd(e) {
  70213. e.stopPropagation();
  70214. setDragNodeHighlight(false);
  70215. context.onNodeDragEnd(e, props);
  70216. };
  70217. var onDrop = function onDrop(e) {
  70218. e.preventDefault();
  70219. e.stopPropagation();
  70220. setDragNodeHighlight(false);
  70221. context.onNodeDrop(e, props);
  70222. };
  70223. // ======= Expand: Node Expansion =======
  70224. var onExpand = function onExpand(e) {
  70225. if (loading) {
  70226. return;
  70227. }
  70228. context.onNodeExpand(e, convertNodePropsToEventData(props));
  70229. };
  70230. // ======= State: Has Children =======
  70231. var hasChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70232. var _ref = getEntity(context.keyEntities, eventKey) || {},
  70233. children = _ref.children;
  70234. return Boolean((children || []).length);
  70235. }, [context.keyEntities, eventKey]);
  70236. // ======= State: Leaf Check =======
  70237. var memoizedIsLeaf = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70238. if (isLeaf === false) {
  70239. return false;
  70240. }
  70241. return isLeaf || !context.loadData && !hasChildren || context.loadData && props.loaded && !hasChildren;
  70242. }, [isLeaf, context.loadData, hasChildren, props.loaded]);
  70243. // ============== Effect ==============
  70244. external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
  70245. // Load data to avoid default expanded tree without data
  70246. if (loading) {
  70247. return;
  70248. }
  70249. // read from state to avoid loadData at same time
  70250. if (typeof context.loadData === 'function' && expanded && !memoizedIsLeaf && !props.loaded) {
  70251. // We needn't reload data when has children in sync logic
  70252. // It's only needed in node expanded
  70253. context.onNodeLoad(convertNodePropsToEventData(props));
  70254. }
  70255. }, [loading, context.loadData, context.onNodeLoad, expanded, memoizedIsLeaf, props]);
  70256. // ==================== Render: Drag Handler ====================
  70257. var dragHandlerNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70258. var _context$draggable;
  70259. if (!((_context$draggable = context.draggable) !== null && _context$draggable !== void 0 && _context$draggable.icon)) {
  70260. return null;
  70261. }
  70262. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70263. className: "".concat(context.prefixCls, "-draggable-icon")
  70264. }, context.draggable.icon);
  70265. }, [context.draggable]);
  70266. // ====================== Render: Switcher ======================
  70267. var renderSwitcherIconDom = function renderSwitcherIconDom(isInternalLeaf) {
  70268. var switcherIcon = props.switcherIcon || context.switcherIcon;
  70269. // if switcherIconDom is null, no render switcher span
  70270. if (typeof switcherIcon === 'function') {
  70271. return switcherIcon((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  70272. isLeaf: isInternalLeaf
  70273. }));
  70274. }
  70275. return switcherIcon;
  70276. };
  70277. // Switcher
  70278. var renderSwitcher = function renderSwitcher() {
  70279. if (memoizedIsLeaf) {
  70280. // if switcherIconDom is null, no render switcher span
  70281. var _switcherIconDom = renderSwitcherIconDom(true);
  70282. return _switcherIconDom !== false ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70283. className: classnames_default()("".concat(context.prefixCls, "-switcher"), "".concat(context.prefixCls, "-switcher-noop"))
  70284. }, _switcherIconDom) : null;
  70285. }
  70286. var switcherIconDom = renderSwitcherIconDom(false);
  70287. return switcherIconDom !== false ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70288. onClick: onExpand,
  70289. className: classnames_default()("".concat(context.prefixCls, "-switcher"), "".concat(context.prefixCls, "-switcher_").concat(expanded ? ICON_OPEN : ICON_CLOSE))
  70290. }, switcherIconDom) : null;
  70291. };
  70292. // ====================== Checkbox ======================
  70293. var checkboxNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70294. if (!isCheckable) {
  70295. return null;
  70296. }
  70297. // [Legacy] Custom element should be separate with `checkable` in future
  70298. var $custom = typeof isCheckable !== 'boolean' ? isCheckable : null;
  70299. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70300. className: classnames_default()("".concat(context.prefixCls, "-checkbox"), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(context.prefixCls, "-checkbox-checked"), checked), "".concat(context.prefixCls, "-checkbox-indeterminate"), !checked && halfChecked), "".concat(context.prefixCls, "-checkbox-disabled"), isDisabled || props.disableCheckbox)),
  70301. onClick: onCheck,
  70302. role: "checkbox",
  70303. "aria-checked": halfChecked ? 'mixed' : checked,
  70304. "aria-disabled": isDisabled || props.disableCheckbox,
  70305. "aria-label": "Select ".concat(typeof props.title === 'string' ? props.title : 'tree node')
  70306. }, $custom);
  70307. }, [isCheckable, checked, halfChecked, isDisabled, props.disableCheckbox, props.title]);
  70308. // ============== State: Node State (Open/Close) ==============
  70309. var nodeState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70310. if (memoizedIsLeaf) {
  70311. return null;
  70312. }
  70313. return expanded ? ICON_OPEN : ICON_CLOSE;
  70314. }, [memoizedIsLeaf, expanded]);
  70315. // ==================== Render: Title + Icon ====================
  70316. var iconNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70317. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70318. className: classnames_default()("".concat(context.prefixCls, "-iconEle"), "".concat(context.prefixCls, "-icon__").concat(nodeState || 'docu'), (0,defineProperty["default"])({}, "".concat(context.prefixCls, "-icon_loading"), loading))
  70319. });
  70320. }, [context.prefixCls, nodeState, loading]);
  70321. // =================== Drop Indicator ===================
  70322. var dropIndicatorNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70323. var rootDraggable = Boolean(context.draggable);
  70324. // allowDrop is calculated in Tree.tsx, there is no need for calc it here
  70325. var showIndicator = !props.disabled && rootDraggable && context.dragOverNodeKey === eventKey;
  70326. if (!showIndicator) {
  70327. return null;
  70328. }
  70329. return context.dropIndicatorRender({
  70330. dropPosition: context.dropPosition,
  70331. dropLevelOffset: context.dropLevelOffset,
  70332. indent: context.indent,
  70333. prefixCls: context.prefixCls,
  70334. direction: context.direction
  70335. });
  70336. }, [context.dropPosition, context.dropLevelOffset, context.indent, context.prefixCls, context.direction, context.draggable, context.dragOverNodeKey, context.dropIndicatorRender]);
  70337. // Icon + Title
  70338. var selectorNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  70339. var _props$title = props.title,
  70340. title = _props$title === void 0 ? defaultTitle : _props$title;
  70341. var wrapClass = "".concat(context.prefixCls, "-node-content-wrapper");
  70342. // Icon - Still show loading icon when loading without showIcon
  70343. var $icon;
  70344. if (context.showIcon) {
  70345. var currentIcon = props.icon || context.icon;
  70346. $icon = currentIcon ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70347. className: classnames_default()("".concat(context.prefixCls, "-iconEle"), "".concat(context.prefixCls, "-icon__customize"))
  70348. }, typeof currentIcon === 'function' ? currentIcon(props) : currentIcon) : iconNode;
  70349. } else if (context.loadData && loading) {
  70350. $icon = iconNode;
  70351. }
  70352. // Title
  70353. var titleNode;
  70354. if (typeof title === 'function') {
  70355. titleNode = title(data);
  70356. } else if (context.titleRender) {
  70357. titleNode = context.titleRender(data);
  70358. } else {
  70359. titleNode = title;
  70360. }
  70361. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70362. ref: selectHandleRef,
  70363. title: typeof title === 'string' ? title : '',
  70364. className: classnames_default()(wrapClass, "".concat(wrapClass, "-").concat(nodeState || 'normal'), (0,defineProperty["default"])({}, "".concat(context.prefixCls, "-node-selected"), !isDisabled && (selected || dragNodeHighlight))),
  70365. onMouseEnter: onMouseEnter,
  70366. onMouseLeave: onMouseLeave,
  70367. onContextMenu: onContextMenu,
  70368. onClick: onSelectorClick,
  70369. onDoubleClick: onSelectorDoubleClick
  70370. }, $icon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  70371. className: "".concat(context.prefixCls, "-title")
  70372. }, titleNode), dropIndicatorNode);
  70373. }, [context.prefixCls, context.showIcon, props, context.icon, iconNode, context.titleRender, data, nodeState, onMouseEnter, onMouseLeave, onContextMenu, onSelectorClick, onSelectorDoubleClick]);
  70374. var dataOrAriaAttributeProps = (0,pickAttrs["default"])(otherProps, {
  70375. aria: true,
  70376. data: true
  70377. });
  70378. var _ref2 = getEntity(context.keyEntities, eventKey) || {},
  70379. level = _ref2.level;
  70380. var isEndNode = isEnd[isEnd.length - 1];
  70381. var draggableWithoutDisabled = !isDisabled && isDraggable;
  70382. var dragging = context.draggingNodeKey === eventKey;
  70383. var ariaSelected = selectable !== undefined ? {
  70384. 'aria-selected': !!selectable
  70385. } : undefined;
  70386. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", (0,esm_extends["default"])({
  70387. ref: domRef,
  70388. role: "treeitem",
  70389. "aria-expanded": isLeaf ? undefined : expanded,
  70390. className: classnames_default()(className, "".concat(context.prefixCls, "-treenode"), (_classNames4 = {}, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])(_classNames4, "".concat(context.prefixCls, "-treenode-disabled"), isDisabled), "".concat(context.prefixCls, "-treenode-switcher-").concat(expanded ? 'open' : 'close'), !isLeaf), "".concat(context.prefixCls, "-treenode-checkbox-checked"), checked), "".concat(context.prefixCls, "-treenode-checkbox-indeterminate"), halfChecked), "".concat(context.prefixCls, "-treenode-selected"), selected), "".concat(context.prefixCls, "-treenode-loading"), loading), "".concat(context.prefixCls, "-treenode-active"), active), "".concat(context.prefixCls, "-treenode-leaf-last"), isEndNode), "".concat(context.prefixCls, "-treenode-draggable"), isDraggable), "dragging", dragging), (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])(_classNames4, 'drop-target', context.dropTargetKey === eventKey), 'drop-container', context.dropContainerKey === eventKey), 'drag-over', !isDisabled && dragOver), 'drag-over-gap-top', !isDisabled && dragOverGapTop), 'drag-over-gap-bottom', !isDisabled && dragOverGapBottom), 'filter-node', (_context$filterTreeNo = context.filterTreeNode) === null || _context$filterTreeNo === void 0 ? void 0 : _context$filterTreeNo.call(context, convertNodePropsToEventData(props))), "".concat(context.prefixCls, "-treenode-leaf"), memoizedIsLeaf))),
  70391. style: style
  70392. // Draggable config
  70393. ,
  70394. draggable: draggableWithoutDisabled,
  70395. onDragStart: draggableWithoutDisabled ? onDragStart : undefined
  70396. // Drop config
  70397. ,
  70398. onDragEnter: isDraggable ? onDragEnter : undefined,
  70399. onDragOver: isDraggable ? onDragOver : undefined,
  70400. onDragLeave: isDraggable ? onDragLeave : undefined,
  70401. onDrop: isDraggable ? onDrop : undefined,
  70402. onDragEnd: isDraggable ? onDragEnd : undefined,
  70403. onMouseMove: onMouseMove
  70404. }, ariaSelected, dataOrAriaAttributeProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_Indent, {
  70405. prefixCls: context.prefixCls,
  70406. level: level,
  70407. isStart: isStart,
  70408. isEnd: isEnd
  70409. }), dragHandlerNode, renderSwitcher(), checkboxNode, selectorNode);
  70410. };
  70411. TreeNode.isTreeNode = 1;
  70412. if (true) {
  70413. TreeNode.displayName = 'TreeNode';
  70414. }
  70415. /* harmony default export */ var es_TreeNode = (TreeNode);
  70416. ;// ./node_modules/rc-tree/es/util.js
  70417. var util_excluded = ["children"];
  70418. /* eslint-disable no-lonely-if */
  70419. /**
  70420. * Legacy code. Should avoid to use if you are new to import these code.
  70421. */
  70422. function arrDel(list, value) {
  70423. if (!list) return [];
  70424. var clone = list.slice();
  70425. var index = clone.indexOf(value);
  70426. if (index >= 0) {
  70427. clone.splice(index, 1);
  70428. }
  70429. return clone;
  70430. }
  70431. function arrAdd(list, value) {
  70432. var clone = (list || []).slice();
  70433. if (clone.indexOf(value) === -1) {
  70434. clone.push(value);
  70435. }
  70436. return clone;
  70437. }
  70438. function posToArr(pos) {
  70439. return pos.split('-');
  70440. }
  70441. function getDragChildrenKeys(dragNodeKey, keyEntities) {
  70442. // not contains self
  70443. // self for left or right drag
  70444. var dragChildrenKeys = [];
  70445. var entity = getEntity(keyEntities, dragNodeKey);
  70446. function dig() {
  70447. var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  70448. list.forEach(function (_ref) {
  70449. var key = _ref.key,
  70450. children = _ref.children;
  70451. dragChildrenKeys.push(key);
  70452. dig(children);
  70453. });
  70454. }
  70455. dig(entity.children);
  70456. return dragChildrenKeys;
  70457. }
  70458. function isLastChild(treeNodeEntity) {
  70459. if (treeNodeEntity.parent) {
  70460. var posArr = posToArr(treeNodeEntity.pos);
  70461. return Number(posArr[posArr.length - 1]) === treeNodeEntity.parent.children.length - 1;
  70462. }
  70463. return false;
  70464. }
  70465. function isFirstChild(treeNodeEntity) {
  70466. var posArr = posToArr(treeNodeEntity.pos);
  70467. return Number(posArr[posArr.length - 1]) === 0;
  70468. }
  70469. // Only used when drag, not affect SSR.
  70470. function calcDropPosition(event, dragNodeProps, targetNodeProps, indent, startMousePosition, allowDrop, flattenedNodes, keyEntities, expandKeys, direction) {
  70471. var _abstractDropNodeEnti;
  70472. var clientX = event.clientX,
  70473. clientY = event.clientY;
  70474. var _getBoundingClientRec = event.target.getBoundingClientRect(),
  70475. top = _getBoundingClientRec.top,
  70476. height = _getBoundingClientRec.height;
  70477. // optional chain for testing
  70478. var horizontalMouseOffset = (direction === 'rtl' ? -1 : 1) * (((startMousePosition === null || startMousePosition === void 0 ? void 0 : startMousePosition.x) || 0) - clientX);
  70479. var rawDropLevelOffset = (horizontalMouseOffset - 12) / indent;
  70480. // Filter the expanded keys to exclude the node that not has children currently (like async nodes).
  70481. var filteredExpandKeys = expandKeys.filter(function (key) {
  70482. var _keyEntities$key;
  70483. return (_keyEntities$key = keyEntities[key]) === null || _keyEntities$key === void 0 || (_keyEntities$key = _keyEntities$key.children) === null || _keyEntities$key === void 0 ? void 0 : _keyEntities$key.length;
  70484. });
  70485. // find abstract drop node by horizontal offset
  70486. var abstractDropNodeEntity = getEntity(keyEntities, targetNodeProps.eventKey);
  70487. if (clientY < top + height / 2) {
  70488. // first half, set abstract drop node to previous node
  70489. var nodeIndex = flattenedNodes.findIndex(function (flattenedNode) {
  70490. return flattenedNode.key === abstractDropNodeEntity.key;
  70491. });
  70492. var prevNodeIndex = nodeIndex <= 0 ? 0 : nodeIndex - 1;
  70493. var prevNodeKey = flattenedNodes[prevNodeIndex].key;
  70494. abstractDropNodeEntity = getEntity(keyEntities, prevNodeKey);
  70495. }
  70496. var initialAbstractDropNodeKey = abstractDropNodeEntity.key;
  70497. var abstractDragOverEntity = abstractDropNodeEntity;
  70498. var dragOverNodeKey = abstractDropNodeEntity.key;
  70499. var dropPosition = 0;
  70500. var dropLevelOffset = 0;
  70501. // Only allow cross level drop when dragging on a non-expanded node
  70502. if (!filteredExpandKeys.includes(initialAbstractDropNodeKey)) {
  70503. for (var i = 0; i < rawDropLevelOffset; i += 1) {
  70504. if (isLastChild(abstractDropNodeEntity)) {
  70505. abstractDropNodeEntity = abstractDropNodeEntity.parent;
  70506. dropLevelOffset += 1;
  70507. } else {
  70508. break;
  70509. }
  70510. }
  70511. }
  70512. var abstractDragDataNode = dragNodeProps.data;
  70513. var abstractDropDataNode = abstractDropNodeEntity.node;
  70514. var dropAllowed = true;
  70515. if (isFirstChild(abstractDropNodeEntity) && abstractDropNodeEntity.level === 0 && clientY < top + height / 2 && allowDrop({
  70516. dragNode: abstractDragDataNode,
  70517. dropNode: abstractDropDataNode,
  70518. dropPosition: -1
  70519. }) && abstractDropNodeEntity.key === targetNodeProps.eventKey) {
  70520. // first half of first node in first level
  70521. dropPosition = -1;
  70522. } else if ((abstractDragOverEntity.children || []).length && filteredExpandKeys.includes(dragOverNodeKey)) {
  70523. // drop on expanded node
  70524. // only allow drop inside
  70525. if (allowDrop({
  70526. dragNode: abstractDragDataNode,
  70527. dropNode: abstractDropDataNode,
  70528. dropPosition: 0
  70529. })) {
  70530. dropPosition = 0;
  70531. } else {
  70532. dropAllowed = false;
  70533. }
  70534. } else if (dropLevelOffset === 0) {
  70535. if (rawDropLevelOffset > -1.5) {
  70536. // | Node | <- abstractDropNode
  70537. // | -^-===== | <- mousePosition
  70538. // 1. try drop after
  70539. // 2. do not allow drop
  70540. if (allowDrop({
  70541. dragNode: abstractDragDataNode,
  70542. dropNode: abstractDropDataNode,
  70543. dropPosition: 1
  70544. })) {
  70545. dropPosition = 1;
  70546. } else {
  70547. dropAllowed = false;
  70548. }
  70549. } else {
  70550. // | Node | <- abstractDropNode
  70551. // | ---==^== | <- mousePosition
  70552. // whether it has children or doesn't has children
  70553. // always
  70554. // 1. try drop inside
  70555. // 2. try drop after
  70556. // 3. do not allow drop
  70557. if (allowDrop({
  70558. dragNode: abstractDragDataNode,
  70559. dropNode: abstractDropDataNode,
  70560. dropPosition: 0
  70561. })) {
  70562. dropPosition = 0;
  70563. } else if (allowDrop({
  70564. dragNode: abstractDragDataNode,
  70565. dropNode: abstractDropDataNode,
  70566. dropPosition: 1
  70567. })) {
  70568. dropPosition = 1;
  70569. } else {
  70570. dropAllowed = false;
  70571. }
  70572. }
  70573. } else {
  70574. // | Node1 | <- abstractDropNode
  70575. // | Node2 |
  70576. // --^--|----=====| <- mousePosition
  70577. // 1. try insert after Node1
  70578. // 2. do not allow drop
  70579. if (allowDrop({
  70580. dragNode: abstractDragDataNode,
  70581. dropNode: abstractDropDataNode,
  70582. dropPosition: 1
  70583. })) {
  70584. dropPosition = 1;
  70585. } else {
  70586. dropAllowed = false;
  70587. }
  70588. }
  70589. return {
  70590. dropPosition: dropPosition,
  70591. dropLevelOffset: dropLevelOffset,
  70592. dropTargetKey: abstractDropNodeEntity.key,
  70593. dropTargetPos: abstractDropNodeEntity.pos,
  70594. dragOverNodeKey: dragOverNodeKey,
  70595. dropContainerKey: dropPosition === 0 ? null : ((_abstractDropNodeEnti = abstractDropNodeEntity.parent) === null || _abstractDropNodeEnti === void 0 ? void 0 : _abstractDropNodeEnti.key) || null,
  70596. dropAllowed: dropAllowed
  70597. };
  70598. }
  70599. /**
  70600. * Return selectedKeys according with multiple prop
  70601. * @param selectedKeys
  70602. * @param props
  70603. * @returns [string]
  70604. */
  70605. function calcSelectedKeys(selectedKeys, props) {
  70606. if (!selectedKeys) return undefined;
  70607. var multiple = props.multiple;
  70608. if (multiple) {
  70609. return selectedKeys.slice();
  70610. }
  70611. if (selectedKeys.length) {
  70612. return [selectedKeys[0]];
  70613. }
  70614. return selectedKeys;
  70615. }
  70616. var internalProcessProps = function internalProcessProps(props) {
  70617. return props;
  70618. };
  70619. function convertDataToTree(treeData, processor) {
  70620. if (!treeData) return [];
  70621. var _ref2 = processor || {},
  70622. _ref2$processProps = _ref2.processProps,
  70623. processProps = _ref2$processProps === void 0 ? internalProcessProps : _ref2$processProps;
  70624. var list = Array.isArray(treeData) ? treeData : [treeData];
  70625. return list.map(function (_ref3) {
  70626. var children = _ref3.children,
  70627. props = (0,objectWithoutProperties["default"])(_ref3, util_excluded);
  70628. var childrenNodes = convertDataToTree(children, processor);
  70629. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_TreeNode, (0,esm_extends["default"])({
  70630. key: props.key
  70631. }, processProps(props)), childrenNodes);
  70632. });
  70633. }
  70634. /**
  70635. * Parse `checkedKeys` to { checkedKeys, halfCheckedKeys } style
  70636. */
  70637. function parseCheckedKeys(keys) {
  70638. if (!keys) {
  70639. return null;
  70640. }
  70641. // Convert keys to object format
  70642. var keyProps;
  70643. if (Array.isArray(keys)) {
  70644. // [Legacy] Follow the api doc
  70645. keyProps = {
  70646. checkedKeys: keys,
  70647. halfCheckedKeys: undefined
  70648. };
  70649. } else if ((0,esm_typeof["default"])(keys) === 'object') {
  70650. keyProps = {
  70651. checkedKeys: keys.checked || undefined,
  70652. halfCheckedKeys: keys.halfChecked || undefined
  70653. };
  70654. } else {
  70655. (0,warning["default"])(false, '`checkedKeys` is not an array or an object');
  70656. return null;
  70657. }
  70658. return keyProps;
  70659. }
  70660. /**
  70661. * If user use `autoExpandParent` we should get the list of parent node
  70662. * @param keyList
  70663. * @param keyEntities
  70664. */
  70665. function conductExpandParent(keyList, keyEntities) {
  70666. var expandedKeys = new Set();
  70667. function conductUp(key) {
  70668. if (expandedKeys.has(key)) return;
  70669. var entity = getEntity(keyEntities, key);
  70670. if (!entity) return;
  70671. expandedKeys.add(key);
  70672. var parent = entity.parent,
  70673. node = entity.node;
  70674. if (node.disabled) return;
  70675. if (parent) {
  70676. conductUp(parent.key);
  70677. }
  70678. }
  70679. (keyList || []).forEach(function (key) {
  70680. conductUp(key);
  70681. });
  70682. return (0,toConsumableArray["default"])(expandedKeys);
  70683. }
  70684. ;// ./components/_util/hooks/useMultipleSelect.ts
  70685. /**
  70686. * @title multipleSelect hooks
  70687. * @description multipleSelect by hold down shift key
  70688. */
  70689. function useMultipleSelect(getKey) {
  70690. const [prevSelectedIndex, setPrevSelectedIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
  70691. const multipleSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((currentSelectedIndex, data, selectedKeys) => {
  70692. const configPrevSelectedIndex = prevSelectedIndex !== null && prevSelectedIndex !== void 0 ? prevSelectedIndex : currentSelectedIndex;
  70693. // add/delete the selected range
  70694. const startIndex = Math.min(configPrevSelectedIndex || 0, currentSelectedIndex);
  70695. const endIndex = Math.max(configPrevSelectedIndex || 0, currentSelectedIndex);
  70696. const rangeKeys = data.slice(startIndex, endIndex + 1).map(item => getKey(item));
  70697. const shouldSelected = rangeKeys.some(rangeKey => !selectedKeys.has(rangeKey));
  70698. const changedKeys = [];
  70699. rangeKeys.forEach(item => {
  70700. if (shouldSelected) {
  70701. if (!selectedKeys.has(item)) {
  70702. changedKeys.push(item);
  70703. }
  70704. selectedKeys.add(item);
  70705. } else {
  70706. selectedKeys.delete(item);
  70707. changedKeys.push(item);
  70708. }
  70709. });
  70710. setPrevSelectedIndex(shouldSelected ? endIndex : null);
  70711. return changedKeys;
  70712. }, [prevSelectedIndex]);
  70713. const updatePrevSelectedIndex = val => {
  70714. setPrevSelectedIndex(val);
  70715. };
  70716. return [multipleSelect, updatePrevSelectedIndex];
  70717. }
  70718. ;// ./components/table/hooks/useSelection.tsx
  70719. // TODO: warning if use ajax!!!
  70720. const SELECTION_COLUMN = {};
  70721. const SELECTION_ALL = 'SELECT_ALL';
  70722. const SELECTION_INVERT = 'SELECT_INVERT';
  70723. const SELECTION_NONE = 'SELECT_NONE';
  70724. const useSelection_EMPTY_LIST = [];
  70725. const flattenData = (childrenColumnName, data, list = []) => {
  70726. (data || []).forEach(record => {
  70727. list.push(record);
  70728. if (record && typeof record === 'object' && childrenColumnName in record) {
  70729. flattenData(childrenColumnName, record[childrenColumnName], list);
  70730. }
  70731. });
  70732. return list;
  70733. };
  70734. const useSelection = (config, rowSelection) => {
  70735. const {
  70736. preserveSelectedRowKeys,
  70737. selectedRowKeys,
  70738. defaultSelectedRowKeys,
  70739. getCheckboxProps,
  70740. getTitleCheckboxProps,
  70741. onChange: onSelectionChange,
  70742. onSelect,
  70743. onSelectAll,
  70744. onSelectInvert,
  70745. onSelectNone,
  70746. onSelectMultiple,
  70747. columnWidth: selectionColWidth,
  70748. type: selectionType,
  70749. selections,
  70750. fixed,
  70751. renderCell: customizeRenderCell,
  70752. hideSelectAll,
  70753. checkStrictly = true
  70754. } = rowSelection || {};
  70755. const {
  70756. prefixCls,
  70757. data,
  70758. pageData,
  70759. getRecordByKey,
  70760. getRowKey,
  70761. expandType,
  70762. childrenColumnName,
  70763. locale: tableLocale,
  70764. getPopupContainer
  70765. } = config;
  70766. const warning = (0,_util_warning.devUseWarning)('Table');
  70767. // ========================= MultipleSelect =========================
  70768. const [multipleSelect, updatePrevSelectedIndex] = useMultipleSelect(item => item);
  70769. // ========================= Keys =========================
  70770. const [mergedSelectedKeys, setMergedSelectedKeys] = (0,useMergedState["default"])(selectedRowKeys || defaultSelectedRowKeys || useSelection_EMPTY_LIST, {
  70771. value: selectedRowKeys
  70772. });
  70773. // ======================== Caches ========================
  70774. const preserveRecordsRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(new Map());
  70775. const updatePreserveRecordsCache = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(keys => {
  70776. if (preserveSelectedRowKeys) {
  70777. const newCache = new Map();
  70778. // Keep key if mark as preserveSelectedRowKeys
  70779. keys.forEach(key => {
  70780. let record = getRecordByKey(key);
  70781. if (!record && preserveRecordsRef.current.has(key)) {
  70782. record = preserveRecordsRef.current.get(key);
  70783. }
  70784. newCache.set(key, record);
  70785. });
  70786. // Refresh to new cache
  70787. preserveRecordsRef.current = newCache;
  70788. }
  70789. }, [getRecordByKey, preserveSelectedRowKeys]);
  70790. // Update cache with selectedKeys
  70791. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  70792. updatePreserveRecordsCache(mergedSelectedKeys);
  70793. }, [mergedSelectedKeys]);
  70794. // Get flatten data
  70795. const flattedData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => flattenData(childrenColumnName, pageData), [childrenColumnName, pageData]);
  70796. const {
  70797. keyEntities
  70798. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  70799. if (checkStrictly) {
  70800. return {
  70801. keyEntities: null
  70802. };
  70803. }
  70804. let convertData = data;
  70805. if (preserveSelectedRowKeys) {
  70806. // use flattedData keys
  70807. const keysSet = new Set(flattedData.map((record, index) => getRowKey(record, index)));
  70808. // remove preserveRecords that duplicate data
  70809. const preserveRecords = Array.from(preserveRecordsRef.current).reduce((total, [key, value]) => keysSet.has(key) ? total : total.concat(value), []);
  70810. convertData = [].concat((0,toConsumableArray["default"])(convertData), (0,toConsumableArray["default"])(preserveRecords));
  70811. }
  70812. return convertDataToEntities(convertData, {
  70813. externalGetKey: getRowKey,
  70814. childrenPropName: childrenColumnName
  70815. });
  70816. }, [data, getRowKey, checkStrictly, childrenColumnName, preserveSelectedRowKeys, flattedData]);
  70817. // Get all checkbox props
  70818. const checkboxPropsMap = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  70819. const map = new Map();
  70820. flattedData.forEach((record, index) => {
  70821. const key = getRowKey(record, index);
  70822. const checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {};
  70823. map.set(key, checkboxProps);
  70824. true ? warning(!('checked' in checkboxProps || 'defaultChecked' in checkboxProps), 'usage', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.') : 0;
  70825. });
  70826. return map;
  70827. }, [flattedData, getRowKey, getCheckboxProps]);
  70828. const isCheckboxDisabled = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(r => {
  70829. const rowKey = getRowKey(r);
  70830. let checkboxProps;
  70831. if (checkboxPropsMap.has(rowKey)) {
  70832. checkboxProps = checkboxPropsMap.get(getRowKey(r));
  70833. } else {
  70834. checkboxProps = getCheckboxProps ? getCheckboxProps(r) : undefined;
  70835. }
  70836. return !!(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.disabled);
  70837. }, [checkboxPropsMap, getRowKey]);
  70838. const [derivedSelectedKeys, derivedHalfSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  70839. if (checkStrictly) {
  70840. return [mergedSelectedKeys || [], []];
  70841. }
  70842. const {
  70843. checkedKeys,
  70844. halfCheckedKeys
  70845. } = conductCheck(mergedSelectedKeys, true, keyEntities, isCheckboxDisabled);
  70846. return [checkedKeys || [], halfCheckedKeys];
  70847. }, [mergedSelectedKeys, checkStrictly, keyEntities, isCheckboxDisabled]);
  70848. const derivedSelectedKeySet = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  70849. const keys = selectionType === 'radio' ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys;
  70850. return new Set(keys);
  70851. }, [derivedSelectedKeys, selectionType]);
  70852. const derivedHalfSelectedKeySet = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => selectionType === 'radio' ? new Set() : new Set(derivedHalfSelectedKeys), [derivedHalfSelectedKeys, selectionType]);
  70853. // Reset if rowSelection reset
  70854. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  70855. if (!rowSelection) {
  70856. setMergedSelectedKeys(useSelection_EMPTY_LIST);
  70857. }
  70858. }, [!!rowSelection]);
  70859. const setSelectedKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((keys, method) => {
  70860. let availableKeys;
  70861. let records;
  70862. updatePreserveRecordsCache(keys);
  70863. if (preserveSelectedRowKeys) {
  70864. availableKeys = keys;
  70865. records = keys.map(key => preserveRecordsRef.current.get(key));
  70866. } else {
  70867. // Filter key which not exist in the `dataSource`
  70868. availableKeys = [];
  70869. records = [];
  70870. keys.forEach(key => {
  70871. const record = getRecordByKey(key);
  70872. if (record !== undefined) {
  70873. availableKeys.push(key);
  70874. records.push(record);
  70875. }
  70876. });
  70877. }
  70878. setMergedSelectedKeys(availableKeys);
  70879. onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(availableKeys, records, {
  70880. type: method
  70881. });
  70882. }, [setMergedSelectedKeys, getRecordByKey, onSelectionChange, preserveSelectedRowKeys]);
  70883. // ====================== Selections ======================
  70884. // Trigger single `onSelect` event
  70885. const triggerSingleSelection = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((key, selected, keys, event) => {
  70886. if (onSelect) {
  70887. const rows = keys.map(k => getRecordByKey(k));
  70888. onSelect(getRecordByKey(key), selected, rows, event);
  70889. }
  70890. setSelectedKeys(keys, 'single');
  70891. }, [onSelect, getRecordByKey, setSelectedKeys]);
  70892. const mergedSelections = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  70893. if (!selections || hideSelectAll) {
  70894. return null;
  70895. }
  70896. const selectionList = selections === true ? [SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE] : selections;
  70897. return selectionList.map(selection => {
  70898. if (selection === SELECTION_ALL) {
  70899. return {
  70900. key: 'all',
  70901. text: tableLocale.selectionAll,
  70902. onSelect() {
  70903. setSelectedKeys(data.map((record, index) => getRowKey(record, index)).filter(key => {
  70904. const checkProps = checkboxPropsMap.get(key);
  70905. return !(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled) || derivedSelectedKeySet.has(key);
  70906. }), 'all');
  70907. }
  70908. };
  70909. }
  70910. if (selection === SELECTION_INVERT) {
  70911. return {
  70912. key: 'invert',
  70913. text: tableLocale.selectInvert,
  70914. onSelect() {
  70915. const keySet = new Set(derivedSelectedKeySet);
  70916. pageData.forEach((record, index) => {
  70917. const key = getRowKey(record, index);
  70918. const checkProps = checkboxPropsMap.get(key);
  70919. if (!(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled)) {
  70920. if (keySet.has(key)) {
  70921. keySet.delete(key);
  70922. } else {
  70923. keySet.add(key);
  70924. }
  70925. }
  70926. });
  70927. const keys = Array.from(keySet);
  70928. if (onSelectInvert) {
  70929. warning.deprecated(false, 'onSelectInvert', 'onChange');
  70930. onSelectInvert(keys);
  70931. }
  70932. setSelectedKeys(keys, 'invert');
  70933. }
  70934. };
  70935. }
  70936. if (selection === SELECTION_NONE) {
  70937. return {
  70938. key: 'none',
  70939. text: tableLocale.selectNone,
  70940. onSelect() {
  70941. onSelectNone === null || onSelectNone === void 0 ? void 0 : onSelectNone();
  70942. setSelectedKeys(Array.from(derivedSelectedKeySet).filter(key => {
  70943. const checkProps = checkboxPropsMap.get(key);
  70944. return checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled;
  70945. }), 'none');
  70946. }
  70947. };
  70948. }
  70949. return selection;
  70950. }).map(selection => Object.assign(Object.assign({}, selection), {
  70951. onSelect: (...rest) => {
  70952. var _a2;
  70953. var _a;
  70954. (_a = selection.onSelect) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [selection].concat(rest));
  70955. updatePrevSelectedIndex(null);
  70956. }
  70957. }));
  70958. }, [selections, derivedSelectedKeySet, pageData, getRowKey, onSelectInvert, setSelectedKeys]);
  70959. // ======================= Columns ========================
  70960. const transformColumns = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(columns => {
  70961. var _a;
  70962. // >>>>>>>>>>> Skip if not exists `rowSelection`
  70963. if (!rowSelection) {
  70964. true ? warning(!columns.includes(SELECTION_COLUMN), 'usage', '`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`.') : 0;
  70965. return columns.filter(col => col !== SELECTION_COLUMN);
  70966. }
  70967. // >>>>>>>>>>> Support selection
  70968. let cloneColumns = (0,toConsumableArray["default"])(columns);
  70969. const keySet = new Set(derivedSelectedKeySet);
  70970. // Record key only need check with enabled
  70971. const recordKeys = flattedData.map(getRowKey).filter(key => !checkboxPropsMap.get(key).disabled);
  70972. const checkedCurrentAll = recordKeys.every(key => keySet.has(key));
  70973. const checkedCurrentSome = recordKeys.some(key => keySet.has(key));
  70974. const onSelectAllChange = () => {
  70975. const changeKeys = [];
  70976. if (checkedCurrentAll) {
  70977. recordKeys.forEach(key => {
  70978. keySet.delete(key);
  70979. changeKeys.push(key);
  70980. });
  70981. } else {
  70982. recordKeys.forEach(key => {
  70983. if (!keySet.has(key)) {
  70984. keySet.add(key);
  70985. changeKeys.push(key);
  70986. }
  70987. });
  70988. }
  70989. const keys = Array.from(keySet);
  70990. onSelectAll === null || onSelectAll === void 0 ? void 0 : onSelectAll(!checkedCurrentAll, keys.map(k => getRecordByKey(k)), changeKeys.map(k => getRecordByKey(k)));
  70991. setSelectedKeys(keys, 'all');
  70992. updatePrevSelectedIndex(null);
  70993. };
  70994. // ===================== Render =====================
  70995. // Title Cell
  70996. let title;
  70997. let columnTitleCheckbox;
  70998. if (selectionType !== 'radio') {
  70999. let customizeSelections;
  71000. if (mergedSelections) {
  71001. const menu = {
  71002. getPopupContainer,
  71003. items: mergedSelections.map((selection, index) => {
  71004. const {
  71005. key,
  71006. text,
  71007. onSelect: onSelectionClick
  71008. } = selection;
  71009. return {
  71010. key: key !== null && key !== void 0 ? key : index,
  71011. onClick: () => {
  71012. onSelectionClick === null || onSelectionClick === void 0 ? void 0 : onSelectionClick(recordKeys);
  71013. },
  71014. label: text
  71015. };
  71016. })
  71017. };
  71018. customizeSelections = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  71019. className: `${prefixCls}-selection-extra`
  71020. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_dropdown, {
  71021. menu: menu,
  71022. getPopupContainer: getPopupContainer
  71023. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownOutlined, null))));
  71024. }
  71025. const allDisabledData = flattedData.map((record, index) => {
  71026. const key = getRowKey(record, index);
  71027. const checkboxProps = checkboxPropsMap.get(key) || {};
  71028. return Object.assign({
  71029. checked: keySet.has(key)
  71030. }, checkboxProps);
  71031. }).filter(({
  71032. disabled
  71033. }) => disabled);
  71034. const allDisabled = !!allDisabledData.length && allDisabledData.length === flattedData.length;
  71035. const allDisabledAndChecked = allDisabled && allDisabledData.every(({
  71036. checked
  71037. }) => checked);
  71038. const allDisabledSomeChecked = allDisabled && allDisabledData.some(({
  71039. checked
  71040. }) => checked);
  71041. const customCheckboxProps = (getTitleCheckboxProps === null || getTitleCheckboxProps === void 0 ? void 0 : getTitleCheckboxProps()) || {};
  71042. const {
  71043. onChange,
  71044. disabled
  71045. } = customCheckboxProps;
  71046. columnTitleCheckbox = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, Object.assign({
  71047. "aria-label": customizeSelections ? 'Custom selection' : 'Select all'
  71048. }, customCheckboxProps, {
  71049. checked: !allDisabled ? !!flattedData.length && checkedCurrentAll : allDisabledAndChecked,
  71050. indeterminate: !allDisabled ? !checkedCurrentAll && checkedCurrentSome : !allDisabledAndChecked && allDisabledSomeChecked,
  71051. onChange: e => {
  71052. onSelectAllChange();
  71053. onChange === null || onChange === void 0 ? void 0 : onChange(e);
  71054. },
  71055. disabled: disabled !== null && disabled !== void 0 ? disabled : flattedData.length === 0 || allDisabled,
  71056. skipGroup: true
  71057. }));
  71058. title = !hideSelectAll && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  71059. className: `${prefixCls}-selection`
  71060. }, columnTitleCheckbox, customizeSelections));
  71061. }
  71062. // Body Cell
  71063. let renderCell;
  71064. if (selectionType === 'radio') {
  71065. renderCell = (_, record, index) => {
  71066. const key = getRowKey(record, index);
  71067. const checked = keySet.has(key);
  71068. const checkboxProps = checkboxPropsMap.get(key);
  71069. return {
  71070. node: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_radio, Object.assign({}, checkboxProps, {
  71071. checked: checked,
  71072. onClick: e => {
  71073. var _a;
  71074. e.stopPropagation();
  71075. (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
  71076. },
  71077. onChange: event => {
  71078. var _a;
  71079. if (!keySet.has(key)) {
  71080. triggerSingleSelection(key, true, [key], event.nativeEvent);
  71081. }
  71082. (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, event);
  71083. }
  71084. }))),
  71085. checked
  71086. };
  71087. };
  71088. } else {
  71089. renderCell = (_, record, index) => {
  71090. var _a;
  71091. const key = getRowKey(record, index);
  71092. const checked = keySet.has(key);
  71093. const indeterminate = derivedHalfSelectedKeySet.has(key);
  71094. const checkboxProps = checkboxPropsMap.get(key);
  71095. let mergedIndeterminate;
  71096. if (expandType === 'nest') {
  71097. mergedIndeterminate = indeterminate;
  71098. true ? warning(typeof (checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== 'boolean', 'usage', 'set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.') : 0;
  71099. } else {
  71100. mergedIndeterminate = (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== null && _a !== void 0 ? _a : indeterminate;
  71101. }
  71102. // Record checked
  71103. return {
  71104. node: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, Object.assign({}, checkboxProps, {
  71105. indeterminate: mergedIndeterminate,
  71106. checked: checked,
  71107. skipGroup: true,
  71108. onClick: e => {
  71109. var _a;
  71110. e.stopPropagation();
  71111. (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
  71112. },
  71113. onChange: event => {
  71114. var _a;
  71115. const {
  71116. nativeEvent
  71117. } = event;
  71118. const {
  71119. shiftKey
  71120. } = nativeEvent;
  71121. const currentSelectedIndex = recordKeys.findIndex(item => item === key);
  71122. const isMultiple = derivedSelectedKeys.some(item => recordKeys.includes(item));
  71123. if (shiftKey && checkStrictly && isMultiple) {
  71124. const changedKeys = multipleSelect(currentSelectedIndex, recordKeys, keySet);
  71125. const keys = Array.from(keySet);
  71126. onSelectMultiple === null || onSelectMultiple === void 0 ? void 0 : onSelectMultiple(!checked, keys.map(recordKey => getRecordByKey(recordKey)), changedKeys.map(recordKey => getRecordByKey(recordKey)));
  71127. setSelectedKeys(keys, 'multiple');
  71128. } else {
  71129. // Single record selected
  71130. const originCheckedKeys = derivedSelectedKeys;
  71131. if (checkStrictly) {
  71132. const checkedKeys = checked ? arrDel(originCheckedKeys, key) : arrAdd(originCheckedKeys, key);
  71133. triggerSingleSelection(key, !checked, checkedKeys, nativeEvent);
  71134. } else {
  71135. // Always fill first
  71136. const result = conductCheck([].concat((0,toConsumableArray["default"])(originCheckedKeys), [key]), true, keyEntities, isCheckboxDisabled);
  71137. const {
  71138. checkedKeys,
  71139. halfCheckedKeys
  71140. } = result;
  71141. let nextCheckedKeys = checkedKeys;
  71142. // If remove, we do it again to correction
  71143. if (checked) {
  71144. const tempKeySet = new Set(checkedKeys);
  71145. tempKeySet.delete(key);
  71146. nextCheckedKeys = conductCheck(Array.from(tempKeySet), {
  71147. checked: false,
  71148. halfCheckedKeys
  71149. }, keyEntities, isCheckboxDisabled).checkedKeys;
  71150. }
  71151. triggerSingleSelection(key, !checked, nextCheckedKeys, nativeEvent);
  71152. }
  71153. }
  71154. if (checked) {
  71155. updatePrevSelectedIndex(null);
  71156. } else {
  71157. updatePrevSelectedIndex(currentSelectedIndex);
  71158. }
  71159. (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onChange) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, event);
  71160. }
  71161. }))),
  71162. checked
  71163. };
  71164. };
  71165. }
  71166. const renderSelectionCell = (_, record, index) => {
  71167. const {
  71168. node,
  71169. checked
  71170. } = renderCell(_, record, index);
  71171. if (customizeRenderCell) {
  71172. return customizeRenderCell(checked, record, index, node);
  71173. }
  71174. return node;
  71175. };
  71176. // Insert selection column if not exist
  71177. if (!cloneColumns.includes(SELECTION_COLUMN)) {
  71178. // Always after expand icon
  71179. if (cloneColumns.findIndex(col => {
  71180. var _a;
  71181. return ((_a = col[INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN';
  71182. }) === 0) {
  71183. const [expandColumn, ...restColumns] = cloneColumns;
  71184. cloneColumns = [expandColumn, SELECTION_COLUMN].concat((0,toConsumableArray["default"])(restColumns));
  71185. } else {
  71186. // Normal insert at first column
  71187. cloneColumns = [SELECTION_COLUMN].concat((0,toConsumableArray["default"])(cloneColumns));
  71188. }
  71189. }
  71190. // Deduplicate selection column
  71191. const selectionColumnIndex = cloneColumns.indexOf(SELECTION_COLUMN);
  71192. true ? warning(cloneColumns.filter(col => col === SELECTION_COLUMN).length <= 1, 'usage', 'Multiple `SELECTION_COLUMN` exist in `columns`.') : 0;
  71193. cloneColumns = cloneColumns.filter((column, index) => column !== SELECTION_COLUMN || index === selectionColumnIndex);
  71194. // Fixed column logic
  71195. const prevCol = cloneColumns[selectionColumnIndex - 1];
  71196. const nextCol = cloneColumns[selectionColumnIndex + 1];
  71197. let mergedFixed = fixed;
  71198. if (mergedFixed === undefined) {
  71199. if ((nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed) !== undefined) {
  71200. mergedFixed = nextCol.fixed;
  71201. } else if ((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) !== undefined) {
  71202. mergedFixed = prevCol.fixed;
  71203. }
  71204. }
  71205. if (mergedFixed && prevCol && ((_a = prevCol[INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN' && prevCol.fixed === undefined) {
  71206. prevCol.fixed = mergedFixed;
  71207. }
  71208. const columnCls = classnames_default()(`${prefixCls}-selection-col`, {
  71209. [`${prefixCls}-selection-col-with-dropdown`]: selections && selectionType === 'checkbox'
  71210. });
  71211. const renderColumnTitle = () => {
  71212. if (!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.columnTitle)) {
  71213. return title;
  71214. }
  71215. if (typeof rowSelection.columnTitle === 'function') {
  71216. return rowSelection.columnTitle(columnTitleCheckbox);
  71217. }
  71218. return rowSelection.columnTitle;
  71219. };
  71220. // Replace with real selection column
  71221. const selectionColumn = {
  71222. fixed: mergedFixed,
  71223. width: selectionColWidth,
  71224. className: `${prefixCls}-selection-column`,
  71225. title: renderColumnTitle(),
  71226. render: renderSelectionCell,
  71227. onCell: rowSelection.onCell,
  71228. align: rowSelection.align,
  71229. [INTERNAL_COL_DEFINE]: {
  71230. className: columnCls
  71231. }
  71232. };
  71233. return cloneColumns.map(col => col === SELECTION_COLUMN ? selectionColumn : col);
  71234. }, [getRowKey, flattedData, rowSelection, derivedSelectedKeys, derivedSelectedKeySet, derivedHalfSelectedKeySet, selectionColWidth, mergedSelections, expandType, checkboxPropsMap, onSelectMultiple, triggerSingleSelection, isCheckboxDisabled]);
  71235. return [transformColumns, derivedSelectedKeySet];
  71236. };
  71237. /* harmony default export */ var hooks_useSelection = (useSelection);
  71238. ;// ./components/_util/hooks/useProxyImperativeHandle.ts
  71239. // Proxy the dom ref with `{ nativeElement, otherFn }` type
  71240. // ref: https://github.com/ant-design/ant-design/discussions/45242
  71241. function fillProxy(element, handler) {
  71242. element._antProxy = element._antProxy || {};
  71243. Object.keys(handler).forEach(key => {
  71244. if (!(key in element._antProxy)) {
  71245. const ori = element[key];
  71246. element._antProxy[key] = ori;
  71247. element[key] = handler[key];
  71248. }
  71249. });
  71250. return element;
  71251. }
  71252. function useProxyImperativeHandle(ref, init) {
  71253. return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => {
  71254. const refObj = init();
  71255. const {
  71256. nativeElement
  71257. } = refObj;
  71258. if (typeof Proxy !== 'undefined') {
  71259. return new Proxy(nativeElement, {
  71260. get(obj, prop) {
  71261. if (refObj[prop]) {
  71262. return refObj[prop];
  71263. }
  71264. return Reflect.get(obj, prop);
  71265. }
  71266. });
  71267. }
  71268. // Fallback of IE
  71269. return fillProxy(nativeElement, refObj);
  71270. });
  71271. }
  71272. ;// ./components/table/ExpandIcon.tsx
  71273. function ExpandIcon_renderExpandIcon(locale) {
  71274. return props => {
  71275. const {
  71276. prefixCls,
  71277. onExpand,
  71278. record,
  71279. expanded,
  71280. expandable
  71281. } = props;
  71282. const iconPrefix = `${prefixCls}-row-expand-icon`;
  71283. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  71284. type: "button",
  71285. onClick: e => {
  71286. onExpand(record, e);
  71287. e.stopPropagation();
  71288. },
  71289. className: classnames_default()(iconPrefix, {
  71290. [`${iconPrefix}-spaced`]: !expandable,
  71291. [`${iconPrefix}-expanded`]: expandable && expanded,
  71292. [`${iconPrefix}-collapsed`]: expandable && !expanded
  71293. }),
  71294. "aria-label": expanded ? locale.collapse : locale.expand,
  71295. "aria-expanded": expanded
  71296. });
  71297. };
  71298. }
  71299. /* harmony default export */ var ExpandIcon = (ExpandIcon_renderExpandIcon);
  71300. ;// ./components/table/hooks/useContainerWidth.ts
  71301. function useContainerWidth(prefixCls) {
  71302. const getContainerWidth = (ele, width) => {
  71303. const container = ele.querySelector(`.${prefixCls}-container`);
  71304. let returnWidth = width;
  71305. if (container) {
  71306. const style = getComputedStyle(container);
  71307. const borderLeft = parseInt(style.borderLeftWidth, 10);
  71308. const borderRight = parseInt(style.borderRightWidth, 10);
  71309. returnWidth = width - borderLeft - borderRight;
  71310. }
  71311. return returnWidth;
  71312. };
  71313. return getContainerWidth;
  71314. }
  71315. ;// ./components/table/util.ts
  71316. const getColumnKey = (column, defaultKey) => {
  71317. if ('key' in column && column.key !== undefined && column.key !== null) {
  71318. return column.key;
  71319. }
  71320. if (column.dataIndex) {
  71321. return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex;
  71322. }
  71323. return defaultKey;
  71324. };
  71325. function getColumnPos(index, pos) {
  71326. return pos ? `${pos}-${index}` : `${index}`;
  71327. }
  71328. const renderColumnTitle = (title, props) => {
  71329. if (typeof title === 'function') {
  71330. return title(props);
  71331. }
  71332. return title;
  71333. };
  71334. /**
  71335. * Safe get column title
  71336. *
  71337. * Should filter [object Object]
  71338. *
  71339. * @param title
  71340. */
  71341. const safeColumnTitle = (title, props) => {
  71342. const res = renderColumnTitle(title, props);
  71343. if (Object.prototype.toString.call(res) === '[object Object]') {
  71344. return '';
  71345. }
  71346. return res;
  71347. };
  71348. ;// ./node_modules/@ant-design/icons-svg/es/asn/FilterFilled.js
  71349. // This icon file is generated automatically.
  71350. var FilterFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" } }] }, "name": "filter", "theme": "filled" };
  71351. /* harmony default export */ var asn_FilterFilled = (FilterFilled);
  71352. ;// ./node_modules/@ant-design/icons/es/icons/FilterFilled.js
  71353. // GENERATE BY ./scripts/generate.ts
  71354. // DON NOT EDIT IT MANUALLY
  71355. var FilterFilled_FilterFilled = function FilterFilled(props, ref) {
  71356. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  71357. ref: ref,
  71358. icon: asn_FilterFilled
  71359. }));
  71360. };
  71361. /**![filter](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTM0OSA4MzhjMCAxNy43IDE0LjIgMzIgMzEuOCAzMmgyNjIuNGMxNy42IDAgMzEuOC0xNC4zIDMxLjgtMzJWNjQySDM0OXYxOTZ6bTUzMS4xLTY4NEgxNDMuOWMtMjQuNSAwLTM5LjggMjYuNy0yNy41IDQ4bDIyMS4zIDM3NmgzNDguOGwyMjEuMy0zNzZjMTIuMS0yMS4zLTMuMi00OC0yNy43LTQ4eiIgLz48L3N2Zz4=) */
  71362. var FilterFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FilterFilled_FilterFilled);
  71363. if (true) {
  71364. FilterFilled_RefIcon.displayName = 'FilterFilled';
  71365. }
  71366. /* harmony default export */ var icons_FilterFilled = (FilterFilled_RefIcon);
  71367. ;// ./components/_util/hooks/useSyncState.ts
  71368. function hooks_useSyncState_useSyncState(initialValue) {
  71369. const ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(initialValue);
  71370. const forceUpdate = useForceUpdate();
  71371. return [() => ref.current, newValue => {
  71372. ref.current = newValue;
  71373. // re-render
  71374. forceUpdate();
  71375. }];
  71376. }
  71377. ;// ./node_modules/rc-tree/es/DropIndicator.js
  71378. var DropIndicator = function DropIndicator(props) {
  71379. var dropPosition = props.dropPosition,
  71380. dropLevelOffset = props.dropLevelOffset,
  71381. indent = props.indent;
  71382. var style = {
  71383. pointerEvents: 'none',
  71384. position: 'absolute',
  71385. right: 0,
  71386. backgroundColor: 'red',
  71387. height: 2
  71388. };
  71389. switch (dropPosition) {
  71390. case -1:
  71391. style.top = 0;
  71392. style.left = -dropLevelOffset * indent;
  71393. break;
  71394. case 1:
  71395. style.bottom = 0;
  71396. style.left = -dropLevelOffset * indent;
  71397. break;
  71398. case 0:
  71399. style.bottom = 0;
  71400. style.left = indent;
  71401. break;
  71402. }
  71403. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  71404. style: style
  71405. });
  71406. };
  71407. if (true) {
  71408. DropIndicator.displayName = 'DropIndicator';
  71409. }
  71410. /* harmony default export */ var es_DropIndicator = (DropIndicator);
  71411. ;// ./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
  71412. function _objectDestructuringEmpty(t) {
  71413. if (null == t) throw new TypeError("Cannot destructure " + t);
  71414. }
  71415. ;// ./node_modules/rc-tree/es/useUnmount.js
  71416. /**
  71417. * Trigger only when component unmount
  71418. */
  71419. function useUnmount(triggerStart, triggerEnd) {
  71420. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
  71421. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  71422. firstMount = _React$useState2[0],
  71423. setFirstMount = _React$useState2[1];
  71424. (0,useLayoutEffect["default"])(function () {
  71425. if (firstMount) {
  71426. triggerStart();
  71427. return function () {
  71428. triggerEnd();
  71429. };
  71430. }
  71431. }, [firstMount]);
  71432. (0,useLayoutEffect["default"])(function () {
  71433. setFirstMount(true);
  71434. return function () {
  71435. setFirstMount(false);
  71436. };
  71437. }, []);
  71438. }
  71439. /* harmony default export */ var es_useUnmount = (useUnmount);
  71440. ;// ./node_modules/rc-tree/es/MotionTreeNode.js
  71441. var MotionTreeNode_excluded = ["className", "style", "motion", "motionNodes", "motionType", "onMotionStart", "onMotionEnd", "active", "treeNodeRequiredProps"];
  71442. var MotionTreeNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (oriProps, ref) {
  71443. var className = oriProps.className,
  71444. style = oriProps.style,
  71445. motion = oriProps.motion,
  71446. motionNodes = oriProps.motionNodes,
  71447. motionType = oriProps.motionType,
  71448. onOriginMotionStart = oriProps.onMotionStart,
  71449. onOriginMotionEnd = oriProps.onMotionEnd,
  71450. active = oriProps.active,
  71451. treeNodeRequiredProps = oriProps.treeNodeRequiredProps,
  71452. props = (0,objectWithoutProperties["default"])(oriProps, MotionTreeNode_excluded);
  71453. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true),
  71454. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  71455. visible = _React$useState2[0],
  71456. setVisible = _React$useState2[1];
  71457. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(TreeContext),
  71458. prefixCls = _React$useContext.prefixCls;
  71459. // Calculate target visible here.
  71460. // And apply in effect to make `leave` motion work.
  71461. var targetVisible = motionNodes && motionType !== 'hide';
  71462. (0,useLayoutEffect["default"])(function () {
  71463. if (motionNodes) {
  71464. if (targetVisible !== visible) {
  71465. setVisible(targetVisible);
  71466. }
  71467. }
  71468. }, [motionNodes]);
  71469. var triggerMotionStart = function triggerMotionStart() {
  71470. if (motionNodes) {
  71471. onOriginMotionStart();
  71472. }
  71473. };
  71474. // Should only trigger once
  71475. var triggerMotionEndRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  71476. var triggerMotionEnd = function triggerMotionEnd() {
  71477. if (motionNodes && !triggerMotionEndRef.current) {
  71478. triggerMotionEndRef.current = true;
  71479. onOriginMotionEnd();
  71480. }
  71481. };
  71482. // Effect if unmount
  71483. es_useUnmount(triggerMotionStart, triggerMotionEnd);
  71484. // Motion end event
  71485. var onVisibleChanged = function onVisibleChanged(nextVisible) {
  71486. if (targetVisible === nextVisible) {
  71487. triggerMotionEnd();
  71488. }
  71489. };
  71490. if (motionNodes) {
  71491. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], (0,esm_extends["default"])({
  71492. ref: ref,
  71493. visible: visible
  71494. }, motion, {
  71495. motionAppear: motionType === 'show',
  71496. onVisibleChanged: onVisibleChanged
  71497. }), function (_ref, motionRef) {
  71498. var motionClassName = _ref.className,
  71499. motionStyle = _ref.style;
  71500. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  71501. ref: motionRef,
  71502. className: classnames_default()("".concat(prefixCls, "-treenode-motion"), motionClassName),
  71503. style: motionStyle
  71504. }, motionNodes.map(function (treeNode) {
  71505. var restProps = Object.assign({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),
  71506. title = treeNode.title,
  71507. key = treeNode.key,
  71508. isStart = treeNode.isStart,
  71509. isEnd = treeNode.isEnd;
  71510. delete restProps.children;
  71511. var treeNodeProps = getTreeNodeProps(key, treeNodeRequiredProps);
  71512. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TreeNode, (0,esm_extends["default"])({}, restProps, treeNodeProps, {
  71513. title: title,
  71514. active: active,
  71515. data: treeNode.data,
  71516. key: key,
  71517. isStart: isStart,
  71518. isEnd: isEnd
  71519. }));
  71520. }));
  71521. });
  71522. }
  71523. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TreeNode, (0,esm_extends["default"])({
  71524. domRef: ref,
  71525. className: className,
  71526. style: style
  71527. }, props, {
  71528. active: active
  71529. }));
  71530. });
  71531. if (true) {
  71532. MotionTreeNode.displayName = 'MotionTreeNode';
  71533. }
  71534. /* harmony default export */ var es_MotionTreeNode = (MotionTreeNode);
  71535. ;// ./node_modules/rc-tree/es/utils/diffUtil.js
  71536. function findExpandedKeys() {
  71537. var prev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  71538. var next = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  71539. var prevLen = prev.length;
  71540. var nextLen = next.length;
  71541. if (Math.abs(prevLen - nextLen) !== 1) {
  71542. return {
  71543. add: false,
  71544. key: null
  71545. };
  71546. }
  71547. function find(shorter, longer) {
  71548. var cache = new Map();
  71549. shorter.forEach(function (key) {
  71550. cache.set(key, true);
  71551. });
  71552. var keys = longer.filter(function (key) {
  71553. return !cache.has(key);
  71554. });
  71555. return keys.length === 1 ? keys[0] : null;
  71556. }
  71557. if (prevLen < nextLen) {
  71558. return {
  71559. add: true,
  71560. key: find(prev, next)
  71561. };
  71562. }
  71563. return {
  71564. add: false,
  71565. key: find(next, prev)
  71566. };
  71567. }
  71568. function getExpandRange(shorter, longer, key) {
  71569. var shorterStartIndex = shorter.findIndex(function (data) {
  71570. return data.key === key;
  71571. });
  71572. var shorterEndNode = shorter[shorterStartIndex + 1];
  71573. var longerStartIndex = longer.findIndex(function (data) {
  71574. return data.key === key;
  71575. });
  71576. if (shorterEndNode) {
  71577. var longerEndIndex = longer.findIndex(function (data) {
  71578. return data.key === shorterEndNode.key;
  71579. });
  71580. return longer.slice(longerStartIndex + 1, longerEndIndex);
  71581. }
  71582. return longer.slice(longerStartIndex + 1);
  71583. }
  71584. ;// ./node_modules/rc-tree/es/NodeList.js
  71585. var NodeList_excluded = ["prefixCls", "data", "selectable", "checkable", "expandedKeys", "selectedKeys", "checkedKeys", "loadedKeys", "loadingKeys", "halfCheckedKeys", "keyEntities", "disabled", "dragging", "dragOverNodeKey", "dropPosition", "motion", "height", "itemHeight", "virtual", "scrollWidth", "focusable", "activeItem", "focused", "tabIndex", "onKeyDown", "onFocus", "onBlur", "onActiveChange", "onListChangeStart", "onListChangeEnd"];
  71586. /**
  71587. * Handle virtual list of the TreeNodes.
  71588. */
  71589. var NodeList_HIDDEN_STYLE = {
  71590. width: 0,
  71591. height: 0,
  71592. display: 'flex',
  71593. overflow: 'hidden',
  71594. opacity: 0,
  71595. border: 0,
  71596. padding: 0,
  71597. margin: 0
  71598. };
  71599. var NodeList_noop = function noop() {};
  71600. var MOTION_KEY = "RC_TREE_MOTION_".concat(Math.random());
  71601. var MotionNode = {
  71602. key: MOTION_KEY
  71603. };
  71604. var MotionEntity = {
  71605. key: MOTION_KEY,
  71606. level: 0,
  71607. index: 0,
  71608. pos: '0',
  71609. node: MotionNode,
  71610. nodes: [MotionNode]
  71611. };
  71612. var MotionFlattenData = {
  71613. parent: null,
  71614. children: [],
  71615. pos: MotionEntity.pos,
  71616. data: MotionNode,
  71617. title: null,
  71618. key: MOTION_KEY,
  71619. /** Hold empty list here since we do not use it */
  71620. isStart: [],
  71621. isEnd: []
  71622. };
  71623. /**
  71624. * We only need get visible content items to play the animation.
  71625. */
  71626. function getMinimumRangeTransitionRange(list, virtual, height, itemHeight) {
  71627. if (virtual === false || !height) {
  71628. return list;
  71629. }
  71630. return list.slice(0, Math.ceil(height / itemHeight) + 1);
  71631. }
  71632. function NodeList_itemKey(item) {
  71633. var key = item.key,
  71634. pos = item.pos;
  71635. return treeUtil_getKey(key, pos);
  71636. }
  71637. function getAccessibilityPath(item) {
  71638. var path = String(item.data.key);
  71639. var current = item;
  71640. while (current.parent) {
  71641. current = current.parent;
  71642. path = "".concat(current.data.key, " > ").concat(path);
  71643. }
  71644. return path;
  71645. }
  71646. var NodeList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  71647. var prefixCls = props.prefixCls,
  71648. data = props.data,
  71649. selectable = props.selectable,
  71650. checkable = props.checkable,
  71651. expandedKeys = props.expandedKeys,
  71652. selectedKeys = props.selectedKeys,
  71653. checkedKeys = props.checkedKeys,
  71654. loadedKeys = props.loadedKeys,
  71655. loadingKeys = props.loadingKeys,
  71656. halfCheckedKeys = props.halfCheckedKeys,
  71657. keyEntities = props.keyEntities,
  71658. disabled = props.disabled,
  71659. dragging = props.dragging,
  71660. dragOverNodeKey = props.dragOverNodeKey,
  71661. dropPosition = props.dropPosition,
  71662. motion = props.motion,
  71663. height = props.height,
  71664. itemHeight = props.itemHeight,
  71665. virtual = props.virtual,
  71666. scrollWidth = props.scrollWidth,
  71667. focusable = props.focusable,
  71668. activeItem = props.activeItem,
  71669. focused = props.focused,
  71670. tabIndex = props.tabIndex,
  71671. onKeyDown = props.onKeyDown,
  71672. onFocus = props.onFocus,
  71673. onBlur = props.onBlur,
  71674. onActiveChange = props.onActiveChange,
  71675. onListChangeStart = props.onListChangeStart,
  71676. onListChangeEnd = props.onListChangeEnd,
  71677. domProps = (0,objectWithoutProperties["default"])(props, NodeList_excluded);
  71678. // =============================== Ref ================================
  71679. var listRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  71680. var indentMeasurerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  71681. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  71682. return {
  71683. scrollTo: function scrollTo(scroll) {
  71684. listRef.current.scrollTo(scroll);
  71685. },
  71686. getIndentWidth: function getIndentWidth() {
  71687. return indentMeasurerRef.current.offsetWidth;
  71688. }
  71689. };
  71690. });
  71691. // ============================== Motion ==============================
  71692. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(expandedKeys),
  71693. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  71694. prevExpandedKeys = _React$useState2[0],
  71695. setPrevExpandedKeys = _React$useState2[1];
  71696. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(data),
  71697. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  71698. prevData = _React$useState4[0],
  71699. setPrevData = _React$useState4[1];
  71700. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(data),
  71701. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  71702. transitionData = _React$useState6[0],
  71703. setTransitionData = _React$useState6[1];
  71704. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]),
  71705. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  71706. transitionRange = _React$useState8[0],
  71707. setTransitionRange = _React$useState8[1];
  71708. var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  71709. _React$useState10 = (0,slicedToArray["default"])(_React$useState9, 2),
  71710. motionType = _React$useState10[0],
  71711. setMotionType = _React$useState10[1];
  71712. // When motion end but data change, this will makes data back to previous one
  71713. var dataRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(data);
  71714. dataRef.current = data;
  71715. function onMotionEnd() {
  71716. var latestData = dataRef.current;
  71717. setPrevData(latestData);
  71718. setTransitionData(latestData);
  71719. setTransitionRange([]);
  71720. setMotionType(null);
  71721. onListChangeEnd();
  71722. }
  71723. // Do animation if expanded keys changed
  71724. // layoutEffect here to avoid blink of node removing
  71725. (0,useLayoutEffect["default"])(function () {
  71726. setPrevExpandedKeys(expandedKeys);
  71727. var diffExpanded = findExpandedKeys(prevExpandedKeys, expandedKeys);
  71728. if (diffExpanded.key !== null) {
  71729. if (diffExpanded.add) {
  71730. var keyIndex = prevData.findIndex(function (_ref) {
  71731. var key = _ref.key;
  71732. return key === diffExpanded.key;
  71733. });
  71734. var rangeNodes = getMinimumRangeTransitionRange(getExpandRange(prevData, data, diffExpanded.key), virtual, height, itemHeight);
  71735. var newTransitionData = prevData.slice();
  71736. newTransitionData.splice(keyIndex + 1, 0, MotionFlattenData);
  71737. setTransitionData(newTransitionData);
  71738. setTransitionRange(rangeNodes);
  71739. setMotionType('show');
  71740. } else {
  71741. var _keyIndex = data.findIndex(function (_ref2) {
  71742. var key = _ref2.key;
  71743. return key === diffExpanded.key;
  71744. });
  71745. var _rangeNodes = getMinimumRangeTransitionRange(getExpandRange(data, prevData, diffExpanded.key), virtual, height, itemHeight);
  71746. var _newTransitionData = data.slice();
  71747. _newTransitionData.splice(_keyIndex + 1, 0, MotionFlattenData);
  71748. setTransitionData(_newTransitionData);
  71749. setTransitionRange(_rangeNodes);
  71750. setMotionType('hide');
  71751. }
  71752. } else if (prevData !== data) {
  71753. // If whole data changed, we just refresh the list
  71754. setPrevData(data);
  71755. setTransitionData(data);
  71756. }
  71757. }, [expandedKeys, data]);
  71758. // We should clean up motion if is changed by dragging
  71759. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  71760. if (!dragging) {
  71761. onMotionEnd();
  71762. }
  71763. }, [dragging]);
  71764. var mergedData = motion ? transitionData : data;
  71765. var treeNodeRequiredProps = {
  71766. expandedKeys: expandedKeys,
  71767. selectedKeys: selectedKeys,
  71768. loadedKeys: loadedKeys,
  71769. loadingKeys: loadingKeys,
  71770. checkedKeys: checkedKeys,
  71771. halfCheckedKeys: halfCheckedKeys,
  71772. dragOverNodeKey: dragOverNodeKey,
  71773. dropPosition: dropPosition,
  71774. keyEntities: keyEntities
  71775. };
  71776. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, focused && activeItem && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  71777. style: NodeList_HIDDEN_STYLE,
  71778. "aria-live": "assertive"
  71779. }, getAccessibilityPath(activeItem)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("input", {
  71780. style: NodeList_HIDDEN_STYLE,
  71781. disabled: focusable === false || disabled,
  71782. tabIndex: focusable !== false ? tabIndex : null,
  71783. onKeyDown: onKeyDown,
  71784. onFocus: onFocus,
  71785. onBlur: onBlur,
  71786. value: "",
  71787. onChange: NodeList_noop,
  71788. "aria-label": "for screen reader"
  71789. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  71790. className: "".concat(prefixCls, "-treenode"),
  71791. "aria-hidden": true,
  71792. style: {
  71793. position: 'absolute',
  71794. pointerEvents: 'none',
  71795. visibility: 'hidden',
  71796. height: 0,
  71797. overflow: 'hidden',
  71798. border: 0,
  71799. padding: 0
  71800. }
  71801. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  71802. className: "".concat(prefixCls, "-indent")
  71803. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  71804. ref: indentMeasurerRef,
  71805. className: "".concat(prefixCls, "-indent-unit")
  71806. }))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_virtual_list_es, (0,esm_extends["default"])({}, domProps, {
  71807. data: mergedData,
  71808. itemKey: NodeList_itemKey,
  71809. height: height,
  71810. fullHeight: false,
  71811. virtual: virtual,
  71812. itemHeight: itemHeight,
  71813. scrollWidth: scrollWidth,
  71814. prefixCls: "".concat(prefixCls, "-list"),
  71815. ref: listRef,
  71816. role: "tree",
  71817. onVisibleChange: function onVisibleChange(originList) {
  71818. // The best match is using `fullList` - `originList` = `restList`
  71819. // and check the `restList` to see if has the MOTION_KEY node
  71820. // but this will cause performance issue for long list compare
  71821. // we just check `originList` and repeat trigger `onMotionEnd`
  71822. if (originList.every(function (item) {
  71823. return NodeList_itemKey(item) !== MOTION_KEY;
  71824. })) {
  71825. onMotionEnd();
  71826. }
  71827. }
  71828. }), function (treeNode) {
  71829. var pos = treeNode.pos,
  71830. restProps = Object.assign({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),
  71831. title = treeNode.title,
  71832. key = treeNode.key,
  71833. isStart = treeNode.isStart,
  71834. isEnd = treeNode.isEnd;
  71835. var mergedKey = treeUtil_getKey(key, pos);
  71836. delete restProps.key;
  71837. delete restProps.children;
  71838. var treeNodeProps = getTreeNodeProps(mergedKey, treeNodeRequiredProps);
  71839. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_MotionTreeNode, (0,esm_extends["default"])({}, restProps, treeNodeProps, {
  71840. title: title,
  71841. active: !!activeItem && key === activeItem.key,
  71842. pos: pos,
  71843. data: treeNode.data,
  71844. isStart: isStart,
  71845. isEnd: isEnd,
  71846. motion: motion,
  71847. motionNodes: key === MOTION_KEY ? transitionRange : null,
  71848. motionType: motionType,
  71849. onMotionStart: onListChangeStart,
  71850. onMotionEnd: onMotionEnd,
  71851. treeNodeRequiredProps: treeNodeRequiredProps,
  71852. onMouseMove: function onMouseMove() {
  71853. onActiveChange(null);
  71854. }
  71855. }));
  71856. }));
  71857. });
  71858. if (true) {
  71859. NodeList.displayName = 'NodeList';
  71860. }
  71861. /* harmony default export */ var es_NodeList = (NodeList);
  71862. ;// ./node_modules/rc-tree/es/Tree.js
  71863. // TODO: https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/treeview/treeview-2/treeview-2a.html
  71864. // Fully accessibility support
  71865. var MAX_RETRY_TIMES = 10;
  71866. var Tree = /*#__PURE__*/function (_React$Component) {
  71867. (0,inherits["default"])(Tree, _React$Component);
  71868. var _super = (0,createSuper["default"])(Tree);
  71869. function Tree() {
  71870. var _this;
  71871. (0,classCallCheck["default"])(this, Tree);
  71872. for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
  71873. _args[_key] = arguments[_key];
  71874. }
  71875. _this = _super.call.apply(_super, [this].concat(_args));
  71876. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "destroyed", false);
  71877. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "delayedDragEnterLogic", void 0);
  71878. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "loadingRetryTimes", {});
  71879. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
  71880. keyEntities: {},
  71881. indent: null,
  71882. selectedKeys: [],
  71883. checkedKeys: [],
  71884. halfCheckedKeys: [],
  71885. loadedKeys: [],
  71886. loadingKeys: [],
  71887. expandedKeys: [],
  71888. draggingNodeKey: null,
  71889. dragChildrenKeys: [],
  71890. // dropTargetKey is the key of abstract-drop-node
  71891. // the abstract-drop-node is the real drop node when drag and drop
  71892. // not the DOM drag over node
  71893. dropTargetKey: null,
  71894. dropPosition: null,
  71895. // the drop position of abstract-drop-node, inside 0, top -1, bottom 1
  71896. dropContainerKey: null,
  71897. // the container key of abstract-drop-node if dropPosition is -1 or 1
  71898. dropLevelOffset: null,
  71899. // the drop level offset of abstract-drag-over-node
  71900. dropTargetPos: null,
  71901. // the pos of abstract-drop-node
  71902. dropAllowed: true,
  71903. // if drop to abstract-drop-node is allowed
  71904. // the abstract-drag-over-node
  71905. // if mouse is on the bottom of top dom node or no the top of the bottom dom node
  71906. // abstract-drag-over-node is the top node
  71907. dragOverNodeKey: null,
  71908. treeData: [],
  71909. flattenNodes: [],
  71910. focused: false,
  71911. activeKey: null,
  71912. listChanging: false,
  71913. prevProps: null,
  71914. fieldNames: treeUtil_fillFieldNames()
  71915. });
  71916. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "dragStartMousePosition", null);
  71917. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "dragNodeProps", null);
  71918. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "currentMouseOverDroppableNodeKey", null);
  71919. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "listRef", /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createRef());
  71920. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragStart", function (event, nodeProps) {
  71921. var _this$state = _this.state,
  71922. expandedKeys = _this$state.expandedKeys,
  71923. keyEntities = _this$state.keyEntities;
  71924. var onDragStart = _this.props.onDragStart;
  71925. var eventKey = nodeProps.eventKey;
  71926. _this.dragNodeProps = nodeProps;
  71927. _this.dragStartMousePosition = {
  71928. x: event.clientX,
  71929. y: event.clientY
  71930. };
  71931. var newExpandedKeys = arrDel(expandedKeys, eventKey);
  71932. _this.setState({
  71933. draggingNodeKey: eventKey,
  71934. dragChildrenKeys: getDragChildrenKeys(eventKey, keyEntities),
  71935. indent: _this.listRef.current.getIndentWidth()
  71936. });
  71937. _this.setExpandedKeys(newExpandedKeys);
  71938. window.addEventListener('dragend', _this.onWindowDragEnd);
  71939. onDragStart === null || onDragStart === void 0 || onDragStart({
  71940. event: event,
  71941. node: convertNodePropsToEventData(nodeProps)
  71942. });
  71943. });
  71944. /**
  71945. * [Legacy] Select handler is smaller than node,
  71946. * so that this will trigger when drag enter node or select handler.
  71947. * This is a little tricky if customize css without padding.
  71948. * Better for use mouse move event to refresh drag state.
  71949. * But let's just keep it to avoid event trigger logic change.
  71950. */
  71951. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragEnter", function (event, nodeProps) {
  71952. var _this$state2 = _this.state,
  71953. expandedKeys = _this$state2.expandedKeys,
  71954. keyEntities = _this$state2.keyEntities,
  71955. dragChildrenKeys = _this$state2.dragChildrenKeys,
  71956. flattenNodes = _this$state2.flattenNodes,
  71957. indent = _this$state2.indent;
  71958. var _this$props = _this.props,
  71959. onDragEnter = _this$props.onDragEnter,
  71960. onExpand = _this$props.onExpand,
  71961. allowDrop = _this$props.allowDrop,
  71962. direction = _this$props.direction;
  71963. var pos = nodeProps.pos,
  71964. eventKey = nodeProps.eventKey;
  71965. // record the key of node which is latest entered, used in dragleave event.
  71966. if (_this.currentMouseOverDroppableNodeKey !== eventKey) {
  71967. _this.currentMouseOverDroppableNodeKey = eventKey;
  71968. }
  71969. if (!_this.dragNodeProps) {
  71970. _this.resetDragState();
  71971. return;
  71972. }
  71973. var _calcDropPosition = calcDropPosition(event, _this.dragNodeProps, nodeProps, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),
  71974. dropPosition = _calcDropPosition.dropPosition,
  71975. dropLevelOffset = _calcDropPosition.dropLevelOffset,
  71976. dropTargetKey = _calcDropPosition.dropTargetKey,
  71977. dropContainerKey = _calcDropPosition.dropContainerKey,
  71978. dropTargetPos = _calcDropPosition.dropTargetPos,
  71979. dropAllowed = _calcDropPosition.dropAllowed,
  71980. dragOverNodeKey = _calcDropPosition.dragOverNodeKey;
  71981. if (
  71982. // don't allow drop inside its children
  71983. dragChildrenKeys.includes(dropTargetKey) ||
  71984. // don't allow drop when drop is not allowed caculated by calcDropPosition
  71985. !dropAllowed) {
  71986. _this.resetDragState();
  71987. return;
  71988. }
  71989. // Side effect for delay drag
  71990. if (!_this.delayedDragEnterLogic) {
  71991. _this.delayedDragEnterLogic = {};
  71992. }
  71993. Object.keys(_this.delayedDragEnterLogic).forEach(function (key) {
  71994. clearTimeout(_this.delayedDragEnterLogic[key]);
  71995. });
  71996. if (_this.dragNodeProps.eventKey !== nodeProps.eventKey) {
  71997. // hoist expand logic here
  71998. // since if logic is on the bottom
  71999. // it will be blocked by abstract dragover node check
  72000. // => if you dragenter from top, you mouse will still be consider as in the top node
  72001. event.persist();
  72002. _this.delayedDragEnterLogic[pos] = window.setTimeout(function () {
  72003. if (_this.state.draggingNodeKey === null) {
  72004. return;
  72005. }
  72006. var newExpandedKeys = (0,toConsumableArray["default"])(expandedKeys);
  72007. var entity = getEntity(keyEntities, nodeProps.eventKey);
  72008. if (entity && (entity.children || []).length) {
  72009. newExpandedKeys = arrAdd(expandedKeys, nodeProps.eventKey);
  72010. }
  72011. if (!_this.props.hasOwnProperty('expandedKeys')) {
  72012. _this.setExpandedKeys(newExpandedKeys);
  72013. }
  72014. onExpand === null || onExpand === void 0 || onExpand(newExpandedKeys, {
  72015. node: convertNodePropsToEventData(nodeProps),
  72016. expanded: true,
  72017. nativeEvent: event.nativeEvent
  72018. });
  72019. }, 800);
  72020. }
  72021. // Skip if drag node is self
  72022. if (_this.dragNodeProps.eventKey === dropTargetKey && dropLevelOffset === 0) {
  72023. _this.resetDragState();
  72024. return;
  72025. }
  72026. // Update drag over node and drag state
  72027. _this.setState({
  72028. dragOverNodeKey: dragOverNodeKey,
  72029. dropPosition: dropPosition,
  72030. dropLevelOffset: dropLevelOffset,
  72031. dropTargetKey: dropTargetKey,
  72032. dropContainerKey: dropContainerKey,
  72033. dropTargetPos: dropTargetPos,
  72034. dropAllowed: dropAllowed
  72035. });
  72036. onDragEnter === null || onDragEnter === void 0 || onDragEnter({
  72037. event: event,
  72038. node: convertNodePropsToEventData(nodeProps),
  72039. expandedKeys: expandedKeys
  72040. });
  72041. });
  72042. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragOver", function (event, nodeProps) {
  72043. var _this$state3 = _this.state,
  72044. dragChildrenKeys = _this$state3.dragChildrenKeys,
  72045. flattenNodes = _this$state3.flattenNodes,
  72046. keyEntities = _this$state3.keyEntities,
  72047. expandedKeys = _this$state3.expandedKeys,
  72048. indent = _this$state3.indent;
  72049. var _this$props2 = _this.props,
  72050. onDragOver = _this$props2.onDragOver,
  72051. allowDrop = _this$props2.allowDrop,
  72052. direction = _this$props2.direction;
  72053. if (!_this.dragNodeProps) {
  72054. return;
  72055. }
  72056. var _calcDropPosition2 = calcDropPosition(event, _this.dragNodeProps, nodeProps, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),
  72057. dropPosition = _calcDropPosition2.dropPosition,
  72058. dropLevelOffset = _calcDropPosition2.dropLevelOffset,
  72059. dropTargetKey = _calcDropPosition2.dropTargetKey,
  72060. dropContainerKey = _calcDropPosition2.dropContainerKey,
  72061. dropTargetPos = _calcDropPosition2.dropTargetPos,
  72062. dropAllowed = _calcDropPosition2.dropAllowed,
  72063. dragOverNodeKey = _calcDropPosition2.dragOverNodeKey;
  72064. if (dragChildrenKeys.includes(dropTargetKey) || !dropAllowed) {
  72065. // don't allow drop inside its children
  72066. // don't allow drop when drop is not allowed calculated by calcDropPosition
  72067. return;
  72068. }
  72069. // Update drag position
  72070. if (_this.dragNodeProps.eventKey === dropTargetKey && dropLevelOffset === 0) {
  72071. if (!(_this.state.dropPosition === null && _this.state.dropLevelOffset === null && _this.state.dropTargetKey === null && _this.state.dropContainerKey === null && _this.state.dropTargetPos === null && _this.state.dropAllowed === false && _this.state.dragOverNodeKey === null)) {
  72072. _this.resetDragState();
  72073. }
  72074. } else if (!(dropPosition === _this.state.dropPosition && dropLevelOffset === _this.state.dropLevelOffset && dropTargetKey === _this.state.dropTargetKey && dropContainerKey === _this.state.dropContainerKey && dropTargetPos === _this.state.dropTargetPos && dropAllowed === _this.state.dropAllowed && dragOverNodeKey === _this.state.dragOverNodeKey)) {
  72075. _this.setState({
  72076. dropPosition: dropPosition,
  72077. dropLevelOffset: dropLevelOffset,
  72078. dropTargetKey: dropTargetKey,
  72079. dropContainerKey: dropContainerKey,
  72080. dropTargetPos: dropTargetPos,
  72081. dropAllowed: dropAllowed,
  72082. dragOverNodeKey: dragOverNodeKey
  72083. });
  72084. }
  72085. onDragOver === null || onDragOver === void 0 || onDragOver({
  72086. event: event,
  72087. node: convertNodePropsToEventData(nodeProps)
  72088. });
  72089. });
  72090. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragLeave", function (event, nodeProps) {
  72091. // if it is outside the droppable area
  72092. // currentMouseOverDroppableNodeKey will be updated in dragenter event when into another droppable receiver.
  72093. if (_this.currentMouseOverDroppableNodeKey === nodeProps.eventKey && !event.currentTarget.contains(event.relatedTarget)) {
  72094. _this.resetDragState();
  72095. _this.currentMouseOverDroppableNodeKey = null;
  72096. }
  72097. var onDragLeave = _this.props.onDragLeave;
  72098. onDragLeave === null || onDragLeave === void 0 || onDragLeave({
  72099. event: event,
  72100. node: convertNodePropsToEventData(nodeProps)
  72101. });
  72102. });
  72103. // since stopPropagation() is called in treeNode
  72104. // if onWindowDrag is called, whice means state is keeped, drag state should be cleared
  72105. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onWindowDragEnd", function (event) {
  72106. _this.onNodeDragEnd(event, null, true);
  72107. window.removeEventListener('dragend', _this.onWindowDragEnd);
  72108. });
  72109. // if onNodeDragEnd is called, onWindowDragEnd won't be called since stopPropagation() is called
  72110. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDragEnd", function (event, nodeProps) {
  72111. var onDragEnd = _this.props.onDragEnd;
  72112. _this.setState({
  72113. dragOverNodeKey: null
  72114. });
  72115. _this.cleanDragState();
  72116. onDragEnd === null || onDragEnd === void 0 || onDragEnd({
  72117. event: event,
  72118. node: convertNodePropsToEventData(nodeProps)
  72119. });
  72120. _this.dragNodeProps = null;
  72121. window.removeEventListener('dragend', _this.onWindowDragEnd);
  72122. });
  72123. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDrop", function (event, _) {
  72124. var _this$getActiveItem;
  72125. var outsideTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  72126. var _this$state4 = _this.state,
  72127. dragChildrenKeys = _this$state4.dragChildrenKeys,
  72128. dropPosition = _this$state4.dropPosition,
  72129. dropTargetKey = _this$state4.dropTargetKey,
  72130. dropTargetPos = _this$state4.dropTargetPos,
  72131. dropAllowed = _this$state4.dropAllowed;
  72132. if (!dropAllowed) {
  72133. return;
  72134. }
  72135. var onDrop = _this.props.onDrop;
  72136. _this.setState({
  72137. dragOverNodeKey: null
  72138. });
  72139. _this.cleanDragState();
  72140. if (dropTargetKey === null) return;
  72141. var abstractDropNodeProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, getTreeNodeProps(dropTargetKey, _this.getTreeNodeRequiredProps())), {}, {
  72142. active: ((_this$getActiveItem = _this.getActiveItem()) === null || _this$getActiveItem === void 0 ? void 0 : _this$getActiveItem.key) === dropTargetKey,
  72143. data: getEntity(_this.state.keyEntities, dropTargetKey).node
  72144. });
  72145. var dropToChild = dragChildrenKeys.includes(dropTargetKey);
  72146. (0,warning["default"])(!dropToChild, "Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");
  72147. var posArr = posToArr(dropTargetPos);
  72148. var dropResult = {
  72149. event: event,
  72150. node: convertNodePropsToEventData(abstractDropNodeProps),
  72151. dragNode: _this.dragNodeProps ? convertNodePropsToEventData(_this.dragNodeProps) : null,
  72152. dragNodesKeys: [_this.dragNodeProps.eventKey].concat(dragChildrenKeys),
  72153. dropToGap: dropPosition !== 0,
  72154. dropPosition: dropPosition + Number(posArr[posArr.length - 1])
  72155. };
  72156. if (!outsideTree) {
  72157. onDrop === null || onDrop === void 0 || onDrop(dropResult);
  72158. }
  72159. _this.dragNodeProps = null;
  72160. });
  72161. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "cleanDragState", function () {
  72162. var draggingNodeKey = _this.state.draggingNodeKey;
  72163. if (draggingNodeKey !== null) {
  72164. _this.setState({
  72165. draggingNodeKey: null,
  72166. dropPosition: null,
  72167. dropContainerKey: null,
  72168. dropTargetKey: null,
  72169. dropLevelOffset: null,
  72170. dropAllowed: true,
  72171. dragOverNodeKey: null
  72172. });
  72173. }
  72174. _this.dragStartMousePosition = null;
  72175. _this.currentMouseOverDroppableNodeKey = null;
  72176. });
  72177. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "triggerExpandActionExpand", function (e, treeNode) {
  72178. var _this$state5 = _this.state,
  72179. expandedKeys = _this$state5.expandedKeys,
  72180. flattenNodes = _this$state5.flattenNodes;
  72181. var expanded = treeNode.expanded,
  72182. key = treeNode.key,
  72183. isLeaf = treeNode.isLeaf;
  72184. if (isLeaf || e.shiftKey || e.metaKey || e.ctrlKey) {
  72185. return;
  72186. }
  72187. var node = flattenNodes.filter(function (nodeItem) {
  72188. return nodeItem.key === key;
  72189. })[0];
  72190. var eventNode = convertNodePropsToEventData((0,objectSpread2["default"])((0,objectSpread2["default"])({}, getTreeNodeProps(key, _this.getTreeNodeRequiredProps())), {}, {
  72191. data: node.data
  72192. }));
  72193. _this.setExpandedKeys(expanded ? arrDel(expandedKeys, key) : arrAdd(expandedKeys, key));
  72194. _this.onNodeExpand(e, eventNode);
  72195. });
  72196. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeClick", function (e, treeNode) {
  72197. var _this$props3 = _this.props,
  72198. onClick = _this$props3.onClick,
  72199. expandAction = _this$props3.expandAction;
  72200. if (expandAction === 'click') {
  72201. _this.triggerExpandActionExpand(e, treeNode);
  72202. }
  72203. onClick === null || onClick === void 0 || onClick(e, treeNode);
  72204. });
  72205. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeDoubleClick", function (e, treeNode) {
  72206. var _this$props4 = _this.props,
  72207. onDoubleClick = _this$props4.onDoubleClick,
  72208. expandAction = _this$props4.expandAction;
  72209. if (expandAction === 'doubleClick') {
  72210. _this.triggerExpandActionExpand(e, treeNode);
  72211. }
  72212. onDoubleClick === null || onDoubleClick === void 0 || onDoubleClick(e, treeNode);
  72213. });
  72214. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeSelect", function (e, treeNode) {
  72215. var selectedKeys = _this.state.selectedKeys;
  72216. var _this$state6 = _this.state,
  72217. keyEntities = _this$state6.keyEntities,
  72218. fieldNames = _this$state6.fieldNames;
  72219. var _this$props5 = _this.props,
  72220. onSelect = _this$props5.onSelect,
  72221. multiple = _this$props5.multiple;
  72222. var selected = treeNode.selected;
  72223. var key = treeNode[fieldNames.key];
  72224. var targetSelected = !selected;
  72225. // Update selected keys
  72226. if (!targetSelected) {
  72227. selectedKeys = arrDel(selectedKeys, key);
  72228. } else if (!multiple) {
  72229. selectedKeys = [key];
  72230. } else {
  72231. selectedKeys = arrAdd(selectedKeys, key);
  72232. }
  72233. // [Legacy] Not found related usage in doc or upper libs
  72234. var selectedNodes = selectedKeys.map(function (selectedKey) {
  72235. var entity = getEntity(keyEntities, selectedKey);
  72236. return entity ? entity.node : null;
  72237. }).filter(Boolean);
  72238. _this.setUncontrolledState({
  72239. selectedKeys: selectedKeys
  72240. });
  72241. onSelect === null || onSelect === void 0 || onSelect(selectedKeys, {
  72242. event: 'select',
  72243. selected: targetSelected,
  72244. node: treeNode,
  72245. selectedNodes: selectedNodes,
  72246. nativeEvent: e.nativeEvent
  72247. });
  72248. });
  72249. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeCheck", function (e, treeNode, checked) {
  72250. var _this$state7 = _this.state,
  72251. keyEntities = _this$state7.keyEntities,
  72252. oriCheckedKeys = _this$state7.checkedKeys,
  72253. oriHalfCheckedKeys = _this$state7.halfCheckedKeys;
  72254. var _this$props6 = _this.props,
  72255. checkStrictly = _this$props6.checkStrictly,
  72256. onCheck = _this$props6.onCheck;
  72257. var key = treeNode.key;
  72258. // Prepare trigger arguments
  72259. var checkedObj;
  72260. var eventObj = {
  72261. event: 'check',
  72262. node: treeNode,
  72263. checked: checked,
  72264. nativeEvent: e.nativeEvent
  72265. };
  72266. if (checkStrictly) {
  72267. var checkedKeys = checked ? arrAdd(oriCheckedKeys, key) : arrDel(oriCheckedKeys, key);
  72268. var halfCheckedKeys = arrDel(oriHalfCheckedKeys, key);
  72269. checkedObj = {
  72270. checked: checkedKeys,
  72271. halfChecked: halfCheckedKeys
  72272. };
  72273. eventObj.checkedNodes = checkedKeys.map(function (checkedKey) {
  72274. return getEntity(keyEntities, checkedKey);
  72275. }).filter(Boolean).map(function (entity) {
  72276. return entity.node;
  72277. });
  72278. _this.setUncontrolledState({
  72279. checkedKeys: checkedKeys
  72280. });
  72281. } else {
  72282. // Always fill first
  72283. var _conductCheck = conductCheck([].concat((0,toConsumableArray["default"])(oriCheckedKeys), [key]), true, keyEntities),
  72284. _checkedKeys = _conductCheck.checkedKeys,
  72285. _halfCheckedKeys = _conductCheck.halfCheckedKeys;
  72286. // If remove, we do it again to correction
  72287. if (!checked) {
  72288. var keySet = new Set(_checkedKeys);
  72289. keySet.delete(key);
  72290. var _conductCheck2 = conductCheck(Array.from(keySet), {
  72291. checked: false,
  72292. halfCheckedKeys: _halfCheckedKeys
  72293. }, keyEntities);
  72294. _checkedKeys = _conductCheck2.checkedKeys;
  72295. _halfCheckedKeys = _conductCheck2.halfCheckedKeys;
  72296. }
  72297. checkedObj = _checkedKeys;
  72298. // [Legacy] This is used for `rc-tree-select`
  72299. eventObj.checkedNodes = [];
  72300. eventObj.checkedNodesPositions = [];
  72301. eventObj.halfCheckedKeys = _halfCheckedKeys;
  72302. _checkedKeys.forEach(function (checkedKey) {
  72303. var entity = getEntity(keyEntities, checkedKey);
  72304. if (!entity) return;
  72305. var node = entity.node,
  72306. pos = entity.pos;
  72307. eventObj.checkedNodes.push(node);
  72308. eventObj.checkedNodesPositions.push({
  72309. node: node,
  72310. pos: pos
  72311. });
  72312. });
  72313. _this.setUncontrolledState({
  72314. checkedKeys: _checkedKeys
  72315. }, false, {
  72316. halfCheckedKeys: _halfCheckedKeys
  72317. });
  72318. }
  72319. onCheck === null || onCheck === void 0 || onCheck(checkedObj, eventObj);
  72320. });
  72321. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeLoad", function (treeNode) {
  72322. var _entity$children;
  72323. var key = treeNode.key;
  72324. var keyEntities = _this.state.keyEntities;
  72325. // Skip if has children already
  72326. var entity = getEntity(keyEntities, key);
  72327. if (entity !== null && entity !== void 0 && (_entity$children = entity.children) !== null && _entity$children !== void 0 && _entity$children.length) {
  72328. return;
  72329. }
  72330. var loadPromise = new Promise(function (resolve, reject) {
  72331. // We need to get the latest state of loading/loaded keys
  72332. _this.setState(function (_ref) {
  72333. var _ref$loadedKeys = _ref.loadedKeys,
  72334. loadedKeys = _ref$loadedKeys === void 0 ? [] : _ref$loadedKeys,
  72335. _ref$loadingKeys = _ref.loadingKeys,
  72336. loadingKeys = _ref$loadingKeys === void 0 ? [] : _ref$loadingKeys;
  72337. var _this$props7 = _this.props,
  72338. loadData = _this$props7.loadData,
  72339. onLoad = _this$props7.onLoad;
  72340. if (!loadData || loadedKeys.includes(key) || loadingKeys.includes(key)) {
  72341. return null;
  72342. }
  72343. // Process load data
  72344. var promise = loadData(treeNode);
  72345. promise.then(function () {
  72346. var currentLoadedKeys = _this.state.loadedKeys;
  72347. var newLoadedKeys = arrAdd(currentLoadedKeys, key);
  72348. // onLoad should trigger before internal setState to avoid `loadData` trigger twice.
  72349. // https://github.com/ant-design/ant-design/issues/12464
  72350. onLoad === null || onLoad === void 0 || onLoad(newLoadedKeys, {
  72351. event: 'load',
  72352. node: treeNode
  72353. });
  72354. _this.setUncontrolledState({
  72355. loadedKeys: newLoadedKeys
  72356. });
  72357. _this.setState(function (prevState) {
  72358. return {
  72359. loadingKeys: arrDel(prevState.loadingKeys, key)
  72360. };
  72361. });
  72362. resolve();
  72363. }).catch(function (e) {
  72364. _this.setState(function (prevState) {
  72365. return {
  72366. loadingKeys: arrDel(prevState.loadingKeys, key)
  72367. };
  72368. });
  72369. // If exceed max retry times, we give up retry
  72370. _this.loadingRetryTimes[key] = (_this.loadingRetryTimes[key] || 0) + 1;
  72371. if (_this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {
  72372. var currentLoadedKeys = _this.state.loadedKeys;
  72373. (0,warning["default"])(false, 'Retry for `loadData` many times but still failed. No more retry.');
  72374. _this.setUncontrolledState({
  72375. loadedKeys: arrAdd(currentLoadedKeys, key)
  72376. });
  72377. resolve();
  72378. }
  72379. reject(e);
  72380. });
  72381. return {
  72382. loadingKeys: arrAdd(loadingKeys, key)
  72383. };
  72384. });
  72385. });
  72386. // Not care warning if we ignore this
  72387. loadPromise.catch(function () {});
  72388. return loadPromise;
  72389. });
  72390. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeMouseEnter", function (event, node) {
  72391. var onMouseEnter = _this.props.onMouseEnter;
  72392. onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter({
  72393. event: event,
  72394. node: node
  72395. });
  72396. });
  72397. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeMouseLeave", function (event, node) {
  72398. var onMouseLeave = _this.props.onMouseLeave;
  72399. onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave({
  72400. event: event,
  72401. node: node
  72402. });
  72403. });
  72404. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeContextMenu", function (event, node) {
  72405. var onRightClick = _this.props.onRightClick;
  72406. if (onRightClick) {
  72407. event.preventDefault();
  72408. onRightClick({
  72409. event: event,
  72410. node: node
  72411. });
  72412. }
  72413. });
  72414. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onFocus", function () {
  72415. var onFocus = _this.props.onFocus;
  72416. _this.setState({
  72417. focused: true
  72418. });
  72419. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  72420. args[_key2] = arguments[_key2];
  72421. }
  72422. onFocus === null || onFocus === void 0 || onFocus.apply(void 0, args);
  72423. });
  72424. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onBlur", function () {
  72425. var onBlur = _this.props.onBlur;
  72426. _this.setState({
  72427. focused: false
  72428. });
  72429. _this.onActiveChange(null);
  72430. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  72431. args[_key3] = arguments[_key3];
  72432. }
  72433. onBlur === null || onBlur === void 0 || onBlur.apply(void 0, args);
  72434. });
  72435. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getTreeNodeRequiredProps", function () {
  72436. var _this$state8 = _this.state,
  72437. expandedKeys = _this$state8.expandedKeys,
  72438. selectedKeys = _this$state8.selectedKeys,
  72439. loadedKeys = _this$state8.loadedKeys,
  72440. loadingKeys = _this$state8.loadingKeys,
  72441. checkedKeys = _this$state8.checkedKeys,
  72442. halfCheckedKeys = _this$state8.halfCheckedKeys,
  72443. dragOverNodeKey = _this$state8.dragOverNodeKey,
  72444. dropPosition = _this$state8.dropPosition,
  72445. keyEntities = _this$state8.keyEntities;
  72446. return {
  72447. expandedKeys: expandedKeys || [],
  72448. selectedKeys: selectedKeys || [],
  72449. loadedKeys: loadedKeys || [],
  72450. loadingKeys: loadingKeys || [],
  72451. checkedKeys: checkedKeys || [],
  72452. halfCheckedKeys: halfCheckedKeys || [],
  72453. dragOverNodeKey: dragOverNodeKey,
  72454. dropPosition: dropPosition,
  72455. keyEntities: keyEntities
  72456. };
  72457. });
  72458. // =========================== Expanded ===========================
  72459. /** Set uncontrolled `expandedKeys`. This will also auto update `flattenNodes`. */
  72460. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "setExpandedKeys", function (expandedKeys) {
  72461. var _this$state9 = _this.state,
  72462. treeData = _this$state9.treeData,
  72463. fieldNames = _this$state9.fieldNames;
  72464. var flattenNodes = flattenTreeData(treeData, expandedKeys, fieldNames);
  72465. _this.setUncontrolledState({
  72466. expandedKeys: expandedKeys,
  72467. flattenNodes: flattenNodes
  72468. }, true);
  72469. });
  72470. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onNodeExpand", function (e, treeNode) {
  72471. var expandedKeys = _this.state.expandedKeys;
  72472. var _this$state10 = _this.state,
  72473. listChanging = _this$state10.listChanging,
  72474. fieldNames = _this$state10.fieldNames;
  72475. var _this$props8 = _this.props,
  72476. onExpand = _this$props8.onExpand,
  72477. loadData = _this$props8.loadData;
  72478. var expanded = treeNode.expanded;
  72479. var key = treeNode[fieldNames.key];
  72480. // Do nothing when motion is in progress
  72481. if (listChanging) {
  72482. return;
  72483. }
  72484. // Update selected keys
  72485. var certain = expandedKeys.includes(key);
  72486. var targetExpanded = !expanded;
  72487. (0,warning["default"])(expanded && certain || !expanded && !certain, 'Expand state not sync with index check');
  72488. expandedKeys = targetExpanded ? arrAdd(expandedKeys, key) : arrDel(expandedKeys, key);
  72489. _this.setExpandedKeys(expandedKeys);
  72490. onExpand === null || onExpand === void 0 || onExpand(expandedKeys, {
  72491. node: treeNode,
  72492. expanded: targetExpanded,
  72493. nativeEvent: e.nativeEvent
  72494. });
  72495. // Async Load data
  72496. if (targetExpanded && loadData) {
  72497. var loadPromise = _this.onNodeLoad(treeNode);
  72498. if (loadPromise) {
  72499. loadPromise.then(function () {
  72500. // [Legacy] Refresh logic
  72501. var newFlattenTreeData = flattenTreeData(_this.state.treeData, expandedKeys, fieldNames);
  72502. _this.setUncontrolledState({
  72503. flattenNodes: newFlattenTreeData
  72504. });
  72505. }).catch(function () {
  72506. var currentExpandedKeys = _this.state.expandedKeys;
  72507. var expandedKeysToRestore = arrDel(currentExpandedKeys, key);
  72508. _this.setExpandedKeys(expandedKeysToRestore);
  72509. });
  72510. }
  72511. }
  72512. });
  72513. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onListChangeStart", function () {
  72514. _this.setUncontrolledState({
  72515. listChanging: true
  72516. });
  72517. });
  72518. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onListChangeEnd", function () {
  72519. setTimeout(function () {
  72520. _this.setUncontrolledState({
  72521. listChanging: false
  72522. });
  72523. });
  72524. });
  72525. // =========================== Keyboard ===========================
  72526. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onActiveChange", function (newActiveKey) {
  72527. var activeKey = _this.state.activeKey;
  72528. var _this$props9 = _this.props,
  72529. onActiveChange = _this$props9.onActiveChange,
  72530. _this$props9$itemScro = _this$props9.itemScrollOffset,
  72531. itemScrollOffset = _this$props9$itemScro === void 0 ? 0 : _this$props9$itemScro;
  72532. if (activeKey === newActiveKey) {
  72533. return;
  72534. }
  72535. _this.setState({
  72536. activeKey: newActiveKey
  72537. });
  72538. if (newActiveKey !== null) {
  72539. _this.scrollTo({
  72540. key: newActiveKey,
  72541. offset: itemScrollOffset
  72542. });
  72543. }
  72544. onActiveChange === null || onActiveChange === void 0 || onActiveChange(newActiveKey);
  72545. });
  72546. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "getActiveItem", function () {
  72547. var _this$state11 = _this.state,
  72548. activeKey = _this$state11.activeKey,
  72549. flattenNodes = _this$state11.flattenNodes;
  72550. if (activeKey === null) {
  72551. return null;
  72552. }
  72553. return flattenNodes.find(function (_ref2) {
  72554. var key = _ref2.key;
  72555. return key === activeKey;
  72556. }) || null;
  72557. });
  72558. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "offsetActiveKey", function (offset) {
  72559. var _this$state12 = _this.state,
  72560. flattenNodes = _this$state12.flattenNodes,
  72561. activeKey = _this$state12.activeKey;
  72562. var index = flattenNodes.findIndex(function (_ref3) {
  72563. var key = _ref3.key;
  72564. return key === activeKey;
  72565. });
  72566. // Align with index
  72567. if (index === -1 && offset < 0) {
  72568. index = flattenNodes.length;
  72569. }
  72570. index = (index + offset + flattenNodes.length) % flattenNodes.length;
  72571. var item = flattenNodes[index];
  72572. if (item) {
  72573. var _key4 = item.key;
  72574. _this.onActiveChange(_key4);
  72575. } else {
  72576. _this.onActiveChange(null);
  72577. }
  72578. });
  72579. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onKeyDown", function (event) {
  72580. var _this$state13 = _this.state,
  72581. activeKey = _this$state13.activeKey,
  72582. expandedKeys = _this$state13.expandedKeys,
  72583. checkedKeys = _this$state13.checkedKeys,
  72584. fieldNames = _this$state13.fieldNames;
  72585. var _this$props10 = _this.props,
  72586. onKeyDown = _this$props10.onKeyDown,
  72587. checkable = _this$props10.checkable,
  72588. selectable = _this$props10.selectable;
  72589. // >>>>>>>>>> Direction
  72590. switch (event.which) {
  72591. case KeyCode["default"].UP:
  72592. {
  72593. _this.offsetActiveKey(-1);
  72594. event.preventDefault();
  72595. break;
  72596. }
  72597. case KeyCode["default"].DOWN:
  72598. {
  72599. _this.offsetActiveKey(1);
  72600. event.preventDefault();
  72601. break;
  72602. }
  72603. }
  72604. // >>>>>>>>>> Expand & Selection
  72605. var activeItem = _this.getActiveItem();
  72606. if (activeItem && activeItem.data) {
  72607. var treeNodeRequiredProps = _this.getTreeNodeRequiredProps();
  72608. var expandable = activeItem.data.isLeaf === false || !!(activeItem.data[fieldNames.children] || []).length;
  72609. var eventNode = convertNodePropsToEventData((0,objectSpread2["default"])((0,objectSpread2["default"])({}, getTreeNodeProps(activeKey, treeNodeRequiredProps)), {}, {
  72610. data: activeItem.data,
  72611. active: true
  72612. }));
  72613. switch (event.which) {
  72614. // >>> Expand
  72615. case KeyCode["default"].LEFT:
  72616. {
  72617. // Collapse if possible
  72618. if (expandable && expandedKeys.includes(activeKey)) {
  72619. _this.onNodeExpand({}, eventNode);
  72620. } else if (activeItem.parent) {
  72621. _this.onActiveChange(activeItem.parent.key);
  72622. }
  72623. event.preventDefault();
  72624. break;
  72625. }
  72626. case KeyCode["default"].RIGHT:
  72627. {
  72628. // Expand if possible
  72629. if (expandable && !expandedKeys.includes(activeKey)) {
  72630. _this.onNodeExpand({}, eventNode);
  72631. } else if (activeItem.children && activeItem.children.length) {
  72632. _this.onActiveChange(activeItem.children[0].key);
  72633. }
  72634. event.preventDefault();
  72635. break;
  72636. }
  72637. // Selection
  72638. case KeyCode["default"].ENTER:
  72639. case KeyCode["default"].SPACE:
  72640. {
  72641. if (checkable && !eventNode.disabled && eventNode.checkable !== false && !eventNode.disableCheckbox) {
  72642. _this.onNodeCheck({}, eventNode, !checkedKeys.includes(activeKey));
  72643. } else if (!checkable && selectable && !eventNode.disabled && eventNode.selectable !== false) {
  72644. _this.onNodeSelect({}, eventNode);
  72645. }
  72646. break;
  72647. }
  72648. }
  72649. }
  72650. onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
  72651. });
  72652. /**
  72653. * Only update the value which is not in props
  72654. */
  72655. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "setUncontrolledState", function (state) {
  72656. var atomic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  72657. var forceState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  72658. if (!_this.destroyed) {
  72659. var needSync = false;
  72660. var allPassed = true;
  72661. var newState = {};
  72662. Object.keys(state).forEach(function (name) {
  72663. if (_this.props.hasOwnProperty(name)) {
  72664. allPassed = false;
  72665. return;
  72666. }
  72667. needSync = true;
  72668. newState[name] = state[name];
  72669. });
  72670. if (needSync && (!atomic || allPassed)) {
  72671. _this.setState((0,objectSpread2["default"])((0,objectSpread2["default"])({}, newState), forceState));
  72672. }
  72673. }
  72674. });
  72675. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "scrollTo", function (scroll) {
  72676. _this.listRef.current.scrollTo(scroll);
  72677. });
  72678. return _this;
  72679. }
  72680. (0,createClass["default"])(Tree, [{
  72681. key: "componentDidMount",
  72682. value: function componentDidMount() {
  72683. this.destroyed = false;
  72684. this.onUpdated();
  72685. }
  72686. }, {
  72687. key: "componentDidUpdate",
  72688. value: function componentDidUpdate() {
  72689. this.onUpdated();
  72690. }
  72691. }, {
  72692. key: "onUpdated",
  72693. value: function onUpdated() {
  72694. var _this$props11 = this.props,
  72695. activeKey = _this$props11.activeKey,
  72696. _this$props11$itemScr = _this$props11.itemScrollOffset,
  72697. itemScrollOffset = _this$props11$itemScr === void 0 ? 0 : _this$props11$itemScr;
  72698. if (activeKey !== undefined && activeKey !== this.state.activeKey) {
  72699. this.setState({
  72700. activeKey: activeKey
  72701. });
  72702. if (activeKey !== null) {
  72703. this.scrollTo({
  72704. key: activeKey,
  72705. offset: itemScrollOffset
  72706. });
  72707. }
  72708. }
  72709. }
  72710. }, {
  72711. key: "componentWillUnmount",
  72712. value: function componentWillUnmount() {
  72713. window.removeEventListener('dragend', this.onWindowDragEnd);
  72714. this.destroyed = true;
  72715. }
  72716. }, {
  72717. key: "resetDragState",
  72718. value: function resetDragState() {
  72719. this.setState({
  72720. dragOverNodeKey: null,
  72721. dropPosition: null,
  72722. dropLevelOffset: null,
  72723. dropTargetKey: null,
  72724. dropContainerKey: null,
  72725. dropTargetPos: null,
  72726. dropAllowed: false
  72727. });
  72728. }
  72729. }, {
  72730. key: "render",
  72731. value: function render() {
  72732. var _this$state14 = this.state,
  72733. focused = _this$state14.focused,
  72734. flattenNodes = _this$state14.flattenNodes,
  72735. keyEntities = _this$state14.keyEntities,
  72736. draggingNodeKey = _this$state14.draggingNodeKey,
  72737. activeKey = _this$state14.activeKey,
  72738. dropLevelOffset = _this$state14.dropLevelOffset,
  72739. dropContainerKey = _this$state14.dropContainerKey,
  72740. dropTargetKey = _this$state14.dropTargetKey,
  72741. dropPosition = _this$state14.dropPosition,
  72742. dragOverNodeKey = _this$state14.dragOverNodeKey,
  72743. indent = _this$state14.indent;
  72744. var _this$props12 = this.props,
  72745. prefixCls = _this$props12.prefixCls,
  72746. className = _this$props12.className,
  72747. style = _this$props12.style,
  72748. showLine = _this$props12.showLine,
  72749. focusable = _this$props12.focusable,
  72750. _this$props12$tabInde = _this$props12.tabIndex,
  72751. tabIndex = _this$props12$tabInde === void 0 ? 0 : _this$props12$tabInde,
  72752. selectable = _this$props12.selectable,
  72753. showIcon = _this$props12.showIcon,
  72754. icon = _this$props12.icon,
  72755. switcherIcon = _this$props12.switcherIcon,
  72756. draggable = _this$props12.draggable,
  72757. checkable = _this$props12.checkable,
  72758. checkStrictly = _this$props12.checkStrictly,
  72759. disabled = _this$props12.disabled,
  72760. motion = _this$props12.motion,
  72761. loadData = _this$props12.loadData,
  72762. filterTreeNode = _this$props12.filterTreeNode,
  72763. height = _this$props12.height,
  72764. itemHeight = _this$props12.itemHeight,
  72765. scrollWidth = _this$props12.scrollWidth,
  72766. virtual = _this$props12.virtual,
  72767. titleRender = _this$props12.titleRender,
  72768. dropIndicatorRender = _this$props12.dropIndicatorRender,
  72769. onContextMenu = _this$props12.onContextMenu,
  72770. onScroll = _this$props12.onScroll,
  72771. direction = _this$props12.direction,
  72772. rootClassName = _this$props12.rootClassName,
  72773. rootStyle = _this$props12.rootStyle;
  72774. var domProps = (0,pickAttrs["default"])(this.props, {
  72775. aria: true,
  72776. data: true
  72777. });
  72778. // It's better move to hooks but we just simply keep here
  72779. var draggableConfig;
  72780. if (draggable) {
  72781. if ((0,esm_typeof["default"])(draggable) === 'object') {
  72782. draggableConfig = draggable;
  72783. } else if (typeof draggable === 'function') {
  72784. draggableConfig = {
  72785. nodeDraggable: draggable
  72786. };
  72787. } else {
  72788. draggableConfig = {};
  72789. }
  72790. }
  72791. var contextValue = {
  72792. prefixCls: prefixCls,
  72793. selectable: selectable,
  72794. showIcon: showIcon,
  72795. icon: icon,
  72796. switcherIcon: switcherIcon,
  72797. draggable: draggableConfig,
  72798. draggingNodeKey: draggingNodeKey,
  72799. checkable: checkable,
  72800. checkStrictly: checkStrictly,
  72801. disabled: disabled,
  72802. keyEntities: keyEntities,
  72803. dropLevelOffset: dropLevelOffset,
  72804. dropContainerKey: dropContainerKey,
  72805. dropTargetKey: dropTargetKey,
  72806. dropPosition: dropPosition,
  72807. dragOverNodeKey: dragOverNodeKey,
  72808. indent: indent,
  72809. direction: direction,
  72810. dropIndicatorRender: dropIndicatorRender,
  72811. loadData: loadData,
  72812. filterTreeNode: filterTreeNode,
  72813. titleRender: titleRender,
  72814. onNodeClick: this.onNodeClick,
  72815. onNodeDoubleClick: this.onNodeDoubleClick,
  72816. onNodeExpand: this.onNodeExpand,
  72817. onNodeSelect: this.onNodeSelect,
  72818. onNodeCheck: this.onNodeCheck,
  72819. onNodeLoad: this.onNodeLoad,
  72820. onNodeMouseEnter: this.onNodeMouseEnter,
  72821. onNodeMouseLeave: this.onNodeMouseLeave,
  72822. onNodeContextMenu: this.onNodeContextMenu,
  72823. onNodeDragStart: this.onNodeDragStart,
  72824. onNodeDragEnter: this.onNodeDragEnter,
  72825. onNodeDragOver: this.onNodeDragOver,
  72826. onNodeDragLeave: this.onNodeDragLeave,
  72827. onNodeDragEnd: this.onNodeDragEnd,
  72828. onNodeDrop: this.onNodeDrop
  72829. };
  72830. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TreeContext.Provider, {
  72831. value: contextValue
  72832. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  72833. className: classnames_default()(prefixCls, className, rootClassName, (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-show-line"), showLine), "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-active-focused"), activeKey !== null)),
  72834. style: rootStyle
  72835. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_NodeList, (0,esm_extends["default"])({
  72836. ref: this.listRef,
  72837. prefixCls: prefixCls,
  72838. style: style,
  72839. data: flattenNodes,
  72840. disabled: disabled,
  72841. selectable: selectable,
  72842. checkable: !!checkable,
  72843. motion: motion,
  72844. dragging: draggingNodeKey !== null,
  72845. height: height,
  72846. itemHeight: itemHeight,
  72847. virtual: virtual,
  72848. focusable: focusable,
  72849. focused: focused,
  72850. tabIndex: tabIndex,
  72851. activeItem: this.getActiveItem(),
  72852. onFocus: this.onFocus,
  72853. onBlur: this.onBlur,
  72854. onKeyDown: this.onKeyDown,
  72855. onActiveChange: this.onActiveChange,
  72856. onListChangeStart: this.onListChangeStart,
  72857. onListChangeEnd: this.onListChangeEnd,
  72858. onContextMenu: onContextMenu,
  72859. onScroll: onScroll,
  72860. scrollWidth: scrollWidth
  72861. }, this.getTreeNodeRequiredProps(), domProps))));
  72862. }
  72863. }], [{
  72864. key: "getDerivedStateFromProps",
  72865. value: function getDerivedStateFromProps(props, prevState) {
  72866. var prevProps = prevState.prevProps;
  72867. var newState = {
  72868. prevProps: props
  72869. };
  72870. function needSync(name) {
  72871. return !prevProps && props.hasOwnProperty(name) || prevProps && prevProps[name] !== props[name];
  72872. }
  72873. // ================== Tree Node ==================
  72874. var treeData;
  72875. // fieldNames
  72876. var fieldNames = prevState.fieldNames;
  72877. if (needSync('fieldNames')) {
  72878. fieldNames = treeUtil_fillFieldNames(props.fieldNames);
  72879. newState.fieldNames = fieldNames;
  72880. }
  72881. // Check if `treeData` or `children` changed and save into the state.
  72882. if (needSync('treeData')) {
  72883. treeData = props.treeData;
  72884. } else if (needSync('children')) {
  72885. (0,warning["default"])(false, '`children` of Tree is deprecated. Please use `treeData` instead.');
  72886. treeData = convertTreeToData(props.children);
  72887. }
  72888. // Save flatten nodes info and convert `treeData` into keyEntities
  72889. if (treeData) {
  72890. newState.treeData = treeData;
  72891. var entitiesMap = convertDataToEntities(treeData, {
  72892. fieldNames: fieldNames
  72893. });
  72894. newState.keyEntities = (0,objectSpread2["default"])((0,defineProperty["default"])({}, MOTION_KEY, MotionEntity), entitiesMap.keyEntities);
  72895. // Warning if treeNode not provide key
  72896. if (true) {
  72897. warningWithoutKey(treeData, fieldNames);
  72898. }
  72899. }
  72900. var keyEntities = newState.keyEntities || prevState.keyEntities;
  72901. // ================ expandedKeys =================
  72902. if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent')) {
  72903. newState.expandedKeys = props.autoExpandParent || !prevProps && props.defaultExpandParent ? conductExpandParent(props.expandedKeys, keyEntities) : props.expandedKeys;
  72904. } else if (!prevProps && props.defaultExpandAll) {
  72905. var cloneKeyEntities = (0,objectSpread2["default"])({}, keyEntities);
  72906. delete cloneKeyEntities[MOTION_KEY];
  72907. // Only take the key who has the children to enhance the performance
  72908. var nextExpandedKeys = [];
  72909. Object.keys(cloneKeyEntities).forEach(function (key) {
  72910. var entity = cloneKeyEntities[key];
  72911. if (entity.children && entity.children.length) {
  72912. nextExpandedKeys.push(entity.key);
  72913. }
  72914. });
  72915. newState.expandedKeys = nextExpandedKeys;
  72916. } else if (!prevProps && props.defaultExpandedKeys) {
  72917. newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? conductExpandParent(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys;
  72918. }
  72919. if (!newState.expandedKeys) {
  72920. delete newState.expandedKeys;
  72921. }
  72922. // ================ flattenNodes =================
  72923. if (treeData || newState.expandedKeys) {
  72924. var flattenNodes = flattenTreeData(treeData || prevState.treeData, newState.expandedKeys || prevState.expandedKeys, fieldNames);
  72925. newState.flattenNodes = flattenNodes;
  72926. }
  72927. // ================ selectedKeys =================
  72928. if (props.selectable) {
  72929. if (needSync('selectedKeys')) {
  72930. newState.selectedKeys = calcSelectedKeys(props.selectedKeys, props);
  72931. } else if (!prevProps && props.defaultSelectedKeys) {
  72932. newState.selectedKeys = calcSelectedKeys(props.defaultSelectedKeys, props);
  72933. }
  72934. }
  72935. // ================= checkedKeys =================
  72936. if (props.checkable) {
  72937. var checkedKeyEntity;
  72938. if (needSync('checkedKeys')) {
  72939. checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {};
  72940. } else if (!prevProps && props.defaultCheckedKeys) {
  72941. checkedKeyEntity = parseCheckedKeys(props.defaultCheckedKeys) || {};
  72942. } else if (treeData) {
  72943. // If `treeData` changed, we also need check it
  72944. checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {
  72945. checkedKeys: prevState.checkedKeys,
  72946. halfCheckedKeys: prevState.halfCheckedKeys
  72947. };
  72948. }
  72949. if (checkedKeyEntity) {
  72950. var _checkedKeyEntity = checkedKeyEntity,
  72951. _checkedKeyEntity$che = _checkedKeyEntity.checkedKeys,
  72952. checkedKeys = _checkedKeyEntity$che === void 0 ? [] : _checkedKeyEntity$che,
  72953. _checkedKeyEntity$hal = _checkedKeyEntity.halfCheckedKeys,
  72954. halfCheckedKeys = _checkedKeyEntity$hal === void 0 ? [] : _checkedKeyEntity$hal;
  72955. if (!props.checkStrictly) {
  72956. var conductKeys = conductCheck(checkedKeys, true, keyEntities);
  72957. checkedKeys = conductKeys.checkedKeys;
  72958. halfCheckedKeys = conductKeys.halfCheckedKeys;
  72959. }
  72960. newState.checkedKeys = checkedKeys;
  72961. newState.halfCheckedKeys = halfCheckedKeys;
  72962. }
  72963. }
  72964. // ================= loadedKeys ==================
  72965. if (needSync('loadedKeys')) {
  72966. newState.loadedKeys = props.loadedKeys;
  72967. }
  72968. return newState;
  72969. }
  72970. }]);
  72971. return Tree;
  72972. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  72973. (0,defineProperty["default"])(Tree, "defaultProps", {
  72974. prefixCls: 'rc-tree',
  72975. showLine: false,
  72976. showIcon: true,
  72977. selectable: true,
  72978. multiple: false,
  72979. checkable: false,
  72980. disabled: false,
  72981. checkStrictly: false,
  72982. draggable: false,
  72983. defaultExpandParent: true,
  72984. autoExpandParent: false,
  72985. defaultExpandAll: false,
  72986. defaultExpandedKeys: [],
  72987. defaultCheckedKeys: [],
  72988. defaultSelectedKeys: [],
  72989. dropIndicatorRender: es_DropIndicator,
  72990. allowDrop: function allowDrop() {
  72991. return true;
  72992. },
  72993. expandAction: false
  72994. });
  72995. (0,defineProperty["default"])(Tree, "TreeNode", es_TreeNode);
  72996. /* harmony default export */ var es_Tree = (Tree);
  72997. ;// ./node_modules/rc-tree/es/index.js
  72998. /* harmony default export */ var rc_tree_es = (es_Tree);
  72999. ;// ./node_modules/@ant-design/icons-svg/es/asn/FileOutlined.js
  73000. // This icon file is generated automatically.
  73001. var FileOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, "name": "file", "theme": "outlined" };
  73002. /* harmony default export */ var asn_FileOutlined = (FileOutlined);
  73003. ;// ./node_modules/@ant-design/icons/es/icons/FileOutlined.js
  73004. // GENERATE BY ./scripts/generate.ts
  73005. // DON NOT EDIT IT MANUALLY
  73006. var FileOutlined_FileOutlined = function FileOutlined(props, ref) {
  73007. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73008. ref: ref,
  73009. icon: asn_FileOutlined
  73010. }));
  73011. };
  73012. /**![file](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg1NC42IDI4OC42TDYzOS40IDczLjRjLTYtNi0xNC4xLTkuNC0yMi42LTkuNEgxOTJjLTE3LjcgMC0zMiAxNC4zLTMyIDMydjgzMmMwIDE3LjcgMTQuMyAzMiAzMiAzMmg2NDBjMTcuNyAwIDMyLTE0LjMgMzItMzJWMzExLjNjMC04LjUtMy40LTE2LjctOS40LTIyLjd6TTc5MC4yIDMyNkg2MDJWMTM3LjhMNzkwLjIgMzI2em0xLjggNTYySDIzMlYxMzZoMzAydjIxNmE0MiA0MiAwIDAwNDIgNDJoMjE2djQ5NHoiIC8+PC9zdmc+) */
  73013. var FileOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FileOutlined_FileOutlined);
  73014. if (true) {
  73015. FileOutlined_RefIcon.displayName = 'FileOutlined';
  73016. }
  73017. /* harmony default export */ var icons_FileOutlined = (FileOutlined_RefIcon);
  73018. ;// ./node_modules/@ant-design/icons-svg/es/asn/FolderOpenOutlined.js
  73019. // This icon file is generated automatically.
  73020. var FolderOpenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, "name": "folder-open", "theme": "outlined" };
  73021. /* harmony default export */ var asn_FolderOpenOutlined = (FolderOpenOutlined);
  73022. ;// ./node_modules/@ant-design/icons/es/icons/FolderOpenOutlined.js
  73023. // GENERATE BY ./scripts/generate.ts
  73024. // DON NOT EDIT IT MANUALLY
  73025. var FolderOpenOutlined_FolderOpenOutlined = function FolderOpenOutlined(props, ref) {
  73026. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73027. ref: ref,
  73028. icon: asn_FolderOpenOutlined
  73029. }));
  73030. };
  73031. /**![folder-open](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkyOCA0NDRIODIwVjMzMC40YzAtMTcuNy0xNC4zLTMyLTMyLTMySDQ3M0wzNTUuNyAxODYuMmE4LjE1IDguMTUgMCAwMC01LjUtMi4ySDk2Yy0xNy43IDAtMzIgMTQuMy0zMiAzMnY1OTJjMCAxNy43IDE0LjMgMzIgMzIgMzJoNjk4YzEzIDAgMjQuOC03LjkgMjkuNy0yMGwxMzQtMzMyYzEuNS0zLjggMi4zLTcuOSAyLjMtMTIgMC0xNy43LTE0LjMtMzItMzItMzJ6TTEzNiAyNTZoMTg4LjVsMTE5LjYgMTE0LjRINzQ4VjQ0NEgyMzhjLTEzIDAtMjQuOCA3LjktMjkuNyAyMEwxMzYgNjQzLjJWMjU2em02MzUuMyA1MTJIMTU5bDEwMy4zLTI1Nmg2MTIuNEw3NzEuMyA3Njh6IiAvPjwvc3ZnPg==) */
  73032. var FolderOpenOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FolderOpenOutlined_FolderOpenOutlined);
  73033. if (true) {
  73034. FolderOpenOutlined_RefIcon.displayName = 'FolderOpenOutlined';
  73035. }
  73036. /* harmony default export */ var icons_FolderOpenOutlined = (FolderOpenOutlined_RefIcon);
  73037. ;// ./node_modules/@ant-design/icons-svg/es/asn/FolderOutlined.js
  73038. // This icon file is generated automatically.
  73039. var FolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, "name": "folder", "theme": "outlined" };
  73040. /* harmony default export */ var asn_FolderOutlined = (FolderOutlined);
  73041. ;// ./node_modules/@ant-design/icons/es/icons/FolderOutlined.js
  73042. // GENERATE BY ./scripts/generate.ts
  73043. // DON NOT EDIT IT MANUALLY
  73044. var FolderOutlined_FolderOutlined = function FolderOutlined(props, ref) {
  73045. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73046. ref: ref,
  73047. icon: asn_FolderOutlined
  73048. }));
  73049. };
  73050. /**![folder](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg4MCAyOTguNEg1MjFMNDAzLjcgMTg2LjJhOC4xNSA4LjE1IDAgMDAtNS41LTIuMkgxNDRjLTE3LjcgMC0zMiAxNC4zLTMyIDMydjU5MmMwIDE3LjcgMTQuMyAzMiAzMiAzMmg3MzZjMTcuNyAwIDMyLTE0LjMgMzItMzJWMzMwLjRjMC0xNy43LTE0LjMtMzItMzItMzJ6TTg0MCA3NjhIMTg0VjI1NmgxODguNWwxMTkuNiAxMTQuNEg4NDBWNzY4eiIgLz48L3N2Zz4=) */
  73051. var FolderOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FolderOutlined_FolderOutlined);
  73052. if (true) {
  73053. FolderOutlined_RefIcon.displayName = 'FolderOutlined';
  73054. }
  73055. /* harmony default export */ var icons_FolderOutlined = (FolderOutlined_RefIcon);
  73056. ;// ./node_modules/@ant-design/icons-svg/es/asn/HolderOutlined.js
  73057. // This icon file is generated automatically.
  73058. var HolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z" } }] }, "name": "holder", "theme": "outlined" };
  73059. /* harmony default export */ var asn_HolderOutlined = (HolderOutlined);
  73060. ;// ./node_modules/@ant-design/icons/es/icons/HolderOutlined.js
  73061. // GENERATE BY ./scripts/generate.ts
  73062. // DON NOT EDIT IT MANUALLY
  73063. var HolderOutlined_HolderOutlined = function HolderOutlined(props, ref) {
  73064. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73065. ref: ref,
  73066. icon: asn_HolderOutlined
  73067. }));
  73068. };
  73069. /**![holder](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMwMCAyNzYuNWE1NiA1NiAwIDEwNTYtOTcgNTYgNTYgMCAwMC01NiA5N3ptMCAyODRhNTYgNTYgMCAxMDU2LTk3IDU2IDU2IDAgMDAtNTYgOTd6TTY0MCAyMjhhNTYgNTYgMCAxMDExMiAwIDU2IDU2IDAgMDAtMTEyIDB6bTAgMjg0YTU2IDU2IDAgMTAxMTIgMCA1NiA1NiAwIDAwLTExMiAwek0zMDAgODQ0LjVhNTYgNTYgMCAxMDU2LTk3IDU2IDU2IDAgMDAtNTYgOTd6TTY0MCA3OTZhNTYgNTYgMCAxMDExMiAwIDU2IDU2IDAgMDAtMTEyIDB6IiAvPjwvc3ZnPg==) */
  73070. var HolderOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(HolderOutlined_HolderOutlined);
  73071. if (true) {
  73072. HolderOutlined_RefIcon.displayName = 'HolderOutlined';
  73073. }
  73074. /* harmony default export */ var icons_HolderOutlined = (HolderOutlined_RefIcon);
  73075. // EXTERNAL MODULE: ./components/tree/style/index.ts + 1 modules
  73076. var tree_style = __webpack_require__("./components/tree/style/index.ts");
  73077. ;// ./components/tree/utils/dropIndicator.tsx
  73078. const dropIndicator_offset = 4;
  73079. function dropIndicatorRender(props) {
  73080. const {
  73081. dropPosition,
  73082. dropLevelOffset,
  73083. prefixCls,
  73084. indent,
  73085. direction = 'ltr'
  73086. } = props;
  73087. const startPosition = direction === 'ltr' ? 'left' : 'right';
  73088. const endPosition = direction === 'ltr' ? 'right' : 'left';
  73089. const style = {
  73090. [startPosition]: -dropLevelOffset * indent + dropIndicator_offset,
  73091. [endPosition]: 0
  73092. };
  73093. switch (dropPosition) {
  73094. case -1:
  73095. style.top = -3;
  73096. break;
  73097. case 1:
  73098. style.bottom = -3;
  73099. break;
  73100. default:
  73101. // dropPosition === 0
  73102. style.bottom = -3;
  73103. style[startPosition] = indent + dropIndicator_offset;
  73104. break;
  73105. }
  73106. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  73107. style: style,
  73108. className: `${prefixCls}-drop-indicator`
  73109. });
  73110. }
  73111. /* harmony default export */ var dropIndicator = (dropIndicatorRender);
  73112. ;// ./node_modules/@ant-design/icons-svg/es/asn/CaretDownFilled.js
  73113. // This icon file is generated automatically.
  73114. var CaretDownFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, "name": "caret-down", "theme": "filled" };
  73115. /* harmony default export */ var asn_CaretDownFilled = (CaretDownFilled);
  73116. ;// ./node_modules/@ant-design/icons/es/icons/CaretDownFilled.js
  73117. // GENERATE BY ./scripts/generate.ts
  73118. // DON NOT EDIT IT MANUALLY
  73119. var CaretDownFilled_CaretDownFilled = function CaretDownFilled(props, ref) {
  73120. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73121. ref: ref,
  73122. icon: asn_CaretDownFilled
  73123. }));
  73124. };
  73125. /**![caret-down](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg0MC40IDMwMEgxODMuNmMtMTkuNyAwLTMwLjcgMjAuOC0xOC41IDM1bDMyOC40IDM4MC44YzkuNCAxMC45IDI3LjUgMTAuOSAzNyAwTDg1OC45IDMzNWMxMi4yLTE0LjIgMS4yLTM1LTE4LjUtMzV6IiAvPjwvc3ZnPg==) */
  73126. var CaretDownFilled_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CaretDownFilled_CaretDownFilled);
  73127. if (true) {
  73128. CaretDownFilled_RefIcon.displayName = 'CaretDownFilled';
  73129. }
  73130. /* harmony default export */ var icons_CaretDownFilled = (CaretDownFilled_RefIcon);
  73131. ;// ./node_modules/@ant-design/icons-svg/es/asn/MinusSquareOutlined.js
  73132. // This icon file is generated automatically.
  73133. var MinusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "minus-square", "theme": "outlined" };
  73134. /* harmony default export */ var asn_MinusSquareOutlined = (MinusSquareOutlined);
  73135. ;// ./node_modules/@ant-design/icons/es/icons/MinusSquareOutlined.js
  73136. // GENERATE BY ./scripts/generate.ts
  73137. // DON NOT EDIT IT MANUALLY
  73138. var MinusSquareOutlined_MinusSquareOutlined = function MinusSquareOutlined(props, ref) {
  73139. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73140. ref: ref,
  73141. icon: asn_MinusSquareOutlined
  73142. }));
  73143. };
  73144. /**![minus-square](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMyOCA1NDRoMzY4YzQuNCAwIDgtMy42IDgtOHYtNDhjMC00LjQtMy42LTgtOC04SDMyOGMtNC40IDAtOCAzLjYtOCA4djQ4YzAgNC40IDMuNiA4IDggOHoiIC8+PHBhdGggZD0iTTg4MCAxMTJIMTQ0Yy0xNy43IDAtMzIgMTQuMy0zMiAzMnY3MzZjMCAxNy43IDE0LjMgMzIgMzIgMzJoNzM2YzE3LjcgMCAzMi0xNC4zIDMyLTMyVjE0NGMwLTE3LjctMTQuMy0zMi0zMi0zMnptLTQwIDcyOEgxODRWMTg0aDY1NnY2NTZ6IiAvPjwvc3ZnPg==) */
  73145. var MinusSquareOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(MinusSquareOutlined_MinusSquareOutlined);
  73146. if (true) {
  73147. MinusSquareOutlined_RefIcon.displayName = 'MinusSquareOutlined';
  73148. }
  73149. /* harmony default export */ var icons_MinusSquareOutlined = (MinusSquareOutlined_RefIcon);
  73150. ;// ./node_modules/@ant-design/icons-svg/es/asn/PlusSquareOutlined.js
  73151. // This icon file is generated automatically.
  73152. var PlusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "plus-square", "theme": "outlined" };
  73153. /* harmony default export */ var asn_PlusSquareOutlined = (PlusSquareOutlined);
  73154. ;// ./node_modules/@ant-design/icons/es/icons/PlusSquareOutlined.js
  73155. // GENERATE BY ./scripts/generate.ts
  73156. // DON NOT EDIT IT MANUALLY
  73157. var PlusSquareOutlined_PlusSquareOutlined = function PlusSquareOutlined(props, ref) {
  73158. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  73159. ref: ref,
  73160. icon: asn_PlusSquareOutlined
  73161. }));
  73162. };
  73163. /**![plus-square](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMyOCA1NDRoMTUydjE1MmMwIDQuNCAzLjYgOCA4IDhoNDhjNC40IDAgOC0zLjYgOC04VjU0NGgxNTJjNC40IDAgOC0zLjYgOC04di00OGMwLTQuNC0zLjYtOC04LThINTQ0VjMyOGMwLTQuNC0zLjYtOC04LThoLTQ4Yy00LjQgMC04IDMuNi04IDh2MTUySDMyOGMtNC40IDAtOCAzLjYtOCA4djQ4YzAgNC40IDMuNiA4IDggOHoiIC8+PHBhdGggZD0iTTg4MCAxMTJIMTQ0Yy0xNy43IDAtMzIgMTQuMy0zMiAzMnY3MzZjMCAxNy43IDE0LjMgMzIgMzIgMzJoNzM2YzE3LjcgMCAzMi0xNC4zIDMyLTMyVjE0NGMwLTE3LjctMTQuMy0zMi0zMi0zMnptLTQwIDcyOEgxODRWMTg0aDY1NnY2NTZ6IiAvPjwvc3ZnPg==) */
  73164. var PlusSquareOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PlusSquareOutlined_PlusSquareOutlined);
  73165. if (true) {
  73166. PlusSquareOutlined_RefIcon.displayName = 'PlusSquareOutlined';
  73167. }
  73168. /* harmony default export */ var icons_PlusSquareOutlined = (PlusSquareOutlined_RefIcon);
  73169. ;// ./components/tree/utils/iconUtil.tsx
  73170. const SwitcherIconCom = props => {
  73171. var _a, _b;
  73172. const {
  73173. prefixCls,
  73174. switcherIcon,
  73175. treeNodeProps,
  73176. showLine,
  73177. switcherLoadingIcon
  73178. } = props;
  73179. const {
  73180. isLeaf,
  73181. expanded,
  73182. loading
  73183. } = treeNodeProps;
  73184. if (loading) {
  73185. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(switcherLoadingIcon)) {
  73186. return switcherLoadingIcon;
  73187. }
  73188. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, {
  73189. className: `${prefixCls}-switcher-loading-icon`
  73190. });
  73191. }
  73192. let showLeafIcon;
  73193. if (showLine && typeof showLine === 'object') {
  73194. showLeafIcon = showLine.showLeafIcon;
  73195. }
  73196. if (isLeaf) {
  73197. if (!showLine) {
  73198. return null;
  73199. }
  73200. if (typeof showLeafIcon !== 'boolean' && !!showLeafIcon) {
  73201. const leafIcon = typeof showLeafIcon === 'function' ? showLeafIcon(treeNodeProps) : showLeafIcon;
  73202. const leafCls = `${prefixCls}-switcher-line-custom-icon`;
  73203. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(leafIcon)) {
  73204. return (0,reactNode.cloneElement)(leafIcon, {
  73205. className: classnames_default()((_a = leafIcon.props) === null || _a === void 0 ? void 0 : _a.className, leafCls)
  73206. });
  73207. }
  73208. return leafIcon;
  73209. }
  73210. return showLeafIcon ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FileOutlined, {
  73211. className: `${prefixCls}-switcher-line-icon`
  73212. })) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  73213. className: `${prefixCls}-switcher-leaf-line`
  73214. }));
  73215. }
  73216. const switcherCls = `${prefixCls}-switcher-icon`;
  73217. const switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;
  73218. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(switcher)) {
  73219. return (0,reactNode.cloneElement)(switcher, {
  73220. className: classnames_default()((_b = switcher.props) === null || _b === void 0 ? void 0 : _b.className, switcherCls)
  73221. });
  73222. }
  73223. if (switcher !== undefined) {
  73224. return switcher;
  73225. }
  73226. if (showLine) {
  73227. return expanded ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_MinusSquareOutlined, {
  73228. className: `${prefixCls}-switcher-line-icon`
  73229. })) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PlusSquareOutlined, {
  73230. className: `${prefixCls}-switcher-line-icon`
  73231. }));
  73232. }
  73233. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CaretDownFilled, {
  73234. className: switcherCls
  73235. });
  73236. };
  73237. /* harmony default export */ var iconUtil = (SwitcherIconCom);
  73238. ;// ./components/tree/Tree.tsx
  73239. const Tree_Tree = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
  73240. var _a;
  73241. const {
  73242. getPrefixCls,
  73243. direction,
  73244. virtual,
  73245. tree
  73246. } = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(config_provider_context.ConfigContext);
  73247. const {
  73248. prefixCls: customizePrefixCls,
  73249. className,
  73250. showIcon = false,
  73251. showLine,
  73252. switcherIcon,
  73253. switcherLoadingIcon,
  73254. blockNode = false,
  73255. children,
  73256. checkable = false,
  73257. selectable = true,
  73258. draggable,
  73259. motion: customMotion,
  73260. style
  73261. } = props;
  73262. const prefixCls = getPrefixCls('tree', customizePrefixCls);
  73263. const rootPrefixCls = getPrefixCls();
  73264. const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, (0,_util_motion["default"])(rootPrefixCls)), {
  73265. motionAppear: false
  73266. });
  73267. const newProps = Object.assign(Object.assign({}, props), {
  73268. checkable,
  73269. selectable,
  73270. showIcon,
  73271. motion,
  73272. blockNode,
  73273. showLine: Boolean(showLine),
  73274. dropIndicatorRender: dropIndicator
  73275. });
  73276. const [wrapCSSVar, hashId, cssVarCls] = (0,tree_style["default"])(prefixCls);
  73277. const [, token] = (0,useToken["default"])();
  73278. const itemHeight = token.paddingXS / 2 + (((_a = token.Tree) === null || _a === void 0 ? void 0 : _a.titleHeight) || token.controlHeightSM);
  73279. const draggableConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  73280. if (!draggable) {
  73281. return false;
  73282. }
  73283. let mergedDraggable = {};
  73284. switch (typeof draggable) {
  73285. case 'function':
  73286. mergedDraggable.nodeDraggable = draggable;
  73287. break;
  73288. case 'object':
  73289. mergedDraggable = Object.assign({}, draggable);
  73290. break;
  73291. default:
  73292. break;
  73293. // Do nothing
  73294. }
  73295. if (mergedDraggable.icon !== false) {
  73296. mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_HolderOutlined, null);
  73297. }
  73298. return mergedDraggable;
  73299. }, [draggable]);
  73300. const renderSwitcherIcon = nodeProps => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(iconUtil, {
  73301. prefixCls: prefixCls,
  73302. switcherIcon: switcherIcon,
  73303. switcherLoadingIcon: switcherLoadingIcon,
  73304. treeNodeProps: nodeProps,
  73305. showLine: showLine
  73306. }));
  73307. return wrapCSSVar(
  73308. /*#__PURE__*/
  73309. // @ts-ignore
  73310. external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(rc_tree_es, Object.assign({
  73311. itemHeight: itemHeight,
  73312. ref: ref,
  73313. virtual: virtual
  73314. }, newProps, {
  73315. // newProps may contain style so declare style below it
  73316. style: Object.assign(Object.assign({}, tree === null || tree === void 0 ? void 0 : tree.style), style),
  73317. prefixCls: prefixCls,
  73318. className: classnames_default()({
  73319. [`${prefixCls}-icon-hide`]: !showIcon,
  73320. [`${prefixCls}-block-node`]: blockNode,
  73321. [`${prefixCls}-unselectable`]: !selectable,
  73322. [`${prefixCls}-rtl`]: direction === 'rtl'
  73323. }, tree === null || tree === void 0 ? void 0 : tree.className, className, hashId, cssVarCls),
  73324. direction: direction,
  73325. checkable: checkable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  73326. className: `${prefixCls}-checkbox-inner`
  73327. }) : checkable,
  73328. selectable: selectable,
  73329. switcherIcon: renderSwitcherIcon,
  73330. draggable: draggableConfig
  73331. }), children));
  73332. });
  73333. if (true) {
  73334. Tree_Tree.displayName = 'Tree';
  73335. }
  73336. /* harmony default export */ var tree_Tree = (Tree_Tree);
  73337. ;// ./components/tree/utils/dictUtil.ts
  73338. const RECORD_NONE = 0;
  73339. const RECORD_START = 1;
  73340. const RECORD_END = 2;
  73341. function traverseNodesKey(treeData, callback, fieldNames) {
  73342. const {
  73343. key: fieldKey,
  73344. children: fieldChildren
  73345. } = fieldNames;
  73346. function processNode(dataNode) {
  73347. const key = dataNode[fieldKey];
  73348. const children = dataNode[fieldChildren];
  73349. if (callback(key, dataNode) !== false) {
  73350. traverseNodesKey(children || [], callback, fieldNames);
  73351. }
  73352. }
  73353. treeData.forEach(processNode);
  73354. }
  73355. /** 计算选中范围,只考虑expanded情况以优化性能 */
  73356. function calcRangeKeys({
  73357. treeData,
  73358. expandedKeys,
  73359. startKey,
  73360. endKey,
  73361. fieldNames
  73362. }) {
  73363. const keys = [];
  73364. let record = RECORD_NONE;
  73365. if (startKey && startKey === endKey) {
  73366. return [startKey];
  73367. }
  73368. if (!startKey || !endKey) {
  73369. return [];
  73370. }
  73371. function matchKey(key) {
  73372. return key === startKey || key === endKey;
  73373. }
  73374. traverseNodesKey(treeData, key => {
  73375. if (record === RECORD_END) {
  73376. return false;
  73377. }
  73378. if (matchKey(key)) {
  73379. // Match test
  73380. keys.push(key);
  73381. if (record === RECORD_NONE) {
  73382. record = RECORD_START;
  73383. } else if (record === RECORD_START) {
  73384. record = RECORD_END;
  73385. return false;
  73386. }
  73387. } else if (record === RECORD_START) {
  73388. // Append selection
  73389. keys.push(key);
  73390. }
  73391. return expandedKeys.includes(key);
  73392. }, treeUtil_fillFieldNames(fieldNames));
  73393. return keys;
  73394. }
  73395. function convertDirectoryKeysToNodes(treeData, keys, fieldNames) {
  73396. const restKeys = (0,toConsumableArray["default"])(keys);
  73397. const nodes = [];
  73398. traverseNodesKey(treeData, (key, node) => {
  73399. const index = restKeys.indexOf(key);
  73400. if (index !== -1) {
  73401. nodes.push(node);
  73402. restKeys.splice(index, 1);
  73403. }
  73404. return !!restKeys.length;
  73405. }, treeUtil_fillFieldNames(fieldNames));
  73406. return nodes;
  73407. }
  73408. ;// ./components/tree/DirectoryTree.tsx
  73409. var DirectoryTree_rest = undefined && undefined.__rest || function (s, e) {
  73410. var t = {};
  73411. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  73412. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  73413. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  73414. }
  73415. return t;
  73416. };
  73417. function getIcon(props) {
  73418. const {
  73419. isLeaf,
  73420. expanded
  73421. } = props;
  73422. if (isLeaf) {
  73423. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FileOutlined, null);
  73424. }
  73425. return expanded ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FolderOpenOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FolderOutlined, null);
  73426. }
  73427. function getTreeData({
  73428. treeData,
  73429. children
  73430. }) {
  73431. return treeData || convertTreeToData(children);
  73432. }
  73433. const DirectoryTree = (_a, ref) => {
  73434. var {
  73435. defaultExpandAll,
  73436. defaultExpandParent,
  73437. defaultExpandedKeys
  73438. } = _a,
  73439. props = DirectoryTree_rest(_a, ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"]);
  73440. // Shift click usage
  73441. const lastSelectedKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  73442. const cachedSelectedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  73443. const getInitExpandedKeys = () => {
  73444. const {
  73445. keyEntities
  73446. } = convertDataToEntities(getTreeData(props));
  73447. let initExpandedKeys;
  73448. // Expanded keys
  73449. if (defaultExpandAll) {
  73450. initExpandedKeys = Object.keys(keyEntities);
  73451. } else if (defaultExpandParent) {
  73452. initExpandedKeys = conductExpandParent(props.expandedKeys || defaultExpandedKeys || [], keyEntities);
  73453. } else {
  73454. initExpandedKeys = props.expandedKeys || defaultExpandedKeys || [];
  73455. }
  73456. return initExpandedKeys;
  73457. };
  73458. const [selectedKeys, setSelectedKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(props.selectedKeys || props.defaultSelectedKeys || []);
  73459. const [expandedKeys, setExpandedKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => getInitExpandedKeys());
  73460. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  73461. if ('selectedKeys' in props) {
  73462. setSelectedKeys(props.selectedKeys);
  73463. }
  73464. }, [props.selectedKeys]);
  73465. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  73466. if ('expandedKeys' in props) {
  73467. setExpandedKeys(props.expandedKeys);
  73468. }
  73469. }, [props.expandedKeys]);
  73470. const onExpand = (keys, info) => {
  73471. var _a;
  73472. if (!('expandedKeys' in props)) {
  73473. setExpandedKeys(keys);
  73474. }
  73475. // Call origin function
  73476. return (_a = props.onExpand) === null || _a === void 0 ? void 0 : _a.call(props, keys, info);
  73477. };
  73478. const onSelect = (keys, event) => {
  73479. var _a;
  73480. const {
  73481. multiple,
  73482. fieldNames
  73483. } = props;
  73484. const {
  73485. node,
  73486. nativeEvent
  73487. } = event;
  73488. const {
  73489. key = ''
  73490. } = node;
  73491. const treeData = getTreeData(props);
  73492. // const newState: DirectoryTreeState = {};
  73493. // We need wrap this event since some value is not same
  73494. const newEvent = Object.assign(Object.assign({}, event), {
  73495. selected: true
  73496. });
  73497. // Windows / Mac single pick
  73498. const ctrlPick = (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.ctrlKey) || (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.metaKey);
  73499. const shiftPick = nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.shiftKey;
  73500. // Generate new selected keys
  73501. let newSelectedKeys;
  73502. if (multiple && ctrlPick) {
  73503. // Control click
  73504. newSelectedKeys = keys;
  73505. lastSelectedKey.current = key;
  73506. cachedSelectedKeys.current = newSelectedKeys;
  73507. newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
  73508. } else if (multiple && shiftPick) {
  73509. // Shift click
  73510. newSelectedKeys = Array.from(new Set([].concat((0,toConsumableArray["default"])(cachedSelectedKeys.current || []), (0,toConsumableArray["default"])(calcRangeKeys({
  73511. treeData,
  73512. expandedKeys,
  73513. startKey: key,
  73514. endKey: lastSelectedKey.current,
  73515. fieldNames
  73516. })))));
  73517. newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
  73518. } else {
  73519. // Single click
  73520. newSelectedKeys = [key];
  73521. lastSelectedKey.current = key;
  73522. cachedSelectedKeys.current = newSelectedKeys;
  73523. newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
  73524. }
  73525. (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, newSelectedKeys, newEvent);
  73526. if (!('selectedKeys' in props)) {
  73527. setSelectedKeys(newSelectedKeys);
  73528. }
  73529. };
  73530. const {
  73531. getPrefixCls,
  73532. direction
  73533. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  73534. const {
  73535. prefixCls: customizePrefixCls,
  73536. className,
  73537. showIcon = true,
  73538. expandAction = 'click'
  73539. } = props,
  73540. otherProps = DirectoryTree_rest(props, ["prefixCls", "className", "showIcon", "expandAction"]);
  73541. const prefixCls = getPrefixCls('tree', customizePrefixCls);
  73542. const connectClassName = classnames_default()(`${prefixCls}-directory`, {
  73543. [`${prefixCls}-directory-rtl`]: direction === 'rtl'
  73544. }, className);
  73545. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(tree_Tree, Object.assign({
  73546. icon: getIcon,
  73547. ref: ref,
  73548. blockNode: true
  73549. }, otherProps, {
  73550. showIcon: showIcon,
  73551. expandAction: expandAction,
  73552. prefixCls: prefixCls,
  73553. className: connectClassName,
  73554. expandedKeys: expandedKeys,
  73555. selectedKeys: selectedKeys,
  73556. onSelect: onSelect,
  73557. onExpand: onExpand
  73558. }));
  73559. };
  73560. const ForwardDirectoryTree = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DirectoryTree);
  73561. if (true) {
  73562. ForwardDirectoryTree.displayName = 'DirectoryTree';
  73563. }
  73564. /* harmony default export */ var tree_DirectoryTree = (ForwardDirectoryTree);
  73565. ;// ./components/tree/index.tsx
  73566. const components_tree_Tree = tree_Tree;
  73567. components_tree_Tree.DirectoryTree = tree_DirectoryTree;
  73568. components_tree_Tree.TreeNode = es_TreeNode;
  73569. /* harmony default export */ var tree = (components_tree_Tree);
  73570. ;// ./components/table/hooks/useFilter/FilterSearch.tsx
  73571. const FilterSearch = props => {
  73572. const {
  73573. value,
  73574. filterSearch,
  73575. tablePrefixCls,
  73576. locale,
  73577. onChange
  73578. } = props;
  73579. if (!filterSearch) {
  73580. return null;
  73581. }
  73582. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  73583. className: `${tablePrefixCls}-filter-dropdown-search`
  73584. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, {
  73585. prefix: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, null),
  73586. placeholder: locale.filterSearchPlaceholder,
  73587. onChange: onChange,
  73588. value: value,
  73589. // for skip min-width of input
  73590. htmlSize: 1,
  73591. className: `${tablePrefixCls}-filter-dropdown-search-input`
  73592. }));
  73593. };
  73594. /* harmony default export */ var useFilter_FilterSearch = (FilterSearch);
  73595. ;// ./components/table/hooks/useFilter/FilterWrapper.tsx
  73596. const onKeyDown = event => {
  73597. const {
  73598. keyCode
  73599. } = event;
  73600. if (keyCode === KeyCode["default"].ENTER) {
  73601. event.stopPropagation();
  73602. }
  73603. };
  73604. const FilterDropdownMenuWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  73605. className: props.className,
  73606. onClick: e => e.stopPropagation(),
  73607. onKeyDown: onKeyDown,
  73608. ref: ref
  73609. }, props.children)));
  73610. if (true) {
  73611. FilterDropdownMenuWrapper.displayName = 'FilterDropdownMenuWrapper';
  73612. }
  73613. /* harmony default export */ var FilterWrapper = (FilterDropdownMenuWrapper);
  73614. ;// ./components/table/hooks/useFilter/FilterDropdown.tsx
  73615. function flattenKeys(filters) {
  73616. let keys = [];
  73617. (filters || []).forEach(({
  73618. value,
  73619. children
  73620. }) => {
  73621. keys.push(value);
  73622. if (children) {
  73623. keys = [].concat((0,toConsumableArray["default"])(keys), (0,toConsumableArray["default"])(flattenKeys(children)));
  73624. }
  73625. });
  73626. return keys;
  73627. }
  73628. function hasSubMenu(filters) {
  73629. return filters.some(({
  73630. children
  73631. }) => children);
  73632. }
  73633. function searchValueMatched(searchValue, text) {
  73634. if (typeof text === 'string' || typeof text === 'number') {
  73635. return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());
  73636. }
  73637. return false;
  73638. }
  73639. function renderFilterItems({
  73640. filters,
  73641. prefixCls,
  73642. filteredKeys,
  73643. filterMultiple,
  73644. searchValue,
  73645. filterSearch
  73646. }) {
  73647. return filters.map((filter, index) => {
  73648. const key = String(filter.value);
  73649. if (filter.children) {
  73650. return {
  73651. key: key || index,
  73652. label: filter.text,
  73653. popupClassName: `${prefixCls}-dropdown-submenu`,
  73654. children: renderFilterItems({
  73655. filters: filter.children,
  73656. prefixCls,
  73657. filteredKeys,
  73658. filterMultiple,
  73659. searchValue,
  73660. filterSearch
  73661. })
  73662. };
  73663. }
  73664. const Component = filterMultiple ? components_checkbox : components_radio;
  73665. const item = {
  73666. key: filter.value !== undefined ? key : index,
  73667. label: (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, {
  73668. checked: filteredKeys.includes(key)
  73669. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, filter.text)))
  73670. };
  73671. if (searchValue.trim()) {
  73672. if (typeof filterSearch === 'function') {
  73673. return filterSearch(searchValue, filter) ? item : null;
  73674. }
  73675. return searchValueMatched(searchValue, filter.text) ? item : null;
  73676. }
  73677. return item;
  73678. });
  73679. }
  73680. function wrapStringListType(keys) {
  73681. return keys || [];
  73682. }
  73683. const FilterDropdown = props => {
  73684. var _a, _b, _c, _d;
  73685. const {
  73686. tablePrefixCls,
  73687. prefixCls,
  73688. column,
  73689. dropdownPrefixCls,
  73690. columnKey,
  73691. filterOnClose,
  73692. filterMultiple,
  73693. filterMode = 'menu',
  73694. filterSearch = false,
  73695. filterState,
  73696. triggerFilter,
  73697. locale,
  73698. children,
  73699. getPopupContainer,
  73700. rootClassName
  73701. } = props;
  73702. const {
  73703. filterResetToDefaultFilteredValue,
  73704. defaultFilteredValue,
  73705. filterDropdownProps = {},
  73706. // Deprecated
  73707. filterDropdownOpen,
  73708. filterDropdownVisible,
  73709. onFilterDropdownVisibleChange,
  73710. onFilterDropdownOpenChange
  73711. } = column;
  73712. const [visible, setVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  73713. const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));
  73714. const triggerVisible = newVisible => {
  73715. var _a;
  73716. setVisible(newVisible);
  73717. (_a = filterDropdownProps.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(filterDropdownProps, newVisible);
  73718. // deprecated
  73719. onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);
  73720. onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);
  73721. };
  73722. // =================Warning===================
  73723. if (true) {
  73724. const warning = (0,_util_warning.devUseWarning)('Table');
  73725. const deprecatedList = [['filterDropdownOpen', 'filterDropdownProps.open'], ['filterDropdownVisible', 'filterDropdownProps.open'], ['onFilterDropdownOpenChange', 'filterDropdownProps.onOpenChange'], ['onFilterDropdownVisibleChange', 'filterDropdownProps.onOpenChange']];
  73726. deprecatedList.forEach(([deprecatedName, newName]) => {
  73727. warning.deprecated(!(deprecatedName in column), deprecatedName, newName);
  73728. });
  73729. warning.deprecated(!('filterCheckall' in locale), 'filterCheckall', 'locale.filterCheckAll');
  73730. }
  73731. const mergedVisible = (_d = (_c = (_b = filterDropdownProps.open) !== null && _b !== void 0 ? _b : filterDropdownOpen) !== null && _c !== void 0 ? _c : filterDropdownVisible) !== null && _d !== void 0 ? _d : visible; // inner state
  73732. // ===================== Select Keys =====================
  73733. const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;
  73734. const [getFilteredKeysSync, setFilteredKeysSync] = hooks_useSyncState_useSyncState(wrapStringListType(propFilteredKeys));
  73735. const onSelectKeys = ({
  73736. selectedKeys
  73737. }) => {
  73738. setFilteredKeysSync(selectedKeys);
  73739. };
  73740. const onCheck = (keys, {
  73741. node,
  73742. checked
  73743. }) => {
  73744. if (!filterMultiple) {
  73745. onSelectKeys({
  73746. selectedKeys: checked && node.key ? [node.key] : []
  73747. });
  73748. } else {
  73749. onSelectKeys({
  73750. selectedKeys: keys
  73751. });
  73752. }
  73753. };
  73754. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  73755. if (!visible) {
  73756. return;
  73757. }
  73758. onSelectKeys({
  73759. selectedKeys: wrapStringListType(propFilteredKeys)
  73760. });
  73761. }, [propFilteredKeys]);
  73762. // ====================== Open Keys ======================
  73763. const [openKeys, setOpenKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  73764. const onOpenChange = keys => {
  73765. setOpenKeys(keys);
  73766. };
  73767. // search in tree mode column filter
  73768. const [searchValue, setSearchValue] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('');
  73769. const onSearch = e => {
  73770. const {
  73771. value
  73772. } = e.target;
  73773. setSearchValue(value);
  73774. };
  73775. // clear search value after close filter dropdown
  73776. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  73777. if (!visible) {
  73778. setSearchValue('');
  73779. }
  73780. }, [visible]);
  73781. // ======================= Submit ========================
  73782. const internalTriggerFilter = keys => {
  73783. const mergedKeys = (keys === null || keys === void 0 ? void 0 : keys.length) ? keys : null;
  73784. if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {
  73785. return null;
  73786. }
  73787. if ((0,isEqual["default"])(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {
  73788. return null;
  73789. }
  73790. triggerFilter({
  73791. column,
  73792. key: columnKey,
  73793. filteredKeys: mergedKeys
  73794. });
  73795. };
  73796. const onConfirm = () => {
  73797. triggerVisible(false);
  73798. internalTriggerFilter(getFilteredKeysSync());
  73799. };
  73800. const onReset = ({
  73801. confirm,
  73802. closeDropdown
  73803. } = {
  73804. confirm: false,
  73805. closeDropdown: false
  73806. }) => {
  73807. if (confirm) {
  73808. internalTriggerFilter([]);
  73809. }
  73810. if (closeDropdown) {
  73811. triggerVisible(false);
  73812. }
  73813. setSearchValue('');
  73814. if (filterResetToDefaultFilteredValue) {
  73815. setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));
  73816. } else {
  73817. setFilteredKeysSync([]);
  73818. }
  73819. };
  73820. const doFilter = ({
  73821. closeDropdown
  73822. } = {
  73823. closeDropdown: true
  73824. }) => {
  73825. if (closeDropdown) {
  73826. triggerVisible(false);
  73827. }
  73828. internalTriggerFilter(getFilteredKeysSync());
  73829. };
  73830. const onVisibleChange = (newVisible, info) => {
  73831. if (info.source === 'trigger') {
  73832. if (newVisible && propFilteredKeys !== undefined) {
  73833. // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefined)
  73834. setFilteredKeysSync(wrapStringListType(propFilteredKeys));
  73835. }
  73836. triggerVisible(newVisible);
  73837. if (!newVisible && !column.filterDropdown && filterOnClose) {
  73838. onConfirm();
  73839. }
  73840. }
  73841. };
  73842. // ======================== Style ========================
  73843. const dropdownMenuClass = classnames_default()({
  73844. [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])
  73845. });
  73846. const onCheckAll = e => {
  73847. if (e.target.checked) {
  73848. const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));
  73849. setFilteredKeysSync(allFilterKeys);
  73850. } else {
  73851. setFilteredKeysSync([]);
  73852. }
  73853. };
  73854. const getTreeData = ({
  73855. filters
  73856. }) => (filters || []).map((filter, index) => {
  73857. const key = String(filter.value);
  73858. const item = {
  73859. title: filter.text,
  73860. key: filter.value !== undefined ? key : String(index)
  73861. };
  73862. if (filter.children) {
  73863. item.children = getTreeData({
  73864. filters: filter.children
  73865. });
  73866. }
  73867. return item;
  73868. });
  73869. const getFilterData = node => {
  73870. var _a;
  73871. return Object.assign(Object.assign({}, node), {
  73872. text: node.title,
  73873. value: node.key,
  73874. children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []
  73875. });
  73876. };
  73877. let dropdownContent;
  73878. const {
  73879. direction,
  73880. renderEmpty
  73881. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  73882. if (typeof column.filterDropdown === 'function') {
  73883. dropdownContent = column.filterDropdown({
  73884. prefixCls: `${dropdownPrefixCls}-custom`,
  73885. setSelectedKeys: selectedKeys => onSelectKeys({
  73886. selectedKeys: selectedKeys
  73887. }),
  73888. selectedKeys: getFilteredKeysSync(),
  73889. confirm: doFilter,
  73890. clearFilters: onReset,
  73891. filters: column.filters,
  73892. visible: mergedVisible,
  73893. close: () => {
  73894. triggerVisible(false);
  73895. }
  73896. });
  73897. } else if (column.filterDropdown) {
  73898. dropdownContent = column.filterDropdown;
  73899. } else {
  73900. const selectedKeys = getFilteredKeysSync() || [];
  73901. const getFilterComponent = () => {
  73902. var _a, _b;
  73903. const empty = (_a = renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table.filter')) !== null && _a !== void 0 ? _a : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_empty, {
  73904. image: components_empty.PRESENTED_IMAGE_SIMPLE,
  73905. description: locale.filterEmptyText,
  73906. styles: {
  73907. image: {
  73908. height: 24
  73909. }
  73910. },
  73911. style: {
  73912. margin: 0,
  73913. padding: '16px 0'
  73914. }
  73915. }));
  73916. if ((column.filters || []).length === 0) {
  73917. return empty;
  73918. }
  73919. if (filterMode === 'tree') {
  73920. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useFilter_FilterSearch, {
  73921. filterSearch: filterSearch,
  73922. value: searchValue,
  73923. onChange: onSearch,
  73924. tablePrefixCls: tablePrefixCls,
  73925. locale: locale
  73926. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  73927. className: `${tablePrefixCls}-filter-dropdown-tree`
  73928. }, filterMultiple ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, {
  73929. checked: selectedKeys.length === flattenKeys(column.filters).length,
  73930. indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,
  73931. className: `${tablePrefixCls}-filter-dropdown-checkall`,
  73932. onChange: onCheckAll
  73933. }, (_b = locale === null || locale === void 0 ? void 0 : locale.filterCheckall) !== null && _b !== void 0 ? _b : locale === null || locale === void 0 ? void 0 : locale.filterCheckAll)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(tree, {
  73934. checkable: true,
  73935. selectable: false,
  73936. blockNode: true,
  73937. multiple: filterMultiple,
  73938. checkStrictly: !filterMultiple,
  73939. className: `${dropdownPrefixCls}-menu`,
  73940. onCheck: onCheck,
  73941. checkedKeys: selectedKeys,
  73942. selectedKeys: selectedKeys,
  73943. showIcon: false,
  73944. treeData: getTreeData({
  73945. filters: column.filters
  73946. }),
  73947. autoExpandParent: true,
  73948. defaultExpandAll: true,
  73949. filterTreeNode: searchValue.trim() ? node => {
  73950. if (typeof filterSearch === 'function') {
  73951. return filterSearch(searchValue, getFilterData(node));
  73952. }
  73953. return searchValueMatched(searchValue, node.title);
  73954. } : undefined
  73955. })));
  73956. }
  73957. const items = renderFilterItems({
  73958. filters: column.filters || [],
  73959. filterSearch,
  73960. prefixCls,
  73961. filteredKeys: getFilteredKeysSync(),
  73962. filterMultiple,
  73963. searchValue
  73964. });
  73965. const isEmpty = items.every(item => item === null);
  73966. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useFilter_FilterSearch, {
  73967. filterSearch: filterSearch,
  73968. value: searchValue,
  73969. onChange: onSearch,
  73970. tablePrefixCls: tablePrefixCls,
  73971. locale: locale
  73972. }), isEmpty ? empty : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_menu, {
  73973. selectable: true,
  73974. multiple: filterMultiple,
  73975. prefixCls: `${dropdownPrefixCls}-menu`,
  73976. className: dropdownMenuClass,
  73977. onSelect: onSelectKeys,
  73978. onDeselect: onSelectKeys,
  73979. selectedKeys: selectedKeys,
  73980. getPopupContainer: getPopupContainer,
  73981. openKeys: openKeys,
  73982. onOpenChange: onOpenChange,
  73983. items: items
  73984. })));
  73985. };
  73986. const getResetDisabled = () => {
  73987. if (filterResetToDefaultFilteredValue) {
  73988. return (0,isEqual["default"])((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);
  73989. }
  73990. return selectedKeys.length === 0;
  73991. };
  73992. dropdownContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, getFilterComponent(), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  73993. className: `${prefixCls}-dropdown-btns`
  73994. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  73995. type: "link",
  73996. size: "small",
  73997. disabled: getResetDisabled(),
  73998. onClick: () => onReset()
  73999. }, locale.filterReset), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  74000. type: "primary",
  74001. size: "small",
  74002. onClick: onConfirm
  74003. }, locale.filterConfirm)));
  74004. }
  74005. // We should not block customize Menu with additional props
  74006. if (column.filterDropdown) {
  74007. dropdownContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(OverrideProvider, {
  74008. selectable: undefined
  74009. }, dropdownContent);
  74010. }
  74011. dropdownContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(FilterWrapper, {
  74012. className: `${prefixCls}-dropdown`
  74013. }, dropdownContent);
  74014. const getDropdownTrigger = () => {
  74015. let filterIcon;
  74016. if (typeof column.filterIcon === 'function') {
  74017. filterIcon = column.filterIcon(filtered);
  74018. } else if (column.filterIcon) {
  74019. filterIcon = column.filterIcon;
  74020. } else {
  74021. filterIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FilterFilled, null);
  74022. }
  74023. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  74024. role: "button",
  74025. tabIndex: -1,
  74026. className: classnames_default()(`${prefixCls}-trigger`, {
  74027. active: filtered
  74028. }),
  74029. onClick: e => {
  74030. e.stopPropagation();
  74031. }
  74032. }, filterIcon);
  74033. };
  74034. const mergedDropdownProps = extendsObject({
  74035. trigger: ['click'],
  74036. placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight',
  74037. children: getDropdownTrigger(),
  74038. getPopupContainer
  74039. }, Object.assign(Object.assign({}, filterDropdownProps), {
  74040. rootClassName: classnames_default()(rootClassName, filterDropdownProps.rootClassName),
  74041. open: mergedVisible,
  74042. onOpenChange: onVisibleChange,
  74043. popupRender: () => {
  74044. if (typeof (filterDropdownProps === null || filterDropdownProps === void 0 ? void 0 : filterDropdownProps.dropdownRender) === 'function') {
  74045. return filterDropdownProps.dropdownRender(dropdownContent);
  74046. }
  74047. return dropdownContent;
  74048. }
  74049. }));
  74050. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  74051. className: `${prefixCls}-column`
  74052. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  74053. className: `${tablePrefixCls}-column-title`
  74054. }, children), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_dropdown, Object.assign({}, mergedDropdownProps)));
  74055. };
  74056. /* harmony default export */ var useFilter_FilterDropdown = (FilterDropdown);
  74057. ;// ./components/table/hooks/useFilter/index.tsx
  74058. const collectFilterStates = (columns, init, pos) => {
  74059. let filterStates = [];
  74060. (columns || []).forEach((column, index) => {
  74061. var _a;
  74062. const columnPos = getColumnPos(index, pos);
  74063. const filterDropdownIsDefined = column.filterDropdown !== undefined;
  74064. if (column.filters || filterDropdownIsDefined || 'onFilter' in column) {
  74065. if ('filteredValue' in column) {
  74066. // Controlled
  74067. let filteredValues = column.filteredValue;
  74068. if (!filterDropdownIsDefined) {
  74069. filteredValues = (_a = filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.map(String)) !== null && _a !== void 0 ? _a : filteredValues;
  74070. }
  74071. filterStates.push({
  74072. column,
  74073. key: getColumnKey(column, columnPos),
  74074. filteredKeys: filteredValues,
  74075. forceFiltered: column.filtered
  74076. });
  74077. } else {
  74078. // Uncontrolled
  74079. filterStates.push({
  74080. column,
  74081. key: getColumnKey(column, columnPos),
  74082. filteredKeys: init && column.defaultFilteredValue ? column.defaultFilteredValue : undefined,
  74083. forceFiltered: column.filtered
  74084. });
  74085. }
  74086. }
  74087. if ('children' in column) {
  74088. filterStates = [].concat((0,toConsumableArray["default"])(filterStates), (0,toConsumableArray["default"])(collectFilterStates(column.children, init, columnPos)));
  74089. }
  74090. });
  74091. return filterStates;
  74092. };
  74093. function injectFilter(prefixCls, dropdownPrefixCls, columns, filterStates, locale, triggerFilter, getPopupContainer, pos, rootClassName) {
  74094. return columns.map((column, index) => {
  74095. const columnPos = getColumnPos(index, pos);
  74096. const {
  74097. filterOnClose = true,
  74098. filterMultiple = true,
  74099. filterMode,
  74100. filterSearch
  74101. } = column;
  74102. let newColumn = column;
  74103. if (newColumn.filters || newColumn.filterDropdown) {
  74104. const columnKey = getColumnKey(newColumn, columnPos);
  74105. const filterState = filterStates.find(({
  74106. key
  74107. }) => columnKey === key);
  74108. newColumn = Object.assign(Object.assign({}, newColumn), {
  74109. title: renderProps => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(useFilter_FilterDropdown, {
  74110. tablePrefixCls: prefixCls,
  74111. prefixCls: `${prefixCls}-filter`,
  74112. dropdownPrefixCls: dropdownPrefixCls,
  74113. column: newColumn,
  74114. columnKey: columnKey,
  74115. filterState: filterState,
  74116. filterOnClose: filterOnClose,
  74117. filterMultiple: filterMultiple,
  74118. filterMode: filterMode,
  74119. filterSearch: filterSearch,
  74120. triggerFilter: triggerFilter,
  74121. locale: locale,
  74122. getPopupContainer: getPopupContainer,
  74123. rootClassName: rootClassName
  74124. }, renderColumnTitle(column.title, renderProps)))
  74125. });
  74126. }
  74127. if ('children' in newColumn) {
  74128. newColumn = Object.assign(Object.assign({}, newColumn), {
  74129. children: injectFilter(prefixCls, dropdownPrefixCls, newColumn.children, filterStates, locale, triggerFilter, getPopupContainer, columnPos, rootClassName)
  74130. });
  74131. }
  74132. return newColumn;
  74133. });
  74134. }
  74135. const generateFilterInfo = filterStates => {
  74136. const currentFilters = {};
  74137. filterStates.forEach(({
  74138. key,
  74139. filteredKeys,
  74140. column
  74141. }) => {
  74142. const keyAsString = key;
  74143. const {
  74144. filters,
  74145. filterDropdown
  74146. } = column;
  74147. if (filterDropdown) {
  74148. currentFilters[keyAsString] = filteredKeys || null;
  74149. } else if (Array.isArray(filteredKeys)) {
  74150. const keys = flattenKeys(filters);
  74151. currentFilters[keyAsString] = keys.filter(originKey => filteredKeys.includes(String(originKey)));
  74152. } else {
  74153. currentFilters[keyAsString] = null;
  74154. }
  74155. });
  74156. return currentFilters;
  74157. };
  74158. const getFilterData = (data, filterStates, childrenColumnName) => {
  74159. const filterDatas = filterStates.reduce((currentData, filterState) => {
  74160. const {
  74161. column: {
  74162. onFilter,
  74163. filters
  74164. },
  74165. filteredKeys
  74166. } = filterState;
  74167. if (onFilter && filteredKeys && filteredKeys.length) {
  74168. return currentData
  74169. // shallow copy
  74170. .map(record => Object.assign({}, record)).filter(record => filteredKeys.some(key => {
  74171. const keys = flattenKeys(filters);
  74172. const keyIndex = keys.findIndex(k => String(k) === String(key));
  74173. const realKey = keyIndex !== -1 ? keys[keyIndex] : key;
  74174. // filter children
  74175. if (record[childrenColumnName]) {
  74176. record[childrenColumnName] = getFilterData(record[childrenColumnName], filterStates, childrenColumnName);
  74177. }
  74178. return onFilter(realKey, record);
  74179. }));
  74180. }
  74181. return currentData;
  74182. }, data);
  74183. return filterDatas;
  74184. };
  74185. const getMergedColumns = rawMergedColumns => rawMergedColumns.flatMap(column => {
  74186. if ('children' in column) {
  74187. return [column].concat((0,toConsumableArray["default"])(getMergedColumns(column.children || [])));
  74188. }
  74189. return [column];
  74190. });
  74191. const useFilter = props => {
  74192. const {
  74193. prefixCls,
  74194. dropdownPrefixCls,
  74195. mergedColumns: rawMergedColumns,
  74196. onFilterChange,
  74197. getPopupContainer,
  74198. locale: tableLocale,
  74199. rootClassName
  74200. } = props;
  74201. const warning = (0,_util_warning.devUseWarning)('Table');
  74202. const mergedColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => getMergedColumns(rawMergedColumns || []), [rawMergedColumns]);
  74203. const [filterStates, setFilterStates] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => collectFilterStates(mergedColumns, true));
  74204. const mergedFilterStates = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74205. const collectedStates = collectFilterStates(mergedColumns, false);
  74206. if (collectedStates.length === 0) {
  74207. return collectedStates;
  74208. }
  74209. let filteredKeysIsAllNotControlled = true;
  74210. let filteredKeysIsAllControlled = true;
  74211. collectedStates.forEach(({
  74212. filteredKeys
  74213. }) => {
  74214. if (filteredKeys !== undefined) {
  74215. filteredKeysIsAllNotControlled = false;
  74216. } else {
  74217. filteredKeysIsAllControlled = false;
  74218. }
  74219. });
  74220. // Return if not controlled
  74221. if (filteredKeysIsAllNotControlled) {
  74222. // Filter column may have been removed
  74223. const keyList = (mergedColumns || []).map((column, index) => getColumnKey(column, getColumnPos(index)));
  74224. return filterStates.filter(({
  74225. key
  74226. }) => keyList.includes(key)).map(item => {
  74227. const col = mergedColumns[keyList.findIndex(key => key === item.key)];
  74228. return Object.assign(Object.assign({}, item), {
  74229. column: Object.assign(Object.assign({}, item.column), col),
  74230. forceFiltered: col.filtered
  74231. });
  74232. });
  74233. }
  74234. true ? warning(filteredKeysIsAllControlled, 'usage', 'Columns should all contain `filteredValue` or not contain `filteredValue`.') : 0;
  74235. return collectedStates;
  74236. }, [mergedColumns, filterStates]);
  74237. const filters = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => generateFilterInfo(mergedFilterStates), [mergedFilterStates]);
  74238. const triggerFilter = filterState => {
  74239. const newFilterStates = mergedFilterStates.filter(({
  74240. key
  74241. }) => key !== filterState.key);
  74242. newFilterStates.push(filterState);
  74243. setFilterStates(newFilterStates);
  74244. onFilterChange(generateFilterInfo(newFilterStates), newFilterStates);
  74245. };
  74246. const transformColumns = innerColumns => injectFilter(prefixCls, dropdownPrefixCls, innerColumns, mergedFilterStates, tableLocale, triggerFilter, getPopupContainer, undefined, rootClassName);
  74247. return [transformColumns, mergedFilterStates, filters];
  74248. };
  74249. /* harmony default export */ var hooks_useFilter = (useFilter);
  74250. ;// ./components/table/hooks/useLazyKVMap.ts
  74251. const useLazyKVMap = (data, childrenColumnName, getRowKey) => {
  74252. const mapCacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
  74253. function getRecordByKey(key) {
  74254. var _a;
  74255. if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) {
  74256. const kvMap = new Map();
  74257. function dig(records) {
  74258. records.forEach((record, index) => {
  74259. const rowKey = getRowKey(record, index);
  74260. kvMap.set(rowKey, record);
  74261. if (record && typeof record === 'object' && childrenColumnName in record) {
  74262. dig(record[childrenColumnName] || []);
  74263. }
  74264. });
  74265. }
  74266. dig(data);
  74267. mapCacheRef.current = {
  74268. data,
  74269. childrenColumnName,
  74270. kvMap,
  74271. getRowKey
  74272. };
  74273. }
  74274. return (_a = mapCacheRef.current.kvMap) === null || _a === void 0 ? void 0 : _a.get(key);
  74275. }
  74276. return [getRecordByKey];
  74277. };
  74278. /* harmony default export */ var hooks_useLazyKVMap = (useLazyKVMap);
  74279. ;// ./components/table/hooks/usePagination.ts
  74280. var usePagination_rest = undefined && undefined.__rest || function (s, e) {
  74281. var t = {};
  74282. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  74283. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  74284. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  74285. }
  74286. return t;
  74287. };
  74288. const DEFAULT_PAGE_SIZE = 10;
  74289. function getPaginationParam(mergedPagination, pagination) {
  74290. const param = {
  74291. current: mergedPagination.current,
  74292. pageSize: mergedPagination.pageSize
  74293. };
  74294. const paginationObj = pagination && typeof pagination === 'object' ? pagination : {};
  74295. Object.keys(paginationObj).forEach(pageProp => {
  74296. const value = mergedPagination[pageProp];
  74297. if (typeof value !== 'function') {
  74298. param[pageProp] = value;
  74299. }
  74300. });
  74301. return param;
  74302. }
  74303. function usePagination(total, onChange, pagination) {
  74304. const _a = pagination && typeof pagination === 'object' ? pagination : {},
  74305. {
  74306. total: paginationTotal = 0
  74307. } = _a,
  74308. paginationObj = usePagination_rest(_a, ["total"]);
  74309. const [innerPagination, setInnerPagination] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => ({
  74310. current: 'defaultCurrent' in paginationObj ? paginationObj.defaultCurrent : 1,
  74311. pageSize: 'defaultPageSize' in paginationObj ? paginationObj.defaultPageSize : DEFAULT_PAGE_SIZE
  74312. }));
  74313. // ============ Basic Pagination Config ============
  74314. const mergedPagination = extendsObject(innerPagination, paginationObj, {
  74315. total: paginationTotal > 0 ? paginationTotal : total
  74316. });
  74317. // Reset `current` if data length or pageSize changed
  74318. const maxPage = Math.ceil((paginationTotal || total) / mergedPagination.pageSize);
  74319. if (mergedPagination.current > maxPage) {
  74320. // Prevent a maximum page count of 0
  74321. mergedPagination.current = maxPage || 1;
  74322. }
  74323. const refreshPagination = (current, pageSize) => {
  74324. setInnerPagination({
  74325. current: current !== null && current !== void 0 ? current : 1,
  74326. pageSize: pageSize || mergedPagination.pageSize
  74327. });
  74328. };
  74329. const onInternalChange = (current, pageSize) => {
  74330. var _a;
  74331. if (pagination) {
  74332. (_a = pagination.onChange) === null || _a === void 0 ? void 0 : _a.call(pagination, current, pageSize);
  74333. }
  74334. refreshPagination(current, pageSize);
  74335. onChange(current, pageSize || (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize));
  74336. };
  74337. if (pagination === false) {
  74338. return [{}, () => {}];
  74339. }
  74340. return [Object.assign(Object.assign({}, mergedPagination), {
  74341. onChange: onInternalChange
  74342. }), refreshPagination];
  74343. }
  74344. /* harmony default export */ var hooks_usePagination = (usePagination);
  74345. ;// ./node_modules/@ant-design/icons-svg/es/asn/CaretDownOutlined.js
  74346. // This icon file is generated automatically.
  74347. var CaretDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, "name": "caret-down", "theme": "outlined" };
  74348. /* harmony default export */ var asn_CaretDownOutlined = (CaretDownOutlined);
  74349. ;// ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js
  74350. // GENERATE BY ./scripts/generate.ts
  74351. // DON NOT EDIT IT MANUALLY
  74352. var CaretDownOutlined_CaretDownOutlined = function CaretDownOutlined(props, ref) {
  74353. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  74354. ref: ref,
  74355. icon: asn_CaretDownOutlined
  74356. }));
  74357. };
  74358. /**![caret-down](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg0MC40IDMwMEgxODMuNmMtMTkuNyAwLTMwLjcgMjAuOC0xOC41IDM1bDMyOC40IDM4MC44YzkuNCAxMC45IDI3LjUgMTAuOSAzNyAwTDg1OC45IDMzNWMxMi4yLTE0LjIgMS4yLTM1LTE4LjUtMzV6IiAvPjwvc3ZnPg==) */
  74359. var CaretDownOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CaretDownOutlined_CaretDownOutlined);
  74360. if (true) {
  74361. CaretDownOutlined_RefIcon.displayName = 'CaretDownOutlined';
  74362. }
  74363. /* harmony default export */ var icons_CaretDownOutlined = (CaretDownOutlined_RefIcon);
  74364. ;// ./node_modules/@ant-design/icons-svg/es/asn/CaretUpOutlined.js
  74365. // This icon file is generated automatically.
  74366. var CaretUpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, "name": "caret-up", "theme": "outlined" };
  74367. /* harmony default export */ var asn_CaretUpOutlined = (CaretUpOutlined);
  74368. ;// ./node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js
  74369. // GENERATE BY ./scripts/generate.ts
  74370. // DON NOT EDIT IT MANUALLY
  74371. var CaretUpOutlined_CaretUpOutlined = function CaretUpOutlined(props, ref) {
  74372. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  74373. ref: ref,
  74374. icon: asn_CaretUpOutlined
  74375. }));
  74376. };
  74377. /**![caret-up](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg1OC45IDY4OUw1MzAuNSAzMDguMmMtOS40LTEwLjktMjcuNS0xMC45LTM3IDBMMTY1LjEgNjg5Yy0xMi4yIDE0LjItMS4yIDM1IDE4LjUgMzVoNjU2LjhjMTkuNyAwIDMwLjctMjAuOCAxOC41LTM1eiIgLz48L3N2Zz4=) */
  74378. var CaretUpOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CaretUpOutlined_CaretUpOutlined);
  74379. if (true) {
  74380. CaretUpOutlined_RefIcon.displayName = 'CaretUpOutlined';
  74381. }
  74382. /* harmony default export */ var icons_CaretUpOutlined = (CaretUpOutlined_RefIcon);
  74383. ;// ./components/table/hooks/useSorter.tsx
  74384. const ASCEND = 'ascend';
  74385. const DESCEND = 'descend';
  74386. const getMultiplePriority = column => {
  74387. if (typeof column.sorter === 'object' && typeof column.sorter.multiple === 'number') {
  74388. return column.sorter.multiple;
  74389. }
  74390. return false;
  74391. };
  74392. const getSortFunction = sorter => {
  74393. if (typeof sorter === 'function') {
  74394. return sorter;
  74395. }
  74396. if (sorter && typeof sorter === 'object' && sorter.compare) {
  74397. return sorter.compare;
  74398. }
  74399. return false;
  74400. };
  74401. const nextSortDirection = (sortDirections, current) => {
  74402. if (!current) {
  74403. return sortDirections[0];
  74404. }
  74405. return sortDirections[sortDirections.indexOf(current) + 1];
  74406. };
  74407. const collectSortStates = (columns, init, pos) => {
  74408. let sortStates = [];
  74409. const pushState = (column, columnPos) => {
  74410. sortStates.push({
  74411. column,
  74412. key: getColumnKey(column, columnPos),
  74413. multiplePriority: getMultiplePriority(column),
  74414. sortOrder: column.sortOrder
  74415. });
  74416. };
  74417. (columns || []).forEach((column, index) => {
  74418. const columnPos = getColumnPos(index, pos);
  74419. if (column.children) {
  74420. if ('sortOrder' in column) {
  74421. // Controlled
  74422. pushState(column, columnPos);
  74423. }
  74424. sortStates = [].concat((0,toConsumableArray["default"])(sortStates), (0,toConsumableArray["default"])(collectSortStates(column.children, init, columnPos)));
  74425. } else if (column.sorter) {
  74426. if ('sortOrder' in column) {
  74427. // Controlled
  74428. pushState(column, columnPos);
  74429. } else if (init && column.defaultSortOrder) {
  74430. // Default sorter
  74431. sortStates.push({
  74432. column,
  74433. key: getColumnKey(column, columnPos),
  74434. multiplePriority: getMultiplePriority(column),
  74435. sortOrder: column.defaultSortOrder
  74436. });
  74437. }
  74438. }
  74439. });
  74440. return sortStates;
  74441. };
  74442. const injectSorter = (prefixCls, columns, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) => {
  74443. const finalColumns = (columns || []).map((column, index) => {
  74444. const columnPos = getColumnPos(index, pos);
  74445. let newColumn = column;
  74446. if (newColumn.sorter) {
  74447. const sortDirections = newColumn.sortDirections || defaultSortDirections;
  74448. const showSorterTooltip = newColumn.showSorterTooltip === undefined ? tableShowSorterTooltip : newColumn.showSorterTooltip;
  74449. const columnKey = getColumnKey(newColumn, columnPos);
  74450. const sorterState = sorterStates.find(({
  74451. key
  74452. }) => key === columnKey);
  74453. const sortOrder = sorterState ? sorterState.sortOrder : null;
  74454. const nextSortOrder = nextSortDirection(sortDirections, sortOrder);
  74455. let sorter;
  74456. if (column.sortIcon) {
  74457. sorter = column.sortIcon({
  74458. sortOrder
  74459. });
  74460. } else {
  74461. const upNode = sortDirections.includes(ASCEND) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CaretUpOutlined, {
  74462. className: classnames_default()(`${prefixCls}-column-sorter-up`, {
  74463. active: sortOrder === ASCEND
  74464. })
  74465. }));
  74466. const downNode = sortDirections.includes(DESCEND) && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CaretDownOutlined, {
  74467. className: classnames_default()(`${prefixCls}-column-sorter-down`, {
  74468. active: sortOrder === DESCEND
  74469. })
  74470. }));
  74471. sorter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  74472. className: classnames_default()(`${prefixCls}-column-sorter`, {
  74473. [`${prefixCls}-column-sorter-full`]: !!(upNode && downNode)
  74474. })
  74475. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  74476. className: `${prefixCls}-column-sorter-inner`,
  74477. "aria-hidden": "true"
  74478. }, upNode, downNode));
  74479. }
  74480. const {
  74481. cancelSort,
  74482. triggerAsc,
  74483. triggerDesc
  74484. } = tableLocale || {};
  74485. let sortTip = cancelSort;
  74486. if (nextSortOrder === DESCEND) {
  74487. sortTip = triggerDesc;
  74488. } else if (nextSortOrder === ASCEND) {
  74489. sortTip = triggerAsc;
  74490. }
  74491. const tooltipProps = typeof showSorterTooltip === 'object' ? Object.assign({
  74492. title: sortTip
  74493. }, showSorterTooltip) : {
  74494. title: sortTip
  74495. };
  74496. newColumn = Object.assign(Object.assign({}, newColumn), {
  74497. className: classnames_default()(newColumn.className, {
  74498. [`${prefixCls}-column-sort`]: sortOrder
  74499. }),
  74500. title: renderProps => {
  74501. const columnSortersClass = `${prefixCls}-column-sorters`;
  74502. const renderColumnTitleWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  74503. className: `${prefixCls}-column-title`
  74504. }, renderColumnTitle(column.title, renderProps));
  74505. const renderSortTitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  74506. className: columnSortersClass
  74507. }, renderColumnTitleWrapper, sorter);
  74508. if (showSorterTooltip) {
  74509. if (typeof showSorterTooltip !== 'boolean' && (showSorterTooltip === null || showSorterTooltip === void 0 ? void 0 : showSorterTooltip.target) === 'sorter-icon') {
  74510. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  74511. className: `${columnSortersClass} ${prefixCls}-column-sorters-tooltip-target-sorter`
  74512. }, renderColumnTitleWrapper, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, tooltipProps), sorter));
  74513. }
  74514. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({}, tooltipProps), renderSortTitle);
  74515. }
  74516. return renderSortTitle;
  74517. },
  74518. onHeaderCell: col => {
  74519. var _a;
  74520. const cell = ((_a = column.onHeaderCell) === null || _a === void 0 ? void 0 : _a.call(column, col)) || {};
  74521. const originOnClick = cell.onClick;
  74522. const originOKeyDown = cell.onKeyDown;
  74523. cell.onClick = event => {
  74524. triggerSorter({
  74525. column,
  74526. key: columnKey,
  74527. sortOrder: nextSortOrder,
  74528. multiplePriority: getMultiplePriority(column)
  74529. });
  74530. originOnClick === null || originOnClick === void 0 ? void 0 : originOnClick(event);
  74531. };
  74532. cell.onKeyDown = event => {
  74533. if (event.keyCode === KeyCode["default"].ENTER) {
  74534. triggerSorter({
  74535. column,
  74536. key: columnKey,
  74537. sortOrder: nextSortOrder,
  74538. multiplePriority: getMultiplePriority(column)
  74539. });
  74540. originOKeyDown === null || originOKeyDown === void 0 ? void 0 : originOKeyDown(event);
  74541. }
  74542. };
  74543. const renderTitle = safeColumnTitle(column.title, {});
  74544. const displayTitle = renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle.toString();
  74545. // Inform the screen-reader so it can tell the visually impaired user which column is sorted
  74546. if (sortOrder) {
  74547. cell['aria-sort'] = sortOrder === 'ascend' ? 'ascending' : 'descending';
  74548. }
  74549. cell['aria-label'] = displayTitle || '';
  74550. cell.className = classnames_default()(cell.className, `${prefixCls}-column-has-sorters`);
  74551. cell.tabIndex = 0;
  74552. if (column.ellipsis) {
  74553. cell.title = (renderTitle !== null && renderTitle !== void 0 ? renderTitle : '').toString();
  74554. }
  74555. return cell;
  74556. }
  74557. });
  74558. }
  74559. if ('children' in newColumn) {
  74560. newColumn = Object.assign(Object.assign({}, newColumn), {
  74561. children: injectSorter(prefixCls, newColumn.children, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos)
  74562. });
  74563. }
  74564. return newColumn;
  74565. });
  74566. return finalColumns;
  74567. };
  74568. const stateToInfo = sorterState => {
  74569. const {
  74570. column,
  74571. sortOrder
  74572. } = sorterState;
  74573. return {
  74574. column,
  74575. order: sortOrder,
  74576. field: column.dataIndex,
  74577. columnKey: column.key
  74578. };
  74579. };
  74580. const generateSorterInfo = sorterStates => {
  74581. const activeSorters = sorterStates.filter(({
  74582. sortOrder
  74583. }) => sortOrder).map(stateToInfo);
  74584. // =========== Legacy compatible support ===========
  74585. // https://github.com/ant-design/ant-design/pull/19226
  74586. if (activeSorters.length === 0 && sorterStates.length) {
  74587. const lastIndex = sorterStates.length - 1;
  74588. return Object.assign(Object.assign({}, stateToInfo(sorterStates[lastIndex])), {
  74589. column: undefined,
  74590. order: undefined,
  74591. field: undefined,
  74592. columnKey: undefined
  74593. });
  74594. }
  74595. if (activeSorters.length <= 1) {
  74596. return activeSorters[0] || {};
  74597. }
  74598. return activeSorters;
  74599. };
  74600. const getSortData = (data, sortStates, childrenColumnName) => {
  74601. const innerSorterStates = sortStates.slice().sort((a, b) => b.multiplePriority - a.multiplePriority);
  74602. const cloneData = data.slice();
  74603. const runningSorters = innerSorterStates.filter(({
  74604. column: {
  74605. sorter
  74606. },
  74607. sortOrder
  74608. }) => getSortFunction(sorter) && sortOrder);
  74609. // Skip if no sorter needed
  74610. if (!runningSorters.length) {
  74611. return cloneData;
  74612. }
  74613. return cloneData.sort((record1, record2) => {
  74614. for (let i = 0; i < runningSorters.length; i += 1) {
  74615. const sorterState = runningSorters[i];
  74616. const {
  74617. column: {
  74618. sorter
  74619. },
  74620. sortOrder
  74621. } = sorterState;
  74622. const compareFn = getSortFunction(sorter);
  74623. if (compareFn && sortOrder) {
  74624. const compareResult = compareFn(record1, record2, sortOrder);
  74625. if (compareResult !== 0) {
  74626. return sortOrder === ASCEND ? compareResult : -compareResult;
  74627. }
  74628. }
  74629. }
  74630. return 0;
  74631. }).map(record => {
  74632. const subRecords = record[childrenColumnName];
  74633. if (subRecords) {
  74634. return Object.assign(Object.assign({}, record), {
  74635. [childrenColumnName]: getSortData(subRecords, sortStates, childrenColumnName)
  74636. });
  74637. }
  74638. return record;
  74639. });
  74640. };
  74641. const useFilterSorter = props => {
  74642. const {
  74643. prefixCls,
  74644. mergedColumns,
  74645. sortDirections,
  74646. tableLocale,
  74647. showSorterTooltip,
  74648. onSorterChange
  74649. } = props;
  74650. const [sortStates, setSortStates] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(() => collectSortStates(mergedColumns, true));
  74651. const getColumnKeys = (columns, pos) => {
  74652. const newKeys = [];
  74653. columns.forEach((item, index) => {
  74654. const columnPos = getColumnPos(index, pos);
  74655. newKeys.push(getColumnKey(item, columnPos));
  74656. if (Array.isArray(item.children)) {
  74657. const childKeys = getColumnKeys(item.children, columnPos);
  74658. newKeys.push.apply(newKeys, (0,toConsumableArray["default"])(childKeys));
  74659. }
  74660. });
  74661. return newKeys;
  74662. };
  74663. const mergedSorterStates = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74664. let validate = true;
  74665. const collectedStates = collectSortStates(mergedColumns, false);
  74666. // Return if not controlled
  74667. if (!collectedStates.length) {
  74668. const mergedColumnsKeys = getColumnKeys(mergedColumns);
  74669. return sortStates.filter(({
  74670. key
  74671. }) => mergedColumnsKeys.includes(key));
  74672. }
  74673. const validateStates = [];
  74674. function patchStates(state) {
  74675. if (validate) {
  74676. validateStates.push(state);
  74677. } else {
  74678. validateStates.push(Object.assign(Object.assign({}, state), {
  74679. sortOrder: null
  74680. }));
  74681. }
  74682. }
  74683. let multipleMode = null;
  74684. collectedStates.forEach(state => {
  74685. if (multipleMode === null) {
  74686. patchStates(state);
  74687. if (state.sortOrder) {
  74688. if (state.multiplePriority === false) {
  74689. validate = false;
  74690. } else {
  74691. multipleMode = true;
  74692. }
  74693. }
  74694. } else if (multipleMode && state.multiplePriority !== false) {
  74695. patchStates(state);
  74696. } else {
  74697. validate = false;
  74698. patchStates(state);
  74699. }
  74700. });
  74701. return validateStates;
  74702. }, [mergedColumns, sortStates]);
  74703. // Get render columns title required props
  74704. const columnTitleSorterProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74705. var _a, _b;
  74706. const sortColumns = mergedSorterStates.map(({
  74707. column,
  74708. sortOrder
  74709. }) => ({
  74710. column,
  74711. order: sortOrder
  74712. }));
  74713. return {
  74714. sortColumns,
  74715. // Legacy
  74716. sortColumn: (_a = sortColumns[0]) === null || _a === void 0 ? void 0 : _a.column,
  74717. sortOrder: (_b = sortColumns[0]) === null || _b === void 0 ? void 0 : _b.order
  74718. };
  74719. }, [mergedSorterStates]);
  74720. const triggerSorter = sortState => {
  74721. let newSorterStates;
  74722. if (sortState.multiplePriority === false || !mergedSorterStates.length || mergedSorterStates[0].multiplePriority === false) {
  74723. newSorterStates = [sortState];
  74724. } else {
  74725. newSorterStates = [].concat((0,toConsumableArray["default"])(mergedSorterStates.filter(({
  74726. key
  74727. }) => key !== sortState.key)), [sortState]);
  74728. }
  74729. setSortStates(newSorterStates);
  74730. onSorterChange(generateSorterInfo(newSorterStates), newSorterStates);
  74731. };
  74732. const transformColumns = innerColumns => injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip);
  74733. const getSorters = () => generateSorterInfo(mergedSorterStates);
  74734. return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters];
  74735. };
  74736. /* harmony default export */ var useSorter = (useFilterSorter);
  74737. ;// ./components/table/hooks/useTitleColumns.ts
  74738. const fillTitle = (columns, columnTitleProps) => {
  74739. const finalColumns = columns.map(column => {
  74740. const cloneColumn = Object.assign({}, column);
  74741. cloneColumn.title = renderColumnTitle(column.title, columnTitleProps);
  74742. if ('children' in cloneColumn) {
  74743. cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps);
  74744. }
  74745. return cloneColumn;
  74746. });
  74747. return finalColumns;
  74748. };
  74749. const useTitleColumns = columnTitleProps => {
  74750. const filledColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(columns => fillTitle(columns, columnTitleProps), [columnTitleProps]);
  74751. return [filledColumns];
  74752. };
  74753. /* harmony default export */ var hooks_useTitleColumns = (useTitleColumns);
  74754. ;// ./components/table/RcTable/index.tsx
  74755. /**
  74756. * Same as `rc-table` but we modify trigger children update logic instead.
  74757. */
  74758. const RcTable = genTable((prev, next) => {
  74759. const {
  74760. _renderTimes: prevRenderTimes
  74761. } = prev;
  74762. const {
  74763. _renderTimes: nextRenderTimes
  74764. } = next;
  74765. return prevRenderTimes !== nextRenderTimes;
  74766. });
  74767. /* harmony default export */ var table_RcTable = (RcTable);
  74768. ;// ./components/table/RcTable/VirtualTable.tsx
  74769. /**
  74770. * Same as `rc-table` but we modify trigger children update logic instead.
  74771. */
  74772. const RcVirtualTable = genVirtualTable((prev, next) => {
  74773. const {
  74774. _renderTimes: prevRenderTimes
  74775. } = prev;
  74776. const {
  74777. _renderTimes: nextRenderTimes
  74778. } = next;
  74779. return prevRenderTimes !== nextRenderTimes;
  74780. });
  74781. /* harmony default export */ var RcTable_VirtualTable = (RcVirtualTable);
  74782. // EXTERNAL MODULE: ./components/table/style/index.ts + 15 modules
  74783. var table_style = __webpack_require__("./components/table/style/index.ts");
  74784. ;// ./components/table/InternalTable.tsx
  74785. const InternalTable_EMPTY_LIST = [];
  74786. const InternalTable = (props, ref) => {
  74787. var _a, _b;
  74788. const {
  74789. prefixCls: customizePrefixCls,
  74790. className,
  74791. rootClassName,
  74792. style,
  74793. size: customizeSize,
  74794. bordered,
  74795. dropdownPrefixCls: customizeDropdownPrefixCls,
  74796. dataSource,
  74797. pagination,
  74798. rowSelection,
  74799. rowKey = 'key',
  74800. rowClassName,
  74801. columns,
  74802. children,
  74803. childrenColumnName: legacyChildrenColumnName,
  74804. onChange,
  74805. getPopupContainer,
  74806. loading,
  74807. expandIcon,
  74808. expandable,
  74809. expandedRowRender,
  74810. expandIconColumnIndex,
  74811. indentSize,
  74812. scroll,
  74813. sortDirections,
  74814. locale,
  74815. showSorterTooltip = {
  74816. target: 'full-header'
  74817. },
  74818. virtual
  74819. } = props;
  74820. const warning = (0,_util_warning.devUseWarning)('Table');
  74821. if (true) {
  74822. true ? warning(!(typeof rowKey === 'function' && rowKey.length > 1), 'usage', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.') : 0;
  74823. }
  74824. const baseColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => columns || convertChildrenToColumns(children), [columns, children]);
  74825. const needResponsive = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => baseColumns.some(col => col.responsive), [baseColumns]);
  74826. const screens = hooks_useBreakpoint(needResponsive);
  74827. const mergedColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74828. const matched = new Set(Object.keys(screens).filter(m => screens[m]));
  74829. return baseColumns.filter(c => !c.responsive || c.responsive.some(r => matched.has(r)));
  74830. }, [baseColumns, screens]);
  74831. const tableProps = (0,omit["default"])(props, ['className', 'style', 'columns']);
  74832. const {
  74833. locale: contextLocale = en_US["default"],
  74834. direction,
  74835. table,
  74836. renderEmpty,
  74837. getPrefixCls,
  74838. getPopupContainer: getContextPopupContainer
  74839. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  74840. const mergedSize = (0,useSize["default"])(customizeSize);
  74841. const tableLocale = Object.assign(Object.assign({}, contextLocale.Table), locale);
  74842. const rawData = dataSource || InternalTable_EMPTY_LIST;
  74843. const prefixCls = getPrefixCls('table', customizePrefixCls);
  74844. const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
  74845. const [, token] = (0,useToken["default"])();
  74846. const rootCls = hooks_useCSSVarCls(prefixCls);
  74847. const [wrapCSSVar, hashId, cssVarCls] = (0,table_style["default"])(prefixCls, rootCls);
  74848. const mergedExpandable = Object.assign(Object.assign({
  74849. childrenColumnName: legacyChildrenColumnName,
  74850. expandIconColumnIndex
  74851. }, expandable), {
  74852. expandIcon: (_a = expandable === null || expandable === void 0 ? void 0 : expandable.expandIcon) !== null && _a !== void 0 ? _a : (_b = table === null || table === void 0 ? void 0 : table.expandable) === null || _b === void 0 ? void 0 : _b.expandIcon
  74853. });
  74854. const {
  74855. childrenColumnName = 'children'
  74856. } = mergedExpandable;
  74857. const expandType = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74858. if (rawData.some(item => item === null || item === void 0 ? void 0 : item[childrenColumnName])) {
  74859. return 'nest';
  74860. }
  74861. if (expandedRowRender || (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender)) {
  74862. return 'row';
  74863. }
  74864. return null;
  74865. }, [rawData]);
  74866. const internalRefs = {
  74867. body: external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null)
  74868. };
  74869. // ============================ Width =============================
  74870. const getContainerWidth = useContainerWidth(prefixCls);
  74871. // ============================= Refs =============================
  74872. const rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  74873. const tblRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  74874. useProxyImperativeHandle(ref, () => Object.assign(Object.assign({}, tblRef.current), {
  74875. nativeElement: rootRef.current
  74876. }));
  74877. // ============================ RowKey ============================
  74878. const getRowKey = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74879. if (typeof rowKey === 'function') {
  74880. return rowKey;
  74881. }
  74882. return record => record === null || record === void 0 ? void 0 : record[rowKey];
  74883. }, [rowKey]);
  74884. const [getRecordByKey] = hooks_useLazyKVMap(rawData, childrenColumnName, getRowKey);
  74885. // ============================ Events =============================
  74886. const changeEventInfo = {};
  74887. const triggerOnChange = (info, action, reset = false) => {
  74888. var _a, _b, _c, _d;
  74889. const changeInfo = Object.assign(Object.assign({}, changeEventInfo), info);
  74890. if (reset) {
  74891. (_a = changeEventInfo.resetPagination) === null || _a === void 0 ? void 0 : _a.call(changeEventInfo);
  74892. // Reset event param
  74893. if ((_b = changeInfo.pagination) === null || _b === void 0 ? void 0 : _b.current) {
  74894. changeInfo.pagination.current = 1;
  74895. }
  74896. // Trigger pagination events
  74897. if (pagination) {
  74898. (_c = pagination.onChange) === null || _c === void 0 ? void 0 : _c.call(pagination, 1, (_d = changeInfo.pagination) === null || _d === void 0 ? void 0 : _d.pageSize);
  74899. }
  74900. }
  74901. if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) {
  74902. scrollTo(0, {
  74903. getContainer: () => internalRefs.body.current
  74904. });
  74905. }
  74906. onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {
  74907. currentDataSource: getFilterData(getSortData(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates, childrenColumnName),
  74908. action
  74909. });
  74910. };
  74911. /**
  74912. * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read
  74913. * state out and then put it back to title render. Move these code into `hooks` but still too
  74914. * complex. We should provides Table props like `sorter` & `filter` to handle control in next big
  74915. * version.
  74916. */
  74917. // ============================ Sorter =============================
  74918. const onSorterChange = (sorter, sorterStates) => {
  74919. triggerOnChange({
  74920. sorter,
  74921. sorterStates
  74922. }, 'sort', false);
  74923. };
  74924. const [transformSorterColumns, sortStates, sorterTitleProps, getSorters] = useSorter({
  74925. prefixCls,
  74926. mergedColumns,
  74927. onSorterChange,
  74928. sortDirections: sortDirections || ['ascend', 'descend'],
  74929. tableLocale,
  74930. showSorterTooltip
  74931. });
  74932. const sortedData = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => getSortData(rawData, sortStates, childrenColumnName), [rawData, sortStates]);
  74933. changeEventInfo.sorter = getSorters();
  74934. changeEventInfo.sorterStates = sortStates;
  74935. // ============================ Filter ============================
  74936. const onFilterChange = (filters, filterStates) => {
  74937. triggerOnChange({
  74938. filters,
  74939. filterStates
  74940. }, 'filter', true);
  74941. };
  74942. const [transformFilterColumns, filterStates, filters] = hooks_useFilter({
  74943. prefixCls,
  74944. locale: tableLocale,
  74945. dropdownPrefixCls,
  74946. mergedColumns,
  74947. onFilterChange,
  74948. getPopupContainer: getPopupContainer || getContextPopupContainer,
  74949. rootClassName: classnames_default()(rootClassName, rootCls)
  74950. });
  74951. const mergedData = getFilterData(sortedData, filterStates, childrenColumnName);
  74952. changeEventInfo.filters = filters;
  74953. changeEventInfo.filterStates = filterStates;
  74954. // ============================ Column ============================
  74955. const columnTitleProps = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74956. const mergedFilters = {};
  74957. Object.keys(filters).forEach(filterKey => {
  74958. if (filters[filterKey] !== null) {
  74959. mergedFilters[filterKey] = filters[filterKey];
  74960. }
  74961. });
  74962. return Object.assign(Object.assign({}, sorterTitleProps), {
  74963. filters: mergedFilters
  74964. });
  74965. }, [sorterTitleProps, filters]);
  74966. const [transformTitleColumns] = hooks_useTitleColumns(columnTitleProps);
  74967. // ========================== Pagination ==========================
  74968. const onPaginationChange = (current, pageSize) => {
  74969. triggerOnChange({
  74970. pagination: Object.assign(Object.assign({}, changeEventInfo.pagination), {
  74971. current,
  74972. pageSize
  74973. })
  74974. }, 'paginate');
  74975. };
  74976. const [mergedPagination, resetPagination] = hooks_usePagination(mergedData.length, onPaginationChange, pagination);
  74977. changeEventInfo.pagination = pagination === false ? {} : getPaginationParam(mergedPagination, pagination);
  74978. changeEventInfo.resetPagination = resetPagination;
  74979. // ============================= Data =============================
  74980. const pageData = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  74981. if (pagination === false || !mergedPagination.pageSize) {
  74982. return mergedData;
  74983. }
  74984. const {
  74985. current = 1,
  74986. total,
  74987. pageSize = DEFAULT_PAGE_SIZE
  74988. } = mergedPagination;
  74989. true ? warning(current > 0, 'usage', '`current` should be positive number.') : 0;
  74990. // Dynamic table data
  74991. if (mergedData.length < total) {
  74992. if (mergedData.length > pageSize) {
  74993. true ? warning(false, 'usage', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.') : 0;
  74994. return mergedData.slice((current - 1) * pageSize, current * pageSize);
  74995. }
  74996. return mergedData;
  74997. }
  74998. return mergedData.slice((current - 1) * pageSize, current * pageSize);
  74999. }, [!!pagination, mergedData, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.current, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total]);
  75000. // ========================== Selections ==========================
  75001. const [transformSelectionColumns, selectedKeySet] = hooks_useSelection({
  75002. prefixCls,
  75003. data: mergedData,
  75004. pageData,
  75005. getRowKey,
  75006. getRecordByKey,
  75007. expandType,
  75008. childrenColumnName,
  75009. locale: tableLocale,
  75010. getPopupContainer: getPopupContainer || getContextPopupContainer
  75011. }, rowSelection);
  75012. const internalRowClassName = (record, index, indent) => {
  75013. let mergedRowClassName;
  75014. if (typeof rowClassName === 'function') {
  75015. mergedRowClassName = classnames_default()(rowClassName(record, index, indent));
  75016. } else {
  75017. mergedRowClassName = classnames_default()(rowClassName);
  75018. }
  75019. return classnames_default()({
  75020. [`${prefixCls}-row-selected`]: selectedKeySet.has(getRowKey(record, index))
  75021. }, mergedRowClassName);
  75022. };
  75023. // ========================== Expandable ==========================
  75024. // Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table`
  75025. mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon;
  75026. // Customize expandable icon
  75027. mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || ExpandIcon(tableLocale);
  75028. // Adjust expand icon index, no overwrite expandIconColumnIndex if set.
  75029. if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {
  75030. mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0;
  75031. } else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) {
  75032. mergedExpandable.expandIconColumnIndex -= 1;
  75033. }
  75034. // Indent size
  75035. if (typeof mergedExpandable.indentSize !== 'number') {
  75036. mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15;
  75037. }
  75038. // ============================ Render ============================
  75039. const transformColumns = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(innerColumns => transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [transformSorterColumns, transformFilterColumns, transformSelectionColumns]);
  75040. let topPaginationNode;
  75041. let bottomPaginationNode;
  75042. if (pagination !== false && (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) {
  75043. let paginationSize;
  75044. if (mergedPagination.size) {
  75045. paginationSize = mergedPagination.size;
  75046. } else {
  75047. paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined;
  75048. }
  75049. const renderPagination = position => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_pagination, Object.assign({}, mergedPagination, {
  75050. className: classnames_default()(`${prefixCls}-pagination ${prefixCls}-pagination-${position}`, mergedPagination.className),
  75051. size: paginationSize
  75052. })));
  75053. const defaultPosition = direction === 'rtl' ? 'left' : 'right';
  75054. const {
  75055. position
  75056. } = mergedPagination;
  75057. if (position !== null && Array.isArray(position)) {
  75058. const topPos = position.find(p => p.includes('top'));
  75059. const bottomPos = position.find(p => p.includes('bottom'));
  75060. const isDisable = position.every(p => `${p}` === 'none');
  75061. if (!topPos && !bottomPos && !isDisable) {
  75062. bottomPaginationNode = renderPagination(defaultPosition);
  75063. }
  75064. if (topPos) {
  75065. topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', ''));
  75066. }
  75067. if (bottomPos) {
  75068. bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', ''));
  75069. }
  75070. } else {
  75071. bottomPaginationNode = renderPagination(defaultPosition);
  75072. }
  75073. }
  75074. // >>>>>>>>> Spinning
  75075. let spinProps;
  75076. if (typeof loading === 'boolean') {
  75077. spinProps = {
  75078. spinning: loading
  75079. };
  75080. } else if (typeof loading === 'object') {
  75081. spinProps = Object.assign({
  75082. spinning: true
  75083. }, loading);
  75084. }
  75085. const wrapperClassNames = classnames_default()(cssVarCls, rootCls, `${prefixCls}-wrapper`, table === null || table === void 0 ? void 0 : table.className, {
  75086. [`${prefixCls}-wrapper-rtl`]: direction === 'rtl'
  75087. }, className, rootClassName, hashId);
  75088. const mergedStyle = Object.assign(Object.assign({}, table === null || table === void 0 ? void 0 : table.style), style);
  75089. // ========== empty ==========
  75090. const mergedEmptyNode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  75091. // When dataSource is null/undefined (detected by reference equality with EMPTY_LIST),
  75092. // and the table is in a loading state, we only show the loading spinner without the empty placeholder.
  75093. // For empty arrays (datasource={[]}), both loading and empty states would normally be shown.
  75094. // discussion https://github.com/ant-design/ant-design/issues/54601#issuecomment-3158091383
  75095. if ((spinProps === null || spinProps === void 0 ? void 0 : spinProps.spinning) && rawData === InternalTable_EMPTY_LIST) {
  75096. return null;
  75097. }
  75098. if (typeof (locale === null || locale === void 0 ? void 0 : locale.emptyText) !== 'undefined') {
  75099. return locale.emptyText;
  75100. }
  75101. return (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  75102. componentName: "Table"
  75103. });
  75104. }, [spinProps === null || spinProps === void 0 ? void 0 : spinProps.spinning, rawData, locale === null || locale === void 0 ? void 0 : locale.emptyText, renderEmpty]);
  75105. // ========================== Render ==========================
  75106. const TableComponent = virtual ? RcTable_VirtualTable : table_RcTable;
  75107. // >>> Virtual Table props. We set height here since it will affect height collection
  75108. const virtualProps = {};
  75109. const listItemHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  75110. const {
  75111. fontSize,
  75112. lineHeight,
  75113. lineWidth,
  75114. padding,
  75115. paddingXS,
  75116. paddingSM
  75117. } = token;
  75118. const fontHeight = Math.floor(fontSize * lineHeight);
  75119. switch (mergedSize) {
  75120. case 'middle':
  75121. return paddingSM * 2 + fontHeight + lineWidth;
  75122. case 'small':
  75123. return paddingXS * 2 + fontHeight + lineWidth;
  75124. default:
  75125. return padding * 2 + fontHeight + lineWidth;
  75126. }
  75127. }, [token, mergedSize]);
  75128. if (virtual) {
  75129. virtualProps.listItemHeight = listItemHeight;
  75130. }
  75131. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  75132. ref: rootRef,
  75133. className: wrapperClassNames,
  75134. style: mergedStyle
  75135. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(spin, Object.assign({
  75136. spinning: false
  75137. }, spinProps), topPaginationNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(TableComponent, Object.assign({}, virtualProps, tableProps, {
  75138. ref: tblRef,
  75139. columns: mergedColumns,
  75140. direction: direction,
  75141. expandable: mergedExpandable,
  75142. prefixCls: prefixCls,
  75143. className: classnames_default()({
  75144. [`${prefixCls}-middle`]: mergedSize === 'middle',
  75145. [`${prefixCls}-small`]: mergedSize === 'small',
  75146. [`${prefixCls}-bordered`]: bordered,
  75147. [`${prefixCls}-empty`]: rawData.length === 0
  75148. }, cssVarCls, rootCls, hashId),
  75149. data: pageData,
  75150. rowKey: getRowKey,
  75151. rowClassName: internalRowClassName,
  75152. emptyText: mergedEmptyNode,
  75153. // Internal
  75154. internalHooks: INTERNAL_HOOKS,
  75155. internalRefs: internalRefs,
  75156. transformColumns: transformColumns,
  75157. getContainerWidth: getContainerWidth,
  75158. measureRowRender: measureRow => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(config_provider, {
  75159. getPopupContainer: node => node
  75160. }, measureRow))
  75161. })), bottomPaginationNode)));
  75162. };
  75163. /* harmony default export */ var table_InternalTable = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalTable));
  75164. ;// ./components/table/Table.tsx
  75165. const Table_Table = (props, ref) => {
  75166. const renderTimesRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(0);
  75167. renderTimesRef.current += 1;
  75168. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(table_InternalTable, Object.assign({}, props, {
  75169. ref: ref,
  75170. _renderTimes: renderTimesRef.current
  75171. }));
  75172. };
  75173. const ForwardTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Table_Table);
  75174. ForwardTable.SELECTION_COLUMN = SELECTION_COLUMN;
  75175. ForwardTable.EXPAND_COLUMN = EXPAND_COLUMN;
  75176. ForwardTable.SELECTION_ALL = SELECTION_ALL;
  75177. ForwardTable.SELECTION_INVERT = SELECTION_INVERT;
  75178. ForwardTable.SELECTION_NONE = SELECTION_NONE;
  75179. ForwardTable.Column = table_Column;
  75180. ForwardTable.ColumnGroup = table_ColumnGroup;
  75181. ForwardTable.Summary = FooterComponents;
  75182. if (true) {
  75183. ForwardTable.displayName = 'Table';
  75184. }
  75185. /* harmony default export */ var table_Table = (ForwardTable);
  75186. ;// ./components/table/index.tsx
  75187. /* harmony default export */ var table = (table_Table);
  75188. // EXTERNAL MODULE: ./components/tag/style/index.ts
  75189. var tag_style = __webpack_require__("./components/tag/style/index.ts");
  75190. ;// ./components/tag/CheckableTag.tsx
  75191. var CheckableTag_rest = undefined && undefined.__rest || function (s, e) {
  75192. var t = {};
  75193. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  75194. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  75195. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  75196. }
  75197. return t;
  75198. };
  75199. const CheckableTag = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  75200. const {
  75201. prefixCls: customizePrefixCls,
  75202. style,
  75203. className,
  75204. checked,
  75205. children,
  75206. icon,
  75207. onChange,
  75208. onClick
  75209. } = props,
  75210. restProps = CheckableTag_rest(props, ["prefixCls", "style", "className", "checked", "children", "icon", "onChange", "onClick"]);
  75211. const {
  75212. getPrefixCls,
  75213. tag
  75214. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  75215. const handleClick = e => {
  75216. onChange === null || onChange === void 0 ? void 0 : onChange(!checked);
  75217. onClick === null || onClick === void 0 ? void 0 : onClick(e);
  75218. };
  75219. const prefixCls = getPrefixCls('tag', customizePrefixCls);
  75220. // Style
  75221. const [wrapCSSVar, hashId, cssVarCls] = (0,tag_style["default"])(prefixCls);
  75222. const cls = classnames_default()(prefixCls, `${prefixCls}-checkable`, {
  75223. [`${prefixCls}-checkable-checked`]: checked
  75224. }, tag === null || tag === void 0 ? void 0 : tag.className, className, hashId, cssVarCls);
  75225. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, restProps, {
  75226. ref: ref,
  75227. style: Object.assign(Object.assign({}, style), tag === null || tag === void 0 ? void 0 : tag.style),
  75228. className: cls,
  75229. onClick: handleClick
  75230. }), icon, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children)));
  75231. });
  75232. /* harmony default export */ var tag_CheckableTag = (CheckableTag);
  75233. ;// ./components/tag/style/presetCmp.ts
  75234. // Style as status component
  75235. // ============================== Preset ==============================
  75236. const genPresetStyle = token => (0,genPresetColor["default"])(token, (colorKey, {
  75237. textColor,
  75238. lightBorderColor,
  75239. lightColor,
  75240. darkColor
  75241. }) => ({
  75242. [`${token.componentCls}${token.componentCls}-${colorKey}`]: {
  75243. color: textColor,
  75244. background: lightColor,
  75245. borderColor: lightBorderColor,
  75246. // Inverse color
  75247. '&-inverse': {
  75248. color: token.colorTextLightSolid,
  75249. background: darkColor,
  75250. borderColor: darkColor
  75251. },
  75252. [`&${token.componentCls}-borderless`]: {
  75253. borderColor: 'transparent'
  75254. }
  75255. }
  75256. }));
  75257. // ============================== Export ==============================
  75258. /* harmony default export */ var presetCmp = ((0,genStyleUtils.genSubStyleComponent)(['Tag', 'preset'], token => {
  75259. const tagToken = (0,tag_style.prepareToken)(token);
  75260. return genPresetStyle(tagToken);
  75261. }, tag_style.prepareComponentToken));
  75262. ;// ./components/_util/capitalize.ts
  75263. function capitalize(str) {
  75264. if (typeof str !== 'string') {
  75265. return str;
  75266. }
  75267. const ret = str.charAt(0).toUpperCase() + str.slice(1);
  75268. return ret;
  75269. }
  75270. ;// ./components/tag/style/statusCmp.ts
  75271. const genTagStatusStyle = (token, status, cssVariableType) => {
  75272. const capitalizedCssVariableType = capitalize(cssVariableType);
  75273. return {
  75274. [`${token.componentCls}${token.componentCls}-${status}`]: {
  75275. color: token[`color${cssVariableType}`],
  75276. background: token[`color${capitalizedCssVariableType}Bg`],
  75277. borderColor: token[`color${capitalizedCssVariableType}Border`],
  75278. [`&${token.componentCls}-borderless`]: {
  75279. borderColor: 'transparent'
  75280. }
  75281. }
  75282. };
  75283. };
  75284. // ============================== Export ==============================
  75285. /* harmony default export */ var statusCmp = ((0,genStyleUtils.genSubStyleComponent)(['Tag', 'status'], token => {
  75286. const tagToken = (0,tag_style.prepareToken)(token);
  75287. return [genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];
  75288. }, tag_style.prepareComponentToken));
  75289. ;// ./components/tag/index.tsx
  75290. var tag_rest = undefined && undefined.__rest || function (s, e) {
  75291. var t = {};
  75292. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  75293. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  75294. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  75295. }
  75296. return t;
  75297. };
  75298. const InternalTag = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((tagProps, ref) => {
  75299. const {
  75300. prefixCls: customizePrefixCls,
  75301. className,
  75302. rootClassName,
  75303. style,
  75304. children,
  75305. icon,
  75306. color,
  75307. onClose,
  75308. bordered = true,
  75309. visible: deprecatedVisible
  75310. } = tagProps,
  75311. props = tag_rest(tagProps, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "bordered", "visible"]);
  75312. const {
  75313. getPrefixCls,
  75314. direction,
  75315. tag: tagContext
  75316. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  75317. const [visible, setVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
  75318. const domProps = (0,omit["default"])(props, ['closeIcon', 'closable']);
  75319. // Warning for deprecated usage
  75320. if (true) {
  75321. const warning = (0,_util_warning.devUseWarning)('Tag');
  75322. warning.deprecated(!('visible' in tagProps), 'visible', 'visible && <Tag />');
  75323. }
  75324. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  75325. if (deprecatedVisible !== undefined) {
  75326. setVisible(deprecatedVisible);
  75327. }
  75328. }, [deprecatedVisible]);
  75329. const isPreset = isPresetColor(color);
  75330. const isStatus = isPresetStatusColor(color);
  75331. const isInternalColor = isPreset || isStatus;
  75332. const tagStyle = Object.assign(Object.assign({
  75333. backgroundColor: color && !isInternalColor ? color : undefined
  75334. }, tagContext === null || tagContext === void 0 ? void 0 : tagContext.style), style);
  75335. const prefixCls = getPrefixCls('tag', customizePrefixCls);
  75336. const [wrapCSSVar, hashId, cssVarCls] = (0,tag_style["default"])(prefixCls);
  75337. // Style
  75338. const tagClassName = classnames_default()(prefixCls, tagContext === null || tagContext === void 0 ? void 0 : tagContext.className, {
  75339. [`${prefixCls}-${color}`]: isInternalColor,
  75340. [`${prefixCls}-has-color`]: color && !isInternalColor,
  75341. [`${prefixCls}-hidden`]: !visible,
  75342. [`${prefixCls}-rtl`]: direction === 'rtl',
  75343. [`${prefixCls}-borderless`]: !bordered
  75344. }, className, rootClassName, hashId, cssVarCls);
  75345. const handleCloseClick = e => {
  75346. e.stopPropagation();
  75347. onClose === null || onClose === void 0 ? void 0 : onClose(e);
  75348. if (e.defaultPrevented) {
  75349. return;
  75350. }
  75351. setVisible(false);
  75352. };
  75353. const [, mergedCloseIcon] = useClosable(pickClosable(tagProps), pickClosable(tagContext), {
  75354. closable: false,
  75355. closeIconRender: iconNode => {
  75356. const replacement = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  75357. className: `${prefixCls}-close-icon`,
  75358. onClick: handleCloseClick
  75359. }, iconNode);
  75360. return (0,reactNode.replaceElement)(iconNode, replacement, originProps => ({
  75361. onClick: e => {
  75362. var _a;
  75363. (_a = originProps === null || originProps === void 0 ? void 0 : originProps.onClick) === null || _a === void 0 ? void 0 : _a.call(originProps, e);
  75364. handleCloseClick(e);
  75365. },
  75366. className: classnames_default()(originProps === null || originProps === void 0 ? void 0 : originProps.className, `${prefixCls}-close-icon`)
  75367. }));
  75368. }
  75369. });
  75370. const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';
  75371. const iconNode = icon || null;
  75372. const kids = iconNode ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, iconNode, children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, children))) : children;
  75373. const tagNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", Object.assign({}, domProps, {
  75374. ref: ref,
  75375. className: tagClassName,
  75376. style: tagStyle
  75377. }), kids, mergedCloseIcon, isPreset && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(presetCmp, {
  75378. key: "preset",
  75379. prefixCls: prefixCls
  75380. }), isStatus && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(statusCmp, {
  75381. key: "status",
  75382. prefixCls: prefixCls
  75383. }));
  75384. return wrapCSSVar(isNeedWave ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(wave, {
  75385. component: "Tag"
  75386. }, tagNode) : tagNode);
  75387. });
  75388. const Tag = InternalTag;
  75389. if (true) {
  75390. Tag.displayName = 'Tag';
  75391. }
  75392. Tag.CheckableTag = tag_CheckableTag;
  75393. /* harmony default export */ var tag = (Tag);
  75394. // EXTERNAL MODULE: ./components/theme/util/alias.ts
  75395. var alias = __webpack_require__("./components/theme/util/alias.ts");
  75396. ;// ./components/theme/getDesignToken.ts
  75397. const getDesignToken = config => {
  75398. const theme = (config === null || config === void 0 ? void 0 : config.algorithm) ? (0,cssinjs.createTheme)(config.algorithm) : default_theme["default"];
  75399. const mergedToken = Object.assign(Object.assign({}, seed["default"]), config === null || config === void 0 ? void 0 : config.token);
  75400. return (0,cssinjs.getComputedToken)(mergedToken, {
  75401. override: config === null || config === void 0 ? void 0 : config.token
  75402. }, theme, alias["default"]);
  75403. };
  75404. /* harmony default export */ var theme_getDesignToken = (getDesignToken);
  75405. // EXTERNAL MODULE: ./components/theme/themes/default/index.ts + 5 modules
  75406. var themes_default = __webpack_require__("./components/theme/themes/default/index.ts");
  75407. // EXTERNAL MODULE: ./components/theme/themes/shared/genControlHeight.ts
  75408. var genControlHeight = __webpack_require__("./components/theme/themes/shared/genControlHeight.ts");
  75409. // EXTERNAL MODULE: ./components/theme/themes/shared/genFontMapToken.ts
  75410. var genFontMapToken = __webpack_require__("./components/theme/themes/shared/genFontMapToken.ts");
  75411. ;// ./components/theme/themes/compact/genCompactSizeMapToken.ts
  75412. function genSizeMapToken(token) {
  75413. const {
  75414. sizeUnit,
  75415. sizeStep
  75416. } = token;
  75417. const compactSizeStep = sizeStep - 2;
  75418. return {
  75419. sizeXXL: sizeUnit * (compactSizeStep + 10),
  75420. sizeXL: sizeUnit * (compactSizeStep + 6),
  75421. sizeLG: sizeUnit * (compactSizeStep + 2),
  75422. sizeMD: sizeUnit * (compactSizeStep + 2),
  75423. sizeMS: sizeUnit * (compactSizeStep + 1),
  75424. size: sizeUnit * compactSizeStep,
  75425. sizeSM: sizeUnit * compactSizeStep,
  75426. sizeXS: sizeUnit * (compactSizeStep - 1),
  75427. sizeXXS: sizeUnit * (compactSizeStep - 1)
  75428. };
  75429. }
  75430. ;// ./components/theme/themes/compact/index.ts
  75431. const derivative = (token, mapToken) => {
  75432. const mergedMapToken = mapToken !== null && mapToken !== void 0 ? mapToken : (0,themes_default["default"])(token);
  75433. const fontSize = mergedMapToken.fontSizeSM; // Smaller size font-size as base
  75434. const controlHeight = mergedMapToken.controlHeight - 4;
  75435. return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, mergedMapToken), genSizeMapToken(mapToken !== null && mapToken !== void 0 ? mapToken : token)), (0,genFontMapToken["default"])(fontSize)), {
  75436. // controlHeight
  75437. controlHeight
  75438. }), (0,genControlHeight["default"])(Object.assign(Object.assign({}, mergedMapToken), {
  75439. controlHeight
  75440. })));
  75441. };
  75442. /* harmony default export */ var themes_compact = (derivative);
  75443. // EXTERNAL MODULE: ./components/theme/themes/shared/genColorMapToken.ts
  75444. var genColorMapToken = __webpack_require__("./components/theme/themes/shared/genColorMapToken.ts");
  75445. ;// ./components/theme/themes/dark/colorAlgorithm.ts
  75446. const getAlphaColor = (baseColor, alpha) => new fast_color_es.FastColor(baseColor).setA(alpha).toRgbString();
  75447. const getSolidColor = (baseColor, brightness) => {
  75448. const instance = new fast_color_es.FastColor(baseColor);
  75449. return instance.lighten(brightness).toHexString();
  75450. };
  75451. ;// ./components/theme/themes/dark/colors.ts
  75452. const generateColorPalettes = baseColor => {
  75453. const colors = (0,colors_es.generate)(baseColor, {
  75454. theme: 'dark'
  75455. });
  75456. return {
  75457. 1: colors[0],
  75458. 2: colors[1],
  75459. 3: colors[2],
  75460. 4: colors[3],
  75461. 5: colors[6],
  75462. 6: colors[5],
  75463. 7: colors[4],
  75464. 8: colors[6],
  75465. 9: colors[5],
  75466. 10: colors[4]
  75467. // 8: colors[9],
  75468. // 9: colors[8],
  75469. // 10: colors[7],
  75470. };
  75471. };
  75472. const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
  75473. const colorBgBase = bgBaseColor || '#000';
  75474. const colorTextBase = textBaseColor || '#fff';
  75475. return {
  75476. colorBgBase,
  75477. colorTextBase,
  75478. colorText: getAlphaColor(colorTextBase, 0.85),
  75479. colorTextSecondary: getAlphaColor(colorTextBase, 0.65),
  75480. colorTextTertiary: getAlphaColor(colorTextBase, 0.45),
  75481. colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),
  75482. colorFill: getAlphaColor(colorTextBase, 0.18),
  75483. colorFillSecondary: getAlphaColor(colorTextBase, 0.12),
  75484. colorFillTertiary: getAlphaColor(colorTextBase, 0.08),
  75485. colorFillQuaternary: getAlphaColor(colorTextBase, 0.04),
  75486. colorBgSolid: getAlphaColor(colorTextBase, 0.95),
  75487. colorBgSolidHover: getAlphaColor(colorTextBase, 1),
  75488. colorBgSolidActive: getAlphaColor(colorTextBase, 0.9),
  75489. colorBgElevated: getSolidColor(colorBgBase, 12),
  75490. colorBgContainer: getSolidColor(colorBgBase, 8),
  75491. colorBgLayout: getSolidColor(colorBgBase, 0),
  75492. colorBgSpotlight: getSolidColor(colorBgBase, 26),
  75493. colorBgBlur: getAlphaColor(colorTextBase, 0.04),
  75494. colorBorder: getSolidColor(colorBgBase, 26),
  75495. colorBorderSecondary: getSolidColor(colorBgBase, 19)
  75496. };
  75497. };
  75498. ;// ./components/theme/themes/dark/index.ts
  75499. const dark_derivative = (token, mapToken) => {
  75500. const colorPalettes = Object.keys(seed.defaultPresetColors).map(colorKey => {
  75501. const colors = (0,colors_es.generate)(token[colorKey], {
  75502. theme: 'dark'
  75503. });
  75504. return Array.from({
  75505. length: 10
  75506. }, () => 1).reduce((prev, _, i) => {
  75507. prev[`${colorKey}-${i + 1}`] = colors[i];
  75508. prev[`${colorKey}${i + 1}`] = colors[i];
  75509. return prev;
  75510. }, {});
  75511. }).reduce((prev, cur) => {
  75512. prev = Object.assign(Object.assign({}, prev), cur);
  75513. return prev;
  75514. }, {});
  75515. const mergedMapToken = mapToken !== null && mapToken !== void 0 ? mapToken : (0,themes_default["default"])(token);
  75516. const colorMapToken = (0,genColorMapToken["default"])(token, {
  75517. generateColorPalettes: generateColorPalettes,
  75518. generateNeutralColorPalettes: generateNeutralColorPalettes
  75519. });
  75520. return Object.assign(Object.assign(Object.assign(Object.assign({}, mergedMapToken), colorPalettes), colorMapToken), {
  75521. // Customize selected item background color
  75522. // https://github.com/ant-design/ant-design/issues/30524#issuecomment-871961867
  75523. colorPrimaryBg: colorMapToken.colorPrimaryBorder,
  75524. colorPrimaryBgHover: colorMapToken.colorPrimaryBorderHover
  75525. });
  75526. };
  75527. /* harmony default export */ var dark = (dark_derivative);
  75528. ;// ./components/theme/index.tsx
  75529. // ZombieJ: We export as object to user but array in internal.
  75530. // This is used to minimize the bundle size for antd package but safe to refactor as object also.
  75531. // Please do not export internal `useToken` directly to avoid something export unexpected.
  75532. /** Get current context Design Token. Will be different if you are using nest theme config. */
  75533. function theme_useToken() {
  75534. const [theme, token, hashId] = (0,useToken["default"])();
  75535. return {
  75536. theme,
  75537. token,
  75538. hashId
  75539. };
  75540. }
  75541. /* harmony default export */ var theme = ({
  75542. /** Default seedToken */
  75543. defaultSeed: context.defaultConfig.token,
  75544. useToken: theme_useToken,
  75545. defaultAlgorithm: themes_default["default"],
  75546. darkAlgorithm: dark,
  75547. compactAlgorithm: themes_compact,
  75548. getDesignToken: theme_getDesignToken,
  75549. /**
  75550. * @private Private variable
  75551. * @warring 🔥 Do not use in production. 🔥
  75552. */
  75553. defaultConfig: context.defaultConfig,
  75554. /**
  75555. * @private Private variable
  75556. * @warring 🔥 Do not use in production. 🔥
  75557. */
  75558. _internalContext: context.DesignTokenContext
  75559. });
  75560. ;// ./components/time-picker/index.tsx
  75561. var time_picker_rest = undefined && undefined.__rest || function (s, e) {
  75562. var t = {};
  75563. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  75564. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  75565. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  75566. }
  75567. return t;
  75568. };
  75569. const {
  75570. TimePicker: InternalTimePicker,
  75571. RangePicker: InternalRangePicker
  75572. } = date_picker;
  75573. const time_picker_RangePicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalRangePicker, Object.assign({}, props, {
  75574. picker: "time",
  75575. mode: undefined,
  75576. ref: ref
  75577. }))));
  75578. const TimePicker = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_a, ref) => {
  75579. var {
  75580. addon,
  75581. renderExtraFooter,
  75582. variant,
  75583. bordered
  75584. } = _a,
  75585. restProps = time_picker_rest(_a, ["addon", "renderExtraFooter", "variant", "bordered"]);
  75586. if (true) {
  75587. const warning = (0,_util_warning.devUseWarning)('TimePicker');
  75588. warning.deprecated(!addon, 'addon', 'renderExtraFooter');
  75589. }
  75590. const [mergedVariant] = useVariants('timePicker', variant, bordered);
  75591. const internalRenderExtraFooter = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  75592. if (renderExtraFooter) {
  75593. return renderExtraFooter;
  75594. }
  75595. if (addon) {
  75596. return addon;
  75597. }
  75598. return undefined;
  75599. }, [addon, renderExtraFooter]);
  75600. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(InternalTimePicker, Object.assign({}, restProps, {
  75601. mode: undefined,
  75602. ref: ref,
  75603. renderExtraFooter: internalRenderExtraFooter,
  75604. variant: mergedVariant
  75605. }));
  75606. });
  75607. if (true) {
  75608. TimePicker.displayName = 'TimePicker';
  75609. }
  75610. // We don't care debug panel
  75611. /* istanbul ignore next */
  75612. const time_picker_PurePanel = _util_PurePanel(TimePicker, 'popupAlign', undefined, 'picker');
  75613. TimePicker._InternalPanelDoNotUseOrYouWillBeFired = time_picker_PurePanel;
  75614. TimePicker.RangePicker = time_picker_RangePicker;
  75615. TimePicker._InternalPanelDoNotUseOrYouWillBeFired = time_picker_PurePanel;
  75616. /* harmony default export */ var time_picker = (TimePicker);
  75617. // EXTERNAL MODULE: ./components/timeline/style/index.ts
  75618. var timeline_style = __webpack_require__("./components/timeline/style/index.ts");
  75619. ;// ./components/timeline/TimelineItem.tsx
  75620. var TimelineItem_rest = undefined && undefined.__rest || function (s, e) {
  75621. var t = {};
  75622. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  75623. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  75624. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  75625. }
  75626. return t;
  75627. };
  75628. const TimelineItem = _a => {
  75629. var {
  75630. prefixCls: customizePrefixCls,
  75631. className,
  75632. color = 'blue',
  75633. dot,
  75634. pending = false,
  75635. position /** Dead, but do not pass in <li {...omit()} */,
  75636. label,
  75637. children
  75638. } = _a,
  75639. restProps = TimelineItem_rest(_a, ["prefixCls", "className", "color", "dot", "pending", "position", "label", "children"]);
  75640. const {
  75641. getPrefixCls
  75642. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  75643. const prefixCls = getPrefixCls('timeline', customizePrefixCls);
  75644. const itemClassName = classnames_default()(`${prefixCls}-item`, {
  75645. [`${prefixCls}-item-pending`]: pending
  75646. }, className);
  75647. const customColor = /blue|red|green|gray/.test(color || '') ? undefined : color;
  75648. const dotClassName = classnames_default()(`${prefixCls}-item-head`, {
  75649. [`${prefixCls}-item-head-custom`]: !!dot,
  75650. [`${prefixCls}-item-head-${color}`]: !customColor
  75651. });
  75652. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", Object.assign({}, restProps, {
  75653. className: itemClassName
  75654. }), label && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  75655. className: `${prefixCls}-item-label`
  75656. }, label), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  75657. className: `${prefixCls}-item-tail`
  75658. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  75659. className: dotClassName,
  75660. style: {
  75661. borderColor: customColor,
  75662. color: customColor
  75663. }
  75664. }, dot), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  75665. className: `${prefixCls}-item-content`
  75666. }, children));
  75667. };
  75668. /* harmony default export */ var timeline_TimelineItem = (TimelineItem);
  75669. ;// ./components/timeline/TimelineItemList.tsx
  75670. var TimelineItemList_rest = undefined && undefined.__rest || function (s, e) {
  75671. var t = {};
  75672. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  75673. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  75674. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  75675. }
  75676. return t;
  75677. };
  75678. const TimelineItemList = _a => {
  75679. var {
  75680. prefixCls,
  75681. className,
  75682. pending = false,
  75683. children,
  75684. items,
  75685. rootClassName,
  75686. reverse = false,
  75687. direction,
  75688. hashId,
  75689. pendingDot,
  75690. mode = ''
  75691. } = _a,
  75692. restProps = TimelineItemList_rest(_a, ["prefixCls", "className", "pending", "children", "items", "rootClassName", "reverse", "direction", "hashId", "pendingDot", "mode"]);
  75693. const getPositionCls = (position, idx) => {
  75694. if (mode === 'alternate') {
  75695. if (position === 'right') return `${prefixCls}-item-right`;
  75696. if (position === 'left') return `${prefixCls}-item-left`;
  75697. return idx % 2 === 0 ? `${prefixCls}-item-left` : `${prefixCls}-item-right`;
  75698. }
  75699. if (mode === 'left') return `${prefixCls}-item-left`;
  75700. if (mode === 'right') return `${prefixCls}-item-right`;
  75701. if (position === 'right') return `${prefixCls}-item-right`;
  75702. return '';
  75703. };
  75704. const mergedItems = (0,toConsumableArray["default"])(items || []);
  75705. const pendingNode = typeof pending === 'boolean' ? null : pending;
  75706. if (pending) {
  75707. mergedItems.push({
  75708. pending: !!pending,
  75709. dot: pendingDot || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null),
  75710. children: pendingNode
  75711. });
  75712. }
  75713. if (reverse) {
  75714. mergedItems.reverse();
  75715. }
  75716. const itemsCount = mergedItems.length;
  75717. const lastCls = `${prefixCls}-item-last`;
  75718. const itemsList = mergedItems.filter(item => !!item).map((item, idx) => {
  75719. var _a;
  75720. const pendingClass = idx === itemsCount - 2 ? lastCls : '';
  75721. const readyClass = idx === itemsCount - 1 ? lastCls : '';
  75722. const {
  75723. className: itemClassName
  75724. } = item,
  75725. itemProps = TimelineItemList_rest(item, ["className"]);
  75726. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(timeline_TimelineItem, Object.assign({}, itemProps, {
  75727. className: classnames_default()([itemClassName, !reverse && !!pending ? pendingClass : readyClass, getPositionCls((_a = item === null || item === void 0 ? void 0 : item.position) !== null && _a !== void 0 ? _a : '', idx)]),
  75728. key: (item === null || item === void 0 ? void 0 : item.key) || idx
  75729. }));
  75730. });
  75731. const hasLabelItem = mergedItems.some(item => !!(item === null || item === void 0 ? void 0 : item.label));
  75732. const classString = classnames_default()(prefixCls, {
  75733. [`${prefixCls}-pending`]: !!pending,
  75734. [`${prefixCls}-reverse`]: !!reverse,
  75735. [`${prefixCls}-${mode}`]: !!mode && !hasLabelItem,
  75736. [`${prefixCls}-label`]: hasLabelItem,
  75737. [`${prefixCls}-rtl`]: direction === 'rtl'
  75738. }, className, rootClassName, hashId);
  75739. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ol", Object.assign({}, restProps, {
  75740. className: classString
  75741. }), itemsList);
  75742. };
  75743. /* harmony default export */ var timeline_TimelineItemList = (TimelineItemList);
  75744. ;// ./components/timeline/useItems.ts
  75745. function timeline_useItems_useItems(items, children) {
  75746. if (items && Array.isArray(items)) {
  75747. return items;
  75748. }
  75749. return (0,toArray["default"])(children).map(ele => {
  75750. var _a, _b;
  75751. return Object.assign({
  75752. children: (_b = (_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : ''
  75753. }, ele.props);
  75754. });
  75755. }
  75756. /* harmony default export */ var timeline_useItems = (timeline_useItems_useItems);
  75757. ;// ./components/timeline/Timeline.tsx
  75758. var Timeline_rest = undefined && undefined.__rest || function (s, e) {
  75759. var t = {};
  75760. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  75761. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  75762. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  75763. }
  75764. return t;
  75765. };
  75766. // CSSINJS
  75767. const Timeline = props => {
  75768. const {
  75769. getPrefixCls,
  75770. direction,
  75771. timeline
  75772. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  75773. const {
  75774. prefixCls: customizePrefixCls,
  75775. children,
  75776. items,
  75777. className,
  75778. style
  75779. } = props,
  75780. restProps = Timeline_rest(props, ["prefixCls", "children", "items", "className", "style"]);
  75781. const prefixCls = getPrefixCls('timeline', customizePrefixCls);
  75782. // =================== Warning =====================
  75783. if (true) {
  75784. const warning = (0,_util_warning.devUseWarning)('Timeline');
  75785. warning.deprecated(!children, 'Timeline.Item', 'items');
  75786. }
  75787. // Style
  75788. const rootCls = hooks_useCSSVarCls(prefixCls);
  75789. const [wrapCSSVar, hashId, cssVarCls] = (0,timeline_style["default"])(prefixCls, rootCls);
  75790. const mergedItems = timeline_useItems(items, children);
  75791. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(timeline_TimelineItemList, Object.assign({}, restProps, {
  75792. className: classnames_default()(timeline === null || timeline === void 0 ? void 0 : timeline.className, className, cssVarCls, rootCls),
  75793. style: Object.assign(Object.assign({}, timeline === null || timeline === void 0 ? void 0 : timeline.style), style),
  75794. prefixCls: prefixCls,
  75795. direction: direction,
  75796. items: mergedItems,
  75797. hashId: hashId
  75798. })));
  75799. };
  75800. Timeline.Item = timeline_TimelineItem;
  75801. if (true) {
  75802. Timeline.displayName = 'Timeline';
  75803. }
  75804. /* harmony default export */ var timeline_Timeline = (Timeline);
  75805. ;// ./components/timeline/index.tsx
  75806. /* harmony default export */ var timeline = (timeline_Timeline);
  75807. ;// ./node_modules/@rc-component/tour/es/hooks/useClosable.js
  75808. function isConfigObj(closable) {
  75809. return closable !== null && (0,esm_typeof["default"])(closable) === 'object';
  75810. }
  75811. /**
  75812. * Convert `closable` to ClosableConfig.
  75813. * When `preset` is true, will auto fill ClosableConfig with default value.
  75814. */
  75815. function getClosableConfig(closable, closeIcon, preset) {
  75816. if (closable === false || closeIcon === false && (!isConfigObj(closable) || !closable.closeIcon)) {
  75817. return null;
  75818. }
  75819. var mergedCloseIcon = typeof closeIcon !== 'boolean' ? closeIcon : undefined;
  75820. if (isConfigObj(closable)) {
  75821. var _closable$closeIcon;
  75822. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, closable), {}, {
  75823. closeIcon: (_closable$closeIcon = closable.closeIcon) !== null && _closable$closeIcon !== void 0 ? _closable$closeIcon : mergedCloseIcon
  75824. });
  75825. }
  75826. // When StepClosable no need auto fill, but RootClosable need this.
  75827. return preset || closable || closeIcon ? {
  75828. closeIcon: mergedCloseIcon
  75829. } : 'empty';
  75830. }
  75831. function useClosable_useClosable(stepClosable, stepCloseIcon, closable, closeIcon) {
  75832. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  75833. var stepClosableConfig = getClosableConfig(stepClosable, stepCloseIcon, false);
  75834. var rootClosableConfig = getClosableConfig(closable, closeIcon, true);
  75835. if (stepClosableConfig !== 'empty') {
  75836. return stepClosableConfig;
  75837. }
  75838. return rootClosableConfig;
  75839. }, [closable, closeIcon, stepClosable, stepCloseIcon]);
  75840. }
  75841. ;// ./node_modules/@rc-component/tour/es/util.js
  75842. function isInViewPort(element) {
  75843. var viewWidth = window.innerWidth || document.documentElement.clientWidth;
  75844. var viewHeight = window.innerHeight || document.documentElement.clientHeight;
  75845. var _element$getBoundingC = element.getBoundingClientRect(),
  75846. top = _element$getBoundingC.top,
  75847. right = _element$getBoundingC.right,
  75848. bottom = _element$getBoundingC.bottom,
  75849. left = _element$getBoundingC.left;
  75850. return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
  75851. }
  75852. function getPlacement(targetElement, placement, stepPlacement) {
  75853. var _ref;
  75854. return (_ref = stepPlacement !== null && stepPlacement !== void 0 ? stepPlacement : placement) !== null && _ref !== void 0 ? _ref : targetElement === null ? 'center' : 'bottom';
  75855. }
  75856. ;// ./node_modules/@rc-component/tour/es/hooks/useTarget.js
  75857. function isValidNumber(val) {
  75858. return typeof val === 'number' && !Number.isNaN(val);
  75859. }
  75860. function useTarget(target, open, gap, scrollIntoViewOptions) {
  75861. // ========================= Target =========================
  75862. // We trade `undefined` as not get target by function yet.
  75863. // `null` as empty target.
  75864. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(undefined),
  75865. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  75866. targetElement = _useState2[0],
  75867. setTargetElement = _useState2[1];
  75868. (0,useLayoutEffect["default"])(function () {
  75869. var nextElement = typeof target === 'function' ? target() : target;
  75870. setTargetElement(nextElement || null);
  75871. });
  75872. // ========================= Align ==========================
  75873. var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
  75874. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  75875. posInfo = _useState4[0],
  75876. setPosInfo = _useState4[1];
  75877. var updatePos = (0,useEvent["default"])(function () {
  75878. if (targetElement) {
  75879. // Exist target element. We should scroll and get target position
  75880. if (!isInViewPort(targetElement) && open) {
  75881. targetElement.scrollIntoView(scrollIntoViewOptions);
  75882. }
  75883. var _targetElement$getBou = targetElement.getBoundingClientRect(),
  75884. left = _targetElement$getBou.left,
  75885. top = _targetElement$getBou.top,
  75886. width = _targetElement$getBou.width,
  75887. height = _targetElement$getBou.height;
  75888. var nextPosInfo = {
  75889. left: left,
  75890. top: top,
  75891. width: width,
  75892. height: height,
  75893. radius: 0
  75894. };
  75895. setPosInfo(function (origin) {
  75896. if (JSON.stringify(origin) !== JSON.stringify(nextPosInfo)) {
  75897. return nextPosInfo;
  75898. }
  75899. return origin;
  75900. });
  75901. } else {
  75902. // Not exist target which means we just show in center
  75903. setPosInfo(null);
  75904. }
  75905. });
  75906. var getGapOffset = function getGapOffset(index) {
  75907. var _ref;
  75908. return (_ref = Array.isArray(gap === null || gap === void 0 ? void 0 : gap.offset) ? gap === null || gap === void 0 ? void 0 : gap.offset[index] : gap === null || gap === void 0 ? void 0 : gap.offset) !== null && _ref !== void 0 ? _ref : 6;
  75909. };
  75910. (0,useLayoutEffect["default"])(function () {
  75911. updatePos();
  75912. // update when window resize
  75913. window.addEventListener('resize', updatePos);
  75914. return function () {
  75915. window.removeEventListener('resize', updatePos);
  75916. };
  75917. }, [targetElement, open, updatePos]);
  75918. // ======================== PosInfo =========================
  75919. var mergedPosInfo = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  75920. if (!posInfo) {
  75921. return posInfo;
  75922. }
  75923. var gapOffsetX = getGapOffset(0);
  75924. var gapOffsetY = getGapOffset(1);
  75925. var gapRadius = isValidNumber(gap === null || gap === void 0 ? void 0 : gap.radius) ? gap === null || gap === void 0 ? void 0 : gap.radius : 2;
  75926. return {
  75927. left: posInfo.left - gapOffsetX,
  75928. top: posInfo.top - gapOffsetY,
  75929. width: posInfo.width + gapOffsetX * 2,
  75930. height: posInfo.height + gapOffsetY * 2,
  75931. radius: gapRadius
  75932. };
  75933. }, [posInfo, gap]);
  75934. return [mergedPosInfo, targetElement];
  75935. }
  75936. ;// ./node_modules/@rc-component/tour/es/Mask.js
  75937. var COVER_PROPS = {
  75938. fill: 'transparent',
  75939. pointerEvents: 'auto'
  75940. };
  75941. var es_Mask_Mask = function Mask(props) {
  75942. var prefixCls = props.prefixCls,
  75943. rootClassName = props.rootClassName,
  75944. pos = props.pos,
  75945. showMask = props.showMask,
  75946. _props$style = props.style,
  75947. style = _props$style === void 0 ? {} : _props$style,
  75948. _props$fill = props.fill,
  75949. fill = _props$fill === void 0 ? "rgba(0,0,0,0.5)" : _props$fill,
  75950. open = props.open,
  75951. animated = props.animated,
  75952. zIndex = props.zIndex,
  75953. disabledInteraction = props.disabledInteraction;
  75954. var id = hooks_useId();
  75955. var maskId = "".concat(prefixCls, "-mask-").concat(id);
  75956. var mergedAnimated = (0,esm_typeof["default"])(animated) === 'object' ? animated === null || animated === void 0 ? void 0 : animated.placeholder : animated;
  75957. var isSafari = typeof navigator !== 'undefined' && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
  75958. var maskRectSize = isSafari ? {
  75959. width: '100%',
  75960. height: '100%'
  75961. } : {
  75962. width: '100vw',
  75963. height: '100vh'
  75964. };
  75965. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(portal_es, {
  75966. open: open,
  75967. autoLock: true
  75968. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  75969. className: classnames_default()("".concat(prefixCls, "-mask"), rootClassName),
  75970. style: (0,objectSpread2["default"])({
  75971. position: 'fixed',
  75972. left: 0,
  75973. right: 0,
  75974. top: 0,
  75975. bottom: 0,
  75976. zIndex: zIndex,
  75977. pointerEvents: pos && !disabledInteraction ? 'none' : 'auto'
  75978. }, style)
  75979. }, showMask ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
  75980. style: {
  75981. width: '100%',
  75982. height: '100%'
  75983. }
  75984. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("defs", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("mask", {
  75985. id: maskId
  75986. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({
  75987. x: "0",
  75988. y: "0"
  75989. }, maskRectSize, {
  75990. fill: "white"
  75991. })), pos && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", {
  75992. x: pos.left,
  75993. y: pos.top,
  75994. rx: pos.radius,
  75995. width: pos.width,
  75996. height: pos.height,
  75997. fill: "black",
  75998. className: mergedAnimated ? "".concat(prefixCls, "-placeholder-animated") : ''
  75999. }))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", {
  76000. x: "0",
  76001. y: "0",
  76002. width: "100%",
  76003. height: "100%",
  76004. fill: fill,
  76005. mask: "url(#".concat(maskId, ")")
  76006. }), pos && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
  76007. x: "0",
  76008. y: "0",
  76009. width: "100%",
  76010. height: pos.top
  76011. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
  76012. x: "0",
  76013. y: "0",
  76014. width: pos.left,
  76015. height: "100%"
  76016. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
  76017. x: "0",
  76018. y: pos.top + pos.height,
  76019. width: "100%",
  76020. height: "calc(100vh - ".concat(pos.top + pos.height, "px)")
  76021. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("rect", (0,esm_extends["default"])({}, COVER_PROPS, {
  76022. x: pos.left + pos.width,
  76023. y: "0",
  76024. width: "calc(100vw - ".concat(pos.left + pos.width, "px)"),
  76025. height: "100%"
  76026. })))) : null));
  76027. };
  76028. /* harmony default export */ var es_Mask = (es_Mask_Mask);
  76029. ;// ./node_modules/@rc-component/tour/es/placements.js
  76030. var es_placements_autoAdjustOverflow = {
  76031. adjustX: 1,
  76032. adjustY: 1
  76033. };
  76034. var es_placements_targetOffset = [0, 0];
  76035. var basePlacements = {
  76036. left: {
  76037. points: ['cr', 'cl'],
  76038. offset: [-8, 0]
  76039. },
  76040. right: {
  76041. points: ['cl', 'cr'],
  76042. offset: [8, 0]
  76043. },
  76044. top: {
  76045. points: ['bc', 'tc'],
  76046. offset: [0, -8]
  76047. },
  76048. bottom: {
  76049. points: ['tc', 'bc'],
  76050. offset: [0, 8]
  76051. },
  76052. topLeft: {
  76053. points: ['bl', 'tl'],
  76054. offset: [0, -8]
  76055. },
  76056. leftTop: {
  76057. points: ['tr', 'tl'],
  76058. offset: [-8, 0]
  76059. },
  76060. topRight: {
  76061. points: ['br', 'tr'],
  76062. offset: [0, -8]
  76063. },
  76064. rightTop: {
  76065. points: ['tl', 'tr'],
  76066. offset: [8, 0]
  76067. },
  76068. bottomRight: {
  76069. points: ['tr', 'br'],
  76070. offset: [0, 8]
  76071. },
  76072. rightBottom: {
  76073. points: ['bl', 'br'],
  76074. offset: [8, 0]
  76075. },
  76076. bottomLeft: {
  76077. points: ['tl', 'bl'],
  76078. offset: [0, 8]
  76079. },
  76080. leftBottom: {
  76081. points: ['br', 'bl'],
  76082. offset: [-8, 0]
  76083. }
  76084. };
  76085. function placements_getPlacements() {
  76086. var arrowPointAtCenter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  76087. var placements = {};
  76088. Object.keys(basePlacements).forEach(function (key) {
  76089. placements[key] = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, basePlacements[key]), {}, {
  76090. autoArrow: arrowPointAtCenter,
  76091. targetOffset: es_placements_targetOffset
  76092. });
  76093. });
  76094. return placements;
  76095. }
  76096. var tour_es_placements_placements = placements_getPlacements();
  76097. ;// ./node_modules/@rc-component/tour/es/TourStep/DefaultPanel.js
  76098. function DefaultPanel(props) {
  76099. var _closable$closeIcon;
  76100. var prefixCls = props.prefixCls,
  76101. current = props.current,
  76102. total = props.total,
  76103. title = props.title,
  76104. description = props.description,
  76105. onClose = props.onClose,
  76106. onPrev = props.onPrev,
  76107. onNext = props.onNext,
  76108. onFinish = props.onFinish,
  76109. className = props.className,
  76110. closable = props.closable;
  76111. var ariaProps = (0,pickAttrs["default"])(closable || {}, true);
  76112. var closeIcon = (_closable$closeIcon = closable === null || closable === void 0 ? void 0 : closable.closeIcon) !== null && _closable$closeIcon !== void 0 ? _closable$closeIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  76113. className: "".concat(prefixCls, "-close-x")
  76114. }, "\xD7");
  76115. var mergedClosable = !!closable;
  76116. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76117. className: classnames_default()("".concat(prefixCls, "-content"), className)
  76118. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76119. className: "".concat(prefixCls, "-inner")
  76120. }, mergedClosable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", (0,esm_extends["default"])({
  76121. type: "button",
  76122. onClick: onClose,
  76123. "aria-label": "Close"
  76124. }, ariaProps, {
  76125. className: "".concat(prefixCls, "-close")
  76126. }), closeIcon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76127. className: "".concat(prefixCls, "-header")
  76128. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76129. className: "".concat(prefixCls, "-title")
  76130. }, title)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76131. className: "".concat(prefixCls, "-description")
  76132. }, description), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76133. className: "".concat(prefixCls, "-footer")
  76134. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76135. className: "".concat(prefixCls, "-sliders")
  76136. }, total > 1 ? (0,toConsumableArray["default"])(Array.from({
  76137. length: total
  76138. }).keys()).map(function (item, index) {
  76139. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  76140. key: item,
  76141. className: index === current ? 'active' : ''
  76142. });
  76143. }) : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76144. className: "".concat(prefixCls, "-buttons")
  76145. }, current !== 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  76146. className: "".concat(prefixCls, "-prev-btn"),
  76147. onClick: onPrev
  76148. }, "Prev") : null, current === total - 1 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  76149. className: "".concat(prefixCls, "-finish-btn"),
  76150. onClick: onFinish
  76151. }, "Finish") : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  76152. className: "".concat(prefixCls, "-next-btn"),
  76153. onClick: onNext
  76154. }, "Next")))));
  76155. }
  76156. ;// ./node_modules/@rc-component/tour/es/TourStep/index.js
  76157. var TourStep = function TourStep(props) {
  76158. var current = props.current,
  76159. renderPanel = props.renderPanel;
  76160. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, typeof renderPanel === 'function' ? renderPanel(props, current) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(DefaultPanel, props));
  76161. };
  76162. /* harmony default export */ var es_TourStep = (TourStep);
  76163. ;// ./node_modules/@rc-component/tour/es/Tour.js
  76164. var Tour_excluded = ["prefixCls", "steps", "defaultCurrent", "current", "onChange", "onClose", "onFinish", "open", "mask", "arrow", "rootClassName", "placement", "renderPanel", "gap", "animated", "scrollIntoViewOptions", "zIndex", "closeIcon", "closable", "builtinPlacements", "disabledInteraction"];
  76165. var CENTER_PLACEHOLDER = {
  76166. left: '50%',
  76167. top: '50%',
  76168. width: 1,
  76169. height: 1
  76170. };
  76171. var defaultScrollIntoViewOptions = {
  76172. block: 'center',
  76173. inline: 'center'
  76174. };
  76175. var Tour = function Tour(props) {
  76176. var _props$prefixCls = props.prefixCls,
  76177. prefixCls = _props$prefixCls === void 0 ? 'rc-tour' : _props$prefixCls,
  76178. _props$steps = props.steps,
  76179. steps = _props$steps === void 0 ? [] : _props$steps,
  76180. defaultCurrent = props.defaultCurrent,
  76181. current = props.current,
  76182. onChange = props.onChange,
  76183. onClose = props.onClose,
  76184. _onFinish = props.onFinish,
  76185. open = props.open,
  76186. _props$mask = props.mask,
  76187. mask = _props$mask === void 0 ? true : _props$mask,
  76188. _props$arrow = props.arrow,
  76189. arrow = _props$arrow === void 0 ? true : _props$arrow,
  76190. rootClassName = props.rootClassName,
  76191. placement = props.placement,
  76192. renderPanel = props.renderPanel,
  76193. gap = props.gap,
  76194. animated = props.animated,
  76195. _props$scrollIntoView = props.scrollIntoViewOptions,
  76196. scrollIntoViewOptions = _props$scrollIntoView === void 0 ? defaultScrollIntoViewOptions : _props$scrollIntoView,
  76197. _props$zIndex = props.zIndex,
  76198. zIndex = _props$zIndex === void 0 ? 1001 : _props$zIndex,
  76199. closeIcon = props.closeIcon,
  76200. closable = props.closable,
  76201. builtinPlacements = props.builtinPlacements,
  76202. disabledInteraction = props.disabledInteraction,
  76203. restProps = (0,objectWithoutProperties["default"])(props, Tour_excluded);
  76204. var triggerRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  76205. var _useMergedState = (0,useMergedState["default"])(0, {
  76206. value: current,
  76207. defaultValue: defaultCurrent
  76208. }),
  76209. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  76210. mergedCurrent = _useMergedState2[0],
  76211. setMergedCurrent = _useMergedState2[1];
  76212. var _useMergedState3 = (0,useMergedState["default"])(undefined, {
  76213. value: open,
  76214. postState: function postState(origin) {
  76215. return mergedCurrent < 0 || mergedCurrent >= steps.length ? false : origin !== null && origin !== void 0 ? origin : true;
  76216. }
  76217. }),
  76218. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  76219. mergedOpen = _useMergedState4[0],
  76220. setMergedOpen = _useMergedState4[1];
  76221. // Record if already rended in the DOM to avoid `findDOMNode` issue
  76222. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedOpen),
  76223. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  76224. hasOpened = _React$useState2[0],
  76225. setHasOpened = _React$useState2[1];
  76226. var openRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mergedOpen);
  76227. (0,useLayoutEffect["default"])(function () {
  76228. if (mergedOpen) {
  76229. if (!openRef.current) {
  76230. setMergedCurrent(0);
  76231. }
  76232. setHasOpened(true);
  76233. }
  76234. openRef.current = mergedOpen;
  76235. }, [mergedOpen]);
  76236. var _ref = steps[mergedCurrent] || {},
  76237. target = _ref.target,
  76238. stepPlacement = _ref.placement,
  76239. stepStyle = _ref.style,
  76240. stepArrow = _ref.arrow,
  76241. stepClassName = _ref.className,
  76242. stepMask = _ref.mask,
  76243. _ref$scrollIntoViewOp = _ref.scrollIntoViewOptions,
  76244. stepScrollIntoViewOptions = _ref$scrollIntoViewOp === void 0 ? defaultScrollIntoViewOptions : _ref$scrollIntoViewOp,
  76245. stepCloseIcon = _ref.closeIcon,
  76246. stepClosable = _ref.closable;
  76247. var mergedClosable = useClosable_useClosable(stepClosable, stepCloseIcon, closable, closeIcon);
  76248. var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask);
  76249. var mergedScrollIntoViewOptions = stepScrollIntoViewOptions !== null && stepScrollIntoViewOptions !== void 0 ? stepScrollIntoViewOptions : scrollIntoViewOptions;
  76250. var _useTarget = useTarget(target, open, gap, mergedScrollIntoViewOptions),
  76251. _useTarget2 = (0,slicedToArray["default"])(_useTarget, 2),
  76252. posInfo = _useTarget2[0],
  76253. targetElement = _useTarget2[1];
  76254. var mergedPlacement = getPlacement(targetElement, placement, stepPlacement);
  76255. // ========================= arrow =========================
  76256. var mergedArrow = targetElement ? typeof stepArrow === 'undefined' ? arrow : stepArrow : false;
  76257. var arrowPointAtCenter = (0,esm_typeof["default"])(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false;
  76258. (0,useLayoutEffect["default"])(function () {
  76259. var _triggerRef$current;
  76260. (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.forceAlign();
  76261. }, [arrowPointAtCenter, mergedCurrent]);
  76262. // ========================= Change =========================
  76263. var onInternalChange = function onInternalChange(nextCurrent) {
  76264. setMergedCurrent(nextCurrent);
  76265. onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent);
  76266. };
  76267. var mergedBuiltinPlacements = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  76268. if (builtinPlacements) {
  76269. return typeof builtinPlacements === 'function' ? builtinPlacements({
  76270. arrowPointAtCenter: arrowPointAtCenter
  76271. }) : builtinPlacements;
  76272. }
  76273. return placements_getPlacements(arrowPointAtCenter);
  76274. }, [builtinPlacements, arrowPointAtCenter]);
  76275. // ========================= Render =========================
  76276. // Skip if not init yet
  76277. if (targetElement === undefined || !hasOpened) {
  76278. return null;
  76279. }
  76280. var handleClose = function handleClose() {
  76281. setMergedOpen(false);
  76282. onClose === null || onClose === void 0 ? void 0 : onClose(mergedCurrent);
  76283. };
  76284. var getPopupElement = function getPopupElement() {
  76285. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TourStep, (0,esm_extends["default"])({
  76286. arrow: mergedArrow,
  76287. key: "content",
  76288. prefixCls: prefixCls,
  76289. total: steps.length,
  76290. renderPanel: renderPanel,
  76291. onPrev: function onPrev() {
  76292. onInternalChange(mergedCurrent - 1);
  76293. },
  76294. onNext: function onNext() {
  76295. onInternalChange(mergedCurrent + 1);
  76296. },
  76297. onClose: handleClose,
  76298. current: mergedCurrent,
  76299. onFinish: function onFinish() {
  76300. handleClose();
  76301. _onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();
  76302. }
  76303. }, steps[mergedCurrent], {
  76304. closable: mergedClosable
  76305. }));
  76306. };
  76307. var mergedShowMask = typeof mergedMask === 'boolean' ? mergedMask : !!mergedMask;
  76308. var mergedMaskStyle = typeof mergedMask === 'boolean' ? undefined : mergedMask;
  76309. // when targetElement is not exist, use body as triggerDOMNode
  76310. var getTriggerDOMNode = function getTriggerDOMNode(node) {
  76311. return node || targetElement || document.body;
  76312. };
  76313. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_Mask, {
  76314. zIndex: zIndex,
  76315. prefixCls: prefixCls,
  76316. pos: posInfo,
  76317. showMask: mergedShowMask,
  76318. style: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.style,
  76319. fill: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.color,
  76320. open: mergedOpen,
  76321. animated: animated,
  76322. rootClassName: rootClassName,
  76323. disabledInteraction: disabledInteraction
  76324. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(trigger_es, (0,esm_extends["default"])({}, restProps, {
  76325. builtinPlacements: mergedBuiltinPlacements,
  76326. ref: triggerRef,
  76327. popupStyle: stepStyle,
  76328. popupPlacement: mergedPlacement,
  76329. popupVisible: mergedOpen,
  76330. popupClassName: classnames_default()(rootClassName, stepClassName),
  76331. prefixCls: prefixCls,
  76332. popup: getPopupElement,
  76333. forceRender: false,
  76334. destroyPopupOnHide: true,
  76335. zIndex: zIndex,
  76336. getTriggerDOMNode: getTriggerDOMNode,
  76337. arrow: !!mergedArrow
  76338. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(portal_es, {
  76339. open: mergedOpen,
  76340. autoLock: true
  76341. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  76342. className: classnames_default()(rootClassName, "".concat(prefixCls, "-target-placeholder")),
  76343. style: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, posInfo || CENTER_PLACEHOLDER), {}, {
  76344. position: 'fixed',
  76345. pointerEvents: 'none'
  76346. })
  76347. }))));
  76348. };
  76349. /* harmony default export */ var es_Tour = (Tour);
  76350. ;// ./node_modules/@rc-component/tour/es/index.js
  76351. /* harmony default export */ var tour_es = (es_Tour);
  76352. ;// ./components/tour/panelRender.tsx
  76353. function isValidNode(node) {
  76354. return node !== undefined && node !== null;
  76355. }
  76356. // Due to the independent design of Panel, it will be too coupled to put in rc-tour,
  76357. // so a set of Panel logic is implemented separately in antd.
  76358. const TourPanel = props => {
  76359. var _a, _b;
  76360. const {
  76361. stepProps,
  76362. current,
  76363. type,
  76364. indicatorsRender,
  76365. actionsRender
  76366. } = props;
  76367. const {
  76368. prefixCls,
  76369. total = 1,
  76370. title,
  76371. onClose,
  76372. onPrev,
  76373. onNext,
  76374. onFinish,
  76375. cover,
  76376. description,
  76377. nextButtonProps,
  76378. prevButtonProps,
  76379. type: stepType,
  76380. closable
  76381. } = stepProps;
  76382. const mergedType = stepType !== null && stepType !== void 0 ? stepType : type;
  76383. const ariaProps = (0,pickAttrs["default"])(closable !== null && closable !== void 0 ? closable : {}, true);
  76384. const [contextLocaleGlobal] = (0,useLocale["default"])('global', en_US["default"].global);
  76385. const [contextLocaleTour] = (0,useLocale["default"])('Tour', en_US["default"].Tour);
  76386. const mergedCloseIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", Object.assign({
  76387. type: "button",
  76388. onClick: onClose,
  76389. className: `${prefixCls}-close`,
  76390. "aria-label": contextLocaleGlobal === null || contextLocaleGlobal === void 0 ? void 0 : contextLocaleGlobal.close
  76391. }, ariaProps), (closable === null || closable === void 0 ? void 0 : closable.closeIcon) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_CloseOutlined, {
  76392. className: `${prefixCls}-close-icon`
  76393. }));
  76394. const isLastStep = current === total - 1;
  76395. const prevBtnClick = () => {
  76396. var _a;
  76397. onPrev === null || onPrev === void 0 ? void 0 : onPrev();
  76398. (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(prevButtonProps);
  76399. };
  76400. const nextBtnClick = () => {
  76401. var _a;
  76402. if (isLastStep) {
  76403. onFinish === null || onFinish === void 0 ? void 0 : onFinish();
  76404. } else {
  76405. onNext === null || onNext === void 0 ? void 0 : onNext();
  76406. }
  76407. (_a = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(nextButtonProps);
  76408. };
  76409. const headerNode = isValidNode(title) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76410. className: `${prefixCls}-header`
  76411. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76412. className: `${prefixCls}-title`
  76413. }, title))) : null;
  76414. const descriptionNode = isValidNode(description) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76415. className: `${prefixCls}-description`
  76416. }, description)) : null;
  76417. const coverNode = isValidNode(cover) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76418. className: `${prefixCls}-cover`
  76419. }, cover) : null;
  76420. let mergedIndicatorNode;
  76421. if (indicatorsRender) {
  76422. mergedIndicatorNode = indicatorsRender(current, total);
  76423. } else {
  76424. mergedIndicatorNode = (0,toConsumableArray["default"])(Array.from({
  76425. length: total
  76426. }).keys()).map((stepItem, index) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  76427. key: stepItem,
  76428. className: classnames_default()(index === current && `${prefixCls}-indicator-active`, `${prefixCls}-indicator`)
  76429. })));
  76430. }
  76431. const mainBtnType = mergedType === 'primary' ? 'default' : 'primary';
  76432. const secondaryBtnProps = {
  76433. type: 'default',
  76434. ghost: mergedType === 'primary'
  76435. };
  76436. const defaultActionsNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, current !== 0 ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({
  76437. size: "small"
  76438. }, secondaryBtnProps, prevButtonProps, {
  76439. onClick: prevBtnClick,
  76440. className: classnames_default()(`${prefixCls}-prev-btn`, prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.className)
  76441. }), (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.children) !== null && _a !== void 0 ? _a : contextLocaleTour === null || contextLocaleTour === void 0 ? void 0 : contextLocaleTour.Previous)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_button, Object.assign({
  76442. size: "small",
  76443. type: mainBtnType
  76444. }, nextButtonProps, {
  76445. onClick: nextBtnClick,
  76446. className: classnames_default()(`${prefixCls}-next-btn`, nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.className)
  76447. }), (_b = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.children) !== null && _b !== void 0 ? _b : isLastStep ? contextLocaleTour === null || contextLocaleTour === void 0 ? void 0 : contextLocaleTour.Finish : contextLocaleTour === null || contextLocaleTour === void 0 ? void 0 : contextLocaleTour.Next));
  76448. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76449. className: `${prefixCls}-content`
  76450. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76451. className: `${prefixCls}-inner`
  76452. }, closable && mergedCloseIcon, coverNode, headerNode, descriptionNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76453. className: `${prefixCls}-footer`
  76454. }, total > 1 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76455. className: `${prefixCls}-indicators`
  76456. }, mergedIndicatorNode), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  76457. className: `${prefixCls}-buttons`
  76458. }, actionsRender ? actionsRender(defaultActionsNode, {
  76459. current,
  76460. total
  76461. }) : defaultActionsNode))));
  76462. };
  76463. /* harmony default export */ var panelRender = (TourPanel);
  76464. // EXTERNAL MODULE: ./components/tour/style/index.ts
  76465. var tour_style = __webpack_require__("./components/tour/style/index.ts");
  76466. ;// ./components/tour/PurePanel.tsx
  76467. var tour_PurePanel_rest = undefined && undefined.__rest || function (s, e) {
  76468. var t = {};
  76469. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  76470. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  76471. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  76472. }
  76473. return t;
  76474. };
  76475. const tour_PurePanel_PurePanel = props => {
  76476. const {
  76477. prefixCls: customizePrefixCls,
  76478. current = 0,
  76479. total = 6,
  76480. className,
  76481. style,
  76482. type,
  76483. closable,
  76484. closeIcon
  76485. } = props,
  76486. restProps = tour_PurePanel_rest(props, ["prefixCls", "current", "total", "className", "style", "type", "closable", "closeIcon"]);
  76487. const {
  76488. getPrefixCls
  76489. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  76490. const prefixCls = getPrefixCls('tour', customizePrefixCls);
  76491. const [wrapCSSVar, hashId, cssVarCls] = (0,tour_style["default"])(prefixCls);
  76492. const [mergedClosable, mergedCloseIcon] = useClosable({
  76493. closable,
  76494. closeIcon
  76495. }, null, {
  76496. closable: true,
  76497. closeIconRender: icon => {
  76498. var _a;
  76499. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(icon) ? (0,reactNode.cloneElement)(icon, {
  76500. className: classnames_default()((_a = icon.props) === null || _a === void 0 ? void 0 : _a.className, `${prefixCls}-close-icon`)
  76501. }) : icon;
  76502. }
  76503. });
  76504. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RawPurePanel, {
  76505. prefixCls: prefixCls,
  76506. hashId: hashId,
  76507. className: classnames_default()(className, `${prefixCls}-pure`, type && `${prefixCls}-${type}`, cssVarCls),
  76508. style: style
  76509. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(panelRender, {
  76510. stepProps: Object.assign(Object.assign({}, restProps), {
  76511. prefixCls,
  76512. total,
  76513. closable: mergedClosable ? {
  76514. closeIcon: mergedCloseIcon
  76515. } : undefined
  76516. }),
  76517. current: current,
  76518. type: type
  76519. })));
  76520. };
  76521. /* harmony default export */ var tour_PurePanel = (withPureRenderTheme(tour_PurePanel_PurePanel));
  76522. ;// ./components/tour/index.tsx
  76523. var tour_rest = undefined && undefined.__rest || function (s, e) {
  76524. var t = {};
  76525. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  76526. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  76527. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  76528. }
  76529. return t;
  76530. };
  76531. const tour_Tour = props => {
  76532. const {
  76533. prefixCls: customizePrefixCls,
  76534. type,
  76535. rootClassName,
  76536. indicatorsRender,
  76537. actionsRender,
  76538. steps,
  76539. closeIcon
  76540. } = props,
  76541. restProps = tour_rest(props, ["prefixCls", "type", "rootClassName", "indicatorsRender", "actionsRender", "steps", "closeIcon"]);
  76542. const {
  76543. getPrefixCls,
  76544. direction,
  76545. tour
  76546. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  76547. const prefixCls = getPrefixCls('tour', customizePrefixCls);
  76548. const [wrapCSSVar, hashId, cssVarCls] = (0,tour_style["default"])(prefixCls);
  76549. const [, token] = (0,useToken["default"])();
  76550. const mergedSteps = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => steps === null || steps === void 0 ? void 0 : steps.map(step => {
  76551. var _a;
  76552. return Object.assign(Object.assign({}, step), {
  76553. className: classnames_default()(step.className, {
  76554. [`${prefixCls}-primary`]: ((_a = step.type) !== null && _a !== void 0 ? _a : type) === 'primary'
  76555. })
  76556. });
  76557. }), [steps, type]);
  76558. const builtinPlacements = config => {
  76559. var _a;
  76560. return getPlacements({
  76561. arrowPointAtCenter: (_a = config === null || config === void 0 ? void 0 : config.arrowPointAtCenter) !== null && _a !== void 0 ? _a : true,
  76562. autoAdjustOverflow: true,
  76563. offset: token.marginXXS,
  76564. arrowWidth: token.sizePopupArrow,
  76565. borderRadius: token.borderRadius
  76566. });
  76567. };
  76568. const customClassName = classnames_default()({
  76569. [`${prefixCls}-rtl`]: direction === 'rtl'
  76570. }, hashId, cssVarCls, rootClassName);
  76571. const mergedRenderPanel = (stepProps, stepCurrent) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(panelRender, {
  76572. type: type,
  76573. stepProps: stepProps,
  76574. current: stepCurrent,
  76575. indicatorsRender: indicatorsRender,
  76576. actionsRender: actionsRender
  76577. }));
  76578. // ============================ zIndex ============================
  76579. const [zIndex, contextZIndex] = (0,useZIndex.useZIndex)('Tour', restProps.zIndex);
  76580. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(zindexContext["default"].Provider, {
  76581. value: contextZIndex
  76582. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(tour_es, Object.assign({}, restProps, {
  76583. closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : tour === null || tour === void 0 ? void 0 : tour.closeIcon,
  76584. zIndex: zIndex,
  76585. rootClassName: customClassName,
  76586. prefixCls: prefixCls,
  76587. animated: true,
  76588. renderPanel: mergedRenderPanel,
  76589. builtinPlacements: builtinPlacements,
  76590. steps: mergedSteps
  76591. }))));
  76592. };
  76593. if (true) {
  76594. tour_Tour.displayName = 'Tour';
  76595. }
  76596. tour_Tour._InternalPanelDoNotUseOrYouWillBeFired = tour_PurePanel;
  76597. /* harmony default export */ var tour = (tour_Tour);
  76598. ;// ./components/_util/transKeys.ts
  76599. const groupKeysMap = keys => {
  76600. const map = new Map();
  76601. keys.forEach((key, index) => {
  76602. map.set(key, index);
  76603. });
  76604. return map;
  76605. };
  76606. const groupDisabledKeysMap = dataSource => {
  76607. const map = new Map();
  76608. dataSource.forEach(({
  76609. disabled,
  76610. key
  76611. }, index) => {
  76612. if (disabled) {
  76613. map.set(key, index);
  76614. }
  76615. });
  76616. return map;
  76617. };
  76618. ;// ./components/transfer/hooks/useData.ts
  76619. const useData = (dataSource, rowKey, targetKeys) => {
  76620. const mergedDataSource = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (dataSource || []).map(record => {
  76621. if (rowKey) {
  76622. return Object.assign(Object.assign({}, record), {
  76623. key: rowKey(record)
  76624. });
  76625. }
  76626. return record;
  76627. }), [dataSource, rowKey]);
  76628. const [leftDataSource, rightDataSource] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  76629. var _a;
  76630. const leftData = [];
  76631. const rightData = Array.from({
  76632. length: (_a = targetKeys === null || targetKeys === void 0 ? void 0 : targetKeys.length) !== null && _a !== void 0 ? _a : 0
  76633. });
  76634. const targetKeysMap = groupKeysMap(targetKeys || []);
  76635. mergedDataSource.forEach(record => {
  76636. // rightData should be ordered by targetKeys
  76637. // leftData should be ordered by dataSource
  76638. if (targetKeysMap.has(record.key)) {
  76639. const idx = targetKeysMap.get(record.key);
  76640. rightData[idx] = record;
  76641. } else {
  76642. leftData.push(record);
  76643. }
  76644. });
  76645. return [leftData, rightData];
  76646. }, [mergedDataSource, targetKeys]);
  76647. return [mergedDataSource, leftDataSource.filter(Boolean), rightDataSource.filter(Boolean)];
  76648. };
  76649. /* harmony default export */ var hooks_useData = (useData);
  76650. ;// ./components/transfer/hooks/useSelection.ts
  76651. const EMPTY_KEYS = [];
  76652. function filterKeys(keys, dataKeys) {
  76653. const filteredKeys = keys.filter(key => dataKeys.has(key));
  76654. return keys.length === filteredKeys.length ? keys : filteredKeys;
  76655. }
  76656. function useSelection_flattenKeys(keys) {
  76657. return Array.from(keys).join(';');
  76658. }
  76659. function useSelection_useSelection(leftDataSource, rightDataSource, selectedKeys) {
  76660. // Prepare `dataSource` keys
  76661. const [leftKeys, rightKeys] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => [new Set(leftDataSource.map(src => src === null || src === void 0 ? void 0 : src.key)), new Set(rightDataSource.map(src => src === null || src === void 0 ? void 0 : src.key))], [leftDataSource, rightDataSource]);
  76662. // Selected Keys
  76663. const [mergedSelectedKeys, setMergedSelectedKeys] = (0,rc_util_es.useMergedState)(EMPTY_KEYS, {
  76664. value: selectedKeys
  76665. });
  76666. const sourceSelectedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => filterKeys(mergedSelectedKeys, leftKeys), [mergedSelectedKeys, leftKeys]);
  76667. const targetSelectedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => filterKeys(mergedSelectedKeys, rightKeys), [mergedSelectedKeys, rightKeys]);
  76668. // // Reset when data changed
  76669. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  76670. setMergedSelectedKeys([].concat((0,toConsumableArray["default"])(filterKeys(mergedSelectedKeys, leftKeys)), (0,toConsumableArray["default"])(filterKeys(mergedSelectedKeys, rightKeys))));
  76671. }, [useSelection_flattenKeys(leftKeys), useSelection_flattenKeys(rightKeys)]);
  76672. // Update keys
  76673. const setSourceSelectedKeys = (0,rc_util_es.useEvent)(nextSrcKeys => {
  76674. setMergedSelectedKeys([].concat((0,toConsumableArray["default"])(nextSrcKeys), (0,toConsumableArray["default"])(targetSelectedKeys)));
  76675. });
  76676. const setTargetSelectedKeys = (0,rc_util_es.useEvent)(nextTargetKeys => {
  76677. setMergedSelectedKeys([].concat((0,toConsumableArray["default"])(sourceSelectedKeys), (0,toConsumableArray["default"])(nextTargetKeys)));
  76678. });
  76679. return [
  76680. // Keys
  76681. sourceSelectedKeys, targetSelectedKeys,
  76682. // Updater
  76683. setSourceSelectedKeys, setTargetSelectedKeys];
  76684. }
  76685. /* harmony default export */ var transfer_hooks_useSelection = (useSelection_useSelection);
  76686. ;// ./node_modules/@ant-design/icons-svg/es/asn/DeleteOutlined.js
  76687. // This icon file is generated automatically.
  76688. var DeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
  76689. /* harmony default export */ var asn_DeleteOutlined = (DeleteOutlined);
  76690. ;// ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js
  76691. // GENERATE BY ./scripts/generate.ts
  76692. // DON NOT EDIT IT MANUALLY
  76693. var DeleteOutlined_DeleteOutlined = function DeleteOutlined(props, ref) {
  76694. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  76695. ref: ref,
  76696. icon: asn_DeleteOutlined
  76697. }));
  76698. };
  76699. /**![delete](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTM2MCAxODRoLThjNC40IDAgOC0zLjYgOC04djhoMzA0di04YzAgNC40IDMuNiA4IDggOGgtOHY3Mmg3MnYtODBjMC0zNS4zLTI4LjctNjQtNjQtNjRIMzUyYy0zNS4zIDAtNjQgMjguNy02NCA2NHY4MGg3MnYtNzJ6bTUwNCA3MkgxNjBjLTE3LjcgMC0zMiAxNC4zLTMyIDMydjMyYzAgNC40IDMuNiA4IDggOGg2MC40bDI0LjcgNTIzYzEuNiAzNC4xIDI5LjggNjEgNjMuOSA2MWg0NTRjMzQuMiAwIDYyLjMtMjYuOCA2My45LTYxbDI0LjctNTIzSDg4OGM0LjQgMCA4LTMuNiA4LTh2LTMyYzAtMTcuNy0xNC4zLTMyLTMyLTMyek03MzEuMyA4NDBIMjkyLjdsLTI0LjItNTEyaDQ4N2wtMjQuMiA1MTJ6IiAvPjwvc3ZnPg==) */
  76700. var DeleteOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DeleteOutlined_DeleteOutlined);
  76701. if (true) {
  76702. DeleteOutlined_RefIcon.displayName = 'DeleteOutlined';
  76703. }
  76704. /* harmony default export */ var icons_DeleteOutlined = (DeleteOutlined_RefIcon);
  76705. ;// ./components/transfer/ListItem.tsx
  76706. const ListItem = props => {
  76707. const {
  76708. renderedText,
  76709. renderedEl,
  76710. item,
  76711. checked,
  76712. disabled,
  76713. prefixCls,
  76714. onClick,
  76715. onRemove,
  76716. showRemove
  76717. } = props;
  76718. const className = classnames_default()(`${prefixCls}-content-item`, {
  76719. [`${prefixCls}-content-item-disabled`]: disabled || item.disabled,
  76720. [`${prefixCls}-content-item-checked`]: checked && !item.disabled
  76721. });
  76722. let title;
  76723. if (typeof renderedText === 'string' || typeof renderedText === 'number') {
  76724. title = String(renderedText);
  76725. }
  76726. const [contextLocale] = (0,useLocale["default"])('Transfer', en_US["default"].Transfer);
  76727. const liProps = {
  76728. className,
  76729. title
  76730. };
  76731. const labelNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  76732. className: `${prefixCls}-content-item-text`
  76733. }, renderedEl);
  76734. if (showRemove) {
  76735. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", Object.assign({}, liProps), labelNode, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  76736. type: "button",
  76737. disabled: disabled || item.disabled,
  76738. className: `${prefixCls}-content-item-remove`,
  76739. "aria-label": contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.remove,
  76740. onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item)
  76741. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DeleteOutlined, null)));
  76742. }
  76743. // Default click to select
  76744. liProps.onClick = disabled || item.disabled ? undefined : event => onClick(item, event);
  76745. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("li", Object.assign({}, liProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_checkbox, {
  76746. className: `${prefixCls}-checkbox`,
  76747. checked: checked,
  76748. disabled: disabled || item.disabled
  76749. }), labelNode);
  76750. };
  76751. /* harmony default export */ var transfer_ListItem = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.memo(ListItem));
  76752. ;// ./components/transfer/ListBody.tsx
  76753. const OmitProps = ['handleFilter', 'handleClear', 'checkedKeys'];
  76754. const parsePagination = pagination => {
  76755. const defaultPagination = {
  76756. simple: true,
  76757. showSizeChanger: false,
  76758. showLessItems: false
  76759. };
  76760. return Object.assign(Object.assign({}, defaultPagination), pagination);
  76761. };
  76762. const TransferListBody = (props, ref) => {
  76763. const {
  76764. prefixCls,
  76765. filteredRenderItems,
  76766. selectedKeys,
  76767. disabled: globalDisabled,
  76768. showRemove,
  76769. pagination,
  76770. onScroll,
  76771. onItemSelect,
  76772. onItemRemove
  76773. } = props;
  76774. const [current, setCurrent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(1);
  76775. const mergedPagination = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  76776. if (!pagination) {
  76777. return null;
  76778. }
  76779. const convertPagination = typeof pagination === 'object' ? pagination : {};
  76780. return parsePagination(convertPagination);
  76781. }, [pagination]);
  76782. const [pageSize, setPageSize] = (0,useMergedState["default"])(10, {
  76783. value: mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize
  76784. });
  76785. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  76786. if (mergedPagination) {
  76787. const maxPageCount = Math.ceil(filteredRenderItems.length / pageSize);
  76788. setCurrent(Math.min(current, maxPageCount));
  76789. }
  76790. }, [filteredRenderItems, mergedPagination, pageSize]);
  76791. const onInternalClick = (item, e) => {
  76792. onItemSelect(item.key, !selectedKeys.includes(item.key), e);
  76793. };
  76794. const onRemove = item => {
  76795. onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove([item.key]);
  76796. };
  76797. const onPageChange = cur => {
  76798. setCurrent(cur);
  76799. };
  76800. const onSizeChange = (cur, size) => {
  76801. setCurrent(cur);
  76802. setPageSize(size);
  76803. };
  76804. const memoizedItems = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  76805. const displayItems = mergedPagination ? filteredRenderItems.slice((current - 1) * pageSize, current * pageSize) : filteredRenderItems;
  76806. return displayItems;
  76807. }, [current, filteredRenderItems, mergedPagination, pageSize]);
  76808. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  76809. items: memoizedItems
  76810. }));
  76811. const paginationNode = mergedPagination ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_pagination, {
  76812. size: "small",
  76813. disabled: globalDisabled,
  76814. simple: mergedPagination.simple,
  76815. pageSize: pageSize,
  76816. showLessItems: mergedPagination.showLessItems,
  76817. showSizeChanger: mergedPagination.showSizeChanger,
  76818. className: `${prefixCls}-pagination`,
  76819. total: filteredRenderItems.length,
  76820. current: current,
  76821. onChange: onPageChange,
  76822. onShowSizeChange: onSizeChange
  76823. })) : null;
  76824. const cls = classnames_default()(`${prefixCls}-content`, {
  76825. [`${prefixCls}-content-show-remove`]: showRemove
  76826. });
  76827. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("ul", {
  76828. className: cls,
  76829. onScroll: onScroll
  76830. }, (memoizedItems || []).map(({
  76831. renderedEl,
  76832. renderedText,
  76833. item
  76834. }) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(transfer_ListItem, {
  76835. key: item.key,
  76836. item: item,
  76837. renderedText: renderedText,
  76838. renderedEl: renderedEl,
  76839. prefixCls: prefixCls,
  76840. showRemove: showRemove,
  76841. onClick: onInternalClick,
  76842. onRemove: onRemove,
  76843. checked: selectedKeys.includes(item.key),
  76844. disabled: globalDisabled || item.disabled
  76845. })))), paginationNode);
  76846. };
  76847. if (true) {
  76848. TransferListBody.displayName = 'TransferListBody';
  76849. }
  76850. /* harmony default export */ var ListBody = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(TransferListBody));
  76851. ;// ./components/transfer/search.tsx
  76852. const search_Search = props => {
  76853. const {
  76854. placeholder = '',
  76855. value,
  76856. prefixCls,
  76857. disabled,
  76858. onChange,
  76859. handleClear
  76860. } = props;
  76861. const handleChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(e => {
  76862. onChange === null || onChange === void 0 ? void 0 : onChange(e);
  76863. if (e.target.value === '') {
  76864. handleClear === null || handleClear === void 0 ? void 0 : handleClear();
  76865. }
  76866. }, [onChange]);
  76867. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_Input, {
  76868. placeholder: placeholder,
  76869. className: prefixCls,
  76870. value: value,
  76871. onChange: handleChange,
  76872. disabled: disabled,
  76873. allowClear: true,
  76874. prefix: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_SearchOutlined, null)
  76875. });
  76876. };
  76877. if (true) {
  76878. search_Search.displayName = 'Search';
  76879. }
  76880. /* harmony default export */ var transfer_search = (search_Search);
  76881. ;// ./components/transfer/list.tsx
  76882. const list_defaultRender = () => null;
  76883. function isRenderResultPlainObject(result) {
  76884. return !!(result && ! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]');
  76885. }
  76886. function getEnabledItemKeys(items) {
  76887. return items.filter(data => !data.disabled).map(data => data.key);
  76888. }
  76889. const isValidIcon = icon => icon !== undefined;
  76890. const getShowSearchOption = showSearch => {
  76891. if (showSearch && typeof showSearch === 'object') {
  76892. return Object.assign(Object.assign({}, showSearch), {
  76893. defaultValue: showSearch.defaultValue || ''
  76894. });
  76895. }
  76896. return {
  76897. defaultValue: '',
  76898. placeholder: ''
  76899. };
  76900. };
  76901. const TransferList = props => {
  76902. const {
  76903. prefixCls,
  76904. dataSource = [],
  76905. titleText = '',
  76906. checkedKeys,
  76907. disabled,
  76908. showSearch = false,
  76909. style,
  76910. searchPlaceholder,
  76911. notFoundContent,
  76912. selectAll,
  76913. deselectAll,
  76914. selectCurrent,
  76915. selectInvert,
  76916. removeAll,
  76917. removeCurrent,
  76918. showSelectAll = true,
  76919. showRemove,
  76920. pagination,
  76921. direction,
  76922. itemsUnit,
  76923. itemUnit,
  76924. selectAllLabel,
  76925. selectionsIcon,
  76926. footer,
  76927. renderList,
  76928. onItemSelectAll,
  76929. onItemRemove,
  76930. handleFilter,
  76931. handleClear,
  76932. filterOption,
  76933. render = list_defaultRender
  76934. } = props;
  76935. const searchOptions = getShowSearchOption(showSearch);
  76936. const [filterValue, setFilterValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(searchOptions.defaultValue);
  76937. const listBodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
  76938. const internalHandleFilter = e => {
  76939. setFilterValue(e.target.value);
  76940. handleFilter(e);
  76941. };
  76942. const internalHandleClear = () => {
  76943. setFilterValue('');
  76944. handleClear();
  76945. };
  76946. const matchFilter = (text, item) => {
  76947. if (filterOption) {
  76948. return filterOption(filterValue, item, direction);
  76949. }
  76950. return text.includes(filterValue);
  76951. };
  76952. const renderListBody = listProps => {
  76953. let bodyContent = renderList ? renderList(Object.assign(Object.assign({}, listProps), {
  76954. onItemSelect: (key, check) => listProps.onItemSelect(key, check)
  76955. })) : null;
  76956. const customize = !!bodyContent;
  76957. if (!customize) {
  76958. // @ts-ignore
  76959. bodyContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ListBody, Object.assign({
  76960. ref: listBodyRef
  76961. }, listProps));
  76962. }
  76963. return {
  76964. customize,
  76965. bodyContent
  76966. };
  76967. };
  76968. const renderItem = item => {
  76969. const renderResult = render(item);
  76970. const isRenderResultPlain = isRenderResultPlainObject(renderResult);
  76971. return {
  76972. item,
  76973. renderedEl: isRenderResultPlain ? renderResult.label : renderResult,
  76974. renderedText: isRenderResultPlain ? renderResult.value : renderResult
  76975. };
  76976. };
  76977. const notFoundContentEle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => Array.isArray(notFoundContent) ? notFoundContent[direction === 'left' ? 0 : 1] : notFoundContent, [notFoundContent, direction]);
  76978. const [filteredItems, filteredRenderItems] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  76979. const filterItems = [];
  76980. const filterRenderItems = [];
  76981. dataSource.forEach(item => {
  76982. const renderedItem = renderItem(item);
  76983. if (filterValue && !matchFilter(renderedItem.renderedText, item)) {
  76984. return;
  76985. }
  76986. filterItems.push(item);
  76987. filterRenderItems.push(renderedItem);
  76988. });
  76989. return [filterItems, filterRenderItems];
  76990. }, [dataSource, filterValue]);
  76991. const checkedActiveItems = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  76992. return filteredItems.filter(item => checkedKeys.includes(item.key) && !item.disabled);
  76993. }, [checkedKeys, filteredItems]);
  76994. const checkStatus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  76995. if (checkedActiveItems.length === 0) {
  76996. return 'none';
  76997. }
  76998. const checkedKeysMap = groupKeysMap(checkedKeys);
  76999. if (filteredItems.every(item => checkedKeysMap.has(item.key) || !!item.disabled)) {
  77000. return 'all';
  77001. }
  77002. return 'part';
  77003. }, [checkedKeys, checkedActiveItems]);
  77004. const listBody = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  77005. const search = showSearch ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77006. className: `${prefixCls}-body-search-wrapper`
  77007. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(transfer_search, {
  77008. prefixCls: `${prefixCls}-search`,
  77009. onChange: internalHandleFilter,
  77010. handleClear: internalHandleClear,
  77011. placeholder: searchOptions.placeholder || searchPlaceholder,
  77012. value: filterValue,
  77013. disabled: disabled
  77014. }))) : null;
  77015. const {
  77016. customize,
  77017. bodyContent
  77018. } = renderListBody(Object.assign(Object.assign({}, (0,omit["default"])(props, OmitProps)), {
  77019. filteredItems,
  77020. filteredRenderItems,
  77021. selectedKeys: checkedKeys
  77022. }));
  77023. let bodyNode;
  77024. // We should wrap customize list body in a classNamed div to use flex layout.
  77025. if (customize) {
  77026. bodyNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77027. className: `${prefixCls}-body-customize-wrapper`
  77028. }, bodyContent);
  77029. } else {
  77030. bodyNode = filteredItems.length ? bodyContent : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77031. className: `${prefixCls}-body-not-found`
  77032. }, notFoundContentEle));
  77033. }
  77034. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77035. className: classnames_default()(`${prefixCls}-body`, {
  77036. [`${prefixCls}-body-with-search`]: showSearch
  77037. })
  77038. }, search, bodyNode);
  77039. }, [showSearch, prefixCls, searchPlaceholder, filterValue, disabled, checkedKeys, filteredItems, filteredRenderItems, notFoundContentEle]);
  77040. const checkBox = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_checkbox, {
  77041. disabled: dataSource.filter(d => !d.disabled).length === 0 || disabled,
  77042. checked: checkStatus === 'all',
  77043. indeterminate: checkStatus === 'part',
  77044. className: `${prefixCls}-checkbox`,
  77045. onChange: () => {
  77046. // Only select enabled items
  77047. onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(filteredItems.filter(item => !item.disabled).map(({
  77048. key
  77049. }) => key), checkStatus !== 'all');
  77050. }
  77051. });
  77052. const getSelectAllLabel = (selectedCount, totalCount) => {
  77053. if (selectAllLabel) {
  77054. return typeof selectAllLabel === 'function' ? selectAllLabel({
  77055. selectedCount,
  77056. totalCount
  77057. }) : selectAllLabel;
  77058. }
  77059. const unit = totalCount > 1 ? itemsUnit : itemUnit;
  77060. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, (selectedCount > 0 ? `${selectedCount}/` : '') + totalCount, " ", unit);
  77061. };
  77062. // Custom Layout
  77063. const footerDom = footer && (footer.length < 2 ? footer(props) : footer(props, {
  77064. direction
  77065. }));
  77066. const listCls = classnames_default()(prefixCls, {
  77067. [`${prefixCls}-with-pagination`]: !!pagination,
  77068. [`${prefixCls}-with-footer`]: !!footerDom
  77069. });
  77070. // ====================== Get filtered, checked item list ======================
  77071. const listFooter = footerDom ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77072. className: `${prefixCls}-footer`
  77073. }, footerDom) : null;
  77074. const checkAllCheckbox = !showRemove && !pagination && checkBox;
  77075. let items;
  77076. if (showRemove) {
  77077. items = [/* Remove Current Page */
  77078. pagination ? {
  77079. key: 'removeCurrent',
  77080. label: removeCurrent,
  77081. onClick() {
  77082. var _a;
  77083. const pageKeys = getEnabledItemKeys((((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || []).map(entity => entity.item));
  77084. onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(pageKeys);
  77085. }
  77086. } : null, /* Remove All */
  77087. {
  77088. key: 'removeAll',
  77089. label: removeAll,
  77090. onClick() {
  77091. onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(getEnabledItemKeys(filteredItems));
  77092. }
  77093. }].filter(Boolean);
  77094. } else {
  77095. items = [{
  77096. key: 'selectAll',
  77097. label: checkStatus === 'all' ? deselectAll : selectAll,
  77098. onClick() {
  77099. const keys = getEnabledItemKeys(filteredItems);
  77100. onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(keys, keys.length !== checkedKeys.length);
  77101. }
  77102. }, pagination ? {
  77103. key: 'selectCurrent',
  77104. label: selectCurrent,
  77105. onClick() {
  77106. var _a;
  77107. const pageItems = ((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || [];
  77108. onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(getEnabledItemKeys(pageItems.map(entity => entity.item)), true);
  77109. }
  77110. } : null, {
  77111. key: 'selectInvert',
  77112. label: selectInvert,
  77113. onClick() {
  77114. var _a;
  77115. const availablePageItemKeys = getEnabledItemKeys((((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || []).map(entity => entity.item));
  77116. const checkedKeySet = new Set(checkedKeys);
  77117. const newCheckedKeysSet = new Set(checkedKeySet);
  77118. availablePageItemKeys.forEach(key => {
  77119. if (checkedKeySet.has(key)) {
  77120. newCheckedKeysSet.delete(key);
  77121. } else {
  77122. newCheckedKeysSet.add(key);
  77123. }
  77124. });
  77125. onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(Array.from(newCheckedKeysSet), 'replace');
  77126. }
  77127. }];
  77128. }
  77129. const dropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_dropdown, {
  77130. className: `${prefixCls}-header-dropdown`,
  77131. menu: {
  77132. items
  77133. },
  77134. disabled: disabled
  77135. }, isValidIcon(selectionsIcon) ? selectionsIcon : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(icons_DownOutlined, null));
  77136. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77137. className: listCls,
  77138. style: style
  77139. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77140. className: `${prefixCls}-header`
  77141. }, showSelectAll ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, checkAllCheckbox, dropdown)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  77142. className: `${prefixCls}-header-selected`
  77143. }, getSelectAllLabel(checkedActiveItems.length, filteredItems.length)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
  77144. className: `${prefixCls}-header-title`
  77145. }, titleText)), listBody, listFooter);
  77146. };
  77147. if (true) {
  77148. TransferList.displayName = 'TransferList';
  77149. }
  77150. /* harmony default export */ var transfer_list = (TransferList);
  77151. ;// ./components/transfer/operation.tsx
  77152. const Operation = props => {
  77153. const {
  77154. disabled,
  77155. moveToLeft,
  77156. moveToRight,
  77157. leftArrowText = '',
  77158. rightArrowText = '',
  77159. leftActive,
  77160. rightActive,
  77161. className,
  77162. style,
  77163. direction,
  77164. oneWay
  77165. } = props;
  77166. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  77167. className: className,
  77168. style: style
  77169. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  77170. type: "primary",
  77171. size: "small",
  77172. disabled: disabled || !rightActive,
  77173. onClick: moveToRight,
  77174. icon: direction !== 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null)
  77175. }, rightArrowText), !oneWay && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, {
  77176. type: "primary",
  77177. size: "small",
  77178. disabled: disabled || !leftActive,
  77179. onClick: moveToLeft,
  77180. icon: direction !== 'rtl' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LeftOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(RightOutlined["default"], null)
  77181. }, leftArrowText)));
  77182. };
  77183. if (true) {
  77184. Operation.displayName = 'Operation';
  77185. }
  77186. /* harmony default export */ var operation = (Operation);
  77187. // EXTERNAL MODULE: ./components/transfer/style/index.ts
  77188. var transfer_style = __webpack_require__("./components/transfer/style/index.ts");
  77189. ;// ./components/transfer/index.tsx
  77190. const Transfer = props => {
  77191. const {
  77192. dataSource,
  77193. targetKeys = [],
  77194. selectedKeys,
  77195. selectAllLabels = [],
  77196. operations = [],
  77197. style = {},
  77198. listStyle = {},
  77199. locale = {},
  77200. titles,
  77201. disabled,
  77202. showSearch = false,
  77203. operationStyle,
  77204. showSelectAll,
  77205. oneWay,
  77206. pagination,
  77207. status: customStatus,
  77208. prefixCls: customizePrefixCls,
  77209. className,
  77210. rootClassName,
  77211. selectionsIcon,
  77212. filterOption,
  77213. render,
  77214. footer,
  77215. children,
  77216. rowKey,
  77217. onScroll,
  77218. onChange,
  77219. onSearch,
  77220. onSelectChange
  77221. } = props;
  77222. const {
  77223. getPrefixCls,
  77224. renderEmpty,
  77225. direction: dir,
  77226. transfer
  77227. } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(config_provider_context.ConfigContext);
  77228. const prefixCls = getPrefixCls('transfer', customizePrefixCls);
  77229. const [wrapCSSVar, hashId, cssVarCls] = (0,transfer_style["default"])(prefixCls);
  77230. // Fill record with `key`
  77231. const [mergedDataSource, leftDataSource, rightDataSource] = hooks_useData(dataSource, rowKey, targetKeys);
  77232. // Get direction selected keys
  77233. const [
  77234. // Keys
  77235. sourceSelectedKeys, targetSelectedKeys,
  77236. // Setters
  77237. setSourceSelectedKeys, setTargetSelectedKeys] = transfer_hooks_useSelection(leftDataSource, rightDataSource, selectedKeys);
  77238. const [leftMultipleSelect, updateLeftPrevSelectedIndex] = useMultipleSelect(item => item.key);
  77239. const [rightMultipleSelect, updateRightPrevSelectedIndex] = useMultipleSelect(item => item.key);
  77240. if (true) {
  77241. const warning = (0,_util_warning.devUseWarning)('Transfer');
  77242. true ? warning(!pagination || !children, 'usage', '`pagination` not support customize render list.') : 0;
  77243. }
  77244. const setStateKeys = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((direction, keys) => {
  77245. if (direction === 'left') {
  77246. const nextKeys = typeof keys === 'function' ? keys(sourceSelectedKeys || []) : keys;
  77247. setSourceSelectedKeys(nextKeys);
  77248. } else {
  77249. const nextKeys = typeof keys === 'function' ? keys(targetSelectedKeys || []) : keys;
  77250. setTargetSelectedKeys(nextKeys);
  77251. }
  77252. }, [sourceSelectedKeys, targetSelectedKeys]);
  77253. const setPrevSelectedIndex = (direction, value) => {
  77254. const isLeftDirection = direction === 'left';
  77255. const updatePrevSelectedIndex = isLeftDirection ? updateLeftPrevSelectedIndex : updateRightPrevSelectedIndex;
  77256. updatePrevSelectedIndex(value);
  77257. };
  77258. const handleSelectChange = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((direction, holder) => {
  77259. if (direction === 'left') {
  77260. onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(holder, targetSelectedKeys);
  77261. } else {
  77262. onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(sourceSelectedKeys, holder);
  77263. }
  77264. }, [sourceSelectedKeys, targetSelectedKeys]);
  77265. const getTitles = transferLocale => {
  77266. var _a;
  77267. return (_a = titles !== null && titles !== void 0 ? titles : transferLocale.titles) !== null && _a !== void 0 ? _a : [];
  77268. };
  77269. const handleLeftScroll = e => {
  77270. onScroll === null || onScroll === void 0 ? void 0 : onScroll('left', e);
  77271. };
  77272. const handleRightScroll = e => {
  77273. onScroll === null || onScroll === void 0 ? void 0 : onScroll('right', e);
  77274. };
  77275. const moveTo = direction => {
  77276. const moveKeys = direction === 'right' ? sourceSelectedKeys : targetSelectedKeys;
  77277. const dataSourceDisabledKeysMap = groupDisabledKeysMap(mergedDataSource);
  77278. // filter the disabled options
  77279. const newMoveKeys = moveKeys.filter(key => !dataSourceDisabledKeysMap.has(key));
  77280. const newMoveKeysMap = groupKeysMap(newMoveKeys);
  77281. // move items to target box
  77282. const newTargetKeys = direction === 'right' ? newMoveKeys.concat(targetKeys) : targetKeys.filter(targetKey => !newMoveKeysMap.has(targetKey));
  77283. // empty checked keys
  77284. const oppositeDirection = direction === 'right' ? 'left' : 'right';
  77285. setStateKeys(oppositeDirection, []);
  77286. handleSelectChange(oppositeDirection, []);
  77287. onChange === null || onChange === void 0 ? void 0 : onChange(newTargetKeys, direction, newMoveKeys);
  77288. };
  77289. const moveToLeft = () => {
  77290. moveTo('left');
  77291. setPrevSelectedIndex('left', null);
  77292. };
  77293. const moveToRight = () => {
  77294. moveTo('right');
  77295. setPrevSelectedIndex('right', null);
  77296. };
  77297. const onItemSelectAll = (direction, keys, checkAll) => {
  77298. setStateKeys(direction, prevKeys => {
  77299. let mergedCheckedKeys = [];
  77300. if (checkAll === 'replace') {
  77301. mergedCheckedKeys = keys;
  77302. } else if (checkAll) {
  77303. // Merge current keys with origin key
  77304. mergedCheckedKeys = Array.from(new Set([].concat((0,toConsumableArray["default"])(prevKeys), (0,toConsumableArray["default"])(keys))));
  77305. } else {
  77306. const selectedKeysMap = groupKeysMap(keys);
  77307. // Remove current keys from origin keys
  77308. mergedCheckedKeys = prevKeys.filter(key => !selectedKeysMap.has(key));
  77309. }
  77310. handleSelectChange(direction, mergedCheckedKeys);
  77311. return mergedCheckedKeys;
  77312. });
  77313. setPrevSelectedIndex(direction, null);
  77314. };
  77315. const onLeftItemSelectAll = (keys, checkAll) => {
  77316. onItemSelectAll('left', keys, checkAll);
  77317. };
  77318. const onRightItemSelectAll = (keys, checkAll) => {
  77319. onItemSelectAll('right', keys, checkAll);
  77320. };
  77321. const leftFilter = e => onSearch === null || onSearch === void 0 ? void 0 : onSearch('left', e.target.value);
  77322. const rightFilter = e => onSearch === null || onSearch === void 0 ? void 0 : onSearch('right', e.target.value);
  77323. const handleLeftClear = () => onSearch === null || onSearch === void 0 ? void 0 : onSearch('left', '');
  77324. const handleRightClear = () => onSearch === null || onSearch === void 0 ? void 0 : onSearch('right', '');
  77325. const handleSingleSelect = (direction, holder, selectedKey, checked, currentSelectedIndex) => {
  77326. const isSelected = holder.has(selectedKey);
  77327. if (isSelected) {
  77328. holder.delete(selectedKey);
  77329. setPrevSelectedIndex(direction, null);
  77330. }
  77331. if (checked) {
  77332. holder.add(selectedKey);
  77333. setPrevSelectedIndex(direction, currentSelectedIndex);
  77334. }
  77335. };
  77336. const handleMultipleSelect = (direction, data, holder, currentSelectedIndex) => {
  77337. const isLeftDirection = direction === 'left';
  77338. const multipleSelect = isLeftDirection ? leftMultipleSelect : rightMultipleSelect;
  77339. multipleSelect(currentSelectedIndex, data, holder);
  77340. };
  77341. const onItemSelect = (direction, selectedKey, checked, multiple) => {
  77342. const isLeftDirection = direction === 'left';
  77343. const holder = (0,toConsumableArray["default"])(isLeftDirection ? sourceSelectedKeys : targetSelectedKeys);
  77344. const holderSet = new Set(holder);
  77345. const data = (0,toConsumableArray["default"])(isLeftDirection ? leftDataSource : rightDataSource).filter(item => !(item === null || item === void 0 ? void 0 : item.disabled));
  77346. const currentSelectedIndex = data.findIndex(item => item.key === selectedKey);
  77347. // multiple select by hold down the shift key
  77348. if (multiple && holder.length > 0) {
  77349. handleMultipleSelect(direction, data, holderSet, currentSelectedIndex);
  77350. } else {
  77351. handleSingleSelect(direction, holderSet, selectedKey, checked, currentSelectedIndex);
  77352. }
  77353. const holderArr = Array.from(holderSet);
  77354. handleSelectChange(direction, holderArr);
  77355. if (!props.selectedKeys) {
  77356. setStateKeys(direction, holderArr);
  77357. }
  77358. };
  77359. const onLeftItemSelect = (selectedKey, checked, e) => {
  77360. onItemSelect('left', selectedKey, checked, e === null || e === void 0 ? void 0 : e.shiftKey);
  77361. };
  77362. const onRightItemSelect = (selectedKey, checked, e) => {
  77363. onItemSelect('right', selectedKey, checked, e === null || e === void 0 ? void 0 : e.shiftKey);
  77364. };
  77365. const onRightItemRemove = keys => {
  77366. setStateKeys('right', []);
  77367. onChange === null || onChange === void 0 ? void 0 : onChange(targetKeys.filter(key => !keys.includes(key)), 'left', (0,toConsumableArray["default"])(keys));
  77368. };
  77369. const handleListStyle = direction => {
  77370. if (typeof listStyle === 'function') {
  77371. return listStyle({
  77372. direction
  77373. });
  77374. }
  77375. return listStyle || {};
  77376. };
  77377. const formItemContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemInputContext);
  77378. const {
  77379. hasFeedback,
  77380. status
  77381. } = formItemContext;
  77382. const getLocale = transferLocale => Object.assign(Object.assign(Object.assign({}, transferLocale), {
  77383. notFoundContent: (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Transfer')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(defaultRenderEmpty, {
  77384. componentName: "Transfer"
  77385. })
  77386. }), locale);
  77387. const mergedStatus = getMergedStatus(status, customStatus);
  77388. const mergedPagination = !children && pagination;
  77389. const leftActive = rightDataSource.filter(d => targetSelectedKeys.includes(d.key) && !d.disabled).length > 0;
  77390. const rightActive = leftDataSource.filter(d => sourceSelectedKeys.includes(d.key) && !d.disabled).length > 0;
  77391. const cls = classnames_default()(prefixCls, {
  77392. [`${prefixCls}-disabled`]: disabled,
  77393. [`${prefixCls}-customize-list`]: !!children,
  77394. [`${prefixCls}-rtl`]: dir === 'rtl'
  77395. }, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), transfer === null || transfer === void 0 ? void 0 : transfer.className, className, rootClassName, hashId, cssVarCls);
  77396. const [contextLocale] = (0,useLocale["default"])('Transfer', en_US["default"].Transfer);
  77397. const listLocale = getLocale(contextLocale);
  77398. const [leftTitle, rightTitle] = getTitles(listLocale);
  77399. const mergedSelectionsIcon = selectionsIcon !== null && selectionsIcon !== void 0 ? selectionsIcon : transfer === null || transfer === void 0 ? void 0 : transfer.selectionsIcon;
  77400. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  77401. className: cls,
  77402. style: Object.assign(Object.assign({}, transfer === null || transfer === void 0 ? void 0 : transfer.style), style)
  77403. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(transfer_list, Object.assign({
  77404. prefixCls: `${prefixCls}-list`,
  77405. titleText: leftTitle,
  77406. dataSource: leftDataSource,
  77407. filterOption: filterOption,
  77408. style: handleListStyle('left'),
  77409. checkedKeys: sourceSelectedKeys,
  77410. handleFilter: leftFilter,
  77411. handleClear: handleLeftClear,
  77412. onItemSelect: onLeftItemSelect,
  77413. onItemSelectAll: onLeftItemSelectAll,
  77414. render: render,
  77415. showSearch: showSearch,
  77416. renderList: children,
  77417. footer: footer,
  77418. onScroll: handleLeftScroll,
  77419. disabled: disabled,
  77420. direction: dir === 'rtl' ? 'right' : 'left',
  77421. showSelectAll: showSelectAll,
  77422. selectAllLabel: selectAllLabels[0],
  77423. pagination: mergedPagination,
  77424. selectionsIcon: mergedSelectionsIcon
  77425. }, listLocale)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(operation, {
  77426. className: `${prefixCls}-operation`,
  77427. rightActive: rightActive,
  77428. rightArrowText: operations[0],
  77429. moveToRight: moveToRight,
  77430. leftActive: leftActive,
  77431. leftArrowText: operations[1],
  77432. moveToLeft: moveToLeft,
  77433. style: operationStyle,
  77434. disabled: disabled,
  77435. direction: dir,
  77436. oneWay: oneWay
  77437. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(transfer_list, Object.assign({
  77438. prefixCls: `${prefixCls}-list`,
  77439. titleText: rightTitle,
  77440. dataSource: rightDataSource,
  77441. filterOption: filterOption,
  77442. style: handleListStyle('right'),
  77443. checkedKeys: targetSelectedKeys,
  77444. handleFilter: rightFilter,
  77445. handleClear: handleRightClear,
  77446. onItemSelect: onRightItemSelect,
  77447. onItemSelectAll: onRightItemSelectAll,
  77448. onItemRemove: onRightItemRemove,
  77449. render: render,
  77450. showSearch: showSearch,
  77451. renderList: children,
  77452. footer: footer,
  77453. onScroll: handleRightScroll,
  77454. disabled: disabled,
  77455. direction: dir === 'rtl' ? 'left' : 'right',
  77456. showSelectAll: showSelectAll,
  77457. selectAllLabel: selectAllLabels[1],
  77458. showRemove: oneWay,
  77459. pagination: mergedPagination,
  77460. selectionsIcon: mergedSelectionsIcon
  77461. }, listLocale))));
  77462. };
  77463. if (true) {
  77464. Transfer.displayName = 'Transfer';
  77465. }
  77466. Transfer.List = transfer_list;
  77467. Transfer.Search = transfer_search;
  77468. Transfer.Operation = operation;
  77469. /* harmony default export */ var transfer = (Transfer);
  77470. ;// ./node_modules/rc-tree-select/es/hooks/useCache.js
  77471. /**
  77472. * This function will try to call requestIdleCallback if available to save performance.
  77473. * No need `getLabel` here since already fetch on `rawLabeledValue`.
  77474. */
  77475. /* harmony default export */ var hooks_useCache = (function (values) {
  77476. var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
  77477. valueLabels: new Map()
  77478. });
  77479. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77480. var valueLabels = cacheRef.current.valueLabels;
  77481. var valueLabelsCache = new Map();
  77482. var filledValues = values.map(function (item) {
  77483. var value = item.value,
  77484. label = item.label;
  77485. var mergedLabel = label !== null && label !== void 0 ? label : valueLabels.get(value);
  77486. // Save in cache
  77487. valueLabelsCache.set(value, mergedLabel);
  77488. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
  77489. label: mergedLabel
  77490. });
  77491. });
  77492. cacheRef.current.valueLabels = valueLabelsCache;
  77493. return [filledValues];
  77494. }, [values]);
  77495. });
  77496. ;// ./node_modules/rc-tree-select/es/hooks/useCheckedKeys.js
  77497. var useCheckedKeys = function useCheckedKeys(rawLabeledValues, rawHalfCheckedValues, treeConduction, keyEntities) {
  77498. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77499. var extractValues = function extractValues(values) {
  77500. return values.map(function (_ref) {
  77501. var value = _ref.value;
  77502. return value;
  77503. });
  77504. };
  77505. var checkedKeys = extractValues(rawLabeledValues);
  77506. var halfCheckedKeys = extractValues(rawHalfCheckedValues);
  77507. var missingValues = checkedKeys.filter(function (key) {
  77508. return !keyEntities[key];
  77509. });
  77510. var finalCheckedKeys = checkedKeys;
  77511. var finalHalfCheckedKeys = halfCheckedKeys;
  77512. if (treeConduction) {
  77513. var conductResult = conductCheck(checkedKeys, true, keyEntities);
  77514. finalCheckedKeys = conductResult.checkedKeys;
  77515. finalHalfCheckedKeys = conductResult.halfCheckedKeys;
  77516. }
  77517. return [Array.from(new Set([].concat((0,toConsumableArray["default"])(missingValues), (0,toConsumableArray["default"])(finalCheckedKeys)))), finalHalfCheckedKeys];
  77518. }, [rawLabeledValues, rawHalfCheckedValues, treeConduction, keyEntities]);
  77519. };
  77520. /* harmony default export */ var hooks_useCheckedKeys = (useCheckedKeys);
  77521. ;// ./node_modules/rc-tree-select/es/utils/valueUtil.js
  77522. var utils_valueUtil_toArray = function toArray(value) {
  77523. return Array.isArray(value) ? value : value !== undefined ? [value] : [];
  77524. };
  77525. var valueUtil_fillFieldNames = function fillFieldNames(fieldNames) {
  77526. var _ref = fieldNames || {},
  77527. label = _ref.label,
  77528. value = _ref.value,
  77529. children = _ref.children;
  77530. return {
  77531. _title: label ? [label] : ['title', 'label'],
  77532. value: value || 'value',
  77533. key: value || 'value',
  77534. children: children || 'children'
  77535. };
  77536. };
  77537. var valueUtil_isCheckDisabled = function isCheckDisabled(node) {
  77538. return !node || node.disabled || node.disableCheckbox || node.checkable === false;
  77539. };
  77540. var getAllKeys = function getAllKeys(treeData, fieldNames) {
  77541. var keys = [];
  77542. var dig = function dig(list) {
  77543. list.forEach(function (item) {
  77544. var children = item[fieldNames.children];
  77545. if (children) {
  77546. keys.push(item[fieldNames.value]);
  77547. dig(children);
  77548. }
  77549. });
  77550. };
  77551. dig(treeData);
  77552. return keys;
  77553. };
  77554. var isNil = function isNil(val) {
  77555. return val === null || val === undefined;
  77556. };
  77557. ;// ./node_modules/rc-tree-select/es/hooks/useDataEntities.js
  77558. /* harmony default export */ var useDataEntities = (function (treeData, fieldNames) {
  77559. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77560. var collection = convertDataToEntities(treeData, {
  77561. fieldNames: fieldNames,
  77562. initWrapper: function initWrapper(wrapper) {
  77563. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, wrapper), {}, {
  77564. valueEntities: new Map()
  77565. });
  77566. },
  77567. processEntity: function processEntity(entity, wrapper) {
  77568. var val = entity.node[fieldNames.value];
  77569. // Check if exist same value
  77570. if (true) {
  77571. var key = entity.node.key;
  77572. (0,warning["default"])(!isNil(val), 'TreeNode `value` is invalidate: undefined');
  77573. (0,warning["default"])(!wrapper.valueEntities.has(val), "Same `value` exist in the tree: ".concat(val));
  77574. (0,warning["default"])(!key || String(key) === String(val), "`key` or `value` with TreeNode must be the same or you can remove one of them. key: ".concat(key, ", value: ").concat(val, "."));
  77575. }
  77576. wrapper.valueEntities.set(val, entity);
  77577. }
  77578. });
  77579. return collection;
  77580. }, [treeData, fieldNames]);
  77581. });
  77582. ;// ./node_modules/rc-tree-select/es/TreeNode.js
  77583. /* istanbul ignore file */
  77584. /** This is a placeholder, not real render in dom */
  77585. var TreeNode_TreeNode = function TreeNode() {
  77586. return null;
  77587. };
  77588. /* harmony default export */ var rc_tree_select_es_TreeNode = (TreeNode_TreeNode);
  77589. ;// ./node_modules/rc-tree-select/es/utils/legacyUtil.js
  77590. var es_utils_legacyUtil_excluded = ["children", "value"];
  77591. function legacyUtil_convertChildrenToData(nodes) {
  77592. return (0,toArray["default"])(nodes).map(function (node) {
  77593. if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(node) || !node.type) {
  77594. return null;
  77595. }
  77596. var _ref = node,
  77597. key = _ref.key,
  77598. _ref$props = _ref.props,
  77599. children = _ref$props.children,
  77600. value = _ref$props.value,
  77601. restProps = (0,objectWithoutProperties["default"])(_ref$props, es_utils_legacyUtil_excluded);
  77602. var data = (0,objectSpread2["default"])({
  77603. key: key,
  77604. value: value
  77605. }, restProps);
  77606. var childData = legacyUtil_convertChildrenToData(children);
  77607. if (childData.length) {
  77608. data.children = childData;
  77609. }
  77610. return data;
  77611. }).filter(function (data) {
  77612. return data;
  77613. });
  77614. }
  77615. function fillLegacyProps(dataNode) {
  77616. if (!dataNode) {
  77617. return dataNode;
  77618. }
  77619. var cloneNode = (0,objectSpread2["default"])({}, dataNode);
  77620. if (!('props' in cloneNode)) {
  77621. Object.defineProperty(cloneNode, 'props', {
  77622. get: function get() {
  77623. (0,warning["default"])(false, 'New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access.');
  77624. return cloneNode;
  77625. }
  77626. });
  77627. }
  77628. return cloneNode;
  77629. }
  77630. function fillAdditionalInfo(extra, triggerValue, checkedValues, treeData, showPosition, fieldNames) {
  77631. var triggerNode = null;
  77632. var nodeList = null;
  77633. function generateMap() {
  77634. function dig(list) {
  77635. var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0';
  77636. var parentIncluded = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  77637. return list.map(function (option, index) {
  77638. var pos = "".concat(level, "-").concat(index);
  77639. var value = option[fieldNames.value];
  77640. var included = checkedValues.includes(value);
  77641. var children = dig(option[fieldNames.children] || [], pos, included);
  77642. var node = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tree_select_es_TreeNode, option, children.map(function (child) {
  77643. return child.node;
  77644. }));
  77645. // Link with trigger node
  77646. if (triggerValue === value) {
  77647. triggerNode = node;
  77648. }
  77649. if (included) {
  77650. var checkedNode = {
  77651. pos: pos,
  77652. node: node,
  77653. children: children
  77654. };
  77655. if (!parentIncluded) {
  77656. nodeList.push(checkedNode);
  77657. }
  77658. return checkedNode;
  77659. }
  77660. return null;
  77661. }).filter(function (node) {
  77662. return node;
  77663. });
  77664. }
  77665. if (!nodeList) {
  77666. nodeList = [];
  77667. dig(treeData);
  77668. // Sort to keep the checked node length
  77669. nodeList.sort(function (_ref2, _ref3) {
  77670. var val1 = _ref2.node.props.value;
  77671. var val2 = _ref3.node.props.value;
  77672. var index1 = checkedValues.indexOf(val1);
  77673. var index2 = checkedValues.indexOf(val2);
  77674. return index1 - index2;
  77675. });
  77676. }
  77677. }
  77678. Object.defineProperty(extra, 'triggerNode', {
  77679. get: function get() {
  77680. (0,warning["default"])(false, '`triggerNode` is deprecated. Please consider decoupling data with node.');
  77681. generateMap();
  77682. return triggerNode;
  77683. }
  77684. });
  77685. Object.defineProperty(extra, 'allCheckedNodes', {
  77686. get: function get() {
  77687. (0,warning["default"])(false, '`allCheckedNodes` is deprecated. Please consider decoupling data with node.');
  77688. generateMap();
  77689. if (showPosition) {
  77690. return nodeList;
  77691. }
  77692. return nodeList.map(function (_ref4) {
  77693. var node = _ref4.node;
  77694. return node;
  77695. });
  77696. }
  77697. });
  77698. }
  77699. ;// ./node_modules/rc-tree-select/es/hooks/useFilterTreeData.js
  77700. var useFilterTreeData = function useFilterTreeData(treeData, searchValue, options) {
  77701. var fieldNames = options.fieldNames,
  77702. treeNodeFilterProp = options.treeNodeFilterProp,
  77703. filterTreeNode = options.filterTreeNode;
  77704. var fieldChildren = fieldNames.children;
  77705. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77706. if (!searchValue || filterTreeNode === false) {
  77707. return treeData;
  77708. }
  77709. var filterOptionFunc = typeof filterTreeNode === 'function' ? filterTreeNode : function (_, dataNode) {
  77710. return String(dataNode[treeNodeFilterProp]).toUpperCase().includes(searchValue.toUpperCase());
  77711. };
  77712. var filterTreeNodes = function filterTreeNodes(nodes) {
  77713. var keepAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  77714. return nodes.reduce(function (filtered, node) {
  77715. var children = node[fieldChildren];
  77716. var isMatch = keepAll || filterOptionFunc(searchValue, fillLegacyProps(node));
  77717. var filteredChildren = filterTreeNodes(children || [], isMatch);
  77718. if (isMatch || filteredChildren.length) {
  77719. filtered.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, node), {}, (0,defineProperty["default"])({
  77720. isLeaf: undefined
  77721. }, fieldChildren, filteredChildren)));
  77722. }
  77723. return filtered;
  77724. }, []);
  77725. };
  77726. return filterTreeNodes(treeData);
  77727. }, [treeData, searchValue, fieldChildren, treeNodeFilterProp, filterTreeNode]);
  77728. };
  77729. /* harmony default export */ var hooks_useFilterTreeData = (useFilterTreeData);
  77730. ;// ./node_modules/rc-tree-select/es/hooks/useRefFunc.js
  77731. /**
  77732. * Same as `React.useCallback` but always return a memoized function
  77733. * but redirect to real function.
  77734. */
  77735. function useRefFunc_useRefFunc(callback) {
  77736. var funcRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  77737. funcRef.current = callback;
  77738. var cacheFn = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function () {
  77739. return funcRef.current.apply(funcRef, arguments);
  77740. }, []);
  77741. return cacheFn;
  77742. }
  77743. ;// ./node_modules/rc-tree-select/es/hooks/useTreeData.js
  77744. function buildTreeStructure(nodes, config) {
  77745. var id = config.id,
  77746. pId = config.pId,
  77747. rootPId = config.rootPId;
  77748. var nodeMap = new Map();
  77749. var rootNodes = [];
  77750. nodes.forEach(function (node) {
  77751. var nodeKey = node[id];
  77752. var clonedNode = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, node), {}, {
  77753. key: node.key || nodeKey
  77754. });
  77755. nodeMap.set(nodeKey, clonedNode);
  77756. });
  77757. nodeMap.forEach(function (node) {
  77758. var parentKey = node[pId];
  77759. var parent = nodeMap.get(parentKey);
  77760. if (parent) {
  77761. parent.children = parent.children || [];
  77762. parent.children.push(node);
  77763. } else if (parentKey === rootPId || rootPId === null) {
  77764. rootNodes.push(node);
  77765. }
  77766. });
  77767. return rootNodes;
  77768. }
  77769. /**
  77770. * 将 `treeData` 或 `children` 转换为格式化的 `treeData`。
  77771. * 如果 `treeData` 或 `children` 没有变化,则不会重新计算。
  77772. */
  77773. function useTreeData(treeData, children, simpleMode) {
  77774. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77775. if (treeData) {
  77776. if (simpleMode) {
  77777. var config = (0,objectSpread2["default"])({
  77778. id: 'id',
  77779. pId: 'pId',
  77780. rootPId: null
  77781. }, (0,esm_typeof["default"])(simpleMode) === 'object' ? simpleMode : {});
  77782. return buildTreeStructure(treeData, config);
  77783. }
  77784. return treeData;
  77785. }
  77786. return legacyUtil_convertChildrenToData(children);
  77787. }, [children, simpleMode, treeData]);
  77788. }
  77789. ;// ./node_modules/rc-tree-select/es/LegacyContext.js
  77790. var LegacySelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  77791. /* harmony default export */ var LegacyContext = (LegacySelectContext);
  77792. ;// ./node_modules/rc-tree-select/es/TreeSelectContext.js
  77793. var TreeSelectContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
  77794. /* harmony default export */ var es_TreeSelectContext = (TreeSelectContext);
  77795. ;// ./node_modules/rc-tree-select/es/OptionList.js
  77796. var OptionList_HIDDEN_STYLE = {
  77797. width: 0,
  77798. height: 0,
  77799. display: 'flex',
  77800. overflow: 'hidden',
  77801. opacity: 0,
  77802. border: 0,
  77803. padding: 0,
  77804. margin: 0
  77805. };
  77806. var OptionList_OptionList = function OptionList(_, ref) {
  77807. var _useBaseProps = useBaseProps(),
  77808. prefixCls = _useBaseProps.prefixCls,
  77809. multiple = _useBaseProps.multiple,
  77810. searchValue = _useBaseProps.searchValue,
  77811. toggleOpen = _useBaseProps.toggleOpen,
  77812. open = _useBaseProps.open,
  77813. notFoundContent = _useBaseProps.notFoundContent;
  77814. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_TreeSelectContext),
  77815. virtual = _React$useContext.virtual,
  77816. listHeight = _React$useContext.listHeight,
  77817. listItemHeight = _React$useContext.listItemHeight,
  77818. listItemScrollOffset = _React$useContext.listItemScrollOffset,
  77819. treeData = _React$useContext.treeData,
  77820. fieldNames = _React$useContext.fieldNames,
  77821. onSelect = _React$useContext.onSelect,
  77822. dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth,
  77823. treeExpandAction = _React$useContext.treeExpandAction,
  77824. treeTitleRender = _React$useContext.treeTitleRender,
  77825. onPopupScroll = _React$useContext.onPopupScroll,
  77826. leftMaxCount = _React$useContext.leftMaxCount,
  77827. leafCountOnly = _React$useContext.leafCountOnly,
  77828. valueEntities = _React$useContext.valueEntities;
  77829. var _React$useContext2 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(LegacyContext),
  77830. checkable = _React$useContext2.checkable,
  77831. checkedKeys = _React$useContext2.checkedKeys,
  77832. halfCheckedKeys = _React$useContext2.halfCheckedKeys,
  77833. treeExpandedKeys = _React$useContext2.treeExpandedKeys,
  77834. treeDefaultExpandAll = _React$useContext2.treeDefaultExpandAll,
  77835. treeDefaultExpandedKeys = _React$useContext2.treeDefaultExpandedKeys,
  77836. onTreeExpand = _React$useContext2.onTreeExpand,
  77837. treeIcon = _React$useContext2.treeIcon,
  77838. showTreeIcon = _React$useContext2.showTreeIcon,
  77839. switcherIcon = _React$useContext2.switcherIcon,
  77840. treeLine = _React$useContext2.treeLine,
  77841. treeNodeFilterProp = _React$useContext2.treeNodeFilterProp,
  77842. loadData = _React$useContext2.loadData,
  77843. treeLoadedKeys = _React$useContext2.treeLoadedKeys,
  77844. treeMotion = _React$useContext2.treeMotion,
  77845. onTreeLoad = _React$useContext2.onTreeLoad,
  77846. keyEntities = _React$useContext2.keyEntities;
  77847. var treeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  77848. var memoTreeData = (0,useMemo["default"])(function () {
  77849. return treeData;
  77850. },
  77851. // eslint-disable-next-line react-hooks/exhaustive-deps
  77852. [open, treeData], function (prev, next) {
  77853. return next[0] && prev[1] !== next[1];
  77854. });
  77855. // ========================== Values ==========================
  77856. var mergedCheckedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77857. if (!checkable) {
  77858. return null;
  77859. }
  77860. return {
  77861. checked: checkedKeys,
  77862. halfChecked: halfCheckedKeys
  77863. };
  77864. }, [checkable, checkedKeys, halfCheckedKeys]);
  77865. // ========================== Scroll ==========================
  77866. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  77867. // Single mode should scroll to current key
  77868. if (open && !multiple && checkedKeys.length) {
  77869. var _treeRef$current;
  77870. (_treeRef$current = treeRef.current) === null || _treeRef$current === void 0 || _treeRef$current.scrollTo({
  77871. key: checkedKeys[0]
  77872. });
  77873. }
  77874. // eslint-disable-next-line react-hooks/exhaustive-deps
  77875. }, [open]);
  77876. // ========================== Events ==========================
  77877. var onListMouseDown = function onListMouseDown(event) {
  77878. event.preventDefault();
  77879. };
  77880. var onInternalSelect = function onInternalSelect(__, info) {
  77881. var node = info.node;
  77882. if (checkable && valueUtil_isCheckDisabled(node)) {
  77883. return;
  77884. }
  77885. onSelect(node.key, {
  77886. selected: !checkedKeys.includes(node.key)
  77887. });
  77888. if (!multiple) {
  77889. toggleOpen(false);
  77890. }
  77891. };
  77892. // =========================== Keys ===========================
  77893. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(treeDefaultExpandedKeys),
  77894. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  77895. expandedKeys = _React$useState2[0],
  77896. setExpandedKeys = _React$useState2[1];
  77897. var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  77898. _React$useState4 = (0,slicedToArray["default"])(_React$useState3, 2),
  77899. searchExpandedKeys = _React$useState4[0],
  77900. setSearchExpandedKeys = _React$useState4[1];
  77901. var mergedExpandedKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  77902. if (treeExpandedKeys) {
  77903. return (0,toConsumableArray["default"])(treeExpandedKeys);
  77904. }
  77905. return searchValue ? searchExpandedKeys : expandedKeys;
  77906. }, [expandedKeys, searchExpandedKeys, treeExpandedKeys, searchValue]);
  77907. var onInternalExpand = function onInternalExpand(keys) {
  77908. setExpandedKeys(keys);
  77909. setSearchExpandedKeys(keys);
  77910. if (onTreeExpand) {
  77911. onTreeExpand(keys);
  77912. }
  77913. };
  77914. // ========================== Search ==========================
  77915. var lowerSearchValue = String(searchValue).toLowerCase();
  77916. var filterTreeNode = function filterTreeNode(treeNode) {
  77917. if (!lowerSearchValue) {
  77918. return false;
  77919. }
  77920. return String(treeNode[treeNodeFilterProp]).toLowerCase().includes(lowerSearchValue);
  77921. };
  77922. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  77923. if (searchValue) {
  77924. setSearchExpandedKeys(getAllKeys(treeData, fieldNames));
  77925. }
  77926. // eslint-disable-next-line react-hooks/exhaustive-deps
  77927. }, [searchValue]);
  77928. // ========================= Disabled =========================
  77929. // Cache disabled states in React state to ensure re-render when cache updates
  77930. var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(function () {
  77931. return new Map();
  77932. }),
  77933. _React$useState6 = (0,slicedToArray["default"])(_React$useState5, 2),
  77934. disabledCache = _React$useState6[0],
  77935. setDisabledCache = _React$useState6[1];
  77936. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  77937. if (leftMaxCount) {
  77938. setDisabledCache(new Map());
  77939. }
  77940. }, [leftMaxCount]);
  77941. function getDisabledWithCache(node) {
  77942. var value = node[fieldNames.value];
  77943. if (!disabledCache.has(value)) {
  77944. var entity = valueEntities.get(value);
  77945. var isLeaf = (entity.children || []).length === 0;
  77946. if (!isLeaf) {
  77947. var checkableChildren = entity.children.filter(function (childTreeNode) {
  77948. return !childTreeNode.node.disabled && !childTreeNode.node.disableCheckbox && !checkedKeys.includes(childTreeNode.node[fieldNames.value]);
  77949. });
  77950. var checkableChildrenCount = checkableChildren.length;
  77951. disabledCache.set(value, checkableChildrenCount > leftMaxCount);
  77952. } else {
  77953. disabledCache.set(value, false);
  77954. }
  77955. }
  77956. return disabledCache.get(value);
  77957. }
  77958. var nodeDisabled = (0,rc_util_es.useEvent)(function (node) {
  77959. var nodeValue = node[fieldNames.value];
  77960. if (checkedKeys.includes(nodeValue)) {
  77961. return false;
  77962. }
  77963. if (leftMaxCount === null) {
  77964. return false;
  77965. }
  77966. if (leftMaxCount <= 0) {
  77967. return true;
  77968. }
  77969. // This is a low performance calculation
  77970. if (leafCountOnly && leftMaxCount) {
  77971. return getDisabledWithCache(node);
  77972. }
  77973. return false;
  77974. });
  77975. // ========================== Get First Selectable Node ==========================
  77976. var getFirstMatchingNode = function getFirstMatchingNode(nodes) {
  77977. var _iterator = _createForOfIteratorHelper(nodes),
  77978. _step;
  77979. try {
  77980. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  77981. var node = _step.value;
  77982. if (node.disabled || node.selectable === false) {
  77983. continue;
  77984. }
  77985. if (searchValue) {
  77986. if (filterTreeNode(node)) {
  77987. return node;
  77988. }
  77989. } else {
  77990. return node;
  77991. }
  77992. if (node[fieldNames.children]) {
  77993. var matchInChildren = getFirstMatchingNode(node[fieldNames.children]);
  77994. if (matchInChildren) {
  77995. return matchInChildren;
  77996. }
  77997. }
  77998. }
  77999. } catch (err) {
  78000. _iterator.e(err);
  78001. } finally {
  78002. _iterator.f();
  78003. }
  78004. return null;
  78005. };
  78006. // ========================== Active ==========================
  78007. var _React$useState7 = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null),
  78008. _React$useState8 = (0,slicedToArray["default"])(_React$useState7, 2),
  78009. activeKey = _React$useState8[0],
  78010. setActiveKey = _React$useState8[1];
  78011. var activeEntity = keyEntities[activeKey];
  78012. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  78013. if (!open) {
  78014. return;
  78015. }
  78016. var nextActiveKey = null;
  78017. var getFirstNode = function getFirstNode() {
  78018. var firstNode = getFirstMatchingNode(memoTreeData);
  78019. return firstNode ? firstNode[fieldNames.value] : null;
  78020. };
  78021. // single mode active first checked node
  78022. if (!multiple && checkedKeys.length && !searchValue) {
  78023. nextActiveKey = checkedKeys[0];
  78024. } else {
  78025. nextActiveKey = getFirstNode();
  78026. }
  78027. setActiveKey(nextActiveKey);
  78028. }, [open, searchValue]);
  78029. // ========================= Keyboard =========================
  78030. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, function () {
  78031. var _treeRef$current2;
  78032. return {
  78033. scrollTo: (_treeRef$current2 = treeRef.current) === null || _treeRef$current2 === void 0 ? void 0 : _treeRef$current2.scrollTo,
  78034. onKeyDown: function onKeyDown(event) {
  78035. var _treeRef$current3;
  78036. var which = event.which;
  78037. switch (which) {
  78038. // >>> Arrow keys
  78039. case KeyCode["default"].UP:
  78040. case KeyCode["default"].DOWN:
  78041. case KeyCode["default"].LEFT:
  78042. case KeyCode["default"].RIGHT:
  78043. (_treeRef$current3 = treeRef.current) === null || _treeRef$current3 === void 0 || _treeRef$current3.onKeyDown(event);
  78044. break;
  78045. // >>> Select item
  78046. case KeyCode["default"].ENTER:
  78047. {
  78048. if (activeEntity) {
  78049. var isNodeDisabled = nodeDisabled(activeEntity.node);
  78050. var _ref = (activeEntity === null || activeEntity === void 0 ? void 0 : activeEntity.node) || {},
  78051. selectable = _ref.selectable,
  78052. value = _ref.value,
  78053. disabled = _ref.disabled;
  78054. if (selectable !== false && !disabled && !isNodeDisabled) {
  78055. onInternalSelect(null, {
  78056. node: {
  78057. key: activeKey
  78058. },
  78059. selected: !checkedKeys.includes(value)
  78060. });
  78061. }
  78062. }
  78063. break;
  78064. }
  78065. // >>> Close
  78066. case KeyCode["default"].ESC:
  78067. {
  78068. toggleOpen(false);
  78069. }
  78070. }
  78071. },
  78072. onKeyUp: function onKeyUp() {}
  78073. };
  78074. });
  78075. var hasLoadDataFn = (0,useMemo["default"])(function () {
  78076. return searchValue ? false : true;
  78077. }, [searchValue, treeExpandedKeys || expandedKeys], function (_ref2, _ref3) {
  78078. var _ref4 = (0,slicedToArray["default"])(_ref2, 1),
  78079. preSearchValue = _ref4[0];
  78080. var _ref5 = (0,slicedToArray["default"])(_ref3, 2),
  78081. nextSearchValue = _ref5[0],
  78082. nextExcludeSearchExpandedKeys = _ref5[1];
  78083. return preSearchValue !== nextSearchValue && !!(nextSearchValue || nextExcludeSearchExpandedKeys);
  78084. });
  78085. var syncLoadData = hasLoadDataFn ? loadData : null;
  78086. // ========================== Render ==========================
  78087. if (memoTreeData.length === 0) {
  78088. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  78089. role: "listbox",
  78090. className: "".concat(prefixCls, "-empty"),
  78091. onMouseDown: onListMouseDown
  78092. }, notFoundContent);
  78093. }
  78094. var treeProps = {
  78095. fieldNames: fieldNames
  78096. };
  78097. if (treeLoadedKeys) {
  78098. treeProps.loadedKeys = treeLoadedKeys;
  78099. }
  78100. if (mergedExpandedKeys) {
  78101. treeProps.expandedKeys = mergedExpandedKeys;
  78102. }
  78103. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  78104. onMouseDown: onListMouseDown
  78105. }, activeEntity && open && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  78106. style: OptionList_HIDDEN_STYLE,
  78107. "aria-live": "assertive"
  78108. }, activeEntity.node.value), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(contextTypes_UnstableContext.Provider, {
  78109. value: {
  78110. nodeDisabled: nodeDisabled
  78111. }
  78112. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tree_es, (0,esm_extends["default"])({
  78113. ref: treeRef,
  78114. focusable: false,
  78115. prefixCls: "".concat(prefixCls, "-tree"),
  78116. treeData: memoTreeData,
  78117. height: listHeight,
  78118. itemHeight: listItemHeight,
  78119. itemScrollOffset: listItemScrollOffset,
  78120. virtual: virtual !== false && dropdownMatchSelectWidth !== false,
  78121. multiple: multiple,
  78122. icon: treeIcon,
  78123. showIcon: showTreeIcon,
  78124. switcherIcon: switcherIcon,
  78125. showLine: treeLine,
  78126. loadData: syncLoadData,
  78127. motion: treeMotion,
  78128. activeKey: activeKey
  78129. // We handle keys by out instead tree self
  78130. ,
  78131. checkable: checkable,
  78132. checkStrictly: true,
  78133. checkedKeys: mergedCheckedKeys,
  78134. selectedKeys: !checkable ? checkedKeys : [],
  78135. defaultExpandAll: treeDefaultExpandAll,
  78136. titleRender: treeTitleRender
  78137. }, treeProps, {
  78138. // Proxy event out
  78139. onActiveChange: setActiveKey,
  78140. onSelect: onInternalSelect,
  78141. onCheck: onInternalSelect,
  78142. onExpand: onInternalExpand,
  78143. onLoad: onTreeLoad,
  78144. filterTreeNode: filterTreeNode,
  78145. expandAction: treeExpandAction,
  78146. onScroll: onPopupScroll
  78147. }))));
  78148. };
  78149. var es_OptionList_RefOptionList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(OptionList_OptionList);
  78150. if (true) {
  78151. es_OptionList_RefOptionList.displayName = 'OptionList';
  78152. }
  78153. /* harmony default export */ var rc_tree_select_es_OptionList = (es_OptionList_RefOptionList);
  78154. ;// ./node_modules/rc-tree-select/es/utils/strategyUtil.js
  78155. var SHOW_ALL = 'SHOW_ALL';
  78156. var strategyUtil_SHOW_PARENT = 'SHOW_PARENT';
  78157. var strategyUtil_SHOW_CHILD = 'SHOW_CHILD';
  78158. function strategyUtil_formatStrategyValues(values, strategy, keyEntities, fieldNames) {
  78159. var valueSet = new Set(values);
  78160. if (strategy === strategyUtil_SHOW_CHILD) {
  78161. return values.filter(function (key) {
  78162. var entity = keyEntities[key];
  78163. return !entity || !entity.children || !entity.children.some(function (_ref) {
  78164. var node = _ref.node;
  78165. return valueSet.has(node[fieldNames.value]);
  78166. }) || !entity.children.every(function (_ref2) {
  78167. var node = _ref2.node;
  78168. return valueUtil_isCheckDisabled(node) || valueSet.has(node[fieldNames.value]);
  78169. });
  78170. });
  78171. }
  78172. if (strategy === strategyUtil_SHOW_PARENT) {
  78173. return values.filter(function (key) {
  78174. var entity = keyEntities[key];
  78175. var parent = entity ? entity.parent : null;
  78176. return !parent || valueUtil_isCheckDisabled(parent.node) || !valueSet.has(parent.key);
  78177. });
  78178. }
  78179. return values;
  78180. }
  78181. ;// ./node_modules/rc-tree-select/es/utils/warningPropsUtil.js
  78182. function utils_warningPropsUtil_warningProps(props) {
  78183. var searchPlaceholder = props.searchPlaceholder,
  78184. treeCheckStrictly = props.treeCheckStrictly,
  78185. treeCheckable = props.treeCheckable,
  78186. labelInValue = props.labelInValue,
  78187. value = props.value,
  78188. multiple = props.multiple,
  78189. showCheckedStrategy = props.showCheckedStrategy,
  78190. maxCount = props.maxCount;
  78191. (0,warning["default"])(!searchPlaceholder, '`searchPlaceholder` has been removed.');
  78192. if (treeCheckStrictly && labelInValue === false) {
  78193. (0,warning["default"])(false, '`treeCheckStrictly` will force set `labelInValue` to `true`.');
  78194. }
  78195. if (labelInValue || treeCheckStrictly) {
  78196. (0,warning["default"])(utils_valueUtil_toArray(value).every(function (val) {
  78197. return val && (0,esm_typeof["default"])(val) === 'object' && 'value' in val;
  78198. }), 'Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead.');
  78199. }
  78200. if (treeCheckStrictly || multiple || treeCheckable) {
  78201. (0,warning["default"])(!value || Array.isArray(value), '`value` should be an array when `TreeSelect` is checkable or multiple.');
  78202. } else {
  78203. (0,warning["default"])(!Array.isArray(value), '`value` should not be array when `TreeSelect` is single mode.');
  78204. }
  78205. if (maxCount && (showCheckedStrategy === 'SHOW_ALL' && !treeCheckStrictly || showCheckedStrategy === 'SHOW_PARENT')) {
  78206. (0,warning["default"])(false, '`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.');
  78207. }
  78208. }
  78209. /* harmony default export */ var es_utils_warningPropsUtil = (utils_warningPropsUtil_warningProps);
  78210. ;// ./node_modules/rc-tree-select/es/TreeSelect.js
  78211. var TreeSelect_excluded = ["id", "prefixCls", "value", "defaultValue", "onChange", "onSelect", "onDeselect", "searchValue", "inputValue", "onSearch", "autoClearSearchValue", "filterTreeNode", "treeNodeFilterProp", "showCheckedStrategy", "treeNodeLabelProp", "multiple", "treeCheckable", "treeCheckStrictly", "labelInValue", "maxCount", "fieldNames", "treeDataSimpleMode", "treeData", "children", "loadData", "treeLoadedKeys", "onTreeLoad", "treeDefaultExpandAll", "treeExpandedKeys", "treeDefaultExpandedKeys", "onTreeExpand", "treeExpandAction", "virtual", "listHeight", "listItemHeight", "listItemScrollOffset", "onDropdownVisibleChange", "dropdownMatchSelectWidth", "treeLine", "treeIcon", "showTreeIcon", "switcherIcon", "treeMotion", "treeTitleRender", "onPopupScroll"];
  78212. function TreeSelect_isRawValue(value) {
  78213. return !value || (0,esm_typeof["default"])(value) !== 'object';
  78214. }
  78215. var TreeSelect = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  78216. var id = props.id,
  78217. _props$prefixCls = props.prefixCls,
  78218. prefixCls = _props$prefixCls === void 0 ? 'rc-tree-select' : _props$prefixCls,
  78219. value = props.value,
  78220. defaultValue = props.defaultValue,
  78221. onChange = props.onChange,
  78222. onSelect = props.onSelect,
  78223. onDeselect = props.onDeselect,
  78224. searchValue = props.searchValue,
  78225. inputValue = props.inputValue,
  78226. onSearch = props.onSearch,
  78227. _props$autoClearSearc = props.autoClearSearchValue,
  78228. autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
  78229. filterTreeNode = props.filterTreeNode,
  78230. _props$treeNodeFilter = props.treeNodeFilterProp,
  78231. treeNodeFilterProp = _props$treeNodeFilter === void 0 ? 'value' : _props$treeNodeFilter,
  78232. showCheckedStrategy = props.showCheckedStrategy,
  78233. treeNodeLabelProp = props.treeNodeLabelProp,
  78234. multiple = props.multiple,
  78235. treeCheckable = props.treeCheckable,
  78236. treeCheckStrictly = props.treeCheckStrictly,
  78237. labelInValue = props.labelInValue,
  78238. maxCount = props.maxCount,
  78239. fieldNames = props.fieldNames,
  78240. treeDataSimpleMode = props.treeDataSimpleMode,
  78241. treeData = props.treeData,
  78242. children = props.children,
  78243. loadData = props.loadData,
  78244. treeLoadedKeys = props.treeLoadedKeys,
  78245. onTreeLoad = props.onTreeLoad,
  78246. treeDefaultExpandAll = props.treeDefaultExpandAll,
  78247. treeExpandedKeys = props.treeExpandedKeys,
  78248. treeDefaultExpandedKeys = props.treeDefaultExpandedKeys,
  78249. onTreeExpand = props.onTreeExpand,
  78250. treeExpandAction = props.treeExpandAction,
  78251. virtual = props.virtual,
  78252. _props$listHeight = props.listHeight,
  78253. listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,
  78254. _props$listItemHeight = props.listItemHeight,
  78255. listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,
  78256. _props$listItemScroll = props.listItemScrollOffset,
  78257. listItemScrollOffset = _props$listItemScroll === void 0 ? 0 : _props$listItemScroll,
  78258. onDropdownVisibleChange = props.onDropdownVisibleChange,
  78259. _props$dropdownMatchS = props.dropdownMatchSelectWidth,
  78260. dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
  78261. treeLine = props.treeLine,
  78262. treeIcon = props.treeIcon,
  78263. showTreeIcon = props.showTreeIcon,
  78264. switcherIcon = props.switcherIcon,
  78265. treeMotion = props.treeMotion,
  78266. treeTitleRender = props.treeTitleRender,
  78267. onPopupScroll = props.onPopupScroll,
  78268. restProps = (0,objectWithoutProperties["default"])(props, TreeSelect_excluded);
  78269. var mergedId = useId_useId(id);
  78270. var treeConduction = treeCheckable && !treeCheckStrictly;
  78271. var mergedCheckable = treeCheckable || treeCheckStrictly;
  78272. var mergedLabelInValue = treeCheckStrictly || labelInValue;
  78273. var mergedMultiple = mergedCheckable || multiple;
  78274. var _useMergedState = (0,useMergedState["default"])(defaultValue, {
  78275. value: value
  78276. }),
  78277. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  78278. internalValue = _useMergedState2[0],
  78279. setInternalValue = _useMergedState2[1];
  78280. // `multiple` && `!treeCheckable` should be show all
  78281. var mergedShowCheckedStrategy = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78282. if (!treeCheckable) {
  78283. return SHOW_ALL;
  78284. }
  78285. return showCheckedStrategy || strategyUtil_SHOW_CHILD;
  78286. }, [showCheckedStrategy, treeCheckable]);
  78287. // ========================== Warning ===========================
  78288. if (true) {
  78289. es_utils_warningPropsUtil(props);
  78290. }
  78291. // ========================= FieldNames =========================
  78292. var mergedFieldNames = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78293. return valueUtil_fillFieldNames(fieldNames);
  78294. }, /* eslint-disable react-hooks/exhaustive-deps */
  78295. [JSON.stringify(fieldNames)]
  78296. /* eslint-enable react-hooks/exhaustive-deps */);
  78297. // =========================== Search ===========================
  78298. var _useMergedState3 = (0,useMergedState["default"])('', {
  78299. value: searchValue !== undefined ? searchValue : inputValue,
  78300. postState: function postState(search) {
  78301. return search || '';
  78302. }
  78303. }),
  78304. _useMergedState4 = (0,slicedToArray["default"])(_useMergedState3, 2),
  78305. mergedSearchValue = _useMergedState4[0],
  78306. setSearchValue = _useMergedState4[1];
  78307. var onInternalSearch = function onInternalSearch(searchText) {
  78308. setSearchValue(searchText);
  78309. onSearch === null || onSearch === void 0 || onSearch(searchText);
  78310. };
  78311. // ============================ Data ============================
  78312. // `useTreeData` only do convert of `children` or `simpleMode`.
  78313. // Else will return origin `treeData` for perf consideration.
  78314. // Do not do anything to loop the data.
  78315. var mergedTreeData = useTreeData(treeData, children, treeDataSimpleMode);
  78316. var _useDataEntities = useDataEntities(mergedTreeData, mergedFieldNames),
  78317. keyEntities = _useDataEntities.keyEntities,
  78318. valueEntities = _useDataEntities.valueEntities;
  78319. /** Get `missingRawValues` which not exist in the tree yet */
  78320. var splitRawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (newRawValues) {
  78321. var missingRawValues = [];
  78322. var existRawValues = [];
  78323. // Keep missing value in the cache
  78324. newRawValues.forEach(function (val) {
  78325. if (valueEntities.has(val)) {
  78326. existRawValues.push(val);
  78327. } else {
  78328. missingRawValues.push(val);
  78329. }
  78330. });
  78331. return {
  78332. missingRawValues: missingRawValues,
  78333. existRawValues: existRawValues
  78334. };
  78335. }, [valueEntities]);
  78336. // Filtered Tree
  78337. var filteredTreeData = hooks_useFilterTreeData(mergedTreeData, mergedSearchValue, {
  78338. fieldNames: mergedFieldNames,
  78339. treeNodeFilterProp: treeNodeFilterProp,
  78340. filterTreeNode: filterTreeNode
  78341. });
  78342. // =========================== Label ============================
  78343. var getLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (item) {
  78344. if (item) {
  78345. if (treeNodeLabelProp) {
  78346. return item[treeNodeLabelProp];
  78347. }
  78348. // Loop from fieldNames
  78349. var titleList = mergedFieldNames._title;
  78350. for (var i = 0; i < titleList.length; i += 1) {
  78351. var title = item[titleList[i]];
  78352. if (title !== undefined) {
  78353. return title;
  78354. }
  78355. }
  78356. }
  78357. }, [mergedFieldNames, treeNodeLabelProp]);
  78358. // ========================= Wrap Value =========================
  78359. var toLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (draftValues) {
  78360. var values = utils_valueUtil_toArray(draftValues);
  78361. return values.map(function (val) {
  78362. if (TreeSelect_isRawValue(val)) {
  78363. return {
  78364. value: val
  78365. };
  78366. }
  78367. return val;
  78368. });
  78369. }, []);
  78370. var convert2LabelValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (draftValues) {
  78371. var values = toLabeledValues(draftValues);
  78372. return values.map(function (item) {
  78373. var rawLabel = item.label;
  78374. var rawValue = item.value,
  78375. rawHalfChecked = item.halfChecked;
  78376. var rawDisabled;
  78377. var entity = valueEntities.get(rawValue);
  78378. // Fill missing label & status
  78379. if (entity) {
  78380. var _rawLabel;
  78381. rawLabel = treeTitleRender ? treeTitleRender(entity.node) : (_rawLabel = rawLabel) !== null && _rawLabel !== void 0 ? _rawLabel : getLabel(entity.node);
  78382. rawDisabled = entity.node.disabled;
  78383. } else if (rawLabel === undefined) {
  78384. // We try to find in current `labelInValue` value
  78385. var labelInValueItem = toLabeledValues(internalValue).find(function (labeledItem) {
  78386. return labeledItem.value === rawValue;
  78387. });
  78388. rawLabel = labelInValueItem.label;
  78389. }
  78390. return {
  78391. label: rawLabel,
  78392. value: rawValue,
  78393. halfChecked: rawHalfChecked,
  78394. disabled: rawDisabled
  78395. };
  78396. });
  78397. }, [valueEntities, getLabel, toLabeledValues, internalValue]);
  78398. // =========================== Values ===========================
  78399. var rawMixedLabeledValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78400. return toLabeledValues(internalValue === null ? [] : internalValue);
  78401. }, [toLabeledValues, internalValue]);
  78402. // Split value into full check and half check
  78403. var _React$useMemo = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78404. var fullCheckValues = [];
  78405. var halfCheckValues = [];
  78406. rawMixedLabeledValues.forEach(function (item) {
  78407. if (item.halfChecked) {
  78408. halfCheckValues.push(item);
  78409. } else {
  78410. fullCheckValues.push(item);
  78411. }
  78412. });
  78413. return [fullCheckValues, halfCheckValues];
  78414. }, [rawMixedLabeledValues]),
  78415. _React$useMemo2 = (0,slicedToArray["default"])(_React$useMemo, 2),
  78416. rawLabeledValues = _React$useMemo2[0],
  78417. rawHalfLabeledValues = _React$useMemo2[1];
  78418. // const [mergedValues] = useCache(rawLabeledValues);
  78419. var rawValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78420. return rawLabeledValues.map(function (item) {
  78421. return item.value;
  78422. });
  78423. }, [rawLabeledValues]);
  78424. // Convert value to key. Will fill missed keys for conduct check.
  78425. var _useCheckedKeys = hooks_useCheckedKeys(rawLabeledValues, rawHalfLabeledValues, treeConduction, keyEntities),
  78426. _useCheckedKeys2 = (0,slicedToArray["default"])(_useCheckedKeys, 2),
  78427. rawCheckedValues = _useCheckedKeys2[0],
  78428. rawHalfCheckedValues = _useCheckedKeys2[1];
  78429. // Convert rawCheckedKeys to check strategy related values
  78430. var displayValues = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78431. // Collect keys which need to show
  78432. var displayKeys = strategyUtil_formatStrategyValues(rawCheckedValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);
  78433. // Convert to value and filled with label
  78434. var values = displayKeys.map(function (key) {
  78435. var _keyEntities$key$node, _keyEntities$key;
  78436. return (_keyEntities$key$node = (_keyEntities$key = keyEntities[key]) === null || _keyEntities$key === void 0 || (_keyEntities$key = _keyEntities$key.node) === null || _keyEntities$key === void 0 ? void 0 : _keyEntities$key[mergedFieldNames.value]) !== null && _keyEntities$key$node !== void 0 ? _keyEntities$key$node : key;
  78437. });
  78438. // Back fill with origin label
  78439. var labeledValues = values.map(function (val) {
  78440. var targetItem = rawLabeledValues.find(function (item) {
  78441. return item.value === val;
  78442. });
  78443. var label = labelInValue ? targetItem === null || targetItem === void 0 ? void 0 : targetItem.label : treeTitleRender === null || treeTitleRender === void 0 ? void 0 : treeTitleRender(targetItem);
  78444. return {
  78445. value: val,
  78446. label: label
  78447. };
  78448. });
  78449. var rawDisplayValues = convert2LabelValues(labeledValues);
  78450. var firstVal = rawDisplayValues[0];
  78451. if (!mergedMultiple && firstVal && isNil(firstVal.value) && isNil(firstVal.label)) {
  78452. return [];
  78453. }
  78454. return rawDisplayValues.map(function (item) {
  78455. var _item$label;
  78456. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, item), {}, {
  78457. label: (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : item.value
  78458. });
  78459. });
  78460. // eslint-disable-next-line react-hooks/exhaustive-deps
  78461. }, [mergedFieldNames, mergedMultiple, rawCheckedValues, rawLabeledValues, convert2LabelValues, mergedShowCheckedStrategy, keyEntities]);
  78462. var _useCache = hooks_useCache(displayValues),
  78463. _useCache2 = (0,slicedToArray["default"])(_useCache, 1),
  78464. cachedDisplayValues = _useCache2[0];
  78465. // ========================== MaxCount ==========================
  78466. var mergedMaxCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78467. if (mergedMultiple && (mergedShowCheckedStrategy === 'SHOW_CHILD' || treeCheckStrictly || !treeCheckable)) {
  78468. return maxCount;
  78469. }
  78470. return null;
  78471. }, [maxCount, mergedMultiple, treeCheckStrictly, mergedShowCheckedStrategy, treeCheckable]);
  78472. // =========================== Change ===========================
  78473. var triggerChange = useRefFunc_useRefFunc(function (newRawValues, extra, source) {
  78474. var formattedKeyList = strategyUtil_formatStrategyValues(newRawValues, mergedShowCheckedStrategy, keyEntities, mergedFieldNames);
  78475. // Not allow pass with `maxCount`
  78476. if (mergedMaxCount && formattedKeyList.length > mergedMaxCount) {
  78477. return;
  78478. }
  78479. var labeledValues = convert2LabelValues(newRawValues);
  78480. setInternalValue(labeledValues);
  78481. // Clean up if needed
  78482. if (autoClearSearchValue) {
  78483. setSearchValue('');
  78484. }
  78485. // Generate rest parameters is costly, so only do it when necessary
  78486. if (onChange) {
  78487. var eventValues = newRawValues;
  78488. if (treeConduction) {
  78489. eventValues = formattedKeyList.map(function (key) {
  78490. var entity = valueEntities.get(key);
  78491. return entity ? entity.node[mergedFieldNames.value] : key;
  78492. });
  78493. }
  78494. var _ref = extra || {
  78495. triggerValue: undefined,
  78496. selected: undefined
  78497. },
  78498. triggerValue = _ref.triggerValue,
  78499. selected = _ref.selected;
  78500. var returnRawValues = eventValues;
  78501. // We need fill half check back
  78502. if (treeCheckStrictly) {
  78503. var halfValues = rawHalfLabeledValues.filter(function (item) {
  78504. return !eventValues.includes(item.value);
  78505. });
  78506. returnRawValues = [].concat((0,toConsumableArray["default"])(returnRawValues), (0,toConsumableArray["default"])(halfValues));
  78507. }
  78508. var returnLabeledValues = convert2LabelValues(returnRawValues);
  78509. var additionalInfo = {
  78510. // [Legacy] Always return as array contains label & value
  78511. preValue: rawLabeledValues,
  78512. triggerValue: triggerValue
  78513. };
  78514. // [Legacy] Fill legacy data if user query.
  78515. // This is expansive that we only fill when user query
  78516. // https://github.com/react-component/tree-select/blob/fe33eb7c27830c9ac70cd1fdb1ebbe7bc679c16a/src/Select.jsx
  78517. var showPosition = true;
  78518. if (treeCheckStrictly || source === 'selection' && !selected) {
  78519. showPosition = false;
  78520. }
  78521. fillAdditionalInfo(additionalInfo, triggerValue, newRawValues, mergedTreeData, showPosition, mergedFieldNames);
  78522. if (mergedCheckable) {
  78523. additionalInfo.checked = selected;
  78524. } else {
  78525. additionalInfo.selected = selected;
  78526. }
  78527. var returnValues = mergedLabelInValue ? returnLabeledValues : returnLabeledValues.map(function (item) {
  78528. return item.value;
  78529. });
  78530. onChange(mergedMultiple ? returnValues : returnValues[0], mergedLabelInValue ? null : returnLabeledValues.map(function (item) {
  78531. return item.label;
  78532. }), additionalInfo);
  78533. }
  78534. });
  78535. // ========================== Options ===========================
  78536. /** Trigger by option list */
  78537. var onOptionSelect = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (selectedKey, _ref2) {
  78538. var _node$mergedFieldName;
  78539. var selected = _ref2.selected,
  78540. source = _ref2.source;
  78541. var entity = keyEntities[selectedKey];
  78542. var node = entity === null || entity === void 0 ? void 0 : entity.node;
  78543. var selectedValue = (_node$mergedFieldName = node === null || node === void 0 ? void 0 : node[mergedFieldNames.value]) !== null && _node$mergedFieldName !== void 0 ? _node$mergedFieldName : selectedKey;
  78544. // Never be falsy but keep it safe
  78545. if (!mergedMultiple) {
  78546. // Single mode always set value
  78547. triggerChange([selectedValue], {
  78548. selected: true,
  78549. triggerValue: selectedValue
  78550. }, 'option');
  78551. } else {
  78552. var newRawValues = selected ? [].concat((0,toConsumableArray["default"])(rawValues), [selectedValue]) : rawCheckedValues.filter(function (v) {
  78553. return v !== selectedValue;
  78554. });
  78555. // Add keys if tree conduction
  78556. if (treeConduction) {
  78557. // Should keep missing values
  78558. var _splitRawValues = splitRawValues(newRawValues),
  78559. missingRawValues = _splitRawValues.missingRawValues,
  78560. existRawValues = _splitRawValues.existRawValues;
  78561. var keyList = existRawValues.map(function (val) {
  78562. return valueEntities.get(val).key;
  78563. });
  78564. // Conduction by selected or not
  78565. var checkedKeys;
  78566. if (selected) {
  78567. var _conductCheck = conductCheck(keyList, true, keyEntities);
  78568. checkedKeys = _conductCheck.checkedKeys;
  78569. } else {
  78570. var _conductCheck2 = conductCheck(keyList, {
  78571. checked: false,
  78572. halfCheckedKeys: rawHalfCheckedValues
  78573. }, keyEntities);
  78574. checkedKeys = _conductCheck2.checkedKeys;
  78575. }
  78576. // Fill back of keys
  78577. newRawValues = [].concat((0,toConsumableArray["default"])(missingRawValues), (0,toConsumableArray["default"])(checkedKeys.map(function (key) {
  78578. return keyEntities[key].node[mergedFieldNames.value];
  78579. })));
  78580. }
  78581. triggerChange(newRawValues, {
  78582. selected: selected,
  78583. triggerValue: selectedValue
  78584. }, source || 'option');
  78585. }
  78586. // Trigger select event
  78587. if (selected || !mergedMultiple) {
  78588. onSelect === null || onSelect === void 0 || onSelect(selectedValue, fillLegacyProps(node));
  78589. } else {
  78590. onDeselect === null || onDeselect === void 0 || onDeselect(selectedValue, fillLegacyProps(node));
  78591. }
  78592. }, [splitRawValues, valueEntities, keyEntities, mergedFieldNames, mergedMultiple, rawValues, triggerChange, treeConduction, onSelect, onDeselect, rawCheckedValues, rawHalfCheckedValues, maxCount]);
  78593. // ========================== Dropdown ==========================
  78594. var onInternalDropdownVisibleChange = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (open) {
  78595. if (onDropdownVisibleChange) {
  78596. var legacyParam = {};
  78597. Object.defineProperty(legacyParam, 'documentClickClose', {
  78598. get: function get() {
  78599. (0,warning["default"])(false, 'Second param of `onDropdownVisibleChange` has been removed.');
  78600. return false;
  78601. }
  78602. });
  78603. onDropdownVisibleChange(open, legacyParam);
  78604. }
  78605. }, [onDropdownVisibleChange]);
  78606. // ====================== Display Change ========================
  78607. var onDisplayValuesChange = useRefFunc_useRefFunc(function (newValues, info) {
  78608. var newRawValues = newValues.map(function (item) {
  78609. return item.value;
  78610. });
  78611. if (info.type === 'clear') {
  78612. triggerChange(newRawValues, {}, 'selection');
  78613. return;
  78614. }
  78615. // TreeSelect only have multiple mode which means display change only has remove
  78616. if (info.values.length) {
  78617. onOptionSelect(info.values[0].value, {
  78618. selected: false,
  78619. source: 'selection'
  78620. });
  78621. }
  78622. });
  78623. // ========================== Context ===========================
  78624. var treeSelectContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78625. return {
  78626. virtual: virtual,
  78627. dropdownMatchSelectWidth: dropdownMatchSelectWidth,
  78628. listHeight: listHeight,
  78629. listItemHeight: listItemHeight,
  78630. listItemScrollOffset: listItemScrollOffset,
  78631. treeData: filteredTreeData,
  78632. fieldNames: mergedFieldNames,
  78633. onSelect: onOptionSelect,
  78634. treeExpandAction: treeExpandAction,
  78635. treeTitleRender: treeTitleRender,
  78636. onPopupScroll: onPopupScroll,
  78637. leftMaxCount: maxCount === undefined ? null : maxCount - cachedDisplayValues.length,
  78638. leafCountOnly: mergedShowCheckedStrategy === 'SHOW_CHILD' && !treeCheckStrictly && !!treeCheckable,
  78639. valueEntities: valueEntities
  78640. };
  78641. }, [virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, listItemScrollOffset, filteredTreeData, mergedFieldNames, onOptionSelect, treeExpandAction, treeTitleRender, onPopupScroll, maxCount, cachedDisplayValues.length, mergedShowCheckedStrategy, treeCheckStrictly, treeCheckable, valueEntities]);
  78642. // ======================= Legacy Context =======================
  78643. var legacyContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  78644. return {
  78645. checkable: mergedCheckable,
  78646. loadData: loadData,
  78647. treeLoadedKeys: treeLoadedKeys,
  78648. onTreeLoad: onTreeLoad,
  78649. checkedKeys: rawCheckedValues,
  78650. halfCheckedKeys: rawHalfCheckedValues,
  78651. treeDefaultExpandAll: treeDefaultExpandAll,
  78652. treeExpandedKeys: treeExpandedKeys,
  78653. treeDefaultExpandedKeys: treeDefaultExpandedKeys,
  78654. onTreeExpand: onTreeExpand,
  78655. treeIcon: treeIcon,
  78656. treeMotion: treeMotion,
  78657. showTreeIcon: showTreeIcon,
  78658. switcherIcon: switcherIcon,
  78659. treeLine: treeLine,
  78660. treeNodeFilterProp: treeNodeFilterProp,
  78661. keyEntities: keyEntities
  78662. };
  78663. }, [mergedCheckable, loadData, treeLoadedKeys, onTreeLoad, rawCheckedValues, rawHalfCheckedValues, treeDefaultExpandAll, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, treeIcon, treeMotion, showTreeIcon, switcherIcon, treeLine, treeNodeFilterProp, keyEntities]);
  78664. // =========================== Render ===========================
  78665. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_TreeSelectContext.Provider, {
  78666. value: treeSelectContext
  78667. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(LegacyContext.Provider, {
  78668. value: legacyContext
  78669. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_BaseSelect, (0,esm_extends["default"])({
  78670. ref: ref
  78671. }, restProps, {
  78672. // >>> MISC
  78673. id: mergedId,
  78674. prefixCls: prefixCls,
  78675. mode: mergedMultiple ? 'multiple' : undefined
  78676. // >>> Display Value
  78677. ,
  78678. displayValues: cachedDisplayValues,
  78679. onDisplayValuesChange: onDisplayValuesChange
  78680. // >>> Search
  78681. ,
  78682. searchValue: mergedSearchValue,
  78683. onSearch: onInternalSearch
  78684. // >>> Options
  78685. ,
  78686. OptionList: rc_tree_select_es_OptionList,
  78687. emptyOptions: !mergedTreeData.length,
  78688. onDropdownVisibleChange: onInternalDropdownVisibleChange,
  78689. dropdownMatchSelectWidth: dropdownMatchSelectWidth
  78690. }))));
  78691. });
  78692. // Assign name for Debug
  78693. if (true) {
  78694. TreeSelect.displayName = 'TreeSelect';
  78695. }
  78696. var GenericTreeSelect = TreeSelect;
  78697. GenericTreeSelect.TreeNode = rc_tree_select_es_TreeNode;
  78698. GenericTreeSelect.SHOW_ALL = SHOW_ALL;
  78699. GenericTreeSelect.SHOW_PARENT = strategyUtil_SHOW_PARENT;
  78700. GenericTreeSelect.SHOW_CHILD = strategyUtil_SHOW_CHILD;
  78701. /* harmony default export */ var es_TreeSelect = (GenericTreeSelect);
  78702. ;// ./node_modules/rc-tree-select/es/index.js
  78703. /* harmony default export */ var rc_tree_select_es = (es_TreeSelect);
  78704. // EXTERNAL MODULE: ./components/tree-select/style/index.ts
  78705. var tree_select_style = __webpack_require__("./components/tree-select/style/index.ts");
  78706. ;// ./components/tree-select/index.tsx
  78707. var tree_select_rest = undefined && undefined.__rest || function (s, e) {
  78708. var t = {};
  78709. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  78710. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  78711. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  78712. }
  78713. return t;
  78714. };
  78715. const InternalTreeSelect = (props, ref) => {
  78716. var _a, _b, _c, _d, _e;
  78717. const {
  78718. prefixCls: customizePrefixCls,
  78719. size: customizeSize,
  78720. disabled: customDisabled,
  78721. bordered = true,
  78722. style,
  78723. className,
  78724. rootClassName,
  78725. treeCheckable,
  78726. multiple,
  78727. listHeight = 256,
  78728. listItemHeight: customListItemHeight,
  78729. placement,
  78730. notFoundContent,
  78731. switcherIcon,
  78732. treeLine,
  78733. getPopupContainer,
  78734. popupClassName,
  78735. dropdownClassName,
  78736. treeIcon = false,
  78737. transitionName,
  78738. choiceTransitionName = '',
  78739. status: customStatus,
  78740. treeExpandAction,
  78741. builtinPlacements,
  78742. dropdownMatchSelectWidth,
  78743. popupMatchSelectWidth,
  78744. allowClear,
  78745. variant: customVariant,
  78746. dropdownStyle,
  78747. dropdownRender,
  78748. popupRender,
  78749. onDropdownVisibleChange,
  78750. onOpenChange,
  78751. tagRender,
  78752. maxCount,
  78753. showCheckedStrategy,
  78754. treeCheckStrictly,
  78755. styles,
  78756. classNames
  78757. } = props,
  78758. restProps = tree_select_rest(props, ["prefixCls", "size", "disabled", "bordered", "style", "className", "rootClassName", "treeCheckable", "multiple", "listHeight", "listItemHeight", "placement", "notFoundContent", "switcherIcon", "treeLine", "getPopupContainer", "popupClassName", "dropdownClassName", "treeIcon", "transitionName", "choiceTransitionName", "status", "treeExpandAction", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "allowClear", "variant", "dropdownStyle", "dropdownRender", "popupRender", "onDropdownVisibleChange", "onOpenChange", "tagRender", "maxCount", "showCheckedStrategy", "treeCheckStrictly", "styles", "classNames"]);
  78759. const {
  78760. getPopupContainer: getContextPopupContainer,
  78761. getPrefixCls,
  78762. renderEmpty,
  78763. direction,
  78764. virtual,
  78765. popupMatchSelectWidth: contextPopupMatchSelectWidth,
  78766. popupOverflow
  78767. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  78768. const {
  78769. styles: contextStyles,
  78770. classNames: contextClassNames
  78771. } = (0,config_provider_context.useComponentConfig)('treeSelect');
  78772. const [, token] = (0,useToken["default"])();
  78773. const listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : (token === null || token === void 0 ? void 0 : token.controlHeightSM) + (token === null || token === void 0 ? void 0 : token.paddingXXS);
  78774. if (true) {
  78775. const warning = (0,_util_warning.devUseWarning)('TreeSelect');
  78776. const deprecatedProps = {
  78777. dropdownMatchSelectWidth: 'popupMatchSelectWidth',
  78778. dropdownStyle: 'styles.popup.root',
  78779. dropdownClassName: 'classNames.popup.root',
  78780. popupClassName: 'classNames.popup.root',
  78781. dropdownRender: 'popupRender',
  78782. onDropdownVisibleChange: 'onOpenChange',
  78783. bordered: 'variant'
  78784. };
  78785. Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => {
  78786. warning.deprecated(!(oldProp in props), oldProp, newProp);
  78787. });
  78788. true ? warning(multiple !== false || !treeCheckable, 'usage', '`multiple` will always be `true` when `treeCheckable` is true') : 0;
  78789. true ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : 0;
  78790. }
  78791. const rootPrefixCls = getPrefixCls();
  78792. const prefixCls = getPrefixCls('select', customizePrefixCls);
  78793. const treePrefixCls = getPrefixCls('select-tree', customizePrefixCls);
  78794. const treeSelectPrefixCls = getPrefixCls('tree-select', customizePrefixCls);
  78795. const {
  78796. compactSize,
  78797. compactItemClassnames
  78798. } = useCompactItemContext(prefixCls, direction);
  78799. const rootCls = hooks_useCSSVarCls(prefixCls);
  78800. const treeSelectRootCls = hooks_useCSSVarCls(treeSelectPrefixCls);
  78801. const [wrapCSSVar, hashId, cssVarCls] = (0,select_style["default"])(prefixCls, rootCls);
  78802. const [treeSelectWrapCSSVar] = (0,tree_select_style["default"])(treeSelectPrefixCls, treePrefixCls, treeSelectRootCls);
  78803. const [variant, enableVariantCls] = useVariants('treeSelect', customVariant, bordered);
  78804. const mergedPopupClassName = classnames_default()(((_a = classNames === null || classNames === void 0 ? void 0 : classNames.popup) === null || _a === void 0 ? void 0 : _a.root) || ((_b = contextClassNames === null || contextClassNames === void 0 ? void 0 : contextClassNames.popup) === null || _b === void 0 ? void 0 : _b.root) || popupClassName || dropdownClassName, `${treeSelectPrefixCls}-dropdown`, {
  78805. [`${treeSelectPrefixCls}-dropdown-rtl`]: direction === 'rtl'
  78806. }, rootClassName, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cssVarCls, rootCls, treeSelectRootCls, hashId);
  78807. const mergedPopupStyle = ((_c = styles === null || styles === void 0 ? void 0 : styles.popup) === null || _c === void 0 ? void 0 : _c.root) || ((_d = contextStyles === null || contextStyles === void 0 ? void 0 : contextStyles.popup) === null || _d === void 0 ? void 0 : _d.root) || dropdownStyle;
  78808. const mergedPopupRender = select_usePopupRender(popupRender || dropdownRender);
  78809. const mergedOnOpenChange = onOpenChange || onDropdownVisibleChange;
  78810. const isMultiple = !!(treeCheckable || multiple);
  78811. const mergedMaxCount = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  78812. if (maxCount && (showCheckedStrategy === 'SHOW_ALL' && !treeCheckStrictly || showCheckedStrategy === 'SHOW_PARENT')) {
  78813. return undefined;
  78814. }
  78815. return maxCount;
  78816. }, [maxCount, showCheckedStrategy, treeCheckStrictly]);
  78817. const showSuffixIcon = useShowArrow(props.suffixIcon, props.showArrow);
  78818. const mergedPopupMatchSelectWidth = (_e = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _e !== void 0 ? _e : contextPopupMatchSelectWidth;
  78819. // ===================== Form =====================
  78820. const {
  78821. status: contextStatus,
  78822. hasFeedback,
  78823. isFormItemInput,
  78824. feedbackIcon
  78825. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormItemInputContext);
  78826. const mergedStatus = getMergedStatus(contextStatus, customStatus);
  78827. // ===================== Icons =====================
  78828. const {
  78829. suffixIcon,
  78830. removeIcon,
  78831. clearIcon
  78832. } = useIcons(Object.assign(Object.assign({}, restProps), {
  78833. multiple: isMultiple,
  78834. showSuffixIcon,
  78835. hasFeedback,
  78836. feedbackIcon,
  78837. prefixCls,
  78838. componentName: 'TreeSelect'
  78839. }));
  78840. const mergedAllowClear = allowClear === true ? {
  78841. clearIcon
  78842. } : allowClear;
  78843. // ===================== Empty =====================
  78844. let mergedNotFound;
  78845. if (notFoundContent !== undefined) {
  78846. mergedNotFound = notFoundContent;
  78847. } else {
  78848. mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(defaultRenderEmpty, {
  78849. componentName: "Select"
  78850. });
  78851. }
  78852. // ==================== Render =====================
  78853. const selectProps = (0,omit["default"])(restProps, ['suffixIcon', 'removeIcon', 'clearIcon', 'itemIcon', 'switcherIcon', 'style']);
  78854. // ===================== Placement =====================
  78855. const memoizedPlacement = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  78856. if (placement !== undefined) {
  78857. return placement;
  78858. }
  78859. return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
  78860. }, [placement, direction]);
  78861. const mergedSize = (0,useSize["default"])(ctx => {
  78862. var _a;
  78863. return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
  78864. });
  78865. // ===================== Disabled =====================
  78866. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  78867. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  78868. const mergedClassName = classnames_default()(!customizePrefixCls && treeSelectPrefixCls, {
  78869. [`${prefixCls}-lg`]: mergedSize === 'large',
  78870. [`${prefixCls}-sm`]: mergedSize === 'small',
  78871. [`${prefixCls}-rtl`]: direction === 'rtl',
  78872. [`${prefixCls}-${variant}`]: enableVariantCls,
  78873. [`${prefixCls}-in-form-item`]: isFormItemInput
  78874. }, getStatusClassNames(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, className, rootClassName, contextClassNames.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, cssVarCls, rootCls, treeSelectRootCls, hashId);
  78875. const renderSwitcherIcon = nodeProps => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(iconUtil, {
  78876. prefixCls: treePrefixCls,
  78877. switcherIcon: switcherIcon,
  78878. treeNodeProps: nodeProps,
  78879. showLine: treeLine
  78880. }));
  78881. // ============================ zIndex ============================
  78882. const [zIndex] = (0,useZIndex.useZIndex)('SelectLike', mergedPopupStyle === null || mergedPopupStyle === void 0 ? void 0 : mergedPopupStyle.zIndex);
  78883. const returnNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_tree_select_es, Object.assign({
  78884. virtual: virtual,
  78885. disabled: mergedDisabled
  78886. }, selectProps, {
  78887. dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,
  78888. builtinPlacements: select_mergedBuiltinPlacements(builtinPlacements, popupOverflow),
  78889. ref: ref,
  78890. prefixCls: prefixCls,
  78891. className: mergedClassName,
  78892. style: Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.root), style),
  78893. listHeight: listHeight,
  78894. listItemHeight: listItemHeight,
  78895. treeCheckable: treeCheckable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  78896. className: `${prefixCls}-tree-checkbox-inner`
  78897. }) : treeCheckable,
  78898. treeLine: !!treeLine,
  78899. suffixIcon: suffixIcon,
  78900. multiple: isMultiple,
  78901. placement: memoizedPlacement,
  78902. removeIcon: removeIcon,
  78903. allowClear: mergedAllowClear,
  78904. switcherIcon: renderSwitcherIcon,
  78905. showTreeIcon: treeIcon,
  78906. notFoundContent: mergedNotFound,
  78907. getPopupContainer: getPopupContainer || getContextPopupContainer,
  78908. treeMotion: null,
  78909. dropdownClassName: mergedPopupClassName,
  78910. dropdownStyle: Object.assign(Object.assign({}, mergedPopupStyle), {
  78911. zIndex
  78912. }),
  78913. dropdownRender: mergedPopupRender,
  78914. onDropdownVisibleChange: mergedOnOpenChange,
  78915. choiceTransitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, '', choiceTransitionName),
  78916. transitionName: (0,_util_motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),
  78917. treeExpandAction: treeExpandAction,
  78918. tagRender: isMultiple ? tagRender : undefined,
  78919. maxCount: mergedMaxCount,
  78920. showCheckedStrategy: showCheckedStrategy,
  78921. treeCheckStrictly: treeCheckStrictly
  78922. }));
  78923. return wrapCSSVar(treeSelectWrapCSSVar(returnNode));
  78924. };
  78925. const TreeSelectRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalTreeSelect);
  78926. const tree_select_TreeSelect = TreeSelectRef;
  78927. // We don't care debug panel
  78928. /* istanbul ignore next */
  78929. const tree_select_PurePanel = _util_PurePanel(tree_select_TreeSelect, 'dropdownAlign', props => (0,omit["default"])(props, ['visible']));
  78930. tree_select_TreeSelect.TreeNode = rc_tree_select_es_TreeNode;
  78931. tree_select_TreeSelect.SHOW_ALL = SHOW_ALL;
  78932. tree_select_TreeSelect.SHOW_PARENT = strategyUtil_SHOW_PARENT;
  78933. tree_select_TreeSelect.SHOW_CHILD = strategyUtil_SHOW_CHILD;
  78934. tree_select_TreeSelect._InternalPanelDoNotUseOrYouWillBeFired = tree_select_PurePanel;
  78935. if (true) {
  78936. tree_select_TreeSelect.displayName = 'TreeSelect';
  78937. }
  78938. /* harmony default export */ var tree_select = (tree_select_TreeSelect);
  78939. ;// ./node_modules/@ant-design/icons-svg/es/asn/EditOutlined.js
  78940. // This icon file is generated automatically.
  78941. var EditOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, "name": "edit", "theme": "outlined" };
  78942. /* harmony default export */ var asn_EditOutlined = (EditOutlined);
  78943. ;// ./node_modules/@ant-design/icons/es/icons/EditOutlined.js
  78944. // GENERATE BY ./scripts/generate.ts
  78945. // DON NOT EDIT IT MANUALLY
  78946. var EditOutlined_EditOutlined = function EditOutlined(props, ref) {
  78947. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  78948. ref: ref,
  78949. icon: asn_EditOutlined
  78950. }));
  78951. };
  78952. /**![edit](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI1Ny43IDc1MmMyIDAgNC0uMiA2LS41TDQzMS45IDcyMmMyLS40IDMuOS0xLjMgNS4zLTIuOGw0MjMuOS00MjMuOWE5Ljk2IDkuOTYgMCAwMDAtMTQuMUw2OTQuOSAxMTQuOWMtMS45LTEuOS00LjQtMi45LTcuMS0yLjlzLTUuMiAxLTcuMSAyLjlMMjU2LjggNTM4LjhjLTEuNSAxLjUtMi40IDMuMy0yLjggNS4zbC0yOS41IDE2OC4yYTMzLjUgMzMuNSAwIDAwOS40IDI5LjhjNi42IDYuNCAxNC45IDkuOSAyMy44IDkuOXptNjcuNC0xNzQuNEw2ODcuOCAyMTVsNzMuMyA3My4zLTM2Mi43IDM2Mi42LTg4LjkgMTUuNyAxNS42LTg5ek04ODAgODM2SDE0NGMtMTcuNyAwLTMyIDE0LjMtMzIgMzJ2MzZjMCA0LjQgMy42IDggOCA4aDc4NGM0LjQgMCA4LTMuNiA4LTh2LTM2YzAtMTcuNy0xNC4zLTMyLTMyLTMyeiIgLz48L3N2Zz4=) */
  78953. var EditOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EditOutlined_EditOutlined);
  78954. if (true) {
  78955. EditOutlined_RefIcon.displayName = 'EditOutlined';
  78956. }
  78957. /* harmony default export */ var icons_EditOutlined = (EditOutlined_RefIcon);
  78958. ;// ./node_modules/@ant-design/icons-svg/es/asn/EnterOutlined.js
  78959. // This icon file is generated automatically.
  78960. var EnterOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, "name": "enter", "theme": "outlined" };
  78961. /* harmony default export */ var asn_EnterOutlined = (EnterOutlined);
  78962. ;// ./node_modules/@ant-design/icons/es/icons/EnterOutlined.js
  78963. // GENERATE BY ./scripts/generate.ts
  78964. // DON NOT EDIT IT MANUALLY
  78965. var EnterOutlined_EnterOutlined = function EnterOutlined(props, ref) {
  78966. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  78967. ref: ref,
  78968. icon: asn_EnterOutlined
  78969. }));
  78970. };
  78971. /**![enter](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTg2NCAxNzBoLTYwYy00LjQgMC04IDMuNi04IDh2NTE4SDMxMHYtNzNjMC02LjctNy44LTEwLjUtMTMtNi4zbC0xNDEuOSAxMTJhOCA4IDAgMDAwIDEyLjZsMTQxLjkgMTEyYzUuMyA0LjIgMTMgLjQgMTMtNi4zdi03NWg0OThjMzUuMyAwIDY0LTI4LjcgNjQtNjRWMTc4YzAtNC40LTMuNi04LTgtOHoiIC8+PC9zdmc+) */
  78972. var EnterOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(EnterOutlined_EnterOutlined);
  78973. if (true) {
  78974. EnterOutlined_RefIcon.displayName = 'EnterOutlined';
  78975. }
  78976. /* harmony default export */ var icons_EnterOutlined = (EnterOutlined_RefIcon);
  78977. // EXTERNAL MODULE: ./components/typography/style/index.ts + 1 modules
  78978. var typography_style = __webpack_require__("./components/typography/style/index.ts");
  78979. ;// ./components/typography/Editable.tsx
  78980. const Editable = props => {
  78981. const {
  78982. prefixCls,
  78983. 'aria-label': ariaLabel,
  78984. className,
  78985. style,
  78986. direction,
  78987. maxLength,
  78988. autoSize = true,
  78989. value,
  78990. onSave,
  78991. onCancel,
  78992. onEnd,
  78993. component,
  78994. enterIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EnterOutlined, null)
  78995. } = props;
  78996. const ref = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  78997. const inComposition = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  78998. const lastKeyCode = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  78999. const [current, setCurrent] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(value);
  79000. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  79001. setCurrent(value);
  79002. }, [value]);
  79003. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  79004. var _a;
  79005. if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) {
  79006. const {
  79007. textArea
  79008. } = ref.current.resizableTextArea;
  79009. textArea.focus();
  79010. const {
  79011. length
  79012. } = textArea.value;
  79013. textArea.setSelectionRange(length, length);
  79014. }
  79015. }, []);
  79016. const onChange = ({
  79017. target
  79018. }) => {
  79019. setCurrent(target.value.replace(/[\n\r]/g, ''));
  79020. };
  79021. const onCompositionStart = () => {
  79022. inComposition.current = true;
  79023. };
  79024. const onCompositionEnd = () => {
  79025. inComposition.current = false;
  79026. };
  79027. const onKeyDown = ({
  79028. keyCode
  79029. }) => {
  79030. // We don't record keyCode when IME is using
  79031. if (inComposition.current) return;
  79032. lastKeyCode.current = keyCode;
  79033. };
  79034. const confirmChange = () => {
  79035. onSave(current.trim());
  79036. };
  79037. const onKeyUp = ({
  79038. keyCode,
  79039. ctrlKey,
  79040. altKey,
  79041. metaKey,
  79042. shiftKey
  79043. }) => {
  79044. // Check if it's a real key
  79045. if (lastKeyCode.current !== keyCode || inComposition.current || ctrlKey || altKey || metaKey || shiftKey) {
  79046. return;
  79047. }
  79048. if (keyCode === KeyCode["default"].ENTER) {
  79049. confirmChange();
  79050. onEnd === null || onEnd === void 0 ? void 0 : onEnd();
  79051. } else if (keyCode === KeyCode["default"].ESC) {
  79052. onCancel();
  79053. }
  79054. };
  79055. const onBlur = () => {
  79056. confirmChange();
  79057. };
  79058. const [wrapCSSVar, hashId, cssVarCls] = (0,typography_style["default"])(prefixCls);
  79059. const textAreaClassName = classnames_default()(prefixCls, `${prefixCls}-edit-content`, {
  79060. [`${prefixCls}-rtl`]: direction === 'rtl',
  79061. [`${prefixCls}-${component}`]: !!component
  79062. }, className, hashId, cssVarCls);
  79063. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  79064. className: textAreaClassName,
  79065. style: style
  79066. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(input_TextArea, {
  79067. ref: ref,
  79068. maxLength: maxLength,
  79069. value: current,
  79070. onChange: onChange,
  79071. onKeyDown: onKeyDown,
  79072. onKeyUp: onKeyUp,
  79073. onCompositionStart: onCompositionStart,
  79074. onCompositionEnd: onCompositionEnd,
  79075. onBlur: onBlur,
  79076. "aria-label": ariaLabel,
  79077. rows: 1,
  79078. autoSize: autoSize
  79079. }), enterIcon !== null ? (0,reactNode.cloneElement)(enterIcon, {
  79080. className: `${prefixCls}-edit-content-confirm`
  79081. }) : null));
  79082. };
  79083. /* harmony default export */ var typography_Editable = (Editable);
  79084. // EXTERNAL MODULE: ./node_modules/copy-to-clipboard/index.js
  79085. var copy_to_clipboard = __webpack_require__("./node_modules/copy-to-clipboard/index.js");
  79086. var copy_to_clipboard_default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard);
  79087. ;// ./components/typography/hooks/useCopyClick.ts
  79088. var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
  79089. function adopt(value) {
  79090. return value instanceof P ? value : new P(function (resolve) {
  79091. resolve(value);
  79092. });
  79093. }
  79094. return new (P || (P = Promise))(function (resolve, reject) {
  79095. function fulfilled(value) {
  79096. try {
  79097. step(generator.next(value));
  79098. } catch (e) {
  79099. reject(e);
  79100. }
  79101. }
  79102. function rejected(value) {
  79103. try {
  79104. step(generator["throw"](value));
  79105. } catch (e) {
  79106. reject(e);
  79107. }
  79108. }
  79109. function step(result) {
  79110. result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
  79111. }
  79112. step((generator = generator.apply(thisArg, _arguments || [])).next());
  79113. });
  79114. };
  79115. const useCopyClick = ({
  79116. copyConfig,
  79117. children
  79118. }) => {
  79119. const [copied, setCopied] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79120. const [copyLoading, setCopyLoading] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79121. const copyIdRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79122. const cleanCopyId = () => {
  79123. if (copyIdRef.current) {
  79124. clearTimeout(copyIdRef.current);
  79125. }
  79126. };
  79127. const copyOptions = {};
  79128. if (copyConfig.format) {
  79129. copyOptions.format = copyConfig.format;
  79130. }
  79131. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => cleanCopyId, []);
  79132. // Keep copy action up to date
  79133. const onClick = (0,useEvent["default"])(e => __awaiter(void 0, void 0, void 0, function* () {
  79134. var _a;
  79135. e === null || e === void 0 ? void 0 : e.preventDefault();
  79136. e === null || e === void 0 ? void 0 : e.stopPropagation();
  79137. setCopyLoading(true);
  79138. try {
  79139. const text = typeof copyConfig.text === 'function' ? yield copyConfig.text() : copyConfig.text;
  79140. copy_to_clipboard_default()(text || _util_toList(children, true).join('') || '', copyOptions);
  79141. setCopyLoading(false);
  79142. setCopied(true);
  79143. // Trigger tips update
  79144. cleanCopyId();
  79145. copyIdRef.current = setTimeout(() => {
  79146. setCopied(false);
  79147. }, 3000);
  79148. (_a = copyConfig.onCopy) === null || _a === void 0 ? void 0 : _a.call(copyConfig, e);
  79149. } catch (error) {
  79150. setCopyLoading(false);
  79151. throw error;
  79152. }
  79153. }));
  79154. return {
  79155. copied,
  79156. copyLoading,
  79157. onClick
  79158. };
  79159. };
  79160. /* harmony default export */ var hooks_useCopyClick = (useCopyClick);
  79161. ;// ./components/typography/hooks/useMergedConfig.ts
  79162. function useMergedConfig(propConfig, templateConfig) {
  79163. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  79164. const support = !!propConfig;
  79165. return [support, Object.assign(Object.assign({}, templateConfig), support && typeof propConfig === 'object' ? propConfig : null)];
  79166. }, [propConfig]);
  79167. }
  79168. ;// ./components/typography/hooks/usePrevious.ts
  79169. const usePrevious = value => {
  79170. const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(undefined);
  79171. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  79172. ref.current = value;
  79173. });
  79174. return ref.current;
  79175. };
  79176. /* harmony default export */ var hooks_usePrevious = (usePrevious);
  79177. ;// ./components/typography/hooks/useTooltipProps.ts
  79178. const useTooltipProps = (tooltip, editConfigText, children) => (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
  79179. if (tooltip === true) {
  79180. return {
  79181. title: editConfigText !== null && editConfigText !== void 0 ? editConfigText : children
  79182. };
  79183. }
  79184. if (/*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(tooltip)) {
  79185. return {
  79186. title: tooltip
  79187. };
  79188. }
  79189. if (typeof tooltip === 'object') {
  79190. return Object.assign({
  79191. title: editConfigText !== null && editConfigText !== void 0 ? editConfigText : children
  79192. }, tooltip);
  79193. }
  79194. return {
  79195. title: tooltip
  79196. };
  79197. }, [tooltip, editConfigText, children]);
  79198. /* harmony default export */ var hooks_useTooltipProps = (useTooltipProps);
  79199. ;// ./components/typography/Typography.tsx
  79200. var Typography_rest = undefined && undefined.__rest || function (s, e) {
  79201. var t = {};
  79202. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  79203. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  79204. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  79205. }
  79206. return t;
  79207. };
  79208. const Typography = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  79209. const {
  79210. prefixCls: customizePrefixCls,
  79211. component: Component = 'article',
  79212. className,
  79213. rootClassName,
  79214. setContentRef,
  79215. children,
  79216. direction: typographyDirection,
  79217. style
  79218. } = props,
  79219. restProps = Typography_rest(props, ["prefixCls", "component", "className", "rootClassName", "setContentRef", "children", "direction", "style"]);
  79220. const {
  79221. getPrefixCls,
  79222. direction: contextDirection,
  79223. className: contextClassName,
  79224. style: contextStyle
  79225. } = (0,config_provider_context.useComponentConfig)('typography');
  79226. const direction = typographyDirection !== null && typographyDirection !== void 0 ? typographyDirection : contextDirection;
  79227. const mergedRef = setContentRef ? (0,es_ref.composeRef)(ref, setContentRef) : ref;
  79228. const prefixCls = getPrefixCls('typography', customizePrefixCls);
  79229. if (true) {
  79230. const warning = (0,_util_warning.devUseWarning)('Typography');
  79231. warning.deprecated(!setContentRef, 'setContentRef', 'ref');
  79232. }
  79233. // Style
  79234. const [wrapCSSVar, hashId, cssVarCls] = (0,typography_style["default"])(prefixCls);
  79235. const componentClassName = classnames_default()(prefixCls, contextClassName, {
  79236. [`${prefixCls}-rtl`]: direction === 'rtl'
  79237. }, className, rootClassName, hashId, cssVarCls);
  79238. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  79239. return wrapCSSVar(
  79240. /*#__PURE__*/
  79241. // @ts-expect-error: Expression produces a union type that is too complex to represent.
  79242. external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, Object.assign({
  79243. className: componentClassName,
  79244. style: mergedStyle,
  79245. ref: mergedRef
  79246. }, restProps), children));
  79247. });
  79248. if (true) {
  79249. Typography.displayName = 'Typography';
  79250. }
  79251. /* harmony default export */ var typography_Typography = (Typography);
  79252. ;// ./node_modules/@ant-design/icons-svg/es/asn/CopyOutlined.js
  79253. // This icon file is generated automatically.
  79254. var CopyOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, "name": "copy", "theme": "outlined" };
  79255. /* harmony default export */ var asn_CopyOutlined = (CopyOutlined);
  79256. ;// ./node_modules/@ant-design/icons/es/icons/CopyOutlined.js
  79257. // GENERATE BY ./scripts/generate.ts
  79258. // DON NOT EDIT IT MANUALLY
  79259. var CopyOutlined_CopyOutlined = function CopyOutlined(props, ref) {
  79260. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  79261. ref: ref,
  79262. icon: asn_CopyOutlined
  79263. }));
  79264. };
  79265. /**![copy](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTgzMiA2NEgyOTZjLTQuNCAwLTggMy42LTggOHY1NmMwIDQuNCAzLjYgOCA4IDhoNDk2djY4OGMwIDQuNCAzLjYgOCA4IDhoNTZjNC40IDAgOC0zLjYgOC04Vjk2YzAtMTcuNy0xNC4zLTMyLTMyLTMyek03MDQgMTkySDE5MmMtMTcuNyAwLTMyIDE0LjMtMzIgMzJ2NTMwLjdjMCA4LjUgMy40IDE2LjYgOS40IDIyLjZsMTczLjMgMTczLjNjMi4yIDIuMiA0LjcgNCA3LjQgNS41djEuOWg0LjJjMy41IDEuMyA3LjIgMiAxMSAySDcwNGMxNy43IDAgMzItMTQuMyAzMi0zMlYyMjRjMC0xNy43LTE0LjMtMzItMzItMzJ6TTM1MCA4NTYuMkwyNjMuOSA3NzBIMzUwdjg2LjJ6TTY2NCA4ODhINDE0Vjc0NmMwLTIyLjEtMTcuOS00MC00MC00MEgyMzJWMjY0aDQzMnY2MjR6IiAvPjwvc3ZnPg==) */
  79266. var CopyOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(CopyOutlined_CopyOutlined);
  79267. if (true) {
  79268. CopyOutlined_RefIcon.displayName = 'CopyOutlined';
  79269. }
  79270. /* harmony default export */ var icons_CopyOutlined = (CopyOutlined_RefIcon);
  79271. ;// ./components/typography/Base/util.ts
  79272. function util_toList(val) {
  79273. if (val === false) {
  79274. return [false, false];
  79275. }
  79276. return Array.isArray(val) ? val : [val];
  79277. }
  79278. function getNode(dom, defaultNode, needDom) {
  79279. if (dom === true || dom === undefined) {
  79280. return defaultNode;
  79281. }
  79282. return dom || needDom && defaultNode;
  79283. }
  79284. /**
  79285. * Check for element is native ellipsis
  79286. * ref:
  79287. * - https://github.com/ant-design/ant-design/issues/50143
  79288. * - https://github.com/ant-design/ant-design/issues/50414
  79289. */
  79290. function isEleEllipsis(ele) {
  79291. // Create a new div to get the size
  79292. const childDiv = document.createElement('em');
  79293. ele.appendChild(childDiv);
  79294. // For test case
  79295. if (true) {
  79296. childDiv.className = 'ant-typography-css-ellipsis-content-measure';
  79297. }
  79298. const rect = ele.getBoundingClientRect();
  79299. const childRect = childDiv.getBoundingClientRect();
  79300. // Reset
  79301. ele.removeChild(childDiv);
  79302. // Range checker
  79303. return (
  79304. // Horizontal out of range
  79305. rect.left > childRect.left || childRect.right > rect.right ||
  79306. // Vertical out of range
  79307. rect.top > childRect.top || childRect.bottom > rect.bottom
  79308. );
  79309. }
  79310. const isValidText = val => ['string', 'number'].includes(typeof val);
  79311. ;// ./components/typography/Base/CopyBtn.tsx
  79312. const CopyBtn = ({
  79313. prefixCls,
  79314. copied,
  79315. locale,
  79316. iconOnly,
  79317. tooltips,
  79318. icon,
  79319. tabIndex,
  79320. onCopy,
  79321. loading: btnLoading
  79322. }) => {
  79323. const tooltipNodes = util_toList(tooltips);
  79324. const iconNodes = util_toList(icon);
  79325. const {
  79326. copied: copiedText,
  79327. copy: copyText
  79328. } = locale !== null && locale !== void 0 ? locale : {};
  79329. const systemStr = copied ? copiedText : copyText;
  79330. const copyTitle = getNode(tooltipNodes[copied ? 1 : 0], systemStr);
  79331. const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;
  79332. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
  79333. title: copyTitle
  79334. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  79335. type: "button",
  79336. className: classnames_default()(`${prefixCls}-copy`, {
  79337. [`${prefixCls}-copy-success`]: copied,
  79338. [`${prefixCls}-copy-icon-only`]: iconOnly
  79339. }),
  79340. onClick: onCopy,
  79341. "aria-label": ariaLabel,
  79342. tabIndex: tabIndex
  79343. }, copied ? getNode(iconNodes[1], /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CheckOutlined, null), true) : getNode(iconNodes[0], btnLoading ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_CopyOutlined, null), true)));
  79344. };
  79345. /* harmony default export */ var Base_CopyBtn = (CopyBtn);
  79346. ;// ./components/typography/Base/Ellipsis.tsx
  79347. const MeasureText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
  79348. style,
  79349. children
  79350. }, ref) => {
  79351. const spanRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79352. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  79353. isExceed: () => {
  79354. const span = spanRef.current;
  79355. return span.scrollHeight > span.clientHeight;
  79356. },
  79357. getHeight: () => spanRef.current.clientHeight
  79358. }));
  79359. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  79360. "aria-hidden": true,
  79361. ref: spanRef,
  79362. style: Object.assign({
  79363. position: 'fixed',
  79364. display: 'block',
  79365. left: 0,
  79366. top: 0,
  79367. pointerEvents: 'none',
  79368. backgroundColor: 'rgba(255, 0, 0, 0.65)'
  79369. }, style)
  79370. }, children);
  79371. });
  79372. const getNodesLen = nodeList => nodeList.reduce((totalLen, node) => totalLen + (isValidText(node) ? String(node).length : 1), 0);
  79373. function sliceNodes(nodeList, len) {
  79374. let currLen = 0;
  79375. const currentNodeList = [];
  79376. for (let i = 0; i < nodeList.length; i += 1) {
  79377. // Match to return
  79378. if (currLen === len) {
  79379. return currentNodeList;
  79380. }
  79381. const node = nodeList[i];
  79382. const canCut = isValidText(node);
  79383. const nodeLen = canCut ? String(node).length : 1;
  79384. const nextLen = currLen + nodeLen;
  79385. // Exceed but current not which means we need cut this
  79386. // This will not happen on validate ReactElement
  79387. if (nextLen > len) {
  79388. const restLen = len - currLen;
  79389. currentNodeList.push(String(node).slice(0, restLen));
  79390. return currentNodeList;
  79391. }
  79392. currentNodeList.push(node);
  79393. currLen = nextLen;
  79394. }
  79395. return nodeList;
  79396. }
  79397. // Measure for the `text` is exceed the `rows` or not
  79398. const STATUS_MEASURE_NONE = 0;
  79399. const STATUS_MEASURE_PREPARE = 1;
  79400. const STATUS_MEASURE_START = 2;
  79401. const STATUS_MEASURE_NEED_ELLIPSIS = 3;
  79402. const STATUS_MEASURE_NO_NEED_ELLIPSIS = 4;
  79403. const lineClipStyle = {
  79404. display: '-webkit-box',
  79405. overflow: 'hidden',
  79406. WebkitBoxOrient: 'vertical'
  79407. };
  79408. function EllipsisMeasure(props) {
  79409. const {
  79410. enableMeasure,
  79411. width,
  79412. text,
  79413. children,
  79414. rows,
  79415. expanded,
  79416. miscDeps,
  79417. onEllipsis
  79418. } = props;
  79419. const nodeList = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,toArray["default"])(text), [text]);
  79420. const nodeLen = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => getNodesLen(nodeList), [text]);
  79421. // ========================= Full Content =========================
  79422. // Used for measure only, which means it's always render as no need ellipsis
  79423. const fullContent = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => children(nodeList, false), [text]);
  79424. // ========================= Cut Content ==========================
  79425. const [ellipsisCutIndex, setEllipsisCutIndex] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  79426. const cutMidRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79427. // ========================= NeedEllipsis =========================
  79428. const measureWhiteSpaceRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79429. const needEllipsisRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79430. // Measure for `rows-1` height, to avoid operation exceed the line height
  79431. const descRowsEllipsisRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79432. const symbolRowEllipsisRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79433. const [canEllipsis, setCanEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79434. const [needEllipsis, setNeedEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(STATUS_MEASURE_NONE);
  79435. const [ellipsisHeight, setEllipsisHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  79436. const [parentWhiteSpace, setParentWhiteSpace] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  79437. // Trigger start measure
  79438. (0,useLayoutEffect["default"])(() => {
  79439. if (enableMeasure && width && nodeLen) {
  79440. setNeedEllipsis(STATUS_MEASURE_PREPARE);
  79441. } else {
  79442. setNeedEllipsis(STATUS_MEASURE_NONE);
  79443. }
  79444. }, [width, text, rows, enableMeasure, nodeList]);
  79445. // Measure process
  79446. (0,useLayoutEffect["default"])(() => {
  79447. var _a, _b, _c, _d;
  79448. if (needEllipsis === STATUS_MEASURE_PREPARE) {
  79449. setNeedEllipsis(STATUS_MEASURE_START);
  79450. // Parent ref `white-space`
  79451. const nextWhiteSpace = measureWhiteSpaceRef.current && getComputedStyle(measureWhiteSpaceRef.current).whiteSpace;
  79452. setParentWhiteSpace(nextWhiteSpace);
  79453. } else if (needEllipsis === STATUS_MEASURE_START) {
  79454. const isOverflow = !!((_a = needEllipsisRef.current) === null || _a === void 0 ? void 0 : _a.isExceed());
  79455. setNeedEllipsis(isOverflow ? STATUS_MEASURE_NEED_ELLIPSIS : STATUS_MEASURE_NO_NEED_ELLIPSIS);
  79456. setEllipsisCutIndex(isOverflow ? [0, nodeLen] : null);
  79457. setCanEllipsis(isOverflow);
  79458. // Get the basic height of ellipsis rows
  79459. const baseRowsEllipsisHeight = ((_b = needEllipsisRef.current) === null || _b === void 0 ? void 0 : _b.getHeight()) || 0;
  79460. // Get the height of `rows - 1` + symbol height
  79461. const descRowsEllipsisHeight = rows === 1 ? 0 : ((_c = descRowsEllipsisRef.current) === null || _c === void 0 ? void 0 : _c.getHeight()) || 0;
  79462. const symbolRowEllipsisHeight = ((_d = symbolRowEllipsisRef.current) === null || _d === void 0 ? void 0 : _d.getHeight()) || 0;
  79463. const maxRowsHeight = Math.max(baseRowsEllipsisHeight,
  79464. // height of rows with ellipsis
  79465. descRowsEllipsisHeight + symbolRowEllipsisHeight);
  79466. setEllipsisHeight(maxRowsHeight + 1);
  79467. onEllipsis(isOverflow);
  79468. }
  79469. }, [needEllipsis]);
  79470. // ========================= Cut Measure ==========================
  79471. const cutMidIndex = ellipsisCutIndex ? Math.ceil((ellipsisCutIndex[0] + ellipsisCutIndex[1]) / 2) : 0;
  79472. (0,useLayoutEffect["default"])(() => {
  79473. var _a;
  79474. const [minIndex, maxIndex] = ellipsisCutIndex || [0, 0];
  79475. if (minIndex !== maxIndex) {
  79476. const midHeight = ((_a = cutMidRef.current) === null || _a === void 0 ? void 0 : _a.getHeight()) || 0;
  79477. const isOverflow = midHeight > ellipsisHeight;
  79478. let targetMidIndex = cutMidIndex;
  79479. if (maxIndex - minIndex === 1) {
  79480. targetMidIndex = isOverflow ? minIndex : maxIndex;
  79481. }
  79482. setEllipsisCutIndex(isOverflow ? [minIndex, targetMidIndex] : [targetMidIndex, maxIndex]);
  79483. }
  79484. }, [ellipsisCutIndex, cutMidIndex]);
  79485. // ========================= Text Content =========================
  79486. const finalContent = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  79487. // Skip everything if `enableMeasure` is disabled
  79488. if (!enableMeasure) {
  79489. return children(nodeList, false);
  79490. }
  79491. if (needEllipsis !== STATUS_MEASURE_NEED_ELLIPSIS || !ellipsisCutIndex || ellipsisCutIndex[0] !== ellipsisCutIndex[1]) {
  79492. const content = children(nodeList, false);
  79493. // Limit the max line count to avoid scrollbar blink unless no need ellipsis
  79494. // https://github.com/ant-design/ant-design/issues/42958
  79495. if ([STATUS_MEASURE_NO_NEED_ELLIPSIS, STATUS_MEASURE_NONE].includes(needEllipsis)) {
  79496. return content;
  79497. }
  79498. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  79499. style: Object.assign(Object.assign({}, lineClipStyle), {
  79500. WebkitLineClamp: rows
  79501. })
  79502. }, content);
  79503. }
  79504. return children(expanded ? nodeList : sliceNodes(nodeList, ellipsisCutIndex[0]), canEllipsis);
  79505. }, [expanded, needEllipsis, ellipsisCutIndex, nodeList].concat((0,toConsumableArray["default"])(miscDeps)));
  79506. // ============================ Render ============================
  79507. const measureStyle = {
  79508. width,
  79509. margin: 0,
  79510. padding: 0,
  79511. whiteSpace: parentWhiteSpace === 'nowrap' ? 'normal' : 'inherit'
  79512. };
  79513. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, finalContent, needEllipsis === STATUS_MEASURE_START && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
  79514. style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {
  79515. WebkitLineClamp: rows
  79516. }),
  79517. ref: needEllipsisRef
  79518. }, fullContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
  79519. style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {
  79520. WebkitLineClamp: rows - 1
  79521. }),
  79522. ref: descRowsEllipsisRef
  79523. }, fullContent), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
  79524. style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {
  79525. WebkitLineClamp: 1
  79526. }),
  79527. ref: symbolRowEllipsisRef
  79528. }, children([], true)))), needEllipsis === STATUS_MEASURE_NEED_ELLIPSIS && ellipsisCutIndex && ellipsisCutIndex[0] !== ellipsisCutIndex[1] && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(MeasureText, {
  79529. style: Object.assign(Object.assign({}, measureStyle), {
  79530. top: 400
  79531. }),
  79532. ref: cutMidRef
  79533. }, children(sliceNodes(nodeList, cutMidIndex), true))), needEllipsis === STATUS_MEASURE_PREPARE && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  79534. style: {
  79535. whiteSpace: 'inherit'
  79536. },
  79537. ref: measureWhiteSpaceRef
  79538. })));
  79539. }
  79540. ;// ./components/typography/Base/EllipsisTooltip.tsx
  79541. const EllipsisTooltip = ({
  79542. enableEllipsis,
  79543. isEllipsis,
  79544. children,
  79545. tooltipProps
  79546. }) => {
  79547. if (!(tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.title) || !enableEllipsis) {
  79548. return children;
  79549. }
  79550. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, Object.assign({
  79551. open: isEllipsis ? undefined : false
  79552. }, tooltipProps), children);
  79553. };
  79554. if (true) {
  79555. EllipsisTooltip.displayName = 'EllipsisTooltip';
  79556. }
  79557. /* harmony default export */ var Base_EllipsisTooltip = (EllipsisTooltip);
  79558. ;// ./components/typography/Base/index.tsx
  79559. var Base_rest = undefined && undefined.__rest || function (s, e) {
  79560. var t = {};
  79561. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  79562. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  79563. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  79564. }
  79565. return t;
  79566. };
  79567. function wrapperDecorations({
  79568. mark,
  79569. code,
  79570. underline,
  79571. delete: del,
  79572. strong,
  79573. keyboard,
  79574. italic
  79575. }, content) {
  79576. let currentContent = content;
  79577. function wrap(tag, needed) {
  79578. if (!needed) {
  79579. return;
  79580. }
  79581. currentContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(tag, {}, currentContent);
  79582. }
  79583. wrap('strong', strong);
  79584. wrap('u', underline);
  79585. wrap('del', del);
  79586. wrap('code', code);
  79587. wrap('mark', mark);
  79588. wrap('kbd', keyboard);
  79589. wrap('i', italic);
  79590. return currentContent;
  79591. }
  79592. const ELLIPSIS_STR = '...';
  79593. const DECORATION_PROPS = ['delete', 'mark', 'code', 'underline', 'strong', 'keyboard', 'italic'];
  79594. const Base = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  79595. var _a;
  79596. const {
  79597. prefixCls: customizePrefixCls,
  79598. className,
  79599. style,
  79600. type,
  79601. disabled,
  79602. children,
  79603. ellipsis,
  79604. editable,
  79605. copyable,
  79606. component,
  79607. title
  79608. } = props,
  79609. restProps = Base_rest(props, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]);
  79610. const {
  79611. getPrefixCls,
  79612. direction
  79613. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  79614. const [textLocale] = (0,useLocale["default"])('Text');
  79615. const typographyRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79616. const editIconRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  79617. // ============================ MISC ============================
  79618. const prefixCls = getPrefixCls('typography', customizePrefixCls);
  79619. const textProps = (0,omit["default"])(restProps, DECORATION_PROPS);
  79620. // ========================== Editable ==========================
  79621. const [enableEdit, editConfig] = useMergedConfig(editable);
  79622. const [editing, setEditing] = (0,useMergedState["default"])(false, {
  79623. value: editConfig.editing
  79624. });
  79625. const {
  79626. triggerType = ['icon']
  79627. } = editConfig;
  79628. const triggerEdit = edit => {
  79629. var _a;
  79630. if (edit) {
  79631. (_a = editConfig.onStart) === null || _a === void 0 ? void 0 : _a.call(editConfig);
  79632. }
  79633. setEditing(edit);
  79634. };
  79635. // Focus edit icon when back
  79636. const prevEditing = hooks_usePrevious(editing);
  79637. (0,useLayoutEffect["default"])(() => {
  79638. var _a;
  79639. if (!editing && prevEditing) {
  79640. (_a = editIconRef.current) === null || _a === void 0 ? void 0 : _a.focus();
  79641. }
  79642. }, [editing]);
  79643. const onEditClick = e => {
  79644. e === null || e === void 0 ? void 0 : e.preventDefault();
  79645. triggerEdit(true);
  79646. };
  79647. const onEditChange = value => {
  79648. var _a;
  79649. (_a = editConfig.onChange) === null || _a === void 0 ? void 0 : _a.call(editConfig, value);
  79650. triggerEdit(false);
  79651. };
  79652. const onEditCancel = () => {
  79653. var _a;
  79654. (_a = editConfig.onCancel) === null || _a === void 0 ? void 0 : _a.call(editConfig);
  79655. triggerEdit(false);
  79656. };
  79657. // ========================== Copyable ==========================
  79658. const [enableCopy, copyConfig] = useMergedConfig(copyable);
  79659. const {
  79660. copied,
  79661. copyLoading,
  79662. onClick: onCopyClick
  79663. } = hooks_useCopyClick({
  79664. copyConfig,
  79665. children
  79666. });
  79667. // ========================== Ellipsis ==========================
  79668. const [isLineClampSupport, setIsLineClampSupport] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79669. const [isTextOverflowSupport, setIsTextOverflowSupport] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79670. const [isJsEllipsis, setIsJsEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79671. const [isNativeEllipsis, setIsNativeEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  79672. const [isNativeVisible, setIsNativeVisible] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(true);
  79673. const [enableEllipsis, ellipsisConfig] = useMergedConfig(ellipsis, {
  79674. expandable: false,
  79675. symbol: isExpanded => isExpanded ? textLocale === null || textLocale === void 0 ? void 0 : textLocale.collapse : textLocale === null || textLocale === void 0 ? void 0 : textLocale.expand
  79676. });
  79677. const [expanded, setExpanded] = (0,useMergedState["default"])(ellipsisConfig.defaultExpanded || false, {
  79678. value: ellipsisConfig.expanded
  79679. });
  79680. const mergedEnableEllipsis = enableEllipsis && (!expanded || ellipsisConfig.expandable === 'collapsible');
  79681. // Shared prop to reduce bundle size
  79682. const {
  79683. rows = 1
  79684. } = ellipsisConfig;
  79685. const needMeasureEllipsis = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() =>
  79686. // Disable ellipsis
  79687. mergedEnableEllipsis && (
  79688. // Provide suffix
  79689. ellipsisConfig.suffix !== undefined || ellipsisConfig.onEllipsis ||
  79690. // Can't use css ellipsis since we need to provide the place for button
  79691. ellipsisConfig.expandable || enableEdit || enableCopy), [mergedEnableEllipsis, ellipsisConfig, enableEdit, enableCopy]);
  79692. (0,useLayoutEffect["default"])(() => {
  79693. if (enableEllipsis && !needMeasureEllipsis) {
  79694. setIsLineClampSupport(isStyleSupport('webkitLineClamp'));
  79695. setIsTextOverflowSupport(isStyleSupport('textOverflow'));
  79696. }
  79697. }, [needMeasureEllipsis, enableEllipsis]);
  79698. const [cssEllipsis, setCssEllipsis] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(mergedEnableEllipsis);
  79699. const canUseCssEllipsis = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  79700. if (needMeasureEllipsis) {
  79701. return false;
  79702. }
  79703. if (rows === 1) {
  79704. return isTextOverflowSupport;
  79705. }
  79706. return isLineClampSupport;
  79707. }, [needMeasureEllipsis, isTextOverflowSupport, isLineClampSupport]);
  79708. // We use effect to change from css ellipsis to js ellipsis.
  79709. // To make SSR still can see the ellipsis.
  79710. (0,useLayoutEffect["default"])(() => {
  79711. setCssEllipsis(canUseCssEllipsis && mergedEnableEllipsis);
  79712. }, [canUseCssEllipsis, mergedEnableEllipsis]);
  79713. const isMergedEllipsis = mergedEnableEllipsis && (cssEllipsis ? isNativeEllipsis : isJsEllipsis);
  79714. const cssTextOverflow = mergedEnableEllipsis && rows === 1 && cssEllipsis;
  79715. const cssLineClamp = mergedEnableEllipsis && rows > 1 && cssEllipsis;
  79716. // >>>>> Expand
  79717. const onExpandClick = (e, info) => {
  79718. var _a;
  79719. setExpanded(info.expanded);
  79720. (_a = ellipsisConfig.onExpand) === null || _a === void 0 ? void 0 : _a.call(ellipsisConfig, e, info);
  79721. };
  79722. const [ellipsisWidth, setEllipsisWidth] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(0);
  79723. const onResize = ({
  79724. offsetWidth
  79725. }) => {
  79726. setEllipsisWidth(offsetWidth);
  79727. };
  79728. // >>>>> JS Ellipsis
  79729. const onJsEllipsis = jsEllipsis => {
  79730. var _a;
  79731. setIsJsEllipsis(jsEllipsis);
  79732. // Trigger if changed
  79733. if (isJsEllipsis !== jsEllipsis) {
  79734. (_a = ellipsisConfig.onEllipsis) === null || _a === void 0 ? void 0 : _a.call(ellipsisConfig, jsEllipsis);
  79735. }
  79736. };
  79737. // >>>>> Native ellipsis
  79738. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  79739. const textEle = typographyRef.current;
  79740. if (enableEllipsis && cssEllipsis && textEle) {
  79741. const currentEllipsis = isEleEllipsis(textEle);
  79742. if (isNativeEllipsis !== currentEllipsis) {
  79743. setIsNativeEllipsis(currentEllipsis);
  79744. }
  79745. }
  79746. }, [enableEllipsis, cssEllipsis, children, cssLineClamp, isNativeVisible, ellipsisWidth]);
  79747. // https://github.com/ant-design/ant-design/issues/36786
  79748. // Use IntersectionObserver to check if element is invisible
  79749. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  79750. const textEle = typographyRef.current;
  79751. if (typeof IntersectionObserver === 'undefined' || !textEle || !cssEllipsis || !mergedEnableEllipsis) {
  79752. return;
  79753. }
  79754. /* eslint-disable-next-line compat/compat */
  79755. const observer = new IntersectionObserver(() => {
  79756. setIsNativeVisible(!!textEle.offsetParent);
  79757. });
  79758. observer.observe(textEle);
  79759. return () => {
  79760. observer.disconnect();
  79761. };
  79762. }, [cssEllipsis, mergedEnableEllipsis]);
  79763. // ========================== Tooltip ===========================
  79764. const tooltipProps = hooks_useTooltipProps(ellipsisConfig.tooltip, editConfig.text, children);
  79765. const topAriaLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  79766. if (!enableEllipsis || cssEllipsis) {
  79767. return undefined;
  79768. }
  79769. return [editConfig.text, children, title, tooltipProps.title].find(isValidText);
  79770. }, [enableEllipsis, cssEllipsis, title, tooltipProps.title, isMergedEllipsis]);
  79771. // =========================== Render ===========================
  79772. // >>>>>>>>>>> Editing input
  79773. if (editing) {
  79774. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Editable, {
  79775. value: (_a = editConfig.text) !== null && _a !== void 0 ? _a : typeof children === 'string' ? children : '',
  79776. onSave: onEditChange,
  79777. onCancel: onEditCancel,
  79778. onEnd: editConfig.onEnd,
  79779. prefixCls: prefixCls,
  79780. className: className,
  79781. style: style,
  79782. direction: direction,
  79783. component: component,
  79784. maxLength: editConfig.maxLength,
  79785. autoSize: editConfig.autoSize,
  79786. enterIcon: editConfig.enterIcon
  79787. });
  79788. }
  79789. // >>>>>>>>>>> Typography
  79790. // Expand
  79791. const renderExpand = () => {
  79792. const {
  79793. expandable,
  79794. symbol
  79795. } = ellipsisConfig;
  79796. return expandable ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  79797. type: "button",
  79798. key: "expand",
  79799. className: `${prefixCls}-${expanded ? 'collapse' : 'expand'}`,
  79800. onClick: e => onExpandClick(e, {
  79801. expanded: !expanded
  79802. }),
  79803. "aria-label": expanded ? textLocale.collapse : textLocale === null || textLocale === void 0 ? void 0 : textLocale.expand
  79804. }, typeof symbol === 'function' ? symbol(expanded) : symbol)) : null;
  79805. };
  79806. // Edit
  79807. const renderEdit = () => {
  79808. if (!enableEdit) {
  79809. return;
  79810. }
  79811. const {
  79812. icon,
  79813. tooltip,
  79814. tabIndex
  79815. } = editConfig;
  79816. const editTitle = (0,toArray["default"])(tooltip)[0] || (textLocale === null || textLocale === void 0 ? void 0 : textLocale.edit);
  79817. const ariaLabel = typeof editTitle === 'string' ? editTitle : '';
  79818. return triggerType.includes('icon') ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
  79819. key: "edit",
  79820. title: tooltip === false ? '' : editTitle
  79821. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("button", {
  79822. type: "button",
  79823. ref: editIconRef,
  79824. className: `${prefixCls}-edit`,
  79825. onClick: onEditClick,
  79826. "aria-label": ariaLabel,
  79827. tabIndex: tabIndex
  79828. }, icon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EditOutlined, {
  79829. role: "button"
  79830. })))) : null;
  79831. };
  79832. // Copy
  79833. const renderCopy = () => {
  79834. if (!enableCopy) {
  79835. return null;
  79836. }
  79837. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Base_CopyBtn, Object.assign({
  79838. key: "copy"
  79839. }, copyConfig, {
  79840. prefixCls: prefixCls,
  79841. copied: copied,
  79842. locale: textLocale,
  79843. onCopy: onCopyClick,
  79844. loading: copyLoading,
  79845. iconOnly: children === null || children === undefined
  79846. }));
  79847. };
  79848. const renderOperations = canEllipsis => [canEllipsis && renderExpand(), renderEdit(), renderCopy()];
  79849. const renderEllipsis = canEllipsis => [canEllipsis && !expanded && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  79850. "aria-hidden": true,
  79851. key: "ellipsis"
  79852. }, ELLIPSIS_STR)), ellipsisConfig.suffix, renderOperations(canEllipsis)];
  79853. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es, {
  79854. onResize: onResize,
  79855. disabled: !mergedEnableEllipsis
  79856. }, resizeRef => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Base_EllipsisTooltip, {
  79857. tooltipProps: tooltipProps,
  79858. enableEllipsis: mergedEnableEllipsis,
  79859. isEllipsis: isMergedEllipsis
  79860. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Typography, Object.assign({
  79861. className: classnames_default()({
  79862. [`${prefixCls}-${type}`]: type,
  79863. [`${prefixCls}-disabled`]: disabled,
  79864. [`${prefixCls}-ellipsis`]: enableEllipsis,
  79865. [`${prefixCls}-ellipsis-single-line`]: cssTextOverflow,
  79866. [`${prefixCls}-ellipsis-multiple-line`]: cssLineClamp
  79867. }, className),
  79868. prefixCls: customizePrefixCls,
  79869. style: Object.assign(Object.assign({}, style), {
  79870. WebkitLineClamp: cssLineClamp ? rows : undefined
  79871. }),
  79872. component: component,
  79873. ref: (0,es_ref.composeRef)(resizeRef, typographyRef, ref),
  79874. direction: direction,
  79875. onClick: triggerType.includes('text') ? onEditClick : undefined,
  79876. "aria-label": topAriaLabel === null || topAriaLabel === void 0 ? void 0 : topAriaLabel.toString(),
  79877. title: title
  79878. }, textProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(EllipsisMeasure, {
  79879. enableMeasure: mergedEnableEllipsis && !cssEllipsis,
  79880. text: children,
  79881. rows: rows,
  79882. width: ellipsisWidth,
  79883. onEllipsis: onJsEllipsis,
  79884. expanded: expanded,
  79885. miscDeps: [copied, expanded, copyLoading, enableEdit, enableCopy, textLocale].concat((0,toConsumableArray["default"])(DECORATION_PROPS.map(key => props[key])))
  79886. }, (node, canEllipsis) => wrapperDecorations(props, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, node.length > 0 && canEllipsis && !expanded && topAriaLabel ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  79887. key: "show-content",
  79888. "aria-hidden": true
  79889. }, node)) : node, renderEllipsis(canEllipsis))))))));
  79890. });
  79891. /* harmony default export */ var typography_Base = (Base);
  79892. ;// ./components/typography/Link.tsx
  79893. var Link_rest = undefined && undefined.__rest || function (s, e) {
  79894. var t = {};
  79895. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  79896. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  79897. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  79898. }
  79899. return t;
  79900. };
  79901. const Link = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_a, ref) => {
  79902. var {
  79903. ellipsis,
  79904. rel
  79905. } = _a,
  79906. restProps = Link_rest(_a, ["ellipsis", "rel"]);
  79907. if (true) {
  79908. const warning = (0,_util_warning.devUseWarning)('Typography.Link');
  79909. true ? warning(typeof ellipsis !== 'object', 'usage', '`ellipsis` only supports boolean value.') : 0;
  79910. }
  79911. const mergedProps = Object.assign(Object.assign({}, restProps), {
  79912. rel: rel === undefined && restProps.target === '_blank' ? 'noopener noreferrer' : rel
  79913. });
  79914. // @ts-expect-error: https://github.com/ant-design/ant-design/issues/26622
  79915. delete mergedProps.navigate;
  79916. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({}, mergedProps, {
  79917. ref: ref,
  79918. ellipsis: !!ellipsis,
  79919. component: "a"
  79920. }));
  79921. });
  79922. /* harmony default export */ var typography_Link = (Link);
  79923. ;// ./components/typography/Paragraph.tsx
  79924. const Paragraph_Paragraph = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({
  79925. ref: ref
  79926. }, props, {
  79927. component: "div"
  79928. }))));
  79929. /* harmony default export */ var typography_Paragraph = (Paragraph_Paragraph);
  79930. ;// ./components/typography/Text.tsx
  79931. var Text_rest = undefined && undefined.__rest || function (s, e) {
  79932. var t = {};
  79933. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  79934. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  79935. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  79936. }
  79937. return t;
  79938. };
  79939. const Text = (_a, ref) => {
  79940. var {
  79941. ellipsis
  79942. } = _a,
  79943. restProps = Text_rest(_a, ["ellipsis"]);
  79944. const mergedEllipsis = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  79945. if (ellipsis && typeof ellipsis === 'object') {
  79946. return (0,omit["default"])(ellipsis, ['expandable', 'rows']);
  79947. }
  79948. return ellipsis;
  79949. }, [ellipsis]);
  79950. if (true) {
  79951. const warning = (0,_util_warning.devUseWarning)('Typography.Text');
  79952. true ? warning(typeof ellipsis !== 'object' || !ellipsis || !('expandable' in ellipsis) && !('rows' in ellipsis), 'usage', '`ellipsis` do not support `expandable` or `rows` props.') : 0;
  79953. }
  79954. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({
  79955. ref: ref
  79956. }, restProps, {
  79957. ellipsis: mergedEllipsis,
  79958. component: "span"
  79959. }));
  79960. };
  79961. /* harmony default export */ var typography_Text = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(Text));
  79962. ;// ./components/typography/Title.tsx
  79963. var Title_rest = undefined && undefined.__rest || function (s, e) {
  79964. var t = {};
  79965. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  79966. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  79967. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  79968. }
  79969. return t;
  79970. };
  79971. const TITLE_ELE_LIST = [1, 2, 3, 4, 5];
  79972. const Title_Title = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
  79973. const {
  79974. level = 1
  79975. } = props,
  79976. restProps = Title_rest(props, ["level"]);
  79977. if (true) {
  79978. const warning = (0,_util_warning.devUseWarning)('Typography.Title');
  79979. true ? warning(TITLE_ELE_LIST.includes(level), 'usage', 'Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.') : 0;
  79980. }
  79981. const component = TITLE_ELE_LIST.includes(level) ? `h${level}` : `h1`;
  79982. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(typography_Base, Object.assign({
  79983. ref: ref
  79984. }, restProps, {
  79985. component: component
  79986. }));
  79987. });
  79988. /* harmony default export */ var typography_Title = (Title_Title);
  79989. ;// ./components/typography/index.tsx
  79990. const components_typography_Typography = typography_Typography;
  79991. components_typography_Typography.Text = typography_Text;
  79992. components_typography_Typography.Link = typography_Link;
  79993. components_typography_Typography.Title = typography_Title;
  79994. components_typography_Typography.Paragraph = typography_Paragraph;
  79995. /* harmony default export */ var typography = (components_typography_Typography);
  79996. ;// ./node_modules/rc-upload/es/attr-accept.js
  79997. /* harmony default export */ var attr_accept = (function (file, acceptedFiles) {
  79998. if (file && acceptedFiles) {
  79999. var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
  80000. var fileName = file.name || '';
  80001. var mimeType = file.type || '';
  80002. var baseMimeType = mimeType.replace(/\/.*$/, '');
  80003. return acceptedFilesArray.some(function (type) {
  80004. var validType = type.trim();
  80005. // This is something like */*,* allow all files
  80006. if (/^\*(\/\*)?$/.test(type)) {
  80007. return true;
  80008. }
  80009. // like .jpg, .png
  80010. if (validType.charAt(0) === '.') {
  80011. var lowerFileName = fileName.toLowerCase();
  80012. var lowerType = validType.toLowerCase();
  80013. var affixList = [lowerType];
  80014. if (lowerType === '.jpg' || lowerType === '.jpeg') {
  80015. affixList = ['.jpg', '.jpeg'];
  80016. }
  80017. return affixList.some(function (affix) {
  80018. return lowerFileName.endsWith(affix);
  80019. });
  80020. }
  80021. // This is something like a image/* mime type
  80022. if (/\/\*$/.test(validType)) {
  80023. return baseMimeType === validType.replace(/\/.*$/, '');
  80024. }
  80025. // Full match
  80026. if (mimeType === validType) {
  80027. return true;
  80028. }
  80029. // Invalidate type should skip
  80030. if (/^\w+$/.test(validType)) {
  80031. (0,warning["default"])(false, "Upload takes an invalidate 'accept' type '".concat(validType, "'.Skip for check."));
  80032. return true;
  80033. }
  80034. return false;
  80035. });
  80036. }
  80037. return true;
  80038. });
  80039. ;// ./node_modules/rc-upload/es/request.js
  80040. function getError(option, xhr) {
  80041. var msg = "cannot ".concat(option.method, " ").concat(option.action, " ").concat(xhr.status, "'");
  80042. var err = new Error(msg);
  80043. err.status = xhr.status;
  80044. err.method = option.method;
  80045. err.url = option.action;
  80046. return err;
  80047. }
  80048. function getBody(xhr) {
  80049. var text = xhr.responseText || xhr.response;
  80050. if (!text) {
  80051. return text;
  80052. }
  80053. try {
  80054. return JSON.parse(text);
  80055. } catch (e) {
  80056. return text;
  80057. }
  80058. }
  80059. function upload(option) {
  80060. // eslint-disable-next-line no-undef
  80061. var xhr = new XMLHttpRequest();
  80062. if (option.onProgress && xhr.upload) {
  80063. xhr.upload.onprogress = function progress(e) {
  80064. if (e.total > 0) {
  80065. e.percent = e.loaded / e.total * 100;
  80066. }
  80067. option.onProgress(e);
  80068. };
  80069. }
  80070. // eslint-disable-next-line no-undef
  80071. var formData = new FormData();
  80072. if (option.data) {
  80073. Object.keys(option.data).forEach(function (key) {
  80074. var value = option.data[key];
  80075. // support key-value array data
  80076. if (Array.isArray(value)) {
  80077. value.forEach(function (item) {
  80078. // { list: [ 11, 22 ] }
  80079. // formData.append('list[]', 11);
  80080. formData.append("".concat(key, "[]"), item);
  80081. });
  80082. return;
  80083. }
  80084. formData.append(key, value);
  80085. });
  80086. }
  80087. // eslint-disable-next-line no-undef
  80088. if (option.file instanceof Blob) {
  80089. formData.append(option.filename, option.file, option.file.name);
  80090. } else {
  80091. formData.append(option.filename, option.file);
  80092. }
  80093. xhr.onerror = function error(e) {
  80094. option.onError(e);
  80095. };
  80096. xhr.onload = function onload() {
  80097. // allow success when 2xx status
  80098. // see https://github.com/react-component/upload/issues/34
  80099. if (xhr.status < 200 || xhr.status >= 300) {
  80100. return option.onError(getError(option, xhr), getBody(xhr));
  80101. }
  80102. return option.onSuccess(getBody(xhr), xhr);
  80103. };
  80104. xhr.open(option.method, option.action, true);
  80105. // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
  80106. if (option.withCredentials && 'withCredentials' in xhr) {
  80107. xhr.withCredentials = true;
  80108. }
  80109. var headers = option.headers || {};
  80110. // when set headers['X-Requested-With'] = null , can close default XHR header
  80111. // see https://github.com/react-component/upload/issues/33
  80112. if (headers['X-Requested-With'] !== null) {
  80113. xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  80114. }
  80115. Object.keys(headers).forEach(function (h) {
  80116. if (headers[h] !== null) {
  80117. xhr.setRequestHeader(h, headers[h]);
  80118. }
  80119. });
  80120. xhr.send(formData);
  80121. return {
  80122. abort: function abort() {
  80123. xhr.abort();
  80124. }
  80125. };
  80126. }
  80127. ;// ./node_modules/rc-upload/es/traverseFileTree.js
  80128. // https://github.com/ant-design/ant-design/issues/50080
  80129. var traverseFileTree = /*#__PURE__*/function () {
  80130. var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(files, isAccepted) {
  80131. var flattenFileList, progressFileList, readDirectory, _readDirectory, readFile, _readFile, _traverseFileTree, wipIndex;
  80132. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  80133. while (1) switch (_context4.prev = _context4.next) {
  80134. case 0:
  80135. _readFile = function _readFile3() {
  80136. _readFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(item) {
  80137. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  80138. while (1) switch (_context3.prev = _context3.next) {
  80139. case 0:
  80140. return _context3.abrupt("return", new Promise(function (reslove) {
  80141. item.file(function (file) {
  80142. if (isAccepted(file)) {
  80143. // https://github.com/ant-design/ant-design/issues/16426
  80144. if (item.fullPath && !file.webkitRelativePath) {
  80145. Object.defineProperties(file, {
  80146. webkitRelativePath: {
  80147. writable: true
  80148. }
  80149. });
  80150. // eslint-disable-next-line no-param-reassign
  80151. file.webkitRelativePath = item.fullPath.replace(/^\//, '');
  80152. Object.defineProperties(file, {
  80153. webkitRelativePath: {
  80154. writable: false
  80155. }
  80156. });
  80157. }
  80158. reslove(file);
  80159. } else {
  80160. reslove(null);
  80161. }
  80162. });
  80163. }));
  80164. case 1:
  80165. case "end":
  80166. return _context3.stop();
  80167. }
  80168. }, _callee3);
  80169. }));
  80170. return _readFile.apply(this, arguments);
  80171. };
  80172. readFile = function _readFile2(_x4) {
  80173. return _readFile.apply(this, arguments);
  80174. };
  80175. _readDirectory = function _readDirectory3() {
  80176. _readDirectory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(directory) {
  80177. var dirReader, entries, results, n, i;
  80178. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  80179. while (1) switch (_context2.prev = _context2.next) {
  80180. case 0:
  80181. dirReader = directory.createReader();
  80182. entries = [];
  80183. case 2:
  80184. if (false) // removed by dead control flow
  80185. {}
  80186. _context2.next = 5;
  80187. return new Promise(function (resolve) {
  80188. dirReader.readEntries(resolve, function () {
  80189. return resolve([]);
  80190. });
  80191. });
  80192. case 5:
  80193. results = _context2.sent;
  80194. n = results.length;
  80195. if (n) {
  80196. _context2.next = 9;
  80197. break;
  80198. }
  80199. return _context2.abrupt("break", 12);
  80200. case 9:
  80201. for (i = 0; i < n; i++) {
  80202. entries.push(results[i]);
  80203. }
  80204. _context2.next = 2;
  80205. break;
  80206. case 12:
  80207. return _context2.abrupt("return", entries);
  80208. case 13:
  80209. case "end":
  80210. return _context2.stop();
  80211. }
  80212. }, _callee2);
  80213. }));
  80214. return _readDirectory.apply(this, arguments);
  80215. };
  80216. readDirectory = function _readDirectory2(_x3) {
  80217. return _readDirectory.apply(this, arguments);
  80218. };
  80219. flattenFileList = [];
  80220. progressFileList = [];
  80221. files.forEach(function (file) {
  80222. return progressFileList.push(file.webkitGetAsEntry());
  80223. });
  80224. // eslint-disable-next-line @typescript-eslint/naming-convention
  80225. _traverseFileTree = /*#__PURE__*/function () {
  80226. var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item, path) {
  80227. var _file, entries;
  80228. return _regeneratorRuntime().wrap(function _callee$(_context) {
  80229. while (1) switch (_context.prev = _context.next) {
  80230. case 0:
  80231. if (item) {
  80232. _context.next = 2;
  80233. break;
  80234. }
  80235. return _context.abrupt("return");
  80236. case 2:
  80237. // eslint-disable-next-line no-param-reassign
  80238. item.path = path || '';
  80239. if (!item.isFile) {
  80240. _context.next = 10;
  80241. break;
  80242. }
  80243. _context.next = 6;
  80244. return readFile(item);
  80245. case 6:
  80246. _file = _context.sent;
  80247. if (_file) {
  80248. flattenFileList.push(_file);
  80249. }
  80250. _context.next = 15;
  80251. break;
  80252. case 10:
  80253. if (!item.isDirectory) {
  80254. _context.next = 15;
  80255. break;
  80256. }
  80257. _context.next = 13;
  80258. return readDirectory(item);
  80259. case 13:
  80260. entries = _context.sent;
  80261. progressFileList.push.apply(progressFileList, (0,toConsumableArray["default"])(entries));
  80262. case 15:
  80263. case "end":
  80264. return _context.stop();
  80265. }
  80266. }, _callee);
  80267. }));
  80268. return function _traverseFileTree(_x5, _x6) {
  80269. return _ref2.apply(this, arguments);
  80270. };
  80271. }();
  80272. wipIndex = 0;
  80273. case 9:
  80274. if (!(wipIndex < progressFileList.length)) {
  80275. _context4.next = 15;
  80276. break;
  80277. }
  80278. _context4.next = 12;
  80279. return _traverseFileTree(progressFileList[wipIndex]);
  80280. case 12:
  80281. wipIndex++;
  80282. _context4.next = 9;
  80283. break;
  80284. case 15:
  80285. return _context4.abrupt("return", flattenFileList);
  80286. case 16:
  80287. case "end":
  80288. return _context4.stop();
  80289. }
  80290. }, _callee4);
  80291. }));
  80292. return function traverseFileTree(_x, _x2) {
  80293. return _ref.apply(this, arguments);
  80294. };
  80295. }();
  80296. /* harmony default export */ var es_traverseFileTree = (traverseFileTree);
  80297. ;// ./node_modules/rc-upload/es/uid.js
  80298. var now = +new Date();
  80299. var uid_index = 0;
  80300. function uid_uid() {
  80301. // eslint-disable-next-line no-plusplus
  80302. return "rc-upload-".concat(now, "-").concat(++uid_index);
  80303. }
  80304. ;// ./node_modules/rc-upload/es/AjaxUploader.js
  80305. var AjaxUploader_excluded = ["component", "prefixCls", "className", "classNames", "disabled", "id", "name", "style", "styles", "multiple", "accept", "capture", "children", "directory", "openFileDialogOnClick", "onMouseEnter", "onMouseLeave", "hasControlInside"];
  80306. /* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */
  80307. var AjaxUploader = /*#__PURE__*/function (_Component) {
  80308. (0,inherits["default"])(AjaxUploader, _Component);
  80309. var _super = (0,createSuper["default"])(AjaxUploader);
  80310. function AjaxUploader() {
  80311. var _this;
  80312. (0,classCallCheck["default"])(this, AjaxUploader);
  80313. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  80314. args[_key] = arguments[_key];
  80315. }
  80316. _this = _super.call.apply(_super, [this].concat(args));
  80317. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
  80318. uid: uid_uid()
  80319. });
  80320. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "reqs", {});
  80321. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "fileInput", void 0);
  80322. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "_isMounted", void 0);
  80323. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onChange", function (e) {
  80324. var _this$props = _this.props,
  80325. accept = _this$props.accept,
  80326. directory = _this$props.directory;
  80327. var files = e.target.files;
  80328. var acceptedFiles = (0,toConsumableArray["default"])(files).filter(function (file) {
  80329. return !directory || attr_accept(file, accept);
  80330. });
  80331. _this.uploadFiles(acceptedFiles);
  80332. _this.reset();
  80333. });
  80334. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onClick", function (event) {
  80335. var el = _this.fileInput;
  80336. if (!el) {
  80337. return;
  80338. }
  80339. var target = event.target;
  80340. var onClick = _this.props.onClick;
  80341. if (target && target.tagName === 'BUTTON') {
  80342. var parent = el.parentNode;
  80343. parent.focus();
  80344. target.blur();
  80345. }
  80346. el.click();
  80347. if (onClick) {
  80348. onClick(event);
  80349. }
  80350. });
  80351. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onKeyDown", function (e) {
  80352. if (e.key === 'Enter') {
  80353. _this.onClick(e);
  80354. }
  80355. });
  80356. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onDataTransferFiles", /*#__PURE__*/function () {
  80357. var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dataTransfer, existFileCallback) {
  80358. var _this$props2, multiple, accept, directory, items, files, acceptFiles;
  80359. return _regeneratorRuntime().wrap(function _callee$(_context) {
  80360. while (1) switch (_context.prev = _context.next) {
  80361. case 0:
  80362. _this$props2 = _this.props, multiple = _this$props2.multiple, accept = _this$props2.accept, directory = _this$props2.directory;
  80363. items = (0,toConsumableArray["default"])(dataTransfer.items || []);
  80364. files = (0,toConsumableArray["default"])(dataTransfer.files || []);
  80365. if (files.length > 0 || items.some(function (item) {
  80366. return item.kind === 'file';
  80367. })) {
  80368. existFileCallback === null || existFileCallback === void 0 || existFileCallback();
  80369. }
  80370. if (!directory) {
  80371. _context.next = 11;
  80372. break;
  80373. }
  80374. _context.next = 7;
  80375. return es_traverseFileTree(Array.prototype.slice.call(items), function (_file) {
  80376. return attr_accept(_file, _this.props.accept);
  80377. });
  80378. case 7:
  80379. files = _context.sent;
  80380. _this.uploadFiles(files);
  80381. _context.next = 14;
  80382. break;
  80383. case 11:
  80384. acceptFiles = (0,toConsumableArray["default"])(files).filter(function (file) {
  80385. return attr_accept(file, accept);
  80386. });
  80387. if (multiple === false) {
  80388. acceptFiles = files.slice(0, 1);
  80389. }
  80390. _this.uploadFiles(acceptFiles);
  80391. case 14:
  80392. case "end":
  80393. return _context.stop();
  80394. }
  80395. }, _callee);
  80396. }));
  80397. return function (_x, _x2) {
  80398. return _ref.apply(this, arguments);
  80399. };
  80400. }());
  80401. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onFilePaste", /*#__PURE__*/function () {
  80402. var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
  80403. var pastable, clipboardData;
  80404. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  80405. while (1) switch (_context2.prev = _context2.next) {
  80406. case 0:
  80407. pastable = _this.props.pastable;
  80408. if (pastable) {
  80409. _context2.next = 3;
  80410. break;
  80411. }
  80412. return _context2.abrupt("return");
  80413. case 3:
  80414. if (!(e.type === 'paste')) {
  80415. _context2.next = 6;
  80416. break;
  80417. }
  80418. clipboardData = e.clipboardData;
  80419. return _context2.abrupt("return", _this.onDataTransferFiles(clipboardData, function () {
  80420. e.preventDefault();
  80421. }));
  80422. case 6:
  80423. case "end":
  80424. return _context2.stop();
  80425. }
  80426. }, _callee2);
  80427. }));
  80428. return function (_x3) {
  80429. return _ref2.apply(this, arguments);
  80430. };
  80431. }());
  80432. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onFileDragOver", function (e) {
  80433. e.preventDefault();
  80434. });
  80435. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "onFileDrop", /*#__PURE__*/function () {
  80436. var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
  80437. var dataTransfer;
  80438. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  80439. while (1) switch (_context3.prev = _context3.next) {
  80440. case 0:
  80441. e.preventDefault();
  80442. if (!(e.type === 'drop')) {
  80443. _context3.next = 4;
  80444. break;
  80445. }
  80446. dataTransfer = e.dataTransfer;
  80447. return _context3.abrupt("return", _this.onDataTransferFiles(dataTransfer));
  80448. case 4:
  80449. case "end":
  80450. return _context3.stop();
  80451. }
  80452. }, _callee3);
  80453. }));
  80454. return function (_x4) {
  80455. return _ref3.apply(this, arguments);
  80456. };
  80457. }());
  80458. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "uploadFiles", function (files) {
  80459. var originFiles = (0,toConsumableArray["default"])(files);
  80460. var postFiles = originFiles.map(function (file) {
  80461. // eslint-disable-next-line no-param-reassign
  80462. file.uid = uid_uid();
  80463. return _this.processFile(file, originFiles);
  80464. });
  80465. // Batch upload files
  80466. Promise.all(postFiles).then(function (fileList) {
  80467. var onBatchStart = _this.props.onBatchStart;
  80468. onBatchStart === null || onBatchStart === void 0 || onBatchStart(fileList.map(function (_ref4) {
  80469. var origin = _ref4.origin,
  80470. parsedFile = _ref4.parsedFile;
  80471. return {
  80472. file: origin,
  80473. parsedFile: parsedFile
  80474. };
  80475. }));
  80476. fileList.filter(function (file) {
  80477. return file.parsedFile !== null;
  80478. }).forEach(function (file) {
  80479. _this.post(file);
  80480. });
  80481. });
  80482. });
  80483. /**
  80484. * Process file before upload. When all the file is ready, we start upload.
  80485. */
  80486. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "processFile", /*#__PURE__*/function () {
  80487. var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(file, fileList) {
  80488. var beforeUpload, transformedFile, action, mergedAction, data, mergedData, parsedData, parsedFile, mergedParsedFile;
  80489. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  80490. while (1) switch (_context4.prev = _context4.next) {
  80491. case 0:
  80492. beforeUpload = _this.props.beforeUpload;
  80493. transformedFile = file;
  80494. if (!beforeUpload) {
  80495. _context4.next = 14;
  80496. break;
  80497. }
  80498. _context4.prev = 3;
  80499. _context4.next = 6;
  80500. return beforeUpload(file, fileList);
  80501. case 6:
  80502. transformedFile = _context4.sent;
  80503. _context4.next = 12;
  80504. break;
  80505. case 9:
  80506. _context4.prev = 9;
  80507. _context4.t0 = _context4["catch"](3);
  80508. // Rejection will also trade as false
  80509. transformedFile = false;
  80510. case 12:
  80511. if (!(transformedFile === false)) {
  80512. _context4.next = 14;
  80513. break;
  80514. }
  80515. return _context4.abrupt("return", {
  80516. origin: file,
  80517. parsedFile: null,
  80518. action: null,
  80519. data: null
  80520. });
  80521. case 14:
  80522. // Get latest action
  80523. action = _this.props.action;
  80524. if (!(typeof action === 'function')) {
  80525. _context4.next = 21;
  80526. break;
  80527. }
  80528. _context4.next = 18;
  80529. return action(file);
  80530. case 18:
  80531. mergedAction = _context4.sent;
  80532. _context4.next = 22;
  80533. break;
  80534. case 21:
  80535. mergedAction = action;
  80536. case 22:
  80537. // Get latest data
  80538. data = _this.props.data;
  80539. if (!(typeof data === 'function')) {
  80540. _context4.next = 29;
  80541. break;
  80542. }
  80543. _context4.next = 26;
  80544. return data(file);
  80545. case 26:
  80546. mergedData = _context4.sent;
  80547. _context4.next = 30;
  80548. break;
  80549. case 29:
  80550. mergedData = data;
  80551. case 30:
  80552. parsedData =
  80553. // string type is from legacy `transformFile`.
  80554. // Not sure if this will work since no related test case works with it
  80555. ((0,esm_typeof["default"])(transformedFile) === 'object' || typeof transformedFile === 'string') && transformedFile ? transformedFile : file;
  80556. if (parsedData instanceof File) {
  80557. parsedFile = parsedData;
  80558. } else {
  80559. parsedFile = new File([parsedData], file.name, {
  80560. type: file.type
  80561. });
  80562. }
  80563. mergedParsedFile = parsedFile;
  80564. mergedParsedFile.uid = file.uid;
  80565. return _context4.abrupt("return", {
  80566. origin: file,
  80567. data: mergedData,
  80568. parsedFile: mergedParsedFile,
  80569. action: mergedAction
  80570. });
  80571. case 35:
  80572. case "end":
  80573. return _context4.stop();
  80574. }
  80575. }, _callee4, null, [[3, 9]]);
  80576. }));
  80577. return function (_x5, _x6) {
  80578. return _ref5.apply(this, arguments);
  80579. };
  80580. }());
  80581. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "saveFileInput", function (node) {
  80582. _this.fileInput = node;
  80583. });
  80584. return _this;
  80585. }
  80586. (0,createClass["default"])(AjaxUploader, [{
  80587. key: "componentDidMount",
  80588. value: function componentDidMount() {
  80589. this._isMounted = true;
  80590. var pastable = this.props.pastable;
  80591. if (pastable) {
  80592. document.addEventListener('paste', this.onFilePaste);
  80593. }
  80594. }
  80595. }, {
  80596. key: "componentWillUnmount",
  80597. value: function componentWillUnmount() {
  80598. this._isMounted = false;
  80599. this.abort();
  80600. document.removeEventListener('paste', this.onFilePaste);
  80601. }
  80602. }, {
  80603. key: "componentDidUpdate",
  80604. value: function componentDidUpdate(prevProps) {
  80605. var pastable = this.props.pastable;
  80606. if (pastable && !prevProps.pastable) {
  80607. document.addEventListener('paste', this.onFilePaste);
  80608. } else if (!pastable && prevProps.pastable) {
  80609. document.removeEventListener('paste', this.onFilePaste);
  80610. }
  80611. }
  80612. }, {
  80613. key: "post",
  80614. value: function post(_ref6) {
  80615. var _this2 = this;
  80616. var data = _ref6.data,
  80617. origin = _ref6.origin,
  80618. action = _ref6.action,
  80619. parsedFile = _ref6.parsedFile;
  80620. if (!this._isMounted) {
  80621. return;
  80622. }
  80623. var _this$props3 = this.props,
  80624. onStart = _this$props3.onStart,
  80625. customRequest = _this$props3.customRequest,
  80626. name = _this$props3.name,
  80627. headers = _this$props3.headers,
  80628. withCredentials = _this$props3.withCredentials,
  80629. method = _this$props3.method;
  80630. var uid = origin.uid;
  80631. var request = customRequest || upload;
  80632. var requestOption = {
  80633. action: action,
  80634. filename: name,
  80635. data: data,
  80636. file: parsedFile,
  80637. headers: headers,
  80638. withCredentials: withCredentials,
  80639. method: method || 'post',
  80640. onProgress: function onProgress(e) {
  80641. var onProgress = _this2.props.onProgress;
  80642. onProgress === null || onProgress === void 0 || onProgress(e, parsedFile);
  80643. },
  80644. onSuccess: function onSuccess(ret, xhr) {
  80645. var onSuccess = _this2.props.onSuccess;
  80646. onSuccess === null || onSuccess === void 0 || onSuccess(ret, parsedFile, xhr);
  80647. delete _this2.reqs[uid];
  80648. },
  80649. onError: function onError(err, ret) {
  80650. var onError = _this2.props.onError;
  80651. onError === null || onError === void 0 || onError(err, ret, parsedFile);
  80652. delete _this2.reqs[uid];
  80653. }
  80654. };
  80655. onStart(origin);
  80656. this.reqs[uid] = request(requestOption);
  80657. }
  80658. }, {
  80659. key: "reset",
  80660. value: function reset() {
  80661. this.setState({
  80662. uid: uid_uid()
  80663. });
  80664. }
  80665. }, {
  80666. key: "abort",
  80667. value: function abort(file) {
  80668. var reqs = this.reqs;
  80669. if (file) {
  80670. var uid = file.uid ? file.uid : file;
  80671. if (reqs[uid] && reqs[uid].abort) {
  80672. reqs[uid].abort();
  80673. }
  80674. delete reqs[uid];
  80675. } else {
  80676. Object.keys(reqs).forEach(function (uid) {
  80677. if (reqs[uid] && reqs[uid].abort) {
  80678. reqs[uid].abort();
  80679. }
  80680. delete reqs[uid];
  80681. });
  80682. }
  80683. }
  80684. }, {
  80685. key: "render",
  80686. value: function render() {
  80687. var _this$props4 = this.props,
  80688. Tag = _this$props4.component,
  80689. prefixCls = _this$props4.prefixCls,
  80690. className = _this$props4.className,
  80691. _this$props4$classNam = _this$props4.classNames,
  80692. classNames = _this$props4$classNam === void 0 ? {} : _this$props4$classNam,
  80693. disabled = _this$props4.disabled,
  80694. id = _this$props4.id,
  80695. name = _this$props4.name,
  80696. style = _this$props4.style,
  80697. _this$props4$styles = _this$props4.styles,
  80698. styles = _this$props4$styles === void 0 ? {} : _this$props4$styles,
  80699. multiple = _this$props4.multiple,
  80700. accept = _this$props4.accept,
  80701. capture = _this$props4.capture,
  80702. children = _this$props4.children,
  80703. directory = _this$props4.directory,
  80704. openFileDialogOnClick = _this$props4.openFileDialogOnClick,
  80705. onMouseEnter = _this$props4.onMouseEnter,
  80706. onMouseLeave = _this$props4.onMouseLeave,
  80707. hasControlInside = _this$props4.hasControlInside,
  80708. otherProps = (0,objectWithoutProperties["default"])(_this$props4, AjaxUploader_excluded);
  80709. var cls = classnames_default()((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, prefixCls, true), "".concat(prefixCls, "-disabled"), disabled), className, className));
  80710. // because input don't have directory/webkitdirectory type declaration
  80711. var dirProps = directory ? {
  80712. directory: 'directory',
  80713. webkitdirectory: 'webkitdirectory'
  80714. } : {};
  80715. var events = disabled ? {} : {
  80716. onClick: openFileDialogOnClick ? this.onClick : function () {},
  80717. onKeyDown: openFileDialogOnClick ? this.onKeyDown : function () {},
  80718. onMouseEnter: onMouseEnter,
  80719. onMouseLeave: onMouseLeave,
  80720. onDrop: this.onFileDrop,
  80721. onDragOver: this.onFileDragOver,
  80722. tabIndex: hasControlInside ? undefined : '0'
  80723. };
  80724. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, (0,esm_extends["default"])({}, events, {
  80725. className: cls,
  80726. role: hasControlInside ? undefined : 'button',
  80727. style: style
  80728. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", (0,esm_extends["default"])({}, (0,pickAttrs["default"])(otherProps, {
  80729. aria: true,
  80730. data: true
  80731. }), {
  80732. id: id
  80733. /**
  80734. * https://github.com/ant-design/ant-design/issues/50643,
  80735. * https://github.com/react-component/upload/pull/575#issuecomment-2320646552
  80736. */,
  80737. name: name,
  80738. disabled: disabled,
  80739. type: "file",
  80740. ref: this.saveFileInput,
  80741. onClick: function onClick(e) {
  80742. return e.stopPropagation();
  80743. } // https://github.com/ant-design/ant-design/issues/19948
  80744. ,
  80745. key: this.state.uid,
  80746. style: (0,objectSpread2["default"])({
  80747. display: 'none'
  80748. }, styles.input),
  80749. className: classNames.input,
  80750. accept: accept
  80751. }, dirProps, {
  80752. multiple: multiple,
  80753. onChange: this.onChange
  80754. }, capture != null ? {
  80755. capture: capture
  80756. } : {})), children);
  80757. }
  80758. }]);
  80759. return AjaxUploader;
  80760. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  80761. /* harmony default export */ var es_AjaxUploader = (AjaxUploader);
  80762. ;// ./node_modules/rc-upload/es/Upload.js
  80763. /* eslint react/prop-types:0 */
  80764. function Upload_empty() {}
  80765. var Upload = /*#__PURE__*/function (_Component) {
  80766. (0,inherits["default"])(Upload, _Component);
  80767. var _super = (0,createSuper["default"])(Upload);
  80768. function Upload() {
  80769. var _this;
  80770. (0,classCallCheck["default"])(this, Upload);
  80771. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  80772. args[_key] = arguments[_key];
  80773. }
  80774. _this = _super.call.apply(_super, [this].concat(args));
  80775. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "uploader", void 0);
  80776. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "saveUploader", function (node) {
  80777. _this.uploader = node;
  80778. });
  80779. return _this;
  80780. }
  80781. (0,createClass["default"])(Upload, [{
  80782. key: "abort",
  80783. value: function abort(file) {
  80784. this.uploader.abort(file);
  80785. }
  80786. }, {
  80787. key: "render",
  80788. value: function render() {
  80789. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es_AjaxUploader, (0,esm_extends["default"])({}, this.props, {
  80790. ref: this.saveUploader
  80791. }));
  80792. }
  80793. }]);
  80794. return Upload;
  80795. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  80796. (0,defineProperty["default"])(Upload, "defaultProps", {
  80797. component: 'span',
  80798. prefixCls: 'rc-upload',
  80799. data: {},
  80800. headers: {},
  80801. name: 'file',
  80802. multipart: false,
  80803. onStart: Upload_empty,
  80804. onError: Upload_empty,
  80805. onSuccess: Upload_empty,
  80806. multiple: false,
  80807. beforeUpload: null,
  80808. customRequest: null,
  80809. withCredentials: false,
  80810. openFileDialogOnClick: true,
  80811. hasControlInside: false
  80812. });
  80813. /* harmony default export */ var es_Upload = (Upload);
  80814. ;// ./node_modules/rc-upload/es/index.js
  80815. /* harmony default export */ var rc_upload_es = (es_Upload);
  80816. // EXTERNAL MODULE: ./components/upload/style/index.ts + 5 modules
  80817. var upload_style = __webpack_require__("./components/upload/style/index.ts");
  80818. ;// ./node_modules/@ant-design/icons-svg/es/asn/FileTwoTone.js
  80819. // This icon file is generated automatically.
  80820. var FileTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M534 352V136H232v752h560V394H576a42 42 0 01-42-42z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z", "fill": primaryColor } }] }; }, "name": "file", "theme": "twotone" };
  80821. /* harmony default export */ var asn_FileTwoTone = (FileTwoTone);
  80822. ;// ./node_modules/@ant-design/icons/es/icons/FileTwoTone.js
  80823. // GENERATE BY ./scripts/generate.ts
  80824. // DON NOT EDIT IT MANUALLY
  80825. var FileTwoTone_FileTwoTone = function FileTwoTone(props, ref) {
  80826. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  80827. ref: ref,
  80828. icon: asn_FileTwoTone
  80829. }));
  80830. };
  80831. /**![file](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUzNCAzNTJWMTM2SDIzMnY3NTJoNTYwVjM5NEg1NzZhNDIgNDIgMCAwMS00Mi00MnoiIGZpbGw9IiNlNmY0ZmYiIC8+PHBhdGggZD0iTTg1NC42IDI4OC42TDYzOS40IDczLjRjLTYtNi0xNC4xLTkuNC0yMi42LTkuNEgxOTJjLTE3LjcgMC0zMiAxNC4zLTMyIDMydjgzMmMwIDE3LjcgMTQuMyAzMiAzMiAzMmg2NDBjMTcuNyAwIDMyLTE0LjMgMzItMzJWMzExLjNjMC04LjUtMy40LTE2LjctOS40LTIyLjd6TTYwMiAxMzcuOEw3OTAuMiAzMjZINjAyVjEzNy44ek03OTIgODg4SDIzMlYxMzZoMzAydjIxNmE0MiA0MiAwIDAwNDIgNDJoMjE2djQ5NHoiIGZpbGw9IiMxNjc3ZmYiIC8+PC9zdmc+) */
  80832. var FileTwoTone_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(FileTwoTone_FileTwoTone);
  80833. if (true) {
  80834. FileTwoTone_RefIcon.displayName = 'FileTwoTone';
  80835. }
  80836. /* harmony default export */ var icons_FileTwoTone = (FileTwoTone_RefIcon);
  80837. ;// ./node_modules/@ant-design/icons-svg/es/asn/PaperClipOutlined.js
  80838. // This icon file is generated automatically.
  80839. var PaperClipOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z" } }] }, "name": "paper-clip", "theme": "outlined" };
  80840. /* harmony default export */ var asn_PaperClipOutlined = (PaperClipOutlined);
  80841. ;// ./node_modules/@ant-design/icons/es/icons/PaperClipOutlined.js
  80842. // GENERATE BY ./scripts/generate.ts
  80843. // DON NOT EDIT IT MANUALLY
  80844. var PaperClipOutlined_PaperClipOutlined = function PaperClipOutlined(props, ref) {
  80845. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  80846. ref: ref,
  80847. icon: asn_PaperClipOutlined
  80848. }));
  80849. };
  80850. /**![paper-clip](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTc3OS4zIDE5Ni42Yy05NC4yLTk0LjItMjQ3LjYtOTQuMi0zNDEuNyAwbC0yNjEgMjYwLjhjLTEuNyAxLjctMi42IDQtMi42IDYuNHMuOSA0LjcgMi42IDYuNGwzNi45IDM2LjlhOSA5IDAgMDAxMi43IDBsMjYxLTI2MC44YzMyLjQtMzIuNCA3NS41LTUwLjIgMTIxLjMtNTAuMnM4OC45IDE3LjggMTIxLjIgNTAuMmMzMi40IDMyLjQgNTAuMiA3NS41IDUwLjIgMTIxLjIgMCA0NS44LTE3LjggODguOC01MC4yIDEyMS4ybC0yNjYgMjY1LjktNDMuMSA0My4xYy00MC4zIDQwLjMtMTA1LjggNDAuMy0xNDYuMSAwLTE5LjUtMTkuNS0zMC4yLTQ1LjQtMzAuMi03M3MxMC43LTUzLjUgMzAuMi03M2wyNjMuOS0yNjMuOGM2LjctNi42IDE1LjUtMTAuMyAyNC45LTEwLjNoLjFjOS40IDAgMTguMSAzLjcgMjQuNyAxMC4zIDYuNyA2LjcgMTAuMyAxNS41IDEwLjMgMjQuOSAwIDkuMy0zLjcgMTguMS0xMC4zIDI0LjdMMzcyLjQgNjUzYy0xLjcgMS43LTIuNiA0LTIuNiA2LjRzLjkgNC43IDIuNiA2LjRsMzYuOSAzNi45YTkgOSAwIDAwMTIuNyAwbDIxNS42LTIxNS42YzE5LjktMTkuOSAzMC44LTQ2LjMgMzAuOC03NC40cy0xMS01NC42LTMwLjgtNzQuNGMtNDEuMS00MS4xLTEwNy45LTQxLTE0OSAwTDQ2MyAzNjQgMjI0LjggNjAyLjFBMTcyLjIyIDE3Mi4yMiAwIDAwMTc0IDcyNC44YzAgNDYuMyAxOC4xIDg5LjggNTAuOCAxMjIuNSAzMy45IDMzLjggNzguMyA1MC43IDEyMi43IDUwLjcgNDQuNCAwIDg4LjgtMTYuOSAxMjIuNi01MC43bDMwOS4yLTMwOUM4MjQuOCA0OTIuNyA4NTAgNDMyIDg1MCAzNjcuNWMuMS02NC42LTI1LjEtMTI1LjMtNzAuNy0xNzAuOXoiIC8+PC9zdmc+) */
  80851. var PaperClipOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PaperClipOutlined_PaperClipOutlined);
  80852. if (true) {
  80853. PaperClipOutlined_RefIcon.displayName = 'PaperClipOutlined';
  80854. }
  80855. /* harmony default export */ var icons_PaperClipOutlined = (PaperClipOutlined_RefIcon);
  80856. ;// ./node_modules/@ant-design/icons-svg/es/asn/PictureTwoTone.js
  80857. // This icon file is generated automatically.
  80858. var PictureTwoTone = { "icon": function render(primaryColor, secondaryColor) { return { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z", "fill": primaryColor } }, { "tag": "path", "attrs": { "d": "M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M276 368a28 28 0 1056 0 28 28 0 10-56 0z", "fill": secondaryColor } }, { "tag": "path", "attrs": { "d": "M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z", "fill": primaryColor } }] }; }, "name": "picture", "theme": "twotone" };
  80859. /* harmony default export */ var asn_PictureTwoTone = (PictureTwoTone);
  80860. ;// ./node_modules/@ant-design/icons/es/icons/PictureTwoTone.js
  80861. // GENERATE BY ./scripts/generate.ts
  80862. // DON NOT EDIT IT MANUALLY
  80863. var PictureTwoTone_PictureTwoTone = function PictureTwoTone(props, ref) {
  80864. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  80865. ref: ref,
  80866. icon: asn_PictureTwoTone
  80867. }));
  80868. };
  80869. /**![picture](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkyOCAxNjBIOTZjLTE3LjcgMC0zMiAxNC4zLTMyIDMydjY0MGMwIDE3LjcgMTQuMyAzMiAzMiAzMmg4MzJjMTcuNyAwIDMyLTE0LjMgMzItMzJWMTkyYzAtMTcuNy0xNC4zLTMyLTMyLTMyem0tNDAgNjMySDEzNnYtMzkuOWwxMzguNS0xNjQuMyAxNTAuMSAxNzhMNjU4LjEgNDg5IDg4OCA3NjEuNlY3OTJ6bTAtMTI5LjhMNjY0LjIgMzk2LjhjLTMuMi0zLjgtOS0zLjgtMTIuMiAwTDQyNC42IDY2Ni40bC0xNDQtMTcwLjdjLTMuMi0zLjgtOS0zLjgtMTIuMiAwTDEzNiA2NTIuN1YyMzJoNzUydjQzMC4yeiIgZmlsbD0iIzE2NzdmZiIgLz48cGF0aCBkPSJNNDI0LjYgNzY1LjhsLTE1MC4xLTE3OEwxMzYgNzUyLjFWNzkyaDc1MnYtMzAuNEw2NTguMSA0ODl6IiBmaWxsPSIjZTZmNGZmIiAvPjxwYXRoIGQ9Ik0xMzYgNjUyLjdsMTMyLjQtMTU3YzMuMi0zLjggOS0zLjggMTIuMiAwbDE0NCAxNzAuN0w2NTIgMzk2LjhjMy4yLTMuOCA5LTMuOCAxMi4yIDBMODg4IDY2Mi4yVjIzMkgxMzZ2NDIwLjd6TTMwNCAyODBhODggODggMCAxMTAgMTc2IDg4IDg4IDAgMDEwLTE3NnoiIGZpbGw9IiNlNmY0ZmYiIC8+PHBhdGggZD0iTTI3NiAzNjhhMjggMjggMCAxMDU2IDAgMjggMjggMCAxMC01NiAweiIgZmlsbD0iI2U2ZjRmZiIgLz48cGF0aCBkPSJNMzA0IDQ1NmE4OCA4OCAwIDEwMC0xNzYgODggODggMCAwMDAgMTc2em0wLTExNmMxNS41IDAgMjggMTIuNSAyOCAyOHMtMTIuNSAyOC0yOCAyOC0yOC0xMi41LTI4LTI4IDEyLjUtMjggMjgtMjh6IiBmaWxsPSIjMTY3N2ZmIiAvPjwvc3ZnPg==) */
  80870. var PictureTwoTone_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(PictureTwoTone_PictureTwoTone);
  80871. if (true) {
  80872. PictureTwoTone_RefIcon.displayName = 'PictureTwoTone';
  80873. }
  80874. /* harmony default export */ var icons_PictureTwoTone = (PictureTwoTone_RefIcon);
  80875. ;// ./components/upload/utils.ts
  80876. function file2Obj(file) {
  80877. return Object.assign(Object.assign({}, file), {
  80878. lastModified: file.lastModified,
  80879. lastModifiedDate: file.lastModifiedDate,
  80880. name: file.name,
  80881. size: file.size,
  80882. type: file.type,
  80883. uid: file.uid,
  80884. percent: 0,
  80885. originFileObj: file
  80886. });
  80887. }
  80888. /** Upload fileList. Replace file if exist or just push into it. */
  80889. function updateFileList(file, fileList) {
  80890. const nextFileList = (0,toConsumableArray["default"])(fileList);
  80891. const fileIndex = nextFileList.findIndex(({
  80892. uid
  80893. }) => uid === file.uid);
  80894. if (fileIndex === -1) {
  80895. nextFileList.push(file);
  80896. } else {
  80897. nextFileList[fileIndex] = file;
  80898. }
  80899. return nextFileList;
  80900. }
  80901. function getFileItem(file, fileList) {
  80902. const matchKey = file.uid !== undefined ? 'uid' : 'name';
  80903. return fileList.filter(item => item[matchKey] === file[matchKey])[0];
  80904. }
  80905. function removeFileItem(file, fileList) {
  80906. const matchKey = file.uid !== undefined ? 'uid' : 'name';
  80907. const removed = fileList.filter(item => item[matchKey] !== file[matchKey]);
  80908. if (removed.length === fileList.length) {
  80909. return null;
  80910. }
  80911. return removed;
  80912. }
  80913. // ==================== Default Image Preview ====================
  80914. const extname = (url = '') => {
  80915. const temp = url.split('/');
  80916. const filename = temp[temp.length - 1];
  80917. const filenameWithoutSuffix = filename.split(/#|\?/)[0];
  80918. return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
  80919. };
  80920. const isImageFileType = type => type.indexOf('image/') === 0;
  80921. const isImageUrl = file => {
  80922. if (file.type && !file.thumbUrl) {
  80923. return isImageFileType(file.type);
  80924. }
  80925. const url = file.thumbUrl || file.url || '';
  80926. const extension = extname(url);
  80927. if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(extension)) {
  80928. return true;
  80929. }
  80930. if (/^data:/.test(url)) {
  80931. // other file types of base64
  80932. return false;
  80933. }
  80934. if (extension) {
  80935. // other file types which have extension
  80936. return false;
  80937. }
  80938. return true;
  80939. };
  80940. const MEASURE_SIZE = 200;
  80941. function previewImage(file) {
  80942. return new Promise(resolve => {
  80943. if (!file.type || !isImageFileType(file.type)) {
  80944. resolve('');
  80945. return;
  80946. }
  80947. const canvas = document.createElement('canvas');
  80948. canvas.width = MEASURE_SIZE;
  80949. canvas.height = MEASURE_SIZE;
  80950. canvas.style.cssText = `position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`;
  80951. document.body.appendChild(canvas);
  80952. const ctx = canvas.getContext('2d');
  80953. const img = new Image();
  80954. img.onload = () => {
  80955. const {
  80956. width,
  80957. height
  80958. } = img;
  80959. let drawWidth = MEASURE_SIZE;
  80960. let drawHeight = MEASURE_SIZE;
  80961. let offsetX = 0;
  80962. let offsetY = 0;
  80963. if (width > height) {
  80964. drawHeight = height * (MEASURE_SIZE / width);
  80965. offsetY = -(drawHeight - drawWidth) / 2;
  80966. } else {
  80967. drawWidth = width * (MEASURE_SIZE / height);
  80968. offsetX = -(drawWidth - drawHeight) / 2;
  80969. }
  80970. ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight);
  80971. const dataURL = canvas.toDataURL();
  80972. document.body.removeChild(canvas);
  80973. window.URL.revokeObjectURL(img.src);
  80974. resolve(dataURL);
  80975. };
  80976. img.crossOrigin = 'anonymous';
  80977. if (file.type.startsWith('image/svg+xml')) {
  80978. const reader = new FileReader();
  80979. reader.onload = () => {
  80980. if (reader.result && typeof reader.result === 'string') {
  80981. img.src = reader.result;
  80982. }
  80983. };
  80984. reader.readAsDataURL(file);
  80985. } else if (file.type.startsWith('image/gif')) {
  80986. const reader = new FileReader();
  80987. reader.onload = () => {
  80988. if (reader.result) {
  80989. resolve(reader.result);
  80990. }
  80991. };
  80992. reader.readAsDataURL(file);
  80993. } else {
  80994. img.src = window.URL.createObjectURL(file);
  80995. }
  80996. });
  80997. }
  80998. ;// ./node_modules/@ant-design/icons-svg/es/asn/DownloadOutlined.js
  80999. // This icon file is generated automatically.
  81000. var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" };
  81001. /* harmony default export */ var asn_DownloadOutlined = (DownloadOutlined);
  81002. ;// ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js
  81003. // GENERATE BY ./scripts/generate.ts
  81004. // DON NOT EDIT IT MANUALLY
  81005. var DownloadOutlined_DownloadOutlined = function DownloadOutlined(props, ref) {
  81006. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  81007. ref: ref,
  81008. icon: asn_DownloadOutlined
  81009. }));
  81010. };
  81011. /**![download](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUwNS43IDY2MWE4IDggMCAwMDEyLjYgMGwxMTItMTQxLjdjNC4xLTUuMi40LTEyLjktNi4zLTEyLjloLTc0LjFWMTY4YzAtNC40LTMuNi04LTgtOGgtNjBjLTQuNCAwLTggMy42LTggOHYzMzguM0g0MDBjLTYuNyAwLTEwLjQgNy43LTYuMyAxMi45bDExMiAxNDEuOHpNODc4IDYyNmgtNjBjLTQuNCAwLTggMy42LTggOHYxNTRIMjE0VjYzNGMwLTQuNC0zLjYtOC04LThoLTYwYy00LjQgMC04IDMuNi04IDh2MTk4YzAgMTcuNyAxNC4zIDMyIDMyIDMyaDY4NGMxNy43IDAgMzItMTQuMyAzMi0zMlY2MzRjMC00LjQtMy42LTgtOC04eiIgLz48L3N2Zz4=) */
  81012. var DownloadOutlined_RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(DownloadOutlined_DownloadOutlined);
  81013. if (true) {
  81014. DownloadOutlined_RefIcon.displayName = 'DownloadOutlined';
  81015. }
  81016. /* harmony default export */ var icons_DownloadOutlined = (DownloadOutlined_RefIcon);
  81017. ;// ./components/upload/UploadList/ListItem.tsx
  81018. const ListItem_ListItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
  81019. prefixCls,
  81020. className,
  81021. style,
  81022. locale,
  81023. listType,
  81024. file,
  81025. items,
  81026. progress: progressProps,
  81027. iconRender,
  81028. actionIconRender,
  81029. itemRender,
  81030. isImgUrl,
  81031. showPreviewIcon,
  81032. showRemoveIcon,
  81033. showDownloadIcon,
  81034. previewIcon: customPreviewIcon,
  81035. removeIcon: customRemoveIcon,
  81036. downloadIcon: customDownloadIcon,
  81037. extra: customExtra,
  81038. onPreview,
  81039. onDownload,
  81040. onClose
  81041. }, ref) => {
  81042. var _a, _b;
  81043. // Status: which will ignore `removed` status
  81044. const {
  81045. status
  81046. } = file;
  81047. const [mergedStatus, setMergedStatus] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(status);
  81048. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  81049. if (status !== 'removed') {
  81050. setMergedStatus(status);
  81051. }
  81052. }, [status]);
  81053. // Delay to show the progress bar
  81054. const [showProgress, setShowProgress] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  81055. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  81056. const timer = setTimeout(() => {
  81057. setShowProgress(true);
  81058. }, 300);
  81059. return () => {
  81060. clearTimeout(timer);
  81061. };
  81062. }, []);
  81063. const iconNode = iconRender(file);
  81064. let icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81065. className: `${prefixCls}-icon`
  81066. }, iconNode);
  81067. if (listType === 'picture' || listType === 'picture-card' || listType === 'picture-circle') {
  81068. if (mergedStatus === 'uploading' || !file.thumbUrl && !file.url) {
  81069. const uploadingClassName = classnames_default()(`${prefixCls}-list-item-thumbnail`, {
  81070. [`${prefixCls}-list-item-file`]: mergedStatus !== 'uploading'
  81071. });
  81072. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81073. className: uploadingClassName
  81074. }, iconNode);
  81075. } else {
  81076. const thumbnail = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("img", {
  81077. src: file.thumbUrl || file.url,
  81078. alt: file.name,
  81079. className: `${prefixCls}-list-item-image`,
  81080. crossOrigin: file.crossOrigin
  81081. })) : iconNode;
  81082. const aClassName = classnames_default()(`${prefixCls}-list-item-thumbnail`, {
  81083. [`${prefixCls}-list-item-file`]: isImgUrl && !isImgUrl(file)
  81084. });
  81085. icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  81086. className: aClassName,
  81087. onClick: e => onPreview(file, e),
  81088. href: file.url || file.thumbUrl,
  81089. target: "_blank",
  81090. rel: "noopener noreferrer"
  81091. }, thumbnail);
  81092. }
  81093. }
  81094. const listItemClassName = classnames_default()(`${prefixCls}-list-item`, `${prefixCls}-list-item-${mergedStatus}`);
  81095. const linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
  81096. const removeIcon = (typeof showRemoveIcon === 'function' ? showRemoveIcon(file) : showRemoveIcon) ? actionIconRender((typeof customRemoveIcon === 'function' ? customRemoveIcon(file) : customRemoveIcon) || (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DeleteOutlined, null)), () => onClose(file), prefixCls, locale.removeFile,
  81097. // acceptUploadDisabled is true, only remove icon will follow Upload disabled prop
  81098. // https://github.com/ant-design/ant-design/issues/46171
  81099. true) : null;
  81100. const downloadIcon = (typeof showDownloadIcon === 'function' ? showDownloadIcon(file) : showDownloadIcon) && mergedStatus === 'done' ? actionIconRender((typeof customDownloadIcon === 'function' ? customDownloadIcon(file) : customDownloadIcon) || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_DownloadOutlined, null), () => onDownload(file), prefixCls, locale.downloadFile) : null;
  81101. const downloadOrDelete = listType !== 'picture-card' && listType !== 'picture-circle' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81102. key: "download-delete",
  81103. className: classnames_default()(`${prefixCls}-list-item-actions`, {
  81104. picture: listType === 'picture'
  81105. })
  81106. }, downloadIcon, removeIcon));
  81107. const extraContent = typeof customExtra === 'function' ? customExtra(file) : customExtra;
  81108. const extra = extraContent && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81109. className: `${prefixCls}-list-item-extra`
  81110. }, extraContent));
  81111. const listItemNameClass = classnames_default()(`${prefixCls}-list-item-name`);
  81112. const fileName = file.url ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", Object.assign({
  81113. key: "view",
  81114. target: "_blank",
  81115. rel: "noopener noreferrer",
  81116. className: listItemNameClass,
  81117. title: file.name
  81118. }, linkProps, {
  81119. href: file.url,
  81120. onClick: e => onPreview(file, e)
  81121. }), file.name, extra)) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81122. key: "view",
  81123. className: listItemNameClass,
  81124. onClick: e => onPreview(file, e),
  81125. title: file.name
  81126. }, file.name, extra));
  81127. const previewIcon = (typeof showPreviewIcon === 'function' ? showPreviewIcon(file) : showPreviewIcon) && (file.url || file.thumbUrl) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("a", {
  81128. href: file.url || file.thumbUrl,
  81129. target: "_blank",
  81130. rel: "noopener noreferrer",
  81131. onClick: e => onPreview(file, e),
  81132. title: locale.previewFile
  81133. }, typeof customPreviewIcon === 'function' ? customPreviewIcon(file) : customPreviewIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_EyeOutlined, null))) : null;
  81134. const pictureCardActions = (listType === 'picture-card' || listType === 'picture-circle') && mergedStatus !== 'uploading' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81135. className: `${prefixCls}-list-item-actions`
  81136. }, previewIcon, mergedStatus === 'done' && downloadIcon, removeIcon));
  81137. const {
  81138. getPrefixCls
  81139. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  81140. const rootPrefixCls = getPrefixCls();
  81141. const dom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81142. className: listItemClassName
  81143. }, icon, fileName, downloadOrDelete, pictureCardActions, showProgress && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], {
  81144. motionName: `${rootPrefixCls}-fade`,
  81145. visible: mergedStatus === 'uploading',
  81146. motionDeadline: 2000
  81147. }, ({
  81148. className: motionClassName
  81149. }) => {
  81150. // show loading icon if upload progress listener is disabled
  81151. const loadingProgress = 'percent' in file ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_progress, Object.assign({
  81152. type: "line",
  81153. percent: file.percent,
  81154. "aria-label": file['aria-label'],
  81155. "aria-labelledby": file['aria-labelledby']
  81156. }, progressProps))) : null;
  81157. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81158. className: classnames_default()(`${prefixCls}-list-item-progress`, motionClassName)
  81159. }, loadingProgress);
  81160. })));
  81161. const message = file.response && typeof file.response === 'string' ? file.response : ((_a = file.error) === null || _a === void 0 ? void 0 : _a.statusText) || ((_b = file.error) === null || _b === void 0 ? void 0 : _b.message) || locale.uploadError;
  81162. const item = mergedStatus === 'error' ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_tooltip, {
  81163. title: message,
  81164. getPopupContainer: node => node.parentNode
  81165. }, dom)) : dom;
  81166. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81167. className: classnames_default()(`${prefixCls}-list-item-container`, className),
  81168. style: style,
  81169. ref: ref
  81170. }, itemRender ? itemRender(item, file, items, {
  81171. download: onDownload.bind(null, file),
  81172. preview: onPreview.bind(null, file),
  81173. remove: onClose.bind(null, file)
  81174. }) : item);
  81175. });
  81176. /* harmony default export */ var UploadList_ListItem = (ListItem_ListItem);
  81177. ;// ./components/upload/UploadList/index.tsx
  81178. const InternalUploadList = (props, ref) => {
  81179. const {
  81180. listType = 'text',
  81181. previewFile = previewImage,
  81182. onPreview,
  81183. onDownload,
  81184. onRemove,
  81185. locale,
  81186. iconRender,
  81187. isImageUrl: isImgUrl = isImageUrl,
  81188. prefixCls: customizePrefixCls,
  81189. items = [],
  81190. showPreviewIcon = true,
  81191. showRemoveIcon = true,
  81192. showDownloadIcon = false,
  81193. removeIcon,
  81194. previewIcon,
  81195. downloadIcon,
  81196. extra,
  81197. progress = {
  81198. size: [-1, 2],
  81199. showInfo: false
  81200. },
  81201. appendAction,
  81202. appendActionVisible = true,
  81203. itemRender,
  81204. disabled
  81205. } = props;
  81206. const forceUpdate = useForceUpdate();
  81207. const [motionAppear, setMotionAppear] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false);
  81208. const isPictureCardOrCirle = ['picture-card', 'picture-circle'].includes(listType);
  81209. // ============================= Effect =============================
  81210. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  81211. if (!listType.startsWith('picture')) {
  81212. return;
  81213. }
  81214. (items || []).forEach(file => {
  81215. if (!(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) {
  81216. return;
  81217. }
  81218. file.thumbUrl = '';
  81219. previewFile === null || previewFile === void 0 ? void 0 : previewFile(file.originFileObj).then(previewDataUrl => {
  81220. // Need append '' to avoid dead loop
  81221. file.thumbUrl = previewDataUrl || '';
  81222. forceUpdate();
  81223. });
  81224. });
  81225. }, [listType, items, previewFile]);
  81226. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(() => {
  81227. setMotionAppear(true);
  81228. }, []);
  81229. // ============================= Events =============================
  81230. const onInternalPreview = (file, e) => {
  81231. if (!onPreview) {
  81232. return;
  81233. }
  81234. e === null || e === void 0 ? void 0 : e.preventDefault();
  81235. return onPreview(file);
  81236. };
  81237. const onInternalDownload = file => {
  81238. if (typeof onDownload === 'function') {
  81239. onDownload(file);
  81240. } else if (file.url) {
  81241. window.open(file.url);
  81242. }
  81243. };
  81244. const onInternalClose = file => {
  81245. onRemove === null || onRemove === void 0 ? void 0 : onRemove(file);
  81246. };
  81247. const internalIconRender = file => {
  81248. if (iconRender) {
  81249. return iconRender(file, listType);
  81250. }
  81251. const isLoading = file.status === 'uploading';
  81252. if (listType.startsWith('picture')) {
  81253. const loadingIcon = listType === 'picture' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null) : locale.uploading;
  81254. const fileIcon = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PictureTwoTone, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_FileTwoTone, null);
  81255. return isLoading ? loadingIcon : fileIcon;
  81256. }
  81257. return isLoading ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_LoadingOutlined, null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(icons_PaperClipOutlined, null);
  81258. };
  81259. const actionIconRender = (customIcon, callback, prefixCls, title, acceptUploadDisabled) => {
  81260. const btnProps = {
  81261. type: 'text',
  81262. size: 'small',
  81263. title,
  81264. onClick: e => {
  81265. var _a, _b;
  81266. callback();
  81267. if (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(customIcon)) {
  81268. (_b = (_a = customIcon.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
  81269. }
  81270. },
  81271. className: `${prefixCls}-list-item-action`,
  81272. disabled: acceptUploadDisabled ? disabled : false
  81273. };
  81274. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(customIcon) ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({}, btnProps, {
  81275. icon: (0,reactNode.cloneElement)(customIcon, Object.assign(Object.assign({}, customIcon.props), {
  81276. onClick: () => {}
  81277. }))
  81278. }))) : (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_button, Object.assign({}, btnProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", null, customIcon)));
  81279. };
  81280. // ============================== Ref ===============================
  81281. // Test needs
  81282. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  81283. handlePreview: onInternalPreview,
  81284. handleDownload: onInternalDownload
  81285. }));
  81286. const {
  81287. getPrefixCls
  81288. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  81289. // ============================= Render =============================
  81290. const prefixCls = getPrefixCls('upload', customizePrefixCls);
  81291. const rootPrefixCls = getPrefixCls();
  81292. const listClassNames = classnames_default()(`${prefixCls}-list`, `${prefixCls}-list-${listType}`);
  81293. const listItemMotion = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,omit["default"])((0,_util_motion["default"])(rootPrefixCls), ['onAppearEnd', 'onEnterEnd', 'onLeaveEnd']), [rootPrefixCls]);
  81294. const motionConfig = Object.assign(Object.assign({}, isPictureCardOrCirle ? {} : listItemMotion), {
  81295. motionDeadline: 2000,
  81296. motionName: `${prefixCls}-${isPictureCardOrCirle ? 'animate-inline' : 'animate'}`,
  81297. keys: (0,toConsumableArray["default"])(items.map(file => ({
  81298. key: file.uid,
  81299. file
  81300. }))),
  81301. motionAppear
  81302. });
  81303. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81304. className: listClassNames
  81305. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es.CSSMotionList, Object.assign({}, motionConfig, {
  81306. component: false
  81307. }), ({
  81308. key,
  81309. file,
  81310. className: motionClassName,
  81311. style: motionStyle
  81312. }) => (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(UploadList_ListItem, {
  81313. key: key,
  81314. locale: locale,
  81315. prefixCls: prefixCls,
  81316. className: motionClassName,
  81317. style: motionStyle,
  81318. file: file,
  81319. items: items,
  81320. progress: progress,
  81321. listType: listType,
  81322. isImgUrl: isImgUrl,
  81323. showPreviewIcon: showPreviewIcon,
  81324. showRemoveIcon: showRemoveIcon,
  81325. showDownloadIcon: showDownloadIcon,
  81326. removeIcon: removeIcon,
  81327. previewIcon: previewIcon,
  81328. downloadIcon: downloadIcon,
  81329. extra: extra,
  81330. iconRender: internalIconRender,
  81331. actionIconRender: actionIconRender,
  81332. itemRender: itemRender,
  81333. onPreview: onInternalPreview,
  81334. onDownload: onInternalDownload,
  81335. onClose: onInternalClose
  81336. }))), appendAction && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_motion_es["default"], Object.assign({}, motionConfig, {
  81337. visible: appendActionVisible,
  81338. forceRender: true
  81339. }), ({
  81340. className: motionClassName,
  81341. style: motionStyle
  81342. }) => (0,reactNode.cloneElement)(appendAction, oriProps => ({
  81343. className: classnames_default()(oriProps.className, motionClassName),
  81344. style: Object.assign(Object.assign(Object.assign({}, motionStyle), {
  81345. // prevent the element has hover css pseudo-class that may cause animation to end prematurely.
  81346. pointerEvents: motionClassName ? 'none' : undefined
  81347. }), oriProps.style)
  81348. })))));
  81349. };
  81350. const UploadList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalUploadList);
  81351. if (true) {
  81352. UploadList.displayName = 'UploadList';
  81353. }
  81354. /* harmony default export */ var upload_UploadList = (UploadList);
  81355. ;// ./components/upload/Upload.tsx
  81356. var Upload_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
  81357. function adopt(value) {
  81358. return value instanceof P ? value : new P(function (resolve) {
  81359. resolve(value);
  81360. });
  81361. }
  81362. return new (P || (P = Promise))(function (resolve, reject) {
  81363. function fulfilled(value) {
  81364. try {
  81365. step(generator.next(value));
  81366. } catch (e) {
  81367. reject(e);
  81368. }
  81369. }
  81370. function rejected(value) {
  81371. try {
  81372. step(generator["throw"](value));
  81373. } catch (e) {
  81374. reject(e);
  81375. }
  81376. }
  81377. function step(result) {
  81378. result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
  81379. }
  81380. step((generator = generator.apply(thisArg, _arguments || [])).next());
  81381. });
  81382. };
  81383. const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;
  81384. const InternalUpload = (props, ref) => {
  81385. const config = (0,config_provider_context.useComponentConfig)('upload');
  81386. const {
  81387. fileList,
  81388. defaultFileList,
  81389. onRemove,
  81390. showUploadList = true,
  81391. listType = 'text',
  81392. onPreview,
  81393. onDownload,
  81394. onChange,
  81395. onDrop,
  81396. previewFile,
  81397. disabled: customDisabled,
  81398. locale: propLocale,
  81399. iconRender,
  81400. isImageUrl,
  81401. progress,
  81402. prefixCls: customizePrefixCls,
  81403. className,
  81404. type = 'select',
  81405. children,
  81406. style,
  81407. itemRender,
  81408. maxCount,
  81409. data = {},
  81410. multiple = false,
  81411. hasControlInside = true,
  81412. action = '',
  81413. accept = '',
  81414. supportServerRender = true,
  81415. rootClassName
  81416. } = props;
  81417. // ===================== Disabled =====================
  81418. const disabled = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_DisabledContext);
  81419. const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
  81420. const customRequest = props.customRequest || config.customRequest;
  81421. const [mergedFileList, setMergedFileList] = (0,useMergedState["default"])(defaultFileList || [], {
  81422. value: fileList,
  81423. postState: list => list !== null && list !== void 0 ? list : []
  81424. });
  81425. const [dragState, setDragState] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState('drop');
  81426. const upload = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  81427. const wrapRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  81428. if (true) {
  81429. const warning = (0,_util_warning.devUseWarning)('Upload');
  81430. true ? warning('fileList' in props || !('value' in props), 'usage', '`value` is not a valid prop, do you mean `fileList`?') : 0;
  81431. warning.deprecated(!('transformFile' in props), 'transformFile', 'beforeUpload');
  81432. }
  81433. // Control mode will auto fill file uid if not provided
  81434. external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  81435. const timestamp = Date.now();
  81436. (fileList || []).forEach((file, index) => {
  81437. if (!file.uid && !Object.isFrozen(file)) {
  81438. file.uid = `__AUTO__${timestamp}_${index}__`;
  81439. }
  81440. });
  81441. }, [fileList]);
  81442. const onInternalChange = (file, changedFileList, event) => {
  81443. let cloneList = (0,toConsumableArray["default"])(changedFileList);
  81444. let exceedMaxCount = false;
  81445. // Cut to match count
  81446. if (maxCount === 1) {
  81447. cloneList = cloneList.slice(-1);
  81448. } else if (maxCount) {
  81449. exceedMaxCount = cloneList.length > maxCount;
  81450. cloneList = cloneList.slice(0, maxCount);
  81451. }
  81452. // Prevent React18 auto batch since input[upload] trigger process at same time
  81453. // which makes fileList closure problem
  81454. // eslint-disable-next-line react-dom/no-flush-sync
  81455. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(() => {
  81456. setMergedFileList(cloneList);
  81457. });
  81458. const changeInfo = {
  81459. file: file,
  81460. fileList: cloneList
  81461. };
  81462. if (event) {
  81463. changeInfo.event = event;
  81464. }
  81465. if (!exceedMaxCount || file.status === 'removed' ||
  81466. // We should ignore event if current file is exceed `maxCount`
  81467. cloneList.some(f => f.uid === file.uid)) {
  81468. // eslint-disable-next-line react-dom/no-flush-sync
  81469. (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.flushSync)(() => {
  81470. onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);
  81471. });
  81472. }
  81473. };
  81474. const mergedBeforeUpload = (file, fileListArgs) => Upload_awaiter(void 0, void 0, void 0, function* () {
  81475. const {
  81476. beforeUpload,
  81477. transformFile
  81478. } = props;
  81479. let parsedFile = file;
  81480. if (beforeUpload) {
  81481. const result = yield beforeUpload(file, fileListArgs);
  81482. if (result === false) {
  81483. return false;
  81484. }
  81485. // Hack for LIST_IGNORE, we add additional info to remove from the list
  81486. delete file[LIST_IGNORE];
  81487. if (result === LIST_IGNORE) {
  81488. Object.defineProperty(file, LIST_IGNORE, {
  81489. value: true,
  81490. configurable: true
  81491. });
  81492. return false;
  81493. }
  81494. if (typeof result === 'object' && result) {
  81495. parsedFile = result;
  81496. }
  81497. }
  81498. if (transformFile) {
  81499. parsedFile = yield transformFile(parsedFile);
  81500. }
  81501. return parsedFile;
  81502. });
  81503. const onBatchStart = batchFileInfoList => {
  81504. // Skip file which marked as `LIST_IGNORE`, these file will not add to file list
  81505. const filteredFileInfoList = batchFileInfoList.filter(info => !info.file[LIST_IGNORE]);
  81506. // Nothing to do since no file need upload
  81507. if (!filteredFileInfoList.length) {
  81508. return;
  81509. }
  81510. const objectFileList = filteredFileInfoList.map(info => file2Obj(info.file));
  81511. // Concat new files with prev files
  81512. let newFileList = (0,toConsumableArray["default"])(mergedFileList);
  81513. objectFileList.forEach(fileObj => {
  81514. // Replace file if exist
  81515. newFileList = updateFileList(fileObj, newFileList);
  81516. });
  81517. objectFileList.forEach((fileObj, index) => {
  81518. // Repeat trigger `onChange` event for compatible
  81519. let triggerFileObj = fileObj;
  81520. if (!filteredFileInfoList[index].parsedFile) {
  81521. // `beforeUpload` return false
  81522. const {
  81523. originFileObj
  81524. } = fileObj;
  81525. let clone;
  81526. try {
  81527. clone = new File([originFileObj], originFileObj.name, {
  81528. type: originFileObj.type
  81529. });
  81530. } catch (_a) {
  81531. clone = new Blob([originFileObj], {
  81532. type: originFileObj.type
  81533. });
  81534. clone.name = originFileObj.name;
  81535. clone.lastModifiedDate = new Date();
  81536. clone.lastModified = new Date().getTime();
  81537. }
  81538. clone.uid = fileObj.uid;
  81539. triggerFileObj = clone;
  81540. } else {
  81541. // Inject `uploading` status
  81542. fileObj.status = 'uploading';
  81543. }
  81544. onInternalChange(triggerFileObj, newFileList);
  81545. });
  81546. };
  81547. const onSuccess = (response, file, xhr) => {
  81548. try {
  81549. if (typeof response === 'string') {
  81550. response = JSON.parse(response);
  81551. }
  81552. } catch (_a) {
  81553. /* do nothing */
  81554. }
  81555. // removed
  81556. if (!getFileItem(file, mergedFileList)) {
  81557. return;
  81558. }
  81559. const targetItem = file2Obj(file);
  81560. targetItem.status = 'done';
  81561. targetItem.percent = 100;
  81562. targetItem.response = response;
  81563. targetItem.xhr = xhr;
  81564. const nextFileList = updateFileList(targetItem, mergedFileList);
  81565. onInternalChange(targetItem, nextFileList);
  81566. };
  81567. const onProgress = (e, file) => {
  81568. // removed
  81569. if (!getFileItem(file, mergedFileList)) {
  81570. return;
  81571. }
  81572. const targetItem = file2Obj(file);
  81573. targetItem.status = 'uploading';
  81574. targetItem.percent = e.percent;
  81575. const nextFileList = updateFileList(targetItem, mergedFileList);
  81576. onInternalChange(targetItem, nextFileList, e);
  81577. };
  81578. const onError = (error, response, file) => {
  81579. // removed
  81580. if (!getFileItem(file, mergedFileList)) {
  81581. return;
  81582. }
  81583. const targetItem = file2Obj(file);
  81584. targetItem.error = error;
  81585. targetItem.response = response;
  81586. targetItem.status = 'error';
  81587. const nextFileList = updateFileList(targetItem, mergedFileList);
  81588. onInternalChange(targetItem, nextFileList);
  81589. };
  81590. const handleRemove = file => {
  81591. let currentFile;
  81592. Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => {
  81593. var _a;
  81594. // Prevent removing file
  81595. if (ret === false) {
  81596. return;
  81597. }
  81598. const removedFileList = removeFileItem(file, mergedFileList);
  81599. if (removedFileList) {
  81600. currentFile = Object.assign(Object.assign({}, file), {
  81601. status: 'removed'
  81602. });
  81603. mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(item => {
  81604. const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';
  81605. if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {
  81606. item.status = 'removed';
  81607. }
  81608. });
  81609. (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);
  81610. onInternalChange(currentFile, removedFileList);
  81611. }
  81612. });
  81613. };
  81614. const onFileDrop = e => {
  81615. setDragState(e.type);
  81616. if (e.type === 'drop') {
  81617. onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);
  81618. }
  81619. };
  81620. // Test needs
  81621. external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle(ref, () => ({
  81622. onBatchStart,
  81623. onSuccess,
  81624. onProgress,
  81625. onError,
  81626. fileList: mergedFileList,
  81627. upload: upload.current,
  81628. nativeElement: wrapRef.current
  81629. }));
  81630. const {
  81631. getPrefixCls,
  81632. direction,
  81633. upload: ctxUpload
  81634. } = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(config_provider_context.ConfigContext);
  81635. const prefixCls = getPrefixCls('upload', customizePrefixCls);
  81636. const rcUploadProps = Object.assign(Object.assign({
  81637. onBatchStart,
  81638. onError,
  81639. onProgress,
  81640. onSuccess
  81641. }, props), {
  81642. customRequest,
  81643. data,
  81644. multiple,
  81645. action,
  81646. accept,
  81647. supportServerRender,
  81648. prefixCls,
  81649. disabled: mergedDisabled,
  81650. beforeUpload: mergedBeforeUpload,
  81651. onChange: undefined,
  81652. hasControlInside
  81653. });
  81654. delete rcUploadProps.className;
  81655. delete rcUploadProps.style;
  81656. // Remove id to avoid open by label when trigger is hidden
  81657. // !children: https://github.com/ant-design/ant-design/issues/14298
  81658. // disabled: https://github.com/ant-design/ant-design/issues/16478
  81659. // https://github.com/ant-design/ant-design/issues/24197
  81660. if (!children || mergedDisabled) {
  81661. delete rcUploadProps.id;
  81662. }
  81663. const wrapperCls = `${prefixCls}-wrapper`;
  81664. const [wrapCSSVar, hashId, cssVarCls] = (0,upload_style["default"])(prefixCls, wrapperCls);
  81665. const [contextLocale] = (0,useLocale["default"])('Upload', en_US["default"].Upload);
  81666. const {
  81667. showRemoveIcon,
  81668. showPreviewIcon,
  81669. showDownloadIcon,
  81670. removeIcon,
  81671. previewIcon,
  81672. downloadIcon,
  81673. extra
  81674. } = typeof showUploadList === 'boolean' ? {} : showUploadList;
  81675. // use showRemoveIcon if it is specified explicitly
  81676. const realShowRemoveIcon = typeof showRemoveIcon === 'undefined' ? !mergedDisabled : showRemoveIcon;
  81677. const renderUploadList = (button, buttonVisible) => {
  81678. if (!showUploadList) {
  81679. return button;
  81680. }
  81681. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(upload_UploadList, {
  81682. prefixCls: prefixCls,
  81683. listType: listType,
  81684. items: mergedFileList,
  81685. previewFile: previewFile,
  81686. onPreview: onPreview,
  81687. onDownload: onDownload,
  81688. onRemove: handleRemove,
  81689. showRemoveIcon: realShowRemoveIcon,
  81690. showPreviewIcon: showPreviewIcon,
  81691. showDownloadIcon: showDownloadIcon,
  81692. removeIcon: removeIcon,
  81693. previewIcon: previewIcon,
  81694. downloadIcon: downloadIcon,
  81695. iconRender: iconRender,
  81696. extra: extra,
  81697. locale: Object.assign(Object.assign({}, contextLocale), propLocale),
  81698. isImageUrl: isImageUrl,
  81699. progress: progress,
  81700. appendAction: button,
  81701. appendActionVisible: buttonVisible,
  81702. itemRender: itemRender,
  81703. disabled: mergedDisabled
  81704. });
  81705. };
  81706. const mergedCls = classnames_default()(wrapperCls, className, rootClassName, hashId, cssVarCls, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.className, {
  81707. [`${prefixCls}-rtl`]: direction === 'rtl',
  81708. [`${prefixCls}-picture-card-wrapper`]: listType === 'picture-card',
  81709. [`${prefixCls}-picture-circle-wrapper`]: listType === 'picture-circle'
  81710. });
  81711. const mergedStyle = Object.assign(Object.assign({}, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.style), style);
  81712. // ======================== Render ========================
  81713. if (type === 'drag') {
  81714. const dragCls = classnames_default()(hashId, prefixCls, `${prefixCls}-drag`, {
  81715. [`${prefixCls}-drag-uploading`]: mergedFileList.some(file => file.status === 'uploading'),
  81716. [`${prefixCls}-drag-hover`]: dragState === 'dragover',
  81717. [`${prefixCls}-disabled`]: mergedDisabled,
  81718. [`${prefixCls}-rtl`]: direction === 'rtl'
  81719. });
  81720. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81721. className: mergedCls,
  81722. ref: wrapRef
  81723. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81724. className: dragCls,
  81725. style: mergedStyle,
  81726. onDrop: onFileDrop,
  81727. onDragOver: onFileDrop,
  81728. onDragLeave: onFileDrop
  81729. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_upload_es, Object.assign({}, rcUploadProps, {
  81730. ref: upload,
  81731. className: `${prefixCls}-btn`
  81732. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81733. className: `${prefixCls}-drag-container`
  81734. }, children))), renderUploadList()));
  81735. }
  81736. const uploadBtnCls = classnames_default()(prefixCls, `${prefixCls}-select`, {
  81737. [`${prefixCls}-disabled`]: mergedDisabled,
  81738. [`${prefixCls}-hidden`]: !children
  81739. });
  81740. const uploadButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("div", {
  81741. className: uploadBtnCls,
  81742. style: mergedStyle
  81743. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(rc_upload_es, Object.assign({}, rcUploadProps, {
  81744. ref: upload
  81745. })));
  81746. if (listType === 'picture-card' || listType === 'picture-circle') {
  81747. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81748. className: mergedCls,
  81749. ref: wrapRef
  81750. }, renderUploadList(uploadButton, !!children)));
  81751. }
  81752. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", {
  81753. className: mergedCls,
  81754. ref: wrapRef
  81755. }, uploadButton, renderUploadList()));
  81756. };
  81757. const Upload_Upload = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(InternalUpload);
  81758. if (true) {
  81759. Upload_Upload.displayName = 'Upload';
  81760. }
  81761. /* harmony default export */ var upload_Upload = (Upload_Upload);
  81762. ;// ./components/upload/Dragger.tsx
  81763. var Dragger_rest = undefined && undefined.__rest || function (s, e) {
  81764. var t = {};
  81765. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  81766. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  81767. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  81768. }
  81769. return t;
  81770. };
  81771. const Dragger = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_a, ref) => {
  81772. var {
  81773. style,
  81774. height,
  81775. hasControlInside = false
  81776. } = _a,
  81777. restProps = Dragger_rest(_a, ["style", "height", "hasControlInside"]);
  81778. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(upload_Upload, Object.assign({
  81779. ref: ref,
  81780. hasControlInside: hasControlInside
  81781. }, restProps, {
  81782. type: "drag",
  81783. style: Object.assign(Object.assign({}, style), {
  81784. height
  81785. })
  81786. }));
  81787. });
  81788. if (true) {
  81789. Dragger.displayName = 'Dragger';
  81790. }
  81791. /* harmony default export */ var upload_Dragger = (Dragger);
  81792. ;// ./components/upload/index.tsx
  81793. const components_upload_Upload = upload_Upload;
  81794. components_upload_Upload.Dragger = upload_Dragger;
  81795. components_upload_Upload.LIST_IGNORE = LIST_IGNORE;
  81796. /* harmony default export */ var components_upload = (components_upload_Upload);
  81797. // EXTERNAL MODULE: ./components/version/index.tsx + 1 modules
  81798. var components_version = __webpack_require__("./components/version/index.tsx");
  81799. ;// ./node_modules/@rc-component/mutate-observer/es/wrapper.js
  81800. var wrapper_DomWrapper = /*#__PURE__*/function (_React$Component) {
  81801. (0,inherits["default"])(DomWrapper, _React$Component);
  81802. var _super = (0,createSuper["default"])(DomWrapper);
  81803. function DomWrapper() {
  81804. (0,classCallCheck["default"])(this, DomWrapper);
  81805. return _super.apply(this, arguments);
  81806. }
  81807. (0,createClass["default"])(DomWrapper, [{
  81808. key: "render",
  81809. value: function render() {
  81810. return this.props.children;
  81811. }
  81812. }]);
  81813. return DomWrapper;
  81814. }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
  81815. /* harmony default export */ var wrapper = (wrapper_DomWrapper);
  81816. ;// ./node_modules/@rc-component/mutate-observer/es/useMutateObserver.js
  81817. var defaultOptions = {
  81818. subtree: true,
  81819. childList: true,
  81820. attributeFilter: ['style', 'class']
  81821. };
  81822. function useMutateObserver(nodeOrList, callback) {
  81823. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOptions;
  81824. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  81825. if (!(0,canUseDom["default"])() || !nodeOrList) {
  81826. return;
  81827. }
  81828. var instance;
  81829. var nodeList = Array.isArray(nodeOrList) ? nodeOrList : [nodeOrList];
  81830. if ('MutationObserver' in window) {
  81831. instance = new MutationObserver(callback);
  81832. nodeList.forEach(function (element) {
  81833. instance.observe(element, options);
  81834. });
  81835. }
  81836. return function () {
  81837. var _instance, _instance2;
  81838. (_instance = instance) === null || _instance === void 0 ? void 0 : _instance.takeRecords();
  81839. (_instance2 = instance) === null || _instance2 === void 0 ? void 0 : _instance2.disconnect();
  81840. };
  81841. }, [options, nodeOrList]);
  81842. }
  81843. ;// ./node_modules/@rc-component/mutate-observer/es/MutateObserver.js
  81844. var MutateObserver = function MutateObserver(props) {
  81845. var children = props.children,
  81846. options = props.options,
  81847. _props$onMutate = props.onMutate,
  81848. onMutate = _props$onMutate === void 0 ? function () {} : _props$onMutate;
  81849. var callback = (0,useEvent["default"])(onMutate);
  81850. var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  81851. var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  81852. var canRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children) && (0,es_ref.supportRef)(children);
  81853. var mergedRef = (0,es_ref.useComposeRef)(elementRef, canRef ? children.ref : null);
  81854. var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null),
  81855. _React$useState2 = (0,slicedToArray["default"])(_React$useState, 2),
  81856. target = _React$useState2[0],
  81857. setTarget = _React$useState2[1];
  81858. useMutateObserver(target, callback, options);
  81859. // =========================== Effect ===========================
  81860. // Bind target
  81861. (0,useLayoutEffect["default"])(function () {
  81862. setTarget((0,findDOMNode["default"])(elementRef.current) || (0,findDOMNode["default"])(wrapperRef.current));
  81863. });
  81864. // =========================== Render ===========================
  81865. if (!children) {
  81866. if (true) {
  81867. console.error('MutationObserver need children props');
  81868. }
  81869. return null;
  81870. }
  81871. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(wrapper, {
  81872. ref: wrapperRef
  81873. }, canRef ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
  81874. ref: mergedRef
  81875. }) : children);
  81876. };
  81877. /* harmony default export */ var es_MutateObserver = (MutateObserver);
  81878. ;// ./node_modules/@rc-component/mutate-observer/es/index.js
  81879. /* harmony default export */ var mutate_observer_es = (es_MutateObserver);
  81880. ;// ./components/watermark/useClips.ts
  81881. const FontGap = 3;
  81882. const prepareCanvas = (width, height, ratio = 1) => {
  81883. const canvas = document.createElement('canvas');
  81884. const ctx = canvas.getContext('2d');
  81885. const realWidth = width * ratio;
  81886. const realHeight = height * ratio;
  81887. canvas.setAttribute('width', `${realWidth}px`);
  81888. canvas.setAttribute('height', `${realHeight}px`);
  81889. ctx.save();
  81890. return [ctx, canvas, realWidth, realHeight];
  81891. };
  81892. // Get boundary of rotated text
  81893. const getRotatePos = (x, y, angle) => {
  81894. const targetX = x * Math.cos(angle) - y * Math.sin(angle);
  81895. const targetY = x * Math.sin(angle) + y * Math.cos(angle);
  81896. return [targetX, targetY];
  81897. };
  81898. /**
  81899. * Get the clips of text content.
  81900. * This is a lazy hook function since SSR no need this
  81901. */
  81902. const useClips = () => {
  81903. // Get single clips
  81904. const getClips = (content, rotate, ratio, width, height, font, gapX, gapY) => {
  81905. // ================= Text / Image =================
  81906. const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
  81907. if (content instanceof HTMLImageElement) {
  81908. // Image
  81909. ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
  81910. } else {
  81911. // Text
  81912. const {
  81913. color,
  81914. fontSize,
  81915. fontStyle,
  81916. fontWeight,
  81917. fontFamily,
  81918. textAlign
  81919. } = font;
  81920. const mergedFontSize = Number(fontSize) * ratio;
  81921. ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
  81922. ctx.fillStyle = color;
  81923. ctx.textAlign = textAlign;
  81924. ctx.textBaseline = 'top';
  81925. const contents = _util_toList(content);
  81926. contents === null || contents === void 0 ? void 0 : contents.forEach((item, index) => {
  81927. ctx.fillText(item !== null && item !== void 0 ? item : '', contentWidth / 2, index * (mergedFontSize + FontGap * ratio));
  81928. });
  81929. }
  81930. // ==================== Rotate ====================
  81931. const angle = Math.PI / 180 * Number(rotate);
  81932. const maxSize = Math.max(width, height);
  81933. const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
  81934. // Copy from `ctx` and rotate
  81935. rCtx.translate(realMaxSize / 2, realMaxSize / 2);
  81936. rCtx.rotate(angle);
  81937. if (contentWidth > 0 && contentHeight > 0) {
  81938. rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
  81939. }
  81940. let left = 0;
  81941. let right = 0;
  81942. let top = 0;
  81943. let bottom = 0;
  81944. const halfWidth = contentWidth / 2;
  81945. const halfHeight = contentHeight / 2;
  81946. const points = [[0 - halfWidth, 0 - halfHeight], [0 + halfWidth, 0 - halfHeight], [0 + halfWidth, 0 + halfHeight], [0 - halfWidth, 0 + halfHeight]];
  81947. points.forEach(([x, y]) => {
  81948. const [targetX, targetY] = getRotatePos(x, y, angle);
  81949. left = Math.min(left, targetX);
  81950. right = Math.max(right, targetX);
  81951. top = Math.min(top, targetY);
  81952. bottom = Math.max(bottom, targetY);
  81953. });
  81954. const cutLeft = left + realMaxSize / 2;
  81955. const cutTop = top + realMaxSize / 2;
  81956. const cutWidth = right - left;
  81957. const cutHeight = bottom - top;
  81958. // ================ Fill Alternate ================
  81959. const realGapX = gapX * ratio;
  81960. const realGapY = gapY * ratio;
  81961. const filledWidth = (cutWidth + realGapX) * 2;
  81962. const filledHeight = cutHeight + realGapY;
  81963. const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
  81964. const drawImg = (targetX = 0, targetY = 0) => {
  81965. fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY, cutWidth, cutHeight);
  81966. };
  81967. drawImg();
  81968. drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
  81969. drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
  81970. return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio];
  81971. };
  81972. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useCallback(getClips, []);
  81973. };
  81974. /* harmony default export */ var watermark_useClips = (useClips);
  81975. ;// ./components/watermark/useRafDebounce.ts
  81976. /**
  81977. * Callback will only execute last one for each raf
  81978. */
  81979. function useRafDebounce(callback) {
  81980. const executeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(false);
  81981. const rafRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
  81982. const wrapperCallback = (0,useEvent["default"])(callback);
  81983. return () => {
  81984. if (executeRef.current) {
  81985. return;
  81986. }
  81987. executeRef.current = true;
  81988. wrapperCallback();
  81989. rafRef.current = (0,raf["default"])(() => {
  81990. executeRef.current = false;
  81991. });
  81992. };
  81993. }
  81994. ;// ./components/watermark/useSingletonCache.ts
  81995. /**
  81996. * Singleton cache will only take latest `cacheParams` as key
  81997. * and return the result for callback matching.
  81998. */
  81999. function useSingletonCache() {
  82000. const cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([null, null]);
  82001. const getCache = (cacheKeys, callback) => {
  82002. const filteredKeys = cacheKeys.map(item => item instanceof HTMLElement || Number.isNaN(item) ? '' : item);
  82003. if (!(0,isEqual["default"])(cacheRef.current[0], filteredKeys)) {
  82004. cacheRef.current = [filteredKeys, callback()];
  82005. }
  82006. return cacheRef.current[1];
  82007. };
  82008. return getCache;
  82009. }
  82010. ;// ./components/watermark/utils.ts
  82011. /** converting camel-cased strings to be lowercase and link it with Separator */
  82012. function toLowercaseSeparator(key) {
  82013. return key.replace(/([A-Z])/g, '-$1').toLowerCase();
  82014. }
  82015. function getStyleStr(style) {
  82016. return Object.keys(style).map(key => `${toLowercaseSeparator(key)}: ${style[key]};`).join(' ');
  82017. }
  82018. /** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
  82019. function getPixelRatio() {
  82020. return window.devicePixelRatio || 1;
  82021. }
  82022. /** Whether to re-render the watermark */
  82023. const reRendering = (mutation, isWatermarkEle) => {
  82024. let flag = false;
  82025. // Whether to delete the watermark node
  82026. if (mutation.removedNodes.length) {
  82027. flag = Array.from(mutation.removedNodes).some(node => isWatermarkEle(node));
  82028. }
  82029. // Whether the watermark dom property value has been modified
  82030. if (mutation.type === 'attributes' && isWatermarkEle(mutation.target)) {
  82031. flag = true;
  82032. }
  82033. return flag;
  82034. };
  82035. ;// ./components/watermark/useWatermark.ts
  82036. /**
  82037. * Base size of the canvas, 1 for parallel layout and 2 for alternate layout
  82038. * Only alternate layout is currently supported
  82039. */
  82040. const BaseSize = 2;
  82041. const useWatermark_FontGap = 3;
  82042. // Prevent external hidden elements from adding accent styles
  82043. const emphasizedStyle = {
  82044. visibility: 'visible !important'
  82045. };
  82046. function useWatermark(markStyle) {
  82047. const watermarkMap = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(new Map());
  82048. const appendWatermark = (base64Url, markWidth, container) => {
  82049. if (container) {
  82050. if (!watermarkMap.current.get(container)) {
  82051. const newWatermarkEle = document.createElement('div');
  82052. watermarkMap.current.set(container, newWatermarkEle);
  82053. }
  82054. const watermarkEle = watermarkMap.current.get(container);
  82055. watermarkEle.setAttribute('style', getStyleStr(Object.assign(Object.assign(Object.assign({}, markStyle), {
  82056. backgroundImage: `url('${base64Url}')`,
  82057. backgroundSize: `${Math.floor(markWidth)}px`
  82058. }), emphasizedStyle)));
  82059. // Prevents using the browser `Hide Element` to hide watermarks
  82060. watermarkEle.removeAttribute('class');
  82061. watermarkEle.removeAttribute('hidden');
  82062. if (watermarkEle.parentElement !== container) {
  82063. container.append(watermarkEle);
  82064. }
  82065. }
  82066. return watermarkMap.current.get(container);
  82067. };
  82068. const removeWatermark = container => {
  82069. const watermarkEle = watermarkMap.current.get(container);
  82070. if (watermarkEle && container) {
  82071. container.removeChild(watermarkEle);
  82072. }
  82073. watermarkMap.current.delete(container);
  82074. };
  82075. const isWatermarkEle = ele => Array.from(watermarkMap.current.values()).includes(ele);
  82076. return [appendWatermark, removeWatermark, isWatermarkEle];
  82077. }
  82078. ;// ./components/watermark/index.tsx
  82079. /**
  82080. * Only return `next` when size changed.
  82081. * This is only used for elements compare, not a shallow equal!
  82082. */
  82083. function getSizeDiff(prev, next) {
  82084. return prev.size === next.size ? prev : next;
  82085. }
  82086. const DEFAULT_GAP_X = 100;
  82087. const DEFAULT_GAP_Y = 100;
  82088. const fixedStyle = {
  82089. position: 'relative',
  82090. overflow: 'hidden'
  82091. };
  82092. const Watermark = props => {
  82093. var _a, _b;
  82094. const {
  82095. /**
  82096. * The antd content layer zIndex is basically below 10
  82097. * https://github.com/ant-design/ant-design/blob/6192403b2ce517c017f9e58a32d58774921c10cd/components/style/themes/default.less#L335
  82098. */
  82099. zIndex = 9,
  82100. rotate = -22,
  82101. width,
  82102. height,
  82103. image,
  82104. content,
  82105. font = {},
  82106. style,
  82107. className,
  82108. rootClassName,
  82109. gap = [DEFAULT_GAP_X, DEFAULT_GAP_Y],
  82110. offset,
  82111. children,
  82112. inherit = true
  82113. } = props;
  82114. const mergedStyle = Object.assign(Object.assign({}, fixedStyle), style);
  82115. const [, token] = (0,useToken["default"])();
  82116. const {
  82117. color = token.colorFill,
  82118. fontSize = token.fontSizeLG,
  82119. fontWeight = 'normal',
  82120. fontStyle = 'normal',
  82121. fontFamily = 'sans-serif',
  82122. textAlign = 'center'
  82123. } = font;
  82124. const [gapX = DEFAULT_GAP_X, gapY = DEFAULT_GAP_Y] = gap;
  82125. const gapXCenter = gapX / 2;
  82126. const gapYCenter = gapY / 2;
  82127. const offsetLeft = (_a = offset === null || offset === void 0 ? void 0 : offset[0]) !== null && _a !== void 0 ? _a : gapXCenter;
  82128. const offsetTop = (_b = offset === null || offset === void 0 ? void 0 : offset[1]) !== null && _b !== void 0 ? _b : gapYCenter;
  82129. const markStyle = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  82130. const mergedMarkStyle = {
  82131. zIndex,
  82132. position: 'absolute',
  82133. left: 0,
  82134. top: 0,
  82135. width: '100%',
  82136. height: '100%',
  82137. pointerEvents: 'none',
  82138. backgroundRepeat: 'repeat'
  82139. };
  82140. /** Calculate the style of the offset */
  82141. let positionLeft = offsetLeft - gapXCenter;
  82142. let positionTop = offsetTop - gapYCenter;
  82143. if (positionLeft > 0) {
  82144. mergedMarkStyle.left = `${positionLeft}px`;
  82145. mergedMarkStyle.width = `calc(100% - ${positionLeft}px)`;
  82146. positionLeft = 0;
  82147. }
  82148. if (positionTop > 0) {
  82149. mergedMarkStyle.top = `${positionTop}px`;
  82150. mergedMarkStyle.height = `calc(100% - ${positionTop}px)`;
  82151. positionTop = 0;
  82152. }
  82153. mergedMarkStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
  82154. return mergedMarkStyle;
  82155. }, [zIndex, offsetLeft, gapXCenter, offsetTop, gapYCenter]);
  82156. const [container, setContainer] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState();
  82157. // Used for nest case like Modal, Drawer
  82158. const [subElements, setSubElements] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(() => new Set());
  82159. // Nest elements should also support watermark
  82160. const targetElements = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  82161. const list = container ? [container] : [];
  82162. return [].concat(list, (0,toConsumableArray["default"])(Array.from(subElements)));
  82163. }, [container, subElements]);
  82164. // ============================ Content =============================
  82165. /**
  82166. * Get the width and height of the watermark. The default values are as follows
  82167. * Image: [120, 64]; Content: It's calculated by content;
  82168. */
  82169. const getMarkSize = ctx => {
  82170. let defaultWidth = 120;
  82171. let defaultHeight = 64;
  82172. if (!image && ctx.measureText) {
  82173. ctx.font = `${Number(fontSize)}px ${fontFamily}`;
  82174. const contents = _util_toList(content);
  82175. const sizes = contents.map(item => {
  82176. const metrics = ctx.measureText(item);
  82177. return [metrics.width, metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent];
  82178. });
  82179. defaultWidth = Math.ceil(Math.max.apply(Math, (0,toConsumableArray["default"])(sizes.map(size => size[0]))));
  82180. defaultHeight = Math.ceil(Math.max.apply(Math, (0,toConsumableArray["default"])(sizes.map(size => size[1])))) * contents.length + (contents.length - 1) * FontGap;
  82181. }
  82182. return [width !== null && width !== void 0 ? width : defaultWidth, height !== null && height !== void 0 ? height : defaultHeight];
  82183. };
  82184. const getClips = watermark_useClips();
  82185. const getClipsCache = useSingletonCache();
  82186. const [watermarkInfo, setWatermarkInfo] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(null);
  82187. // Generate new Watermark content
  82188. const renderWatermark = () => {
  82189. const canvas = document.createElement('canvas');
  82190. const ctx = canvas.getContext('2d');
  82191. if (ctx) {
  82192. const ratio = getPixelRatio();
  82193. const [markWidth, markHeight] = getMarkSize(ctx);
  82194. const drawCanvas = drawContent => {
  82195. const params = [drawContent || '', rotate, ratio, markWidth, markHeight, {
  82196. color,
  82197. fontSize,
  82198. fontStyle,
  82199. fontWeight,
  82200. fontFamily,
  82201. textAlign
  82202. }, gapX, gapY];
  82203. const [nextClips, clipWidth] = getClipsCache(params, () => getClips.apply(void 0, params));
  82204. setWatermarkInfo([nextClips, clipWidth]);
  82205. };
  82206. if (image) {
  82207. const img = new Image();
  82208. img.onload = () => {
  82209. drawCanvas(img);
  82210. };
  82211. img.onerror = () => {
  82212. drawCanvas(content);
  82213. };
  82214. img.crossOrigin = 'anonymous';
  82215. img.referrerPolicy = 'no-referrer';
  82216. img.src = image;
  82217. } else {
  82218. drawCanvas(content);
  82219. }
  82220. }
  82221. };
  82222. const syncWatermark = useRafDebounce(renderWatermark);
  82223. // ============================= Effect =============================
  82224. // Append watermark to the container
  82225. const [appendWatermark, removeWatermark, isWatermarkEle] = useWatermark(markStyle);
  82226. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
  82227. if (watermarkInfo) {
  82228. targetElements.forEach(holder => {
  82229. appendWatermark(watermarkInfo[0], watermarkInfo[1], holder);
  82230. });
  82231. }
  82232. }, [watermarkInfo, targetElements]);
  82233. // ============================ Observe =============================
  82234. const onMutate = (0,useEvent["default"])(mutations => {
  82235. mutations.forEach(mutation => {
  82236. if (reRendering(mutation, isWatermarkEle)) {
  82237. syncWatermark();
  82238. } else if (mutation.target === container && mutation.attributeName === 'style') {
  82239. // We've only force container not modify.
  82240. // Not consider nest case.
  82241. const keyStyles = Object.keys(fixedStyle);
  82242. for (let i = 0; i < keyStyles.length; i += 1) {
  82243. const key = keyStyles[i];
  82244. const oriValue = mergedStyle[key];
  82245. const currentValue = container.style[key];
  82246. if (oriValue && oriValue !== currentValue) {
  82247. container.style[key] = oriValue;
  82248. }
  82249. }
  82250. }
  82251. });
  82252. });
  82253. useMutateObserver(targetElements, onMutate);
  82254. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(syncWatermark, [rotate, zIndex, width, height, image, content, color, fontSize, fontWeight, fontStyle, fontFamily, textAlign, gapX, gapY, offsetLeft, offsetTop]);
  82255. // ============================ Context =============================
  82256. const watermarkContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => ({
  82257. add: ele => {
  82258. setSubElements(prev => {
  82259. const clone = new Set(prev);
  82260. clone.add(ele);
  82261. return getSizeDiff(prev, clone);
  82262. });
  82263. },
  82264. remove: ele => {
  82265. removeWatermark(ele);
  82266. setSubElements(prev => {
  82267. const clone = new Set(prev);
  82268. clone.delete(ele);
  82269. return getSizeDiff(prev, clone);
  82270. });
  82271. }
  82272. }), []);
  82273. // ============================= Render =============================
  82274. const childNode = inherit ? (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(watermark_context.Provider, {
  82275. value: watermarkContext
  82276. }, children)) : children;
  82277. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82278. ref: setContainer,
  82279. className: classnames_default()(className, rootClassName),
  82280. style: mergedStyle
  82281. }, childNode);
  82282. };
  82283. if (true) {
  82284. Watermark.displayName = 'Watermark';
  82285. }
  82286. /* harmony default export */ var watermark = (Watermark);
  82287. ;// ./components/splitter/Panel.tsx
  82288. const InternalPanel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((props, ref) => {
  82289. const {
  82290. prefixCls,
  82291. className,
  82292. children,
  82293. size,
  82294. style = {}
  82295. } = props;
  82296. const panelClassName = classnames_default()(`${prefixCls}-panel`, {
  82297. [`${prefixCls}-panel-hidden`]: size === 0
  82298. }, className);
  82299. const hasSize = size !== undefined;
  82300. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82301. ref: ref,
  82302. className: panelClassName,
  82303. style: Object.assign(Object.assign({}, style), {
  82304. // Use auto when start from ssr
  82305. flexBasis: hasSize ? size : 'auto',
  82306. flexGrow: hasSize ? 0 : 1
  82307. })
  82308. }, children);
  82309. });
  82310. if (true) {
  82311. InternalPanel.displayName = 'Panel';
  82312. }
  82313. const splitter_Panel_Panel = () => null;
  82314. /* harmony default export */ var splitter_Panel = (splitter_Panel_Panel);
  82315. ;// ./components/splitter/hooks/useItems.ts
  82316. var splitter_hooks_useItems_rest = undefined && undefined.__rest || function (s, e) {
  82317. var t = {};
  82318. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  82319. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  82320. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  82321. }
  82322. return t;
  82323. };
  82324. function getCollapsible(collapsible) {
  82325. if (collapsible && typeof collapsible === 'object') {
  82326. return Object.assign(Object.assign({}, collapsible), {
  82327. showCollapsibleIcon: collapsible.showCollapsibleIcon === undefined ? 'auto' : collapsible.showCollapsibleIcon
  82328. });
  82329. }
  82330. const mergedCollapsible = !!collapsible;
  82331. return {
  82332. start: mergedCollapsible,
  82333. end: mergedCollapsible,
  82334. showCollapsibleIcon: 'auto'
  82335. };
  82336. }
  82337. /**
  82338. * Convert `children` into `items`.
  82339. */
  82340. function hooks_useItems_useItems(children) {
  82341. const items = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => (0,toArray["default"])(children).filter(item => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(item)).map(node => {
  82342. const {
  82343. props
  82344. } = node;
  82345. const {
  82346. collapsible
  82347. } = props,
  82348. restProps = splitter_hooks_useItems_rest(props, ["collapsible"]);
  82349. return Object.assign(Object.assign({}, restProps), {
  82350. collapsible: getCollapsible(collapsible)
  82351. });
  82352. }), [children]);
  82353. return items;
  82354. }
  82355. /* harmony default export */ var hooks_useItems = (hooks_useItems_useItems);
  82356. ;// ./components/splitter/hooks/useResizable.ts
  82357. function getShowCollapsibleIcon(prev, next) {
  82358. if (prev.collapsible && next.collapsible) {
  82359. if (prev.showCollapsibleIcon === true || next.showCollapsibleIcon === true) {
  82360. return true;
  82361. }
  82362. if (prev.showCollapsibleIcon === 'auto' || next.showCollapsibleIcon === 'auto') {
  82363. return 'auto';
  82364. }
  82365. return false;
  82366. }
  82367. if (prev.collapsible) {
  82368. return prev.showCollapsibleIcon;
  82369. }
  82370. if (next.collapsible) {
  82371. return next.showCollapsibleIcon;
  82372. }
  82373. return false;
  82374. }
  82375. function useResizable(items, pxSizes, isRTL) {
  82376. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(() => {
  82377. const resizeInfos = [];
  82378. for (let i = 0; i < items.length - 1; i += 1) {
  82379. const prevItem = items[i];
  82380. const nextItem = items[i + 1];
  82381. const prevSize = pxSizes[i];
  82382. const nextSize = pxSizes[i + 1];
  82383. const {
  82384. resizable: prevResizable = true,
  82385. min: prevMin,
  82386. collapsible: prevCollapsible
  82387. } = prevItem;
  82388. const {
  82389. resizable: nextResizable = true,
  82390. min: nextMin,
  82391. collapsible: nextCollapsible
  82392. } = nextItem;
  82393. const mergedResizable =
  82394. // Both need to be resizable
  82395. prevResizable && nextResizable && (
  82396. // Prev is not collapsed and limit min size
  82397. prevSize !== 0 || !prevMin) && (
  82398. // Next is not collapsed and limit min size
  82399. nextSize !== 0 || !nextMin);
  82400. const prevEndCollapsible = !!prevCollapsible.end && prevSize > 0;
  82401. const nextStartExpandable = !!nextCollapsible.start && nextSize === 0 && prevSize > 0;
  82402. const startCollapsible = prevEndCollapsible || nextStartExpandable;
  82403. const nextStartCollapsible = !!nextCollapsible.start && nextSize > 0;
  82404. const prevEndExpandable = !!prevCollapsible.end && prevSize === 0 && nextSize > 0;
  82405. const endCollapsible = nextStartCollapsible || prevEndExpandable;
  82406. const showStartCollapsibleIcon = getShowCollapsibleIcon({
  82407. collapsible: prevEndCollapsible,
  82408. showCollapsibleIcon: prevCollapsible.showCollapsibleIcon
  82409. }, {
  82410. collapsible: nextStartExpandable,
  82411. showCollapsibleIcon: nextCollapsible.showCollapsibleIcon
  82412. });
  82413. const showEndCollapsibleIcon = getShowCollapsibleIcon({
  82414. collapsible: nextStartCollapsible,
  82415. showCollapsibleIcon: nextCollapsible.showCollapsibleIcon
  82416. }, {
  82417. collapsible: prevEndExpandable,
  82418. showCollapsibleIcon: prevCollapsible.showCollapsibleIcon
  82419. });
  82420. resizeInfos[i] = {
  82421. resizable: mergedResizable,
  82422. startCollapsible: !!(isRTL ? endCollapsible : startCollapsible),
  82423. endCollapsible: !!(isRTL ? startCollapsible : endCollapsible),
  82424. showStartCollapsibleIcon: isRTL ? showEndCollapsibleIcon : showStartCollapsibleIcon,
  82425. showEndCollapsibleIcon: isRTL ? showStartCollapsibleIcon : showEndCollapsibleIcon
  82426. };
  82427. }
  82428. return resizeInfos;
  82429. }, [pxSizes, items]);
  82430. }
  82431. ;// ./components/splitter/hooks/sizeUtil.ts
  82432. function autoPtgSizes(ptgSizes, minPtgSizes, maxPtgSizes) {
  82433. // Static current data
  82434. let currentTotalPtg = 0;
  82435. const undefinedIndexes = [];
  82436. ptgSizes.forEach((size, index) => {
  82437. if (size === undefined) {
  82438. undefinedIndexes.push(index);
  82439. } else {
  82440. currentTotalPtg += size;
  82441. }
  82442. });
  82443. const restPtg = 1 - currentTotalPtg;
  82444. const undefinedCount = undefinedIndexes.length;
  82445. // Fill if exceed
  82446. if (restPtg < 0) {
  82447. const scale = 1 / currentTotalPtg;
  82448. return ptgSizes.map(size => size === undefined ? 0 : size * scale);
  82449. }
  82450. // Check if limit exists
  82451. let sumMin = 0;
  82452. let sumMax = 0;
  82453. let limitMin = 0;
  82454. let limitMax = 1;
  82455. for (const index of undefinedIndexes) {
  82456. const min = minPtgSizes[index] || 0;
  82457. const max = maxPtgSizes[index] || 1;
  82458. sumMin += min;
  82459. sumMax += max;
  82460. limitMin = Math.max(limitMin, min);
  82461. limitMax = Math.min(limitMax, max);
  82462. }
  82463. // Impossible case, just average fill
  82464. if (sumMin > 1 && sumMax < 1) {
  82465. const avg = 1 / undefinedCount;
  82466. return ptgSizes.map(size => size === undefined ? avg : size);
  82467. }
  82468. // Quickly fill if can
  82469. const restAvg = restPtg / undefinedCount;
  82470. if (limitMin <= restAvg && restAvg <= limitMax) {
  82471. return ptgSizes.map(size => size === undefined ? restAvg : size);
  82472. }
  82473. // Greedy algorithm
  82474. const result = (0,toConsumableArray["default"])(ptgSizes);
  82475. let remain = restPtg - sumMin;
  82476. for (let i = 0; i < undefinedCount; i += 1) {
  82477. const index = undefinedIndexes[i];
  82478. const min = minPtgSizes[index] || 0;
  82479. const max = maxPtgSizes[index] || 1;
  82480. result[index] = min;
  82481. const canAdd = max - min;
  82482. const add = Math.min(canAdd, remain);
  82483. result[index] += add;
  82484. remain -= add;
  82485. }
  82486. return result;
  82487. }
  82488. ;// ./components/splitter/hooks/useSizes.ts
  82489. function getPtg(str) {
  82490. return Number(str.slice(0, -1)) / 100;
  82491. }
  82492. function isPtg(itemSize) {
  82493. return typeof itemSize === 'string' && itemSize.endsWith('%');
  82494. }
  82495. /**
  82496. * Save the size state.
  82497. * Align the size into flex percentage base.
  82498. */
  82499. function useSizes(items, containerSize) {
  82500. const propSizes = items.map(item => item.size);
  82501. const itemsCount = items.length;
  82502. const mergedContainerSize = containerSize || 0;
  82503. const ptg2px = ptg => ptg * mergedContainerSize;
  82504. // We do not need care the size state match the `items` length in `useState`.
  82505. // It will calculate later.
  82506. const [innerSizes, setInnerSizes] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(() => items.map(item => item.defaultSize));
  82507. const sizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  82508. var _a;
  82509. const mergedSizes = [];
  82510. for (let i = 0; i < itemsCount; i += 1) {
  82511. mergedSizes[i] = (_a = propSizes[i]) !== null && _a !== void 0 ? _a : innerSizes[i];
  82512. }
  82513. return mergedSizes;
  82514. }, [itemsCount, innerSizes, propSizes]);
  82515. const postPercentMinSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => items.map(item => {
  82516. if (isPtg(item.min)) {
  82517. return getPtg(item.min);
  82518. }
  82519. return (item.min || 0) / mergedContainerSize;
  82520. }), [items, mergedContainerSize]);
  82521. const postPercentMaxSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => items.map(item => {
  82522. if (isPtg(item.max)) {
  82523. return getPtg(item.max);
  82524. }
  82525. return (item.max || mergedContainerSize) / mergedContainerSize;
  82526. }), [items, mergedContainerSize]);
  82527. // Post handle the size. Will do:
  82528. // 1. Convert all the px into percentage if not empty.
  82529. // 2. Get rest percentage for exist percentage.
  82530. // 3. Fill the rest percentage into empty item.
  82531. const postPercentSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  82532. const ptgList = [];
  82533. // Fill default percentage
  82534. for (let i = 0; i < itemsCount; i += 1) {
  82535. const itemSize = sizes[i];
  82536. if (isPtg(itemSize)) {
  82537. ptgList[i] = getPtg(itemSize);
  82538. } else if (itemSize || itemSize === 0) {
  82539. const num = Number(itemSize);
  82540. if (!Number.isNaN(num)) {
  82541. ptgList[i] = num / mergedContainerSize;
  82542. }
  82543. } else {
  82544. ptgList[i] = undefined;
  82545. }
  82546. }
  82547. // Use autoPtgSizes to handle the undefined sizes
  82548. return autoPtgSizes(ptgList, postPercentMinSizes, postPercentMaxSizes);
  82549. }, [sizes, mergedContainerSize, postPercentMinSizes, postPercentMaxSizes]);
  82550. const postPxSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => postPercentSizes.map(ptg2px), [postPercentSizes, mergedContainerSize]);
  82551. // If ssr, we will use the size from developer config first.
  82552. const panelSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => containerSize ? postPxSizes : sizes, [postPxSizes, containerSize]);
  82553. return [panelSizes, postPxSizes, postPercentSizes, postPercentMinSizes, postPercentMaxSizes, setInnerSizes];
  82554. }
  82555. ;// ./components/splitter/hooks/useResize.ts
  82556. /**
  82557. * Handle user drag resize logic.
  82558. */
  82559. function useResize(items, resizableInfos, percentSizes, containerSize, updateSizes, isRTL) {
  82560. const limitSizes = items.map(item => [item.min, item.max]);
  82561. const mergedContainerSize = containerSize || 0;
  82562. const ptg2px = ptg => ptg * mergedContainerSize;
  82563. // ======================== Resize ========================
  82564. function getLimitSize(str, defaultLimit) {
  82565. if (typeof str === 'string') {
  82566. return ptg2px(getPtg(str));
  82567. }
  82568. return str !== null && str !== void 0 ? str : defaultLimit;
  82569. }
  82570. // Real px sizes
  82571. const [cacheSizes, setCacheSizes] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState([]);
  82572. const cacheCollapsedSize = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef([]);
  82573. /**
  82574. * When start drag, check the direct is `start` or `end`.
  82575. * This will handle when 2 splitter bar are in the same position.
  82576. */
  82577. const [movingIndex, setMovingIndex] = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(null);
  82578. const getPxSizes = () => percentSizes.map(ptg2px);
  82579. const onOffsetStart = index => {
  82580. setCacheSizes(getPxSizes());
  82581. setMovingIndex({
  82582. index,
  82583. confirmed: false
  82584. });
  82585. };
  82586. const onOffsetUpdate = (index, offset) => {
  82587. var _a;
  82588. // First time trigger move index update is not sync in the state
  82589. let confirmedIndex = null;
  82590. // We need to know what the real index is.
  82591. if ((!movingIndex || !movingIndex.confirmed) && offset !== 0) {
  82592. // Search for the real index
  82593. if (offset > 0) {
  82594. confirmedIndex = index;
  82595. setMovingIndex({
  82596. index,
  82597. confirmed: true
  82598. });
  82599. } else {
  82600. for (let i = index; i >= 0; i -= 1) {
  82601. if (cacheSizes[i] > 0 && resizableInfos[i].resizable) {
  82602. confirmedIndex = i;
  82603. setMovingIndex({
  82604. index: i,
  82605. confirmed: true
  82606. });
  82607. break;
  82608. }
  82609. }
  82610. }
  82611. }
  82612. const mergedIndex = (_a = confirmedIndex !== null && confirmedIndex !== void 0 ? confirmedIndex : movingIndex === null || movingIndex === void 0 ? void 0 : movingIndex.index) !== null && _a !== void 0 ? _a : index;
  82613. const numSizes = (0,toConsumableArray["default"])(cacheSizes);
  82614. const nextIndex = mergedIndex + 1;
  82615. // Get boundary
  82616. const startMinSize = getLimitSize(limitSizes[mergedIndex][0], 0);
  82617. const endMinSize = getLimitSize(limitSizes[nextIndex][0], 0);
  82618. const startMaxSize = getLimitSize(limitSizes[mergedIndex][1], mergedContainerSize);
  82619. const endMaxSize = getLimitSize(limitSizes[nextIndex][1], mergedContainerSize);
  82620. let mergedOffset = offset;
  82621. // Align with the boundary
  82622. if (numSizes[mergedIndex] + mergedOffset < startMinSize) {
  82623. mergedOffset = startMinSize - numSizes[mergedIndex];
  82624. }
  82625. if (numSizes[nextIndex] - mergedOffset < endMinSize) {
  82626. mergedOffset = numSizes[nextIndex] - endMinSize;
  82627. }
  82628. if (numSizes[mergedIndex] + mergedOffset > startMaxSize) {
  82629. mergedOffset = startMaxSize - numSizes[mergedIndex];
  82630. }
  82631. if (numSizes[nextIndex] - mergedOffset > endMaxSize) {
  82632. mergedOffset = numSizes[nextIndex] - endMaxSize;
  82633. }
  82634. // Do offset
  82635. numSizes[mergedIndex] += mergedOffset;
  82636. numSizes[nextIndex] -= mergedOffset;
  82637. updateSizes(numSizes);
  82638. return numSizes;
  82639. };
  82640. const onOffsetEnd = () => {
  82641. setMovingIndex(null);
  82642. };
  82643. // ======================= Collapse =======================
  82644. const onCollapse = (index, type) => {
  82645. const currentSizes = getPxSizes();
  82646. const adjustedType = isRTL ? type === 'start' ? 'end' : 'start' : type;
  82647. const currentIndex = adjustedType === 'start' ? index : index + 1;
  82648. const targetIndex = adjustedType === 'start' ? index + 1 : index;
  82649. const currentSize = currentSizes[currentIndex];
  82650. const targetSize = currentSizes[targetIndex];
  82651. if (currentSize !== 0 && targetSize !== 0) {
  82652. // Collapse directly
  82653. currentSizes[currentIndex] = 0;
  82654. currentSizes[targetIndex] += currentSize;
  82655. cacheCollapsedSize.current[index] = currentSize;
  82656. } else {
  82657. const totalSize = currentSize + targetSize;
  82658. const currentSizeMin = getLimitSize(limitSizes[currentIndex][0], 0);
  82659. const currentSizeMax = getLimitSize(limitSizes[currentIndex][1], mergedContainerSize);
  82660. const targetSizeMin = getLimitSize(limitSizes[targetIndex][0], 0);
  82661. const targetSizeMax = getLimitSize(limitSizes[targetIndex][1], mergedContainerSize);
  82662. const limitStart = Math.max(currentSizeMin, totalSize - targetSizeMax);
  82663. const limitEnd = Math.min(currentSizeMax, totalSize - targetSizeMin);
  82664. const halfOffset = targetSizeMin || (limitEnd - limitStart) / 2;
  82665. const targetCacheCollapsedSize = cacheCollapsedSize.current[index];
  82666. const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
  82667. const shouldUseCache = targetCacheCollapsedSize && targetCacheCollapsedSize <= targetSizeMax && targetCacheCollapsedSize >= targetSizeMin && currentCacheCollapsedSize <= currentSizeMax && currentCacheCollapsedSize >= currentSizeMin;
  82668. if (shouldUseCache) {
  82669. currentSizes[targetIndex] = targetCacheCollapsedSize;
  82670. currentSizes[currentIndex] = currentCacheCollapsedSize;
  82671. } else {
  82672. currentSizes[currentIndex] -= halfOffset;
  82673. currentSizes[targetIndex] += halfOffset;
  82674. }
  82675. }
  82676. updateSizes(currentSizes);
  82677. return currentSizes;
  82678. };
  82679. return [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex === null || movingIndex === void 0 ? void 0 : movingIndex.index];
  82680. }
  82681. ;// ./components/splitter/SplitBar.tsx
  82682. function getValidNumber(num) {
  82683. return typeof num === 'number' && !Number.isNaN(num) && Number.isFinite(num) ? Math.round(num) : 0;
  82684. }
  82685. const SplitBar = props => {
  82686. const {
  82687. prefixCls,
  82688. vertical,
  82689. index,
  82690. active,
  82691. ariaNow,
  82692. ariaMin,
  82693. ariaMax,
  82694. resizable,
  82695. startCollapsible,
  82696. endCollapsible,
  82697. onOffsetStart,
  82698. onOffsetUpdate,
  82699. onOffsetEnd,
  82700. onCollapse,
  82701. lazy,
  82702. containerSize,
  82703. showStartCollapsibleIcon,
  82704. showEndCollapsibleIcon
  82705. } = props;
  82706. const splitBarPrefixCls = `${prefixCls}-bar`;
  82707. // ======================== Resize ========================
  82708. const [startPos, setStartPos] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
  82709. const [constrainedOffset, setConstrainedOffset] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0);
  82710. const constrainedOffsetX = vertical ? 0 : constrainedOffset;
  82711. const constrainedOffsetY = vertical ? constrainedOffset : 0;
  82712. const onMouseDown = e => {
  82713. if (resizable && e.currentTarget) {
  82714. setStartPos([e.pageX, e.pageY]);
  82715. onOffsetStart(index);
  82716. }
  82717. };
  82718. const onTouchStart = e => {
  82719. if (resizable && e.touches.length === 1) {
  82720. const touch = e.touches[0];
  82721. setStartPos([touch.pageX, touch.pageY]);
  82722. onOffsetStart(index);
  82723. }
  82724. };
  82725. // Updated constraint calculation
  82726. const getConstrainedOffset = rawOffset => {
  82727. const currentPos = containerSize * ariaNow / 100;
  82728. const newPos = currentPos + rawOffset;
  82729. // Calculate available space
  82730. const minAllowed = Math.max(0, containerSize * ariaMin / 100);
  82731. const maxAllowed = Math.min(containerSize, containerSize * ariaMax / 100);
  82732. // Constrain new position within bounds
  82733. const clampedPos = Math.max(minAllowed, Math.min(maxAllowed, newPos));
  82734. return clampedPos - currentPos;
  82735. };
  82736. const handleLazyMove = (0,useEvent["default"])((offsetX, offsetY) => {
  82737. const constrainedOffsetValue = getConstrainedOffset(vertical ? offsetY : offsetX);
  82738. setConstrainedOffset(constrainedOffsetValue);
  82739. });
  82740. const handleLazyEnd = (0,useEvent["default"])(() => {
  82741. onOffsetUpdate(index, constrainedOffsetX, constrainedOffsetY, true);
  82742. setConstrainedOffset(0);
  82743. onOffsetEnd(true);
  82744. });
  82745. const getVisibilityClass = mode => {
  82746. switch (mode) {
  82747. case true:
  82748. return `${splitBarPrefixCls}-collapse-bar-always-visible`;
  82749. case false:
  82750. return `${splitBarPrefixCls}-collapse-bar-always-hidden`;
  82751. case 'auto':
  82752. return `${splitBarPrefixCls}-collapse-bar-hover-only`;
  82753. }
  82754. };
  82755. (0,useLayoutEffect["default"])(() => {
  82756. if (!startPos) {
  82757. return;
  82758. }
  82759. const onMouseMove = e => {
  82760. const {
  82761. pageX,
  82762. pageY
  82763. } = e;
  82764. const offsetX = pageX - startPos[0];
  82765. const offsetY = pageY - startPos[1];
  82766. if (lazy) {
  82767. handleLazyMove(offsetX, offsetY);
  82768. } else {
  82769. onOffsetUpdate(index, offsetX, offsetY);
  82770. }
  82771. };
  82772. const onMouseUp = () => {
  82773. if (lazy) {
  82774. handleLazyEnd();
  82775. } else {
  82776. onOffsetEnd();
  82777. }
  82778. setStartPos(null);
  82779. };
  82780. const handleTouchMove = e => {
  82781. if (e.touches.length === 1) {
  82782. const touch = e.touches[0];
  82783. const offsetX = touch.pageX - startPos[0];
  82784. const offsetY = touch.pageY - startPos[1];
  82785. if (lazy) {
  82786. handleLazyMove(offsetX, offsetY);
  82787. } else {
  82788. onOffsetUpdate(index, offsetX, offsetY);
  82789. }
  82790. }
  82791. };
  82792. const handleTouchEnd = () => {
  82793. if (lazy) {
  82794. handleLazyEnd();
  82795. } else {
  82796. onOffsetEnd();
  82797. }
  82798. setStartPos(null);
  82799. };
  82800. const eventHandlerMap = {
  82801. mousemove: onMouseMove,
  82802. mouseup: onMouseUp,
  82803. touchmove: handleTouchMove,
  82804. touchend: handleTouchEnd
  82805. };
  82806. for (const [event, handler] of Object.entries(eventHandlerMap)) {
  82807. // eslint-disable-next-line react-web-api/no-leaked-event-listener
  82808. window.addEventListener(event, handler);
  82809. }
  82810. return () => {
  82811. for (const [event, handler] of Object.entries(eventHandlerMap)) {
  82812. window.removeEventListener(event, handler);
  82813. }
  82814. };
  82815. }, [startPos, index, lazy]);
  82816. const transformStyle = {
  82817. [`--${splitBarPrefixCls}-preview-offset`]: `${constrainedOffset}px`
  82818. };
  82819. // ======================== Render ========================
  82820. const StartIcon = vertical ? icons_UpOutlined : icons_LeftOutlined;
  82821. const EndIcon = vertical ? icons_DownOutlined : RightOutlined["default"];
  82822. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82823. className: splitBarPrefixCls,
  82824. role: "separator",
  82825. "aria-valuenow": getValidNumber(ariaNow),
  82826. "aria-valuemin": getValidNumber(ariaMin),
  82827. "aria-valuemax": getValidNumber(ariaMax)
  82828. }, lazy && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82829. className: classnames_default()(`${splitBarPrefixCls}-preview`, {
  82830. [`${splitBarPrefixCls}-preview-active`]: !!constrainedOffset
  82831. }),
  82832. style: transformStyle
  82833. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82834. className: classnames_default()(`${splitBarPrefixCls}-dragger`, {
  82835. [`${splitBarPrefixCls}-dragger-disabled`]: !resizable,
  82836. [`${splitBarPrefixCls}-dragger-active`]: active
  82837. }),
  82838. onMouseDown: onMouseDown,
  82839. onTouchStart: onTouchStart
  82840. }), startCollapsible && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82841. className: classnames_default()(`${splitBarPrefixCls}-collapse-bar`, `${splitBarPrefixCls}-collapse-bar-start`, getVisibilityClass(showStartCollapsibleIcon)),
  82842. onClick: () => onCollapse(index, 'start')
  82843. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(StartIcon, {
  82844. className: classnames_default()(`${splitBarPrefixCls}-collapse-icon`, `${splitBarPrefixCls}-collapse-start`)
  82845. }))), endCollapsible && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82846. className: classnames_default()(`${splitBarPrefixCls}-collapse-bar`, `${splitBarPrefixCls}-collapse-bar-end`, getVisibilityClass(showEndCollapsibleIcon)),
  82847. onClick: () => onCollapse(index, 'end')
  82848. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(EndIcon, {
  82849. className: classnames_default()(`${splitBarPrefixCls}-collapse-icon`, `${splitBarPrefixCls}-collapse-end`)
  82850. }))));
  82851. };
  82852. /* harmony default export */ var splitter_SplitBar = (SplitBar);
  82853. // EXTERNAL MODULE: ./components/splitter/style/index.ts
  82854. var splitter_style = __webpack_require__("./components/splitter/style/index.ts");
  82855. ;// ./components/splitter/Splitter.tsx
  82856. /* eslint-disable react/no-array-index-key */
  82857. const Splitter = props => {
  82858. const {
  82859. prefixCls: customizePrefixCls,
  82860. className,
  82861. style,
  82862. layout = 'horizontal',
  82863. children,
  82864. rootClassName,
  82865. onResizeStart,
  82866. onResize,
  82867. onResizeEnd,
  82868. lazy
  82869. } = props;
  82870. const {
  82871. getPrefixCls,
  82872. direction,
  82873. className: contextClassName,
  82874. style: contextStyle
  82875. } = (0,config_provider_context.useComponentConfig)('splitter');
  82876. const prefixCls = getPrefixCls('splitter', customizePrefixCls);
  82877. const rootCls = hooks_useCSSVarCls(prefixCls);
  82878. const [wrapCSSVar, hashId, cssVarCls] = (0,splitter_style["default"])(prefixCls, rootCls);
  82879. // ======================== Direct ========================
  82880. const isVertical = layout === 'vertical';
  82881. const isRTL = direction === 'rtl';
  82882. const reverse = !isVertical && isRTL;
  82883. // ====================== Items Data ======================
  82884. const items = hooks_useItems(children);
  82885. // >>> Warning for uncontrolled
  82886. if (true) {
  82887. const warning = (0,_util_warning.devUseWarning)('Splitter');
  82888. const existSize = items.some(item => item.size !== undefined);
  82889. const existUndefinedSize = items.some(item => item.size === undefined);
  82890. if (existSize && existUndefinedSize && !onResize) {
  82891. true ? warning(false, 'usage', 'When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.') : 0;
  82892. }
  82893. }
  82894. // ====================== Container =======================
  82895. const [containerSize, setContainerSize] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
  82896. const onContainerResize = size => {
  82897. const {
  82898. offsetWidth,
  82899. offsetHeight
  82900. } = size;
  82901. const containerSize = isVertical ? offsetHeight : offsetWidth;
  82902. // Skip when container has no size, Such as nested in a hidden tab panel
  82903. // to fix: https://github.com/ant-design/ant-design/issues/51106
  82904. if (containerSize === 0) {
  82905. return;
  82906. }
  82907. setContainerSize(containerSize);
  82908. };
  82909. // ========================= Size =========================
  82910. const [panelSizes, itemPxSizes, itemPtgSizes, itemPtgMinSizes, itemPtgMaxSizes, updateSizes] = useSizes(items, containerSize);
  82911. // ====================== Resizable =======================
  82912. const resizableInfos = useResizable(items, itemPxSizes, isRTL);
  82913. const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] = useResize(items, resizableInfos, itemPtgSizes, containerSize, updateSizes, isRTL);
  82914. // ======================== Events ========================
  82915. const onInternalResizeStart = (0,useEvent["default"])(index => {
  82916. onOffsetStart(index);
  82917. onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart(itemPxSizes);
  82918. });
  82919. const onInternalResizeUpdate = (0,useEvent["default"])((index, offset, lazyEnd) => {
  82920. const nextSizes = onOffsetUpdate(index, offset);
  82921. if (lazyEnd) {
  82922. onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(nextSizes);
  82923. } else {
  82924. onResize === null || onResize === void 0 ? void 0 : onResize(nextSizes);
  82925. }
  82926. });
  82927. const onInternalResizeEnd = (0,useEvent["default"])(lazyEnd => {
  82928. onOffsetEnd();
  82929. if (!lazyEnd) {
  82930. onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(itemPxSizes);
  82931. }
  82932. });
  82933. const onInternalCollapse = (0,useEvent["default"])((index, type) => {
  82934. const nextSizes = onCollapse(index, type);
  82935. onResize === null || onResize === void 0 ? void 0 : onResize(nextSizes);
  82936. onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(nextSizes);
  82937. });
  82938. // ======================== Styles ========================
  82939. const containerClassName = classnames_default()(prefixCls, className, `${prefixCls}-${layout}`, {
  82940. [`${prefixCls}-rtl`]: isRTL
  82941. }, rootClassName, contextClassName, cssVarCls, rootCls, hashId);
  82942. // ======================== Render ========================
  82943. const maskCls = `${prefixCls}-mask`;
  82944. const stackSizes = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(() => {
  82945. const mergedSizes = [];
  82946. let stack = 0;
  82947. for (let i = 0; i < items.length; i += 1) {
  82948. stack += itemPtgSizes[i];
  82949. mergedSizes.push(stack);
  82950. }
  82951. return mergedSizes;
  82952. }, [itemPtgSizes]);
  82953. const mergedStyle = Object.assign(Object.assign({}, contextStyle), style);
  82954. return wrapCSSVar(/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(es, {
  82955. onResize: onContainerResize
  82956. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  82957. style: mergedStyle,
  82958. className: containerClassName
  82959. }, items.map((item, idx) => {
  82960. // Panel
  82961. const panel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InternalPanel, Object.assign({}, item, {
  82962. prefixCls: prefixCls,
  82963. size: panelSizes[idx]
  82964. }));
  82965. // Split Bar
  82966. let splitBar = null;
  82967. const resizableInfo = resizableInfos[idx];
  82968. if (resizableInfo) {
  82969. const ariaMinStart = (stackSizes[idx - 1] || 0) + itemPtgMinSizes[idx];
  82970. const ariaMinEnd = (stackSizes[idx + 1] || 100) - itemPtgMaxSizes[idx + 1];
  82971. const ariaMaxStart = (stackSizes[idx - 1] || 0) + itemPtgMaxSizes[idx];
  82972. const ariaMaxEnd = (stackSizes[idx + 1] || 100) - itemPtgMinSizes[idx + 1];
  82973. splitBar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(splitter_SplitBar, {
  82974. lazy: lazy,
  82975. index: idx,
  82976. active: movingIndex === idx,
  82977. prefixCls: prefixCls,
  82978. vertical: isVertical,
  82979. resizable: resizableInfo.resizable,
  82980. ariaNow: stackSizes[idx] * 100,
  82981. ariaMin: Math.max(ariaMinStart, ariaMinEnd) * 100,
  82982. ariaMax: Math.min(ariaMaxStart, ariaMaxEnd) * 100,
  82983. startCollapsible: resizableInfo.startCollapsible,
  82984. endCollapsible: resizableInfo.endCollapsible,
  82985. showStartCollapsibleIcon: resizableInfo.showStartCollapsibleIcon,
  82986. showEndCollapsibleIcon: resizableInfo.showEndCollapsibleIcon,
  82987. onOffsetStart: onInternalResizeStart,
  82988. onOffsetUpdate: (index, offsetX, offsetY, lazyEnd) => {
  82989. let offset = isVertical ? offsetY : offsetX;
  82990. if (reverse) {
  82991. offset = -offset;
  82992. }
  82993. onInternalResizeUpdate(index, offset, lazyEnd);
  82994. },
  82995. onOffsetEnd: onInternalResizeEnd,
  82996. onCollapse: onInternalCollapse,
  82997. containerSize: containerSize || 0
  82998. });
  82999. }
  83000. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
  83001. key: `split-panel-${idx}`
  83002. }, panel, splitBar);
  83003. }), typeof movingIndex === 'number' && (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  83004. "aria-hidden": true,
  83005. className: classnames_default()(maskCls, `${maskCls}-${layout}`)
  83006. })))));
  83007. };
  83008. if (true) {
  83009. Splitter.displayName = 'Splitter';
  83010. }
  83011. /* harmony default export */ var splitter_Splitter = (Splitter);
  83012. ;// ./components/splitter/index.tsx
  83013. const components_splitter_Splitter = splitter_Splitter;
  83014. components_splitter_Splitter.Panel = splitter_Panel;
  83015. /* harmony default export */ var splitter = (components_splitter_Splitter);
  83016. ;// ./components/index.ts
  83017. // TODO: Remove in v6
  83018. /***/ }),
  83019. /***/ "./components/input-number/style/index.ts":
  83020. /*!************************************************************!*\
  83021. !*** ./components/input-number/style/index.ts + 1 modules ***!
  83022. \************************************************************/
  83023. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  83024. "use strict";
  83025. // ESM COMPAT FLAG
  83026. __webpack_require__.r(__webpack_exports__);
  83027. // EXPORTS
  83028. __webpack_require__.d(__webpack_exports__, {
  83029. "default": function() { return /* binding */ input_number_style; },
  83030. genRadiusStyle: function() { return /* binding */ genRadiusStyle; }
  83031. });
  83032. // EXTERNAL MODULE: ./alias/cssinjs.js
  83033. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  83034. // EXTERNAL MODULE: ./components/input/style/index.ts
  83035. var style = __webpack_require__("./components/input/style/index.ts");
  83036. // EXTERNAL MODULE: ./components/input/style/token.ts
  83037. var style_token = __webpack_require__("./components/input/style/token.ts");
  83038. // EXTERNAL MODULE: ./components/input/style/variants.ts
  83039. var variants = __webpack_require__("./components/input/style/variants.ts");
  83040. // EXTERNAL MODULE: ./components/style/index.tsx
  83041. var components_style = __webpack_require__("./components/style/index.tsx");
  83042. // EXTERNAL MODULE: ./components/style/compact-item.ts
  83043. var compact_item = __webpack_require__("./components/style/compact-item.ts");
  83044. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  83045. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  83046. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  83047. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  83048. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  83049. var fast_color_es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  83050. ;// ./components/input-number/style/token.ts
  83051. const prepareComponentToken = token => {
  83052. var _a;
  83053. const handleVisible = (_a = token.handleVisible) !== null && _a !== void 0 ? _a : 'auto';
  83054. const handleWidth = token.controlHeightSM - token.lineWidth * 2;
  83055. return Object.assign(Object.assign({}, (0,style_token.initComponentToken)(token)), {
  83056. controlWidth: 90,
  83057. handleWidth,
  83058. handleFontSize: token.fontSize / 2,
  83059. handleVisible,
  83060. handleActiveBg: token.colorFillAlter,
  83061. handleBg: token.colorBgContainer,
  83062. filledHandleBg: new fast_color_es.FastColor(token.colorFillSecondary).onBackground(token.colorBgContainer).toHexString(),
  83063. handleHoverColor: token.colorPrimary,
  83064. handleBorderColor: token.colorBorder,
  83065. handleOpacity: handleVisible === true ? 1 : 0,
  83066. handleVisibleWidth: handleVisible === true ? handleWidth : 0
  83067. });
  83068. };
  83069. ;// ./components/input-number/style/index.ts
  83070. const genRadiusStyle = ({
  83071. componentCls,
  83072. borderRadiusSM,
  83073. borderRadiusLG
  83074. }, size) => {
  83075. const borderRadius = size === 'lg' ? borderRadiusLG : borderRadiusSM;
  83076. return {
  83077. [`&-${size}`]: {
  83078. [`${componentCls}-handler-wrap`]: {
  83079. borderStartEndRadius: borderRadius,
  83080. borderEndEndRadius: borderRadius
  83081. },
  83082. [`${componentCls}-handler-up`]: {
  83083. borderStartEndRadius: borderRadius
  83084. },
  83085. [`${componentCls}-handler-down`]: {
  83086. borderEndEndRadius: borderRadius
  83087. }
  83088. }
  83089. };
  83090. };
  83091. const genInputNumberStyles = token => {
  83092. const {
  83093. componentCls,
  83094. lineWidth,
  83095. lineType,
  83096. borderRadius,
  83097. inputFontSizeSM,
  83098. inputFontSizeLG,
  83099. controlHeightLG,
  83100. controlHeightSM,
  83101. colorError,
  83102. paddingInlineSM,
  83103. paddingBlockSM,
  83104. paddingBlockLG,
  83105. paddingInlineLG,
  83106. colorIcon,
  83107. motionDurationMid,
  83108. handleHoverColor,
  83109. handleOpacity,
  83110. paddingInline,
  83111. paddingBlock,
  83112. handleBg,
  83113. handleActiveBg,
  83114. colorTextDisabled,
  83115. borderRadiusSM,
  83116. borderRadiusLG,
  83117. controlWidth,
  83118. handleBorderColor,
  83119. filledHandleBg,
  83120. lineHeightLG,
  83121. calc
  83122. } = token;
  83123. return [{
  83124. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), (0,style.genBasicInputStyle)(token)), {
  83125. display: 'inline-block',
  83126. width: controlWidth,
  83127. margin: 0,
  83128. padding: 0,
  83129. borderRadius
  83130. }), (0,variants.genOutlinedStyle)(token, {
  83131. [`${componentCls}-handler-wrap`]: {
  83132. background: handleBg,
  83133. [`${componentCls}-handler-down`]: {
  83134. borderBlockStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
  83135. }
  83136. }
  83137. })), (0,variants.genFilledStyle)(token, {
  83138. [`${componentCls}-handler-wrap`]: {
  83139. background: filledHandleBg,
  83140. [`${componentCls}-handler-down`]: {
  83141. borderBlockStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
  83142. }
  83143. },
  83144. '&:focus-within': {
  83145. [`${componentCls}-handler-wrap`]: {
  83146. background: handleBg
  83147. }
  83148. }
  83149. })), (0,variants.genUnderlinedStyle)(token, {
  83150. [`${componentCls}-handler-wrap`]: {
  83151. background: handleBg,
  83152. [`${componentCls}-handler-down`]: {
  83153. borderBlockStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`
  83154. }
  83155. }
  83156. })), (0,variants.genBorderlessStyle)(token)), {
  83157. '&-rtl': {
  83158. direction: 'rtl',
  83159. [`${componentCls}-input`]: {
  83160. direction: 'rtl'
  83161. }
  83162. },
  83163. '&-lg': {
  83164. padding: 0,
  83165. fontSize: inputFontSizeLG,
  83166. lineHeight: lineHeightLG,
  83167. borderRadius: borderRadiusLG,
  83168. [`input${componentCls}-input`]: {
  83169. height: calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal(),
  83170. padding: `${(0,cssinjs.unit)(paddingBlockLG)} ${(0,cssinjs.unit)(paddingInlineLG)}`
  83171. }
  83172. },
  83173. '&-sm': {
  83174. padding: 0,
  83175. fontSize: inputFontSizeSM,
  83176. borderRadius: borderRadiusSM,
  83177. [`input${componentCls}-input`]: {
  83178. height: calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal(),
  83179. padding: `${(0,cssinjs.unit)(paddingBlockSM)} ${(0,cssinjs.unit)(paddingInlineSM)}`
  83180. }
  83181. },
  83182. // ===================== Out Of Range =====================
  83183. '&-out-of-range': {
  83184. [`${componentCls}-input-wrap`]: {
  83185. input: {
  83186. color: colorError
  83187. }
  83188. }
  83189. },
  83190. // Style for input-group: input with label, with button or dropdown...
  83191. '&-group': Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), (0,style.genInputGroupStyle)(token)), {
  83192. '&-wrapper': Object.assign(Object.assign(Object.assign({
  83193. display: 'inline-block',
  83194. textAlign: 'start',
  83195. verticalAlign: 'top',
  83196. [`${componentCls}-affix-wrapper`]: {
  83197. width: '100%'
  83198. },
  83199. // Size
  83200. '&-lg': {
  83201. [`${componentCls}-group-addon`]: {
  83202. borderRadius: borderRadiusLG,
  83203. fontSize: token.fontSizeLG
  83204. }
  83205. },
  83206. '&-sm': {
  83207. [`${componentCls}-group-addon`]: {
  83208. borderRadius: borderRadiusSM
  83209. }
  83210. }
  83211. }, (0,variants.genOutlinedGroupStyle)(token)), (0,variants.genFilledGroupStyle)(token)), {
  83212. // Fix the issue of using icons in Space Compact mode
  83213. // https://github.com/ant-design/ant-design/issues/45764
  83214. [`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
  83215. [`${componentCls}, ${componentCls}-group-addon`]: {
  83216. borderRadius: 0
  83217. }
  83218. },
  83219. [`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {
  83220. [`${componentCls}, ${componentCls}-group-addon`]: {
  83221. borderStartEndRadius: 0,
  83222. borderEndEndRadius: 0
  83223. }
  83224. },
  83225. [`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {
  83226. [`${componentCls}, ${componentCls}-group-addon`]: {
  83227. borderStartStartRadius: 0,
  83228. borderEndStartRadius: 0
  83229. }
  83230. }
  83231. })
  83232. }),
  83233. [`&-disabled ${componentCls}-input`]: {
  83234. cursor: 'not-allowed'
  83235. },
  83236. [componentCls]: {
  83237. '&-input': Object.assign(Object.assign(Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), {
  83238. width: '100%',
  83239. padding: `${(0,cssinjs.unit)(paddingBlock)} ${(0,cssinjs.unit)(paddingInline)}`,
  83240. textAlign: 'start',
  83241. backgroundColor: 'transparent',
  83242. border: 0,
  83243. borderRadius,
  83244. outline: 0,
  83245. transition: `all ${motionDurationMid} linear`,
  83246. appearance: 'textfield',
  83247. fontSize: 'inherit'
  83248. }), (0,style.genPlaceholderStyle)(token.colorTextPlaceholder)), {
  83249. '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
  83250. margin: 0,
  83251. appearance: 'none'
  83252. }
  83253. })
  83254. },
  83255. [`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
  83256. width: token.handleWidth,
  83257. opacity: 1
  83258. }
  83259. })
  83260. },
  83261. // Handler
  83262. {
  83263. [componentCls]: Object.assign(Object.assign(Object.assign({
  83264. [`${componentCls}-handler-wrap`]: {
  83265. position: 'absolute',
  83266. insetBlockStart: 0,
  83267. insetInlineEnd: 0,
  83268. width: token.handleVisibleWidth,
  83269. opacity: handleOpacity,
  83270. height: '100%',
  83271. borderStartStartRadius: 0,
  83272. borderStartEndRadius: borderRadius,
  83273. borderEndEndRadius: borderRadius,
  83274. borderEndStartRadius: 0,
  83275. display: 'flex',
  83276. flexDirection: 'column',
  83277. alignItems: 'stretch',
  83278. transition: `all ${motionDurationMid}`,
  83279. overflow: 'hidden',
  83280. // Fix input number inside Menu makes icon too large
  83281. // We arise the selector priority by nest selector here
  83282. // https://github.com/ant-design/ant-design/issues/14367
  83283. [`${componentCls}-handler`]: {
  83284. display: 'flex',
  83285. alignItems: 'center',
  83286. justifyContent: 'center',
  83287. flex: 'auto',
  83288. height: '40%',
  83289. [`
  83290. ${componentCls}-handler-up-inner,
  83291. ${componentCls}-handler-down-inner
  83292. `]: {
  83293. marginInlineEnd: 0,
  83294. fontSize: token.handleFontSize
  83295. }
  83296. }
  83297. },
  83298. [`${componentCls}-handler`]: {
  83299. height: '50%',
  83300. overflow: 'hidden',
  83301. color: colorIcon,
  83302. fontWeight: 'bold',
  83303. lineHeight: 0,
  83304. textAlign: 'center',
  83305. cursor: 'pointer',
  83306. borderInlineStart: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`,
  83307. transition: `all ${motionDurationMid} linear`,
  83308. '&:active': {
  83309. background: handleActiveBg
  83310. },
  83311. // Hover
  83312. '&:hover': {
  83313. height: `60%`,
  83314. [`
  83315. ${componentCls}-handler-up-inner,
  83316. ${componentCls}-handler-down-inner
  83317. `]: {
  83318. color: handleHoverColor
  83319. }
  83320. },
  83321. '&-up-inner, &-down-inner': Object.assign(Object.assign({}, (0,components_style.resetIcon)()), {
  83322. color: colorIcon,
  83323. transition: `all ${motionDurationMid} linear`,
  83324. userSelect: 'none'
  83325. })
  83326. },
  83327. [`${componentCls}-handler-up`]: {
  83328. borderStartEndRadius: borderRadius
  83329. },
  83330. [`${componentCls}-handler-down`]: {
  83331. borderEndEndRadius: borderRadius
  83332. }
  83333. }, genRadiusStyle(token, 'lg')), genRadiusStyle(token, 'sm')), {
  83334. // Disabled
  83335. '&-disabled, &-readonly': {
  83336. [`${componentCls}-handler-wrap`]: {
  83337. display: 'none'
  83338. },
  83339. [`${componentCls}-input`]: {
  83340. color: 'inherit'
  83341. }
  83342. },
  83343. [`
  83344. ${componentCls}-handler-up-disabled,
  83345. ${componentCls}-handler-down-disabled
  83346. `]: {
  83347. cursor: 'not-allowed'
  83348. },
  83349. [`
  83350. ${componentCls}-handler-up-disabled:hover &-handler-up-inner,
  83351. ${componentCls}-handler-down-disabled:hover &-handler-down-inner
  83352. `]: {
  83353. color: colorTextDisabled
  83354. }
  83355. })
  83356. }];
  83357. };
  83358. const genAffixWrapperStyles = token => {
  83359. const {
  83360. componentCls,
  83361. paddingBlock,
  83362. paddingInline,
  83363. inputAffixPadding,
  83364. controlWidth,
  83365. borderRadiusLG,
  83366. borderRadiusSM,
  83367. paddingInlineLG,
  83368. paddingInlineSM,
  83369. paddingBlockLG,
  83370. paddingBlockSM,
  83371. motionDurationMid
  83372. } = token;
  83373. return {
  83374. [`${componentCls}-affix-wrapper`]: Object.assign(Object.assign({
  83375. [`input${componentCls}-input`]: {
  83376. padding: `${(0,cssinjs.unit)(paddingBlock)} 0`
  83377. }
  83378. }, (0,style.genBasicInputStyle)(token)), {
  83379. // or number handler will cover form status
  83380. position: 'relative',
  83381. display: 'inline-flex',
  83382. alignItems: 'center',
  83383. width: controlWidth,
  83384. padding: 0,
  83385. paddingInlineStart: paddingInline,
  83386. '&-lg': {
  83387. borderRadius: borderRadiusLG,
  83388. paddingInlineStart: paddingInlineLG,
  83389. [`input${componentCls}-input`]: {
  83390. padding: `${(0,cssinjs.unit)(paddingBlockLG)} 0`
  83391. }
  83392. },
  83393. '&-sm': {
  83394. borderRadius: borderRadiusSM,
  83395. paddingInlineStart: paddingInlineSM,
  83396. [`input${componentCls}-input`]: {
  83397. padding: `${(0,cssinjs.unit)(paddingBlockSM)} 0`
  83398. }
  83399. },
  83400. [`&:not(${componentCls}-disabled):hover`]: {
  83401. zIndex: 1
  83402. },
  83403. '&-focused, &:focus': {
  83404. zIndex: 1
  83405. },
  83406. [`&-disabled > ${componentCls}-disabled`]: {
  83407. background: 'transparent'
  83408. },
  83409. [`> div${componentCls}`]: {
  83410. width: '100%',
  83411. border: 'none',
  83412. outline: 'none',
  83413. [`&${componentCls}-focused`]: {
  83414. boxShadow: 'none !important'
  83415. }
  83416. },
  83417. '&::before': {
  83418. display: 'inline-block',
  83419. width: 0,
  83420. visibility: 'hidden',
  83421. content: '"\\a0"'
  83422. },
  83423. [`${componentCls}-handler-wrap`]: {
  83424. zIndex: 2
  83425. },
  83426. [componentCls]: {
  83427. position: 'static',
  83428. color: 'inherit',
  83429. '&-prefix, &-suffix': {
  83430. display: 'flex',
  83431. flex: 'none',
  83432. alignItems: 'center',
  83433. pointerEvents: 'none'
  83434. },
  83435. '&-prefix': {
  83436. marginInlineEnd: inputAffixPadding
  83437. },
  83438. '&-suffix': {
  83439. insetBlockStart: 0,
  83440. insetInlineEnd: 0,
  83441. height: '100%',
  83442. marginInlineEnd: paddingInline,
  83443. marginInlineStart: inputAffixPadding,
  83444. transition: `margin ${motionDurationMid}`
  83445. }
  83446. },
  83447. [`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {
  83448. width: token.handleWidth,
  83449. opacity: 1
  83450. },
  83451. [`&:not(${componentCls}-affix-wrapper-without-controls):hover ${componentCls}-suffix`]: {
  83452. marginInlineEnd: token.calc(token.handleWidth).add(paddingInline).equal()
  83453. }
  83454. }),
  83455. // 覆盖 affix-wrapper borderRadius!
  83456. [`${componentCls}-underlined`]: {
  83457. borderRadius: 0
  83458. }
  83459. };
  83460. };
  83461. /* harmony default export */ var input_number_style = ((0,genStyleUtils.genStyleHooks)('InputNumber', token => {
  83462. const inputNumberToken = (0,es.mergeToken)(token, (0,style_token.initInputToken)(token));
  83463. return [genInputNumberStyles(inputNumberToken), genAffixWrapperStyles(inputNumberToken),
  83464. // =====================================================
  83465. // == Space Compact ==
  83466. // =====================================================
  83467. (0,compact_item.genCompactItemStyle)(inputNumberToken)];
  83468. }, prepareComponentToken, {
  83469. unitless: {
  83470. handleOpacity: true
  83471. },
  83472. resetFont: false
  83473. }));
  83474. /***/ }),
  83475. /***/ "./components/input/style/index.ts":
  83476. /*!*****************************************!*\
  83477. !*** ./components/input/style/index.ts ***!
  83478. \*****************************************/
  83479. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  83480. "use strict";
  83481. __webpack_require__.r(__webpack_exports__);
  83482. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  83483. /* harmony export */ genActiveStyle: function() { return /* binding */ genActiveStyle; },
  83484. /* harmony export */ genAffixStyle: function() { return /* binding */ genAffixStyle; },
  83485. /* harmony export */ genBasicInputStyle: function() { return /* binding */ genBasicInputStyle; },
  83486. /* harmony export */ genInputGroupStyle: function() { return /* binding */ genInputGroupStyle; },
  83487. /* harmony export */ genInputSmallStyle: function() { return /* binding */ genInputSmallStyle; },
  83488. /* harmony export */ genInputStyle: function() { return /* binding */ genInputStyle; },
  83489. /* harmony export */ genPlaceholderStyle: function() { return /* binding */ genPlaceholderStyle; },
  83490. /* harmony export */ initComponentToken: function() { return /* reexport safe */ _token__WEBPACK_IMPORTED_MODULE_5__.initComponentToken; },
  83491. /* harmony export */ initInputToken: function() { return /* reexport safe */ _token__WEBPACK_IMPORTED_MODULE_5__.initInputToken; },
  83492. /* harmony export */ useSharedStyle: function() { return /* binding */ useSharedStyle; }
  83493. /* harmony export */ });
  83494. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  83495. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  83496. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  83497. /* harmony import */ var _style_compact_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/compact-item */ "./components/style/compact-item.ts");
  83498. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  83499. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  83500. /* harmony import */ var _token__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./token */ "./components/input/style/token.ts");
  83501. /* harmony import */ var _variants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./variants */ "./components/input/style/variants.ts");
  83502. const genPlaceholderStyle = color => ({
  83503. // Firefox
  83504. '&::-moz-placeholder': {
  83505. opacity: 1
  83506. },
  83507. '&::placeholder': {
  83508. color,
  83509. userSelect: 'none' // https://github.com/ant-design/ant-design/pull/32639
  83510. },
  83511. '&:placeholder-shown': {
  83512. textOverflow: 'ellipsis'
  83513. }
  83514. });
  83515. const genActiveStyle = token => ({
  83516. borderColor: token.activeBorderColor,
  83517. boxShadow: token.activeShadow,
  83518. outline: 0,
  83519. backgroundColor: token.activeBg
  83520. });
  83521. const genInputLargeStyle = token => {
  83522. const {
  83523. paddingBlockLG,
  83524. lineHeightLG,
  83525. borderRadiusLG,
  83526. paddingInlineLG
  83527. } = token;
  83528. return {
  83529. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingBlockLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingInlineLG)}`,
  83530. fontSize: token.inputFontSizeLG,
  83531. lineHeight: lineHeightLG,
  83532. borderRadius: borderRadiusLG
  83533. };
  83534. };
  83535. const genInputSmallStyle = token => ({
  83536. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingBlockSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingInlineSM)}`,
  83537. fontSize: token.inputFontSizeSM,
  83538. borderRadius: token.borderRadiusSM
  83539. });
  83540. const genBasicInputStyle = token => Object.assign(Object.assign({
  83541. position: 'relative',
  83542. display: 'inline-block',
  83543. width: '100%',
  83544. minWidth: 0,
  83545. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingBlock)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingInline)}`,
  83546. color: token.colorText,
  83547. fontSize: token.inputFontSize,
  83548. lineHeight: token.lineHeight,
  83549. borderRadius: token.borderRadius,
  83550. transition: `all ${token.motionDurationMid}`
  83551. }, genPlaceholderStyle(token.colorTextPlaceholder)), {
  83552. // Size
  83553. '&-lg': Object.assign({}, genInputLargeStyle(token)),
  83554. '&-sm': Object.assign({}, genInputSmallStyle(token)),
  83555. // RTL
  83556. '&-rtl, &-textarea-rtl': {
  83557. direction: 'rtl'
  83558. }
  83559. });
  83560. const genInputGroupStyle = token => {
  83561. const {
  83562. componentCls,
  83563. antCls
  83564. } = token;
  83565. return {
  83566. position: 'relative',
  83567. display: 'table',
  83568. width: '100%',
  83569. borderCollapse: 'separate',
  83570. borderSpacing: 0,
  83571. // Undo padding and float of grid classes
  83572. "&[class*='col-']": {
  83573. paddingInlineEnd: token.paddingXS,
  83574. '&:last-child': {
  83575. paddingInlineEnd: 0
  83576. }
  83577. },
  83578. // Sizing options
  83579. [`&-lg ${componentCls}, &-lg > ${componentCls}-group-addon`]: Object.assign({}, genInputLargeStyle(token)),
  83580. [`&-sm ${componentCls}, &-sm > ${componentCls}-group-addon`]: Object.assign({}, genInputSmallStyle(token)),
  83581. // Fix https://github.com/ant-design/ant-design/issues/5754
  83582. [`&-lg ${antCls}-select-single ${antCls}-select-selector`]: {
  83583. height: token.controlHeightLG
  83584. },
  83585. [`&-sm ${antCls}-select-single ${antCls}-select-selector`]: {
  83586. height: token.controlHeightSM
  83587. },
  83588. [`> ${componentCls}`]: {
  83589. display: 'table-cell',
  83590. '&:not(:first-child):not(:last-child)': {
  83591. borderRadius: 0
  83592. }
  83593. },
  83594. [`${componentCls}-group`]: {
  83595. '&-addon, &-wrap': {
  83596. display: 'table-cell',
  83597. width: 1,
  83598. whiteSpace: 'nowrap',
  83599. verticalAlign: 'middle',
  83600. '&:not(:first-child):not(:last-child)': {
  83601. borderRadius: 0
  83602. }
  83603. },
  83604. '&-wrap > *': {
  83605. display: 'block !important'
  83606. },
  83607. '&-addon': {
  83608. position: 'relative',
  83609. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingInline)}`,
  83610. color: token.colorText,
  83611. fontWeight: 'normal',
  83612. fontSize: token.inputFontSize,
  83613. textAlign: 'center',
  83614. borderRadius: token.borderRadius,
  83615. transition: `all ${token.motionDurationSlow}`,
  83616. lineHeight: 1,
  83617. // Reset Select's style in addon
  83618. [`${antCls}-select`]: {
  83619. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.paddingBlock).add(1).mul(-1).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.paddingInline).mul(-1).equal())}`,
  83620. [`&${antCls}-select-single:not(${antCls}-select-customize-input):not(${antCls}-pagination-size-changer)`]: {
  83621. [`${antCls}-select-selector`]: {
  83622. backgroundColor: 'inherit',
  83623. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} transparent`,
  83624. boxShadow: 'none'
  83625. }
  83626. }
  83627. },
  83628. // https://github.com/ant-design/ant-design/issues/31333
  83629. [`${antCls}-cascader-picker`]: {
  83630. margin: `-9px ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.paddingInline).mul(-1).equal())}`,
  83631. backgroundColor: 'transparent',
  83632. [`${antCls}-cascader-input`]: {
  83633. textAlign: 'start',
  83634. border: 0,
  83635. boxShadow: 'none'
  83636. }
  83637. }
  83638. }
  83639. },
  83640. [componentCls]: {
  83641. width: '100%',
  83642. marginBottom: 0,
  83643. textAlign: 'inherit',
  83644. '&:focus': {
  83645. zIndex: 1,
  83646. // Fix https://gw.alipayobjects.com/zos/rmsportal/DHNpoqfMXSfrSnlZvhsJ.png
  83647. borderInlineEndWidth: 1
  83648. },
  83649. '&:hover': {
  83650. zIndex: 1,
  83651. borderInlineEndWidth: 1,
  83652. [`${componentCls}-search-with-button &`]: {
  83653. zIndex: 0
  83654. }
  83655. }
  83656. },
  83657. // Reset rounded corners
  83658. [`> ${componentCls}:first-child, ${componentCls}-group-addon:first-child`]: {
  83659. borderStartEndRadius: 0,
  83660. borderEndEndRadius: 0,
  83661. // Reset Select's style in addon
  83662. [`${antCls}-select ${antCls}-select-selector`]: {
  83663. borderStartEndRadius: 0,
  83664. borderEndEndRadius: 0
  83665. }
  83666. },
  83667. [`> ${componentCls}-affix-wrapper`]: {
  83668. [`&:not(:first-child) ${componentCls}`]: {
  83669. borderStartStartRadius: 0,
  83670. borderEndStartRadius: 0
  83671. },
  83672. [`&:not(:last-child) ${componentCls}`]: {
  83673. borderStartEndRadius: 0,
  83674. borderEndEndRadius: 0
  83675. }
  83676. },
  83677. [`> ${componentCls}:last-child, ${componentCls}-group-addon:last-child`]: {
  83678. borderStartStartRadius: 0,
  83679. borderEndStartRadius: 0,
  83680. // Reset Select's style in addon
  83681. [`${antCls}-select ${antCls}-select-selector`]: {
  83682. borderStartStartRadius: 0,
  83683. borderEndStartRadius: 0
  83684. }
  83685. },
  83686. [`${componentCls}-affix-wrapper`]: {
  83687. '&:not(:last-child)': {
  83688. borderStartEndRadius: 0,
  83689. borderEndEndRadius: 0,
  83690. [`${componentCls}-search &`]: {
  83691. borderStartStartRadius: token.borderRadius,
  83692. borderEndStartRadius: token.borderRadius
  83693. }
  83694. },
  83695. [`&:not(:first-child), ${componentCls}-search &:not(:first-child)`]: {
  83696. borderStartStartRadius: 0,
  83697. borderEndStartRadius: 0
  83698. }
  83699. },
  83700. [`&${componentCls}-group-compact`]: Object.assign(Object.assign({
  83701. display: 'block'
  83702. }, (0,_style__WEBPACK_IMPORTED_MODULE_1__.clearFix)()), {
  83703. [`${componentCls}-group-addon, ${componentCls}-group-wrap, > ${componentCls}`]: {
  83704. '&:not(:first-child):not(:last-child)': {
  83705. borderInlineEndWidth: token.lineWidth,
  83706. '&:hover, &:focus': {
  83707. zIndex: 1
  83708. }
  83709. }
  83710. },
  83711. '& > *': {
  83712. display: 'inline-flex',
  83713. float: 'none',
  83714. verticalAlign: 'top',
  83715. // https://github.com/ant-design/ant-design-pro/issues/139
  83716. borderRadius: 0
  83717. },
  83718. [`
  83719. & > ${componentCls}-affix-wrapper,
  83720. & > ${componentCls}-number-affix-wrapper,
  83721. & > ${antCls}-picker-range
  83722. `]: {
  83723. display: 'inline-flex'
  83724. },
  83725. '& > *:not(:last-child)': {
  83726. marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal(),
  83727. borderInlineEndWidth: token.lineWidth
  83728. },
  83729. // Undo float for .ant-input-group .ant-input
  83730. [componentCls]: {
  83731. float: 'none'
  83732. },
  83733. // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
  83734. [`& > ${antCls}-select > ${antCls}-select-selector,
  83735. & > ${antCls}-select-auto-complete ${componentCls},
  83736. & > ${antCls}-cascader-picker ${componentCls},
  83737. & > ${componentCls}-group-wrapper ${componentCls}`]: {
  83738. borderInlineEndWidth: token.lineWidth,
  83739. borderRadius: 0,
  83740. '&:hover, &:focus': {
  83741. zIndex: 1
  83742. }
  83743. },
  83744. [`& > ${antCls}-select-focused`]: {
  83745. zIndex: 1
  83746. },
  83747. // update z-index for arrow icon
  83748. [`& > ${antCls}-select > ${antCls}-select-arrow`]: {
  83749. zIndex: 1 // https://github.com/ant-design/ant-design/issues/20371
  83750. },
  83751. [`& > *:first-child,
  83752. & > ${antCls}-select:first-child > ${antCls}-select-selector,
  83753. & > ${antCls}-select-auto-complete:first-child ${componentCls},
  83754. & > ${antCls}-cascader-picker:first-child ${componentCls}`]: {
  83755. borderStartStartRadius: token.borderRadius,
  83756. borderEndStartRadius: token.borderRadius
  83757. },
  83758. [`& > *:last-child,
  83759. & > ${antCls}-select:last-child > ${antCls}-select-selector,
  83760. & > ${antCls}-cascader-picker:last-child ${componentCls},
  83761. & > ${antCls}-cascader-picker-focused:last-child ${componentCls}`]: {
  83762. borderInlineEndWidth: token.lineWidth,
  83763. borderStartEndRadius: token.borderRadius,
  83764. borderEndEndRadius: token.borderRadius
  83765. },
  83766. // https://github.com/ant-design/ant-design/issues/12493
  83767. [`& > ${antCls}-select-auto-complete ${componentCls}`]: {
  83768. verticalAlign: 'top'
  83769. },
  83770. [`${componentCls}-group-wrapper + ${componentCls}-group-wrapper`]: {
  83771. marginInlineStart: token.calc(token.lineWidth).mul(-1).equal(),
  83772. [`${componentCls}-affix-wrapper`]: {
  83773. borderRadius: 0
  83774. }
  83775. },
  83776. [`${componentCls}-group-wrapper:not(:last-child)`]: {
  83777. [`&${componentCls}-search > ${componentCls}-group`]: {
  83778. [`& > ${componentCls}-group-addon > ${componentCls}-search-button`]: {
  83779. borderRadius: 0
  83780. },
  83781. [`& > ${componentCls}`]: {
  83782. borderStartStartRadius: token.borderRadius,
  83783. borderStartEndRadius: 0,
  83784. borderEndEndRadius: 0,
  83785. borderEndStartRadius: token.borderRadius
  83786. }
  83787. }
  83788. }
  83789. })
  83790. };
  83791. };
  83792. const genInputStyle = token => {
  83793. const {
  83794. componentCls,
  83795. controlHeightSM,
  83796. lineWidth,
  83797. calc
  83798. } = token;
  83799. const FIXED_CHROME_COLOR_HEIGHT = 16;
  83800. const colorSmallPadding = calc(controlHeightSM).sub(calc(lineWidth).mul(2)).sub(FIXED_CHROME_COLOR_HEIGHT).div(2).equal();
  83801. return {
  83802. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), genBasicInputStyle(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_6__.genOutlinedStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_6__.genFilledStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_6__.genBorderlessStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_6__.genUnderlinedStyle)(token)), {
  83803. '&[type="color"]': {
  83804. height: token.controlHeight,
  83805. [`&${componentCls}-lg`]: {
  83806. height: token.controlHeightLG
  83807. },
  83808. [`&${componentCls}-sm`]: {
  83809. height: controlHeightSM,
  83810. paddingTop: colorSmallPadding,
  83811. paddingBottom: colorSmallPadding
  83812. }
  83813. },
  83814. '&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration': {
  83815. appearance: 'none'
  83816. }
  83817. })
  83818. };
  83819. };
  83820. const genAllowClearStyle = token => {
  83821. const {
  83822. componentCls
  83823. } = token;
  83824. return {
  83825. // ========================= Input =========================
  83826. [`${componentCls}-clear-icon`]: {
  83827. margin: 0,
  83828. padding: 0,
  83829. lineHeight: 0,
  83830. color: token.colorTextQuaternary,
  83831. fontSize: token.fontSizeIcon,
  83832. verticalAlign: -1,
  83833. // https://github.com/ant-design/ant-design/pull/18151
  83834. // https://codesandbox.io/s/wizardly-sun-u10br
  83835. cursor: 'pointer',
  83836. transition: `color ${token.motionDurationSlow}`,
  83837. border: 'none',
  83838. outline: 'none',
  83839. backgroundColor: 'transparent',
  83840. '&:hover': {
  83841. color: token.colorIcon
  83842. },
  83843. '&:active': {
  83844. color: token.colorText
  83845. },
  83846. '&-hidden': {
  83847. visibility: 'hidden'
  83848. },
  83849. '&-has-suffix': {
  83850. margin: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.inputAffixPadding)}`
  83851. }
  83852. }
  83853. };
  83854. };
  83855. const genAffixStyle = token => {
  83856. const {
  83857. componentCls,
  83858. inputAffixPadding,
  83859. colorTextDescription,
  83860. motionDurationSlow,
  83861. colorIcon,
  83862. colorIconHover,
  83863. iconCls
  83864. } = token;
  83865. const affixCls = `${componentCls}-affix-wrapper`;
  83866. const affixClsDisabled = `${componentCls}-affix-wrapper-disabled`;
  83867. return {
  83868. [affixCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, genBasicInputStyle(token)), {
  83869. display: 'inline-flex',
  83870. [`&:not(${componentCls}-disabled):hover`]: {
  83871. zIndex: 1,
  83872. [`${componentCls}-search-with-button &`]: {
  83873. zIndex: 0
  83874. }
  83875. },
  83876. '&-focused, &:focus': {
  83877. zIndex: 1
  83878. },
  83879. [`> input${componentCls}`]: {
  83880. padding: 0
  83881. },
  83882. [`> input${componentCls}, > textarea${componentCls}`]: {
  83883. fontSize: 'inherit',
  83884. border: 'none',
  83885. borderRadius: 0,
  83886. outline: 'none',
  83887. background: 'transparent',
  83888. color: 'inherit',
  83889. '&::-ms-reveal': {
  83890. display: 'none'
  83891. },
  83892. '&:focus': {
  83893. boxShadow: 'none !important'
  83894. }
  83895. },
  83896. '&::before': {
  83897. display: 'inline-block',
  83898. width: 0,
  83899. visibility: 'hidden',
  83900. content: '"\\a0"'
  83901. },
  83902. [componentCls]: {
  83903. '&-prefix, &-suffix': {
  83904. display: 'flex',
  83905. flex: 'none',
  83906. alignItems: 'center',
  83907. '> *:not(:last-child)': {
  83908. marginInlineEnd: token.paddingXS
  83909. }
  83910. },
  83911. '&-show-count-suffix': {
  83912. color: colorTextDescription,
  83913. direction: 'ltr'
  83914. },
  83915. '&-show-count-has-suffix': {
  83916. marginInlineEnd: token.paddingXXS
  83917. },
  83918. '&-prefix': {
  83919. marginInlineEnd: inputAffixPadding
  83920. },
  83921. '&-suffix': {
  83922. marginInlineStart: inputAffixPadding
  83923. }
  83924. }
  83925. }), genAllowClearStyle(token)), {
  83926. // password
  83927. [`${iconCls}${componentCls}-password-icon`]: {
  83928. color: colorIcon,
  83929. cursor: 'pointer',
  83930. transition: `all ${motionDurationSlow}`,
  83931. '&:hover': {
  83932. color: colorIconHover
  83933. }
  83934. }
  83935. }),
  83936. // 覆盖 affix-wrapper borderRadius!
  83937. [`${componentCls}-underlined`]: {
  83938. borderRadius: 0
  83939. },
  83940. [affixClsDisabled]: {
  83941. // password disabled
  83942. [`${iconCls}${componentCls}-password-icon`]: {
  83943. color: colorIcon,
  83944. cursor: 'not-allowed',
  83945. '&:hover': {
  83946. color: colorIcon
  83947. }
  83948. }
  83949. }
  83950. };
  83951. };
  83952. const genGroupStyle = token => {
  83953. const {
  83954. componentCls,
  83955. borderRadiusLG,
  83956. borderRadiusSM
  83957. } = token;
  83958. return {
  83959. [`${componentCls}-group`]: Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), genInputGroupStyle(token)), {
  83960. '&-rtl': {
  83961. direction: 'rtl'
  83962. },
  83963. '&-wrapper': Object.assign(Object.assign(Object.assign({
  83964. display: 'inline-block',
  83965. width: '100%',
  83966. textAlign: 'start',
  83967. verticalAlign: 'top',
  83968. '&-rtl': {
  83969. direction: 'rtl'
  83970. },
  83971. // Size
  83972. '&-lg': {
  83973. [`${componentCls}-group-addon`]: {
  83974. borderRadius: borderRadiusLG,
  83975. fontSize: token.inputFontSizeLG
  83976. }
  83977. },
  83978. '&-sm': {
  83979. [`${componentCls}-group-addon`]: {
  83980. borderRadius: borderRadiusSM
  83981. }
  83982. }
  83983. }, (0,_variants__WEBPACK_IMPORTED_MODULE_6__.genOutlinedGroupStyle)(token)), (0,_variants__WEBPACK_IMPORTED_MODULE_6__.genFilledGroupStyle)(token)), {
  83984. // '&-disabled': {
  83985. // [`${componentCls}-group-addon`]: {
  83986. // ...genDisabledStyle(token),
  83987. // },
  83988. // },
  83989. // Fix the issue of using icons in Space Compact mode
  83990. // https://github.com/ant-design/ant-design/issues/42122
  83991. [`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
  83992. [`${componentCls}, ${componentCls}-group-addon`]: {
  83993. borderRadius: 0
  83994. }
  83995. },
  83996. [`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {
  83997. [`${componentCls}, ${componentCls}-group-addon`]: {
  83998. borderStartEndRadius: 0,
  83999. borderEndEndRadius: 0
  84000. }
  84001. },
  84002. [`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {
  84003. [`${componentCls}, ${componentCls}-group-addon`]: {
  84004. borderStartStartRadius: 0,
  84005. borderEndStartRadius: 0
  84006. }
  84007. },
  84008. // Fix the issue of input use show-count param in space compact mode
  84009. // https://github.com/ant-design/ant-design/issues/46872
  84010. [`&:not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {
  84011. [`${componentCls}-affix-wrapper`]: {
  84012. borderStartEndRadius: 0,
  84013. borderEndEndRadius: 0
  84014. }
  84015. },
  84016. // Fix the issue of input use `addonAfter` param in space compact mode
  84017. // https://github.com/ant-design/ant-design/issues/52483
  84018. [`&:not(${componentCls}-compact-first-item)${componentCls}-compact-item`]: {
  84019. [`${componentCls}-affix-wrapper`]: {
  84020. borderStartStartRadius: 0,
  84021. borderEndStartRadius: 0
  84022. }
  84023. }
  84024. })
  84025. })
  84026. };
  84027. };
  84028. const genSearchInputStyle = token => {
  84029. const {
  84030. componentCls,
  84031. antCls
  84032. } = token;
  84033. const searchPrefixCls = `${componentCls}-search`;
  84034. return {
  84035. [searchPrefixCls]: {
  84036. [componentCls]: {
  84037. '&:not([disabled]):hover, &:not([disabled]):focus': {
  84038. [`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-color-primary):not(${antCls}-btn-variant-text)`]: {
  84039. borderInlineStartColor: token.colorPrimaryHover
  84040. }
  84041. }
  84042. },
  84043. [`${componentCls}-affix-wrapper`]: {
  84044. height: token.controlHeight,
  84045. borderRadius: 0
  84046. },
  84047. // fix slight height diff in Firefox:
  84048. // https://ant.design/components/auto-complete-cn/#auto-complete-demo-certain-category
  84049. [`${componentCls}-lg`]: {
  84050. lineHeight: token.calc(token.lineHeightLG).sub(0.0002).equal()
  84051. },
  84052. [`> ${componentCls}-group`]: {
  84053. [`> ${componentCls}-group-addon:last-child`]: {
  84054. insetInlineStart: -1,
  84055. padding: 0,
  84056. border: 0,
  84057. [`${searchPrefixCls}-button`]: {
  84058. // Fix https://github.com/ant-design/ant-design/issues/47150
  84059. marginInlineEnd: -1,
  84060. borderStartStartRadius: 0,
  84061. borderEndStartRadius: 0,
  84062. boxShadow: 'none'
  84063. },
  84064. [`${searchPrefixCls}-button:not(${antCls}-btn-color-primary)`]: {
  84065. color: token.colorTextDescription,
  84066. '&:not([disabled]):hover': {
  84067. color: token.colorPrimaryHover
  84068. },
  84069. '&:active': {
  84070. color: token.colorPrimaryActive
  84071. },
  84072. [`&${antCls}-btn-loading::before`]: {
  84073. inset: 0
  84074. }
  84075. }
  84076. }
  84077. },
  84078. [`${searchPrefixCls}-button`]: {
  84079. height: token.controlHeight,
  84080. '&:hover, &:focus': {
  84081. zIndex: 1
  84082. }
  84083. },
  84084. '&-large': {
  84085. [`${componentCls}-affix-wrapper, ${searchPrefixCls}-button`]: {
  84086. height: token.controlHeightLG
  84087. }
  84088. },
  84089. '&-small': {
  84090. [`${componentCls}-affix-wrapper, ${searchPrefixCls}-button`]: {
  84091. height: token.controlHeightSM
  84092. }
  84093. },
  84094. '&-rtl': {
  84095. direction: 'rtl'
  84096. },
  84097. // ===================== Compact Item Customized Styles =====================
  84098. [`&${componentCls}-compact-item`]: {
  84099. [`&:not(${componentCls}-compact-last-item)`]: {
  84100. [`${componentCls}-group-addon`]: {
  84101. [`${componentCls}-search-button`]: {
  84102. marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal(),
  84103. borderRadius: 0
  84104. }
  84105. }
  84106. },
  84107. [`&:not(${componentCls}-compact-first-item)`]: {
  84108. [`${componentCls},${componentCls}-affix-wrapper`]: {
  84109. borderRadius: 0
  84110. }
  84111. },
  84112. [`> ${componentCls}-group-addon ${componentCls}-search-button,
  84113. > ${componentCls},
  84114. ${componentCls}-affix-wrapper`]: {
  84115. '&:hover, &:focus, &:active': {
  84116. zIndex: 2
  84117. }
  84118. },
  84119. [`> ${componentCls}-affix-wrapper-focused`]: {
  84120. zIndex: 2
  84121. }
  84122. }
  84123. }
  84124. };
  84125. };
  84126. // ============================== Range ===============================
  84127. const genRangeStyle = token => {
  84128. const {
  84129. componentCls
  84130. } = token;
  84131. return {
  84132. [`${componentCls}-out-of-range`]: {
  84133. [`&, & input, & textarea, ${componentCls}-show-count-suffix, ${componentCls}-data-count`]: {
  84134. color: token.colorError
  84135. }
  84136. }
  84137. };
  84138. };
  84139. // ============================== Export ==============================
  84140. const useSharedStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)(['Input', 'Shared'], token => {
  84141. const inputToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, (0,_token__WEBPACK_IMPORTED_MODULE_5__.initInputToken)(token));
  84142. return [genInputStyle(inputToken), genAffixStyle(inputToken)];
  84143. }, _token__WEBPACK_IMPORTED_MODULE_5__.initComponentToken, {
  84144. resetFont: false
  84145. });
  84146. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)(['Input', 'Component'], token => {
  84147. const inputToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, (0,_token__WEBPACK_IMPORTED_MODULE_5__.initInputToken)(token));
  84148. return [genGroupStyle(inputToken), genSearchInputStyle(inputToken), genRangeStyle(inputToken),
  84149. // =====================================================
  84150. // == Space Compact ==
  84151. // =====================================================
  84152. (0,_style_compact_item__WEBPACK_IMPORTED_MODULE_2__.genCompactItemStyle)(inputToken)];
  84153. }, _token__WEBPACK_IMPORTED_MODULE_5__.initComponentToken, {
  84154. resetFont: false
  84155. }));
  84156. /***/ }),
  84157. /***/ "./components/input/style/token.ts":
  84158. /*!*****************************************!*\
  84159. !*** ./components/input/style/token.ts ***!
  84160. \*****************************************/
  84161. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  84162. "use strict";
  84163. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  84164. /* harmony export */ initComponentToken: function() { return /* binding */ initComponentToken; },
  84165. /* harmony export */ initInputToken: function() { return /* binding */ initInputToken; }
  84166. /* harmony export */ });
  84167. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  84168. function initInputToken(token) {
  84169. return (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.mergeToken)(token, {
  84170. inputAffixPadding: token.paddingXXS
  84171. });
  84172. }
  84173. const initComponentToken = token => {
  84174. const {
  84175. controlHeight,
  84176. fontSize,
  84177. lineHeight,
  84178. lineWidth,
  84179. controlHeightSM,
  84180. controlHeightLG,
  84181. fontSizeLG,
  84182. lineHeightLG,
  84183. paddingSM,
  84184. controlPaddingHorizontalSM,
  84185. controlPaddingHorizontal,
  84186. colorFillAlter,
  84187. colorPrimaryHover,
  84188. colorPrimary,
  84189. controlOutlineWidth,
  84190. controlOutline,
  84191. colorErrorOutline,
  84192. colorWarningOutline,
  84193. colorBgContainer,
  84194. inputFontSize,
  84195. inputFontSizeLG,
  84196. inputFontSizeSM
  84197. } = token;
  84198. const mergedFontSize = inputFontSize || fontSize;
  84199. const mergedFontSizeSM = inputFontSizeSM || mergedFontSize;
  84200. const mergedFontSizeLG = inputFontSizeLG || fontSizeLG;
  84201. const paddingBlock = Math.round((controlHeight - mergedFontSize * lineHeight) / 2 * 10) / 10 - lineWidth;
  84202. const paddingBlockSM = Math.round((controlHeightSM - mergedFontSizeSM * lineHeight) / 2 * 10) / 10 - lineWidth;
  84203. const paddingBlockLG = Math.ceil((controlHeightLG - mergedFontSizeLG * lineHeightLG) / 2 * 10) / 10 - lineWidth;
  84204. return {
  84205. paddingBlock: Math.max(paddingBlock, 0),
  84206. paddingBlockSM: Math.max(paddingBlockSM, 0),
  84207. paddingBlockLG: Math.max(paddingBlockLG, 0),
  84208. paddingInline: paddingSM - lineWidth,
  84209. paddingInlineSM: controlPaddingHorizontalSM - lineWidth,
  84210. paddingInlineLG: controlPaddingHorizontal - lineWidth,
  84211. addonBg: colorFillAlter,
  84212. activeBorderColor: colorPrimary,
  84213. hoverBorderColor: colorPrimaryHover,
  84214. activeShadow: `0 0 0 ${controlOutlineWidth}px ${controlOutline}`,
  84215. errorActiveShadow: `0 0 0 ${controlOutlineWidth}px ${colorErrorOutline}`,
  84216. warningActiveShadow: `0 0 0 ${controlOutlineWidth}px ${colorWarningOutline}`,
  84217. hoverBg: colorBgContainer,
  84218. activeBg: colorBgContainer,
  84219. inputFontSize: mergedFontSize,
  84220. inputFontSizeLG: mergedFontSizeLG,
  84221. inputFontSizeSM: mergedFontSizeSM
  84222. };
  84223. };
  84224. /***/ }),
  84225. /***/ "./components/input/style/variants.ts":
  84226. /*!********************************************!*\
  84227. !*** ./components/input/style/variants.ts ***!
  84228. \********************************************/
  84229. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  84230. "use strict";
  84231. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  84232. /* harmony export */ genBaseOutlinedStyle: function() { return /* binding */ genBaseOutlinedStyle; },
  84233. /* harmony export */ genBorderlessStyle: function() { return /* binding */ genBorderlessStyle; },
  84234. /* harmony export */ genDisabledStyle: function() { return /* binding */ genDisabledStyle; },
  84235. /* harmony export */ genFilledGroupStyle: function() { return /* binding */ genFilledGroupStyle; },
  84236. /* harmony export */ genFilledStyle: function() { return /* binding */ genFilledStyle; },
  84237. /* harmony export */ genOutlinedGroupStyle: function() { return /* binding */ genOutlinedGroupStyle; },
  84238. /* harmony export */ genOutlinedStyle: function() { return /* binding */ genOutlinedStyle; },
  84239. /* harmony export */ genUnderlinedStyle: function() { return /* binding */ genUnderlinedStyle; }
  84240. /* harmony export */ });
  84241. /* unused harmony exports genHoverStyle, genBaseUnderlinedStyle */
  84242. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  84243. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  84244. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  84245. const genHoverStyle = token => ({
  84246. borderColor: token.hoverBorderColor,
  84247. backgroundColor: token.hoverBg
  84248. });
  84249. const genDisabledStyle = token => ({
  84250. color: token.colorTextDisabled,
  84251. backgroundColor: token.colorBgContainerDisabled,
  84252. borderColor: token.colorBorder,
  84253. boxShadow: 'none',
  84254. cursor: 'not-allowed',
  84255. opacity: 1,
  84256. 'input[disabled], textarea[disabled]': {
  84257. cursor: 'not-allowed'
  84258. },
  84259. '&:hover:not([disabled])': Object.assign({}, genHoverStyle((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.mergeToken)(token, {
  84260. hoverBorderColor: token.colorBorder,
  84261. hoverBg: token.colorBgContainerDisabled
  84262. })))
  84263. });
  84264. /* ============== Outlined ============== */
  84265. const genBaseOutlinedStyle = (token, options) => ({
  84266. background: token.colorBgContainer,
  84267. borderWidth: token.lineWidth,
  84268. borderStyle: token.lineType,
  84269. borderColor: options.borderColor,
  84270. '&:hover': {
  84271. borderColor: options.hoverBorderColor,
  84272. backgroundColor: token.hoverBg
  84273. },
  84274. '&:focus, &:focus-within': {
  84275. borderColor: options.activeBorderColor,
  84276. boxShadow: options.activeShadow,
  84277. outline: 0,
  84278. backgroundColor: token.activeBg
  84279. }
  84280. });
  84281. const genOutlinedStatusStyle = (token, options) => ({
  84282. [`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseOutlinedStyle(token, options)), {
  84283. [`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {
  84284. color: options.affixColor
  84285. }
  84286. }),
  84287. [`&${token.componentCls}-status-${options.status}${token.componentCls}-disabled`]: {
  84288. borderColor: options.borderColor
  84289. }
  84290. });
  84291. const genOutlinedStyle = (token, extraStyles) => ({
  84292. '&-outlined': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {
  84293. borderColor: token.colorBorder,
  84294. hoverBorderColor: token.hoverBorderColor,
  84295. activeBorderColor: token.activeBorderColor,
  84296. activeShadow: token.activeShadow
  84297. })), {
  84298. [`&${token.componentCls}-disabled, &[disabled]`]: Object.assign({}, genDisabledStyle(token))
  84299. }), genOutlinedStatusStyle(token, {
  84300. status: 'error',
  84301. borderColor: token.colorError,
  84302. hoverBorderColor: token.colorErrorBorderHover,
  84303. activeBorderColor: token.colorError,
  84304. activeShadow: token.errorActiveShadow,
  84305. affixColor: token.colorError
  84306. })), genOutlinedStatusStyle(token, {
  84307. status: 'warning',
  84308. borderColor: token.colorWarning,
  84309. hoverBorderColor: token.colorWarningBorderHover,
  84310. activeBorderColor: token.colorWarning,
  84311. activeShadow: token.warningActiveShadow,
  84312. affixColor: token.colorWarning
  84313. })), extraStyles)
  84314. });
  84315. const genOutlinedGroupStatusStyle = (token, options) => ({
  84316. [`&${token.componentCls}-group-wrapper-status-${options.status}`]: {
  84317. [`${token.componentCls}-group-addon`]: {
  84318. borderColor: options.addonBorderColor,
  84319. color: options.addonColor
  84320. }
  84321. }
  84322. });
  84323. const genOutlinedGroupStyle = token => ({
  84324. '&-outlined': Object.assign(Object.assign(Object.assign({
  84325. [`${token.componentCls}-group`]: {
  84326. '&-addon': {
  84327. background: token.addonBg,
  84328. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
  84329. },
  84330. '&-addon:first-child': {
  84331. borderInlineEnd: 0
  84332. },
  84333. '&-addon:last-child': {
  84334. borderInlineStart: 0
  84335. }
  84336. }
  84337. }, genOutlinedGroupStatusStyle(token, {
  84338. status: 'error',
  84339. addonBorderColor: token.colorError,
  84340. addonColor: token.colorErrorText
  84341. })), genOutlinedGroupStatusStyle(token, {
  84342. status: 'warning',
  84343. addonBorderColor: token.colorWarning,
  84344. addonColor: token.colorWarningText
  84345. })), {
  84346. [`&${token.componentCls}-group-wrapper-disabled`]: {
  84347. [`${token.componentCls}-group-addon`]: Object.assign({}, genDisabledStyle(token))
  84348. }
  84349. })
  84350. });
  84351. /* ============ Borderless ============ */
  84352. const genBorderlessStyle = (token, extraStyles) => {
  84353. const {
  84354. componentCls
  84355. } = token;
  84356. return {
  84357. '&-borderless': Object.assign({
  84358. background: 'transparent',
  84359. border: 'none',
  84360. '&:focus, &:focus-within': {
  84361. outline: 'none'
  84362. },
  84363. // >>>>> Disabled
  84364. [`&${componentCls}-disabled, &[disabled]`]: {
  84365. color: token.colorTextDisabled,
  84366. cursor: 'not-allowed'
  84367. },
  84368. // >>>>> Status
  84369. [`&${componentCls}-status-error`]: {
  84370. '&, & input, & textarea': {
  84371. color: token.colorError
  84372. }
  84373. },
  84374. [`&${componentCls}-status-warning`]: {
  84375. '&, & input, & textarea': {
  84376. color: token.colorWarning
  84377. }
  84378. }
  84379. }, extraStyles)
  84380. };
  84381. };
  84382. /* ============== Filled ============== */
  84383. const genBaseFilledStyle = (token, options) => {
  84384. var _a;
  84385. return {
  84386. background: options.bg,
  84387. borderWidth: token.lineWidth,
  84388. borderStyle: token.lineType,
  84389. borderColor: 'transparent',
  84390. 'input&, & input, textarea&, & textarea': {
  84391. color: (_a = options === null || options === void 0 ? void 0 : options.inputColor) !== null && _a !== void 0 ? _a : 'unset'
  84392. },
  84393. '&:hover': {
  84394. background: options.hoverBg
  84395. },
  84396. '&:focus, &:focus-within': {
  84397. outline: 0,
  84398. borderColor: options.activeBorderColor,
  84399. backgroundColor: token.activeBg
  84400. }
  84401. };
  84402. };
  84403. const genFilledStatusStyle = (token, options) => ({
  84404. [`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseFilledStyle(token, options)), {
  84405. [`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {
  84406. color: options.affixColor
  84407. }
  84408. })
  84409. });
  84410. const genFilledStyle = (token, extraStyles) => ({
  84411. '&-filled': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {
  84412. bg: token.colorFillTertiary,
  84413. hoverBg: token.colorFillSecondary,
  84414. activeBorderColor: token.activeBorderColor
  84415. })), {
  84416. [`&${token.componentCls}-disabled, &[disabled]`]: Object.assign({}, genDisabledStyle(token))
  84417. }), genFilledStatusStyle(token, {
  84418. status: 'error',
  84419. bg: token.colorErrorBg,
  84420. hoverBg: token.colorErrorBgHover,
  84421. activeBorderColor: token.colorError,
  84422. inputColor: token.colorErrorText,
  84423. affixColor: token.colorError
  84424. })), genFilledStatusStyle(token, {
  84425. status: 'warning',
  84426. bg: token.colorWarningBg,
  84427. hoverBg: token.colorWarningBgHover,
  84428. activeBorderColor: token.colorWarning,
  84429. inputColor: token.colorWarningText,
  84430. affixColor: token.colorWarning
  84431. })), extraStyles)
  84432. });
  84433. const genFilledGroupStatusStyle = (token, options) => ({
  84434. [`&${token.componentCls}-group-wrapper-status-${options.status}`]: {
  84435. [`${token.componentCls}-group-addon`]: {
  84436. background: options.addonBg,
  84437. color: options.addonColor
  84438. }
  84439. }
  84440. });
  84441. const genFilledGroupStyle = token => ({
  84442. '&-filled': Object.assign(Object.assign(Object.assign({
  84443. [`${token.componentCls}-group-addon`]: {
  84444. background: token.colorFillTertiary,
  84445. '&:last-child': {
  84446. position: 'static'
  84447. }
  84448. }
  84449. }, genFilledGroupStatusStyle(token, {
  84450. status: 'error',
  84451. addonBg: token.colorErrorBg,
  84452. addonColor: token.colorErrorText
  84453. })), genFilledGroupStatusStyle(token, {
  84454. status: 'warning',
  84455. addonBg: token.colorWarningBg,
  84456. addonColor: token.colorWarningText
  84457. })), {
  84458. [`&${token.componentCls}-group-wrapper-disabled`]: {
  84459. [`${token.componentCls}-group`]: {
  84460. '&-addon': {
  84461. background: token.colorFillTertiary,
  84462. color: token.colorTextDisabled
  84463. },
  84464. '&-addon:first-child': {
  84465. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  84466. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  84467. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
  84468. },
  84469. '&-addon:last-child': {
  84470. borderInlineEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  84471. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  84472. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
  84473. }
  84474. }
  84475. }
  84476. })
  84477. });
  84478. /* ============== Underlined ============== */
  84479. // https://github.com/ant-design/ant-design/issues/51379
  84480. const genBaseUnderlinedStyle = (token, options) => ({
  84481. background: token.colorBgContainer,
  84482. borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} 0`,
  84483. borderStyle: `${token.lineType} none`,
  84484. borderColor: `transparent transparent ${options.borderColor} transparent`,
  84485. borderRadius: 0,
  84486. '&:hover': {
  84487. borderColor: `transparent transparent ${options.borderColor} transparent`,
  84488. backgroundColor: token.hoverBg
  84489. },
  84490. '&:focus, &:focus-within': {
  84491. borderColor: `transparent transparent ${options.activeBorderColor} transparent`,
  84492. outline: 0,
  84493. backgroundColor: token.activeBg
  84494. }
  84495. });
  84496. const genUnderlinedStatusStyle = (token, options) => ({
  84497. [`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, options)), {
  84498. [`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {
  84499. color: options.affixColor
  84500. }
  84501. }),
  84502. [`&${token.componentCls}-status-${options.status}${token.componentCls}-disabled`]: {
  84503. borderColor: `transparent transparent ${options.borderColor} transparent`
  84504. }
  84505. });
  84506. const genUnderlinedStyle = (token, extraStyles) => ({
  84507. '&-underlined': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, {
  84508. borderColor: token.colorBorder,
  84509. hoverBorderColor: token.hoverBorderColor,
  84510. activeBorderColor: token.activeBorderColor,
  84511. activeShadow: token.activeShadow
  84512. })), {
  84513. // >>>>> Disabled
  84514. [`&${token.componentCls}-disabled, &[disabled]`]: {
  84515. color: token.colorTextDisabled,
  84516. boxShadow: 'none',
  84517. cursor: 'not-allowed',
  84518. '&:hover': {
  84519. borderColor: `transparent transparent ${token.colorBorder} transparent`
  84520. }
  84521. },
  84522. 'input[disabled], textarea[disabled]': {
  84523. cursor: 'not-allowed'
  84524. }
  84525. }), genUnderlinedStatusStyle(token, {
  84526. status: 'error',
  84527. borderColor: token.colorError,
  84528. hoverBorderColor: token.colorErrorBorderHover,
  84529. activeBorderColor: token.colorError,
  84530. activeShadow: token.errorActiveShadow,
  84531. affixColor: token.colorError
  84532. })), genUnderlinedStatusStyle(token, {
  84533. status: 'warning',
  84534. borderColor: token.colorWarning,
  84535. hoverBorderColor: token.colorWarningBorderHover,
  84536. activeBorderColor: token.colorWarning,
  84537. activeShadow: token.warningActiveShadow,
  84538. affixColor: token.colorWarning
  84539. })), extraStyles)
  84540. });
  84541. /***/ }),
  84542. /***/ "./components/layout/style/index.ts":
  84543. /*!******************************************!*\
  84544. !*** ./components/layout/style/index.ts ***!
  84545. \******************************************/
  84546. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  84547. "use strict";
  84548. __webpack_require__.r(__webpack_exports__);
  84549. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  84550. /* harmony export */ DEPRECATED_TOKENS: function() { return /* binding */ DEPRECATED_TOKENS; },
  84551. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  84552. /* harmony export */ });
  84553. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  84554. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  84555. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  84556. const genLayoutStyle = token => {
  84557. const {
  84558. antCls,
  84559. // .ant
  84560. componentCls,
  84561. // .ant-layout
  84562. colorText,
  84563. footerBg,
  84564. headerHeight,
  84565. headerPadding,
  84566. headerColor,
  84567. footerPadding,
  84568. fontSize,
  84569. bodyBg,
  84570. headerBg
  84571. } = token;
  84572. return {
  84573. [componentCls]: {
  84574. display: 'flex',
  84575. flex: 'auto',
  84576. flexDirection: 'column',
  84577. /* fix firefox can't set height smaller than content on flex item */
  84578. minHeight: 0,
  84579. background: bodyBg,
  84580. '&, *': {
  84581. boxSizing: 'border-box'
  84582. },
  84583. [`&${componentCls}-has-sider`]: {
  84584. flexDirection: 'row',
  84585. [`> ${componentCls}, > ${componentCls}-content`]: {
  84586. // https://segmentfault.com/a/1190000019498300
  84587. width: 0
  84588. }
  84589. },
  84590. [`${componentCls}-header, &${componentCls}-footer`]: {
  84591. flex: '0 0 auto'
  84592. },
  84593. // RTL
  84594. '&-rtl': {
  84595. direction: 'rtl'
  84596. }
  84597. },
  84598. // ==================== Header ====================
  84599. [`${componentCls}-header`]: {
  84600. height: headerHeight,
  84601. padding: headerPadding,
  84602. color: headerColor,
  84603. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(headerHeight),
  84604. background: headerBg,
  84605. // Other components/menu/style/index.less line:686
  84606. // Integration with header element so menu items have the same height
  84607. [`${antCls}-menu`]: {
  84608. lineHeight: 'inherit'
  84609. }
  84610. },
  84611. // ==================== Footer ====================
  84612. [`${componentCls}-footer`]: {
  84613. padding: footerPadding,
  84614. color: colorText,
  84615. fontSize,
  84616. background: footerBg
  84617. },
  84618. // =================== Content ====================
  84619. [`${componentCls}-content`]: {
  84620. flex: 'auto',
  84621. color: colorText,
  84622. // fix firefox can't set height smaller than content on flex item
  84623. minHeight: 0
  84624. }
  84625. };
  84626. };
  84627. const prepareComponentToken = token => {
  84628. const {
  84629. colorBgLayout,
  84630. controlHeight,
  84631. controlHeightLG,
  84632. colorText,
  84633. controlHeightSM,
  84634. marginXXS,
  84635. colorTextLightSolid,
  84636. colorBgContainer
  84637. } = token;
  84638. const paddingInline = controlHeightLG * 1.25;
  84639. return {
  84640. // Deprecated
  84641. colorBgHeader: '#001529',
  84642. colorBgBody: colorBgLayout,
  84643. colorBgTrigger: '#002140',
  84644. bodyBg: colorBgLayout,
  84645. headerBg: '#001529',
  84646. headerHeight: controlHeight * 2,
  84647. headerPadding: `0 ${paddingInline}px`,
  84648. headerColor: colorText,
  84649. footerPadding: `${controlHeightSM}px ${paddingInline}px`,
  84650. footerBg: colorBgLayout,
  84651. siderBg: '#001529',
  84652. triggerHeight: controlHeightLG + marginXXS * 2,
  84653. triggerBg: '#002140',
  84654. triggerColor: colorTextLightSolid,
  84655. zeroTriggerWidth: controlHeightLG,
  84656. zeroTriggerHeight: controlHeightLG,
  84657. lightSiderBg: colorBgContainer,
  84658. lightTriggerBg: colorBgContainer,
  84659. lightTriggerColor: colorText
  84660. };
  84661. };
  84662. // ============================== Export ==============================
  84663. const DEPRECATED_TOKENS = [['colorBgBody', 'bodyBg'], ['colorBgHeader', 'headerBg'], ['colorBgTrigger', 'triggerBg']];
  84664. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Layout', genLayoutStyle, prepareComponentToken, {
  84665. deprecatedTokens: DEPRECATED_TOKENS
  84666. }));
  84667. /***/ }),
  84668. /***/ "./components/list/style/index.ts":
  84669. /*!****************************************!*\
  84670. !*** ./components/list/style/index.ts ***!
  84671. \****************************************/
  84672. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  84673. "use strict";
  84674. __webpack_require__.r(__webpack_exports__);
  84675. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  84676. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  84677. /* harmony export */ });
  84678. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  84679. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  84680. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  84681. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  84682. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  84683. const genBorderedStyle = token => {
  84684. const {
  84685. listBorderedCls,
  84686. componentCls,
  84687. paddingLG,
  84688. margin,
  84689. itemPaddingSM,
  84690. itemPaddingLG,
  84691. marginLG,
  84692. borderRadiusLG
  84693. } = token;
  84694. return {
  84695. [listBorderedCls]: {
  84696. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  84697. borderRadius: borderRadiusLG,
  84698. [`${componentCls}-header,${componentCls}-footer,${componentCls}-item`]: {
  84699. paddingInline: paddingLG
  84700. },
  84701. [`${componentCls}-pagination`]: {
  84702. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(margin)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginLG)}`
  84703. }
  84704. },
  84705. [`${listBorderedCls}${componentCls}-sm`]: {
  84706. [`${componentCls}-item,${componentCls}-header,${componentCls}-footer`]: {
  84707. padding: itemPaddingSM
  84708. }
  84709. },
  84710. [`${listBorderedCls}${componentCls}-lg`]: {
  84711. [`${componentCls}-item,${componentCls}-header,${componentCls}-footer`]: {
  84712. padding: itemPaddingLG
  84713. }
  84714. }
  84715. };
  84716. };
  84717. const genResponsiveStyle = token => {
  84718. const {
  84719. componentCls,
  84720. screenSM,
  84721. screenMD,
  84722. marginLG,
  84723. marginSM,
  84724. margin
  84725. } = token;
  84726. return {
  84727. [`@media screen and (max-width:${screenMD}px)`]: {
  84728. [componentCls]: {
  84729. [`${componentCls}-item`]: {
  84730. [`${componentCls}-item-action`]: {
  84731. marginInlineStart: marginLG
  84732. }
  84733. }
  84734. },
  84735. [`${componentCls}-vertical`]: {
  84736. [`${componentCls}-item`]: {
  84737. [`${componentCls}-item-extra`]: {
  84738. marginInlineStart: marginLG
  84739. }
  84740. }
  84741. }
  84742. },
  84743. [`@media screen and (max-width: ${screenSM}px)`]: {
  84744. [componentCls]: {
  84745. [`${componentCls}-item`]: {
  84746. flexWrap: 'wrap',
  84747. [`${componentCls}-action`]: {
  84748. marginInlineStart: marginSM
  84749. }
  84750. }
  84751. },
  84752. [`${componentCls}-vertical`]: {
  84753. [`${componentCls}-item`]: {
  84754. flexWrap: 'wrap-reverse',
  84755. [`${componentCls}-item-main`]: {
  84756. minWidth: token.contentWidth
  84757. },
  84758. [`${componentCls}-item-extra`]: {
  84759. margin: `auto auto ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(margin)}`
  84760. }
  84761. }
  84762. }
  84763. }
  84764. };
  84765. };
  84766. // =============================== Base ===============================
  84767. const genBaseStyle = token => {
  84768. const {
  84769. componentCls,
  84770. antCls,
  84771. controlHeight,
  84772. minHeight,
  84773. paddingSM,
  84774. marginLG,
  84775. padding,
  84776. itemPadding,
  84777. colorPrimary,
  84778. itemPaddingSM,
  84779. itemPaddingLG,
  84780. paddingXS,
  84781. margin,
  84782. colorText,
  84783. colorTextDescription,
  84784. motionDurationSlow,
  84785. lineWidth,
  84786. headerBg,
  84787. footerBg,
  84788. emptyTextPadding,
  84789. metaMarginBottom,
  84790. avatarMarginRight,
  84791. titleMarginBottom,
  84792. descriptionFontSize
  84793. } = token;
  84794. return {
  84795. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  84796. position: 'relative',
  84797. // fix https://github.com/ant-design/ant-design/issues/46177
  84798. ['--rc-virtual-list-scrollbar-bg']: token.colorSplit,
  84799. '*': {
  84800. outline: 'none'
  84801. },
  84802. [`${componentCls}-header`]: {
  84803. background: headerBg
  84804. },
  84805. [`${componentCls}-footer`]: {
  84806. background: footerBg
  84807. },
  84808. [`${componentCls}-header, ${componentCls}-footer`]: {
  84809. paddingBlock: paddingSM
  84810. },
  84811. [`${componentCls}-pagination`]: {
  84812. marginBlockStart: marginLG,
  84813. // https://github.com/ant-design/ant-design/issues/20037
  84814. [`${antCls}-pagination-options`]: {
  84815. textAlign: 'start'
  84816. }
  84817. },
  84818. [`${componentCls}-spin`]: {
  84819. minHeight,
  84820. textAlign: 'center'
  84821. },
  84822. [`${componentCls}-items`]: {
  84823. margin: 0,
  84824. padding: 0,
  84825. listStyle: 'none'
  84826. },
  84827. [`${componentCls}-item`]: {
  84828. display: 'flex',
  84829. alignItems: 'center',
  84830. justifyContent: 'space-between',
  84831. padding: itemPadding,
  84832. color: colorText,
  84833. [`${componentCls}-item-meta`]: {
  84834. display: 'flex',
  84835. flex: 1,
  84836. alignItems: 'flex-start',
  84837. maxWidth: '100%',
  84838. [`${componentCls}-item-meta-avatar`]: {
  84839. marginInlineEnd: avatarMarginRight
  84840. },
  84841. [`${componentCls}-item-meta-content`]: {
  84842. flex: '1 0',
  84843. width: 0,
  84844. color: colorText
  84845. },
  84846. [`${componentCls}-item-meta-title`]: {
  84847. margin: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginXXS)} 0`,
  84848. color: colorText,
  84849. fontSize: token.fontSize,
  84850. lineHeight: token.lineHeight,
  84851. '> a': {
  84852. color: colorText,
  84853. transition: `all ${motionDurationSlow}`,
  84854. '&:hover': {
  84855. color: colorPrimary
  84856. }
  84857. }
  84858. },
  84859. [`${componentCls}-item-meta-description`]: {
  84860. color: colorTextDescription,
  84861. fontSize: descriptionFontSize,
  84862. lineHeight: token.lineHeight
  84863. }
  84864. },
  84865. [`${componentCls}-item-action`]: {
  84866. flex: '0 0 auto',
  84867. marginInlineStart: token.marginXXL,
  84868. padding: 0,
  84869. fontSize: 0,
  84870. listStyle: 'none',
  84871. '& > li': {
  84872. position: 'relative',
  84873. display: 'inline-block',
  84874. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`,
  84875. color: colorTextDescription,
  84876. fontSize: token.fontSize,
  84877. lineHeight: token.lineHeight,
  84878. textAlign: 'center',
  84879. '&:first-child': {
  84880. paddingInlineStart: 0
  84881. }
  84882. },
  84883. [`${componentCls}-item-action-split`]: {
  84884. position: 'absolute',
  84885. insetBlockStart: '50%',
  84886. insetInlineEnd: 0,
  84887. width: lineWidth,
  84888. height: token.calc(token.fontHeight).sub(token.calc(token.marginXXS).mul(2)).equal(),
  84889. transform: 'translateY(-50%)',
  84890. backgroundColor: token.colorSplit
  84891. }
  84892. }
  84893. },
  84894. [`${componentCls}-empty`]: {
  84895. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)} 0`,
  84896. color: colorTextDescription,
  84897. fontSize: token.fontSizeSM,
  84898. textAlign: 'center'
  84899. },
  84900. [`${componentCls}-empty-text`]: {
  84901. padding: emptyTextPadding,
  84902. color: token.colorTextDisabled,
  84903. fontSize: token.fontSize,
  84904. textAlign: 'center'
  84905. },
  84906. // ============================ without flex ============================
  84907. [`${componentCls}-item-no-flex`]: {
  84908. display: 'block'
  84909. }
  84910. }),
  84911. [`${componentCls}-grid ${antCls}-col > ${componentCls}-item`]: {
  84912. display: 'block',
  84913. maxWidth: '100%',
  84914. marginBlockEnd: margin,
  84915. paddingBlock: 0,
  84916. borderBlockEnd: 'none'
  84917. },
  84918. [`${componentCls}-vertical ${componentCls}-item`]: {
  84919. alignItems: 'initial',
  84920. [`${componentCls}-item-main`]: {
  84921. display: 'block',
  84922. flex: 1
  84923. },
  84924. [`${componentCls}-item-extra`]: {
  84925. marginInlineStart: marginLG
  84926. },
  84927. [`${componentCls}-item-meta`]: {
  84928. marginBlockEnd: metaMarginBottom,
  84929. [`${componentCls}-item-meta-title`]: {
  84930. marginBlockStart: 0,
  84931. marginBlockEnd: titleMarginBottom,
  84932. color: colorText,
  84933. fontSize: token.fontSizeLG,
  84934. lineHeight: token.lineHeightLG
  84935. }
  84936. },
  84937. [`${componentCls}-item-action`]: {
  84938. marginBlockStart: padding,
  84939. marginInlineStart: 'auto',
  84940. '> li': {
  84941. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)}`,
  84942. '&:first-child': {
  84943. paddingInlineStart: 0
  84944. }
  84945. }
  84946. }
  84947. },
  84948. [`${componentCls}-split ${componentCls}-item`]: {
  84949. borderBlockEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
  84950. '&:last-child': {
  84951. borderBlockEnd: 'none'
  84952. }
  84953. },
  84954. [`${componentCls}-split ${componentCls}-header`]: {
  84955. borderBlockEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  84956. },
  84957. [`${componentCls}-split${componentCls}-empty ${componentCls}-footer`]: {
  84958. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  84959. },
  84960. [`${componentCls}-loading ${componentCls}-spin-nested-loading`]: {
  84961. minHeight: controlHeight
  84962. },
  84963. [`${componentCls}-split${componentCls}-something-after-last-item ${antCls}-spin-container > ${componentCls}-items > ${componentCls}-item:last-child`]: {
  84964. borderBlockEnd: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  84965. },
  84966. [`${componentCls}-lg ${componentCls}-item`]: {
  84967. padding: itemPaddingLG
  84968. },
  84969. [`${componentCls}-sm ${componentCls}-item`]: {
  84970. padding: itemPaddingSM
  84971. },
  84972. // Horizontal
  84973. [`${componentCls}:not(${componentCls}-vertical)`]: {
  84974. [`${componentCls}-item-no-flex`]: {
  84975. [`${componentCls}-item-action`]: {
  84976. float: 'right'
  84977. }
  84978. }
  84979. }
  84980. };
  84981. };
  84982. const prepareComponentToken = token => ({
  84983. contentWidth: 220,
  84984. itemPadding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentVertical)} 0`,
  84985. itemPaddingSM: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentVerticalSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentHorizontal)}`,
  84986. itemPaddingLG: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentVerticalLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingContentHorizontalLG)}`,
  84987. headerBg: 'transparent',
  84988. footerBg: 'transparent',
  84989. emptyTextPadding: token.padding,
  84990. metaMarginBottom: token.padding,
  84991. avatarMarginRight: token.padding,
  84992. titleMarginBottom: token.paddingSM,
  84993. descriptionFontSize: token.fontSize
  84994. });
  84995. // ============================== Export ==============================
  84996. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('List', token => {
  84997. const listToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  84998. listBorderedCls: `${token.componentCls}-bordered`,
  84999. minHeight: token.controlHeightLG
  85000. });
  85001. return [genBaseStyle(listToken), genBorderedStyle(listToken), genResponsiveStyle(listToken)];
  85002. }, prepareComponentToken));
  85003. /***/ }),
  85004. /***/ "./components/locale/context.ts":
  85005. /*!**************************************!*\
  85006. !*** ./components/locale/context.ts ***!
  85007. \**************************************/
  85008. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  85009. "use strict";
  85010. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  85011. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  85012. const LocaleContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);
  85013. /* harmony default export */ __webpack_exports__["default"] = (LocaleContext);
  85014. /***/ }),
  85015. /***/ "./components/locale/en_US.ts":
  85016. /*!************************************!*\
  85017. !*** ./components/locale/en_US.ts ***!
  85018. \************************************/
  85019. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  85020. "use strict";
  85021. /* harmony import */ var rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-pagination/es/locale/en_US */ "./node_modules/rc-pagination/es/locale/en_US.js");
  85022. /* harmony import */ var _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../calendar/locale/en_US */ "./components/calendar/locale/en_US.ts");
  85023. /* harmony import */ var _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../date-picker/locale/en_US */ "./components/date-picker/locale/en_US.ts");
  85024. /* harmony import */ var _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../time-picker/locale/en_US */ "./components/time-picker/locale/en_US.ts");
  85025. const typeTemplate = '${label} is not a valid ${type}';
  85026. const localeValues = {
  85027. locale: 'en',
  85028. Pagination: rc_pagination_es_locale_en_US__WEBPACK_IMPORTED_MODULE_0__["default"],
  85029. DatePicker: _date_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_2__["default"],
  85030. TimePicker: _time_picker_locale_en_US__WEBPACK_IMPORTED_MODULE_3__["default"],
  85031. Calendar: _calendar_locale_en_US__WEBPACK_IMPORTED_MODULE_1__["default"],
  85032. global: {
  85033. placeholder: 'Please select',
  85034. close: 'Close'
  85035. },
  85036. Table: {
  85037. filterTitle: 'Filter menu',
  85038. filterConfirm: 'OK',
  85039. filterReset: 'Reset',
  85040. filterEmptyText: 'No filters',
  85041. filterCheckAll: 'Select all items',
  85042. filterSearchPlaceholder: 'Search in filters',
  85043. emptyText: 'No data',
  85044. selectAll: 'Select current page',
  85045. selectInvert: 'Invert current page',
  85046. selectNone: 'Clear all data',
  85047. selectionAll: 'Select all data',
  85048. sortTitle: 'Sort',
  85049. expand: 'Expand row',
  85050. collapse: 'Collapse row',
  85051. triggerDesc: 'Click to sort descending',
  85052. triggerAsc: 'Click to sort ascending',
  85053. cancelSort: 'Click to cancel sorting'
  85054. },
  85055. Tour: {
  85056. Next: 'Next',
  85057. Previous: 'Previous',
  85058. Finish: 'Finish'
  85059. },
  85060. Modal: {
  85061. okText: 'OK',
  85062. cancelText: 'Cancel',
  85063. justOkText: 'OK'
  85064. },
  85065. Popconfirm: {
  85066. okText: 'OK',
  85067. cancelText: 'Cancel'
  85068. },
  85069. Transfer: {
  85070. titles: ['', ''],
  85071. searchPlaceholder: 'Search here',
  85072. itemUnit: 'item',
  85073. itemsUnit: 'items',
  85074. remove: 'Remove',
  85075. selectCurrent: 'Select current page',
  85076. removeCurrent: 'Remove current page',
  85077. selectAll: 'Select all data',
  85078. deselectAll: 'Deselect all data',
  85079. removeAll: 'Remove all data',
  85080. selectInvert: 'Invert current page'
  85081. },
  85082. Upload: {
  85083. uploading: 'Uploading...',
  85084. removeFile: 'Remove file',
  85085. uploadError: 'Upload error',
  85086. previewFile: 'Preview file',
  85087. downloadFile: 'Download file'
  85088. },
  85089. Empty: {
  85090. description: 'No data'
  85091. },
  85092. Icon: {
  85093. icon: 'icon'
  85094. },
  85095. Text: {
  85096. edit: 'Edit',
  85097. copy: 'Copy',
  85098. copied: 'Copied',
  85099. expand: 'Expand',
  85100. collapse: 'Collapse'
  85101. },
  85102. Form: {
  85103. optional: '(optional)',
  85104. defaultValidateMessages: {
  85105. default: 'Field validation error for ${label}',
  85106. required: 'Please enter ${label}',
  85107. enum: '${label} must be one of [${enum}]',
  85108. whitespace: '${label} cannot be a blank character',
  85109. date: {
  85110. format: '${label} date format is invalid',
  85111. parse: '${label} cannot be converted to a date',
  85112. invalid: '${label} is an invalid date'
  85113. },
  85114. types: {
  85115. string: typeTemplate,
  85116. method: typeTemplate,
  85117. array: typeTemplate,
  85118. object: typeTemplate,
  85119. number: typeTemplate,
  85120. date: typeTemplate,
  85121. boolean: typeTemplate,
  85122. integer: typeTemplate,
  85123. float: typeTemplate,
  85124. regexp: typeTemplate,
  85125. email: typeTemplate,
  85126. url: typeTemplate,
  85127. hex: typeTemplate
  85128. },
  85129. string: {
  85130. len: '${label} must be ${len} characters',
  85131. min: '${label} must be at least ${min} characters',
  85132. max: '${label} must be up to ${max} characters',
  85133. range: '${label} must be between ${min}-${max} characters'
  85134. },
  85135. number: {
  85136. len: '${label} must be equal to ${len}',
  85137. min: '${label} must be minimum ${min}',
  85138. max: '${label} must be maximum ${max}',
  85139. range: '${label} must be between ${min}-${max}'
  85140. },
  85141. array: {
  85142. len: 'Must be ${len} ${label}',
  85143. min: 'At least ${min} ${label}',
  85144. max: 'At most ${max} ${label}',
  85145. range: 'The amount of ${label} must be between ${min}-${max}'
  85146. },
  85147. pattern: {
  85148. mismatch: '${label} does not match the pattern ${pattern}'
  85149. }
  85150. }
  85151. },
  85152. Image: {
  85153. preview: 'Preview'
  85154. },
  85155. QRCode: {
  85156. expired: 'QR code expired',
  85157. refresh: 'Refresh',
  85158. scanned: 'Scanned'
  85159. },
  85160. ColorPicker: {
  85161. presetEmpty: 'Empty',
  85162. transparent: 'Transparent',
  85163. singleColor: 'Single',
  85164. gradientColor: 'Gradient'
  85165. }
  85166. };
  85167. /* harmony default export */ __webpack_exports__["default"] = (localeValues);
  85168. /***/ }),
  85169. /***/ "./components/locale/useLocale.ts":
  85170. /*!****************************************!*\
  85171. !*** ./components/locale/useLocale.ts ***!
  85172. \****************************************/
  85173. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  85174. "use strict";
  85175. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  85176. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  85177. /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context */ "./components/locale/context.ts");
  85178. /* harmony import */ var _en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./en_US */ "./components/locale/en_US.ts");
  85179. const useLocale = (componentName, defaultLocale) => {
  85180. const fullLocale = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_context__WEBPACK_IMPORTED_MODULE_1__["default"]);
  85181. const getLocale = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
  85182. var _a;
  85183. const locale = defaultLocale || _en_US__WEBPACK_IMPORTED_MODULE_2__["default"][componentName];
  85184. const localeFromContext = (_a = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale[componentName]) !== null && _a !== void 0 ? _a : {};
  85185. return Object.assign(Object.assign({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});
  85186. }, [componentName, defaultLocale, fullLocale]);
  85187. const getLocaleCode = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
  85188. const localeCode = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.locale;
  85189. // Had use LocaleProvide but didn't set locale
  85190. if ((fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.exist) && !localeCode) {
  85191. return _en_US__WEBPACK_IMPORTED_MODULE_2__["default"].locale;
  85192. }
  85193. return localeCode;
  85194. }, [fullLocale]);
  85195. return [getLocale, getLocaleCode];
  85196. };
  85197. /* harmony default export */ __webpack_exports__["default"] = (useLocale);
  85198. /***/ }),
  85199. /***/ "./components/mentions/style/index.ts":
  85200. /*!********************************************!*\
  85201. !*** ./components/mentions/style/index.ts ***!
  85202. \********************************************/
  85203. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  85204. "use strict";
  85205. __webpack_require__.r(__webpack_exports__);
  85206. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  85207. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  85208. /* harmony export */ });
  85209. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  85210. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  85211. /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.ts");
  85212. /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/token.ts");
  85213. /* harmony import */ var _input_style_variants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../input/style/variants */ "./components/input/style/variants.ts");
  85214. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  85215. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  85216. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  85217. const genMentionsStyle = token => {
  85218. const {
  85219. componentCls,
  85220. antCls,
  85221. colorTextDisabled,
  85222. controlItemBgHover,
  85223. controlPaddingHorizontal,
  85224. colorText,
  85225. motionDurationSlow,
  85226. lineHeight,
  85227. controlHeight,
  85228. paddingInline,
  85229. paddingBlock,
  85230. fontSize,
  85231. fontSizeIcon,
  85232. colorIcon,
  85233. colorTextQuaternary,
  85234. colorBgElevated,
  85235. paddingXXS,
  85236. borderRadius,
  85237. borderRadiusLG,
  85238. boxShadowSecondary,
  85239. itemPaddingVertical,
  85240. calc
  85241. } = token;
  85242. return {
  85243. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_4__.resetComponent)(token)), (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genBasicInputStyle)(token)), {
  85244. position: 'relative',
  85245. display: 'inline-block',
  85246. height: 'auto',
  85247. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingInline)}`,
  85248. overflow: 'hidden',
  85249. lineHeight,
  85250. whiteSpace: 'pre-wrap',
  85251. verticalAlign: 'bottom'
  85252. }), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genOutlinedStyle)(token)), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genFilledStyle)(token)), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genBorderlessStyle)(token)), {
  85253. '&-affix-wrapper': Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genBasicInputStyle)(token)), {
  85254. display: 'inline-flex',
  85255. paddingBlock: 0,
  85256. paddingInlineStart: 0,
  85257. paddingInlineEnd: token.paddingInline,
  85258. '&::before': {
  85259. display: 'inline-block',
  85260. width: 0,
  85261. visibility: 'hidden',
  85262. content: '"\\a0"'
  85263. },
  85264. [`${componentCls}-suffix`]: {
  85265. display: 'inline-flex',
  85266. alignItems: 'center',
  85267. // 当页面中存在 feedback-icon 时,给 clear-icon 添加右边距
  85268. [`&:has(${antCls}-form-item-feedback-icon) ${componentCls}-clear-icon`]: {
  85269. marginInlineEnd: token.marginXS
  85270. },
  85271. [`${antCls}-form-item-feedback-icon`]: {
  85272. display: 'inline-flex',
  85273. alignItems: 'center',
  85274. justifyContent: 'center'
  85275. }
  85276. },
  85277. [`${componentCls}-clear-icon`]: {
  85278. insetInlineEnd: 0,
  85279. insetBlockStart: calc(fontSize).mul(lineHeight).mul(0.5).add(paddingBlock).equal(),
  85280. padding: 0,
  85281. lineHeight: 0,
  85282. color: colorTextQuaternary,
  85283. fontSize: fontSizeIcon,
  85284. verticalAlign: -1,
  85285. // https://github.com/ant-design/ant-design/pull/18151
  85286. // https://codesandbox.io/s/wizardly-sun-u10br
  85287. cursor: 'pointer',
  85288. transition: `color ${motionDurationSlow}`,
  85289. border: 'none',
  85290. outline: 'none',
  85291. backgroundColor: 'transparent',
  85292. '&:hover': {
  85293. color: colorIcon
  85294. },
  85295. '&:active': {
  85296. color: colorText
  85297. },
  85298. '&-hidden': {
  85299. visibility: 'hidden'
  85300. }
  85301. }
  85302. })
  85303. }), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genUnderlinedStyle)(token)), {
  85304. '&-disabled': {
  85305. '> textarea': Object.assign({}, (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genDisabledStyle)(token))
  85306. },
  85307. // ================= Input Area =================
  85308. [`&, &-affix-wrapper > ${componentCls}`]: {
  85309. [`> textarea, ${componentCls}-measure`]: {
  85310. color: colorText,
  85311. boxSizing: 'border-box',
  85312. minHeight: token.calc(controlHeight).sub(2).equal(),
  85313. margin: 0,
  85314. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingBlock)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingInline)}`,
  85315. overflow: 'inherit',
  85316. overflowX: 'hidden',
  85317. overflowY: 'auto',
  85318. fontWeight: 'inherit',
  85319. fontSize: 'inherit',
  85320. fontFamily: 'inherit',
  85321. fontStyle: 'inherit',
  85322. fontVariant: 'inherit',
  85323. fontSizeAdjust: 'inherit',
  85324. fontStretch: 'inherit',
  85325. lineHeight: 'inherit',
  85326. direction: 'inherit',
  85327. letterSpacing: 'inherit',
  85328. whiteSpace: 'inherit',
  85329. textAlign: 'inherit',
  85330. verticalAlign: 'top',
  85331. wordWrap: 'break-word',
  85332. wordBreak: 'inherit',
  85333. tabSize: 'inherit'
  85334. },
  85335. '> textarea': Object.assign(Object.assign({
  85336. width: '100%',
  85337. border: 'none',
  85338. outline: 'none',
  85339. resize: 'none',
  85340. backgroundColor: 'transparent'
  85341. }, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genPlaceholderStyle)(token.colorTextPlaceholder)), {
  85342. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingBlock)} 0`
  85343. }),
  85344. [`${componentCls}-measure`]: {
  85345. position: 'absolute',
  85346. top: 0,
  85347. insetInlineEnd: 0,
  85348. bottom: 0,
  85349. insetInlineStart: 0,
  85350. zIndex: -1,
  85351. color: 'transparent',
  85352. pointerEvents: 'none',
  85353. '> span': {
  85354. display: 'inline-block',
  85355. minHeight: '1em'
  85356. }
  85357. }
  85358. },
  85359. // ================== Dropdown ==================
  85360. '&-dropdown': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_4__.resetComponent)(token)), {
  85361. position: 'absolute',
  85362. top: -9999,
  85363. insetInlineStart: -9999,
  85364. zIndex: token.zIndexPopup,
  85365. boxSizing: 'border-box',
  85366. fontSize,
  85367. fontVariant: 'initial',
  85368. padding: paddingXXS,
  85369. backgroundColor: colorBgElevated,
  85370. borderRadius: borderRadiusLG,
  85371. outline: 'none',
  85372. boxShadow: boxShadowSecondary,
  85373. '&-hidden': {
  85374. display: 'none'
  85375. },
  85376. [`${componentCls}-dropdown-menu`]: {
  85377. maxHeight: token.dropdownHeight,
  85378. margin: 0,
  85379. paddingInlineStart: 0,
  85380. // Override default ul/ol
  85381. overflow: 'auto',
  85382. listStyle: 'none',
  85383. outline: 'none',
  85384. '&-item': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_4__.textEllipsis), {
  85385. position: 'relative',
  85386. display: 'block',
  85387. minWidth: token.controlItemWidth,
  85388. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(itemPaddingVertical)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(controlPaddingHorizontal)}`,
  85389. color: colorText,
  85390. borderRadius,
  85391. fontWeight: 'normal',
  85392. lineHeight,
  85393. cursor: 'pointer',
  85394. transition: `background ${motionDurationSlow} ease`,
  85395. '&:hover': {
  85396. backgroundColor: controlItemBgHover
  85397. },
  85398. '&-disabled': {
  85399. color: colorTextDisabled,
  85400. cursor: 'not-allowed',
  85401. '&:hover': {
  85402. color: colorTextDisabled,
  85403. backgroundColor: controlItemBgHover,
  85404. cursor: 'not-allowed'
  85405. }
  85406. },
  85407. '&-selected': {
  85408. color: colorText,
  85409. fontWeight: token.fontWeightStrong,
  85410. backgroundColor: controlItemBgHover
  85411. },
  85412. '&-active': {
  85413. backgroundColor: controlItemBgHover
  85414. }
  85415. })
  85416. }
  85417. })
  85418. })
  85419. };
  85420. };
  85421. const prepareComponentToken = token => Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_2__.initComponentToken)(token)), {
  85422. dropdownHeight: 250,
  85423. controlItemWidth: 100,
  85424. zIndexPopup: token.zIndexPopupBase + 50,
  85425. itemPaddingVertical: (token.controlHeight - token.fontHeight) / 2
  85426. });
  85427. // ============================== Export ==============================
  85428. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Mentions', token => {
  85429. const mentionsToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, (0,_input_style__WEBPACK_IMPORTED_MODULE_2__.initInputToken)(token));
  85430. return genMentionsStyle(mentionsToken);
  85431. }, prepareComponentToken));
  85432. /***/ }),
  85433. /***/ "./components/menu/style/index.ts":
  85434. /*!****************************************************!*\
  85435. !*** ./components/menu/style/index.ts + 4 modules ***!
  85436. \****************************************************/
  85437. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  85438. "use strict";
  85439. // ESM COMPAT FLAG
  85440. __webpack_require__.r(__webpack_exports__);
  85441. // EXPORTS
  85442. __webpack_require__.d(__webpack_exports__, {
  85443. "default": function() { return /* binding */ menu_style; },
  85444. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  85445. });
  85446. // EXTERNAL MODULE: ./alias/cssinjs.js
  85447. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  85448. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  85449. var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  85450. // EXTERNAL MODULE: ./components/style/index.tsx
  85451. var style = __webpack_require__("./components/style/index.tsx");
  85452. // EXTERNAL MODULE: ./components/style/motion/collapse.ts
  85453. var collapse = __webpack_require__("./components/style/motion/collapse.ts");
  85454. // EXTERNAL MODULE: ./components/style/motion/slide.ts
  85455. var slide = __webpack_require__("./components/style/motion/slide.ts");
  85456. // EXTERNAL MODULE: ./components/style/motion/zoom.ts
  85457. var zoom = __webpack_require__("./components/style/motion/zoom.ts");
  85458. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  85459. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  85460. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  85461. var cssinjs_utils_es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  85462. ;// ./components/menu/style/horizontal.ts
  85463. const getHorizontalStyle = token => {
  85464. const {
  85465. componentCls,
  85466. motionDurationSlow,
  85467. horizontalLineHeight,
  85468. colorSplit,
  85469. lineWidth,
  85470. lineType,
  85471. itemPaddingInline
  85472. } = token;
  85473. return {
  85474. [`${componentCls}-horizontal`]: {
  85475. lineHeight: horizontalLineHeight,
  85476. border: 0,
  85477. borderBottom: `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  85478. boxShadow: 'none',
  85479. '&::after': {
  85480. display: 'block',
  85481. clear: 'both',
  85482. height: 0,
  85483. content: '"\\20"'
  85484. },
  85485. // ======================= Item =======================
  85486. [`${componentCls}-item, ${componentCls}-submenu`]: {
  85487. position: 'relative',
  85488. display: 'inline-block',
  85489. verticalAlign: 'bottom',
  85490. paddingInline: itemPaddingInline
  85491. },
  85492. [`> ${componentCls}-item:hover,
  85493. > ${componentCls}-item-active,
  85494. > ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
  85495. backgroundColor: 'transparent'
  85496. },
  85497. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  85498. transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(',')
  85499. },
  85500. // ===================== Sub Menu =====================
  85501. [`${componentCls}-submenu-arrow`]: {
  85502. display: 'none'
  85503. }
  85504. }
  85505. };
  85506. };
  85507. /* harmony default export */ var horizontal = (getHorizontalStyle);
  85508. ;// ./components/menu/style/rtl.ts
  85509. const getRTLStyle = ({
  85510. componentCls,
  85511. menuArrowOffset,
  85512. calc
  85513. }) => ({
  85514. [`${componentCls}-rtl`]: {
  85515. direction: 'rtl'
  85516. },
  85517. [`${componentCls}-submenu-rtl`]: {
  85518. transformOrigin: '100% 0'
  85519. },
  85520. // Vertical Arrow
  85521. [`${componentCls}-rtl${componentCls}-vertical,
  85522. ${componentCls}-submenu-rtl ${componentCls}-vertical`]: {
  85523. [`${componentCls}-submenu-arrow`]: {
  85524. '&::before': {
  85525. transform: `rotate(-45deg) translateY(${(0,cssinjs.unit)(calc(menuArrowOffset).mul(-1).equal())})`
  85526. },
  85527. '&::after': {
  85528. transform: `rotate(45deg) translateY(${(0,cssinjs.unit)(menuArrowOffset)})`
  85529. }
  85530. }
  85531. }
  85532. });
  85533. /* harmony default export */ var rtl = (getRTLStyle);
  85534. ;// ./components/menu/style/theme.ts
  85535. const accessibilityFocus = token => (0,style.genFocusOutline)(token);
  85536. const getThemeStyle = (token, themeSuffix) => {
  85537. const {
  85538. componentCls,
  85539. itemColor,
  85540. itemSelectedColor,
  85541. subMenuItemSelectedColor,
  85542. groupTitleColor,
  85543. itemBg,
  85544. subMenuItemBg,
  85545. itemSelectedBg,
  85546. activeBarHeight,
  85547. activeBarWidth,
  85548. activeBarBorderWidth,
  85549. motionDurationSlow,
  85550. motionEaseInOut,
  85551. motionEaseOut,
  85552. itemPaddingInline,
  85553. motionDurationMid,
  85554. itemHoverColor,
  85555. lineType,
  85556. colorSplit,
  85557. // Disabled
  85558. itemDisabledColor,
  85559. // Danger
  85560. dangerItemColor,
  85561. dangerItemHoverColor,
  85562. dangerItemSelectedColor,
  85563. dangerItemActiveBg,
  85564. dangerItemSelectedBg,
  85565. // Bg
  85566. popupBg,
  85567. itemHoverBg,
  85568. itemActiveBg,
  85569. menuSubMenuBg,
  85570. // Horizontal
  85571. horizontalItemSelectedColor,
  85572. horizontalItemSelectedBg,
  85573. horizontalItemBorderRadius,
  85574. horizontalItemHoverBg
  85575. } = token;
  85576. return {
  85577. [`${componentCls}-${themeSuffix}, ${componentCls}-${themeSuffix} > ${componentCls}`]: {
  85578. color: itemColor,
  85579. background: itemBg,
  85580. [`&${componentCls}-root:focus-visible`]: Object.assign({}, accessibilityFocus(token)),
  85581. // ======================== Item ========================
  85582. [`${componentCls}-item`]: {
  85583. '&-group-title, &-extra': {
  85584. color: groupTitleColor
  85585. }
  85586. },
  85587. [`${componentCls}-submenu-selected > ${componentCls}-submenu-title`]: {
  85588. color: subMenuItemSelectedColor
  85589. },
  85590. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  85591. color: itemColor,
  85592. [`&:not(${componentCls}-item-disabled):focus-visible`]: Object.assign({}, accessibilityFocus(token))
  85593. },
  85594. // Disabled
  85595. [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
  85596. color: `${itemDisabledColor} !important`
  85597. },
  85598. // Hover
  85599. [`${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
  85600. [`&:hover, > ${componentCls}-submenu-title:hover`]: {
  85601. color: itemHoverColor
  85602. }
  85603. },
  85604. [`&:not(${componentCls}-horizontal)`]: {
  85605. [`${componentCls}-item:not(${componentCls}-item-selected)`]: {
  85606. '&:hover': {
  85607. backgroundColor: itemHoverBg
  85608. },
  85609. '&:active': {
  85610. backgroundColor: itemActiveBg
  85611. }
  85612. },
  85613. [`${componentCls}-submenu-title`]: {
  85614. '&:hover': {
  85615. backgroundColor: itemHoverBg
  85616. },
  85617. '&:active': {
  85618. backgroundColor: itemActiveBg
  85619. }
  85620. }
  85621. },
  85622. // Danger - only Item has
  85623. [`${componentCls}-item-danger`]: {
  85624. color: dangerItemColor,
  85625. [`&${componentCls}-item:hover`]: {
  85626. [`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
  85627. color: dangerItemHoverColor
  85628. }
  85629. },
  85630. [`&${componentCls}-item:active`]: {
  85631. background: dangerItemActiveBg
  85632. }
  85633. },
  85634. [`${componentCls}-item a`]: {
  85635. '&, &:hover': {
  85636. color: 'inherit'
  85637. }
  85638. },
  85639. [`${componentCls}-item-selected`]: {
  85640. color: itemSelectedColor,
  85641. // Danger
  85642. [`&${componentCls}-item-danger`]: {
  85643. color: dangerItemSelectedColor
  85644. },
  85645. 'a, a:hover': {
  85646. color: 'inherit'
  85647. }
  85648. },
  85649. [`& ${componentCls}-item-selected`]: {
  85650. backgroundColor: itemSelectedBg,
  85651. // Danger
  85652. [`&${componentCls}-item-danger`]: {
  85653. backgroundColor: dangerItemSelectedBg
  85654. }
  85655. },
  85656. [`&${componentCls}-submenu > ${componentCls}`]: {
  85657. backgroundColor: menuSubMenuBg
  85658. },
  85659. // ===== 设置浮层的颜色 =======
  85660. // !dark 模式会被popupBg 会被rest 为 darkPopupBg
  85661. [`&${componentCls}-popup > ${componentCls}`]: {
  85662. backgroundColor: popupBg
  85663. },
  85664. [`&${componentCls}-submenu-popup > ${componentCls}`]: {
  85665. backgroundColor: popupBg
  85666. },
  85667. // ===== 设置浮层的颜色 end =======
  85668. // ====================== Horizontal ======================
  85669. [`&${componentCls}-horizontal`]: Object.assign(Object.assign({}, themeSuffix === 'dark' ? {
  85670. borderBottom: 0
  85671. } : {}), {
  85672. [`> ${componentCls}-item, > ${componentCls}-submenu`]: {
  85673. top: activeBarBorderWidth,
  85674. marginTop: token.calc(activeBarBorderWidth).mul(-1).equal(),
  85675. marginBottom: 0,
  85676. borderRadius: horizontalItemBorderRadius,
  85677. '&::after': {
  85678. position: 'absolute',
  85679. insetInline: itemPaddingInline,
  85680. bottom: 0,
  85681. borderBottom: `${(0,cssinjs.unit)(activeBarHeight)} solid transparent`,
  85682. transition: `border-color ${motionDurationSlow} ${motionEaseInOut}`,
  85683. content: '""'
  85684. },
  85685. '&:hover, &-active, &-open': {
  85686. background: horizontalItemHoverBg,
  85687. '&::after': {
  85688. borderBottomWidth: activeBarHeight,
  85689. borderBottomColor: horizontalItemSelectedColor
  85690. }
  85691. },
  85692. '&-selected': {
  85693. color: horizontalItemSelectedColor,
  85694. backgroundColor: horizontalItemSelectedBg,
  85695. '&:hover': {
  85696. backgroundColor: horizontalItemSelectedBg
  85697. },
  85698. '&::after': {
  85699. borderBottomWidth: activeBarHeight,
  85700. borderBottomColor: horizontalItemSelectedColor
  85701. }
  85702. }
  85703. }
  85704. }),
  85705. // ================== Inline & Vertical ===================
  85706. //
  85707. [`&${componentCls}-root`]: {
  85708. [`&${componentCls}-inline, &${componentCls}-vertical`]: {
  85709. borderInlineEnd: `${(0,cssinjs.unit)(activeBarBorderWidth)} ${lineType} ${colorSplit}`
  85710. }
  85711. },
  85712. // ======================== Inline ========================
  85713. [`&${componentCls}-inline`]: {
  85714. // Sub
  85715. [`${componentCls}-sub${componentCls}-inline`]: {
  85716. background: subMenuItemBg
  85717. },
  85718. [`${componentCls}-item`]: {
  85719. position: 'relative',
  85720. '&::after': {
  85721. position: 'absolute',
  85722. insetBlock: 0,
  85723. insetInlineEnd: 0,
  85724. borderInlineEnd: `${(0,cssinjs.unit)(activeBarWidth)} solid ${itemSelectedColor}`,
  85725. transform: 'scaleY(0.0001)',
  85726. opacity: 0,
  85727. transition: [`transform ${motionDurationMid} ${motionEaseOut}`, `opacity ${motionDurationMid} ${motionEaseOut}`].join(','),
  85728. content: '""'
  85729. },
  85730. // Danger
  85731. [`&${componentCls}-item-danger`]: {
  85732. '&::after': {
  85733. borderInlineEndColor: dangerItemSelectedColor
  85734. }
  85735. }
  85736. },
  85737. [`${componentCls}-selected, ${componentCls}-item-selected`]: {
  85738. '&::after': {
  85739. transform: 'scaleY(1)',
  85740. opacity: 1,
  85741. transition: [`transform ${motionDurationMid} ${motionEaseInOut}`, `opacity ${motionDurationMid} ${motionEaseInOut}`].join(',')
  85742. }
  85743. }
  85744. }
  85745. }
  85746. };
  85747. };
  85748. /* harmony default export */ var theme = (getThemeStyle);
  85749. ;// ./components/menu/style/vertical.ts
  85750. const getVerticalInlineStyle = token => {
  85751. const {
  85752. componentCls,
  85753. itemHeight,
  85754. itemMarginInline,
  85755. padding,
  85756. menuArrowSize,
  85757. marginXS,
  85758. itemMarginBlock,
  85759. itemWidth,
  85760. itemPaddingInline
  85761. } = token;
  85762. const paddingWithArrow = token.calc(menuArrowSize).add(padding).add(marginXS).equal();
  85763. return {
  85764. [`${componentCls}-item`]: {
  85765. position: 'relative',
  85766. overflow: 'hidden'
  85767. },
  85768. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  85769. height: itemHeight,
  85770. lineHeight: (0,cssinjs.unit)(itemHeight),
  85771. paddingInline: itemPaddingInline,
  85772. overflow: 'hidden',
  85773. textOverflow: 'ellipsis',
  85774. marginInline: itemMarginInline,
  85775. marginBlock: itemMarginBlock,
  85776. width: itemWidth
  85777. },
  85778. [`> ${componentCls}-item,
  85779. > ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
  85780. height: itemHeight,
  85781. lineHeight: (0,cssinjs.unit)(itemHeight)
  85782. },
  85783. [`${componentCls}-item-group-list ${componentCls}-submenu-title,
  85784. ${componentCls}-submenu-title`]: {
  85785. paddingInlineEnd: paddingWithArrow
  85786. }
  85787. };
  85788. };
  85789. const getVerticalStyle = token => {
  85790. const {
  85791. componentCls,
  85792. iconCls,
  85793. itemHeight,
  85794. colorTextLightSolid,
  85795. dropdownWidth,
  85796. controlHeightLG,
  85797. motionEaseOut,
  85798. paddingXL,
  85799. itemMarginInline,
  85800. fontSizeLG,
  85801. motionDurationFast,
  85802. motionDurationSlow,
  85803. paddingXS,
  85804. boxShadowSecondary,
  85805. collapsedWidth,
  85806. collapsedIconSize
  85807. } = token;
  85808. const inlineItemStyle = {
  85809. height: itemHeight,
  85810. lineHeight: (0,cssinjs.unit)(itemHeight),
  85811. listStylePosition: 'inside',
  85812. listStyleType: 'disc'
  85813. };
  85814. return [{
  85815. [componentCls]: {
  85816. '&-inline, &-vertical': Object.assign({
  85817. [`&${componentCls}-root`]: {
  85818. boxShadow: 'none'
  85819. }
  85820. }, getVerticalInlineStyle(token))
  85821. },
  85822. [`${componentCls}-submenu-popup`]: {
  85823. [`${componentCls}-vertical`]: Object.assign(Object.assign({}, getVerticalInlineStyle(token)), {
  85824. boxShadow: boxShadowSecondary
  85825. })
  85826. }
  85827. },
  85828. // Vertical only
  85829. {
  85830. [`${componentCls}-submenu-popup ${componentCls}-vertical${componentCls}-sub`]: {
  85831. minWidth: dropdownWidth,
  85832. maxHeight: `calc(100vh - ${(0,cssinjs.unit)(token.calc(controlHeightLG).mul(2.5).equal())})`,
  85833. padding: '0',
  85834. overflow: 'hidden',
  85835. borderInlineEnd: 0,
  85836. // https://github.com/ant-design/ant-design/issues/22244
  85837. // https://github.com/ant-design/ant-design/issues/26812
  85838. "&:not([class*='-active'])": {
  85839. overflowX: 'hidden',
  85840. overflowY: 'auto'
  85841. }
  85842. }
  85843. },
  85844. // Inline Only
  85845. {
  85846. [`${componentCls}-inline`]: {
  85847. width: '100%',
  85848. // Motion enhance for first level
  85849. [`&${componentCls}-root`]: {
  85850. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  85851. display: 'flex',
  85852. alignItems: 'center',
  85853. transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationFast} ${motionEaseOut}`].join(','),
  85854. [`> ${componentCls}-title-content`]: {
  85855. flex: 'auto',
  85856. minWidth: 0,
  85857. overflow: 'hidden',
  85858. textOverflow: 'ellipsis'
  85859. },
  85860. '> *': {
  85861. flex: 'none'
  85862. }
  85863. }
  85864. },
  85865. // >>>>> Sub
  85866. [`${componentCls}-sub${componentCls}-inline`]: {
  85867. padding: 0,
  85868. border: 0,
  85869. borderRadius: 0,
  85870. boxShadow: 'none',
  85871. [`& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: inlineItemStyle,
  85872. [`& ${componentCls}-item-group-title`]: {
  85873. paddingInlineStart: paddingXL
  85874. }
  85875. },
  85876. // >>>>> Item
  85877. [`${componentCls}-item`]: inlineItemStyle
  85878. }
  85879. },
  85880. // Inline Collapse Only
  85881. {
  85882. [`${componentCls}-inline-collapsed`]: {
  85883. width: collapsedWidth,
  85884. [`&${componentCls}-root`]: {
  85885. [`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
  85886. [`> ${componentCls}-inline-collapsed-noicon`]: {
  85887. fontSize: fontSizeLG,
  85888. textAlign: 'center'
  85889. }
  85890. }
  85891. },
  85892. [`> ${componentCls}-item,
  85893. > ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
  85894. > ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
  85895. > ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
  85896. insetInlineStart: 0,
  85897. paddingInline: `calc(50% - ${(0,cssinjs.unit)(token.calc(collapsedIconSize).div(2).equal())} - ${(0,cssinjs.unit)(itemMarginInline)})`,
  85898. textOverflow: 'clip',
  85899. [`
  85900. ${componentCls}-submenu-arrow,
  85901. ${componentCls}-submenu-expand-icon
  85902. `]: {
  85903. opacity: 0
  85904. },
  85905. [`${componentCls}-item-icon, ${iconCls}`]: {
  85906. margin: 0,
  85907. fontSize: collapsedIconSize,
  85908. lineHeight: (0,cssinjs.unit)(itemHeight),
  85909. '+ span': {
  85910. display: 'inline-block',
  85911. opacity: 0
  85912. }
  85913. }
  85914. },
  85915. [`${componentCls}-item-icon, ${iconCls}`]: {
  85916. display: 'inline-block'
  85917. },
  85918. '&-tooltip': {
  85919. pointerEvents: 'none',
  85920. [`${componentCls}-item-icon, ${iconCls}`]: {
  85921. display: 'none'
  85922. },
  85923. 'a, a:hover': {
  85924. color: colorTextLightSolid
  85925. }
  85926. },
  85927. [`${componentCls}-item-group-title`]: Object.assign(Object.assign({}, style.textEllipsis), {
  85928. paddingInline: paddingXS
  85929. })
  85930. }
  85931. }];
  85932. };
  85933. /* harmony default export */ var vertical = (getVerticalStyle);
  85934. ;// ./components/menu/style/index.ts
  85935. const genMenuItemStyle = token => {
  85936. const {
  85937. componentCls,
  85938. motionDurationSlow,
  85939. motionDurationMid,
  85940. motionEaseInOut,
  85941. motionEaseOut,
  85942. iconCls,
  85943. iconSize,
  85944. iconMarginInlineEnd
  85945. } = token;
  85946. return {
  85947. // >>>>> Item
  85948. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  85949. position: 'relative',
  85950. display: 'block',
  85951. margin: 0,
  85952. whiteSpace: 'nowrap',
  85953. cursor: 'pointer',
  85954. transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding calc(${motionDurationSlow} + 0.1s) ${motionEaseInOut}`].join(','),
  85955. [`${componentCls}-item-icon, ${iconCls}`]: {
  85956. minWidth: iconSize,
  85957. fontSize: iconSize,
  85958. transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(','),
  85959. '+ span': {
  85960. marginInlineStart: iconMarginInlineEnd,
  85961. opacity: 1,
  85962. transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(',')
  85963. }
  85964. },
  85965. [`${componentCls}-item-icon`]: Object.assign({}, (0,style.resetIcon)()),
  85966. [`&${componentCls}-item-only-child`]: {
  85967. [`> ${iconCls}, > ${componentCls}-item-icon`]: {
  85968. marginInlineEnd: 0
  85969. }
  85970. }
  85971. },
  85972. // Disabled state sets text to gray and nukes hover/tab effects
  85973. [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
  85974. background: 'none !important',
  85975. cursor: 'not-allowed',
  85976. '&::after': {
  85977. borderColor: 'transparent !important'
  85978. },
  85979. a: {
  85980. color: 'inherit !important',
  85981. cursor: 'not-allowed',
  85982. pointerEvents: 'none'
  85983. },
  85984. [`> ${componentCls}-submenu-title`]: {
  85985. color: 'inherit !important',
  85986. cursor: 'not-allowed'
  85987. }
  85988. }
  85989. };
  85990. };
  85991. const genSubMenuArrowStyle = token => {
  85992. const {
  85993. componentCls,
  85994. motionDurationSlow,
  85995. motionEaseInOut,
  85996. borderRadius,
  85997. menuArrowSize,
  85998. menuArrowOffset
  85999. } = token;
  86000. return {
  86001. [`${componentCls}-submenu`]: {
  86002. '&-expand-icon, &-arrow': {
  86003. position: 'absolute',
  86004. top: '50%',
  86005. insetInlineEnd: token.margin,
  86006. width: menuArrowSize,
  86007. color: 'currentcolor',
  86008. transform: 'translateY(-50%)',
  86009. transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`
  86010. },
  86011. '&-arrow': {
  86012. // →
  86013. '&::before, &::after': {
  86014. position: 'absolute',
  86015. width: token.calc(menuArrowSize).mul(0.6).equal(),
  86016. height: token.calc(menuArrowSize).mul(0.15).equal(),
  86017. backgroundColor: 'currentcolor',
  86018. borderRadius,
  86019. transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(','),
  86020. content: '""'
  86021. },
  86022. '&::before': {
  86023. transform: `rotate(45deg) translateY(${(0,cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
  86024. },
  86025. '&::after': {
  86026. transform: `rotate(-45deg) translateY(${(0,cssinjs.unit)(menuArrowOffset)})`
  86027. }
  86028. }
  86029. }
  86030. };
  86031. };
  86032. // =============================== Base ===============================
  86033. const getBaseStyle = token => {
  86034. const {
  86035. antCls,
  86036. componentCls,
  86037. fontSize,
  86038. motionDurationSlow,
  86039. motionDurationMid,
  86040. motionEaseInOut,
  86041. paddingXS,
  86042. padding,
  86043. colorSplit,
  86044. lineWidth,
  86045. zIndexPopup,
  86046. borderRadiusLG,
  86047. subMenuItemBorderRadius,
  86048. menuArrowSize,
  86049. menuArrowOffset,
  86050. lineType,
  86051. groupTitleLineHeight,
  86052. groupTitleFontSize
  86053. } = token;
  86054. return [
  86055. // Misc
  86056. {
  86057. '': {
  86058. [componentCls]: Object.assign(Object.assign({}, (0,style.clearFix)()), {
  86059. // Hidden
  86060. '&-hidden': {
  86061. display: 'none'
  86062. }
  86063. })
  86064. },
  86065. [`${componentCls}-submenu-hidden`]: {
  86066. display: 'none'
  86067. }
  86068. }, {
  86069. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), (0,style.clearFix)()), {
  86070. marginBottom: 0,
  86071. paddingInlineStart: 0,
  86072. // Override default ul/ol
  86073. fontSize,
  86074. lineHeight: 0,
  86075. listStyle: 'none',
  86076. outline: 'none',
  86077. // Magic cubic here but smooth transition
  86078. transition: `width ${motionDurationSlow} cubic-bezier(0.2, 0, 0, 1) 0s`,
  86079. 'ul, ol': {
  86080. margin: 0,
  86081. padding: 0,
  86082. listStyle: 'none'
  86083. },
  86084. // Overflow ellipsis
  86085. '&-overflow': {
  86086. display: 'flex',
  86087. [`${componentCls}-item`]: {
  86088. flex: 'none'
  86089. }
  86090. },
  86091. [`${componentCls}-item, ${componentCls}-submenu, ${componentCls}-submenu-title`]: {
  86092. borderRadius: token.itemBorderRadius
  86093. },
  86094. [`${componentCls}-item-group-title`]: {
  86095. padding: `${(0,cssinjs.unit)(paddingXS)} ${(0,cssinjs.unit)(padding)}`,
  86096. fontSize: groupTitleFontSize,
  86097. lineHeight: groupTitleLineHeight,
  86098. transition: `all ${motionDurationSlow}`
  86099. },
  86100. [`&-horizontal ${componentCls}-submenu`]: {
  86101. transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`].join(',')
  86102. },
  86103. [`${componentCls}-submenu, ${componentCls}-submenu-inline`]: {
  86104. transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationMid} ${motionEaseInOut}`].join(',')
  86105. },
  86106. [`${componentCls}-submenu ${componentCls}-sub`]: {
  86107. cursor: 'initial',
  86108. transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(',')
  86109. },
  86110. [`${componentCls}-title-content`]: {
  86111. transition: `color ${motionDurationSlow}`,
  86112. '&-with-extra': {
  86113. display: 'inline-flex',
  86114. alignItems: 'center',
  86115. width: '100%'
  86116. },
  86117. // https://github.com/ant-design/ant-design/issues/41143
  86118. [`> ${antCls}-typography-ellipsis-single-line`]: {
  86119. display: 'inline',
  86120. verticalAlign: 'unset'
  86121. },
  86122. [`${componentCls}-item-extra`]: {
  86123. marginInlineStart: 'auto',
  86124. paddingInlineStart: token.padding
  86125. }
  86126. },
  86127. [`${componentCls}-item a`]: {
  86128. '&::before': {
  86129. position: 'absolute',
  86130. inset: 0,
  86131. backgroundColor: 'transparent',
  86132. content: '""'
  86133. }
  86134. },
  86135. // Removed a Badge related style seems it's safe
  86136. // https://github.com/ant-design/ant-design/issues/19809
  86137. // >>>>> Divider
  86138. [`${componentCls}-item-divider`]: {
  86139. overflow: 'hidden',
  86140. lineHeight: 0,
  86141. borderColor: colorSplit,
  86142. borderStyle: lineType,
  86143. borderWidth: 0,
  86144. borderTopWidth: lineWidth,
  86145. marginBlock: lineWidth,
  86146. padding: 0,
  86147. '&-dashed': {
  86148. borderStyle: 'dashed'
  86149. }
  86150. }
  86151. }), genMenuItemStyle(token)), {
  86152. [`${componentCls}-item-group`]: {
  86153. [`${componentCls}-item-group-list`]: {
  86154. margin: 0,
  86155. padding: 0,
  86156. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  86157. paddingInline: `${(0,cssinjs.unit)(token.calc(fontSize).mul(2).equal())} ${(0,cssinjs.unit)(padding)}`
  86158. }
  86159. }
  86160. },
  86161. // ======================= Sub Menu =======================
  86162. '&-submenu': {
  86163. '&-popup': {
  86164. position: 'absolute',
  86165. zIndex: zIndexPopup,
  86166. borderRadius: borderRadiusLG,
  86167. boxShadow: 'none',
  86168. transformOrigin: '0 0',
  86169. [`&${componentCls}-submenu`]: {
  86170. background: 'transparent'
  86171. },
  86172. // https://github.com/ant-design/ant-design/issues/13955
  86173. '&::before': {
  86174. position: 'absolute',
  86175. inset: 0,
  86176. zIndex: -1,
  86177. width: '100%',
  86178. height: '100%',
  86179. opacity: 0,
  86180. content: '""'
  86181. },
  86182. [`> ${componentCls}`]: Object.assign(Object.assign(Object.assign({
  86183. borderRadius: borderRadiusLG
  86184. }, genMenuItemStyle(token)), genSubMenuArrowStyle(token)), {
  86185. [`${componentCls}-item, ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
  86186. borderRadius: subMenuItemBorderRadius
  86187. },
  86188. [`${componentCls}-submenu-title::after`]: {
  86189. transition: `transform ${motionDurationSlow} ${motionEaseInOut}`
  86190. }
  86191. })
  86192. },
  86193. [`
  86194. &-placement-leftTop,
  86195. &-placement-bottomRight,
  86196. `]: {
  86197. transformOrigin: '100% 0'
  86198. },
  86199. [`
  86200. &-placement-leftBottom,
  86201. &-placement-topRight,
  86202. `]: {
  86203. transformOrigin: '100% 100%'
  86204. },
  86205. [`
  86206. &-placement-rightBottom,
  86207. &-placement-topLeft,
  86208. `]: {
  86209. transformOrigin: '0 100%'
  86210. },
  86211. [`
  86212. &-placement-bottomLeft,
  86213. &-placement-rightTop,
  86214. `]: {
  86215. transformOrigin: '0 0'
  86216. },
  86217. [`
  86218. &-placement-leftTop,
  86219. &-placement-leftBottom
  86220. `]: {
  86221. paddingInlineEnd: token.paddingXS
  86222. },
  86223. [`
  86224. &-placement-rightTop,
  86225. &-placement-rightBottom
  86226. `]: {
  86227. paddingInlineStart: token.paddingXS
  86228. },
  86229. [`
  86230. &-placement-topRight,
  86231. &-placement-topLeft
  86232. `]: {
  86233. paddingBottom: token.paddingXS
  86234. },
  86235. [`
  86236. &-placement-bottomRight,
  86237. &-placement-bottomLeft
  86238. `]: {
  86239. paddingTop: token.paddingXS
  86240. }
  86241. }
  86242. }), genSubMenuArrowStyle(token)), {
  86243. [`&-inline-collapsed ${componentCls}-submenu-arrow,
  86244. &-inline ${componentCls}-submenu-arrow`]: {
  86245. // ↓
  86246. '&::before': {
  86247. transform: `rotate(-45deg) translateX(${(0,cssinjs.unit)(menuArrowOffset)})`
  86248. },
  86249. '&::after': {
  86250. transform: `rotate(45deg) translateX(${(0,cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
  86251. }
  86252. },
  86253. [`${componentCls}-submenu-open${componentCls}-submenu-inline > ${componentCls}-submenu-title > ${componentCls}-submenu-arrow`]: {
  86254. // ↑
  86255. transform: `translateY(${(0,cssinjs.unit)(token.calc(menuArrowSize).mul(0.2).mul(-1).equal())})`,
  86256. '&::after': {
  86257. transform: `rotate(-45deg) translateX(${(0,cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
  86258. },
  86259. '&::before': {
  86260. transform: `rotate(45deg) translateX(${(0,cssinjs.unit)(menuArrowOffset)})`
  86261. }
  86262. }
  86263. })
  86264. },
  86265. // Integration with header element so menu items have the same height
  86266. {
  86267. [`${antCls}-layout-header`]: {
  86268. [componentCls]: {
  86269. lineHeight: 'inherit'
  86270. }
  86271. }
  86272. }];
  86273. };
  86274. const prepareComponentToken = token => {
  86275. var _a, _b, _c;
  86276. const {
  86277. colorPrimary,
  86278. colorError,
  86279. colorTextDisabled,
  86280. colorErrorBg,
  86281. colorText,
  86282. colorTextDescription,
  86283. colorBgContainer,
  86284. colorFillAlter,
  86285. colorFillContent,
  86286. lineWidth,
  86287. lineWidthBold,
  86288. controlItemBgActive,
  86289. colorBgTextHover,
  86290. controlHeightLG,
  86291. lineHeight,
  86292. colorBgElevated,
  86293. marginXXS,
  86294. padding,
  86295. fontSize,
  86296. controlHeightSM,
  86297. fontSizeLG,
  86298. colorTextLightSolid,
  86299. colorErrorHover
  86300. } = token;
  86301. const activeBarWidth = (_a = token.activeBarWidth) !== null && _a !== void 0 ? _a : 0;
  86302. const activeBarBorderWidth = (_b = token.activeBarBorderWidth) !== null && _b !== void 0 ? _b : lineWidth;
  86303. const itemMarginInline = (_c = token.itemMarginInline) !== null && _c !== void 0 ? _c : token.marginXXS;
  86304. const colorTextDark = new es.FastColor(colorTextLightSolid).setA(0.65).toRgbString();
  86305. return {
  86306. dropdownWidth: 160,
  86307. zIndexPopup: token.zIndexPopupBase + 50,
  86308. radiusItem: token.borderRadiusLG,
  86309. itemBorderRadius: token.borderRadiusLG,
  86310. radiusSubMenuItem: token.borderRadiusSM,
  86311. subMenuItemBorderRadius: token.borderRadiusSM,
  86312. colorItemText: colorText,
  86313. itemColor: colorText,
  86314. colorItemTextHover: colorText,
  86315. itemHoverColor: colorText,
  86316. colorItemTextHoverHorizontal: colorPrimary,
  86317. horizontalItemHoverColor: colorPrimary,
  86318. colorGroupTitle: colorTextDescription,
  86319. groupTitleColor: colorTextDescription,
  86320. colorItemTextSelected: colorPrimary,
  86321. itemSelectedColor: colorPrimary,
  86322. subMenuItemSelectedColor: colorPrimary,
  86323. colorItemTextSelectedHorizontal: colorPrimary,
  86324. horizontalItemSelectedColor: colorPrimary,
  86325. colorItemBg: colorBgContainer,
  86326. itemBg: colorBgContainer,
  86327. colorItemBgHover: colorBgTextHover,
  86328. itemHoverBg: colorBgTextHover,
  86329. colorItemBgActive: colorFillContent,
  86330. itemActiveBg: controlItemBgActive,
  86331. colorSubItemBg: colorFillAlter,
  86332. subMenuItemBg: colorFillAlter,
  86333. colorItemBgSelected: controlItemBgActive,
  86334. itemSelectedBg: controlItemBgActive,
  86335. colorItemBgSelectedHorizontal: 'transparent',
  86336. horizontalItemSelectedBg: 'transparent',
  86337. colorActiveBarWidth: 0,
  86338. activeBarWidth,
  86339. colorActiveBarHeight: lineWidthBold,
  86340. activeBarHeight: lineWidthBold,
  86341. colorActiveBarBorderSize: lineWidth,
  86342. activeBarBorderWidth,
  86343. // Disabled
  86344. colorItemTextDisabled: colorTextDisabled,
  86345. itemDisabledColor: colorTextDisabled,
  86346. // Danger
  86347. colorDangerItemText: colorError,
  86348. dangerItemColor: colorError,
  86349. colorDangerItemTextHover: colorError,
  86350. dangerItemHoverColor: colorError,
  86351. colorDangerItemTextSelected: colorError,
  86352. dangerItemSelectedColor: colorError,
  86353. colorDangerItemBgActive: colorErrorBg,
  86354. dangerItemActiveBg: colorErrorBg,
  86355. colorDangerItemBgSelected: colorErrorBg,
  86356. dangerItemSelectedBg: colorErrorBg,
  86357. itemMarginInline,
  86358. horizontalItemBorderRadius: 0,
  86359. horizontalItemHoverBg: 'transparent',
  86360. itemHeight: controlHeightLG,
  86361. groupTitleLineHeight: lineHeight,
  86362. collapsedWidth: controlHeightLG * 2,
  86363. popupBg: colorBgElevated,
  86364. itemMarginBlock: marginXXS,
  86365. itemPaddingInline: padding,
  86366. horizontalLineHeight: `${controlHeightLG * 1.15}px`,
  86367. iconSize: fontSize,
  86368. iconMarginInlineEnd: controlHeightSM - fontSize,
  86369. collapsedIconSize: fontSizeLG,
  86370. groupTitleFontSize: fontSize,
  86371. // Disabled
  86372. darkItemDisabledColor: new es.FastColor(colorTextLightSolid).setA(0.25).toRgbString(),
  86373. // Dark
  86374. darkItemColor: colorTextDark,
  86375. darkDangerItemColor: colorError,
  86376. darkItemBg: '#001529',
  86377. darkPopupBg: '#001529',
  86378. darkSubMenuItemBg: '#000c17',
  86379. darkItemSelectedColor: colorTextLightSolid,
  86380. darkItemSelectedBg: colorPrimary,
  86381. darkDangerItemSelectedBg: colorError,
  86382. darkItemHoverBg: 'transparent',
  86383. darkGroupTitleColor: colorTextDark,
  86384. darkItemHoverColor: colorTextLightSolid,
  86385. darkDangerItemHoverColor: colorErrorHover,
  86386. darkDangerItemSelectedColor: colorTextLightSolid,
  86387. darkDangerItemActiveBg: colorError,
  86388. // internal
  86389. itemWidth: activeBarWidth ? `calc(100% + ${activeBarBorderWidth}px)` : `calc(100% - ${itemMarginInline * 2}px)`
  86390. };
  86391. };
  86392. // ============================== Export ==============================
  86393. /* harmony default export */ var menu_style = ((prefixCls, rootCls = prefixCls, injectStyle = true) => {
  86394. const useStyle = (0,genStyleUtils.genStyleHooks)('Menu', token => {
  86395. const {
  86396. colorBgElevated,
  86397. controlHeightLG,
  86398. fontSize,
  86399. darkItemColor,
  86400. darkDangerItemColor,
  86401. darkItemBg,
  86402. darkSubMenuItemBg,
  86403. darkItemSelectedColor,
  86404. darkItemSelectedBg,
  86405. darkDangerItemSelectedBg,
  86406. darkItemHoverBg,
  86407. darkGroupTitleColor,
  86408. darkItemHoverColor,
  86409. darkItemDisabledColor,
  86410. darkDangerItemHoverColor,
  86411. darkDangerItemSelectedColor,
  86412. darkDangerItemActiveBg,
  86413. popupBg,
  86414. darkPopupBg
  86415. } = token;
  86416. const menuArrowSize = token.calc(fontSize).div(7).mul(5).equal();
  86417. // Menu Token
  86418. const menuToken = (0,cssinjs_utils_es.mergeToken)(token, {
  86419. menuArrowSize,
  86420. menuHorizontalHeight: token.calc(controlHeightLG).mul(1.15).equal(),
  86421. menuArrowOffset: token.calc(menuArrowSize).mul(0.25).equal(),
  86422. menuSubMenuBg: colorBgElevated,
  86423. calc: token.calc,
  86424. popupBg
  86425. });
  86426. const menuDarkToken = (0,cssinjs_utils_es.mergeToken)(menuToken, {
  86427. itemColor: darkItemColor,
  86428. itemHoverColor: darkItemHoverColor,
  86429. groupTitleColor: darkGroupTitleColor,
  86430. itemSelectedColor: darkItemSelectedColor,
  86431. subMenuItemSelectedColor: darkItemSelectedColor,
  86432. itemBg: darkItemBg,
  86433. popupBg: darkPopupBg,
  86434. subMenuItemBg: darkSubMenuItemBg,
  86435. itemActiveBg: 'transparent',
  86436. itemSelectedBg: darkItemSelectedBg,
  86437. activeBarHeight: 0,
  86438. activeBarBorderWidth: 0,
  86439. itemHoverBg: darkItemHoverBg,
  86440. // Disabled
  86441. itemDisabledColor: darkItemDisabledColor,
  86442. // Danger
  86443. dangerItemColor: darkDangerItemColor,
  86444. dangerItemHoverColor: darkDangerItemHoverColor,
  86445. dangerItemSelectedColor: darkDangerItemSelectedColor,
  86446. dangerItemActiveBg: darkDangerItemActiveBg,
  86447. dangerItemSelectedBg: darkDangerItemSelectedBg,
  86448. menuSubMenuBg: darkSubMenuItemBg,
  86449. // Horizontal
  86450. horizontalItemSelectedColor: darkItemSelectedColor,
  86451. horizontalItemSelectedBg: darkItemSelectedBg
  86452. });
  86453. return [
  86454. // Basic
  86455. getBaseStyle(menuToken),
  86456. // Horizontal
  86457. horizontal(menuToken),
  86458. // Hard code for some light style
  86459. // Vertical
  86460. vertical(menuToken),
  86461. // Hard code for some light style
  86462. // Theme
  86463. theme(menuToken, 'light'), theme(menuDarkToken, 'dark'),
  86464. // RTL
  86465. rtl(menuToken),
  86466. // Motion
  86467. (0,collapse["default"])(menuToken), (0,slide.initSlideMotion)(menuToken, 'slide-up'), (0,slide.initSlideMotion)(menuToken, 'slide-down'), (0,zoom.initZoomMotion)(menuToken, 'zoom-big')];
  86468. }, prepareComponentToken, {
  86469. deprecatedTokens: [['colorGroupTitle', 'groupTitleColor'], ['radiusItem', 'itemBorderRadius'], ['radiusSubMenuItem', 'subMenuItemBorderRadius'], ['colorItemText', 'itemColor'], ['colorItemTextHover', 'itemHoverColor'], ['colorItemTextHoverHorizontal', 'horizontalItemHoverColor'], ['colorItemTextSelected', 'itemSelectedColor'], ['colorItemTextSelectedHorizontal', 'horizontalItemSelectedColor'], ['colorItemTextDisabled', 'itemDisabledColor'], ['colorDangerItemText', 'dangerItemColor'], ['colorDangerItemTextHover', 'dangerItemHoverColor'], ['colorDangerItemTextSelected', 'dangerItemSelectedColor'], ['colorDangerItemBgActive', 'dangerItemActiveBg'], ['colorDangerItemBgSelected', 'dangerItemSelectedBg'], ['colorItemBg', 'itemBg'], ['colorItemBgHover', 'itemHoverBg'], ['colorSubItemBg', 'subMenuItemBg'], ['colorItemBgActive', 'itemActiveBg'], ['colorItemBgSelectedHorizontal', 'horizontalItemSelectedBg'], ['colorActiveBarWidth', 'activeBarWidth'], ['colorActiveBarHeight', 'activeBarHeight'], ['colorActiveBarBorderSize', 'activeBarBorderWidth'], ['colorItemBgSelected', 'itemSelectedBg']],
  86470. // Dropdown will handle menu style self. We do not need to handle this.
  86471. injectStyle,
  86472. unitless: {
  86473. groupTitleLineHeight: true
  86474. }
  86475. });
  86476. return useStyle(prefixCls, rootCls);
  86477. });
  86478. /***/ }),
  86479. /***/ "./components/message/style/index.ts":
  86480. /*!*******************************************!*\
  86481. !*** ./components/message/style/index.ts ***!
  86482. \*******************************************/
  86483. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  86484. "use strict";
  86485. __webpack_require__.r(__webpack_exports__);
  86486. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  86487. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  86488. /* harmony export */ });
  86489. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  86490. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  86491. /* harmony import */ var _util_hooks_useZIndex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_util/hooks/useZIndex */ "./components/_util/hooks/useZIndex.ts");
  86492. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  86493. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  86494. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  86495. const genMessageStyle = token => {
  86496. const {
  86497. componentCls,
  86498. iconCls,
  86499. boxShadow,
  86500. colorText,
  86501. colorSuccess,
  86502. colorError,
  86503. colorWarning,
  86504. colorInfo,
  86505. fontSizeLG,
  86506. motionEaseInOutCirc,
  86507. motionDurationSlow,
  86508. marginXS,
  86509. paddingXS,
  86510. borderRadiusLG,
  86511. zIndexPopup,
  86512. // Custom token
  86513. contentPadding,
  86514. contentBg
  86515. } = token;
  86516. const noticeCls = `${componentCls}-notice`;
  86517. const messageMoveIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('MessageMoveIn', {
  86518. '0%': {
  86519. padding: 0,
  86520. transform: 'translateY(-100%)',
  86521. opacity: 0
  86522. },
  86523. '100%': {
  86524. padding: paddingXS,
  86525. transform: 'translateY(0)',
  86526. opacity: 1
  86527. }
  86528. });
  86529. const messageMoveOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('MessageMoveOut', {
  86530. '0%': {
  86531. maxHeight: token.height,
  86532. padding: paddingXS,
  86533. opacity: 1
  86534. },
  86535. '100%': {
  86536. maxHeight: 0,
  86537. padding: 0,
  86538. opacity: 0
  86539. }
  86540. });
  86541. const noticeStyle = {
  86542. padding: paddingXS,
  86543. textAlign: 'center',
  86544. [`${componentCls}-custom-content`]: {
  86545. display: 'flex',
  86546. alignItems: 'center'
  86547. },
  86548. [`${componentCls}-custom-content > ${iconCls}`]: {
  86549. marginInlineEnd: marginXS,
  86550. // affected by ltr or rtl
  86551. fontSize: fontSizeLG
  86552. },
  86553. [`${noticeCls}-content`]: {
  86554. display: 'inline-block',
  86555. padding: contentPadding,
  86556. background: contentBg,
  86557. borderRadius: borderRadiusLG,
  86558. boxShadow,
  86559. pointerEvents: 'all'
  86560. },
  86561. [`${componentCls}-success > ${iconCls}`]: {
  86562. color: colorSuccess
  86563. },
  86564. [`${componentCls}-error > ${iconCls}`]: {
  86565. color: colorError
  86566. },
  86567. [`${componentCls}-warning > ${iconCls}`]: {
  86568. color: colorWarning
  86569. },
  86570. [`${componentCls}-info > ${iconCls},
  86571. ${componentCls}-loading > ${iconCls}`]: {
  86572. color: colorInfo
  86573. }
  86574. };
  86575. return [
  86576. // ============================ Holder ============================
  86577. {
  86578. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
  86579. color: colorText,
  86580. position: 'fixed',
  86581. top: marginXS,
  86582. width: '100%',
  86583. pointerEvents: 'none',
  86584. zIndex: zIndexPopup,
  86585. [`${componentCls}-move-up`]: {
  86586. animationFillMode: 'forwards'
  86587. },
  86588. [`
  86589. ${componentCls}-move-up-appear,
  86590. ${componentCls}-move-up-enter
  86591. `]: {
  86592. animationName: messageMoveIn,
  86593. animationDuration: motionDurationSlow,
  86594. animationPlayState: 'paused',
  86595. animationTimingFunction: motionEaseInOutCirc
  86596. },
  86597. [`
  86598. ${componentCls}-move-up-appear${componentCls}-move-up-appear-active,
  86599. ${componentCls}-move-up-enter${componentCls}-move-up-enter-active
  86600. `]: {
  86601. animationPlayState: 'running'
  86602. },
  86603. [`${componentCls}-move-up-leave`]: {
  86604. animationName: messageMoveOut,
  86605. animationDuration: motionDurationSlow,
  86606. animationPlayState: 'paused',
  86607. animationTimingFunction: motionEaseInOutCirc
  86608. },
  86609. [`${componentCls}-move-up-leave${componentCls}-move-up-leave-active`]: {
  86610. animationPlayState: 'running'
  86611. },
  86612. '&-rtl': {
  86613. direction: 'rtl',
  86614. span: {
  86615. direction: 'rtl'
  86616. }
  86617. }
  86618. })
  86619. },
  86620. // ============================ Notice ============================
  86621. {
  86622. [componentCls]: {
  86623. [`${noticeCls}-wrapper`]: Object.assign({}, noticeStyle)
  86624. }
  86625. },
  86626. // ============================= Pure =============================
  86627. {
  86628. [`${componentCls}-notice-pure-panel`]: Object.assign(Object.assign({}, noticeStyle), {
  86629. padding: 0,
  86630. textAlign: 'start'
  86631. })
  86632. }];
  86633. };
  86634. const prepareComponentToken = token => ({
  86635. zIndexPopup: token.zIndexPopupBase + _util_hooks_useZIndex__WEBPACK_IMPORTED_MODULE_1__.CONTAINER_MAX_OFFSET + 10,
  86636. contentBg: token.colorBgElevated,
  86637. contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`
  86638. });
  86639. // ============================== Export ==============================
  86640. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Message', token => {
  86641. // Gen-style functions here
  86642. const combinedToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  86643. height: 150
  86644. });
  86645. return genMessageStyle(combinedToken);
  86646. }, prepareComponentToken));
  86647. /***/ }),
  86648. /***/ "./components/modal/style/index.ts":
  86649. /*!*****************************************!*\
  86650. !*** ./components/modal/style/index.ts ***!
  86651. \*****************************************/
  86652. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  86653. "use strict";
  86654. __webpack_require__.r(__webpack_exports__);
  86655. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  86656. /* harmony export */ genModalMaskStyle: function() { return /* binding */ genModalMaskStyle; },
  86657. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  86658. /* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
  86659. /* harmony export */ });
  86660. /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  86661. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  86662. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
  86663. /* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../grid/style */ "./components/grid/style/index.ts");
  86664. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  86665. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/fade.ts");
  86666. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
  86667. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  86668. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  86669. function box(position) {
  86670. return {
  86671. position,
  86672. inset: 0
  86673. };
  86674. }
  86675. const genModalMaskStyle = token => {
  86676. const {
  86677. componentCls,
  86678. antCls
  86679. } = token;
  86680. return [{
  86681. [`${componentCls}-root`]: {
  86682. [`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {
  86683. // reset scale avoid mousePosition bug
  86684. transform: 'none',
  86685. opacity: 0,
  86686. animationDuration: token.motionDurationSlow,
  86687. // https://github.com/ant-design/ant-design/issues/11777
  86688. userSelect: 'none'
  86689. },
  86690. // https://github.com/ant-design/ant-design/issues/37329
  86691. // https://github.com/ant-design/ant-design/issues/40272
  86692. [`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {
  86693. pointerEvents: 'none'
  86694. },
  86695. [`${componentCls}-mask`]: Object.assign(Object.assign({}, box('fixed')), {
  86696. zIndex: token.zIndexPopupBase,
  86697. height: '100%',
  86698. backgroundColor: token.colorBgMask,
  86699. pointerEvents: 'none',
  86700. [`${componentCls}-hidden`]: {
  86701. display: 'none'
  86702. }
  86703. }),
  86704. [`${componentCls}-wrap`]: Object.assign(Object.assign({}, box('fixed')), {
  86705. zIndex: token.zIndexPopupBase,
  86706. overflow: 'auto',
  86707. outline: 0,
  86708. WebkitOverflowScrolling: 'touch'
  86709. })
  86710. }
  86711. }, {
  86712. [`${componentCls}-root`]: (0,_style_motion__WEBPACK_IMPORTED_MODULE_4__.initFadeMotion)(token)
  86713. }];
  86714. };
  86715. const genModalStyle = token => {
  86716. const {
  86717. componentCls
  86718. } = token;
  86719. return [
  86720. // ======================== Root =========================
  86721. {
  86722. [`${componentCls}-root`]: {
  86723. [`${componentCls}-wrap-rtl`]: {
  86724. direction: 'rtl'
  86725. },
  86726. [`${componentCls}-centered`]: {
  86727. textAlign: 'center',
  86728. '&::before': {
  86729. display: 'inline-block',
  86730. width: 0,
  86731. height: '100%',
  86732. verticalAlign: 'middle',
  86733. content: '""'
  86734. },
  86735. [componentCls]: {
  86736. top: 0,
  86737. display: 'inline-block',
  86738. paddingBottom: 0,
  86739. textAlign: 'start',
  86740. verticalAlign: 'middle'
  86741. }
  86742. },
  86743. [`@media (max-width: ${token.screenSMMax}px)`]: {
  86744. [componentCls]: {
  86745. maxWidth: 'calc(100vw - 16px)',
  86746. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.marginXS)} auto`
  86747. },
  86748. [`${componentCls}-centered`]: {
  86749. [componentCls]: {
  86750. flex: 1
  86751. }
  86752. }
  86753. }
  86754. }
  86755. },
  86756. // ======================== Modal ========================
  86757. {
  86758. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_3__.resetComponent)(token)), {
  86759. pointerEvents: 'none',
  86760. position: 'relative',
  86761. top: 100,
  86762. width: 'auto',
  86763. maxWidth: `calc(100vw - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.calc(token.margin).mul(2).equal())})`,
  86764. margin: '0 auto',
  86765. paddingBottom: token.paddingLG,
  86766. [`${componentCls}-title`]: {
  86767. margin: 0,
  86768. color: token.titleColor,
  86769. fontWeight: token.fontWeightStrong,
  86770. fontSize: token.titleFontSize,
  86771. lineHeight: token.titleLineHeight,
  86772. wordWrap: 'break-word'
  86773. },
  86774. [`${componentCls}-content`]: {
  86775. position: 'relative',
  86776. backgroundColor: token.contentBg,
  86777. backgroundClip: 'padding-box',
  86778. border: 0,
  86779. borderRadius: token.borderRadiusLG,
  86780. boxShadow: token.boxShadow,
  86781. pointerEvents: 'auto',
  86782. padding: token.contentPadding
  86783. },
  86784. [`${componentCls}-close`]: Object.assign({
  86785. position: 'absolute',
  86786. top: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),
  86787. insetInlineEnd: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),
  86788. zIndex: token.calc(token.zIndexPopupBase).add(10).equal(),
  86789. padding: 0,
  86790. color: token.modalCloseIconColor,
  86791. fontWeight: token.fontWeightStrong,
  86792. lineHeight: 1,
  86793. textDecoration: 'none',
  86794. background: 'transparent',
  86795. borderRadius: token.borderRadiusSM,
  86796. width: token.modalCloseBtnSize,
  86797. height: token.modalCloseBtnSize,
  86798. border: 0,
  86799. outline: 0,
  86800. cursor: 'pointer',
  86801. transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
  86802. '&-x': {
  86803. display: 'flex',
  86804. fontSize: token.fontSizeLG,
  86805. fontStyle: 'normal',
  86806. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.modalCloseBtnSize),
  86807. justifyContent: 'center',
  86808. textTransform: 'none',
  86809. textRendering: 'auto'
  86810. },
  86811. '&:disabled': {
  86812. pointerEvents: 'none'
  86813. },
  86814. '&:hover': {
  86815. color: token.modalCloseIconHoverColor,
  86816. backgroundColor: token.colorBgTextHover,
  86817. textDecoration: 'none'
  86818. },
  86819. '&:active': {
  86820. backgroundColor: token.colorBgTextActive
  86821. }
  86822. }, (0,_style__WEBPACK_IMPORTED_MODULE_3__.genFocusStyle)(token)),
  86823. [`${componentCls}-header`]: {
  86824. color: token.colorText,
  86825. background: token.headerBg,
  86826. borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.borderRadiusLG)} 0 0`,
  86827. marginBottom: token.headerMarginBottom,
  86828. padding: token.headerPadding,
  86829. borderBottom: token.headerBorderBottom
  86830. },
  86831. [`${componentCls}-body`]: {
  86832. fontSize: token.fontSize,
  86833. lineHeight: token.lineHeight,
  86834. wordWrap: 'break-word',
  86835. padding: token.bodyPadding,
  86836. [`${componentCls}-body-skeleton`]: {
  86837. width: '100%',
  86838. height: '100%',
  86839. display: 'flex',
  86840. justifyContent: 'center',
  86841. alignItems: 'center',
  86842. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.margin)} auto`
  86843. }
  86844. },
  86845. [`${componentCls}-footer`]: {
  86846. textAlign: 'end',
  86847. background: token.footerBg,
  86848. marginTop: token.footerMarginTop,
  86849. padding: token.footerPadding,
  86850. borderTop: token.footerBorderTop,
  86851. borderRadius: token.footerBorderRadius,
  86852. [`> ${token.antCls}-btn + ${token.antCls}-btn`]: {
  86853. marginInlineStart: token.marginXS
  86854. }
  86855. },
  86856. [`${componentCls}-open`]: {
  86857. overflow: 'hidden'
  86858. }
  86859. })
  86860. },
  86861. // ======================== Pure =========================
  86862. {
  86863. [`${componentCls}-pure-panel`]: {
  86864. top: 'auto',
  86865. padding: 0,
  86866. display: 'flex',
  86867. flexDirection: 'column',
  86868. [`${componentCls}-content,
  86869. ${componentCls}-body,
  86870. ${componentCls}-confirm-body-wrapper`]: {
  86871. display: 'flex',
  86872. flexDirection: 'column',
  86873. flex: 'auto'
  86874. },
  86875. [`${componentCls}-confirm-body`]: {
  86876. marginBottom: 'auto'
  86877. }
  86878. }
  86879. }];
  86880. };
  86881. const genRTLStyle = token => {
  86882. const {
  86883. componentCls
  86884. } = token;
  86885. return {
  86886. [`${componentCls}-root`]: {
  86887. [`${componentCls}-wrap-rtl`]: {
  86888. direction: 'rtl',
  86889. [`${componentCls}-confirm-body`]: {
  86890. direction: 'rtl'
  86891. }
  86892. }
  86893. }
  86894. };
  86895. };
  86896. const genResponsiveWidthStyle = token => {
  86897. const {
  86898. componentCls
  86899. } = token;
  86900. const oriGridMediaSizesMap = (0,_grid_style__WEBPACK_IMPORTED_MODULE_2__.getMediaSize)(token);
  86901. const gridMediaSizesMap = Object.assign({}, oriGridMediaSizesMap);
  86902. delete gridMediaSizesMap.xs;
  86903. const cssVarPrefix = `--${componentCls.replace('.', '')}-`;
  86904. const responsiveStyles = Object.keys(gridMediaSizesMap).map(key => ({
  86905. [`@media (min-width: ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(gridMediaSizesMap[key])})`]: {
  86906. width: `var(${cssVarPrefix}${key}-width)`
  86907. }
  86908. }));
  86909. return {
  86910. [`${componentCls}-root`]: {
  86911. [componentCls]: [].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(Object.keys(oriGridMediaSizesMap).map((currentKey, index) => {
  86912. const previousKey = Object.keys(oriGridMediaSizesMap)[index - 1];
  86913. return previousKey ? {
  86914. [`${cssVarPrefix}${currentKey}-width`]: `var(${cssVarPrefix}${previousKey}-width)`
  86915. } : null;
  86916. })), [{
  86917. width: `var(${cssVarPrefix}xs-width)`
  86918. }], (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(responsiveStyles))
  86919. }
  86920. };
  86921. };
  86922. // ============================== Export ==============================
  86923. const prepareToken = token => {
  86924. const headerPaddingVertical = token.padding;
  86925. const headerFontSize = token.fontSizeHeading5;
  86926. const headerLineHeight = token.lineHeightHeading5;
  86927. const modalToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.mergeToken)(token, {
  86928. modalHeaderHeight: token.calc(token.calc(headerLineHeight).mul(headerFontSize).equal()).add(token.calc(headerPaddingVertical).mul(2).equal()).equal(),
  86929. modalFooterBorderColorSplit: token.colorSplit,
  86930. modalFooterBorderStyle: token.lineType,
  86931. modalFooterBorderWidth: token.lineWidth,
  86932. modalCloseIconColor: token.colorIcon,
  86933. modalCloseIconHoverColor: token.colorIconHover,
  86934. modalCloseBtnSize: token.controlHeight,
  86935. modalConfirmIconSize: token.fontHeight,
  86936. modalTitleHeight: token.calc(token.titleFontSize).mul(token.titleLineHeight).equal()
  86937. });
  86938. return modalToken;
  86939. };
  86940. const prepareComponentToken = token => ({
  86941. footerBg: 'transparent',
  86942. headerBg: token.colorBgElevated,
  86943. titleLineHeight: token.lineHeightHeading5,
  86944. titleFontSize: token.fontSizeHeading5,
  86945. contentBg: token.colorBgElevated,
  86946. titleColor: token.colorTextHeading,
  86947. // internal
  86948. contentPadding: token.wireframe ? 0 : `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingMD)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingContentHorizontalLG)}`,
  86949. headerPadding: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingLG)}` : 0,
  86950. headerBorderBottom: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}` : 'none',
  86951. headerMarginBottom: token.wireframe ? 0 : token.marginXS,
  86952. bodyPadding: token.wireframe ? token.paddingLG : 0,
  86953. footerPadding: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.padding)}` : 0,
  86954. footerBorderTop: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}` : 'none',
  86955. footerBorderRadius: token.wireframe ? `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.borderRadiusLG)}` : 0,
  86956. footerMarginTop: token.wireframe ? 0 : token.marginSM,
  86957. confirmBodyPadding: token.wireframe ? `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.padding * 2)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.padding * 2)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.unit)(token.paddingLG)}` : 0,
  86958. confirmIconMarginInlineEnd: token.wireframe ? token.margin : token.marginSM,
  86959. confirmBtnsMarginTop: token.wireframe ? token.marginLG : token.marginSM
  86960. });
  86961. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_7__.genStyleHooks)('Modal', token => {
  86962. const modalToken = prepareToken(token);
  86963. return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__.initZoomMotion)(modalToken, 'zoom'), genResponsiveWidthStyle(modalToken)];
  86964. }, prepareComponentToken, {
  86965. unitless: {
  86966. titleLineHeight: true
  86967. }
  86968. }));
  86969. /***/ }),
  86970. /***/ "./components/notification/style/index.ts":
  86971. /*!************************************************************!*\
  86972. !*** ./components/notification/style/index.ts + 3 modules ***!
  86973. \************************************************************/
  86974. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  86975. "use strict";
  86976. // ESM COMPAT FLAG
  86977. __webpack_require__.r(__webpack_exports__);
  86978. // EXPORTS
  86979. __webpack_require__.d(__webpack_exports__, {
  86980. "default": function() { return /* binding */ notification_style; },
  86981. genNoticeStyle: function() { return /* binding */ genNoticeStyle; },
  86982. prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  86983. prepareNotificationToken: function() { return /* binding */ prepareNotificationToken; }
  86984. });
  86985. // EXTERNAL MODULE: ./alias/cssinjs.js
  86986. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  86987. // EXTERNAL MODULE: ./components/_util/hooks/useZIndex.ts
  86988. var useZIndex = __webpack_require__("./components/_util/hooks/useZIndex.ts");
  86989. // EXTERNAL MODULE: ./components/style/index.tsx
  86990. var style = __webpack_require__("./components/style/index.tsx");
  86991. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  86992. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  86993. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  86994. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  86995. ;// ./components/notification/style/placement.ts
  86996. const genNotificationPlacementStyle = token => {
  86997. const {
  86998. componentCls,
  86999. notificationMarginEdge,
  87000. animationMaxHeight
  87001. } = token;
  87002. const noticeCls = `${componentCls}-notice`;
  87003. const rightFadeIn = new cssinjs.Keyframes('antNotificationFadeIn', {
  87004. '0%': {
  87005. transform: `translate3d(100%, 0, 0)`,
  87006. opacity: 0
  87007. },
  87008. '100%': {
  87009. transform: `translate3d(0, 0, 0)`,
  87010. opacity: 1
  87011. }
  87012. });
  87013. const topFadeIn = new cssinjs.Keyframes('antNotificationTopFadeIn', {
  87014. '0%': {
  87015. top: -animationMaxHeight,
  87016. opacity: 0
  87017. },
  87018. '100%': {
  87019. top: 0,
  87020. opacity: 1
  87021. }
  87022. });
  87023. const bottomFadeIn = new cssinjs.Keyframes('antNotificationBottomFadeIn', {
  87024. '0%': {
  87025. bottom: token.calc(animationMaxHeight).mul(-1).equal(),
  87026. opacity: 0
  87027. },
  87028. '100%': {
  87029. bottom: 0,
  87030. opacity: 1
  87031. }
  87032. });
  87033. const leftFadeIn = new cssinjs.Keyframes('antNotificationLeftFadeIn', {
  87034. '0%': {
  87035. transform: `translate3d(-100%, 0, 0)`,
  87036. opacity: 0
  87037. },
  87038. '100%': {
  87039. transform: `translate3d(0, 0, 0)`,
  87040. opacity: 1
  87041. }
  87042. });
  87043. return {
  87044. [componentCls]: {
  87045. [`&${componentCls}-top, &${componentCls}-bottom`]: {
  87046. marginInline: 0,
  87047. [noticeCls]: {
  87048. marginInline: 'auto auto'
  87049. }
  87050. },
  87051. [`&${componentCls}-top`]: {
  87052. [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
  87053. animationName: topFadeIn
  87054. }
  87055. },
  87056. [`&${componentCls}-bottom`]: {
  87057. [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
  87058. animationName: bottomFadeIn
  87059. }
  87060. },
  87061. [`&${componentCls}-topRight, &${componentCls}-bottomRight`]: {
  87062. [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
  87063. animationName: rightFadeIn
  87064. }
  87065. },
  87066. [`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {
  87067. marginRight: {
  87068. value: 0,
  87069. _skip_check_: true
  87070. },
  87071. marginLeft: {
  87072. value: notificationMarginEdge,
  87073. _skip_check_: true
  87074. },
  87075. [noticeCls]: {
  87076. marginInlineEnd: 'auto',
  87077. marginInlineStart: 0
  87078. },
  87079. [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
  87080. animationName: leftFadeIn
  87081. }
  87082. }
  87083. }
  87084. };
  87085. };
  87086. /* harmony default export */ var placement = (genNotificationPlacementStyle);
  87087. ;// ./components/notification/interface.ts
  87088. const NotificationPlacements = ['top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'];
  87089. ;// ./components/notification/style/stack.ts
  87090. const placementAlignProperty = {
  87091. topLeft: 'left',
  87092. topRight: 'right',
  87093. bottomLeft: 'left',
  87094. bottomRight: 'right',
  87095. top: 'left',
  87096. bottom: 'left'
  87097. };
  87098. const genPlacementStackStyle = (token, placement) => {
  87099. const {
  87100. componentCls
  87101. } = token;
  87102. return {
  87103. [`${componentCls}-${placement}`]: {
  87104. [`&${componentCls}-stack > ${componentCls}-notice-wrapper`]: {
  87105. [placement.startsWith('top') ? 'top' : 'bottom']: 0,
  87106. [placementAlignProperty[placement]]: {
  87107. value: 0,
  87108. _skip_check_: true
  87109. }
  87110. }
  87111. }
  87112. };
  87113. };
  87114. const genStackChildrenStyle = token => {
  87115. const childrenStyle = {};
  87116. for (let i = 1; i < token.notificationStackLayer; i++) {
  87117. childrenStyle[`&:nth-last-child(${i + 1})`] = {
  87118. overflow: 'hidden',
  87119. [`& > ${token.componentCls}-notice`]: {
  87120. opacity: 0,
  87121. transition: `opacity ${token.motionDurationMid}`
  87122. }
  87123. };
  87124. }
  87125. return Object.assign({
  87126. [`&:not(:nth-last-child(-n+${token.notificationStackLayer}))`]: {
  87127. opacity: 0,
  87128. overflow: 'hidden',
  87129. color: 'transparent',
  87130. pointerEvents: 'none'
  87131. }
  87132. }, childrenStyle);
  87133. };
  87134. const genStackedNoticeStyle = token => {
  87135. const childrenStyle = {};
  87136. for (let i = 1; i < token.notificationStackLayer; i++) {
  87137. childrenStyle[`&:nth-last-child(${i + 1})`] = {
  87138. background: token.colorBgBlur,
  87139. backdropFilter: 'blur(10px)',
  87140. '-webkit-backdrop-filter': 'blur(10px)'
  87141. };
  87142. }
  87143. return Object.assign({}, childrenStyle);
  87144. };
  87145. const genStackStyle = token => {
  87146. const {
  87147. componentCls
  87148. } = token;
  87149. return Object.assign({
  87150. [`${componentCls}-stack`]: {
  87151. [`& > ${componentCls}-notice-wrapper`]: Object.assign({
  87152. transition: `transform ${token.motionDurationSlow}, backdrop-filter 0s`,
  87153. willChange: 'transform, opacity',
  87154. position: 'absolute'
  87155. }, genStackChildrenStyle(token))
  87156. },
  87157. [`${componentCls}-stack:not(${componentCls}-stack-expanded)`]: {
  87158. [`& > ${componentCls}-notice-wrapper`]: Object.assign({}, genStackedNoticeStyle(token))
  87159. },
  87160. [`${componentCls}-stack${componentCls}-stack-expanded`]: {
  87161. [`& > ${componentCls}-notice-wrapper`]: {
  87162. '&:not(:nth-last-child(-n + 1))': {
  87163. opacity: 1,
  87164. overflow: 'unset',
  87165. color: 'inherit',
  87166. pointerEvents: 'auto',
  87167. [`& > ${token.componentCls}-notice`]: {
  87168. opacity: 1
  87169. }
  87170. },
  87171. '&:after': {
  87172. content: '""',
  87173. position: 'absolute',
  87174. height: token.margin,
  87175. width: '100%',
  87176. insetInline: 0,
  87177. bottom: token.calc(token.margin).mul(-1).equal(),
  87178. background: 'transparent',
  87179. pointerEvents: 'auto'
  87180. }
  87181. }
  87182. }
  87183. }, NotificationPlacements.map(placement => genPlacementStackStyle(token, placement)).reduce((acc, cur) => Object.assign(Object.assign({}, acc), cur), {}));
  87184. };
  87185. /* harmony default export */ var stack = (genStackStyle);
  87186. ;// ./components/notification/style/index.ts
  87187. const genNoticeStyle = token => {
  87188. const {
  87189. iconCls,
  87190. componentCls,
  87191. // .ant-notification
  87192. boxShadow,
  87193. fontSizeLG,
  87194. notificationMarginBottom,
  87195. borderRadiusLG,
  87196. colorSuccess,
  87197. colorInfo,
  87198. colorWarning,
  87199. colorError,
  87200. colorTextHeading,
  87201. notificationBg,
  87202. notificationPadding,
  87203. notificationMarginEdge,
  87204. notificationProgressBg,
  87205. notificationProgressHeight,
  87206. fontSize,
  87207. lineHeight,
  87208. width,
  87209. notificationIconSize,
  87210. colorText
  87211. } = token;
  87212. const noticeCls = `${componentCls}-notice`;
  87213. return {
  87214. position: 'relative',
  87215. marginBottom: notificationMarginBottom,
  87216. marginInlineStart: 'auto',
  87217. background: notificationBg,
  87218. borderRadius: borderRadiusLG,
  87219. boxShadow,
  87220. [noticeCls]: {
  87221. padding: notificationPadding,
  87222. width,
  87223. maxWidth: `calc(100vw - ${(0,cssinjs.unit)(token.calc(notificationMarginEdge).mul(2).equal())})`,
  87224. overflow: 'hidden',
  87225. lineHeight,
  87226. wordWrap: 'break-word'
  87227. },
  87228. [`${noticeCls}-message`]: {
  87229. color: colorTextHeading,
  87230. fontSize: fontSizeLG,
  87231. lineHeight: token.lineHeightLG
  87232. },
  87233. [`${noticeCls}-description`]: {
  87234. fontSize,
  87235. color: colorText,
  87236. marginTop: token.marginXS
  87237. },
  87238. [`${noticeCls}-closable ${noticeCls}-message`]: {
  87239. paddingInlineEnd: token.paddingLG
  87240. },
  87241. [`${noticeCls}-with-icon ${noticeCls}-message`]: {
  87242. marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),
  87243. fontSize: fontSizeLG
  87244. },
  87245. [`${noticeCls}-with-icon ${noticeCls}-description`]: {
  87246. marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),
  87247. fontSize
  87248. },
  87249. // Icon & color style in different selector level
  87250. // https://github.com/ant-design/ant-design/issues/16503
  87251. // https://github.com/ant-design/ant-design/issues/15512
  87252. [`${noticeCls}-icon`]: {
  87253. position: 'absolute',
  87254. fontSize: notificationIconSize,
  87255. lineHeight: 1,
  87256. // icon-font
  87257. [`&-success${iconCls}`]: {
  87258. color: colorSuccess
  87259. },
  87260. [`&-info${iconCls}`]: {
  87261. color: colorInfo
  87262. },
  87263. [`&-warning${iconCls}`]: {
  87264. color: colorWarning
  87265. },
  87266. [`&-error${iconCls}`]: {
  87267. color: colorError
  87268. }
  87269. },
  87270. [`${noticeCls}-close`]: Object.assign({
  87271. position: 'absolute',
  87272. top: token.notificationPaddingVertical,
  87273. insetInlineEnd: token.notificationPaddingHorizontal,
  87274. color: token.colorIcon,
  87275. outline: 'none',
  87276. width: token.notificationCloseButtonSize,
  87277. height: token.notificationCloseButtonSize,
  87278. borderRadius: token.borderRadiusSM,
  87279. transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,
  87280. display: 'flex',
  87281. alignItems: 'center',
  87282. justifyContent: 'center',
  87283. background: 'none',
  87284. border: 'none',
  87285. '&:hover': {
  87286. color: token.colorIconHover,
  87287. backgroundColor: token.colorBgTextHover
  87288. },
  87289. '&:active': {
  87290. backgroundColor: token.colorBgTextActive
  87291. }
  87292. }, (0,style.genFocusStyle)(token)),
  87293. [`${noticeCls}-progress`]: {
  87294. position: 'absolute',
  87295. display: 'block',
  87296. appearance: 'none',
  87297. inlineSize: `calc(100% - ${(0,cssinjs.unit)(borderRadiusLG)} * 2)`,
  87298. left: {
  87299. _skip_check_: true,
  87300. value: borderRadiusLG
  87301. },
  87302. right: {
  87303. _skip_check_: true,
  87304. value: borderRadiusLG
  87305. },
  87306. bottom: 0,
  87307. blockSize: notificationProgressHeight,
  87308. border: 0,
  87309. '&, &::-webkit-progress-bar': {
  87310. borderRadius: borderRadiusLG,
  87311. backgroundColor: `rgba(0, 0, 0, 0.04)`
  87312. },
  87313. '&::-moz-progress-bar': {
  87314. background: notificationProgressBg
  87315. },
  87316. '&::-webkit-progress-value': {
  87317. borderRadius: borderRadiusLG,
  87318. background: notificationProgressBg
  87319. }
  87320. },
  87321. [`${noticeCls}-actions`]: {
  87322. float: 'right',
  87323. marginTop: token.marginSM
  87324. }
  87325. };
  87326. };
  87327. const genNotificationStyle = token => {
  87328. const {
  87329. componentCls,
  87330. // .ant-notification
  87331. notificationMarginBottom,
  87332. notificationMarginEdge,
  87333. motionDurationMid,
  87334. motionEaseInOut
  87335. } = token;
  87336. const noticeCls = `${componentCls}-notice`;
  87337. const fadeOut = new cssinjs.Keyframes('antNotificationFadeOut', {
  87338. '0%': {
  87339. maxHeight: token.animationMaxHeight,
  87340. marginBottom: notificationMarginBottom
  87341. },
  87342. '100%': {
  87343. maxHeight: 0,
  87344. marginBottom: 0,
  87345. paddingTop: 0,
  87346. paddingBottom: 0,
  87347. opacity: 0
  87348. }
  87349. });
  87350. return [
  87351. // ============================ Holder ============================
  87352. {
  87353. [componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  87354. position: 'fixed',
  87355. zIndex: token.zIndexPopup,
  87356. marginRight: {
  87357. value: notificationMarginEdge,
  87358. _skip_check_: true
  87359. },
  87360. [`${componentCls}-hook-holder`]: {
  87361. position: 'relative'
  87362. },
  87363. // animation
  87364. [`${componentCls}-fade-appear-prepare`]: {
  87365. opacity: '0 !important'
  87366. },
  87367. [`${componentCls}-fade-enter, ${componentCls}-fade-appear`]: {
  87368. animationDuration: token.motionDurationMid,
  87369. animationTimingFunction: motionEaseInOut,
  87370. animationFillMode: 'both',
  87371. opacity: 0,
  87372. animationPlayState: 'paused'
  87373. },
  87374. [`${componentCls}-fade-leave`]: {
  87375. animationTimingFunction: motionEaseInOut,
  87376. animationFillMode: 'both',
  87377. animationDuration: motionDurationMid,
  87378. animationPlayState: 'paused'
  87379. },
  87380. [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
  87381. animationPlayState: 'running'
  87382. },
  87383. [`${componentCls}-fade-leave${componentCls}-fade-leave-active`]: {
  87384. animationName: fadeOut,
  87385. animationPlayState: 'running'
  87386. },
  87387. // RTL
  87388. '&-rtl': {
  87389. direction: 'rtl',
  87390. [`${noticeCls}-actions`]: {
  87391. float: 'left'
  87392. }
  87393. }
  87394. })
  87395. },
  87396. // ============================ Notice ============================
  87397. {
  87398. [componentCls]: {
  87399. [`${noticeCls}-wrapper`]: Object.assign({}, genNoticeStyle(token))
  87400. }
  87401. }];
  87402. };
  87403. // ============================== Export ==============================
  87404. const prepareComponentToken = token => ({
  87405. zIndexPopup: token.zIndexPopupBase + useZIndex.CONTAINER_MAX_OFFSET + 50,
  87406. width: 384
  87407. });
  87408. const prepareNotificationToken = token => {
  87409. const notificationPaddingVertical = token.paddingMD;
  87410. const notificationPaddingHorizontal = token.paddingLG;
  87411. const notificationToken = (0,es.mergeToken)(token, {
  87412. notificationBg: token.colorBgElevated,
  87413. notificationPaddingVertical,
  87414. notificationPaddingHorizontal,
  87415. notificationIconSize: token.calc(token.fontSizeLG).mul(token.lineHeightLG).equal(),
  87416. notificationCloseButtonSize: token.calc(token.controlHeightLG).mul(0.55).equal(),
  87417. notificationMarginBottom: token.margin,
  87418. notificationPadding: `${(0,cssinjs.unit)(token.paddingMD)} ${(0,cssinjs.unit)(token.paddingContentHorizontalLG)}`,
  87419. notificationMarginEdge: token.marginLG,
  87420. animationMaxHeight: 150,
  87421. notificationStackLayer: 3,
  87422. notificationProgressHeight: 2,
  87423. notificationProgressBg: `linear-gradient(90deg, ${token.colorPrimaryBorderHover}, ${token.colorPrimary})`
  87424. });
  87425. return notificationToken;
  87426. };
  87427. /* harmony default export */ var notification_style = ((0,genStyleUtils.genStyleHooks)('Notification', token => {
  87428. const notificationToken = prepareNotificationToken(token);
  87429. return [genNotificationStyle(notificationToken), placement(notificationToken), stack(notificationToken)];
  87430. }, prepareComponentToken));
  87431. /***/ }),
  87432. /***/ "./components/pagination/style/index.ts":
  87433. /*!**********************************************!*\
  87434. !*** ./components/pagination/style/index.ts ***!
  87435. \**********************************************/
  87436. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  87437. "use strict";
  87438. __webpack_require__.r(__webpack_exports__);
  87439. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  87440. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  87441. /* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
  87442. /* harmony export */ });
  87443. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  87444. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  87445. /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.ts");
  87446. /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/token.ts");
  87447. /* harmony import */ var _input_style_variants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../input/style/variants */ "./components/input/style/variants.ts");
  87448. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  87449. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  87450. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  87451. const genPaginationDisabledStyle = token => {
  87452. const {
  87453. componentCls
  87454. } = token;
  87455. return {
  87456. [`${componentCls}-disabled`]: {
  87457. '&, &:hover': {
  87458. cursor: 'not-allowed',
  87459. [`${componentCls}-item-link`]: {
  87460. color: token.colorTextDisabled,
  87461. cursor: 'not-allowed'
  87462. }
  87463. },
  87464. '&:focus-visible': {
  87465. cursor: 'not-allowed',
  87466. [`${componentCls}-item-link`]: {
  87467. color: token.colorTextDisabled,
  87468. cursor: 'not-allowed'
  87469. }
  87470. }
  87471. },
  87472. [`&${componentCls}-disabled`]: {
  87473. cursor: 'not-allowed',
  87474. [`${componentCls}-item`]: {
  87475. cursor: 'not-allowed',
  87476. backgroundColor: 'transparent',
  87477. '&:hover, &:active': {
  87478. backgroundColor: 'transparent'
  87479. },
  87480. a: {
  87481. color: token.colorTextDisabled,
  87482. backgroundColor: 'transparent',
  87483. border: 'none',
  87484. cursor: 'not-allowed'
  87485. },
  87486. '&-active': {
  87487. borderColor: token.colorBorder,
  87488. backgroundColor: token.itemActiveBgDisabled,
  87489. '&:hover, &:active': {
  87490. backgroundColor: token.itemActiveBgDisabled
  87491. },
  87492. a: {
  87493. color: token.itemActiveColorDisabled
  87494. }
  87495. }
  87496. },
  87497. [`${componentCls}-item-link`]: {
  87498. color: token.colorTextDisabled,
  87499. cursor: 'not-allowed',
  87500. '&:hover, &:active': {
  87501. backgroundColor: 'transparent'
  87502. },
  87503. [`${componentCls}-simple&`]: {
  87504. backgroundColor: 'transparent',
  87505. '&:hover, &:active': {
  87506. backgroundColor: 'transparent'
  87507. }
  87508. }
  87509. },
  87510. [`${componentCls}-simple-pager`]: {
  87511. color: token.colorTextDisabled
  87512. },
  87513. [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
  87514. [`${componentCls}-item-link-icon`]: {
  87515. opacity: 0
  87516. },
  87517. [`${componentCls}-item-ellipsis`]: {
  87518. opacity: 1
  87519. }
  87520. }
  87521. }
  87522. };
  87523. };
  87524. const genPaginationMiniStyle = token => {
  87525. const {
  87526. componentCls
  87527. } = token;
  87528. return {
  87529. [`&${componentCls}-mini ${componentCls}-total-text, &${componentCls}-mini ${componentCls}-simple-pager`]: {
  87530. height: token.itemSizeSM,
  87531. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
  87532. },
  87533. [`&${componentCls}-mini ${componentCls}-item`]: {
  87534. minWidth: token.itemSizeSM,
  87535. height: token.itemSizeSM,
  87536. margin: 0,
  87537. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.itemSizeSM).sub(2).equal())
  87538. },
  87539. [`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: {
  87540. minWidth: token.itemSizeSM,
  87541. height: token.itemSizeSM,
  87542. margin: 0,
  87543. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
  87544. },
  87545. [`&${componentCls}-mini:not(${componentCls}-disabled)`]: {
  87546. [`${componentCls}-prev, ${componentCls}-next`]: {
  87547. [`&:hover ${componentCls}-item-link`]: {
  87548. backgroundColor: token.colorBgTextHover
  87549. },
  87550. [`&:active ${componentCls}-item-link`]: {
  87551. backgroundColor: token.colorBgTextActive
  87552. },
  87553. [`&${componentCls}-disabled:hover ${componentCls}-item-link`]: {
  87554. backgroundColor: 'transparent'
  87555. }
  87556. }
  87557. },
  87558. [`
  87559. &${componentCls}-mini ${componentCls}-prev ${componentCls}-item-link,
  87560. &${componentCls}-mini ${componentCls}-next ${componentCls}-item-link
  87561. `]: {
  87562. backgroundColor: 'transparent',
  87563. borderColor: 'transparent',
  87564. '&::after': {
  87565. height: token.itemSizeSM,
  87566. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
  87567. }
  87568. },
  87569. [`&${componentCls}-mini ${componentCls}-jump-prev, &${componentCls}-mini ${componentCls}-jump-next`]: {
  87570. height: token.itemSizeSM,
  87571. marginInlineEnd: 0,
  87572. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
  87573. },
  87574. [`&${componentCls}-mini ${componentCls}-options`]: {
  87575. marginInlineStart: token.paginationMiniOptionsMarginInlineStart,
  87576. '&-size-changer': {
  87577. top: token.miniOptionsSizeChangerTop
  87578. },
  87579. '&-quick-jumper': {
  87580. height: token.itemSizeSM,
  87581. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM),
  87582. input: Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genInputSmallStyle)(token)), {
  87583. width: token.paginationMiniQuickJumperInputWidth,
  87584. height: token.controlHeightSM
  87585. })
  87586. }
  87587. }
  87588. };
  87589. };
  87590. const genPaginationSimpleStyle = token => {
  87591. const {
  87592. componentCls
  87593. } = token;
  87594. return {
  87595. [`&${componentCls}-simple`]: {
  87596. [`${componentCls}-prev, ${componentCls}-next`]: {
  87597. height: token.itemSize,
  87598. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSize),
  87599. verticalAlign: 'top',
  87600. [`${componentCls}-item-link`]: {
  87601. height: token.itemSize,
  87602. backgroundColor: 'transparent',
  87603. border: 0,
  87604. '&:hover': {
  87605. backgroundColor: token.colorBgTextHover
  87606. },
  87607. '&:active': {
  87608. backgroundColor: token.colorBgTextActive
  87609. },
  87610. '&::after': {
  87611. height: token.itemSize,
  87612. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSize)
  87613. }
  87614. }
  87615. },
  87616. [`${componentCls}-simple-pager`]: {
  87617. display: 'inline-flex',
  87618. alignItems: 'center',
  87619. height: token.itemSize,
  87620. marginInlineEnd: token.marginXS,
  87621. input: {
  87622. boxSizing: 'border-box',
  87623. height: '100%',
  87624. width: token.quickJumperInputWidth,
  87625. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paginationItemPaddingInline)}`,
  87626. textAlign: 'center',
  87627. backgroundColor: token.itemInputBg,
  87628. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  87629. borderRadius: token.borderRadius,
  87630. outline: 'none',
  87631. transition: `border-color ${token.motionDurationMid}`,
  87632. color: 'inherit',
  87633. '&:hover': {
  87634. borderColor: token.colorPrimary
  87635. },
  87636. '&:focus': {
  87637. borderColor: token.colorPrimaryHover,
  87638. boxShadow: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.inputOutlineOffset)} 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.controlOutlineWidth)} ${token.controlOutline}`
  87639. },
  87640. '&[disabled]': {
  87641. color: token.colorTextDisabled,
  87642. backgroundColor: token.colorBgContainerDisabled,
  87643. borderColor: token.colorBorder,
  87644. cursor: 'not-allowed'
  87645. }
  87646. }
  87647. },
  87648. [`&${componentCls}-disabled`]: {
  87649. [`${componentCls}-prev, ${componentCls}-next`]: {
  87650. [`${componentCls}-item-link`]: {
  87651. '&:hover, &:active': {
  87652. backgroundColor: 'transparent'
  87653. }
  87654. }
  87655. }
  87656. },
  87657. [`&${componentCls}-mini`]: {
  87658. [`${componentCls}-prev, ${componentCls}-next`]: {
  87659. height: token.itemSizeSM,
  87660. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM),
  87661. [`${componentCls}-item-link`]: {
  87662. height: token.itemSizeSM,
  87663. '&::after': {
  87664. height: token.itemSizeSM,
  87665. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSizeSM)
  87666. }
  87667. }
  87668. },
  87669. [`${componentCls}-simple-pager`]: {
  87670. height: token.itemSizeSM,
  87671. input: {
  87672. width: token.paginationMiniQuickJumperInputWidth
  87673. }
  87674. }
  87675. }
  87676. }
  87677. };
  87678. };
  87679. const genPaginationJumpStyle = token => {
  87680. const {
  87681. componentCls
  87682. } = token;
  87683. return {
  87684. [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
  87685. outline: 0,
  87686. [`${componentCls}-item-container`]: {
  87687. position: 'relative',
  87688. [`${componentCls}-item-link-icon`]: {
  87689. color: token.colorPrimary,
  87690. fontSize: token.fontSizeSM,
  87691. opacity: 0,
  87692. transition: `all ${token.motionDurationMid}`,
  87693. '&-svg': {
  87694. top: 0,
  87695. insetInlineEnd: 0,
  87696. bottom: 0,
  87697. insetInlineStart: 0,
  87698. margin: 'auto'
  87699. }
  87700. },
  87701. [`${componentCls}-item-ellipsis`]: {
  87702. position: 'absolute',
  87703. top: 0,
  87704. insetInlineEnd: 0,
  87705. bottom: 0,
  87706. insetInlineStart: 0,
  87707. display: 'block',
  87708. margin: 'auto',
  87709. color: token.colorTextDisabled,
  87710. letterSpacing: token.paginationEllipsisLetterSpacing,
  87711. textAlign: 'center',
  87712. textIndent: token.paginationEllipsisTextIndent,
  87713. opacity: 1,
  87714. transition: `all ${token.motionDurationMid}`
  87715. }
  87716. },
  87717. '&:hover': {
  87718. [`${componentCls}-item-link-icon`]: {
  87719. opacity: 1
  87720. },
  87721. [`${componentCls}-item-ellipsis`]: {
  87722. opacity: 0
  87723. }
  87724. }
  87725. },
  87726. [`
  87727. ${componentCls}-prev,
  87728. ${componentCls}-jump-prev,
  87729. ${componentCls}-jump-next
  87730. `]: {
  87731. marginInlineEnd: token.marginXS
  87732. },
  87733. [`
  87734. ${componentCls}-prev,
  87735. ${componentCls}-next,
  87736. ${componentCls}-jump-prev,
  87737. ${componentCls}-jump-next
  87738. `]: {
  87739. display: 'inline-block',
  87740. minWidth: token.itemSize,
  87741. height: token.itemSize,
  87742. color: token.colorText,
  87743. fontFamily: token.fontFamily,
  87744. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemSize),
  87745. textAlign: 'center',
  87746. verticalAlign: 'middle',
  87747. listStyle: 'none',
  87748. borderRadius: token.borderRadius,
  87749. cursor: 'pointer',
  87750. transition: `all ${token.motionDurationMid}`
  87751. },
  87752. [`${componentCls}-prev, ${componentCls}-next`]: {
  87753. outline: 0,
  87754. button: {
  87755. color: token.colorText,
  87756. cursor: 'pointer',
  87757. userSelect: 'none'
  87758. },
  87759. [`${componentCls}-item-link`]: {
  87760. display: 'block',
  87761. width: '100%',
  87762. height: '100%',
  87763. padding: 0,
  87764. fontSize: token.fontSizeSM,
  87765. textAlign: 'center',
  87766. backgroundColor: 'transparent',
  87767. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} transparent`,
  87768. borderRadius: token.borderRadius,
  87769. outline: 'none',
  87770. transition: `all ${token.motionDurationMid}`
  87771. },
  87772. [`&:hover ${componentCls}-item-link`]: {
  87773. backgroundColor: token.colorBgTextHover
  87774. },
  87775. [`&:active ${componentCls}-item-link`]: {
  87776. backgroundColor: token.colorBgTextActive
  87777. },
  87778. [`&${componentCls}-disabled:hover`]: {
  87779. [`${componentCls}-item-link`]: {
  87780. backgroundColor: 'transparent'
  87781. }
  87782. }
  87783. },
  87784. [`${componentCls}-slash`]: {
  87785. marginInlineEnd: token.paginationSlashMarginInlineEnd,
  87786. marginInlineStart: token.paginationSlashMarginInlineStart
  87787. },
  87788. [`${componentCls}-options`]: {
  87789. display: 'inline-block',
  87790. marginInlineStart: token.margin,
  87791. verticalAlign: 'middle',
  87792. '&-size-changer': {
  87793. display: 'inline-block',
  87794. width: 'auto'
  87795. },
  87796. '&-quick-jumper': {
  87797. display: 'inline-block',
  87798. height: token.controlHeight,
  87799. marginInlineStart: token.marginXS,
  87800. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.controlHeight),
  87801. verticalAlign: 'top',
  87802. input: Object.assign(Object.assign(Object.assign({}, (0,_input_style__WEBPACK_IMPORTED_MODULE_1__.genBasicInputStyle)(token)), (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genBaseOutlinedStyle)(token, {
  87803. borderColor: token.colorBorder,
  87804. hoverBorderColor: token.colorPrimaryHover,
  87805. activeBorderColor: token.colorPrimary,
  87806. activeShadow: token.activeShadow
  87807. })), {
  87808. '&[disabled]': Object.assign({}, (0,_input_style_variants__WEBPACK_IMPORTED_MODULE_3__.genDisabledStyle)(token)),
  87809. width: token.quickJumperInputWidth,
  87810. height: token.controlHeight,
  87811. boxSizing: 'border-box',
  87812. margin: 0,
  87813. marginInlineStart: token.marginXS,
  87814. marginInlineEnd: token.marginXS
  87815. })
  87816. }
  87817. }
  87818. };
  87819. };
  87820. const genPaginationItemStyle = token => {
  87821. const {
  87822. componentCls
  87823. } = token;
  87824. return {
  87825. [`${componentCls}-item`]: {
  87826. display: 'inline-block',
  87827. minWidth: token.itemSize,
  87828. height: token.itemSize,
  87829. marginInlineEnd: token.marginXS,
  87830. fontFamily: token.fontFamily,
  87831. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.itemSize).sub(2).equal()),
  87832. textAlign: 'center',
  87833. verticalAlign: 'middle',
  87834. listStyle: 'none',
  87835. backgroundColor: token.itemBg,
  87836. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} transparent`,
  87837. borderRadius: token.borderRadius,
  87838. outline: 0,
  87839. cursor: 'pointer',
  87840. userSelect: 'none',
  87841. a: {
  87842. display: 'block',
  87843. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paginationItemPaddingInline)}`,
  87844. color: token.colorText,
  87845. '&:hover': {
  87846. textDecoration: 'none'
  87847. }
  87848. },
  87849. [`&:not(${componentCls}-item-active)`]: {
  87850. '&:hover': {
  87851. transition: `all ${token.motionDurationMid}`,
  87852. backgroundColor: token.colorBgTextHover
  87853. },
  87854. '&:active': {
  87855. backgroundColor: token.colorBgTextActive
  87856. }
  87857. },
  87858. '&-active': {
  87859. fontWeight: token.fontWeightStrong,
  87860. backgroundColor: token.itemActiveBg,
  87861. borderColor: token.colorPrimary,
  87862. a: {
  87863. color: token.colorPrimary
  87864. },
  87865. '&:hover': {
  87866. borderColor: token.colorPrimaryHover
  87867. },
  87868. '&:hover a': {
  87869. color: token.colorPrimaryHover
  87870. }
  87871. }
  87872. }
  87873. };
  87874. };
  87875. const genPaginationStyle = token => {
  87876. const {
  87877. componentCls
  87878. } = token;
  87879. return {
  87880. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_4__.resetComponent)(token)), {
  87881. display: 'flex',
  87882. '&-start': {
  87883. justifyContent: 'start'
  87884. },
  87885. '&-center': {
  87886. justifyContent: 'center'
  87887. },
  87888. '&-end': {
  87889. justifyContent: 'end'
  87890. },
  87891. 'ul, ol': {
  87892. margin: 0,
  87893. padding: 0,
  87894. listStyle: 'none'
  87895. },
  87896. '&::after': {
  87897. display: 'block',
  87898. clear: 'both',
  87899. height: 0,
  87900. overflow: 'hidden',
  87901. visibility: 'hidden',
  87902. content: '""'
  87903. },
  87904. [`${componentCls}-total-text`]: {
  87905. display: 'inline-block',
  87906. height: token.itemSize,
  87907. marginInlineEnd: token.marginXS,
  87908. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.itemSize).sub(2).equal()),
  87909. verticalAlign: 'middle'
  87910. }
  87911. }), genPaginationItemStyle(token)), genPaginationJumpStyle(token)), genPaginationSimpleStyle(token)), genPaginationMiniStyle(token)), genPaginationDisabledStyle(token)), {
  87912. // media query style
  87913. [`@media only screen and (max-width: ${token.screenLG}px)`]: {
  87914. [`${componentCls}-item`]: {
  87915. '&-after-jump-prev, &-before-jump-next': {
  87916. display: 'none'
  87917. }
  87918. }
  87919. },
  87920. [`@media only screen and (max-width: ${token.screenSM}px)`]: {
  87921. [`${componentCls}-options`]: {
  87922. display: 'none'
  87923. }
  87924. }
  87925. }),
  87926. // rtl style
  87927. [`&${token.componentCls}-rtl`]: {
  87928. direction: 'rtl'
  87929. }
  87930. };
  87931. };
  87932. const genPaginationFocusStyle = token => {
  87933. const {
  87934. componentCls
  87935. } = token;
  87936. return {
  87937. [`${componentCls}:not(${componentCls}-disabled)`]: {
  87938. [`${componentCls}-item`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_4__.genFocusStyle)(token)),
  87939. [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
  87940. '&:focus-visible': Object.assign({
  87941. [`${componentCls}-item-link-icon`]: {
  87942. opacity: 1
  87943. },
  87944. [`${componentCls}-item-ellipsis`]: {
  87945. opacity: 0
  87946. }
  87947. }, (0,_style__WEBPACK_IMPORTED_MODULE_4__.genFocusOutline)(token))
  87948. },
  87949. [`${componentCls}-prev, ${componentCls}-next`]: {
  87950. [`&:focus-visible ${componentCls}-item-link`]: (0,_style__WEBPACK_IMPORTED_MODULE_4__.genFocusOutline)(token)
  87951. }
  87952. }
  87953. };
  87954. };
  87955. const prepareComponentToken = token => Object.assign({
  87956. itemBg: token.colorBgContainer,
  87957. itemSize: token.controlHeight,
  87958. itemSizeSM: token.controlHeightSM,
  87959. itemActiveBg: token.colorBgContainer,
  87960. itemLinkBg: token.colorBgContainer,
  87961. itemActiveColorDisabled: token.colorTextDisabled,
  87962. itemActiveBgDisabled: token.controlItemBgActiveDisabled,
  87963. itemInputBg: token.colorBgContainer,
  87964. miniOptionsSizeChangerTop: 0
  87965. }, (0,_input_style__WEBPACK_IMPORTED_MODULE_2__.initComponentToken)(token));
  87966. const prepareToken = token => (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
  87967. inputOutlineOffset: 0,
  87968. quickJumperInputWidth: token.calc(token.controlHeightLG).mul(1.25).equal(),
  87969. paginationMiniOptionsMarginInlineStart: token.calc(token.marginXXS).div(2).equal(),
  87970. paginationMiniQuickJumperInputWidth: token.calc(token.controlHeightLG).mul(1.1).equal(),
  87971. paginationItemPaddingInline: token.calc(token.marginXXS).mul(1.5).equal(),
  87972. paginationEllipsisLetterSpacing: token.calc(token.marginXXS).div(2).equal(),
  87973. paginationSlashMarginInlineStart: token.marginSM,
  87974. paginationSlashMarginInlineEnd: token.marginSM,
  87975. paginationEllipsisTextIndent: '0.13em' // magic for ui experience
  87976. }, (0,_input_style__WEBPACK_IMPORTED_MODULE_2__.initInputToken)(token));
  87977. // ============================== Export ==============================
  87978. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Pagination', token => {
  87979. const paginationToken = prepareToken(token);
  87980. return [genPaginationStyle(paginationToken), genPaginationFocusStyle(paginationToken)];
  87981. }, prepareComponentToken));
  87982. /***/ }),
  87983. /***/ "./components/popconfirm/style/index.ts":
  87984. /*!**********************************************!*\
  87985. !*** ./components/popconfirm/style/index.ts ***!
  87986. \**********************************************/
  87987. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  87988. "use strict";
  87989. __webpack_require__.r(__webpack_exports__);
  87990. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  87991. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  87992. /* harmony export */ });
  87993. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  87994. // =============================== Base ===============================
  87995. const genBaseStyle = token => {
  87996. const {
  87997. componentCls,
  87998. iconCls,
  87999. antCls,
  88000. zIndexPopup,
  88001. colorText,
  88002. colorWarning,
  88003. marginXXS,
  88004. marginXS,
  88005. fontSize,
  88006. fontWeightStrong,
  88007. colorTextHeading
  88008. } = token;
  88009. return {
  88010. [componentCls]: {
  88011. zIndex: zIndexPopup,
  88012. [`&${antCls}-popover`]: {
  88013. fontSize
  88014. },
  88015. [`${componentCls}-message`]: {
  88016. marginBottom: marginXS,
  88017. display: 'flex',
  88018. flexWrap: 'nowrap',
  88019. alignItems: 'start',
  88020. [`> ${componentCls}-message-icon ${iconCls}`]: {
  88021. color: colorWarning,
  88022. fontSize,
  88023. lineHeight: 1,
  88024. marginInlineEnd: marginXS
  88025. },
  88026. [`${componentCls}-title`]: {
  88027. fontWeight: fontWeightStrong,
  88028. color: colorTextHeading,
  88029. '&:only-child': {
  88030. fontWeight: 'normal'
  88031. }
  88032. },
  88033. [`${componentCls}-description`]: {
  88034. marginTop: marginXXS,
  88035. color: colorText
  88036. }
  88037. },
  88038. [`${componentCls}-buttons`]: {
  88039. textAlign: 'end',
  88040. whiteSpace: 'nowrap',
  88041. button: {
  88042. marginInlineStart: marginXS
  88043. }
  88044. }
  88045. }
  88046. };
  88047. };
  88048. // ============================== Export ==============================
  88049. const prepareComponentToken = token => {
  88050. const {
  88051. zIndexPopupBase
  88052. } = token;
  88053. return {
  88054. zIndexPopup: zIndexPopupBase + 60
  88055. };
  88056. };
  88057. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__.genStyleHooks)('Popconfirm', token => genBaseStyle(token), prepareComponentToken, {
  88058. resetStyle: false
  88059. }));
  88060. /***/ }),
  88061. /***/ "./components/popover/style/index.ts":
  88062. /*!*******************************************!*\
  88063. !*** ./components/popover/style/index.ts ***!
  88064. \*******************************************/
  88065. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  88066. "use strict";
  88067. __webpack_require__.r(__webpack_exports__);
  88068. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  88069. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  88070. /* harmony export */ });
  88071. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  88072. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
  88073. /* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/placementArrow */ "./components/style/placementArrow.ts");
  88074. /* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
  88075. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/interface/presetColors.ts");
  88076. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  88077. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  88078. const genBaseStyle = token => {
  88079. const {
  88080. componentCls,
  88081. popoverColor,
  88082. titleMinWidth,
  88083. fontWeightStrong,
  88084. innerPadding,
  88085. boxShadowSecondary,
  88086. colorTextHeading,
  88087. borderRadiusLG,
  88088. zIndexPopup,
  88089. titleMarginBottom,
  88090. colorBgElevated,
  88091. popoverBg,
  88092. titleBorderBottom,
  88093. innerContentPadding,
  88094. titlePadding
  88095. } = token;
  88096. return [{
  88097. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
  88098. position: 'absolute',
  88099. top: 0,
  88100. // use `left` to fix https://github.com/ant-design/ant-design/issues/39195
  88101. left: {
  88102. _skip_check_: true,
  88103. value: 0
  88104. },
  88105. zIndex: zIndexPopup,
  88106. fontWeight: 'normal',
  88107. whiteSpace: 'normal',
  88108. textAlign: 'start',
  88109. cursor: 'auto',
  88110. userSelect: 'text',
  88111. // When use `autoArrow`, origin will follow the arrow position
  88112. '--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',
  88113. transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),
  88114. '--antd-arrow-background-color': colorBgElevated,
  88115. width: 'max-content',
  88116. maxWidth: '100vw',
  88117. '&-rtl': {
  88118. direction: 'rtl'
  88119. },
  88120. '&-hidden': {
  88121. display: 'none'
  88122. },
  88123. [`${componentCls}-content`]: {
  88124. position: 'relative'
  88125. },
  88126. [`${componentCls}-inner`]: {
  88127. backgroundColor: popoverBg,
  88128. backgroundClip: 'padding-box',
  88129. borderRadius: borderRadiusLG,
  88130. boxShadow: boxShadowSecondary,
  88131. padding: innerPadding
  88132. },
  88133. [`${componentCls}-title`]: {
  88134. minWidth: titleMinWidth,
  88135. marginBottom: titleMarginBottom,
  88136. color: colorTextHeading,
  88137. fontWeight: fontWeightStrong,
  88138. borderBottom: titleBorderBottom,
  88139. padding: titlePadding
  88140. },
  88141. [`${componentCls}-inner-content`]: {
  88142. color: popoverColor,
  88143. padding: innerContentPadding
  88144. }
  88145. })
  88146. },
  88147. // Arrow Style
  88148. (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_2__["default"])(token, 'var(--antd-arrow-background-color)'),
  88149. // Pure Render
  88150. {
  88151. [`${componentCls}-pure`]: {
  88152. position: 'relative',
  88153. maxWidth: 'none',
  88154. margin: token.sizePopupArrow,
  88155. display: 'inline-block',
  88156. [`${componentCls}-content`]: {
  88157. display: 'inline-block'
  88158. }
  88159. }
  88160. }];
  88161. };
  88162. const genColorStyle = token => {
  88163. const {
  88164. componentCls
  88165. } = token;
  88166. return {
  88167. [componentCls]: _theme_internal__WEBPACK_IMPORTED_MODULE_4__.PresetColors.map(colorKey => {
  88168. const lightColor = token[`${colorKey}6`];
  88169. return {
  88170. [`&${componentCls}-${colorKey}`]: {
  88171. '--antd-arrow-background-color': lightColor,
  88172. [`${componentCls}-inner`]: {
  88173. backgroundColor: lightColor
  88174. },
  88175. [`${componentCls}-arrow`]: {
  88176. background: 'transparent'
  88177. }
  88178. }
  88179. };
  88180. })
  88181. };
  88182. };
  88183. const prepareComponentToken = token => {
  88184. const {
  88185. lineWidth,
  88186. controlHeight,
  88187. fontHeight,
  88188. padding,
  88189. wireframe,
  88190. zIndexPopupBase,
  88191. borderRadiusLG,
  88192. marginXS,
  88193. lineType,
  88194. colorSplit,
  88195. paddingSM
  88196. } = token;
  88197. const titlePaddingBlockDist = controlHeight - fontHeight;
  88198. const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
  88199. const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
  88200. const popoverPaddingHorizontal = padding;
  88201. return Object.assign(Object.assign(Object.assign({
  88202. titleMinWidth: 177,
  88203. zIndexPopup: zIndexPopupBase + 30
  88204. }, (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_3__.getArrowToken)(token)), (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_2__.getArrowOffsetToken)({
  88205. contentRadius: borderRadiusLG,
  88206. limitVerticalRadius: true
  88207. })), {
  88208. // internal
  88209. innerPadding: wireframe ? 0 : 12,
  88210. titleMarginBottom: wireframe ? 0 : marginXS,
  88211. titlePadding: wireframe ? `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px` : 0,
  88212. titleBorderBottom: wireframe ? `${lineWidth}px ${lineType} ${colorSplit}` : 'none',
  88213. innerContentPadding: wireframe ? `${paddingSM}px ${popoverPaddingHorizontal}px` : 0
  88214. });
  88215. };
  88216. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Popover', token => {
  88217. const {
  88218. colorBgElevated,
  88219. colorText
  88220. } = token;
  88221. const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
  88222. popoverBg: colorBgElevated,
  88223. popoverColor: colorText
  88224. });
  88225. return [genBaseStyle(popoverToken), genColorStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_1__.initZoomMotion)(popoverToken, 'zoom-big')];
  88226. }, prepareComponentToken, {
  88227. resetStyle: false,
  88228. deprecatedTokens: [['width', 'titleMinWidth'], ['minWidth', 'titleMinWidth']]
  88229. }));
  88230. /***/ }),
  88231. /***/ "./components/progress/style/index.ts":
  88232. /*!********************************************!*\
  88233. !*** ./components/progress/style/index.ts ***!
  88234. \********************************************/
  88235. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  88236. "use strict";
  88237. __webpack_require__.r(__webpack_exports__);
  88238. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  88239. /* harmony export */ LineStrokeColorVar: function() { return /* binding */ LineStrokeColorVar; },
  88240. /* harmony export */ Percent: function() { return /* binding */ Percent; },
  88241. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  88242. /* harmony export */ });
  88243. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  88244. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  88245. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  88246. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  88247. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  88248. const LineStrokeColorVar = '--progress-line-stroke-color';
  88249. const Percent = '--progress-percent';
  88250. const genAntProgressActive = isRtl => {
  88251. const direction = isRtl ? '100%' : '-100%';
  88252. return new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes(`antProgress${isRtl ? 'RTL' : 'LTR'}Active`, {
  88253. '0%': {
  88254. transform: `translateX(${direction}) scaleX(0)`,
  88255. opacity: 0.1
  88256. },
  88257. '20%': {
  88258. transform: `translateX(${direction}) scaleX(0)`,
  88259. opacity: 0.5
  88260. },
  88261. to: {
  88262. transform: 'translateX(0) scaleX(1)',
  88263. opacity: 0
  88264. }
  88265. });
  88266. };
  88267. const genBaseStyle = token => {
  88268. const {
  88269. componentCls: progressCls,
  88270. iconCls: iconPrefixCls
  88271. } = token;
  88272. return {
  88273. [progressCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  88274. display: 'inline-block',
  88275. '&-rtl': {
  88276. direction: 'rtl'
  88277. },
  88278. '&-line': {
  88279. position: 'relative',
  88280. width: '100%',
  88281. fontSize: token.fontSize
  88282. },
  88283. [`${progressCls}-outer`]: {
  88284. display: 'inline-flex',
  88285. alignItems: 'center',
  88286. width: '100%'
  88287. },
  88288. [`${progressCls}-inner`]: {
  88289. position: 'relative',
  88290. display: 'inline-block',
  88291. width: '100%',
  88292. flex: 1,
  88293. overflow: 'hidden',
  88294. verticalAlign: 'middle',
  88295. backgroundColor: token.remainingColor,
  88296. borderRadius: token.lineBorderRadius
  88297. },
  88298. [`${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {
  88299. [`${progressCls}-circle-path`]: {
  88300. stroke: token.defaultColor
  88301. }
  88302. },
  88303. [`${progressCls}-success-bg, ${progressCls}-bg`]: {
  88304. position: 'relative',
  88305. background: token.defaultColor,
  88306. borderRadius: token.lineBorderRadius,
  88307. transition: `all ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`
  88308. },
  88309. [`${progressCls}-layout-bottom`]: {
  88310. display: 'flex',
  88311. flexDirection: 'column',
  88312. alignItems: 'center',
  88313. justifyContent: 'center',
  88314. [`${progressCls}-text`]: {
  88315. width: 'max-content',
  88316. marginInlineStart: 0,
  88317. marginTop: token.marginXXS
  88318. }
  88319. },
  88320. [`${progressCls}-bg`]: {
  88321. overflow: 'hidden',
  88322. '&::after': {
  88323. content: '""',
  88324. background: {
  88325. _multi_value_: true,
  88326. value: ['inherit', `var(${LineStrokeColorVar})`]
  88327. },
  88328. height: '100%',
  88329. width: `calc(1 / var(${Percent}) * 100%)`,
  88330. display: 'block'
  88331. },
  88332. [`&${progressCls}-bg-inner`]: {
  88333. minWidth: 'max-content',
  88334. '&::after': {
  88335. content: 'none'
  88336. },
  88337. [`${progressCls}-text-inner`]: {
  88338. color: token.colorWhite,
  88339. [`&${progressCls}-text-bright`]: {
  88340. color: 'rgba(0, 0, 0, 0.45)'
  88341. }
  88342. }
  88343. }
  88344. },
  88345. [`${progressCls}-success-bg`]: {
  88346. position: 'absolute',
  88347. insetBlockStart: 0,
  88348. insetInlineStart: 0,
  88349. backgroundColor: token.colorSuccess
  88350. },
  88351. [`${progressCls}-text`]: {
  88352. display: 'inline-block',
  88353. marginInlineStart: token.marginXS,
  88354. color: token.colorText,
  88355. lineHeight: 1,
  88356. width: '2em',
  88357. whiteSpace: 'nowrap',
  88358. textAlign: 'start',
  88359. verticalAlign: 'middle',
  88360. wordBreak: 'normal',
  88361. [iconPrefixCls]: {
  88362. fontSize: token.fontSize
  88363. },
  88364. [`&${progressCls}-text-outer`]: {
  88365. width: 'max-content'
  88366. },
  88367. [`&${progressCls}-text-outer${progressCls}-text-start`]: {
  88368. width: 'max-content',
  88369. marginInlineStart: 0,
  88370. marginInlineEnd: token.marginXS
  88371. }
  88372. },
  88373. [`${progressCls}-text-inner`]: {
  88374. display: 'flex',
  88375. justifyContent: 'center',
  88376. alignItems: 'center',
  88377. width: '100%',
  88378. height: '100%',
  88379. marginInlineStart: 0,
  88380. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXXS)}`,
  88381. [`&${progressCls}-text-start`]: {
  88382. justifyContent: 'start'
  88383. },
  88384. [`&${progressCls}-text-end`]: {
  88385. justifyContent: 'end'
  88386. }
  88387. },
  88388. [`&${progressCls}-status-active`]: {
  88389. [`${progressCls}-bg::before`]: {
  88390. position: 'absolute',
  88391. inset: 0,
  88392. backgroundColor: token.colorBgContainer,
  88393. borderRadius: token.lineBorderRadius,
  88394. opacity: 0,
  88395. animationName: genAntProgressActive(),
  88396. animationDuration: token.progressActiveMotionDuration,
  88397. animationTimingFunction: token.motionEaseOutQuint,
  88398. animationIterationCount: 'infinite',
  88399. content: '""'
  88400. }
  88401. },
  88402. [`&${progressCls}-rtl${progressCls}-status-active`]: {
  88403. [`${progressCls}-bg::before`]: {
  88404. animationName: genAntProgressActive(true)
  88405. }
  88406. },
  88407. [`&${progressCls}-status-exception`]: {
  88408. [`${progressCls}-bg`]: {
  88409. backgroundColor: token.colorError
  88410. },
  88411. [`${progressCls}-text`]: {
  88412. color: token.colorError
  88413. }
  88414. },
  88415. [`&${progressCls}-status-exception ${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {
  88416. [`${progressCls}-circle-path`]: {
  88417. stroke: token.colorError
  88418. }
  88419. },
  88420. [`&${progressCls}-status-success`]: {
  88421. [`${progressCls}-bg`]: {
  88422. backgroundColor: token.colorSuccess
  88423. },
  88424. [`${progressCls}-text`]: {
  88425. color: token.colorSuccess
  88426. }
  88427. },
  88428. [`&${progressCls}-status-success ${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {
  88429. [`${progressCls}-circle-path`]: {
  88430. stroke: token.colorSuccess
  88431. }
  88432. }
  88433. })
  88434. };
  88435. };
  88436. const genCircleStyle = token => {
  88437. const {
  88438. componentCls: progressCls,
  88439. iconCls: iconPrefixCls
  88440. } = token;
  88441. return {
  88442. [progressCls]: {
  88443. [`${progressCls}-circle-trail`]: {
  88444. stroke: token.remainingColor
  88445. },
  88446. [`&${progressCls}-circle ${progressCls}-inner`]: {
  88447. position: 'relative',
  88448. lineHeight: 1,
  88449. backgroundColor: 'transparent'
  88450. },
  88451. [`&${progressCls}-circle ${progressCls}-text`]: {
  88452. position: 'absolute',
  88453. insetBlockStart: '50%',
  88454. insetInlineStart: 0,
  88455. width: '100%',
  88456. margin: 0,
  88457. padding: 0,
  88458. color: token.circleTextColor,
  88459. fontSize: token.circleTextFontSize,
  88460. lineHeight: 1,
  88461. whiteSpace: 'normal',
  88462. textAlign: 'center',
  88463. transform: 'translateY(-50%)',
  88464. [iconPrefixCls]: {
  88465. fontSize: token.circleIconFontSize
  88466. }
  88467. },
  88468. [`${progressCls}-circle&-status-exception`]: {
  88469. [`${progressCls}-text`]: {
  88470. color: token.colorError
  88471. }
  88472. },
  88473. [`${progressCls}-circle&-status-success`]: {
  88474. [`${progressCls}-text`]: {
  88475. color: token.colorSuccess
  88476. }
  88477. }
  88478. },
  88479. [`${progressCls}-inline-circle`]: {
  88480. lineHeight: 1,
  88481. [`${progressCls}-inner`]: {
  88482. verticalAlign: 'bottom'
  88483. }
  88484. }
  88485. };
  88486. };
  88487. const genStepStyle = token => {
  88488. const {
  88489. componentCls: progressCls
  88490. } = token;
  88491. return {
  88492. [progressCls]: {
  88493. [`${progressCls}-steps`]: {
  88494. display: 'inline-block',
  88495. '&-outer': {
  88496. display: 'flex',
  88497. flexDirection: 'row',
  88498. alignItems: 'center'
  88499. },
  88500. '&-item': {
  88501. flexShrink: 0,
  88502. minWidth: token.progressStepMinWidth,
  88503. marginInlineEnd: token.progressStepMarginInlineEnd,
  88504. backgroundColor: token.remainingColor,
  88505. transition: `all ${token.motionDurationSlow}`,
  88506. '&-active': {
  88507. backgroundColor: token.defaultColor
  88508. }
  88509. }
  88510. }
  88511. }
  88512. };
  88513. };
  88514. const genSmallLine = token => {
  88515. const {
  88516. componentCls: progressCls,
  88517. iconCls: iconPrefixCls
  88518. } = token;
  88519. return {
  88520. [progressCls]: {
  88521. [`${progressCls}-small&-line, ${progressCls}-small&-line ${progressCls}-text ${iconPrefixCls}`]: {
  88522. fontSize: token.fontSizeSM
  88523. }
  88524. }
  88525. };
  88526. };
  88527. const prepareComponentToken = token => ({
  88528. circleTextColor: token.colorText,
  88529. defaultColor: token.colorInfo,
  88530. remainingColor: token.colorFillSecondary,
  88531. lineBorderRadius: 100,
  88532. // magic for capsule shape, should be a very large number
  88533. circleTextFontSize: '1em',
  88534. circleIconFontSize: `${token.fontSize / token.fontSizeSM}em`
  88535. });
  88536. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Progress', token => {
  88537. const progressStepMarginInlineEnd = token.calc(token.marginXXS).div(2).equal();
  88538. const progressToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  88539. progressStepMarginInlineEnd,
  88540. progressStepMinWidth: progressStepMarginInlineEnd,
  88541. progressActiveMotionDuration: '2.4s'
  88542. });
  88543. return [genBaseStyle(progressToken), genCircleStyle(progressToken), genStepStyle(progressToken), genSmallLine(progressToken)];
  88544. }, prepareComponentToken));
  88545. /***/ }),
  88546. /***/ "./components/qr-code/style/index.ts":
  88547. /*!*******************************************!*\
  88548. !*** ./components/qr-code/style/index.ts ***!
  88549. \*******************************************/
  88550. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  88551. "use strict";
  88552. __webpack_require__.r(__webpack_exports__);
  88553. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  88554. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  88555. /* harmony export */ });
  88556. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  88557. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  88558. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  88559. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  88560. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  88561. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  88562. const genQRCodeStyle = token => {
  88563. const {
  88564. componentCls,
  88565. lineWidth,
  88566. lineType,
  88567. colorSplit
  88568. } = token;
  88569. return {
  88570. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
  88571. display: 'flex',
  88572. justifyContent: 'center',
  88573. alignItems: 'center',
  88574. padding: token.paddingSM,
  88575. backgroundColor: token.colorWhite,
  88576. borderRadius: token.borderRadiusLG,
  88577. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  88578. position: 'relative',
  88579. overflow: 'hidden',
  88580. [`& > ${componentCls}-mask`]: {
  88581. position: 'absolute',
  88582. insetBlockStart: 0,
  88583. insetInlineStart: 0,
  88584. zIndex: 10,
  88585. display: 'flex',
  88586. flexDirection: 'column',
  88587. justifyContent: 'center',
  88588. alignItems: 'center',
  88589. width: '100%',
  88590. height: '100%',
  88591. color: token.colorText,
  88592. lineHeight: token.lineHeight,
  88593. background: token.QRCodeMaskBackgroundColor,
  88594. textAlign: 'center',
  88595. [`& > ${componentCls}-expired, & > ${componentCls}-scanned`]: {
  88596. color: token.QRCodeTextColor
  88597. }
  88598. },
  88599. '> canvas': {
  88600. alignSelf: 'stretch',
  88601. flex: 'auto',
  88602. minWidth: 0
  88603. },
  88604. '&-icon': {
  88605. marginBlockEnd: token.marginXS,
  88606. fontSize: token.controlHeight
  88607. }
  88608. }),
  88609. [`${componentCls}-borderless`]: {
  88610. borderColor: 'transparent',
  88611. padding: 0,
  88612. borderRadius: 0
  88613. }
  88614. };
  88615. };
  88616. const prepareComponentToken = token => ({
  88617. QRCodeMaskBackgroundColor: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorBgContainer).setA(0.96).toRgbString()
  88618. });
  88619. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('QRCode', token => {
  88620. const mergedToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  88621. QRCodeTextColor: token.colorText
  88622. });
  88623. return genQRCodeStyle(mergedToken);
  88624. }, prepareComponentToken));
  88625. /***/ }),
  88626. /***/ "./components/qrcode/style/index.ts":
  88627. /*!******************************************!*\
  88628. !*** ./components/qrcode/style/index.ts ***!
  88629. \******************************************/
  88630. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  88631. "use strict";
  88632. __webpack_require__.r(__webpack_exports__);
  88633. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  88634. /* harmony export */ prepareComponentToken: function() { return /* reexport safe */ _qr_code_style__WEBPACK_IMPORTED_MODULE_0__.prepareComponentToken; }
  88635. /* harmony export */ });
  88636. /* harmony import */ var _qr_code_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../qr-code/style */ "./components/qr-code/style/index.ts");
  88637. // Legacy path. Please use `qr-code` instead.
  88638. // Keep file here in case developer import directly from the old path.
  88639. /***/ }),
  88640. /***/ "./components/radio/style/index.ts":
  88641. /*!*****************************************!*\
  88642. !*** ./components/radio/style/index.ts ***!
  88643. \*****************************************/
  88644. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  88645. "use strict";
  88646. __webpack_require__.r(__webpack_exports__);
  88647. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  88648. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  88649. /* harmony export */ });
  88650. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  88651. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  88652. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  88653. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  88654. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  88655. // ============================== Styles ==============================
  88656. // styles from RadioGroup only
  88657. const getGroupRadioStyle = token => {
  88658. const {
  88659. componentCls,
  88660. antCls
  88661. } = token;
  88662. const groupPrefixCls = `${componentCls}-group`;
  88663. return {
  88664. [groupPrefixCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  88665. display: 'inline-block',
  88666. fontSize: 0,
  88667. // RTL
  88668. [`&${groupPrefixCls}-rtl`]: {
  88669. direction: 'rtl'
  88670. },
  88671. [`&${groupPrefixCls}-block`]: {
  88672. display: 'flex'
  88673. },
  88674. [`${antCls}-badge ${antCls}-badge-count`]: {
  88675. zIndex: 1
  88676. },
  88677. [`> ${antCls}-badge:not(:first-child) > ${antCls}-button-wrapper`]: {
  88678. borderInlineStart: 'none'
  88679. }
  88680. })
  88681. };
  88682. };
  88683. // Styles from radio-wrapper
  88684. const getRadioBasicStyle = token => {
  88685. const {
  88686. componentCls,
  88687. wrapperMarginInlineEnd,
  88688. colorPrimary,
  88689. radioSize,
  88690. motionDurationSlow,
  88691. motionDurationMid,
  88692. motionEaseInOutCirc,
  88693. colorBgContainer,
  88694. colorBorder,
  88695. lineWidth,
  88696. colorBgContainerDisabled,
  88697. colorTextDisabled,
  88698. paddingXS,
  88699. dotColorDisabled,
  88700. lineType,
  88701. radioColor,
  88702. radioBgColor,
  88703. calc
  88704. } = token;
  88705. const radioInnerPrefixCls = `${componentCls}-inner`;
  88706. const dotPadding = 4;
  88707. const radioDotDisabledSize = calc(radioSize).sub(calc(dotPadding).mul(2));
  88708. const radioSizeCalc = calc(1).mul(radioSize).equal({
  88709. unit: true
  88710. });
  88711. return {
  88712. [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  88713. display: 'inline-flex',
  88714. alignItems: 'baseline',
  88715. marginInlineStart: 0,
  88716. marginInlineEnd: wrapperMarginInlineEnd,
  88717. cursor: 'pointer',
  88718. '&:last-child': {
  88719. marginInlineEnd: 0
  88720. },
  88721. // RTL
  88722. [`&${componentCls}-wrapper-rtl`]: {
  88723. direction: 'rtl'
  88724. },
  88725. '&-disabled': {
  88726. cursor: 'not-allowed',
  88727. color: token.colorTextDisabled
  88728. },
  88729. '&::after': {
  88730. display: 'inline-block',
  88731. width: 0,
  88732. overflow: 'hidden',
  88733. content: '"\\a0"'
  88734. },
  88735. '&-block': {
  88736. flex: 1,
  88737. justifyContent: 'center'
  88738. },
  88739. // hashId 在 wrapper 上,只能铺平
  88740. [`${componentCls}-checked::after`]: {
  88741. position: 'absolute',
  88742. insetBlockStart: 0,
  88743. insetInlineStart: 0,
  88744. width: '100%',
  88745. height: '100%',
  88746. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorPrimary}`,
  88747. borderRadius: '50%',
  88748. visibility: 'hidden',
  88749. opacity: 0,
  88750. content: '""'
  88751. },
  88752. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  88753. position: 'relative',
  88754. display: 'inline-block',
  88755. outline: 'none',
  88756. cursor: 'pointer',
  88757. alignSelf: 'center',
  88758. borderRadius: '50%'
  88759. }),
  88760. [`${componentCls}-wrapper:hover &,
  88761. &:hover ${radioInnerPrefixCls}`]: {
  88762. borderColor: colorPrimary
  88763. },
  88764. [`${componentCls}-input:focus-visible + ${radioInnerPrefixCls}`]: (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusOutline)(token),
  88765. [`${componentCls}:hover::after, ${componentCls}-wrapper:hover &::after`]: {
  88766. visibility: 'visible'
  88767. },
  88768. [`${componentCls}-inner`]: {
  88769. '&::after': {
  88770. boxSizing: 'border-box',
  88771. position: 'absolute',
  88772. insetBlockStart: '50%',
  88773. insetInlineStart: '50%',
  88774. display: 'block',
  88775. width: radioSizeCalc,
  88776. height: radioSizeCalc,
  88777. marginBlockStart: calc(1).mul(radioSize).div(-2).equal({
  88778. unit: true
  88779. }),
  88780. marginInlineStart: calc(1).mul(radioSize).div(-2).equal({
  88781. unit: true
  88782. }),
  88783. backgroundColor: radioColor,
  88784. borderBlockStart: 0,
  88785. borderInlineStart: 0,
  88786. borderRadius: radioSizeCalc,
  88787. transform: 'scale(0)',
  88788. opacity: 0,
  88789. transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`,
  88790. content: '""'
  88791. },
  88792. boxSizing: 'border-box',
  88793. position: 'relative',
  88794. insetBlockStart: 0,
  88795. insetInlineStart: 0,
  88796. display: 'block',
  88797. width: radioSizeCalc,
  88798. height: radioSizeCalc,
  88799. backgroundColor: colorBgContainer,
  88800. borderColor: colorBorder,
  88801. borderStyle: 'solid',
  88802. borderWidth: lineWidth,
  88803. borderRadius: '50%',
  88804. transition: `all ${motionDurationMid}`
  88805. },
  88806. [`${componentCls}-input`]: {
  88807. position: 'absolute',
  88808. inset: 0,
  88809. zIndex: 1,
  88810. cursor: 'pointer',
  88811. opacity: 0
  88812. },
  88813. // 选中状态
  88814. [`${componentCls}-checked`]: {
  88815. [radioInnerPrefixCls]: {
  88816. borderColor: colorPrimary,
  88817. backgroundColor: radioBgColor,
  88818. '&::after': {
  88819. transform: `scale(${token.calc(token.dotSize).div(radioSize).equal()})`,
  88820. opacity: 1,
  88821. transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`
  88822. }
  88823. }
  88824. },
  88825. [`${componentCls}-disabled`]: {
  88826. cursor: 'not-allowed',
  88827. [radioInnerPrefixCls]: {
  88828. backgroundColor: colorBgContainerDisabled,
  88829. borderColor: colorBorder,
  88830. cursor: 'not-allowed',
  88831. '&::after': {
  88832. backgroundColor: dotColorDisabled
  88833. }
  88834. },
  88835. [`${componentCls}-input`]: {
  88836. cursor: 'not-allowed'
  88837. },
  88838. [`${componentCls}-disabled + span`]: {
  88839. color: colorTextDisabled,
  88840. cursor: 'not-allowed'
  88841. },
  88842. [`&${componentCls}-checked`]: {
  88843. [radioInnerPrefixCls]: {
  88844. '&::after': {
  88845. transform: `scale(${calc(radioDotDisabledSize).div(radioSize).equal()})`
  88846. }
  88847. }
  88848. }
  88849. },
  88850. [`span${componentCls} + *`]: {
  88851. paddingInlineStart: paddingXS,
  88852. paddingInlineEnd: paddingXS
  88853. }
  88854. })
  88855. };
  88856. };
  88857. // Styles from radio-button
  88858. const getRadioButtonStyle = token => {
  88859. const {
  88860. buttonColor,
  88861. controlHeight,
  88862. componentCls,
  88863. lineWidth,
  88864. lineType,
  88865. colorBorder,
  88866. motionDurationMid,
  88867. buttonPaddingInline,
  88868. fontSize,
  88869. buttonBg,
  88870. fontSizeLG,
  88871. controlHeightLG,
  88872. controlHeightSM,
  88873. paddingXS,
  88874. borderRadius,
  88875. borderRadiusSM,
  88876. borderRadiusLG,
  88877. buttonCheckedBg,
  88878. buttonSolidCheckedColor,
  88879. colorTextDisabled,
  88880. colorBgContainerDisabled,
  88881. buttonCheckedBgDisabled,
  88882. buttonCheckedColorDisabled,
  88883. colorPrimary,
  88884. colorPrimaryHover,
  88885. colorPrimaryActive,
  88886. buttonSolidCheckedBg,
  88887. buttonSolidCheckedHoverBg,
  88888. buttonSolidCheckedActiveBg,
  88889. calc
  88890. } = token;
  88891. return {
  88892. [`${componentCls}-button-wrapper`]: {
  88893. position: 'relative',
  88894. display: 'inline-block',
  88895. height: controlHeight,
  88896. margin: 0,
  88897. paddingInline: buttonPaddingInline,
  88898. paddingBlock: 0,
  88899. color: buttonColor,
  88900. fontSize,
  88901. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(controlHeight).sub(calc(lineWidth).mul(2)).equal()),
  88902. background: buttonBg,
  88903. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorBorder}`,
  88904. // strange align fix for chrome but works
  88905. // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
  88906. borderBlockStartWidth: calc(lineWidth).add(0.02).equal(),
  88907. borderInlineEndWidth: lineWidth,
  88908. cursor: 'pointer',
  88909. transition: [`color ${motionDurationMid}`, `background ${motionDurationMid}`, `box-shadow ${motionDurationMid}`].join(','),
  88910. a: {
  88911. color: buttonColor
  88912. },
  88913. [`> ${componentCls}-button`]: {
  88914. position: 'absolute',
  88915. insetBlockStart: 0,
  88916. insetInlineStart: 0,
  88917. zIndex: -1,
  88918. width: '100%',
  88919. height: '100%'
  88920. },
  88921. '&:not(:last-child)': {
  88922. marginInlineEnd: calc(lineWidth).mul(-1).equal()
  88923. },
  88924. '&:first-child': {
  88925. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorBorder}`,
  88926. borderStartStartRadius: borderRadius,
  88927. borderEndStartRadius: borderRadius
  88928. },
  88929. '&:last-child': {
  88930. borderStartEndRadius: borderRadius,
  88931. borderEndEndRadius: borderRadius
  88932. },
  88933. '&:first-child:last-child': {
  88934. borderRadius
  88935. },
  88936. [`${componentCls}-group-large &`]: {
  88937. height: controlHeightLG,
  88938. fontSize: fontSizeLG,
  88939. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal()),
  88940. '&:first-child': {
  88941. borderStartStartRadius: borderRadiusLG,
  88942. borderEndStartRadius: borderRadiusLG
  88943. },
  88944. '&:last-child': {
  88945. borderStartEndRadius: borderRadiusLG,
  88946. borderEndEndRadius: borderRadiusLG
  88947. }
  88948. },
  88949. [`${componentCls}-group-small &`]: {
  88950. height: controlHeightSM,
  88951. paddingInline: calc(paddingXS).sub(lineWidth).equal(),
  88952. paddingBlock: 0,
  88953. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal()),
  88954. '&:first-child': {
  88955. borderStartStartRadius: borderRadiusSM,
  88956. borderEndStartRadius: borderRadiusSM
  88957. },
  88958. '&:last-child': {
  88959. borderStartEndRadius: borderRadiusSM,
  88960. borderEndEndRadius: borderRadiusSM
  88961. }
  88962. },
  88963. '&:hover': {
  88964. position: 'relative',
  88965. color: colorPrimary
  88966. },
  88967. '&:has(:focus-visible)': (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusOutline)(token),
  88968. [`${componentCls}-inner, input[type='checkbox'], input[type='radio']`]: {
  88969. width: 0,
  88970. height: 0,
  88971. opacity: 0,
  88972. pointerEvents: 'none'
  88973. },
  88974. [`&-checked:not(${componentCls}-button-wrapper-disabled)`]: {
  88975. zIndex: 1,
  88976. color: colorPrimary,
  88977. background: buttonCheckedBg,
  88978. borderColor: colorPrimary,
  88979. '&::before': {
  88980. backgroundColor: colorPrimary
  88981. },
  88982. '&:first-child': {
  88983. borderColor: colorPrimary
  88984. },
  88985. '&:hover': {
  88986. color: colorPrimaryHover,
  88987. borderColor: colorPrimaryHover,
  88988. '&::before': {
  88989. backgroundColor: colorPrimaryHover
  88990. }
  88991. },
  88992. '&:active': {
  88993. color: colorPrimaryActive,
  88994. borderColor: colorPrimaryActive,
  88995. '&::before': {
  88996. backgroundColor: colorPrimaryActive
  88997. }
  88998. }
  88999. },
  89000. [`${componentCls}-group-solid &-checked:not(${componentCls}-button-wrapper-disabled)`]: {
  89001. color: buttonSolidCheckedColor,
  89002. background: buttonSolidCheckedBg,
  89003. borderColor: buttonSolidCheckedBg,
  89004. '&:hover': {
  89005. color: buttonSolidCheckedColor,
  89006. background: buttonSolidCheckedHoverBg,
  89007. borderColor: buttonSolidCheckedHoverBg
  89008. },
  89009. '&:active': {
  89010. color: buttonSolidCheckedColor,
  89011. background: buttonSolidCheckedActiveBg,
  89012. borderColor: buttonSolidCheckedActiveBg
  89013. }
  89014. },
  89015. '&-disabled': {
  89016. color: colorTextDisabled,
  89017. backgroundColor: colorBgContainerDisabled,
  89018. borderColor: colorBorder,
  89019. cursor: 'not-allowed',
  89020. '&:first-child, &:hover': {
  89021. color: colorTextDisabled,
  89022. backgroundColor: colorBgContainerDisabled,
  89023. borderColor: colorBorder
  89024. }
  89025. },
  89026. [`&-disabled${componentCls}-button-wrapper-checked`]: {
  89027. color: buttonCheckedColorDisabled,
  89028. backgroundColor: buttonCheckedBgDisabled,
  89029. borderColor: colorBorder,
  89030. boxShadow: 'none'
  89031. },
  89032. '&-block': {
  89033. flex: 1,
  89034. textAlign: 'center'
  89035. }
  89036. }
  89037. };
  89038. };
  89039. // ============================== Export ==============================
  89040. const prepareComponentToken = token => {
  89041. const {
  89042. wireframe,
  89043. padding,
  89044. marginXS,
  89045. lineWidth,
  89046. fontSizeLG,
  89047. colorText,
  89048. colorBgContainer,
  89049. colorTextDisabled,
  89050. controlItemBgActiveDisabled,
  89051. colorTextLightSolid,
  89052. colorPrimary,
  89053. colorPrimaryHover,
  89054. colorPrimaryActive,
  89055. colorWhite
  89056. } = token;
  89057. const dotPadding = 4; // Fixed value
  89058. const radioSize = fontSizeLG;
  89059. const radioDotSize = wireframe ? radioSize - dotPadding * 2 : radioSize - (dotPadding + lineWidth) * 2;
  89060. return {
  89061. // Radio
  89062. radioSize,
  89063. dotSize: radioDotSize,
  89064. dotColorDisabled: colorTextDisabled,
  89065. // Radio buttons
  89066. buttonSolidCheckedColor: colorTextLightSolid,
  89067. buttonSolidCheckedBg: colorPrimary,
  89068. buttonSolidCheckedHoverBg: colorPrimaryHover,
  89069. buttonSolidCheckedActiveBg: colorPrimaryActive,
  89070. buttonBg: colorBgContainer,
  89071. buttonCheckedBg: colorBgContainer,
  89072. buttonColor: colorText,
  89073. buttonCheckedBgDisabled: controlItemBgActiveDisabled,
  89074. buttonCheckedColorDisabled: colorTextDisabled,
  89075. buttonPaddingInline: padding - lineWidth,
  89076. wrapperMarginInlineEnd: marginXS,
  89077. // internal
  89078. radioColor: wireframe ? colorPrimary : colorWhite,
  89079. radioBgColor: wireframe ? colorBgContainer : colorPrimary
  89080. };
  89081. };
  89082. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Radio', token => {
  89083. const {
  89084. controlOutline,
  89085. controlOutlineWidth
  89086. } = token;
  89087. const radioFocusShadow = `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(controlOutlineWidth)} ${controlOutline}`;
  89088. const radioButtonFocusShadow = radioFocusShadow;
  89089. const radioToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  89090. radioFocusShadow,
  89091. radioButtonFocusShadow
  89092. });
  89093. return [getGroupRadioStyle(radioToken), getRadioBasicStyle(radioToken), getRadioButtonStyle(radioToken)];
  89094. }, prepareComponentToken, {
  89095. unitless: {
  89096. radioSize: true,
  89097. dotSize: true
  89098. }
  89099. }));
  89100. /***/ }),
  89101. /***/ "./components/rate/style/index.ts":
  89102. /*!****************************************!*\
  89103. !*** ./components/rate/style/index.ts ***!
  89104. \****************************************/
  89105. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  89106. "use strict";
  89107. __webpack_require__.r(__webpack_exports__);
  89108. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  89109. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  89110. /* harmony export */ });
  89111. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  89112. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  89113. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  89114. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  89115. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  89116. const genRateStarStyle = token => {
  89117. const {
  89118. componentCls
  89119. } = token;
  89120. return {
  89121. [`${componentCls}-star`]: {
  89122. position: 'relative',
  89123. display: 'inline-block',
  89124. color: 'inherit',
  89125. cursor: 'pointer',
  89126. '&:not(:last-child)': {
  89127. marginInlineEnd: token.marginXS
  89128. },
  89129. '> div': {
  89130. transition: `all ${token.motionDurationMid}, outline 0s`,
  89131. '&:hover': {
  89132. transform: token.starHoverScale
  89133. },
  89134. '&:focus': {
  89135. outline: 0
  89136. },
  89137. '&:focus-visible': {
  89138. outline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} dashed ${token.starColor}`,
  89139. transform: token.starHoverScale
  89140. }
  89141. },
  89142. '&-first, &-second': {
  89143. color: token.starBg,
  89144. transition: `all ${token.motionDurationMid}`,
  89145. userSelect: 'none'
  89146. },
  89147. '&-first': {
  89148. position: 'absolute',
  89149. top: 0,
  89150. insetInlineStart: 0,
  89151. width: '50%',
  89152. height: '100%',
  89153. overflow: 'hidden',
  89154. opacity: 0
  89155. },
  89156. [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {
  89157. opacity: 1
  89158. },
  89159. [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {
  89160. color: 'inherit'
  89161. }
  89162. }
  89163. };
  89164. };
  89165. const genRateRtlStyle = token => ({
  89166. [`&-rtl${token.componentCls}`]: {
  89167. direction: 'rtl'
  89168. }
  89169. });
  89170. const genRateStyle = token => {
  89171. const {
  89172. componentCls
  89173. } = token;
  89174. return {
  89175. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  89176. display: 'inline-block',
  89177. margin: 0,
  89178. padding: 0,
  89179. color: token.starColor,
  89180. fontSize: token.starSize,
  89181. lineHeight: 1,
  89182. listStyle: 'none',
  89183. outline: 'none',
  89184. // disable styles
  89185. [`&-disabled${componentCls} ${componentCls}-star`]: {
  89186. cursor: 'default',
  89187. '> div:hover': {
  89188. transform: 'scale(1)'
  89189. }
  89190. }
  89191. }), genRateStarStyle(token)), genRateRtlStyle(token))
  89192. };
  89193. };
  89194. // ============================== Export ==============================
  89195. const prepareComponentToken = token => ({
  89196. starColor: token.yellow6,
  89197. starSize: token.controlHeightLG * 0.5,
  89198. starHoverScale: 'scale(1.1)',
  89199. starBg: token.colorFillContent
  89200. });
  89201. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Rate', token => {
  89202. const rateToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {});
  89203. return genRateStyle(rateToken);
  89204. }, prepareComponentToken));
  89205. /***/ }),
  89206. /***/ "./components/result/style/index.ts":
  89207. /*!******************************************!*\
  89208. !*** ./components/result/style/index.ts ***!
  89209. \******************************************/
  89210. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  89211. "use strict";
  89212. __webpack_require__.r(__webpack_exports__);
  89213. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  89214. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  89215. /* harmony export */ });
  89216. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  89217. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  89218. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  89219. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  89220. // ============================== Styles ==============================
  89221. const genBaseStyle = token => {
  89222. const {
  89223. componentCls,
  89224. lineHeightHeading3,
  89225. iconCls,
  89226. padding,
  89227. paddingXL,
  89228. paddingXS,
  89229. paddingLG,
  89230. marginXS,
  89231. lineHeight
  89232. } = token;
  89233. return {
  89234. // Result
  89235. [componentCls]: {
  89236. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(paddingLG).mul(2).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXL)}`,
  89237. // RTL
  89238. '&-rtl': {
  89239. direction: 'rtl'
  89240. }
  89241. },
  89242. // Exception Status image
  89243. [`${componentCls} ${componentCls}-image`]: {
  89244. width: token.imageWidth,
  89245. height: token.imageHeight,
  89246. margin: 'auto'
  89247. },
  89248. [`${componentCls} ${componentCls}-icon`]: {
  89249. marginBottom: paddingLG,
  89250. textAlign: 'center',
  89251. [`& > ${iconCls}`]: {
  89252. fontSize: token.iconFontSize
  89253. }
  89254. },
  89255. [`${componentCls} ${componentCls}-title`]: {
  89256. color: token.colorTextHeading,
  89257. fontSize: token.titleFontSize,
  89258. lineHeight: lineHeightHeading3,
  89259. marginBlock: marginXS,
  89260. textAlign: 'center'
  89261. },
  89262. [`${componentCls} ${componentCls}-subtitle`]: {
  89263. color: token.colorTextDescription,
  89264. fontSize: token.subtitleFontSize,
  89265. lineHeight,
  89266. textAlign: 'center'
  89267. },
  89268. [`${componentCls} ${componentCls}-content`]: {
  89269. marginTop: paddingLG,
  89270. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(padding).mul(2.5).equal())}`,
  89271. backgroundColor: token.colorFillAlter
  89272. },
  89273. [`${componentCls} ${componentCls}-extra`]: {
  89274. margin: token.extraMargin,
  89275. textAlign: 'center',
  89276. '& > *': {
  89277. marginInlineEnd: paddingXS,
  89278. '&:last-child': {
  89279. marginInlineEnd: 0
  89280. }
  89281. }
  89282. }
  89283. };
  89284. };
  89285. const genStatusIconStyle = token => {
  89286. const {
  89287. componentCls,
  89288. iconCls
  89289. } = token;
  89290. return {
  89291. [`${componentCls}-success ${componentCls}-icon > ${iconCls}`]: {
  89292. color: token.resultSuccessIconColor
  89293. },
  89294. [`${componentCls}-error ${componentCls}-icon > ${iconCls}`]: {
  89295. color: token.resultErrorIconColor
  89296. },
  89297. [`${componentCls}-info ${componentCls}-icon > ${iconCls}`]: {
  89298. color: token.resultInfoIconColor
  89299. },
  89300. [`${componentCls}-warning ${componentCls}-icon > ${iconCls}`]: {
  89301. color: token.resultWarningIconColor
  89302. }
  89303. };
  89304. };
  89305. const genResultStyle = token => [genBaseStyle(token), genStatusIconStyle(token)];
  89306. const getStyle = token => genResultStyle(token);
  89307. // ============================== Export ==============================
  89308. const prepareComponentToken = token => ({
  89309. titleFontSize: token.fontSizeHeading3,
  89310. subtitleFontSize: token.fontSize,
  89311. iconFontSize: token.fontSizeHeading3 * 3,
  89312. extraMargin: `${token.paddingLG}px 0 0 0`
  89313. });
  89314. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Result', token => {
  89315. const resultInfoIconColor = token.colorInfo;
  89316. const resultErrorIconColor = token.colorError;
  89317. const resultSuccessIconColor = token.colorSuccess;
  89318. const resultWarningIconColor = token.colorWarning;
  89319. const resultToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.mergeToken)(token, {
  89320. resultInfoIconColor,
  89321. resultErrorIconColor,
  89322. resultSuccessIconColor,
  89323. resultWarningIconColor,
  89324. imageWidth: 250,
  89325. imageHeight: 295
  89326. });
  89327. return [getStyle(resultToken)];
  89328. }, prepareComponentToken));
  89329. /***/ }),
  89330. /***/ "./components/row/style/index.ts":
  89331. /*!***************************************!*\
  89332. !*** ./components/row/style/index.ts ***!
  89333. \***************************************/
  89334. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  89335. "use strict";
  89336. __webpack_require__.r(__webpack_exports__);
  89337. // Compatible for babel-plugin-import
  89338. /* istanbul ignore next */
  89339. /* harmony default export */ __webpack_exports__["default"] = ({});
  89340. /***/ }),
  89341. /***/ "./components/segmented/style/index.ts":
  89342. /*!*********************************************!*\
  89343. !*** ./components/segmented/style/index.ts ***!
  89344. \*********************************************/
  89345. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  89346. "use strict";
  89347. __webpack_require__.r(__webpack_exports__);
  89348. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  89349. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  89350. /* harmony export */ });
  89351. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  89352. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  89353. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  89354. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  89355. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  89356. // ============================== Mixins ==============================
  89357. function getItemDisabledStyle(cls, token) {
  89358. return {
  89359. [`${cls}, ${cls}:hover, ${cls}:focus`]: {
  89360. color: token.colorTextDisabled,
  89361. cursor: 'not-allowed'
  89362. }
  89363. };
  89364. }
  89365. function getItemSelectedStyle(token) {
  89366. return {
  89367. backgroundColor: token.itemSelectedBg,
  89368. boxShadow: token.boxShadowTertiary
  89369. };
  89370. }
  89371. const segmentedTextEllipsisCss = Object.assign({
  89372. overflow: 'hidden'
  89373. }, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis);
  89374. // ============================== Styles ==============================
  89375. const genSegmentedStyle = token => {
  89376. const {
  89377. componentCls
  89378. } = token;
  89379. const labelHeight = token.calc(token.controlHeight).sub(token.calc(token.trackPadding).mul(2)).equal();
  89380. const labelHeightLG = token.calc(token.controlHeightLG).sub(token.calc(token.trackPadding).mul(2)).equal();
  89381. const labelHeightSM = token.calc(token.controlHeightSM).sub(token.calc(token.trackPadding).mul(2)).equal();
  89382. return {
  89383. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  89384. display: 'inline-block',
  89385. padding: token.trackPadding,
  89386. color: token.itemColor,
  89387. background: token.trackBg,
  89388. borderRadius: token.borderRadius,
  89389. transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`
  89390. }), (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusStyle)(token)), {
  89391. [`${componentCls}-group`]: {
  89392. position: 'relative',
  89393. display: 'flex',
  89394. alignItems: 'stretch',
  89395. justifyItems: 'flex-start',
  89396. flexDirection: 'row',
  89397. width: '100%'
  89398. },
  89399. // RTL styles
  89400. [`&${componentCls}-rtl`]: {
  89401. direction: 'rtl'
  89402. },
  89403. [`&${componentCls}-vertical`]: {
  89404. [`${componentCls}-group`]: {
  89405. flexDirection: 'column'
  89406. },
  89407. [`${componentCls}-thumb`]: {
  89408. width: '100%',
  89409. height: 0,
  89410. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXXS)}`
  89411. }
  89412. },
  89413. // block styles
  89414. [`&${componentCls}-block`]: {
  89415. display: 'flex'
  89416. },
  89417. [`&${componentCls}-block ${componentCls}-item`]: {
  89418. flex: 1,
  89419. minWidth: 0
  89420. },
  89421. // item styles
  89422. [`${componentCls}-item`]: {
  89423. position: 'relative',
  89424. textAlign: 'center',
  89425. cursor: 'pointer',
  89426. transition: `color ${token.motionDurationMid} ${token.motionEaseInOut}`,
  89427. borderRadius: token.borderRadiusSM,
  89428. // Fix Safari render bug
  89429. // https://github.com/ant-design/ant-design/issues/45250
  89430. transform: 'translateZ(0)',
  89431. '&-selected': Object.assign(Object.assign({}, getItemSelectedStyle(token)), {
  89432. color: token.itemSelectedColor
  89433. }),
  89434. '&-focused': (0,_style__WEBPACK_IMPORTED_MODULE_1__.genFocusOutline)(token),
  89435. '&::after': {
  89436. content: '""',
  89437. position: 'absolute',
  89438. zIndex: -1,
  89439. width: '100%',
  89440. height: '100%',
  89441. top: 0,
  89442. insetInlineStart: 0,
  89443. borderRadius: 'inherit',
  89444. opacity: 0,
  89445. transition: `opacity ${token.motionDurationMid}`,
  89446. // This is mandatory to make it not clickable or hoverable
  89447. // Ref: https://github.com/ant-design/ant-design/issues/40888
  89448. pointerEvents: 'none'
  89449. },
  89450. [`&:hover:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
  89451. color: token.itemHoverColor,
  89452. '&::after': {
  89453. opacity: 1,
  89454. backgroundColor: token.itemHoverBg
  89455. }
  89456. },
  89457. [`&:active:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
  89458. color: token.itemHoverColor,
  89459. '&::after': {
  89460. opacity: 1,
  89461. backgroundColor: token.itemActiveBg
  89462. }
  89463. },
  89464. '&-label': Object.assign({
  89465. minHeight: labelHeight,
  89466. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(labelHeight),
  89467. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.segmentedPaddingHorizontal)}`
  89468. }, segmentedTextEllipsisCss),
  89469. // syntactic sugar to add `icon` for Segmented Item
  89470. '&-icon + *': {
  89471. marginInlineStart: token.calc(token.marginSM).div(2).equal()
  89472. },
  89473. '&-input': {
  89474. position: 'absolute',
  89475. insetBlockStart: 0,
  89476. insetInlineStart: 0,
  89477. width: 0,
  89478. height: 0,
  89479. opacity: 0,
  89480. pointerEvents: 'none'
  89481. }
  89482. },
  89483. // thumb styles
  89484. [`${componentCls}-thumb`]: Object.assign(Object.assign({}, getItemSelectedStyle(token)), {
  89485. position: 'absolute',
  89486. insetBlockStart: 0,
  89487. insetInlineStart: 0,
  89488. width: 0,
  89489. height: '100%',
  89490. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXXS)} 0`,
  89491. borderRadius: token.borderRadiusSM,
  89492. transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOut}, height ${token.motionDurationSlow} ${token.motionEaseInOut}`,
  89493. [`& ~ ${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)::after`]: {
  89494. backgroundColor: 'transparent'
  89495. }
  89496. }),
  89497. // size styles
  89498. [`&${componentCls}-lg`]: {
  89499. borderRadius: token.borderRadiusLG,
  89500. [`${componentCls}-item-label`]: {
  89501. minHeight: labelHeightLG,
  89502. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(labelHeightLG),
  89503. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.segmentedPaddingHorizontal)}`,
  89504. fontSize: token.fontSizeLG
  89505. },
  89506. [`${componentCls}-item, ${componentCls}-thumb`]: {
  89507. borderRadius: token.borderRadius
  89508. }
  89509. },
  89510. [`&${componentCls}-sm`]: {
  89511. borderRadius: token.borderRadiusSM,
  89512. [`${componentCls}-item-label`]: {
  89513. minHeight: labelHeightSM,
  89514. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(labelHeightSM),
  89515. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.segmentedPaddingHorizontalSM)}`
  89516. },
  89517. [`${componentCls}-item, ${componentCls}-thumb`]: {
  89518. borderRadius: token.borderRadiusXS
  89519. }
  89520. }
  89521. }), getItemDisabledStyle(`&-disabled ${componentCls}-item`, token)), getItemDisabledStyle(`${componentCls}-item-disabled`, token)), {
  89522. // transition effect when `appear-active`
  89523. [`${componentCls}-thumb-motion-appear-active`]: {
  89524. transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOut}, width ${token.motionDurationSlow} ${token.motionEaseInOut}`,
  89525. willChange: 'transform, width'
  89526. },
  89527. [`&${componentCls}-shape-round`]: {
  89528. borderRadius: 9999,
  89529. [`${componentCls}-item, ${componentCls}-thumb`]: {
  89530. borderRadius: 9999
  89531. }
  89532. }
  89533. })
  89534. };
  89535. };
  89536. // ============================== Export ==============================
  89537. const prepareComponentToken = token => {
  89538. const {
  89539. colorTextLabel,
  89540. colorText,
  89541. colorFillSecondary,
  89542. colorBgElevated,
  89543. colorFill,
  89544. lineWidthBold,
  89545. colorBgLayout
  89546. } = token;
  89547. return {
  89548. trackPadding: lineWidthBold,
  89549. trackBg: colorBgLayout,
  89550. itemColor: colorTextLabel,
  89551. itemHoverColor: colorText,
  89552. itemHoverBg: colorFillSecondary,
  89553. itemSelectedBg: colorBgElevated,
  89554. itemActiveBg: colorFill,
  89555. itemSelectedColor: colorText
  89556. };
  89557. };
  89558. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Segmented', token => {
  89559. const {
  89560. lineWidth,
  89561. calc
  89562. } = token;
  89563. const segmentedToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  89564. segmentedPaddingHorizontal: calc(token.controlPaddingHorizontal).sub(lineWidth).equal(),
  89565. segmentedPaddingHorizontalSM: calc(token.controlPaddingHorizontalSM).sub(lineWidth).equal()
  89566. });
  89567. return genSegmentedStyle(segmentedToken);
  89568. }, prepareComponentToken));
  89569. /***/ }),
  89570. /***/ "./components/select/style/index.ts":
  89571. /*!******************************************************!*\
  89572. !*** ./components/select/style/index.ts + 4 modules ***!
  89573. \******************************************************/
  89574. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  89575. "use strict";
  89576. // ESM COMPAT FLAG
  89577. __webpack_require__.r(__webpack_exports__);
  89578. // EXPORTS
  89579. __webpack_require__.d(__webpack_exports__, {
  89580. "default": function() { return /* binding */ select_style; }
  89581. });
  89582. // EXTERNAL MODULE: ./components/style/index.tsx
  89583. var style = __webpack_require__("./components/style/index.tsx");
  89584. // EXTERNAL MODULE: ./components/style/compact-item.ts
  89585. var compact_item = __webpack_require__("./components/style/compact-item.ts");
  89586. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  89587. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  89588. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  89589. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  89590. // EXTERNAL MODULE: ./components/style/motion/slide.ts
  89591. var slide = __webpack_require__("./components/style/motion/slide.ts");
  89592. // EXTERNAL MODULE: ./components/style/motion/move.ts
  89593. var move = __webpack_require__("./components/style/motion/move.ts");
  89594. ;// ./components/select/style/dropdown.ts
  89595. const genItemStyle = token => {
  89596. const {
  89597. optionHeight,
  89598. optionFontSize,
  89599. optionLineHeight,
  89600. optionPadding
  89601. } = token;
  89602. return {
  89603. position: 'relative',
  89604. display: 'block',
  89605. minHeight: optionHeight,
  89606. padding: optionPadding,
  89607. color: token.colorText,
  89608. fontWeight: 'normal',
  89609. fontSize: optionFontSize,
  89610. lineHeight: optionLineHeight,
  89611. boxSizing: 'border-box'
  89612. };
  89613. };
  89614. const genSingleStyle = token => {
  89615. const {
  89616. antCls,
  89617. componentCls
  89618. } = token;
  89619. const selectItemCls = `${componentCls}-item`;
  89620. const slideUpEnterActive = `&${antCls}-slide-up-enter${antCls}-slide-up-enter-active`;
  89621. const slideUpAppearActive = `&${antCls}-slide-up-appear${antCls}-slide-up-appear-active`;
  89622. const slideUpLeaveActive = `&${antCls}-slide-up-leave${antCls}-slide-up-leave-active`;
  89623. const dropdownPlacementCls = `${componentCls}-dropdown-placement-`;
  89624. const selectedItemCls = `${selectItemCls}-option-selected`;
  89625. return [{
  89626. [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  89627. position: 'absolute',
  89628. top: -9999,
  89629. zIndex: token.zIndexPopup,
  89630. boxSizing: 'border-box',
  89631. padding: token.paddingXXS,
  89632. overflow: 'hidden',
  89633. fontSize: token.fontSize,
  89634. // Fix select render lag of long text in chrome
  89635. // https://github.com/ant-design/ant-design/issues/11456
  89636. // https://github.com/ant-design/ant-design/issues/11843
  89637. fontVariant: 'initial',
  89638. backgroundColor: token.colorBgElevated,
  89639. borderRadius: token.borderRadiusLG,
  89640. outline: 'none',
  89641. boxShadow: token.boxShadowSecondary,
  89642. [`
  89643. ${slideUpEnterActive}${dropdownPlacementCls}bottomLeft,
  89644. ${slideUpAppearActive}${dropdownPlacementCls}bottomLeft
  89645. `]: {
  89646. animationName: slide.slideUpIn
  89647. },
  89648. [`
  89649. ${slideUpEnterActive}${dropdownPlacementCls}topLeft,
  89650. ${slideUpAppearActive}${dropdownPlacementCls}topLeft,
  89651. ${slideUpEnterActive}${dropdownPlacementCls}topRight,
  89652. ${slideUpAppearActive}${dropdownPlacementCls}topRight
  89653. `]: {
  89654. animationName: slide.slideDownIn
  89655. },
  89656. [`${slideUpLeaveActive}${dropdownPlacementCls}bottomLeft`]: {
  89657. animationName: slide.slideUpOut
  89658. },
  89659. [`
  89660. ${slideUpLeaveActive}${dropdownPlacementCls}topLeft,
  89661. ${slideUpLeaveActive}${dropdownPlacementCls}topRight
  89662. `]: {
  89663. animationName: slide.slideDownOut
  89664. },
  89665. '&-hidden': {
  89666. display: 'none'
  89667. },
  89668. [selectItemCls]: Object.assign(Object.assign({}, genItemStyle(token)), {
  89669. cursor: 'pointer',
  89670. transition: `background ${token.motionDurationSlow} ease`,
  89671. borderRadius: token.borderRadiusSM,
  89672. // =========== Group ============
  89673. '&-group': {
  89674. color: token.colorTextDescription,
  89675. fontSize: token.fontSizeSM,
  89676. cursor: 'default'
  89677. },
  89678. // =========== Option ===========
  89679. '&-option': {
  89680. display: 'flex',
  89681. '&-content': Object.assign({
  89682. flex: 'auto'
  89683. }, style.textEllipsis),
  89684. '&-state': {
  89685. flex: 'none',
  89686. display: 'flex',
  89687. alignItems: 'center'
  89688. },
  89689. [`&-active:not(${selectItemCls}-option-disabled)`]: {
  89690. backgroundColor: token.optionActiveBg
  89691. },
  89692. [`&-selected:not(${selectItemCls}-option-disabled)`]: {
  89693. color: token.optionSelectedColor,
  89694. fontWeight: token.optionSelectedFontWeight,
  89695. backgroundColor: token.optionSelectedBg,
  89696. [`${selectItemCls}-option-state`]: {
  89697. color: token.colorPrimary
  89698. }
  89699. },
  89700. '&-disabled': {
  89701. [`&${selectItemCls}-option-selected`]: {
  89702. backgroundColor: token.colorBgContainerDisabled
  89703. },
  89704. color: token.colorTextDisabled,
  89705. cursor: 'not-allowed'
  89706. },
  89707. '&-grouped': {
  89708. paddingInlineStart: token.calc(token.controlPaddingHorizontal).mul(2).equal()
  89709. }
  89710. },
  89711. '&-empty': Object.assign(Object.assign({}, genItemStyle(token)), {
  89712. color: token.colorTextDisabled
  89713. })
  89714. }),
  89715. // https://github.com/ant-design/ant-design/pull/46646
  89716. [`${selectedItemCls}:has(+ ${selectedItemCls})`]: {
  89717. borderEndStartRadius: 0,
  89718. borderEndEndRadius: 0,
  89719. [`& + ${selectedItemCls}`]: {
  89720. borderStartStartRadius: 0,
  89721. borderStartEndRadius: 0
  89722. }
  89723. },
  89724. // =========================== RTL ===========================
  89725. '&-rtl': {
  89726. direction: 'rtl'
  89727. }
  89728. })
  89729. },
  89730. // Follow code may reuse in other components
  89731. (0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down'), (0,move.initMoveMotion)(token, 'move-up'), (0,move.initMoveMotion)(token, 'move-down')];
  89732. };
  89733. /* harmony default export */ var dropdown = (genSingleStyle);
  89734. // EXTERNAL MODULE: ./components/select/style/multiple.ts
  89735. var multiple = __webpack_require__("./components/select/style/multiple.ts");
  89736. // EXTERNAL MODULE: ./alias/cssinjs.js
  89737. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  89738. ;// ./components/select/style/single.ts
  89739. function genSizeStyle(token, suffix) {
  89740. const {
  89741. componentCls,
  89742. inputPaddingHorizontalBase,
  89743. borderRadius
  89744. } = token;
  89745. const selectHeightWithoutBorder = token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal();
  89746. const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
  89747. return {
  89748. [`${componentCls}-single${suffixCls}`]: {
  89749. fontSize: token.fontSize,
  89750. height: token.controlHeight,
  89751. // ========================= Selector =========================
  89752. [`${componentCls}-selector`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token, true)), {
  89753. display: 'flex',
  89754. borderRadius,
  89755. flex: '1 1 auto',
  89756. [`${componentCls}-selection-wrap:after`]: {
  89757. lineHeight: (0,cssinjs.unit)(selectHeightWithoutBorder)
  89758. },
  89759. [`${componentCls}-selection-search`]: {
  89760. position: 'absolute',
  89761. inset: 0,
  89762. width: '100%',
  89763. '&-input': {
  89764. width: '100%',
  89765. WebkitAppearance: 'textfield'
  89766. }
  89767. },
  89768. [`
  89769. ${componentCls}-selection-item,
  89770. ${componentCls}-selection-placeholder
  89771. `]: {
  89772. display: 'block',
  89773. padding: 0,
  89774. lineHeight: (0,cssinjs.unit)(selectHeightWithoutBorder),
  89775. transition: `all ${token.motionDurationSlow}, visibility 0s`,
  89776. alignSelf: 'center'
  89777. },
  89778. [`${componentCls}-selection-placeholder`]: {
  89779. transition: 'none',
  89780. pointerEvents: 'none'
  89781. },
  89782. // For common baseline align
  89783. [['&:after', /* For '' value baseline align */
  89784. `${componentCls}-selection-item:empty:after`, /* For undefined value baseline align */
  89785. `${componentCls}-selection-placeholder:empty:after`].join(',')]: {
  89786. display: 'inline-block',
  89787. width: 0,
  89788. visibility: 'hidden',
  89789. content: '"\\a0"'
  89790. }
  89791. }),
  89792. [`
  89793. &${componentCls}-show-arrow ${componentCls}-selection-item,
  89794. &${componentCls}-show-arrow ${componentCls}-selection-search,
  89795. &${componentCls}-show-arrow ${componentCls}-selection-placeholder
  89796. `]: {
  89797. paddingInlineEnd: token.showArrowPaddingInlineEnd
  89798. },
  89799. // Opacity selection if open
  89800. [`&${componentCls}-open ${componentCls}-selection-item`]: {
  89801. color: token.colorTextPlaceholder
  89802. },
  89803. // ========================== Input ==========================
  89804. // We only change the style of non-customize input which is only support by `combobox` mode.
  89805. // Not customize
  89806. [`&:not(${componentCls}-customize-input)`]: {
  89807. [`${componentCls}-selector`]: {
  89808. width: '100%',
  89809. height: '100%',
  89810. alignItems: 'center',
  89811. padding: `0 ${(0,cssinjs.unit)(inputPaddingHorizontalBase)}`,
  89812. [`${componentCls}-selection-search-input`]: {
  89813. height: selectHeightWithoutBorder,
  89814. fontSize: token.fontSize
  89815. },
  89816. '&:after': {
  89817. lineHeight: (0,cssinjs.unit)(selectHeightWithoutBorder)
  89818. }
  89819. }
  89820. },
  89821. [`&${componentCls}-customize-input`]: {
  89822. [`${componentCls}-selector`]: {
  89823. '&:after': {
  89824. display: 'none'
  89825. },
  89826. [`${componentCls}-selection-search`]: {
  89827. position: 'static',
  89828. width: '100%'
  89829. },
  89830. [`${componentCls}-selection-placeholder`]: {
  89831. position: 'absolute',
  89832. insetInlineStart: 0,
  89833. insetInlineEnd: 0,
  89834. padding: `0 ${(0,cssinjs.unit)(inputPaddingHorizontalBase)}`,
  89835. '&:after': {
  89836. display: 'none'
  89837. }
  89838. }
  89839. }
  89840. }
  89841. }
  89842. };
  89843. }
  89844. function single_genSingleStyle(token) {
  89845. const {
  89846. componentCls
  89847. } = token;
  89848. const inputPaddingHorizontalSM = token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal();
  89849. return [genSizeStyle(token),
  89850. // ======================== Small ========================
  89851. // Shared
  89852. genSizeStyle((0,es.mergeToken)(token, {
  89853. controlHeight: token.controlHeightSM,
  89854. borderRadius: token.borderRadiusSM
  89855. }), 'sm'),
  89856. // padding
  89857. {
  89858. [`${componentCls}-single${componentCls}-sm`]: {
  89859. [`&:not(${componentCls}-customize-input)`]: {
  89860. [`${componentCls}-selector`]: {
  89861. padding: `0 ${(0,cssinjs.unit)(inputPaddingHorizontalSM)}`
  89862. },
  89863. // With arrow should provides `padding-right` to show the arrow
  89864. [`&${componentCls}-show-arrow ${componentCls}-selection-search`]: {
  89865. insetInlineEnd: token.calc(inputPaddingHorizontalSM).add(token.calc(token.fontSize).mul(1.5)).equal()
  89866. },
  89867. [`
  89868. &${componentCls}-show-arrow ${componentCls}-selection-item,
  89869. &${componentCls}-show-arrow ${componentCls}-selection-placeholder
  89870. `]: {
  89871. paddingInlineEnd: token.calc(token.fontSize).mul(1.5).equal()
  89872. }
  89873. }
  89874. }
  89875. },
  89876. // ======================== Large ========================
  89877. // Shared
  89878. genSizeStyle((0,es.mergeToken)(token, {
  89879. controlHeight: token.singleItemHeightLG,
  89880. fontSize: token.fontSizeLG,
  89881. borderRadius: token.borderRadiusLG
  89882. }), 'lg')];
  89883. }
  89884. ;// ./components/select/style/token.ts
  89885. const prepareComponentToken = token => {
  89886. const {
  89887. fontSize,
  89888. lineHeight,
  89889. lineWidth,
  89890. controlHeight,
  89891. controlHeightSM,
  89892. controlHeightLG,
  89893. paddingXXS,
  89894. controlPaddingHorizontal,
  89895. zIndexPopupBase,
  89896. colorText,
  89897. fontWeightStrong,
  89898. controlItemBgActive,
  89899. controlItemBgHover,
  89900. colorBgContainer,
  89901. colorFillSecondary,
  89902. colorBgContainerDisabled,
  89903. colorTextDisabled,
  89904. colorPrimaryHover,
  89905. colorPrimary,
  89906. controlOutline
  89907. } = token;
  89908. // Item height default use `controlHeight - 2 * paddingXXS`,
  89909. // but some case `paddingXXS=0`.
  89910. // Let's fallback it.
  89911. const dblPaddingXXS = paddingXXS * 2;
  89912. const dblLineWidth = lineWidth * 2;
  89913. const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);
  89914. const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);
  89915. const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);
  89916. // FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding
  89917. const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);
  89918. return {
  89919. INTERNAL_FIXED_ITEM_MARGIN,
  89920. zIndexPopup: zIndexPopupBase + 50,
  89921. optionSelectedColor: colorText,
  89922. optionSelectedFontWeight: fontWeightStrong,
  89923. optionSelectedBg: controlItemBgActive,
  89924. optionActiveBg: controlItemBgHover,
  89925. optionPadding: `${(controlHeight - fontSize * lineHeight) / 2}px ${controlPaddingHorizontal}px`,
  89926. optionFontSize: fontSize,
  89927. optionLineHeight: lineHeight,
  89928. optionHeight: controlHeight,
  89929. selectorBg: colorBgContainer,
  89930. clearBg: colorBgContainer,
  89931. singleItemHeightLG: controlHeightLG,
  89932. multipleItemBg: colorFillSecondary,
  89933. multipleItemBorderColor: 'transparent',
  89934. multipleItemHeight,
  89935. multipleItemHeightSM,
  89936. multipleItemHeightLG,
  89937. multipleSelectorBgDisabled: colorBgContainerDisabled,
  89938. multipleItemColorDisabled: colorTextDisabled,
  89939. multipleItemBorderColorDisabled: 'transparent',
  89940. showArrowPaddingInlineEnd: Math.ceil(token.fontSize * 1.25),
  89941. hoverBorderColor: colorPrimaryHover,
  89942. activeBorderColor: colorPrimary,
  89943. activeOutlineColor: controlOutline,
  89944. selectAffixPadding: paddingXXS
  89945. };
  89946. };
  89947. ;// ./components/select/style/variants.ts
  89948. // =====================================================
  89949. // == Outlined ==
  89950. // =====================================================
  89951. const genBaseOutlinedStyle = (token, options) => {
  89952. const {
  89953. componentCls,
  89954. antCls,
  89955. controlOutlineWidth
  89956. } = token;
  89957. return {
  89958. [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
  89959. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${options.borderColor}`,
  89960. background: token.selectorBg
  89961. },
  89962. [`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
  89963. [`&:hover ${componentCls}-selector`]: {
  89964. borderColor: options.hoverBorderHover
  89965. },
  89966. [`${componentCls}-focused& ${componentCls}-selector`]: {
  89967. borderColor: options.activeBorderColor,
  89968. boxShadow: `0 0 0 ${(0,cssinjs.unit)(controlOutlineWidth)} ${options.activeOutlineColor}`,
  89969. outline: 0
  89970. },
  89971. [`${componentCls}-prefix`]: {
  89972. color: options.color
  89973. }
  89974. }
  89975. };
  89976. };
  89977. const genOutlinedStatusStyle = (token, options) => ({
  89978. [`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseOutlinedStyle(token, options))
  89979. });
  89980. const genOutlinedStyle = token => ({
  89981. '&-outlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {
  89982. borderColor: token.colorBorder,
  89983. hoverBorderHover: token.hoverBorderColor,
  89984. activeBorderColor: token.activeBorderColor,
  89985. activeOutlineColor: token.activeOutlineColor,
  89986. color: token.colorText
  89987. })), genOutlinedStatusStyle(token, {
  89988. status: 'error',
  89989. borderColor: token.colorError,
  89990. hoverBorderHover: token.colorErrorHover,
  89991. activeBorderColor: token.colorError,
  89992. activeOutlineColor: token.colorErrorOutline,
  89993. color: token.colorError
  89994. })), genOutlinedStatusStyle(token, {
  89995. status: 'warning',
  89996. borderColor: token.colorWarning,
  89997. hoverBorderHover: token.colorWarningHover,
  89998. activeBorderColor: token.colorWarning,
  89999. activeOutlineColor: token.colorWarningOutline,
  90000. color: token.colorWarning
  90001. })), {
  90002. [`&${token.componentCls}-disabled`]: {
  90003. [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
  90004. background: token.colorBgContainerDisabled,
  90005. color: token.colorTextDisabled
  90006. }
  90007. },
  90008. [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
  90009. background: token.multipleItemBg,
  90010. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
  90011. }
  90012. })
  90013. });
  90014. // =====================================================
  90015. // == Filled ==
  90016. // =====================================================
  90017. const genBaseFilledStyle = (token, options) => {
  90018. const {
  90019. componentCls,
  90020. antCls
  90021. } = token;
  90022. return {
  90023. [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
  90024. background: options.bg,
  90025. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
  90026. color: options.color
  90027. },
  90028. [`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
  90029. [`&:hover ${componentCls}-selector`]: {
  90030. background: options.hoverBg
  90031. },
  90032. [`${componentCls}-focused& ${componentCls}-selector`]: {
  90033. background: token.selectorBg,
  90034. borderColor: options.activeBorderColor,
  90035. outline: 0
  90036. }
  90037. }
  90038. };
  90039. };
  90040. const genFilledStatusStyle = (token, options) => ({
  90041. [`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseFilledStyle(token, options))
  90042. });
  90043. const genFilledStyle = token => ({
  90044. '&-filled': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {
  90045. bg: token.colorFillTertiary,
  90046. hoverBg: token.colorFillSecondary,
  90047. activeBorderColor: token.activeBorderColor,
  90048. color: token.colorText
  90049. })), genFilledStatusStyle(token, {
  90050. status: 'error',
  90051. bg: token.colorErrorBg,
  90052. hoverBg: token.colorErrorBgHover,
  90053. activeBorderColor: token.colorError,
  90054. color: token.colorError
  90055. })), genFilledStatusStyle(token, {
  90056. status: 'warning',
  90057. bg: token.colorWarningBg,
  90058. hoverBg: token.colorWarningBgHover,
  90059. activeBorderColor: token.colorWarning,
  90060. color: token.colorWarning
  90061. })), {
  90062. [`&${token.componentCls}-disabled`]: {
  90063. [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
  90064. borderColor: token.colorBorder,
  90065. background: token.colorBgContainerDisabled,
  90066. color: token.colorTextDisabled
  90067. }
  90068. },
  90069. [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
  90070. background: token.colorBgContainer,
  90071. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
  90072. }
  90073. })
  90074. });
  90075. // =====================================================
  90076. // == Borderless ==
  90077. // =====================================================
  90078. const genBorderlessStyle = token => ({
  90079. '&-borderless': {
  90080. [`${token.componentCls}-selector`]: {
  90081. background: 'transparent',
  90082. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`
  90083. },
  90084. [`&${token.componentCls}-disabled`]: {
  90085. [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
  90086. color: token.colorTextDisabled
  90087. }
  90088. },
  90089. [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
  90090. background: token.multipleItemBg,
  90091. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
  90092. },
  90093. // Status
  90094. [`&${token.componentCls}-status-error`]: {
  90095. [`${token.componentCls}-prefix, ${token.componentCls}-selection-item`]: {
  90096. color: token.colorError
  90097. }
  90098. },
  90099. [`&${token.componentCls}-status-warning`]: {
  90100. [`${token.componentCls}-prefix, ${token.componentCls}-selection-item`]: {
  90101. color: token.colorWarning
  90102. }
  90103. }
  90104. }
  90105. });
  90106. // =====================================================
  90107. // == Underlined ==
  90108. // =====================================================
  90109. const genBaseUnderlinedStyle = (token, options) => {
  90110. const {
  90111. componentCls,
  90112. antCls
  90113. } = token;
  90114. return {
  90115. [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {
  90116. borderWidth: `0 0 ${(0,cssinjs.unit)(token.lineWidth)} 0`,
  90117. borderStyle: `none none ${token.lineType} none`,
  90118. borderColor: options.borderColor,
  90119. background: token.selectorBg,
  90120. borderRadius: 0
  90121. },
  90122. [`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {
  90123. [`&:hover ${componentCls}-selector`]: {
  90124. borderColor: options.hoverBorderHover
  90125. },
  90126. [`${componentCls}-focused& ${componentCls}-selector`]: {
  90127. borderColor: options.activeBorderColor,
  90128. outline: 0
  90129. },
  90130. [`${componentCls}-prefix`]: {
  90131. color: options.color
  90132. }
  90133. }
  90134. };
  90135. };
  90136. const genUnderlinedStatusStyle = (token, options) => ({
  90137. [`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseUnderlinedStyle(token, options))
  90138. });
  90139. const genUnderlinedStyle = token => ({
  90140. '&-underlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseUnderlinedStyle(token, {
  90141. borderColor: token.colorBorder,
  90142. hoverBorderHover: token.hoverBorderColor,
  90143. activeBorderColor: token.activeBorderColor,
  90144. activeOutlineColor: token.activeOutlineColor,
  90145. color: token.colorText
  90146. })), genUnderlinedStatusStyle(token, {
  90147. status: 'error',
  90148. borderColor: token.colorError,
  90149. hoverBorderHover: token.colorErrorHover,
  90150. activeBorderColor: token.colorError,
  90151. activeOutlineColor: token.colorErrorOutline,
  90152. color: token.colorError
  90153. })), genUnderlinedStatusStyle(token, {
  90154. status: 'warning',
  90155. borderColor: token.colorWarning,
  90156. hoverBorderHover: token.colorWarningHover,
  90157. activeBorderColor: token.colorWarning,
  90158. activeOutlineColor: token.colorWarningOutline,
  90159. color: token.colorWarning
  90160. })), {
  90161. [`&${token.componentCls}-disabled`]: {
  90162. [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {
  90163. color: token.colorTextDisabled
  90164. }
  90165. },
  90166. [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {
  90167. background: token.multipleItemBg,
  90168. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`
  90169. }
  90170. })
  90171. });
  90172. const genVariantsStyle = token => ({
  90173. [token.componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedStyle(token)), genFilledStyle(token)), genBorderlessStyle(token)), genUnderlinedStyle(token))
  90174. });
  90175. /* harmony default export */ var variants = (genVariantsStyle);
  90176. ;// ./components/select/style/index.ts
  90177. // ============================= Selector =============================
  90178. const genSelectorStyle = token => {
  90179. const {
  90180. componentCls
  90181. } = token;
  90182. return {
  90183. position: 'relative',
  90184. transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
  90185. input: {
  90186. cursor: 'pointer'
  90187. },
  90188. [`${componentCls}-show-search&`]: {
  90189. cursor: 'text',
  90190. input: {
  90191. cursor: 'auto',
  90192. color: 'inherit',
  90193. height: '100%'
  90194. }
  90195. },
  90196. [`${componentCls}-disabled&`]: {
  90197. cursor: 'not-allowed',
  90198. input: {
  90199. cursor: 'not-allowed'
  90200. }
  90201. }
  90202. };
  90203. };
  90204. // ============================== Styles ==============================
  90205. // /* Reset search input style */
  90206. const getSearchInputWithoutBorderStyle = token => {
  90207. const {
  90208. componentCls
  90209. } = token;
  90210. return {
  90211. [`${componentCls}-selection-search-input`]: {
  90212. margin: 0,
  90213. padding: 0,
  90214. background: 'transparent',
  90215. border: 'none',
  90216. outline: 'none',
  90217. appearance: 'none',
  90218. fontFamily: 'inherit',
  90219. '&::-webkit-search-cancel-button': {
  90220. display: 'none',
  90221. appearance: 'none'
  90222. }
  90223. }
  90224. };
  90225. };
  90226. // =============================== Base ===============================
  90227. const genBaseStyle = token => {
  90228. const {
  90229. antCls,
  90230. componentCls,
  90231. inputPaddingHorizontalBase,
  90232. iconCls
  90233. } = token;
  90234. const hoverShowClearStyle = {
  90235. [`${componentCls}-clear`]: {
  90236. opacity: 1,
  90237. background: token.colorBgBase,
  90238. borderRadius: '50%'
  90239. }
  90240. };
  90241. return {
  90242. [componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  90243. position: 'relative',
  90244. display: 'inline-flex',
  90245. cursor: 'pointer',
  90246. [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: Object.assign(Object.assign({}, genSelectorStyle(token)), getSearchInputWithoutBorderStyle(token)),
  90247. // ======================== Selection ========================
  90248. [`${componentCls}-selection-item`]: Object.assign(Object.assign({
  90249. flex: 1,
  90250. fontWeight: 'normal',
  90251. position: 'relative',
  90252. userSelect: 'none'
  90253. }, style.textEllipsis), {
  90254. // https://github.com/ant-design/ant-design/issues/40421
  90255. [`> ${antCls}-typography`]: {
  90256. display: 'inline'
  90257. }
  90258. }),
  90259. // ======================= Placeholder =======================
  90260. [`${componentCls}-selection-placeholder`]: Object.assign(Object.assign({}, style.textEllipsis), {
  90261. flex: 1,
  90262. color: token.colorTextPlaceholder,
  90263. pointerEvents: 'none'
  90264. }),
  90265. // ========================== Arrow ==========================
  90266. [`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0,style.resetIcon)()), {
  90267. position: 'absolute',
  90268. top: '50%',
  90269. insetInlineStart: 'auto',
  90270. insetInlineEnd: inputPaddingHorizontalBase,
  90271. height: token.fontSizeIcon,
  90272. marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),
  90273. color: token.colorTextQuaternary,
  90274. fontSize: token.fontSizeIcon,
  90275. lineHeight: 1,
  90276. textAlign: 'center',
  90277. pointerEvents: 'none',
  90278. display: 'flex',
  90279. alignItems: 'center',
  90280. transition: `opacity ${token.motionDurationSlow} ease`,
  90281. [iconCls]: {
  90282. verticalAlign: 'top',
  90283. transition: `transform ${token.motionDurationSlow}`,
  90284. '> svg': {
  90285. verticalAlign: 'top'
  90286. },
  90287. [`&:not(${componentCls}-suffix)`]: {
  90288. pointerEvents: 'auto'
  90289. }
  90290. },
  90291. [`${componentCls}-disabled &`]: {
  90292. cursor: 'not-allowed'
  90293. },
  90294. '> *:not(:last-child)': {
  90295. marginInlineEnd: 8 // FIXME: magic
  90296. }
  90297. }),
  90298. // ========================== Wrap ===========================
  90299. [`${componentCls}-selection-wrap`]: {
  90300. display: 'flex',
  90301. width: '100%',
  90302. position: 'relative',
  90303. minWidth: 0,
  90304. // https://github.com/ant-design/ant-design/issues/51669
  90305. '&:after': {
  90306. content: '"\\a0"',
  90307. width: 0,
  90308. overflow: 'hidden'
  90309. }
  90310. },
  90311. // ========================= Prefix ==========================
  90312. [`${componentCls}-prefix`]: {
  90313. flex: 'none',
  90314. marginInlineEnd: token.selectAffixPadding
  90315. },
  90316. // ========================== Clear ==========================
  90317. [`${componentCls}-clear`]: {
  90318. position: 'absolute',
  90319. top: '50%',
  90320. insetInlineStart: 'auto',
  90321. insetInlineEnd: inputPaddingHorizontalBase,
  90322. zIndex: 1,
  90323. display: 'inline-block',
  90324. width: token.fontSizeIcon,
  90325. height: token.fontSizeIcon,
  90326. marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),
  90327. color: token.colorTextQuaternary,
  90328. fontSize: token.fontSizeIcon,
  90329. fontStyle: 'normal',
  90330. lineHeight: 1,
  90331. textAlign: 'center',
  90332. textTransform: 'none',
  90333. cursor: 'pointer',
  90334. opacity: 0,
  90335. transition: `color ${token.motionDurationMid} ease, opacity ${token.motionDurationSlow} ease`,
  90336. textRendering: 'auto',
  90337. // https://github.com/ant-design/ant-design/issues/54205
  90338. // Force GPU compositing on Safari to prevent flickering on opacity/transform transitions
  90339. transform: 'translateZ(0)',
  90340. '&:before': {
  90341. display: 'block'
  90342. },
  90343. '&:hover': {
  90344. color: token.colorIcon
  90345. }
  90346. },
  90347. '@media(hover:none)': hoverShowClearStyle,
  90348. '&:hover': hoverShowClearStyle
  90349. }),
  90350. // ========================= Feedback ==========================
  90351. [`${componentCls}-status`]: {
  90352. '&-error, &-warning, &-success, &-validating': {
  90353. [`&${componentCls}-has-feedback`]: {
  90354. [`${componentCls}-clear`]: {
  90355. insetInlineEnd: token.calc(inputPaddingHorizontalBase).add(token.fontSize).add(token.paddingXS).equal()
  90356. }
  90357. }
  90358. }
  90359. }
  90360. };
  90361. };
  90362. // ============================== Styles ==============================
  90363. const genSelectStyle = token => {
  90364. const {
  90365. componentCls
  90366. } = token;
  90367. return [{
  90368. [componentCls]: {
  90369. // ==================== In Form ====================
  90370. [`&${componentCls}-in-form-item`]: {
  90371. width: '100%'
  90372. }
  90373. }
  90374. },
  90375. // =====================================================
  90376. // == LTR ==
  90377. // =====================================================
  90378. // Base
  90379. genBaseStyle(token),
  90380. // Single
  90381. single_genSingleStyle(token),
  90382. // Multiple
  90383. (0,multiple["default"])(token),
  90384. // Dropdown
  90385. dropdown(token),
  90386. // =====================================================
  90387. // == RTL ==
  90388. // =====================================================
  90389. {
  90390. [`${componentCls}-rtl`]: {
  90391. direction: 'rtl'
  90392. }
  90393. },
  90394. // =====================================================
  90395. // == Space Compact ==
  90396. // =====================================================
  90397. (0,compact_item.genCompactItemStyle)(token, {
  90398. borderElCls: `${componentCls}-selector`,
  90399. focusElCls: `${componentCls}-focused`
  90400. })];
  90401. };
  90402. // ============================== Export ==============================
  90403. /* harmony default export */ var select_style = ((0,genStyleUtils.genStyleHooks)('Select', (token, {
  90404. rootPrefixCls
  90405. }) => {
  90406. const selectToken = (0,es.mergeToken)(token, {
  90407. rootPrefixCls,
  90408. inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),
  90409. multipleSelectItemHeight: token.multipleItemHeight,
  90410. selectHeight: token.controlHeight
  90411. });
  90412. return [genSelectStyle(selectToken), variants(selectToken)];
  90413. }, prepareComponentToken, {
  90414. unitless: {
  90415. optionLineHeight: true,
  90416. optionSelectedFontWeight: true
  90417. }
  90418. }));
  90419. /***/ }),
  90420. /***/ "./components/select/style/multiple.ts":
  90421. /*!*********************************************!*\
  90422. !*** ./components/select/style/multiple.ts ***!
  90423. \*********************************************/
  90424. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  90425. "use strict";
  90426. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  90427. /* harmony export */ genOverflowStyle: function() { return /* binding */ genOverflowStyle; },
  90428. /* harmony export */ getMultipleSelectorUnit: function() { return /* binding */ getMultipleSelectorUnit; }
  90429. /* harmony export */ });
  90430. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  90431. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  90432. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  90433. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  90434. /**
  90435. * Get multiple selector needed style. The calculation:
  90436. *
  90437. * ContainerPadding = BasePadding - ItemMargin
  90438. *
  90439. * Border: ╔═══════════════════════════╗ ┬
  90440. * ContainerPadding: ║ ║ │
  90441. * ╟───────────────────────────╢ ┬ │
  90442. * Item Margin: ║ ║ │ │
  90443. * ║ ┌──────────┐ ║ │ │
  90444. * Item(multipleItemHeight): ║ BasePadding │ Item │ ║ Overflow Container(ControlHeight)
  90445. * ║ └──────────┘ ║ │ │
  90446. * Item Margin: ║ ║ │ │
  90447. * ╟───────────────────────────╢ ┴ │
  90448. * ContainerPadding: ║ ║ │
  90449. * Border: ╚═══════════════════════════╝ ┴
  90450. */
  90451. const getMultipleSelectorUnit = token => {
  90452. const {
  90453. multipleSelectItemHeight,
  90454. paddingXXS,
  90455. lineWidth,
  90456. INTERNAL_FIXED_ITEM_MARGIN
  90457. } = token;
  90458. const basePadding = token.max(token.calc(paddingXXS).sub(lineWidth).equal(), 0);
  90459. const containerPadding = token.max(token.calc(basePadding).sub(INTERNAL_FIXED_ITEM_MARGIN).equal(), 0);
  90460. return {
  90461. basePadding,
  90462. containerPadding,
  90463. itemHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(multipleSelectItemHeight),
  90464. itemLineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(multipleSelectItemHeight).sub(token.calc(token.lineWidth).mul(2)).equal())
  90465. };
  90466. };
  90467. const getSelectItemStyle = token => {
  90468. const {
  90469. multipleSelectItemHeight,
  90470. selectHeight,
  90471. lineWidth
  90472. } = token;
  90473. const selectItemDist = token.calc(selectHeight).sub(multipleSelectItemHeight).div(2).sub(lineWidth).equal();
  90474. return selectItemDist;
  90475. };
  90476. /**
  90477. * Get the `rc-overflow` needed style.
  90478. * It's a share style which means not affected by `size`.
  90479. */
  90480. const genOverflowStyle = token => {
  90481. const {
  90482. componentCls,
  90483. iconCls,
  90484. borderRadiusSM,
  90485. motionDurationSlow,
  90486. paddingXS,
  90487. multipleItemColorDisabled,
  90488. multipleItemBorderColorDisabled,
  90489. colorIcon,
  90490. colorIconHover,
  90491. INTERNAL_FIXED_ITEM_MARGIN
  90492. } = token;
  90493. const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
  90494. return {
  90495. /**
  90496. * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
  90497. * may update to redesign with its align logic.
  90498. */
  90499. // =========================== Overflow ===========================
  90500. [selectOverflowPrefixCls]: {
  90501. position: 'relative',
  90502. display: 'flex',
  90503. flex: 'auto',
  90504. flexWrap: 'wrap',
  90505. maxWidth: '100%',
  90506. '&-item': {
  90507. flex: 'none',
  90508. alignSelf: 'center',
  90509. // https://github.com/ant-design/ant-design/issues/54179
  90510. maxWidth: 'calc(100% - 4px)',
  90511. display: 'inline-flex'
  90512. },
  90513. // ======================== Selections ==========================
  90514. [`${componentCls}-selection-item`]: {
  90515. display: 'flex',
  90516. alignSelf: 'center',
  90517. flex: 'none',
  90518. boxSizing: 'border-box',
  90519. maxWidth: '100%',
  90520. marginBlock: INTERNAL_FIXED_ITEM_MARGIN,
  90521. borderRadius: borderRadiusSM,
  90522. cursor: 'default',
  90523. transition: `font-size ${motionDurationSlow}, line-height ${motionDurationSlow}, height ${motionDurationSlow}`,
  90524. marginInlineEnd: token.calc(INTERNAL_FIXED_ITEM_MARGIN).mul(2).equal(),
  90525. paddingInlineStart: paddingXS,
  90526. paddingInlineEnd: token.calc(paddingXS).div(2).equal(),
  90527. [`${componentCls}-disabled&`]: {
  90528. color: multipleItemColorDisabled,
  90529. borderColor: multipleItemBorderColorDisabled,
  90530. cursor: 'not-allowed'
  90531. },
  90532. // It's ok not to do this, but 24px makes bottom narrow in view should adjust
  90533. '&-content': {
  90534. display: 'inline-block',
  90535. marginInlineEnd: token.calc(paddingXS).div(2).equal(),
  90536. overflow: 'hidden',
  90537. whiteSpace: 'pre',
  90538. // fix whitespace wrapping. custom tags display all whitespace within.
  90539. textOverflow: 'ellipsis'
  90540. },
  90541. '&-remove': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetIcon)()), {
  90542. display: 'inline-flex',
  90543. alignItems: 'center',
  90544. color: colorIcon,
  90545. fontWeight: 'bold',
  90546. fontSize: 10,
  90547. lineHeight: 'inherit',
  90548. cursor: 'pointer',
  90549. [`> ${iconCls}`]: {
  90550. verticalAlign: '-0.2em'
  90551. },
  90552. '&:hover': {
  90553. color: colorIconHover
  90554. }
  90555. })
  90556. }
  90557. }
  90558. };
  90559. };
  90560. const genSelectionStyle = (token, suffix) => {
  90561. const {
  90562. componentCls,
  90563. INTERNAL_FIXED_ITEM_MARGIN
  90564. } = token;
  90565. const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
  90566. const selectItemHeight = token.multipleSelectItemHeight;
  90567. const selectItemDist = getSelectItemStyle(token);
  90568. const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
  90569. const multipleSelectorUnit = getMultipleSelectorUnit(token);
  90570. return {
  90571. [`${componentCls}-multiple${suffixCls}`]: Object.assign(Object.assign({}, genOverflowStyle(token)), {
  90572. // ========================= Selector =========================
  90573. [`${componentCls}-selector`]: {
  90574. display: 'flex',
  90575. alignItems: 'center',
  90576. width: '100%',
  90577. height: '100%',
  90578. // Multiple is little different that horizontal is follow the vertical
  90579. paddingInline: multipleSelectorUnit.basePadding,
  90580. paddingBlock: multipleSelectorUnit.containerPadding,
  90581. borderRadius: token.borderRadius,
  90582. [`${componentCls}-disabled&`]: {
  90583. background: token.multipleSelectorBgDisabled,
  90584. cursor: 'not-allowed'
  90585. },
  90586. '&:after': {
  90587. display: 'inline-block',
  90588. width: 0,
  90589. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(INTERNAL_FIXED_ITEM_MARGIN)} 0`,
  90590. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(selectItemHeight),
  90591. visibility: 'hidden',
  90592. content: '"\\a0"'
  90593. }
  90594. },
  90595. // ======================== Selections ========================
  90596. [`${componentCls}-selection-item`]: {
  90597. height: multipleSelectorUnit.itemHeight,
  90598. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(multipleSelectorUnit.itemLineHeight)
  90599. },
  90600. // ========================== Wrap ===========================
  90601. [`${componentCls}-selection-wrap`]: {
  90602. alignSelf: 'flex-start',
  90603. '&:after': {
  90604. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(selectItemHeight),
  90605. marginBlock: INTERNAL_FIXED_ITEM_MARGIN
  90606. }
  90607. },
  90608. // ========================== Input ==========================
  90609. [`${componentCls}-prefix`]: {
  90610. marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(multipleSelectorUnit.basePadding).equal()
  90611. },
  90612. [`${selectOverflowPrefixCls}-item + ${selectOverflowPrefixCls}-item,
  90613. ${componentCls}-prefix + ${componentCls}-selection-wrap
  90614. `]: {
  90615. [`${componentCls}-selection-search`]: {
  90616. marginInlineStart: 0
  90617. },
  90618. [`${componentCls}-selection-placeholder`]: {
  90619. insetInlineStart: 0
  90620. }
  90621. },
  90622. // https://github.com/ant-design/ant-design/issues/44754
  90623. // Same as `wrap:after`
  90624. [`${selectOverflowPrefixCls}-item-suffix`]: {
  90625. minHeight: multipleSelectorUnit.itemHeight,
  90626. marginBlock: INTERNAL_FIXED_ITEM_MARGIN
  90627. },
  90628. [`${componentCls}-selection-search`]: {
  90629. display: 'inline-flex',
  90630. position: 'relative',
  90631. maxWidth: '100%',
  90632. marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(selectItemDist).equal(),
  90633. [`
  90634. &-input,
  90635. &-mirror
  90636. `]: {
  90637. height: selectItemHeight,
  90638. fontFamily: token.fontFamily,
  90639. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(selectItemHeight),
  90640. transition: `all ${token.motionDurationSlow}`
  90641. },
  90642. '&-input': {
  90643. width: '100%',
  90644. minWidth: 4.1 // fix search cursor missing
  90645. },
  90646. '&-mirror': {
  90647. position: 'absolute',
  90648. top: 0,
  90649. insetInlineStart: 0,
  90650. insetInlineEnd: 'auto',
  90651. zIndex: 999,
  90652. whiteSpace: 'pre',
  90653. // fix whitespace wrapping caused width calculation bug
  90654. visibility: 'hidden'
  90655. }
  90656. },
  90657. // ======================= Placeholder =======================
  90658. [`${componentCls}-selection-placeholder`]: {
  90659. position: 'absolute',
  90660. top: '50%',
  90661. insetInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(multipleSelectorUnit.basePadding).equal(),
  90662. insetInlineEnd: token.inputPaddingHorizontalBase,
  90663. transform: 'translateY(-50%)',
  90664. transition: `all ${token.motionDurationSlow}`
  90665. }
  90666. })
  90667. };
  90668. };
  90669. function genSizeStyle(token, suffix) {
  90670. const {
  90671. componentCls
  90672. } = token;
  90673. const suffixCls = suffix ? `${componentCls}-${suffix}` : '';
  90674. const rawStyle = {
  90675. [`${componentCls}-multiple${suffixCls}`]: {
  90676. fontSize: token.fontSize,
  90677. // ========================= Selector =========================
  90678. [`${componentCls}-selector`]: {
  90679. [`${componentCls}-show-search&`]: {
  90680. cursor: 'text'
  90681. }
  90682. },
  90683. [`
  90684. &${componentCls}-show-arrow ${componentCls}-selector,
  90685. &${componentCls}-allow-clear ${componentCls}-selector
  90686. `]: {
  90687. paddingInlineEnd: token.calc(token.fontSizeIcon).add(token.controlPaddingHorizontal).equal()
  90688. }
  90689. }
  90690. };
  90691. return [genSelectionStyle(token, suffix), rawStyle];
  90692. }
  90693. const genMultipleStyle = token => {
  90694. const {
  90695. componentCls
  90696. } = token;
  90697. const smallToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  90698. selectHeight: token.controlHeightSM,
  90699. multipleSelectItemHeight: token.multipleItemHeightSM,
  90700. borderRadius: token.borderRadiusSM,
  90701. borderRadiusSM: token.borderRadiusXS
  90702. });
  90703. const largeToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  90704. fontSize: token.fontSizeLG,
  90705. selectHeight: token.controlHeightLG,
  90706. multipleSelectItemHeight: token.multipleItemHeightLG,
  90707. borderRadius: token.borderRadiusLG,
  90708. borderRadiusSM: token.borderRadius
  90709. });
  90710. return [genSizeStyle(token),
  90711. // ======================== Small ========================
  90712. genSizeStyle(smallToken, 'sm'),
  90713. // Padding
  90714. {
  90715. [`${componentCls}-multiple${componentCls}-sm`]: {
  90716. [`${componentCls}-selection-placeholder`]: {
  90717. insetInline: token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal()
  90718. },
  90719. // https://github.com/ant-design/ant-design/issues/29559
  90720. [`${componentCls}-selection-search`]: {
  90721. marginInlineStart: 2 // Magic Number
  90722. }
  90723. }
  90724. },
  90725. // ======================== Large ========================
  90726. genSizeStyle(largeToken, 'lg')];
  90727. };
  90728. /* harmony default export */ __webpack_exports__["default"] = (genMultipleStyle);
  90729. /***/ }),
  90730. /***/ "./components/skeleton/style/index.ts":
  90731. /*!********************************************!*\
  90732. !*** ./components/skeleton/style/index.ts ***!
  90733. \********************************************/
  90734. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  90735. "use strict";
  90736. __webpack_require__.r(__webpack_exports__);
  90737. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  90738. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  90739. /* harmony export */ });
  90740. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  90741. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  90742. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  90743. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  90744. const skeletonClsLoading = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes(`ant-skeleton-loading`, {
  90745. '0%': {
  90746. backgroundPosition: '100% 50%'
  90747. },
  90748. '100%': {
  90749. backgroundPosition: '0 50%'
  90750. }
  90751. });
  90752. const genSkeletonElementCommonSize = size => ({
  90753. height: size,
  90754. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(size)
  90755. });
  90756. const genSkeletonElementAvatarSize = size => Object.assign({
  90757. width: size
  90758. }, genSkeletonElementCommonSize(size));
  90759. const genSkeletonColor = token => ({
  90760. background: token.skeletonLoadingBackground,
  90761. backgroundSize: '400% 100%',
  90762. animationName: skeletonClsLoading,
  90763. animationDuration: token.skeletonLoadingMotionDuration,
  90764. animationTimingFunction: 'ease',
  90765. animationIterationCount: 'infinite'
  90766. });
  90767. const genSkeletonElementInputSize = (size, calc) => Object.assign({
  90768. width: calc(size).mul(5).equal(),
  90769. minWidth: calc(size).mul(5).equal()
  90770. }, genSkeletonElementCommonSize(size));
  90771. const genSkeletonElementAvatar = token => {
  90772. const {
  90773. skeletonAvatarCls,
  90774. gradientFromColor,
  90775. controlHeight,
  90776. controlHeightLG,
  90777. controlHeightSM
  90778. } = token;
  90779. return {
  90780. [skeletonAvatarCls]: Object.assign({
  90781. display: 'inline-block',
  90782. verticalAlign: 'top',
  90783. background: gradientFromColor
  90784. }, genSkeletonElementAvatarSize(controlHeight)),
  90785. [`${skeletonAvatarCls}${skeletonAvatarCls}-circle`]: {
  90786. borderRadius: '50%'
  90787. },
  90788. [`${skeletonAvatarCls}${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),
  90789. [`${skeletonAvatarCls}${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))
  90790. };
  90791. };
  90792. const genSkeletonElementInput = token => {
  90793. const {
  90794. controlHeight,
  90795. borderRadiusSM,
  90796. skeletonInputCls,
  90797. controlHeightLG,
  90798. controlHeightSM,
  90799. gradientFromColor,
  90800. calc
  90801. } = token;
  90802. return {
  90803. [skeletonInputCls]: Object.assign({
  90804. display: 'inline-block',
  90805. verticalAlign: 'top',
  90806. background: gradientFromColor,
  90807. borderRadius: borderRadiusSM
  90808. }, genSkeletonElementInputSize(controlHeight, calc)),
  90809. [`${skeletonInputCls}-lg`]: Object.assign({}, genSkeletonElementInputSize(controlHeightLG, calc)),
  90810. [`${skeletonInputCls}-sm`]: Object.assign({}, genSkeletonElementInputSize(controlHeightSM, calc))
  90811. };
  90812. };
  90813. const genSkeletonElementImageSize = size => Object.assign({
  90814. width: size
  90815. }, genSkeletonElementCommonSize(size));
  90816. const genSkeletonElementImage = token => {
  90817. const {
  90818. skeletonImageCls,
  90819. imageSizeBase,
  90820. gradientFromColor,
  90821. borderRadiusSM,
  90822. calc
  90823. } = token;
  90824. return {
  90825. [skeletonImageCls]: Object.assign(Object.assign({
  90826. display: 'inline-flex',
  90827. alignItems: 'center',
  90828. justifyContent: 'center',
  90829. verticalAlign: 'middle',
  90830. background: gradientFromColor,
  90831. borderRadius: borderRadiusSM
  90832. }, genSkeletonElementImageSize(calc(imageSizeBase).mul(2).equal())), {
  90833. [`${skeletonImageCls}-path`]: {
  90834. fill: '#bfbfbf'
  90835. },
  90836. [`${skeletonImageCls}-svg`]: Object.assign(Object.assign({}, genSkeletonElementImageSize(imageSizeBase)), {
  90837. maxWidth: calc(imageSizeBase).mul(4).equal(),
  90838. maxHeight: calc(imageSizeBase).mul(4).equal()
  90839. }),
  90840. [`${skeletonImageCls}-svg${skeletonImageCls}-svg-circle`]: {
  90841. borderRadius: '50%'
  90842. }
  90843. }),
  90844. [`${skeletonImageCls}${skeletonImageCls}-circle`]: {
  90845. borderRadius: '50%'
  90846. }
  90847. };
  90848. };
  90849. const genSkeletonElementButtonShape = (token, size, buttonCls) => {
  90850. const {
  90851. skeletonButtonCls
  90852. } = token;
  90853. return {
  90854. [`${buttonCls}${skeletonButtonCls}-circle`]: {
  90855. width: size,
  90856. minWidth: size,
  90857. borderRadius: '50%'
  90858. },
  90859. [`${buttonCls}${skeletonButtonCls}-round`]: {
  90860. borderRadius: size
  90861. }
  90862. };
  90863. };
  90864. const genSkeletonElementButtonSize = (size, calc) => Object.assign({
  90865. width: calc(size).mul(2).equal(),
  90866. minWidth: calc(size).mul(2).equal()
  90867. }, genSkeletonElementCommonSize(size));
  90868. const genSkeletonElementButton = token => {
  90869. const {
  90870. borderRadiusSM,
  90871. skeletonButtonCls,
  90872. controlHeight,
  90873. controlHeightLG,
  90874. controlHeightSM,
  90875. gradientFromColor,
  90876. calc
  90877. } = token;
  90878. return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  90879. [skeletonButtonCls]: Object.assign({
  90880. display: 'inline-block',
  90881. verticalAlign: 'top',
  90882. background: gradientFromColor,
  90883. borderRadius: borderRadiusSM,
  90884. width: calc(controlHeight).mul(2).equal(),
  90885. minWidth: calc(controlHeight).mul(2).equal()
  90886. }, genSkeletonElementButtonSize(controlHeight, calc))
  90887. }, genSkeletonElementButtonShape(token, controlHeight, skeletonButtonCls)), {
  90888. [`${skeletonButtonCls}-lg`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightLG, calc))
  90889. }), genSkeletonElementButtonShape(token, controlHeightLG, `${skeletonButtonCls}-lg`)), {
  90890. [`${skeletonButtonCls}-sm`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightSM, calc))
  90891. }), genSkeletonElementButtonShape(token, controlHeightSM, `${skeletonButtonCls}-sm`));
  90892. };
  90893. // =============================== Base ===============================
  90894. const genBaseStyle = token => {
  90895. const {
  90896. componentCls,
  90897. skeletonAvatarCls,
  90898. skeletonTitleCls,
  90899. skeletonParagraphCls,
  90900. skeletonButtonCls,
  90901. skeletonInputCls,
  90902. skeletonImageCls,
  90903. controlHeight,
  90904. controlHeightLG,
  90905. controlHeightSM,
  90906. gradientFromColor,
  90907. padding,
  90908. marginSM,
  90909. borderRadius,
  90910. titleHeight,
  90911. blockRadius,
  90912. paragraphLiHeight,
  90913. controlHeightXS,
  90914. paragraphMarginTop
  90915. } = token;
  90916. return {
  90917. [componentCls]: {
  90918. display: 'table',
  90919. width: '100%',
  90920. [`${componentCls}-header`]: {
  90921. display: 'table-cell',
  90922. paddingInlineEnd: padding,
  90923. verticalAlign: 'top',
  90924. // Avatar
  90925. [skeletonAvatarCls]: Object.assign({
  90926. display: 'inline-block',
  90927. verticalAlign: 'top',
  90928. background: gradientFromColor
  90929. }, genSkeletonElementAvatarSize(controlHeight)),
  90930. [`${skeletonAvatarCls}-circle`]: {
  90931. borderRadius: '50%'
  90932. },
  90933. [`${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),
  90934. [`${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))
  90935. },
  90936. [`${componentCls}-content`]: {
  90937. display: 'table-cell',
  90938. width: '100%',
  90939. verticalAlign: 'top',
  90940. // Title
  90941. [skeletonTitleCls]: {
  90942. width: '100%',
  90943. height: titleHeight,
  90944. background: gradientFromColor,
  90945. borderRadius: blockRadius,
  90946. [`+ ${skeletonParagraphCls}`]: {
  90947. marginBlockStart: controlHeightSM
  90948. }
  90949. },
  90950. // paragraph
  90951. [skeletonParagraphCls]: {
  90952. padding: 0,
  90953. '> li': {
  90954. width: '100%',
  90955. height: paragraphLiHeight,
  90956. listStyle: 'none',
  90957. background: gradientFromColor,
  90958. borderRadius: blockRadius,
  90959. '+ li': {
  90960. marginBlockStart: controlHeightXS
  90961. }
  90962. }
  90963. },
  90964. [`${skeletonParagraphCls}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
  90965. width: '61%'
  90966. }
  90967. },
  90968. [`&-round ${componentCls}-content`]: {
  90969. [`${skeletonTitleCls}, ${skeletonParagraphCls} > li`]: {
  90970. borderRadius
  90971. }
  90972. }
  90973. },
  90974. [`${componentCls}-with-avatar ${componentCls}-content`]: {
  90975. // Title
  90976. [skeletonTitleCls]: {
  90977. marginBlockStart: marginSM,
  90978. [`+ ${skeletonParagraphCls}`]: {
  90979. marginBlockStart: paragraphMarginTop
  90980. }
  90981. }
  90982. },
  90983. // Skeleton element
  90984. [`${componentCls}${componentCls}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
  90985. display: 'inline-block',
  90986. width: 'auto'
  90987. }, genSkeletonElementButton(token)), genSkeletonElementAvatar(token)), genSkeletonElementInput(token)), genSkeletonElementImage(token)),
  90988. // Skeleton Block Button, Input
  90989. [`${componentCls}${componentCls}-block`]: {
  90990. width: '100%',
  90991. [skeletonButtonCls]: {
  90992. width: '100%'
  90993. },
  90994. [skeletonInputCls]: {
  90995. width: '100%'
  90996. }
  90997. },
  90998. // With active animation
  90999. [`${componentCls}${componentCls}-active`]: {
  91000. [`
  91001. ${skeletonTitleCls},
  91002. ${skeletonParagraphCls} > li,
  91003. ${skeletonAvatarCls},
  91004. ${skeletonButtonCls},
  91005. ${skeletonInputCls},
  91006. ${skeletonImageCls}
  91007. `]: Object.assign({}, genSkeletonColor(token))
  91008. }
  91009. };
  91010. };
  91011. // ============================== Export ==============================
  91012. const prepareComponentToken = token => {
  91013. const {
  91014. colorFillContent,
  91015. colorFill
  91016. } = token;
  91017. const gradientFromColor = colorFillContent;
  91018. const gradientToColor = colorFill;
  91019. return {
  91020. color: gradientFromColor,
  91021. colorGradientEnd: gradientToColor,
  91022. gradientFromColor,
  91023. gradientToColor,
  91024. titleHeight: token.controlHeight / 2,
  91025. blockRadius: token.borderRadiusSM,
  91026. paragraphMarginTop: token.marginLG + token.marginXXS,
  91027. paragraphLiHeight: token.controlHeight / 2
  91028. };
  91029. };
  91030. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Skeleton', token => {
  91031. const {
  91032. componentCls,
  91033. calc
  91034. } = token;
  91035. const skeletonToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.mergeToken)(token, {
  91036. skeletonAvatarCls: `${componentCls}-avatar`,
  91037. skeletonTitleCls: `${componentCls}-title`,
  91038. skeletonParagraphCls: `${componentCls}-paragraph`,
  91039. skeletonButtonCls: `${componentCls}-button`,
  91040. skeletonInputCls: `${componentCls}-input`,
  91041. skeletonImageCls: `${componentCls}-image`,
  91042. imageSizeBase: calc(token.controlHeight).mul(1.5).equal(),
  91043. borderRadius: 100,
  91044. // Large number to make capsule shape
  91045. skeletonLoadingBackground: `linear-gradient(90deg, ${token.gradientFromColor} 25%, ${token.gradientToColor} 37%, ${token.gradientFromColor} 63%)`,
  91046. skeletonLoadingMotionDuration: '1.4s'
  91047. });
  91048. return genBaseStyle(skeletonToken);
  91049. }, prepareComponentToken, {
  91050. deprecatedTokens: [['color', 'gradientFromColor'], ['colorGradientEnd', 'gradientToColor']]
  91051. }));
  91052. /***/ }),
  91053. /***/ "./components/slider/style/index.ts":
  91054. /*!******************************************!*\
  91055. !*** ./components/slider/style/index.ts ***!
  91056. \******************************************/
  91057. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  91058. "use strict";
  91059. __webpack_require__.r(__webpack_exports__);
  91060. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  91061. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  91062. /* harmony export */ });
  91063. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  91064. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  91065. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  91066. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  91067. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  91068. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  91069. // =============================== Base ===============================
  91070. const genBaseStyle = token => {
  91071. const {
  91072. componentCls,
  91073. antCls,
  91074. controlSize,
  91075. dotSize,
  91076. marginFull,
  91077. marginPart,
  91078. colorFillContentHover,
  91079. handleColorDisabled,
  91080. calc,
  91081. handleSize,
  91082. handleSizeHover,
  91083. handleActiveColor,
  91084. handleActiveOutlineColor,
  91085. handleLineWidth,
  91086. handleLineWidthHover,
  91087. motionDurationMid
  91088. } = token;
  91089. return {
  91090. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
  91091. position: 'relative',
  91092. height: controlSize,
  91093. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginPart)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginFull)}`,
  91094. padding: 0,
  91095. cursor: 'pointer',
  91096. touchAction: 'none',
  91097. '&-vertical': {
  91098. margin: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginFull)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginPart)}`
  91099. },
  91100. [`${componentCls}-rail`]: {
  91101. position: 'absolute',
  91102. backgroundColor: token.railBg,
  91103. borderRadius: token.borderRadiusXS,
  91104. transition: `background-color ${motionDurationMid}`
  91105. },
  91106. [`${componentCls}-track,${componentCls}-tracks`]: {
  91107. position: 'absolute',
  91108. transition: `background-color ${motionDurationMid}`
  91109. },
  91110. [`${componentCls}-track`]: {
  91111. backgroundColor: token.trackBg,
  91112. borderRadius: token.borderRadiusXS
  91113. },
  91114. [`${componentCls}-track-draggable`]: {
  91115. boxSizing: 'content-box',
  91116. backgroundClip: 'content-box',
  91117. border: 'solid rgba(0,0,0,0)'
  91118. },
  91119. '&:hover': {
  91120. [`${componentCls}-rail`]: {
  91121. backgroundColor: token.railHoverBg
  91122. },
  91123. [`${componentCls}-track`]: {
  91124. backgroundColor: token.trackHoverBg
  91125. },
  91126. [`${componentCls}-dot`]: {
  91127. borderColor: colorFillContentHover
  91128. },
  91129. [`${componentCls}-handle::after`]: {
  91130. boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(handleLineWidth)} ${token.colorPrimaryBorderHover}`
  91131. },
  91132. [`${componentCls}-dot-active`]: {
  91133. borderColor: token.dotActiveBorderColor
  91134. }
  91135. },
  91136. [`${componentCls}-handle`]: {
  91137. position: 'absolute',
  91138. width: handleSize,
  91139. height: handleSize,
  91140. outline: 'none',
  91141. userSelect: 'none',
  91142. // Dragging status
  91143. '&-dragging-delete': {
  91144. opacity: 0
  91145. },
  91146. // 扩大选区
  91147. '&::before': {
  91148. content: '""',
  91149. position: 'absolute',
  91150. insetInlineStart: calc(handleLineWidth).mul(-1).equal(),
  91151. insetBlockStart: calc(handleLineWidth).mul(-1).equal(),
  91152. width: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),
  91153. height: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),
  91154. backgroundColor: 'transparent'
  91155. },
  91156. '&::after': {
  91157. content: '""',
  91158. position: 'absolute',
  91159. insetBlockStart: 0,
  91160. insetInlineStart: 0,
  91161. width: handleSize,
  91162. height: handleSize,
  91163. backgroundColor: token.colorBgElevated,
  91164. boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(handleLineWidth)} ${token.handleColor}`,
  91165. outline: `0px solid transparent`,
  91166. borderRadius: '50%',
  91167. cursor: 'pointer',
  91168. transition: `
  91169. inset-inline-start ${motionDurationMid},
  91170. inset-block-start ${motionDurationMid},
  91171. width ${motionDurationMid},
  91172. height ${motionDurationMid},
  91173. box-shadow ${motionDurationMid},
  91174. outline ${motionDurationMid}
  91175. `
  91176. },
  91177. '&:hover, &:active, &:focus': {
  91178. '&::before': {
  91179. insetInlineStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),
  91180. insetBlockStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),
  91181. width: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal(),
  91182. height: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal()
  91183. },
  91184. '&::after': {
  91185. boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(handleLineWidthHover)} ${handleActiveColor}`,
  91186. outline: `6px solid ${handleActiveOutlineColor}`,
  91187. width: handleSizeHover,
  91188. height: handleSizeHover,
  91189. insetInlineStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal(),
  91190. insetBlockStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal()
  91191. }
  91192. }
  91193. },
  91194. [`&-lock ${componentCls}-handle`]: {
  91195. '&::before, &::after': {
  91196. transition: 'none'
  91197. }
  91198. },
  91199. [`${componentCls}-mark`]: {
  91200. position: 'absolute',
  91201. fontSize: token.fontSize
  91202. },
  91203. [`${componentCls}-mark-text`]: {
  91204. position: 'absolute',
  91205. display: 'inline-block',
  91206. color: token.colorTextDescription,
  91207. textAlign: 'center',
  91208. wordBreak: 'keep-all',
  91209. cursor: 'pointer',
  91210. userSelect: 'none',
  91211. '&-active': {
  91212. color: token.colorText
  91213. }
  91214. },
  91215. [`${componentCls}-step`]: {
  91216. position: 'absolute',
  91217. background: 'transparent',
  91218. pointerEvents: 'none'
  91219. },
  91220. [`${componentCls}-dot`]: {
  91221. position: 'absolute',
  91222. width: dotSize,
  91223. height: dotSize,
  91224. backgroundColor: token.colorBgElevated,
  91225. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(handleLineWidth)} solid ${token.dotBorderColor}`,
  91226. borderRadius: '50%',
  91227. cursor: 'pointer',
  91228. transition: `border-color ${token.motionDurationSlow}`,
  91229. pointerEvents: 'auto',
  91230. '&-active': {
  91231. borderColor: token.dotActiveBorderColor
  91232. }
  91233. },
  91234. [`&${componentCls}-disabled`]: {
  91235. cursor: 'not-allowed',
  91236. [`${componentCls}-rail`]: {
  91237. backgroundColor: `${token.railBg} !important`
  91238. },
  91239. [`${componentCls}-track`]: {
  91240. backgroundColor: `${token.trackBgDisabled} !important`
  91241. },
  91242. [`
  91243. ${componentCls}-dot
  91244. `]: {
  91245. backgroundColor: token.colorBgElevated,
  91246. borderColor: token.trackBgDisabled,
  91247. boxShadow: 'none',
  91248. cursor: 'not-allowed'
  91249. },
  91250. [`${componentCls}-handle::after`]: {
  91251. backgroundColor: token.colorBgElevated,
  91252. cursor: 'not-allowed',
  91253. width: handleSize,
  91254. height: handleSize,
  91255. boxShadow: `0 0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(handleLineWidth)} ${handleColorDisabled}`,
  91256. insetInlineStart: 0,
  91257. insetBlockStart: 0
  91258. },
  91259. [`
  91260. ${componentCls}-mark-text,
  91261. ${componentCls}-dot
  91262. `]: {
  91263. cursor: `not-allowed !important`
  91264. }
  91265. },
  91266. [`&-tooltip ${antCls}-tooltip-inner`]: {
  91267. minWidth: 'unset'
  91268. }
  91269. })
  91270. };
  91271. };
  91272. // ============================ Horizontal ============================
  91273. const genDirectionStyle = (token, horizontal) => {
  91274. const {
  91275. componentCls,
  91276. railSize,
  91277. handleSize,
  91278. dotSize,
  91279. marginFull,
  91280. calc
  91281. } = token;
  91282. const railPadding = horizontal ? 'paddingBlock' : 'paddingInline';
  91283. const full = horizontal ? 'width' : 'height';
  91284. const part = horizontal ? 'height' : 'width';
  91285. const handlePos = horizontal ? 'insetBlockStart' : 'insetInlineStart';
  91286. const markInset = horizontal ? 'top' : 'insetInlineStart';
  91287. const handlePosSize = calc(railSize).mul(3).sub(handleSize).div(2).equal();
  91288. const draggableBorderSize = calc(handleSize).sub(railSize).div(2).equal();
  91289. const draggableBorder = horizontal ? {
  91290. borderWidth: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(draggableBorderSize)} 0`,
  91291. transform: `translateY(${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(draggableBorderSize).mul(-1).equal())})`
  91292. } : {
  91293. borderWidth: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(draggableBorderSize)}`,
  91294. transform: `translateX(${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(draggableBorderSize).mul(-1).equal())})`
  91295. };
  91296. return {
  91297. [railPadding]: railSize,
  91298. [part]: calc(railSize).mul(3).equal(),
  91299. [`${componentCls}-rail`]: {
  91300. [full]: '100%',
  91301. [part]: railSize
  91302. },
  91303. [`${componentCls}-track,${componentCls}-tracks`]: {
  91304. [part]: railSize
  91305. },
  91306. [`${componentCls}-track-draggable`]: Object.assign({}, draggableBorder),
  91307. [`${componentCls}-handle`]: {
  91308. [handlePos]: handlePosSize
  91309. },
  91310. [`${componentCls}-mark`]: {
  91311. // Reset all
  91312. insetInlineStart: 0,
  91313. top: 0,
  91314. // https://github.com/ant-design/ant-design/issues/43731
  91315. [markInset]: calc(railSize).mul(3).add(horizontal ? 0 : marginFull).equal(),
  91316. [full]: '100%'
  91317. },
  91318. [`${componentCls}-step`]: {
  91319. // Reset all
  91320. insetInlineStart: 0,
  91321. top: 0,
  91322. [markInset]: railSize,
  91323. [full]: '100%',
  91324. [part]: railSize
  91325. },
  91326. [`${componentCls}-dot`]: {
  91327. position: 'absolute',
  91328. [handlePos]: calc(railSize).sub(dotSize).div(2).equal()
  91329. }
  91330. };
  91331. };
  91332. // ============================ Horizontal ============================
  91333. const genHorizontalStyle = token => {
  91334. const {
  91335. componentCls,
  91336. marginPartWithMark
  91337. } = token;
  91338. return {
  91339. [`${componentCls}-horizontal`]: Object.assign(Object.assign({}, genDirectionStyle(token, true)), {
  91340. [`&${componentCls}-with-marks`]: {
  91341. marginBottom: marginPartWithMark
  91342. }
  91343. })
  91344. };
  91345. };
  91346. // ============================= Vertical =============================
  91347. const genVerticalStyle = token => {
  91348. const {
  91349. componentCls
  91350. } = token;
  91351. return {
  91352. [`${componentCls}-vertical`]: Object.assign(Object.assign({}, genDirectionStyle(token, false)), {
  91353. height: '100%'
  91354. })
  91355. };
  91356. };
  91357. // ============================== Export ==============================
  91358. const prepareComponentToken = token => {
  91359. // Handle line width is always width-er 1px
  91360. const increaseHandleWidth = 1;
  91361. const controlSize = token.controlHeightLG / 4;
  91362. const controlSizeHover = token.controlHeightSM / 2;
  91363. const handleLineWidth = token.lineWidth + increaseHandleWidth;
  91364. const handleLineWidthHover = token.lineWidth + increaseHandleWidth * 1.5;
  91365. const handleActiveColor = token.colorPrimary;
  91366. const handleActiveOutlineColor = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(handleActiveColor).setA(0.2).toRgbString();
  91367. return {
  91368. controlSize,
  91369. railSize: 4,
  91370. handleSize: controlSize,
  91371. handleSizeHover: controlSizeHover,
  91372. dotSize: 8,
  91373. handleLineWidth,
  91374. handleLineWidthHover,
  91375. railBg: token.colorFillTertiary,
  91376. railHoverBg: token.colorFillSecondary,
  91377. trackBg: token.colorPrimaryBorder,
  91378. trackHoverBg: token.colorPrimaryBorderHover,
  91379. handleColor: token.colorPrimaryBorder,
  91380. handleActiveColor,
  91381. handleActiveOutlineColor,
  91382. handleColorDisabled: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorTextDisabled).onBackground(token.colorBgContainer).toHexString(),
  91383. dotBorderColor: token.colorBorderSecondary,
  91384. dotActiveBorderColor: token.colorPrimaryBorder,
  91385. trackBgDisabled: token.colorBgContainerDisabled
  91386. };
  91387. };
  91388. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Slider', token => {
  91389. const sliderToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  91390. marginPart: token.calc(token.controlHeight).sub(token.controlSize).div(2).equal(),
  91391. marginFull: token.calc(token.controlSize).div(2).equal(),
  91392. marginPartWithMark: token.calc(token.controlHeightLG).sub(token.controlSize).equal()
  91393. });
  91394. return [genBaseStyle(sliderToken), genHorizontalStyle(sliderToken), genVerticalStyle(sliderToken)];
  91395. }, prepareComponentToken));
  91396. /***/ }),
  91397. /***/ "./components/space/style/index.ts":
  91398. /*!*****************************************************!*\
  91399. !*** ./components/space/style/index.ts + 1 modules ***!
  91400. \*****************************************************/
  91401. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  91402. "use strict";
  91403. // ESM COMPAT FLAG
  91404. __webpack_require__.r(__webpack_exports__);
  91405. // EXPORTS
  91406. __webpack_require__.d(__webpack_exports__, {
  91407. "default": function() { return /* binding */ style; },
  91408. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  91409. });
  91410. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  91411. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  91412. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  91413. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  91414. ;// ./components/space/style/compact.ts
  91415. const genSpaceCompactStyle = token => {
  91416. const {
  91417. componentCls
  91418. } = token;
  91419. return {
  91420. [componentCls]: {
  91421. '&-block': {
  91422. display: 'flex',
  91423. width: '100%'
  91424. },
  91425. '&-vertical': {
  91426. flexDirection: 'column'
  91427. }
  91428. }
  91429. };
  91430. };
  91431. // ============================== Export ==============================
  91432. /* harmony default export */ var compact = (genSpaceCompactStyle);
  91433. ;// ./components/space/style/index.ts
  91434. const genSpaceStyle = token => {
  91435. const {
  91436. componentCls,
  91437. antCls
  91438. } = token;
  91439. return {
  91440. [componentCls]: {
  91441. display: 'inline-flex',
  91442. '&-rtl': {
  91443. direction: 'rtl'
  91444. },
  91445. '&-vertical': {
  91446. flexDirection: 'column'
  91447. },
  91448. '&-align': {
  91449. flexDirection: 'column',
  91450. '&-center': {
  91451. alignItems: 'center'
  91452. },
  91453. '&-start': {
  91454. alignItems: 'flex-start'
  91455. },
  91456. '&-end': {
  91457. alignItems: 'flex-end'
  91458. },
  91459. '&-baseline': {
  91460. alignItems: 'baseline'
  91461. }
  91462. },
  91463. [`${componentCls}-item:empty`]: {
  91464. display: 'none'
  91465. },
  91466. // https://github.com/ant-design/ant-design/issues/47875
  91467. [`${componentCls}-item > ${antCls}-badge-not-a-wrapper:only-child`]: {
  91468. display: 'block'
  91469. }
  91470. }
  91471. };
  91472. };
  91473. const genSpaceGapStyle = token => {
  91474. const {
  91475. componentCls
  91476. } = token;
  91477. return {
  91478. [componentCls]: {
  91479. '&-gap-row-small': {
  91480. rowGap: token.spaceGapSmallSize
  91481. },
  91482. '&-gap-row-middle': {
  91483. rowGap: token.spaceGapMiddleSize
  91484. },
  91485. '&-gap-row-large': {
  91486. rowGap: token.spaceGapLargeSize
  91487. },
  91488. '&-gap-col-small': {
  91489. columnGap: token.spaceGapSmallSize
  91490. },
  91491. '&-gap-col-middle': {
  91492. columnGap: token.spaceGapMiddleSize
  91493. },
  91494. '&-gap-col-large': {
  91495. columnGap: token.spaceGapLargeSize
  91496. }
  91497. }
  91498. };
  91499. };
  91500. // ============================== Export ==============================
  91501. const prepareComponentToken = () => ({});
  91502. /* harmony default export */ var style = ((0,genStyleUtils.genStyleHooks)('Space', token => {
  91503. const spaceToken = (0,es.mergeToken)(token, {
  91504. spaceGapSmallSize: token.paddingXS,
  91505. spaceGapMiddleSize: token.padding,
  91506. spaceGapLargeSize: token.paddingLG
  91507. });
  91508. return [genSpaceStyle(spaceToken), genSpaceGapStyle(spaceToken), compact(spaceToken)];
  91509. }, () => ({}), {
  91510. // Space component don't apply extra font style
  91511. // https://github.com/ant-design/ant-design/issues/40315
  91512. resetStyle: false
  91513. }));
  91514. /***/ }),
  91515. /***/ "./components/spin/style/index.ts":
  91516. /*!****************************************!*\
  91517. !*** ./components/spin/style/index.ts ***!
  91518. \****************************************/
  91519. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  91520. "use strict";
  91521. __webpack_require__.r(__webpack_exports__);
  91522. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  91523. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  91524. /* harmony export */ });
  91525. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  91526. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  91527. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  91528. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  91529. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  91530. const antSpinMove = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSpinMove', {
  91531. to: {
  91532. opacity: 1
  91533. }
  91534. });
  91535. const antRotate = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antRotate', {
  91536. to: {
  91537. transform: 'rotate(405deg)'
  91538. }
  91539. });
  91540. const genSpinStyle = token => {
  91541. const {
  91542. componentCls,
  91543. calc
  91544. } = token;
  91545. return {
  91546. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  91547. position: 'absolute',
  91548. display: 'none',
  91549. color: token.colorPrimary,
  91550. fontSize: 0,
  91551. textAlign: 'center',
  91552. verticalAlign: 'middle',
  91553. opacity: 0,
  91554. transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`,
  91555. '&-spinning': {
  91556. position: 'relative',
  91557. display: 'inline-block',
  91558. opacity: 1
  91559. },
  91560. [`${componentCls}-text`]: {
  91561. fontSize: token.fontSize,
  91562. paddingTop: calc(calc(token.dotSize).sub(token.fontSize)).div(2).add(2).equal()
  91563. },
  91564. '&-fullscreen': {
  91565. position: 'fixed',
  91566. width: '100vw',
  91567. height: '100vh',
  91568. backgroundColor: token.colorBgMask,
  91569. zIndex: token.zIndexPopupBase,
  91570. inset: 0,
  91571. display: 'flex',
  91572. alignItems: 'center',
  91573. flexDirection: 'column',
  91574. justifyContent: 'center',
  91575. opacity: 0,
  91576. visibility: 'hidden',
  91577. transition: `all ${token.motionDurationMid}`,
  91578. '&-show': {
  91579. opacity: 1,
  91580. visibility: 'visible'
  91581. },
  91582. [componentCls]: {
  91583. [`${componentCls}-dot-holder`]: {
  91584. color: token.colorWhite
  91585. },
  91586. [`${componentCls}-text`]: {
  91587. color: token.colorTextLightSolid
  91588. }
  91589. }
  91590. },
  91591. '&-nested-loading': {
  91592. position: 'relative',
  91593. [`> div > ${componentCls}`]: {
  91594. position: 'absolute',
  91595. top: 0,
  91596. insetInlineStart: 0,
  91597. zIndex: 4,
  91598. display: 'block',
  91599. width: '100%',
  91600. height: '100%',
  91601. maxHeight: token.contentHeight,
  91602. [`${componentCls}-dot`]: {
  91603. position: 'absolute',
  91604. top: '50%',
  91605. insetInlineStart: '50%',
  91606. margin: calc(token.dotSize).mul(-1).div(2).equal()
  91607. },
  91608. [`${componentCls}-text`]: {
  91609. position: 'absolute',
  91610. top: '50%',
  91611. width: '100%',
  91612. textShadow: `0 1px 2px ${token.colorBgContainer}` // FIXME: shadow
  91613. },
  91614. [`&${componentCls}-show-text ${componentCls}-dot`]: {
  91615. marginTop: calc(token.dotSize).div(2).mul(-1).sub(10).equal()
  91616. },
  91617. '&-sm': {
  91618. [`${componentCls}-dot`]: {
  91619. margin: calc(token.dotSizeSM).mul(-1).div(2).equal()
  91620. },
  91621. [`${componentCls}-text`]: {
  91622. paddingTop: calc(calc(token.dotSizeSM).sub(token.fontSize)).div(2).add(2).equal()
  91623. },
  91624. [`&${componentCls}-show-text ${componentCls}-dot`]: {
  91625. marginTop: calc(token.dotSizeSM).div(2).mul(-1).sub(10).equal()
  91626. }
  91627. },
  91628. '&-lg': {
  91629. [`${componentCls}-dot`]: {
  91630. margin: calc(token.dotSizeLG).mul(-1).div(2).equal()
  91631. },
  91632. [`${componentCls}-text`]: {
  91633. paddingTop: calc(calc(token.dotSizeLG).sub(token.fontSize)).div(2).add(2).equal()
  91634. },
  91635. [`&${componentCls}-show-text ${componentCls}-dot`]: {
  91636. marginTop: calc(token.dotSizeLG).div(2).mul(-1).sub(10).equal()
  91637. }
  91638. }
  91639. },
  91640. [`${componentCls}-container`]: {
  91641. position: 'relative',
  91642. transition: `opacity ${token.motionDurationSlow}`,
  91643. '&::after': {
  91644. position: 'absolute',
  91645. top: 0,
  91646. insetInlineEnd: 0,
  91647. bottom: 0,
  91648. insetInlineStart: 0,
  91649. zIndex: 10,
  91650. width: '100%',
  91651. height: '100%',
  91652. background: token.colorBgContainer,
  91653. opacity: 0,
  91654. transition: `all ${token.motionDurationSlow}`,
  91655. content: '""',
  91656. pointerEvents: 'none'
  91657. }
  91658. },
  91659. [`${componentCls}-blur`]: {
  91660. clear: 'both',
  91661. opacity: 0.5,
  91662. userSelect: 'none',
  91663. pointerEvents: 'none',
  91664. '&::after': {
  91665. opacity: 0.4,
  91666. pointerEvents: 'auto'
  91667. }
  91668. }
  91669. },
  91670. // tip
  91671. // ------------------------------
  91672. '&-tip': {
  91673. color: token.spinDotDefault
  91674. },
  91675. // holder
  91676. // ------------------------------
  91677. [`${componentCls}-dot-holder`]: {
  91678. width: '1em',
  91679. height: '1em',
  91680. fontSize: token.dotSize,
  91681. display: 'inline-block',
  91682. transition: `transform ${token.motionDurationSlow} ease, opacity ${token.motionDurationSlow} ease`,
  91683. transformOrigin: '50% 50%',
  91684. lineHeight: 1,
  91685. color: token.colorPrimary,
  91686. '&-hidden': {
  91687. transform: 'scale(0.3)',
  91688. opacity: 0
  91689. }
  91690. },
  91691. // progress
  91692. // ------------------------------
  91693. [`${componentCls}-dot-progress`]: {
  91694. position: 'absolute',
  91695. inset: 0
  91696. },
  91697. // dots
  91698. // ------------------------------
  91699. [`${componentCls}-dot`]: {
  91700. position: 'relative',
  91701. display: 'inline-block',
  91702. fontSize: token.dotSize,
  91703. width: '1em',
  91704. height: '1em',
  91705. '&-item': {
  91706. position: 'absolute',
  91707. display: 'block',
  91708. width: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),
  91709. height: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),
  91710. background: 'currentColor',
  91711. borderRadius: '100%',
  91712. transform: 'scale(0.75)',
  91713. transformOrigin: '50% 50%',
  91714. opacity: 0.3,
  91715. animationName: antSpinMove,
  91716. animationDuration: '1s',
  91717. animationIterationCount: 'infinite',
  91718. animationTimingFunction: 'linear',
  91719. animationDirection: 'alternate',
  91720. '&:nth-child(1)': {
  91721. top: 0,
  91722. insetInlineStart: 0,
  91723. animationDelay: '0s'
  91724. },
  91725. '&:nth-child(2)': {
  91726. top: 0,
  91727. insetInlineEnd: 0,
  91728. animationDelay: '0.4s'
  91729. },
  91730. '&:nth-child(3)': {
  91731. insetInlineEnd: 0,
  91732. bottom: 0,
  91733. animationDelay: '0.8s'
  91734. },
  91735. '&:nth-child(4)': {
  91736. bottom: 0,
  91737. insetInlineStart: 0,
  91738. animationDelay: '1.2s'
  91739. }
  91740. },
  91741. '&-spin': {
  91742. transform: 'rotate(45deg)',
  91743. animationName: antRotate,
  91744. animationDuration: '1.2s',
  91745. animationIterationCount: 'infinite',
  91746. animationTimingFunction: 'linear'
  91747. },
  91748. '&-circle': {
  91749. strokeLinecap: 'round',
  91750. transition: ['stroke-dashoffset', 'stroke-dasharray', 'stroke', 'stroke-width', 'opacity'].map(item => `${item} ${token.motionDurationSlow} ease`).join(','),
  91751. fillOpacity: 0,
  91752. stroke: 'currentcolor'
  91753. },
  91754. '&-circle-bg': {
  91755. stroke: token.colorFillSecondary
  91756. }
  91757. },
  91758. // small
  91759. [`&-sm ${componentCls}-dot`]: {
  91760. '&, &-holder': {
  91761. fontSize: token.dotSizeSM
  91762. }
  91763. },
  91764. [`&-sm ${componentCls}-dot-holder`]: {
  91765. i: {
  91766. width: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal(),
  91767. height: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal()
  91768. }
  91769. },
  91770. // large
  91771. [`&-lg ${componentCls}-dot`]: {
  91772. '&, &-holder': {
  91773. fontSize: token.dotSizeLG
  91774. }
  91775. },
  91776. [`&-lg ${componentCls}-dot-holder`]: {
  91777. i: {
  91778. width: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal(),
  91779. height: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal()
  91780. }
  91781. },
  91782. [`&${componentCls}-show-text ${componentCls}-text`]: {
  91783. display: 'block'
  91784. }
  91785. })
  91786. };
  91787. };
  91788. const prepareComponentToken = token => {
  91789. const {
  91790. controlHeightLG,
  91791. controlHeight
  91792. } = token;
  91793. return {
  91794. contentHeight: 400,
  91795. dotSize: controlHeightLG / 2,
  91796. dotSizeSM: controlHeightLG * 0.35,
  91797. dotSizeLG: controlHeight
  91798. };
  91799. };
  91800. // ============================== Export ==============================
  91801. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Spin', token => {
  91802. const spinToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  91803. spinDotDefault: token.colorTextDescription
  91804. });
  91805. return genSpinStyle(spinToken);
  91806. }, prepareComponentToken));
  91807. /***/ }),
  91808. /***/ "./components/splitter/style/index.ts":
  91809. /*!********************************************!*\
  91810. !*** ./components/splitter/style/index.ts ***!
  91811. \********************************************/
  91812. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  91813. "use strict";
  91814. __webpack_require__.r(__webpack_exports__);
  91815. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  91816. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  91817. /* harmony export */ });
  91818. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  91819. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  91820. const genRtlStyle = token => {
  91821. const {
  91822. componentCls
  91823. } = token;
  91824. return {
  91825. [`&-rtl${componentCls}-horizontal`]: {
  91826. [`> ${componentCls}-bar`]: {
  91827. [`${componentCls}-bar-collapse-previous`]: {
  91828. insetInlineEnd: 0,
  91829. insetInlineStart: 'unset'
  91830. },
  91831. [`${componentCls}-bar-collapse-next`]: {
  91832. insetInlineEnd: 'unset',
  91833. insetInlineStart: 0
  91834. }
  91835. }
  91836. },
  91837. [`&-rtl${componentCls}-vertical`]: {
  91838. [`> ${componentCls}-bar`]: {
  91839. [`${componentCls}-bar-collapse-previous`]: {
  91840. insetInlineEnd: '50%',
  91841. insetInlineStart: 'unset'
  91842. },
  91843. [`${componentCls}-bar-collapse-next`]: {
  91844. insetInlineEnd: '50%',
  91845. insetInlineStart: 'unset'
  91846. }
  91847. }
  91848. }
  91849. };
  91850. };
  91851. const centerStyle = {
  91852. position: 'absolute',
  91853. top: '50%',
  91854. left: {
  91855. _skip_check_: true,
  91856. value: '50%'
  91857. },
  91858. transform: 'translate(-50%, -50%)'
  91859. };
  91860. const genSplitterStyle = token => {
  91861. const {
  91862. componentCls,
  91863. colorFill,
  91864. splitBarDraggableSize,
  91865. splitBarSize,
  91866. splitTriggerSize,
  91867. controlItemBgHover,
  91868. controlItemBgActive,
  91869. controlItemBgActiveHover,
  91870. prefixCls
  91871. } = token;
  91872. const splitBarCls = `${componentCls}-bar`;
  91873. const splitMaskCls = `${componentCls}-mask`;
  91874. const splitPanelCls = `${componentCls}-panel`;
  91875. const halfTriggerSize = token.calc(splitTriggerSize).div(2).equal();
  91876. const splitterBarPreviewOffsetVar = `${prefixCls}-bar-preview-offset`;
  91877. const splitterBarPreviewStyle = {
  91878. position: 'absolute',
  91879. background: token.colorPrimary,
  91880. opacity: 0.2,
  91881. pointerEvents: 'none',
  91882. transition: 'none',
  91883. zIndex: 1,
  91884. display: 'none'
  91885. };
  91886. return {
  91887. [componentCls]: Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
  91888. display: 'flex',
  91889. width: '100%',
  91890. height: '100%',
  91891. alignItems: 'stretch',
  91892. // ======================== SplitBar ========================
  91893. // Use `>` to avoid conflict with mix layout
  91894. [`> ${splitBarCls}`]: {
  91895. flex: 'none',
  91896. position: 'relative',
  91897. userSelect: 'none',
  91898. // ======================= Dragger =======================
  91899. [`${splitBarCls}-dragger`]: Object.assign(Object.assign({}, centerStyle), {
  91900. zIndex: 1,
  91901. // Hover background
  91902. '&::before': Object.assign({
  91903. content: '""',
  91904. background: controlItemBgHover
  91905. }, centerStyle),
  91906. // Spinner
  91907. '&::after': Object.assign({
  91908. content: '""',
  91909. background: colorFill
  91910. }, centerStyle),
  91911. // Hover
  91912. [`&:hover:not(${splitBarCls}-dragger-active)`]: {
  91913. '&::before': {
  91914. background: controlItemBgActive
  91915. }
  91916. },
  91917. // Active
  91918. '&-active': {
  91919. zIndex: 2,
  91920. '&::before': {
  91921. background: controlItemBgActiveHover
  91922. }
  91923. },
  91924. // Disabled, not use `pointer-events: none` since still need trigger collapse
  91925. [`&-disabled${splitBarCls}-dragger`]: {
  91926. zIndex: 0,
  91927. '&, &:hover, &-active': {
  91928. cursor: 'default',
  91929. '&::before': {
  91930. background: controlItemBgHover
  91931. }
  91932. },
  91933. '&::after': {
  91934. display: 'none'
  91935. }
  91936. }
  91937. }),
  91938. // ======================= Collapse =======================
  91939. [`${splitBarCls}-collapse-bar`]: Object.assign(Object.assign({}, centerStyle), {
  91940. zIndex: token.zIndexPopupBase,
  91941. background: controlItemBgHover,
  91942. fontSize: token.fontSizeSM,
  91943. borderRadius: token.borderRadiusXS,
  91944. color: token.colorText,
  91945. cursor: 'pointer',
  91946. opacity: 0,
  91947. display: 'flex',
  91948. alignItems: 'center',
  91949. justifyContent: 'center',
  91950. // Hover
  91951. '&:hover': {
  91952. background: controlItemBgActive
  91953. },
  91954. // Active
  91955. '&:active': {
  91956. background: controlItemBgActiveHover
  91957. }
  91958. }),
  91959. '&:hover, &:active': {
  91960. [`${splitBarCls}-collapse-bar-hover-only`]: {
  91961. opacity: 1
  91962. }
  91963. },
  91964. [`${splitBarCls}-collapse-bar-hover-only`]: {
  91965. '@media(hover:none)': {
  91966. opacity: 1
  91967. }
  91968. },
  91969. [`${splitBarCls}-collapse-bar-always-hidden`]: {
  91970. display: 'none'
  91971. },
  91972. [`${splitBarCls}-collapse-bar-always-visible`]: {
  91973. opacity: 1
  91974. }
  91975. },
  91976. // =========================== Mask =========================
  91977. // Util dom for handle cursor
  91978. [splitMaskCls]: {
  91979. position: 'fixed',
  91980. zIndex: token.zIndexPopupBase,
  91981. inset: 0,
  91982. '&-horizontal': {
  91983. cursor: 'col-resize'
  91984. },
  91985. '&-vertical': {
  91986. cursor: 'row-resize'
  91987. }
  91988. },
  91989. // ==========================================================
  91990. // == Layout ==
  91991. // ==========================================================
  91992. '&-horizontal': {
  91993. flexDirection: 'row',
  91994. [`> ${splitBarCls}`]: {
  91995. width: 0,
  91996. // ======================= Preview =======================
  91997. [`${splitBarCls}-preview`]: Object.assign(Object.assign({
  91998. height: '100%',
  91999. width: splitBarSize
  92000. }, splitterBarPreviewStyle), {
  92001. [`&${splitBarCls}-preview-active`]: {
  92002. display: 'block',
  92003. transform: `translateX(var(--${splitterBarPreviewOffsetVar}))`
  92004. }
  92005. }),
  92006. // ======================= Dragger =======================
  92007. [`${splitBarCls}-dragger`]: {
  92008. cursor: 'col-resize',
  92009. height: '100%',
  92010. width: splitTriggerSize,
  92011. '&::before': {
  92012. height: '100%',
  92013. width: splitBarSize
  92014. },
  92015. '&::after': {
  92016. height: splitBarDraggableSize,
  92017. width: splitBarSize
  92018. }
  92019. },
  92020. // ======================= Collapse =======================
  92021. [`${splitBarCls}-collapse-bar`]: {
  92022. width: token.fontSizeSM,
  92023. height: token.controlHeightSM,
  92024. '&-start': {
  92025. left: {
  92026. _skip_check_: true,
  92027. value: 'auto'
  92028. },
  92029. right: {
  92030. _skip_check_: true,
  92031. value: halfTriggerSize
  92032. },
  92033. transform: 'translateY(-50%)'
  92034. },
  92035. '&-end': {
  92036. left: {
  92037. _skip_check_: true,
  92038. value: halfTriggerSize
  92039. },
  92040. right: {
  92041. _skip_check_: true,
  92042. value: 'auto'
  92043. },
  92044. transform: 'translateY(-50%)'
  92045. }
  92046. }
  92047. }
  92048. },
  92049. '&-vertical': {
  92050. flexDirection: 'column',
  92051. [`> ${splitBarCls}`]: {
  92052. height: 0,
  92053. // ======================= Preview =======================
  92054. [`${splitBarCls}-preview`]: Object.assign(Object.assign({
  92055. height: splitBarSize,
  92056. width: '100%'
  92057. }, splitterBarPreviewStyle), {
  92058. [`&${splitBarCls}-preview-active`]: {
  92059. display: 'block',
  92060. transform: `translateY(var(--${splitterBarPreviewOffsetVar}))`
  92061. }
  92062. }),
  92063. // ======================= Dragger =======================
  92064. [`${splitBarCls}-dragger`]: {
  92065. cursor: 'row-resize',
  92066. width: '100%',
  92067. height: splitTriggerSize,
  92068. '&::before': {
  92069. width: '100%',
  92070. height: splitBarSize
  92071. },
  92072. '&::after': {
  92073. width: splitBarDraggableSize,
  92074. height: splitBarSize
  92075. }
  92076. },
  92077. // ======================= Collapse =======================
  92078. [`${splitBarCls}-collapse-bar`]: {
  92079. height: token.fontSizeSM,
  92080. width: token.controlHeightSM,
  92081. '&-start': {
  92082. top: 'auto',
  92083. bottom: halfTriggerSize,
  92084. transform: 'translateX(-50%)'
  92085. },
  92086. '&-end': {
  92087. top: halfTriggerSize,
  92088. bottom: 'auto',
  92089. transform: 'translateX(-50%)'
  92090. }
  92091. }
  92092. }
  92093. },
  92094. // ========================= Panels =========================
  92095. [splitPanelCls]: {
  92096. overflow: 'auto',
  92097. padding: '0 1px',
  92098. scrollbarWidth: 'thin',
  92099. boxSizing: 'border-box',
  92100. '&-hidden': {
  92101. padding: 0,
  92102. overflow: 'hidden'
  92103. },
  92104. [`&:has(${componentCls}:only-child)`]: {
  92105. overflow: 'hidden'
  92106. }
  92107. }
  92108. }), genRtlStyle(token))
  92109. };
  92110. };
  92111. const prepareComponentToken = token => {
  92112. var _a;
  92113. const splitBarSize = token.splitBarSize || 2;
  92114. const splitTriggerSize = token.splitTriggerSize || 6;
  92115. // https://github.com/ant-design/ant-design/pull/51223
  92116. const resizeSpinnerSize = token.resizeSpinnerSize || 20;
  92117. const splitBarDraggableSize = (_a = token.splitBarDraggableSize) !== null && _a !== void 0 ? _a : resizeSpinnerSize;
  92118. return {
  92119. splitBarSize,
  92120. splitTriggerSize,
  92121. splitBarDraggableSize,
  92122. resizeSpinnerSize
  92123. };
  92124. };
  92125. // ============================== Export ==============================
  92126. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.genStyleHooks)('Splitter', genSplitterStyle, prepareComponentToken));
  92127. /***/ }),
  92128. /***/ "./components/statistic/style/index.ts":
  92129. /*!*********************************************!*\
  92130. !*** ./components/statistic/style/index.ts ***!
  92131. \*********************************************/
  92132. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  92133. "use strict";
  92134. __webpack_require__.r(__webpack_exports__);
  92135. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  92136. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  92137. /* harmony export */ });
  92138. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  92139. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  92140. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  92141. const genStatisticStyle = token => {
  92142. const {
  92143. componentCls,
  92144. marginXXS,
  92145. padding,
  92146. colorTextDescription,
  92147. titleFontSize,
  92148. colorTextHeading,
  92149. contentFontSize,
  92150. fontFamily
  92151. } = token;
  92152. return {
  92153. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__.resetComponent)(token)), {
  92154. [`${componentCls}-title`]: {
  92155. marginBottom: marginXXS,
  92156. color: colorTextDescription,
  92157. fontSize: titleFontSize
  92158. },
  92159. [`${componentCls}-skeleton`]: {
  92160. paddingTop: padding
  92161. },
  92162. [`${componentCls}-content`]: {
  92163. color: colorTextHeading,
  92164. fontSize: contentFontSize,
  92165. fontFamily,
  92166. [`${componentCls}-content-value`]: {
  92167. display: 'inline-block',
  92168. direction: 'ltr'
  92169. },
  92170. [`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {
  92171. display: 'inline-block'
  92172. },
  92173. [`${componentCls}-content-prefix`]: {
  92174. marginInlineEnd: marginXXS
  92175. },
  92176. [`${componentCls}-content-suffix`]: {
  92177. marginInlineStart: marginXXS
  92178. }
  92179. }
  92180. })
  92181. };
  92182. };
  92183. // ============================== Export ==============================
  92184. const prepareComponentToken = token => {
  92185. const {
  92186. fontSizeHeading3,
  92187. fontSize
  92188. } = token;
  92189. return {
  92190. titleFontSize: fontSize,
  92191. contentFontSize: fontSizeHeading3
  92192. };
  92193. };
  92194. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.genStyleHooks)('Statistic', token => {
  92195. const statisticToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__.mergeToken)(token, {});
  92196. return genStatisticStyle(statisticToken);
  92197. }, prepareComponentToken));
  92198. /***/ }),
  92199. /***/ "./components/steps/style/index.ts":
  92200. /*!******************************************************!*\
  92201. !*** ./components/steps/style/index.ts + 10 modules ***!
  92202. \******************************************************/
  92203. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  92204. "use strict";
  92205. // ESM COMPAT FLAG
  92206. __webpack_require__.r(__webpack_exports__);
  92207. // EXPORTS
  92208. __webpack_require__.d(__webpack_exports__, {
  92209. "default": function() { return /* binding */ steps_style; },
  92210. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  92211. });
  92212. // EXTERNAL MODULE: ./alias/cssinjs.js
  92213. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  92214. // EXTERNAL MODULE: ./components/style/index.tsx
  92215. var style = __webpack_require__("./components/style/index.tsx");
  92216. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  92217. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  92218. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  92219. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  92220. ;// ./components/steps/style/custom-icon.ts
  92221. const genStepsCustomIconStyle = token => {
  92222. const {
  92223. componentCls,
  92224. customIconTop,
  92225. customIconSize,
  92226. customIconFontSize
  92227. } = token;
  92228. return {
  92229. [`${componentCls}-item-custom`]: {
  92230. [`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
  92231. height: 'auto',
  92232. background: 'none',
  92233. border: 0,
  92234. [`> ${componentCls}-icon`]: {
  92235. top: customIconTop,
  92236. width: customIconSize,
  92237. height: customIconSize,
  92238. fontSize: customIconFontSize,
  92239. lineHeight: (0,cssinjs.unit)(customIconSize)
  92240. }
  92241. }
  92242. },
  92243. // Only adjust horizontal customize icon width
  92244. [`&:not(${componentCls}-vertical)`]: {
  92245. [`${componentCls}-item-custom`]: {
  92246. [`${componentCls}-item-icon`]: {
  92247. width: 'auto',
  92248. background: 'none'
  92249. }
  92250. }
  92251. }
  92252. };
  92253. };
  92254. /* harmony default export */ var custom_icon = (genStepsCustomIconStyle);
  92255. ;// ./components/steps/style/horizontal.ts
  92256. const genHorizontalStyle = token => {
  92257. const {
  92258. componentCls
  92259. } = token;
  92260. const stepsItemCls = `${componentCls}-item`; // .ant-steps-item
  92261. return {
  92262. [`${componentCls}-horizontal`]: {
  92263. [`${stepsItemCls}-tail`]: {
  92264. transform: 'translateY(-50%)'
  92265. }
  92266. }
  92267. };
  92268. };
  92269. /* harmony default export */ var horizontal = (genHorizontalStyle);
  92270. ;// ./components/steps/style/inline.ts
  92271. const genStepsInlineStyle = token => {
  92272. const {
  92273. componentCls,
  92274. inlineDotSize,
  92275. inlineTitleColor,
  92276. inlineTailColor
  92277. } = token;
  92278. const containerPaddingTop = token.calc(token.paddingXS).add(token.lineWidth).equal();
  92279. const titleStyle = {
  92280. [`${componentCls}-item-container ${componentCls}-item-content ${componentCls}-item-title`]: {
  92281. color: inlineTitleColor
  92282. }
  92283. };
  92284. return {
  92285. [`&${componentCls}-inline`]: {
  92286. width: 'auto',
  92287. display: 'inline-flex',
  92288. [`${componentCls}-item`]: {
  92289. flex: 'none',
  92290. '&-container': {
  92291. padding: `${(0,cssinjs.unit)(containerPaddingTop)} ${(0,cssinjs.unit)(token.paddingXXS)} 0`,
  92292. margin: `0 ${(0,cssinjs.unit)(token.calc(token.marginXXS).div(2).equal())}`,
  92293. borderRadius: token.borderRadiusSM,
  92294. cursor: 'pointer',
  92295. transition: `background-color ${token.motionDurationMid}`,
  92296. '&:hover': {
  92297. background: token.controlItemBgHover
  92298. },
  92299. "&[role='button']:hover": {
  92300. opacity: 1
  92301. }
  92302. },
  92303. '&-icon': {
  92304. width: inlineDotSize,
  92305. height: inlineDotSize,
  92306. marginInlineStart: `calc(50% - ${(0,cssinjs.unit)(token.calc(inlineDotSize).div(2).equal())})`,
  92307. [`> ${componentCls}-icon`]: {
  92308. top: 0
  92309. },
  92310. [`${componentCls}-icon-dot`]: {
  92311. borderRadius: token.calc(token.fontSizeSM).div(4).equal(),
  92312. '&::after': {
  92313. display: 'none'
  92314. }
  92315. }
  92316. },
  92317. '&-content': {
  92318. width: 'auto',
  92319. marginTop: token.calc(token.marginXS).sub(token.lineWidth).equal()
  92320. },
  92321. '&-title': {
  92322. color: inlineTitleColor,
  92323. fontSize: token.fontSizeSM,
  92324. lineHeight: token.lineHeightSM,
  92325. fontWeight: 'normal',
  92326. marginBottom: token.calc(token.marginXXS).div(2).equal()
  92327. },
  92328. '&-description': {
  92329. display: 'none'
  92330. },
  92331. '&-tail': {
  92332. marginInlineStart: 0,
  92333. top: token.calc(inlineDotSize).div(2).add(containerPaddingTop).equal(),
  92334. transform: `translateY(-50%)`,
  92335. '&:after': {
  92336. width: '100%',
  92337. height: token.lineWidth,
  92338. borderRadius: 0,
  92339. marginInlineStart: 0,
  92340. background: inlineTailColor
  92341. }
  92342. },
  92343. [`&:first-child ${componentCls}-item-tail`]: {
  92344. width: '50%',
  92345. marginInlineStart: '50%'
  92346. },
  92347. [`&:last-child ${componentCls}-item-tail`]: {
  92348. display: 'block',
  92349. width: '50%'
  92350. },
  92351. '&-wait': Object.assign({
  92352. [`${componentCls}-item-icon ${componentCls}-icon ${componentCls}-icon-dot`]: {
  92353. backgroundColor: token.colorBorderBg,
  92354. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${inlineTailColor}`
  92355. }
  92356. }, titleStyle),
  92357. '&-finish': Object.assign({
  92358. [`${componentCls}-item-tail::after`]: {
  92359. backgroundColor: inlineTailColor
  92360. },
  92361. [`${componentCls}-item-icon ${componentCls}-icon ${componentCls}-icon-dot`]: {
  92362. backgroundColor: inlineTailColor,
  92363. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${inlineTailColor}`
  92364. }
  92365. }, titleStyle),
  92366. '&-error': titleStyle,
  92367. '&-active, &-process': Object.assign({
  92368. [`${componentCls}-item-icon`]: {
  92369. width: inlineDotSize,
  92370. height: inlineDotSize,
  92371. marginInlineStart: `calc(50% - ${(0,cssinjs.unit)(token.calc(inlineDotSize).div(2).equal())})`,
  92372. top: 0
  92373. }
  92374. }, titleStyle),
  92375. [`&:not(${componentCls}-item-active) > ${componentCls}-item-container[role='button']:hover`]: {
  92376. [`${componentCls}-item-title`]: {
  92377. color: inlineTitleColor
  92378. }
  92379. }
  92380. }
  92381. }
  92382. };
  92383. };
  92384. /* harmony default export */ var inline = (genStepsInlineStyle);
  92385. ;// ./components/steps/style/label-placement.ts
  92386. const genStepsLabelPlacementStyle = token => {
  92387. const {
  92388. componentCls,
  92389. iconSize,
  92390. lineHeight,
  92391. iconSizeSM
  92392. } = token;
  92393. return {
  92394. [`&${componentCls}-label-vertical`]: {
  92395. [`${componentCls}-item`]: {
  92396. overflow: 'visible',
  92397. '&-tail': {
  92398. marginInlineStart: token.calc(iconSize).div(2).add(token.controlHeightLG).equal(),
  92399. padding: `0 ${(0,cssinjs.unit)(token.paddingLG)}`
  92400. },
  92401. '&-content': {
  92402. display: 'block',
  92403. width: token.calc(iconSize).div(2).add(token.controlHeightLG).mul(2).equal(),
  92404. marginTop: token.marginSM,
  92405. textAlign: 'center'
  92406. },
  92407. '&-icon': {
  92408. display: 'inline-block',
  92409. marginInlineStart: token.controlHeightLG
  92410. },
  92411. '&-title': {
  92412. paddingInlineEnd: 0,
  92413. paddingInlineStart: 0,
  92414. '&::after': {
  92415. display: 'none'
  92416. }
  92417. },
  92418. '&-subtitle': {
  92419. display: 'block',
  92420. marginBottom: token.marginXXS,
  92421. marginInlineStart: 0,
  92422. lineHeight
  92423. }
  92424. },
  92425. [`&${componentCls}-small:not(${componentCls}-dot)`]: {
  92426. [`${componentCls}-item`]: {
  92427. '&-icon': {
  92428. marginInlineStart: token.calc(iconSize).sub(iconSizeSM).div(2).add(token.controlHeightLG).equal()
  92429. }
  92430. }
  92431. }
  92432. }
  92433. };
  92434. };
  92435. /* harmony default export */ var label_placement = (genStepsLabelPlacementStyle);
  92436. ;// ./components/steps/style/nav.ts
  92437. const genStepsNavStyle = token => {
  92438. const {
  92439. componentCls,
  92440. navContentMaxWidth,
  92441. navArrowColor,
  92442. stepsNavActiveColor,
  92443. motionDurationSlow
  92444. } = token;
  92445. return {
  92446. [`&${componentCls}-navigation`]: {
  92447. paddingTop: token.paddingSM,
  92448. [`&${componentCls}-small`]: {
  92449. [`${componentCls}-item`]: {
  92450. '&-container': {
  92451. marginInlineStart: token.calc(token.marginSM).mul(-1).equal()
  92452. }
  92453. }
  92454. },
  92455. [`${componentCls}-item`]: {
  92456. overflow: 'visible',
  92457. textAlign: 'center',
  92458. '&-container': {
  92459. display: 'inline-block',
  92460. height: '100%',
  92461. marginInlineStart: token.calc(token.margin).mul(-1).equal(),
  92462. paddingBottom: token.paddingSM,
  92463. textAlign: 'start',
  92464. transition: `opacity ${motionDurationSlow}`,
  92465. [`${componentCls}-item-content`]: {
  92466. maxWidth: navContentMaxWidth
  92467. },
  92468. [`${componentCls}-item-title`]: Object.assign(Object.assign({
  92469. maxWidth: '100%',
  92470. paddingInlineEnd: 0
  92471. }, style.textEllipsis), {
  92472. '&::after': {
  92473. display: 'none'
  92474. }
  92475. })
  92476. },
  92477. [`&:not(${componentCls}-item-active)`]: {
  92478. [`${componentCls}-item-container[role='button']`]: {
  92479. cursor: 'pointer',
  92480. '&:hover': {
  92481. opacity: 0.85
  92482. }
  92483. }
  92484. },
  92485. '&:last-child': {
  92486. flex: 1,
  92487. '&::after': {
  92488. display: 'none'
  92489. }
  92490. },
  92491. '&::after': {
  92492. position: 'absolute',
  92493. top: `calc(50% - ${(0,cssinjs.unit)(token.calc(token.paddingSM).div(2).equal())})`,
  92494. insetInlineStart: '100%',
  92495. display: 'inline-block',
  92496. width: token.fontSizeIcon,
  92497. height: token.fontSizeIcon,
  92498. borderTop: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${navArrowColor}`,
  92499. borderBottom: 'none',
  92500. borderInlineStart: 'none',
  92501. borderInlineEnd: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${navArrowColor}`,
  92502. transform: 'translateY(-50%) translateX(-50%) rotate(45deg)',
  92503. content: '""'
  92504. },
  92505. '&::before': {
  92506. position: 'absolute',
  92507. bottom: 0,
  92508. insetInlineStart: '50%',
  92509. display: 'inline-block',
  92510. width: 0,
  92511. height: token.lineWidthBold,
  92512. backgroundColor: stepsNavActiveColor,
  92513. transition: `width ${motionDurationSlow}, inset-inline-start ${motionDurationSlow}`,
  92514. transitionTimingFunction: 'ease-out',
  92515. content: '""'
  92516. }
  92517. },
  92518. [`${componentCls}-item${componentCls}-item-active::before`]: {
  92519. insetInlineStart: 0,
  92520. width: '100%'
  92521. }
  92522. },
  92523. [`&${componentCls}-navigation${componentCls}-vertical`]: {
  92524. [`> ${componentCls}-item`]: {
  92525. marginInlineEnd: 0,
  92526. '&::before': {
  92527. display: 'none'
  92528. },
  92529. [`&${componentCls}-item-active::before`]: {
  92530. top: 0,
  92531. insetInlineEnd: 0,
  92532. insetInlineStart: 'unset',
  92533. display: 'block',
  92534. width: token.calc(token.lineWidth).mul(3).equal(),
  92535. height: `calc(100% - ${(0,cssinjs.unit)(token.marginLG)})`
  92536. },
  92537. '&::after': {
  92538. position: 'relative',
  92539. insetInlineStart: '50%',
  92540. display: 'block',
  92541. width: token.calc(token.controlHeight).mul(0.25).equal(),
  92542. height: token.calc(token.controlHeight).mul(0.25).equal(),
  92543. marginBottom: token.marginXS,
  92544. textAlign: 'center',
  92545. transform: 'translateY(-50%) translateX(-50%) rotate(135deg)'
  92546. },
  92547. '&:last-child': {
  92548. '&::after': {
  92549. display: 'none'
  92550. }
  92551. },
  92552. [`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92553. visibility: 'hidden'
  92554. }
  92555. }
  92556. },
  92557. [`&${componentCls}-navigation${componentCls}-horizontal`]: {
  92558. [`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92559. visibility: 'hidden'
  92560. }
  92561. }
  92562. };
  92563. };
  92564. /* harmony default export */ var nav = (genStepsNavStyle);
  92565. ;// ./components/steps/style/progress.ts
  92566. const genStepsProgressStyle = token => {
  92567. const {
  92568. antCls,
  92569. componentCls,
  92570. iconSize,
  92571. iconSizeSM,
  92572. processIconColor,
  92573. marginXXS,
  92574. lineWidthBold,
  92575. lineWidth,
  92576. paddingXXS
  92577. } = token;
  92578. const progressSize = token.calc(iconSize).add(token.calc(lineWidthBold).mul(4).equal()).equal();
  92579. const progressSizeSM = token.calc(iconSizeSM).add(token.calc(token.lineWidth).mul(4).equal()).equal();
  92580. return {
  92581. [`&${componentCls}-with-progress`]: {
  92582. [`${componentCls}-item`]: {
  92583. paddingTop: paddingXXS,
  92584. [`&-process ${componentCls}-item-container ${componentCls}-item-icon ${componentCls}-icon`]: {
  92585. color: processIconColor
  92586. }
  92587. },
  92588. [`&${componentCls}-vertical > ${componentCls}-item `]: {
  92589. paddingInlineStart: paddingXXS,
  92590. [`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92591. top: marginXXS,
  92592. insetInlineStart: token.calc(iconSize).div(2).sub(lineWidth).add(paddingXXS).equal()
  92593. }
  92594. },
  92595. [`&, &${componentCls}-small`]: {
  92596. [`&${componentCls}-horizontal ${componentCls}-item:first-child`]: {
  92597. paddingBottom: paddingXXS,
  92598. paddingInlineStart: paddingXXS
  92599. }
  92600. },
  92601. [`&${componentCls}-small${componentCls}-vertical > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92602. insetInlineStart: token.calc(iconSizeSM).div(2).sub(lineWidth).add(paddingXXS).equal()
  92603. },
  92604. [`&${componentCls}-label-vertical ${componentCls}-item ${componentCls}-item-tail`]: {
  92605. top: token.calc(iconSize).div(2).add(paddingXXS).equal()
  92606. },
  92607. [`${componentCls}-item-icon`]: {
  92608. position: 'relative',
  92609. [`${antCls}-progress`]: {
  92610. position: 'absolute',
  92611. insetInlineStart: '50%',
  92612. top: '50%',
  92613. transform: 'translate(-50%, -50%)',
  92614. '&-inner': {
  92615. width: `${(0,cssinjs.unit)(progressSize)} !important`,
  92616. height: `${(0,cssinjs.unit)(progressSize)} !important`
  92617. }
  92618. }
  92619. },
  92620. // ============================== Small size ==============================
  92621. [`&${componentCls}-small`]: {
  92622. [`&${componentCls}-label-vertical ${componentCls}-item ${componentCls}-item-tail`]: {
  92623. top: token.calc(iconSizeSM).div(2).add(paddingXXS).equal()
  92624. },
  92625. [`${componentCls}-item-icon ${antCls}-progress-inner`]: {
  92626. width: `${(0,cssinjs.unit)(progressSizeSM)} !important`,
  92627. height: `${(0,cssinjs.unit)(progressSizeSM)} !important`
  92628. }
  92629. }
  92630. }
  92631. };
  92632. };
  92633. /* harmony default export */ var progress = (genStepsProgressStyle);
  92634. ;// ./components/steps/style/progress-dot.ts
  92635. const genStepsProgressDotStyle = token => {
  92636. const {
  92637. componentCls,
  92638. descriptionMaxWidth,
  92639. lineHeight,
  92640. dotCurrentSize,
  92641. dotSize,
  92642. motionDurationSlow
  92643. } = token;
  92644. return {
  92645. [`&${componentCls}-dot, &${componentCls}-dot${componentCls}-small`]: {
  92646. [`${componentCls}-item`]: {
  92647. '&-title': {
  92648. lineHeight
  92649. },
  92650. '&-tail': {
  92651. // Math.floor((token.size - token.lineWidth * 3) / 2)
  92652. top: token.calc(token.dotSize).sub(token.calc(token.lineWidth).mul(3).equal()).div(2).equal(),
  92653. width: '100%',
  92654. marginTop: 0,
  92655. marginBottom: 0,
  92656. marginInline: `${(0,cssinjs.unit)(token.calc(descriptionMaxWidth).div(2).equal())} 0`,
  92657. padding: 0,
  92658. '&::after': {
  92659. width: `calc(100% - ${(0,cssinjs.unit)(token.calc(token.marginSM).mul(2).equal())})`,
  92660. height: token.calc(token.lineWidth).mul(3).equal(),
  92661. marginInlineStart: token.marginSM
  92662. }
  92663. },
  92664. '&-icon': {
  92665. width: dotSize,
  92666. height: dotSize,
  92667. marginInlineStart: token.calc(token.descriptionMaxWidth).sub(dotSize).div(2).equal(),
  92668. paddingInlineEnd: 0,
  92669. lineHeight: (0,cssinjs.unit)(dotSize),
  92670. background: 'transparent',
  92671. border: 0,
  92672. [`${componentCls}-icon-dot`]: {
  92673. position: 'relative',
  92674. float: 'left',
  92675. width: '100%',
  92676. height: '100%',
  92677. borderRadius: 100,
  92678. // very large number
  92679. transition: `all ${motionDurationSlow}`,
  92680. /* expand hover area */
  92681. '&::after': {
  92682. position: 'absolute',
  92683. top: token.calc(token.marginSM).mul(-1).equal(),
  92684. insetInlineStart: token.calc(dotSize).sub(token.calc(token.controlHeightLG).mul(1.5).equal()).div(2).equal(),
  92685. width: token.calc(token.controlHeightLG).mul(1.5).equal(),
  92686. height: token.controlHeight,
  92687. background: 'transparent',
  92688. content: '""'
  92689. }
  92690. }
  92691. },
  92692. '&-content': {
  92693. width: descriptionMaxWidth
  92694. },
  92695. [`&-process ${componentCls}-item-icon`]: {
  92696. position: 'relative',
  92697. top: token.calc(dotSize).sub(dotCurrentSize).div(2).equal(),
  92698. width: dotCurrentSize,
  92699. height: dotCurrentSize,
  92700. lineHeight: (0,cssinjs.unit)(dotCurrentSize),
  92701. background: 'none',
  92702. marginInlineStart: token.calc(token.descriptionMaxWidth).sub(dotCurrentSize).div(2).equal()
  92703. },
  92704. [`&-process ${componentCls}-icon`]: {
  92705. [`&:first-child ${componentCls}-icon-dot`]: {
  92706. insetInlineStart: 0
  92707. }
  92708. }
  92709. }
  92710. },
  92711. [`&${componentCls}-vertical${componentCls}-dot`]: {
  92712. [`${componentCls}-item-icon`]: {
  92713. marginTop: token.calc(token.controlHeight).sub(dotSize).div(2).equal(),
  92714. marginInlineStart: 0,
  92715. background: 'none'
  92716. },
  92717. [`${componentCls}-item-process ${componentCls}-item-icon`]: {
  92718. marginTop: token.calc(token.controlHeight).sub(dotCurrentSize).div(2).equal(),
  92719. top: 0,
  92720. insetInlineStart: token.calc(dotSize).sub(dotCurrentSize).div(2).equal(),
  92721. marginInlineStart: 0
  92722. },
  92723. // https://github.com/ant-design/ant-design/issues/18354
  92724. [`${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92725. top: token.calc(token.controlHeight).sub(dotSize).div(2).equal(),
  92726. insetInlineStart: 0,
  92727. margin: 0,
  92728. padding: `${(0,cssinjs.unit)(token.calc(dotSize).add(token.paddingXS).equal())} 0 ${(0,cssinjs.unit)(token.paddingXS)}`,
  92729. '&::after': {
  92730. marginInlineStart: token.calc(dotSize).sub(token.lineWidth).div(2).equal()
  92731. }
  92732. },
  92733. [`&${componentCls}-small`]: {
  92734. [`${componentCls}-item-icon`]: {
  92735. marginTop: token.calc(token.controlHeightSM).sub(dotSize).div(2).equal()
  92736. },
  92737. [`${componentCls}-item-process ${componentCls}-item-icon`]: {
  92738. marginTop: token.calc(token.controlHeightSM).sub(dotCurrentSize).div(2).equal()
  92739. },
  92740. [`${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92741. top: token.calc(token.controlHeightSM).sub(dotSize).div(2).equal()
  92742. }
  92743. },
  92744. [`${componentCls}-item:first-child ${componentCls}-icon-dot`]: {
  92745. insetInlineStart: 0
  92746. },
  92747. [`${componentCls}-item-content`]: {
  92748. width: 'inherit'
  92749. }
  92750. }
  92751. };
  92752. };
  92753. /* harmony default export */ var progress_dot = (genStepsProgressDotStyle);
  92754. ;// ./components/steps/style/rtl.ts
  92755. const genStepsRTLStyle = token => {
  92756. const {
  92757. componentCls
  92758. } = token;
  92759. return {
  92760. [`&${componentCls}-rtl`]: {
  92761. direction: 'rtl',
  92762. [`${componentCls}-item`]: {
  92763. '&-subtitle': {
  92764. float: 'left'
  92765. }
  92766. },
  92767. // nav
  92768. [`&${componentCls}-navigation`]: {
  92769. [`${componentCls}-item::after`]: {
  92770. transform: 'rotate(-45deg)'
  92771. }
  92772. },
  92773. // vertical
  92774. [`&${componentCls}-vertical`]: {
  92775. [`> ${componentCls}-item`]: {
  92776. '&::after': {
  92777. transform: 'rotate(225deg)'
  92778. },
  92779. [`${componentCls}-item-icon`]: {
  92780. float: 'right'
  92781. }
  92782. }
  92783. },
  92784. // progress-dot
  92785. [`&${componentCls}-dot`]: {
  92786. [`${componentCls}-item-icon ${componentCls}-icon-dot, &${componentCls}-small ${componentCls}-item-icon ${componentCls}-icon-dot`]: {
  92787. float: 'right'
  92788. }
  92789. }
  92790. }
  92791. };
  92792. };
  92793. /* harmony default export */ var rtl = (genStepsRTLStyle);
  92794. ;// ./components/steps/style/small.ts
  92795. const genStepsSmallStyle = token => {
  92796. const {
  92797. componentCls,
  92798. iconSizeSM,
  92799. // stepsSmallIconMargin,
  92800. fontSizeSM,
  92801. fontSize,
  92802. colorTextDescription
  92803. } = token;
  92804. return {
  92805. [`&${componentCls}-small`]: {
  92806. [`&${componentCls}-horizontal:not(${componentCls}-label-vertical) ${componentCls}-item`]: {
  92807. paddingInlineStart: token.paddingSM,
  92808. '&:first-child': {
  92809. paddingInlineStart: 0
  92810. }
  92811. },
  92812. [`${componentCls}-item-icon`]: {
  92813. width: iconSizeSM,
  92814. height: iconSizeSM,
  92815. // margin: stepsSmallIconMargin,
  92816. marginTop: 0,
  92817. marginBottom: 0,
  92818. marginInline: `0 ${(0,cssinjs.unit)(token.marginXS)}`,
  92819. fontSize: fontSizeSM,
  92820. lineHeight: (0,cssinjs.unit)(iconSizeSM),
  92821. textAlign: 'center',
  92822. borderRadius: iconSizeSM
  92823. },
  92824. [`${componentCls}-item-title`]: {
  92825. paddingInlineEnd: token.paddingSM,
  92826. fontSize,
  92827. lineHeight: (0,cssinjs.unit)(iconSizeSM),
  92828. '&::after': {
  92829. top: token.calc(iconSizeSM).div(2).equal()
  92830. }
  92831. },
  92832. [`${componentCls}-item-description`]: {
  92833. color: colorTextDescription,
  92834. fontSize
  92835. },
  92836. [`${componentCls}-item-tail`]: {
  92837. top: token.calc(iconSizeSM).div(2).sub(token.paddingXXS).equal()
  92838. },
  92839. [`${componentCls}-item-custom ${componentCls}-item-icon`]: {
  92840. width: 'inherit',
  92841. height: 'inherit',
  92842. lineHeight: 'inherit',
  92843. background: 'none',
  92844. border: 0,
  92845. borderRadius: 0,
  92846. [`> ${componentCls}-icon`]: {
  92847. fontSize: iconSizeSM,
  92848. lineHeight: (0,cssinjs.unit)(iconSizeSM),
  92849. transform: 'none'
  92850. }
  92851. }
  92852. }
  92853. };
  92854. };
  92855. /* harmony default export */ var small = (genStepsSmallStyle);
  92856. ;// ./components/steps/style/vertical.ts
  92857. const genStepsVerticalStyle = token => {
  92858. const {
  92859. componentCls,
  92860. iconSizeSM,
  92861. iconSize
  92862. } = token;
  92863. return {
  92864. [`&${componentCls}-vertical`]: {
  92865. display: 'flex',
  92866. flexDirection: 'column',
  92867. [`> ${componentCls}-item`]: {
  92868. display: 'block',
  92869. flex: '1 0 auto',
  92870. paddingInlineStart: 0,
  92871. overflow: 'visible',
  92872. [`${componentCls}-item-icon`]: {
  92873. float: 'left',
  92874. marginInlineEnd: token.margin
  92875. },
  92876. [`${componentCls}-item-content`]: {
  92877. display: 'block',
  92878. minHeight: token.calc(token.controlHeight).mul(1.5).equal(),
  92879. overflow: 'hidden'
  92880. },
  92881. [`${componentCls}-item-title`]: {
  92882. lineHeight: (0,cssinjs.unit)(iconSize)
  92883. },
  92884. [`${componentCls}-item-description`]: {
  92885. paddingBottom: token.paddingSM
  92886. }
  92887. },
  92888. [`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92889. position: 'absolute',
  92890. top: 0,
  92891. insetInlineStart: token.calc(iconSize).div(2).sub(token.lineWidth).equal(),
  92892. width: token.lineWidth,
  92893. height: '100%',
  92894. padding: `${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).add(iconSize).equal())} 0 ${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).equal())}`,
  92895. '&::after': {
  92896. width: token.lineWidth,
  92897. height: '100%'
  92898. }
  92899. },
  92900. [`> ${componentCls}-item:not(:last-child) > ${componentCls}-item-container > ${componentCls}-item-tail`]: {
  92901. display: 'block'
  92902. },
  92903. [` > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-content > ${componentCls}-item-title`]: {
  92904. '&::after': {
  92905. display: 'none'
  92906. }
  92907. },
  92908. [`&${componentCls}-small ${componentCls}-item-container`]: {
  92909. [`${componentCls}-item-tail`]: {
  92910. position: 'absolute',
  92911. top: 0,
  92912. insetInlineStart: token.calc(iconSizeSM).div(2).sub(token.lineWidth).equal(),
  92913. padding: `${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).add(iconSizeSM).equal())} 0 ${(0,cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).equal())}`
  92914. },
  92915. [`${componentCls}-item-title`]: {
  92916. lineHeight: (0,cssinjs.unit)(iconSizeSM)
  92917. }
  92918. }
  92919. }
  92920. };
  92921. };
  92922. /* harmony default export */ var vertical = (genStepsVerticalStyle);
  92923. ;// ./components/steps/style/index.ts
  92924. const STEP_ITEM_STATUS_WAIT = 'wait';
  92925. const STEP_ITEM_STATUS_PROCESS = 'process';
  92926. const STEP_ITEM_STATUS_FINISH = 'finish';
  92927. const STEP_ITEM_STATUS_ERROR = 'error';
  92928. const genStepsItemStatusStyle = (status, token) => {
  92929. const prefix = `${token.componentCls}-item`;
  92930. const iconColorKey = `${status}IconColor`;
  92931. const titleColorKey = `${status}TitleColor`;
  92932. const descriptionColorKey = `${status}DescriptionColor`;
  92933. const tailColorKey = `${status}TailColor`;
  92934. const iconBgColorKey = `${status}IconBgColor`;
  92935. const iconBorderColorKey = `${status}IconBorderColor`;
  92936. const dotColorKey = `${status}DotColor`;
  92937. return {
  92938. [`${prefix}-${status} ${prefix}-icon`]: {
  92939. backgroundColor: token[iconBgColorKey],
  92940. borderColor: token[iconBorderColorKey],
  92941. [`> ${token.componentCls}-icon`]: {
  92942. color: token[iconColorKey],
  92943. [`${token.componentCls}-icon-dot`]: {
  92944. background: token[dotColorKey]
  92945. }
  92946. }
  92947. },
  92948. [`${prefix}-${status}${prefix}-custom ${prefix}-icon`]: {
  92949. [`> ${token.componentCls}-icon`]: {
  92950. color: token[dotColorKey]
  92951. }
  92952. },
  92953. [`${prefix}-${status} > ${prefix}-container > ${prefix}-content > ${prefix}-title`]: {
  92954. color: token[titleColorKey],
  92955. '&::after': {
  92956. backgroundColor: token[tailColorKey]
  92957. }
  92958. },
  92959. [`${prefix}-${status} > ${prefix}-container > ${prefix}-content > ${prefix}-description`]: {
  92960. color: token[descriptionColorKey]
  92961. },
  92962. [`${prefix}-${status} > ${prefix}-container > ${prefix}-tail::after`]: {
  92963. backgroundColor: token[tailColorKey]
  92964. }
  92965. };
  92966. };
  92967. const genStepsItemStyle = token => {
  92968. const {
  92969. componentCls,
  92970. motionDurationSlow
  92971. } = token;
  92972. const stepsItemCls = `${componentCls}-item`; // .ant-steps-item
  92973. const stepItemIconCls = `${stepsItemCls}-icon`;
  92974. return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  92975. [stepsItemCls]: {
  92976. position: 'relative',
  92977. display: 'inline-block',
  92978. flex: 1,
  92979. overflow: 'hidden',
  92980. verticalAlign: 'top',
  92981. '&:last-child': {
  92982. flex: 'none',
  92983. [`> ${stepsItemCls}-container > ${stepsItemCls}-tail, > ${stepsItemCls}-container > ${stepsItemCls}-content > ${stepsItemCls}-title::after`]: {
  92984. display: 'none'
  92985. }
  92986. }
  92987. },
  92988. [`${stepsItemCls}-container`]: {
  92989. outline: 'none',
  92990. [`&:focus-visible ${stepItemIconCls}`]: (0,style.genFocusOutline)(token)
  92991. },
  92992. [`${stepItemIconCls}, ${stepsItemCls}-content`]: {
  92993. display: 'inline-block',
  92994. verticalAlign: 'top'
  92995. },
  92996. [stepItemIconCls]: {
  92997. width: token.iconSize,
  92998. height: token.iconSize,
  92999. marginTop: 0,
  93000. marginBottom: 0,
  93001. marginInlineStart: 0,
  93002. marginInlineEnd: token.marginXS,
  93003. fontSize: token.iconFontSize,
  93004. fontFamily: token.fontFamily,
  93005. lineHeight: (0,cssinjs.unit)(token.iconSize),
  93006. textAlign: 'center',
  93007. borderRadius: token.iconSize,
  93008. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,
  93009. transition: `background-color ${motionDurationSlow}, border-color ${motionDurationSlow}`,
  93010. [`${componentCls}-icon`]: {
  93011. position: 'relative',
  93012. top: token.iconTop,
  93013. color: token.colorPrimary,
  93014. lineHeight: 1
  93015. }
  93016. },
  93017. [`${stepsItemCls}-tail`]: {
  93018. position: 'absolute',
  93019. top: token.calc(token.iconSize).div(2).equal(),
  93020. insetInlineStart: 0,
  93021. width: '100%',
  93022. '&::after': {
  93023. display: 'inline-block',
  93024. width: '100%',
  93025. height: token.lineWidth,
  93026. background: token.colorSplit,
  93027. borderRadius: token.lineWidth,
  93028. transition: `background ${motionDurationSlow}`,
  93029. content: '""'
  93030. }
  93031. },
  93032. [`${stepsItemCls}-title`]: {
  93033. position: 'relative',
  93034. display: 'inline-block',
  93035. paddingInlineEnd: token.padding,
  93036. color: token.colorText,
  93037. fontSize: token.fontSizeLG,
  93038. lineHeight: (0,cssinjs.unit)(token.titleLineHeight),
  93039. '&::after': {
  93040. position: 'absolute',
  93041. top: token.calc(token.titleLineHeight).div(2).equal(),
  93042. insetInlineStart: '100%',
  93043. display: 'block',
  93044. width: 9999,
  93045. height: token.lineWidth,
  93046. background: token.processTailColor,
  93047. content: '""'
  93048. }
  93049. },
  93050. [`${stepsItemCls}-subtitle`]: {
  93051. display: 'inline',
  93052. marginInlineStart: token.marginXS,
  93053. color: token.colorTextDescription,
  93054. fontWeight: 'normal',
  93055. fontSize: token.fontSize
  93056. },
  93057. [`${stepsItemCls}-description`]: {
  93058. color: token.colorTextDescription,
  93059. fontSize: token.fontSize
  93060. }
  93061. }, genStepsItemStatusStyle(STEP_ITEM_STATUS_WAIT, token)), genStepsItemStatusStyle(STEP_ITEM_STATUS_PROCESS, token)), {
  93062. [`${stepsItemCls}-process > ${stepsItemCls}-container > ${stepsItemCls}-title`]: {
  93063. fontWeight: token.fontWeightStrong
  93064. }
  93065. }), genStepsItemStatusStyle(STEP_ITEM_STATUS_FINISH, token)), genStepsItemStatusStyle(STEP_ITEM_STATUS_ERROR, token)), {
  93066. [`${stepsItemCls}${componentCls}-next-error > ${componentCls}-item-title::after`]: {
  93067. background: token.colorError
  93068. },
  93069. [`${stepsItemCls}-disabled`]: {
  93070. cursor: 'not-allowed'
  93071. }
  93072. });
  93073. };
  93074. // ============================= Clickable ===========================
  93075. const genStepsClickableStyle = token => {
  93076. const {
  93077. componentCls,
  93078. motionDurationSlow
  93079. } = token;
  93080. return {
  93081. [`& ${componentCls}-item`]: {
  93082. [`&:not(${componentCls}-item-active)`]: {
  93083. [`& > ${componentCls}-item-container[role='button']`]: {
  93084. cursor: 'pointer',
  93085. [`${componentCls}-item`]: {
  93086. [`&-title, &-subtitle, &-description, &-icon ${componentCls}-icon`]: {
  93087. transition: `color ${motionDurationSlow}`
  93088. }
  93089. },
  93090. '&:hover': {
  93091. [`${componentCls}-item`]: {
  93092. '&-title, &-subtitle, &-description': {
  93093. color: token.colorPrimary
  93094. }
  93095. }
  93096. }
  93097. },
  93098. [`&:not(${componentCls}-item-process)`]: {
  93099. [`& > ${componentCls}-item-container[role='button']:hover`]: {
  93100. [`${componentCls}-item`]: {
  93101. '&-icon': {
  93102. borderColor: token.colorPrimary,
  93103. [`${componentCls}-icon`]: {
  93104. color: token.colorPrimary
  93105. }
  93106. }
  93107. }
  93108. }
  93109. }
  93110. }
  93111. },
  93112. [`&${componentCls}-horizontal:not(${componentCls}-label-vertical)`]: {
  93113. [`${componentCls}-item`]: {
  93114. paddingInlineStart: token.padding,
  93115. whiteSpace: 'nowrap',
  93116. '&:first-child': {
  93117. paddingInlineStart: 0
  93118. },
  93119. [`&:last-child ${componentCls}-item-title`]: {
  93120. paddingInlineEnd: 0
  93121. },
  93122. '&-tail': {
  93123. display: 'none'
  93124. },
  93125. '&-description': {
  93126. maxWidth: token.descriptionMaxWidth,
  93127. whiteSpace: 'normal'
  93128. }
  93129. }
  93130. }
  93131. };
  93132. };
  93133. const genStepsStyle = token => {
  93134. const {
  93135. componentCls
  93136. } = token; // .ant-steps
  93137. return {
  93138. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  93139. display: 'flex',
  93140. width: '100%',
  93141. fontSize: 0,
  93142. textAlign: 'initial'
  93143. }), genStepsItemStyle(token)), genStepsClickableStyle(token)), custom_icon(token)), small(token)), vertical(token)), horizontal(token)), label_placement(token)), progress_dot(token)), nav(token)), rtl(token)), progress(token)), inline(token))
  93144. };
  93145. };
  93146. // ============================== Export ==============================
  93147. const prepareComponentToken = token => ({
  93148. titleLineHeight: token.controlHeight,
  93149. customIconSize: token.controlHeight,
  93150. customIconTop: 0,
  93151. customIconFontSize: token.controlHeightSM,
  93152. iconSize: token.controlHeight,
  93153. iconTop: -0.5,
  93154. // magic for ui experience
  93155. iconFontSize: token.fontSize,
  93156. iconSizeSM: token.fontSizeHeading3,
  93157. dotSize: token.controlHeight / 4,
  93158. dotCurrentSize: token.controlHeightLG / 4,
  93159. navArrowColor: token.colorTextDisabled,
  93160. navContentMaxWidth: 'unset',
  93161. descriptionMaxWidth: 140,
  93162. waitIconColor: token.wireframe ? token.colorTextDisabled : token.colorTextLabel,
  93163. waitIconBgColor: token.wireframe ? token.colorBgContainer : token.colorFillContent,
  93164. waitIconBorderColor: token.wireframe ? token.colorTextDisabled : 'transparent',
  93165. finishIconBgColor: token.wireframe ? token.colorBgContainer : token.controlItemBgActive,
  93166. finishIconBorderColor: token.wireframe ? token.colorPrimary : token.controlItemBgActive
  93167. });
  93168. /* harmony default export */ var steps_style = ((0,genStyleUtils.genStyleHooks)('Steps', token => {
  93169. const {
  93170. colorTextDisabled,
  93171. controlHeightLG,
  93172. colorTextLightSolid,
  93173. colorText,
  93174. colorPrimary,
  93175. colorTextDescription,
  93176. colorTextQuaternary,
  93177. colorError,
  93178. colorBorderSecondary,
  93179. colorSplit
  93180. } = token;
  93181. const stepsToken = (0,es.mergeToken)(token, {
  93182. // Steps component less variable
  93183. processIconColor: colorTextLightSolid,
  93184. processTitleColor: colorText,
  93185. processDescriptionColor: colorText,
  93186. processIconBgColor: colorPrimary,
  93187. processIconBorderColor: colorPrimary,
  93188. processDotColor: colorPrimary,
  93189. processTailColor: colorSplit,
  93190. waitTitleColor: colorTextDescription,
  93191. waitDescriptionColor: colorTextDescription,
  93192. waitTailColor: colorSplit,
  93193. waitDotColor: colorTextDisabled,
  93194. finishIconColor: colorPrimary,
  93195. finishTitleColor: colorText,
  93196. finishDescriptionColor: colorTextDescription,
  93197. finishTailColor: colorPrimary,
  93198. finishDotColor: colorPrimary,
  93199. errorIconColor: colorTextLightSolid,
  93200. errorTitleColor: colorError,
  93201. errorDescriptionColor: colorError,
  93202. errorTailColor: colorSplit,
  93203. errorIconBgColor: colorError,
  93204. errorIconBorderColor: colorError,
  93205. errorDotColor: colorError,
  93206. stepsNavActiveColor: colorPrimary,
  93207. stepsProgressSize: controlHeightLG,
  93208. // Steps inline variable
  93209. inlineDotSize: 6,
  93210. inlineTitleColor: colorTextQuaternary,
  93211. inlineTailColor: colorBorderSecondary
  93212. });
  93213. return genStepsStyle(stepsToken);
  93214. }, prepareComponentToken));
  93215. /***/ }),
  93216. /***/ "./components/style/compact-item.ts":
  93217. /*!******************************************!*\
  93218. !*** ./components/style/compact-item.ts ***!
  93219. \******************************************/
  93220. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93221. "use strict";
  93222. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93223. /* harmony export */ genCompactItemStyle: function() { return /* binding */ genCompactItemStyle; }
  93224. /* harmony export */ });
  93225. // handle border collapse
  93226. function compactItemBorder(token, parentCls, options, prefixCls) {
  93227. const {
  93228. focusElCls,
  93229. focus,
  93230. borderElCls
  93231. } = options;
  93232. const childCombinator = borderElCls ? '> *' : '';
  93233. const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');
  93234. return {
  93235. [`&-item:not(${parentCls}-last-item)`]: {
  93236. marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()
  93237. },
  93238. [`&-item:not(${prefixCls}-status-success)`]: {
  93239. zIndex: 2
  93240. },
  93241. '&-item': Object.assign(Object.assign({
  93242. [hoverEffects]: {
  93243. zIndex: 3
  93244. }
  93245. }, focusElCls ? {
  93246. [`&${focusElCls}`]: {
  93247. zIndex: 3
  93248. }
  93249. } : {}), {
  93250. [`&[disabled] ${childCombinator}`]: {
  93251. zIndex: 0
  93252. }
  93253. })
  93254. };
  93255. }
  93256. // handle border-radius
  93257. function compactItemBorderRadius(prefixCls, parentCls, options) {
  93258. const {
  93259. borderElCls
  93260. } = options;
  93261. const childCombinator = borderElCls ? `> ${borderElCls}` : '';
  93262. return {
  93263. [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {
  93264. borderRadius: 0
  93265. },
  93266. [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {
  93267. [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
  93268. borderStartEndRadius: 0,
  93269. borderEndEndRadius: 0
  93270. }
  93271. },
  93272. [`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {
  93273. [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
  93274. borderStartStartRadius: 0,
  93275. borderEndStartRadius: 0
  93276. }
  93277. }
  93278. };
  93279. }
  93280. function genCompactItemStyle(token, options = {
  93281. focus: true
  93282. }) {
  93283. const {
  93284. componentCls
  93285. } = token;
  93286. const compactCls = `${componentCls}-compact`;
  93287. return {
  93288. [compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options, componentCls)), compactItemBorderRadius(componentCls, compactCls, options))
  93289. };
  93290. }
  93291. /***/ }),
  93292. /***/ "./components/style/index.tsx":
  93293. /*!************************************!*\
  93294. !*** ./components/style/index.tsx ***!
  93295. \************************************/
  93296. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93297. "use strict";
  93298. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93299. /* harmony export */ clearFix: function() { return /* binding */ clearFix; },
  93300. /* harmony export */ genCommonStyle: function() { return /* binding */ genCommonStyle; },
  93301. /* harmony export */ genFocusOutline: function() { return /* binding */ genFocusOutline; },
  93302. /* harmony export */ genFocusStyle: function() { return /* binding */ genFocusStyle; },
  93303. /* harmony export */ genIconStyle: function() { return /* binding */ genIconStyle; },
  93304. /* harmony export */ genLinkStyle: function() { return /* binding */ genLinkStyle; },
  93305. /* harmony export */ operationUnit: function() { return /* binding */ operationUnit; },
  93306. /* harmony export */ resetComponent: function() { return /* binding */ resetComponent; },
  93307. /* harmony export */ resetIcon: function() { return /* binding */ resetIcon; },
  93308. /* harmony export */ textEllipsis: function() { return /* binding */ textEllipsis; }
  93309. /* harmony export */ });
  93310. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  93311. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  93312. const textEllipsis = {
  93313. overflow: 'hidden',
  93314. whiteSpace: 'nowrap',
  93315. textOverflow: 'ellipsis'
  93316. };
  93317. const resetComponent = (token, needInheritFontFamily = false) => ({
  93318. boxSizing: 'border-box',
  93319. margin: 0,
  93320. padding: 0,
  93321. color: token.colorText,
  93322. fontSize: token.fontSize,
  93323. // font-variant: @font-variant-base;
  93324. lineHeight: token.lineHeight,
  93325. listStyle: 'none',
  93326. // font-feature-settings: @font-feature-settings-base;
  93327. fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
  93328. });
  93329. const resetIcon = () => ({
  93330. display: 'inline-flex',
  93331. alignItems: 'center',
  93332. color: 'inherit',
  93333. fontStyle: 'normal',
  93334. lineHeight: 0,
  93335. textAlign: 'center',
  93336. textTransform: 'none',
  93337. // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  93338. verticalAlign: '-0.125em',
  93339. textRendering: 'optimizeLegibility',
  93340. '-webkit-font-smoothing': 'antialiased',
  93341. '-moz-osx-font-smoothing': 'grayscale',
  93342. '> *': {
  93343. lineHeight: 1
  93344. },
  93345. svg: {
  93346. display: 'inline-block'
  93347. }
  93348. });
  93349. const clearFix = () => ({
  93350. // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  93351. '&::before': {
  93352. display: 'table',
  93353. content: '""'
  93354. },
  93355. '&::after': {
  93356. // https://github.com/ant-design/ant-design/issues/21864
  93357. display: 'table',
  93358. clear: 'both',
  93359. content: '""'
  93360. }
  93361. });
  93362. const genLinkStyle = token => ({
  93363. a: {
  93364. color: token.colorLink,
  93365. textDecoration: token.linkDecoration,
  93366. backgroundColor: 'transparent',
  93367. // remove the gray background on active links in IE 10.
  93368. outline: 'none',
  93369. cursor: 'pointer',
  93370. transition: `color ${token.motionDurationSlow}`,
  93371. '-webkit-text-decoration-skip': 'objects',
  93372. // remove gaps in links underline in iOS 8+ and Safari 8+.
  93373. '&:hover': {
  93374. color: token.colorLinkHover
  93375. },
  93376. '&:active': {
  93377. color: token.colorLinkActive
  93378. },
  93379. '&:active, &:hover': {
  93380. textDecoration: token.linkHoverDecoration,
  93381. outline: 0
  93382. },
  93383. // https://github.com/ant-design/ant-design/issues/22503
  93384. '&:focus': {
  93385. textDecoration: token.linkFocusDecoration,
  93386. outline: 0
  93387. },
  93388. '&[disabled]': {
  93389. color: token.colorTextDisabled,
  93390. cursor: 'not-allowed'
  93391. }
  93392. }
  93393. });
  93394. const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {
  93395. const prefixSelector = `[class^="${componentPrefixCls}"], [class*=" ${componentPrefixCls}"]`;
  93396. const rootPrefixSelector = rootCls ? `.${rootCls}` : prefixSelector;
  93397. const resetStyle = {
  93398. boxSizing: 'border-box',
  93399. '&::before, &::after': {
  93400. boxSizing: 'border-box'
  93401. }
  93402. };
  93403. let resetFontStyle = {};
  93404. if (resetFont !== false) {
  93405. resetFontStyle = {
  93406. fontFamily: token.fontFamily,
  93407. fontSize: token.fontSize
  93408. };
  93409. }
  93410. return {
  93411. [rootPrefixSelector]: Object.assign(Object.assign(Object.assign({}, resetFontStyle), resetStyle), {
  93412. [prefixSelector]: resetStyle
  93413. })
  93414. };
  93415. };
  93416. const genFocusOutline = (token, offset) => ({
  93417. outline: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
  93418. outlineOffset: offset !== null && offset !== void 0 ? offset : 1,
  93419. transition: 'outline-offset 0s, outline 0s'
  93420. });
  93421. const genFocusStyle = (token, offset) => ({
  93422. '&:focus-visible': genFocusOutline(token, offset)
  93423. });
  93424. const genIconStyle = iconPrefixCls => ({
  93425. [`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), {
  93426. [`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {
  93427. display: 'block'
  93428. }
  93429. })
  93430. });
  93431. const operationUnit = token => Object.assign(Object.assign({
  93432. // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
  93433. // And Typography use this to generate link style which should not do this.
  93434. color: token.colorLink,
  93435. textDecoration: token.linkDecoration,
  93436. outline: 'none',
  93437. cursor: 'pointer',
  93438. transition: `all ${token.motionDurationSlow}`,
  93439. border: 0,
  93440. padding: 0,
  93441. background: 'none',
  93442. userSelect: 'none'
  93443. }, genFocusStyle(token)), {
  93444. '&:hover': {
  93445. color: token.colorLinkHover,
  93446. textDecoration: token.linkHoverDecoration
  93447. },
  93448. '&:focus': {
  93449. color: token.colorLinkHover,
  93450. textDecoration: token.linkFocusDecoration
  93451. },
  93452. '&:active': {
  93453. color: token.colorLinkActive,
  93454. textDecoration: token.linkHoverDecoration
  93455. }
  93456. });
  93457. /***/ }),
  93458. /***/ "./components/style/motion/collapse.ts":
  93459. /*!*********************************************!*\
  93460. !*** ./components/style/motion/collapse.ts ***!
  93461. \*********************************************/
  93462. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  93463. "use strict";
  93464. const genCollapseMotion = token => ({
  93465. [token.componentCls]: {
  93466. // For common/openAnimation
  93467. [`${token.antCls}-motion-collapse-legacy`]: {
  93468. overflow: 'hidden',
  93469. '&-active': {
  93470. transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
  93471. opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
  93472. }
  93473. },
  93474. [`${token.antCls}-motion-collapse`]: {
  93475. overflow: 'hidden',
  93476. transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
  93477. opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
  93478. }
  93479. }
  93480. });
  93481. /* harmony default export */ __webpack_exports__["default"] = (genCollapseMotion);
  93482. /***/ }),
  93483. /***/ "./components/style/motion/fade.ts":
  93484. /*!*****************************************!*\
  93485. !*** ./components/style/motion/fade.ts ***!
  93486. \*****************************************/
  93487. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93488. "use strict";
  93489. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93490. /* harmony export */ initFadeMotion: function() { return /* binding */ initFadeMotion; }
  93491. /* harmony export */ });
  93492. /* unused harmony exports fadeIn, fadeOut */
  93493. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  93494. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  93495. /* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
  93496. const fadeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antFadeIn', {
  93497. '0%': {
  93498. opacity: 0
  93499. },
  93500. '100%': {
  93501. opacity: 1
  93502. }
  93503. });
  93504. const fadeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antFadeOut', {
  93505. '0%': {
  93506. opacity: 1
  93507. },
  93508. '100%': {
  93509. opacity: 0
  93510. }
  93511. });
  93512. const initFadeMotion = (token, sameLevel = false) => {
  93513. const {
  93514. antCls
  93515. } = token;
  93516. const motionCls = `${antCls}-fade`;
  93517. const sameLevelPrefix = sameLevel ? '&' : '';
  93518. return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel), {
  93519. [`
  93520. ${sameLevelPrefix}${motionCls}-enter,
  93521. ${sameLevelPrefix}${motionCls}-appear
  93522. `]: {
  93523. opacity: 0,
  93524. animationTimingFunction: 'linear'
  93525. },
  93526. [`${sameLevelPrefix}${motionCls}-leave`]: {
  93527. animationTimingFunction: 'linear'
  93528. }
  93529. }];
  93530. };
  93531. /***/ }),
  93532. /***/ "./components/style/motion/motion.ts":
  93533. /*!*******************************************!*\
  93534. !*** ./components/style/motion/motion.ts ***!
  93535. \*******************************************/
  93536. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93537. "use strict";
  93538. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93539. /* harmony export */ initMotion: function() { return /* binding */ initMotion; }
  93540. /* harmony export */ });
  93541. const initMotionCommon = duration => ({
  93542. animationDuration: duration,
  93543. animationFillMode: 'both'
  93544. });
  93545. // FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove
  93546. const initMotionCommonLeave = duration => ({
  93547. animationDuration: duration,
  93548. animationFillMode: 'both'
  93549. });
  93550. const initMotion = (motionCls, inKeyframes, outKeyframes, duration, sameLevel = false) => {
  93551. const sameLevelPrefix = sameLevel ? '&' : '';
  93552. return {
  93553. [`
  93554. ${sameLevelPrefix}${motionCls}-enter,
  93555. ${sameLevelPrefix}${motionCls}-appear
  93556. `]: Object.assign(Object.assign({}, initMotionCommon(duration)), {
  93557. animationPlayState: 'paused'
  93558. }),
  93559. [`${sameLevelPrefix}${motionCls}-leave`]: Object.assign(Object.assign({}, initMotionCommonLeave(duration)), {
  93560. animationPlayState: 'paused'
  93561. }),
  93562. [`
  93563. ${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active,
  93564. ${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active
  93565. `]: {
  93566. animationName: inKeyframes,
  93567. animationPlayState: 'running'
  93568. },
  93569. [`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: {
  93570. animationName: outKeyframes,
  93571. animationPlayState: 'running',
  93572. pointerEvents: 'none'
  93573. }
  93574. };
  93575. };
  93576. /***/ }),
  93577. /***/ "./components/style/motion/move.ts":
  93578. /*!*****************************************!*\
  93579. !*** ./components/style/motion/move.ts ***!
  93580. \*****************************************/
  93581. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93582. "use strict";
  93583. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93584. /* harmony export */ initMoveMotion: function() { return /* binding */ initMoveMotion; }
  93585. /* harmony export */ });
  93586. /* unused harmony exports moveDownIn, moveDownOut, moveLeftIn, moveLeftOut, moveRightIn, moveRightOut, moveUpIn, moveUpOut */
  93587. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  93588. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  93589. /* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
  93590. const moveDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveDownIn', {
  93591. '0%': {
  93592. transform: 'translate3d(0, 100%, 0)',
  93593. transformOrigin: '0 0',
  93594. opacity: 0
  93595. },
  93596. '100%': {
  93597. transform: 'translate3d(0, 0, 0)',
  93598. transformOrigin: '0 0',
  93599. opacity: 1
  93600. }
  93601. });
  93602. const moveDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveDownOut', {
  93603. '0%': {
  93604. transform: 'translate3d(0, 0, 0)',
  93605. transformOrigin: '0 0',
  93606. opacity: 1
  93607. },
  93608. '100%': {
  93609. transform: 'translate3d(0, 100%, 0)',
  93610. transformOrigin: '0 0',
  93611. opacity: 0
  93612. }
  93613. });
  93614. const moveLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveLeftIn', {
  93615. '0%': {
  93616. transform: 'translate3d(-100%, 0, 0)',
  93617. transformOrigin: '0 0',
  93618. opacity: 0
  93619. },
  93620. '100%': {
  93621. transform: 'translate3d(0, 0, 0)',
  93622. transformOrigin: '0 0',
  93623. opacity: 1
  93624. }
  93625. });
  93626. const moveLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveLeftOut', {
  93627. '0%': {
  93628. transform: 'translate3d(0, 0, 0)',
  93629. transformOrigin: '0 0',
  93630. opacity: 1
  93631. },
  93632. '100%': {
  93633. transform: 'translate3d(-100%, 0, 0)',
  93634. transformOrigin: '0 0',
  93635. opacity: 0
  93636. }
  93637. });
  93638. const moveRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveRightIn', {
  93639. '0%': {
  93640. transform: 'translate3d(100%, 0, 0)',
  93641. transformOrigin: '0 0',
  93642. opacity: 0
  93643. },
  93644. '100%': {
  93645. transform: 'translate3d(0, 0, 0)',
  93646. transformOrigin: '0 0',
  93647. opacity: 1
  93648. }
  93649. });
  93650. const moveRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveRightOut', {
  93651. '0%': {
  93652. transform: 'translate3d(0, 0, 0)',
  93653. transformOrigin: '0 0',
  93654. opacity: 1
  93655. },
  93656. '100%': {
  93657. transform: 'translate3d(100%, 0, 0)',
  93658. transformOrigin: '0 0',
  93659. opacity: 0
  93660. }
  93661. });
  93662. const moveUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveUpIn', {
  93663. '0%': {
  93664. transform: 'translate3d(0, -100%, 0)',
  93665. transformOrigin: '0 0',
  93666. opacity: 0
  93667. },
  93668. '100%': {
  93669. transform: 'translate3d(0, 0, 0)',
  93670. transformOrigin: '0 0',
  93671. opacity: 1
  93672. }
  93673. });
  93674. const moveUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antMoveUpOut', {
  93675. '0%': {
  93676. transform: 'translate3d(0, 0, 0)',
  93677. transformOrigin: '0 0',
  93678. opacity: 1
  93679. },
  93680. '100%': {
  93681. transform: 'translate3d(0, -100%, 0)',
  93682. transformOrigin: '0 0',
  93683. opacity: 0
  93684. }
  93685. });
  93686. const moveMotion = {
  93687. 'move-up': {
  93688. inKeyframes: moveUpIn,
  93689. outKeyframes: moveUpOut
  93690. },
  93691. 'move-down': {
  93692. inKeyframes: moveDownIn,
  93693. outKeyframes: moveDownOut
  93694. },
  93695. 'move-left': {
  93696. inKeyframes: moveLeftIn,
  93697. outKeyframes: moveLeftOut
  93698. },
  93699. 'move-right': {
  93700. inKeyframes: moveRightIn,
  93701. outKeyframes: moveRightOut
  93702. }
  93703. };
  93704. const initMoveMotion = (token, motionName) => {
  93705. const {
  93706. antCls
  93707. } = token;
  93708. const motionCls = `${antCls}-${motionName}`;
  93709. const {
  93710. inKeyframes,
  93711. outKeyframes
  93712. } = moveMotion[motionName];
  93713. return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {
  93714. [`
  93715. ${motionCls}-enter,
  93716. ${motionCls}-appear
  93717. `]: {
  93718. opacity: 0,
  93719. animationTimingFunction: token.motionEaseOutCirc
  93720. },
  93721. [`${motionCls}-leave`]: {
  93722. animationTimingFunction: token.motionEaseInOutCirc
  93723. }
  93724. }];
  93725. };
  93726. /***/ }),
  93727. /***/ "./components/style/motion/slide.ts":
  93728. /*!******************************************!*\
  93729. !*** ./components/style/motion/slide.ts ***!
  93730. \******************************************/
  93731. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93732. "use strict";
  93733. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93734. /* harmony export */ initSlideMotion: function() { return /* binding */ initSlideMotion; },
  93735. /* harmony export */ slideDownIn: function() { return /* binding */ slideDownIn; },
  93736. /* harmony export */ slideDownOut: function() { return /* binding */ slideDownOut; },
  93737. /* harmony export */ slideUpIn: function() { return /* binding */ slideUpIn; },
  93738. /* harmony export */ slideUpOut: function() { return /* binding */ slideUpOut; }
  93739. /* harmony export */ });
  93740. /* unused harmony exports slideLeftIn, slideLeftOut, slideRightIn, slideRightOut */
  93741. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  93742. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  93743. /* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
  93744. const slideUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideUpIn', {
  93745. '0%': {
  93746. transform: 'scaleY(0.8)',
  93747. transformOrigin: '0% 0%',
  93748. opacity: 0
  93749. },
  93750. '100%': {
  93751. transform: 'scaleY(1)',
  93752. transformOrigin: '0% 0%',
  93753. opacity: 1
  93754. }
  93755. });
  93756. const slideUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideUpOut', {
  93757. '0%': {
  93758. transform: 'scaleY(1)',
  93759. transformOrigin: '0% 0%',
  93760. opacity: 1
  93761. },
  93762. '100%': {
  93763. transform: 'scaleY(0.8)',
  93764. transformOrigin: '0% 0%',
  93765. opacity: 0
  93766. }
  93767. });
  93768. const slideDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideDownIn', {
  93769. '0%': {
  93770. transform: 'scaleY(0.8)',
  93771. transformOrigin: '100% 100%',
  93772. opacity: 0
  93773. },
  93774. '100%': {
  93775. transform: 'scaleY(1)',
  93776. transformOrigin: '100% 100%',
  93777. opacity: 1
  93778. }
  93779. });
  93780. const slideDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideDownOut', {
  93781. '0%': {
  93782. transform: 'scaleY(1)',
  93783. transformOrigin: '100% 100%',
  93784. opacity: 1
  93785. },
  93786. '100%': {
  93787. transform: 'scaleY(0.8)',
  93788. transformOrigin: '100% 100%',
  93789. opacity: 0
  93790. }
  93791. });
  93792. const slideLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideLeftIn', {
  93793. '0%': {
  93794. transform: 'scaleX(0.8)',
  93795. transformOrigin: '0% 0%',
  93796. opacity: 0
  93797. },
  93798. '100%': {
  93799. transform: 'scaleX(1)',
  93800. transformOrigin: '0% 0%',
  93801. opacity: 1
  93802. }
  93803. });
  93804. const slideLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideLeftOut', {
  93805. '0%': {
  93806. transform: 'scaleX(1)',
  93807. transformOrigin: '0% 0%',
  93808. opacity: 1
  93809. },
  93810. '100%': {
  93811. transform: 'scaleX(0.8)',
  93812. transformOrigin: '0% 0%',
  93813. opacity: 0
  93814. }
  93815. });
  93816. const slideRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideRightIn', {
  93817. '0%': {
  93818. transform: 'scaleX(0.8)',
  93819. transformOrigin: '100% 0%',
  93820. opacity: 0
  93821. },
  93822. '100%': {
  93823. transform: 'scaleX(1)',
  93824. transformOrigin: '100% 0%',
  93825. opacity: 1
  93826. }
  93827. });
  93828. const slideRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antSlideRightOut', {
  93829. '0%': {
  93830. transform: 'scaleX(1)',
  93831. transformOrigin: '100% 0%',
  93832. opacity: 1
  93833. },
  93834. '100%': {
  93835. transform: 'scaleX(0.8)',
  93836. transformOrigin: '100% 0%',
  93837. opacity: 0
  93838. }
  93839. });
  93840. const slideMotion = {
  93841. 'slide-up': {
  93842. inKeyframes: slideUpIn,
  93843. outKeyframes: slideUpOut
  93844. },
  93845. 'slide-down': {
  93846. inKeyframes: slideDownIn,
  93847. outKeyframes: slideDownOut
  93848. },
  93849. 'slide-left': {
  93850. inKeyframes: slideLeftIn,
  93851. outKeyframes: slideLeftOut
  93852. },
  93853. 'slide-right': {
  93854. inKeyframes: slideRightIn,
  93855. outKeyframes: slideRightOut
  93856. }
  93857. };
  93858. const initSlideMotion = (token, motionName) => {
  93859. const {
  93860. antCls
  93861. } = token;
  93862. const motionCls = `${antCls}-${motionName}`;
  93863. const {
  93864. inKeyframes,
  93865. outKeyframes
  93866. } = slideMotion[motionName];
  93867. return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {
  93868. [`
  93869. ${motionCls}-enter,
  93870. ${motionCls}-appear
  93871. `]: {
  93872. transform: 'scale(0)',
  93873. transformOrigin: '0% 0%',
  93874. opacity: 0,
  93875. animationTimingFunction: token.motionEaseOutQuint,
  93876. '&-prepare': {
  93877. transform: 'scale(1)'
  93878. }
  93879. },
  93880. [`${motionCls}-leave`]: {
  93881. animationTimingFunction: token.motionEaseInQuint
  93882. }
  93883. }];
  93884. };
  93885. /***/ }),
  93886. /***/ "./components/style/motion/zoom.ts":
  93887. /*!*****************************************!*\
  93888. !*** ./components/style/motion/zoom.ts ***!
  93889. \*****************************************/
  93890. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  93891. "use strict";
  93892. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  93893. /* harmony export */ initZoomMotion: function() { return /* binding */ initZoomMotion; },
  93894. /* harmony export */ zoomIn: function() { return /* binding */ zoomIn; }
  93895. /* harmony export */ });
  93896. /* unused harmony exports zoomOut, zoomBigIn, zoomBigOut, zoomUpIn, zoomUpOut, zoomLeftIn, zoomLeftOut, zoomRightIn, zoomRightOut, zoomDownIn, zoomDownOut */
  93897. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  93898. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  93899. /* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ "./components/style/motion/motion.ts");
  93900. const zoomIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomIn', {
  93901. '0%': {
  93902. transform: 'scale(0.2)',
  93903. opacity: 0
  93904. },
  93905. '100%': {
  93906. transform: 'scale(1)',
  93907. opacity: 1
  93908. }
  93909. });
  93910. const zoomOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomOut', {
  93911. '0%': {
  93912. transform: 'scale(1)'
  93913. },
  93914. '100%': {
  93915. transform: 'scale(0.2)',
  93916. opacity: 0
  93917. }
  93918. });
  93919. const zoomBigIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBigIn', {
  93920. '0%': {
  93921. transform: 'scale(0.8)',
  93922. opacity: 0
  93923. },
  93924. '100%': {
  93925. transform: 'scale(1)',
  93926. opacity: 1
  93927. }
  93928. });
  93929. const zoomBigOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBigOut', {
  93930. '0%': {
  93931. transform: 'scale(1)'
  93932. },
  93933. '100%': {
  93934. transform: 'scale(0.8)',
  93935. opacity: 0
  93936. }
  93937. });
  93938. const zoomUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomUpIn', {
  93939. '0%': {
  93940. transform: 'scale(0.8)',
  93941. transformOrigin: '50% 0%',
  93942. opacity: 0
  93943. },
  93944. '100%': {
  93945. transform: 'scale(1)',
  93946. transformOrigin: '50% 0%'
  93947. }
  93948. });
  93949. const zoomUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomUpOut', {
  93950. '0%': {
  93951. transform: 'scale(1)',
  93952. transformOrigin: '50% 0%'
  93953. },
  93954. '100%': {
  93955. transform: 'scale(0.8)',
  93956. transformOrigin: '50% 0%',
  93957. opacity: 0
  93958. }
  93959. });
  93960. const zoomLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomLeftIn', {
  93961. '0%': {
  93962. transform: 'scale(0.8)',
  93963. transformOrigin: '0% 50%',
  93964. opacity: 0
  93965. },
  93966. '100%': {
  93967. transform: 'scale(1)',
  93968. transformOrigin: '0% 50%'
  93969. }
  93970. });
  93971. const zoomLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomLeftOut', {
  93972. '0%': {
  93973. transform: 'scale(1)',
  93974. transformOrigin: '0% 50%'
  93975. },
  93976. '100%': {
  93977. transform: 'scale(0.8)',
  93978. transformOrigin: '0% 50%',
  93979. opacity: 0
  93980. }
  93981. });
  93982. const zoomRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomRightIn', {
  93983. '0%': {
  93984. transform: 'scale(0.8)',
  93985. transformOrigin: '100% 50%',
  93986. opacity: 0
  93987. },
  93988. '100%': {
  93989. transform: 'scale(1)',
  93990. transformOrigin: '100% 50%'
  93991. }
  93992. });
  93993. const zoomRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomRightOut', {
  93994. '0%': {
  93995. transform: 'scale(1)',
  93996. transformOrigin: '100% 50%'
  93997. },
  93998. '100%': {
  93999. transform: 'scale(0.8)',
  94000. transformOrigin: '100% 50%',
  94001. opacity: 0
  94002. }
  94003. });
  94004. const zoomDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomDownIn', {
  94005. '0%': {
  94006. transform: 'scale(0.8)',
  94007. transformOrigin: '50% 100%',
  94008. opacity: 0
  94009. },
  94010. '100%': {
  94011. transform: 'scale(1)',
  94012. transformOrigin: '50% 100%'
  94013. }
  94014. });
  94015. const zoomDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomDownOut', {
  94016. '0%': {
  94017. transform: 'scale(1)',
  94018. transformOrigin: '50% 100%'
  94019. },
  94020. '100%': {
  94021. transform: 'scale(0.8)',
  94022. transformOrigin: '50% 100%',
  94023. opacity: 0
  94024. }
  94025. });
  94026. const zoomMotion = {
  94027. zoom: {
  94028. inKeyframes: zoomIn,
  94029. outKeyframes: zoomOut
  94030. },
  94031. 'zoom-big': {
  94032. inKeyframes: zoomBigIn,
  94033. outKeyframes: zoomBigOut
  94034. },
  94035. 'zoom-big-fast': {
  94036. inKeyframes: zoomBigIn,
  94037. outKeyframes: zoomBigOut
  94038. },
  94039. 'zoom-left': {
  94040. inKeyframes: zoomLeftIn,
  94041. outKeyframes: zoomLeftOut
  94042. },
  94043. 'zoom-right': {
  94044. inKeyframes: zoomRightIn,
  94045. outKeyframes: zoomRightOut
  94046. },
  94047. 'zoom-up': {
  94048. inKeyframes: zoomUpIn,
  94049. outKeyframes: zoomUpOut
  94050. },
  94051. 'zoom-down': {
  94052. inKeyframes: zoomDownIn,
  94053. outKeyframes: zoomDownOut
  94054. }
  94055. };
  94056. const initZoomMotion = (token, motionName) => {
  94057. const {
  94058. antCls
  94059. } = token;
  94060. const motionCls = `${antCls}-${motionName}`;
  94061. const {
  94062. inKeyframes,
  94063. outKeyframes
  94064. } = zoomMotion[motionName];
  94065. return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__.initMotion)(motionCls, inKeyframes, outKeyframes, motionName === 'zoom-big-fast' ? token.motionDurationFast : token.motionDurationMid), {
  94066. [`
  94067. ${motionCls}-enter,
  94068. ${motionCls}-appear
  94069. `]: {
  94070. transform: 'scale(0)',
  94071. opacity: 0,
  94072. animationTimingFunction: token.motionEaseOutCirc,
  94073. '&-prepare': {
  94074. transform: 'none'
  94075. }
  94076. },
  94077. [`${motionCls}-leave`]: {
  94078. animationTimingFunction: token.motionEaseInOutCirc
  94079. }
  94080. }];
  94081. };
  94082. /***/ }),
  94083. /***/ "./components/style/placementArrow.ts":
  94084. /*!********************************************!*\
  94085. !*** ./components/style/placementArrow.ts ***!
  94086. \********************************************/
  94087. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  94088. "use strict";
  94089. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  94090. /* harmony export */ MAX_VERTICAL_CONTENT_RADIUS: function() { return /* binding */ MAX_VERTICAL_CONTENT_RADIUS; },
  94091. /* harmony export */ "default": function() { return /* binding */ getArrowStyle; },
  94092. /* harmony export */ getArrowOffsetToken: function() { return /* binding */ getArrowOffsetToken; }
  94093. /* harmony export */ });
  94094. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  94095. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  94096. /* harmony import */ var _roundedArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./roundedArrow */ "./components/style/roundedArrow.ts");
  94097. const MAX_VERTICAL_CONTENT_RADIUS = 8;
  94098. function getArrowOffsetToken(options) {
  94099. const {
  94100. contentRadius,
  94101. limitVerticalRadius
  94102. } = options;
  94103. const arrowOffset = contentRadius > 12 ? contentRadius + 2 : 12;
  94104. const arrowOffsetVertical = limitVerticalRadius ? MAX_VERTICAL_CONTENT_RADIUS : arrowOffset;
  94105. return {
  94106. arrowOffsetHorizontal: arrowOffset,
  94107. arrowOffsetVertical
  94108. };
  94109. }
  94110. function isInject(valid, code) {
  94111. if (!valid) {
  94112. return {};
  94113. }
  94114. return code;
  94115. }
  94116. function getArrowStyle(token, colorBg, options) {
  94117. const {
  94118. componentCls,
  94119. boxShadowPopoverArrow,
  94120. arrowOffsetVertical,
  94121. arrowOffsetHorizontal
  94122. } = token;
  94123. const {
  94124. arrowDistance = 0,
  94125. arrowPlacement = {
  94126. left: true,
  94127. right: true,
  94128. top: true,
  94129. bottom: true
  94130. }
  94131. } = options || {};
  94132. return {
  94133. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({
  94134. // ============================ Basic ============================
  94135. [`${componentCls}-arrow`]: [Object.assign(Object.assign({
  94136. position: 'absolute',
  94137. zIndex: 1,
  94138. display: 'block'
  94139. }, (0,_roundedArrow__WEBPACK_IMPORTED_MODULE_1__.genRoundedArrow)(token, colorBg, boxShadowPopoverArrow)), {
  94140. '&:before': {
  94141. background: colorBg
  94142. }
  94143. })]
  94144. }, isInject(!!arrowPlacement.top, {
  94145. [[`&-placement-top > ${componentCls}-arrow`, `&-placement-topLeft > ${componentCls}-arrow`, `&-placement-topRight > ${componentCls}-arrow`].join(',')]: {
  94146. bottom: arrowDistance,
  94147. transform: 'translateY(100%) rotate(180deg)'
  94148. },
  94149. [`&-placement-top > ${componentCls}-arrow`]: {
  94150. left: {
  94151. _skip_check_: true,
  94152. value: '50%'
  94153. },
  94154. transform: 'translateX(-50%) translateY(100%) rotate(180deg)'
  94155. },
  94156. '&-placement-topLeft': {
  94157. '--arrow-offset-horizontal': arrowOffsetHorizontal,
  94158. [`> ${componentCls}-arrow`]: {
  94159. left: {
  94160. _skip_check_: true,
  94161. value: arrowOffsetHorizontal
  94162. }
  94163. }
  94164. },
  94165. '&-placement-topRight': {
  94166. '--arrow-offset-horizontal': `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(arrowOffsetHorizontal)})`,
  94167. [`> ${componentCls}-arrow`]: {
  94168. right: {
  94169. _skip_check_: true,
  94170. value: arrowOffsetHorizontal
  94171. }
  94172. }
  94173. }
  94174. })), isInject(!!arrowPlacement.bottom, {
  94175. [[`&-placement-bottom > ${componentCls}-arrow`, `&-placement-bottomLeft > ${componentCls}-arrow`, `&-placement-bottomRight > ${componentCls}-arrow`].join(',')]: {
  94176. top: arrowDistance,
  94177. transform: `translateY(-100%)`
  94178. },
  94179. [`&-placement-bottom > ${componentCls}-arrow`]: {
  94180. left: {
  94181. _skip_check_: true,
  94182. value: '50%'
  94183. },
  94184. transform: `translateX(-50%) translateY(-100%)`
  94185. },
  94186. '&-placement-bottomLeft': {
  94187. '--arrow-offset-horizontal': arrowOffsetHorizontal,
  94188. [`> ${componentCls}-arrow`]: {
  94189. left: {
  94190. _skip_check_: true,
  94191. value: arrowOffsetHorizontal
  94192. }
  94193. }
  94194. },
  94195. '&-placement-bottomRight': {
  94196. '--arrow-offset-horizontal': `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(arrowOffsetHorizontal)})`,
  94197. [`> ${componentCls}-arrow`]: {
  94198. right: {
  94199. _skip_check_: true,
  94200. value: arrowOffsetHorizontal
  94201. }
  94202. }
  94203. }
  94204. })), isInject(!!arrowPlacement.left, {
  94205. [[`&-placement-left > ${componentCls}-arrow`, `&-placement-leftTop > ${componentCls}-arrow`, `&-placement-leftBottom > ${componentCls}-arrow`].join(',')]: {
  94206. right: {
  94207. _skip_check_: true,
  94208. value: arrowDistance
  94209. },
  94210. transform: 'translateX(100%) rotate(90deg)'
  94211. },
  94212. [`&-placement-left > ${componentCls}-arrow`]: {
  94213. top: {
  94214. _skip_check_: true,
  94215. value: '50%'
  94216. },
  94217. transform: 'translateY(-50%) translateX(100%) rotate(90deg)'
  94218. },
  94219. [`&-placement-leftTop > ${componentCls}-arrow`]: {
  94220. top: arrowOffsetVertical
  94221. },
  94222. [`&-placement-leftBottom > ${componentCls}-arrow`]: {
  94223. bottom: arrowOffsetVertical
  94224. }
  94225. })), isInject(!!arrowPlacement.right, {
  94226. [[`&-placement-right > ${componentCls}-arrow`, `&-placement-rightTop > ${componentCls}-arrow`, `&-placement-rightBottom > ${componentCls}-arrow`].join(',')]: {
  94227. left: {
  94228. _skip_check_: true,
  94229. value: arrowDistance
  94230. },
  94231. transform: 'translateX(-100%) rotate(-90deg)'
  94232. },
  94233. [`&-placement-right > ${componentCls}-arrow`]: {
  94234. top: {
  94235. _skip_check_: true,
  94236. value: '50%'
  94237. },
  94238. transform: 'translateY(-50%) translateX(-100%) rotate(-90deg)'
  94239. },
  94240. [`&-placement-rightTop > ${componentCls}-arrow`]: {
  94241. top: arrowOffsetVertical
  94242. },
  94243. [`&-placement-rightBottom > ${componentCls}-arrow`]: {
  94244. bottom: arrowOffsetVertical
  94245. }
  94246. }))
  94247. };
  94248. }
  94249. /***/ }),
  94250. /***/ "./components/style/roundedArrow.ts":
  94251. /*!******************************************!*\
  94252. !*** ./components/style/roundedArrow.ts ***!
  94253. \******************************************/
  94254. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  94255. "use strict";
  94256. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  94257. /* harmony export */ genRoundedArrow: function() { return /* binding */ genRoundedArrow; },
  94258. /* harmony export */ getArrowToken: function() { return /* binding */ getArrowToken; }
  94259. /* harmony export */ });
  94260. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  94261. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  94262. function getArrowToken(token) {
  94263. const {
  94264. sizePopupArrow,
  94265. borderRadiusXS,
  94266. borderRadiusOuter
  94267. } = token;
  94268. const unitWidth = sizePopupArrow / 2;
  94269. const ax = 0;
  94270. const ay = unitWidth;
  94271. const bx = borderRadiusOuter * 1 / Math.sqrt(2);
  94272. const by = unitWidth - borderRadiusOuter * (1 - 1 / Math.sqrt(2));
  94273. const cx = unitWidth - borderRadiusXS * (1 / Math.sqrt(2));
  94274. const cy = borderRadiusOuter * (Math.sqrt(2) - 1) + borderRadiusXS * (1 / Math.sqrt(2));
  94275. const dx = 2 * unitWidth - cx;
  94276. const dy = cy;
  94277. const ex = 2 * unitWidth - bx;
  94278. const ey = by;
  94279. const fx = 2 * unitWidth - ax;
  94280. const fy = ay;
  94281. const shadowWidth = unitWidth * Math.sqrt(2) + borderRadiusOuter * (Math.sqrt(2) - 2);
  94282. const polygonOffset = borderRadiusOuter * (Math.sqrt(2) - 1);
  94283. const arrowPolygon = `polygon(${polygonOffset}px 100%, 50% ${polygonOffset}px, ${2 * unitWidth - polygonOffset}px 100%, ${polygonOffset}px 100%)`;
  94284. const arrowPath = `path('M ${ax} ${ay} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${bx} ${by} L ${cx} ${cy} A ${borderRadiusXS} ${borderRadiusXS} 0 0 1 ${dx} ${dy} L ${ex} ${ey} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${fx} ${fy} Z')`;
  94285. return {
  94286. arrowShadowWidth: shadowWidth,
  94287. arrowPath,
  94288. arrowPolygon
  94289. };
  94290. }
  94291. const genRoundedArrow = (token, bgColor, boxShadow) => {
  94292. const {
  94293. sizePopupArrow,
  94294. arrowPolygon,
  94295. arrowPath,
  94296. arrowShadowWidth,
  94297. borderRadiusXS,
  94298. calc
  94299. } = token;
  94300. return {
  94301. pointerEvents: 'none',
  94302. width: sizePopupArrow,
  94303. height: sizePopupArrow,
  94304. overflow: 'hidden',
  94305. '&::before': {
  94306. position: 'absolute',
  94307. bottom: 0,
  94308. insetInlineStart: 0,
  94309. width: sizePopupArrow,
  94310. height: calc(sizePopupArrow).div(2).equal(),
  94311. background: bgColor,
  94312. clipPath: {
  94313. _multi_value_: true,
  94314. value: [arrowPolygon, arrowPath]
  94315. },
  94316. content: '""'
  94317. },
  94318. '&::after': {
  94319. content: '""',
  94320. position: 'absolute',
  94321. width: arrowShadowWidth,
  94322. height: arrowShadowWidth,
  94323. bottom: 0,
  94324. insetInline: 0,
  94325. margin: 'auto',
  94326. borderRadius: {
  94327. _skip_check_: true,
  94328. value: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusXS)} 0`
  94329. },
  94330. transform: 'translateY(50%) rotate(-135deg)',
  94331. boxShadow,
  94332. zIndex: 0,
  94333. background: 'transparent'
  94334. }
  94335. };
  94336. };
  94337. /***/ }),
  94338. /***/ "./components/switch/style/index.ts":
  94339. /*!******************************************!*\
  94340. !*** ./components/switch/style/index.ts ***!
  94341. \******************************************/
  94342. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  94343. "use strict";
  94344. __webpack_require__.r(__webpack_exports__);
  94345. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  94346. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  94347. /* harmony export */ });
  94348. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  94349. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  94350. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  94351. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  94352. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  94353. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  94354. const genSwitchSmallStyle = token => {
  94355. const {
  94356. componentCls,
  94357. trackHeightSM,
  94358. trackPadding,
  94359. trackMinWidthSM,
  94360. innerMinMarginSM,
  94361. innerMaxMarginSM,
  94362. handleSizeSM,
  94363. calc
  94364. } = token;
  94365. const switchInnerCls = `${componentCls}-inner`;
  94366. const trackPaddingCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(handleSizeSM).add(calc(trackPadding).mul(2)).equal());
  94367. const innerMaxMarginCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(innerMaxMarginSM).mul(2).equal());
  94368. return {
  94369. [componentCls]: {
  94370. [`&${componentCls}-small`]: {
  94371. minWidth: trackMinWidthSM,
  94372. height: trackHeightSM,
  94373. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(trackHeightSM),
  94374. [`${componentCls}-inner`]: {
  94375. paddingInlineStart: innerMaxMarginSM,
  94376. paddingInlineEnd: innerMinMarginSM,
  94377. [`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
  94378. minHeight: trackHeightSM
  94379. },
  94380. [`${switchInnerCls}-checked`]: {
  94381. marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,
  94382. marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`
  94383. },
  94384. [`${switchInnerCls}-unchecked`]: {
  94385. marginTop: calc(trackHeightSM).mul(-1).equal(),
  94386. marginInlineStart: 0,
  94387. marginInlineEnd: 0
  94388. }
  94389. },
  94390. [`${componentCls}-handle`]: {
  94391. width: handleSizeSM,
  94392. height: handleSizeSM
  94393. },
  94394. [`${componentCls}-loading-icon`]: {
  94395. top: calc(calc(handleSizeSM).sub(token.switchLoadingIconSize)).div(2).equal(),
  94396. fontSize: token.switchLoadingIconSize
  94397. },
  94398. [`&${componentCls}-checked`]: {
  94399. [`${componentCls}-inner`]: {
  94400. paddingInlineStart: innerMinMarginSM,
  94401. paddingInlineEnd: innerMaxMarginSM,
  94402. [`${switchInnerCls}-checked`]: {
  94403. marginInlineStart: 0,
  94404. marginInlineEnd: 0
  94405. },
  94406. [`${switchInnerCls}-unchecked`]: {
  94407. marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,
  94408. marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`
  94409. }
  94410. },
  94411. [`${componentCls}-handle`]: {
  94412. insetInlineStart: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(handleSizeSM).add(trackPadding).equal())})`
  94413. }
  94414. },
  94415. [`&:not(${componentCls}-disabled):active`]: {
  94416. [`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
  94417. [`${switchInnerCls}-unchecked`]: {
  94418. marginInlineStart: calc(token.marginXXS).div(2).equal(),
  94419. marginInlineEnd: calc(token.marginXXS).mul(-1).div(2).equal()
  94420. }
  94421. },
  94422. [`&${componentCls}-checked ${switchInnerCls}`]: {
  94423. [`${switchInnerCls}-checked`]: {
  94424. marginInlineStart: calc(token.marginXXS).mul(-1).div(2).equal(),
  94425. marginInlineEnd: calc(token.marginXXS).div(2).equal()
  94426. }
  94427. }
  94428. }
  94429. }
  94430. }
  94431. };
  94432. };
  94433. const genSwitchLoadingStyle = token => {
  94434. const {
  94435. componentCls,
  94436. handleSize,
  94437. calc
  94438. } = token;
  94439. return {
  94440. [componentCls]: {
  94441. [`${componentCls}-loading-icon${token.iconCls}`]: {
  94442. position: 'relative',
  94443. top: calc(calc(handleSize).sub(token.fontSize)).div(2).equal(),
  94444. color: token.switchLoadingIconColor,
  94445. verticalAlign: 'top'
  94446. },
  94447. [`&${componentCls}-checked ${componentCls}-loading-icon`]: {
  94448. color: token.switchColor
  94449. }
  94450. }
  94451. };
  94452. };
  94453. const genSwitchHandleStyle = token => {
  94454. const {
  94455. componentCls,
  94456. trackPadding,
  94457. handleBg,
  94458. handleShadow,
  94459. handleSize,
  94460. calc
  94461. } = token;
  94462. const switchHandleCls = `${componentCls}-handle`;
  94463. return {
  94464. [componentCls]: {
  94465. [switchHandleCls]: {
  94466. position: 'absolute',
  94467. top: trackPadding,
  94468. insetInlineStart: trackPadding,
  94469. width: handleSize,
  94470. height: handleSize,
  94471. transition: `all ${token.switchDuration} ease-in-out`,
  94472. '&::before': {
  94473. position: 'absolute',
  94474. top: 0,
  94475. insetInlineEnd: 0,
  94476. bottom: 0,
  94477. insetInlineStart: 0,
  94478. backgroundColor: handleBg,
  94479. borderRadius: calc(handleSize).div(2).equal(),
  94480. boxShadow: handleShadow,
  94481. transition: `all ${token.switchDuration} ease-in-out`,
  94482. content: '""'
  94483. }
  94484. },
  94485. [`&${componentCls}-checked ${switchHandleCls}`]: {
  94486. insetInlineStart: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(handleSize).add(trackPadding).equal())})`
  94487. },
  94488. [`&:not(${componentCls}-disabled):active`]: {
  94489. [`${switchHandleCls}::before`]: {
  94490. insetInlineEnd: token.switchHandleActiveInset,
  94491. insetInlineStart: 0
  94492. },
  94493. [`&${componentCls}-checked ${switchHandleCls}::before`]: {
  94494. insetInlineEnd: 0,
  94495. insetInlineStart: token.switchHandleActiveInset
  94496. }
  94497. }
  94498. }
  94499. };
  94500. };
  94501. const genSwitchInnerStyle = token => {
  94502. const {
  94503. componentCls,
  94504. trackHeight,
  94505. trackPadding,
  94506. innerMinMargin,
  94507. innerMaxMargin,
  94508. handleSize,
  94509. calc
  94510. } = token;
  94511. const switchInnerCls = `${componentCls}-inner`;
  94512. const trackPaddingCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(handleSize).add(calc(trackPadding).mul(2)).equal());
  94513. const innerMaxMarginCalc = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(innerMaxMargin).mul(2).equal());
  94514. return {
  94515. [componentCls]: {
  94516. [switchInnerCls]: {
  94517. display: 'block',
  94518. overflow: 'hidden',
  94519. borderRadius: 100,
  94520. height: '100%',
  94521. paddingInlineStart: innerMaxMargin,
  94522. paddingInlineEnd: innerMinMargin,
  94523. transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
  94524. [`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
  94525. display: 'block',
  94526. color: token.colorTextLightSolid,
  94527. fontSize: token.fontSizeSM,
  94528. transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
  94529. pointerEvents: 'none',
  94530. minHeight: trackHeight
  94531. },
  94532. [`${switchInnerCls}-checked`]: {
  94533. marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,
  94534. marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`
  94535. },
  94536. [`${switchInnerCls}-unchecked`]: {
  94537. marginTop: calc(trackHeight).mul(-1).equal(),
  94538. marginInlineStart: 0,
  94539. marginInlineEnd: 0
  94540. }
  94541. },
  94542. [`&${componentCls}-checked ${switchInnerCls}`]: {
  94543. paddingInlineStart: innerMinMargin,
  94544. paddingInlineEnd: innerMaxMargin,
  94545. [`${switchInnerCls}-checked`]: {
  94546. marginInlineStart: 0,
  94547. marginInlineEnd: 0
  94548. },
  94549. [`${switchInnerCls}-unchecked`]: {
  94550. marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,
  94551. marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`
  94552. }
  94553. },
  94554. [`&:not(${componentCls}-disabled):active`]: {
  94555. [`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
  94556. [`${switchInnerCls}-unchecked`]: {
  94557. marginInlineStart: calc(trackPadding).mul(2).equal(),
  94558. marginInlineEnd: calc(trackPadding).mul(-1).mul(2).equal()
  94559. }
  94560. },
  94561. [`&${componentCls}-checked ${switchInnerCls}`]: {
  94562. [`${switchInnerCls}-checked`]: {
  94563. marginInlineStart: calc(trackPadding).mul(-1).mul(2).equal(),
  94564. marginInlineEnd: calc(trackPadding).mul(2).equal()
  94565. }
  94566. }
  94567. }
  94568. }
  94569. };
  94570. };
  94571. const genSwitchStyle = token => {
  94572. const {
  94573. componentCls,
  94574. trackHeight,
  94575. trackMinWidth
  94576. } = token;
  94577. return {
  94578. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
  94579. position: 'relative',
  94580. display: 'inline-block',
  94581. boxSizing: 'border-box',
  94582. minWidth: trackMinWidth,
  94583. height: trackHeight,
  94584. lineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(trackHeight),
  94585. verticalAlign: 'middle',
  94586. background: token.colorTextQuaternary,
  94587. border: '0',
  94588. borderRadius: 100,
  94589. cursor: 'pointer',
  94590. transition: `all ${token.motionDurationMid}`,
  94591. userSelect: 'none',
  94592. [`&:hover:not(${componentCls}-disabled)`]: {
  94593. background: token.colorTextTertiary
  94594. }
  94595. }), (0,_style__WEBPACK_IMPORTED_MODULE_2__.genFocusStyle)(token)), {
  94596. [`&${componentCls}-checked`]: {
  94597. background: token.switchColor,
  94598. [`&:hover:not(${componentCls}-disabled)`]: {
  94599. background: token.colorPrimaryHover
  94600. }
  94601. },
  94602. [`&${componentCls}-loading, &${componentCls}-disabled`]: {
  94603. cursor: 'not-allowed',
  94604. opacity: token.switchDisabledOpacity,
  94605. '*': {
  94606. boxShadow: 'none',
  94607. cursor: 'not-allowed'
  94608. }
  94609. },
  94610. // rtl style
  94611. [`&${componentCls}-rtl`]: {
  94612. direction: 'rtl'
  94613. }
  94614. })
  94615. };
  94616. };
  94617. // ============================== Export ==============================
  94618. const prepareComponentToken = token => {
  94619. const {
  94620. fontSize,
  94621. lineHeight,
  94622. controlHeight,
  94623. colorWhite
  94624. } = token;
  94625. const height = fontSize * lineHeight;
  94626. const heightSM = controlHeight / 2;
  94627. const padding = 2; // Fixed value
  94628. const handleSize = height - padding * 2;
  94629. const handleSizeSM = heightSM - padding * 2;
  94630. return {
  94631. trackHeight: height,
  94632. trackHeightSM: heightSM,
  94633. trackMinWidth: handleSize * 2 + padding * 4,
  94634. trackMinWidthSM: handleSizeSM * 2 + padding * 2,
  94635. trackPadding: padding,
  94636. // Fixed value
  94637. handleBg: colorWhite,
  94638. handleSize,
  94639. handleSizeSM,
  94640. handleShadow: `0 2px 4px 0 ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor('#00230b').setA(0.2).toRgbString()}`,
  94641. innerMinMargin: handleSize / 2,
  94642. innerMaxMargin: handleSize + padding + padding * 2,
  94643. innerMinMarginSM: handleSizeSM / 2,
  94644. innerMaxMarginSM: handleSizeSM + padding + padding * 2
  94645. };
  94646. };
  94647. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Switch', token => {
  94648. const switchToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  94649. switchDuration: token.motionDurationMid,
  94650. switchColor: token.colorPrimary,
  94651. switchDisabledOpacity: token.opacityLoading,
  94652. switchLoadingIconSize: token.calc(token.fontSizeIcon).mul(0.75).equal(),
  94653. switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
  94654. switchHandleActiveInset: '-30%'
  94655. });
  94656. return [genSwitchStyle(switchToken),
  94657. // inner style
  94658. genSwitchInnerStyle(switchToken),
  94659. // handle style
  94660. genSwitchHandleStyle(switchToken),
  94661. // loading style
  94662. genSwitchLoadingStyle(switchToken),
  94663. // small style
  94664. genSwitchSmallStyle(switchToken)];
  94665. }, prepareComponentToken));
  94666. /***/ }),
  94667. /***/ "./components/table/style/index.ts":
  94668. /*!******************************************************!*\
  94669. !*** ./components/table/style/index.ts + 15 modules ***!
  94670. \******************************************************/
  94671. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  94672. "use strict";
  94673. // ESM COMPAT FLAG
  94674. __webpack_require__.r(__webpack_exports__);
  94675. // EXPORTS
  94676. __webpack_require__.d(__webpack_exports__, {
  94677. "default": function() { return /* binding */ table_style; },
  94678. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  94679. });
  94680. // EXTERNAL MODULE: ./alias/cssinjs.js
  94681. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  94682. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  94683. var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  94684. // EXTERNAL MODULE: ./components/style/index.tsx
  94685. var style = __webpack_require__("./components/style/index.tsx");
  94686. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  94687. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  94688. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  94689. var cssinjs_utils_es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  94690. ;// ./components/table/style/bordered.ts
  94691. const genBorderedStyle = token => {
  94692. const {
  94693. componentCls,
  94694. lineWidth,
  94695. lineType,
  94696. tableBorderColor,
  94697. tableHeaderBg,
  94698. tablePaddingVertical,
  94699. tablePaddingHorizontal,
  94700. calc
  94701. } = token;
  94702. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
  94703. const getSizeBorderStyle = (size, paddingVertical, paddingHorizontal) => ({
  94704. [`&${componentCls}-${size}`]: {
  94705. [`> ${componentCls}-container`]: {
  94706. [`> ${componentCls}-content, > ${componentCls}-body`]: {
  94707. [`
  94708. > table > tbody > tr > th,
  94709. > table > tbody > tr > td
  94710. `]: {
  94711. [`> ${componentCls}-expanded-row-fixed`]: {
  94712. margin: `${(0,cssinjs.unit)(calc(paddingVertical).mul(-1).equal())}
  94713. ${(0,cssinjs.unit)(calc(calc(paddingHorizontal).add(lineWidth)).mul(-1).equal())}`
  94714. }
  94715. }
  94716. }
  94717. }
  94718. }
  94719. });
  94720. return {
  94721. [`${componentCls}-wrapper`]: {
  94722. [`${componentCls}${componentCls}-bordered`]: Object.assign(Object.assign(Object.assign({
  94723. // ============================ Title =============================
  94724. [`> ${componentCls}-title`]: {
  94725. border: tableBorder,
  94726. borderBottom: 0
  94727. },
  94728. // ============================ Content ============================
  94729. [`> ${componentCls}-container`]: {
  94730. borderInlineStart: tableBorder,
  94731. borderTop: tableBorder,
  94732. [`
  94733. > ${componentCls}-content,
  94734. > ${componentCls}-header,
  94735. > ${componentCls}-body,
  94736. > ${componentCls}-summary
  94737. `]: {
  94738. '> table': {
  94739. // ============================= Cell =============================
  94740. [`
  94741. > thead > tr > th,
  94742. > thead > tr > td,
  94743. > tbody > tr > th,
  94744. > tbody > tr > td,
  94745. > tfoot > tr > th,
  94746. > tfoot > tr > td
  94747. `]: {
  94748. borderInlineEnd: tableBorder
  94749. },
  94750. // ============================ Header ============================
  94751. '> thead': {
  94752. '> tr:not(:last-child) > th': {
  94753. borderBottom: tableBorder
  94754. },
  94755. '> tr > th::before': {
  94756. backgroundColor: 'transparent !important'
  94757. }
  94758. },
  94759. // Fixed right should provides additional border
  94760. [`
  94761. > thead > tr,
  94762. > tbody > tr,
  94763. > tfoot > tr
  94764. `]: {
  94765. [`> ${componentCls}-cell-fix-right-first::after`]: {
  94766. borderInlineEnd: tableBorder
  94767. }
  94768. },
  94769. // ========================== Expandable ==========================
  94770. [`
  94771. > tbody > tr > th,
  94772. > tbody > tr > td
  94773. `]: {
  94774. [`> ${componentCls}-expanded-row-fixed`]: {
  94775. margin: `${(0,cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0,cssinjs.unit)(calc(calc(tablePaddingHorizontal).add(lineWidth)).mul(-1).equal())}`,
  94776. '&::after': {
  94777. position: 'absolute',
  94778. top: 0,
  94779. insetInlineEnd: lineWidth,
  94780. bottom: 0,
  94781. borderInlineEnd: tableBorder,
  94782. content: '""'
  94783. }
  94784. }
  94785. }
  94786. }
  94787. }
  94788. },
  94789. // ============================ Scroll ============================
  94790. [`&${componentCls}-scroll-horizontal`]: {
  94791. [`> ${componentCls}-container > ${componentCls}-body`]: {
  94792. '> table > tbody': {
  94793. [`
  94794. > tr${componentCls}-expanded-row,
  94795. > tr${componentCls}-placeholder
  94796. `]: {
  94797. '> th, > td': {
  94798. borderInlineEnd: 0
  94799. }
  94800. }
  94801. }
  94802. }
  94803. }
  94804. }, getSizeBorderStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle)), getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall)), {
  94805. // ============================ Footer ============================
  94806. [`> ${componentCls}-footer`]: {
  94807. border: tableBorder,
  94808. borderTop: 0
  94809. }
  94810. }),
  94811. // ============================ Nested ============================
  94812. [`${componentCls}-cell`]: {
  94813. [`${componentCls}-container:first-child`]: {
  94814. // :first-child to avoid the case when bordered and title is set
  94815. borderTop: 0
  94816. },
  94817. // https://github.com/ant-design/ant-design/issues/35577
  94818. '&-scrollbar:not([rowspan])': {
  94819. boxShadow: `0 ${(0,cssinjs.unit)(lineWidth)} 0 ${(0,cssinjs.unit)(lineWidth)} ${tableHeaderBg}`
  94820. }
  94821. },
  94822. [`${componentCls}-bordered ${componentCls}-cell-scrollbar`]: {
  94823. borderInlineEnd: tableBorder
  94824. }
  94825. }
  94826. };
  94827. };
  94828. /* harmony default export */ var bordered = (genBorderedStyle);
  94829. ;// ./components/table/style/ellipsis.ts
  94830. const genEllipsisStyle = token => {
  94831. const {
  94832. componentCls
  94833. } = token;
  94834. return {
  94835. [`${componentCls}-wrapper`]: {
  94836. [`${componentCls}-cell-ellipsis`]: Object.assign(Object.assign({}, style.textEllipsis), {
  94837. wordBreak: 'keep-all',
  94838. // Fixed first or last should special process
  94839. [`
  94840. &${componentCls}-cell-fix-left-last,
  94841. &${componentCls}-cell-fix-right-first
  94842. `]: {
  94843. overflow: 'visible',
  94844. [`${componentCls}-cell-content`]: {
  94845. display: 'block',
  94846. overflow: 'hidden',
  94847. textOverflow: 'ellipsis'
  94848. }
  94849. },
  94850. [`${componentCls}-column-title`]: {
  94851. overflow: 'hidden',
  94852. textOverflow: 'ellipsis',
  94853. wordBreak: 'keep-all'
  94854. }
  94855. })
  94856. }
  94857. };
  94858. };
  94859. /* harmony default export */ var ellipsis = (genEllipsisStyle);
  94860. ;// ./components/table/style/empty.ts
  94861. // ========================= Placeholder ==========================
  94862. const genEmptyStyle = token => {
  94863. const {
  94864. componentCls
  94865. } = token;
  94866. return {
  94867. [`${componentCls}-wrapper`]: {
  94868. [`${componentCls}-tbody > tr${componentCls}-placeholder`]: {
  94869. textAlign: 'center',
  94870. color: token.colorTextDisabled,
  94871. [`
  94872. &:hover > th,
  94873. &:hover > td,
  94874. `]: {
  94875. background: token.colorBgContainer
  94876. }
  94877. }
  94878. }
  94879. };
  94880. };
  94881. /* harmony default export */ var empty = (genEmptyStyle);
  94882. ;// ./components/table/style/expand.ts
  94883. const genExpandStyle = token => {
  94884. const {
  94885. componentCls,
  94886. antCls,
  94887. motionDurationSlow,
  94888. lineWidth,
  94889. paddingXS,
  94890. lineType,
  94891. tableBorderColor,
  94892. tableExpandIconBg,
  94893. tableExpandColumnWidth,
  94894. borderRadius,
  94895. tablePaddingVertical,
  94896. tablePaddingHorizontal,
  94897. tableExpandedRowBg,
  94898. paddingXXS,
  94899. expandIconMarginTop,
  94900. expandIconSize,
  94901. expandIconHalfInner,
  94902. expandIconScale,
  94903. calc
  94904. } = token;
  94905. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
  94906. const expandIconLineOffset = calc(paddingXXS).sub(lineWidth).equal();
  94907. return {
  94908. [`${componentCls}-wrapper`]: {
  94909. [`${componentCls}-expand-icon-col`]: {
  94910. width: tableExpandColumnWidth
  94911. },
  94912. [`${componentCls}-row-expand-icon-cell`]: {
  94913. textAlign: 'center',
  94914. [`${componentCls}-row-expand-icon`]: {
  94915. display: 'inline-flex',
  94916. float: 'none',
  94917. verticalAlign: 'sub'
  94918. }
  94919. },
  94920. [`${componentCls}-row-indent`]: {
  94921. height: 1,
  94922. float: 'left'
  94923. },
  94924. [`${componentCls}-row-expand-icon`]: Object.assign(Object.assign({}, (0,style.operationUnit)(token)), {
  94925. position: 'relative',
  94926. float: 'left',
  94927. width: expandIconSize,
  94928. height: expandIconSize,
  94929. color: 'inherit',
  94930. lineHeight: (0,cssinjs.unit)(expandIconSize),
  94931. background: tableExpandIconBg,
  94932. border: tableBorder,
  94933. borderRadius,
  94934. transform: `scale(${expandIconScale})`,
  94935. '&:focus, &:hover, &:active': {
  94936. borderColor: 'currentcolor'
  94937. },
  94938. '&::before, &::after': {
  94939. position: 'absolute',
  94940. background: 'currentcolor',
  94941. transition: `transform ${motionDurationSlow} ease-out`,
  94942. content: '""'
  94943. },
  94944. '&::before': {
  94945. top: expandIconHalfInner,
  94946. insetInlineEnd: expandIconLineOffset,
  94947. insetInlineStart: expandIconLineOffset,
  94948. height: lineWidth
  94949. },
  94950. '&::after': {
  94951. top: expandIconLineOffset,
  94952. bottom: expandIconLineOffset,
  94953. insetInlineStart: expandIconHalfInner,
  94954. width: lineWidth,
  94955. transform: 'rotate(90deg)'
  94956. },
  94957. // Motion effect
  94958. '&-collapsed::before': {
  94959. transform: 'rotate(-180deg)'
  94960. },
  94961. '&-collapsed::after': {
  94962. transform: 'rotate(0deg)'
  94963. },
  94964. '&-spaced': {
  94965. '&::before, &::after': {
  94966. display: 'none',
  94967. content: 'none'
  94968. },
  94969. background: 'transparent',
  94970. border: 0,
  94971. visibility: 'hidden'
  94972. }
  94973. }),
  94974. [`${componentCls}-row-indent + ${componentCls}-row-expand-icon`]: {
  94975. marginTop: expandIconMarginTop,
  94976. marginInlineEnd: paddingXS
  94977. },
  94978. [`tr${componentCls}-expanded-row`]: {
  94979. '&, &:hover': {
  94980. '> th, > td': {
  94981. background: tableExpandedRowBg
  94982. }
  94983. },
  94984. // https://github.com/ant-design/ant-design/issues/25573
  94985. [`${antCls}-descriptions-view`]: {
  94986. display: 'flex',
  94987. table: {
  94988. flex: 'auto',
  94989. width: '100%'
  94990. }
  94991. }
  94992. },
  94993. // With fixed
  94994. [`${componentCls}-expanded-row-fixed`]: {
  94995. position: 'relative',
  94996. margin: `${(0,cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0,cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`,
  94997. padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`
  94998. }
  94999. }
  95000. };
  95001. };
  95002. /* harmony default export */ var expand = (genExpandStyle);
  95003. ;// ./components/table/style/filter.ts
  95004. const genFilterStyle = token => {
  95005. const {
  95006. componentCls,
  95007. antCls,
  95008. iconCls,
  95009. tableFilterDropdownWidth,
  95010. tableFilterDropdownSearchWidth,
  95011. paddingXXS,
  95012. paddingXS,
  95013. colorText,
  95014. lineWidth,
  95015. lineType,
  95016. tableBorderColor,
  95017. headerIconColor,
  95018. fontSizeSM,
  95019. tablePaddingHorizontal,
  95020. borderRadius,
  95021. motionDurationSlow,
  95022. colorIcon,
  95023. colorPrimary,
  95024. tableHeaderFilterActiveBg,
  95025. colorTextDisabled,
  95026. tableFilterDropdownBg,
  95027. tableFilterDropdownHeight,
  95028. controlItemBgHover,
  95029. controlItemBgActive,
  95030. boxShadowSecondary,
  95031. filterDropdownMenuBg,
  95032. calc
  95033. } = token;
  95034. const dropdownPrefixCls = `${antCls}-dropdown`;
  95035. const tableFilterDropdownPrefixCls = `${componentCls}-filter-dropdown`;
  95036. const treePrefixCls = `${antCls}-tree`;
  95037. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
  95038. return [{
  95039. [`${componentCls}-wrapper`]: {
  95040. [`${componentCls}-filter-column`]: {
  95041. display: 'flex',
  95042. justifyContent: 'space-between'
  95043. },
  95044. [`${componentCls}-filter-trigger`]: {
  95045. position: 'relative',
  95046. display: 'flex',
  95047. alignItems: 'center',
  95048. marginBlock: calc(paddingXXS).mul(-1).equal(),
  95049. marginInline: `${(0,cssinjs.unit)(paddingXXS)} ${(0,cssinjs.unit)(calc(tablePaddingHorizontal).div(2).mul(-1).equal())}`,
  95050. padding: `0 ${(0,cssinjs.unit)(paddingXXS)}`,
  95051. color: headerIconColor,
  95052. fontSize: fontSizeSM,
  95053. borderRadius,
  95054. cursor: 'pointer',
  95055. transition: `all ${motionDurationSlow}`,
  95056. '&:hover': {
  95057. color: colorIcon,
  95058. background: tableHeaderFilterActiveBg
  95059. },
  95060. '&.active': {
  95061. color: colorPrimary
  95062. }
  95063. }
  95064. }
  95065. }, {
  95066. // Dropdown
  95067. [`${antCls}-dropdown`]: {
  95068. [tableFilterDropdownPrefixCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  95069. minWidth: tableFilterDropdownWidth,
  95070. backgroundColor: tableFilterDropdownBg,
  95071. borderRadius,
  95072. boxShadow: boxShadowSecondary,
  95073. overflow: 'hidden',
  95074. // Reset menu
  95075. [`${dropdownPrefixCls}-menu`]: {
  95076. // https://github.com/ant-design/ant-design/issues/4916
  95077. // https://github.com/ant-design/ant-design/issues/19542
  95078. maxHeight: tableFilterDropdownHeight,
  95079. overflowX: 'hidden',
  95080. border: 0,
  95081. boxShadow: 'none',
  95082. borderRadius: 'unset',
  95083. backgroundColor: filterDropdownMenuBg,
  95084. '&:empty::after': {
  95085. display: 'block',
  95086. padding: `${(0,cssinjs.unit)(paddingXS)} 0`,
  95087. color: colorTextDisabled,
  95088. fontSize: fontSizeSM,
  95089. textAlign: 'center',
  95090. content: '"Not Found"'
  95091. }
  95092. },
  95093. [`${tableFilterDropdownPrefixCls}-tree`]: {
  95094. paddingBlock: `${(0,cssinjs.unit)(paddingXS)} 0`,
  95095. paddingInline: paddingXS,
  95096. [treePrefixCls]: {
  95097. padding: 0
  95098. },
  95099. [`${treePrefixCls}-treenode ${treePrefixCls}-node-content-wrapper:hover`]: {
  95100. backgroundColor: controlItemBgHover
  95101. },
  95102. [`${treePrefixCls}-treenode-checkbox-checked ${treePrefixCls}-node-content-wrapper`]: {
  95103. '&, &:hover': {
  95104. backgroundColor: controlItemBgActive
  95105. }
  95106. }
  95107. },
  95108. [`${tableFilterDropdownPrefixCls}-search`]: {
  95109. padding: paddingXS,
  95110. borderBottom: tableBorder,
  95111. '&-input': {
  95112. input: {
  95113. minWidth: tableFilterDropdownSearchWidth
  95114. },
  95115. [iconCls]: {
  95116. color: colorTextDisabled
  95117. }
  95118. }
  95119. },
  95120. [`${tableFilterDropdownPrefixCls}-checkall`]: {
  95121. width: '100%',
  95122. marginBottom: paddingXXS,
  95123. marginInlineStart: paddingXXS
  95124. },
  95125. // Operation
  95126. [`${tableFilterDropdownPrefixCls}-btns`]: {
  95127. display: 'flex',
  95128. justifyContent: 'space-between',
  95129. padding: `${(0,cssinjs.unit)(calc(paddingXS).sub(lineWidth).equal())} ${(0,cssinjs.unit)(paddingXS)}`,
  95130. overflow: 'hidden',
  95131. borderTop: tableBorder
  95132. }
  95133. })
  95134. }
  95135. },
  95136. // Dropdown Menu & SubMenu
  95137. {
  95138. // submenu of table filter dropdown
  95139. [`${antCls}-dropdown ${tableFilterDropdownPrefixCls}, ${tableFilterDropdownPrefixCls}-submenu`]: {
  95140. // Checkbox
  95141. [`${antCls}-checkbox-wrapper + span`]: {
  95142. paddingInlineStart: paddingXS,
  95143. color: colorText
  95144. },
  95145. '> ul': {
  95146. maxHeight: 'calc(100vh - 130px)',
  95147. overflowX: 'hidden',
  95148. overflowY: 'auto'
  95149. }
  95150. }
  95151. }];
  95152. };
  95153. /* harmony default export */ var filter = (genFilterStyle);
  95154. ;// ./components/table/style/fixed.ts
  95155. const genFixedStyle = token => {
  95156. const {
  95157. componentCls,
  95158. lineWidth,
  95159. colorSplit,
  95160. motionDurationSlow,
  95161. zIndexTableFixed,
  95162. tableBg,
  95163. zIndexTableSticky,
  95164. calc
  95165. } = token;
  95166. const shadowColor = colorSplit;
  95167. // Follow style is magic of shadow which should not follow token:
  95168. return {
  95169. [`${componentCls}-wrapper`]: {
  95170. [`
  95171. ${componentCls}-cell-fix-left,
  95172. ${componentCls}-cell-fix-right
  95173. `]: {
  95174. position: 'sticky !important',
  95175. zIndex: zIndexTableFixed,
  95176. background: tableBg
  95177. },
  95178. [`
  95179. ${componentCls}-cell-fix-left-first::after,
  95180. ${componentCls}-cell-fix-left-last::after
  95181. `]: {
  95182. position: 'absolute',
  95183. top: 0,
  95184. right: {
  95185. _skip_check_: true,
  95186. value: 0
  95187. },
  95188. bottom: calc(lineWidth).mul(-1).equal(),
  95189. width: 30,
  95190. transform: 'translateX(100%)',
  95191. transition: `box-shadow ${motionDurationSlow}`,
  95192. content: '""',
  95193. pointerEvents: 'none',
  95194. // fix issues: https://github.com/ant-design/ant-design/issues/54587
  95195. willChange: 'transform'
  95196. },
  95197. [`${componentCls}-cell-fix-left-all::after`]: {
  95198. display: 'none'
  95199. },
  95200. [`
  95201. ${componentCls}-cell-fix-right-first::after,
  95202. ${componentCls}-cell-fix-right-last::after
  95203. `]: {
  95204. position: 'absolute',
  95205. top: 0,
  95206. bottom: calc(lineWidth).mul(-1).equal(),
  95207. left: {
  95208. _skip_check_: true,
  95209. value: 0
  95210. },
  95211. width: 30,
  95212. transform: 'translateX(-100%)',
  95213. transition: `box-shadow ${motionDurationSlow}`,
  95214. content: '""',
  95215. pointerEvents: 'none'
  95216. },
  95217. [`${componentCls}-container`]: {
  95218. position: 'relative',
  95219. '&::before, &::after': {
  95220. position: 'absolute',
  95221. top: 0,
  95222. bottom: 0,
  95223. zIndex: calc(zIndexTableSticky).add(1).equal({
  95224. unit: false
  95225. }),
  95226. width: 30,
  95227. transition: `box-shadow ${motionDurationSlow}`,
  95228. content: '""',
  95229. pointerEvents: 'none'
  95230. },
  95231. '&::before': {
  95232. insetInlineStart: 0
  95233. },
  95234. '&::after': {
  95235. insetInlineEnd: 0
  95236. }
  95237. },
  95238. [`${componentCls}-ping-left`]: {
  95239. [`&:not(${componentCls}-has-fix-left) ${componentCls}-container::before`]: {
  95240. boxShadow: `inset 10px 0 8px -8px ${shadowColor}`
  95241. },
  95242. [`
  95243. ${componentCls}-cell-fix-left-first::after,
  95244. ${componentCls}-cell-fix-left-last::after
  95245. `]: {
  95246. boxShadow: `inset 10px 0 8px -8px ${shadowColor}`
  95247. },
  95248. [`${componentCls}-cell-fix-left-last::before`]: {
  95249. backgroundColor: 'transparent !important'
  95250. }
  95251. },
  95252. [`${componentCls}-ping-right`]: {
  95253. [`&:not(${componentCls}-has-fix-right) ${componentCls}-container::after`]: {
  95254. boxShadow: `inset -10px 0 8px -8px ${shadowColor}`
  95255. },
  95256. [`
  95257. ${componentCls}-cell-fix-right-first::after,
  95258. ${componentCls}-cell-fix-right-last::after
  95259. `]: {
  95260. boxShadow: `inset -10px 0 8px -8px ${shadowColor}`
  95261. }
  95262. },
  95263. // Gapped fixed Columns do not show the shadow
  95264. [`${componentCls}-fixed-column-gapped`]: {
  95265. [`
  95266. ${componentCls}-cell-fix-left-first::after,
  95267. ${componentCls}-cell-fix-left-last::after,
  95268. ${componentCls}-cell-fix-right-first::after,
  95269. ${componentCls}-cell-fix-right-last::after
  95270. `]: {
  95271. boxShadow: 'none'
  95272. }
  95273. }
  95274. }
  95275. };
  95276. };
  95277. /* harmony default export */ var fixed = (genFixedStyle);
  95278. ;// ./components/table/style/pagination.ts
  95279. const genPaginationStyle = token => {
  95280. const {
  95281. componentCls,
  95282. antCls,
  95283. margin
  95284. } = token;
  95285. return {
  95286. [`${componentCls}-wrapper`]: {
  95287. // ========================== Pagination ==========================
  95288. [`${componentCls}-pagination${antCls}-pagination`]: {
  95289. margin: `${(0,cssinjs.unit)(margin)} 0`
  95290. },
  95291. [`${componentCls}-pagination`]: {
  95292. display: 'flex',
  95293. flexWrap: 'wrap',
  95294. rowGap: token.paddingXS,
  95295. '> *': {
  95296. flex: 'none'
  95297. },
  95298. '&-left': {
  95299. justifyContent: 'flex-start'
  95300. },
  95301. '&-center': {
  95302. justifyContent: 'center'
  95303. },
  95304. '&-right': {
  95305. justifyContent: 'flex-end'
  95306. }
  95307. }
  95308. }
  95309. };
  95310. };
  95311. /* harmony default export */ var pagination = (genPaginationStyle);
  95312. ;// ./components/table/style/radius.ts
  95313. const genRadiusStyle = token => {
  95314. const {
  95315. componentCls,
  95316. tableRadius
  95317. } = token;
  95318. return {
  95319. [`${componentCls}-wrapper`]: {
  95320. [componentCls]: {
  95321. // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
  95322. [`${componentCls}-title, ${componentCls}-header`]: {
  95323. borderRadius: `${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)} 0 0`
  95324. },
  95325. [`${componentCls}-title + ${componentCls}-container`]: {
  95326. borderStartStartRadius: 0,
  95327. borderStartEndRadius: 0,
  95328. // https://github.com/ant-design/ant-design/issues/41975
  95329. [`${componentCls}-header, table`]: {
  95330. borderRadius: 0
  95331. },
  95332. 'table > thead > tr:first-child': {
  95333. 'th:first-child, th:last-child, td:first-child, td:last-child': {
  95334. borderRadius: 0
  95335. }
  95336. }
  95337. },
  95338. '&-container': {
  95339. borderStartStartRadius: tableRadius,
  95340. borderStartEndRadius: tableRadius,
  95341. 'table > thead > tr:first-child': {
  95342. '> *:first-child': {
  95343. borderStartStartRadius: tableRadius
  95344. },
  95345. '> *:last-child': {
  95346. borderStartEndRadius: tableRadius
  95347. }
  95348. }
  95349. },
  95350. '&-footer': {
  95351. borderRadius: `0 0 ${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)}`
  95352. }
  95353. }
  95354. }
  95355. };
  95356. };
  95357. /* harmony default export */ var radius = (genRadiusStyle);
  95358. ;// ./components/table/style/rtl.ts
  95359. const genStyle = token => {
  95360. const {
  95361. componentCls
  95362. } = token;
  95363. return {
  95364. [`${componentCls}-wrapper-rtl`]: {
  95365. direction: 'rtl',
  95366. table: {
  95367. direction: 'rtl'
  95368. },
  95369. [`${componentCls}-pagination-left`]: {
  95370. justifyContent: 'flex-end'
  95371. },
  95372. [`${componentCls}-pagination-right`]: {
  95373. justifyContent: 'flex-start'
  95374. },
  95375. [`${componentCls}-row-expand-icon`]: {
  95376. float: 'right',
  95377. '&::after': {
  95378. transform: 'rotate(-90deg)'
  95379. },
  95380. '&-collapsed::before': {
  95381. transform: 'rotate(180deg)'
  95382. },
  95383. '&-collapsed::after': {
  95384. transform: 'rotate(0deg)'
  95385. }
  95386. },
  95387. [`${componentCls}-container`]: {
  95388. '&::before': {
  95389. insetInlineStart: 'unset',
  95390. insetInlineEnd: 0
  95391. },
  95392. '&::after': {
  95393. insetInlineStart: 0,
  95394. insetInlineEnd: 'unset'
  95395. },
  95396. [`${componentCls}-row-indent`]: {
  95397. float: 'right'
  95398. }
  95399. }
  95400. }
  95401. };
  95402. };
  95403. /* harmony default export */ var rtl = (genStyle);
  95404. ;// ./components/table/style/selection.ts
  95405. const genSelectionStyle = token => {
  95406. const {
  95407. componentCls,
  95408. antCls,
  95409. iconCls,
  95410. fontSizeIcon,
  95411. padding,
  95412. paddingXS,
  95413. headerIconColor,
  95414. headerIconHoverColor,
  95415. tableSelectionColumnWidth,
  95416. tableSelectedRowBg,
  95417. tableSelectedRowHoverBg,
  95418. tableRowHoverBg,
  95419. tablePaddingHorizontal,
  95420. calc
  95421. } = token;
  95422. return {
  95423. [`${componentCls}-wrapper`]: {
  95424. // ========================== Selections ==========================
  95425. [`${componentCls}-selection-col`]: {
  95426. width: tableSelectionColumnWidth,
  95427. [`&${componentCls}-selection-col-with-dropdown`]: {
  95428. width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).equal()
  95429. }
  95430. },
  95431. [`${componentCls}-bordered ${componentCls}-selection-col`]: {
  95432. width: calc(tableSelectionColumnWidth).add(calc(paddingXS).mul(2)).equal(),
  95433. [`&${componentCls}-selection-col-with-dropdown`]: {
  95434. width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).add(calc(paddingXS).mul(2)).equal()
  95435. }
  95436. },
  95437. [`
  95438. table tr th${componentCls}-selection-column,
  95439. table tr td${componentCls}-selection-column,
  95440. ${componentCls}-selection-column
  95441. `]: {
  95442. paddingInlineEnd: token.paddingXS,
  95443. paddingInlineStart: token.paddingXS,
  95444. textAlign: 'center',
  95445. [`${antCls}-radio-wrapper`]: {
  95446. marginInlineEnd: 0
  95447. }
  95448. },
  95449. [`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: {
  95450. zIndex: calc(token.zIndexTableFixed).add(1).equal({
  95451. unit: false
  95452. })
  95453. },
  95454. [`table tr th${componentCls}-selection-column::after`]: {
  95455. backgroundColor: 'transparent !important'
  95456. },
  95457. [`${componentCls}-selection`]: {
  95458. position: 'relative',
  95459. display: 'inline-flex',
  95460. flexDirection: 'column'
  95461. },
  95462. [`${componentCls}-selection-extra`]: {
  95463. position: 'absolute',
  95464. top: 0,
  95465. zIndex: 1,
  95466. cursor: 'pointer',
  95467. transition: `all ${token.motionDurationSlow}`,
  95468. marginInlineStart: '100%',
  95469. paddingInlineStart: (0,cssinjs.unit)(calc(tablePaddingHorizontal).div(4).equal()),
  95470. [iconCls]: {
  95471. color: headerIconColor,
  95472. fontSize: fontSizeIcon,
  95473. verticalAlign: 'baseline',
  95474. '&:hover': {
  95475. color: headerIconHoverColor
  95476. }
  95477. }
  95478. },
  95479. // ============================= Rows =============================
  95480. [`${componentCls}-tbody`]: {
  95481. [`${componentCls}-row`]: {
  95482. [`&${componentCls}-row-selected`]: {
  95483. [`> ${componentCls}-cell`]: {
  95484. background: tableSelectedRowBg,
  95485. '&-row-hover': {
  95486. background: tableSelectedRowHoverBg
  95487. }
  95488. }
  95489. },
  95490. [`> ${componentCls}-cell-row-hover`]: {
  95491. background: tableRowHoverBg
  95492. }
  95493. }
  95494. }
  95495. }
  95496. };
  95497. };
  95498. /* harmony default export */ var selection = (genSelectionStyle);
  95499. ;// ./components/table/style/size.ts
  95500. const genSizeStyle = token => {
  95501. const {
  95502. componentCls,
  95503. tableExpandColumnWidth,
  95504. calc
  95505. } = token;
  95506. const getSizeStyle = (size, paddingVertical, paddingHorizontal, fontSize) => ({
  95507. [`${componentCls}${componentCls}-${size}`]: {
  95508. fontSize,
  95509. [`
  95510. ${componentCls}-title,
  95511. ${componentCls}-footer,
  95512. ${componentCls}-cell,
  95513. ${componentCls}-thead > tr > th,
  95514. ${componentCls}-tbody > tr > th,
  95515. ${componentCls}-tbody > tr > td,
  95516. tfoot > tr > th,
  95517. tfoot > tr > td
  95518. `]: {
  95519. padding: `${(0,cssinjs.unit)(paddingVertical)} ${(0,cssinjs.unit)(paddingHorizontal)}`
  95520. },
  95521. [`${componentCls}-filter-trigger`]: {
  95522. marginInlineEnd: (0,cssinjs.unit)(calc(paddingHorizontal).div(2).mul(-1).equal())
  95523. },
  95524. [`${componentCls}-expanded-row-fixed`]: {
  95525. margin: `${(0,cssinjs.unit)(calc(paddingVertical).mul(-1).equal())} ${(0,cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}`
  95526. },
  95527. [`${componentCls}-tbody`]: {
  95528. // ========================= Nest Table ===========================
  95529. [`${componentCls}-wrapper:only-child ${componentCls}`]: {
  95530. marginBlock: (0,cssinjs.unit)(calc(paddingVertical).mul(-1).equal()),
  95531. marginInline: `${(0,cssinjs.unit)(calc(tableExpandColumnWidth).sub(paddingHorizontal).equal())} ${(0,cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}`
  95532. }
  95533. },
  95534. // https://github.com/ant-design/ant-design/issues/35167
  95535. [`${componentCls}-selection-extra`]: {
  95536. paddingInlineStart: (0,cssinjs.unit)(calc(paddingHorizontal).div(4).equal())
  95537. }
  95538. }
  95539. });
  95540. return {
  95541. [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, getSizeStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle)), getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall))
  95542. };
  95543. };
  95544. /* harmony default export */ var size = (genSizeStyle);
  95545. ;// ./components/table/style/sorter.ts
  95546. const genSorterStyle = token => {
  95547. const {
  95548. componentCls,
  95549. marginXXS,
  95550. fontSizeIcon,
  95551. headerIconColor,
  95552. headerIconHoverColor
  95553. } = token;
  95554. return {
  95555. [`${componentCls}-wrapper`]: {
  95556. [`${componentCls}-thead th${componentCls}-column-has-sorters`]: {
  95557. outline: 'none',
  95558. cursor: 'pointer',
  95559. // why left 0s? Avoid column header move with transition when left is changed
  95560. // https://github.com/ant-design/ant-design/issues/50588
  95561. transition: `all ${token.motionDurationSlow}, left 0s`,
  95562. '&:hover': {
  95563. background: token.tableHeaderSortHoverBg,
  95564. '&::before': {
  95565. backgroundColor: 'transparent !important'
  95566. }
  95567. },
  95568. '&:focus-visible': {
  95569. color: token.colorPrimary
  95570. },
  95571. // https://github.com/ant-design/ant-design/issues/30969
  95572. [`
  95573. &${componentCls}-cell-fix-left:hover,
  95574. &${componentCls}-cell-fix-right:hover
  95575. `]: {
  95576. background: token.tableFixedHeaderSortActiveBg
  95577. }
  95578. },
  95579. [`${componentCls}-thead th${componentCls}-column-sort`]: {
  95580. background: token.tableHeaderSortBg,
  95581. '&::before': {
  95582. backgroundColor: 'transparent !important'
  95583. }
  95584. },
  95585. [`td${componentCls}-column-sort`]: {
  95586. background: token.tableBodySortBg
  95587. },
  95588. [`${componentCls}-column-title`]: {
  95589. position: 'relative',
  95590. zIndex: 1,
  95591. flex: 1,
  95592. minWidth: 0
  95593. },
  95594. [`${componentCls}-column-sorters`]: {
  95595. display: 'flex',
  95596. flex: 'auto',
  95597. alignItems: 'center',
  95598. justifyContent: 'space-between',
  95599. '&::after': {
  95600. position: 'absolute',
  95601. inset: 0,
  95602. width: '100%',
  95603. height: '100%',
  95604. content: '""'
  95605. }
  95606. },
  95607. [`${componentCls}-column-sorters-tooltip-target-sorter`]: {
  95608. '&::after': {
  95609. content: 'none'
  95610. }
  95611. },
  95612. [`${componentCls}-column-sorter`]: {
  95613. marginInlineStart: marginXXS,
  95614. color: headerIconColor,
  95615. fontSize: 0,
  95616. transition: `color ${token.motionDurationSlow}`,
  95617. '&-inner': {
  95618. display: 'inline-flex',
  95619. flexDirection: 'column',
  95620. alignItems: 'center'
  95621. },
  95622. '&-up, &-down': {
  95623. fontSize: fontSizeIcon,
  95624. '&.active': {
  95625. color: token.colorPrimary
  95626. }
  95627. },
  95628. [`${componentCls}-column-sorter-up + ${componentCls}-column-sorter-down`]: {
  95629. marginTop: '-0.3em'
  95630. }
  95631. },
  95632. [`${componentCls}-column-sorters:hover ${componentCls}-column-sorter`]: {
  95633. color: headerIconHoverColor
  95634. }
  95635. }
  95636. };
  95637. };
  95638. /* harmony default export */ var sorter = (genSorterStyle);
  95639. ;// ./components/table/style/sticky.ts
  95640. const genStickyStyle = token => {
  95641. const {
  95642. componentCls,
  95643. opacityLoading,
  95644. tableScrollThumbBg,
  95645. tableScrollThumbBgHover,
  95646. tableScrollThumbSize,
  95647. tableScrollBg,
  95648. zIndexTableSticky,
  95649. stickyScrollBarBorderRadius,
  95650. lineWidth,
  95651. lineType,
  95652. tableBorderColor
  95653. } = token;
  95654. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
  95655. return {
  95656. [`${componentCls}-wrapper`]: {
  95657. [`${componentCls}-sticky`]: {
  95658. '&-holder': {
  95659. position: 'sticky',
  95660. zIndex: zIndexTableSticky,
  95661. background: token.colorBgContainer
  95662. },
  95663. '&-scroll': {
  95664. position: 'sticky',
  95665. bottom: 0,
  95666. height: `${(0,cssinjs.unit)(tableScrollThumbSize)} !important`,
  95667. zIndex: zIndexTableSticky,
  95668. display: 'flex',
  95669. alignItems: 'center',
  95670. background: tableScrollBg,
  95671. borderTop: tableBorder,
  95672. opacity: opacityLoading,
  95673. '&:hover': {
  95674. transformOrigin: 'center bottom'
  95675. },
  95676. // fake scrollbar style of sticky
  95677. '&-bar': {
  95678. height: tableScrollThumbSize,
  95679. backgroundColor: tableScrollThumbBg,
  95680. borderRadius: stickyScrollBarBorderRadius,
  95681. transition: `all ${token.motionDurationSlow}, transform 0s`,
  95682. position: 'absolute',
  95683. bottom: 0,
  95684. '&:hover, &-active': {
  95685. backgroundColor: tableScrollThumbBgHover
  95686. }
  95687. }
  95688. }
  95689. }
  95690. }
  95691. };
  95692. };
  95693. /* harmony default export */ var sticky = (genStickyStyle);
  95694. ;// ./components/table/style/summary.ts
  95695. const genSummaryStyle = token => {
  95696. const {
  95697. componentCls,
  95698. lineWidth,
  95699. tableBorderColor,
  95700. calc
  95701. } = token;
  95702. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${token.lineType} ${tableBorderColor}`;
  95703. return {
  95704. [`${componentCls}-wrapper`]: {
  95705. [`${componentCls}-summary`]: {
  95706. position: 'relative',
  95707. zIndex: token.zIndexTableFixed,
  95708. background: token.tableBg,
  95709. '> tr': {
  95710. '> th, > td': {
  95711. borderBottom: tableBorder
  95712. }
  95713. }
  95714. },
  95715. [`div${componentCls}-summary`]: {
  95716. boxShadow: `0 ${(0,cssinjs.unit)(calc(lineWidth).mul(-1).equal())} 0 ${tableBorderColor}`
  95717. }
  95718. }
  95719. };
  95720. };
  95721. /* harmony default export */ var summary = (genSummaryStyle);
  95722. ;// ./components/table/style/virtual.ts
  95723. const genVirtualStyle = token => {
  95724. const {
  95725. componentCls,
  95726. motionDurationMid,
  95727. lineWidth,
  95728. lineType,
  95729. tableBorderColor,
  95730. calc
  95731. } = token;
  95732. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
  95733. const rowCellCls = `${componentCls}-expanded-row-cell`;
  95734. return {
  95735. [`${componentCls}-wrapper`]: {
  95736. // ========================== Row ==========================
  95737. [`${componentCls}-tbody-virtual`]: {
  95738. [`${componentCls}-tbody-virtual-holder-inner`]: {
  95739. [`
  95740. & > ${componentCls}-row,
  95741. & > div:not(${componentCls}-row) > ${componentCls}-row
  95742. `]: {
  95743. display: 'flex',
  95744. boxSizing: 'border-box',
  95745. width: '100%'
  95746. }
  95747. },
  95748. [`${componentCls}-cell`]: {
  95749. borderBottom: tableBorder,
  95750. transition: `background ${motionDurationMid}`
  95751. },
  95752. [`${componentCls}-expanded-row`]: {
  95753. [`${rowCellCls}${rowCellCls}-fixed`]: {
  95754. position: 'sticky',
  95755. insetInlineStart: 0,
  95756. overflow: 'hidden',
  95757. width: `calc(var(--virtual-width) - ${(0,cssinjs.unit)(lineWidth)})`,
  95758. borderInlineEnd: 'none'
  95759. }
  95760. }
  95761. },
  95762. // ======================== Border =========================
  95763. [`${componentCls}-bordered`]: {
  95764. [`${componentCls}-tbody-virtual`]: {
  95765. '&:after': {
  95766. content: '""',
  95767. insetInline: 0,
  95768. bottom: 0,
  95769. borderBottom: tableBorder,
  95770. position: 'absolute'
  95771. },
  95772. [`${componentCls}-cell`]: {
  95773. borderInlineEnd: tableBorder,
  95774. [`&${componentCls}-cell-fix-right-first:before`]: {
  95775. content: '""',
  95776. position: 'absolute',
  95777. insetBlock: 0,
  95778. insetInlineStart: calc(lineWidth).mul(-1).equal(),
  95779. borderInlineStart: tableBorder
  95780. }
  95781. }
  95782. },
  95783. // Empty placeholder
  95784. [`&${componentCls}-virtual`]: {
  95785. [`${componentCls}-placeholder ${componentCls}-cell`]: {
  95786. borderInlineEnd: tableBorder,
  95787. borderBottom: tableBorder
  95788. }
  95789. }
  95790. }
  95791. }
  95792. };
  95793. };
  95794. /* harmony default export */ var virtual = (genVirtualStyle);
  95795. ;// ./components/table/style/index.ts
  95796. const genTableStyle = token => {
  95797. const {
  95798. componentCls,
  95799. fontWeightStrong,
  95800. tablePaddingVertical,
  95801. tablePaddingHorizontal,
  95802. tableExpandColumnWidth,
  95803. lineWidth,
  95804. lineType,
  95805. tableBorderColor,
  95806. tableFontSize,
  95807. tableBg,
  95808. tableRadius,
  95809. tableHeaderTextColor,
  95810. motionDurationMid,
  95811. tableHeaderBg,
  95812. tableHeaderCellSplitColor,
  95813. tableFooterTextColor,
  95814. tableFooterBg,
  95815. calc
  95816. } = token;
  95817. const tableBorder = `${(0,cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;
  95818. return {
  95819. [`${componentCls}-wrapper`]: Object.assign(Object.assign({
  95820. clear: 'both',
  95821. maxWidth: '100%',
  95822. // fix https://github.com/ant-design/ant-design/issues/46177
  95823. ['--rc-virtual-list-scrollbar-bg']: token.tableScrollBg
  95824. }, (0,style.clearFix)()), {
  95825. [componentCls]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  95826. fontSize: tableFontSize,
  95827. background: tableBg,
  95828. borderRadius: `${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)} 0 0`,
  95829. // https://github.com/ant-design/ant-design/issues/47486
  95830. scrollbarColor: `${token.tableScrollThumbBg} ${token.tableScrollBg}`
  95831. }),
  95832. // https://github.com/ant-design/ant-design/issues/17611
  95833. table: {
  95834. width: '100%',
  95835. textAlign: 'start',
  95836. borderRadius: `${(0,cssinjs.unit)(tableRadius)} ${(0,cssinjs.unit)(tableRadius)} 0 0`,
  95837. borderCollapse: 'separate',
  95838. borderSpacing: 0
  95839. },
  95840. // ============================= Cell ==============================
  95841. [`
  95842. ${componentCls}-cell,
  95843. ${componentCls}-thead > tr > th,
  95844. ${componentCls}-tbody > tr > th,
  95845. ${componentCls}-tbody > tr > td,
  95846. tfoot > tr > th,
  95847. tfoot > tr > td
  95848. `]: {
  95849. position: 'relative',
  95850. padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`,
  95851. overflowWrap: 'break-word'
  95852. },
  95853. // ============================ Title =============================
  95854. [`${componentCls}-title`]: {
  95855. padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`
  95856. },
  95857. // ============================ Header ============================
  95858. [`${componentCls}-thead`]: {
  95859. [`
  95860. > tr > th,
  95861. > tr > td
  95862. `]: {
  95863. position: 'relative',
  95864. color: tableHeaderTextColor,
  95865. fontWeight: fontWeightStrong,
  95866. textAlign: 'start',
  95867. background: tableHeaderBg,
  95868. borderBottom: tableBorder,
  95869. transition: `background ${motionDurationMid} ease`,
  95870. "&[colspan]:not([colspan='1'])": {
  95871. textAlign: 'center'
  95872. },
  95873. [`&:not(:last-child):not(${componentCls}-selection-column):not(${componentCls}-row-expand-icon-cell):not([colspan])::before`]: {
  95874. position: 'absolute',
  95875. top: '50%',
  95876. insetInlineEnd: 0,
  95877. width: 1,
  95878. height: '1.6em',
  95879. backgroundColor: tableHeaderCellSplitColor,
  95880. transform: 'translateY(-50%)',
  95881. transition: `background-color ${motionDurationMid}`,
  95882. content: '""'
  95883. }
  95884. },
  95885. '> tr:not(:last-child) > th[colspan]': {
  95886. borderBottom: 0
  95887. }
  95888. },
  95889. // ============================ Body ============================
  95890. [`${componentCls}-tbody`]: {
  95891. '> tr': {
  95892. '> th, > td': {
  95893. transition: `background ${motionDurationMid}, border-color ${motionDurationMid}`,
  95894. borderBottom: tableBorder,
  95895. // ========================= Nest Table ===========================
  95896. [`
  95897. > ${componentCls}-wrapper:only-child,
  95898. > ${componentCls}-expanded-row-fixed > ${componentCls}-wrapper:only-child
  95899. `]: {
  95900. [componentCls]: {
  95901. marginBlock: (0,cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal()),
  95902. marginInline: `${(0,cssinjs.unit)(calc(tableExpandColumnWidth).sub(tablePaddingHorizontal).equal())}
  95903. ${(0,cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`,
  95904. [`${componentCls}-tbody > tr:last-child > td`]: {
  95905. borderBottomWidth: 0,
  95906. '&:first-child, &:last-child': {
  95907. borderRadius: 0
  95908. }
  95909. }
  95910. }
  95911. }
  95912. },
  95913. '> th': {
  95914. position: 'relative',
  95915. color: tableHeaderTextColor,
  95916. fontWeight: fontWeightStrong,
  95917. textAlign: 'start',
  95918. background: tableHeaderBg,
  95919. borderBottom: tableBorder,
  95920. transition: `background ${motionDurationMid} ease`
  95921. }
  95922. }
  95923. },
  95924. // ============================ Footer ============================
  95925. [`${componentCls}-footer`]: {
  95926. padding: `${(0,cssinjs.unit)(tablePaddingVertical)} ${(0,cssinjs.unit)(tablePaddingHorizontal)}`,
  95927. color: tableFooterTextColor,
  95928. background: tableFooterBg
  95929. }
  95930. })
  95931. };
  95932. };
  95933. const prepareComponentToken = token => {
  95934. const {
  95935. colorFillAlter,
  95936. colorBgContainer,
  95937. colorTextHeading,
  95938. colorFillSecondary,
  95939. colorFillContent,
  95940. controlItemBgActive,
  95941. controlItemBgActiveHover,
  95942. padding,
  95943. paddingSM,
  95944. paddingXS,
  95945. colorBorderSecondary,
  95946. borderRadiusLG,
  95947. controlHeight,
  95948. colorTextPlaceholder,
  95949. fontSize,
  95950. fontSizeSM,
  95951. lineHeight,
  95952. lineWidth,
  95953. colorIcon,
  95954. colorIconHover,
  95955. opacityLoading,
  95956. controlInteractiveSize
  95957. } = token;
  95958. const colorFillSecondarySolid = new es.FastColor(colorFillSecondary).onBackground(colorBgContainer).toHexString();
  95959. const colorFillContentSolid = new es.FastColor(colorFillContent).onBackground(colorBgContainer).toHexString();
  95960. const colorFillAlterSolid = new es.FastColor(colorFillAlter).onBackground(colorBgContainer).toHexString();
  95961. const baseColorAction = new es.FastColor(colorIcon);
  95962. const baseColorActionHover = new es.FastColor(colorIconHover);
  95963. const expandIconHalfInner = controlInteractiveSize / 2 - lineWidth;
  95964. const expandIconSize = expandIconHalfInner * 2 + lineWidth * 3;
  95965. return {
  95966. headerBg: colorFillAlterSolid,
  95967. headerColor: colorTextHeading,
  95968. headerSortActiveBg: colorFillSecondarySolid,
  95969. headerSortHoverBg: colorFillContentSolid,
  95970. bodySortBg: colorFillAlterSolid,
  95971. rowHoverBg: colorFillAlterSolid,
  95972. rowSelectedBg: controlItemBgActive,
  95973. rowSelectedHoverBg: controlItemBgActiveHover,
  95974. rowExpandedBg: colorFillAlter,
  95975. cellPaddingBlock: padding,
  95976. cellPaddingInline: padding,
  95977. cellPaddingBlockMD: paddingSM,
  95978. cellPaddingInlineMD: paddingXS,
  95979. cellPaddingBlockSM: paddingXS,
  95980. cellPaddingInlineSM: paddingXS,
  95981. borderColor: colorBorderSecondary,
  95982. headerBorderRadius: borderRadiusLG,
  95983. footerBg: colorFillAlterSolid,
  95984. footerColor: colorTextHeading,
  95985. cellFontSize: fontSize,
  95986. cellFontSizeMD: fontSize,
  95987. cellFontSizeSM: fontSize,
  95988. headerSplitColor: colorBorderSecondary,
  95989. fixedHeaderSortActiveBg: colorFillSecondarySolid,
  95990. headerFilterHoverBg: colorFillContent,
  95991. filterDropdownMenuBg: colorBgContainer,
  95992. filterDropdownBg: colorBgContainer,
  95993. expandIconBg: colorBgContainer,
  95994. selectionColumnWidth: controlHeight,
  95995. stickyScrollBarBg: colorTextPlaceholder,
  95996. stickyScrollBarBorderRadius: 100,
  95997. expandIconMarginTop: (fontSize * lineHeight - lineWidth * 3) / 2 - Math.ceil((fontSizeSM * 1.4 - lineWidth * 3) / 2),
  95998. headerIconColor: baseColorAction.clone().setA(baseColorAction.a * opacityLoading).toRgbString(),
  95999. headerIconHoverColor: baseColorActionHover.clone().setA(baseColorActionHover.a * opacityLoading).toRgbString(),
  96000. expandIconHalfInner,
  96001. expandIconSize,
  96002. expandIconScale: controlInteractiveSize / expandIconSize
  96003. };
  96004. };
  96005. const zIndexTableFixed = 2;
  96006. // ============================== Export ==============================
  96007. /* harmony default export */ var table_style = ((0,genStyleUtils.genStyleHooks)('Table', token => {
  96008. const {
  96009. colorTextHeading,
  96010. colorSplit,
  96011. colorBgContainer,
  96012. controlInteractiveSize: checkboxSize,
  96013. headerBg,
  96014. headerColor,
  96015. headerSortActiveBg,
  96016. headerSortHoverBg,
  96017. bodySortBg,
  96018. rowHoverBg,
  96019. rowSelectedBg,
  96020. rowSelectedHoverBg,
  96021. rowExpandedBg,
  96022. cellPaddingBlock,
  96023. cellPaddingInline,
  96024. cellPaddingBlockMD,
  96025. cellPaddingInlineMD,
  96026. cellPaddingBlockSM,
  96027. cellPaddingInlineSM,
  96028. borderColor,
  96029. footerBg,
  96030. footerColor,
  96031. headerBorderRadius,
  96032. cellFontSize,
  96033. cellFontSizeMD,
  96034. cellFontSizeSM,
  96035. headerSplitColor,
  96036. fixedHeaderSortActiveBg,
  96037. headerFilterHoverBg,
  96038. filterDropdownBg,
  96039. expandIconBg,
  96040. selectionColumnWidth,
  96041. stickyScrollBarBg,
  96042. calc
  96043. } = token;
  96044. const tableToken = (0,cssinjs_utils_es.mergeToken)(token, {
  96045. tableFontSize: cellFontSize,
  96046. tableBg: colorBgContainer,
  96047. tableRadius: headerBorderRadius,
  96048. tablePaddingVertical: cellPaddingBlock,
  96049. tablePaddingHorizontal: cellPaddingInline,
  96050. tablePaddingVerticalMiddle: cellPaddingBlockMD,
  96051. tablePaddingHorizontalMiddle: cellPaddingInlineMD,
  96052. tablePaddingVerticalSmall: cellPaddingBlockSM,
  96053. tablePaddingHorizontalSmall: cellPaddingInlineSM,
  96054. tableBorderColor: borderColor,
  96055. tableHeaderTextColor: headerColor,
  96056. tableHeaderBg: headerBg,
  96057. tableFooterTextColor: footerColor,
  96058. tableFooterBg: footerBg,
  96059. tableHeaderCellSplitColor: headerSplitColor,
  96060. tableHeaderSortBg: headerSortActiveBg,
  96061. tableHeaderSortHoverBg: headerSortHoverBg,
  96062. tableBodySortBg: bodySortBg,
  96063. tableFixedHeaderSortActiveBg: fixedHeaderSortActiveBg,
  96064. tableHeaderFilterActiveBg: headerFilterHoverBg,
  96065. tableFilterDropdownBg: filterDropdownBg,
  96066. tableRowHoverBg: rowHoverBg,
  96067. tableSelectedRowBg: rowSelectedBg,
  96068. tableSelectedRowHoverBg: rowSelectedHoverBg,
  96069. zIndexTableFixed,
  96070. zIndexTableSticky: calc(zIndexTableFixed).add(1).equal({
  96071. unit: false
  96072. }),
  96073. tableFontSizeMiddle: cellFontSizeMD,
  96074. tableFontSizeSmall: cellFontSizeSM,
  96075. tableSelectionColumnWidth: selectionColumnWidth,
  96076. tableExpandIconBg: expandIconBg,
  96077. tableExpandColumnWidth: calc(checkboxSize).add(calc(token.padding).mul(2)).equal(),
  96078. tableExpandedRowBg: rowExpandedBg,
  96079. // Dropdown
  96080. tableFilterDropdownWidth: 120,
  96081. tableFilterDropdownHeight: 264,
  96082. tableFilterDropdownSearchWidth: 140,
  96083. // Virtual Scroll Bar
  96084. tableScrollThumbSize: 8,
  96085. // Mac scroll bar size
  96086. tableScrollThumbBg: stickyScrollBarBg,
  96087. tableScrollThumbBgHover: colorTextHeading,
  96088. tableScrollBg: colorSplit
  96089. });
  96090. return [genTableStyle(tableToken), pagination(tableToken), summary(tableToken), sorter(tableToken), filter(tableToken), bordered(tableToken), radius(tableToken), expand(tableToken), summary(tableToken), empty(tableToken), selection(tableToken), fixed(tableToken), sticky(tableToken), ellipsis(tableToken), size(tableToken), rtl(tableToken), virtual(tableToken)];
  96091. }, prepareComponentToken, {
  96092. unitless: {
  96093. expandIconScale: true
  96094. }
  96095. }));
  96096. /***/ }),
  96097. /***/ "./components/tabs/style/index.ts":
  96098. /*!****************************************************!*\
  96099. !*** ./components/tabs/style/index.ts + 1 modules ***!
  96100. \****************************************************/
  96101. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  96102. "use strict";
  96103. // ESM COMPAT FLAG
  96104. __webpack_require__.r(__webpack_exports__);
  96105. // EXPORTS
  96106. __webpack_require__.d(__webpack_exports__, {
  96107. "default": function() { return /* binding */ tabs_style; },
  96108. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  96109. });
  96110. // EXTERNAL MODULE: ./alias/cssinjs.js
  96111. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  96112. // EXTERNAL MODULE: ./components/style/index.tsx
  96113. var style = __webpack_require__("./components/style/index.tsx");
  96114. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  96115. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  96116. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  96117. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  96118. // EXTERNAL MODULE: ./components/style/motion/slide.ts
  96119. var slide = __webpack_require__("./components/style/motion/slide.ts");
  96120. ;// ./components/tabs/style/motion.ts
  96121. const genMotionStyle = token => {
  96122. const {
  96123. componentCls,
  96124. motionDurationSlow
  96125. } = token;
  96126. return [{
  96127. [componentCls]: {
  96128. [`${componentCls}-switch`]: {
  96129. '&-appear, &-enter': {
  96130. transition: 'none',
  96131. '&-start': {
  96132. opacity: 0
  96133. },
  96134. '&-active': {
  96135. opacity: 1,
  96136. transition: `opacity ${motionDurationSlow}`
  96137. }
  96138. },
  96139. '&-leave': {
  96140. position: 'absolute',
  96141. transition: 'none',
  96142. inset: 0,
  96143. '&-start': {
  96144. opacity: 1
  96145. },
  96146. '&-active': {
  96147. opacity: 0,
  96148. transition: `opacity ${motionDurationSlow}`
  96149. }
  96150. }
  96151. }
  96152. }
  96153. },
  96154. // Follow code may reuse in other components
  96155. [(0,slide.initSlideMotion)(token, 'slide-up'), (0,slide.initSlideMotion)(token, 'slide-down')]];
  96156. };
  96157. /* harmony default export */ var motion = (genMotionStyle);
  96158. ;// ./components/tabs/style/index.ts
  96159. const genCardStyle = token => {
  96160. const {
  96161. componentCls,
  96162. tabsCardPadding,
  96163. cardBg,
  96164. cardGutter,
  96165. colorBorderSecondary,
  96166. itemSelectedColor
  96167. } = token;
  96168. return {
  96169. [`${componentCls}-card`]: {
  96170. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96171. [`${componentCls}-tab`]: {
  96172. margin: 0,
  96173. padding: tabsCardPadding,
  96174. background: cardBg,
  96175. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
  96176. transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`
  96177. },
  96178. [`${componentCls}-tab-active`]: {
  96179. color: itemSelectedColor,
  96180. background: token.colorBgContainer
  96181. },
  96182. [`${componentCls}-tab-focus:has(${componentCls}-tab-btn:focus-visible)`]: (0,style.genFocusOutline)(token, -3),
  96183. [`& ${componentCls}-tab${componentCls}-tab-focus ${componentCls}-tab-btn:focus-visible`]: {
  96184. outline: 'none'
  96185. },
  96186. [`${componentCls}-ink-bar`]: {
  96187. visibility: 'hidden'
  96188. }
  96189. },
  96190. // ========================== Top & Bottom ==========================
  96191. [`&${componentCls}-top, &${componentCls}-bottom`]: {
  96192. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96193. [`${componentCls}-tab + ${componentCls}-tab`]: {
  96194. marginLeft: {
  96195. _skip_check_: true,
  96196. value: (0,cssinjs.unit)(cardGutter)
  96197. }
  96198. }
  96199. }
  96200. },
  96201. [`&${componentCls}-top`]: {
  96202. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96203. [`${componentCls}-tab`]: {
  96204. borderRadius: `${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)} 0 0`
  96205. },
  96206. [`${componentCls}-tab-active`]: {
  96207. borderBottomColor: token.colorBgContainer
  96208. }
  96209. }
  96210. },
  96211. [`&${componentCls}-bottom`]: {
  96212. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96213. [`${componentCls}-tab`]: {
  96214. borderRadius: `0 0 ${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)}`
  96215. },
  96216. [`${componentCls}-tab-active`]: {
  96217. borderTopColor: token.colorBgContainer
  96218. }
  96219. }
  96220. },
  96221. // ========================== Left & Right ==========================
  96222. [`&${componentCls}-left, &${componentCls}-right`]: {
  96223. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96224. [`${componentCls}-tab + ${componentCls}-tab`]: {
  96225. marginTop: (0,cssinjs.unit)(cardGutter)
  96226. }
  96227. }
  96228. },
  96229. [`&${componentCls}-left`]: {
  96230. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96231. [`${componentCls}-tab`]: {
  96232. borderRadius: {
  96233. _skip_check_: true,
  96234. value: `${(0,cssinjs.unit)(token.borderRadiusLG)} 0 0 ${(0,cssinjs.unit)(token.borderRadiusLG)}`
  96235. }
  96236. },
  96237. [`${componentCls}-tab-active`]: {
  96238. borderRightColor: {
  96239. _skip_check_: true,
  96240. value: token.colorBgContainer
  96241. }
  96242. }
  96243. }
  96244. },
  96245. [`&${componentCls}-right`]: {
  96246. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96247. [`${componentCls}-tab`]: {
  96248. borderRadius: {
  96249. _skip_check_: true,
  96250. value: `0 ${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)} 0`
  96251. }
  96252. },
  96253. [`${componentCls}-tab-active`]: {
  96254. borderLeftColor: {
  96255. _skip_check_: true,
  96256. value: token.colorBgContainer
  96257. }
  96258. }
  96259. }
  96260. }
  96261. }
  96262. };
  96263. };
  96264. const genDropdownStyle = token => {
  96265. const {
  96266. componentCls,
  96267. itemHoverColor,
  96268. dropdownEdgeChildVerticalPadding
  96269. } = token;
  96270. return {
  96271. [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  96272. position: 'absolute',
  96273. top: -9999,
  96274. left: {
  96275. _skip_check_: true,
  96276. value: -9999
  96277. },
  96278. zIndex: token.zIndexPopup,
  96279. display: 'block',
  96280. '&-hidden': {
  96281. display: 'none'
  96282. },
  96283. [`${componentCls}-dropdown-menu`]: {
  96284. maxHeight: token.tabsDropdownHeight,
  96285. margin: 0,
  96286. padding: `${(0,cssinjs.unit)(dropdownEdgeChildVerticalPadding)} 0`,
  96287. overflowX: 'hidden',
  96288. overflowY: 'auto',
  96289. textAlign: {
  96290. _skip_check_: true,
  96291. value: 'left'
  96292. },
  96293. listStyleType: 'none',
  96294. backgroundColor: token.colorBgContainer,
  96295. backgroundClip: 'padding-box',
  96296. borderRadius: token.borderRadiusLG,
  96297. outline: 'none',
  96298. boxShadow: token.boxShadowSecondary,
  96299. '&-item': Object.assign(Object.assign({}, style.textEllipsis), {
  96300. display: 'flex',
  96301. alignItems: 'center',
  96302. minWidth: token.tabsDropdownWidth,
  96303. margin: 0,
  96304. padding: `${(0,cssinjs.unit)(token.paddingXXS)} ${(0,cssinjs.unit)(token.paddingSM)}`,
  96305. color: token.colorText,
  96306. fontWeight: 'normal',
  96307. fontSize: token.fontSize,
  96308. lineHeight: token.lineHeight,
  96309. cursor: 'pointer',
  96310. transition: `all ${token.motionDurationSlow}`,
  96311. '> span': {
  96312. flex: 1,
  96313. whiteSpace: 'nowrap'
  96314. },
  96315. '&-remove': {
  96316. flex: 'none',
  96317. marginLeft: {
  96318. _skip_check_: true,
  96319. value: token.marginSM
  96320. },
  96321. color: token.colorIcon,
  96322. fontSize: token.fontSizeSM,
  96323. background: 'transparent',
  96324. border: 0,
  96325. cursor: 'pointer',
  96326. '&:hover': {
  96327. color: itemHoverColor
  96328. }
  96329. },
  96330. '&:hover': {
  96331. background: token.controlItemBgHover
  96332. },
  96333. '&-disabled': {
  96334. '&, &:hover': {
  96335. color: token.colorTextDisabled,
  96336. background: 'transparent',
  96337. cursor: 'not-allowed'
  96338. }
  96339. }
  96340. })
  96341. }
  96342. })
  96343. };
  96344. };
  96345. const genPositionStyle = token => {
  96346. const {
  96347. componentCls,
  96348. margin,
  96349. colorBorderSecondary,
  96350. horizontalMargin,
  96351. verticalItemPadding,
  96352. verticalItemMargin,
  96353. calc
  96354. } = token;
  96355. return {
  96356. // ========================== Top & Bottom ==========================
  96357. [`${componentCls}-top, ${componentCls}-bottom`]: {
  96358. flexDirection: 'column',
  96359. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96360. margin: horizontalMargin,
  96361. '&::before': {
  96362. position: 'absolute',
  96363. right: {
  96364. _skip_check_: true,
  96365. value: 0
  96366. },
  96367. left: {
  96368. _skip_check_: true,
  96369. value: 0
  96370. },
  96371. borderBottom: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
  96372. content: "''"
  96373. },
  96374. [`${componentCls}-ink-bar`]: {
  96375. height: token.lineWidthBold,
  96376. '&-animated': {
  96377. transition: `width ${token.motionDurationSlow}, left ${token.motionDurationSlow},
  96378. right ${token.motionDurationSlow}`
  96379. }
  96380. },
  96381. [`${componentCls}-nav-wrap`]: {
  96382. '&::before, &::after': {
  96383. top: 0,
  96384. bottom: 0,
  96385. width: token.controlHeight
  96386. },
  96387. '&::before': {
  96388. left: {
  96389. _skip_check_: true,
  96390. value: 0
  96391. },
  96392. boxShadow: token.boxShadowTabsOverflowLeft
  96393. },
  96394. '&::after': {
  96395. right: {
  96396. _skip_check_: true,
  96397. value: 0
  96398. },
  96399. boxShadow: token.boxShadowTabsOverflowRight
  96400. },
  96401. [`&${componentCls}-nav-wrap-ping-left::before`]: {
  96402. opacity: 1
  96403. },
  96404. [`&${componentCls}-nav-wrap-ping-right::after`]: {
  96405. opacity: 1
  96406. }
  96407. }
  96408. }
  96409. },
  96410. [`${componentCls}-top`]: {
  96411. [`> ${componentCls}-nav,
  96412. > div > ${componentCls}-nav`]: {
  96413. '&::before': {
  96414. bottom: 0
  96415. },
  96416. [`${componentCls}-ink-bar`]: {
  96417. bottom: 0
  96418. }
  96419. }
  96420. },
  96421. [`${componentCls}-bottom`]: {
  96422. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96423. order: 1,
  96424. marginTop: margin,
  96425. marginBottom: 0,
  96426. '&::before': {
  96427. top: 0
  96428. },
  96429. [`${componentCls}-ink-bar`]: {
  96430. top: 0
  96431. }
  96432. },
  96433. [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
  96434. order: 0
  96435. }
  96436. },
  96437. // ========================== Left & Right ==========================
  96438. [`${componentCls}-left, ${componentCls}-right`]: {
  96439. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96440. flexDirection: 'column',
  96441. minWidth: calc(token.controlHeight).mul(1.25).equal(),
  96442. // >>>>>>>>>>> Tab
  96443. [`${componentCls}-tab`]: {
  96444. padding: verticalItemPadding,
  96445. textAlign: 'center'
  96446. },
  96447. [`${componentCls}-tab + ${componentCls}-tab`]: {
  96448. margin: verticalItemMargin
  96449. },
  96450. // >>>>>>>>>>> Nav
  96451. [`${componentCls}-nav-wrap`]: {
  96452. flexDirection: 'column',
  96453. '&::before, &::after': {
  96454. right: {
  96455. _skip_check_: true,
  96456. value: 0
  96457. },
  96458. left: {
  96459. _skip_check_: true,
  96460. value: 0
  96461. },
  96462. height: token.controlHeight
  96463. },
  96464. '&::before': {
  96465. top: 0,
  96466. boxShadow: token.boxShadowTabsOverflowTop
  96467. },
  96468. '&::after': {
  96469. bottom: 0,
  96470. boxShadow: token.boxShadowTabsOverflowBottom
  96471. },
  96472. [`&${componentCls}-nav-wrap-ping-top::before`]: {
  96473. opacity: 1
  96474. },
  96475. [`&${componentCls}-nav-wrap-ping-bottom::after`]: {
  96476. opacity: 1
  96477. }
  96478. },
  96479. // >>>>>>>>>>> Ink Bar
  96480. [`${componentCls}-ink-bar`]: {
  96481. width: token.lineWidthBold,
  96482. '&-animated': {
  96483. transition: `height ${token.motionDurationSlow}, top ${token.motionDurationSlow}`
  96484. }
  96485. },
  96486. [`${componentCls}-nav-list, ${componentCls}-nav-operations`]: {
  96487. flex: '1 0 auto',
  96488. // fix safari scroll problem
  96489. flexDirection: 'column'
  96490. }
  96491. }
  96492. },
  96493. [`${componentCls}-left`]: {
  96494. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96495. [`${componentCls}-ink-bar`]: {
  96496. right: {
  96497. _skip_check_: true,
  96498. value: 0
  96499. }
  96500. }
  96501. },
  96502. [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
  96503. marginLeft: {
  96504. _skip_check_: true,
  96505. value: (0,cssinjs.unit)(calc(token.lineWidth).mul(-1).equal())
  96506. },
  96507. borderLeft: {
  96508. _skip_check_: true,
  96509. value: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
  96510. },
  96511. [`> ${componentCls}-content > ${componentCls}-tabpane`]: {
  96512. paddingLeft: {
  96513. _skip_check_: true,
  96514. value: token.paddingLG
  96515. }
  96516. }
  96517. }
  96518. },
  96519. [`${componentCls}-right`]: {
  96520. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96521. order: 1,
  96522. [`${componentCls}-ink-bar`]: {
  96523. left: {
  96524. _skip_check_: true,
  96525. value: 0
  96526. }
  96527. }
  96528. },
  96529. [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
  96530. order: 0,
  96531. marginRight: {
  96532. _skip_check_: true,
  96533. value: calc(token.lineWidth).mul(-1).equal()
  96534. },
  96535. borderRight: {
  96536. _skip_check_: true,
  96537. value: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
  96538. },
  96539. [`> ${componentCls}-content > ${componentCls}-tabpane`]: {
  96540. paddingRight: {
  96541. _skip_check_: true,
  96542. value: token.paddingLG
  96543. }
  96544. }
  96545. }
  96546. }
  96547. };
  96548. };
  96549. const genSizeStyle = token => {
  96550. const {
  96551. componentCls,
  96552. cardPaddingSM,
  96553. cardPaddingLG,
  96554. cardHeightSM,
  96555. cardHeightLG,
  96556. horizontalItemPaddingSM,
  96557. horizontalItemPaddingLG
  96558. } = token;
  96559. return {
  96560. // >>>>> shared
  96561. [componentCls]: {
  96562. '&-small': {
  96563. [`> ${componentCls}-nav`]: {
  96564. [`${componentCls}-tab`]: {
  96565. padding: horizontalItemPaddingSM,
  96566. fontSize: token.titleFontSizeSM
  96567. }
  96568. }
  96569. },
  96570. '&-large': {
  96571. [`> ${componentCls}-nav`]: {
  96572. [`${componentCls}-tab`]: {
  96573. padding: horizontalItemPaddingLG,
  96574. fontSize: token.titleFontSizeLG,
  96575. lineHeight: token.lineHeightLG
  96576. }
  96577. }
  96578. }
  96579. },
  96580. // >>>>> card
  96581. [`${componentCls}-card`]: {
  96582. // Small
  96583. [`&${componentCls}-small`]: {
  96584. [`> ${componentCls}-nav`]: {
  96585. [`${componentCls}-tab`]: {
  96586. padding: cardPaddingSM
  96587. },
  96588. [`${componentCls}-nav-add`]: {
  96589. minWidth: cardHeightSM,
  96590. minHeight: cardHeightSM
  96591. }
  96592. },
  96593. [`&${componentCls}-bottom`]: {
  96594. [`> ${componentCls}-nav ${componentCls}-tab`]: {
  96595. borderRadius: `0 0 ${(0,cssinjs.unit)(token.borderRadius)} ${(0,cssinjs.unit)(token.borderRadius)}`
  96596. }
  96597. },
  96598. [`&${componentCls}-top`]: {
  96599. [`> ${componentCls}-nav ${componentCls}-tab`]: {
  96600. borderRadius: `${(0,cssinjs.unit)(token.borderRadius)} ${(0,cssinjs.unit)(token.borderRadius)} 0 0`
  96601. }
  96602. },
  96603. [`&${componentCls}-right`]: {
  96604. [`> ${componentCls}-nav ${componentCls}-tab`]: {
  96605. borderRadius: {
  96606. _skip_check_: true,
  96607. value: `0 ${(0,cssinjs.unit)(token.borderRadius)} ${(0,cssinjs.unit)(token.borderRadius)} 0`
  96608. }
  96609. }
  96610. },
  96611. [`&${componentCls}-left`]: {
  96612. [`> ${componentCls}-nav ${componentCls}-tab`]: {
  96613. borderRadius: {
  96614. _skip_check_: true,
  96615. value: `${(0,cssinjs.unit)(token.borderRadius)} 0 0 ${(0,cssinjs.unit)(token.borderRadius)}`
  96616. }
  96617. }
  96618. }
  96619. },
  96620. // Large
  96621. [`&${componentCls}-large`]: {
  96622. [`> ${componentCls}-nav`]: {
  96623. [`${componentCls}-tab`]: {
  96624. padding: cardPaddingLG
  96625. },
  96626. [`${componentCls}-nav-add`]: {
  96627. minWidth: cardHeightLG,
  96628. minHeight: cardHeightLG
  96629. }
  96630. }
  96631. }
  96632. }
  96633. };
  96634. };
  96635. const genTabStyle = token => {
  96636. const {
  96637. componentCls,
  96638. itemActiveColor,
  96639. itemHoverColor,
  96640. iconCls,
  96641. tabsHorizontalItemMargin,
  96642. horizontalItemPadding,
  96643. itemSelectedColor,
  96644. itemColor
  96645. } = token;
  96646. const tabCls = `${componentCls}-tab`;
  96647. return {
  96648. [tabCls]: {
  96649. position: 'relative',
  96650. WebkitTouchCallout: 'none',
  96651. WebkitTapHighlightColor: 'transparent',
  96652. display: 'inline-flex',
  96653. alignItems: 'center',
  96654. padding: horizontalItemPadding,
  96655. fontSize: token.titleFontSize,
  96656. background: 'transparent',
  96657. border: 0,
  96658. outline: 'none',
  96659. cursor: 'pointer',
  96660. color: itemColor,
  96661. '&-btn, &-remove': {
  96662. '&:focus:not(:focus-visible), &:active': {
  96663. color: itemActiveColor
  96664. }
  96665. },
  96666. '&-btn': {
  96667. outline: 'none',
  96668. transition: `all ${token.motionDurationSlow}`,
  96669. [`${tabCls}-icon:not(:last-child)`]: {
  96670. marginInlineEnd: token.marginSM
  96671. }
  96672. },
  96673. '&-remove': Object.assign({
  96674. flex: 'none',
  96675. lineHeight: 1,
  96676. marginRight: {
  96677. _skip_check_: true,
  96678. value: token.calc(token.marginXXS).mul(-1).equal()
  96679. },
  96680. marginLeft: {
  96681. _skip_check_: true,
  96682. value: token.marginXS
  96683. },
  96684. color: token.colorIcon,
  96685. fontSize: token.fontSizeSM,
  96686. background: 'transparent',
  96687. border: 'none',
  96688. outline: 'none',
  96689. cursor: 'pointer',
  96690. transition: `all ${token.motionDurationSlow}`,
  96691. '&:hover': {
  96692. color: token.colorTextHeading
  96693. }
  96694. }, (0,style.genFocusStyle)(token)),
  96695. '&:hover': {
  96696. color: itemHoverColor
  96697. },
  96698. [`&${tabCls}-active ${tabCls}-btn`]: {
  96699. color: itemSelectedColor,
  96700. textShadow: token.tabsActiveTextShadow
  96701. },
  96702. [`&${tabCls}-focus ${tabCls}-btn:focus-visible`]: (0,style.genFocusOutline)(token),
  96703. [`&${tabCls}-disabled`]: {
  96704. color: token.colorTextDisabled,
  96705. cursor: 'not-allowed'
  96706. },
  96707. [`&${tabCls}-disabled ${tabCls}-btn, &${tabCls}-disabled ${componentCls}-remove`]: {
  96708. '&:focus, &:active': {
  96709. color: token.colorTextDisabled
  96710. }
  96711. },
  96712. [`& ${tabCls}-remove ${iconCls}`]: {
  96713. margin: 0,
  96714. verticalAlign: 'middle'
  96715. },
  96716. [`${iconCls}:not(:last-child)`]: {
  96717. marginRight: {
  96718. _skip_check_: true,
  96719. value: token.marginSM
  96720. }
  96721. }
  96722. },
  96723. [`${tabCls} + ${tabCls}`]: {
  96724. margin: {
  96725. _skip_check_: true,
  96726. value: tabsHorizontalItemMargin
  96727. }
  96728. }
  96729. };
  96730. };
  96731. const genRtlStyle = token => {
  96732. const {
  96733. componentCls,
  96734. tabsHorizontalItemMarginRTL,
  96735. iconCls,
  96736. cardGutter,
  96737. calc
  96738. } = token;
  96739. const rtlCls = `${componentCls}-rtl`;
  96740. return {
  96741. [rtlCls]: {
  96742. direction: 'rtl',
  96743. [`${componentCls}-nav`]: {
  96744. [`${componentCls}-tab`]: {
  96745. margin: {
  96746. _skip_check_: true,
  96747. value: tabsHorizontalItemMarginRTL
  96748. },
  96749. [`${componentCls}-tab:last-of-type`]: {
  96750. marginLeft: {
  96751. _skip_check_: true,
  96752. value: 0
  96753. }
  96754. },
  96755. [iconCls]: {
  96756. marginRight: {
  96757. _skip_check_: true,
  96758. value: 0
  96759. },
  96760. marginLeft: {
  96761. _skip_check_: true,
  96762. value: (0,cssinjs.unit)(token.marginSM)
  96763. }
  96764. },
  96765. [`${componentCls}-tab-remove`]: {
  96766. marginRight: {
  96767. _skip_check_: true,
  96768. value: (0,cssinjs.unit)(token.marginXS)
  96769. },
  96770. marginLeft: {
  96771. _skip_check_: true,
  96772. value: (0,cssinjs.unit)(calc(token.marginXXS).mul(-1).equal())
  96773. },
  96774. [iconCls]: {
  96775. margin: 0
  96776. }
  96777. }
  96778. }
  96779. },
  96780. [`&${componentCls}-left`]: {
  96781. [`> ${componentCls}-nav`]: {
  96782. order: 1
  96783. },
  96784. [`> ${componentCls}-content-holder`]: {
  96785. order: 0
  96786. }
  96787. },
  96788. [`&${componentCls}-right`]: {
  96789. [`> ${componentCls}-nav`]: {
  96790. order: 0
  96791. },
  96792. [`> ${componentCls}-content-holder`]: {
  96793. order: 1
  96794. }
  96795. },
  96796. // ====================== Card ======================
  96797. [`&${componentCls}-card${componentCls}-top, &${componentCls}-card${componentCls}-bottom`]: {
  96798. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96799. [`${componentCls}-tab + ${componentCls}-tab`]: {
  96800. marginRight: {
  96801. _skip_check_: true,
  96802. value: cardGutter
  96803. },
  96804. marginLeft: {
  96805. _skip_check_: true,
  96806. value: 0
  96807. }
  96808. }
  96809. }
  96810. }
  96811. },
  96812. [`${componentCls}-dropdown-rtl`]: {
  96813. direction: 'rtl'
  96814. },
  96815. [`${componentCls}-menu-item`]: {
  96816. [`${componentCls}-dropdown-rtl`]: {
  96817. textAlign: {
  96818. _skip_check_: true,
  96819. value: 'right'
  96820. }
  96821. }
  96822. }
  96823. };
  96824. };
  96825. const genTabsStyle = token => {
  96826. const {
  96827. componentCls,
  96828. tabsCardPadding,
  96829. cardHeight,
  96830. cardGutter,
  96831. itemHoverColor,
  96832. itemActiveColor,
  96833. colorBorderSecondary
  96834. } = token;
  96835. return {
  96836. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  96837. display: 'flex',
  96838. // ========================== Navigation ==========================
  96839. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96840. position: 'relative',
  96841. display: 'flex',
  96842. flex: 'none',
  96843. alignItems: 'center',
  96844. [`${componentCls}-nav-wrap`]: {
  96845. position: 'relative',
  96846. display: 'flex',
  96847. flex: 'auto',
  96848. alignSelf: 'stretch',
  96849. overflow: 'hidden',
  96850. whiteSpace: 'nowrap',
  96851. transform: 'translate(0)',
  96852. // Fix chrome render bug
  96853. // >>>>> Ping shadow
  96854. '&::before, &::after': {
  96855. position: 'absolute',
  96856. zIndex: 1,
  96857. opacity: 0,
  96858. transition: `opacity ${token.motionDurationSlow}`,
  96859. content: "''",
  96860. pointerEvents: 'none'
  96861. }
  96862. },
  96863. [`${componentCls}-nav-list`]: {
  96864. position: 'relative',
  96865. display: 'flex',
  96866. transition: `opacity ${token.motionDurationSlow}`
  96867. },
  96868. // >>>>>>>> Operations
  96869. [`${componentCls}-nav-operations`]: {
  96870. display: 'flex',
  96871. alignSelf: 'stretch'
  96872. },
  96873. [`${componentCls}-nav-operations-hidden`]: {
  96874. position: 'absolute',
  96875. visibility: 'hidden',
  96876. pointerEvents: 'none'
  96877. },
  96878. [`${componentCls}-nav-more`]: {
  96879. position: 'relative',
  96880. padding: tabsCardPadding,
  96881. background: 'transparent',
  96882. border: 0,
  96883. color: token.colorText,
  96884. '&::after': {
  96885. position: 'absolute',
  96886. right: {
  96887. _skip_check_: true,
  96888. value: 0
  96889. },
  96890. bottom: 0,
  96891. left: {
  96892. _skip_check_: true,
  96893. value: 0
  96894. },
  96895. height: token.calc(token.controlHeightLG).div(8).equal(),
  96896. transform: 'translateY(100%)',
  96897. content: "''"
  96898. }
  96899. },
  96900. [`${componentCls}-nav-add`]: Object.assign({
  96901. minWidth: cardHeight,
  96902. minHeight: cardHeight,
  96903. marginLeft: {
  96904. _skip_check_: true,
  96905. value: cardGutter
  96906. },
  96907. background: 'transparent',
  96908. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
  96909. borderRadius: `${(0,cssinjs.unit)(token.borderRadiusLG)} ${(0,cssinjs.unit)(token.borderRadiusLG)} 0 0`,
  96910. outline: 'none',
  96911. cursor: 'pointer',
  96912. color: token.colorText,
  96913. transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
  96914. '&:hover': {
  96915. color: itemHoverColor
  96916. },
  96917. '&:active, &:focus:not(:focus-visible)': {
  96918. color: itemActiveColor
  96919. }
  96920. }, (0,style.genFocusStyle)(token, -3))
  96921. },
  96922. [`${componentCls}-extra-content`]: {
  96923. flex: 'none'
  96924. },
  96925. // ============================ InkBar ============================
  96926. [`${componentCls}-ink-bar`]: {
  96927. position: 'absolute',
  96928. background: token.inkBarColor,
  96929. pointerEvents: 'none'
  96930. }
  96931. }), genTabStyle(token)), {
  96932. // =========================== TabPanes ===========================
  96933. [`${componentCls}-content`]: {
  96934. position: 'relative',
  96935. width: '100%'
  96936. },
  96937. [`${componentCls}-content-holder`]: {
  96938. flex: 'auto',
  96939. minWidth: 0,
  96940. minHeight: 0
  96941. },
  96942. [`${componentCls}-tabpane`]: Object.assign(Object.assign({}, (0,style.genFocusStyle)(token)), {
  96943. '&-hidden': {
  96944. display: 'none'
  96945. }
  96946. })
  96947. }),
  96948. [`${componentCls}-centered`]: {
  96949. [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
  96950. [`${componentCls}-nav-wrap`]: {
  96951. [`&:not([class*='${componentCls}-nav-wrap-ping']) > ${componentCls}-nav-list`]: {
  96952. margin: 'auto'
  96953. }
  96954. }
  96955. }
  96956. }
  96957. };
  96958. };
  96959. const prepareComponentToken = token => {
  96960. const {
  96961. cardHeight,
  96962. cardHeightSM,
  96963. cardHeightLG,
  96964. controlHeight,
  96965. controlHeightLG
  96966. } = token;
  96967. const mergedCardHeight = cardHeight || controlHeightLG;
  96968. const mergedCardHeightSM = cardHeightSM || controlHeight;
  96969. // `controlHeight` missing XL variable, so we directly write it here:
  96970. const mergedCardHeightLG = cardHeightLG || controlHeightLG + 8;
  96971. return {
  96972. zIndexPopup: token.zIndexPopupBase + 50,
  96973. cardBg: token.colorFillAlter,
  96974. // We can not pass this as valid value,
  96975. // Since `cardHeight` will lock nav add button height.
  96976. cardHeight: mergedCardHeight,
  96977. cardHeightSM: mergedCardHeightSM,
  96978. cardHeightLG: mergedCardHeightLG,
  96979. // Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
  96980. cardPadding: `${(mergedCardHeight - token.fontHeight) / 2 - token.lineWidth}px ${token.padding}px`,
  96981. cardPaddingSM: `${(mergedCardHeightSM - token.fontHeight) / 2 - token.lineWidth}px ${token.paddingXS}px`,
  96982. cardPaddingLG: `${(mergedCardHeightLG - token.fontHeightLG) / 2 - token.lineWidth}px ${token.padding}px`,
  96983. titleFontSize: token.fontSize,
  96984. titleFontSizeLG: token.fontSizeLG,
  96985. titleFontSizeSM: token.fontSize,
  96986. inkBarColor: token.colorPrimary,
  96987. horizontalMargin: `0 0 ${token.margin}px 0`,
  96988. horizontalItemGutter: 32,
  96989. // Fixed Value
  96990. // Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.
  96991. horizontalItemMargin: ``,
  96992. horizontalItemMarginRTL: ``,
  96993. horizontalItemPadding: `${token.paddingSM}px 0`,
  96994. horizontalItemPaddingSM: `${token.paddingXS}px 0`,
  96995. horizontalItemPaddingLG: `${token.padding}px 0`,
  96996. verticalItemPadding: `${token.paddingXS}px ${token.paddingLG}px`,
  96997. verticalItemMargin: `${token.margin}px 0 0 0`,
  96998. itemColor: token.colorText,
  96999. itemSelectedColor: token.colorPrimary,
  97000. itemHoverColor: token.colorPrimaryHover,
  97001. itemActiveColor: token.colorPrimaryActive,
  97002. cardGutter: token.marginXXS / 2
  97003. };
  97004. };
  97005. // ============================== Export ==============================
  97006. /* harmony default export */ var tabs_style = ((0,genStyleUtils.genStyleHooks)('Tabs', token => {
  97007. const tabsToken = (0,es.mergeToken)(token, {
  97008. // `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
  97009. tabsCardPadding: token.cardPadding,
  97010. dropdownEdgeChildVerticalPadding: token.paddingXXS,
  97011. tabsActiveTextShadow: '0 0 0.25px currentcolor',
  97012. tabsDropdownHeight: 200,
  97013. tabsDropdownWidth: 120,
  97014. tabsHorizontalItemMargin: `0 0 0 ${(0,cssinjs.unit)(token.horizontalItemGutter)}`,
  97015. tabsHorizontalItemMarginRTL: `0 0 0 ${(0,cssinjs.unit)(token.horizontalItemGutter)}`
  97016. });
  97017. return [genSizeStyle(tabsToken), genRtlStyle(tabsToken), genPositionStyle(tabsToken), genDropdownStyle(tabsToken), genCardStyle(tabsToken), genTabsStyle(tabsToken), motion(tabsToken)];
  97018. }, prepareComponentToken));
  97019. /***/ }),
  97020. /***/ "./components/tag/style/index.ts":
  97021. /*!***************************************!*\
  97022. !*** ./components/tag/style/index.ts ***!
  97023. \***************************************/
  97024. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97025. "use strict";
  97026. __webpack_require__.r(__webpack_exports__);
  97027. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97028. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; },
  97029. /* harmony export */ prepareToken: function() { return /* binding */ prepareToken; }
  97030. /* harmony export */ });
  97031. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  97032. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  97033. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  97034. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  97035. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  97036. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  97037. // ============================== Styles ==============================
  97038. const genBaseStyle = token => {
  97039. const {
  97040. paddingXXS,
  97041. lineWidth,
  97042. tagPaddingHorizontal,
  97043. componentCls,
  97044. calc
  97045. } = token;
  97046. const paddingInline = calc(tagPaddingHorizontal).sub(lineWidth).equal();
  97047. const iconMarginInline = calc(paddingXXS).sub(lineWidth).equal();
  97048. return {
  97049. // Result
  97050. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
  97051. display: 'inline-block',
  97052. height: 'auto',
  97053. // https://github.com/ant-design/ant-design/pull/47504
  97054. marginInlineEnd: token.marginXS,
  97055. paddingInline,
  97056. fontSize: token.tagFontSize,
  97057. lineHeight: token.tagLineHeight,
  97058. whiteSpace: 'nowrap',
  97059. background: token.defaultBg,
  97060. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  97061. borderRadius: token.borderRadiusSM,
  97062. opacity: 1,
  97063. transition: `all ${token.motionDurationMid}`,
  97064. textAlign: 'start',
  97065. position: 'relative',
  97066. // RTL
  97067. [`&${componentCls}-rtl`]: {
  97068. direction: 'rtl'
  97069. },
  97070. '&, a, a:hover': {
  97071. color: token.defaultColor
  97072. },
  97073. [`${componentCls}-close-icon`]: {
  97074. marginInlineStart: iconMarginInline,
  97075. fontSize: token.tagIconSize,
  97076. color: token.colorIcon,
  97077. cursor: 'pointer',
  97078. transition: `all ${token.motionDurationMid}`,
  97079. '&:hover': {
  97080. color: token.colorTextHeading
  97081. }
  97082. },
  97083. [`&${componentCls}-has-color`]: {
  97084. borderColor: 'transparent',
  97085. [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {
  97086. color: token.colorTextLightSolid
  97087. }
  97088. },
  97089. '&-checkable': {
  97090. backgroundColor: 'transparent',
  97091. borderColor: 'transparent',
  97092. cursor: 'pointer',
  97093. [`&:not(${componentCls}-checkable-checked):hover`]: {
  97094. color: token.colorPrimary,
  97095. backgroundColor: token.colorFillSecondary
  97096. },
  97097. '&:active, &-checked': {
  97098. color: token.colorTextLightSolid
  97099. },
  97100. '&-checked': {
  97101. backgroundColor: token.colorPrimary,
  97102. '&:hover': {
  97103. backgroundColor: token.colorPrimaryHover
  97104. }
  97105. },
  97106. '&:active': {
  97107. backgroundColor: token.colorPrimaryActive
  97108. }
  97109. },
  97110. '&-hidden': {
  97111. display: 'none'
  97112. },
  97113. // To ensure that a space will be placed between character and `Icon`.
  97114. [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {
  97115. marginInlineStart: paddingInline
  97116. }
  97117. }),
  97118. [`${componentCls}-borderless`]: {
  97119. borderColor: 'transparent',
  97120. background: token.tagBorderlessBg
  97121. }
  97122. };
  97123. };
  97124. // ============================== Export ==============================
  97125. const prepareToken = token => {
  97126. const {
  97127. lineWidth,
  97128. fontSizeIcon,
  97129. calc
  97130. } = token;
  97131. const tagFontSize = token.fontSizeSM;
  97132. const tagToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.mergeToken)(token, {
  97133. tagFontSize,
  97134. tagLineHeight: (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(token.lineHeightSM).mul(tagFontSize).equal()),
  97135. tagIconSize: calc(fontSizeIcon).sub(calc(lineWidth).mul(2)).equal(),
  97136. // Tag icon is much smaller
  97137. tagPaddingHorizontal: 8,
  97138. // Fixed padding.
  97139. tagBorderlessBg: token.defaultBg
  97140. });
  97141. return tagToken;
  97142. };
  97143. const prepareComponentToken = token => ({
  97144. defaultBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorFillQuaternary).onBackground(token.colorBgContainer).toHexString(),
  97145. defaultColor: token.colorText
  97146. });
  97147. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__.genStyleHooks)('Tag', token => {
  97148. const tagToken = prepareToken(token);
  97149. return genBaseStyle(tagToken);
  97150. }, prepareComponentToken));
  97151. /***/ }),
  97152. /***/ "./components/theme/context.ts":
  97153. /*!*************************************!*\
  97154. !*** ./components/theme/context.ts ***!
  97155. \*************************************/
  97156. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97157. "use strict";
  97158. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97159. /* harmony export */ DesignTokenContext: function() { return /* binding */ DesignTokenContext; },
  97160. /* harmony export */ defaultConfig: function() { return /* binding */ defaultConfig; }
  97161. /* harmony export */ });
  97162. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  97163. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  97164. /* harmony import */ var _themes_seed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./themes/seed */ "./components/theme/themes/seed.ts");
  97165. // ================================ Context =================================
  97166. // To ensure snapshot stable. We disable hashed in test env.
  97167. const defaultConfig = {
  97168. token: _themes_seed__WEBPACK_IMPORTED_MODULE_1__["default"],
  97169. override: {
  97170. override: _themes_seed__WEBPACK_IMPORTED_MODULE_1__["default"]
  97171. },
  97172. hashed: true
  97173. };
  97174. const DesignTokenContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(defaultConfig);
  97175. /***/ }),
  97176. /***/ "./components/theme/interface/presetColors.ts":
  97177. /*!****************************************************!*\
  97178. !*** ./components/theme/interface/presetColors.ts ***!
  97179. \****************************************************/
  97180. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97181. "use strict";
  97182. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97183. /* harmony export */ PresetColors: function() { return /* binding */ PresetColors; }
  97184. /* harmony export */ });
  97185. const PresetColors = ['blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'];
  97186. /***/ }),
  97187. /***/ "./components/theme/themes/default/index.ts":
  97188. /*!**************************************************************!*\
  97189. !*** ./components/theme/themes/default/index.ts + 5 modules ***!
  97190. \**************************************************************/
  97191. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97192. "use strict";
  97193. // EXPORTS
  97194. __webpack_require__.d(__webpack_exports__, {
  97195. "default": function() { return /* binding */ derivative; }
  97196. });
  97197. // EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 2 modules
  97198. var es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
  97199. // EXTERNAL MODULE: ./components/theme/themes/seed.ts
  97200. var seed = __webpack_require__("./components/theme/themes/seed.ts");
  97201. // EXTERNAL MODULE: ./components/theme/themes/shared/genColorMapToken.ts
  97202. var genColorMapToken = __webpack_require__("./components/theme/themes/shared/genColorMapToken.ts");
  97203. ;// ./components/theme/themes/shared/genRadius.ts
  97204. const genRadius = radiusBase => {
  97205. let radiusLG = radiusBase;
  97206. let radiusSM = radiusBase;
  97207. let radiusXS = radiusBase;
  97208. let radiusOuter = radiusBase;
  97209. // radiusLG
  97210. if (radiusBase < 6 && radiusBase >= 5) {
  97211. radiusLG = radiusBase + 1;
  97212. } else if (radiusBase < 16 && radiusBase >= 6) {
  97213. radiusLG = radiusBase + 2;
  97214. } else if (radiusBase >= 16) {
  97215. radiusLG = 16;
  97216. }
  97217. // radiusSM
  97218. if (radiusBase < 7 && radiusBase >= 5) {
  97219. radiusSM = 4;
  97220. } else if (radiusBase < 8 && radiusBase >= 7) {
  97221. radiusSM = 5;
  97222. } else if (radiusBase < 14 && radiusBase >= 8) {
  97223. radiusSM = 6;
  97224. } else if (radiusBase < 16 && radiusBase >= 14) {
  97225. radiusSM = 7;
  97226. } else if (radiusBase >= 16) {
  97227. radiusSM = 8;
  97228. }
  97229. // radiusXS
  97230. if (radiusBase < 6 && radiusBase >= 2) {
  97231. radiusXS = 1;
  97232. } else if (radiusBase >= 6) {
  97233. radiusXS = 2;
  97234. }
  97235. // radiusOuter
  97236. if (radiusBase > 4 && radiusBase < 8) {
  97237. radiusOuter = 4;
  97238. } else if (radiusBase >= 8) {
  97239. radiusOuter = 6;
  97240. }
  97241. return {
  97242. borderRadius: radiusBase,
  97243. borderRadiusXS: radiusXS,
  97244. borderRadiusSM: radiusSM,
  97245. borderRadiusLG: radiusLG,
  97246. borderRadiusOuter: radiusOuter
  97247. };
  97248. };
  97249. /* harmony default export */ var shared_genRadius = (genRadius);
  97250. ;// ./components/theme/themes/shared/genCommonMapToken.ts
  97251. function genCommonMapToken(token) {
  97252. const {
  97253. motionUnit,
  97254. motionBase,
  97255. borderRadius,
  97256. lineWidth
  97257. } = token;
  97258. return Object.assign({
  97259. // motion
  97260. motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,
  97261. motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,
  97262. motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
  97263. // line
  97264. lineWidthBold: lineWidth + 1
  97265. }, shared_genRadius(borderRadius));
  97266. }
  97267. // EXTERNAL MODULE: ./components/theme/themes/shared/genControlHeight.ts
  97268. var genControlHeight = __webpack_require__("./components/theme/themes/shared/genControlHeight.ts");
  97269. // EXTERNAL MODULE: ./components/theme/themes/shared/genFontMapToken.ts
  97270. var genFontMapToken = __webpack_require__("./components/theme/themes/shared/genFontMapToken.ts");
  97271. ;// ./components/theme/themes/shared/genSizeMapToken.ts
  97272. function genSizeMapToken(token) {
  97273. const {
  97274. sizeUnit,
  97275. sizeStep
  97276. } = token;
  97277. return {
  97278. sizeXXL: sizeUnit * (sizeStep + 8),
  97279. // 48
  97280. sizeXL: sizeUnit * (sizeStep + 4),
  97281. // 32
  97282. sizeLG: sizeUnit * (sizeStep + 2),
  97283. // 24
  97284. sizeMD: sizeUnit * (sizeStep + 1),
  97285. // 20
  97286. sizeMS: sizeUnit * sizeStep,
  97287. // 16
  97288. size: sizeUnit * sizeStep,
  97289. // 16
  97290. sizeSM: sizeUnit * (sizeStep - 1),
  97291. // 12
  97292. sizeXS: sizeUnit * (sizeStep - 2),
  97293. // 8
  97294. sizeXXS: sizeUnit * (sizeStep - 3) // 4
  97295. };
  97296. }
  97297. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  97298. var fast_color_es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  97299. ;// ./components/theme/themes/default/colorAlgorithm.ts
  97300. const getAlphaColor = (baseColor, alpha) => new fast_color_es.FastColor(baseColor).setA(alpha).toRgbString();
  97301. const getSolidColor = (baseColor, brightness) => {
  97302. const instance = new fast_color_es.FastColor(baseColor);
  97303. return instance.darken(brightness).toHexString();
  97304. };
  97305. ;// ./components/theme/themes/default/colors.ts
  97306. const generateColorPalettes = baseColor => {
  97307. const colors = (0,es.generate)(baseColor);
  97308. return {
  97309. 1: colors[0],
  97310. 2: colors[1],
  97311. 3: colors[2],
  97312. 4: colors[3],
  97313. 5: colors[4],
  97314. 6: colors[5],
  97315. 7: colors[6],
  97316. 8: colors[4],
  97317. 9: colors[5],
  97318. 10: colors[6]
  97319. // 8: colors[7],
  97320. // 9: colors[8],
  97321. // 10: colors[9],
  97322. };
  97323. };
  97324. const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
  97325. const colorBgBase = bgBaseColor || '#fff';
  97326. const colorTextBase = textBaseColor || '#000';
  97327. return {
  97328. colorBgBase,
  97329. colorTextBase,
  97330. colorText: getAlphaColor(colorTextBase, 0.88),
  97331. colorTextSecondary: getAlphaColor(colorTextBase, 0.65),
  97332. colorTextTertiary: getAlphaColor(colorTextBase, 0.45),
  97333. colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),
  97334. colorFill: getAlphaColor(colorTextBase, 0.15),
  97335. colorFillSecondary: getAlphaColor(colorTextBase, 0.06),
  97336. colorFillTertiary: getAlphaColor(colorTextBase, 0.04),
  97337. colorFillQuaternary: getAlphaColor(colorTextBase, 0.02),
  97338. colorBgSolid: getAlphaColor(colorTextBase, 1),
  97339. colorBgSolidHover: getAlphaColor(colorTextBase, 0.75),
  97340. colorBgSolidActive: getAlphaColor(colorTextBase, 0.95),
  97341. colorBgLayout: getSolidColor(colorBgBase, 4),
  97342. colorBgContainer: getSolidColor(colorBgBase, 0),
  97343. colorBgElevated: getSolidColor(colorBgBase, 0),
  97344. colorBgSpotlight: getAlphaColor(colorTextBase, 0.85),
  97345. colorBgBlur: 'transparent',
  97346. colorBorder: getSolidColor(colorBgBase, 15),
  97347. colorBorderSecondary: getSolidColor(colorBgBase, 6)
  97348. };
  97349. };
  97350. ;// ./components/theme/themes/default/index.ts
  97351. function derivative(token) {
  97352. // pink is deprecated name of magenta, keep this for backwards compatibility
  97353. es.presetPrimaryColors.pink = es.presetPrimaryColors.magenta;
  97354. es.presetPalettes.pink = es.presetPalettes.magenta;
  97355. const colorPalettes = Object.keys(seed.defaultPresetColors).map(colorKey => {
  97356. const colors = token[colorKey] === es.presetPrimaryColors[colorKey] ? es.presetPalettes[colorKey] : (0,es.generate)(token[colorKey]);
  97357. return Array.from({
  97358. length: 10
  97359. }, () => 1).reduce((prev, _, i) => {
  97360. prev[`${colorKey}-${i + 1}`] = colors[i];
  97361. prev[`${colorKey}${i + 1}`] = colors[i];
  97362. return prev;
  97363. }, {});
  97364. }).reduce((prev, cur) => {
  97365. prev = Object.assign(Object.assign({}, prev), cur);
  97366. return prev;
  97367. }, {});
  97368. return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), (0,genColorMapToken["default"])(token, {
  97369. generateColorPalettes: generateColorPalettes,
  97370. generateNeutralColorPalettes: generateNeutralColorPalettes
  97371. })), (0,genFontMapToken["default"])(token.fontSize)), genSizeMapToken(token)), (0,genControlHeight["default"])(token)), genCommonMapToken(token));
  97372. }
  97373. /***/ }),
  97374. /***/ "./components/theme/themes/default/theme.ts":
  97375. /*!**************************************************!*\
  97376. !*** ./components/theme/themes/default/theme.ts ***!
  97377. \**************************************************/
  97378. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97379. "use strict";
  97380. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  97381. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  97382. /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./components/theme/themes/default/index.ts");
  97383. const defaultTheme = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.createTheme)(_index__WEBPACK_IMPORTED_MODULE_1__["default"]);
  97384. /* harmony default export */ __webpack_exports__["default"] = (defaultTheme);
  97385. /***/ }),
  97386. /***/ "./components/theme/themes/seed.ts":
  97387. /*!*****************************************!*\
  97388. !*** ./components/theme/themes/seed.ts ***!
  97389. \*****************************************/
  97390. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97391. "use strict";
  97392. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97393. /* harmony export */ defaultPresetColors: function() { return /* binding */ defaultPresetColors; }
  97394. /* harmony export */ });
  97395. const defaultPresetColors = {
  97396. blue: '#1677FF',
  97397. purple: '#722ED1',
  97398. cyan: '#13C2C2',
  97399. green: '#52C41A',
  97400. magenta: '#EB2F96',
  97401. /**
  97402. * @deprecated Use magenta instead
  97403. */
  97404. pink: '#EB2F96',
  97405. red: '#F5222D',
  97406. orange: '#FA8C16',
  97407. yellow: '#FADB14',
  97408. volcano: '#FA541C',
  97409. geekblue: '#2F54EB',
  97410. gold: '#FAAD14',
  97411. lime: '#A0D911'
  97412. };
  97413. const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
  97414. // Color
  97415. colorPrimary: '#1677ff',
  97416. colorSuccess: '#52c41a',
  97417. colorWarning: '#faad14',
  97418. colorError: '#ff4d4f',
  97419. colorInfo: '#1677ff',
  97420. colorLink: '',
  97421. colorTextBase: '',
  97422. colorBgBase: '',
  97423. // Font
  97424. fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
  97425. 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
  97426. 'Noto Color Emoji'`,
  97427. fontFamilyCode: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,
  97428. fontSize: 14,
  97429. // Line
  97430. lineWidth: 1,
  97431. lineType: 'solid',
  97432. // Motion
  97433. motionUnit: 0.1,
  97434. motionBase: 0,
  97435. motionEaseOutCirc: 'cubic-bezier(0.08, 0.82, 0.17, 1)',
  97436. motionEaseInOutCirc: 'cubic-bezier(0.78, 0.14, 0.15, 0.86)',
  97437. motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
  97438. motionEaseInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
  97439. motionEaseOutBack: 'cubic-bezier(0.12, 0.4, 0.29, 1.46)',
  97440. motionEaseInBack: 'cubic-bezier(0.71, -0.46, 0.88, 0.6)',
  97441. motionEaseInQuint: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',
  97442. motionEaseOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',
  97443. // Radius
  97444. borderRadius: 6,
  97445. // Size
  97446. sizeUnit: 4,
  97447. sizeStep: 4,
  97448. sizePopupArrow: 16,
  97449. // Control Base
  97450. controlHeight: 32,
  97451. // zIndex
  97452. zIndexBase: 0,
  97453. zIndexPopupBase: 1000,
  97454. // Image
  97455. opacityImage: 1,
  97456. // Wireframe
  97457. wireframe: false,
  97458. // Motion
  97459. motion: true
  97460. });
  97461. /* harmony default export */ __webpack_exports__["default"] = (seedToken);
  97462. /***/ }),
  97463. /***/ "./components/theme/themes/shared/genColorMapToken.ts":
  97464. /*!************************************************************!*\
  97465. !*** ./components/theme/themes/shared/genColorMapToken.ts ***!
  97466. \************************************************************/
  97467. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97468. "use strict";
  97469. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97470. /* harmony export */ "default": function() { return /* binding */ genColorMapToken; }
  97471. /* harmony export */ });
  97472. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  97473. function genColorMapToken(seed, {
  97474. generateColorPalettes,
  97475. generateNeutralColorPalettes
  97476. }) {
  97477. const {
  97478. colorSuccess: colorSuccessBase,
  97479. colorWarning: colorWarningBase,
  97480. colorError: colorErrorBase,
  97481. colorInfo: colorInfoBase,
  97482. colorPrimary: colorPrimaryBase,
  97483. colorBgBase,
  97484. colorTextBase
  97485. } = seed;
  97486. const primaryColors = generateColorPalettes(colorPrimaryBase);
  97487. const successColors = generateColorPalettes(colorSuccessBase);
  97488. const warningColors = generateColorPalettes(colorWarningBase);
  97489. const errorColors = generateColorPalettes(colorErrorBase);
  97490. const infoColors = generateColorPalettes(colorInfoBase);
  97491. const neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);
  97492. // Color Link
  97493. const colorLink = seed.colorLink || seed.colorInfo;
  97494. const linkColors = generateColorPalettes(colorLink);
  97495. const colorErrorBgFilledHover = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(errorColors[1]).mix(new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(errorColors[3]), 50).toHexString();
  97496. return Object.assign(Object.assign({}, neutralColors), {
  97497. colorPrimaryBg: primaryColors[1],
  97498. colorPrimaryBgHover: primaryColors[2],
  97499. colorPrimaryBorder: primaryColors[3],
  97500. colorPrimaryBorderHover: primaryColors[4],
  97501. colorPrimaryHover: primaryColors[5],
  97502. colorPrimary: primaryColors[6],
  97503. colorPrimaryActive: primaryColors[7],
  97504. colorPrimaryTextHover: primaryColors[8],
  97505. colorPrimaryText: primaryColors[9],
  97506. colorPrimaryTextActive: primaryColors[10],
  97507. colorSuccessBg: successColors[1],
  97508. colorSuccessBgHover: successColors[2],
  97509. colorSuccessBorder: successColors[3],
  97510. colorSuccessBorderHover: successColors[4],
  97511. colorSuccessHover: successColors[4],
  97512. colorSuccess: successColors[6],
  97513. colorSuccessActive: successColors[7],
  97514. colorSuccessTextHover: successColors[8],
  97515. colorSuccessText: successColors[9],
  97516. colorSuccessTextActive: successColors[10],
  97517. colorErrorBg: errorColors[1],
  97518. colorErrorBgHover: errorColors[2],
  97519. colorErrorBgFilledHover,
  97520. colorErrorBgActive: errorColors[3],
  97521. colorErrorBorder: errorColors[3],
  97522. colorErrorBorderHover: errorColors[4],
  97523. colorErrorHover: errorColors[5],
  97524. colorError: errorColors[6],
  97525. colorErrorActive: errorColors[7],
  97526. colorErrorTextHover: errorColors[8],
  97527. colorErrorText: errorColors[9],
  97528. colorErrorTextActive: errorColors[10],
  97529. colorWarningBg: warningColors[1],
  97530. colorWarningBgHover: warningColors[2],
  97531. colorWarningBorder: warningColors[3],
  97532. colorWarningBorderHover: warningColors[4],
  97533. colorWarningHover: warningColors[4],
  97534. colorWarning: warningColors[6],
  97535. colorWarningActive: warningColors[7],
  97536. colorWarningTextHover: warningColors[8],
  97537. colorWarningText: warningColors[9],
  97538. colorWarningTextActive: warningColors[10],
  97539. colorInfoBg: infoColors[1],
  97540. colorInfoBgHover: infoColors[2],
  97541. colorInfoBorder: infoColors[3],
  97542. colorInfoBorderHover: infoColors[4],
  97543. colorInfoHover: infoColors[4],
  97544. colorInfo: infoColors[6],
  97545. colorInfoActive: infoColors[7],
  97546. colorInfoTextHover: infoColors[8],
  97547. colorInfoText: infoColors[9],
  97548. colorInfoTextActive: infoColors[10],
  97549. colorLinkHover: linkColors[4],
  97550. colorLink: linkColors[6],
  97551. colorLinkActive: linkColors[7],
  97552. colorBgMask: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('#000').setA(0.45).toRgbString(),
  97553. colorWhite: '#fff'
  97554. });
  97555. }
  97556. /***/ }),
  97557. /***/ "./components/theme/themes/shared/genControlHeight.ts":
  97558. /*!************************************************************!*\
  97559. !*** ./components/theme/themes/shared/genControlHeight.ts ***!
  97560. \************************************************************/
  97561. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  97562. "use strict";
  97563. const genControlHeight = token => {
  97564. const {
  97565. controlHeight
  97566. } = token;
  97567. return {
  97568. controlHeightSM: controlHeight * 0.75,
  97569. controlHeightXS: controlHeight * 0.5,
  97570. controlHeightLG: controlHeight * 1.25
  97571. };
  97572. };
  97573. /* harmony default export */ __webpack_exports__["default"] = (genControlHeight);
  97574. /***/ }),
  97575. /***/ "./components/theme/themes/shared/genFontMapToken.ts":
  97576. /*!***********************************************************!*\
  97577. !*** ./components/theme/themes/shared/genFontMapToken.ts ***!
  97578. \***********************************************************/
  97579. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97580. "use strict";
  97581. /* harmony import */ var _genFontSizes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./genFontSizes */ "./components/theme/themes/shared/genFontSizes.ts");
  97582. const genFontMapToken = fontSize => {
  97583. const fontSizePairs = (0,_genFontSizes__WEBPACK_IMPORTED_MODULE_0__["default"])(fontSize);
  97584. const fontSizes = fontSizePairs.map(pair => pair.size);
  97585. const lineHeights = fontSizePairs.map(pair => pair.lineHeight);
  97586. const fontSizeMD = fontSizes[1];
  97587. const fontSizeSM = fontSizes[0];
  97588. const fontSizeLG = fontSizes[2];
  97589. const lineHeight = lineHeights[1];
  97590. const lineHeightSM = lineHeights[0];
  97591. const lineHeightLG = lineHeights[2];
  97592. return {
  97593. fontSizeSM,
  97594. fontSize: fontSizeMD,
  97595. fontSizeLG,
  97596. fontSizeXL: fontSizes[3],
  97597. fontSizeHeading1: fontSizes[6],
  97598. fontSizeHeading2: fontSizes[5],
  97599. fontSizeHeading3: fontSizes[4],
  97600. fontSizeHeading4: fontSizes[3],
  97601. fontSizeHeading5: fontSizes[2],
  97602. lineHeight,
  97603. lineHeightLG,
  97604. lineHeightSM,
  97605. fontHeight: Math.round(lineHeight * fontSizeMD),
  97606. fontHeightLG: Math.round(lineHeightLG * fontSizeLG),
  97607. fontHeightSM: Math.round(lineHeightSM * fontSizeSM),
  97608. lineHeightHeading1: lineHeights[6],
  97609. lineHeightHeading2: lineHeights[5],
  97610. lineHeightHeading3: lineHeights[4],
  97611. lineHeightHeading4: lineHeights[3],
  97612. lineHeightHeading5: lineHeights[2]
  97613. };
  97614. };
  97615. /* harmony default export */ __webpack_exports__["default"] = (genFontMapToken);
  97616. /***/ }),
  97617. /***/ "./components/theme/themes/shared/genFontSizes.ts":
  97618. /*!********************************************************!*\
  97619. !*** ./components/theme/themes/shared/genFontSizes.ts ***!
  97620. \********************************************************/
  97621. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97622. "use strict";
  97623. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97624. /* harmony export */ "default": function() { return /* binding */ getFontSizes; },
  97625. /* harmony export */ getLineHeight: function() { return /* binding */ getLineHeight; }
  97626. /* harmony export */ });
  97627. function getLineHeight(fontSize) {
  97628. return (fontSize + 8) / fontSize;
  97629. }
  97630. // https://zhuanlan.zhihu.com/p/32746810
  97631. function getFontSizes(base) {
  97632. const fontSizes = Array.from({
  97633. length: 10
  97634. }).map((_, index) => {
  97635. const i = index - 1;
  97636. const baseSize = base * Math.pow(Math.E, i / 5);
  97637. const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);
  97638. // Convert to even
  97639. return Math.floor(intSize / 2) * 2;
  97640. });
  97641. fontSizes[1] = base;
  97642. return fontSizes.map(size => ({
  97643. size,
  97644. lineHeight: getLineHeight(size)
  97645. }));
  97646. }
  97647. /***/ }),
  97648. /***/ "./components/theme/useToken.ts":
  97649. /*!**************************************!*\
  97650. !*** ./components/theme/useToken.ts ***!
  97651. \**************************************/
  97652. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97653. "use strict";
  97654. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97655. /* harmony export */ "default": function() { return /* binding */ useToken; },
  97656. /* harmony export */ unitless: function() { return /* binding */ unitless; }
  97657. /* harmony export */ });
  97658. /* unused harmony exports ignore, getComputedToken */
  97659. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  97660. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  97661. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  97662. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__);
  97663. /* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../version */ "./components/version/index.tsx");
  97664. /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context */ "./components/theme/context.ts");
  97665. /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./components/theme/themes/default/theme.ts");
  97666. /* harmony import */ var _themes_seed__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./themes/seed */ "./components/theme/themes/seed.ts");
  97667. /* harmony import */ var _util_alias__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util/alias */ "./components/theme/util/alias.ts");
  97668. var __rest = undefined && undefined.__rest || function (s, e) {
  97669. var t = {};
  97670. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  97671. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  97672. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  97673. }
  97674. return t;
  97675. };
  97676. const unitless = {
  97677. lineHeight: true,
  97678. lineHeightSM: true,
  97679. lineHeightLG: true,
  97680. lineHeightHeading1: true,
  97681. lineHeightHeading2: true,
  97682. lineHeightHeading3: true,
  97683. lineHeightHeading4: true,
  97684. lineHeightHeading5: true,
  97685. opacityLoading: true,
  97686. fontWeightStrong: true,
  97687. zIndexPopupBase: true,
  97688. zIndexBase: true,
  97689. opacityImage: true
  97690. };
  97691. const ignore = {
  97692. motionBase: true,
  97693. motionUnit: true
  97694. };
  97695. const preserve = {
  97696. screenXS: true,
  97697. screenXSMin: true,
  97698. screenXSMax: true,
  97699. screenSM: true,
  97700. screenSMMin: true,
  97701. screenSMMax: true,
  97702. screenMD: true,
  97703. screenMDMin: true,
  97704. screenMDMax: true,
  97705. screenLG: true,
  97706. screenLGMin: true,
  97707. screenLGMax: true,
  97708. screenXL: true,
  97709. screenXLMin: true,
  97710. screenXLMax: true,
  97711. screenXXL: true,
  97712. screenXXLMin: true
  97713. };
  97714. const getComputedToken = (originToken, overrideToken, theme) => {
  97715. const derivativeToken = theme.getDerivativeToken(originToken);
  97716. const {
  97717. override
  97718. } = overrideToken,
  97719. components = __rest(overrideToken, ["override"]);
  97720. // Merge with override
  97721. let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {
  97722. override
  97723. });
  97724. // Format if needed
  97725. mergedDerivativeToken = (0,_util_alias__WEBPACK_IMPORTED_MODULE_6__["default"])(mergedDerivativeToken);
  97726. if (components) {
  97727. Object.entries(components).forEach(([key, value]) => {
  97728. const {
  97729. theme: componentTheme
  97730. } = value,
  97731. componentTokens = __rest(value, ["theme"]);
  97732. let mergedComponentToken = componentTokens;
  97733. if (componentTheme) {
  97734. mergedComponentToken = getComputedToken(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {
  97735. override: componentTokens
  97736. }, componentTheme);
  97737. }
  97738. mergedDerivativeToken[key] = mergedComponentToken;
  97739. });
  97740. }
  97741. return mergedDerivativeToken;
  97742. };
  97743. // ================================== Hook ==================================
  97744. function useToken() {
  97745. const {
  97746. token: rootDesignToken,
  97747. hashed,
  97748. theme,
  97749. override,
  97750. cssVar
  97751. } = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_context__WEBPACK_IMPORTED_MODULE_3__.DesignTokenContext);
  97752. const salt = `${_version__WEBPACK_IMPORTED_MODULE_2__["default"]}-${hashed || ''}`;
  97753. const mergedTheme = theme || _context__WEBPACK_IMPORTED_MODULE_4__["default"];
  97754. const [token, hashId, realToken] = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.useCacheToken)(mergedTheme, [_themes_seed__WEBPACK_IMPORTED_MODULE_5__["default"], rootDesignToken], {
  97755. salt,
  97756. override,
  97757. getComputedToken,
  97758. // formatToken will not be consumed after 1.15.0 with getComputedToken.
  97759. // But token will break if @ant-design/cssinjs is under 1.15.0 without it
  97760. formatToken: _util_alias__WEBPACK_IMPORTED_MODULE_6__["default"],
  97761. cssVar: cssVar && {
  97762. prefix: cssVar.prefix,
  97763. key: cssVar.key,
  97764. unitless,
  97765. ignore,
  97766. preserve
  97767. }
  97768. });
  97769. return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];
  97770. }
  97771. /***/ }),
  97772. /***/ "./components/theme/util/alias.ts":
  97773. /*!****************************************!*\
  97774. !*** ./components/theme/util/alias.ts ***!
  97775. \****************************************/
  97776. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97777. "use strict";
  97778. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97779. /* harmony export */ "default": function() { return /* binding */ formatToken; }
  97780. /* harmony export */ });
  97781. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  97782. /* harmony import */ var _themes_seed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../themes/seed */ "./components/theme/themes/seed.ts");
  97783. /* harmony import */ var _getAlphaColor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getAlphaColor */ "./components/theme/util/getAlphaColor.ts");
  97784. var __rest = undefined && undefined.__rest || function (s, e) {
  97785. var t = {};
  97786. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  97787. if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  97788. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  97789. }
  97790. return t;
  97791. };
  97792. /**
  97793. * Seed (designer) > Derivative (designer) > Alias (developer).
  97794. *
  97795. * Merge seed & derivative & override token and generate alias token for developer.
  97796. */
  97797. function formatToken(derivativeToken) {
  97798. const {
  97799. override
  97800. } = derivativeToken,
  97801. restToken = __rest(derivativeToken, ["override"]);
  97802. const overrideTokens = Object.assign({}, override);
  97803. Object.keys(_themes_seed__WEBPACK_IMPORTED_MODULE_1__["default"]).forEach(token => {
  97804. delete overrideTokens[token];
  97805. });
  97806. const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);
  97807. const screenXS = 480;
  97808. const screenSM = 576;
  97809. const screenMD = 768;
  97810. const screenLG = 992;
  97811. const screenXL = 1200;
  97812. const screenXXL = 1600;
  97813. // Motion
  97814. if (mergedToken.motion === false) {
  97815. const fastDuration = '0s';
  97816. mergedToken.motionDurationFast = fastDuration;
  97817. mergedToken.motionDurationMid = fastDuration;
  97818. mergedToken.motionDurationSlow = fastDuration;
  97819. }
  97820. // Generate alias token
  97821. const aliasToken = Object.assign(Object.assign(Object.assign({}, mergedToken), {
  97822. // ============== Background ============== //
  97823. colorFillContent: mergedToken.colorFillSecondary,
  97824. colorFillContentHover: mergedToken.colorFill,
  97825. colorFillAlter: mergedToken.colorFillQuaternary,
  97826. colorBgContainerDisabled: mergedToken.colorFillTertiary,
  97827. // ============== Split ============== //
  97828. colorBorderBg: mergedToken.colorBgContainer,
  97829. colorSplit: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),
  97830. // ============== Text ============== //
  97831. colorTextPlaceholder: mergedToken.colorTextQuaternary,
  97832. colorTextDisabled: mergedToken.colorTextQuaternary,
  97833. colorTextHeading: mergedToken.colorText,
  97834. colorTextLabel: mergedToken.colorTextSecondary,
  97835. colorTextDescription: mergedToken.colorTextTertiary,
  97836. colorTextLightSolid: mergedToken.colorWhite,
  97837. colorHighlight: mergedToken.colorError,
  97838. colorBgTextHover: mergedToken.colorFillSecondary,
  97839. colorBgTextActive: mergedToken.colorFill,
  97840. colorIcon: mergedToken.colorTextTertiary,
  97841. colorIconHover: mergedToken.colorText,
  97842. colorErrorOutline: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorErrorBg, mergedToken.colorBgContainer),
  97843. colorWarningOutline: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorWarningBg, mergedToken.colorBgContainer),
  97844. // Font
  97845. fontSizeIcon: mergedToken.fontSizeSM,
  97846. // Line
  97847. lineWidthFocus: mergedToken.lineWidth * 3,
  97848. // Control
  97849. lineWidth: mergedToken.lineWidth,
  97850. controlOutlineWidth: mergedToken.lineWidth * 2,
  97851. // Checkbox size and expand icon size
  97852. controlInteractiveSize: mergedToken.controlHeight / 2,
  97853. controlItemBgHover: mergedToken.colorFillTertiary,
  97854. controlItemBgActive: mergedToken.colorPrimaryBg,
  97855. controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,
  97856. controlItemBgActiveDisabled: mergedToken.colorFill,
  97857. controlTmpOutline: mergedToken.colorFillQuaternary,
  97858. controlOutline: (0,_getAlphaColor__WEBPACK_IMPORTED_MODULE_2__["default"])(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),
  97859. lineType: mergedToken.lineType,
  97860. borderRadius: mergedToken.borderRadius,
  97861. borderRadiusXS: mergedToken.borderRadiusXS,
  97862. borderRadiusSM: mergedToken.borderRadiusSM,
  97863. borderRadiusLG: mergedToken.borderRadiusLG,
  97864. fontWeightStrong: 600,
  97865. opacityLoading: 0.65,
  97866. linkDecoration: 'none',
  97867. linkHoverDecoration: 'none',
  97868. linkFocusDecoration: 'none',
  97869. controlPaddingHorizontal: 12,
  97870. controlPaddingHorizontalSM: 8,
  97871. paddingXXS: mergedToken.sizeXXS,
  97872. paddingXS: mergedToken.sizeXS,
  97873. paddingSM: mergedToken.sizeSM,
  97874. padding: mergedToken.size,
  97875. paddingMD: mergedToken.sizeMD,
  97876. paddingLG: mergedToken.sizeLG,
  97877. paddingXL: mergedToken.sizeXL,
  97878. paddingContentHorizontalLG: mergedToken.sizeLG,
  97879. paddingContentVerticalLG: mergedToken.sizeMS,
  97880. paddingContentHorizontal: mergedToken.sizeMS,
  97881. paddingContentVertical: mergedToken.sizeSM,
  97882. paddingContentHorizontalSM: mergedToken.size,
  97883. paddingContentVerticalSM: mergedToken.sizeXS,
  97884. marginXXS: mergedToken.sizeXXS,
  97885. marginXS: mergedToken.sizeXS,
  97886. marginSM: mergedToken.sizeSM,
  97887. margin: mergedToken.size,
  97888. marginMD: mergedToken.sizeMD,
  97889. marginLG: mergedToken.sizeLG,
  97890. marginXL: mergedToken.sizeXL,
  97891. marginXXL: mergedToken.sizeXXL,
  97892. boxShadow: `
  97893. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  97894. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  97895. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  97896. `,
  97897. boxShadowSecondary: `
  97898. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  97899. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  97900. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  97901. `,
  97902. boxShadowTertiary: `
  97903. 0 1px 2px 0 rgba(0, 0, 0, 0.03),
  97904. 0 1px 6px -1px rgba(0, 0, 0, 0.02),
  97905. 0 2px 4px 0 rgba(0, 0, 0, 0.02)
  97906. `,
  97907. screenXS,
  97908. screenXSMin: screenXS,
  97909. screenXSMax: screenSM - 1,
  97910. screenSM,
  97911. screenSMMin: screenSM,
  97912. screenSMMax: screenMD - 1,
  97913. screenMD,
  97914. screenMDMin: screenMD,
  97915. screenMDMax: screenLG - 1,
  97916. screenLG,
  97917. screenLGMin: screenLG,
  97918. screenLGMax: screenXL - 1,
  97919. screenXL,
  97920. screenXLMin: screenXL,
  97921. screenXLMax: screenXXL - 1,
  97922. screenXXL,
  97923. screenXXLMin: screenXXL,
  97924. boxShadowPopoverArrow: '2px 2px 5px rgba(0, 0, 0, 0.05)',
  97925. boxShadowCard: `
  97926. 0 1px 2px -2px ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('rgba(0, 0, 0, 0.16)').toRgbString()},
  97927. 0 3px 6px 0 ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('rgba(0, 0, 0, 0.12)').toRgbString()},
  97928. 0 5px 12px 4px ${new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor('rgba(0, 0, 0, 0.09)').toRgbString()}
  97929. `,
  97930. boxShadowDrawerRight: `
  97931. -6px 0 16px 0 rgba(0, 0, 0, 0.08),
  97932. -3px 0 6px -4px rgba(0, 0, 0, 0.12),
  97933. -9px 0 28px 8px rgba(0, 0, 0, 0.05)
  97934. `,
  97935. boxShadowDrawerLeft: `
  97936. 6px 0 16px 0 rgba(0, 0, 0, 0.08),
  97937. 3px 0 6px -4px rgba(0, 0, 0, 0.12),
  97938. 9px 0 28px 8px rgba(0, 0, 0, 0.05)
  97939. `,
  97940. boxShadowDrawerUp: `
  97941. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  97942. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  97943. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  97944. `,
  97945. boxShadowDrawerDown: `
  97946. 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
  97947. 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
  97948. 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
  97949. `,
  97950. boxShadowTabsOverflowLeft: 'inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)',
  97951. boxShadowTabsOverflowRight: 'inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)',
  97952. boxShadowTabsOverflowTop: 'inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)',
  97953. boxShadowTabsOverflowBottom: 'inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)'
  97954. }), overrideTokens);
  97955. return aliasToken;
  97956. }
  97957. /***/ }),
  97958. /***/ "./components/theme/util/genPresetColor.ts":
  97959. /*!*************************************************!*\
  97960. !*** ./components/theme/util/genPresetColor.ts ***!
  97961. \*************************************************/
  97962. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97963. "use strict";
  97964. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97965. /* harmony export */ "default": function() { return /* binding */ genPresetColor; }
  97966. /* harmony export */ });
  97967. /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interface */ "./components/theme/interface/presetColors.ts");
  97968. function genPresetColor(token, genCss) {
  97969. return _interface__WEBPACK_IMPORTED_MODULE_0__.PresetColors.reduce((prev, colorKey) => {
  97970. const lightColor = token[`${colorKey}1`];
  97971. const lightBorderColor = token[`${colorKey}3`];
  97972. const darkColor = token[`${colorKey}6`];
  97973. const textColor = token[`${colorKey}7`];
  97974. return Object.assign(Object.assign({}, prev), genCss(colorKey, {
  97975. lightColor,
  97976. lightBorderColor,
  97977. darkColor,
  97978. textColor
  97979. }));
  97980. }, {});
  97981. }
  97982. /***/ }),
  97983. /***/ "./components/theme/util/genStyleUtils.ts":
  97984. /*!************************************************!*\
  97985. !*** ./components/theme/util/genStyleUtils.ts ***!
  97986. \************************************************/
  97987. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  97988. "use strict";
  97989. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  97990. /* harmony export */ genComponentStyleHook: function() { return /* binding */ genComponentStyleHook; },
  97991. /* harmony export */ genStyleHooks: function() { return /* binding */ genStyleHooks; },
  97992. /* harmony export */ genSubStyleComponent: function() { return /* binding */ genSubStyleComponent; }
  97993. /* harmony export */ });
  97994. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  97995. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  97996. /* harmony import */ var _ant_design_cssinjs_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs-utils */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  97997. /* harmony import */ var _config_provider_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config-provider/context */ "./components/config-provider/context.ts");
  97998. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  97999. /* harmony import */ var _useToken__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../useToken */ "./components/theme/useToken.ts");
  98000. const {
  98001. genStyleHooks,
  98002. genComponentStyleHook,
  98003. genSubStyleComponent
  98004. } = (0,_ant_design_cssinjs_utils__WEBPACK_IMPORTED_MODULE_1__.genStyleUtils)({
  98005. usePrefix: () => {
  98006. const {
  98007. getPrefixCls,
  98008. iconPrefixCls
  98009. } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_config_provider_context__WEBPACK_IMPORTED_MODULE_2__.ConfigContext);
  98010. const rootPrefixCls = getPrefixCls();
  98011. return {
  98012. rootPrefixCls,
  98013. iconPrefixCls
  98014. };
  98015. },
  98016. useToken: () => {
  98017. const [theme, realToken, hashId, token, cssVar] = (0,_useToken__WEBPACK_IMPORTED_MODULE_4__["default"])();
  98018. return {
  98019. theme,
  98020. realToken,
  98021. hashId,
  98022. token,
  98023. cssVar
  98024. };
  98025. },
  98026. useCSP: () => {
  98027. const {
  98028. csp
  98029. } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_config_provider_context__WEBPACK_IMPORTED_MODULE_2__.ConfigContext);
  98030. return csp !== null && csp !== void 0 ? csp : {};
  98031. },
  98032. getResetStyles: (token, config) => {
  98033. var _a;
  98034. const linkStyle = (0,_style__WEBPACK_IMPORTED_MODULE_3__.genLinkStyle)(token);
  98035. return [linkStyle, {
  98036. '&': linkStyle
  98037. }, (0,_style__WEBPACK_IMPORTED_MODULE_3__.genIconStyle)((_a = config === null || config === void 0 ? void 0 : config.prefix.iconPrefixCls) !== null && _a !== void 0 ? _a : _config_provider_context__WEBPACK_IMPORTED_MODULE_2__.defaultIconPrefixCls)];
  98038. },
  98039. getCommonStyle: _style__WEBPACK_IMPORTED_MODULE_3__.genCommonStyle,
  98040. getCompUnitless: () => _useToken__WEBPACK_IMPORTED_MODULE_4__.unitless
  98041. });
  98042. /***/ }),
  98043. /***/ "./components/theme/util/getAlphaColor.ts":
  98044. /*!************************************************!*\
  98045. !*** ./components/theme/util/getAlphaColor.ts ***!
  98046. \************************************************/
  98047. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  98048. "use strict";
  98049. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  98050. function isStableColor(color) {
  98051. return color >= 0 && color <= 255;
  98052. }
  98053. function getAlphaColor(frontColor, backgroundColor) {
  98054. const {
  98055. r: fR,
  98056. g: fG,
  98057. b: fB,
  98058. a: originAlpha
  98059. } = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(frontColor).toRgb();
  98060. if (originAlpha < 1) {
  98061. return frontColor;
  98062. }
  98063. const {
  98064. r: bR,
  98065. g: bG,
  98066. b: bB
  98067. } = new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor(backgroundColor).toRgb();
  98068. for (let fA = 0.01; fA <= 1; fA += 0.01) {
  98069. const r = Math.round((fR - bR * (1 - fA)) / fA);
  98070. const g = Math.round((fG - bG * (1 - fA)) / fA);
  98071. const b = Math.round((fB - bB * (1 - fA)) / fA);
  98072. if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {
  98073. return new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor({
  98074. r,
  98075. g,
  98076. b,
  98077. a: Math.round(fA * 100) / 100
  98078. }).toRgbString();
  98079. }
  98080. }
  98081. // fallback
  98082. /* istanbul ignore next */
  98083. return new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_0__.FastColor({
  98084. r: fR,
  98085. g: fG,
  98086. b: fB,
  98087. a: 1
  98088. }).toRgbString();
  98089. }
  98090. /* harmony default export */ __webpack_exports__["default"] = (getAlphaColor);
  98091. /***/ }),
  98092. /***/ "./components/theme/util/useResetIconStyle.ts":
  98093. /*!****************************************************!*\
  98094. !*** ./components/theme/util/useResetIconStyle.ts ***!
  98095. \****************************************************/
  98096. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  98097. "use strict";
  98098. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  98099. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  98100. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  98101. /* harmony import */ var _useToken__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../useToken */ "./components/theme/useToken.ts");
  98102. const useResetIconStyle = (iconPrefixCls, csp) => {
  98103. const [theme, token] = (0,_useToken__WEBPACK_IMPORTED_MODULE_2__["default"])();
  98104. // Generate style for icons
  98105. return (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.useStyleRegister)({
  98106. theme,
  98107. token,
  98108. hashId: '',
  98109. path: ['ant-design-icons', iconPrefixCls],
  98110. nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce,
  98111. layer: {
  98112. name: 'antd'
  98113. }
  98114. }, () => (0,_style__WEBPACK_IMPORTED_MODULE_1__.genIconStyle)(iconPrefixCls));
  98115. };
  98116. /* harmony default export */ __webpack_exports__["default"] = (useResetIconStyle);
  98117. /***/ }),
  98118. /***/ "./components/time-picker/locale/en_US.ts":
  98119. /*!************************************************!*\
  98120. !*** ./components/time-picker/locale/en_US.ts ***!
  98121. \************************************************/
  98122. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  98123. "use strict";
  98124. const locale = {
  98125. placeholder: 'Select time',
  98126. rangePlaceholder: ['Start time', 'End time']
  98127. };
  98128. /* harmony default export */ __webpack_exports__["default"] = (locale);
  98129. /***/ }),
  98130. /***/ "./components/timeline/style/index.ts":
  98131. /*!********************************************!*\
  98132. !*** ./components/timeline/style/index.ts ***!
  98133. \********************************************/
  98134. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  98135. "use strict";
  98136. __webpack_require__.r(__webpack_exports__);
  98137. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  98138. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  98139. /* harmony export */ });
  98140. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  98141. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  98142. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  98143. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  98144. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  98145. const genTimelineStyle = token => {
  98146. const {
  98147. componentCls,
  98148. calc
  98149. } = token;
  98150. return {
  98151. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  98152. margin: 0,
  98153. padding: 0,
  98154. listStyle: 'none',
  98155. [`${componentCls}-item`]: {
  98156. position: 'relative',
  98157. margin: 0,
  98158. paddingBottom: token.itemPaddingBottom,
  98159. fontSize: token.fontSize,
  98160. listStyle: 'none',
  98161. '&-tail': {
  98162. position: 'absolute',
  98163. insetBlockStart: token.itemHeadSize,
  98164. insetInlineStart: calc(calc(token.itemHeadSize).sub(token.tailWidth)).div(2).equal(),
  98165. height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.itemHeadSize)})`,
  98166. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.tailWidth)} ${token.lineType} ${token.tailColor}`
  98167. },
  98168. '&-pending': {
  98169. [`${componentCls}-item-head`]: {
  98170. fontSize: token.fontSizeSM,
  98171. backgroundColor: 'transparent'
  98172. },
  98173. [`${componentCls}-item-tail`]: {
  98174. display: 'none'
  98175. }
  98176. },
  98177. '&-head': {
  98178. position: 'absolute',
  98179. width: token.itemHeadSize,
  98180. height: token.itemHeadSize,
  98181. backgroundColor: token.dotBg,
  98182. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.dotBorderWidth)} ${token.lineType} transparent`,
  98183. borderRadius: '50%',
  98184. '&-blue': {
  98185. color: token.colorPrimary,
  98186. borderColor: token.colorPrimary
  98187. },
  98188. '&-red': {
  98189. color: token.colorError,
  98190. borderColor: token.colorError
  98191. },
  98192. '&-green': {
  98193. color: token.colorSuccess,
  98194. borderColor: token.colorSuccess
  98195. },
  98196. '&-gray': {
  98197. color: token.colorTextDisabled,
  98198. borderColor: token.colorTextDisabled
  98199. }
  98200. },
  98201. '&-head-custom': {
  98202. position: 'absolute',
  98203. insetBlockStart: calc(token.itemHeadSize).div(2).equal(),
  98204. insetInlineStart: calc(token.itemHeadSize).div(2).equal(),
  98205. width: 'auto',
  98206. height: 'auto',
  98207. marginBlockStart: 0,
  98208. paddingBlock: token.customHeadPaddingVertical,
  98209. lineHeight: 1,
  98210. textAlign: 'center',
  98211. border: 0,
  98212. borderRadius: 0,
  98213. transform: 'translate(-50%, -50%)'
  98214. },
  98215. '&-content': {
  98216. position: 'relative',
  98217. insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.lineWidth).equal(),
  98218. marginInlineStart: calc(token.margin).add(token.itemHeadSize).equal(),
  98219. marginInlineEnd: 0,
  98220. marginBlockStart: 0,
  98221. marginBlockEnd: 0,
  98222. wordBreak: 'break-word'
  98223. },
  98224. '&-last': {
  98225. [`> ${componentCls}-item-tail`]: {
  98226. display: 'none'
  98227. },
  98228. [`> ${componentCls}-item-content`]: {
  98229. minHeight: calc(token.controlHeightLG).mul(1.2).equal()
  98230. }
  98231. }
  98232. },
  98233. [`&${componentCls}-alternate,
  98234. &${componentCls}-right,
  98235. &${componentCls}-label`]: {
  98236. [`${componentCls}-item`]: {
  98237. '&-tail, &-head, &-head-custom': {
  98238. insetInlineStart: '50%'
  98239. },
  98240. '&-head': {
  98241. marginInlineStart: calc(token.marginXXS).mul(-1).equal(),
  98242. '&-custom': {
  98243. marginInlineStart: calc(token.tailWidth).div(2).equal()
  98244. }
  98245. },
  98246. '&-left': {
  98247. [`${componentCls}-item-content`]: {
  98248. insetInlineStart: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginXXS)})`,
  98249. width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginSM)})`,
  98250. textAlign: 'start'
  98251. }
  98252. },
  98253. '&-right': {
  98254. [`${componentCls}-item-content`]: {
  98255. width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginSM)})`,
  98256. margin: 0,
  98257. textAlign: 'end'
  98258. }
  98259. }
  98260. }
  98261. },
  98262. [`&${componentCls}-right`]: {
  98263. [`${componentCls}-item-right`]: {
  98264. [`${componentCls}-item-tail,
  98265. ${componentCls}-item-head,
  98266. ${componentCls}-item-head-custom`]: {
  98267. insetInlineStart: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(calc(token.itemHeadSize).add(token.tailWidth)).div(2).equal())})`
  98268. },
  98269. [`${componentCls}-item-content`]: {
  98270. width: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(calc(token.itemHeadSize).add(token.marginXS).equal())})`
  98271. }
  98272. }
  98273. },
  98274. [`&${componentCls}-pending
  98275. ${componentCls}-item-last
  98276. ${componentCls}-item-tail`]: {
  98277. display: 'block',
  98278. height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.margin)})`,
  98279. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.tailWidth)} dotted ${token.tailColor}`
  98280. },
  98281. [`&${componentCls}-reverse
  98282. ${componentCls}-item-last
  98283. ${componentCls}-item-tail`]: {
  98284. display: 'none'
  98285. },
  98286. [`&${componentCls}-reverse ${componentCls}-item-pending`]: {
  98287. [`${componentCls}-item-tail`]: {
  98288. insetBlockStart: token.margin,
  98289. display: 'block',
  98290. height: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.margin)})`,
  98291. borderInlineStart: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.tailWidth)} dotted ${token.tailColor}`
  98292. },
  98293. [`${componentCls}-item-content`]: {
  98294. minHeight: calc(token.controlHeightLG).mul(1.2).equal()
  98295. }
  98296. },
  98297. [`&${componentCls}-label`]: {
  98298. [`${componentCls}-item-label`]: {
  98299. position: 'absolute',
  98300. insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.tailWidth).equal(),
  98301. width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginSM)})`,
  98302. textAlign: 'end'
  98303. },
  98304. [`${componentCls}-item-right`]: {
  98305. [`${componentCls}-item-label`]: {
  98306. insetInlineStart: `calc(50% + ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginSM)})`,
  98307. width: `calc(50% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.marginSM)})`,
  98308. textAlign: 'start'
  98309. }
  98310. }
  98311. },
  98312. // ====================== RTL =======================
  98313. '&-rtl': {
  98314. direction: 'rtl',
  98315. [`${componentCls}-item-head-custom`]: {
  98316. transform: `translate(50%, -50%)`
  98317. }
  98318. }
  98319. })
  98320. };
  98321. };
  98322. // ============================== Export ==============================
  98323. const prepareComponentToken = token => ({
  98324. tailColor: token.colorSplit,
  98325. tailWidth: token.lineWidthBold,
  98326. dotBorderWidth: token.wireframe ? token.lineWidthBold : token.lineWidth * 3,
  98327. dotBg: token.colorBgContainer,
  98328. itemPaddingBottom: token.padding * 1.25
  98329. });
  98330. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Timeline', token => {
  98331. const timeLineToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  98332. itemHeadSize: 10,
  98333. customHeadPaddingVertical: token.paddingXXS,
  98334. paddingInlineEnd: 2
  98335. });
  98336. return genTimelineStyle(timeLineToken);
  98337. }, prepareComponentToken));
  98338. /***/ }),
  98339. /***/ "./components/tooltip/style/index.ts":
  98340. /*!*******************************************!*\
  98341. !*** ./components/tooltip/style/index.ts ***!
  98342. \*******************************************/
  98343. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  98344. "use strict";
  98345. __webpack_require__.r(__webpack_exports__);
  98346. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  98347. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  98348. /* harmony export */ });
  98349. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  98350. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  98351. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  98352. /* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style/motion */ "./components/style/motion/zoom.ts");
  98353. /* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style/placementArrow */ "./components/style/placementArrow.ts");
  98354. /* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
  98355. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  98356. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  98357. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genPresetColor.ts");
  98358. const genTooltipStyle = token => {
  98359. const {
  98360. calc,
  98361. componentCls,
  98362. // ant-tooltip
  98363. tooltipMaxWidth,
  98364. tooltipColor,
  98365. tooltipBg,
  98366. tooltipBorderRadius,
  98367. zIndexPopup,
  98368. controlHeight,
  98369. boxShadowSecondary,
  98370. paddingSM,
  98371. paddingXS,
  98372. arrowOffsetHorizontal,
  98373. sizePopupArrow
  98374. } = token;
  98375. // arrowOffsetHorizontal + arrowWidth + borderRadius
  98376. const edgeAlignMinWidth = calc(tooltipBorderRadius).add(sizePopupArrow).add(arrowOffsetHorizontal).equal();
  98377. // borderRadius * 2 + arrowWidth
  98378. const centerAlignMinWidth = calc(tooltipBorderRadius).mul(2).add(sizePopupArrow).equal();
  98379. return [{
  98380. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  98381. position: 'absolute',
  98382. zIndex: zIndexPopup,
  98383. display: 'block',
  98384. width: 'max-content',
  98385. maxWidth: tooltipMaxWidth,
  98386. visibility: 'visible',
  98387. // When use `autoArrow`, origin will follow the arrow position
  98388. '--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',
  98389. transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),
  98390. '&-hidden': {
  98391. display: 'none'
  98392. },
  98393. '--antd-arrow-background-color': tooltipBg,
  98394. // Wrapper for the tooltip content
  98395. [`${componentCls}-inner`]: {
  98396. minWidth: centerAlignMinWidth,
  98397. minHeight: controlHeight,
  98398. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(paddingSM).div(2).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`,
  98399. color: `var(--ant-tooltip-color, ${tooltipColor})`,
  98400. textAlign: 'start',
  98401. textDecoration: 'none',
  98402. wordWrap: 'break-word',
  98403. backgroundColor: tooltipBg,
  98404. borderRadius: tooltipBorderRadius,
  98405. boxShadow: boxShadowSecondary,
  98406. boxSizing: 'border-box'
  98407. },
  98408. // Align placement should have another min width
  98409. [[`&-placement-topLeft`, `&-placement-topRight`, `&-placement-bottomLeft`, `&-placement-bottomRight`].join(',')]: {
  98410. minWidth: edgeAlignMinWidth
  98411. },
  98412. // Limit left and right placement radius
  98413. [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {
  98414. [`${componentCls}-inner`]: {
  98415. borderRadius: token.min(tooltipBorderRadius, _style_placementArrow__WEBPACK_IMPORTED_MODULE_3__.MAX_VERTICAL_CONTENT_RADIUS)
  98416. }
  98417. },
  98418. [`${componentCls}-content`]: {
  98419. position: 'relative'
  98420. }
  98421. }), (0,_theme_internal__WEBPACK_IMPORTED_MODULE_7__["default"])(token, (colorKey, {
  98422. darkColor
  98423. }) => ({
  98424. [`&${componentCls}-${colorKey}`]: {
  98425. [`${componentCls}-inner`]: {
  98426. backgroundColor: darkColor
  98427. },
  98428. [`${componentCls}-arrow`]: {
  98429. '--antd-arrow-background-color': darkColor
  98430. }
  98431. }
  98432. }))), {
  98433. // RTL
  98434. '&-rtl': {
  98435. direction: 'rtl'
  98436. }
  98437. })
  98438. },
  98439. // Arrow Style
  98440. (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_3__["default"])(token, 'var(--antd-arrow-background-color)'),
  98441. // Pure Render
  98442. {
  98443. [`${componentCls}-pure`]: {
  98444. position: 'relative',
  98445. maxWidth: 'none',
  98446. margin: token.sizePopupArrow
  98447. }
  98448. }];
  98449. };
  98450. // ============================== Export ==============================
  98451. const prepareComponentToken = token => Object.assign(Object.assign({
  98452. zIndexPopup: token.zIndexPopupBase + 70
  98453. }, (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_3__.getArrowOffsetToken)({
  98454. contentRadius: token.borderRadius,
  98455. limitVerticalRadius: true
  98456. })), (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__.getArrowToken)((0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
  98457. borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)
  98458. })));
  98459. /* harmony default export */ __webpack_exports__["default"] = ((prefixCls, injectStyle = true) => {
  98460. const useStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Tooltip', token => {
  98461. const {
  98462. borderRadius,
  98463. colorTextLightSolid,
  98464. colorBgSpotlight
  98465. } = token;
  98466. const TooltipToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
  98467. // default variables
  98468. tooltipMaxWidth: 250,
  98469. tooltipColor: colorTextLightSolid,
  98470. tooltipBorderRadius: borderRadius,
  98471. tooltipBg: colorBgSpotlight
  98472. });
  98473. return [genTooltipStyle(TooltipToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_2__.initZoomMotion)(token, 'zoom-big-fast')];
  98474. }, prepareComponentToken, {
  98475. resetStyle: false,
  98476. // Popover use Tooltip as internal component. We do not need to handle this.
  98477. injectStyle
  98478. });
  98479. return useStyle(prefixCls);
  98480. });
  98481. /***/ }),
  98482. /***/ "./components/tour/style/index.ts":
  98483. /*!****************************************!*\
  98484. !*** ./components/tour/style/index.ts ***!
  98485. \****************************************/
  98486. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  98487. "use strict";
  98488. __webpack_require__.r(__webpack_exports__);
  98489. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  98490. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  98491. /* harmony export */ });
  98492. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  98493. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  98494. /* harmony import */ var _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/fast-color */ "./node_modules/@ant-design/fast-color/es/index.js");
  98495. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  98496. /* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../style/placementArrow */ "./components/style/placementArrow.ts");
  98497. /* harmony import */ var _style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/roundedArrow */ "./components/style/roundedArrow.ts");
  98498. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  98499. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  98500. // =============================== Base ===============================
  98501. const genBaseStyle = token => {
  98502. const {
  98503. componentCls,
  98504. padding,
  98505. paddingXS,
  98506. borderRadius,
  98507. borderRadiusXS,
  98508. colorPrimary,
  98509. colorFill,
  98510. indicatorHeight,
  98511. indicatorWidth,
  98512. boxShadowTertiary,
  98513. zIndexPopup,
  98514. colorBgElevated,
  98515. fontWeightStrong,
  98516. marginXS,
  98517. colorTextLightSolid,
  98518. tourBorderRadius,
  98519. colorWhite,
  98520. primaryNextBtnHoverBg,
  98521. closeBtnSize,
  98522. motionDurationSlow,
  98523. antCls,
  98524. primaryPrevBtnBg
  98525. } = token;
  98526. return [{
  98527. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__.resetComponent)(token)), {
  98528. position: 'absolute',
  98529. zIndex: zIndexPopup,
  98530. maxWidth: 'fit-content',
  98531. visibility: 'visible',
  98532. width: 520,
  98533. '--antd-arrow-background-color': colorBgElevated,
  98534. '&-pure': {
  98535. maxWidth: '100%',
  98536. position: 'relative'
  98537. },
  98538. [`&${componentCls}-hidden`]: {
  98539. display: 'none'
  98540. },
  98541. // ============================= panel content ============================
  98542. [`${componentCls}-content`]: {
  98543. position: 'relative'
  98544. },
  98545. [`${componentCls}-inner`]: {
  98546. textAlign: 'start',
  98547. textDecoration: 'none',
  98548. borderRadius: tourBorderRadius,
  98549. boxShadow: boxShadowTertiary,
  98550. position: 'relative',
  98551. backgroundColor: colorBgElevated,
  98552. border: 'none',
  98553. backgroundClip: 'padding-box',
  98554. [`${componentCls}-close`]: Object.assign({
  98555. position: 'absolute',
  98556. top: padding,
  98557. insetInlineEnd: padding,
  98558. color: token.colorIcon,
  98559. background: 'none',
  98560. border: 'none',
  98561. width: closeBtnSize,
  98562. height: closeBtnSize,
  98563. borderRadius: token.borderRadiusSM,
  98564. transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,
  98565. display: 'flex',
  98566. alignItems: 'center',
  98567. justifyContent: 'center',
  98568. cursor: 'pointer',
  98569. '&:hover': {
  98570. color: token.colorIconHover,
  98571. backgroundColor: token.colorBgTextHover
  98572. },
  98573. '&:active': {
  98574. backgroundColor: token.colorBgTextActive
  98575. }
  98576. }, (0,_style__WEBPACK_IMPORTED_MODULE_2__.genFocusStyle)(token)),
  98577. [`${componentCls}-cover`]: {
  98578. textAlign: 'center',
  98579. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(padding).add(closeBtnSize).add(paddingXS).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)} 0`,
  98580. img: {
  98581. width: '100%'
  98582. }
  98583. },
  98584. [`${componentCls}-header`]: {
  98585. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)}`,
  98586. width: `calc(100% - ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(closeBtnSize)})`,
  98587. wordBreak: 'break-word',
  98588. [`${componentCls}-title`]: {
  98589. fontWeight: fontWeightStrong
  98590. }
  98591. },
  98592. [`${componentCls}-description`]: {
  98593. padding: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)}`,
  98594. wordWrap: 'break-word'
  98595. },
  98596. [`${componentCls}-footer`]: {
  98597. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(padding)}`,
  98598. textAlign: 'end',
  98599. borderRadius: `0 0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusXS)}`,
  98600. display: 'flex',
  98601. [`${componentCls}-indicators`]: {
  98602. display: 'inline-block',
  98603. [`${componentCls}-indicator`]: {
  98604. width: indicatorWidth,
  98605. height: indicatorHeight,
  98606. display: 'inline-block',
  98607. borderRadius: '50%',
  98608. background: colorFill,
  98609. '&:not(:last-child)': {
  98610. marginInlineEnd: indicatorHeight
  98611. },
  98612. '&-active': {
  98613. background: colorPrimary
  98614. }
  98615. }
  98616. },
  98617. [`${componentCls}-buttons`]: {
  98618. marginInlineStart: 'auto',
  98619. [`${antCls}-btn`]: {
  98620. marginInlineStart: marginXS
  98621. }
  98622. }
  98623. }
  98624. },
  98625. // ============================= primary type ===========================
  98626. // `$` for panel, `&$` for pure panel
  98627. [`${componentCls}-primary, &${componentCls}-primary`]: {
  98628. '--antd-arrow-background-color': colorPrimary,
  98629. [`${componentCls}-inner`]: {
  98630. color: colorTextLightSolid,
  98631. textAlign: 'start',
  98632. textDecoration: 'none',
  98633. backgroundColor: colorPrimary,
  98634. borderRadius,
  98635. boxShadow: boxShadowTertiary,
  98636. [`${componentCls}-close`]: {
  98637. color: colorTextLightSolid
  98638. },
  98639. [`${componentCls}-indicators`]: {
  98640. [`${componentCls}-indicator`]: {
  98641. background: primaryPrevBtnBg,
  98642. '&-active': {
  98643. background: colorTextLightSolid
  98644. }
  98645. }
  98646. },
  98647. [`${componentCls}-prev-btn`]: {
  98648. color: colorTextLightSolid,
  98649. borderColor: primaryPrevBtnBg,
  98650. backgroundColor: colorPrimary,
  98651. '&:hover': {
  98652. backgroundColor: primaryPrevBtnBg,
  98653. borderColor: 'transparent'
  98654. }
  98655. },
  98656. [`${componentCls}-next-btn`]: {
  98657. color: colorPrimary,
  98658. borderColor: 'transparent',
  98659. background: colorWhite,
  98660. '&:hover': {
  98661. background: primaryNextBtnHoverBg
  98662. }
  98663. }
  98664. }
  98665. }
  98666. }),
  98667. // ============================= mask ===========================
  98668. [`${componentCls}-mask`]: {
  98669. [`${componentCls}-placeholder-animated`]: {
  98670. transition: `all ${motionDurationSlow}`
  98671. }
  98672. },
  98673. // =========== Limit left and right placement radius ==============
  98674. [['&-placement-left', '&-placement-leftTop', '&-placement-leftBottom', '&-placement-right', '&-placement-rightTop', '&-placement-rightBottom'].join(',')]: {
  98675. [`${componentCls}-inner`]: {
  98676. borderRadius: token.min(tourBorderRadius, _style_placementArrow__WEBPACK_IMPORTED_MODULE_3__.MAX_VERTICAL_CONTENT_RADIUS)
  98677. }
  98678. }
  98679. },
  98680. // ============================= Arrow ===========================
  98681. (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_3__["default"])(token, 'var(--antd-arrow-background-color)')];
  98682. };
  98683. // ============================== Export ==============================
  98684. const prepareComponentToken = token => Object.assign(Object.assign({
  98685. zIndexPopup: token.zIndexPopupBase + 70,
  98686. closeBtnSize: token.fontSize * token.lineHeight,
  98687. primaryPrevBtnBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorTextLightSolid).setA(0.15).toRgbString(),
  98688. primaryNextBtnHoverBg: new _ant_design_fast_color__WEBPACK_IMPORTED_MODULE_1__.FastColor(token.colorBgTextHover).onBackground(token.colorWhite).toRgbString()
  98689. }, (0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_3__.getArrowOffsetToken)({
  98690. contentRadius: token.borderRadiusLG,
  98691. limitVerticalRadius: true
  98692. })), (0,_style_roundedArrow__WEBPACK_IMPORTED_MODULE_4__.getArrowToken)(token));
  98693. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_6__.genStyleHooks)('Tour', token => {
  98694. const {
  98695. borderRadiusLG
  98696. } = token;
  98697. const TourToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_5__.mergeToken)(token, {
  98698. indicatorWidth: 6,
  98699. indicatorHeight: 6,
  98700. tourBorderRadius: borderRadiusLG
  98701. });
  98702. return genBaseStyle(TourToken);
  98703. }, prepareComponentToken));
  98704. /***/ }),
  98705. /***/ "./components/transfer/style/index.ts":
  98706. /*!********************************************!*\
  98707. !*** ./components/transfer/style/index.ts ***!
  98708. \********************************************/
  98709. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  98710. "use strict";
  98711. __webpack_require__.r(__webpack_exports__);
  98712. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  98713. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  98714. /* harmony export */ });
  98715. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  98716. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  98717. /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ "./components/style/index.tsx");
  98718. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  98719. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  98720. const genTransferCustomizeStyle = token => {
  98721. const {
  98722. antCls,
  98723. componentCls,
  98724. listHeight,
  98725. controlHeightLG
  98726. } = token;
  98727. const tableCls = `${antCls}-table`;
  98728. const inputCls = `${antCls}-input`;
  98729. return {
  98730. [`${componentCls}-customize-list`]: {
  98731. [`${componentCls}-list`]: {
  98732. flex: '1 1 50%',
  98733. width: 'auto',
  98734. height: 'auto',
  98735. minHeight: listHeight,
  98736. minWidth: 0
  98737. },
  98738. // =================== Hook Components ===================
  98739. [`${tableCls}-wrapper`]: {
  98740. [`${tableCls}-small`]: {
  98741. border: 0,
  98742. borderRadius: 0,
  98743. [`${tableCls}-selection-column`]: {
  98744. width: controlHeightLG,
  98745. minWidth: controlHeightLG
  98746. }
  98747. },
  98748. [`${tableCls}-pagination${tableCls}-pagination`]: {
  98749. margin: 0,
  98750. padding: token.paddingXS
  98751. }
  98752. },
  98753. [`${inputCls}[disabled]`]: {
  98754. backgroundColor: 'transparent'
  98755. }
  98756. }
  98757. };
  98758. };
  98759. const genTransferStatusColor = (token, color) => {
  98760. const {
  98761. componentCls,
  98762. colorBorder
  98763. } = token;
  98764. return {
  98765. [`${componentCls}-list`]: {
  98766. borderColor: color,
  98767. '&-search:not([disabled])': {
  98768. borderColor: colorBorder
  98769. }
  98770. }
  98771. };
  98772. };
  98773. const genTransferStatusStyle = token => {
  98774. const {
  98775. componentCls
  98776. } = token;
  98777. return {
  98778. [`${componentCls}-status-error`]: Object.assign({}, genTransferStatusColor(token, token.colorError)),
  98779. [`${componentCls}-status-warning`]: Object.assign({}, genTransferStatusColor(token, token.colorWarning))
  98780. };
  98781. };
  98782. const genTransferListStyle = token => {
  98783. const {
  98784. componentCls,
  98785. colorBorder,
  98786. colorSplit,
  98787. lineWidth,
  98788. itemHeight,
  98789. headerHeight,
  98790. transferHeaderVerticalPadding,
  98791. itemPaddingBlock,
  98792. controlItemBgActive,
  98793. colorTextDisabled,
  98794. colorTextSecondary,
  98795. listHeight,
  98796. listWidth,
  98797. listWidthLG,
  98798. fontSizeIcon,
  98799. marginXS,
  98800. paddingSM,
  98801. lineType,
  98802. antCls,
  98803. iconCls,
  98804. motionDurationSlow,
  98805. controlItemBgHover,
  98806. borderRadiusLG,
  98807. colorBgContainer,
  98808. colorText,
  98809. controlItemBgActiveHover
  98810. } = token;
  98811. const contentBorderRadius = (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(borderRadiusLG).sub(lineWidth).equal());
  98812. return {
  98813. display: 'flex',
  98814. flexDirection: 'column',
  98815. width: listWidth,
  98816. height: listHeight,
  98817. border: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorBorder}`,
  98818. borderRadius: token.borderRadiusLG,
  98819. '&-with-pagination': {
  98820. width: listWidthLG,
  98821. height: 'auto'
  98822. },
  98823. '&-search': {
  98824. [`${iconCls}-search`]: {
  98825. color: colorTextDisabled
  98826. }
  98827. },
  98828. '&-header': {
  98829. display: 'flex',
  98830. flex: 'none',
  98831. alignItems: 'center',
  98832. height: headerHeight,
  98833. // border-top is on the transfer dom. We should minus 1px for this
  98834. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(transferHeaderVerticalPadding).sub(lineWidth).equal())} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(transferHeaderVerticalPadding)}`,
  98835. color: colorText,
  98836. background: colorBgContainer,
  98837. borderBottom: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  98838. borderRadius: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusLG)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(borderRadiusLG)} 0 0`,
  98839. '> *:not(:last-child)': {
  98840. marginInlineEnd: 4 // This is magic and fixed number, DO NOT use token since it may change.
  98841. },
  98842. '> *': {
  98843. flex: 'none'
  98844. },
  98845. '&-title': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
  98846. flex: 'auto',
  98847. textAlign: 'end'
  98848. }),
  98849. '&-dropdown': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetIcon)()), {
  98850. fontSize: fontSizeIcon,
  98851. transform: 'translateY(10%)',
  98852. cursor: 'pointer',
  98853. '&[disabled]': {
  98854. cursor: 'not-allowed'
  98855. }
  98856. })
  98857. },
  98858. '&-body': {
  98859. display: 'flex',
  98860. flex: 'auto',
  98861. flexDirection: 'column',
  98862. fontSize: token.fontSize,
  98863. // https://blog.csdn.net/qq449245884/article/details/107373672/
  98864. minHeight: 0,
  98865. '&-search-wrapper': {
  98866. position: 'relative',
  98867. flex: 'none',
  98868. padding: paddingSM
  98869. }
  98870. },
  98871. '&-content': {
  98872. flex: 'auto',
  98873. margin: 0,
  98874. padding: 0,
  98875. overflow: 'auto',
  98876. listStyle: 'none',
  98877. borderRadius: `0 0 ${contentBorderRadius} ${contentBorderRadius}`,
  98878. '&-item': {
  98879. display: 'flex',
  98880. alignItems: 'center',
  98881. minHeight: itemHeight,
  98882. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(itemPaddingBlock)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(paddingSM)}`,
  98883. transition: `all ${motionDurationSlow}`,
  98884. '> *:not(:last-child)': {
  98885. marginInlineEnd: marginXS
  98886. },
  98887. '> *': {
  98888. flex: 'none'
  98889. },
  98890. '&-text': Object.assign(Object.assign({}, _style__WEBPACK_IMPORTED_MODULE_1__.textEllipsis), {
  98891. flex: 'auto'
  98892. }),
  98893. '&-remove': Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.operationUnit)(token)), {
  98894. color: colorBorder,
  98895. '&:hover, &:focus': {
  98896. color: colorTextSecondary
  98897. }
  98898. }),
  98899. [`&:not(${componentCls}-list-content-item-disabled)`]: {
  98900. '&:hover': {
  98901. backgroundColor: controlItemBgHover,
  98902. cursor: 'pointer'
  98903. },
  98904. [`&${componentCls}-list-content-item-checked:hover`]: {
  98905. backgroundColor: controlItemBgActiveHover
  98906. }
  98907. },
  98908. '&-checked': {
  98909. backgroundColor: controlItemBgActive
  98910. },
  98911. '&-disabled': {
  98912. color: colorTextDisabled,
  98913. cursor: 'not-allowed'
  98914. }
  98915. },
  98916. // Do not change hover style when `oneWay` mode
  98917. [`&-show-remove ${componentCls}-list-content-item:not(${componentCls}-list-content-item-disabled):hover`]: {
  98918. background: 'transparent',
  98919. cursor: 'default'
  98920. }
  98921. },
  98922. '&-pagination': {
  98923. padding: token.paddingXS,
  98924. textAlign: 'end',
  98925. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`,
  98926. [`${antCls}-pagination-options`]: {
  98927. paddingInlineEnd: token.paddingXS
  98928. }
  98929. },
  98930. '&-body-not-found': {
  98931. flex: 'none',
  98932. width: '100%',
  98933. margin: 'auto 0',
  98934. color: colorTextDisabled,
  98935. textAlign: 'center'
  98936. },
  98937. '&-footer': {
  98938. borderTop: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(lineWidth)} ${lineType} ${colorSplit}`
  98939. },
  98940. // fix: https://github.com/ant-design/ant-design/issues/44489
  98941. '&-checkbox': {
  98942. lineHeight: 1
  98943. }
  98944. };
  98945. };
  98946. const genTransferStyle = token => {
  98947. const {
  98948. antCls,
  98949. iconCls,
  98950. componentCls,
  98951. marginXS,
  98952. marginXXS,
  98953. fontSizeIcon,
  98954. colorBgContainerDisabled
  98955. } = token;
  98956. return {
  98957. [componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__.resetComponent)(token)), {
  98958. position: 'relative',
  98959. display: 'flex',
  98960. alignItems: 'stretch',
  98961. [`${componentCls}-disabled`]: {
  98962. [`${componentCls}-list`]: {
  98963. background: colorBgContainerDisabled
  98964. }
  98965. },
  98966. [`${componentCls}-list`]: genTransferListStyle(token),
  98967. [`${componentCls}-operation`]: {
  98968. display: 'flex',
  98969. flex: 'none',
  98970. flexDirection: 'column',
  98971. alignSelf: 'center',
  98972. margin: `0 ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(marginXS)}`,
  98973. verticalAlign: 'middle',
  98974. gap: marginXXS,
  98975. [`${antCls}-btn ${iconCls}`]: {
  98976. fontSize: fontSizeIcon
  98977. }
  98978. }
  98979. })
  98980. };
  98981. };
  98982. const genTransferRTLStyle = token => {
  98983. const {
  98984. componentCls
  98985. } = token;
  98986. return {
  98987. [`${componentCls}-rtl`]: {
  98988. direction: 'rtl'
  98989. }
  98990. };
  98991. };
  98992. const prepareComponentToken = token => {
  98993. const {
  98994. fontSize,
  98995. lineHeight,
  98996. controlHeight,
  98997. controlHeightLG,
  98998. lineWidth
  98999. } = token;
  99000. const fontHeight = Math.round(fontSize * lineHeight);
  99001. return {
  99002. listWidth: 180,
  99003. listHeight: 200,
  99004. listWidthLG: 250,
  99005. headerHeight: controlHeightLG,
  99006. itemHeight: controlHeight,
  99007. itemPaddingBlock: (controlHeight - fontHeight) / 2,
  99008. transferHeaderVerticalPadding: Math.ceil((controlHeightLG - lineWidth - fontHeight) / 2)
  99009. };
  99010. };
  99011. // ============================== Export ==============================
  99012. /* harmony default export */ __webpack_exports__["default"] = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('Transfer', token => {
  99013. const transferToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token);
  99014. return [genTransferStyle(transferToken), genTransferCustomizeStyle(transferToken), genTransferStatusStyle(transferToken), genTransferRTLStyle(transferToken)];
  99015. }, prepareComponentToken));
  99016. /***/ }),
  99017. /***/ "./components/tree-select/style/index.ts":
  99018. /*!***********************************************!*\
  99019. !*** ./components/tree-select/style/index.ts ***!
  99020. \***********************************************/
  99021. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  99022. "use strict";
  99023. __webpack_require__.r(__webpack_exports__);
  99024. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  99025. /* harmony export */ "default": function() { return /* binding */ useTreeSelectStyle; },
  99026. /* harmony export */ prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  99027. /* harmony export */ });
  99028. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ "./alias/cssinjs.js");
  99029. /* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__);
  99030. /* harmony import */ var _checkbox_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../checkbox/style */ "./components/checkbox/style/index.ts");
  99031. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ "./node_modules/@ant-design/cssinjs-utils/es/index.js");
  99032. /* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ "./components/theme/util/genStyleUtils.ts");
  99033. /* harmony import */ var _tree_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../tree/style */ "./components/tree/style/index.ts");
  99034. // =============================== Base ===============================
  99035. const genBaseStyle = token => {
  99036. const {
  99037. componentCls,
  99038. treePrefixCls,
  99039. colorBgElevated
  99040. } = token;
  99041. const treeCls = `.${treePrefixCls}`;
  99042. return [
  99043. // ======================================================
  99044. // == Dropdown ==
  99045. // ======================================================
  99046. {
  99047. [`${componentCls}-dropdown`]: [{
  99048. padding: `${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.paddingXS)} ${(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.unit)(token.calc(token.paddingXS).div(2).equal())}`
  99049. },
  99050. // ====================== Tree ======================
  99051. (0,_tree_style__WEBPACK_IMPORTED_MODULE_4__.genTreeStyle)(treePrefixCls, (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  99052. colorBgContainer: colorBgElevated
  99053. }), false), {
  99054. [treeCls]: {
  99055. borderRadius: 0,
  99056. [`${treeCls}-list-holder-inner`]: {
  99057. alignItems: 'stretch',
  99058. [`${treeCls}-treenode`]: {
  99059. [`${treeCls}-node-content-wrapper`]: {
  99060. flex: 'auto'
  99061. }
  99062. }
  99063. }
  99064. }
  99065. },
  99066. // ==================== Checkbox ====================
  99067. (0,_checkbox_style__WEBPACK_IMPORTED_MODULE_1__.getStyle)(`${treePrefixCls}-checkbox`, token),
  99068. // ====================== RTL =======================
  99069. {
  99070. '&-rtl': {
  99071. direction: 'rtl',
  99072. [`${treeCls}-switcher${treeCls}-switcher_close`]: {
  99073. [`${treeCls}-switcher-icon svg`]: {
  99074. transform: 'rotate(90deg)'
  99075. }
  99076. }
  99077. }
  99078. }]
  99079. }];
  99080. };
  99081. const prepareComponentToken = _tree_style__WEBPACK_IMPORTED_MODULE_4__.initComponentToken;
  99082. // ============================== Export ==============================
  99083. function useTreeSelectStyle(prefixCls, treePrefixCls, rootCls) {
  99084. return (0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__.genStyleHooks)('TreeSelect', token => {
  99085. const treeSelectToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__.mergeToken)(token, {
  99086. treePrefixCls
  99087. });
  99088. return genBaseStyle(treeSelectToken);
  99089. }, _tree_style__WEBPACK_IMPORTED_MODULE_4__.initComponentToken)(prefixCls, rootCls);
  99090. }
  99091. /***/ }),
  99092. /***/ "./components/tree/style/index.ts":
  99093. /*!****************************************************!*\
  99094. !*** ./components/tree/style/index.ts + 1 modules ***!
  99095. \****************************************************/
  99096. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  99097. "use strict";
  99098. // ESM COMPAT FLAG
  99099. __webpack_require__.r(__webpack_exports__);
  99100. // EXPORTS
  99101. __webpack_require__.d(__webpack_exports__, {
  99102. "default": function() { return /* binding */ tree_style; },
  99103. genBaseStyle: function() { return /* binding */ genBaseStyle; },
  99104. genTreeStyle: function() { return /* binding */ genTreeStyle; },
  99105. initComponentToken: function() { return /* binding */ initComponentToken; },
  99106. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  99107. });
  99108. // EXTERNAL MODULE: ./alias/cssinjs.js
  99109. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  99110. // EXTERNAL MODULE: ./components/checkbox/style/index.ts
  99111. var style = __webpack_require__("./components/checkbox/style/index.ts");
  99112. // EXTERNAL MODULE: ./components/style/index.tsx
  99113. var components_style = __webpack_require__("./components/style/index.tsx");
  99114. // EXTERNAL MODULE: ./components/style/motion/collapse.ts
  99115. var collapse = __webpack_require__("./components/style/motion/collapse.ts");
  99116. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  99117. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  99118. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  99119. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  99120. ;// ./components/tree/style/directory.ts
  99121. // ============================ Directory =============================
  99122. const genDirectoryStyle = ({
  99123. treeCls,
  99124. treeNodeCls,
  99125. directoryNodeSelectedBg,
  99126. directoryNodeSelectedColor,
  99127. motionDurationMid,
  99128. borderRadius,
  99129. controlItemBgHover
  99130. }) => ({
  99131. [`${treeCls}${treeCls}-directory ${treeNodeCls}`]: {
  99132. // >>> Title
  99133. [`${treeCls}-node-content-wrapper`]: {
  99134. position: 'static',
  99135. [`&:has(${treeCls}-drop-indicator)`]: {
  99136. position: 'relative'
  99137. },
  99138. [`> *:not(${treeCls}-drop-indicator)`]: {
  99139. position: 'relative'
  99140. },
  99141. '&:hover': {
  99142. background: 'transparent'
  99143. },
  99144. // Expand interactive area to whole line
  99145. '&:before': {
  99146. position: 'absolute',
  99147. inset: 0,
  99148. transition: `background-color ${motionDurationMid}`,
  99149. content: '""',
  99150. borderRadius
  99151. },
  99152. '&:hover:before': {
  99153. background: controlItemBgHover
  99154. }
  99155. },
  99156. [`${treeCls}-switcher, ${treeCls}-checkbox, ${treeCls}-draggable-icon`]: {
  99157. zIndex: 1
  99158. },
  99159. // ============= Selected =============
  99160. '&-selected': {
  99161. background: directoryNodeSelectedBg,
  99162. borderRadius,
  99163. [`${treeCls}-switcher, ${treeCls}-draggable-icon`]: {
  99164. color: directoryNodeSelectedColor
  99165. },
  99166. // >>> Title
  99167. [`${treeCls}-node-content-wrapper`]: {
  99168. color: directoryNodeSelectedColor,
  99169. background: 'transparent',
  99170. '&, &:hover': {
  99171. color: directoryNodeSelectedColor
  99172. },
  99173. '&:before, &:hover:before': {
  99174. background: directoryNodeSelectedBg
  99175. }
  99176. }
  99177. }
  99178. }
  99179. });
  99180. ;// ./components/tree/style/index.ts
  99181. // ============================ Keyframes =============================
  99182. const treeNodeFX = new cssinjs.Keyframes('ant-tree-node-fx-do-not-use', {
  99183. '0%': {
  99184. opacity: 0
  99185. },
  99186. '100%': {
  99187. opacity: 1
  99188. }
  99189. });
  99190. // ============================== Switch ==============================
  99191. const getSwitchStyle = (prefixCls, token) => ({
  99192. [`.${prefixCls}-switcher-icon`]: {
  99193. display: 'inline-block',
  99194. fontSize: 10,
  99195. verticalAlign: 'baseline',
  99196. svg: {
  99197. transition: `transform ${token.motionDurationSlow}`
  99198. }
  99199. }
  99200. });
  99201. // =============================== Drop ===============================
  99202. const getDropIndicatorStyle = (prefixCls, token) => ({
  99203. [`.${prefixCls}-drop-indicator`]: {
  99204. position: 'absolute',
  99205. // it should displayed over the following node
  99206. zIndex: 1,
  99207. height: 2,
  99208. backgroundColor: token.colorPrimary,
  99209. borderRadius: 1,
  99210. pointerEvents: 'none',
  99211. '&:after': {
  99212. position: 'absolute',
  99213. top: -3,
  99214. insetInlineStart: -6,
  99215. width: 8,
  99216. height: 8,
  99217. backgroundColor: 'transparent',
  99218. border: `${(0,cssinjs.unit)(token.lineWidthBold)} solid ${token.colorPrimary}`,
  99219. borderRadius: '50%',
  99220. content: '""'
  99221. }
  99222. }
  99223. });
  99224. const genBaseStyle = (prefixCls, token) => {
  99225. const {
  99226. treeCls,
  99227. treeNodeCls,
  99228. treeNodePadding,
  99229. titleHeight,
  99230. indentSize,
  99231. nodeSelectedBg,
  99232. nodeHoverBg,
  99233. colorTextQuaternary,
  99234. controlItemBgActiveDisabled
  99235. } = token;
  99236. return {
  99237. [treeCls]: Object.assign(Object.assign({}, (0,components_style.resetComponent)(token)), {
  99238. // fix https://github.com/ant-design/ant-design/issues/50316
  99239. ['--rc-virtual-list-scrollbar-bg']: token.colorSplit,
  99240. background: token.colorBgContainer,
  99241. borderRadius: token.borderRadius,
  99242. transition: `background-color ${token.motionDurationSlow}`,
  99243. '&-rtl': {
  99244. direction: 'rtl'
  99245. },
  99246. [`&${treeCls}-rtl ${treeCls}-switcher_close ${treeCls}-switcher-icon svg`]: {
  99247. transform: 'rotate(90deg)'
  99248. },
  99249. [`&-focused:not(:hover):not(${treeCls}-active-focused)`]: (0,components_style.genFocusOutline)(token),
  99250. // =================== Virtual List ===================
  99251. [`${treeCls}-list-holder-inner`]: {
  99252. alignItems: 'flex-start'
  99253. },
  99254. [`&${treeCls}-block-node`]: {
  99255. [`${treeCls}-list-holder-inner`]: {
  99256. alignItems: 'stretch',
  99257. // >>> Title
  99258. [`${treeCls}-node-content-wrapper`]: {
  99259. flex: 'auto'
  99260. },
  99261. // >>> Drag
  99262. [`${treeNodeCls}.dragging:after`]: {
  99263. position: 'absolute',
  99264. inset: 0,
  99265. border: `1px solid ${token.colorPrimary}`,
  99266. opacity: 0,
  99267. animationName: treeNodeFX,
  99268. animationDuration: token.motionDurationSlow,
  99269. animationPlayState: 'running',
  99270. animationFillMode: 'forwards',
  99271. content: '""',
  99272. pointerEvents: 'none',
  99273. borderRadius: token.borderRadius
  99274. }
  99275. }
  99276. },
  99277. // ===================== TreeNode =====================
  99278. [treeNodeCls]: {
  99279. display: 'flex',
  99280. alignItems: 'flex-start',
  99281. marginBottom: treeNodePadding,
  99282. lineHeight: (0,cssinjs.unit)(titleHeight),
  99283. position: 'relative',
  99284. // 非常重要,避免 drop-indicator 在拖拽过程中闪烁
  99285. '&:before': {
  99286. content: '""',
  99287. position: 'absolute',
  99288. zIndex: 1,
  99289. insetInlineStart: 0,
  99290. width: '100%',
  99291. top: '100%',
  99292. height: treeNodePadding
  99293. },
  99294. // Disabled
  99295. [`&-disabled ${treeCls}-node-content-wrapper`]: {
  99296. color: token.colorTextDisabled,
  99297. cursor: 'not-allowed',
  99298. '&:hover': {
  99299. background: 'transparent'
  99300. }
  99301. },
  99302. [`${treeCls}-checkbox-disabled + ${treeCls}-node-selected,&${treeNodeCls}-disabled${treeNodeCls}-selected ${treeCls}-node-content-wrapper`]: {
  99303. backgroundColor: controlItemBgActiveDisabled
  99304. },
  99305. // we can not set pointer-events to none for checkbox in tree
  99306. // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-2605234058
  99307. [`${treeCls}-checkbox-disabled`]: {
  99308. pointerEvents: 'unset'
  99309. },
  99310. // not disable
  99311. [`&:not(${treeNodeCls}-disabled)`]: {
  99312. // >>> Title
  99313. [`${treeCls}-node-content-wrapper`]: {
  99314. '&:hover': {
  99315. color: token.nodeHoverColor
  99316. }
  99317. }
  99318. },
  99319. [`&-active ${treeCls}-node-content-wrapper`]: {
  99320. background: token.controlItemBgHover
  99321. },
  99322. [`&:not(${treeNodeCls}-disabled).filter-node ${treeCls}-title`]: {
  99323. color: token.colorPrimary,
  99324. fontWeight: token.fontWeightStrong
  99325. },
  99326. '&-draggable': {
  99327. cursor: 'grab',
  99328. [`${treeCls}-draggable-icon`]: {
  99329. // https://github.com/ant-design/ant-design/issues/41915
  99330. flexShrink: 0,
  99331. width: titleHeight,
  99332. textAlign: 'center',
  99333. visibility: 'visible',
  99334. color: colorTextQuaternary
  99335. },
  99336. [`&${treeNodeCls}-disabled ${treeCls}-draggable-icon`]: {
  99337. visibility: 'hidden'
  99338. }
  99339. }
  99340. },
  99341. // >>> Indent
  99342. [`${treeCls}-indent`]: {
  99343. alignSelf: 'stretch',
  99344. whiteSpace: 'nowrap',
  99345. userSelect: 'none',
  99346. '&-unit': {
  99347. display: 'inline-block',
  99348. width: indentSize
  99349. }
  99350. },
  99351. // >>> Drag Handler
  99352. [`${treeCls}-draggable-icon`]: {
  99353. visibility: 'hidden'
  99354. },
  99355. // Switcher / Checkbox
  99356. [`${treeCls}-switcher, ${treeCls}-checkbox`]: {
  99357. marginInlineEnd: token.calc(token.calc(titleHeight).sub(token.controlInteractiveSize)).div(2).equal()
  99358. },
  99359. // >>> Switcher
  99360. [`${treeCls}-switcher`]: Object.assign(Object.assign({}, getSwitchStyle(prefixCls, token)), {
  99361. position: 'relative',
  99362. flex: 'none',
  99363. alignSelf: 'stretch',
  99364. width: titleHeight,
  99365. textAlign: 'center',
  99366. cursor: 'pointer',
  99367. userSelect: 'none',
  99368. transition: `all ${token.motionDurationSlow}`,
  99369. '&-noop': {
  99370. cursor: 'unset'
  99371. },
  99372. '&:before': {
  99373. pointerEvents: 'none',
  99374. content: '""',
  99375. width: titleHeight,
  99376. height: titleHeight,
  99377. position: 'absolute',
  99378. left: {
  99379. _skip_check_: true,
  99380. value: 0
  99381. },
  99382. top: 0,
  99383. borderRadius: token.borderRadius,
  99384. transition: `all ${token.motionDurationSlow}`
  99385. },
  99386. [`&:not(${treeCls}-switcher-noop):hover:before`]: {
  99387. backgroundColor: token.colorBgTextHover
  99388. },
  99389. [`&_close ${treeCls}-switcher-icon svg`]: {
  99390. transform: 'rotate(-90deg)'
  99391. },
  99392. '&-loading-icon': {
  99393. color: token.colorPrimary
  99394. },
  99395. '&-leaf-line': {
  99396. position: 'relative',
  99397. zIndex: 1,
  99398. display: 'inline-block',
  99399. width: '100%',
  99400. height: '100%',
  99401. // https://github.com/ant-design/ant-design/issues/31884
  99402. '&:before': {
  99403. position: 'absolute',
  99404. top: 0,
  99405. insetInlineEnd: token.calc(titleHeight).div(2).equal(),
  99406. bottom: token.calc(treeNodePadding).mul(-1).equal(),
  99407. marginInlineStart: -1,
  99408. borderInlineEnd: `1px solid ${token.colorBorder}`,
  99409. content: '""'
  99410. },
  99411. '&:after': {
  99412. position: 'absolute',
  99413. width: token.calc(token.calc(titleHeight).div(2).equal()).mul(0.8).equal(),
  99414. height: token.calc(titleHeight).div(2).equal(),
  99415. borderBottom: `1px solid ${token.colorBorder}`,
  99416. content: '""'
  99417. }
  99418. }
  99419. }),
  99420. // >>> Title
  99421. // add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`
  99422. [`${treeCls}-node-content-wrapper`]: Object.assign(Object.assign({
  99423. position: 'relative',
  99424. minHeight: titleHeight,
  99425. paddingBlock: 0,
  99426. paddingInline: token.paddingXS,
  99427. background: 'transparent',
  99428. borderRadius: token.borderRadius,
  99429. cursor: 'pointer',
  99430. transition: `all ${token.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`
  99431. }, getDropIndicatorStyle(prefixCls, token)), {
  99432. '&:hover': {
  99433. backgroundColor: nodeHoverBg
  99434. },
  99435. [`&${treeCls}-node-selected`]: {
  99436. color: token.nodeSelectedColor,
  99437. backgroundColor: nodeSelectedBg
  99438. },
  99439. // Icon
  99440. [`${treeCls}-iconEle`]: {
  99441. display: 'inline-block',
  99442. width: titleHeight,
  99443. height: titleHeight,
  99444. textAlign: 'center',
  99445. verticalAlign: 'top',
  99446. '&:empty': {
  99447. display: 'none'
  99448. }
  99449. }
  99450. }),
  99451. // https://github.com/ant-design/ant-design/issues/28217
  99452. [`${treeCls}-unselectable ${treeCls}-node-content-wrapper:hover`]: {
  99453. backgroundColor: 'transparent'
  99454. },
  99455. [`${treeNodeCls}.drop-container > [draggable]`]: {
  99456. boxShadow: `0 0 0 2px ${token.colorPrimary}`
  99457. },
  99458. // ==================== Show Line =====================
  99459. '&-show-line': {
  99460. // ================ Indent lines ================
  99461. [`${treeCls}-indent-unit`]: {
  99462. position: 'relative',
  99463. height: '100%',
  99464. '&:before': {
  99465. position: 'absolute',
  99466. top: 0,
  99467. insetInlineEnd: token.calc(titleHeight).div(2).equal(),
  99468. bottom: token.calc(treeNodePadding).mul(-1).equal(),
  99469. borderInlineEnd: `1px solid ${token.colorBorder}`,
  99470. content: '""'
  99471. },
  99472. '&-end:before': {
  99473. display: 'none'
  99474. }
  99475. },
  99476. // ============== Cover Background ==============
  99477. [`${treeCls}-switcher`]: {
  99478. background: 'transparent',
  99479. '&-line-icon': {
  99480. // https://github.com/ant-design/ant-design/issues/32813
  99481. verticalAlign: '-0.15em'
  99482. }
  99483. }
  99484. },
  99485. [`${treeNodeCls}-leaf-last ${treeCls}-switcher-leaf-line:before`]: {
  99486. top: 'auto !important',
  99487. bottom: 'auto !important',
  99488. height: `${(0,cssinjs.unit)(token.calc(titleHeight).div(2).equal())} !important`
  99489. }
  99490. })
  99491. };
  99492. };
  99493. // ============================== Merged ==============================
  99494. const genTreeStyle = (prefixCls, token,
  99495. /**
  99496. * @descCN 是否启用目录树样式
  99497. * @descEN Whether to enable directory style
  99498. * @default true
  99499. */
  99500. enableDirectory = true) => {
  99501. const treeCls = `.${prefixCls}`;
  99502. const treeNodeCls = `${treeCls}-treenode`;
  99503. const treeNodePadding = token.calc(token.paddingXS).div(2).equal();
  99504. const treeToken = (0,es.mergeToken)(token, {
  99505. treeCls,
  99506. treeNodeCls,
  99507. treeNodePadding
  99508. });
  99509. return [
  99510. // Basic
  99511. genBaseStyle(prefixCls, treeToken),
  99512. // Directory
  99513. enableDirectory && genDirectoryStyle(treeToken)].filter(Boolean);
  99514. };
  99515. const initComponentToken = token => {
  99516. const {
  99517. controlHeightSM,
  99518. controlItemBgHover,
  99519. controlItemBgActive
  99520. } = token;
  99521. const titleHeight = controlHeightSM;
  99522. return {
  99523. titleHeight,
  99524. indentSize: titleHeight,
  99525. nodeHoverBg: controlItemBgHover,
  99526. nodeHoverColor: token.colorText,
  99527. nodeSelectedBg: controlItemBgActive,
  99528. nodeSelectedColor: token.colorText
  99529. };
  99530. };
  99531. const prepareComponentToken = token => {
  99532. const {
  99533. colorTextLightSolid,
  99534. colorPrimary
  99535. } = token;
  99536. return Object.assign(Object.assign({}, initComponentToken(token)), {
  99537. directoryNodeSelectedColor: colorTextLightSolid,
  99538. directoryNodeSelectedBg: colorPrimary
  99539. });
  99540. };
  99541. /* harmony default export */ var tree_style = ((0,genStyleUtils.genStyleHooks)('Tree', (token, {
  99542. prefixCls
  99543. }) => [{
  99544. [token.componentCls]: (0,style.getStyle)(`${prefixCls}-checkbox`, token)
  99545. }, genTreeStyle(prefixCls, token), (0,collapse["default"])(token)], prepareComponentToken));
  99546. /***/ }),
  99547. /***/ "./components/typography/style/index.ts":
  99548. /*!**********************************************************!*\
  99549. !*** ./components/typography/style/index.ts + 1 modules ***!
  99550. \**********************************************************/
  99551. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  99552. "use strict";
  99553. // ESM COMPAT FLAG
  99554. __webpack_require__.r(__webpack_exports__);
  99555. // EXPORTS
  99556. __webpack_require__.d(__webpack_exports__, {
  99557. "default": function() { return /* binding */ typography_style; },
  99558. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  99559. });
  99560. // EXTERNAL MODULE: ./components/style/index.tsx
  99561. var style = __webpack_require__("./components/style/index.tsx");
  99562. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  99563. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  99564. // EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 2 modules
  99565. var es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
  99566. ;// ./components/typography/style/mixins.ts
  99567. /*
  99568. .typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMarginBottom;) {
  99569. margin-bottom: @headingMarginBottom;
  99570. color: @headingColor;
  99571. font-weight: @fontWeight;
  99572. fontSize: @fontSize;
  99573. line-height: @lineHeight;
  99574. }
  99575. */
  99576. const getTitleStyle = (fontSize, lineHeight, color, token) => {
  99577. const {
  99578. titleMarginBottom,
  99579. fontWeightStrong
  99580. } = token;
  99581. return {
  99582. marginBottom: titleMarginBottom,
  99583. color,
  99584. fontWeight: fontWeightStrong,
  99585. fontSize,
  99586. lineHeight
  99587. };
  99588. };
  99589. const getTitleStyles = token => {
  99590. const headings = [1, 2, 3, 4, 5];
  99591. const styles = {};
  99592. headings.forEach(headingLevel => {
  99593. styles[`
  99594. h${headingLevel}&,
  99595. div&-h${headingLevel},
  99596. div&-h${headingLevel} > textarea,
  99597. h${headingLevel}
  99598. `] = getTitleStyle(token[`fontSizeHeading${headingLevel}`], token[`lineHeightHeading${headingLevel}`], token.colorTextHeading, token);
  99599. });
  99600. return styles;
  99601. };
  99602. const getLinkStyles = token => {
  99603. const {
  99604. componentCls
  99605. } = token;
  99606. return {
  99607. 'a&, a': Object.assign(Object.assign({}, (0,style.operationUnit)(token)), {
  99608. userSelect: 'text',
  99609. [`&[disabled], &${componentCls}-disabled`]: {
  99610. color: token.colorTextDisabled,
  99611. cursor: 'not-allowed',
  99612. '&:active, &:hover': {
  99613. color: token.colorTextDisabled
  99614. },
  99615. '&:active': {
  99616. pointerEvents: 'none'
  99617. }
  99618. }
  99619. })
  99620. };
  99621. };
  99622. const getResetStyles = token => ({
  99623. code: {
  99624. margin: '0 0.2em',
  99625. paddingInline: '0.4em',
  99626. paddingBlock: '0.2em 0.1em',
  99627. fontSize: '85%',
  99628. fontFamily: token.fontFamilyCode,
  99629. background: 'rgba(150, 150, 150, 0.1)',
  99630. border: '1px solid rgba(100, 100, 100, 0.2)',
  99631. borderRadius: 3
  99632. },
  99633. kbd: {
  99634. margin: '0 0.2em',
  99635. paddingInline: '0.4em',
  99636. paddingBlock: '0.15em 0.1em',
  99637. fontSize: '90%',
  99638. fontFamily: token.fontFamilyCode,
  99639. background: 'rgba(150, 150, 150, 0.06)',
  99640. border: '1px solid rgba(100, 100, 100, 0.2)',
  99641. borderBottomWidth: 2,
  99642. borderRadius: 3
  99643. },
  99644. mark: {
  99645. padding: 0,
  99646. // FIXME hardcode in v4
  99647. backgroundColor: es.gold[2]
  99648. },
  99649. 'u, ins': {
  99650. textDecoration: 'underline',
  99651. textDecorationSkipInk: 'auto'
  99652. },
  99653. 's, del': {
  99654. textDecoration: 'line-through'
  99655. },
  99656. strong: {
  99657. fontWeight: token.fontWeightStrong
  99658. },
  99659. // list
  99660. 'ul, ol': {
  99661. marginInline: 0,
  99662. marginBlock: '0 1em',
  99663. padding: 0,
  99664. li: {
  99665. marginInline: '20px 0',
  99666. marginBlock: 0,
  99667. paddingInline: '4px 0',
  99668. paddingBlock: 0
  99669. }
  99670. },
  99671. ul: {
  99672. listStyleType: 'circle',
  99673. ul: {
  99674. listStyleType: 'disc'
  99675. }
  99676. },
  99677. ol: {
  99678. listStyleType: 'decimal'
  99679. },
  99680. // pre & block
  99681. 'pre, blockquote': {
  99682. margin: '1em 0'
  99683. },
  99684. pre: {
  99685. padding: '0.4em 0.6em',
  99686. whiteSpace: 'pre-wrap',
  99687. wordWrap: 'break-word',
  99688. background: 'rgba(150, 150, 150, 0.1)',
  99689. border: '1px solid rgba(100, 100, 100, 0.2)',
  99690. borderRadius: 3,
  99691. fontFamily: token.fontFamilyCode,
  99692. // Compatible for marked
  99693. code: {
  99694. display: 'inline',
  99695. margin: 0,
  99696. padding: 0,
  99697. fontSize: 'inherit',
  99698. fontFamily: 'inherit',
  99699. background: 'transparent',
  99700. border: 0
  99701. }
  99702. },
  99703. blockquote: {
  99704. paddingInline: '0.6em 0',
  99705. paddingBlock: 0,
  99706. borderInlineStart: '4px solid rgba(100, 100, 100, 0.2)',
  99707. opacity: 0.85
  99708. }
  99709. });
  99710. const getEditableStyles = token => {
  99711. const {
  99712. componentCls,
  99713. paddingSM
  99714. } = token;
  99715. const inputShift = paddingSM;
  99716. return {
  99717. '&-edit-content': {
  99718. position: 'relative',
  99719. 'div&': {
  99720. insetInlineStart: token.calc(token.paddingSM).mul(-1).equal(),
  99721. insetBlockStart: token.calc(inputShift).div(-2).add(1).equal(),
  99722. marginBottom: token.calc(inputShift).div(2).sub(2).equal()
  99723. },
  99724. [`${componentCls}-edit-content-confirm`]: {
  99725. position: 'absolute',
  99726. insetInlineEnd: token.calc(token.marginXS).add(2).equal(),
  99727. insetBlockEnd: token.marginXS,
  99728. color: token.colorIcon,
  99729. // default style
  99730. fontWeight: 'normal',
  99731. fontSize: token.fontSize,
  99732. fontStyle: 'normal',
  99733. pointerEvents: 'none'
  99734. },
  99735. textarea: {
  99736. margin: '0!important',
  99737. // Fix Editable Textarea flash in Firefox
  99738. MozTransition: 'none',
  99739. height: '1em'
  99740. }
  99741. }
  99742. };
  99743. };
  99744. const getCopyableStyles = token => ({
  99745. [`${token.componentCls}-copy-success`]: {
  99746. [`
  99747. &,
  99748. &:hover,
  99749. &:focus`]: {
  99750. color: token.colorSuccess
  99751. }
  99752. },
  99753. [`${token.componentCls}-copy-icon-only`]: {
  99754. marginInlineStart: 0
  99755. }
  99756. });
  99757. const getEllipsisStyles = () => ({
  99758. [`
  99759. a&-ellipsis,
  99760. span&-ellipsis
  99761. `]: {
  99762. display: 'inline-block',
  99763. maxWidth: '100%'
  99764. },
  99765. '&-ellipsis-single-line': {
  99766. whiteSpace: 'nowrap',
  99767. overflow: 'hidden',
  99768. textOverflow: 'ellipsis',
  99769. // https://blog.csdn.net/iefreer/article/details/50421025
  99770. 'a&, span&': {
  99771. verticalAlign: 'bottom'
  99772. },
  99773. '> code': {
  99774. paddingBlock: 0,
  99775. maxWidth: 'calc(100% - 1.2em)',
  99776. display: 'inline-block',
  99777. overflow: 'hidden',
  99778. textOverflow: 'ellipsis',
  99779. verticalAlign: 'bottom',
  99780. // https://github.com/ant-design/ant-design/issues/45953
  99781. boxSizing: 'content-box'
  99782. }
  99783. },
  99784. '&-ellipsis-multiple-line': {
  99785. display: '-webkit-box',
  99786. overflow: 'hidden',
  99787. WebkitLineClamp: 3,
  99788. WebkitBoxOrient: 'vertical'
  99789. }
  99790. });
  99791. ;// ./components/typography/style/index.ts
  99792. const genTypographyStyle = token => {
  99793. const {
  99794. componentCls,
  99795. titleMarginTop
  99796. } = token;
  99797. return {
  99798. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
  99799. color: token.colorText,
  99800. wordBreak: 'break-word',
  99801. lineHeight: token.lineHeight,
  99802. [`&${componentCls}-secondary`]: {
  99803. color: token.colorTextDescription
  99804. },
  99805. [`&${componentCls}-success`]: {
  99806. color: token.colorSuccessText
  99807. },
  99808. [`&${componentCls}-warning`]: {
  99809. color: token.colorWarningText
  99810. },
  99811. [`&${componentCls}-danger`]: {
  99812. color: token.colorErrorText,
  99813. 'a&:active, a&:focus': {
  99814. color: token.colorErrorTextActive
  99815. },
  99816. 'a&:hover': {
  99817. color: token.colorErrorTextHover
  99818. }
  99819. },
  99820. [`&${componentCls}-disabled`]: {
  99821. color: token.colorTextDisabled,
  99822. cursor: 'not-allowed',
  99823. userSelect: 'none'
  99824. },
  99825. [`
  99826. div&,
  99827. p
  99828. `]: {
  99829. marginBottom: '1em'
  99830. }
  99831. }, getTitleStyles(token)), {
  99832. [`
  99833. & + h1${componentCls},
  99834. & + h2${componentCls},
  99835. & + h3${componentCls},
  99836. & + h4${componentCls},
  99837. & + h5${componentCls}
  99838. `]: {
  99839. marginTop: titleMarginTop
  99840. },
  99841. [`
  99842. div,
  99843. ul,
  99844. li,
  99845. p,
  99846. h1,
  99847. h2,
  99848. h3,
  99849. h4,
  99850. h5`]: {
  99851. [`
  99852. + h1,
  99853. + h2,
  99854. + h3,
  99855. + h4,
  99856. + h5
  99857. `]: {
  99858. marginTop: titleMarginTop
  99859. }
  99860. }
  99861. }), getResetStyles(token)), getLinkStyles(token)), {
  99862. // Operation
  99863. [`
  99864. ${componentCls}-expand,
  99865. ${componentCls}-collapse,
  99866. ${componentCls}-edit,
  99867. ${componentCls}-copy
  99868. `]: Object.assign(Object.assign({}, (0,style.operationUnit)(token)), {
  99869. marginInlineStart: token.marginXXS
  99870. })
  99871. }), getEditableStyles(token)), getCopyableStyles(token)), getEllipsisStyles()), {
  99872. '&-rtl': {
  99873. direction: 'rtl'
  99874. }
  99875. })
  99876. };
  99877. };
  99878. const prepareComponentToken = () => ({
  99879. titleMarginTop: '1.2em',
  99880. titleMarginBottom: '0.5em'
  99881. });
  99882. // ============================== Export ==============================
  99883. /* harmony default export */ var typography_style = ((0,genStyleUtils.genStyleHooks)('Typography', genTypographyStyle, prepareComponentToken));
  99884. /***/ }),
  99885. /***/ "./components/upload/style/index.ts":
  99886. /*!******************************************************!*\
  99887. !*** ./components/upload/style/index.ts + 5 modules ***!
  99888. \******************************************************/
  99889. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  99890. "use strict";
  99891. // ESM COMPAT FLAG
  99892. __webpack_require__.r(__webpack_exports__);
  99893. // EXPORTS
  99894. __webpack_require__.d(__webpack_exports__, {
  99895. "default": function() { return /* binding */ upload_style; },
  99896. prepareComponentToken: function() { return /* binding */ prepareComponentToken; }
  99897. });
  99898. // EXTERNAL MODULE: ./components/style/index.tsx
  99899. var style = __webpack_require__("./components/style/index.tsx");
  99900. // EXTERNAL MODULE: ./components/style/motion/collapse.ts
  99901. var collapse = __webpack_require__("./components/style/motion/collapse.ts");
  99902. // EXTERNAL MODULE: ./components/theme/util/genStyleUtils.ts
  99903. var genStyleUtils = __webpack_require__("./components/theme/util/genStyleUtils.ts");
  99904. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules
  99905. var es = __webpack_require__("./node_modules/@ant-design/cssinjs-utils/es/index.js");
  99906. // EXTERNAL MODULE: ./alias/cssinjs.js
  99907. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  99908. ;// ./components/upload/style/dragger.ts
  99909. const genDraggerStyle = token => {
  99910. const {
  99911. componentCls,
  99912. iconCls
  99913. } = token;
  99914. return {
  99915. [`${componentCls}-wrapper`]: {
  99916. [`${componentCls}-drag`]: {
  99917. position: 'relative',
  99918. width: '100%',
  99919. height: '100%',
  99920. textAlign: 'center',
  99921. background: token.colorFillAlter,
  99922. border: `${(0,cssinjs.unit)(token.lineWidth)} dashed ${token.colorBorder}`,
  99923. borderRadius: token.borderRadiusLG,
  99924. cursor: 'pointer',
  99925. transition: `border-color ${token.motionDurationSlow}`,
  99926. [componentCls]: {
  99927. padding: token.padding
  99928. },
  99929. [`${componentCls}-btn`]: {
  99930. display: 'table',
  99931. width: '100%',
  99932. height: '100%',
  99933. outline: 'none',
  99934. borderRadius: token.borderRadiusLG,
  99935. '&:focus-visible': {
  99936. outline: `${(0,cssinjs.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`
  99937. }
  99938. },
  99939. [`${componentCls}-drag-container`]: {
  99940. display: 'table-cell',
  99941. verticalAlign: 'middle'
  99942. },
  99943. [`
  99944. &:not(${componentCls}-disabled):hover,
  99945. &-hover:not(${componentCls}-disabled)
  99946. `]: {
  99947. borderColor: token.colorPrimaryHover
  99948. },
  99949. [`p${componentCls}-drag-icon`]: {
  99950. marginBottom: token.margin,
  99951. [iconCls]: {
  99952. color: token.colorPrimary,
  99953. fontSize: token.uploadThumbnailSize
  99954. }
  99955. },
  99956. [`p${componentCls}-text`]: {
  99957. margin: `0 0 ${(0,cssinjs.unit)(token.marginXXS)}`,
  99958. color: token.colorTextHeading,
  99959. fontSize: token.fontSizeLG
  99960. },
  99961. [`p${componentCls}-hint`]: {
  99962. color: token.colorTextDescription,
  99963. fontSize: token.fontSize
  99964. },
  99965. // ===================== Disabled =====================
  99966. [`&${componentCls}-disabled`]: {
  99967. [`p${componentCls}-drag-icon ${iconCls},
  99968. p${componentCls}-text,
  99969. p${componentCls}-hint
  99970. `]: {
  99971. color: token.colorTextDisabled
  99972. }
  99973. }
  99974. }
  99975. }
  99976. };
  99977. };
  99978. /* harmony default export */ var dragger = (genDraggerStyle);
  99979. ;// ./components/upload/style/list.ts
  99980. const genListStyle = token => {
  99981. const {
  99982. componentCls,
  99983. iconCls,
  99984. fontSize,
  99985. lineHeight,
  99986. calc
  99987. } = token;
  99988. const itemCls = `${componentCls}-list-item`;
  99989. const actionsCls = `${itemCls}-actions`;
  99990. const actionCls = `${itemCls}-action`;
  99991. return {
  99992. [`${componentCls}-wrapper`]: {
  99993. [`${componentCls}-list`]: Object.assign(Object.assign({}, (0,style.clearFix)()), {
  99994. lineHeight: token.lineHeight,
  99995. [itemCls]: {
  99996. position: 'relative',
  99997. height: calc(token.lineHeight).mul(fontSize).equal(),
  99998. marginTop: token.marginXS,
  99999. fontSize,
  100000. display: 'flex',
  100001. alignItems: 'center',
  100002. transition: `background-color ${token.motionDurationSlow}`,
  100003. borderRadius: token.borderRadiusSM,
  100004. '&:hover': {
  100005. backgroundColor: token.controlItemBgHover
  100006. },
  100007. [`${itemCls}-name`]: Object.assign(Object.assign({}, style.textEllipsis), {
  100008. padding: `0 ${(0,cssinjs.unit)(token.paddingXS)}`,
  100009. lineHeight,
  100010. flex: 'auto',
  100011. transition: `all ${token.motionDurationSlow}`
  100012. }),
  100013. [actionsCls]: {
  100014. whiteSpace: 'nowrap',
  100015. [actionCls]: {
  100016. opacity: 0
  100017. },
  100018. [iconCls]: {
  100019. color: token.actionsColor,
  100020. transition: `all ${token.motionDurationSlow}`
  100021. },
  100022. [`
  100023. ${actionCls}:focus-visible,
  100024. &.picture ${actionCls}
  100025. `]: {
  100026. opacity: 1
  100027. }
  100028. },
  100029. [`${componentCls}-icon ${iconCls}`]: {
  100030. color: token.colorIcon,
  100031. fontSize
  100032. },
  100033. [`${itemCls}-progress`]: {
  100034. position: 'absolute',
  100035. bottom: token.calc(token.uploadProgressOffset).mul(-1).equal(),
  100036. width: '100%',
  100037. paddingInlineStart: calc(fontSize).add(token.paddingXS).equal(),
  100038. fontSize,
  100039. lineHeight: 0,
  100040. pointerEvents: 'none',
  100041. '> div': {
  100042. margin: 0
  100043. }
  100044. }
  100045. },
  100046. [`${itemCls}:hover ${actionCls}`]: {
  100047. opacity: 1
  100048. },
  100049. [`${itemCls}-error`]: {
  100050. color: token.colorError,
  100051. [`${itemCls}-name, ${componentCls}-icon ${iconCls}`]: {
  100052. color: token.colorError
  100053. },
  100054. [actionsCls]: {
  100055. [`${iconCls}, ${iconCls}:hover`]: {
  100056. color: token.colorError
  100057. },
  100058. [actionCls]: {
  100059. opacity: 1
  100060. }
  100061. }
  100062. },
  100063. [`${componentCls}-list-item-container`]: {
  100064. transition: `opacity ${token.motionDurationSlow}, height ${token.motionDurationSlow}`,
  100065. // For smooth removing animation
  100066. '&::before': {
  100067. display: 'table',
  100068. width: 0,
  100069. height: 0,
  100070. content: '""'
  100071. }
  100072. }
  100073. })
  100074. }
  100075. };
  100076. };
  100077. /* harmony default export */ var list = (genListStyle);
  100078. // EXTERNAL MODULE: ./components/style/motion/fade.ts
  100079. var fade = __webpack_require__("./components/style/motion/fade.ts");
  100080. ;// ./components/upload/style/motion.ts
  100081. // =========================== Motion ===========================
  100082. const genMotionStyle = token => {
  100083. const {
  100084. componentCls
  100085. } = token;
  100086. const uploadAnimateInlineIn = new cssinjs.Keyframes('uploadAnimateInlineIn', {
  100087. from: {
  100088. width: 0,
  100089. height: 0,
  100090. padding: 0,
  100091. opacity: 0,
  100092. margin: token.calc(token.marginXS).div(-2).equal()
  100093. }
  100094. });
  100095. const uploadAnimateInlineOut = new cssinjs.Keyframes('uploadAnimateInlineOut', {
  100096. to: {
  100097. width: 0,
  100098. height: 0,
  100099. padding: 0,
  100100. opacity: 0,
  100101. margin: token.calc(token.marginXS).div(-2).equal()
  100102. }
  100103. });
  100104. const inlineCls = `${componentCls}-animate-inline`;
  100105. return [{
  100106. [`${componentCls}-wrapper`]: {
  100107. [`${inlineCls}-appear, ${inlineCls}-enter, ${inlineCls}-leave`]: {
  100108. animationDuration: token.motionDurationSlow,
  100109. animationTimingFunction: token.motionEaseInOutCirc,
  100110. animationFillMode: 'forwards'
  100111. },
  100112. [`${inlineCls}-appear, ${inlineCls}-enter`]: {
  100113. animationName: uploadAnimateInlineIn
  100114. },
  100115. [`${inlineCls}-leave`]: {
  100116. animationName: uploadAnimateInlineOut
  100117. }
  100118. }
  100119. }, {
  100120. [`${componentCls}-wrapper`]: (0,fade.initFadeMotion)(token)
  100121. }, uploadAnimateInlineIn, uploadAnimateInlineOut];
  100122. };
  100123. /* harmony default export */ var motion = (genMotionStyle);
  100124. // EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 2 modules
  100125. var colors_es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
  100126. ;// ./components/upload/style/picture.ts
  100127. const genPictureStyle = token => {
  100128. const {
  100129. componentCls,
  100130. iconCls,
  100131. uploadThumbnailSize,
  100132. uploadProgressOffset,
  100133. calc
  100134. } = token;
  100135. const listCls = `${componentCls}-list`;
  100136. const itemCls = `${listCls}-item`;
  100137. return {
  100138. [`${componentCls}-wrapper`]: {
  100139. // ${listCls} 增加优先级
  100140. [`
  100141. ${listCls}${listCls}-picture,
  100142. ${listCls}${listCls}-picture-card,
  100143. ${listCls}${listCls}-picture-circle
  100144. `]: {
  100145. [itemCls]: {
  100146. position: 'relative',
  100147. height: calc(uploadThumbnailSize).add(calc(token.lineWidth).mul(2)).add(calc(token.paddingXS).mul(2)).equal(),
  100148. padding: token.paddingXS,
  100149. border: `${(0,cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
  100150. borderRadius: token.borderRadiusLG,
  100151. '&:hover': {
  100152. background: 'transparent'
  100153. },
  100154. [`${itemCls}-thumbnail`]: Object.assign(Object.assign({}, style.textEllipsis), {
  100155. width: uploadThumbnailSize,
  100156. height: uploadThumbnailSize,
  100157. lineHeight: (0,cssinjs.unit)(calc(uploadThumbnailSize).add(token.paddingSM).equal()),
  100158. textAlign: 'center',
  100159. flex: 'none',
  100160. [iconCls]: {
  100161. fontSize: token.fontSizeHeading2,
  100162. color: token.colorPrimary
  100163. },
  100164. img: {
  100165. display: 'block',
  100166. width: '100%',
  100167. height: '100%',
  100168. overflow: 'hidden'
  100169. }
  100170. }),
  100171. [`${itemCls}-progress`]: {
  100172. bottom: uploadProgressOffset,
  100173. width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingSM).mul(2).equal())})`,
  100174. marginTop: 0,
  100175. paddingInlineStart: calc(uploadThumbnailSize).add(token.paddingXS).equal()
  100176. }
  100177. },
  100178. [`${itemCls}-error`]: {
  100179. borderColor: token.colorError,
  100180. // Adjust the color of the error icon : https://github.com/ant-design/ant-design/pull/24160
  100181. [`${itemCls}-thumbnail ${iconCls}`]: {
  100182. [`svg path[fill='${colors_es.blue[0]}']`]: {
  100183. fill: token.colorErrorBg
  100184. },
  100185. [`svg path[fill='${colors_es.blue.primary}']`]: {
  100186. fill: token.colorError
  100187. }
  100188. }
  100189. },
  100190. [`${itemCls}-uploading`]: {
  100191. borderStyle: 'dashed',
  100192. [`${itemCls}-name`]: {
  100193. marginBottom: uploadProgressOffset
  100194. }
  100195. }
  100196. },
  100197. [`${listCls}${listCls}-picture-circle ${itemCls}`]: {
  100198. [`&, &::before, ${itemCls}-thumbnail`]: {
  100199. borderRadius: '50%'
  100200. }
  100201. }
  100202. }
  100203. };
  100204. };
  100205. const genPictureCardStyle = token => {
  100206. const {
  100207. componentCls,
  100208. iconCls,
  100209. fontSizeLG,
  100210. colorTextLightSolid,
  100211. calc
  100212. } = token;
  100213. const listCls = `${componentCls}-list`;
  100214. const itemCls = `${listCls}-item`;
  100215. const uploadPictureCardSize = token.uploadPicCardSize;
  100216. return {
  100217. [`
  100218. ${componentCls}-wrapper${componentCls}-picture-card-wrapper,
  100219. ${componentCls}-wrapper${componentCls}-picture-circle-wrapper
  100220. `]: Object.assign(Object.assign({}, (0,style.clearFix)()), {
  100221. display: 'block',
  100222. [`${componentCls}${componentCls}-select`]: {
  100223. width: uploadPictureCardSize,
  100224. height: uploadPictureCardSize,
  100225. textAlign: 'center',
  100226. verticalAlign: 'top',
  100227. backgroundColor: token.colorFillAlter,
  100228. border: `${(0,cssinjs.unit)(token.lineWidth)} dashed ${token.colorBorder}`,
  100229. borderRadius: token.borderRadiusLG,
  100230. cursor: 'pointer',
  100231. transition: `border-color ${token.motionDurationSlow}`,
  100232. [`> ${componentCls}`]: {
  100233. display: 'flex',
  100234. alignItems: 'center',
  100235. justifyContent: 'center',
  100236. height: '100%',
  100237. textAlign: 'center'
  100238. },
  100239. [`&:not(${componentCls}-disabled):hover`]: {
  100240. borderColor: token.colorPrimary
  100241. }
  100242. },
  100243. // list
  100244. [`${listCls}${listCls}-picture-card, ${listCls}${listCls}-picture-circle`]: {
  100245. display: 'flex',
  100246. flexWrap: 'wrap',
  100247. '@supports not (gap: 1px)': {
  100248. '& > *': {
  100249. marginBlockEnd: token.marginXS,
  100250. marginInlineEnd: token.marginXS
  100251. }
  100252. },
  100253. '@supports (gap: 1px)': {
  100254. gap: token.marginXS
  100255. },
  100256. [`${listCls}-item-container`]: {
  100257. display: 'inline-block',
  100258. width: uploadPictureCardSize,
  100259. height: uploadPictureCardSize,
  100260. verticalAlign: 'top'
  100261. },
  100262. '&::after': {
  100263. display: 'none'
  100264. },
  100265. '&::before': {
  100266. display: 'none'
  100267. },
  100268. [itemCls]: {
  100269. height: '100%',
  100270. margin: 0,
  100271. '&::before': {
  100272. position: 'absolute',
  100273. zIndex: 1,
  100274. width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,
  100275. height: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,
  100276. backgroundColor: token.colorBgMask,
  100277. opacity: 0,
  100278. transition: `all ${token.motionDurationSlow}`,
  100279. content: '" "'
  100280. }
  100281. },
  100282. [`${itemCls}:hover`]: {
  100283. [`&::before, ${itemCls}-actions`]: {
  100284. opacity: 1
  100285. }
  100286. },
  100287. [`${itemCls}-actions`]: {
  100288. position: 'absolute',
  100289. insetInlineStart: 0,
  100290. zIndex: 10,
  100291. width: '100%',
  100292. whiteSpace: 'nowrap',
  100293. textAlign: 'center',
  100294. opacity: 0,
  100295. transition: `all ${token.motionDurationSlow}`,
  100296. [`
  100297. ${iconCls}-eye,
  100298. ${iconCls}-download,
  100299. ${iconCls}-delete
  100300. `]: {
  100301. zIndex: 10,
  100302. width: fontSizeLG,
  100303. margin: `0 ${(0,cssinjs.unit)(token.marginXXS)}`,
  100304. fontSize: fontSizeLG,
  100305. cursor: 'pointer',
  100306. transition: `all ${token.motionDurationSlow}`,
  100307. color: colorTextLightSolid,
  100308. '&:hover': {
  100309. color: colorTextLightSolid
  100310. },
  100311. svg: {
  100312. verticalAlign: 'baseline'
  100313. }
  100314. }
  100315. },
  100316. [`${itemCls}-thumbnail, ${itemCls}-thumbnail img`]: {
  100317. position: 'static',
  100318. display: 'block',
  100319. width: '100%',
  100320. height: '100%',
  100321. objectFit: 'contain'
  100322. },
  100323. [`${itemCls}-name`]: {
  100324. display: 'none',
  100325. textAlign: 'center'
  100326. },
  100327. [`${itemCls}-file + ${itemCls}-name`]: {
  100328. position: 'absolute',
  100329. bottom: token.margin,
  100330. display: 'block',
  100331. width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`
  100332. },
  100333. [`${itemCls}-uploading`]: {
  100334. [`&${itemCls}`]: {
  100335. backgroundColor: token.colorFillAlter
  100336. },
  100337. [`&::before, ${iconCls}-eye, ${iconCls}-download, ${iconCls}-delete`]: {
  100338. display: 'none'
  100339. }
  100340. },
  100341. [`${itemCls}-progress`]: {
  100342. bottom: token.marginXL,
  100343. width: `calc(100% - ${(0,cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,
  100344. paddingInlineStart: 0
  100345. }
  100346. }
  100347. }),
  100348. [`${componentCls}-wrapper${componentCls}-picture-circle-wrapper`]: {
  100349. [`${componentCls}${componentCls}-select`]: {
  100350. borderRadius: '50%'
  100351. }
  100352. }
  100353. };
  100354. };
  100355. ;// ./components/upload/style/rtl.ts
  100356. // =========================== Motion ===========================
  100357. const genRtlStyle = token => {
  100358. const {
  100359. componentCls
  100360. } = token;
  100361. return {
  100362. [`${componentCls}-rtl`]: {
  100363. direction: 'rtl'
  100364. }
  100365. };
  100366. };
  100367. /* harmony default export */ var rtl = (genRtlStyle);
  100368. ;// ./components/upload/style/index.ts
  100369. const genBaseStyle = token => {
  100370. const {
  100371. componentCls,
  100372. colorTextDisabled
  100373. } = token;
  100374. return {
  100375. [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0,style.resetComponent)(token)), {
  100376. [componentCls]: {
  100377. outline: 0,
  100378. "input[type='file']": {
  100379. cursor: 'pointer'
  100380. }
  100381. },
  100382. [`${componentCls}-select`]: {
  100383. display: 'inline-block'
  100384. },
  100385. [`${componentCls}-hidden`]: {
  100386. display: 'none'
  100387. },
  100388. [`${componentCls}-disabled`]: {
  100389. color: colorTextDisabled,
  100390. cursor: 'not-allowed'
  100391. }
  100392. })
  100393. };
  100394. };
  100395. const prepareComponentToken = token => ({
  100396. actionsColor: token.colorIcon
  100397. });
  100398. // ============================== Export ==============================
  100399. /* harmony default export */ var upload_style = ((0,genStyleUtils.genStyleHooks)('Upload', token => {
  100400. const {
  100401. fontSizeHeading3,
  100402. fontHeight,
  100403. lineWidth,
  100404. controlHeightLG,
  100405. calc
  100406. } = token;
  100407. const uploadToken = (0,es.mergeToken)(token, {
  100408. uploadThumbnailSize: calc(fontSizeHeading3).mul(2).equal(),
  100409. uploadProgressOffset: calc(calc(fontHeight).div(2)).add(lineWidth).equal(),
  100410. uploadPicCardSize: calc(controlHeightLG).mul(2.55).equal()
  100411. });
  100412. return [genBaseStyle(uploadToken), dragger(uploadToken), genPictureStyle(uploadToken), genPictureCardStyle(uploadToken), list(uploadToken), motion(uploadToken), rtl(uploadToken), (0,collapse["default"])(uploadToken)];
  100413. }, prepareComponentToken));
  100414. /***/ }),
  100415. /***/ "./components/version/index.tsx":
  100416. /*!**************************************************!*\
  100417. !*** ./components/version/index.tsx + 1 modules ***!
  100418. \**************************************************/
  100419. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  100420. "use strict";
  100421. // EXPORTS
  100422. __webpack_require__.d(__webpack_exports__, {
  100423. "default": function() { return /* binding */ components_version; }
  100424. });
  100425. ;// ./components/version/version.ts
  100426. /* harmony default export */ var version = ('5.27.4');
  100427. ;// ./components/version/index.tsx
  100428. // @ts-ignore
  100429. /* harmony default export */ var components_version = (version);
  100430. /***/ }),
  100431. /***/ "./index-style-only.js":
  100432. /*!*****************************!*\
  100433. !*** ./index-style-only.js ***!
  100434. \*****************************/
  100435. /***/ (function(module, exports, __webpack_require__) {
  100436. function pascalCase(name) {
  100437. return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, (m, n) => n.toUpperCase());
  100438. }
  100439. // Just import style for https://github.com/ant-design/ant-design/issues/3745
  100440. const req = __webpack_require__("./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$");
  100441. req.keys().forEach(mod => {
  100442. let v = req(mod);
  100443. if (v?.default) {
  100444. v = v.default;
  100445. }
  100446. const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/);
  100447. if (match?.[1]) {
  100448. if (match[1] === 'message' || match[1] === 'notification') {
  100449. // message & notification should not be capitalized
  100450. exports[match[1]] = v;
  100451. } else {
  100452. exports[pascalCase(match[1])] = v;
  100453. }
  100454. }
  100455. });
  100456. module.exports = exports;
  100457. /***/ }),
  100458. /***/ "./index.js":
  100459. /*!******************!*\
  100460. !*** ./index.js ***!
  100461. \******************/
  100462. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  100463. __webpack_require__(/*! ./index-style-only */ "./index-style-only.js");
  100464. module.exports = __webpack_require__(/*! ./components */ "./components/index.ts");
  100465. /***/ }),
  100466. /***/ "./node_modules/@ant-design/colors/es/index.js":
  100467. /*!*****************************************************************!*\
  100468. !*** ./node_modules/@ant-design/colors/es/index.js + 2 modules ***!
  100469. \*****************************************************************/
  100470. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  100471. "use strict";
  100472. // EXPORTS
  100473. __webpack_require__.d(__webpack_exports__, {
  100474. blue: function() { return /* reexport */ blue; },
  100475. generate: function() { return /* reexport */ generate; },
  100476. gold: function() { return /* reexport */ gold; },
  100477. presetPalettes: function() { return /* reexport */ presetPalettes; },
  100478. presetPrimaryColors: function() { return /* reexport */ presetPrimaryColors; }
  100479. });
  100480. // UNUSED EXPORTS: blueDark, cyan, cyanDark, geekblue, geekblueDark, goldDark, gray, green, greenDark, grey, greyDark, lime, limeDark, magenta, magentaDark, orange, orangeDark, presetDarkPalettes, purple, purpleDark, red, redDark, volcano, volcanoDark, yellow, yellowDark
  100481. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  100482. var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  100483. ;// ./node_modules/@ant-design/colors/es/generate.js
  100484. var hueStep = 2; // 色相阶梯
  100485. var saturationStep = 0.16; // 饱和度阶梯,浅色部分
  100486. var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
  100487. var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
  100488. var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
  100489. var lightColorCount = 5; // 浅色数量,主色上
  100490. var darkColorCount = 4; // 深色数量,主色下
  100491. // 暗色主题颜色映射关系表
  100492. var darkColorMap = [{
  100493. index: 7,
  100494. amount: 15
  100495. }, {
  100496. index: 6,
  100497. amount: 25
  100498. }, {
  100499. index: 5,
  100500. amount: 30
  100501. }, {
  100502. index: 5,
  100503. amount: 45
  100504. }, {
  100505. index: 5,
  100506. amount: 65
  100507. }, {
  100508. index: 5,
  100509. amount: 85
  100510. }, {
  100511. index: 4,
  100512. amount: 90
  100513. }, {
  100514. index: 3,
  100515. amount: 95
  100516. }, {
  100517. index: 2,
  100518. amount: 97
  100519. }, {
  100520. index: 1,
  100521. amount: 98
  100522. }];
  100523. function getHue(hsv, i, light) {
  100524. var hue;
  100525. // 根据色相不同,色相转向不同
  100526. if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
  100527. hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
  100528. } else {
  100529. hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
  100530. }
  100531. if (hue < 0) {
  100532. hue += 360;
  100533. } else if (hue >= 360) {
  100534. hue -= 360;
  100535. }
  100536. return hue;
  100537. }
  100538. function getSaturation(hsv, i, light) {
  100539. // grey color don't change saturation
  100540. if (hsv.h === 0 && hsv.s === 0) {
  100541. return hsv.s;
  100542. }
  100543. var saturation;
  100544. if (light) {
  100545. saturation = hsv.s - saturationStep * i;
  100546. } else if (i === darkColorCount) {
  100547. saturation = hsv.s + saturationStep;
  100548. } else {
  100549. saturation = hsv.s + saturationStep2 * i;
  100550. }
  100551. // 边界值修正
  100552. if (saturation > 1) {
  100553. saturation = 1;
  100554. }
  100555. // 第一格的 s 限制在 0.06-0.1 之间
  100556. if (light && i === lightColorCount && saturation > 0.1) {
  100557. saturation = 0.1;
  100558. }
  100559. if (saturation < 0.06) {
  100560. saturation = 0.06;
  100561. }
  100562. return Math.round(saturation * 100) / 100;
  100563. }
  100564. function getValue(hsv, i, light) {
  100565. var value;
  100566. if (light) {
  100567. value = hsv.v + brightnessStep1 * i;
  100568. } else {
  100569. value = hsv.v - brightnessStep2 * i;
  100570. }
  100571. // Clamp value between 0 and 1
  100572. value = Math.max(0, Math.min(1, value));
  100573. return Math.round(value * 100) / 100;
  100574. }
  100575. function generate(color) {
  100576. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  100577. var patterns = [];
  100578. var pColor = new es.FastColor(color);
  100579. var hsv = pColor.toHsv();
  100580. for (var i = lightColorCount; i > 0; i -= 1) {
  100581. var c = new es.FastColor({
  100582. h: getHue(hsv, i, true),
  100583. s: getSaturation(hsv, i, true),
  100584. v: getValue(hsv, i, true)
  100585. });
  100586. patterns.push(c);
  100587. }
  100588. patterns.push(pColor);
  100589. for (var _i = 1; _i <= darkColorCount; _i += 1) {
  100590. var _c = new es.FastColor({
  100591. h: getHue(hsv, _i),
  100592. s: getSaturation(hsv, _i),
  100593. v: getValue(hsv, _i)
  100594. });
  100595. patterns.push(_c);
  100596. }
  100597. // dark theme patterns
  100598. if (opts.theme === 'dark') {
  100599. return darkColorMap.map(function (_ref) {
  100600. var index = _ref.index,
  100601. amount = _ref.amount;
  100602. return new es.FastColor(opts.backgroundColor || '#141414').mix(patterns[index], amount).toHexString();
  100603. });
  100604. }
  100605. return patterns.map(function (c) {
  100606. return c.toHexString();
  100607. });
  100608. }
  100609. ;// ./node_modules/@ant-design/colors/es/presets.js
  100610. // Generated by script. Do NOT modify!
  100611. var presetPrimaryColors = {
  100612. "red": "#F5222D",
  100613. "volcano": "#FA541C",
  100614. "orange": "#FA8C16",
  100615. "gold": "#FAAD14",
  100616. "yellow": "#FADB14",
  100617. "lime": "#A0D911",
  100618. "green": "#52C41A",
  100619. "cyan": "#13C2C2",
  100620. "blue": "#1677FF",
  100621. "geekblue": "#2F54EB",
  100622. "purple": "#722ED1",
  100623. "magenta": "#EB2F96",
  100624. "grey": "#666666"
  100625. };
  100626. var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
  100627. red.primary = red[5];
  100628. var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
  100629. volcano.primary = volcano[5];
  100630. var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
  100631. orange.primary = orange[5];
  100632. var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
  100633. gold.primary = gold[5];
  100634. var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
  100635. yellow.primary = yellow[5];
  100636. var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
  100637. lime.primary = lime[5];
  100638. var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
  100639. green.primary = green[5];
  100640. var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
  100641. cyan.primary = cyan[5];
  100642. var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
  100643. blue.primary = blue[5];
  100644. var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
  100645. geekblue.primary = geekblue[5];
  100646. var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
  100647. purple.primary = purple[5];
  100648. var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
  100649. magenta.primary = magenta[5];
  100650. var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
  100651. grey.primary = grey[5];
  100652. var gray = grey;
  100653. var presetPalettes = {
  100654. red: red,
  100655. volcano: volcano,
  100656. orange: orange,
  100657. gold: gold,
  100658. yellow: yellow,
  100659. lime: lime,
  100660. green: green,
  100661. cyan: cyan,
  100662. blue: blue,
  100663. geekblue: geekblue,
  100664. purple: purple,
  100665. magenta: magenta,
  100666. grey: grey
  100667. };
  100668. var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
  100669. redDark.primary = redDark[5];
  100670. var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
  100671. volcanoDark.primary = volcanoDark[5];
  100672. var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
  100673. orangeDark.primary = orangeDark[5];
  100674. var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
  100675. goldDark.primary = goldDark[5];
  100676. var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
  100677. yellowDark.primary = yellowDark[5];
  100678. var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
  100679. limeDark.primary = limeDark[5];
  100680. var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
  100681. greenDark.primary = greenDark[5];
  100682. var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
  100683. cyanDark.primary = cyanDark[5];
  100684. var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
  100685. blueDark.primary = blueDark[5];
  100686. var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
  100687. geekblueDark.primary = geekblueDark[5];
  100688. var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
  100689. purpleDark.primary = purpleDark[5];
  100690. var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
  100691. magentaDark.primary = magentaDark[5];
  100692. var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
  100693. greyDark.primary = greyDark[5];
  100694. var presetDarkPalettes = {
  100695. red: redDark,
  100696. volcano: volcanoDark,
  100697. orange: orangeDark,
  100698. gold: goldDark,
  100699. yellow: yellowDark,
  100700. lime: limeDark,
  100701. green: greenDark,
  100702. cyan: cyanDark,
  100703. blue: blueDark,
  100704. geekblue: geekblueDark,
  100705. purple: purpleDark,
  100706. magenta: magentaDark,
  100707. grey: greyDark
  100708. };
  100709. ;// ./node_modules/@ant-design/colors/es/index.js
  100710. /***/ }),
  100711. /***/ "./node_modules/@ant-design/cssinjs-utils/es/index.js":
  100712. /*!*************************************************************************!*\
  100713. !*** ./node_modules/@ant-design/cssinjs-utils/es/index.js + 12 modules ***!
  100714. \*************************************************************************/
  100715. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  100716. "use strict";
  100717. // EXPORTS
  100718. __webpack_require__.d(__webpack_exports__, {
  100719. genStyleUtils: function() { return /* reexport */ util_genStyleUtils; },
  100720. mergeToken: function() { return /* reexport */ merge; }
  100721. });
  100722. // UNUSED EXPORTS: genCalc, statistic, statisticToken
  100723. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  100724. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  100725. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  100726. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  100727. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  100728. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  100729. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  100730. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  100731. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  100732. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  100733. var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
  100734. // EXTERNAL MODULE: ./alias/cssinjs.js
  100735. var cssinjs = __webpack_require__("./alias/cssinjs.js");
  100736. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  100737. var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  100738. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
  100739. var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
  100740. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
  100741. var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  100742. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
  100743. var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
  100744. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
  100745. var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
  100746. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/calculator.js
  100747. var AbstractCalculator = /*#__PURE__*/(0,createClass["default"])(function AbstractCalculator() {
  100748. (0,classCallCheck["default"])(this, AbstractCalculator);
  100749. });
  100750. /* harmony default export */ var calculator = (AbstractCalculator);
  100751. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/CSSCalculator.js
  100752. var CALC_UNIT = 'CALC_UNIT';
  100753. var regexp = new RegExp(CALC_UNIT, 'g');
  100754. function unit(value) {
  100755. if (typeof value === 'number') {
  100756. return "".concat(value).concat(CALC_UNIT);
  100757. }
  100758. return value;
  100759. }
  100760. var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) {
  100761. (0,inherits["default"])(CSSCalculator, _AbstractCalculator);
  100762. var _super = (0,createSuper["default"])(CSSCalculator);
  100763. function CSSCalculator(num, unitlessCssVar) {
  100764. var _this;
  100765. (0,classCallCheck["default"])(this, CSSCalculator);
  100766. _this = _super.call(this);
  100767. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", '');
  100768. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "unitlessCssVar", void 0);
  100769. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "lowPriority", void 0);
  100770. var numType = (0,esm_typeof["default"])(num);
  100771. _this.unitlessCssVar = unitlessCssVar;
  100772. if (num instanceof CSSCalculator) {
  100773. _this.result = "(".concat(num.result, ")");
  100774. } else if (numType === 'number') {
  100775. _this.result = unit(num);
  100776. } else if (numType === 'string') {
  100777. _this.result = num;
  100778. }
  100779. return _this;
  100780. }
  100781. (0,createClass["default"])(CSSCalculator, [{
  100782. key: "add",
  100783. value: function add(num) {
  100784. if (num instanceof CSSCalculator) {
  100785. this.result = "".concat(this.result, " + ").concat(num.getResult());
  100786. } else if (typeof num === 'number' || typeof num === 'string') {
  100787. this.result = "".concat(this.result, " + ").concat(unit(num));
  100788. }
  100789. this.lowPriority = true;
  100790. return this;
  100791. }
  100792. }, {
  100793. key: "sub",
  100794. value: function sub(num) {
  100795. if (num instanceof CSSCalculator) {
  100796. this.result = "".concat(this.result, " - ").concat(num.getResult());
  100797. } else if (typeof num === 'number' || typeof num === 'string') {
  100798. this.result = "".concat(this.result, " - ").concat(unit(num));
  100799. }
  100800. this.lowPriority = true;
  100801. return this;
  100802. }
  100803. }, {
  100804. key: "mul",
  100805. value: function mul(num) {
  100806. if (this.lowPriority) {
  100807. this.result = "(".concat(this.result, ")");
  100808. }
  100809. if (num instanceof CSSCalculator) {
  100810. this.result = "".concat(this.result, " * ").concat(num.getResult(true));
  100811. } else if (typeof num === 'number' || typeof num === 'string') {
  100812. this.result = "".concat(this.result, " * ").concat(num);
  100813. }
  100814. this.lowPriority = false;
  100815. return this;
  100816. }
  100817. }, {
  100818. key: "div",
  100819. value: function div(num) {
  100820. if (this.lowPriority) {
  100821. this.result = "(".concat(this.result, ")");
  100822. }
  100823. if (num instanceof CSSCalculator) {
  100824. this.result = "".concat(this.result, " / ").concat(num.getResult(true));
  100825. } else if (typeof num === 'number' || typeof num === 'string') {
  100826. this.result = "".concat(this.result, " / ").concat(num);
  100827. }
  100828. this.lowPriority = false;
  100829. return this;
  100830. }
  100831. }, {
  100832. key: "getResult",
  100833. value: function getResult(force) {
  100834. return this.lowPriority || force ? "(".concat(this.result, ")") : this.result;
  100835. }
  100836. }, {
  100837. key: "equal",
  100838. value: function equal(options) {
  100839. var _this2 = this;
  100840. var _ref = options || {},
  100841. cssUnit = _ref.unit;
  100842. var mergedUnit = true;
  100843. if (typeof cssUnit === 'boolean') {
  100844. mergedUnit = cssUnit;
  100845. } else if (Array.from(this.unitlessCssVar).some(function (cssVar) {
  100846. return _this2.result.includes(cssVar);
  100847. })) {
  100848. mergedUnit = false;
  100849. }
  100850. this.result = this.result.replace(regexp, mergedUnit ? 'px' : '');
  100851. if (typeof this.lowPriority !== 'undefined') {
  100852. return "calc(".concat(this.result, ")");
  100853. }
  100854. return this.result;
  100855. }
  100856. }]);
  100857. return CSSCalculator;
  100858. }(calculator);
  100859. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/NumCalculator.js
  100860. var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) {
  100861. (0,inherits["default"])(NumCalculator, _AbstractCalculator);
  100862. var _super = (0,createSuper["default"])(NumCalculator);
  100863. function NumCalculator(num) {
  100864. var _this;
  100865. (0,classCallCheck["default"])(this, NumCalculator);
  100866. _this = _super.call(this);
  100867. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", 0);
  100868. if (num instanceof NumCalculator) {
  100869. _this.result = num.result;
  100870. } else if (typeof num === 'number') {
  100871. _this.result = num;
  100872. }
  100873. return _this;
  100874. }
  100875. (0,createClass["default"])(NumCalculator, [{
  100876. key: "add",
  100877. value: function add(num) {
  100878. if (num instanceof NumCalculator) {
  100879. this.result += num.result;
  100880. } else if (typeof num === 'number') {
  100881. this.result += num;
  100882. }
  100883. return this;
  100884. }
  100885. }, {
  100886. key: "sub",
  100887. value: function sub(num) {
  100888. if (num instanceof NumCalculator) {
  100889. this.result -= num.result;
  100890. } else if (typeof num === 'number') {
  100891. this.result -= num;
  100892. }
  100893. return this;
  100894. }
  100895. }, {
  100896. key: "mul",
  100897. value: function mul(num) {
  100898. if (num instanceof NumCalculator) {
  100899. this.result *= num.result;
  100900. } else if (typeof num === 'number') {
  100901. this.result *= num;
  100902. }
  100903. return this;
  100904. }
  100905. }, {
  100906. key: "div",
  100907. value: function div(num) {
  100908. if (num instanceof NumCalculator) {
  100909. this.result /= num.result;
  100910. } else if (typeof num === 'number') {
  100911. this.result /= num;
  100912. }
  100913. return this;
  100914. }
  100915. }, {
  100916. key: "equal",
  100917. value: function equal() {
  100918. return this.result;
  100919. }
  100920. }]);
  100921. return NumCalculator;
  100922. }(calculator);
  100923. /* harmony default export */ var calc_NumCalculator = (NumCalculator);
  100924. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/calc/index.js
  100925. var genCalc = function genCalc(type, unitlessCssVar) {
  100926. var Calculator = type === 'css' ? CSSCalculator : calc_NumCalculator;
  100927. return function (num) {
  100928. return new Calculator(num, unitlessCssVar);
  100929. };
  100930. };
  100931. /* harmony default export */ var util_calc = (genCalc);
  100932. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/getCompVarPrefix.js
  100933. var getCompVarPrefix = function getCompVarPrefix(component, prefix) {
  100934. return "".concat([prefix, component.replace(/([A-Z]+)([A-Z][a-z]+)/g, '$1-$2').replace(/([a-z])([A-Z])/g, '$1-$2')].filter(Boolean).join('-'));
  100935. };
  100936. /* harmony default export */ var util_getCompVarPrefix = (getCompVarPrefix);
  100937. // EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
  100938. var es = __webpack_require__("./node_modules/rc-util/es/index.js");
  100939. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js
  100940. function getComponentToken(component, token, defaultToken, options) {
  100941. var customToken = (0,objectSpread2["default"])({}, token[component]);
  100942. if (options !== null && options !== void 0 && options.deprecatedTokens) {
  100943. var deprecatedTokens = options.deprecatedTokens;
  100944. deprecatedTokens.forEach(function (_ref) {
  100945. var _ref2 = (0,slicedToArray["default"])(_ref, 2),
  100946. oldTokenKey = _ref2[0],
  100947. newTokenKey = _ref2[1];
  100948. if (true) {
  100949. (0,es.warning)(!(customToken !== null && customToken !== void 0 && customToken[oldTokenKey]), "Component Token `".concat(String(oldTokenKey), "` of ").concat(String(component), " is deprecated. Please use `").concat(String(newTokenKey), "` instead."));
  100950. }
  100951. // Should wrap with `if` clause, or there will be `undefined` in object.
  100952. if (customToken !== null && customToken !== void 0 && customToken[oldTokenKey] || customToken !== null && customToken !== void 0 && customToken[newTokenKey]) {
  100953. var _customToken$newToken;
  100954. (_customToken$newToken = customToken[newTokenKey]) !== null && _customToken$newToken !== void 0 ? _customToken$newToken : customToken[newTokenKey] = customToken === null || customToken === void 0 ? void 0 : customToken[oldTokenKey];
  100955. }
  100956. });
  100957. }
  100958. var mergedToken = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, defaultToken), customToken);
  100959. // Remove same value as global token to minimize size
  100960. Object.keys(mergedToken).forEach(function (key) {
  100961. if (mergedToken[key] === token[key]) {
  100962. delete mergedToken[key];
  100963. }
  100964. });
  100965. return mergedToken;
  100966. }
  100967. /* harmony default export */ var util_getComponentToken = (getComponentToken);
  100968. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/statistic.js
  100969. var enableStatistic = true || 0;
  100970. var recording = true;
  100971. /**
  100972. * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to
  100973. * pass all value access in development. To support statistic field usage with alias token.
  100974. */
  100975. function merge() {
  100976. for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {
  100977. objs[_key] = arguments[_key];
  100978. }
  100979. /* istanbul ignore next */
  100980. if (!enableStatistic) {
  100981. return Object.assign.apply(Object, [{}].concat(objs));
  100982. }
  100983. recording = false;
  100984. var ret = {};
  100985. objs.forEach(function (obj) {
  100986. if ((0,esm_typeof["default"])(obj) !== 'object') {
  100987. return;
  100988. }
  100989. var keys = Object.keys(obj);
  100990. keys.forEach(function (key) {
  100991. Object.defineProperty(ret, key, {
  100992. configurable: true,
  100993. enumerable: true,
  100994. get: function get() {
  100995. return obj[key];
  100996. }
  100997. });
  100998. });
  100999. });
  101000. recording = true;
  101001. return ret;
  101002. }
  101003. /** @internal Internal Usage. Not use in your production. */
  101004. var statistic = {};
  101005. /** @internal Internal Usage. Not use in your production. */
  101006. var _statistic_build_ = {};
  101007. /* istanbul ignore next */
  101008. function noop() {}
  101009. /** Statistic token usage case. Should use `merge` function if you do not want spread record. */
  101010. var statisticToken = function statisticToken(token) {
  101011. var tokenKeys;
  101012. var proxy = token;
  101013. var flush = noop;
  101014. if (enableStatistic && typeof Proxy !== 'undefined') {
  101015. tokenKeys = new Set();
  101016. proxy = new Proxy(token, {
  101017. get: function get(obj, prop) {
  101018. if (recording) {
  101019. var _tokenKeys;
  101020. (_tokenKeys = tokenKeys) === null || _tokenKeys === void 0 || _tokenKeys.add(prop);
  101021. }
  101022. return obj[prop];
  101023. }
  101024. });
  101025. flush = function flush(componentName, componentToken) {
  101026. var _statistic$componentN;
  101027. statistic[componentName] = {
  101028. global: Array.from(tokenKeys),
  101029. component: (0,objectSpread2["default"])((0,objectSpread2["default"])({}, (_statistic$componentN = statistic[componentName]) === null || _statistic$componentN === void 0 ? void 0 : _statistic$componentN.component), componentToken)
  101030. };
  101031. };
  101032. }
  101033. return {
  101034. token: proxy,
  101035. keys: tokenKeys,
  101036. flush: flush
  101037. };
  101038. };
  101039. /* harmony default export */ var util_statistic = (statisticToken);
  101040. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/getDefaultComponentToken.js
  101041. function getDefaultComponentToken(component, token, getDefaultToken) {
  101042. if (typeof getDefaultToken === 'function') {
  101043. var _token$component;
  101044. return getDefaultToken(merge(token, (_token$component = token[component]) !== null && _token$component !== void 0 ? _token$component : {}));
  101045. }
  101046. return getDefaultToken !== null && getDefaultToken !== void 0 ? getDefaultToken : {};
  101047. }
  101048. /* harmony default export */ var util_getDefaultComponentToken = (getDefaultComponentToken);
  101049. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/maxmin.js
  101050. function genMaxMin(type) {
  101051. if (type === 'js') {
  101052. return {
  101053. max: Math.max,
  101054. min: Math.min
  101055. };
  101056. }
  101057. return {
  101058. max: function max() {
  101059. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  101060. args[_key] = arguments[_key];
  101061. }
  101062. return "max(".concat(args.map(function (value) {
  101063. return (0,cssinjs.unit)(value);
  101064. }).join(','), ")");
  101065. },
  101066. min: function min() {
  101067. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  101068. args[_key2] = arguments[_key2];
  101069. }
  101070. return "min(".concat(args.map(function (value) {
  101071. return (0,cssinjs.unit)(value);
  101072. }).join(','), ")");
  101073. }
  101074. };
  101075. }
  101076. /* harmony default export */ var maxmin = (genMaxMin);
  101077. ;// ./node_modules/@ant-design/cssinjs-utils/es/_util/hooks/useUniqueMemo.js
  101078. var BEAT_LIMIT = 1000 * 60 * 10;
  101079. /**
  101080. * A helper class to map keys to values.
  101081. * It supports both primitive keys and object keys.
  101082. */
  101083. var ArrayKeyMap = /*#__PURE__*/function () {
  101084. function ArrayKeyMap() {
  101085. (0,classCallCheck["default"])(this, ArrayKeyMap);
  101086. (0,defineProperty["default"])(this, "map", new Map());
  101087. // Use WeakMap to avoid memory leak
  101088. (0,defineProperty["default"])(this, "objectIDMap", new WeakMap());
  101089. (0,defineProperty["default"])(this, "nextID", 0);
  101090. (0,defineProperty["default"])(this, "lastAccessBeat", new Map());
  101091. // We will clean up the cache when reach the limit
  101092. (0,defineProperty["default"])(this, "accessBeat", 0);
  101093. }
  101094. (0,createClass["default"])(ArrayKeyMap, [{
  101095. key: "set",
  101096. value: function set(keys, value) {
  101097. // New set will trigger clear
  101098. this.clear();
  101099. // Set logic
  101100. var compositeKey = this.getCompositeKey(keys);
  101101. this.map.set(compositeKey, value);
  101102. this.lastAccessBeat.set(compositeKey, Date.now());
  101103. }
  101104. }, {
  101105. key: "get",
  101106. value: function get(keys) {
  101107. var compositeKey = this.getCompositeKey(keys);
  101108. var cache = this.map.get(compositeKey);
  101109. this.lastAccessBeat.set(compositeKey, Date.now());
  101110. this.accessBeat += 1;
  101111. return cache;
  101112. }
  101113. }, {
  101114. key: "getCompositeKey",
  101115. value: function getCompositeKey(keys) {
  101116. var _this = this;
  101117. var ids = keys.map(function (key) {
  101118. if (key && (0,esm_typeof["default"])(key) === 'object') {
  101119. return "obj_".concat(_this.getObjectID(key));
  101120. }
  101121. return "".concat((0,esm_typeof["default"])(key), "_").concat(key);
  101122. });
  101123. return ids.join('|');
  101124. }
  101125. }, {
  101126. key: "getObjectID",
  101127. value: function getObjectID(obj) {
  101128. if (this.objectIDMap.has(obj)) {
  101129. return this.objectIDMap.get(obj);
  101130. }
  101131. var id = this.nextID;
  101132. this.objectIDMap.set(obj, id);
  101133. this.nextID += 1;
  101134. return id;
  101135. }
  101136. }, {
  101137. key: "clear",
  101138. value: function clear() {
  101139. var _this2 = this;
  101140. if (this.accessBeat > 10000) {
  101141. var now = Date.now();
  101142. this.lastAccessBeat.forEach(function (beat, key) {
  101143. if (now - beat > BEAT_LIMIT) {
  101144. _this2.map.delete(key);
  101145. _this2.lastAccessBeat.delete(key);
  101146. }
  101147. });
  101148. this.accessBeat = 0;
  101149. }
  101150. }
  101151. }]);
  101152. return ArrayKeyMap;
  101153. }();
  101154. var uniqueMap = new ArrayKeyMap();
  101155. /**
  101156. * Like `useMemo`, but this hook result will be shared across all instances.
  101157. */
  101158. function useUniqueMemo(memoFn, deps) {
  101159. return external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  101160. var cachedValue = uniqueMap.get(deps);
  101161. if (cachedValue) {
  101162. return cachedValue;
  101163. }
  101164. var newValue = memoFn();
  101165. uniqueMap.set(deps, newValue);
  101166. return newValue;
  101167. }, deps);
  101168. }
  101169. /* harmony default export */ var hooks_useUniqueMemo = (useUniqueMemo);
  101170. ;// ./node_modules/@ant-design/cssinjs-utils/es/hooks/useCSP.js
  101171. /**
  101172. * Provide a default hook since not everyone needs to config this.
  101173. */
  101174. var useDefaultCSP = function useDefaultCSP() {
  101175. return {};
  101176. };
  101177. /* harmony default export */ var hooks_useCSP = (useDefaultCSP);
  101178. ;// ./node_modules/@ant-design/cssinjs-utils/es/util/genStyleUtils.js
  101179. function genStyleUtils(config) {
  101180. // Dependency inversion for preparing basic config.
  101181. var _config$useCSP = config.useCSP,
  101182. useCSP = _config$useCSP === void 0 ? hooks_useCSP : _config$useCSP,
  101183. useToken = config.useToken,
  101184. usePrefix = config.usePrefix,
  101185. getResetStyles = config.getResetStyles,
  101186. getCommonStyle = config.getCommonStyle,
  101187. getCompUnitless = config.getCompUnitless;
  101188. function genStyleHooks(component, styleFn, getDefaultToken, options) {
  101189. var componentName = Array.isArray(component) ? component[0] : component;
  101190. function prefixToken(key) {
  101191. return "".concat(String(componentName)).concat(key.slice(0, 1).toUpperCase()).concat(key.slice(1));
  101192. }
  101193. // Fill unitless
  101194. var originUnitless = (options === null || options === void 0 ? void 0 : options.unitless) || {};
  101195. var originCompUnitless = typeof getCompUnitless === 'function' ? getCompUnitless(component) : {};
  101196. var compUnitless = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, originCompUnitless), {}, (0,defineProperty["default"])({}, prefixToken('zIndexPopup'), true));
  101197. Object.keys(originUnitless).forEach(function (key) {
  101198. compUnitless[prefixToken(key)] = originUnitless[key];
  101199. });
  101200. // Options
  101201. var mergedOptions = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, options), {}, {
  101202. unitless: compUnitless,
  101203. prefixToken: prefixToken
  101204. });
  101205. // Hooks
  101206. var useStyle = genComponentStyleHook(component, styleFn, getDefaultToken, mergedOptions);
  101207. var useCSSVar = genCSSVarRegister(componentName, getDefaultToken, mergedOptions);
  101208. return function (prefixCls) {
  101209. var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
  101210. var _useStyle = useStyle(prefixCls, rootCls),
  101211. _useStyle2 = (0,slicedToArray["default"])(_useStyle, 2),
  101212. hashId = _useStyle2[1];
  101213. var _useCSSVar = useCSSVar(rootCls),
  101214. _useCSSVar2 = (0,slicedToArray["default"])(_useCSSVar, 2),
  101215. wrapCSSVar = _useCSSVar2[0],
  101216. cssVarCls = _useCSSVar2[1];
  101217. return [wrapCSSVar, hashId, cssVarCls];
  101218. };
  101219. }
  101220. function genCSSVarRegister(component, getDefaultToken, options) {
  101221. var compUnitless = options.unitless,
  101222. _options$injectStyle = options.injectStyle,
  101223. injectStyle = _options$injectStyle === void 0 ? true : _options$injectStyle,
  101224. prefixToken = options.prefixToken,
  101225. ignore = options.ignore;
  101226. var CSSVarRegister = function CSSVarRegister(_ref) {
  101227. var rootCls = _ref.rootCls,
  101228. _ref$cssVar = _ref.cssVar,
  101229. cssVar = _ref$cssVar === void 0 ? {} : _ref$cssVar;
  101230. var _useToken = useToken(),
  101231. realToken = _useToken.realToken;
  101232. (0,cssinjs.useCSSVarRegister)({
  101233. path: [component],
  101234. prefix: cssVar.prefix,
  101235. key: cssVar.key,
  101236. unitless: compUnitless,
  101237. ignore: ignore,
  101238. token: realToken,
  101239. scope: rootCls
  101240. }, function () {
  101241. var defaultToken = util_getDefaultComponentToken(component, realToken, getDefaultToken);
  101242. var componentToken = util_getComponentToken(component, realToken, defaultToken, {
  101243. deprecatedTokens: options === null || options === void 0 ? void 0 : options.deprecatedTokens
  101244. });
  101245. Object.keys(defaultToken).forEach(function (key) {
  101246. componentToken[prefixToken(key)] = componentToken[key];
  101247. delete componentToken[key];
  101248. });
  101249. return componentToken;
  101250. });
  101251. return null;
  101252. };
  101253. var useCSSVar = function useCSSVar(rootCls) {
  101254. var _useToken2 = useToken(),
  101255. cssVar = _useToken2.cssVar;
  101256. return [function (node) {
  101257. return injectStyle && cssVar ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CSSVarRegister, {
  101258. rootCls: rootCls,
  101259. cssVar: cssVar,
  101260. component: component
  101261. }), node) : node;
  101262. }, cssVar === null || cssVar === void 0 ? void 0 : cssVar.key];
  101263. };
  101264. return useCSSVar;
  101265. }
  101266. function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
  101267. var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  101268. var cells = Array.isArray(componentName) ? componentName : [componentName, componentName];
  101269. var _cells = (0,slicedToArray["default"])(cells, 1),
  101270. component = _cells[0];
  101271. var concatComponent = cells.join('-');
  101272. var mergedLayer = config.layer || {
  101273. name: 'antd'
  101274. };
  101275. // Return new style hook
  101276. return function (prefixCls) {
  101277. var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
  101278. var _useToken3 = useToken(),
  101279. theme = _useToken3.theme,
  101280. realToken = _useToken3.realToken,
  101281. hashId = _useToken3.hashId,
  101282. token = _useToken3.token,
  101283. cssVar = _useToken3.cssVar;
  101284. var _usePrefix = usePrefix(),
  101285. rootPrefixCls = _usePrefix.rootPrefixCls,
  101286. iconPrefixCls = _usePrefix.iconPrefixCls;
  101287. var csp = useCSP();
  101288. var type = cssVar ? 'css' : 'js';
  101289. // Use unique memo to share the result across all instances
  101290. var calc = hooks_useUniqueMemo(function () {
  101291. var unitlessCssVar = new Set();
  101292. if (cssVar) {
  101293. Object.keys(options.unitless || {}).forEach(function (key) {
  101294. // Some component proxy the AliasToken (e.g. Image) and some not (e.g. Modal)
  101295. // We should both pass in `unitlessCssVar` to make sure the CSSVar can be unitless.
  101296. unitlessCssVar.add((0,cssinjs.token2CSSVar)(key, cssVar.prefix));
  101297. unitlessCssVar.add((0,cssinjs.token2CSSVar)(key, util_getCompVarPrefix(component, cssVar.prefix)));
  101298. });
  101299. }
  101300. return util_calc(type, unitlessCssVar);
  101301. }, [type, component, cssVar === null || cssVar === void 0 ? void 0 : cssVar.prefix]);
  101302. var _genMaxMin = maxmin(type),
  101303. max = _genMaxMin.max,
  101304. min = _genMaxMin.min;
  101305. // Shared config
  101306. var sharedConfig = {
  101307. theme: theme,
  101308. token: token,
  101309. hashId: hashId,
  101310. nonce: function nonce() {
  101311. return csp.nonce;
  101312. },
  101313. clientOnly: options.clientOnly,
  101314. layer: mergedLayer,
  101315. // antd is always at top of styles
  101316. order: options.order || -999
  101317. };
  101318. // This if statement is safe, as it will only be used if the generator has the function. It's not dynamic.
  101319. if (typeof getResetStyles === 'function') {
  101320. // Generate style for all need reset tags.
  101321. (0,cssinjs.useStyleRegister)((0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedConfig), {}, {
  101322. clientOnly: false,
  101323. path: ['Shared', rootPrefixCls]
  101324. }), function () {
  101325. return getResetStyles(token, {
  101326. prefix: {
  101327. rootPrefixCls: rootPrefixCls,
  101328. iconPrefixCls: iconPrefixCls
  101329. },
  101330. csp: csp
  101331. });
  101332. });
  101333. }
  101334. var wrapSSR = (0,cssinjs.useStyleRegister)((0,objectSpread2["default"])((0,objectSpread2["default"])({}, sharedConfig), {}, {
  101335. path: [concatComponent, prefixCls, iconPrefixCls]
  101336. }), function () {
  101337. if (options.injectStyle === false) {
  101338. return [];
  101339. }
  101340. var _statisticToken = util_statistic(token),
  101341. proxyToken = _statisticToken.token,
  101342. flush = _statisticToken.flush;
  101343. var defaultComponentToken = util_getDefaultComponentToken(component, realToken, getDefaultToken);
  101344. var componentCls = ".".concat(prefixCls);
  101345. var componentToken = util_getComponentToken(component, realToken, defaultComponentToken, {
  101346. deprecatedTokens: options.deprecatedTokens
  101347. });
  101348. if (cssVar && defaultComponentToken && (0,esm_typeof["default"])(defaultComponentToken) === 'object') {
  101349. Object.keys(defaultComponentToken).forEach(function (key) {
  101350. defaultComponentToken[key] = "var(".concat((0,cssinjs.token2CSSVar)(key, util_getCompVarPrefix(component, cssVar.prefix)), ")");
  101351. });
  101352. }
  101353. var mergedToken = merge(proxyToken, {
  101354. componentCls: componentCls,
  101355. prefixCls: prefixCls,
  101356. iconCls: ".".concat(iconPrefixCls),
  101357. antCls: ".".concat(rootPrefixCls),
  101358. calc: calc,
  101359. // @ts-ignore
  101360. max: max,
  101361. // @ts-ignore
  101362. min: min
  101363. }, cssVar ? defaultComponentToken : componentToken);
  101364. var styleInterpolation = styleFn(mergedToken, {
  101365. hashId: hashId,
  101366. prefixCls: prefixCls,
  101367. rootPrefixCls: rootPrefixCls,
  101368. iconPrefixCls: iconPrefixCls
  101369. });
  101370. flush(component, componentToken);
  101371. var commonStyle = typeof getCommonStyle === 'function' ? getCommonStyle(mergedToken, prefixCls, rootCls, options.resetFont) : null;
  101372. return [options.resetStyle === false ? null : commonStyle, styleInterpolation];
  101373. });
  101374. return [wrapSSR, hashId];
  101375. };
  101376. }
  101377. function genSubStyleComponent(componentName, styleFn, getDefaultToken) {
  101378. var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  101379. var useStyle = genComponentStyleHook(componentName, styleFn, getDefaultToken, (0,objectSpread2["default"])({
  101380. resetStyle: false,
  101381. // Sub Style should default after root one
  101382. order: -998
  101383. }, options));
  101384. var StyledComponent = function StyledComponent(_ref2) {
  101385. var prefixCls = _ref2.prefixCls,
  101386. _ref2$rootCls = _ref2.rootCls,
  101387. rootCls = _ref2$rootCls === void 0 ? prefixCls : _ref2$rootCls;
  101388. useStyle(prefixCls, rootCls);
  101389. return null;
  101390. };
  101391. if (true) {
  101392. StyledComponent.displayName = "SubStyle_".concat(String(Array.isArray(componentName) ? componentName.join('.') : componentName));
  101393. }
  101394. return StyledComponent;
  101395. }
  101396. return {
  101397. genStyleHooks: genStyleHooks,
  101398. genSubStyleComponent: genSubStyleComponent,
  101399. genComponentStyleHook: genComponentStyleHook
  101400. };
  101401. }
  101402. /* harmony default export */ var util_genStyleUtils = (genStyleUtils);
  101403. ;// ./node_modules/@ant-design/cssinjs-utils/es/index.js
  101404. /***/ }),
  101405. /***/ "./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js":
  101406. /*!*************************************************************!*\
  101407. !*** ./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js ***!
  101408. \*************************************************************/
  101409. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  101410. "use strict";
  101411. /* module decorator */ module = __webpack_require__.hmd(module);
  101412. function useProdHMR() {
  101413. return false;
  101414. }
  101415. var webpackHMR = false;
  101416. function useDevHMR() {
  101417. return webpackHMR;
  101418. }
  101419. /* harmony default export */ __webpack_exports__["default"] = ( false ? 0 : useDevHMR);
  101420. // Webpack `module.hot.accept` do not support any deps update trigger
  101421. // We have to hack handler to force mark as HRM
  101422. if ( true && module && module.hot && 0) // removed by dead control flow
  101423. { var originWebpackHotUpdate, win; }
  101424. /***/ }),
  101425. /***/ "./node_modules/@ant-design/cssinjs/es/index.js":
  101426. /*!*******************************************************************!*\
  101427. !*** ./node_modules/@ant-design/cssinjs/es/index.js + 38 modules ***!
  101428. \*******************************************************************/
  101429. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  101430. "use strict";
  101431. // ESM COMPAT FLAG
  101432. __webpack_require__.r(__webpack_exports__);
  101433. // EXPORTS
  101434. __webpack_require__.d(__webpack_exports__, {
  101435. Keyframes: function() { return /* reexport */ Keyframes; },
  101436. NaNLinter: function() { return /* reexport */ NaNLinter; },
  101437. StyleContext: function() { return /* reexport */ es_StyleContext; },
  101438. StyleProvider: function() { return /* reexport */ StyleProvider; },
  101439. Theme: function() { return /* reexport */ Theme; },
  101440. _experimental: function() { return /* binding */ _experimental; },
  101441. createCache: function() { return /* reexport */ createCache; },
  101442. createTheme: function() { return /* reexport */ createTheme; },
  101443. extractStyle: function() { return /* reexport */ extractStyle; },
  101444. genCalc: function() { return /* reexport */ calc; },
  101445. getComputedToken: function() { return /* reexport */ getComputedToken; },
  101446. legacyLogicalPropertiesTransformer: function() { return /* reexport */ legacyLogicalProperties; },
  101447. legacyNotSelectorLinter: function() { return /* reexport */ legacyNotSelectorLinter; },
  101448. logicalPropertiesLinter: function() { return /* reexport */ logicalPropertiesLinter; },
  101449. parentSelectorLinter: function() { return /* reexport */ parentSelectorLinter; },
  101450. px2remTransformer: function() { return /* reexport */ px2rem; },
  101451. token2CSSVar: function() { return /* reexport */ token2CSSVar; },
  101452. unit: function() { return /* reexport */ util_unit; },
  101453. useCSSVarRegister: function() { return /* reexport */ hooks_useCSSVarRegister; },
  101454. useCacheToken: function() { return /* reexport */ useCacheToken; },
  101455. useStyleRegister: function() { return /* reexport */ useStyleRegister; }
  101456. });
  101457. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  101458. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  101459. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  101460. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  101461. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
  101462. var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  101463. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  101464. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  101465. ;// ./node_modules/@emotion/hash/dist/hash.browser.esm.js
  101466. /* eslint-disable */
  101467. // Inspired by https://github.com/garycourt/murmurhash-js
  101468. // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
  101469. function murmur2(str) {
  101470. // 'm' and 'r' are mixing constants generated offline.
  101471. // They're not really 'magic', they just happen to work well.
  101472. // const m = 0x5bd1e995;
  101473. // const r = 24;
  101474. // Initialize the hash
  101475. var h = 0; // Mix 4 bytes at a time into the hash
  101476. var k,
  101477. i = 0,
  101478. len = str.length;
  101479. for (; len >= 4; ++i, len -= 4) {
  101480. k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
  101481. k =
  101482. /* Math.imul(k, m): */
  101483. (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
  101484. k ^=
  101485. /* k >>> r: */
  101486. k >>> 24;
  101487. h =
  101488. /* Math.imul(k, m): */
  101489. (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
  101490. /* Math.imul(h, m): */
  101491. (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
  101492. } // Handle the last few bytes of the input array
  101493. switch (len) {
  101494. case 3:
  101495. h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
  101496. case 2:
  101497. h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
  101498. case 1:
  101499. h ^= str.charCodeAt(i) & 0xff;
  101500. h =
  101501. /* Math.imul(h, m): */
  101502. (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
  101503. } // Do a few final mixes of the hash to ensure the last few
  101504. // bytes are well-incorporated.
  101505. h ^= h >>> 13;
  101506. h =
  101507. /* Math.imul(h, m): */
  101508. (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
  101509. return ((h ^ h >>> 15) >>> 0).toString(36);
  101510. }
  101511. /* harmony default export */ var hash_browser_esm = (murmur2);
  101512. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
  101513. var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
  101514. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  101515. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  101516. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
  101517. var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
  101518. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js
  101519. var useMemo = __webpack_require__("./node_modules/rc-util/es/hooks/useMemo.js");
  101520. // EXTERNAL MODULE: ./node_modules/rc-util/es/isEqual.js
  101521. var isEqual = __webpack_require__("./node_modules/rc-util/es/isEqual.js");
  101522. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  101523. var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  101524. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
  101525. var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
  101526. ;// ./node_modules/@ant-design/cssinjs/es/Cache.js
  101527. // [times, realValue]
  101528. var SPLIT = '%';
  101529. /** Connect key with `SPLIT` */
  101530. function pathKey(keys) {
  101531. return keys.join(SPLIT);
  101532. }
  101533. var Entity = /*#__PURE__*/function () {
  101534. function Entity(instanceId) {
  101535. (0,classCallCheck["default"])(this, Entity);
  101536. (0,defineProperty["default"])(this, "instanceId", void 0);
  101537. /** @private Internal cache map. Do not access this directly */
  101538. (0,defineProperty["default"])(this, "cache", new Map());
  101539. (0,defineProperty["default"])(this, "extracted", new Set());
  101540. this.instanceId = instanceId;
  101541. }
  101542. (0,createClass["default"])(Entity, [{
  101543. key: "get",
  101544. value: function get(keys) {
  101545. return this.opGet(pathKey(keys));
  101546. }
  101547. /** A fast get cache with `get` concat. */
  101548. }, {
  101549. key: "opGet",
  101550. value: function opGet(keyPathStr) {
  101551. return this.cache.get(keyPathStr) || null;
  101552. }
  101553. }, {
  101554. key: "update",
  101555. value: function update(keys, valueFn) {
  101556. return this.opUpdate(pathKey(keys), valueFn);
  101557. }
  101558. /** A fast get cache with `get` concat. */
  101559. }, {
  101560. key: "opUpdate",
  101561. value: function opUpdate(keyPathStr, valueFn) {
  101562. var prevValue = this.cache.get(keyPathStr);
  101563. var nextValue = valueFn(prevValue);
  101564. if (nextValue === null) {
  101565. this.cache.delete(keyPathStr);
  101566. } else {
  101567. this.cache.set(keyPathStr, nextValue);
  101568. }
  101569. }
  101570. }]);
  101571. return Entity;
  101572. }();
  101573. /* harmony default export */ var Cache = (Entity);
  101574. ;// ./node_modules/@ant-design/cssinjs/es/StyleContext.js
  101575. var _excluded = ["children"];
  101576. var ATTR_TOKEN = 'data-token-hash';
  101577. var ATTR_MARK = 'data-css-hash';
  101578. var ATTR_CACHE_PATH = 'data-cache-path';
  101579. // Mark css-in-js instance in style element
  101580. var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';
  101581. function createCache() {
  101582. var cssinjsInstanceId = Math.random().toString(12).slice(2);
  101583. // Tricky SSR: Move all inline style to the head.
  101584. // PS: We do not recommend tricky mode.
  101585. if (typeof document !== 'undefined' && document.head && document.body) {
  101586. var styles = document.body.querySelectorAll("style[".concat(ATTR_MARK, "]")) || [];
  101587. var firstChild = document.head.firstChild;
  101588. Array.from(styles).forEach(function (style) {
  101589. style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;
  101590. // Not force move if no head
  101591. if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
  101592. document.head.insertBefore(style, firstChild);
  101593. }
  101594. });
  101595. // Deduplicate of moved styles
  101596. var styleHash = {};
  101597. Array.from(document.querySelectorAll("style[".concat(ATTR_MARK, "]"))).forEach(function (style) {
  101598. var hash = style.getAttribute(ATTR_MARK);
  101599. if (styleHash[hash]) {
  101600. if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
  101601. var _style$parentNode;
  101602. (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);
  101603. }
  101604. } else {
  101605. styleHash[hash] = true;
  101606. }
  101607. });
  101608. }
  101609. return new Cache(cssinjsInstanceId);
  101610. }
  101611. var StyleContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
  101612. hashPriority: 'low',
  101613. cache: createCache(),
  101614. defaultCache: true
  101615. });
  101616. var StyleProvider = function StyleProvider(props) {
  101617. var children = props.children,
  101618. restProps = (0,objectWithoutProperties["default"])(props, _excluded);
  101619. var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(StyleContext);
  101620. var context = (0,useMemo["default"])(function () {
  101621. var mergedContext = (0,objectSpread2["default"])({}, parentContext);
  101622. Object.keys(restProps).forEach(function (key) {
  101623. var value = restProps[key];
  101624. if (restProps[key] !== undefined) {
  101625. mergedContext[key] = value;
  101626. }
  101627. });
  101628. var cache = restProps.cache;
  101629. mergedContext.cache = mergedContext.cache || createCache();
  101630. mergedContext.defaultCache = !cache && parentContext.defaultCache;
  101631. return mergedContext;
  101632. }, [parentContext, restProps], function (prev, next) {
  101633. return !(0,isEqual["default"])(prev[0], next[0], true) || !(0,isEqual["default"])(prev[1], next[1], true);
  101634. });
  101635. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StyleContext.Provider, {
  101636. value: context
  101637. }, children);
  101638. };
  101639. /* harmony default export */ var es_StyleContext = (StyleContext);
  101640. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  101641. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  101642. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
  101643. var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
  101644. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
  101645. var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  101646. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
  101647. var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
  101648. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
  101649. var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
  101650. ;// ./node_modules/@ant-design/cssinjs/es/theme/calc/calculator.js
  101651. var AbstractCalculator = /*#__PURE__*/(0,createClass["default"])(function AbstractCalculator() {
  101652. (0,classCallCheck["default"])(this, AbstractCalculator);
  101653. });
  101654. /* harmony default export */ var calculator = (AbstractCalculator);
  101655. ;// ./node_modules/@ant-design/cssinjs/es/theme/calc/CSSCalculator.js
  101656. var CALC_UNIT = 'CALC_UNIT';
  101657. var regexp = new RegExp(CALC_UNIT, 'g');
  101658. function unit(value) {
  101659. if (typeof value === 'number') {
  101660. return "".concat(value).concat(CALC_UNIT);
  101661. }
  101662. return value;
  101663. }
  101664. var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) {
  101665. (0,inherits["default"])(CSSCalculator, _AbstractCalculator);
  101666. var _super = (0,createSuper["default"])(CSSCalculator);
  101667. function CSSCalculator(num, unitlessCssVar) {
  101668. var _this;
  101669. (0,classCallCheck["default"])(this, CSSCalculator);
  101670. _this = _super.call(this);
  101671. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", '');
  101672. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "unitlessCssVar", void 0);
  101673. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "lowPriority", void 0);
  101674. var numType = (0,esm_typeof["default"])(num);
  101675. _this.unitlessCssVar = unitlessCssVar;
  101676. if (num instanceof CSSCalculator) {
  101677. _this.result = "(".concat(num.result, ")");
  101678. } else if (numType === 'number') {
  101679. _this.result = unit(num);
  101680. } else if (numType === 'string') {
  101681. _this.result = num;
  101682. }
  101683. return _this;
  101684. }
  101685. (0,createClass["default"])(CSSCalculator, [{
  101686. key: "add",
  101687. value: function add(num) {
  101688. if (num instanceof CSSCalculator) {
  101689. this.result = "".concat(this.result, " + ").concat(num.getResult());
  101690. } else if (typeof num === 'number' || typeof num === 'string') {
  101691. this.result = "".concat(this.result, " + ").concat(unit(num));
  101692. }
  101693. this.lowPriority = true;
  101694. return this;
  101695. }
  101696. }, {
  101697. key: "sub",
  101698. value: function sub(num) {
  101699. if (num instanceof CSSCalculator) {
  101700. this.result = "".concat(this.result, " - ").concat(num.getResult());
  101701. } else if (typeof num === 'number' || typeof num === 'string') {
  101702. this.result = "".concat(this.result, " - ").concat(unit(num));
  101703. }
  101704. this.lowPriority = true;
  101705. return this;
  101706. }
  101707. }, {
  101708. key: "mul",
  101709. value: function mul(num) {
  101710. if (this.lowPriority) {
  101711. this.result = "(".concat(this.result, ")");
  101712. }
  101713. if (num instanceof CSSCalculator) {
  101714. this.result = "".concat(this.result, " * ").concat(num.getResult(true));
  101715. } else if (typeof num === 'number' || typeof num === 'string') {
  101716. this.result = "".concat(this.result, " * ").concat(num);
  101717. }
  101718. this.lowPriority = false;
  101719. return this;
  101720. }
  101721. }, {
  101722. key: "div",
  101723. value: function div(num) {
  101724. if (this.lowPriority) {
  101725. this.result = "(".concat(this.result, ")");
  101726. }
  101727. if (num instanceof CSSCalculator) {
  101728. this.result = "".concat(this.result, " / ").concat(num.getResult(true));
  101729. } else if (typeof num === 'number' || typeof num === 'string') {
  101730. this.result = "".concat(this.result, " / ").concat(num);
  101731. }
  101732. this.lowPriority = false;
  101733. return this;
  101734. }
  101735. }, {
  101736. key: "getResult",
  101737. value: function getResult(force) {
  101738. return this.lowPriority || force ? "(".concat(this.result, ")") : this.result;
  101739. }
  101740. }, {
  101741. key: "equal",
  101742. value: function equal(options) {
  101743. var _this2 = this;
  101744. var _ref = options || {},
  101745. cssUnit = _ref.unit;
  101746. var mergedUnit = true;
  101747. if (typeof cssUnit === 'boolean') {
  101748. mergedUnit = cssUnit;
  101749. } else if (Array.from(this.unitlessCssVar).some(function (cssVar) {
  101750. return _this2.result.includes(cssVar);
  101751. })) {
  101752. mergedUnit = false;
  101753. }
  101754. this.result = this.result.replace(regexp, mergedUnit ? 'px' : '');
  101755. if (typeof this.lowPriority !== 'undefined') {
  101756. return "calc(".concat(this.result, ")");
  101757. }
  101758. return this.result;
  101759. }
  101760. }]);
  101761. return CSSCalculator;
  101762. }(calculator);
  101763. ;// ./node_modules/@ant-design/cssinjs/es/theme/calc/NumCalculator.js
  101764. var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) {
  101765. (0,inherits["default"])(NumCalculator, _AbstractCalculator);
  101766. var _super = (0,createSuper["default"])(NumCalculator);
  101767. function NumCalculator(num) {
  101768. var _this;
  101769. (0,classCallCheck["default"])(this, NumCalculator);
  101770. _this = _super.call(this);
  101771. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", 0);
  101772. if (num instanceof NumCalculator) {
  101773. _this.result = num.result;
  101774. } else if (typeof num === 'number') {
  101775. _this.result = num;
  101776. }
  101777. return _this;
  101778. }
  101779. (0,createClass["default"])(NumCalculator, [{
  101780. key: "add",
  101781. value: function add(num) {
  101782. if (num instanceof NumCalculator) {
  101783. this.result += num.result;
  101784. } else if (typeof num === 'number') {
  101785. this.result += num;
  101786. }
  101787. return this;
  101788. }
  101789. }, {
  101790. key: "sub",
  101791. value: function sub(num) {
  101792. if (num instanceof NumCalculator) {
  101793. this.result -= num.result;
  101794. } else if (typeof num === 'number') {
  101795. this.result -= num;
  101796. }
  101797. return this;
  101798. }
  101799. }, {
  101800. key: "mul",
  101801. value: function mul(num) {
  101802. if (num instanceof NumCalculator) {
  101803. this.result *= num.result;
  101804. } else if (typeof num === 'number') {
  101805. this.result *= num;
  101806. }
  101807. return this;
  101808. }
  101809. }, {
  101810. key: "div",
  101811. value: function div(num) {
  101812. if (num instanceof NumCalculator) {
  101813. this.result /= num.result;
  101814. } else if (typeof num === 'number') {
  101815. this.result /= num;
  101816. }
  101817. return this;
  101818. }
  101819. }, {
  101820. key: "equal",
  101821. value: function equal() {
  101822. return this.result;
  101823. }
  101824. }]);
  101825. return NumCalculator;
  101826. }(calculator);
  101827. ;// ./node_modules/@ant-design/cssinjs/es/theme/calc/index.js
  101828. var genCalc = function genCalc(type, unitlessCssVar) {
  101829. var Calculator = type === 'css' ? CSSCalculator : NumCalculator;
  101830. return function (num) {
  101831. return new Calculator(num, unitlessCssVar);
  101832. };
  101833. };
  101834. /* harmony default export */ var calc = (genCalc);
  101835. ;// ./node_modules/@ant-design/cssinjs/es/theme/ThemeCache.js
  101836. // ================================== Cache ==================================
  101837. function sameDerivativeOption(left, right) {
  101838. if (left.length !== right.length) {
  101839. return false;
  101840. }
  101841. for (var i = 0; i < left.length; i++) {
  101842. if (left[i] !== right[i]) {
  101843. return false;
  101844. }
  101845. }
  101846. return true;
  101847. }
  101848. var ThemeCache = /*#__PURE__*/function () {
  101849. function ThemeCache() {
  101850. (0,classCallCheck["default"])(this, ThemeCache);
  101851. (0,defineProperty["default"])(this, "cache", void 0);
  101852. (0,defineProperty["default"])(this, "keys", void 0);
  101853. (0,defineProperty["default"])(this, "cacheCallTimes", void 0);
  101854. this.cache = new Map();
  101855. this.keys = [];
  101856. this.cacheCallTimes = 0;
  101857. }
  101858. (0,createClass["default"])(ThemeCache, [{
  101859. key: "size",
  101860. value: function size() {
  101861. return this.keys.length;
  101862. }
  101863. }, {
  101864. key: "internalGet",
  101865. value: function internalGet(derivativeOption) {
  101866. var _cache2, _cache3;
  101867. var updateCallTimes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  101868. var cache = {
  101869. map: this.cache
  101870. };
  101871. derivativeOption.forEach(function (derivative) {
  101872. if (!cache) {
  101873. cache = undefined;
  101874. } else {
  101875. var _cache;
  101876. cache = (_cache = cache) === null || _cache === void 0 || (_cache = _cache.map) === null || _cache === void 0 ? void 0 : _cache.get(derivative);
  101877. }
  101878. });
  101879. if ((_cache2 = cache) !== null && _cache2 !== void 0 && _cache2.value && updateCallTimes) {
  101880. cache.value[1] = this.cacheCallTimes++;
  101881. }
  101882. return (_cache3 = cache) === null || _cache3 === void 0 ? void 0 : _cache3.value;
  101883. }
  101884. }, {
  101885. key: "get",
  101886. value: function get(derivativeOption) {
  101887. var _this$internalGet;
  101888. return (_this$internalGet = this.internalGet(derivativeOption, true)) === null || _this$internalGet === void 0 ? void 0 : _this$internalGet[0];
  101889. }
  101890. }, {
  101891. key: "has",
  101892. value: function has(derivativeOption) {
  101893. return !!this.internalGet(derivativeOption);
  101894. }
  101895. }, {
  101896. key: "set",
  101897. value: function set(derivativeOption, value) {
  101898. var _this = this;
  101899. // New cache
  101900. if (!this.has(derivativeOption)) {
  101901. if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {
  101902. var _this$keys$reduce = this.keys.reduce(function (result, key) {
  101903. var _result = (0,slicedToArray["default"])(result, 2),
  101904. callTimes = _result[1];
  101905. if (_this.internalGet(key)[1] < callTimes) {
  101906. return [key, _this.internalGet(key)[1]];
  101907. }
  101908. return result;
  101909. }, [this.keys[0], this.cacheCallTimes]),
  101910. _this$keys$reduce2 = (0,slicedToArray["default"])(_this$keys$reduce, 1),
  101911. targetKey = _this$keys$reduce2[0];
  101912. this.delete(targetKey);
  101913. }
  101914. this.keys.push(derivativeOption);
  101915. }
  101916. var cache = this.cache;
  101917. derivativeOption.forEach(function (derivative, index) {
  101918. if (index === derivativeOption.length - 1) {
  101919. cache.set(derivative, {
  101920. value: [value, _this.cacheCallTimes++]
  101921. });
  101922. } else {
  101923. var cacheValue = cache.get(derivative);
  101924. if (!cacheValue) {
  101925. cache.set(derivative, {
  101926. map: new Map()
  101927. });
  101928. } else if (!cacheValue.map) {
  101929. cacheValue.map = new Map();
  101930. }
  101931. cache = cache.get(derivative).map;
  101932. }
  101933. });
  101934. }
  101935. }, {
  101936. key: "deleteByPath",
  101937. value: function deleteByPath(currentCache, derivatives) {
  101938. var cache = currentCache.get(derivatives[0]);
  101939. if (derivatives.length === 1) {
  101940. var _cache$value;
  101941. if (!cache.map) {
  101942. currentCache.delete(derivatives[0]);
  101943. } else {
  101944. currentCache.set(derivatives[0], {
  101945. map: cache.map
  101946. });
  101947. }
  101948. return (_cache$value = cache.value) === null || _cache$value === void 0 ? void 0 : _cache$value[0];
  101949. }
  101950. var result = this.deleteByPath(cache.map, derivatives.slice(1));
  101951. if ((!cache.map || cache.map.size === 0) && !cache.value) {
  101952. currentCache.delete(derivatives[0]);
  101953. }
  101954. return result;
  101955. }
  101956. }, {
  101957. key: "delete",
  101958. value: function _delete(derivativeOption) {
  101959. // If cache exists
  101960. if (this.has(derivativeOption)) {
  101961. this.keys = this.keys.filter(function (item) {
  101962. return !sameDerivativeOption(item, derivativeOption);
  101963. });
  101964. return this.deleteByPath(this.cache, derivativeOption);
  101965. }
  101966. return undefined;
  101967. }
  101968. }]);
  101969. return ThemeCache;
  101970. }();
  101971. (0,defineProperty["default"])(ThemeCache, "MAX_CACHE_SIZE", 20);
  101972. (0,defineProperty["default"])(ThemeCache, "MAX_CACHE_OFFSET", 5);
  101973. // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
  101974. var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
  101975. ;// ./node_modules/@ant-design/cssinjs/es/theme/Theme.js
  101976. var uuid = 0;
  101977. /**
  101978. * Theme with algorithms to derive tokens from design tokens.
  101979. * Use `createTheme` first which will help to manage the theme instance cache.
  101980. */
  101981. var Theme = /*#__PURE__*/function () {
  101982. function Theme(derivatives) {
  101983. (0,classCallCheck["default"])(this, Theme);
  101984. (0,defineProperty["default"])(this, "derivatives", void 0);
  101985. (0,defineProperty["default"])(this, "id", void 0);
  101986. this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
  101987. this.id = uuid;
  101988. if (derivatives.length === 0) {
  101989. (0,warning.warning)(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
  101990. }
  101991. uuid += 1;
  101992. }
  101993. (0,createClass["default"])(Theme, [{
  101994. key: "getDerivativeToken",
  101995. value: function getDerivativeToken(token) {
  101996. return this.derivatives.reduce(function (result, derivative) {
  101997. return derivative(token, result);
  101998. }, undefined);
  101999. }
  102000. }]);
  102001. return Theme;
  102002. }();
  102003. ;// ./node_modules/@ant-design/cssinjs/es/theme/createTheme.js
  102004. var cacheThemes = new ThemeCache();
  102005. /**
  102006. * Same as new Theme, but will always return same one if `derivative` not changed.
  102007. */
  102008. function createTheme(derivatives) {
  102009. var derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];
  102010. // Create new theme if not exist
  102011. if (!cacheThemes.has(derivativeArr)) {
  102012. cacheThemes.set(derivativeArr, new Theme(derivativeArr));
  102013. }
  102014. // Get theme from cache and return
  102015. return cacheThemes.get(derivativeArr);
  102016. }
  102017. ;// ./node_modules/@ant-design/cssinjs/es/theme/index.js
  102018. ;// ./node_modules/@ant-design/cssinjs/es/util/index.js
  102019. // Create a cache for memo concat
  102020. var resultCache = new WeakMap();
  102021. var RESULT_VALUE = {};
  102022. function memoResult(callback, deps) {
  102023. var current = resultCache;
  102024. for (var i = 0; i < deps.length; i += 1) {
  102025. var dep = deps[i];
  102026. if (!current.has(dep)) {
  102027. current.set(dep, new WeakMap());
  102028. }
  102029. current = current.get(dep);
  102030. }
  102031. if (!current.has(RESULT_VALUE)) {
  102032. current.set(RESULT_VALUE, callback());
  102033. }
  102034. return current.get(RESULT_VALUE);
  102035. }
  102036. // Create a cache here to avoid always loop generate
  102037. var flattenTokenCache = new WeakMap();
  102038. /**
  102039. * Flatten token to string, this will auto cache the result when token not change
  102040. */
  102041. function flattenToken(token) {
  102042. var str = flattenTokenCache.get(token) || '';
  102043. if (!str) {
  102044. Object.keys(token).forEach(function (key) {
  102045. var value = token[key];
  102046. str += key;
  102047. if (value instanceof Theme) {
  102048. str += value.id;
  102049. } else if (value && (0,esm_typeof["default"])(value) === 'object') {
  102050. str += flattenToken(value);
  102051. } else {
  102052. str += value;
  102053. }
  102054. });
  102055. // https://github.com/ant-design/ant-design/issues/48386
  102056. // Should hash the string to avoid style tag name too long
  102057. str = hash_browser_esm(str);
  102058. // Put in cache
  102059. flattenTokenCache.set(token, str);
  102060. }
  102061. return str;
  102062. }
  102063. /**
  102064. * Convert derivative token to key string
  102065. */
  102066. function token2key(token, salt) {
  102067. return hash_browser_esm("".concat(salt, "_").concat(flattenToken(token)));
  102068. }
  102069. var randomSelectorKey = "random-".concat(Date.now(), "-").concat(Math.random()).replace(/\./g, '');
  102070. // Magic `content` for detect selector support
  102071. var checkContent = '_bAmBoO_';
  102072. function supportSelector(styleStr, handleElement, supportCheck) {
  102073. if ((0,canUseDom["default"])()) {
  102074. var _getComputedStyle$con, _ele$parentNode;
  102075. (0,dynamicCSS.updateCSS)(styleStr, randomSelectorKey);
  102076. var _ele = document.createElement('div');
  102077. _ele.style.position = 'fixed';
  102078. _ele.style.left = '0';
  102079. _ele.style.top = '0';
  102080. handleElement === null || handleElement === void 0 || handleElement(_ele);
  102081. document.body.appendChild(_ele);
  102082. if (true) {
  102083. _ele.innerHTML = 'Test';
  102084. _ele.style.zIndex = '9999999';
  102085. }
  102086. var support = supportCheck ? supportCheck(_ele) : (_getComputedStyle$con = getComputedStyle(_ele).content) === null || _getComputedStyle$con === void 0 ? void 0 : _getComputedStyle$con.includes(checkContent);
  102087. (_ele$parentNode = _ele.parentNode) === null || _ele$parentNode === void 0 || _ele$parentNode.removeChild(_ele);
  102088. (0,dynamicCSS.removeCSS)(randomSelectorKey);
  102089. return support;
  102090. }
  102091. return false;
  102092. }
  102093. var canLayer = undefined;
  102094. function supportLayer() {
  102095. if (canLayer === undefined) {
  102096. canLayer = supportSelector("@layer ".concat(randomSelectorKey, " { .").concat(randomSelectorKey, " { content: \"").concat(checkContent, "\"!important; } }"), function (ele) {
  102097. ele.className = randomSelectorKey;
  102098. });
  102099. }
  102100. return canLayer;
  102101. }
  102102. var canWhere = undefined;
  102103. function supportWhere() {
  102104. if (canWhere === undefined) {
  102105. canWhere = supportSelector(":where(.".concat(randomSelectorKey, ") { content: \"").concat(checkContent, "\"!important; }"), function (ele) {
  102106. ele.className = randomSelectorKey;
  102107. });
  102108. }
  102109. return canWhere;
  102110. }
  102111. var canLogic = undefined;
  102112. function supportLogicProps() {
  102113. if (canLogic === undefined) {
  102114. canLogic = supportSelector(".".concat(randomSelectorKey, " { inset-block: 93px !important; }"), function (ele) {
  102115. ele.className = randomSelectorKey;
  102116. }, function (ele) {
  102117. return getComputedStyle(ele).bottom === '93px';
  102118. });
  102119. }
  102120. return canLogic;
  102121. }
  102122. var isClientSide = (0,canUseDom["default"])();
  102123. function util_unit(num) {
  102124. if (typeof num === 'number') {
  102125. return "".concat(num, "px");
  102126. }
  102127. return num;
  102128. }
  102129. function toStyleStr(style, tokenKey, styleId) {
  102130. var customizeAttrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  102131. var plain = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  102132. if (plain) {
  102133. return style;
  102134. }
  102135. var attrs = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, customizeAttrs), {}, (0,defineProperty["default"])((0,defineProperty["default"])({}, ATTR_TOKEN, tokenKey), ATTR_MARK, styleId));
  102136. var attrStr = Object.keys(attrs).map(function (attr) {
  102137. var val = attrs[attr];
  102138. return val ? "".concat(attr, "=\"").concat(val, "\"") : null;
  102139. }).filter(function (v) {
  102140. return v;
  102141. }).join(' ');
  102142. return "<style ".concat(attrStr, ">").concat(style, "</style>");
  102143. }
  102144. ;// ./node_modules/@ant-design/cssinjs/es/util/css-variables.js
  102145. var token2CSSVar = function token2CSSVar(token) {
  102146. var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  102147. return "--".concat(prefix ? "".concat(prefix, "-") : '').concat(token).replace(/([a-z0-9])([A-Z])/g, '$1-$2').replace(/([A-Z]+)([A-Z][a-z0-9]+)/g, '$1-$2').replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase();
  102148. };
  102149. var serializeCSSVar = function serializeCSSVar(cssVars, hashId, options) {
  102150. if (!Object.keys(cssVars).length) {
  102151. return '';
  102152. }
  102153. return ".".concat(hashId).concat(options !== null && options !== void 0 && options.scope ? ".".concat(options.scope) : '', "{").concat(Object.entries(cssVars).map(function (_ref) {
  102154. var _ref2 = (0,slicedToArray["default"])(_ref, 2),
  102155. key = _ref2[0],
  102156. value = _ref2[1];
  102157. return "".concat(key, ":").concat(value, ";");
  102158. }).join(''), "}");
  102159. };
  102160. var transformToken = function transformToken(token, themeKey, config) {
  102161. var cssVars = {};
  102162. var result = {};
  102163. Object.entries(token).forEach(function (_ref3) {
  102164. var _config$preserve, _config$ignore;
  102165. var _ref4 = (0,slicedToArray["default"])(_ref3, 2),
  102166. key = _ref4[0],
  102167. value = _ref4[1];
  102168. if (config !== null && config !== void 0 && (_config$preserve = config.preserve) !== null && _config$preserve !== void 0 && _config$preserve[key]) {
  102169. result[key] = value;
  102170. } else if ((typeof value === 'string' || typeof value === 'number') && !(config !== null && config !== void 0 && (_config$ignore = config.ignore) !== null && _config$ignore !== void 0 && _config$ignore[key])) {
  102171. var _config$unitless;
  102172. var cssVar = token2CSSVar(key, config === null || config === void 0 ? void 0 : config.prefix);
  102173. cssVars[cssVar] = typeof value === 'number' && !(config !== null && config !== void 0 && (_config$unitless = config.unitless) !== null && _config$unitless !== void 0 && _config$unitless[key]) ? "".concat(value, "px") : String(value);
  102174. result[key] = "var(".concat(cssVar, ")");
  102175. }
  102176. });
  102177. return [result, serializeCSSVar(cssVars, themeKey, {
  102178. scope: config === null || config === void 0 ? void 0 : config.scope
  102179. })];
  102180. };
  102181. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
  102182. var useLayoutEffect = __webpack_require__("./node_modules/rc-util/es/hooks/useLayoutEffect.js");
  102183. ;// ./node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.js
  102184. // import canUseDom from 'rc-util/lib/Dom/canUseDom';
  102185. // We need fully clone React function here
  102186. // to avoid webpack warning React 17 do not export `useId`
  102187. var fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
  102188. var useInsertionEffect = fullClone.useInsertionEffect;
  102189. /**
  102190. * Polyfill `useInsertionEffect` for React < 18
  102191. * @param renderEffect will be executed in `useMemo`, and do not have callback
  102192. * @param effect will be executed in `useLayoutEffect`
  102193. * @param deps
  102194. */
  102195. var useInsertionEffectPolyfill = function useInsertionEffectPolyfill(renderEffect, effect, deps) {
  102196. external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(renderEffect, deps);
  102197. (0,useLayoutEffect["default"])(function () {
  102198. return effect(true);
  102199. }, deps);
  102200. };
  102201. /**
  102202. * Compatible `useInsertionEffect`
  102203. * will use `useInsertionEffect` if React version >= 18,
  102204. * otherwise use `useInsertionEffectPolyfill`.
  102205. */
  102206. var useCompatibleInsertionEffect = useInsertionEffect ? function (renderEffect, effect, deps) {
  102207. return useInsertionEffect(function () {
  102208. renderEffect();
  102209. return effect();
  102210. }, deps);
  102211. } : useInsertionEffectPolyfill;
  102212. /* harmony default export */ var hooks_useCompatibleInsertionEffect = (useCompatibleInsertionEffect);
  102213. ;// ./node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.js
  102214. var useEffectCleanupRegister_fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
  102215. var useEffectCleanupRegister_useInsertionEffect = useEffectCleanupRegister_fullClone.useInsertionEffect;
  102216. // DO NOT register functions in useEffect cleanup function, or functions that registered will never be called.
  102217. var useCleanupRegister = function useCleanupRegister(deps) {
  102218. var effectCleanups = [];
  102219. var cleanupFlag = false;
  102220. function register(fn) {
  102221. if (cleanupFlag) {
  102222. if (true) {
  102223. (0,warning.warning)(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
  102224. }
  102225. return;
  102226. }
  102227. effectCleanups.push(fn);
  102228. }
  102229. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  102230. // Compatible with strict mode
  102231. cleanupFlag = false;
  102232. return function () {
  102233. cleanupFlag = true;
  102234. if (effectCleanups.length) {
  102235. effectCleanups.forEach(function (fn) {
  102236. return fn();
  102237. });
  102238. }
  102239. };
  102240. }, deps);
  102241. return register;
  102242. };
  102243. var useRun = function useRun() {
  102244. return function (fn) {
  102245. fn();
  102246. };
  102247. };
  102248. // Only enable register in React 18
  102249. var useEffectCleanupRegister = typeof useEffectCleanupRegister_useInsertionEffect !== 'undefined' ? useCleanupRegister : useRun;
  102250. /* harmony default export */ var hooks_useEffectCleanupRegister = (useEffectCleanupRegister);
  102251. // EXTERNAL MODULE: ./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js
  102252. var useHMR = __webpack_require__("./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js");
  102253. ;// ./node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js
  102254. function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove,
  102255. // Add additional effect trigger by `useInsertionEffect`
  102256. onCacheEffect) {
  102257. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_StyleContext),
  102258. globalCache = _React$useContext.cache;
  102259. var fullPath = [prefix].concat((0,toConsumableArray["default"])(keyPath));
  102260. var fullPathStr = pathKey(fullPath);
  102261. var register = hooks_useEffectCleanupRegister([fullPathStr]);
  102262. var HMRUpdate = (0,useHMR["default"])();
  102263. var buildCache = function buildCache(updater) {
  102264. globalCache.opUpdate(fullPathStr, function (prevCache) {
  102265. var _ref = prevCache || [undefined, undefined],
  102266. _ref2 = (0,slicedToArray["default"])(_ref, 2),
  102267. _ref2$ = _ref2[0],
  102268. times = _ref2$ === void 0 ? 0 : _ref2$,
  102269. cache = _ref2[1];
  102270. // HMR should always ignore cache since developer may change it
  102271. var tmpCache = cache;
  102272. if ( true && cache && HMRUpdate) {
  102273. onCacheRemove === null || onCacheRemove === void 0 || onCacheRemove(tmpCache, HMRUpdate);
  102274. tmpCache = null;
  102275. }
  102276. var mergedCache = tmpCache || cacheFn();
  102277. var data = [times, mergedCache];
  102278. // Call updater if need additional logic
  102279. return updater ? updater(data) : data;
  102280. });
  102281. };
  102282. // Create cache
  102283. external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  102284. buildCache();
  102285. }, /* eslint-disable react-hooks/exhaustive-deps */
  102286. [fullPathStr]
  102287. /* eslint-enable */);
  102288. var cacheEntity = globalCache.opGet(fullPathStr);
  102289. // HMR clean the cache but not trigger `useMemo` again
  102290. // Let's fallback of this
  102291. // ref https://github.com/ant-design/cssinjs/issues/127
  102292. if ( true && !cacheEntity) {
  102293. buildCache();
  102294. cacheEntity = globalCache.opGet(fullPathStr);
  102295. }
  102296. var cacheContent = cacheEntity[1];
  102297. // Remove if no need anymore
  102298. hooks_useCompatibleInsertionEffect(function () {
  102299. onCacheEffect === null || onCacheEffect === void 0 || onCacheEffect(cacheContent);
  102300. }, function (polyfill) {
  102301. // It's bad to call build again in effect.
  102302. // But we have to do this since StrictMode will call effect twice
  102303. // which will clear cache on the first time.
  102304. buildCache(function (_ref3) {
  102305. var _ref4 = (0,slicedToArray["default"])(_ref3, 2),
  102306. times = _ref4[0],
  102307. cache = _ref4[1];
  102308. if (polyfill && times === 0) {
  102309. onCacheEffect === null || onCacheEffect === void 0 || onCacheEffect(cacheContent);
  102310. }
  102311. return [times + 1, cache];
  102312. });
  102313. return function () {
  102314. globalCache.opUpdate(fullPathStr, function (prevCache) {
  102315. var _ref5 = prevCache || [],
  102316. _ref6 = (0,slicedToArray["default"])(_ref5, 2),
  102317. _ref6$ = _ref6[0],
  102318. times = _ref6$ === void 0 ? 0 : _ref6$,
  102319. cache = _ref6[1];
  102320. var nextCount = times - 1;
  102321. if (nextCount === 0) {
  102322. // Always remove styles in useEffect callback
  102323. register(function () {
  102324. // With polyfill, registered callback will always be called synchronously
  102325. // But without polyfill, it will be called in effect clean up,
  102326. // And by that time this cache is cleaned up.
  102327. if (polyfill || !globalCache.opGet(fullPathStr)) {
  102328. onCacheRemove === null || onCacheRemove === void 0 || onCacheRemove(cache, false);
  102329. }
  102330. });
  102331. return null;
  102332. }
  102333. return [times - 1, cache];
  102334. });
  102335. };
  102336. }, [fullPathStr]);
  102337. return cacheContent;
  102338. }
  102339. ;// ./node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js
  102340. var EMPTY_OVERRIDE = {};
  102341. // Generate different prefix to make user selector break in production env.
  102342. // This helps developer not to do style override directly on the hash id.
  102343. var hashPrefix = true ? 'css-dev-only-do-not-override' : 0;
  102344. var tokenKeys = new Map();
  102345. function recordCleanToken(tokenKey) {
  102346. tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);
  102347. }
  102348. function removeStyleTags(key, instanceId) {
  102349. if (typeof document !== 'undefined') {
  102350. var styles = document.querySelectorAll("style[".concat(ATTR_TOKEN, "=\"").concat(key, "\"]"));
  102351. styles.forEach(function (style) {
  102352. if (style[CSS_IN_JS_INSTANCE] === instanceId) {
  102353. var _style$parentNode;
  102354. (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);
  102355. }
  102356. });
  102357. }
  102358. }
  102359. var TOKEN_THRESHOLD = 0;
  102360. // Remove will check current keys first
  102361. function cleanTokenStyle(tokenKey, instanceId) {
  102362. tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
  102363. var cleanableKeyList = new Set();
  102364. tokenKeys.forEach(function (value, key) {
  102365. if (value <= 0) cleanableKeyList.add(key);
  102366. });
  102367. // Should keep tokens under threshold for not to insert style too often
  102368. if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {
  102369. cleanableKeyList.forEach(function (key) {
  102370. removeStyleTags(key, instanceId);
  102371. tokenKeys.delete(key);
  102372. });
  102373. }
  102374. }
  102375. var getComputedToken = function getComputedToken(originToken, overrideToken, theme, format) {
  102376. var derivativeToken = theme.getDerivativeToken(originToken);
  102377. // Merge with override
  102378. var mergedDerivativeToken = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, derivativeToken), overrideToken);
  102379. // Format if needed
  102380. if (format) {
  102381. mergedDerivativeToken = format(mergedDerivativeToken);
  102382. }
  102383. return mergedDerivativeToken;
  102384. };
  102385. var TOKEN_PREFIX = 'token';
  102386. /**
  102387. * Cache theme derivative token as global shared one
  102388. * @param theme Theme entity
  102389. * @param tokens List of tokens, used for cache. Please do not dynamic generate object directly
  102390. * @param option Additional config
  102391. * @returns Call Theme.getDerivativeToken(tokenObject) to get token
  102392. */
  102393. function useCacheToken(theme, tokens) {
  102394. var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  102395. var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(es_StyleContext),
  102396. instanceId = _useContext.cache.instanceId,
  102397. container = _useContext.container;
  102398. var _option$salt = option.salt,
  102399. salt = _option$salt === void 0 ? '' : _option$salt,
  102400. _option$override = option.override,
  102401. override = _option$override === void 0 ? EMPTY_OVERRIDE : _option$override,
  102402. formatToken = option.formatToken,
  102403. compute = option.getComputedToken,
  102404. cssVar = option.cssVar;
  102405. // Basic - We do basic cache here
  102406. var mergedToken = memoResult(function () {
  102407. return Object.assign.apply(Object, [{}].concat((0,toConsumableArray["default"])(tokens)));
  102408. }, tokens);
  102409. var tokenStr = flattenToken(mergedToken);
  102410. var overrideTokenStr = flattenToken(override);
  102411. var cssVarStr = cssVar ? flattenToken(cssVar) : '';
  102412. var cachedToken = useGlobalCache(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], function () {
  102413. var _cssVar$key;
  102414. var mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);
  102415. // Replace token value with css variables
  102416. var actualToken = (0,objectSpread2["default"])({}, mergedDerivativeToken);
  102417. var cssVarsStr = '';
  102418. if (!!cssVar) {
  102419. var _transformToken = transformToken(mergedDerivativeToken, cssVar.key, {
  102420. prefix: cssVar.prefix,
  102421. ignore: cssVar.ignore,
  102422. unitless: cssVar.unitless,
  102423. preserve: cssVar.preserve
  102424. });
  102425. var _transformToken2 = (0,slicedToArray["default"])(_transformToken, 2);
  102426. mergedDerivativeToken = _transformToken2[0];
  102427. cssVarsStr = _transformToken2[1];
  102428. }
  102429. // Optimize for `useStyleRegister` performance
  102430. var tokenKey = token2key(mergedDerivativeToken, salt);
  102431. mergedDerivativeToken._tokenKey = tokenKey;
  102432. actualToken._tokenKey = token2key(actualToken, salt);
  102433. var themeKey = (_cssVar$key = cssVar === null || cssVar === void 0 ? void 0 : cssVar.key) !== null && _cssVar$key !== void 0 ? _cssVar$key : tokenKey;
  102434. mergedDerivativeToken._themeKey = themeKey;
  102435. recordCleanToken(themeKey);
  102436. var hashId = "".concat(hashPrefix, "-").concat(hash_browser_esm(tokenKey));
  102437. mergedDerivativeToken._hashId = hashId; // Not used
  102438. return [mergedDerivativeToken, hashId, actualToken, cssVarsStr, (cssVar === null || cssVar === void 0 ? void 0 : cssVar.key) || ''];
  102439. }, function (cache) {
  102440. // Remove token will remove all related style
  102441. cleanTokenStyle(cache[0]._themeKey, instanceId);
  102442. }, function (_ref) {
  102443. var _ref2 = (0,slicedToArray["default"])(_ref, 4),
  102444. token = _ref2[0],
  102445. cssVarsStr = _ref2[3];
  102446. if (cssVar && cssVarsStr) {
  102447. var style = (0,dynamicCSS.updateCSS)(cssVarsStr, hash_browser_esm("css-variables-".concat(token._themeKey)), {
  102448. mark: ATTR_MARK,
  102449. prepend: 'queue',
  102450. attachTo: container,
  102451. priority: -999
  102452. });
  102453. style[CSS_IN_JS_INSTANCE] = instanceId;
  102454. // Used for `useCacheToken` to remove on batch when token removed
  102455. style.setAttribute(ATTR_TOKEN, token._themeKey);
  102456. }
  102457. });
  102458. return cachedToken;
  102459. }
  102460. var extract = function extract(cache, effectStyles, options) {
  102461. var _cache = (0,slicedToArray["default"])(cache, 5),
  102462. realToken = _cache[2],
  102463. styleStr = _cache[3],
  102464. cssVarKey = _cache[4];
  102465. var _ref3 = options || {},
  102466. plain = _ref3.plain;
  102467. if (!styleStr) {
  102468. return null;
  102469. }
  102470. var styleId = realToken._tokenKey;
  102471. var order = -999;
  102472. // ====================== Style ======================
  102473. // Used for rc-util
  102474. var sharedAttrs = {
  102475. 'data-rc-order': 'prependQueue',
  102476. 'data-rc-priority': "".concat(order)
  102477. };
  102478. var styleText = toStyleStr(styleStr, cssVarKey, styleId, sharedAttrs, plain);
  102479. return [order, styleId, styleText];
  102480. };
  102481. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  102482. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  102483. ;// ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js
  102484. var unitlessKeys = {
  102485. animationIterationCount: 1,
  102486. borderImageOutset: 1,
  102487. borderImageSlice: 1,
  102488. borderImageWidth: 1,
  102489. boxFlex: 1,
  102490. boxFlexGroup: 1,
  102491. boxOrdinalGroup: 1,
  102492. columnCount: 1,
  102493. columns: 1,
  102494. flex: 1,
  102495. flexGrow: 1,
  102496. flexPositive: 1,
  102497. flexShrink: 1,
  102498. flexNegative: 1,
  102499. flexOrder: 1,
  102500. gridRow: 1,
  102501. gridRowEnd: 1,
  102502. gridRowSpan: 1,
  102503. gridRowStart: 1,
  102504. gridColumn: 1,
  102505. gridColumnEnd: 1,
  102506. gridColumnSpan: 1,
  102507. gridColumnStart: 1,
  102508. msGridRow: 1,
  102509. msGridRowSpan: 1,
  102510. msGridColumn: 1,
  102511. msGridColumnSpan: 1,
  102512. fontWeight: 1,
  102513. lineHeight: 1,
  102514. opacity: 1,
  102515. order: 1,
  102516. orphans: 1,
  102517. tabSize: 1,
  102518. widows: 1,
  102519. zIndex: 1,
  102520. zoom: 1,
  102521. WebkitLineClamp: 1,
  102522. // SVG-related properties
  102523. fillOpacity: 1,
  102524. floodOpacity: 1,
  102525. stopOpacity: 1,
  102526. strokeDasharray: 1,
  102527. strokeDashoffset: 1,
  102528. strokeMiterlimit: 1,
  102529. strokeOpacity: 1,
  102530. strokeWidth: 1
  102531. };
  102532. /* harmony default export */ var unitless_browser_esm = (unitlessKeys);
  102533. ;// ./node_modules/stylis/src/Enum.js
  102534. var MS = '-ms-'
  102535. var MOZ = '-moz-'
  102536. var WEBKIT = '-webkit-'
  102537. var COMMENT = 'comm'
  102538. var RULESET = 'rule'
  102539. var DECLARATION = 'decl'
  102540. var PAGE = '@page'
  102541. var MEDIA = '@media'
  102542. var IMPORT = '@import'
  102543. var CHARSET = '@charset'
  102544. var VIEWPORT = '@viewport'
  102545. var SUPPORTS = '@supports'
  102546. var DOCUMENT = '@document'
  102547. var NAMESPACE = '@namespace'
  102548. var KEYFRAMES = '@keyframes'
  102549. var FONT_FACE = '@font-face'
  102550. var COUNTER_STYLE = '@counter-style'
  102551. var FONT_FEATURE_VALUES = '@font-feature-values'
  102552. var LAYER = '@layer'
  102553. var SCOPE = '@scope'
  102554. ;// ./node_modules/stylis/src/Utility.js
  102555. /**
  102556. * @param {number}
  102557. * @return {number}
  102558. */
  102559. var abs = Math.abs
  102560. /**
  102561. * @param {number}
  102562. * @return {string}
  102563. */
  102564. var from = String.fromCharCode
  102565. /**
  102566. * @param {object}
  102567. * @return {object}
  102568. */
  102569. var Utility_assign = Object.assign
  102570. /**
  102571. * @param {string} value
  102572. * @param {number} length
  102573. * @return {number}
  102574. */
  102575. function hash (value, length) {
  102576. return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
  102577. }
  102578. /**
  102579. * @param {string} value
  102580. * @return {string}
  102581. */
  102582. function trim (value) {
  102583. return value.trim()
  102584. }
  102585. /**
  102586. * @param {string} value
  102587. * @param {RegExp} pattern
  102588. * @return {string?}
  102589. */
  102590. function match (value, pattern) {
  102591. return (value = pattern.exec(value)) ? value[0] : value
  102592. }
  102593. /**
  102594. * @param {string} value
  102595. * @param {(string|RegExp)} pattern
  102596. * @param {string} replacement
  102597. * @return {string}
  102598. */
  102599. function replace (value, pattern, replacement) {
  102600. return value.replace(pattern, replacement)
  102601. }
  102602. /**
  102603. * @param {string} value
  102604. * @param {string} search
  102605. * @param {number} position
  102606. * @return {number}
  102607. */
  102608. function indexof (value, search, position) {
  102609. return value.indexOf(search, position)
  102610. }
  102611. /**
  102612. * @param {string} value
  102613. * @param {number} index
  102614. * @return {number}
  102615. */
  102616. function charat (value, index) {
  102617. return value.charCodeAt(index) | 0
  102618. }
  102619. /**
  102620. * @param {string} value
  102621. * @param {number} begin
  102622. * @param {number} end
  102623. * @return {string}
  102624. */
  102625. function substr (value, begin, end) {
  102626. return value.slice(begin, end)
  102627. }
  102628. /**
  102629. * @param {string} value
  102630. * @return {number}
  102631. */
  102632. function strlen (value) {
  102633. return value.length
  102634. }
  102635. /**
  102636. * @param {any[]} value
  102637. * @return {number}
  102638. */
  102639. function sizeof (value) {
  102640. return value.length
  102641. }
  102642. /**
  102643. * @param {any} value
  102644. * @param {any[]} array
  102645. * @return {any}
  102646. */
  102647. function append (value, array) {
  102648. return array.push(value), value
  102649. }
  102650. /**
  102651. * @param {string[]} array
  102652. * @param {function} callback
  102653. * @return {string}
  102654. */
  102655. function combine (array, callback) {
  102656. return array.map(callback).join('')
  102657. }
  102658. /**
  102659. * @param {string[]} array
  102660. * @param {RegExp} pattern
  102661. * @return {string[]}
  102662. */
  102663. function filter (array, pattern) {
  102664. return array.filter(function (value) { return !match(value, pattern) })
  102665. }
  102666. ;// ./node_modules/stylis/src/Serializer.js
  102667. /**
  102668. * @param {object[]} children
  102669. * @param {function} callback
  102670. * @return {string}
  102671. */
  102672. function serialize (children, callback) {
  102673. var output = ''
  102674. for (var i = 0; i < children.length; i++)
  102675. output += callback(children[i], i, children, callback) || ''
  102676. return output
  102677. }
  102678. /**
  102679. * @param {object} element
  102680. * @param {number} index
  102681. * @param {object[]} children
  102682. * @param {function} callback
  102683. * @return {string}
  102684. */
  102685. function stringify (element, index, children, callback) {
  102686. switch (element.type) {
  102687. case LAYER: if (element.children.length) break
  102688. case IMPORT: case NAMESPACE: case DECLARATION: return element.return = element.return || element.value
  102689. case COMMENT: return ''
  102690. case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
  102691. case RULESET: if (!strlen(element.value = element.props.join(','))) return ''
  102692. }
  102693. return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
  102694. }
  102695. ;// ./node_modules/stylis/src/Tokenizer.js
  102696. var line = 1
  102697. var column = 1
  102698. var Tokenizer_length = 0
  102699. var position = 0
  102700. var character = 0
  102701. var characters = ''
  102702. /**
  102703. * @param {string} value
  102704. * @param {object | null} root
  102705. * @param {object | null} parent
  102706. * @param {string} type
  102707. * @param {string[] | string} props
  102708. * @param {object[] | string} children
  102709. * @param {object[]} siblings
  102710. * @param {number} length
  102711. */
  102712. function node (value, root, parent, type, props, children, length, siblings) {
  102713. return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}
  102714. }
  102715. /**
  102716. * @param {object} root
  102717. * @param {object} props
  102718. * @return {object}
  102719. */
  102720. function copy (root, props) {
  102721. return Utility_assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)
  102722. }
  102723. /**
  102724. * @param {object} root
  102725. */
  102726. function lift (root) {
  102727. while (root.root)
  102728. root = copy(root.root, {children: [root]})
  102729. append(root, root.siblings)
  102730. }
  102731. /**
  102732. * @return {number}
  102733. */
  102734. function Tokenizer_char () {
  102735. return character
  102736. }
  102737. /**
  102738. * @return {number}
  102739. */
  102740. function prev () {
  102741. character = position > 0 ? charat(characters, --position) : 0
  102742. if (column--, character === 10)
  102743. column = 1, line--
  102744. return character
  102745. }
  102746. /**
  102747. * @return {number}
  102748. */
  102749. function next () {
  102750. character = position < Tokenizer_length ? charat(characters, position++) : 0
  102751. if (column++, character === 10)
  102752. column = 1, line++
  102753. return character
  102754. }
  102755. /**
  102756. * @return {number}
  102757. */
  102758. function peek () {
  102759. return charat(characters, position)
  102760. }
  102761. /**
  102762. * @return {number}
  102763. */
  102764. function caret () {
  102765. return position
  102766. }
  102767. /**
  102768. * @param {number} begin
  102769. * @param {number} end
  102770. * @return {string}
  102771. */
  102772. function slice (begin, end) {
  102773. return substr(characters, begin, end)
  102774. }
  102775. /**
  102776. * @param {number} type
  102777. * @return {number}
  102778. */
  102779. function token (type) {
  102780. switch (type) {
  102781. // \0 \t \n \r \s whitespace token
  102782. case 0: case 9: case 10: case 13: case 32:
  102783. return 5
  102784. // ! + , / > @ ~ isolate token
  102785. case 33: case 43: case 44: case 47: case 62: case 64: case 126:
  102786. // ; { } breakpoint token
  102787. case 59: case 123: case 125:
  102788. return 4
  102789. // : accompanied token
  102790. case 58:
  102791. return 3
  102792. // " ' ( [ opening delimit token
  102793. case 34: case 39: case 40: case 91:
  102794. return 2
  102795. // ) ] closing delimit token
  102796. case 41: case 93:
  102797. return 1
  102798. }
  102799. return 0
  102800. }
  102801. /**
  102802. * @param {string} value
  102803. * @return {any[]}
  102804. */
  102805. function alloc (value) {
  102806. return line = column = 1, Tokenizer_length = strlen(characters = value), position = 0, []
  102807. }
  102808. /**
  102809. * @param {any} value
  102810. * @return {any}
  102811. */
  102812. function dealloc (value) {
  102813. return characters = '', value
  102814. }
  102815. /**
  102816. * @param {number} type
  102817. * @return {string}
  102818. */
  102819. function delimit (type) {
  102820. return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
  102821. }
  102822. /**
  102823. * @param {string} value
  102824. * @return {string[]}
  102825. */
  102826. function tokenize (value) {
  102827. return dealloc(tokenizer(alloc(value)))
  102828. }
  102829. /**
  102830. * @param {number} type
  102831. * @return {string}
  102832. */
  102833. function whitespace (type) {
  102834. while (character = peek())
  102835. if (character < 33)
  102836. next()
  102837. else
  102838. break
  102839. return token(type) > 2 || token(character) > 3 ? '' : ' '
  102840. }
  102841. /**
  102842. * @param {string[]} children
  102843. * @return {string[]}
  102844. */
  102845. function tokenizer (children) {
  102846. while (next())
  102847. switch (token(character)) {
  102848. case 0: append(identifier(position - 1), children)
  102849. break
  102850. case 2: append(delimit(character), children)
  102851. break
  102852. default: append(from(character), children)
  102853. }
  102854. return children
  102855. }
  102856. /**
  102857. * @param {number} index
  102858. * @param {number} count
  102859. * @return {string}
  102860. */
  102861. function escaping (index, count) {
  102862. while (--count && next())
  102863. // not 0-9 A-F a-f
  102864. if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
  102865. break
  102866. return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
  102867. }
  102868. /**
  102869. * @param {number} type
  102870. * @return {number}
  102871. */
  102872. function delimiter (type) {
  102873. while (next())
  102874. switch (character) {
  102875. // ] ) " '
  102876. case type:
  102877. return position
  102878. // " '
  102879. case 34: case 39:
  102880. if (type !== 34 && type !== 39)
  102881. delimiter(character)
  102882. break
  102883. // (
  102884. case 40:
  102885. if (type === 41)
  102886. delimiter(type)
  102887. break
  102888. // \
  102889. case 92:
  102890. next()
  102891. break
  102892. }
  102893. return position
  102894. }
  102895. /**
  102896. * @param {number} type
  102897. * @param {number} index
  102898. * @return {number}
  102899. */
  102900. function commenter (type, index) {
  102901. while (next())
  102902. // //
  102903. if (type + character === 47 + 10)
  102904. break
  102905. // /*
  102906. else if (type + character === 42 + 42 && peek() === 47)
  102907. break
  102908. return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
  102909. }
  102910. /**
  102911. * @param {number} index
  102912. * @return {string}
  102913. */
  102914. function identifier (index) {
  102915. while (!token(peek()))
  102916. next()
  102917. return slice(index, position)
  102918. }
  102919. ;// ./node_modules/stylis/src/Parser.js
  102920. /**
  102921. * @param {string} value
  102922. * @return {object[]}
  102923. */
  102924. function compile (value) {
  102925. return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
  102926. }
  102927. /**
  102928. * @param {string} value
  102929. * @param {object} root
  102930. * @param {object?} parent
  102931. * @param {string[]} rule
  102932. * @param {string[]} rules
  102933. * @param {string[]} rulesets
  102934. * @param {number[]} pseudo
  102935. * @param {number[]} points
  102936. * @param {string[]} declarations
  102937. * @return {object}
  102938. */
  102939. function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
  102940. var index = 0
  102941. var offset = 0
  102942. var length = pseudo
  102943. var atrule = 0
  102944. var property = 0
  102945. var previous = 0
  102946. var variable = 1
  102947. var scanning = 1
  102948. var ampersand = 1
  102949. var character = 0
  102950. var type = ''
  102951. var props = rules
  102952. var children = rulesets
  102953. var reference = rule
  102954. var characters = type
  102955. while (scanning)
  102956. switch (previous = character, character = next()) {
  102957. // (
  102958. case 40:
  102959. if (previous != 108 && charat(characters, length - 1) == 58) {
  102960. if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f', abs(index ? points[index - 1] : 0)) != -1)
  102961. ampersand = -1
  102962. break
  102963. }
  102964. // " ' [
  102965. case 34: case 39: case 91:
  102966. characters += delimit(character)
  102967. break
  102968. // \t \n \r \s
  102969. case 9: case 10: case 13: case 32:
  102970. characters += whitespace(previous)
  102971. break
  102972. // \
  102973. case 92:
  102974. characters += escaping(caret() - 1, 7)
  102975. continue
  102976. // /
  102977. case 47:
  102978. switch (peek()) {
  102979. case 42: case 47:
  102980. append(comment(commenter(next(), caret()), root, parent, declarations), declarations)
  102981. if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' '
  102982. break
  102983. default:
  102984. characters += '/'
  102985. }
  102986. break
  102987. // {
  102988. case 123 * variable:
  102989. points[index++] = strlen(characters) * ampersand
  102990. // } ; \0
  102991. case 125 * variable: case 59: case 0:
  102992. switch (character) {
  102993. // \0 }
  102994. case 0: case 125: scanning = 0
  102995. // ;
  102996. case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '')
  102997. if (property > 0 && (strlen(characters) - length || (variable === 0 && previous === 47)))
  102998. append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)
  102999. break
  103000. // @ ;
  103001. case 59: characters += ';'
  103002. // { rule/at-rule
  103003. default:
  103004. append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)
  103005. if (character === 123)
  103006. if (offset === 0)
  103007. parse(characters, root, reference, reference, props, rulesets, length, points, children)
  103008. else {
  103009. switch (atrule) {
  103010. // c(ontainer)
  103011. case 99:
  103012. if (charat(characters, 3) === 110) break
  103013. // l(ayer)
  103014. case 108:
  103015. if (charat(characters, 2) === 97) break
  103016. default:
  103017. offset = 0
  103018. // d(ocument) m(edia) s(upports)
  103019. case 100: case 109: case 115:
  103020. }
  103021. if (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)
  103022. else parse(characters, reference, reference, reference, [''], children, 0, points, children)
  103023. }
  103024. }
  103025. index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo
  103026. break
  103027. // :
  103028. case 58:
  103029. length = 1 + strlen(characters), property = previous
  103030. default:
  103031. if (variable < 1)
  103032. if (character == 123)
  103033. --variable
  103034. else if (character == 125 && variable++ == 0 && prev() == 125)
  103035. continue
  103036. switch (characters += from(character), character * variable) {
  103037. // &
  103038. case 38:
  103039. ampersand = offset > 0 ? 1 : (characters += '\f', -1)
  103040. break
  103041. // ,
  103042. case 44:
  103043. points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1
  103044. break
  103045. // @
  103046. case 64:
  103047. // -
  103048. if (peek() === 45)
  103049. characters += delimit(next())
  103050. atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++
  103051. break
  103052. // -
  103053. case 45:
  103054. if (previous === 45 && strlen(characters) == 2)
  103055. variable = 0
  103056. }
  103057. }
  103058. return rulesets
  103059. }
  103060. /**
  103061. * @param {string} value
  103062. * @param {object} root
  103063. * @param {object?} parent
  103064. * @param {number} index
  103065. * @param {number} offset
  103066. * @param {string[]} rules
  103067. * @param {number[]} points
  103068. * @param {string} type
  103069. * @param {string[]} props
  103070. * @param {string[]} children
  103071. * @param {number} length
  103072. * @param {object[]} siblings
  103073. * @return {object}
  103074. */
  103075. function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {
  103076. var post = offset - 1
  103077. var rule = offset === 0 ? rules : ['']
  103078. var size = sizeof(rule)
  103079. for (var i = 0, j = 0, k = 0; i < index; ++i)
  103080. for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
  103081. if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
  103082. props[k++] = z
  103083. return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)
  103084. }
  103085. /**
  103086. * @param {number} value
  103087. * @param {object} root
  103088. * @param {object?} parent
  103089. * @param {object[]} siblings
  103090. * @return {object}
  103091. */
  103092. function comment (value, root, parent, siblings) {
  103093. return node(value, root, parent, COMMENT, from(Tokenizer_char()), substr(value, 2, -2), 0, siblings)
  103094. }
  103095. /**
  103096. * @param {string} value
  103097. * @param {object} root
  103098. * @param {object?} parent
  103099. * @param {number} length
  103100. * @param {object[]} siblings
  103101. * @return {object}
  103102. */
  103103. function declaration (value, root, parent, length, siblings) {
  103104. return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)
  103105. }
  103106. ;// ./node_modules/@ant-design/cssinjs/es/linters/utils.js
  103107. function lintWarning(message, info) {
  103108. var path = info.path,
  103109. parentSelectors = info.parentSelectors;
  103110. (0,warning["default"])(false, "[Ant Design CSS-in-JS] ".concat(path ? "Error in ".concat(path, ": ") : '').concat(message).concat(parentSelectors.length ? " Selector: ".concat(parentSelectors.join(' | ')) : ''));
  103111. }
  103112. ;// ./node_modules/@ant-design/cssinjs/es/linters/contentQuotesLinter.js
  103113. var linter = function linter(key, value, info) {
  103114. if (key === 'content') {
  103115. // From emotion: https://github.com/emotion-js/emotion/blob/main/packages/serialize/src/index.js#L63
  103116. var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
  103117. var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
  103118. if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
  103119. lintWarning("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(value, "\"'`."), info);
  103120. }
  103121. }
  103122. };
  103123. /* harmony default export */ var contentQuotesLinter = (linter);
  103124. ;// ./node_modules/@ant-design/cssinjs/es/linters/hashedAnimationLinter.js
  103125. var hashedAnimationLinter_linter = function linter(key, value, info) {
  103126. if (key === 'animation') {
  103127. if (info.hashId && value !== 'none') {
  103128. lintWarning("You seem to be using hashed animation '".concat(value, "', in which case 'animationName' with Keyframe as value is recommended."), info);
  103129. }
  103130. }
  103131. };
  103132. /* harmony default export */ var hashedAnimationLinter = (hashedAnimationLinter_linter);
  103133. ;// ./node_modules/@ant-design/cssinjs/es/linters/legacyNotSelectorLinter.js
  103134. function isConcatSelector(selector) {
  103135. var _selector$match;
  103136. var notContent = ((_selector$match = selector.match(/:not\(([^)]*)\)/)) === null || _selector$match === void 0 ? void 0 : _selector$match[1]) || '';
  103137. // split selector. e.g.
  103138. // `h1#a.b` => ['h1', #a', '.b']
  103139. var splitCells = notContent.split(/(\[[^[]*])|(?=[.#])/).filter(function (str) {
  103140. return str;
  103141. });
  103142. return splitCells.length > 1;
  103143. }
  103144. function parsePath(info) {
  103145. return info.parentSelectors.reduce(function (prev, cur) {
  103146. if (!prev) {
  103147. return cur;
  103148. }
  103149. return cur.includes('&') ? cur.replace(/&/g, prev) : "".concat(prev, " ").concat(cur);
  103150. }, '');
  103151. }
  103152. var legacyNotSelectorLinter_linter = function linter(key, value, info) {
  103153. var parentSelectorPath = parsePath(info);
  103154. var notList = parentSelectorPath.match(/:not\([^)]*\)/g) || [];
  103155. if (notList.length > 0 && notList.some(isConcatSelector)) {
  103156. lintWarning("Concat ':not' selector not support in legacy browsers.", info);
  103157. }
  103158. };
  103159. /* harmony default export */ var legacyNotSelectorLinter = (legacyNotSelectorLinter_linter);
  103160. ;// ./node_modules/@ant-design/cssinjs/es/linters/logicalPropertiesLinter.js
  103161. var logicalPropertiesLinter_linter = function linter(key, value, info) {
  103162. switch (key) {
  103163. case 'marginLeft':
  103164. case 'marginRight':
  103165. case 'paddingLeft':
  103166. case 'paddingRight':
  103167. case 'left':
  103168. case 'right':
  103169. case 'borderLeft':
  103170. case 'borderLeftWidth':
  103171. case 'borderLeftStyle':
  103172. case 'borderLeftColor':
  103173. case 'borderRight':
  103174. case 'borderRightWidth':
  103175. case 'borderRightStyle':
  103176. case 'borderRightColor':
  103177. case 'borderTopLeftRadius':
  103178. case 'borderTopRightRadius':
  103179. case 'borderBottomLeftRadius':
  103180. case 'borderBottomRightRadius':
  103181. lintWarning("You seem to be using non-logical property '".concat(key, "' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
  103182. return;
  103183. case 'margin':
  103184. case 'padding':
  103185. case 'borderWidth':
  103186. case 'borderStyle':
  103187. // case 'borderColor':
  103188. if (typeof value === 'string') {
  103189. var valueArr = value.split(' ').map(function (item) {
  103190. return item.trim();
  103191. });
  103192. if (valueArr.length === 4 && valueArr[1] !== valueArr[3]) {
  103193. lintWarning("You seem to be using '".concat(key, "' property with different left ").concat(key, " and right ").concat(key, ", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
  103194. }
  103195. }
  103196. return;
  103197. case 'clear':
  103198. case 'textAlign':
  103199. if (value === 'left' || value === 'right') {
  103200. lintWarning("You seem to be using non-logical value '".concat(value, "' of ").concat(key, ", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
  103201. }
  103202. return;
  103203. case 'borderRadius':
  103204. if (typeof value === 'string') {
  103205. var radiusGroups = value.split('/').map(function (item) {
  103206. return item.trim();
  103207. });
  103208. var invalid = radiusGroups.reduce(function (result, group) {
  103209. if (result) {
  103210. return result;
  103211. }
  103212. var radiusArr = group.split(' ').map(function (item) {
  103213. return item.trim();
  103214. });
  103215. // borderRadius: '2px 4px'
  103216. if (radiusArr.length >= 2 && radiusArr[0] !== radiusArr[1]) {
  103217. return true;
  103218. }
  103219. // borderRadius: '4px 4px 2px'
  103220. if (radiusArr.length === 3 && radiusArr[1] !== radiusArr[2]) {
  103221. return true;
  103222. }
  103223. // borderRadius: '4px 4px 2px 4px'
  103224. if (radiusArr.length === 4 && radiusArr[2] !== radiusArr[3]) {
  103225. return true;
  103226. }
  103227. return result;
  103228. }, false);
  103229. if (invalid) {
  103230. lintWarning("You seem to be using non-logical value '".concat(value, "' of ").concat(key, ", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."), info);
  103231. }
  103232. }
  103233. return;
  103234. default:
  103235. }
  103236. };
  103237. /* harmony default export */ var logicalPropertiesLinter = (logicalPropertiesLinter_linter);
  103238. ;// ./node_modules/@ant-design/cssinjs/es/linters/NaNLinter.js
  103239. var NaNLinter_linter = function linter(key, value, info) {
  103240. if (typeof value === 'string' && /NaN/g.test(value) || Number.isNaN(value)) {
  103241. lintWarning("Unexpected 'NaN' in property '".concat(key, ": ").concat(value, "'."), info);
  103242. }
  103243. };
  103244. /* harmony default export */ var NaNLinter = (NaNLinter_linter);
  103245. ;// ./node_modules/@ant-design/cssinjs/es/linters/parentSelectorLinter.js
  103246. var parentSelectorLinter_linter = function linter(key, value, info) {
  103247. if (info.parentSelectors.some(function (selector) {
  103248. var selectors = selector.split(',');
  103249. return selectors.some(function (item) {
  103250. return item.split('&').length > 2;
  103251. });
  103252. })) {
  103253. lintWarning('Should not use more than one `&` in a selector.', info);
  103254. }
  103255. };
  103256. /* harmony default export */ var parentSelectorLinter = (parentSelectorLinter_linter);
  103257. ;// ./node_modules/@ant-design/cssinjs/es/linters/index.js
  103258. ;// ./node_modules/@ant-design/cssinjs/es/util/cacheMapUtil.js
  103259. var ATTR_CACHE_MAP = 'data-ant-cssinjs-cache-path';
  103260. /**
  103261. * This marks style from the css file.
  103262. * Which means not exist in `<style />` tag.
  103263. */
  103264. var CSS_FILE_STYLE = '_FILE_STYLE__';
  103265. function cacheMapUtil_serialize(cachePathMap) {
  103266. return Object.keys(cachePathMap).map(function (path) {
  103267. var hash = cachePathMap[path];
  103268. return "".concat(path, ":").concat(hash);
  103269. }).join(';');
  103270. }
  103271. var cachePathMap;
  103272. var fromCSSFile = true;
  103273. /**
  103274. * @private Test usage only. Can save remove if no need.
  103275. */
  103276. function cacheMapUtil_reset(mockCache) {
  103277. var fromFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  103278. cachePathMap = mockCache;
  103279. fromCSSFile = fromFile;
  103280. }
  103281. function prepare() {
  103282. if (!cachePathMap) {
  103283. cachePathMap = {};
  103284. if ((0,canUseDom["default"])()) {
  103285. var div = document.createElement('div');
  103286. div.className = ATTR_CACHE_MAP;
  103287. div.style.position = 'fixed';
  103288. div.style.visibility = 'hidden';
  103289. div.style.top = '-9999px';
  103290. document.body.appendChild(div);
  103291. var content = getComputedStyle(div).content || '';
  103292. content = content.replace(/^"/, '').replace(/"$/, '');
  103293. // Fill data
  103294. content.split(';').forEach(function (item) {
  103295. var _item$split = item.split(':'),
  103296. _item$split2 = (0,slicedToArray["default"])(_item$split, 2),
  103297. path = _item$split2[0],
  103298. hash = _item$split2[1];
  103299. cachePathMap[path] = hash;
  103300. });
  103301. // Remove inline record style
  103302. var inlineMapStyle = document.querySelector("style[".concat(ATTR_CACHE_MAP, "]"));
  103303. if (inlineMapStyle) {
  103304. var _inlineMapStyle$paren;
  103305. fromCSSFile = false;
  103306. (_inlineMapStyle$paren = inlineMapStyle.parentNode) === null || _inlineMapStyle$paren === void 0 || _inlineMapStyle$paren.removeChild(inlineMapStyle);
  103307. }
  103308. document.body.removeChild(div);
  103309. }
  103310. }
  103311. }
  103312. function existPath(path) {
  103313. prepare();
  103314. return !!cachePathMap[path];
  103315. }
  103316. function getStyleAndHash(path) {
  103317. var hash = cachePathMap[path];
  103318. var styleStr = null;
  103319. if (hash && (0,canUseDom["default"])()) {
  103320. if (fromCSSFile) {
  103321. styleStr = CSS_FILE_STYLE;
  103322. } else {
  103323. var _style = document.querySelector("style[".concat(ATTR_MARK, "=\"").concat(cachePathMap[path], "\"]"));
  103324. if (_style) {
  103325. styleStr = _style.innerHTML;
  103326. } else {
  103327. // Clean up since not exist anymore
  103328. delete cachePathMap[path];
  103329. }
  103330. }
  103331. }
  103332. return [styleStr, hash];
  103333. }
  103334. ;// ./node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js
  103335. // @ts-ignore
  103336. var SKIP_CHECK = '_skip_check_';
  103337. var MULTI_VALUE = '_multi_value_';
  103338. // ============================================================================
  103339. // == Parser ==
  103340. // ============================================================================
  103341. // Preprocessor style content to browser support one
  103342. function normalizeStyle(styleStr) {
  103343. var serialized = serialize(compile(styleStr), stringify);
  103344. return serialized.replace(/\{%%%\:[^;];}/g, ';');
  103345. }
  103346. function isCompoundCSSProperty(value) {
  103347. return (0,esm_typeof["default"])(value) === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);
  103348. }
  103349. // 注入 hash 值
  103350. function injectSelectorHash(key, hashId, hashPriority) {
  103351. if (!hashId) {
  103352. return key;
  103353. }
  103354. var hashClassName = ".".concat(hashId);
  103355. var hashSelector = hashPriority === 'low' ? ":where(".concat(hashClassName, ")") : hashClassName;
  103356. // 注入 hashId
  103357. var keys = key.split(',').map(function (k) {
  103358. var _firstPath$match;
  103359. var fullPath = k.trim().split(/\s+/);
  103360. // 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。
  103361. var firstPath = fullPath[0] || '';
  103362. var htmlElement = ((_firstPath$match = firstPath.match(/^\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';
  103363. firstPath = "".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));
  103364. return [firstPath].concat((0,toConsumableArray["default"])(fullPath.slice(1))).join(' ');
  103365. });
  103366. return keys.join(',');
  103367. }
  103368. // Parse CSSObject to style content
  103369. var parseStyle = function parseStyle(interpolation) {
  103370. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  103371. var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
  103372. root: true,
  103373. parentSelectors: []
  103374. },
  103375. root = _ref.root,
  103376. injectHash = _ref.injectHash,
  103377. parentSelectors = _ref.parentSelectors;
  103378. var hashId = config.hashId,
  103379. layer = config.layer,
  103380. path = config.path,
  103381. hashPriority = config.hashPriority,
  103382. _config$transformers = config.transformers,
  103383. transformers = _config$transformers === void 0 ? [] : _config$transformers,
  103384. _config$linters = config.linters,
  103385. linters = _config$linters === void 0 ? [] : _config$linters;
  103386. var styleStr = '';
  103387. var effectStyle = {};
  103388. function parseKeyframes(keyframes) {
  103389. var animationName = keyframes.getName(hashId);
  103390. if (!effectStyle[animationName]) {
  103391. var _parseStyle = parseStyle(keyframes.style, config, {
  103392. root: false,
  103393. parentSelectors: parentSelectors
  103394. }),
  103395. _parseStyle2 = (0,slicedToArray["default"])(_parseStyle, 1),
  103396. _parsedStr = _parseStyle2[0];
  103397. effectStyle[animationName] = "@keyframes ".concat(keyframes.getName(hashId)).concat(_parsedStr);
  103398. }
  103399. }
  103400. function flattenList(list) {
  103401. var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  103402. list.forEach(function (item) {
  103403. if (Array.isArray(item)) {
  103404. flattenList(item, fullList);
  103405. } else if (item) {
  103406. fullList.push(item);
  103407. }
  103408. });
  103409. return fullList;
  103410. }
  103411. var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);
  103412. flattenStyleList.forEach(function (originStyle) {
  103413. // Only root level can use raw string
  103414. var style = typeof originStyle === 'string' && !root ? {} : originStyle;
  103415. if (typeof style === 'string') {
  103416. styleStr += "".concat(style, "\n");
  103417. } else if (style._keyframe) {
  103418. // Keyframe
  103419. parseKeyframes(style);
  103420. } else {
  103421. var mergedStyle = transformers.reduce(function (prev, trans) {
  103422. var _trans$visit;
  103423. return (trans === null || trans === void 0 || (_trans$visit = trans.visit) === null || _trans$visit === void 0 ? void 0 : _trans$visit.call(trans, prev)) || prev;
  103424. }, style);
  103425. // Normal CSSObject
  103426. Object.keys(mergedStyle).forEach(function (key) {
  103427. var value = mergedStyle[key];
  103428. if ((0,esm_typeof["default"])(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {
  103429. var subInjectHash = false;
  103430. // 当成嵌套对象来处理
  103431. var mergedKey = key.trim();
  103432. // Whether treat child as root. In most case it is false.
  103433. var nextRoot = false;
  103434. // 拆分多个选择器
  103435. if ((root || injectHash) && hashId) {
  103436. if (mergedKey.startsWith('@')) {
  103437. // 略过媒体查询,交给子节点继续插入 hashId
  103438. subInjectHash = true;
  103439. } else if (mergedKey === '&') {
  103440. // 抹掉 root selector 上的单个 &
  103441. mergedKey = injectSelectorHash('', hashId, hashPriority);
  103442. } else {
  103443. // 注入 hashId
  103444. mergedKey = injectSelectorHash(key, hashId, hashPriority);
  103445. }
  103446. } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {
  103447. // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,
  103448. // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.
  103449. // But it does not conform to stylis syntax,
  103450. // and finally we will get `{color:red;}` as css, which is wrong.
  103451. // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.
  103452. mergedKey = '';
  103453. nextRoot = true;
  103454. }
  103455. var _parseStyle3 = parseStyle(value, config, {
  103456. root: nextRoot,
  103457. injectHash: subInjectHash,
  103458. parentSelectors: [].concat((0,toConsumableArray["default"])(parentSelectors), [mergedKey])
  103459. }),
  103460. _parseStyle4 = (0,slicedToArray["default"])(_parseStyle3, 2),
  103461. _parsedStr2 = _parseStyle4[0],
  103462. childEffectStyle = _parseStyle4[1];
  103463. effectStyle = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, effectStyle), childEffectStyle);
  103464. styleStr += "".concat(mergedKey).concat(_parsedStr2);
  103465. } else {
  103466. var _value;
  103467. function appendStyle(cssKey, cssValue) {
  103468. if ( true && ((0,esm_typeof["default"])(value) !== 'object' || !(value !== null && value !== void 0 && value[SKIP_CHECK]))) {
  103469. [contentQuotesLinter, hashedAnimationLinter].concat((0,toConsumableArray["default"])(linters)).forEach(function (linter) {
  103470. return linter(cssKey, cssValue, {
  103471. path: path,
  103472. hashId: hashId,
  103473. parentSelectors: parentSelectors
  103474. });
  103475. });
  103476. }
  103477. // 如果是样式则直接插入
  103478. var styleName = cssKey.replace(/[A-Z]/g, function (match) {
  103479. return "-".concat(match.toLowerCase());
  103480. });
  103481. // Auto suffix with px
  103482. var formatValue = cssValue;
  103483. if (!unitless_browser_esm[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {
  103484. formatValue = "".concat(formatValue, "px");
  103485. }
  103486. // handle animationName & Keyframe value
  103487. if (cssKey === 'animationName' && cssValue !== null && cssValue !== void 0 && cssValue._keyframe) {
  103488. parseKeyframes(cssValue);
  103489. formatValue = cssValue.getName(hashId);
  103490. }
  103491. styleStr += "".concat(styleName, ":").concat(formatValue, ";");
  103492. }
  103493. var actualValue = (_value = value === null || value === void 0 ? void 0 : value.value) !== null && _value !== void 0 ? _value : value;
  103494. if ((0,esm_typeof["default"])(value) === 'object' && value !== null && value !== void 0 && value[MULTI_VALUE] && Array.isArray(actualValue)) {
  103495. actualValue.forEach(function (item) {
  103496. appendStyle(key, item);
  103497. });
  103498. } else {
  103499. appendStyle(key, actualValue);
  103500. }
  103501. }
  103502. });
  103503. }
  103504. });
  103505. if (!root) {
  103506. styleStr = "{".concat(styleStr, "}");
  103507. } else if (layer) {
  103508. // fixme: https://github.com/thysultan/stylis/pull/339
  103509. if (styleStr) {
  103510. styleStr = "@layer ".concat(layer.name, " {").concat(styleStr, "}");
  103511. }
  103512. if (layer.dependencies) {
  103513. effectStyle["@layer ".concat(layer.name)] = layer.dependencies.map(function (deps) {
  103514. return "@layer ".concat(deps, ", ").concat(layer.name, ";");
  103515. }).join('\n');
  103516. }
  103517. }
  103518. return [styleStr, effectStyle];
  103519. };
  103520. // ============================================================================
  103521. // == Register ==
  103522. // ============================================================================
  103523. function uniqueHash(path, styleStr) {
  103524. return hash_browser_esm("".concat(path.join('%')).concat(styleStr));
  103525. }
  103526. function Empty() {
  103527. return null;
  103528. }
  103529. var STYLE_PREFIX = 'style';
  103530. /**
  103531. * Register a style to the global style sheet.
  103532. */
  103533. function useStyleRegister(info, styleFn) {
  103534. var token = info.token,
  103535. path = info.path,
  103536. hashId = info.hashId,
  103537. layer = info.layer,
  103538. nonce = info.nonce,
  103539. clientOnly = info.clientOnly,
  103540. _info$order = info.order,
  103541. order = _info$order === void 0 ? 0 : _info$order;
  103542. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(es_StyleContext),
  103543. autoClear = _React$useContext.autoClear,
  103544. mock = _React$useContext.mock,
  103545. defaultCache = _React$useContext.defaultCache,
  103546. hashPriority = _React$useContext.hashPriority,
  103547. container = _React$useContext.container,
  103548. ssrInline = _React$useContext.ssrInline,
  103549. transformers = _React$useContext.transformers,
  103550. linters = _React$useContext.linters,
  103551. cache = _React$useContext.cache,
  103552. enableLayer = _React$useContext.layer;
  103553. var tokenKey = token._tokenKey;
  103554. var fullPath = [tokenKey];
  103555. if (enableLayer) {
  103556. fullPath.push('layer');
  103557. }
  103558. fullPath.push.apply(fullPath, (0,toConsumableArray["default"])(path));
  103559. // Check if need insert style
  103560. var isMergedClientSide = isClientSide;
  103561. if ( true && mock !== undefined) {
  103562. isMergedClientSide = mock === 'client';
  103563. }
  103564. var _useGlobalCache = useGlobalCache(STYLE_PREFIX, fullPath,
  103565. // Create cache if needed
  103566. function () {
  103567. var cachePath = fullPath.join('|');
  103568. // Get style from SSR inline style directly
  103569. if (existPath(cachePath)) {
  103570. var _getStyleAndHash = getStyleAndHash(cachePath),
  103571. _getStyleAndHash2 = (0,slicedToArray["default"])(_getStyleAndHash, 2),
  103572. inlineCacheStyleStr = _getStyleAndHash2[0],
  103573. styleHash = _getStyleAndHash2[1];
  103574. if (inlineCacheStyleStr) {
  103575. return [inlineCacheStyleStr, tokenKey, styleHash, {}, clientOnly, order];
  103576. }
  103577. }
  103578. // Generate style
  103579. var styleObj = styleFn();
  103580. var _parseStyle5 = parseStyle(styleObj, {
  103581. hashId: hashId,
  103582. hashPriority: hashPriority,
  103583. layer: enableLayer ? layer : undefined,
  103584. path: path.join('-'),
  103585. transformers: transformers,
  103586. linters: linters
  103587. }),
  103588. _parseStyle6 = (0,slicedToArray["default"])(_parseStyle5, 2),
  103589. parsedStyle = _parseStyle6[0],
  103590. effectStyle = _parseStyle6[1];
  103591. var styleStr = normalizeStyle(parsedStyle);
  103592. var styleId = uniqueHash(fullPath, styleStr);
  103593. return [styleStr, tokenKey, styleId, effectStyle, clientOnly, order];
  103594. },
  103595. // Remove cache if no need
  103596. function (_ref2, fromHMR) {
  103597. var _ref3 = (0,slicedToArray["default"])(_ref2, 3),
  103598. styleId = _ref3[2];
  103599. if ((fromHMR || autoClear) && isClientSide) {
  103600. (0,dynamicCSS.removeCSS)(styleId, {
  103601. mark: ATTR_MARK,
  103602. attachTo: container
  103603. });
  103604. }
  103605. },
  103606. // Effect: Inject style here
  103607. function (_ref4) {
  103608. var _ref5 = (0,slicedToArray["default"])(_ref4, 4),
  103609. styleStr = _ref5[0],
  103610. _ = _ref5[1],
  103611. styleId = _ref5[2],
  103612. effectStyle = _ref5[3];
  103613. if (isMergedClientSide && styleStr !== CSS_FILE_STYLE) {
  103614. var mergedCSSConfig = {
  103615. mark: ATTR_MARK,
  103616. prepend: enableLayer ? false : 'queue',
  103617. attachTo: container,
  103618. priority: order
  103619. };
  103620. var nonceStr = typeof nonce === 'function' ? nonce() : nonce;
  103621. if (nonceStr) {
  103622. mergedCSSConfig.csp = {
  103623. nonce: nonceStr
  103624. };
  103625. }
  103626. // ================= Split Effect Style =================
  103627. // We will split effectStyle here since @layer should be at the top level
  103628. var effectLayerKeys = [];
  103629. var effectRestKeys = [];
  103630. Object.keys(effectStyle).forEach(function (key) {
  103631. if (key.startsWith('@layer')) {
  103632. effectLayerKeys.push(key);
  103633. } else {
  103634. effectRestKeys.push(key);
  103635. }
  103636. });
  103637. // ================= Inject Layer Style =================
  103638. // Inject layer style
  103639. effectLayerKeys.forEach(function (effectKey) {
  103640. (0,dynamicCSS.updateCSS)(normalizeStyle(effectStyle[effectKey]), "_layer-".concat(effectKey), (0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedCSSConfig), {}, {
  103641. prepend: true
  103642. }));
  103643. });
  103644. // ==================== Inject Style ====================
  103645. // Inject style
  103646. var style = (0,dynamicCSS.updateCSS)(styleStr, styleId, mergedCSSConfig);
  103647. style[CSS_IN_JS_INSTANCE] = cache.instanceId;
  103648. // Used for `useCacheToken` to remove on batch when token removed
  103649. style.setAttribute(ATTR_TOKEN, tokenKey);
  103650. // Debug usage. Dev only
  103651. if (true) {
  103652. style.setAttribute(ATTR_CACHE_PATH, fullPath.join('|'));
  103653. }
  103654. // ================ Inject Effect Style =================
  103655. // Inject client side effect style
  103656. effectRestKeys.forEach(function (effectKey) {
  103657. (0,dynamicCSS.updateCSS)(normalizeStyle(effectStyle[effectKey]), "_effect-".concat(effectKey), mergedCSSConfig);
  103658. });
  103659. }
  103660. }),
  103661. _useGlobalCache2 = (0,slicedToArray["default"])(_useGlobalCache, 3),
  103662. cachedStyleStr = _useGlobalCache2[0],
  103663. cachedTokenKey = _useGlobalCache2[1],
  103664. cachedStyleId = _useGlobalCache2[2];
  103665. return function (node) {
  103666. var styleNode;
  103667. if (!ssrInline || isMergedClientSide || !defaultCache) {
  103668. styleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Empty, null);
  103669. } else {
  103670. styleNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("style", (0,esm_extends["default"])({}, (0,defineProperty["default"])((0,defineProperty["default"])({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {
  103671. dangerouslySetInnerHTML: {
  103672. __html: cachedStyleStr
  103673. }
  103674. }));
  103675. }
  103676. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, null, styleNode, node);
  103677. };
  103678. }
  103679. var useStyleRegister_extract = function extract(cache, effectStyles, options) {
  103680. var _cache = (0,slicedToArray["default"])(cache, 6),
  103681. styleStr = _cache[0],
  103682. tokenKey = _cache[1],
  103683. styleId = _cache[2],
  103684. effectStyle = _cache[3],
  103685. clientOnly = _cache[4],
  103686. order = _cache[5];
  103687. var _ref7 = options || {},
  103688. plain = _ref7.plain;
  103689. // Skip client only style
  103690. if (clientOnly) {
  103691. return null;
  103692. }
  103693. var keyStyleText = styleStr;
  103694. // ====================== Share ======================
  103695. // Used for rc-util
  103696. var sharedAttrs = {
  103697. 'data-rc-order': 'prependQueue',
  103698. 'data-rc-priority': "".concat(order)
  103699. };
  103700. // ====================== Style ======================
  103701. keyStyleText = toStyleStr(styleStr, tokenKey, styleId, sharedAttrs, plain);
  103702. // =============== Create effect style ===============
  103703. if (effectStyle) {
  103704. Object.keys(effectStyle).forEach(function (effectKey) {
  103705. // Effect style can be reused
  103706. if (!effectStyles[effectKey]) {
  103707. effectStyles[effectKey] = true;
  103708. var effectStyleStr = normalizeStyle(effectStyle[effectKey]);
  103709. var effectStyleHTML = toStyleStr(effectStyleStr, tokenKey, "_effect-".concat(effectKey), sharedAttrs, plain);
  103710. if (effectKey.startsWith('@layer')) {
  103711. keyStyleText = effectStyleHTML + keyStyleText;
  103712. } else {
  103713. keyStyleText += effectStyleHTML;
  103714. }
  103715. }
  103716. });
  103717. }
  103718. return [order, styleId, keyStyleText];
  103719. };
  103720. ;// ./node_modules/@ant-design/cssinjs/es/hooks/useCSSVarRegister.js
  103721. var CSS_VAR_PREFIX = 'cssVar';
  103722. var useCSSVarRegister = function useCSSVarRegister(config, fn) {
  103723. var key = config.key,
  103724. prefix = config.prefix,
  103725. unitless = config.unitless,
  103726. ignore = config.ignore,
  103727. token = config.token,
  103728. _config$scope = config.scope,
  103729. scope = _config$scope === void 0 ? '' : _config$scope;
  103730. var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(es_StyleContext),
  103731. instanceId = _useContext.cache.instanceId,
  103732. container = _useContext.container;
  103733. var tokenKey = token._tokenKey;
  103734. var stylePath = [].concat((0,toConsumableArray["default"])(config.path), [key, scope, tokenKey]);
  103735. var cache = useGlobalCache(CSS_VAR_PREFIX, stylePath, function () {
  103736. var originToken = fn();
  103737. var _transformToken = transformToken(originToken, key, {
  103738. prefix: prefix,
  103739. unitless: unitless,
  103740. ignore: ignore,
  103741. scope: scope
  103742. }),
  103743. _transformToken2 = (0,slicedToArray["default"])(_transformToken, 2),
  103744. mergedToken = _transformToken2[0],
  103745. cssVarsStr = _transformToken2[1];
  103746. var styleId = uniqueHash(stylePath, cssVarsStr);
  103747. return [mergedToken, cssVarsStr, styleId, key];
  103748. }, function (_ref) {
  103749. var _ref2 = (0,slicedToArray["default"])(_ref, 3),
  103750. styleId = _ref2[2];
  103751. if (isClientSide) {
  103752. (0,dynamicCSS.removeCSS)(styleId, {
  103753. mark: ATTR_MARK,
  103754. attachTo: container
  103755. });
  103756. }
  103757. }, function (_ref3) {
  103758. var _ref4 = (0,slicedToArray["default"])(_ref3, 3),
  103759. cssVarsStr = _ref4[1],
  103760. styleId = _ref4[2];
  103761. if (!cssVarsStr) {
  103762. return;
  103763. }
  103764. var style = (0,dynamicCSS.updateCSS)(cssVarsStr, styleId, {
  103765. mark: ATTR_MARK,
  103766. prepend: 'queue',
  103767. attachTo: container,
  103768. priority: -999
  103769. });
  103770. style[CSS_IN_JS_INSTANCE] = instanceId;
  103771. // Used for `useCacheToken` to remove on batch when token removed
  103772. style.setAttribute(ATTR_TOKEN, key);
  103773. });
  103774. return cache;
  103775. };
  103776. var useCSSVarRegister_extract = function extract(cache, effectStyles, options) {
  103777. var _cache = (0,slicedToArray["default"])(cache, 4),
  103778. styleStr = _cache[1],
  103779. styleId = _cache[2],
  103780. cssVarKey = _cache[3];
  103781. var _ref5 = options || {},
  103782. plain = _ref5.plain;
  103783. if (!styleStr) {
  103784. return null;
  103785. }
  103786. var order = -999;
  103787. // ====================== Style ======================
  103788. // Used for rc-util
  103789. var sharedAttrs = {
  103790. 'data-rc-order': 'prependQueue',
  103791. 'data-rc-priority': "".concat(order)
  103792. };
  103793. var styleText = toStyleStr(styleStr, cssVarKey, styleId, sharedAttrs, plain);
  103794. return [order, styleId, styleText];
  103795. };
  103796. /* harmony default export */ var hooks_useCSSVarRegister = (useCSSVarRegister);
  103797. ;// ./node_modules/@ant-design/cssinjs/es/extractStyle.js
  103798. var ExtractStyleFns = (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STYLE_PREFIX, useStyleRegister_extract), TOKEN_PREFIX, extract), CSS_VAR_PREFIX, useCSSVarRegister_extract);
  103799. function isNotNull(value) {
  103800. return value !== null;
  103801. }
  103802. function extractStyle(cache, options) {
  103803. var _ref = typeof options === 'boolean' ? {
  103804. plain: options
  103805. } : options || {},
  103806. _ref$plain = _ref.plain,
  103807. plain = _ref$plain === void 0 ? false : _ref$plain,
  103808. _ref$types = _ref.types,
  103809. types = _ref$types === void 0 ? ['style', 'token', 'cssVar'] : _ref$types,
  103810. _ref$once = _ref.once,
  103811. once = _ref$once === void 0 ? false : _ref$once;
  103812. var matchPrefixRegexp = new RegExp("^(".concat((typeof types === 'string' ? [types] : types).join('|'), ")%"));
  103813. // prefix with `style` is used for `useStyleRegister` to cache style context
  103814. var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {
  103815. return matchPrefixRegexp.test(key);
  103816. });
  103817. // Common effect styles like animation
  103818. var effectStyles = {};
  103819. // Mapping of cachePath to style hash
  103820. var cachePathMap = {};
  103821. var styleText = '';
  103822. styleKeys.map(function (key) {
  103823. if (once && cache.extracted.has(key)) {
  103824. return null; // Skip if already extracted
  103825. }
  103826. var cachePath = key.replace(matchPrefixRegexp, '').replace(/%/g, '|');
  103827. var _key$split = key.split('%'),
  103828. _key$split2 = (0,slicedToArray["default"])(_key$split, 1),
  103829. prefix = _key$split2[0];
  103830. var extractFn = ExtractStyleFns[prefix];
  103831. var extractedStyle = extractFn(cache.cache.get(key)[1], effectStyles, {
  103832. plain: plain
  103833. });
  103834. if (!extractedStyle) {
  103835. return null;
  103836. }
  103837. var _extractedStyle = (0,slicedToArray["default"])(extractedStyle, 3),
  103838. order = _extractedStyle[0],
  103839. styleId = _extractedStyle[1],
  103840. styleStr = _extractedStyle[2];
  103841. if (key.startsWith('style')) {
  103842. cachePathMap[cachePath] = styleId;
  103843. }
  103844. // record that this style has been extracted
  103845. cache.extracted.add(key);
  103846. return [order, styleStr];
  103847. }).filter(isNotNull).sort(function (_ref2, _ref3) {
  103848. var _ref4 = (0,slicedToArray["default"])(_ref2, 1),
  103849. o1 = _ref4[0];
  103850. var _ref5 = (0,slicedToArray["default"])(_ref3, 1),
  103851. o2 = _ref5[0];
  103852. return o1 - o2;
  103853. }).forEach(function (_ref6) {
  103854. var _ref7 = (0,slicedToArray["default"])(_ref6, 2),
  103855. style = _ref7[1];
  103856. styleText += style;
  103857. });
  103858. // ==================== Fill Cache Path ====================
  103859. styleText += toStyleStr(".".concat(ATTR_CACHE_MAP, "{content:\"").concat(cacheMapUtil_serialize(cachePathMap), "\";}"), undefined, undefined, (0,defineProperty["default"])({}, ATTR_CACHE_MAP, ATTR_CACHE_MAP), plain);
  103860. return styleText;
  103861. }
  103862. ;// ./node_modules/@ant-design/cssinjs/es/Keyframes.js
  103863. var Keyframe = /*#__PURE__*/function () {
  103864. function Keyframe(name, style) {
  103865. (0,classCallCheck["default"])(this, Keyframe);
  103866. (0,defineProperty["default"])(this, "name", void 0);
  103867. (0,defineProperty["default"])(this, "style", void 0);
  103868. (0,defineProperty["default"])(this, "_keyframe", true);
  103869. this.name = name;
  103870. this.style = style;
  103871. }
  103872. (0,createClass["default"])(Keyframe, [{
  103873. key: "getName",
  103874. value: function getName() {
  103875. var hashId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  103876. return hashId ? "".concat(hashId, "-").concat(this.name) : this.name;
  103877. }
  103878. }]);
  103879. return Keyframe;
  103880. }();
  103881. /* harmony default export */ var Keyframes = (Keyframe);
  103882. ;// ./node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.js
  103883. function splitValues(value) {
  103884. if (typeof value === 'number') {
  103885. return [[value], false];
  103886. }
  103887. var rawStyle = String(value).trim();
  103888. var importantCells = rawStyle.match(/(.*)(!important)/);
  103889. var splitStyle = (importantCells ? importantCells[1] : rawStyle).trim().split(/\s+/);
  103890. // Combine styles split in brackets, like `calc(1px + 2px)`
  103891. var temp = [];
  103892. var brackets = 0;
  103893. return [splitStyle.reduce(function (list, item) {
  103894. if (item.includes('(') || item.includes(')')) {
  103895. var left = item.split('(').length - 1;
  103896. var right = item.split(')').length - 1;
  103897. brackets += left - right;
  103898. }
  103899. if (brackets >= 0) temp.push(item);
  103900. if (brackets === 0) {
  103901. list.push(temp.join(' '));
  103902. temp = [];
  103903. }
  103904. return list;
  103905. }, []), !!importantCells];
  103906. }
  103907. function noSplit(list) {
  103908. list.notSplit = true;
  103909. return list;
  103910. }
  103911. var keyMap = {
  103912. // Inset
  103913. inset: ['top', 'right', 'bottom', 'left'],
  103914. insetBlock: ['top', 'bottom'],
  103915. insetBlockStart: ['top'],
  103916. insetBlockEnd: ['bottom'],
  103917. insetInline: ['left', 'right'],
  103918. insetInlineStart: ['left'],
  103919. insetInlineEnd: ['right'],
  103920. // Margin
  103921. marginBlock: ['marginTop', 'marginBottom'],
  103922. marginBlockStart: ['marginTop'],
  103923. marginBlockEnd: ['marginBottom'],
  103924. marginInline: ['marginLeft', 'marginRight'],
  103925. marginInlineStart: ['marginLeft'],
  103926. marginInlineEnd: ['marginRight'],
  103927. // Padding
  103928. paddingBlock: ['paddingTop', 'paddingBottom'],
  103929. paddingBlockStart: ['paddingTop'],
  103930. paddingBlockEnd: ['paddingBottom'],
  103931. paddingInline: ['paddingLeft', 'paddingRight'],
  103932. paddingInlineStart: ['paddingLeft'],
  103933. paddingInlineEnd: ['paddingRight'],
  103934. // Border
  103935. borderBlock: noSplit(['borderTop', 'borderBottom']),
  103936. borderBlockStart: noSplit(['borderTop']),
  103937. borderBlockEnd: noSplit(['borderBottom']),
  103938. borderInline: noSplit(['borderLeft', 'borderRight']),
  103939. borderInlineStart: noSplit(['borderLeft']),
  103940. borderInlineEnd: noSplit(['borderRight']),
  103941. // Border width
  103942. borderBlockWidth: ['borderTopWidth', 'borderBottomWidth'],
  103943. borderBlockStartWidth: ['borderTopWidth'],
  103944. borderBlockEndWidth: ['borderBottomWidth'],
  103945. borderInlineWidth: ['borderLeftWidth', 'borderRightWidth'],
  103946. borderInlineStartWidth: ['borderLeftWidth'],
  103947. borderInlineEndWidth: ['borderRightWidth'],
  103948. // Border style
  103949. borderBlockStyle: ['borderTopStyle', 'borderBottomStyle'],
  103950. borderBlockStartStyle: ['borderTopStyle'],
  103951. borderBlockEndStyle: ['borderBottomStyle'],
  103952. borderInlineStyle: ['borderLeftStyle', 'borderRightStyle'],
  103953. borderInlineStartStyle: ['borderLeftStyle'],
  103954. borderInlineEndStyle: ['borderRightStyle'],
  103955. // Border color
  103956. borderBlockColor: ['borderTopColor', 'borderBottomColor'],
  103957. borderBlockStartColor: ['borderTopColor'],
  103958. borderBlockEndColor: ['borderBottomColor'],
  103959. borderInlineColor: ['borderLeftColor', 'borderRightColor'],
  103960. borderInlineStartColor: ['borderLeftColor'],
  103961. borderInlineEndColor: ['borderRightColor'],
  103962. // Border radius
  103963. borderStartStartRadius: ['borderTopLeftRadius'],
  103964. borderStartEndRadius: ['borderTopRightRadius'],
  103965. borderEndStartRadius: ['borderBottomLeftRadius'],
  103966. borderEndEndRadius: ['borderBottomRightRadius']
  103967. };
  103968. function wrapImportantAndSkipCheck(value, important) {
  103969. var parsedValue = value;
  103970. if (important) {
  103971. parsedValue = "".concat(parsedValue, " !important");
  103972. }
  103973. return {
  103974. _skip_check_: true,
  103975. value: parsedValue
  103976. };
  103977. }
  103978. /**
  103979. * Convert css logical properties to legacy properties.
  103980. * Such as: `margin-block-start` to `margin-top`.
  103981. * Transform list:
  103982. * - inset
  103983. * - margin
  103984. * - padding
  103985. * - border
  103986. */
  103987. var transform = {
  103988. visit: function visit(cssObj) {
  103989. var clone = {};
  103990. Object.keys(cssObj).forEach(function (key) {
  103991. var value = cssObj[key];
  103992. var matchValue = keyMap[key];
  103993. if (matchValue && (typeof value === 'number' || typeof value === 'string')) {
  103994. var _splitValues = splitValues(value),
  103995. _splitValues2 = (0,slicedToArray["default"])(_splitValues, 2),
  103996. _values = _splitValues2[0],
  103997. _important = _splitValues2[1];
  103998. if (matchValue.length && matchValue.notSplit) {
  103999. // not split means always give same value like border
  104000. matchValue.forEach(function (matchKey) {
  104001. clone[matchKey] = wrapImportantAndSkipCheck(value, _important);
  104002. });
  104003. } else if (matchValue.length === 1) {
  104004. // Handle like `marginBlockStart` => `marginTop`
  104005. clone[matchValue[0]] = wrapImportantAndSkipCheck(_values[0], _important);
  104006. } else if (matchValue.length === 2) {
  104007. // Handle like `marginBlock` => `marginTop` & `marginBottom`
  104008. matchValue.forEach(function (matchKey, index) {
  104009. var _values$index;
  104010. clone[matchKey] = wrapImportantAndSkipCheck((_values$index = _values[index]) !== null && _values$index !== void 0 ? _values$index : _values[0], _important);
  104011. });
  104012. } else if (matchValue.length === 4) {
  104013. // Handle like `inset` => `top` & `right` & `bottom` & `left`
  104014. matchValue.forEach(function (matchKey, index) {
  104015. var _ref, _values$index2;
  104016. clone[matchKey] = wrapImportantAndSkipCheck((_ref = (_values$index2 = _values[index]) !== null && _values$index2 !== void 0 ? _values$index2 : _values[index - 2]) !== null && _ref !== void 0 ? _ref : _values[0], _important);
  104017. });
  104018. } else {
  104019. clone[key] = value;
  104020. }
  104021. } else {
  104022. clone[key] = value;
  104023. }
  104024. });
  104025. return clone;
  104026. }
  104027. };
  104028. /* harmony default export */ var legacyLogicalProperties = (transform);
  104029. ;// ./node_modules/@ant-design/cssinjs/es/transformers/px2rem.js
  104030. /**
  104031. * respect https://github.com/cuth/postcss-pxtorem
  104032. */
  104033. // @ts-ignore
  104034. var pxRegex = /url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;
  104035. function toFixed(number, precision) {
  104036. var multiplier = Math.pow(10, precision + 1),
  104037. wholeNumber = Math.floor(number * multiplier);
  104038. return Math.round(wholeNumber / 10) * 10 / multiplier;
  104039. }
  104040. var px2rem_transform = function transform() {
  104041. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  104042. var _options$rootValue = options.rootValue,
  104043. rootValue = _options$rootValue === void 0 ? 16 : _options$rootValue,
  104044. _options$precision = options.precision,
  104045. precision = _options$precision === void 0 ? 5 : _options$precision,
  104046. _options$mediaQuery = options.mediaQuery,
  104047. mediaQuery = _options$mediaQuery === void 0 ? false : _options$mediaQuery;
  104048. var pxReplace = function pxReplace(m, $1) {
  104049. if (!$1) return m;
  104050. var pixels = parseFloat($1);
  104051. // covenant: pixels <= 1, not transform to rem @zombieJ
  104052. if (pixels <= 1) return m;
  104053. var fixedVal = toFixed(pixels / rootValue, precision);
  104054. return "".concat(fixedVal, "rem");
  104055. };
  104056. var visit = function visit(cssObj) {
  104057. var clone = (0,objectSpread2["default"])({}, cssObj);
  104058. Object.entries(cssObj).forEach(function (_ref) {
  104059. var _ref2 = (0,slicedToArray["default"])(_ref, 2),
  104060. key = _ref2[0],
  104061. value = _ref2[1];
  104062. if (typeof value === 'string' && value.includes('px')) {
  104063. var newValue = value.replace(pxRegex, pxReplace);
  104064. clone[key] = newValue;
  104065. }
  104066. // no unit
  104067. if (!unitless_browser_esm[key] && typeof value === 'number' && value !== 0) {
  104068. clone[key] = "".concat(value, "px").replace(pxRegex, pxReplace);
  104069. }
  104070. // Media queries
  104071. var mergedKey = key.trim();
  104072. if (mergedKey.startsWith('@') && mergedKey.includes('px') && mediaQuery) {
  104073. var newKey = key.replace(pxRegex, pxReplace);
  104074. clone[newKey] = clone[key];
  104075. delete clone[key];
  104076. }
  104077. });
  104078. return clone;
  104079. };
  104080. return {
  104081. visit: visit
  104082. };
  104083. };
  104084. /* harmony default export */ var px2rem = (px2rem_transform);
  104085. ;// ./node_modules/@ant-design/cssinjs/es/index.js
  104086. var _experimental = {
  104087. supportModernCSS: function supportModernCSS() {
  104088. return supportWhere() && supportLogicProps();
  104089. }
  104090. };
  104091. /***/ }),
  104092. /***/ "./node_modules/@ant-design/fast-color/es/index.js":
  104093. /*!*********************************************************************!*\
  104094. !*** ./node_modules/@ant-design/fast-color/es/index.js + 2 modules ***!
  104095. \*********************************************************************/
  104096. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  104097. "use strict";
  104098. // EXPORTS
  104099. __webpack_require__.d(__webpack_exports__, {
  104100. FastColor: function() { return /* reexport */ FastColor; }
  104101. });
  104102. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  104103. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  104104. ;// ./node_modules/@ant-design/fast-color/es/FastColor.js
  104105. const round = Math.round;
  104106. /**
  104107. * Support format, alpha unit will check the % mark:
  104108. * - rgba(102, 204, 255, .5) -> [102, 204, 255, 0.5]
  104109. * - rgb(102 204 255 / .5) -> [102, 204, 255, 0.5]
  104110. * - rgb(100%, 50%, 0% / 50%) -> [255, 128, 0, 0.5]
  104111. * - hsl(270, 60, 40, .5) -> [270, 60, 40, 0.5]
  104112. * - hsl(270deg 60% 40% / 50%) -> [270, 60, 40, 0.5]
  104113. *
  104114. * When `base` is provided, the percentage value will be divided by `base`.
  104115. */
  104116. function splitColorStr(str, parseNum) {
  104117. const match = str
  104118. // Remove str before `(`
  104119. .replace(/^[^(]*\((.*)/, '$1')
  104120. // Remove str after `)`
  104121. .replace(/\).*/, '').match(/\d*\.?\d+%?/g) || [];
  104122. const numList = match.map(item => parseFloat(item));
  104123. for (let i = 0; i < 3; i += 1) {
  104124. numList[i] = parseNum(numList[i] || 0, match[i] || '', i);
  104125. }
  104126. // For alpha. 50% should be 0.5
  104127. if (match[3]) {
  104128. numList[3] = match[3].includes('%') ? numList[3] / 100 : numList[3];
  104129. } else {
  104130. // By default, alpha is 1
  104131. numList[3] = 1;
  104132. }
  104133. return numList;
  104134. }
  104135. const parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;
  104136. /** round and limit number to integer between 0-255 */
  104137. function limitRange(value, max) {
  104138. const mergedMax = max || 255;
  104139. if (value > mergedMax) {
  104140. return mergedMax;
  104141. }
  104142. if (value < 0) {
  104143. return 0;
  104144. }
  104145. return value;
  104146. }
  104147. class FastColor {
  104148. constructor(input) {
  104149. /**
  104150. * All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
  104151. */
  104152. (0,defineProperty["default"])(this, "isValid", true);
  104153. /**
  104154. * Red, R in RGB
  104155. */
  104156. (0,defineProperty["default"])(this, "r", 0);
  104157. /**
  104158. * Green, G in RGB
  104159. */
  104160. (0,defineProperty["default"])(this, "g", 0);
  104161. /**
  104162. * Blue, B in RGB
  104163. */
  104164. (0,defineProperty["default"])(this, "b", 0);
  104165. /**
  104166. * Alpha/Opacity, A in RGBA/HSLA
  104167. */
  104168. (0,defineProperty["default"])(this, "a", 1);
  104169. // HSV privates
  104170. (0,defineProperty["default"])(this, "_h", void 0);
  104171. (0,defineProperty["default"])(this, "_s", void 0);
  104172. (0,defineProperty["default"])(this, "_l", void 0);
  104173. (0,defineProperty["default"])(this, "_v", void 0);
  104174. // intermediate variables to calculate HSL/HSV
  104175. (0,defineProperty["default"])(this, "_max", void 0);
  104176. (0,defineProperty["default"])(this, "_min", void 0);
  104177. (0,defineProperty["default"])(this, "_brightness", void 0);
  104178. /**
  104179. * Always check 3 char in the object to determine the format.
  104180. * We not use function in check to save bundle size.
  104181. * e.g. 'rgb' -> { r: 0, g: 0, b: 0 }.
  104182. */
  104183. function matchFormat(str) {
  104184. return str[0] in input && str[1] in input && str[2] in input;
  104185. }
  104186. if (!input) {
  104187. // Do nothing since already initialized
  104188. } else if (typeof input === 'string') {
  104189. const trimStr = input.trim();
  104190. function matchPrefix(prefix) {
  104191. return trimStr.startsWith(prefix);
  104192. }
  104193. if (/^#?[A-F\d]{3,8}$/i.test(trimStr)) {
  104194. this.fromHexString(trimStr);
  104195. } else if (matchPrefix('rgb')) {
  104196. this.fromRgbString(trimStr);
  104197. } else if (matchPrefix('hsl')) {
  104198. this.fromHslString(trimStr);
  104199. } else if (matchPrefix('hsv') || matchPrefix('hsb')) {
  104200. this.fromHsvString(trimStr);
  104201. }
  104202. } else if (input instanceof FastColor) {
  104203. this.r = input.r;
  104204. this.g = input.g;
  104205. this.b = input.b;
  104206. this.a = input.a;
  104207. this._h = input._h;
  104208. this._s = input._s;
  104209. this._l = input._l;
  104210. this._v = input._v;
  104211. } else if (matchFormat('rgb')) {
  104212. this.r = limitRange(input.r);
  104213. this.g = limitRange(input.g);
  104214. this.b = limitRange(input.b);
  104215. this.a = typeof input.a === 'number' ? limitRange(input.a, 1) : 1;
  104216. } else if (matchFormat('hsl')) {
  104217. this.fromHsl(input);
  104218. } else if (matchFormat('hsv')) {
  104219. this.fromHsv(input);
  104220. } else {
  104221. throw new Error('@ant-design/fast-color: unsupported input ' + JSON.stringify(input));
  104222. }
  104223. }
  104224. // ======================= Setter =======================
  104225. setR(value) {
  104226. return this._sc('r', value);
  104227. }
  104228. setG(value) {
  104229. return this._sc('g', value);
  104230. }
  104231. setB(value) {
  104232. return this._sc('b', value);
  104233. }
  104234. setA(value) {
  104235. return this._sc('a', value, 1);
  104236. }
  104237. setHue(value) {
  104238. const hsv = this.toHsv();
  104239. hsv.h = value;
  104240. return this._c(hsv);
  104241. }
  104242. // ======================= Getter =======================
  104243. /**
  104244. * Returns the perceived luminance of a color, from 0-1.
  104245. * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
  104246. */
  104247. getLuminance() {
  104248. function adjustGamma(raw) {
  104249. const val = raw / 255;
  104250. return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
  104251. }
  104252. const R = adjustGamma(this.r);
  104253. const G = adjustGamma(this.g);
  104254. const B = adjustGamma(this.b);
  104255. return 0.2126 * R + 0.7152 * G + 0.0722 * B;
  104256. }
  104257. getHue() {
  104258. if (typeof this._h === 'undefined') {
  104259. const delta = this.getMax() - this.getMin();
  104260. if (delta === 0) {
  104261. this._h = 0;
  104262. } else {
  104263. this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));
  104264. }
  104265. }
  104266. return this._h;
  104267. }
  104268. getSaturation() {
  104269. if (typeof this._s === 'undefined') {
  104270. const delta = this.getMax() - this.getMin();
  104271. if (delta === 0) {
  104272. this._s = 0;
  104273. } else {
  104274. this._s = delta / this.getMax();
  104275. }
  104276. }
  104277. return this._s;
  104278. }
  104279. getLightness() {
  104280. if (typeof this._l === 'undefined') {
  104281. this._l = (this.getMax() + this.getMin()) / 510;
  104282. }
  104283. return this._l;
  104284. }
  104285. getValue() {
  104286. if (typeof this._v === 'undefined') {
  104287. this._v = this.getMax() / 255;
  104288. }
  104289. return this._v;
  104290. }
  104291. /**
  104292. * Returns the perceived brightness of the color, from 0-255.
  104293. * Note: this is not the b of HSB
  104294. * @see http://www.w3.org/TR/AERT#color-contrast
  104295. */
  104296. getBrightness() {
  104297. if (typeof this._brightness === 'undefined') {
  104298. this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1000;
  104299. }
  104300. return this._brightness;
  104301. }
  104302. // ======================== Func ========================
  104303. darken(amount = 10) {
  104304. const h = this.getHue();
  104305. const s = this.getSaturation();
  104306. let l = this.getLightness() - amount / 100;
  104307. if (l < 0) {
  104308. l = 0;
  104309. }
  104310. return this._c({
  104311. h,
  104312. s,
  104313. l,
  104314. a: this.a
  104315. });
  104316. }
  104317. lighten(amount = 10) {
  104318. const h = this.getHue();
  104319. const s = this.getSaturation();
  104320. let l = this.getLightness() + amount / 100;
  104321. if (l > 1) {
  104322. l = 1;
  104323. }
  104324. return this._c({
  104325. h,
  104326. s,
  104327. l,
  104328. a: this.a
  104329. });
  104330. }
  104331. /**
  104332. * Mix the current color a given amount with another color, from 0 to 100.
  104333. * 0 means no mixing (return current color).
  104334. */
  104335. mix(input, amount = 50) {
  104336. const color = this._c(input);
  104337. const p = amount / 100;
  104338. const calc = key => (color[key] - this[key]) * p + this[key];
  104339. const rgba = {
  104340. r: round(calc('r')),
  104341. g: round(calc('g')),
  104342. b: round(calc('b')),
  104343. a: round(calc('a') * 100) / 100
  104344. };
  104345. return this._c(rgba);
  104346. }
  104347. /**
  104348. * Mix the color with pure white, from 0 to 100.
  104349. * Providing 0 will do nothing, providing 100 will always return white.
  104350. */
  104351. tint(amount = 10) {
  104352. return this.mix({
  104353. r: 255,
  104354. g: 255,
  104355. b: 255,
  104356. a: 1
  104357. }, amount);
  104358. }
  104359. /**
  104360. * Mix the color with pure black, from 0 to 100.
  104361. * Providing 0 will do nothing, providing 100 will always return black.
  104362. */
  104363. shade(amount = 10) {
  104364. return this.mix({
  104365. r: 0,
  104366. g: 0,
  104367. b: 0,
  104368. a: 1
  104369. }, amount);
  104370. }
  104371. onBackground(background) {
  104372. const bg = this._c(background);
  104373. const alpha = this.a + bg.a * (1 - this.a);
  104374. const calc = key => {
  104375. return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);
  104376. };
  104377. return this._c({
  104378. r: calc('r'),
  104379. g: calc('g'),
  104380. b: calc('b'),
  104381. a: alpha
  104382. });
  104383. }
  104384. // ======================= Status =======================
  104385. isDark() {
  104386. return this.getBrightness() < 128;
  104387. }
  104388. isLight() {
  104389. return this.getBrightness() >= 128;
  104390. }
  104391. // ======================== MISC ========================
  104392. equals(other) {
  104393. return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
  104394. }
  104395. clone() {
  104396. return this._c(this);
  104397. }
  104398. // ======================= Format =======================
  104399. toHexString() {
  104400. let hex = '#';
  104401. const rHex = (this.r || 0).toString(16);
  104402. hex += rHex.length === 2 ? rHex : '0' + rHex;
  104403. const gHex = (this.g || 0).toString(16);
  104404. hex += gHex.length === 2 ? gHex : '0' + gHex;
  104405. const bHex = (this.b || 0).toString(16);
  104406. hex += bHex.length === 2 ? bHex : '0' + bHex;
  104407. if (typeof this.a === 'number' && this.a >= 0 && this.a < 1) {
  104408. const aHex = round(this.a * 255).toString(16);
  104409. hex += aHex.length === 2 ? aHex : '0' + aHex;
  104410. }
  104411. return hex;
  104412. }
  104413. /** CSS support color pattern */
  104414. toHsl() {
  104415. return {
  104416. h: this.getHue(),
  104417. s: this.getSaturation(),
  104418. l: this.getLightness(),
  104419. a: this.a
  104420. };
  104421. }
  104422. /** CSS support color pattern */
  104423. toHslString() {
  104424. const h = this.getHue();
  104425. const s = round(this.getSaturation() * 100);
  104426. const l = round(this.getLightness() * 100);
  104427. return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;
  104428. }
  104429. /** Same as toHsb */
  104430. toHsv() {
  104431. return {
  104432. h: this.getHue(),
  104433. s: this.getSaturation(),
  104434. v: this.getValue(),
  104435. a: this.a
  104436. };
  104437. }
  104438. toRgb() {
  104439. return {
  104440. r: this.r,
  104441. g: this.g,
  104442. b: this.b,
  104443. a: this.a
  104444. };
  104445. }
  104446. toRgbString() {
  104447. return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;
  104448. }
  104449. toString() {
  104450. return this.toRgbString();
  104451. }
  104452. // ====================== Privates ======================
  104453. /** Return a new FastColor object with one channel changed */
  104454. _sc(rgb, value, max) {
  104455. const clone = this.clone();
  104456. clone[rgb] = limitRange(value, max);
  104457. return clone;
  104458. }
  104459. _c(input) {
  104460. return new this.constructor(input);
  104461. }
  104462. getMax() {
  104463. if (typeof this._max === 'undefined') {
  104464. this._max = Math.max(this.r, this.g, this.b);
  104465. }
  104466. return this._max;
  104467. }
  104468. getMin() {
  104469. if (typeof this._min === 'undefined') {
  104470. this._min = Math.min(this.r, this.g, this.b);
  104471. }
  104472. return this._min;
  104473. }
  104474. fromHexString(trimStr) {
  104475. const withoutPrefix = trimStr.replace('#', '');
  104476. function connectNum(index1, index2) {
  104477. return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);
  104478. }
  104479. if (withoutPrefix.length < 6) {
  104480. // #rgb or #rgba
  104481. this.r = connectNum(0);
  104482. this.g = connectNum(1);
  104483. this.b = connectNum(2);
  104484. this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;
  104485. } else {
  104486. // #rrggbb or #rrggbbaa
  104487. this.r = connectNum(0, 1);
  104488. this.g = connectNum(2, 3);
  104489. this.b = connectNum(4, 5);
  104490. this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;
  104491. }
  104492. }
  104493. fromHsl({
  104494. h,
  104495. s,
  104496. l,
  104497. a
  104498. }) {
  104499. this._h = h % 360;
  104500. this._s = s;
  104501. this._l = l;
  104502. this.a = typeof a === 'number' ? a : 1;
  104503. if (s <= 0) {
  104504. const rgb = round(l * 255);
  104505. this.r = rgb;
  104506. this.g = rgb;
  104507. this.b = rgb;
  104508. }
  104509. let r = 0,
  104510. g = 0,
  104511. b = 0;
  104512. const huePrime = h / 60;
  104513. const chroma = (1 - Math.abs(2 * l - 1)) * s;
  104514. const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
  104515. if (huePrime >= 0 && huePrime < 1) {
  104516. r = chroma;
  104517. g = secondComponent;
  104518. } else if (huePrime >= 1 && huePrime < 2) {
  104519. r = secondComponent;
  104520. g = chroma;
  104521. } else if (huePrime >= 2 && huePrime < 3) {
  104522. g = chroma;
  104523. b = secondComponent;
  104524. } else if (huePrime >= 3 && huePrime < 4) {
  104525. g = secondComponent;
  104526. b = chroma;
  104527. } else if (huePrime >= 4 && huePrime < 5) {
  104528. r = secondComponent;
  104529. b = chroma;
  104530. } else if (huePrime >= 5 && huePrime < 6) {
  104531. r = chroma;
  104532. b = secondComponent;
  104533. }
  104534. const lightnessModification = l - chroma / 2;
  104535. this.r = round((r + lightnessModification) * 255);
  104536. this.g = round((g + lightnessModification) * 255);
  104537. this.b = round((b + lightnessModification) * 255);
  104538. }
  104539. fromHsv({
  104540. h,
  104541. s,
  104542. v,
  104543. a
  104544. }) {
  104545. this._h = h % 360;
  104546. this._s = s;
  104547. this._v = v;
  104548. this.a = typeof a === 'number' ? a : 1;
  104549. const vv = round(v * 255);
  104550. this.r = vv;
  104551. this.g = vv;
  104552. this.b = vv;
  104553. if (s <= 0) {
  104554. return;
  104555. }
  104556. const hh = h / 60;
  104557. const i = Math.floor(hh);
  104558. const ff = hh - i;
  104559. const p = round(v * (1.0 - s) * 255);
  104560. const q = round(v * (1.0 - s * ff) * 255);
  104561. const t = round(v * (1.0 - s * (1.0 - ff)) * 255);
  104562. switch (i) {
  104563. case 0:
  104564. this.g = t;
  104565. this.b = p;
  104566. break;
  104567. case 1:
  104568. this.r = q;
  104569. this.b = p;
  104570. break;
  104571. case 2:
  104572. this.r = p;
  104573. this.b = t;
  104574. break;
  104575. case 3:
  104576. this.r = p;
  104577. this.g = q;
  104578. break;
  104579. case 4:
  104580. this.r = t;
  104581. this.g = p;
  104582. break;
  104583. case 5:
  104584. default:
  104585. this.g = p;
  104586. this.b = q;
  104587. break;
  104588. }
  104589. }
  104590. fromHsvString(trimStr) {
  104591. const cells = splitColorStr(trimStr, parseHSVorHSL);
  104592. this.fromHsv({
  104593. h: cells[0],
  104594. s: cells[1],
  104595. v: cells[2],
  104596. a: cells[3]
  104597. });
  104598. }
  104599. fromHslString(trimStr) {
  104600. const cells = splitColorStr(trimStr, parseHSVorHSL);
  104601. this.fromHsl({
  104602. h: cells[0],
  104603. s: cells[1],
  104604. l: cells[2],
  104605. a: cells[3]
  104606. });
  104607. }
  104608. fromRgbString(trimStr) {
  104609. const cells = splitColorStr(trimStr, (num, txt) =>
  104610. // Convert percentage to number. e.g. 50% -> 128
  104611. txt.includes('%') ? round(num / 100 * 255) : num);
  104612. this.r = cells[0];
  104613. this.g = cells[1];
  104614. this.b = cells[2];
  104615. this.a = cells[3];
  104616. }
  104617. }
  104618. ;// ./node_modules/@ant-design/fast-color/es/types.js
  104619. ;// ./node_modules/@ant-design/fast-color/es/index.js
  104620. /***/ }),
  104621. /***/ "./node_modules/@ant-design/icons/es/components/AntdIcon.js":
  104622. /*!******************************************************************************!*\
  104623. !*** ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules ***!
  104624. \******************************************************************************/
  104625. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  104626. "use strict";
  104627. // EXPORTS
  104628. __webpack_require__.d(__webpack_exports__, {
  104629. "default": function() { return /* binding */ AntdIcon; }
  104630. });
  104631. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  104632. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  104633. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  104634. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  104635. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  104636. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  104637. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
  104638. var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
  104639. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  104640. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  104641. var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
  104642. // EXTERNAL MODULE: ./node_modules/classnames/index.js
  104643. var classnames = __webpack_require__("./node_modules/classnames/index.js");
  104644. var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  104645. // EXTERNAL MODULE: ./node_modules/@ant-design/colors/es/index.js + 2 modules
  104646. var es = __webpack_require__("./node_modules/@ant-design/colors/es/index.js");
  104647. // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/Context.js
  104648. var Context = __webpack_require__("./node_modules/@ant-design/icons/es/components/Context.js");
  104649. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  104650. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  104651. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  104652. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  104653. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
  104654. var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
  104655. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/shadow.js
  104656. var shadow = __webpack_require__("./node_modules/rc-util/es/Dom/shadow.js");
  104657. // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
  104658. var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
  104659. ;// ./node_modules/@ant-design/icons/es/utils.js
  104660. function camelCase(input) {
  104661. return input.replace(/-(.)/g, function (match, g) {
  104662. return g.toUpperCase();
  104663. });
  104664. }
  104665. function utils_warning(valid, message) {
  104666. (0,warning["default"])(valid, "[@ant-design/icons] ".concat(message));
  104667. }
  104668. function isIconDefinition(target) {
  104669. return (0,esm_typeof["default"])(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && ((0,esm_typeof["default"])(target.icon) === 'object' || typeof target.icon === 'function');
  104670. }
  104671. function normalizeAttrs() {
  104672. var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  104673. return Object.keys(attrs).reduce(function (acc, key) {
  104674. var val = attrs[key];
  104675. switch (key) {
  104676. case 'class':
  104677. acc.className = val;
  104678. delete acc.class;
  104679. break;
  104680. default:
  104681. delete acc[key];
  104682. acc[camelCase(key)] = val;
  104683. }
  104684. return acc;
  104685. }, {});
  104686. }
  104687. function generate(node, key, rootProps) {
  104688. if (!rootProps) {
  104689. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(node.tag, (0,objectSpread2["default"])({
  104690. key: key
  104691. }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
  104692. return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
  104693. }));
  104694. }
  104695. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(node.tag, (0,objectSpread2["default"])((0,objectSpread2["default"])({
  104696. key: key
  104697. }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
  104698. return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
  104699. }));
  104700. }
  104701. function getSecondaryColor(primaryColor) {
  104702. // choose the second color
  104703. return (0,es.generate)(primaryColor)[0];
  104704. }
  104705. function normalizeTwoToneColors(twoToneColor) {
  104706. if (!twoToneColor) {
  104707. return [];
  104708. }
  104709. return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
  104710. }
  104711. // These props make sure that the SVG behaviours like general text.
  104712. // Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  104713. var svgBaseProps = {
  104714. width: '1em',
  104715. height: '1em',
  104716. fill: 'currentColor',
  104717. 'aria-hidden': 'true',
  104718. focusable: 'false'
  104719. };
  104720. var iconStyles = "\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
  104721. var useInsertStyles = function useInsertStyles(eleRef) {
  104722. var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(Context["default"]),
  104723. csp = _useContext.csp,
  104724. prefixCls = _useContext.prefixCls,
  104725. layer = _useContext.layer;
  104726. var mergedStyleStr = iconStyles;
  104727. if (prefixCls) {
  104728. mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
  104729. }
  104730. if (layer) {
  104731. mergedStyleStr = "@layer ".concat(layer, " {\n").concat(mergedStyleStr, "\n}");
  104732. }
  104733. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  104734. var ele = eleRef.current;
  104735. var shadowRoot = (0,shadow.getShadowRoot)(ele);
  104736. (0,dynamicCSS.updateCSS)(mergedStyleStr, '@ant-design-icons', {
  104737. prepend: !layer,
  104738. csp: csp,
  104739. attachTo: shadowRoot
  104740. });
  104741. }, []);
  104742. };
  104743. ;// ./node_modules/@ant-design/icons/es/components/IconBase.js
  104744. var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"];
  104745. var twoToneColorPalette = {
  104746. primaryColor: '#333',
  104747. secondaryColor: '#E6E6E6',
  104748. calculated: false
  104749. };
  104750. function setTwoToneColors(_ref) {
  104751. var primaryColor = _ref.primaryColor,
  104752. secondaryColor = _ref.secondaryColor;
  104753. twoToneColorPalette.primaryColor = primaryColor;
  104754. twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
  104755. twoToneColorPalette.calculated = !!secondaryColor;
  104756. }
  104757. function getTwoToneColors() {
  104758. return (0,objectSpread2["default"])({}, twoToneColorPalette);
  104759. }
  104760. var IconBase = function IconBase(props) {
  104761. var icon = props.icon,
  104762. className = props.className,
  104763. onClick = props.onClick,
  104764. style = props.style,
  104765. primaryColor = props.primaryColor,
  104766. secondaryColor = props.secondaryColor,
  104767. restProps = (0,objectWithoutProperties["default"])(props, _excluded);
  104768. var svgRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
  104769. var colors = twoToneColorPalette;
  104770. if (primaryColor) {
  104771. colors = {
  104772. primaryColor: primaryColor,
  104773. secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
  104774. };
  104775. }
  104776. useInsertStyles(svgRef);
  104777. utils_warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
  104778. if (!isIconDefinition(icon)) {
  104779. return null;
  104780. }
  104781. var target = icon;
  104782. if (target && typeof target.icon === 'function') {
  104783. target = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, target), {}, {
  104784. icon: target.icon(colors.primaryColor, colors.secondaryColor)
  104785. });
  104786. }
  104787. return generate(target.icon, "svg-".concat(target.name), (0,objectSpread2["default"])((0,objectSpread2["default"])({
  104788. className: className,
  104789. onClick: onClick,
  104790. style: style,
  104791. 'data-icon': target.name,
  104792. width: '1em',
  104793. height: '1em',
  104794. fill: 'currentColor',
  104795. 'aria-hidden': 'true'
  104796. }, restProps), {}, {
  104797. ref: svgRef
  104798. }));
  104799. };
  104800. IconBase.displayName = 'IconReact';
  104801. IconBase.getTwoToneColors = getTwoToneColors;
  104802. IconBase.setTwoToneColors = setTwoToneColors;
  104803. /* harmony default export */ var components_IconBase = (IconBase);
  104804. ;// ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js
  104805. function setTwoToneColor(twoToneColor) {
  104806. var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
  104807. _normalizeTwoToneColo2 = (0,slicedToArray["default"])(_normalizeTwoToneColo, 2),
  104808. primaryColor = _normalizeTwoToneColo2[0],
  104809. secondaryColor = _normalizeTwoToneColo2[1];
  104810. return components_IconBase.setTwoToneColors({
  104811. primaryColor: primaryColor,
  104812. secondaryColor: secondaryColor
  104813. });
  104814. }
  104815. function getTwoToneColor() {
  104816. var colors = components_IconBase.getTwoToneColors();
  104817. if (!colors.calculated) {
  104818. return colors.primaryColor;
  104819. }
  104820. return [colors.primaryColor, colors.secondaryColor];
  104821. }
  104822. ;// ./node_modules/@ant-design/icons/es/components/AntdIcon.js
  104823. 'use client';
  104824. var AntdIcon_excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
  104825. // Initial setting
  104826. // should move it to antd main repo?
  104827. setTwoToneColor(es.blue.primary);
  104828. // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757#issuecomment-488848720
  104829. var Icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  104830. var className = props.className,
  104831. icon = props.icon,
  104832. spin = props.spin,
  104833. rotate = props.rotate,
  104834. tabIndex = props.tabIndex,
  104835. onClick = props.onClick,
  104836. twoToneColor = props.twoToneColor,
  104837. restProps = (0,objectWithoutProperties["default"])(props, AntdIcon_excluded);
  104838. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(Context["default"]),
  104839. _React$useContext$pre = _React$useContext.prefixCls,
  104840. prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
  104841. rootClassName = _React$useContext.rootClassName;
  104842. var classString = classnames_default()(rootClassName, prefixCls, (0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), className);
  104843. var iconTabIndex = tabIndex;
  104844. if (iconTabIndex === undefined && onClick) {
  104845. iconTabIndex = -1;
  104846. }
  104847. var svgStyle = rotate ? {
  104848. msTransform: "rotate(".concat(rotate, "deg)"),
  104849. transform: "rotate(".concat(rotate, "deg)")
  104850. } : undefined;
  104851. var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
  104852. _normalizeTwoToneColo2 = (0,slicedToArray["default"])(_normalizeTwoToneColo, 2),
  104853. primaryColor = _normalizeTwoToneColo2[0],
  104854. secondaryColor = _normalizeTwoToneColo2[1];
  104855. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement("span", (0,esm_extends["default"])({
  104856. role: "img",
  104857. "aria-label": icon.name
  104858. }, restProps, {
  104859. ref: ref,
  104860. tabIndex: iconTabIndex,
  104861. onClick: onClick,
  104862. className: classString
  104863. }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(components_IconBase, {
  104864. icon: icon,
  104865. primaryColor: primaryColor,
  104866. secondaryColor: secondaryColor,
  104867. style: svgStyle
  104868. }));
  104869. });
  104870. Icon.displayName = 'AntdIcon';
  104871. Icon.getTwoToneColor = getTwoToneColor;
  104872. Icon.setTwoToneColor = setTwoToneColor;
  104873. /* harmony default export */ var AntdIcon = (Icon);
  104874. /***/ }),
  104875. /***/ "./node_modules/@ant-design/icons/es/components/Context.js":
  104876. /*!*****************************************************************!*\
  104877. !*** ./node_modules/@ant-design/icons/es/components/Context.js ***!
  104878. \*****************************************************************/
  104879. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  104880. "use strict";
  104881. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  104882. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  104883. var IconContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
  104884. /* harmony default export */ __webpack_exports__["default"] = (IconContext);
  104885. /***/ }),
  104886. /***/ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js":
  104887. /*!******************************************************************************!*\
  104888. !*** ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules ***!
  104889. \******************************************************************************/
  104890. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  104891. "use strict";
  104892. // EXPORTS
  104893. __webpack_require__.d(__webpack_exports__, {
  104894. "default": function() { return /* binding */ icons_RightOutlined; }
  104895. });
  104896. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  104897. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  104898. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  104899. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  104900. ;// ./node_modules/@ant-design/icons-svg/es/asn/RightOutlined.js
  104901. // This icon file is generated automatically.
  104902. var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
  104903. /* harmony default export */ var asn_RightOutlined = (RightOutlined);
  104904. // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
  104905. var AntdIcon = __webpack_require__("./node_modules/@ant-design/icons/es/components/AntdIcon.js");
  104906. ;// ./node_modules/@ant-design/icons/es/icons/RightOutlined.js
  104907. // GENERATE BY ./scripts/generate.ts
  104908. // DON NOT EDIT IT MANUALLY
  104909. var RightOutlined_RightOutlined = function RightOutlined(props, ref) {
  104910. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(AntdIcon["default"], (0,esm_extends["default"])({}, props, {
  104911. ref: ref,
  104912. icon: asn_RightOutlined
  104913. }));
  104914. };
  104915. /**![right](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTc2NS43IDQ4Ni44TDMxNC45IDEzNC43QTcuOTcgNy45NyAwIDAwMzAyIDE0MXY3Ny4zYzAgNC45IDIuMyA5LjYgNi4xIDEyLjZsMzYwIDI4MS4xLTM2MCAyODEuMWMtMy45IDMtNi4xIDcuNy02LjEgMTIuNlY4ODNjMCA2LjcgNy43IDEwLjQgMTIuOSA2LjNsNDUwLjgtMzUyLjFhMzEuOTYgMzEuOTYgMCAwMDAtNTAuNHoiIC8+PC9zdmc+) */
  104916. var RefIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(RightOutlined_RightOutlined);
  104917. if (true) {
  104918. RefIcon.displayName = 'RightOutlined';
  104919. }
  104920. /* harmony default export */ var icons_RightOutlined = (RefIcon);
  104921. /***/ }),
  104922. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
  104923. /*!*********************************************************************!*\
  104924. !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
  104925. \*********************************************************************/
  104926. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  104927. "use strict";
  104928. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  104929. /* harmony export */ "default": function() { return /* binding */ _arrayLikeToArray; }
  104930. /* harmony export */ });
  104931. function _arrayLikeToArray(r, a) {
  104932. (null == a || a > r.length) && (a = r.length);
  104933. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  104934. return n;
  104935. }
  104936. /***/ }),
  104937. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
  104938. /*!*******************************************************************!*\
  104939. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
  104940. \*******************************************************************/
  104941. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  104942. "use strict";
  104943. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  104944. /* harmony export */ "default": function() { return /* binding */ _arrayWithHoles; }
  104945. /* harmony export */ });
  104946. function _arrayWithHoles(r) {
  104947. if (Array.isArray(r)) return r;
  104948. }
  104949. /***/ }),
  104950. /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
  104951. /*!**************************************************************************!*\
  104952. !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  104953. \**************************************************************************/
  104954. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  104955. "use strict";
  104956. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  104957. /* harmony export */ "default": function() { return /* binding */ _assertThisInitialized; }
  104958. /* harmony export */ });
  104959. function _assertThisInitialized(e) {
  104960. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  104961. return e;
  104962. }
  104963. /***/ }),
  104964. /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
  104965. /*!*******************************************************************!*\
  104966. !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
  104967. \*******************************************************************/
  104968. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  104969. "use strict";
  104970. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  104971. /* harmony export */ "default": function() { return /* binding */ _classCallCheck; }
  104972. /* harmony export */ });
  104973. function _classCallCheck(a, n) {
  104974. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  104975. }
  104976. /***/ }),
  104977. /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
  104978. /*!****************************************************************!*\
  104979. !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
  104980. \****************************************************************/
  104981. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  104982. "use strict";
  104983. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  104984. /* harmony export */ "default": function() { return /* binding */ _createClass; }
  104985. /* harmony export */ });
  104986. /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
  104987. function _defineProperties(e, r) {
  104988. for (var t = 0; t < r.length; t++) {
  104989. var o = r[t];
  104990. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o.key), o);
  104991. }
  104992. }
  104993. function _createClass(e, r, t) {
  104994. return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
  104995. writable: !1
  104996. }), e;
  104997. }
  104998. /***/ }),
  104999. /***/ "./node_modules/@babel/runtime/helpers/esm/createSuper.js":
  105000. /*!****************************************************************!*\
  105001. !*** ./node_modules/@babel/runtime/helpers/esm/createSuper.js ***!
  105002. \****************************************************************/
  105003. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105004. "use strict";
  105005. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105006. /* harmony export */ "default": function() { return /* binding */ _createSuper; }
  105007. /* harmony export */ });
  105008. /* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
  105009. /* harmony import */ var _isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js");
  105010. /* harmony import */ var _possibleConstructorReturn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./possibleConstructorReturn.js */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
  105011. function _createSuper(t) {
  105012. var r = (0,_isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__["default"])();
  105013. return function () {
  105014. var e,
  105015. o = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t);
  105016. if (r) {
  105017. var s = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this).constructor;
  105018. e = Reflect.construct(o, arguments, s);
  105019. } else e = o.apply(this, arguments);
  105020. return (0,_possibleConstructorReturn_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this, e);
  105021. };
  105022. }
  105023. /***/ }),
  105024. /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
  105025. /*!*******************************************************************!*\
  105026. !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
  105027. \*******************************************************************/
  105028. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105029. "use strict";
  105030. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105031. /* harmony export */ "default": function() { return /* binding */ _defineProperty; }
  105032. /* harmony export */ });
  105033. /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
  105034. function _defineProperty(e, r, t) {
  105035. return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, {
  105036. value: t,
  105037. enumerable: !0,
  105038. configurable: !0,
  105039. writable: !0
  105040. }) : e[r] = t, e;
  105041. }
  105042. /***/ }),
  105043. /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
  105044. /*!************************************************************!*\
  105045. !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
  105046. \************************************************************/
  105047. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105048. "use strict";
  105049. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105050. /* harmony export */ "default": function() { return /* binding */ _extends; }
  105051. /* harmony export */ });
  105052. function _extends() {
  105053. return _extends = Object.assign ? Object.assign.bind() : function (n) {
  105054. for (var e = 1; e < arguments.length; e++) {
  105055. var t = arguments[e];
  105056. for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
  105057. }
  105058. return n;
  105059. }, _extends.apply(null, arguments);
  105060. }
  105061. /***/ }),
  105062. /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
  105063. /*!*******************************************************************!*\
  105064. !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
  105065. \*******************************************************************/
  105066. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105067. "use strict";
  105068. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105069. /* harmony export */ "default": function() { return /* binding */ _getPrototypeOf; }
  105070. /* harmony export */ });
  105071. function _getPrototypeOf(t) {
  105072. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  105073. return t.__proto__ || Object.getPrototypeOf(t);
  105074. }, _getPrototypeOf(t);
  105075. }
  105076. /***/ }),
  105077. /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
  105078. /*!*************************************************************!*\
  105079. !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
  105080. \*************************************************************/
  105081. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105082. "use strict";
  105083. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105084. /* harmony export */ "default": function() { return /* binding */ _inherits; }
  105085. /* harmony export */ });
  105086. /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
  105087. function _inherits(t, e) {
  105088. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  105089. t.prototype = Object.create(e && e.prototype, {
  105090. constructor: {
  105091. value: t,
  105092. writable: !0,
  105093. configurable: !0
  105094. }
  105095. }), Object.defineProperty(t, "prototype", {
  105096. writable: !1
  105097. }), e && (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t, e);
  105098. }
  105099. /***/ }),
  105100. /***/ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":
  105101. /*!*****************************************************************************!*\
  105102. !*** ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***!
  105103. \*****************************************************************************/
  105104. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105105. "use strict";
  105106. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105107. /* harmony export */ "default": function() { return /* binding */ _isNativeReflectConstruct; }
  105108. /* harmony export */ });
  105109. function _isNativeReflectConstruct() {
  105110. try {
  105111. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  105112. } catch (t) {}
  105113. return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
  105114. return !!t;
  105115. })();
  105116. }
  105117. /***/ }),
  105118. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
  105119. /*!********************************************************************!*\
  105120. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
  105121. \********************************************************************/
  105122. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105123. "use strict";
  105124. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105125. /* harmony export */ "default": function() { return /* binding */ _iterableToArray; }
  105126. /* harmony export */ });
  105127. function _iterableToArray(r) {
  105128. if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
  105129. }
  105130. /***/ }),
  105131. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
  105132. /*!********************************************************************!*\
  105133. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
  105134. \********************************************************************/
  105135. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105136. "use strict";
  105137. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105138. /* harmony export */ "default": function() { return /* binding */ _nonIterableRest; }
  105139. /* harmony export */ });
  105140. function _nonIterableRest() {
  105141. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  105142. }
  105143. /***/ }),
  105144. /***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
  105145. /*!******************************************************************!*\
  105146. !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
  105147. \******************************************************************/
  105148. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105149. "use strict";
  105150. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105151. /* harmony export */ "default": function() { return /* binding */ _objectSpread2; }
  105152. /* harmony export */ });
  105153. /* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  105154. function ownKeys(e, r) {
  105155. var t = Object.keys(e);
  105156. if (Object.getOwnPropertySymbols) {
  105157. var o = Object.getOwnPropertySymbols(e);
  105158. r && (o = o.filter(function (r) {
  105159. return Object.getOwnPropertyDescriptor(e, r).enumerable;
  105160. })), t.push.apply(t, o);
  105161. }
  105162. return t;
  105163. }
  105164. function _objectSpread2(e) {
  105165. for (var r = 1; r < arguments.length; r++) {
  105166. var t = null != arguments[r] ? arguments[r] : {};
  105167. r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
  105168. (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]);
  105169. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
  105170. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
  105171. });
  105172. }
  105173. return e;
  105174. }
  105175. /***/ }),
  105176. /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":
  105177. /*!****************************************************************************************!*\
  105178. !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules ***!
  105179. \****************************************************************************************/
  105180. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105181. "use strict";
  105182. // EXPORTS
  105183. __webpack_require__.d(__webpack_exports__, {
  105184. "default": function() { return /* binding */ _objectWithoutProperties; }
  105185. });
  105186. ;// ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
  105187. function _objectWithoutPropertiesLoose(r, e) {
  105188. if (null == r) return {};
  105189. var t = {};
  105190. for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
  105191. if (-1 !== e.indexOf(n)) continue;
  105192. t[n] = r[n];
  105193. }
  105194. return t;
  105195. }
  105196. ;// ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
  105197. function _objectWithoutProperties(e, t) {
  105198. if (null == e) return {};
  105199. var o,
  105200. r,
  105201. i = _objectWithoutPropertiesLoose(e, t);
  105202. if (Object.getOwnPropertySymbols) {
  105203. var n = Object.getOwnPropertySymbols(e);
  105204. for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
  105205. }
  105206. return i;
  105207. }
  105208. /***/ }),
  105209. /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
  105210. /*!******************************************************************************!*\
  105211. !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
  105212. \******************************************************************************/
  105213. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105214. "use strict";
  105215. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105216. /* harmony export */ "default": function() { return /* binding */ _possibleConstructorReturn; }
  105217. /* harmony export */ });
  105218. /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  105219. /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  105220. function _possibleConstructorReturn(t, e) {
  105221. if (e && ("object" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e) || "function" == typeof e)) return e;
  105222. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  105223. return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t);
  105224. }
  105225. /***/ }),
  105226. /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
  105227. /*!*******************************************************************!*\
  105228. !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  105229. \*******************************************************************/
  105230. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105231. "use strict";
  105232. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105233. /* harmony export */ "default": function() { return /* binding */ _setPrototypeOf; }
  105234. /* harmony export */ });
  105235. function _setPrototypeOf(t, e) {
  105236. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  105237. return t.__proto__ = e, t;
  105238. }, _setPrototypeOf(t, e);
  105239. }
  105240. /***/ }),
  105241. /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
  105242. /*!******************************************************************************!*\
  105243. !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules ***!
  105244. \******************************************************************************/
  105245. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105246. "use strict";
  105247. // EXPORTS
  105248. __webpack_require__.d(__webpack_exports__, {
  105249. "default": function() { return /* binding */ _slicedToArray; }
  105250. });
  105251. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
  105252. var arrayWithHoles = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
  105253. ;// ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
  105254. function _iterableToArrayLimit(r, l) {
  105255. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  105256. if (null != t) {
  105257. var e,
  105258. n,
  105259. i,
  105260. u,
  105261. a = [],
  105262. f = !0,
  105263. o = !1;
  105264. try {
  105265. if (i = (t = t.call(r)).next, 0 === l) {
  105266. if (Object(t) !== t) return;
  105267. f = !1;
  105268. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
  105269. } catch (r) {
  105270. o = !0, n = r;
  105271. } finally {
  105272. try {
  105273. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  105274. } finally {
  105275. if (o) throw n;
  105276. }
  105277. }
  105278. return a;
  105279. }
  105280. }
  105281. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
  105282. var unsupportedIterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  105283. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
  105284. var nonIterableRest = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
  105285. ;// ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
  105286. function _slicedToArray(r, e) {
  105287. return (0,arrayWithHoles["default"])(r) || _iterableToArrayLimit(r, e) || (0,unsupportedIterableToArray["default"])(r, e) || (0,nonIterableRest["default"])();
  105288. }
  105289. /***/ }),
  105290. /***/ "./node_modules/@babel/runtime/helpers/esm/toArray.js":
  105291. /*!************************************************************!*\
  105292. !*** ./node_modules/@babel/runtime/helpers/esm/toArray.js ***!
  105293. \************************************************************/
  105294. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105295. "use strict";
  105296. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105297. /* harmony export */ "default": function() { return /* binding */ _toArray; }
  105298. /* harmony export */ });
  105299. /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
  105300. /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
  105301. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  105302. /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
  105303. function _toArray(r) {
  105304. return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(r) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(r) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
  105305. }
  105306. /***/ }),
  105307. /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
  105308. /*!**********************************************************************************!*\
  105309. !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules ***!
  105310. \**********************************************************************************/
  105311. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105312. "use strict";
  105313. // EXPORTS
  105314. __webpack_require__.d(__webpack_exports__, {
  105315. "default": function() { return /* binding */ _toConsumableArray; }
  105316. });
  105317. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
  105318. var arrayLikeToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  105319. ;// ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
  105320. function _arrayWithoutHoles(r) {
  105321. if (Array.isArray(r)) return (0,arrayLikeToArray["default"])(r);
  105322. }
  105323. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
  105324. var iterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
  105325. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
  105326. var unsupportedIterableToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  105327. ;// ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
  105328. function _nonIterableSpread() {
  105329. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  105330. }
  105331. ;// ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
  105332. function _toConsumableArray(r) {
  105333. return _arrayWithoutHoles(r) || (0,iterableToArray["default"])(r) || (0,unsupportedIterableToArray["default"])(r) || _nonIterableSpread();
  105334. }
  105335. /***/ }),
  105336. /***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
  105337. /*!******************************************************************************!*\
  105338. !*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js + 1 modules ***!
  105339. \******************************************************************************/
  105340. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105341. "use strict";
  105342. // EXPORTS
  105343. __webpack_require__.d(__webpack_exports__, {
  105344. "default": function() { return /* binding */ toPropertyKey; }
  105345. });
  105346. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  105347. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  105348. ;// ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
  105349. function toPrimitive(t, r) {
  105350. if ("object" != (0,esm_typeof["default"])(t) || !t) return t;
  105351. var e = t[Symbol.toPrimitive];
  105352. if (void 0 !== e) {
  105353. var i = e.call(t, r || "default");
  105354. if ("object" != (0,esm_typeof["default"])(i)) return i;
  105355. throw new TypeError("@@toPrimitive must return a primitive value.");
  105356. }
  105357. return ("string" === r ? String : Number)(t);
  105358. }
  105359. ;// ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
  105360. function toPropertyKey(t) {
  105361. var i = toPrimitive(t, "string");
  105362. return "symbol" == (0,esm_typeof["default"])(i) ? i : i + "";
  105363. }
  105364. /***/ }),
  105365. /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
  105366. /*!***********************************************************!*\
  105367. !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
  105368. \***********************************************************/
  105369. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105370. "use strict";
  105371. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105372. /* harmony export */ "default": function() { return /* binding */ _typeof; }
  105373. /* harmony export */ });
  105374. function _typeof(o) {
  105375. "@babel/helpers - typeof";
  105376. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  105377. return typeof o;
  105378. } : function (o) {
  105379. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  105380. }, _typeof(o);
  105381. }
  105382. /***/ }),
  105383. /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
  105384. /*!*******************************************************************************!*\
  105385. !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
  105386. \*******************************************************************************/
  105387. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  105388. "use strict";
  105389. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  105390. /* harmony export */ "default": function() { return /* binding */ _unsupportedIterableToArray; }
  105391. /* harmony export */ });
  105392. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  105393. function _unsupportedIterableToArray(r, a) {
  105394. if (r) {
  105395. if ("string" == typeof r) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a);
  105396. var t = {}.toString.call(r).slice(8, -1);
  105397. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a) : void 0;
  105398. }
  105399. }
  105400. /***/ }),
  105401. /***/ "./node_modules/@rc-component/color-picker/es/index.js":
  105402. /*!**************************************************************************!*\
  105403. !*** ./node_modules/@rc-component/color-picker/es/index.js + 14 modules ***!
  105404. \**************************************************************************/
  105405. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  105406. "use strict";
  105407. // EXPORTS
  105408. __webpack_require__.d(__webpack_exports__, {
  105409. Color: function() { return /* reexport */ Color; },
  105410. ColorBlock: function() { return /* reexport */ components_ColorBlock; },
  105411. "default": function() { return /* binding */ color_picker_es; }
  105412. });
  105413. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  105414. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  105415. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  105416. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  105417. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  105418. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  105419. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  105420. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  105421. var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
  105422. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  105423. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  105424. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  105425. var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  105426. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
  105427. var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
  105428. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
  105429. var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
  105430. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
  105431. var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
  105432. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
  105433. var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
  105434. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  105435. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  105436. // EXTERNAL MODULE: ./node_modules/@ant-design/fast-color/es/index.js + 2 modules
  105437. var es = __webpack_require__("./node_modules/@ant-design/fast-color/es/index.js");
  105438. ;// ./node_modules/@rc-component/color-picker/es/color.js
  105439. var _excluded = ["b"],
  105440. _excluded2 = ["v"];
  105441. var getRoundNumber = function getRoundNumber(value) {
  105442. return Math.round(Number(value || 0));
  105443. };
  105444. var convertHsb2Hsv = function convertHsb2Hsv(color) {
  105445. if (color instanceof es.FastColor) {
  105446. return color;
  105447. }
  105448. if (color && (0,esm_typeof["default"])(color) === 'object' && 'h' in color && 'b' in color) {
  105449. var _ref = color,
  105450. b = _ref.b,
  105451. resets = (0,objectWithoutProperties["default"])(_ref, _excluded);
  105452. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, resets), {}, {
  105453. v: b
  105454. });
  105455. }
  105456. if (typeof color === 'string' && /hsb/.test(color)) {
  105457. return color.replace(/hsb/, 'hsv');
  105458. }
  105459. return color;
  105460. };
  105461. var Color = /*#__PURE__*/function (_FastColor) {
  105462. (0,inherits["default"])(Color, _FastColor);
  105463. var _super = (0,createSuper["default"])(Color);
  105464. function Color(color) {
  105465. (0,classCallCheck["default"])(this, Color);
  105466. return _super.call(this, convertHsb2Hsv(color));
  105467. }
  105468. (0,createClass["default"])(Color, [{
  105469. key: "toHsbString",
  105470. value: function toHsbString() {
  105471. var hsb = this.toHsb();
  105472. var saturation = getRoundNumber(hsb.s * 100);
  105473. var lightness = getRoundNumber(hsb.b * 100);
  105474. var hue = getRoundNumber(hsb.h);
  105475. var alpha = hsb.a;
  105476. var hsbString = "hsb(".concat(hue, ", ").concat(saturation, "%, ").concat(lightness, "%)");
  105477. var hsbaString = "hsba(".concat(hue, ", ").concat(saturation, "%, ").concat(lightness, "%, ").concat(alpha.toFixed(alpha === 0 ? 0 : 2), ")");
  105478. return alpha === 1 ? hsbString : hsbaString;
  105479. }
  105480. }, {
  105481. key: "toHsb",
  105482. value: function toHsb() {
  105483. var _this$toHsv = this.toHsv(),
  105484. v = _this$toHsv.v,
  105485. resets = (0,objectWithoutProperties["default"])(_this$toHsv, _excluded2);
  105486. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, resets), {}, {
  105487. b: v,
  105488. a: this.a
  105489. });
  105490. }
  105491. }]);
  105492. return Color;
  105493. }(es.FastColor);
  105494. ;// ./node_modules/@rc-component/color-picker/es/util.js
  105495. var ColorPickerPrefixCls = 'rc-color-picker';
  105496. var generateColor = function generateColor(color) {
  105497. if (color instanceof Color) {
  105498. return color;
  105499. }
  105500. return new Color(color);
  105501. };
  105502. var defaultColor = generateColor('#1677ff');
  105503. var calculateColor = function calculateColor(props) {
  105504. var offset = props.offset,
  105505. targetRef = props.targetRef,
  105506. containerRef = props.containerRef,
  105507. color = props.color,
  105508. type = props.type;
  105509. var _containerRef$current = containerRef.current.getBoundingClientRect(),
  105510. width = _containerRef$current.width,
  105511. height = _containerRef$current.height;
  105512. var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
  105513. targetWidth = _targetRef$current$ge.width,
  105514. targetHeight = _targetRef$current$ge.height;
  105515. var centerOffsetX = targetWidth / 2;
  105516. var centerOffsetY = targetHeight / 2;
  105517. var saturation = (offset.x + centerOffsetX) / width;
  105518. var bright = 1 - (offset.y + centerOffsetY) / height;
  105519. var hsb = color.toHsb();
  105520. var alphaOffset = saturation;
  105521. var hueOffset = (offset.x + centerOffsetX) / width * 360;
  105522. if (type) {
  105523. switch (type) {
  105524. case 'hue':
  105525. return generateColor((0,objectSpread2["default"])((0,objectSpread2["default"])({}, hsb), {}, {
  105526. h: hueOffset <= 0 ? 0 : hueOffset
  105527. }));
  105528. case 'alpha':
  105529. return generateColor((0,objectSpread2["default"])((0,objectSpread2["default"])({}, hsb), {}, {
  105530. a: alphaOffset <= 0 ? 0 : alphaOffset
  105531. }));
  105532. }
  105533. }
  105534. return generateColor({
  105535. h: hsb.h,
  105536. s: saturation <= 0 ? 0 : saturation,
  105537. b: bright >= 1 ? 1 : bright,
  105538. a: hsb.a
  105539. });
  105540. };
  105541. var calcOffset = function calcOffset(color, type) {
  105542. var hsb = color.toHsb();
  105543. switch (type) {
  105544. case 'hue':
  105545. return {
  105546. x: hsb.h / 360 * 100,
  105547. y: 50
  105548. };
  105549. case 'alpha':
  105550. return {
  105551. x: color.a * 100,
  105552. y: 50
  105553. };
  105554. // Picker panel
  105555. default:
  105556. return {
  105557. x: hsb.s * 100,
  105558. y: (1 - hsb.b) * 100
  105559. };
  105560. }
  105561. };
  105562. // EXTERNAL MODULE: ./node_modules/classnames/index.js
  105563. var classnames = __webpack_require__("./node_modules/classnames/index.js");
  105564. var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  105565. ;// ./node_modules/@rc-component/color-picker/es/components/ColorBlock.js
  105566. var ColorBlock = function ColorBlock(_ref) {
  105567. var color = _ref.color,
  105568. prefixCls = _ref.prefixCls,
  105569. className = _ref.className,
  105570. style = _ref.style,
  105571. onClick = _ref.onClick;
  105572. var colorBlockCls = "".concat(prefixCls, "-color-block");
  105573. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105574. className: classnames_default()(colorBlockCls, className),
  105575. style: style,
  105576. onClick: onClick
  105577. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105578. className: "".concat(colorBlockCls, "-inner"),
  105579. style: {
  105580. background: color
  105581. }
  105582. }));
  105583. };
  105584. /* harmony default export */ var components_ColorBlock = (ColorBlock);
  105585. ;// ./node_modules/@rc-component/color-picker/es/hooks/useColorDrag.js
  105586. function getPosition(e) {
  105587. var obj = 'touches' in e ? e.touches[0] : e;
  105588. var scrollXOffset = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset;
  105589. var scrollYOffset = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
  105590. return {
  105591. pageX: obj.pageX - scrollXOffset,
  105592. pageY: obj.pageY - scrollYOffset
  105593. };
  105594. }
  105595. function useColorDrag(props) {
  105596. var targetRef = props.targetRef,
  105597. containerRef = props.containerRef,
  105598. direction = props.direction,
  105599. onDragChange = props.onDragChange,
  105600. onDragChangeComplete = props.onDragChangeComplete,
  105601. calculate = props.calculate,
  105602. color = props.color,
  105603. disabledDrag = props.disabledDrag;
  105604. var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
  105605. x: 0,
  105606. y: 0
  105607. }),
  105608. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  105609. offsetValue = _useState2[0],
  105610. setOffsetValue = _useState2[1];
  105611. var mouseMoveRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  105612. var mouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  105613. // Always get position from `color`
  105614. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  105615. setOffsetValue(calculate());
  105616. }, [color]);
  105617. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  105618. return function () {
  105619. document.removeEventListener('mousemove', mouseMoveRef.current);
  105620. document.removeEventListener('mouseup', mouseUpRef.current);
  105621. document.removeEventListener('touchmove', mouseMoveRef.current);
  105622. document.removeEventListener('touchend', mouseUpRef.current);
  105623. mouseMoveRef.current = null;
  105624. mouseUpRef.current = null;
  105625. };
  105626. }, []);
  105627. var updateOffset = function updateOffset(e) {
  105628. var _getPosition = getPosition(e),
  105629. pageX = _getPosition.pageX,
  105630. pageY = _getPosition.pageY;
  105631. var _containerRef$current = containerRef.current.getBoundingClientRect(),
  105632. rectX = _containerRef$current.x,
  105633. rectY = _containerRef$current.y,
  105634. width = _containerRef$current.width,
  105635. height = _containerRef$current.height;
  105636. var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
  105637. targetWidth = _targetRef$current$ge.width,
  105638. targetHeight = _targetRef$current$ge.height;
  105639. var centerOffsetX = targetWidth / 2;
  105640. var centerOffsetY = targetHeight / 2;
  105641. var offsetX = Math.max(0, Math.min(pageX - rectX, width)) - centerOffsetX;
  105642. var offsetY = Math.max(0, Math.min(pageY - rectY, height)) - centerOffsetY;
  105643. var calcOffset = {
  105644. x: offsetX,
  105645. y: direction === 'x' ? offsetValue.y : offsetY
  105646. };
  105647. // Exclusion of boundary cases
  105648. if (targetWidth === 0 && targetHeight === 0 || targetWidth !== targetHeight) {
  105649. return false;
  105650. }
  105651. onDragChange === null || onDragChange === void 0 || onDragChange(calcOffset);
  105652. };
  105653. var onDragMove = function onDragMove(e) {
  105654. e.preventDefault();
  105655. updateOffset(e);
  105656. };
  105657. var onDragStop = function onDragStop(e) {
  105658. e.preventDefault();
  105659. document.removeEventListener('mousemove', mouseMoveRef.current);
  105660. document.removeEventListener('mouseup', mouseUpRef.current);
  105661. document.removeEventListener('touchmove', mouseMoveRef.current);
  105662. document.removeEventListener('touchend', mouseUpRef.current);
  105663. mouseMoveRef.current = null;
  105664. mouseUpRef.current = null;
  105665. onDragChangeComplete === null || onDragChangeComplete === void 0 || onDragChangeComplete();
  105666. };
  105667. var onDragStart = function onDragStart(e) {
  105668. // https://github.com/ant-design/ant-design/issues/43529
  105669. document.removeEventListener('mousemove', mouseMoveRef.current);
  105670. document.removeEventListener('mouseup', mouseUpRef.current);
  105671. if (disabledDrag) {
  105672. return;
  105673. }
  105674. updateOffset(e);
  105675. document.addEventListener('mousemove', onDragMove);
  105676. document.addEventListener('mouseup', onDragStop);
  105677. document.addEventListener('touchmove', onDragMove);
  105678. document.addEventListener('touchend', onDragStop);
  105679. mouseMoveRef.current = onDragMove;
  105680. mouseUpRef.current = onDragStop;
  105681. };
  105682. return [offsetValue, onDragStart];
  105683. }
  105684. /* harmony default export */ var hooks_useColorDrag = (useColorDrag);
  105685. // EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
  105686. var rc_util_es = __webpack_require__("./node_modules/rc-util/es/index.js");
  105687. ;// ./node_modules/@rc-component/color-picker/es/components/Handler.js
  105688. var Handler = function Handler(_ref) {
  105689. var _ref$size = _ref.size,
  105690. size = _ref$size === void 0 ? 'default' : _ref$size,
  105691. color = _ref.color,
  105692. prefixCls = _ref.prefixCls;
  105693. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105694. className: classnames_default()("".concat(prefixCls, "-handler"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-handler-sm"), size === 'small')),
  105695. style: {
  105696. backgroundColor: color
  105697. }
  105698. });
  105699. };
  105700. /* harmony default export */ var components_Handler = (Handler);
  105701. ;// ./node_modules/@rc-component/color-picker/es/components/Palette.js
  105702. var Palette = function Palette(_ref) {
  105703. var children = _ref.children,
  105704. style = _ref.style,
  105705. prefixCls = _ref.prefixCls;
  105706. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105707. className: "".concat(prefixCls, "-palette"),
  105708. style: (0,objectSpread2["default"])({
  105709. position: 'relative'
  105710. }, style)
  105711. }, children);
  105712. };
  105713. /* harmony default export */ var components_Palette = (Palette);
  105714. ;// ./node_modules/@rc-component/color-picker/es/components/Transform.js
  105715. var Transform = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
  105716. var children = props.children,
  105717. x = props.x,
  105718. y = props.y;
  105719. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105720. ref: ref,
  105721. style: {
  105722. position: 'absolute',
  105723. left: "".concat(x, "%"),
  105724. top: "".concat(y, "%"),
  105725. zIndex: 1,
  105726. transform: 'translate(-50%, -50%)'
  105727. }
  105728. }, children);
  105729. });
  105730. /* harmony default export */ var components_Transform = (Transform);
  105731. ;// ./node_modules/@rc-component/color-picker/es/components/Picker.js
  105732. var Picker = function Picker(_ref) {
  105733. var color = _ref.color,
  105734. onChange = _ref.onChange,
  105735. prefixCls = _ref.prefixCls,
  105736. onChangeComplete = _ref.onChangeComplete,
  105737. disabled = _ref.disabled;
  105738. var pickerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  105739. var transformRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  105740. var colorRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(color);
  105741. var onDragChange = (0,rc_util_es.useEvent)(function (offsetValue) {
  105742. var calcColor = calculateColor({
  105743. offset: offsetValue,
  105744. targetRef: transformRef,
  105745. containerRef: pickerRef,
  105746. color: color
  105747. });
  105748. colorRef.current = calcColor;
  105749. onChange(calcColor);
  105750. });
  105751. var _useColorDrag = hooks_useColorDrag({
  105752. color: color,
  105753. containerRef: pickerRef,
  105754. targetRef: transformRef,
  105755. calculate: function calculate() {
  105756. return calcOffset(color);
  105757. },
  105758. onDragChange: onDragChange,
  105759. onDragChangeComplete: function onDragChangeComplete() {
  105760. return onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(colorRef.current);
  105761. },
  105762. disabledDrag: disabled
  105763. }),
  105764. _useColorDrag2 = (0,slicedToArray["default"])(_useColorDrag, 2),
  105765. offset = _useColorDrag2[0],
  105766. dragStartHandle = _useColorDrag2[1];
  105767. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105768. ref: pickerRef,
  105769. className: "".concat(prefixCls, "-select"),
  105770. onMouseDown: dragStartHandle,
  105771. onTouchStart: dragStartHandle
  105772. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Palette, {
  105773. prefixCls: prefixCls
  105774. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Transform, {
  105775. x: offset.x,
  105776. y: offset.y,
  105777. ref: transformRef
  105778. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Handler, {
  105779. color: color.toRgbString(),
  105780. prefixCls: prefixCls
  105781. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105782. className: "".concat(prefixCls, "-saturation"),
  105783. style: {
  105784. backgroundColor: "hsl(".concat(color.toHsb().h, ",100%, 50%)"),
  105785. backgroundImage: 'linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))'
  105786. }
  105787. })));
  105788. };
  105789. /* harmony default export */ var components_Picker = (Picker);
  105790. ;// ./node_modules/@rc-component/color-picker/es/hooks/useColorState.js
  105791. var useColorState = function useColorState(defaultValue, value) {
  105792. var _useMergedState = (0,rc_util_es.useMergedState)(defaultValue, {
  105793. value: value
  105794. }),
  105795. _useMergedState2 = (0,slicedToArray["default"])(_useMergedState, 2),
  105796. mergedValue = _useMergedState2[0],
  105797. setValue = _useMergedState2[1];
  105798. var color = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  105799. return generateColor(mergedValue);
  105800. }, [mergedValue]);
  105801. return [color, setValue];
  105802. };
  105803. /* harmony default export */ var hooks_useColorState = (useColorState);
  105804. ;// ./node_modules/@rc-component/color-picker/es/components/Gradient.js
  105805. var Gradient = function Gradient(_ref) {
  105806. var colors = _ref.colors,
  105807. children = _ref.children,
  105808. _ref$direction = _ref.direction,
  105809. direction = _ref$direction === void 0 ? 'to right' : _ref$direction,
  105810. type = _ref.type,
  105811. prefixCls = _ref.prefixCls;
  105812. var gradientColors = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  105813. return colors.map(function (color, idx) {
  105814. var result = generateColor(color);
  105815. if (type === 'alpha' && idx === colors.length - 1) {
  105816. result = new Color(result.setA(1));
  105817. }
  105818. return result.toRgbString();
  105819. }).join(',');
  105820. }, [colors, type]);
  105821. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105822. className: "".concat(prefixCls, "-gradient"),
  105823. style: {
  105824. position: 'absolute',
  105825. inset: 0,
  105826. background: "linear-gradient(".concat(direction, ", ").concat(gradientColors, ")")
  105827. }
  105828. }, children);
  105829. };
  105830. /* harmony default export */ var components_Gradient = (Gradient);
  105831. ;// ./node_modules/@rc-component/color-picker/es/components/Slider.js
  105832. var Slider = function Slider(props) {
  105833. var prefixCls = props.prefixCls,
  105834. colors = props.colors,
  105835. disabled = props.disabled,
  105836. onChange = props.onChange,
  105837. onChangeComplete = props.onChangeComplete,
  105838. color = props.color,
  105839. type = props.type;
  105840. var sliderRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  105841. var transformRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  105842. var colorRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(color);
  105843. var getValue = function getValue(c) {
  105844. return type === 'hue' ? c.getHue() : c.a * 100;
  105845. };
  105846. var onDragChange = (0,rc_util_es.useEvent)(function (offsetValue) {
  105847. var calcColor = calculateColor({
  105848. offset: offsetValue,
  105849. targetRef: transformRef,
  105850. containerRef: sliderRef,
  105851. color: color,
  105852. type: type
  105853. });
  105854. colorRef.current = calcColor;
  105855. onChange(getValue(calcColor));
  105856. });
  105857. var _useColorDrag = hooks_useColorDrag({
  105858. color: color,
  105859. targetRef: transformRef,
  105860. containerRef: sliderRef,
  105861. calculate: function calculate() {
  105862. return calcOffset(color, type);
  105863. },
  105864. onDragChange: onDragChange,
  105865. onDragChangeComplete: function onDragChangeComplete() {
  105866. onChangeComplete(getValue(colorRef.current));
  105867. },
  105868. direction: 'x',
  105869. disabledDrag: disabled
  105870. }),
  105871. _useColorDrag2 = (0,slicedToArray["default"])(_useColorDrag, 2),
  105872. offset = _useColorDrag2[0],
  105873. dragStartHandle = _useColorDrag2[1];
  105874. var handleColor = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  105875. if (type === 'hue') {
  105876. var hsb = color.toHsb();
  105877. hsb.s = 1;
  105878. hsb.b = 1;
  105879. hsb.a = 1;
  105880. var lightColor = new Color(hsb);
  105881. return lightColor;
  105882. }
  105883. return color;
  105884. }, [color, type]);
  105885. // ========================= Gradient =========================
  105886. var gradientList = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useMemo(function () {
  105887. return colors.map(function (info) {
  105888. return "".concat(info.color, " ").concat(info.percent, "%");
  105889. });
  105890. }, [colors]);
  105891. // ========================== Render ==========================
  105892. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  105893. ref: sliderRef,
  105894. className: classnames_default()("".concat(prefixCls, "-slider"), "".concat(prefixCls, "-slider-").concat(type)),
  105895. onMouseDown: dragStartHandle,
  105896. onTouchStart: dragStartHandle
  105897. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Palette, {
  105898. prefixCls: prefixCls
  105899. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Transform, {
  105900. x: offset.x,
  105901. y: offset.y,
  105902. ref: transformRef
  105903. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Handler, {
  105904. size: "small",
  105905. color: handleColor.toHexString(),
  105906. prefixCls: prefixCls
  105907. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Gradient, {
  105908. colors: gradientList,
  105909. type: type,
  105910. prefixCls: prefixCls
  105911. })));
  105912. };
  105913. /* harmony default export */ var components_Slider = (Slider);
  105914. ;// ./node_modules/@rc-component/color-picker/es/hooks/useComponent.js
  105915. function useComponent(components) {
  105916. return external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  105917. var _ref = components || {},
  105918. slider = _ref.slider;
  105919. return [slider || components_Slider];
  105920. }, [components]);
  105921. }
  105922. ;// ./node_modules/@rc-component/color-picker/es/ColorPicker.js
  105923. var HUE_COLORS = [{
  105924. color: 'rgb(255, 0, 0)',
  105925. percent: 0
  105926. }, {
  105927. color: 'rgb(255, 255, 0)',
  105928. percent: 17
  105929. }, {
  105930. color: 'rgb(0, 255, 0)',
  105931. percent: 33
  105932. }, {
  105933. color: 'rgb(0, 255, 255)',
  105934. percent: 50
  105935. }, {
  105936. color: 'rgb(0, 0, 255)',
  105937. percent: 67
  105938. }, {
  105939. color: 'rgb(255, 0, 255)',
  105940. percent: 83
  105941. }, {
  105942. color: 'rgb(255, 0, 0)',
  105943. percent: 100
  105944. }];
  105945. var ColorPicker = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, ref) {
  105946. var value = props.value,
  105947. defaultValue = props.defaultValue,
  105948. _props$prefixCls = props.prefixCls,
  105949. prefixCls = _props$prefixCls === void 0 ? ColorPickerPrefixCls : _props$prefixCls,
  105950. onChange = props.onChange,
  105951. onChangeComplete = props.onChangeComplete,
  105952. className = props.className,
  105953. style = props.style,
  105954. panelRender = props.panelRender,
  105955. _props$disabledAlpha = props.disabledAlpha,
  105956. disabledAlpha = _props$disabledAlpha === void 0 ? false : _props$disabledAlpha,
  105957. _props$disabled = props.disabled,
  105958. disabled = _props$disabled === void 0 ? false : _props$disabled,
  105959. components = props.components;
  105960. // ========================== Components ==========================
  105961. var _useComponent = useComponent(components),
  105962. _useComponent2 = (0,slicedToArray["default"])(_useComponent, 1),
  105963. Slider = _useComponent2[0];
  105964. // ============================ Color =============================
  105965. var _useColorState = hooks_useColorState(defaultValue || defaultColor, value),
  105966. _useColorState2 = (0,slicedToArray["default"])(_useColorState, 2),
  105967. colorValue = _useColorState2[0],
  105968. setColorValue = _useColorState2[1];
  105969. var alphaColor = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
  105970. return colorValue.setA(1).toRgbString();
  105971. }, [colorValue]);
  105972. // ============================ Events ============================
  105973. var handleChange = function handleChange(data, type) {
  105974. if (!value) {
  105975. setColorValue(data);
  105976. }
  105977. onChange === null || onChange === void 0 || onChange(data, type);
  105978. };
  105979. // Convert
  105980. var getHueColor = function getHueColor(hue) {
  105981. return new Color(colorValue.setHue(hue));
  105982. };
  105983. var getAlphaColor = function getAlphaColor(alpha) {
  105984. return new Color(colorValue.setA(alpha / 100));
  105985. };
  105986. // Slider change
  105987. var onHueChange = function onHueChange(hue) {
  105988. handleChange(getHueColor(hue), {
  105989. type: 'hue',
  105990. value: hue
  105991. });
  105992. };
  105993. var onAlphaChange = function onAlphaChange(alpha) {
  105994. handleChange(getAlphaColor(alpha), {
  105995. type: 'alpha',
  105996. value: alpha
  105997. });
  105998. };
  105999. // Complete
  106000. var onHueChangeComplete = function onHueChangeComplete(hue) {
  106001. if (onChangeComplete) {
  106002. onChangeComplete(getHueColor(hue));
  106003. }
  106004. };
  106005. var onAlphaChangeComplete = function onAlphaChangeComplete(alpha) {
  106006. if (onChangeComplete) {
  106007. onChangeComplete(getAlphaColor(alpha));
  106008. }
  106009. };
  106010. // ============================ Render ============================
  106011. var mergeCls = classnames_default()("".concat(prefixCls, "-panel"), className, (0,defineProperty["default"])({}, "".concat(prefixCls, "-panel-disabled"), disabled));
  106012. var sharedSliderProps = {
  106013. prefixCls: prefixCls,
  106014. disabled: disabled,
  106015. color: colorValue
  106016. };
  106017. var defaultPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_Picker, (0,esm_extends["default"])({
  106018. onChange: handleChange
  106019. }, sharedSliderProps, {
  106020. onChangeComplete: onChangeComplete
  106021. })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  106022. className: "".concat(prefixCls, "-slider-container")
  106023. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  106024. className: classnames_default()("".concat(prefixCls, "-slider-group"), (0,defineProperty["default"])({}, "".concat(prefixCls, "-slider-group-disabled-alpha"), disabledAlpha))
  106025. }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Slider, (0,esm_extends["default"])({}, sharedSliderProps, {
  106026. type: "hue",
  106027. colors: HUE_COLORS,
  106028. min: 0,
  106029. max: 359,
  106030. value: colorValue.getHue(),
  106031. onChange: onHueChange,
  106032. onChangeComplete: onHueChangeComplete
  106033. })), !disabledAlpha && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Slider, (0,esm_extends["default"])({}, sharedSliderProps, {
  106034. type: "alpha",
  106035. colors: [{
  106036. percent: 0,
  106037. color: 'rgba(255, 0, 4, 0)'
  106038. }, {
  106039. percent: 100,
  106040. color: alphaColor
  106041. }],
  106042. min: 0,
  106043. max: 100,
  106044. value: colorValue.a * 100,
  106045. onChange: onAlphaChange,
  106046. onChangeComplete: onAlphaChangeComplete
  106047. }))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(components_ColorBlock, {
  106048. color: colorValue.toRgbString(),
  106049. prefixCls: prefixCls
  106050. })));
  106051. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
  106052. className: mergeCls,
  106053. style: style,
  106054. ref: ref
  106055. }, typeof panelRender === 'function' ? panelRender(defaultPanel) : defaultPanel);
  106056. });
  106057. if (true) {
  106058. ColorPicker.displayName = 'ColorPicker';
  106059. }
  106060. /* harmony default export */ var es_ColorPicker = (ColorPicker);
  106061. ;// ./node_modules/@rc-component/color-picker/es/interface.js
  106062. ;// ./node_modules/@rc-component/color-picker/es/index.js
  106063. /* harmony default export */ var color_picker_es = (es_ColorPicker);
  106064. /***/ }),
  106065. /***/ "./node_modules/classnames/index.js":
  106066. /*!******************************************!*\
  106067. !*** ./node_modules/classnames/index.js ***!
  106068. \******************************************/
  106069. /***/ (function(module, exports) {
  106070. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  106071. Copyright (c) 2018 Jed Watson.
  106072. Licensed under the MIT License (MIT), see
  106073. http://jedwatson.github.io/classnames
  106074. */
  106075. /* global define */
  106076. (function () {
  106077. 'use strict';
  106078. var hasOwn = {}.hasOwnProperty;
  106079. function classNames () {
  106080. var classes = '';
  106081. for (var i = 0; i < arguments.length; i++) {
  106082. var arg = arguments[i];
  106083. if (arg) {
  106084. classes = appendClass(classes, parseValue(arg));
  106085. }
  106086. }
  106087. return classes;
  106088. }
  106089. function parseValue (arg) {
  106090. if (typeof arg === 'string' || typeof arg === 'number') {
  106091. return arg;
  106092. }
  106093. if (typeof arg !== 'object') {
  106094. return '';
  106095. }
  106096. if (Array.isArray(arg)) {
  106097. return classNames.apply(null, arg);
  106098. }
  106099. if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
  106100. return arg.toString();
  106101. }
  106102. var classes = '';
  106103. for (var key in arg) {
  106104. if (hasOwn.call(arg, key) && arg[key]) {
  106105. classes = appendClass(classes, key);
  106106. }
  106107. }
  106108. return classes;
  106109. }
  106110. function appendClass (value, newClass) {
  106111. if (!newClass) {
  106112. return value;
  106113. }
  106114. if (value) {
  106115. return value + ' ' + newClass;
  106116. }
  106117. return value + newClass;
  106118. }
  106119. if ( true && module.exports) {
  106120. classNames.default = classNames;
  106121. module.exports = classNames;
  106122. } else if (true) {
  106123. // register as 'classnames', consistent with npm package name
  106124. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  106125. return classNames;
  106126. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  106127. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  106128. } else // removed by dead control flow
  106129. {}
  106130. }());
  106131. /***/ }),
  106132. /***/ "./node_modules/copy-to-clipboard/index.js":
  106133. /*!*************************************************!*\
  106134. !*** ./node_modules/copy-to-clipboard/index.js ***!
  106135. \*************************************************/
  106136. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  106137. "use strict";
  106138. var deselectCurrent = __webpack_require__(/*! toggle-selection */ "./node_modules/toggle-selection/index.js");
  106139. var clipboardToIE11Formatting = {
  106140. "text/plain": "Text",
  106141. "text/html": "Url",
  106142. "default": "Text"
  106143. }
  106144. var defaultMessage = "Copy to clipboard: #{key}, Enter";
  106145. function format(message) {
  106146. var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
  106147. return message.replace(/#{\s*key\s*}/g, copyKey);
  106148. }
  106149. function copy(text, options) {
  106150. var debug,
  106151. message,
  106152. reselectPrevious,
  106153. range,
  106154. selection,
  106155. mark,
  106156. success = false;
  106157. if (!options) {
  106158. options = {};
  106159. }
  106160. debug = options.debug || false;
  106161. try {
  106162. reselectPrevious = deselectCurrent();
  106163. range = document.createRange();
  106164. selection = document.getSelection();
  106165. mark = document.createElement("span");
  106166. mark.textContent = text;
  106167. // avoid screen readers from reading out loud the text
  106168. mark.ariaHidden = "true"
  106169. // reset user styles for span element
  106170. mark.style.all = "unset";
  106171. // prevents scrolling to the end of the page
  106172. mark.style.position = "fixed";
  106173. mark.style.top = 0;
  106174. mark.style.clip = "rect(0, 0, 0, 0)";
  106175. // used to preserve spaces and line breaks
  106176. mark.style.whiteSpace = "pre";
  106177. // do not inherit user-select (it may be `none`)
  106178. mark.style.webkitUserSelect = "text";
  106179. mark.style.MozUserSelect = "text";
  106180. mark.style.msUserSelect = "text";
  106181. mark.style.userSelect = "text";
  106182. mark.addEventListener("copy", function(e) {
  106183. e.stopPropagation();
  106184. if (options.format) {
  106185. e.preventDefault();
  106186. if (typeof e.clipboardData === "undefined") { // IE 11
  106187. debug && console.warn("unable to use e.clipboardData");
  106188. debug && console.warn("trying IE specific stuff");
  106189. window.clipboardData.clearData();
  106190. var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
  106191. window.clipboardData.setData(format, text);
  106192. } else { // all other browsers
  106193. e.clipboardData.clearData();
  106194. e.clipboardData.setData(options.format, text);
  106195. }
  106196. }
  106197. if (options.onCopy) {
  106198. e.preventDefault();
  106199. options.onCopy(e.clipboardData);
  106200. }
  106201. });
  106202. document.body.appendChild(mark);
  106203. range.selectNodeContents(mark);
  106204. selection.addRange(range);
  106205. var successful = document.execCommand("copy");
  106206. if (!successful) {
  106207. throw new Error("copy command was unsuccessful");
  106208. }
  106209. success = true;
  106210. } catch (err) {
  106211. debug && console.error("unable to copy using execCommand: ", err);
  106212. debug && console.warn("trying IE specific stuff");
  106213. try {
  106214. window.clipboardData.setData(options.format || "text", text);
  106215. options.onCopy && options.onCopy(window.clipboardData);
  106216. success = true;
  106217. } catch (err) {
  106218. debug && console.error("unable to copy using clipboardData: ", err);
  106219. debug && console.error("falling back to prompt");
  106220. message = format("message" in options ? options.message : defaultMessage);
  106221. window.prompt(message, text);
  106222. }
  106223. } finally {
  106224. if (selection) {
  106225. if (typeof selection.removeRange == "function") {
  106226. selection.removeRange(range);
  106227. } else {
  106228. selection.removeAllRanges();
  106229. }
  106230. }
  106231. if (mark) {
  106232. document.body.removeChild(mark);
  106233. }
  106234. reselectPrevious();
  106235. }
  106236. return success;
  106237. }
  106238. module.exports = copy;
  106239. /***/ }),
  106240. /***/ "./node_modules/dayjs/plugin/advancedFormat.js":
  106241. /*!*****************************************************!*\
  106242. !*** ./node_modules/dayjs/plugin/advancedFormat.js ***!
  106243. \*****************************************************/
  106244. /***/ (function(module) {
  106245. !function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}}));
  106246. /***/ }),
  106247. /***/ "./node_modules/dayjs/plugin/customParseFormat.js":
  106248. /*!********************************************************!*\
  106249. !*** ./node_modules/dayjs/plugin/customParseFormat.js ***!
  106250. \********************************************************/
  106251. /***/ (function(module) {
  106252. !function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else{var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""))}else i.call(this,e)}}}));
  106253. /***/ }),
  106254. /***/ "./node_modules/dayjs/plugin/localeData.js":
  106255. /*!*************************************************!*\
  106256. !*** ./node_modules/dayjs/plugin/localeData.js ***!
  106257. \*************************************************/
  106258. /***/ (function(module) {
  106259. !function(n,e){ true?module.exports=e():0}(this,(function(){"use strict";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format("MMMM"):u(n,"months")},monthsShort:function(e){return e?e.format("MMM"):u(n,"monthsShort","months",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):u(n,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):u(n,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):u(n,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),"months")},t.monthsShort=function(){return u(i(),"monthsShort","months",3)},t.weekdays=function(n){return u(i(),"weekdays",null,null,n)},t.weekdaysShort=function(n){return u(i(),"weekdaysShort","weekdays",3,n)},t.weekdaysMin=function(n){return u(i(),"weekdaysMin","weekdays",2,n)}}}));
  106260. /***/ }),
  106261. /***/ "./node_modules/dayjs/plugin/weekOfYear.js":
  106262. /*!*************************************************!*\
  106263. !*** ./node_modules/dayjs/plugin/weekOfYear.js ***!
  106264. \*************************************************/
  106265. /***/ (function(module) {
  106266. !function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));
  106267. /***/ }),
  106268. /***/ "./node_modules/dayjs/plugin/weekYear.js":
  106269. /*!***********************************************!*\
  106270. !*** ./node_modules/dayjs/plugin/weekYear.js ***!
  106271. \***********************************************/
  106272. /***/ (function(module) {
  106273. !function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));
  106274. /***/ }),
  106275. /***/ "./node_modules/dayjs/plugin/weekday.js":
  106276. /*!**********************************************!*\
  106277. !*** ./node_modules/dayjs/plugin/weekday.js ***!
  106278. \**********************************************/
  106279. /***/ (function(module) {
  106280. !function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,i=this.$W,n=(i<t?i+7:i)-t;return this.$utils().u(e)?n:this.subtract(n,"day").add(e,"day")}}}));
  106281. /***/ }),
  106282. /***/ "./node_modules/json2mq/index.js":
  106283. /*!***************************************!*\
  106284. !*** ./node_modules/json2mq/index.js ***!
  106285. \***************************************/
  106286. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  106287. var camel2hyphen = __webpack_require__(/*! string-convert/camel2hyphen */ "./node_modules/string-convert/camel2hyphen.js");
  106288. var isDimension = function (feature) {
  106289. var re = /[height|width]$/;
  106290. return re.test(feature);
  106291. };
  106292. var obj2mq = function (obj) {
  106293. var mq = '';
  106294. var features = Object.keys(obj);
  106295. features.forEach(function (feature, index) {
  106296. var value = obj[feature];
  106297. feature = camel2hyphen(feature);
  106298. // Add px to dimension features
  106299. if (isDimension(feature) && typeof value === 'number') {
  106300. value = value + 'px';
  106301. }
  106302. if (value === true) {
  106303. mq += feature;
  106304. } else if (value === false) {
  106305. mq += 'not ' + feature;
  106306. } else {
  106307. mq += '(' + feature + ': ' + value + ')';
  106308. }
  106309. if (index < features.length-1) {
  106310. mq += ' and '
  106311. }
  106312. });
  106313. return mq;
  106314. };
  106315. var json2mq = function (query) {
  106316. var mq = '';
  106317. if (typeof query === 'string') {
  106318. return query;
  106319. }
  106320. // Handling array of media queries
  106321. if (query instanceof Array) {
  106322. query.forEach(function (q, index) {
  106323. mq += obj2mq(q);
  106324. if (index < query.length-1) {
  106325. mq += ', '
  106326. }
  106327. });
  106328. return mq;
  106329. }
  106330. // Handling single media query
  106331. return obj2mq(query);
  106332. };
  106333. module.exports = json2mq;
  106334. /***/ }),
  106335. /***/ "./node_modules/rc-motion/es/index.js":
  106336. /*!*********************************************************!*\
  106337. !*** ./node_modules/rc-motion/es/index.js + 13 modules ***!
  106338. \*********************************************************/
  106339. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  106340. "use strict";
  106341. // EXPORTS
  106342. __webpack_require__.d(__webpack_exports__, {
  106343. CSSMotionList: function() { return /* reexport */ CSSMotionList; },
  106344. Provider: function() { return /* reexport */ MotionProvider; },
  106345. "default": function() { return /* binding */ rc_motion_es; }
  106346. });
  106347. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  106348. var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
  106349. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  106350. var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  106351. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  106352. var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  106353. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  106354. var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
  106355. // EXTERNAL MODULE: ./node_modules/classnames/index.js
  106356. var classnames = __webpack_require__("./node_modules/classnames/index.js");
  106357. var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
  106358. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
  106359. var findDOMNode = __webpack_require__("./node_modules/rc-util/es/Dom/findDOMNode.js");
  106360. // EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
  106361. var es_ref = __webpack_require__("./node_modules/rc-util/es/ref.js");
  106362. // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
  106363. var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
  106364. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
  106365. var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
  106366. ;// ./node_modules/rc-motion/es/context.js
  106367. var _excluded = ["children"];
  106368. var Context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
  106369. function MotionProvider(_ref) {
  106370. var children = _ref.children,
  106371. props = (0,objectWithoutProperties["default"])(_ref, _excluded);
  106372. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Context.Provider, {
  106373. value: props
  106374. }, children);
  106375. }
  106376. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  106377. var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
  106378. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
  106379. var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
  106380. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
  106381. var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
  106382. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
  106383. var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
  106384. ;// ./node_modules/rc-motion/es/DomWrapper.js
  106385. var DomWrapper = /*#__PURE__*/function (_React$Component) {
  106386. (0,inherits["default"])(DomWrapper, _React$Component);
  106387. var _super = (0,createSuper["default"])(DomWrapper);
  106388. function DomWrapper() {
  106389. (0,classCallCheck["default"])(this, DomWrapper);
  106390. return _super.apply(this, arguments);
  106391. }
  106392. (0,createClass["default"])(DomWrapper, [{
  106393. key: "render",
  106394. value: function render() {
  106395. return this.props.children;
  106396. }
  106397. }]);
  106398. return DomWrapper;
  106399. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  106400. /* harmony default export */ var es_DomWrapper = (DomWrapper);
  106401. // EXTERNAL MODULE: ./node_modules/rc-util/es/index.js
  106402. var es = __webpack_require__("./node_modules/rc-util/es/index.js");
  106403. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useState.js
  106404. var useState = __webpack_require__("./node_modules/rc-util/es/hooks/useState.js");
  106405. // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useEvent.js
  106406. var useEvent = __webpack_require__("./node_modules/rc-util/es/hooks/useEvent.js");
  106407. ;// ./node_modules/rc-util/es/hooks/useSyncState.js
  106408. /**
  106409. * Same as React.useState but will always get latest state.
  106410. * This is useful when React merge multiple state updates into one.
  106411. * e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.
  106412. */
  106413. function useSyncState(defaultValue) {
  106414. var _React$useReducer = external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer(function (x) {
  106415. return x + 1;
  106416. }, 0),
  106417. _React$useReducer2 = (0,slicedToArray["default"])(_React$useReducer, 2),
  106418. forceUpdate = _React$useReducer2[1];
  106419. var currentValueRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(defaultValue);
  106420. var getValue = (0,useEvent["default"])(function () {
  106421. return currentValueRef.current;
  106422. });
  106423. var setValue = (0,useEvent["default"])(function (updater) {
  106424. currentValueRef.current = typeof updater === 'function' ? updater(currentValueRef.current) : updater;
  106425. forceUpdate();
  106426. });
  106427. return [getValue, setValue];
  106428. }
  106429. ;// ./node_modules/rc-motion/es/interface.js
  106430. var STATUS_NONE = 'none';
  106431. var STATUS_APPEAR = 'appear';
  106432. var STATUS_ENTER = 'enter';
  106433. var STATUS_LEAVE = 'leave';
  106434. var STEP_NONE = 'none';
  106435. var STEP_PREPARE = 'prepare';
  106436. var STEP_START = 'start';
  106437. var STEP_ACTIVE = 'active';
  106438. var STEP_ACTIVATED = 'end';
  106439. /**
  106440. * Used for disabled motion case.
  106441. * Prepare stage will still work but start & active will be skipped.
  106442. */
  106443. var STEP_PREPARED = 'prepared';
  106444. // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
  106445. var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
  106446. ;// ./node_modules/rc-motion/es/util/motion.js
  106447. // ================= Transition =================
  106448. // Event wrapper. Copy from react source code
  106449. function makePrefixMap(styleProp, eventName) {
  106450. var prefixes = {};
  106451. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  106452. prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName);
  106453. prefixes["Moz".concat(styleProp)] = "moz".concat(eventName);
  106454. prefixes["ms".concat(styleProp)] = "MS".concat(eventName);
  106455. prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase());
  106456. return prefixes;
  106457. }
  106458. function getVendorPrefixes(domSupport, win) {
  106459. var prefixes = {
  106460. animationend: makePrefixMap('Animation', 'AnimationEnd'),
  106461. transitionend: makePrefixMap('Transition', 'TransitionEnd')
  106462. };
  106463. if (domSupport) {
  106464. if (!('AnimationEvent' in win)) {
  106465. delete prefixes.animationend.animation;
  106466. }
  106467. if (!('TransitionEvent' in win)) {
  106468. delete prefixes.transitionend.transition;
  106469. }
  106470. }
  106471. return prefixes;
  106472. }
  106473. var vendorPrefixes = getVendorPrefixes((0,canUseDom["default"])(), typeof window !== 'undefined' ? window : {});
  106474. var style = {};
  106475. if ((0,canUseDom["default"])()) {
  106476. var _document$createEleme = document.createElement('div');
  106477. style = _document$createEleme.style;
  106478. }
  106479. var prefixedEventNames = {};
  106480. function getVendorPrefixedEventName(eventName) {
  106481. if (prefixedEventNames[eventName]) {
  106482. return prefixedEventNames[eventName];
  106483. }
  106484. var prefixMap = vendorPrefixes[eventName];
  106485. if (prefixMap) {
  106486. var stylePropList = Object.keys(prefixMap);
  106487. var len = stylePropList.length;
  106488. for (var i = 0; i < len; i += 1) {
  106489. var styleProp = stylePropList[i];
  106490. if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {
  106491. prefixedEventNames[eventName] = prefixMap[styleProp];
  106492. return prefixedEventNames[eventName];
  106493. }
  106494. }
  106495. }
  106496. return '';
  106497. }
  106498. var internalAnimationEndName = getVendorPrefixedEventName('animationend');
  106499. var internalTransitionEndName = getVendorPrefixedEventName('transitionend');
  106500. var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);
  106501. var animationEndName = internalAnimationEndName || 'animationend';
  106502. var transitionEndName = internalTransitionEndName || 'transitionend';
  106503. function getTransitionName(transitionName, transitionType) {
  106504. if (!transitionName) return null;
  106505. if ((0,esm_typeof["default"])(transitionName) === 'object') {
  106506. var type = transitionType.replace(/-\w/g, function (match) {
  106507. return match[1].toUpperCase();
  106508. });
  106509. return transitionName[type];
  106510. }
  106511. return "".concat(transitionName, "-").concat(transitionType);
  106512. }
  106513. ;// ./node_modules/rc-motion/es/hooks/useDomMotionEvents.js
  106514. /* harmony default export */ var useDomMotionEvents = (function (onInternalMotionEnd) {
  106515. var cacheElementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  106516. // Remove events
  106517. function removeMotionEvents(element) {
  106518. if (element) {
  106519. element.removeEventListener(transitionEndName, onInternalMotionEnd);
  106520. element.removeEventListener(animationEndName, onInternalMotionEnd);
  106521. }
  106522. }
  106523. // Patch events
  106524. function patchMotionEvents(element) {
  106525. if (cacheElementRef.current && cacheElementRef.current !== element) {
  106526. removeMotionEvents(cacheElementRef.current);
  106527. }
  106528. if (element && element !== cacheElementRef.current) {
  106529. element.addEventListener(transitionEndName, onInternalMotionEnd);
  106530. element.addEventListener(animationEndName, onInternalMotionEnd);
  106531. // Save as cache in case dom removed trigger by `motionDeadline`
  106532. cacheElementRef.current = element;
  106533. }
  106534. }
  106535. // Clean up when removed
  106536. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  106537. return function () {
  106538. removeMotionEvents(cacheElementRef.current);
  106539. };
  106540. }, []);
  106541. return [patchMotionEvents, removeMotionEvents];
  106542. });
  106543. ;// ./node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js
  106544. // It's safe to use `useLayoutEffect` but the warning is annoying
  106545. var useIsomorphicLayoutEffect = (0,canUseDom["default"])() ? external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect : external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect;
  106546. /* harmony default export */ var hooks_useIsomorphicLayoutEffect = (useIsomorphicLayoutEffect);
  106547. // EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js
  106548. var raf = __webpack_require__("./node_modules/rc-util/es/raf.js");
  106549. ;// ./node_modules/rc-motion/es/hooks/useNextFrame.js
  106550. /* harmony default export */ var useNextFrame = (function () {
  106551. var nextFrameRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(null);
  106552. function cancelNextFrame() {
  106553. raf["default"].cancel(nextFrameRef.current);
  106554. }
  106555. function nextFrame(callback) {
  106556. var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
  106557. cancelNextFrame();
  106558. var nextFrameId = (0,raf["default"])(function () {
  106559. if (delay <= 1) {
  106560. callback({
  106561. isCanceled: function isCanceled() {
  106562. return nextFrameId !== nextFrameRef.current;
  106563. }
  106564. });
  106565. } else {
  106566. nextFrame(callback, delay - 1);
  106567. }
  106568. });
  106569. nextFrameRef.current = nextFrameId;
  106570. }
  106571. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  106572. return function () {
  106573. cancelNextFrame();
  106574. };
  106575. }, []);
  106576. return [nextFrame, cancelNextFrame];
  106577. });
  106578. ;// ./node_modules/rc-motion/es/hooks/useStepQueue.js
  106579. var FULL_STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED];
  106580. var SIMPLE_STEP_QUEUE = [STEP_PREPARE, STEP_PREPARED];
  106581. /** Skip current step */
  106582. var SkipStep = false;
  106583. /** Current step should be update in */
  106584. var DoStep = true;
  106585. function isActive(step) {
  106586. return step === STEP_ACTIVE || step === STEP_ACTIVATED;
  106587. }
  106588. /* harmony default export */ var useStepQueue = (function (status, prepareOnly, callback) {
  106589. var _useState = (0,useState["default"])(STEP_NONE),
  106590. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  106591. step = _useState2[0],
  106592. setStep = _useState2[1];
  106593. var _useNextFrame = useNextFrame(),
  106594. _useNextFrame2 = (0,slicedToArray["default"])(_useNextFrame, 2),
  106595. nextFrame = _useNextFrame2[0],
  106596. cancelNextFrame = _useNextFrame2[1];
  106597. function startQueue() {
  106598. setStep(STEP_PREPARE, true);
  106599. }
  106600. var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;
  106601. hooks_useIsomorphicLayoutEffect(function () {
  106602. if (step !== STEP_NONE && step !== STEP_ACTIVATED) {
  106603. var index = STEP_QUEUE.indexOf(step);
  106604. var nextStep = STEP_QUEUE[index + 1];
  106605. var result = callback(step);
  106606. if (result === SkipStep) {
  106607. // Skip when no needed
  106608. setStep(nextStep, true);
  106609. } else if (nextStep) {
  106610. // Do as frame for step update
  106611. nextFrame(function (info) {
  106612. function doNext() {
  106613. // Skip since current queue is ood
  106614. if (info.isCanceled()) return;
  106615. setStep(nextStep, true);
  106616. }
  106617. if (result === true) {
  106618. doNext();
  106619. } else {
  106620. // Only promise should be async
  106621. Promise.resolve(result).then(doNext);
  106622. }
  106623. });
  106624. }
  106625. }
  106626. }, [status, step]);
  106627. external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
  106628. return function () {
  106629. cancelNextFrame();
  106630. };
  106631. }, []);
  106632. return [startQueue, step];
  106633. });
  106634. ;// ./node_modules/rc-motion/es/hooks/useStatus.js
  106635. function useStatus(supportMotion, visible, getElement, _ref) {
  106636. var _ref$motionEnter = _ref.motionEnter,
  106637. motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,
  106638. _ref$motionAppear = _ref.motionAppear,
  106639. motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,
  106640. _ref$motionLeave = _ref.motionLeave,
  106641. motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,
  106642. motionDeadline = _ref.motionDeadline,
  106643. motionLeaveImmediately = _ref.motionLeaveImmediately,
  106644. onAppearPrepare = _ref.onAppearPrepare,
  106645. onEnterPrepare = _ref.onEnterPrepare,
  106646. onLeavePrepare = _ref.onLeavePrepare,
  106647. onAppearStart = _ref.onAppearStart,
  106648. onEnterStart = _ref.onEnterStart,
  106649. onLeaveStart = _ref.onLeaveStart,
  106650. onAppearActive = _ref.onAppearActive,
  106651. onEnterActive = _ref.onEnterActive,
  106652. onLeaveActive = _ref.onLeaveActive,
  106653. onAppearEnd = _ref.onAppearEnd,
  106654. onEnterEnd = _ref.onEnterEnd,
  106655. onLeaveEnd = _ref.onLeaveEnd,
  106656. onVisibleChanged = _ref.onVisibleChanged;
  106657. // Used for outer render usage to avoid `visible: false & status: none` to render nothing
  106658. var _useState = (0,useState["default"])(),
  106659. _useState2 = (0,slicedToArray["default"])(_useState, 2),
  106660. asyncVisible = _useState2[0],
  106661. setAsyncVisible = _useState2[1];
  106662. var _useSyncState = useSyncState(STATUS_NONE),
  106663. _useSyncState2 = (0,slicedToArray["default"])(_useSyncState, 2),
  106664. getStatus = _useSyncState2[0],
  106665. setStatus = _useSyncState2[1];
  106666. var _useState3 = (0,useState["default"])(null),
  106667. _useState4 = (0,slicedToArray["default"])(_useState3, 2),
  106668. style = _useState4[0],
  106669. setStyle = _useState4[1];
  106670. var currentStatus = getStatus();
  106671. var mountedRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  106672. var deadlineRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  106673. // =========================== Dom Node ===========================
  106674. function getDomElement() {
  106675. return getElement();
  106676. }
  106677. // ========================== Motion End ==========================
  106678. var activeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
  106679. /**
  106680. * Clean up status & style
  106681. */
  106682. function updateMotionEndStatus() {
  106683. setStatus(STATUS_NONE);
  106684. setStyle(null, true);
  106685. }
  106686. var onInternalMotionEnd = (0,es.useEvent)(function (event) {
  106687. var status = getStatus();
  106688. // Do nothing since not in any transition status.
  106689. // This may happen when `motionDeadline` trigger.
  106690. if (status === STATUS_NONE) {
  106691. return;
  106692. }
  106693. var element = getDomElement();
  106694. if (event && !event.deadline && event.target !== element) {
  106695. // event exists
  106696. // not initiated by deadline
  106697. // transitionEnd not fired by inner elements
  106698. return;
  106699. }
  106700. var currentActive = activeRef.current;
  106701. var canEnd;
  106702. if (status === STATUS_APPEAR && currentActive) {
  106703. canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);
  106704. } else if (status === STATUS_ENTER && currentActive) {
  106705. canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);
  106706. } else if (status === STATUS_LEAVE && currentActive) {
  106707. canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);
  106708. }
  106709. // Only update status when `canEnd` and not destroyed
  106710. if (currentActive && canEnd !== false) {
  106711. updateMotionEndStatus();
  106712. }
  106713. });
  106714. var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),
  106715. _useDomMotionEvents2 = (0,slicedToArray["default"])(_useDomMotionEvents, 1),
  106716. patchMotionEvents = _useDomMotionEvents2[0];
  106717. // ============================= Step =============================
  106718. var getEventHandlers = function getEventHandlers(targetStatus) {
  106719. switch (targetStatus) {
  106720. case STATUS_APPEAR:
  106721. return (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);
  106722. case STATUS_ENTER:
  106723. return (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);
  106724. case STATUS_LEAVE:
  106725. return (0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);
  106726. default:
  106727. return {};
  106728. }
  106729. };
  106730. var eventHandlers = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
  106731. return getEventHandlers(currentStatus);
  106732. }, [currentStatus]);
  106733. var _useStepQueue = useStepQueue(currentStatus, !supportMotion, function (newStep) {
  106734. // Only prepare step can be skip
  106735. if (newStep === STEP_PREPARE) {
  106736. var onPrepare = eventHandlers[STEP_PREPARE];
  106737. if (!onPrepare) {
  106738. return SkipStep;
  106739. }
  106740. return onPrepare(getDomElement());
  106741. }
  106742. // Rest step is sync update
  106743. if (step in eventHandlers) {
  106744. var _eventHandlers$step;
  106745. setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);
  106746. }
  106747. if (step === STEP_ACTIVE && currentStatus !== STATUS_NONE) {
  106748. // Patch events when motion needed
  106749. patchMotionEvents(getDomElement());
  106750. if (motionDeadline > 0) {
  106751. clearTimeout(deadlineRef.current);
  106752. deadlineRef.current = setTimeout(function () {
  106753. onInternalMotionEnd({
  106754. deadline: true
  106755. });
  106756. }, motionDeadline);
  106757. }
  106758. }
  106759. if (step === STEP_PREPARED) {
  106760. updateMotionEndStatus();
  106761. }
  106762. return DoStep;
  106763. }),
  106764. _useStepQueue2 = (0,slicedToArray["default"])(_useStepQueue, 2),
  106765. startStep = _useStepQueue2[0],
  106766. step = _useStepQueue2[1];
  106767. var active = isActive(step);
  106768. activeRef.current = active;
  106769. // ============================ Status ============================
  106770. var visibleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
  106771. // Update with new status
  106772. hooks_useIsomorphicLayoutEffect(function () {
  106773. // When use Suspense, the `visible` will repeat trigger,
  106774. // But not real change of the `visible`, we need to skip it.
  106775. // https://github.com/ant-design/ant-design/issues/44379
  106776. if (mountedRef.current && visibleRef.current === visible) {
  106777. return;
  106778. }
  106779. setAsyncVisible(visible);
  106780. var isMounted = mountedRef.current;
  106781. mountedRef.current = true;
  106782. // if (!supportMotion) {
  106783. // return;
  106784. // }
  106785. var nextStatus;
  106786. // Appear
  106787. if (!isMounted && visible && motionAppear) {
  106788. nextStatus = STATUS_APPEAR;
  106789. }
  106790. // Enter
  106791. if (isMounted && visible && motionEnter) {
  106792. nextStatus = STATUS_ENTER;
  106793. }
  106794. // Leave
  106795. if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {
  106796. nextStatus = STATUS_LEAVE;
  106797. }
  106798. var nextEventHandlers = getEventHandlers(nextStatus);
  106799. // Update to next status
  106800. if (nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE])) {
  106801. setStatus(nextStatus);
  106802. startStep();
  106803. } else {
  106804. // Set back in case no motion but prev status has prepare step
  106805. setStatus(STATUS_NONE);
  106806. }
  106807. visibleRef.current = visible;
  106808. }, [visible]);
  106809. // ============================ Effect ============================
  106810. // Reset when motion changed
  106811. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  106812. if (
  106813. // Cancel appear
  106814. currentStatus === STATUS_APPEAR && !motionAppear ||
  106815. // Cancel enter
  106816. currentStatus === STATUS_ENTER && !motionEnter ||
  106817. // Cancel leave
  106818. currentStatus === STATUS_LEAVE && !motionLeave) {
  106819. setStatus(STATUS_NONE);
  106820. }
  106821. }, [motionAppear, motionEnter, motionLeave]);
  106822. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  106823. return function () {
  106824. mountedRef.current = false;
  106825. clearTimeout(deadlineRef.current);
  106826. };
  106827. }, []);
  106828. // Trigger `onVisibleChanged`
  106829. var firstMountChangeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(false);
  106830. (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
  106831. // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged
  106832. if (asyncVisible) {
  106833. firstMountChangeRef.current = true;
  106834. }
  106835. if (asyncVisible !== undefined && currentStatus === STATUS_NONE) {
  106836. // Skip first render is invisible since it's nothing changed
  106837. if (firstMountChangeRef.current || asyncVisible) {
  106838. onVisibleChanged === null || onVisibleChanged === void 0 || onVisibleChanged(asyncVisible);
  106839. }
  106840. firstMountChangeRef.current = true;
  106841. }
  106842. }, [asyncVisible, currentStatus]);
  106843. // ============================ Styles ============================
  106844. var mergedStyle = style;
  106845. if (eventHandlers[STEP_PREPARE] && step === STEP_START) {
  106846. mergedStyle = (0,objectSpread2["default"])({
  106847. transition: 'none'
  106848. }, mergedStyle);
  106849. }
  106850. return [currentStatus, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];
  106851. }
  106852. ;// ./node_modules/rc-motion/es/CSSMotion.js
  106853. /* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */
  106854. /**
  106855. * `transitionSupport` is used for none transition test case.
  106856. * Default we use browser transition event support check.
  106857. */
  106858. function genCSSMotion(config) {
  106859. var transitionSupport = config;
  106860. if ((0,esm_typeof["default"])(config) === 'object') {
  106861. transitionSupport = config.transitionSupport;
  106862. }
  106863. function isSupportTransition(props, contextMotion) {
  106864. return !!(props.motionName && transitionSupport && contextMotion !== false);
  106865. }
  106866. var CSSMotion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(function (props, ref) {
  106867. var _props$visible = props.visible,
  106868. visible = _props$visible === void 0 ? true : _props$visible,
  106869. _props$removeOnLeave = props.removeOnLeave,
  106870. removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,
  106871. forceRender = props.forceRender,
  106872. children = props.children,
  106873. motionName = props.motionName,
  106874. leavedClassName = props.leavedClassName,
  106875. eventProps = props.eventProps;
  106876. var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(Context),
  106877. contextMotion = _React$useContext.motion;
  106878. var supportMotion = isSupportTransition(props, contextMotion);
  106879. // Ref to the react node, it may be a HTMLElement
  106880. var nodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  106881. // Ref to the dom wrapper in case ref can not pass to HTMLElement
  106882. var wrapperNodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
  106883. function getDomElement() {
  106884. try {
  106885. // Here we're avoiding call for findDOMNode since it's deprecated
  106886. // in strict mode. We're calling it only when node ref is not
  106887. // an instance of DOM HTMLElement. Otherwise use
  106888. // findDOMNode as a final resort
  106889. return nodeRef.current instanceof HTMLElement ? nodeRef.current : (0,findDOMNode["default"])(wrapperNodeRef.current);
  106890. } catch (e) {
  106891. // Only happen when `motionDeadline` trigger but element removed.
  106892. return null;
  106893. }
  106894. }
  106895. var _useStatus = useStatus(supportMotion, visible, getDomElement, props),
  106896. _useStatus2 = (0,slicedToArray["default"])(_useStatus, 4),
  106897. status = _useStatus2[0],
  106898. statusStep = _useStatus2[1],
  106899. statusStyle = _useStatus2[2],
  106900. mergedVisible = _useStatus2[3];
  106901. // Record whether content has rendered
  106902. // Will return null for un-rendered even when `removeOnLeave={false}`
  106903. var renderedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef(mergedVisible);
  106904. if (mergedVisible) {
  106905. renderedRef.current = true;
  106906. }
  106907. // ====================== Refs ======================
  106908. var setNodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback(function (node) {
  106909. nodeRef.current = node;
  106910. (0,es_ref.fillRef)(ref, node);
  106911. }, [ref]);
  106912. // ===================== Render =====================
  106913. var motionChildren;
  106914. var mergedProps = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, eventProps), {}, {
  106915. visible: visible
  106916. });
  106917. if (!children) {
  106918. // No children
  106919. motionChildren = null;
  106920. } else if (status === STATUS_NONE) {
  106921. // Stable children
  106922. if (mergedVisible) {
  106923. motionChildren = children((0,objectSpread2["default"])({}, mergedProps), setNodeRef);
  106924. } else if (!removeOnLeave && renderedRef.current && leavedClassName) {
  106925. motionChildren = children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedProps), {}, {
  106926. className: leavedClassName
  106927. }), setNodeRef);
  106928. } else if (forceRender || !removeOnLeave && !leavedClassName) {
  106929. motionChildren = children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedProps), {}, {
  106930. style: {
  106931. display: 'none'
  106932. }
  106933. }), setNodeRef);
  106934. } else {
  106935. motionChildren = null;
  106936. }
  106937. } else {
  106938. // In motion
  106939. var statusSuffix;
  106940. if (statusStep === STEP_PREPARE) {
  106941. statusSuffix = 'prepare';
  106942. } else if (isActive(statusStep)) {
  106943. statusSuffix = 'active';
  106944. } else if (statusStep === STEP_START) {
  106945. statusSuffix = 'start';
  106946. }
  106947. var motionCls = getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix));
  106948. motionChildren = children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, mergedProps), {}, {
  106949. className: classnames_default()(getTransitionName(motionName, status), (0,defineProperty["default"])((0,defineProperty["default"])({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName === 'string')),
  106950. style: statusStyle
  106951. }), setNodeRef);
  106952. }
  106953. // Auto inject ref if child node not have `ref` props
  106954. if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(motionChildren) && (0,es_ref.supportRef)(motionChildren)) {
  106955. var originNodeRef = (0,es_ref.getNodeRef)(motionChildren);
  106956. if (!originNodeRef) {
  106957. motionChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(motionChildren, {
  106958. ref: setNodeRef
  106959. });
  106960. }
  106961. }
  106962. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(es_DomWrapper, {
  106963. ref: wrapperNodeRef
  106964. }, motionChildren);
  106965. });
  106966. CSSMotion.displayName = 'CSSMotion';
  106967. return CSSMotion;
  106968. }
  106969. /* harmony default export */ var es_CSSMotion = (genCSSMotion(supportTransition));
  106970. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
  106971. var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
  106972. // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
  106973. var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  106974. ;// ./node_modules/rc-motion/es/util/diff.js
  106975. var STATUS_ADD = 'add';
  106976. var STATUS_KEEP = 'keep';
  106977. var STATUS_REMOVE = 'remove';
  106978. var STATUS_REMOVED = 'removed';
  106979. function wrapKeyToObject(key) {
  106980. var keyObj;
  106981. if (key && (0,esm_typeof["default"])(key) === 'object' && 'key' in key) {
  106982. keyObj = key;
  106983. } else {
  106984. keyObj = {
  106985. key: key
  106986. };
  106987. }
  106988. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, keyObj), {}, {
  106989. key: String(keyObj.key)
  106990. });
  106991. }
  106992. function parseKeys() {
  106993. var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  106994. return keys.map(wrapKeyToObject);
  106995. }
  106996. function diffKeys() {
  106997. var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  106998. var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  106999. var list = [];
  107000. var currentIndex = 0;
  107001. var currentLen = currentKeys.length;
  107002. var prevKeyObjects = parseKeys(prevKeys);
  107003. var currentKeyObjects = parseKeys(currentKeys);
  107004. // Check prev keys to insert or keep
  107005. prevKeyObjects.forEach(function (keyObj) {
  107006. var hit = false;
  107007. for (var i = currentIndex; i < currentLen; i += 1) {
  107008. var currentKeyObj = currentKeyObjects[i];
  107009. if (currentKeyObj.key === keyObj.key) {
  107010. // New added keys should add before current key
  107011. if (currentIndex < i) {
  107012. list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {
  107013. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, obj), {}, {
  107014. status: STATUS_ADD
  107015. });
  107016. }));
  107017. currentIndex = i;
  107018. }
  107019. list.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, currentKeyObj), {}, {
  107020. status: STATUS_KEEP
  107021. }));
  107022. currentIndex += 1;
  107023. hit = true;
  107024. break;
  107025. }
  107026. }
  107027. // If not hit, it means key is removed
  107028. if (!hit) {
  107029. list.push((0,objectSpread2["default"])((0,objectSpread2["default"])({}, keyObj), {}, {
  107030. status: STATUS_REMOVE
  107031. }));
  107032. }
  107033. });
  107034. // Add rest to the list
  107035. if (currentIndex < currentLen) {
  107036. list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {
  107037. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, obj), {}, {
  107038. status: STATUS_ADD
  107039. });
  107040. }));
  107041. }
  107042. /**
  107043. * Merge same key when it remove and add again:
  107044. * [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
  107045. */
  107046. var keys = {};
  107047. list.forEach(function (_ref) {
  107048. var key = _ref.key;
  107049. keys[key] = (keys[key] || 0) + 1;
  107050. });
  107051. var duplicatedKeys = Object.keys(keys).filter(function (key) {
  107052. return keys[key] > 1;
  107053. });
  107054. duplicatedKeys.forEach(function (matchKey) {
  107055. // Remove `STATUS_REMOVE` node.
  107056. list = list.filter(function (_ref2) {
  107057. var key = _ref2.key,
  107058. status = _ref2.status;
  107059. return key !== matchKey || status !== STATUS_REMOVE;
  107060. });
  107061. // Update `STATUS_ADD` to `STATUS_KEEP`
  107062. list.forEach(function (node) {
  107063. if (node.key === matchKey) {
  107064. // eslint-disable-next-line no-param-reassign
  107065. node.status = STATUS_KEEP;
  107066. }
  107067. });
  107068. });
  107069. return list;
  107070. }
  107071. ;// ./node_modules/rc-motion/es/CSSMotionList.js
  107072. var CSSMotionList_excluded = ["component", "children", "onVisibleChanged", "onAllRemoved"],
  107073. _excluded2 = ["status"];
  107074. /* eslint react/prop-types: 0 */
  107075. var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearPrepare', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];
  107076. /**
  107077. * Generate a CSSMotionList component with config
  107078. * @param transitionSupport No need since CSSMotionList no longer depends on transition support
  107079. * @param CSSMotion CSSMotion component
  107080. */
  107081. function genCSSMotionList(transitionSupport) {
  107082. var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : es_CSSMotion;
  107083. var CSSMotionList = /*#__PURE__*/function (_React$Component) {
  107084. (0,inherits["default"])(CSSMotionList, _React$Component);
  107085. var _super = (0,createSuper["default"])(CSSMotionList);
  107086. function CSSMotionList() {
  107087. var _this;
  107088. (0,classCallCheck["default"])(this, CSSMotionList);
  107089. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  107090. args[_key] = arguments[_key];
  107091. }
  107092. _this = _super.call.apply(_super, [this].concat(args));
  107093. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "state", {
  107094. keyEntities: []
  107095. });
  107096. // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.
  107097. (0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "removeKey", function (removeKey) {
  107098. _this.setState(function (prevState) {
  107099. var nextKeyEntities = prevState.keyEntities.map(function (entity) {
  107100. if (entity.key !== removeKey) return entity;
  107101. return (0,objectSpread2["default"])((0,objectSpread2["default"])({}, entity), {}, {
  107102. status: STATUS_REMOVED
  107103. });
  107104. });
  107105. return {
  107106. keyEntities: nextKeyEntities
  107107. };
  107108. }, function () {
  107109. var keyEntities = _this.state.keyEntities;
  107110. var restKeysCount = keyEntities.filter(function (_ref) {
  107111. var status = _ref.status;
  107112. return status !== STATUS_REMOVED;
  107113. }).length;
  107114. if (restKeysCount === 0 && _this.props.onAllRemoved) {
  107115. _this.props.onAllRemoved();
  107116. }
  107117. });
  107118. });
  107119. return _this;
  107120. }
  107121. (0,createClass["default"])(CSSMotionList, [{
  107122. key: "render",
  107123. value: function render() {
  107124. var _this2 = this;
  107125. var keyEntities = this.state.keyEntities;
  107126. var _this$props = this.props,
  107127. component = _this$props.component,
  107128. children = _this$props.children,
  107129. _onVisibleChanged = _this$props.onVisibleChanged,
  107130. onAllRemoved = _this$props.onAllRemoved,
  107131. restProps = (0,objectWithoutProperties["default"])(_this$props, CSSMotionList_excluded);
  107132. var Component = component || external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment;
  107133. var motionProps = {};
  107134. MOTION_PROP_NAMES.forEach(function (prop) {
  107135. motionProps[prop] = restProps[prop];
  107136. delete restProps[prop];
  107137. });
  107138. delete restProps.keys;
  107139. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {
  107140. var status = _ref2.status,
  107141. eventProps = (0,objectWithoutProperties["default"])(_ref2, _excluded2);
  107142. var visible = status === STATUS_ADD || status === STATUS_KEEP;
  107143. return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(CSSMotion, (0,esm_extends["default"])({}, motionProps, {
  107144. key: eventProps.key,
  107145. visible: visible,
  107146. eventProps: eventProps,
  107147. onVisibleChanged: function onVisibleChanged(changedVisible) {
  107148. _onVisibleChanged === null || _onVisibleChanged === void 0 || _onVisibleChanged(changedVisible, {
  107149. key: eventProps.key
  107150. });
  107151. if (!changedVisible) {
  107152. _this2.removeKey(eventProps.key);
  107153. }
  107154. }
  107155. }), function (props, ref) {
  107156. return children((0,objectSpread2["default"])((0,objectSpread2["default"])({}, props), {}, {
  107157. index: index
  107158. }), ref);
  107159. });
  107160. }));
  107161. }
  107162. }], [{
  107163. key: "getDerivedStateFromProps",
  107164. value: function getDerivedStateFromProps(_ref3, _ref4) {
  107165. var keys = _ref3.keys;
  107166. var keyEntities = _ref4.keyEntities;
  107167. var parsedKeyObjects = parseKeys(keys);
  107168. var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
  107169. return {
  107170. keyEntities: mixedKeyEntities.filter(function (entity) {
  107171. var prevEntity = keyEntities.find(function (_ref5) {
  107172. var key = _ref5.key;
  107173. return entity.key === key;
  107174. });
  107175. // Remove if already mark as removed
  107176. if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {
  107177. return false;
  107178. }
  107179. return true;
  107180. })
  107181. };
  107182. }
  107183. }]);
  107184. return CSSMotionList;
  107185. }(external_root_React_commonjs2_react_commonjs_react_amd_react_.Component);
  107186. (0,defineProperty["default"])(CSSMotionList, "defaultProps", {
  107187. component: 'div'
  107188. });
  107189. return CSSMotionList;
  107190. }
  107191. /* harmony default export */ var CSSMotionList = (genCSSMotionList(supportTransition));
  107192. ;// ./node_modules/rc-motion/es/index.js
  107193. /* harmony default export */ var rc_motion_es = (es_CSSMotion);
  107194. /***/ }),
  107195. /***/ "./node_modules/rc-pagination/es/locale/en_US.js":
  107196. /*!*******************************************************!*\
  107197. !*** ./node_modules/rc-pagination/es/locale/en_US.js ***!
  107198. \*******************************************************/
  107199. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  107200. "use strict";
  107201. var locale = {
  107202. // Options
  107203. items_per_page: '/ page',
  107204. jump_to: 'Go to',
  107205. jump_to_confirm: 'confirm',
  107206. page: 'Page',
  107207. // Pagination
  107208. prev_page: 'Previous Page',
  107209. next_page: 'Next Page',
  107210. prev_5: 'Previous 5 Pages',
  107211. next_5: 'Next 5 Pages',
  107212. prev_3: 'Previous 3 Pages',
  107213. next_3: 'Next 3 Pages',
  107214. page_size: 'Page Size'
  107215. };
  107216. /* harmony default export */ __webpack_exports__["default"] = (locale);
  107217. /***/ }),
  107218. /***/ "./node_modules/rc-pagination/es/locale/zh_CN.js":
  107219. /*!*******************************************************!*\
  107220. !*** ./node_modules/rc-pagination/es/locale/zh_CN.js ***!
  107221. \*******************************************************/
  107222. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  107223. "use strict";
  107224. var locale = {
  107225. // Options
  107226. items_per_page: '条/页',
  107227. jump_to: '跳至',
  107228. jump_to_confirm: '确定',
  107229. page: '页',
  107230. // Pagination
  107231. prev_page: '上一页',
  107232. next_page: '下一页',
  107233. prev_5: '向前 5 页',
  107234. next_5: '向后 5 页',
  107235. prev_3: '向前 3 页',
  107236. next_3: '向后 3 页',
  107237. page_size: '页码'
  107238. };
  107239. /* harmony default export */ __webpack_exports__["default"] = (locale);
  107240. /***/ }),
  107241. /***/ "./node_modules/rc-picker/es/locale/common.js":
  107242. /*!****************************************************!*\
  107243. !*** ./node_modules/rc-picker/es/locale/common.js ***!
  107244. \****************************************************/
  107245. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107246. "use strict";
  107247. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107248. /* harmony export */ commonLocale: function() { return /* binding */ commonLocale; }
  107249. /* harmony export */ });
  107250. var commonLocale = {
  107251. yearFormat: 'YYYY',
  107252. dayFormat: 'D',
  107253. cellMeridiemFormat: 'A',
  107254. monthBeforeYear: true
  107255. };
  107256. /***/ }),
  107257. /***/ "./node_modules/rc-util/es/Children/toArray.js":
  107258. /*!*****************************************************!*\
  107259. !*** ./node_modules/rc-util/es/Children/toArray.js ***!
  107260. \*****************************************************/
  107261. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107262. "use strict";
  107263. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107264. /* harmony export */ "default": function() { return /* binding */ toArray; }
  107265. /* harmony export */ });
  107266. /* harmony import */ var _React_isFragment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../React/isFragment */ "./node_modules/rc-util/es/React/isFragment.js");
  107267. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
  107268. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  107269. function toArray(children) {
  107270. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  107271. var ret = [];
  107272. react__WEBPACK_IMPORTED_MODULE_1___default().Children.forEach(children, function (child) {
  107273. if ((child === undefined || child === null) && !option.keepEmpty) {
  107274. return;
  107275. }
  107276. if (Array.isArray(child)) {
  107277. ret = ret.concat(toArray(child));
  107278. } else if ((0,_React_isFragment__WEBPACK_IMPORTED_MODULE_0__["default"])(child) && child.props) {
  107279. ret = ret.concat(toArray(child.props.children, option));
  107280. } else {
  107281. ret.push(child);
  107282. }
  107283. });
  107284. return ret;
  107285. }
  107286. /***/ }),
  107287. /***/ "./node_modules/rc-util/es/Dom/canUseDom.js":
  107288. /*!**************************************************!*\
  107289. !*** ./node_modules/rc-util/es/Dom/canUseDom.js ***!
  107290. \**************************************************/
  107291. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107292. "use strict";
  107293. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107294. /* harmony export */ "default": function() { return /* binding */ canUseDom; }
  107295. /* harmony export */ });
  107296. function canUseDom() {
  107297. return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
  107298. }
  107299. /***/ }),
  107300. /***/ "./node_modules/rc-util/es/Dom/contains.js":
  107301. /*!*************************************************!*\
  107302. !*** ./node_modules/rc-util/es/Dom/contains.js ***!
  107303. \*************************************************/
  107304. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107305. "use strict";
  107306. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107307. /* harmony export */ "default": function() { return /* binding */ contains; }
  107308. /* harmony export */ });
  107309. function contains(root, n) {
  107310. if (!root) {
  107311. return false;
  107312. }
  107313. // Use native if support
  107314. if (root.contains) {
  107315. return root.contains(n);
  107316. }
  107317. // `document.contains` not support with IE11
  107318. var node = n;
  107319. while (node) {
  107320. if (node === root) {
  107321. return true;
  107322. }
  107323. node = node.parentNode;
  107324. }
  107325. return false;
  107326. }
  107327. /***/ }),
  107328. /***/ "./node_modules/rc-util/es/Dom/dynamicCSS.js":
  107329. /*!***************************************************!*\
  107330. !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
  107331. \***************************************************/
  107332. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107333. "use strict";
  107334. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107335. /* harmony export */ removeCSS: function() { return /* binding */ removeCSS; },
  107336. /* harmony export */ updateCSS: function() { return /* binding */ updateCSS; }
  107337. /* harmony export */ });
  107338. /* unused harmony exports injectCSS, clearContainerCache */
  107339. /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  107340. /* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./canUseDom */ "./node_modules/rc-util/es/Dom/canUseDom.js");
  107341. /* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contains */ "./node_modules/rc-util/es/Dom/contains.js");
  107342. var APPEND_ORDER = 'data-rc-order';
  107343. var APPEND_PRIORITY = 'data-rc-priority';
  107344. var MARK_KEY = "rc-util-key";
  107345. var containerCache = new Map();
  107346. function getMark() {
  107347. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  107348. mark = _ref.mark;
  107349. if (mark) {
  107350. return mark.startsWith('data-') ? mark : "data-".concat(mark);
  107351. }
  107352. return MARK_KEY;
  107353. }
  107354. function getContainer(option) {
  107355. if (option.attachTo) {
  107356. return option.attachTo;
  107357. }
  107358. var head = document.querySelector('head');
  107359. return head || document.body;
  107360. }
  107361. function getOrder(prepend) {
  107362. if (prepend === 'queue') {
  107363. return 'prependQueue';
  107364. }
  107365. return prepend ? 'prepend' : 'append';
  107366. }
  107367. /**
  107368. * Find style which inject by rc-util
  107369. */
  107370. function findStyles(container) {
  107371. return Array.from((containerCache.get(container) || container).children).filter(function (node) {
  107372. return node.tagName === 'STYLE';
  107373. });
  107374. }
  107375. function injectCSS(css) {
  107376. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  107377. if (!(0,_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])()) {
  107378. return null;
  107379. }
  107380. var csp = option.csp,
  107381. prepend = option.prepend,
  107382. _option$priority = option.priority,
  107383. priority = _option$priority === void 0 ? 0 : _option$priority;
  107384. var mergedOrder = getOrder(prepend);
  107385. var isPrependQueue = mergedOrder === 'prependQueue';
  107386. var styleNode = document.createElement('style');
  107387. styleNode.setAttribute(APPEND_ORDER, mergedOrder);
  107388. if (isPrependQueue && priority) {
  107389. styleNode.setAttribute(APPEND_PRIORITY, "".concat(priority));
  107390. }
  107391. if (csp !== null && csp !== void 0 && csp.nonce) {
  107392. styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;
  107393. }
  107394. styleNode.innerHTML = css;
  107395. var container = getContainer(option);
  107396. var firstChild = container.firstChild;
  107397. if (prepend) {
  107398. // If is queue `prepend`, it will prepend first style and then append rest style
  107399. if (isPrependQueue) {
  107400. var existStyle = (option.styles || findStyles(container)).filter(function (node) {
  107401. // Ignore style which not injected by rc-util with prepend
  107402. if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) {
  107403. return false;
  107404. }
  107405. // Ignore style which priority less then new style
  107406. var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);
  107407. return priority >= nodePriority;
  107408. });
  107409. if (existStyle.length) {
  107410. container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
  107411. return styleNode;
  107412. }
  107413. }
  107414. // Use `insertBefore` as `prepend`
  107415. container.insertBefore(styleNode, firstChild);
  107416. } else {
  107417. container.appendChild(styleNode);
  107418. }
  107419. return styleNode;
  107420. }
  107421. function findExistNode(key) {
  107422. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  107423. var container = getContainer(option);
  107424. return (option.styles || findStyles(container)).find(function (node) {
  107425. return node.getAttribute(getMark(option)) === key;
  107426. });
  107427. }
  107428. function removeCSS(key) {
  107429. var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  107430. var existNode = findExistNode(key, option);
  107431. if (existNode) {
  107432. var container = getContainer(option);
  107433. container.removeChild(existNode);
  107434. }
  107435. }
  107436. /**
  107437. * qiankun will inject `appendChild` to insert into other
  107438. */
  107439. function syncRealContainer(container, option) {
  107440. var cachedRealContainer = containerCache.get(container);
  107441. // Find real container when not cached or cached container removed
  107442. if (!cachedRealContainer || !(0,_contains__WEBPACK_IMPORTED_MODULE_2__["default"])(document, cachedRealContainer)) {
  107443. var placeholderStyle = injectCSS('', option);
  107444. var parentNode = placeholderStyle.parentNode;
  107445. containerCache.set(container, parentNode);
  107446. container.removeChild(placeholderStyle);
  107447. }
  107448. }
  107449. /**
  107450. * manually clear container cache to avoid global cache in unit testes
  107451. */
  107452. function clearContainerCache() {
  107453. containerCache.clear();
  107454. }
  107455. function updateCSS(css, key) {
  107456. var originOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  107457. var container = getContainer(originOption);
  107458. var styles = findStyles(container);
  107459. var option = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, originOption), {}, {
  107460. styles: styles
  107461. });
  107462. // Sync real parent
  107463. syncRealContainer(container, option);
  107464. var existNode = findExistNode(key, option);
  107465. if (existNode) {
  107466. var _option$csp, _option$csp2;
  107467. if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {
  107468. var _option$csp3;
  107469. existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;
  107470. }
  107471. if (existNode.innerHTML !== css) {
  107472. existNode.innerHTML = css;
  107473. }
  107474. return existNode;
  107475. }
  107476. var newNode = injectCSS(css, option);
  107477. newNode.setAttribute(getMark(option), key);
  107478. return newNode;
  107479. }
  107480. /***/ }),
  107481. /***/ "./node_modules/rc-util/es/Dom/findDOMNode.js":
  107482. /*!****************************************************!*\
  107483. !*** ./node_modules/rc-util/es/Dom/findDOMNode.js ***!
  107484. \****************************************************/
  107485. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107486. "use strict";
  107487. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107488. /* harmony export */ "default": function() { return /* binding */ findDOMNode; },
  107489. /* harmony export */ getDOM: function() { return /* binding */ getDOM; },
  107490. /* harmony export */ isDOM: function() { return /* binding */ isDOM; }
  107491. /* harmony export */ });
  107492. /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  107493. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
  107494. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  107495. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
  107496. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
  107497. function isDOM(node) {
  107498. // https://developer.mozilla.org/en-US/docs/Web/API/Element
  107499. // Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement
  107500. return node instanceof HTMLElement || node instanceof SVGElement;
  107501. }
  107502. /**
  107503. * Retrieves a DOM node via a ref, and does not invoke `findDOMNode`.
  107504. */
  107505. function getDOM(node) {
  107506. if (node && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(node) === 'object' && isDOM(node.nativeElement)) {
  107507. return node.nativeElement;
  107508. }
  107509. if (isDOM(node)) {
  107510. return node;
  107511. }
  107512. return null;
  107513. }
  107514. /**
  107515. * Return if a node is a DOM node. Else will return by `findDOMNode`
  107516. */
  107517. function findDOMNode(node) {
  107518. var domNode = getDOM(node);
  107519. if (domNode) {
  107520. return domNode;
  107521. }
  107522. if (node instanceof (react__WEBPACK_IMPORTED_MODULE_1___default().Component)) {
  107523. var _ReactDOM$findDOMNode;
  107524. return (_ReactDOM$findDOMNode = (react_dom__WEBPACK_IMPORTED_MODULE_2___default().findDOMNode)) === null || _ReactDOM$findDOMNode === void 0 ? void 0 : _ReactDOM$findDOMNode.call((react_dom__WEBPACK_IMPORTED_MODULE_2___default()), node);
  107525. }
  107526. return null;
  107527. }
  107528. /***/ }),
  107529. /***/ "./node_modules/rc-util/es/Dom/shadow.js":
  107530. /*!***********************************************!*\
  107531. !*** ./node_modules/rc-util/es/Dom/shadow.js ***!
  107532. \***********************************************/
  107533. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  107534. "use strict";
  107535. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  107536. /* harmony export */ getShadowRoot: function() { return /* binding */ getShadowRoot; }
  107537. /* harmony export */ });
  107538. /* unused harmony export inShadow */
  107539. function getRoot(ele) {
  107540. var _ele$getRootNode;
  107541. return ele === null || ele === void 0 || (_ele$getRootNode = ele.getRootNode) === null || _ele$getRootNode === void 0 ? void 0 : _ele$getRootNode.call(ele);
  107542. }
  107543. /**
  107544. * Check if is in shadowRoot
  107545. */
  107546. function inShadow(ele) {
  107547. return getRoot(ele) instanceof ShadowRoot;
  107548. }
  107549. /**
  107550. * Return shadowRoot if possible
  107551. */
  107552. function getShadowRoot(ele) {
  107553. return inShadow(ele) ? getRoot(ele) : null;
  107554. }
  107555. /***/ }),
  107556. /***/ "./node_modules/rc-util/es/KeyCode.js":
  107557. /*!********************************************!*\
  107558. !*** ./node_modules/rc-util/es/KeyCode.js ***!
  107559. \********************************************/
  107560. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  107561. "use strict";
  107562. /**
  107563. * @ignore
  107564. * some key-codes definition and utils from closure-library
  107565. * @author yiminghe@gmail.com
  107566. */
  107567. var KeyCode = {
  107568. /**
  107569. * MAC_ENTER
  107570. */
  107571. MAC_ENTER: 3,
  107572. /**
  107573. * BACKSPACE
  107574. */
  107575. BACKSPACE: 8,
  107576. /**
  107577. * TAB
  107578. */
  107579. TAB: 9,
  107580. /**
  107581. * NUMLOCK on FF/Safari Mac
  107582. */
  107583. NUM_CENTER: 12,
  107584. // NUMLOCK on FF/Safari Mac
  107585. /**
  107586. * ENTER
  107587. */
  107588. ENTER: 13,
  107589. /**
  107590. * SHIFT
  107591. */
  107592. SHIFT: 16,
  107593. /**
  107594. * CTRL
  107595. */
  107596. CTRL: 17,
  107597. /**
  107598. * ALT
  107599. */
  107600. ALT: 18,
  107601. /**
  107602. * PAUSE
  107603. */
  107604. PAUSE: 19,
  107605. /**
  107606. * CAPS_LOCK
  107607. */
  107608. CAPS_LOCK: 20,
  107609. /**
  107610. * ESC
  107611. */
  107612. ESC: 27,
  107613. /**
  107614. * SPACE
  107615. */
  107616. SPACE: 32,
  107617. /**
  107618. * PAGE_UP
  107619. */
  107620. PAGE_UP: 33,
  107621. // also NUM_NORTH_EAST
  107622. /**
  107623. * PAGE_DOWN
  107624. */
  107625. PAGE_DOWN: 34,
  107626. // also NUM_SOUTH_EAST
  107627. /**
  107628. * END
  107629. */
  107630. END: 35,
  107631. // also NUM_SOUTH_WEST
  107632. /**
  107633. * HOME
  107634. */
  107635. HOME: 36,
  107636. // also NUM_NORTH_WEST
  107637. /**
  107638. * LEFT
  107639. */
  107640. LEFT: 37,
  107641. // also NUM_WEST
  107642. /**
  107643. * UP
  107644. */
  107645. UP: 38,
  107646. // also NUM_NORTH
  107647. /**
  107648. * RIGHT
  107649. */
  107650. RIGHT: 39,
  107651. // also NUM_EAST
  107652. /**
  107653. * DOWN
  107654. */
  107655. DOWN: 40,
  107656. // also NUM_SOUTH
  107657. /**
  107658. * PRINT_SCREEN
  107659. */
  107660. PRINT_SCREEN: 44,
  107661. /**
  107662. * INSERT
  107663. */
  107664. INSERT: 45,
  107665. // also NUM_INSERT
  107666. /**
  107667. * DELETE
  107668. */
  107669. DELETE: 46,
  107670. // also NUM_DELETE
  107671. /**
  107672. * ZERO
  107673. */
  107674. ZERO: 48,
  107675. /**
  107676. * ONE
  107677. */
  107678. ONE: 49,
  107679. /**
  107680. * TWO
  107681. */
  107682. TWO: 50,
  107683. /**
  107684. * THREE
  107685. */
  107686. THREE: 51,
  107687. /**
  107688. * FOUR
  107689. */
  107690. FOUR: 52,
  107691. /**
  107692. * FIVE
  107693. */
  107694. FIVE: 53,
  107695. /**
  107696. * SIX
  107697. */
  107698. SIX: 54,
  107699. /**
  107700. * SEVEN
  107701. */
  107702. SEVEN: 55,
  107703. /**
  107704. * EIGHT
  107705. */
  107706. EIGHT: 56,
  107707. /**
  107708. * NINE
  107709. */
  107710. NINE: 57,
  107711. /**
  107712. * QUESTION_MARK
  107713. */
  107714. QUESTION_MARK: 63,
  107715. // needs localization
  107716. /**
  107717. * A
  107718. */
  107719. A: 65,
  107720. /**
  107721. * B
  107722. */
  107723. B: 66,
  107724. /**
  107725. * C
  107726. */
  107727. C: 67,
  107728. /**
  107729. * D
  107730. */
  107731. D: 68,
  107732. /**
  107733. * E
  107734. */
  107735. E: 69,
  107736. /**
  107737. * F
  107738. */
  107739. F: 70,
  107740. /**
  107741. * G
  107742. */
  107743. G: 71,
  107744. /**
  107745. * H
  107746. */
  107747. H: 72,
  107748. /**
  107749. * I
  107750. */
  107751. I: 73,
  107752. /**
  107753. * J
  107754. */
  107755. J: 74,
  107756. /**
  107757. * K
  107758. */
  107759. K: 75,
  107760. /**
  107761. * L
  107762. */
  107763. L: 76,
  107764. /**
  107765. * M
  107766. */
  107767. M: 77,
  107768. /**
  107769. * N
  107770. */
  107771. N: 78,
  107772. /**
  107773. * O
  107774. */
  107775. O: 79,
  107776. /**
  107777. * P
  107778. */
  107779. P: 80,
  107780. /**
  107781. * Q
  107782. */
  107783. Q: 81,
  107784. /**
  107785. * R
  107786. */
  107787. R: 82,
  107788. /**
  107789. * S
  107790. */
  107791. S: 83,
  107792. /**
  107793. * T
  107794. */
  107795. T: 84,
  107796. /**
  107797. * U
  107798. */
  107799. U: 85,
  107800. /**
  107801. * V
  107802. */
  107803. V: 86,
  107804. /**
  107805. * W
  107806. */
  107807. W: 87,
  107808. /**
  107809. * X
  107810. */
  107811. X: 88,
  107812. /**
  107813. * Y
  107814. */
  107815. Y: 89,
  107816. /**
  107817. * Z
  107818. */
  107819. Z: 90,
  107820. /**
  107821. * META
  107822. */
  107823. META: 91,
  107824. // WIN_KEY_LEFT
  107825. /**
  107826. * WIN_KEY_RIGHT
  107827. */
  107828. WIN_KEY_RIGHT: 92,
  107829. /**
  107830. * CONTEXT_MENU
  107831. */
  107832. CONTEXT_MENU: 93,
  107833. /**
  107834. * NUM_ZERO
  107835. */
  107836. NUM_ZERO: 96,
  107837. /**
  107838. * NUM_ONE
  107839. */
  107840. NUM_ONE: 97,
  107841. /**
  107842. * NUM_TWO
  107843. */
  107844. NUM_TWO: 98,
  107845. /**
  107846. * NUM_THREE
  107847. */
  107848. NUM_THREE: 99,
  107849. /**
  107850. * NUM_FOUR
  107851. */
  107852. NUM_FOUR: 100,
  107853. /**
  107854. * NUM_FIVE
  107855. */
  107856. NUM_FIVE: 101,
  107857. /**
  107858. * NUM_SIX
  107859. */
  107860. NUM_SIX: 102,
  107861. /**
  107862. * NUM_SEVEN
  107863. */
  107864. NUM_SEVEN: 103,
  107865. /**
  107866. * NUM_EIGHT
  107867. */
  107868. NUM_EIGHT: 104,
  107869. /**
  107870. * NUM_NINE
  107871. */
  107872. NUM_NINE: 105,
  107873. /**
  107874. * NUM_MULTIPLY
  107875. */
  107876. NUM_MULTIPLY: 106,
  107877. /**
  107878. * NUM_PLUS
  107879. */
  107880. NUM_PLUS: 107,
  107881. /**
  107882. * NUM_MINUS
  107883. */
  107884. NUM_MINUS: 109,
  107885. /**
  107886. * NUM_PERIOD
  107887. */
  107888. NUM_PERIOD: 110,
  107889. /**
  107890. * NUM_DIVISION
  107891. */
  107892. NUM_DIVISION: 111,
  107893. /**
  107894. * F1
  107895. */
  107896. F1: 112,
  107897. /**
  107898. * F2
  107899. */
  107900. F2: 113,
  107901. /**
  107902. * F3
  107903. */
  107904. F3: 114,
  107905. /**
  107906. * F4
  107907. */
  107908. F4: 115,
  107909. /**
  107910. * F5
  107911. */
  107912. F5: 116,
  107913. /**
  107914. * F6
  107915. */
  107916. F6: 117,
  107917. /**
  107918. * F7
  107919. */
  107920. F7: 118,
  107921. /**
  107922. * F8
  107923. */
  107924. F8: 119,
  107925. /**
  107926. * F9
  107927. */
  107928. F9: 120,
  107929. /**
  107930. * F10
  107931. */
  107932. F10: 121,
  107933. /**
  107934. * F11
  107935. */
  107936. F11: 122,
  107937. /**
  107938. * F12
  107939. */
  107940. F12: 123,
  107941. /**
  107942. * NUMLOCK
  107943. */
  107944. NUMLOCK: 144,
  107945. /**
  107946. * SEMICOLON
  107947. */
  107948. SEMICOLON: 186,
  107949. // needs localization
  107950. /**
  107951. * DASH
  107952. */
  107953. DASH: 189,
  107954. // needs localization
  107955. /**
  107956. * EQUALS
  107957. */
  107958. EQUALS: 187,
  107959. // needs localization
  107960. /**
  107961. * COMMA
  107962. */
  107963. COMMA: 188,
  107964. // needs localization
  107965. /**
  107966. * PERIOD
  107967. */
  107968. PERIOD: 190,
  107969. // needs localization
  107970. /**
  107971. * SLASH
  107972. */
  107973. SLASH: 191,
  107974. // needs localization
  107975. /**
  107976. * APOSTROPHE
  107977. */
  107978. APOSTROPHE: 192,
  107979. // needs localization
  107980. /**
  107981. * SINGLE_QUOTE
  107982. */
  107983. SINGLE_QUOTE: 222,
  107984. // needs localization
  107985. /**
  107986. * OPEN_SQUARE_BRACKET
  107987. */
  107988. OPEN_SQUARE_BRACKET: 219,
  107989. // needs localization
  107990. /**
  107991. * BACKSLASH
  107992. */
  107993. BACKSLASH: 220,
  107994. // needs localization
  107995. /**
  107996. * CLOSE_SQUARE_BRACKET
  107997. */
  107998. CLOSE_SQUARE_BRACKET: 221,
  107999. // needs localization
  108000. /**
  108001. * WIN_KEY
  108002. */
  108003. WIN_KEY: 224,
  108004. /**
  108005. * MAC_FF_META
  108006. */
  108007. MAC_FF_META: 224,
  108008. // Firefox (Gecko) fires this for the meta key instead of 91
  108009. /**
  108010. * WIN_IME
  108011. */
  108012. WIN_IME: 229,
  108013. // ======================== Function ========================
  108014. /**
  108015. * whether text and modified key is entered at the same time.
  108016. */
  108017. isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {
  108018. var keyCode = e.keyCode;
  108019. if (e.altKey && !e.ctrlKey || e.metaKey ||
  108020. // Function keys don't generate text
  108021. keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
  108022. return false;
  108023. }
  108024. // The following keys are quite harmless, even in combination with
  108025. // CTRL, ALT or SHIFT.
  108026. switch (keyCode) {
  108027. case KeyCode.ALT:
  108028. case KeyCode.CAPS_LOCK:
  108029. case KeyCode.CONTEXT_MENU:
  108030. case KeyCode.CTRL:
  108031. case KeyCode.DOWN:
  108032. case KeyCode.END:
  108033. case KeyCode.ESC:
  108034. case KeyCode.HOME:
  108035. case KeyCode.INSERT:
  108036. case KeyCode.LEFT:
  108037. case KeyCode.MAC_FF_META:
  108038. case KeyCode.META:
  108039. case KeyCode.NUMLOCK:
  108040. case KeyCode.NUM_CENTER:
  108041. case KeyCode.PAGE_DOWN:
  108042. case KeyCode.PAGE_UP:
  108043. case KeyCode.PAUSE:
  108044. case KeyCode.PRINT_SCREEN:
  108045. case KeyCode.RIGHT:
  108046. case KeyCode.SHIFT:
  108047. case KeyCode.UP:
  108048. case KeyCode.WIN_KEY:
  108049. case KeyCode.WIN_KEY_RIGHT:
  108050. return false;
  108051. default:
  108052. return true;
  108053. }
  108054. },
  108055. /**
  108056. * whether character is entered.
  108057. */
  108058. isCharacterKey: function isCharacterKey(keyCode) {
  108059. if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
  108060. return true;
  108061. }
  108062. if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
  108063. return true;
  108064. }
  108065. if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
  108066. return true;
  108067. }
  108068. // Safari sends zero key code for non-latin characters.
  108069. if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
  108070. return true;
  108071. }
  108072. switch (keyCode) {
  108073. case KeyCode.SPACE:
  108074. case KeyCode.QUESTION_MARK:
  108075. case KeyCode.NUM_PLUS:
  108076. case KeyCode.NUM_MINUS:
  108077. case KeyCode.NUM_PERIOD:
  108078. case KeyCode.NUM_DIVISION:
  108079. case KeyCode.SEMICOLON:
  108080. case KeyCode.DASH:
  108081. case KeyCode.EQUALS:
  108082. case KeyCode.COMMA:
  108083. case KeyCode.PERIOD:
  108084. case KeyCode.SLASH:
  108085. case KeyCode.APOSTROPHE:
  108086. case KeyCode.SINGLE_QUOTE:
  108087. case KeyCode.OPEN_SQUARE_BRACKET:
  108088. case KeyCode.BACKSLASH:
  108089. case KeyCode.CLOSE_SQUARE_BRACKET:
  108090. return true;
  108091. default:
  108092. return false;
  108093. }
  108094. }
  108095. };
  108096. /* harmony default export */ __webpack_exports__["default"] = (KeyCode);
  108097. /***/ }),
  108098. /***/ "./node_modules/rc-util/es/React/isFragment.js":
  108099. /*!*****************************************************!*\
  108100. !*** ./node_modules/rc-util/es/React/isFragment.js ***!
  108101. \*****************************************************/
  108102. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108103. "use strict";
  108104. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108105. /* harmony export */ "default": function() { return /* binding */ isFragment; }
  108106. /* harmony export */ });
  108107. /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  108108. var REACT_ELEMENT_TYPE_18 = Symbol.for('react.element');
  108109. var REACT_ELEMENT_TYPE_19 = Symbol.for('react.transitional.element');
  108110. var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
  108111. /**
  108112. * Compatible with React 18 or 19 to check if node is a Fragment.
  108113. */
  108114. function isFragment(object) {
  108115. return (
  108116. // Base object type
  108117. object && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(object) === 'object' && (
  108118. // React Element type
  108119. object.$$typeof === REACT_ELEMENT_TYPE_18 || object.$$typeof === REACT_ELEMENT_TYPE_19) &&
  108120. // React Fragment type
  108121. object.type === REACT_FRAGMENT_TYPE
  108122. );
  108123. }
  108124. /***/ }),
  108125. /***/ "./node_modules/rc-util/es/hooks/useEvent.js":
  108126. /*!***************************************************!*\
  108127. !*** ./node_modules/rc-util/es/hooks/useEvent.js ***!
  108128. \***************************************************/
  108129. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108130. "use strict";
  108131. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108132. /* harmony export */ "default": function() { return /* binding */ useEvent; }
  108133. /* harmony export */ });
  108134. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  108135. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  108136. function useEvent(callback) {
  108137. var fnRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();
  108138. fnRef.current = callback;
  108139. var memoFn = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function () {
  108140. var _fnRef$current;
  108141. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  108142. args[_key] = arguments[_key];
  108143. }
  108144. return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
  108145. }, []);
  108146. return memoFn;
  108147. }
  108148. /***/ }),
  108149. /***/ "./node_modules/rc-util/es/hooks/useLayoutEffect.js":
  108150. /*!**********************************************************!*\
  108151. !*** ./node_modules/rc-util/es/hooks/useLayoutEffect.js ***!
  108152. \**********************************************************/
  108153. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108154. "use strict";
  108155. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108156. /* harmony export */ useLayoutUpdateEffect: function() { return /* binding */ useLayoutUpdateEffect; }
  108157. /* harmony export */ });
  108158. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  108159. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  108160. /* harmony import */ var _Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dom/canUseDom */ "./node_modules/rc-util/es/Dom/canUseDom.js");
  108161. /**
  108162. * Wrap `React.useLayoutEffect` which will not throw warning message in test env
  108163. */
  108164. var useInternalLayoutEffect = true && (0,_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])() ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
  108165. var useLayoutEffect = function useLayoutEffect(callback, deps) {
  108166. var firstMountRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true);
  108167. useInternalLayoutEffect(function () {
  108168. return callback(firstMountRef.current);
  108169. }, deps);
  108170. // We tell react that first mount has passed
  108171. useInternalLayoutEffect(function () {
  108172. firstMountRef.current = false;
  108173. return function () {
  108174. firstMountRef.current = true;
  108175. };
  108176. }, []);
  108177. };
  108178. var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
  108179. useLayoutEffect(function (firstMount) {
  108180. if (!firstMount) {
  108181. return callback();
  108182. }
  108183. }, deps);
  108184. };
  108185. /* harmony default export */ __webpack_exports__["default"] = (useLayoutEffect);
  108186. /***/ }),
  108187. /***/ "./node_modules/rc-util/es/hooks/useMemo.js":
  108188. /*!**************************************************!*\
  108189. !*** ./node_modules/rc-util/es/hooks/useMemo.js ***!
  108190. \**************************************************/
  108191. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108192. "use strict";
  108193. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108194. /* harmony export */ "default": function() { return /* binding */ useMemo; }
  108195. /* harmony export */ });
  108196. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  108197. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  108198. function useMemo(getValue, condition, shouldUpdate) {
  108199. var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef({});
  108200. if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
  108201. cacheRef.current.value = getValue();
  108202. cacheRef.current.condition = condition;
  108203. }
  108204. return cacheRef.current.value;
  108205. }
  108206. /***/ }),
  108207. /***/ "./node_modules/rc-util/es/hooks/useMergedState.js":
  108208. /*!*********************************************************!*\
  108209. !*** ./node_modules/rc-util/es/hooks/useMergedState.js ***!
  108210. \*********************************************************/
  108211. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108212. "use strict";
  108213. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108214. /* harmony export */ "default": function() { return /* binding */ useMergedState; }
  108215. /* harmony export */ });
  108216. /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  108217. /* harmony import */ var _useEvent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useEvent */ "./node_modules/rc-util/es/hooks/useEvent.js");
  108218. /* harmony import */ var _useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useLayoutEffect */ "./node_modules/rc-util/es/hooks/useLayoutEffect.js");
  108219. /* harmony import */ var _useState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useState */ "./node_modules/rc-util/es/hooks/useState.js");
  108220. /** We only think `undefined` is empty */
  108221. function hasValue(value) {
  108222. return value !== undefined;
  108223. }
  108224. /**
  108225. * Similar to `useState` but will use props value if provided.
  108226. * Note that internal use rc-util `useState` hook.
  108227. */
  108228. function useMergedState(defaultStateValue, option) {
  108229. var _ref = option || {},
  108230. defaultValue = _ref.defaultValue,
  108231. value = _ref.value,
  108232. onChange = _ref.onChange,
  108233. postState = _ref.postState;
  108234. // ======================= Init =======================
  108235. var _useState = (0,_useState__WEBPACK_IMPORTED_MODULE_3__["default"])(function () {
  108236. if (hasValue(value)) {
  108237. return value;
  108238. } else if (hasValue(defaultValue)) {
  108239. return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
  108240. } else {
  108241. return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
  108242. }
  108243. }),
  108244. _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2),
  108245. innerValue = _useState2[0],
  108246. setInnerValue = _useState2[1];
  108247. var mergedValue = value !== undefined ? value : innerValue;
  108248. var postMergedValue = postState ? postState(mergedValue) : mergedValue;
  108249. // ====================== Change ======================
  108250. var onChangeFn = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__["default"])(onChange);
  108251. var _useState3 = (0,_useState__WEBPACK_IMPORTED_MODULE_3__["default"])([mergedValue]),
  108252. _useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState3, 2),
  108253. prevValue = _useState4[0],
  108254. setPrevValue = _useState4[1];
  108255. (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {
  108256. var prev = prevValue[0];
  108257. if (innerValue !== prev) {
  108258. onChangeFn(innerValue, prev);
  108259. }
  108260. }, [prevValue]);
  108261. // Sync value back to `undefined` when it from control to un-control
  108262. (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {
  108263. if (!hasValue(value)) {
  108264. setInnerValue(value);
  108265. }
  108266. }, [value]);
  108267. // ====================== Update ======================
  108268. var triggerChange = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__["default"])(function (updater, ignoreDestroy) {
  108269. setInnerValue(updater, ignoreDestroy);
  108270. setPrevValue([mergedValue], ignoreDestroy);
  108271. });
  108272. return [postMergedValue, triggerChange];
  108273. }
  108274. /***/ }),
  108275. /***/ "./node_modules/rc-util/es/hooks/useState.js":
  108276. /*!***************************************************!*\
  108277. !*** ./node_modules/rc-util/es/hooks/useState.js ***!
  108278. \***************************************************/
  108279. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108280. "use strict";
  108281. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108282. /* harmony export */ "default": function() { return /* binding */ useSafeState; }
  108283. /* harmony export */ });
  108284. /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  108285. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
  108286. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  108287. /**
  108288. * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.
  108289. * We do not make this auto is to avoid real memory leak.
  108290. * Developer should confirm it's safe to ignore themselves.
  108291. */
  108292. function useSafeState(defaultValue) {
  108293. var destroyRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(false);
  108294. var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__.useState(defaultValue),
  108295. _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_React$useState, 2),
  108296. value = _React$useState2[0],
  108297. setValue = _React$useState2[1];
  108298. react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () {
  108299. destroyRef.current = false;
  108300. return function () {
  108301. destroyRef.current = true;
  108302. };
  108303. }, []);
  108304. function safeSetState(updater, ignoreDestroy) {
  108305. if (ignoreDestroy && destroyRef.current) {
  108306. return;
  108307. }
  108308. setValue(updater);
  108309. }
  108310. return [value, safeSetState];
  108311. }
  108312. /***/ }),
  108313. /***/ "./node_modules/rc-util/es/index.js":
  108314. /*!******************************************!*\
  108315. !*** ./node_modules/rc-util/es/index.js ***!
  108316. \******************************************/
  108317. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108318. "use strict";
  108319. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108320. /* harmony export */ get: function() { return /* reexport safe */ _utils_get__WEBPACK_IMPORTED_MODULE_3__["default"]; },
  108321. /* harmony export */ set: function() { return /* reexport safe */ _utils_set__WEBPACK_IMPORTED_MODULE_4__["default"]; },
  108322. /* harmony export */ useEvent: function() { return /* reexport safe */ _hooks_useEvent__WEBPACK_IMPORTED_MODULE_0__["default"]; },
  108323. /* harmony export */ useMergedState: function() { return /* reexport safe */ _hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__["default"]; },
  108324. /* harmony export */ warning: function() { return /* reexport safe */ _warning__WEBPACK_IMPORTED_MODULE_5__["default"]; }
  108325. /* harmony export */ });
  108326. /* harmony import */ var _hooks_useEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hooks/useEvent */ "./node_modules/rc-util/es/hooks/useEvent.js");
  108327. /* harmony import */ var _hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js");
  108328. /* harmony import */ var _ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ref */ "./node_modules/rc-util/es/ref.js");
  108329. /* harmony import */ var _utils_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/get */ "./node_modules/rc-util/es/utils/get.js");
  108330. /* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/set */ "./node_modules/rc-util/es/utils/set.js");
  108331. /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./warning */ "./node_modules/rc-util/es/warning.js");
  108332. /***/ }),
  108333. /***/ "./node_modules/rc-util/es/isEqual.js":
  108334. /*!********************************************!*\
  108335. !*** ./node_modules/rc-util/es/isEqual.js ***!
  108336. \********************************************/
  108337. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108338. "use strict";
  108339. /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  108340. /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warning */ "./node_modules/rc-util/es/warning.js");
  108341. /**
  108342. * Deeply compares two object literals.
  108343. * @param obj1 object 1
  108344. * @param obj2 object 2
  108345. * @param shallow shallow compare
  108346. * @returns
  108347. */
  108348. function isEqual(obj1, obj2) {
  108349. var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  108350. // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f
  108351. var refSet = new Set();
  108352. function deepEqual(a, b) {
  108353. var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
  108354. var circular = refSet.has(a);
  108355. (0,_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(!circular, 'Warning: There may be circular references');
  108356. if (circular) {
  108357. return false;
  108358. }
  108359. if (a === b) {
  108360. return true;
  108361. }
  108362. if (shallow && level > 1) {
  108363. return false;
  108364. }
  108365. refSet.add(a);
  108366. var newLevel = level + 1;
  108367. if (Array.isArray(a)) {
  108368. if (!Array.isArray(b) || a.length !== b.length) {
  108369. return false;
  108370. }
  108371. for (var i = 0; i < a.length; i++) {
  108372. if (!deepEqual(a[i], b[i], newLevel)) {
  108373. return false;
  108374. }
  108375. }
  108376. return true;
  108377. }
  108378. if (a && b && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(a) === 'object' && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(b) === 'object') {
  108379. var keys = Object.keys(a);
  108380. if (keys.length !== Object.keys(b).length) {
  108381. return false;
  108382. }
  108383. return keys.every(function (key) {
  108384. return deepEqual(a[key], b[key], newLevel);
  108385. });
  108386. }
  108387. // other
  108388. return false;
  108389. }
  108390. return deepEqual(obj1, obj2);
  108391. }
  108392. /* harmony default export */ __webpack_exports__["default"] = (isEqual);
  108393. /***/ }),
  108394. /***/ "./node_modules/rc-util/es/omit.js":
  108395. /*!*****************************************!*\
  108396. !*** ./node_modules/rc-util/es/omit.js ***!
  108397. \*****************************************/
  108398. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108399. "use strict";
  108400. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108401. /* harmony export */ "default": function() { return /* binding */ omit; }
  108402. /* harmony export */ });
  108403. function omit(obj, fields) {
  108404. var clone = Object.assign({}, obj);
  108405. if (Array.isArray(fields)) {
  108406. fields.forEach(function (key) {
  108407. delete clone[key];
  108408. });
  108409. }
  108410. return clone;
  108411. }
  108412. /***/ }),
  108413. /***/ "./node_modules/rc-util/es/pickAttrs.js":
  108414. /*!**********************************************!*\
  108415. !*** ./node_modules/rc-util/es/pickAttrs.js ***!
  108416. \**********************************************/
  108417. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108418. "use strict";
  108419. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108420. /* harmony export */ "default": function() { return /* binding */ pickAttrs; }
  108421. /* harmony export */ });
  108422. /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  108423. var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
  108424. var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
  108425. var propList = "".concat(attributes, " ").concat(eventsName).split(/[\s\n]+/);
  108426. /* eslint-enable max-len */
  108427. var ariaPrefix = 'aria-';
  108428. var dataPrefix = 'data-';
  108429. function match(key, prefix) {
  108430. return key.indexOf(prefix) === 0;
  108431. }
  108432. /**
  108433. * Picker props from exist props with filter
  108434. * @param props Passed props
  108435. * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
  108436. */
  108437. function pickAttrs(props) {
  108438. var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  108439. var mergedConfig;
  108440. if (ariaOnly === false) {
  108441. mergedConfig = {
  108442. aria: true,
  108443. data: true,
  108444. attr: true
  108445. };
  108446. } else if (ariaOnly === true) {
  108447. mergedConfig = {
  108448. aria: true
  108449. };
  108450. } else {
  108451. mergedConfig = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ariaOnly);
  108452. }
  108453. var attrs = {};
  108454. Object.keys(props).forEach(function (key) {
  108455. if (
  108456. // Aria
  108457. mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||
  108458. // Data
  108459. mergedConfig.data && match(key, dataPrefix) ||
  108460. // Attr
  108461. mergedConfig.attr && propList.includes(key)) {
  108462. attrs[key] = props[key];
  108463. }
  108464. });
  108465. return attrs;
  108466. }
  108467. /***/ }),
  108468. /***/ "./node_modules/rc-util/es/raf.js":
  108469. /*!****************************************!*\
  108470. !*** ./node_modules/rc-util/es/raf.js ***!
  108471. \****************************************/
  108472. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  108473. "use strict";
  108474. var raf = function raf(callback) {
  108475. return +setTimeout(callback, 16);
  108476. };
  108477. var caf = function caf(num) {
  108478. return clearTimeout(num);
  108479. };
  108480. if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
  108481. raf = function raf(callback) {
  108482. return window.requestAnimationFrame(callback);
  108483. };
  108484. caf = function caf(handle) {
  108485. return window.cancelAnimationFrame(handle);
  108486. };
  108487. }
  108488. var rafUUID = 0;
  108489. var rafIds = new Map();
  108490. function cleanup(id) {
  108491. rafIds.delete(id);
  108492. }
  108493. var wrapperRaf = function wrapperRaf(callback) {
  108494. var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  108495. rafUUID += 1;
  108496. var id = rafUUID;
  108497. function callRef(leftTimes) {
  108498. if (leftTimes === 0) {
  108499. // Clean up
  108500. cleanup(id);
  108501. // Trigger
  108502. callback();
  108503. } else {
  108504. // Next raf
  108505. var realId = raf(function () {
  108506. callRef(leftTimes - 1);
  108507. });
  108508. // Bind real raf id
  108509. rafIds.set(id, realId);
  108510. }
  108511. }
  108512. callRef(times);
  108513. return id;
  108514. };
  108515. wrapperRaf.cancel = function (id) {
  108516. var realId = rafIds.get(id);
  108517. cleanup(id);
  108518. return caf(realId);
  108519. };
  108520. if (true) {
  108521. wrapperRaf.ids = function () {
  108522. return rafIds;
  108523. };
  108524. }
  108525. /* harmony default export */ __webpack_exports__["default"] = (wrapperRaf);
  108526. /***/ }),
  108527. /***/ "./node_modules/rc-util/es/ref.js":
  108528. /*!****************************************!*\
  108529. !*** ./node_modules/rc-util/es/ref.js ***!
  108530. \****************************************/
  108531. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108532. "use strict";
  108533. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108534. /* harmony export */ composeRef: function() { return /* binding */ composeRef; },
  108535. /* harmony export */ fillRef: function() { return /* binding */ fillRef; },
  108536. /* harmony export */ getNodeRef: function() { return /* binding */ getNodeRef; },
  108537. /* harmony export */ supportNodeRef: function() { return /* binding */ supportNodeRef; },
  108538. /* harmony export */ supportRef: function() { return /* binding */ supportRef; },
  108539. /* harmony export */ useComposeRef: function() { return /* binding */ useComposeRef; }
  108540. /* harmony export */ });
  108541. /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  108542. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
  108543. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  108544. /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-is */ "./node_modules/rc-util/node_modules/react-is/index.js");
  108545. /* harmony import */ var _hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMemo */ "./node_modules/rc-util/es/hooks/useMemo.js");
  108546. /* harmony import */ var _React_isFragment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/isFragment */ "./node_modules/rc-util/es/React/isFragment.js");
  108547. var ReactMajorVersion = Number(react__WEBPACK_IMPORTED_MODULE_1__.version.split('.')[0]);
  108548. var fillRef = function fillRef(ref, node) {
  108549. if (typeof ref === 'function') {
  108550. ref(node);
  108551. } else if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(ref) === 'object' && ref && 'current' in ref) {
  108552. ref.current = node;
  108553. }
  108554. };
  108555. /**
  108556. * Merge refs into one ref function to support ref passing.
  108557. */
  108558. var composeRef = function composeRef() {
  108559. for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
  108560. refs[_key] = arguments[_key];
  108561. }
  108562. var refList = refs.filter(Boolean);
  108563. if (refList.length <= 1) {
  108564. return refList[0];
  108565. }
  108566. return function (node) {
  108567. refs.forEach(function (ref) {
  108568. fillRef(ref, node);
  108569. });
  108570. };
  108571. };
  108572. var useComposeRef = function useComposeRef() {
  108573. for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  108574. refs[_key2] = arguments[_key2];
  108575. }
  108576. return (0,_hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__["default"])(function () {
  108577. return composeRef.apply(void 0, refs);
  108578. }, refs, function (prev, next) {
  108579. return prev.length !== next.length || prev.every(function (ref, i) {
  108580. return ref !== next[i];
  108581. });
  108582. });
  108583. };
  108584. var supportRef = function supportRef(nodeOrComponent) {
  108585. var _type$prototype, _nodeOrComponent$prot;
  108586. if (!nodeOrComponent) {
  108587. return false;
  108588. }
  108589. // React 19 no need `forwardRef` anymore. So just pass if is a React element.
  108590. if (isReactElement(nodeOrComponent) && ReactMajorVersion >= 19) {
  108591. return true;
  108592. }
  108593. var type = (0,react_is__WEBPACK_IMPORTED_MODULE_2__.isMemo)(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
  108594. // Function component node
  108595. if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {
  108596. return false;
  108597. }
  108598. // Class component
  108599. if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {
  108600. return false;
  108601. }
  108602. return true;
  108603. };
  108604. function isReactElement(node) {
  108605. return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(node) && !(0,_React_isFragment__WEBPACK_IMPORTED_MODULE_4__["default"])(node);
  108606. }
  108607. var supportNodeRef = function supportNodeRef(node) {
  108608. return isReactElement(node) && supportRef(node);
  108609. };
  108610. /**
  108611. * In React 19. `ref` is not a property from node.
  108612. * But a property from `props.ref`.
  108613. * To check if `props.ref` exist or fallback to `ref`.
  108614. */
  108615. var getNodeRef = function getNodeRef(node) {
  108616. if (node && isReactElement(node)) {
  108617. var ele = node;
  108618. // Source from:
  108619. // https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/getReactNodeRef/getReactNodeRef.ts
  108620. return ele.props.propertyIsEnumerable('ref') ? ele.props.ref : ele.ref;
  108621. }
  108622. return null;
  108623. };
  108624. /***/ }),
  108625. /***/ "./node_modules/rc-util/es/utils/get.js":
  108626. /*!**********************************************!*\
  108627. !*** ./node_modules/rc-util/es/utils/get.js ***!
  108628. \**********************************************/
  108629. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108630. "use strict";
  108631. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108632. /* harmony export */ "default": function() { return /* binding */ get; }
  108633. /* harmony export */ });
  108634. function get(entity, path) {
  108635. var current = entity;
  108636. for (var i = 0; i < path.length; i += 1) {
  108637. if (current === null || current === undefined) {
  108638. return undefined;
  108639. }
  108640. current = current[path[i]];
  108641. }
  108642. return current;
  108643. }
  108644. /***/ }),
  108645. /***/ "./node_modules/rc-util/es/utils/set.js":
  108646. /*!**********************************************!*\
  108647. !*** ./node_modules/rc-util/es/utils/set.js ***!
  108648. \**********************************************/
  108649. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108650. "use strict";
  108651. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108652. /* harmony export */ "default": function() { return /* binding */ set; },
  108653. /* harmony export */ merge: function() { return /* binding */ merge; }
  108654. /* harmony export */ });
  108655. /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
  108656. /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
  108657. /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
  108658. /* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ "./node_modules/@babel/runtime/helpers/esm/toArray.js");
  108659. /* harmony import */ var _get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get */ "./node_modules/rc-util/es/utils/get.js");
  108660. function internalSet(entity, paths, value, removeIfUndefined) {
  108661. if (!paths.length) {
  108662. return value;
  108663. }
  108664. var _paths = (0,_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__["default"])(paths),
  108665. path = _paths[0],
  108666. restPath = _paths.slice(1);
  108667. var clone;
  108668. if (!entity && typeof path === 'number') {
  108669. clone = [];
  108670. } else if (Array.isArray(entity)) {
  108671. clone = (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(entity);
  108672. } else {
  108673. clone = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["default"])({}, entity);
  108674. }
  108675. // Delete prop if `removeIfUndefined` and value is undefined
  108676. if (removeIfUndefined && value === undefined && restPath.length === 1) {
  108677. delete clone[path][restPath[0]];
  108678. } else {
  108679. clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);
  108680. }
  108681. return clone;
  108682. }
  108683. function set(entity, paths, value) {
  108684. var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  108685. // Do nothing if `removeIfUndefined` and parent object not exist
  108686. if (paths.length && removeIfUndefined && value === undefined && !(0,_get__WEBPACK_IMPORTED_MODULE_4__["default"])(entity, paths.slice(0, -1))) {
  108687. return entity;
  108688. }
  108689. return internalSet(entity, paths, value, removeIfUndefined);
  108690. }
  108691. function isObject(obj) {
  108692. return (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
  108693. }
  108694. function createEmpty(source) {
  108695. return Array.isArray(source) ? [] : {};
  108696. }
  108697. var keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;
  108698. /**
  108699. * Merge objects which will create
  108700. */
  108701. function merge() {
  108702. for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
  108703. sources[_key] = arguments[_key];
  108704. }
  108705. var clone = createEmpty(sources[0]);
  108706. sources.forEach(function (src) {
  108707. function internalMerge(path, parentLoopSet) {
  108708. var loopSet = new Set(parentLoopSet);
  108709. var value = (0,_get__WEBPACK_IMPORTED_MODULE_4__["default"])(src, path);
  108710. var isArr = Array.isArray(value);
  108711. if (isArr || isObject(value)) {
  108712. // Only add not loop obj
  108713. if (!loopSet.has(value)) {
  108714. loopSet.add(value);
  108715. var originValue = (0,_get__WEBPACK_IMPORTED_MODULE_4__["default"])(clone, path);
  108716. if (isArr) {
  108717. // Array will always be override
  108718. clone = set(clone, path, []);
  108719. } else if (!originValue || (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(originValue) !== 'object') {
  108720. // Init container if not exist
  108721. clone = set(clone, path, createEmpty(value));
  108722. }
  108723. keys(value).forEach(function (key) {
  108724. internalMerge([].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(path), [key]), loopSet);
  108725. });
  108726. }
  108727. } else {
  108728. clone = set(clone, path, value);
  108729. }
  108730. }
  108731. internalMerge([]);
  108732. });
  108733. return clone;
  108734. }
  108735. /***/ }),
  108736. /***/ "./node_modules/rc-util/es/warning.js":
  108737. /*!********************************************!*\
  108738. !*** ./node_modules/rc-util/es/warning.js ***!
  108739. \********************************************/
  108740. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  108741. "use strict";
  108742. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  108743. /* harmony export */ noteOnce: function() { return /* binding */ noteOnce; },
  108744. /* harmony export */ resetWarned: function() { return /* binding */ resetWarned; },
  108745. /* harmony export */ warning: function() { return /* binding */ warning; }
  108746. /* harmony export */ });
  108747. /* unused harmony exports preMessage, note, call, warningOnce */
  108748. /* eslint-disable no-console */
  108749. var warned = {};
  108750. var preWarningFns = [];
  108751. /**
  108752. * Pre warning enable you to parse content before console.error.
  108753. * Modify to null will prevent warning.
  108754. */
  108755. var preMessage = function preMessage(fn) {
  108756. preWarningFns.push(fn);
  108757. };
  108758. /**
  108759. * Warning if condition not match.
  108760. * @param valid Condition
  108761. * @param message Warning message
  108762. * @example
  108763. * ```js
  108764. * warning(false, 'some error'); // print some error
  108765. * warning(true, 'some error'); // print nothing
  108766. * warning(1 === 2, 'some error'); // print some error
  108767. * ```
  108768. */
  108769. function warning(valid, message) {
  108770. if ( true && !valid && console !== undefined) {
  108771. var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
  108772. return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');
  108773. }, message);
  108774. if (finalMessage) {
  108775. console.error("Warning: ".concat(finalMessage));
  108776. }
  108777. }
  108778. }
  108779. /** @see Similar to {@link warning} */
  108780. function note(valid, message) {
  108781. if ( true && !valid && console !== undefined) {
  108782. var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {
  108783. return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');
  108784. }, message);
  108785. if (finalMessage) {
  108786. console.warn("Note: ".concat(finalMessage));
  108787. }
  108788. }
  108789. }
  108790. function resetWarned() {
  108791. warned = {};
  108792. }
  108793. function call(method, valid, message) {
  108794. if (!valid && !warned[message]) {
  108795. method(false, message);
  108796. warned[message] = true;
  108797. }
  108798. }
  108799. /** @see Same as {@link warning}, but only warn once for the same message */
  108800. function warningOnce(valid, message) {
  108801. call(warning, valid, message);
  108802. }
  108803. /** @see Same as {@link warning}, but only warn once for the same message */
  108804. function noteOnce(valid, message) {
  108805. call(note, valid, message);
  108806. }
  108807. warningOnce.preMessage = preMessage;
  108808. warningOnce.resetWarned = resetWarned;
  108809. warningOnce.noteOnce = noteOnce;
  108810. /* harmony default export */ __webpack_exports__["default"] = (warningOnce);
  108811. /***/ }),
  108812. /***/ "./node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js":
  108813. /*!********************************************************************************!*\
  108814. !*** ./node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js ***!
  108815. \********************************************************************************/
  108816. /***/ (function(__unused_webpack_module, exports) {
  108817. "use strict";
  108818. var __webpack_unused_export__;
  108819. /**
  108820. * @license React
  108821. * react-is.development.js
  108822. *
  108823. * Copyright (c) Facebook, Inc. and its affiliates.
  108824. *
  108825. * This source code is licensed under the MIT license found in the
  108826. * LICENSE file in the root directory of this source tree.
  108827. */
  108828. if (true) {
  108829. (function() {
  108830. 'use strict';
  108831. // ATTENTION
  108832. // When adding new symbols to this file,
  108833. // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
  108834. // The Symbol used to tag the ReactElement-like types.
  108835. var REACT_ELEMENT_TYPE = Symbol.for('react.element');
  108836. var REACT_PORTAL_TYPE = Symbol.for('react.portal');
  108837. var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
  108838. var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
  108839. var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
  108840. var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
  108841. var REACT_CONTEXT_TYPE = Symbol.for('react.context');
  108842. var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
  108843. var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
  108844. var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
  108845. var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
  108846. var REACT_MEMO_TYPE = Symbol.for('react.memo');
  108847. var REACT_LAZY_TYPE = Symbol.for('react.lazy');
  108848. var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
  108849. // -----------------------------------------------------------------------------
  108850. var enableScopeAPI = false; // Experimental Create Event Handle API.
  108851. var enableCacheElement = false;
  108852. var enableTransitionTracing = false; // No known bugs, but needs performance testing
  108853. var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
  108854. // stuff. Intended to enable React core members to more easily debug scheduling
  108855. // issues in DEV builds.
  108856. var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
  108857. var REACT_MODULE_REFERENCE;
  108858. {
  108859. REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
  108860. }
  108861. function isValidElementType(type) {
  108862. if (typeof type === 'string' || typeof type === 'function') {
  108863. return true;
  108864. } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
  108865. if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
  108866. return true;
  108867. }
  108868. if (typeof type === 'object' && type !== null) {
  108869. if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
  108870. // types supported by any Flight configuration anywhere since
  108871. // we don't know which Flight build this will end up being used
  108872. // with.
  108873. type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
  108874. return true;
  108875. }
  108876. }
  108877. return false;
  108878. }
  108879. function typeOf(object) {
  108880. if (typeof object === 'object' && object !== null) {
  108881. var $$typeof = object.$$typeof;
  108882. switch ($$typeof) {
  108883. case REACT_ELEMENT_TYPE:
  108884. var type = object.type;
  108885. switch (type) {
  108886. case REACT_FRAGMENT_TYPE:
  108887. case REACT_PROFILER_TYPE:
  108888. case REACT_STRICT_MODE_TYPE:
  108889. case REACT_SUSPENSE_TYPE:
  108890. case REACT_SUSPENSE_LIST_TYPE:
  108891. return type;
  108892. default:
  108893. var $$typeofType = type && type.$$typeof;
  108894. switch ($$typeofType) {
  108895. case REACT_SERVER_CONTEXT_TYPE:
  108896. case REACT_CONTEXT_TYPE:
  108897. case REACT_FORWARD_REF_TYPE:
  108898. case REACT_LAZY_TYPE:
  108899. case REACT_MEMO_TYPE:
  108900. case REACT_PROVIDER_TYPE:
  108901. return $$typeofType;
  108902. default:
  108903. return $$typeof;
  108904. }
  108905. }
  108906. case REACT_PORTAL_TYPE:
  108907. return $$typeof;
  108908. }
  108909. }
  108910. return undefined;
  108911. }
  108912. var ContextConsumer = REACT_CONTEXT_TYPE;
  108913. var ContextProvider = REACT_PROVIDER_TYPE;
  108914. var Element = REACT_ELEMENT_TYPE;
  108915. var ForwardRef = REACT_FORWARD_REF_TYPE;
  108916. var Fragment = REACT_FRAGMENT_TYPE;
  108917. var Lazy = REACT_LAZY_TYPE;
  108918. var Memo = REACT_MEMO_TYPE;
  108919. var Portal = REACT_PORTAL_TYPE;
  108920. var Profiler = REACT_PROFILER_TYPE;
  108921. var StrictMode = REACT_STRICT_MODE_TYPE;
  108922. var Suspense = REACT_SUSPENSE_TYPE;
  108923. var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
  108924. var hasWarnedAboutDeprecatedIsAsyncMode = false;
  108925. var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
  108926. function isAsyncMode(object) {
  108927. {
  108928. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  108929. hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
  108930. console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
  108931. }
  108932. }
  108933. return false;
  108934. }
  108935. function isConcurrentMode(object) {
  108936. {
  108937. if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
  108938. hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
  108939. console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
  108940. }
  108941. }
  108942. return false;
  108943. }
  108944. function isContextConsumer(object) {
  108945. return typeOf(object) === REACT_CONTEXT_TYPE;
  108946. }
  108947. function isContextProvider(object) {
  108948. return typeOf(object) === REACT_PROVIDER_TYPE;
  108949. }
  108950. function isElement(object) {
  108951. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  108952. }
  108953. function isForwardRef(object) {
  108954. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  108955. }
  108956. function isFragment(object) {
  108957. return typeOf(object) === REACT_FRAGMENT_TYPE;
  108958. }
  108959. function isLazy(object) {
  108960. return typeOf(object) === REACT_LAZY_TYPE;
  108961. }
  108962. function isMemo(object) {
  108963. return typeOf(object) === REACT_MEMO_TYPE;
  108964. }
  108965. function isPortal(object) {
  108966. return typeOf(object) === REACT_PORTAL_TYPE;
  108967. }
  108968. function isProfiler(object) {
  108969. return typeOf(object) === REACT_PROFILER_TYPE;
  108970. }
  108971. function isStrictMode(object) {
  108972. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  108973. }
  108974. function isSuspense(object) {
  108975. return typeOf(object) === REACT_SUSPENSE_TYPE;
  108976. }
  108977. function isSuspenseList(object) {
  108978. return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
  108979. }
  108980. __webpack_unused_export__ = ContextConsumer;
  108981. __webpack_unused_export__ = ContextProvider;
  108982. __webpack_unused_export__ = Element;
  108983. exports.ForwardRef = ForwardRef;
  108984. __webpack_unused_export__ = Fragment;
  108985. __webpack_unused_export__ = Lazy;
  108986. __webpack_unused_export__ = Memo;
  108987. __webpack_unused_export__ = Portal;
  108988. __webpack_unused_export__ = Profiler;
  108989. __webpack_unused_export__ = StrictMode;
  108990. __webpack_unused_export__ = Suspense;
  108991. __webpack_unused_export__ = SuspenseList;
  108992. __webpack_unused_export__ = isAsyncMode;
  108993. __webpack_unused_export__ = isConcurrentMode;
  108994. __webpack_unused_export__ = isContextConsumer;
  108995. __webpack_unused_export__ = isContextProvider;
  108996. __webpack_unused_export__ = isElement;
  108997. __webpack_unused_export__ = isForwardRef;
  108998. __webpack_unused_export__ = isFragment;
  108999. __webpack_unused_export__ = isLazy;
  109000. exports.isMemo = isMemo;
  109001. __webpack_unused_export__ = isPortal;
  109002. __webpack_unused_export__ = isProfiler;
  109003. __webpack_unused_export__ = isStrictMode;
  109004. __webpack_unused_export__ = isSuspense;
  109005. __webpack_unused_export__ = isSuspenseList;
  109006. __webpack_unused_export__ = isValidElementType;
  109007. __webpack_unused_export__ = typeOf;
  109008. })();
  109009. }
  109010. /***/ }),
  109011. /***/ "./node_modules/rc-util/node_modules/react-is/index.js":
  109012. /*!*************************************************************!*\
  109013. !*** ./node_modules/rc-util/node_modules/react-is/index.js ***!
  109014. \*************************************************************/
  109015. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  109016. "use strict";
  109017. if (false) // removed by dead control flow
  109018. {} else {
  109019. module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js");
  109020. }
  109021. /***/ }),
  109022. /***/ "./node_modules/string-convert/camel2hyphen.js":
  109023. /*!*****************************************************!*\
  109024. !*** ./node_modules/string-convert/camel2hyphen.js ***!
  109025. \*****************************************************/
  109026. /***/ (function(module) {
  109027. var camel2hyphen = function (str) {
  109028. return str
  109029. .replace(/[A-Z]/g, function (match) {
  109030. return '-' + match.toLowerCase();
  109031. })
  109032. .toLowerCase();
  109033. };
  109034. module.exports = camel2hyphen;
  109035. /***/ }),
  109036. /***/ "./node_modules/toggle-selection/index.js":
  109037. /*!************************************************!*\
  109038. !*** ./node_modules/toggle-selection/index.js ***!
  109039. \************************************************/
  109040. /***/ (function(module) {
  109041. module.exports = function () {
  109042. var selection = document.getSelection();
  109043. if (!selection.rangeCount) {
  109044. return function () {};
  109045. }
  109046. var active = document.activeElement;
  109047. var ranges = [];
  109048. for (var i = 0; i < selection.rangeCount; i++) {
  109049. ranges.push(selection.getRangeAt(i));
  109050. }
  109051. switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML
  109052. case 'INPUT':
  109053. case 'TEXTAREA':
  109054. active.blur();
  109055. break;
  109056. default:
  109057. active = null;
  109058. break;
  109059. }
  109060. selection.removeAllRanges();
  109061. return function () {
  109062. selection.type === 'Caret' &&
  109063. selection.removeAllRanges();
  109064. if (!selection.rangeCount) {
  109065. ranges.forEach(function(range) {
  109066. selection.addRange(range);
  109067. });
  109068. }
  109069. active &&
  109070. active.focus();
  109071. };
  109072. };
  109073. /***/ }),
  109074. /***/ "dayjs":
  109075. /*!**************************************************************************************!*\
  109076. !*** external {"root":"dayjs","commonjs2":"dayjs","commonjs":"dayjs","amd":"dayjs"} ***!
  109077. \**************************************************************************************/
  109078. /***/ (function(module) {
  109079. "use strict";
  109080. module.exports = __WEBPACK_EXTERNAL_MODULE_dayjs__;
  109081. /***/ }),
  109082. /***/ "react":
  109083. /*!**************************************************************************************!*\
  109084. !*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
  109085. \**************************************************************************************/
  109086. /***/ (function(module) {
  109087. "use strict";
  109088. module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
  109089. /***/ }),
  109090. /***/ "react-dom":
  109091. /*!*****************************************************************************************************!*\
  109092. !*** external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} ***!
  109093. \*****************************************************************************************************/
  109094. /***/ (function(module) {
  109095. "use strict";
  109096. module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;
  109097. /***/ })
  109098. /******/ });
  109099. /************************************************************************/
  109100. /******/ // The module cache
  109101. /******/ var __webpack_module_cache__ = {};
  109102. /******/
  109103. /******/ // The require function
  109104. /******/ function __webpack_require__(moduleId) {
  109105. /******/ // Check if module is in cache
  109106. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  109107. /******/ if (cachedModule !== undefined) {
  109108. /******/ return cachedModule.exports;
  109109. /******/ }
  109110. /******/ // Create a new module (and put it into the cache)
  109111. /******/ var module = __webpack_module_cache__[moduleId] = {
  109112. /******/ id: moduleId,
  109113. /******/ loaded: false,
  109114. /******/ exports: {}
  109115. /******/ };
  109116. /******/
  109117. /******/ // Execute the module function
  109118. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  109119. /******/
  109120. /******/ // Flag the module as loaded
  109121. /******/ module.loaded = true;
  109122. /******/
  109123. /******/ // Return the exports of the module
  109124. /******/ return module.exports;
  109125. /******/ }
  109126. /******/
  109127. /************************************************************************/
  109128. /******/ /* webpack/runtime/compat get default export */
  109129. /******/ !function() {
  109130. /******/ // getDefaultExport function for compatibility with non-harmony modules
  109131. /******/ __webpack_require__.n = function(module) {
  109132. /******/ var getter = module && module.__esModule ?
  109133. /******/ function() { return module['default']; } :
  109134. /******/ function() { return module; };
  109135. /******/ __webpack_require__.d(getter, { a: getter });
  109136. /******/ return getter;
  109137. /******/ };
  109138. /******/ }();
  109139. /******/
  109140. /******/ /* webpack/runtime/define property getters */
  109141. /******/ !function() {
  109142. /******/ // define getter functions for harmony exports
  109143. /******/ __webpack_require__.d = function(exports, definition) {
  109144. /******/ for(var key in definition) {
  109145. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  109146. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  109147. /******/ }
  109148. /******/ }
  109149. /******/ };
  109150. /******/ }();
  109151. /******/
  109152. /******/ /* webpack/runtime/global */
  109153. /******/ !function() {
  109154. /******/ __webpack_require__.g = (function() {
  109155. /******/ if (typeof globalThis === 'object') return globalThis;
  109156. /******/ try {
  109157. /******/ return this || new Function('return this')();
  109158. /******/ } catch (e) {
  109159. /******/ if (typeof window === 'object') return window;
  109160. /******/ }
  109161. /******/ })();
  109162. /******/ }();
  109163. /******/
  109164. /******/ /* webpack/runtime/harmony module decorator */
  109165. /******/ !function() {
  109166. /******/ __webpack_require__.hmd = function(module) {
  109167. /******/ module = Object.create(module);
  109168. /******/ if (!module.children) module.children = [];
  109169. /******/ Object.defineProperty(module, 'exports', {
  109170. /******/ enumerable: true,
  109171. /******/ set: function() {
  109172. /******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
  109173. /******/ }
  109174. /******/ });
  109175. /******/ return module;
  109176. /******/ };
  109177. /******/ }();
  109178. /******/
  109179. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  109180. /******/ !function() {
  109181. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  109182. /******/ }();
  109183. /******/
  109184. /******/ /* webpack/runtime/make namespace object */
  109185. /******/ !function() {
  109186. /******/ // define __esModule on exports
  109187. /******/ __webpack_require__.r = function(exports) {
  109188. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  109189. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  109190. /******/ }
  109191. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  109192. /******/ };
  109193. /******/ }();
  109194. /******/
  109195. /************************************************************************/
  109196. /******/
  109197. /******/ // startup
  109198. /******/ // Load entry module and return exports
  109199. /******/ // This entry module used 'module' so it can't be inlined
  109200. /******/ var __webpack_exports__ = __webpack_require__("./index.js");
  109201. /******/
  109202. /******/ return __webpack_exports__;
  109203. /******/ })()
  109204. ;
  109205. });
  109206. //# sourceMappingURL=antd.js.map