説明なし

index-c6999c10.js 251KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773
  1. 'use strict';
  2. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  3. var styleInject_es = require('./style-inject.es-c386372b.js');
  4. var React = require('react');
  5. var React__default = _interopDefault(React);
  6. require('antd/es/input/style');
  7. var _Input = _interopDefault(require('antd/es/input'));
  8. require('antd/es/button/style');
  9. var _Button = _interopDefault(require('antd/es/button'));
  10. var IMAGE_PROCESS = '?x-oss-process=image/resize,h_350';
  11. var IMAGE_PROCESS_SMALL = '?x-oss-process=image/resize,h_100';
  12. var IMAGE_PROCESS_LARGE = '?x-oss-process=image/resize,h_500';
  13. function addImageProcess(url) {
  14. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  15. width: '36px',
  16. height: '36px'
  17. };
  18. // 防止重复添加导致的url不正确
  19. if (url && url.indexOf('x-oss-process') > -1) {
  20. return url;
  21. }
  22. if (options.small) {
  23. return url + IMAGE_PROCESS_SMALL;
  24. }
  25. if (options.large) {
  26. return url + IMAGE_PROCESS_LARGE;
  27. }
  28. if (options.custom) {
  29. return "".concat(url, "?x-oss-process=image/resize,limit_0,m_fill,w_").concat(options.width, ",h_").concat(options.height);
  30. }
  31. return url + IMAGE_PROCESS;
  32. }
  33. function formatMoney(input) {
  34. var fuzz = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
  35. if (isNaN(+input)) {
  36. return input;
  37. }
  38. return (+input).toFixed(fuzz);
  39. }
  40. const img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAABvklEQVQ4T62UTygEcRTHv29MIsqfk6OL5CYH5aKd9WfjwqxEnBzExYWTCEWJJGove5H8OTA1uwdCrOWAi83ZwUXJiSj5u+Z5s0msmd2SX81h+r33ee/7fW+G8E+H/srhqEcFCjphve1RzcaVK4j3mmoB5YxqQzdOxTji1wE2QZglb2jAEcT7/g4wr0rQugS1OYJ26nOg5nYDr4ZrR7yrl0FBAKBlqjEX3eRLwSXAmidvOJbSI47oF9LVKaCOkNc4/w7kSPOoFBqDwjpp4XA60LUkF8nzbsuERQt4ejtGdsYwiAYTYIV6STOD6UB3EpqXJC0u7zKxz0Mk3Zrj7lOLerJg5T9K+2lWhALiYx8xS9NbDZnUuPXy0wN/hYw3lnbPiNfE7HaSfTAloRqKWkya8WAnMrdmIBqfBqM/BehJAo+gKHMibdMGzUhqKUiZAHGVXJYLwPdpshPnRDRM4fl5+7uKL/0c1WXdOSie5Dh3wZcyoR7SQttO9z+M5MOWEsStFQmsTAoOwVK7qM64d5P6ayKJj9EqHBa5Q4kx2/ujqR1Exnsq493HH2muFN98oNtJ0g7s3Ul5/vwbSab+G+gDqFybE11pYkYAAAAASUVORK5CYII=';
  41. var css = ".ConsumeListView_wrapper__la1cB {\n display: flex;\n justify-content: center;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b {\n padding: 0;\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n padding-top: 10px;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b li {\n list-style: none;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b .ConsumeListView_consumeItem__2M0dc {\n margin: 0 6px 10px;\n text-align: center;\n position: relative;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b .ConsumeListView_consumeItem__2M0dc .ConsumeListView_kingdomIcon__YPzT9 {\n position: absolute;\n width: 24px;\n height: 22px;\n left: -6px;\n top: -12px;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b .ConsumeListView_consumeItem__2M0dc .ConsumeListView_avatar__AXZJE {\n margin: 0 auto 4px;\n width: 36px;\n height: 36px;\n background-size: cover;\n border-radius: 50%;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b .ConsumeListView_consumeItem__2M0dc .ConsumeListView_gray__3h-Ue {\n color: #9b9b9b;\n font-size: 12px;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b .ConsumeListView_toggle__31sUD {\n margin: 0 6px 10px;\n width: 36px;\n height: 36px;\n line-height: 36px;\n background-color: #ececec;\n border-radius: 50%;\n color: #a8adb6;\n cursor: pointer;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAACv0lEQVRIS8WXTW8SURSGzzAYNSYCA7SCUEqBioLtohvjD9CN7ozG36AmXfsRafxYN9b+BqNx50r3GjddqEVRRgSRVr4GWmOsERjfOwEzVYa5lAokEwJzznnOe865d+4IxPFRVXVPrVY73Wq1TgmCMIffYbjZ2q4b+E/GfysWi+WZw+F4it+/zMIKvQwAszcajXnYXEIwl1kwdh8JVPC1bLVaF5FE3cjHEFytVs8hyH04jvMAu9gUkexlp9P5uJv/P2DABCi9hbJehUPPinAkpKL8d6H8BpJQ9fbbAjOooigP8H2BIyi3CaAPJUm6qIdvAwN6G0qvcUfswxDK7wB+vePyB9zu6aNdKK9ROioUn+/0XAOz6W02m6kBBolXe1EUxSibdg0MtQn09Sav9yB2UL0A1QmBbQ6VSmWNd50OAu2sc5fL5WVTfAYD9WTQgP34Y9DOClB7D05X+nHcBdslAf19jnKfNAr2cmWVDuzfR7HoFCFTUyaqR8lUhr7/2KITc/Gu9mjrC6a4iLtjRhHfvv9Ea1/L5JLsNBML94Qz6OukTBWlTt5Dbjp2JGgUtsTAW7i713DxqSql0jkqrJfIKdloNhbpCmfQV8k0VZUNOuwZo2gkQFBmFPanKVibRFxpOUefC0VyOmw0E4+QqCt7s8mgH0ipbdKEb5wiIUB7N0UD9yy13l/O5CmbXyfJfpBm49MkihbSoKuA1jdpcsJD4aDfdA5gUDIdrr+jZLIFyuQK5AD8+NEQvXknU63+jUKTPgoGvDxQ1gJtuPpeTkw1U8+mnPU2MuWngN/DBW0bLe14A8mj3x+zX7TS+ryGi6JrMtoGMrItk6VULpcTqPtQHhIQuuB2uxOjfSwy1SM5CHQmYCRHn/azcjSHvQ586Mdb/aIb+oFeD2eHQOxM87j6eoXBBrGMa2evMPoE/sdL22+mI4T0ou1LqAAAAABJRU5ErkJggg==);\n background-position: center;\n}\n.ConsumeListView_wrapper__la1cB .ConsumeListView_consumelist__sAA2b .ConsumeListView_toggle__31sUD.ConsumeListView_expand__XSb0z {\n transform: rotate(180deg);\n}\n";
  42. var styles = {"wrapper":"ConsumeListView_wrapper__la1cB","consumelist":"ConsumeListView_consumelist__sAA2b","consumeItem":"ConsumeListView_consumeItem__2M0dc","kingdomIcon":"ConsumeListView_kingdomIcon__YPzT9","avatar":"ConsumeListView_avatar__AXZJE","gray":"ConsumeListView_gray__3h-Ue","toggle":"ConsumeListView_toggle__31sUD","expand":"ConsumeListView_expand__XSb0z"};
  43. styleInject_es.styleInject(css);
  44. var DEFAULT_AVATAR = '//links-comment.oss-cn-beijing.aliyuncs.com/comment/20180820/Kgka4_oU1.jpeg';
  45. var ConsumeListView =
  46. /*#__PURE__*/
  47. function (_Component) {
  48. styleInject_es._inherits(ConsumeListView, _Component);
  49. function ConsumeListView() {
  50. styleInject_es._classCallCheck(this, ConsumeListView);
  51. return styleInject_es._possibleConstructorReturn(this, styleInject_es._getPrototypeOf(ConsumeListView).apply(this, arguments));
  52. }
  53. styleInject_es._createClass(ConsumeListView, [{
  54. key: "renderConsumeItem",
  55. value: function renderConsumeItem() {
  56. var _this$props = this.props,
  57. dataSource = _this$props.dataSource,
  58. isToggle = _this$props.isToggle,
  59. showLength = _this$props.showLength,
  60. listLength = _this$props.listLength,
  61. options = _this$props.options;
  62. var kingdomWidth = options.kingdomWidth,
  63. kingdomHeight = options.kingdomHeight,
  64. kingdomPosition = options.kingdomPosition,
  65. avatarSize = options.avatarSize,
  66. avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
  67. var renderData = dataSource;
  68. if (!isToggle && listLength > showLength) {
  69. renderData = dataSource.slice(0, showLength - 1);
  70. }
  71. return renderData.map(function (v, i) {
  72. var kingdom = null;
  73. if (i === 0) {
  74. kingdom = React__default.createElement("img", {
  75. className: styles.kingdomIcon,
  76. src: img,
  77. alt: "reward top user",
  78. style: {
  79. width: "".concat(kingdomWidth, "px"),
  80. height: "".concat(kingdomHeight, "px"),
  81. left: "".concat(kingdomPosition[0], "px"),
  82. top: "".concat(kingdomPosition[1], "px")
  83. }
  84. });
  85. }
  86. return React__default.createElement("li", {
  87. key: v.id,
  88. className: styles.consumeItem,
  89. style: {
  90. margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
  91. }
  92. }, kingdom, React__default.createElement("div", {
  93. className: styles.avatar,
  94. style: {
  95. backgroundImage: "url(".concat(addImageProcess(v.user_avatar || DEFAULT_AVATAR, {
  96. small: true
  97. }), ")"),
  98. width: "".concat(avatarSize, "px"),
  99. height: "".concat(avatarSize, "px")
  100. }
  101. }), React__default.createElement("span", {
  102. className: styles.gray
  103. }));
  104. });
  105. }
  106. }, {
  107. key: "renderToggleButton",
  108. value: function renderToggleButton() {
  109. var _this$props2 = this.props,
  110. isToggle = _this$props2.isToggle,
  111. onToggleChange = _this$props2.onToggleChange,
  112. listLength = _this$props2.listLength,
  113. showLength = _this$props2.showLength,
  114. options = _this$props2.options;
  115. var avatarSize = options.avatarSize,
  116. avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
  117. if (listLength <= showLength) {
  118. return null;
  119. }
  120. return React__default.createElement("li", {
  121. onClick: function onClick() {
  122. return onToggleChange();
  123. },
  124. className: styleInject_es.classnames(styles.toggle, styleInject_es._defineProperty({}, styles.expand, isToggle)),
  125. style: {
  126. width: "".concat(avatarSize, "px"),
  127. height: "".concat(avatarSize, "px"),
  128. lineHeight: "".concat(avatarSize, "px"),
  129. margin: "0 ".concat(avatarMarginLeftAndRight, "px 10px")
  130. }
  131. });
  132. }
  133. }, {
  134. key: "render",
  135. value: function render() {
  136. var _this$props3 = this.props,
  137. showLength = _this$props3.showLength,
  138. options = _this$props3.options;
  139. var avatarSize = options.avatarSize,
  140. avatarMarginLeftAndRight = options.avatarMarginLeftAndRight;
  141. return React__default.createElement("div", {
  142. className: styles.wrapper
  143. }, React__default.createElement("ul", {
  144. className: styles.consumelist,
  145. style: {
  146. width: "calc(".concat(avatarMarginLeftAndRight * 2 + avatarSize, "px * ").concat(showLength, ")")
  147. }
  148. }, this.renderConsumeItem(), this.renderToggleButton()));
  149. }
  150. }]);
  151. return ConsumeListView;
  152. }(React.Component);
  153. styleInject_es._defineProperty(ConsumeListView, "defaultProps", {
  154. isToggle: false,
  155. onToggleChange: function onToggleChange() {},
  156. dataSource: [],
  157. listLength: 0,
  158. showLength: 6,
  159. options: {
  160. avatarSize: 36,
  161. avatarMarginLeftAndRight: 6,
  162. kingdomWidth: 24,
  163. kingdomHeight: 22,
  164. kingdomPosition: [-6, -12]
  165. }
  166. });
  167. var dist = styleInject_es.createCommonjsModule(function (module, exports) {
  168. Object.defineProperty(exports, "__esModule", { value: true });
  169. function _(msg) {
  170. return msg;
  171. }
  172. exports._ = _;
  173. function defineMessages(msgs) {
  174. return msgs;
  175. }
  176. exports.defineMessages = defineMessages;
  177. });
  178. styleInject_es.unwrapExports(dist);
  179. var dist_1 = dist._;
  180. var dist_2 = dist.defineMessages;
  181. var types = styleInject_es.createCommonjsModule(function (module, exports) {
  182. Object.defineProperty(exports, "__esModule", { value: true });
  183. var TYPE;
  184. (function (TYPE) {
  185. /**
  186. * Raw text
  187. */
  188. TYPE[TYPE["literal"] = 0] = "literal";
  189. /**
  190. * Variable w/o any format, e.g `var` in `this is a {var}`
  191. */
  192. TYPE[TYPE["argument"] = 1] = "argument";
  193. /**
  194. * Variable w/ number format
  195. */
  196. TYPE[TYPE["number"] = 2] = "number";
  197. /**
  198. * Variable w/ date format
  199. */
  200. TYPE[TYPE["date"] = 3] = "date";
  201. /**
  202. * Variable w/ time format
  203. */
  204. TYPE[TYPE["time"] = 4] = "time";
  205. /**
  206. * Variable w/ select format
  207. */
  208. TYPE[TYPE["select"] = 5] = "select";
  209. /**
  210. * Variable w/ plural format
  211. */
  212. TYPE[TYPE["plural"] = 6] = "plural";
  213. })(TYPE = exports.TYPE || (exports.TYPE = {}));
  214. /**
  215. * Type Guards
  216. */
  217. function isLiteralElement(el) {
  218. return el.type === TYPE.literal;
  219. }
  220. exports.isLiteralElement = isLiteralElement;
  221. function isArgumentElement(el) {
  222. return el.type === TYPE.argument;
  223. }
  224. exports.isArgumentElement = isArgumentElement;
  225. function isNumberElement(el) {
  226. return el.type === TYPE.number;
  227. }
  228. exports.isNumberElement = isNumberElement;
  229. function isDateElement(el) {
  230. return el.type === TYPE.date;
  231. }
  232. exports.isDateElement = isDateElement;
  233. function isTimeElement(el) {
  234. return el.type === TYPE.time;
  235. }
  236. exports.isTimeElement = isTimeElement;
  237. function isSelectElement(el) {
  238. return el.type === TYPE.select;
  239. }
  240. exports.isSelectElement = isSelectElement;
  241. function isPluralElement(el) {
  242. return el.type === TYPE.plural;
  243. }
  244. exports.isPluralElement = isPluralElement;
  245. function isNumberSkeleton(el) {
  246. return !!(el && typeof el === 'object' && el.type === 0 /* number */);
  247. }
  248. exports.isNumberSkeleton = isNumberSkeleton;
  249. function isDateTimeSkeleton(el) {
  250. return !!(el && typeof el === 'object' && el.type === 1 /* dateTime */);
  251. }
  252. exports.isDateTimeSkeleton = isDateTimeSkeleton;
  253. function createLiteralElement(value) {
  254. return {
  255. type: TYPE.literal,
  256. value: value,
  257. };
  258. }
  259. exports.createLiteralElement = createLiteralElement;
  260. function createNumberElement(value, style) {
  261. return {
  262. type: TYPE.number,
  263. value: value,
  264. style: style,
  265. };
  266. }
  267. exports.createNumberElement = createNumberElement;
  268. });
  269. styleInject_es.unwrapExports(types);
  270. var types_1 = types.TYPE;
  271. var types_2 = types.isLiteralElement;
  272. var types_3 = types.isArgumentElement;
  273. var types_4 = types.isNumberElement;
  274. var types_5 = types.isDateElement;
  275. var types_6 = types.isTimeElement;
  276. var types_7 = types.isSelectElement;
  277. var types_8 = types.isPluralElement;
  278. var types_9 = types.isNumberSkeleton;
  279. var types_10 = types.isDateTimeSkeleton;
  280. var types_11 = types.createLiteralElement;
  281. var types_12 = types.createNumberElement;
  282. var parser = styleInject_es.createCommonjsModule(function (module, exports) {
  283. // tslint:disable:only-arrow-functions
  284. // tslint:disable:object-literal-shorthand
  285. // tslint:disable:trailing-comma
  286. // tslint:disable:object-literal-sort-keys
  287. // tslint:disable:one-variable-per-declaration
  288. // tslint:disable:max-line-length
  289. // tslint:disable:no-consecutive-blank-lines
  290. // tslint:disable:align
  291. var __extends = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__extends) || (function () {
  292. var extendStatics = function (d, b) {
  293. extendStatics = Object.setPrototypeOf ||
  294. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  295. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  296. return extendStatics(d, b);
  297. };
  298. return function (d, b) {
  299. extendStatics(d, b);
  300. function __() { this.constructor = d; }
  301. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  302. };
  303. })();
  304. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  305. __assign = Object.assign || function(t) {
  306. for (var s, i = 1, n = arguments.length; i < n; i++) {
  307. s = arguments[i];
  308. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  309. t[p] = s[p];
  310. }
  311. return t;
  312. };
  313. return __assign.apply(this, arguments);
  314. };
  315. Object.defineProperty(exports, "__esModule", { value: true });
  316. // Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.6 )
  317. //
  318. // https://pegjs.org/ https://github.com/metadevpro/ts-pegjs
  319. var SyntaxError = /** @class */ (function (_super) {
  320. __extends(SyntaxError, _super);
  321. function SyntaxError(message, expected, found, location) {
  322. var _this = _super.call(this) || this;
  323. _this.message = message;
  324. _this.expected = expected;
  325. _this.found = found;
  326. _this.location = location;
  327. _this.name = "SyntaxError";
  328. if (typeof Error.captureStackTrace === "function") {
  329. Error.captureStackTrace(_this, SyntaxError);
  330. }
  331. return _this;
  332. }
  333. SyntaxError.buildMessage = function (expected, found) {
  334. function hex(ch) {
  335. return ch.charCodeAt(0).toString(16).toUpperCase();
  336. }
  337. function literalEscape(s) {
  338. return s
  339. .replace(/\\/g, "\\\\")
  340. .replace(/"/g, "\\\"")
  341. .replace(/\0/g, "\\0")
  342. .replace(/\t/g, "\\t")
  343. .replace(/\n/g, "\\n")
  344. .replace(/\r/g, "\\r")
  345. .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
  346. .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
  347. }
  348. function classEscape(s) {
  349. return s
  350. .replace(/\\/g, "\\\\")
  351. .replace(/\]/g, "\\]")
  352. .replace(/\^/g, "\\^")
  353. .replace(/-/g, "\\-")
  354. .replace(/\0/g, "\\0")
  355. .replace(/\t/g, "\\t")
  356. .replace(/\n/g, "\\n")
  357. .replace(/\r/g, "\\r")
  358. .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
  359. .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
  360. }
  361. function describeExpectation(expectation) {
  362. switch (expectation.type) {
  363. case "literal":
  364. return "\"" + literalEscape(expectation.text) + "\"";
  365. case "class":
  366. var escapedParts = expectation.parts.map(function (part) {
  367. return Array.isArray(part)
  368. ? classEscape(part[0]) + "-" + classEscape(part[1])
  369. : classEscape(part);
  370. });
  371. return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
  372. case "any":
  373. return "any character";
  374. case "end":
  375. return "end of input";
  376. case "other":
  377. return expectation.description;
  378. }
  379. }
  380. function describeExpected(expected1) {
  381. var descriptions = expected1.map(describeExpectation);
  382. var i;
  383. var j;
  384. descriptions.sort();
  385. if (descriptions.length > 0) {
  386. for (i = 1, j = 1; i < descriptions.length; i++) {
  387. if (descriptions[i - 1] !== descriptions[i]) {
  388. descriptions[j] = descriptions[i];
  389. j++;
  390. }
  391. }
  392. descriptions.length = j;
  393. }
  394. switch (descriptions.length) {
  395. case 1:
  396. return descriptions[0];
  397. case 2:
  398. return descriptions[0] + " or " + descriptions[1];
  399. default:
  400. return descriptions.slice(0, -1).join(", ")
  401. + ", or "
  402. + descriptions[descriptions.length - 1];
  403. }
  404. }
  405. function describeFound(found1) {
  406. return found1 ? "\"" + literalEscape(found1) + "\"" : "end of input";
  407. }
  408. return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
  409. };
  410. return SyntaxError;
  411. }(Error));
  412. exports.SyntaxError = SyntaxError;
  413. function peg$parse(input, options) {
  414. options = options !== undefined ? options : {};
  415. var peg$FAILED = {};
  416. var peg$startRuleFunctions = { start: peg$parsestart };
  417. var peg$startRuleFunction = peg$parsestart;
  418. var peg$c0 = function (parts) {
  419. return parts.join('');
  420. };
  421. var peg$c1 = function (messageText) {
  422. return __assign({ type: types.TYPE.literal, value: messageText }, insertLocation());
  423. };
  424. var peg$c2 = peg$otherExpectation("argumentElement");
  425. var peg$c3 = "{";
  426. var peg$c4 = peg$literalExpectation("{", false);
  427. var peg$c5 = "}";
  428. var peg$c6 = peg$literalExpectation("}", false);
  429. var peg$c7 = function (value) {
  430. return __assign({ type: types.TYPE.argument, value: value }, insertLocation());
  431. };
  432. var peg$c8 = peg$otherExpectation("numberSkeletonId");
  433. var peg$c9 = /^['\/{}]/;
  434. var peg$c10 = peg$classExpectation(["'", "/", "{", "}"], false, false);
  435. var peg$c11 = peg$anyExpectation();
  436. var peg$c12 = peg$otherExpectation("numberSkeletonTokenOption");
  437. var peg$c13 = "/";
  438. var peg$c14 = peg$literalExpectation("/", false);
  439. var peg$c15 = function (option) { return option; };
  440. var peg$c16 = peg$otherExpectation("numberSkeletonToken");
  441. var peg$c17 = function (stem, options) {
  442. return { stem: stem, options: options };
  443. };
  444. var peg$c18 = function (tokens) {
  445. return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation());
  446. };
  447. var peg$c19 = "::";
  448. var peg$c20 = peg$literalExpectation("::", false);
  449. var peg$c21 = function (skeleton) { return skeleton; };
  450. var peg$c22 = function (style) { return style.replace(/\s*$/, ''); };
  451. var peg$c23 = ",";
  452. var peg$c24 = peg$literalExpectation(",", false);
  453. var peg$c25 = "number";
  454. var peg$c26 = peg$literalExpectation("number", false);
  455. var peg$c27 = function (value, type, style) {
  456. return __assign({ type: type === 'number' ? types.TYPE.number : type === 'date' ? types.TYPE.date : types.TYPE.time, style: style && style[2], value: value }, insertLocation());
  457. };
  458. var peg$c28 = "'";
  459. var peg$c29 = peg$literalExpectation("'", false);
  460. var peg$c30 = /^[^']/;
  461. var peg$c31 = peg$classExpectation(["'"], true, false);
  462. var peg$c32 = /^[^a-zA-Z'{}]/;
  463. var peg$c33 = peg$classExpectation([["a", "z"], ["A", "Z"], "'", "{", "}"], true, false);
  464. var peg$c34 = /^[a-zA-Z]/;
  465. var peg$c35 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false);
  466. var peg$c36 = function (pattern) {
  467. return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation());
  468. };
  469. var peg$c37 = "date";
  470. var peg$c38 = peg$literalExpectation("date", false);
  471. var peg$c39 = "time";
  472. var peg$c40 = peg$literalExpectation("time", false);
  473. var peg$c41 = "plural";
  474. var peg$c42 = peg$literalExpectation("plural", false);
  475. var peg$c43 = "selectordinal";
  476. var peg$c44 = peg$literalExpectation("selectordinal", false);
  477. var peg$c45 = "offset:";
  478. var peg$c46 = peg$literalExpectation("offset:", false);
  479. var peg$c47 = function (value, pluralType, offset, options) {
  480. return __assign({ type: types.TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {
  481. var id = _a.id, value = _a.value, optionLocation = _a.location;
  482. if (id in all) {
  483. error("Duplicate option \"" + id + "\" in plural element: \"" + text() + "\"", location());
  484. }
  485. all[id] = {
  486. value: value,
  487. location: optionLocation
  488. };
  489. return all;
  490. }, {}) }, insertLocation());
  491. };
  492. var peg$c48 = "select";
  493. var peg$c49 = peg$literalExpectation("select", false);
  494. var peg$c50 = function (value, options) {
  495. return __assign({ type: types.TYPE.select, value: value, options: options.reduce(function (all, _a) {
  496. var id = _a.id, value = _a.value, optionLocation = _a.location;
  497. if (id in all) {
  498. error("Duplicate option \"" + id + "\" in select element: \"" + text() + "\"", location());
  499. }
  500. all[id] = {
  501. value: value,
  502. location: optionLocation
  503. };
  504. return all;
  505. }, {}) }, insertLocation());
  506. };
  507. var peg$c51 = "=";
  508. var peg$c52 = peg$literalExpectation("=", false);
  509. var peg$c53 = function (id, value) {
  510. return __assign({ id: id,
  511. value: value }, insertLocation());
  512. };
  513. var peg$c54 = function (id, value) {
  514. return __assign({ id: id,
  515. value: value }, insertLocation());
  516. };
  517. var peg$c55 = peg$otherExpectation("whitespace pattern");
  518. var peg$c56 = /^[\t-\r \x85\u200E\u200F\u2028\u2029]/;
  519. var peg$c57 = peg$classExpectation([["\t", "\r"], " ", "\x85", "\u200E", "\u200F", "\u2028", "\u2029"], false, false);
  520. var peg$c58 = peg$otherExpectation("syntax pattern");
  521. var peg$c59 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/;
  522. var peg$c60 = peg$classExpectation([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["\xA1", "\xA7"], "\xA9", "\xAB", "\xAC", "\xAE", "\xB0", "\xB1", "\xB6", "\xBB", "\xBF", "\xD7", "\xF7", ["\u2010", "\u2027"], ["\u2030", "\u203E"], ["\u2041", "\u2053"], ["\u2055", "\u205E"], ["\u2190", "\u245F"], ["\u2500", "\u2775"], ["\u2794", "\u2BFF"], ["\u2E00", "\u2E7F"], ["\u3001", "\u3003"], ["\u3008", "\u3020"], "\u3030", "\uFD3E", "\uFD3F", "\uFE45", "\uFE46"], false, false);
  523. var peg$c61 = peg$otherExpectation("optional whitespace");
  524. var peg$c62 = peg$otherExpectation("number");
  525. var peg$c63 = "-";
  526. var peg$c64 = peg$literalExpectation("-", false);
  527. var peg$c65 = function (negative, num) {
  528. return num
  529. ? negative
  530. ? -num
  531. : num
  532. : 0;
  533. };
  534. var peg$c67 = peg$otherExpectation("double apostrophes");
  535. var peg$c68 = "''";
  536. var peg$c69 = peg$literalExpectation("''", false);
  537. var peg$c70 = function () { return "'"; };
  538. var peg$c71 = /^[{}]/;
  539. var peg$c72 = peg$classExpectation(["{", "}"], false, false);
  540. var peg$c73 = function (escapedChar, quotedChars) {
  541. return escapedChar + quotedChars.replace("''", "'");
  542. };
  543. var peg$c74 = /^[^{}]/;
  544. var peg$c75 = peg$classExpectation(["{", "}"], true, false);
  545. var peg$c76 = peg$otherExpectation("argNameOrNumber");
  546. var peg$c77 = peg$otherExpectation("argNumber");
  547. var peg$c78 = "0";
  548. var peg$c79 = peg$literalExpectation("0", false);
  549. var peg$c80 = function () { return 0; };
  550. var peg$c81 = /^[1-9]/;
  551. var peg$c82 = peg$classExpectation([["1", "9"]], false, false);
  552. var peg$c83 = /^[0-9]/;
  553. var peg$c84 = peg$classExpectation([["0", "9"]], false, false);
  554. var peg$c85 = function (digits) {
  555. return parseInt(digits.join(''), 10);
  556. };
  557. var peg$c86 = peg$otherExpectation("argName");
  558. var peg$currPos = 0;
  559. var peg$savedPos = 0;
  560. var peg$posDetailsCache = [{ line: 1, column: 1 }];
  561. var peg$maxFailPos = 0;
  562. var peg$maxFailExpected = [];
  563. var peg$silentFails = 0;
  564. var peg$result;
  565. if (options.startRule !== undefined) {
  566. if (!(options.startRule in peg$startRuleFunctions)) {
  567. throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
  568. }
  569. peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
  570. }
  571. function text() {
  572. return input.substring(peg$savedPos, peg$currPos);
  573. }
  574. function location() {
  575. return peg$computeLocation(peg$savedPos, peg$currPos);
  576. }
  577. function error(message, location1) {
  578. location1 = location1 !== undefined
  579. ? location1
  580. : peg$computeLocation(peg$savedPos, peg$currPos);
  581. throw peg$buildSimpleError(message, location1);
  582. }
  583. function peg$literalExpectation(text1, ignoreCase) {
  584. return { type: "literal", text: text1, ignoreCase: ignoreCase };
  585. }
  586. function peg$classExpectation(parts, inverted, ignoreCase) {
  587. return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
  588. }
  589. function peg$anyExpectation() {
  590. return { type: "any" };
  591. }
  592. function peg$endExpectation() {
  593. return { type: "end" };
  594. }
  595. function peg$otherExpectation(description) {
  596. return { type: "other", description: description };
  597. }
  598. function peg$computePosDetails(pos) {
  599. var details = peg$posDetailsCache[pos];
  600. var p;
  601. if (details) {
  602. return details;
  603. }
  604. else {
  605. p = pos - 1;
  606. while (!peg$posDetailsCache[p]) {
  607. p--;
  608. }
  609. details = peg$posDetailsCache[p];
  610. details = {
  611. line: details.line,
  612. column: details.column
  613. };
  614. while (p < pos) {
  615. if (input.charCodeAt(p) === 10) {
  616. details.line++;
  617. details.column = 1;
  618. }
  619. else {
  620. details.column++;
  621. }
  622. p++;
  623. }
  624. peg$posDetailsCache[pos] = details;
  625. return details;
  626. }
  627. }
  628. function peg$computeLocation(startPos, endPos) {
  629. var startPosDetails = peg$computePosDetails(startPos);
  630. var endPosDetails = peg$computePosDetails(endPos);
  631. return {
  632. start: {
  633. offset: startPos,
  634. line: startPosDetails.line,
  635. column: startPosDetails.column
  636. },
  637. end: {
  638. offset: endPos,
  639. line: endPosDetails.line,
  640. column: endPosDetails.column
  641. }
  642. };
  643. }
  644. function peg$fail(expected1) {
  645. if (peg$currPos < peg$maxFailPos) {
  646. return;
  647. }
  648. if (peg$currPos > peg$maxFailPos) {
  649. peg$maxFailPos = peg$currPos;
  650. peg$maxFailExpected = [];
  651. }
  652. peg$maxFailExpected.push(expected1);
  653. }
  654. function peg$buildSimpleError(message, location1) {
  655. return new SyntaxError(message, [], "", location1);
  656. }
  657. function peg$buildStructuredError(expected1, found, location1) {
  658. return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);
  659. }
  660. function peg$parsestart() {
  661. var s0;
  662. s0 = peg$parsemessage();
  663. return s0;
  664. }
  665. function peg$parsemessage() {
  666. var s0, s1;
  667. s0 = [];
  668. s1 = peg$parsemessageElement();
  669. while (s1 !== peg$FAILED) {
  670. s0.push(s1);
  671. s1 = peg$parsemessageElement();
  672. }
  673. return s0;
  674. }
  675. function peg$parsemessageElement() {
  676. var s0;
  677. s0 = peg$parseliteralElement();
  678. if (s0 === peg$FAILED) {
  679. s0 = peg$parseargumentElement();
  680. if (s0 === peg$FAILED) {
  681. s0 = peg$parsesimpleFormatElement();
  682. if (s0 === peg$FAILED) {
  683. s0 = peg$parsepluralElement();
  684. if (s0 === peg$FAILED) {
  685. s0 = peg$parseselectElement();
  686. }
  687. }
  688. }
  689. }
  690. return s0;
  691. }
  692. function peg$parsemessageText() {
  693. var s0, s1, s2;
  694. s0 = peg$currPos;
  695. s1 = [];
  696. s2 = peg$parsedoubleApostrophes();
  697. if (s2 === peg$FAILED) {
  698. s2 = peg$parsequotedString();
  699. if (s2 === peg$FAILED) {
  700. s2 = peg$parseunquotedString();
  701. }
  702. }
  703. if (s2 !== peg$FAILED) {
  704. while (s2 !== peg$FAILED) {
  705. s1.push(s2);
  706. s2 = peg$parsedoubleApostrophes();
  707. if (s2 === peg$FAILED) {
  708. s2 = peg$parsequotedString();
  709. if (s2 === peg$FAILED) {
  710. s2 = peg$parseunquotedString();
  711. }
  712. }
  713. }
  714. }
  715. else {
  716. s1 = peg$FAILED;
  717. }
  718. if (s1 !== peg$FAILED) {
  719. peg$savedPos = s0;
  720. s1 = peg$c0(s1);
  721. }
  722. s0 = s1;
  723. return s0;
  724. }
  725. function peg$parseliteralElement() {
  726. var s0, s1;
  727. s0 = peg$currPos;
  728. s1 = peg$parsemessageText();
  729. if (s1 !== peg$FAILED) {
  730. peg$savedPos = s0;
  731. s1 = peg$c1(s1);
  732. }
  733. s0 = s1;
  734. return s0;
  735. }
  736. function peg$parseargumentElement() {
  737. var s0, s1, s2, s3, s4, s5;
  738. peg$silentFails++;
  739. s0 = peg$currPos;
  740. if (input.charCodeAt(peg$currPos) === 123) {
  741. s1 = peg$c3;
  742. peg$currPos++;
  743. }
  744. else {
  745. s1 = peg$FAILED;
  746. if (peg$silentFails === 0) {
  747. peg$fail(peg$c4);
  748. }
  749. }
  750. if (s1 !== peg$FAILED) {
  751. s2 = peg$parse_();
  752. if (s2 !== peg$FAILED) {
  753. s3 = peg$parseargNameOrNumber();
  754. if (s3 !== peg$FAILED) {
  755. s4 = peg$parse_();
  756. if (s4 !== peg$FAILED) {
  757. if (input.charCodeAt(peg$currPos) === 125) {
  758. s5 = peg$c5;
  759. peg$currPos++;
  760. }
  761. else {
  762. s5 = peg$FAILED;
  763. if (peg$silentFails === 0) {
  764. peg$fail(peg$c6);
  765. }
  766. }
  767. if (s5 !== peg$FAILED) {
  768. peg$savedPos = s0;
  769. s1 = peg$c7(s3);
  770. s0 = s1;
  771. }
  772. else {
  773. peg$currPos = s0;
  774. s0 = peg$FAILED;
  775. }
  776. }
  777. else {
  778. peg$currPos = s0;
  779. s0 = peg$FAILED;
  780. }
  781. }
  782. else {
  783. peg$currPos = s0;
  784. s0 = peg$FAILED;
  785. }
  786. }
  787. else {
  788. peg$currPos = s0;
  789. s0 = peg$FAILED;
  790. }
  791. }
  792. else {
  793. peg$currPos = s0;
  794. s0 = peg$FAILED;
  795. }
  796. peg$silentFails--;
  797. if (s0 === peg$FAILED) {
  798. s1 = peg$FAILED;
  799. if (peg$silentFails === 0) {
  800. peg$fail(peg$c2);
  801. }
  802. }
  803. return s0;
  804. }
  805. function peg$parsenumberSkeletonId() {
  806. var s0, s1, s2, s3, s4;
  807. peg$silentFails++;
  808. s0 = peg$currPos;
  809. s1 = [];
  810. s2 = peg$currPos;
  811. s3 = peg$currPos;
  812. peg$silentFails++;
  813. s4 = peg$parsepatternWhiteSpace();
  814. if (s4 === peg$FAILED) {
  815. if (peg$c9.test(input.charAt(peg$currPos))) {
  816. s4 = input.charAt(peg$currPos);
  817. peg$currPos++;
  818. }
  819. else {
  820. s4 = peg$FAILED;
  821. if (peg$silentFails === 0) {
  822. peg$fail(peg$c10);
  823. }
  824. }
  825. }
  826. peg$silentFails--;
  827. if (s4 === peg$FAILED) {
  828. s3 = undefined;
  829. }
  830. else {
  831. peg$currPos = s3;
  832. s3 = peg$FAILED;
  833. }
  834. if (s3 !== peg$FAILED) {
  835. if (input.length > peg$currPos) {
  836. s4 = input.charAt(peg$currPos);
  837. peg$currPos++;
  838. }
  839. else {
  840. s4 = peg$FAILED;
  841. if (peg$silentFails === 0) {
  842. peg$fail(peg$c11);
  843. }
  844. }
  845. if (s4 !== peg$FAILED) {
  846. s3 = [s3, s4];
  847. s2 = s3;
  848. }
  849. else {
  850. peg$currPos = s2;
  851. s2 = peg$FAILED;
  852. }
  853. }
  854. else {
  855. peg$currPos = s2;
  856. s2 = peg$FAILED;
  857. }
  858. if (s2 !== peg$FAILED) {
  859. while (s2 !== peg$FAILED) {
  860. s1.push(s2);
  861. s2 = peg$currPos;
  862. s3 = peg$currPos;
  863. peg$silentFails++;
  864. s4 = peg$parsepatternWhiteSpace();
  865. if (s4 === peg$FAILED) {
  866. if (peg$c9.test(input.charAt(peg$currPos))) {
  867. s4 = input.charAt(peg$currPos);
  868. peg$currPos++;
  869. }
  870. else {
  871. s4 = peg$FAILED;
  872. if (peg$silentFails === 0) {
  873. peg$fail(peg$c10);
  874. }
  875. }
  876. }
  877. peg$silentFails--;
  878. if (s4 === peg$FAILED) {
  879. s3 = undefined;
  880. }
  881. else {
  882. peg$currPos = s3;
  883. s3 = peg$FAILED;
  884. }
  885. if (s3 !== peg$FAILED) {
  886. if (input.length > peg$currPos) {
  887. s4 = input.charAt(peg$currPos);
  888. peg$currPos++;
  889. }
  890. else {
  891. s4 = peg$FAILED;
  892. if (peg$silentFails === 0) {
  893. peg$fail(peg$c11);
  894. }
  895. }
  896. if (s4 !== peg$FAILED) {
  897. s3 = [s3, s4];
  898. s2 = s3;
  899. }
  900. else {
  901. peg$currPos = s2;
  902. s2 = peg$FAILED;
  903. }
  904. }
  905. else {
  906. peg$currPos = s2;
  907. s2 = peg$FAILED;
  908. }
  909. }
  910. }
  911. else {
  912. s1 = peg$FAILED;
  913. }
  914. if (s1 !== peg$FAILED) {
  915. s0 = input.substring(s0, peg$currPos);
  916. }
  917. else {
  918. s0 = s1;
  919. }
  920. peg$silentFails--;
  921. if (s0 === peg$FAILED) {
  922. s1 = peg$FAILED;
  923. if (peg$silentFails === 0) {
  924. peg$fail(peg$c8);
  925. }
  926. }
  927. return s0;
  928. }
  929. function peg$parsenumberSkeletonTokenOption() {
  930. var s0, s1, s2;
  931. peg$silentFails++;
  932. s0 = peg$currPos;
  933. if (input.charCodeAt(peg$currPos) === 47) {
  934. s1 = peg$c13;
  935. peg$currPos++;
  936. }
  937. else {
  938. s1 = peg$FAILED;
  939. if (peg$silentFails === 0) {
  940. peg$fail(peg$c14);
  941. }
  942. }
  943. if (s1 !== peg$FAILED) {
  944. s2 = peg$parsenumberSkeletonId();
  945. if (s2 !== peg$FAILED) {
  946. peg$savedPos = s0;
  947. s1 = peg$c15(s2);
  948. s0 = s1;
  949. }
  950. else {
  951. peg$currPos = s0;
  952. s0 = peg$FAILED;
  953. }
  954. }
  955. else {
  956. peg$currPos = s0;
  957. s0 = peg$FAILED;
  958. }
  959. peg$silentFails--;
  960. if (s0 === peg$FAILED) {
  961. s1 = peg$FAILED;
  962. if (peg$silentFails === 0) {
  963. peg$fail(peg$c12);
  964. }
  965. }
  966. return s0;
  967. }
  968. function peg$parsenumberSkeletonToken() {
  969. var s0, s1, s2, s3, s4;
  970. peg$silentFails++;
  971. s0 = peg$currPos;
  972. s1 = peg$parse_();
  973. if (s1 !== peg$FAILED) {
  974. s2 = peg$parsenumberSkeletonId();
  975. if (s2 !== peg$FAILED) {
  976. s3 = [];
  977. s4 = peg$parsenumberSkeletonTokenOption();
  978. while (s4 !== peg$FAILED) {
  979. s3.push(s4);
  980. s4 = peg$parsenumberSkeletonTokenOption();
  981. }
  982. if (s3 !== peg$FAILED) {
  983. peg$savedPos = s0;
  984. s1 = peg$c17(s2, s3);
  985. s0 = s1;
  986. }
  987. else {
  988. peg$currPos = s0;
  989. s0 = peg$FAILED;
  990. }
  991. }
  992. else {
  993. peg$currPos = s0;
  994. s0 = peg$FAILED;
  995. }
  996. }
  997. else {
  998. peg$currPos = s0;
  999. s0 = peg$FAILED;
  1000. }
  1001. peg$silentFails--;
  1002. if (s0 === peg$FAILED) {
  1003. s1 = peg$FAILED;
  1004. if (peg$silentFails === 0) {
  1005. peg$fail(peg$c16);
  1006. }
  1007. }
  1008. return s0;
  1009. }
  1010. function peg$parsenumberSkeleton() {
  1011. var s0, s1, s2;
  1012. s0 = peg$currPos;
  1013. s1 = [];
  1014. s2 = peg$parsenumberSkeletonToken();
  1015. if (s2 !== peg$FAILED) {
  1016. while (s2 !== peg$FAILED) {
  1017. s1.push(s2);
  1018. s2 = peg$parsenumberSkeletonToken();
  1019. }
  1020. }
  1021. else {
  1022. s1 = peg$FAILED;
  1023. }
  1024. if (s1 !== peg$FAILED) {
  1025. peg$savedPos = s0;
  1026. s1 = peg$c18(s1);
  1027. }
  1028. s0 = s1;
  1029. return s0;
  1030. }
  1031. function peg$parsenumberArgStyle() {
  1032. var s0, s1, s2;
  1033. s0 = peg$currPos;
  1034. if (input.substr(peg$currPos, 2) === peg$c19) {
  1035. s1 = peg$c19;
  1036. peg$currPos += 2;
  1037. }
  1038. else {
  1039. s1 = peg$FAILED;
  1040. if (peg$silentFails === 0) {
  1041. peg$fail(peg$c20);
  1042. }
  1043. }
  1044. if (s1 !== peg$FAILED) {
  1045. s2 = peg$parsenumberSkeleton();
  1046. if (s2 !== peg$FAILED) {
  1047. peg$savedPos = s0;
  1048. s1 = peg$c21(s2);
  1049. s0 = s1;
  1050. }
  1051. else {
  1052. peg$currPos = s0;
  1053. s0 = peg$FAILED;
  1054. }
  1055. }
  1056. else {
  1057. peg$currPos = s0;
  1058. s0 = peg$FAILED;
  1059. }
  1060. if (s0 === peg$FAILED) {
  1061. s0 = peg$currPos;
  1062. s1 = peg$parsemessageText();
  1063. if (s1 !== peg$FAILED) {
  1064. peg$savedPos = s0;
  1065. s1 = peg$c22(s1);
  1066. }
  1067. s0 = s1;
  1068. }
  1069. return s0;
  1070. }
  1071. function peg$parsenumberFormatElement() {
  1072. var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
  1073. s0 = peg$currPos;
  1074. if (input.charCodeAt(peg$currPos) === 123) {
  1075. s1 = peg$c3;
  1076. peg$currPos++;
  1077. }
  1078. else {
  1079. s1 = peg$FAILED;
  1080. if (peg$silentFails === 0) {
  1081. peg$fail(peg$c4);
  1082. }
  1083. }
  1084. if (s1 !== peg$FAILED) {
  1085. s2 = peg$parse_();
  1086. if (s2 !== peg$FAILED) {
  1087. s3 = peg$parseargNameOrNumber();
  1088. if (s3 !== peg$FAILED) {
  1089. s4 = peg$parse_();
  1090. if (s4 !== peg$FAILED) {
  1091. if (input.charCodeAt(peg$currPos) === 44) {
  1092. s5 = peg$c23;
  1093. peg$currPos++;
  1094. }
  1095. else {
  1096. s5 = peg$FAILED;
  1097. if (peg$silentFails === 0) {
  1098. peg$fail(peg$c24);
  1099. }
  1100. }
  1101. if (s5 !== peg$FAILED) {
  1102. s6 = peg$parse_();
  1103. if (s6 !== peg$FAILED) {
  1104. if (input.substr(peg$currPos, 6) === peg$c25) {
  1105. s7 = peg$c25;
  1106. peg$currPos += 6;
  1107. }
  1108. else {
  1109. s7 = peg$FAILED;
  1110. if (peg$silentFails === 0) {
  1111. peg$fail(peg$c26);
  1112. }
  1113. }
  1114. if (s7 !== peg$FAILED) {
  1115. s8 = peg$parse_();
  1116. if (s8 !== peg$FAILED) {
  1117. s9 = peg$currPos;
  1118. if (input.charCodeAt(peg$currPos) === 44) {
  1119. s10 = peg$c23;
  1120. peg$currPos++;
  1121. }
  1122. else {
  1123. s10 = peg$FAILED;
  1124. if (peg$silentFails === 0) {
  1125. peg$fail(peg$c24);
  1126. }
  1127. }
  1128. if (s10 !== peg$FAILED) {
  1129. s11 = peg$parse_();
  1130. if (s11 !== peg$FAILED) {
  1131. s12 = peg$parsenumberArgStyle();
  1132. if (s12 !== peg$FAILED) {
  1133. s10 = [s10, s11, s12];
  1134. s9 = s10;
  1135. }
  1136. else {
  1137. peg$currPos = s9;
  1138. s9 = peg$FAILED;
  1139. }
  1140. }
  1141. else {
  1142. peg$currPos = s9;
  1143. s9 = peg$FAILED;
  1144. }
  1145. }
  1146. else {
  1147. peg$currPos = s9;
  1148. s9 = peg$FAILED;
  1149. }
  1150. if (s9 === peg$FAILED) {
  1151. s9 = null;
  1152. }
  1153. if (s9 !== peg$FAILED) {
  1154. s10 = peg$parse_();
  1155. if (s10 !== peg$FAILED) {
  1156. if (input.charCodeAt(peg$currPos) === 125) {
  1157. s11 = peg$c5;
  1158. peg$currPos++;
  1159. }
  1160. else {
  1161. s11 = peg$FAILED;
  1162. if (peg$silentFails === 0) {
  1163. peg$fail(peg$c6);
  1164. }
  1165. }
  1166. if (s11 !== peg$FAILED) {
  1167. peg$savedPos = s0;
  1168. s1 = peg$c27(s3, s7, s9);
  1169. s0 = s1;
  1170. }
  1171. else {
  1172. peg$currPos = s0;
  1173. s0 = peg$FAILED;
  1174. }
  1175. }
  1176. else {
  1177. peg$currPos = s0;
  1178. s0 = peg$FAILED;
  1179. }
  1180. }
  1181. else {
  1182. peg$currPos = s0;
  1183. s0 = peg$FAILED;
  1184. }
  1185. }
  1186. else {
  1187. peg$currPos = s0;
  1188. s0 = peg$FAILED;
  1189. }
  1190. }
  1191. else {
  1192. peg$currPos = s0;
  1193. s0 = peg$FAILED;
  1194. }
  1195. }
  1196. else {
  1197. peg$currPos = s0;
  1198. s0 = peg$FAILED;
  1199. }
  1200. }
  1201. else {
  1202. peg$currPos = s0;
  1203. s0 = peg$FAILED;
  1204. }
  1205. }
  1206. else {
  1207. peg$currPos = s0;
  1208. s0 = peg$FAILED;
  1209. }
  1210. }
  1211. else {
  1212. peg$currPos = s0;
  1213. s0 = peg$FAILED;
  1214. }
  1215. }
  1216. else {
  1217. peg$currPos = s0;
  1218. s0 = peg$FAILED;
  1219. }
  1220. }
  1221. else {
  1222. peg$currPos = s0;
  1223. s0 = peg$FAILED;
  1224. }
  1225. return s0;
  1226. }
  1227. function peg$parsedateTimeSkeletonLiteral() {
  1228. var s0, s1, s2, s3;
  1229. s0 = peg$currPos;
  1230. if (input.charCodeAt(peg$currPos) === 39) {
  1231. s1 = peg$c28;
  1232. peg$currPos++;
  1233. }
  1234. else {
  1235. s1 = peg$FAILED;
  1236. if (peg$silentFails === 0) {
  1237. peg$fail(peg$c29);
  1238. }
  1239. }
  1240. if (s1 !== peg$FAILED) {
  1241. s2 = [];
  1242. s3 = peg$parsedoubleApostrophes();
  1243. if (s3 === peg$FAILED) {
  1244. if (peg$c30.test(input.charAt(peg$currPos))) {
  1245. s3 = input.charAt(peg$currPos);
  1246. peg$currPos++;
  1247. }
  1248. else {
  1249. s3 = peg$FAILED;
  1250. if (peg$silentFails === 0) {
  1251. peg$fail(peg$c31);
  1252. }
  1253. }
  1254. }
  1255. if (s3 !== peg$FAILED) {
  1256. while (s3 !== peg$FAILED) {
  1257. s2.push(s3);
  1258. s3 = peg$parsedoubleApostrophes();
  1259. if (s3 === peg$FAILED) {
  1260. if (peg$c30.test(input.charAt(peg$currPos))) {
  1261. s3 = input.charAt(peg$currPos);
  1262. peg$currPos++;
  1263. }
  1264. else {
  1265. s3 = peg$FAILED;
  1266. if (peg$silentFails === 0) {
  1267. peg$fail(peg$c31);
  1268. }
  1269. }
  1270. }
  1271. }
  1272. }
  1273. else {
  1274. s2 = peg$FAILED;
  1275. }
  1276. if (s2 !== peg$FAILED) {
  1277. if (input.charCodeAt(peg$currPos) === 39) {
  1278. s3 = peg$c28;
  1279. peg$currPos++;
  1280. }
  1281. else {
  1282. s3 = peg$FAILED;
  1283. if (peg$silentFails === 0) {
  1284. peg$fail(peg$c29);
  1285. }
  1286. }
  1287. if (s3 !== peg$FAILED) {
  1288. s1 = [s1, s2, s3];
  1289. s0 = s1;
  1290. }
  1291. else {
  1292. peg$currPos = s0;
  1293. s0 = peg$FAILED;
  1294. }
  1295. }
  1296. else {
  1297. peg$currPos = s0;
  1298. s0 = peg$FAILED;
  1299. }
  1300. }
  1301. else {
  1302. peg$currPos = s0;
  1303. s0 = peg$FAILED;
  1304. }
  1305. if (s0 === peg$FAILED) {
  1306. s0 = [];
  1307. s1 = peg$parsedoubleApostrophes();
  1308. if (s1 === peg$FAILED) {
  1309. if (peg$c32.test(input.charAt(peg$currPos))) {
  1310. s1 = input.charAt(peg$currPos);
  1311. peg$currPos++;
  1312. }
  1313. else {
  1314. s1 = peg$FAILED;
  1315. if (peg$silentFails === 0) {
  1316. peg$fail(peg$c33);
  1317. }
  1318. }
  1319. }
  1320. if (s1 !== peg$FAILED) {
  1321. while (s1 !== peg$FAILED) {
  1322. s0.push(s1);
  1323. s1 = peg$parsedoubleApostrophes();
  1324. if (s1 === peg$FAILED) {
  1325. if (peg$c32.test(input.charAt(peg$currPos))) {
  1326. s1 = input.charAt(peg$currPos);
  1327. peg$currPos++;
  1328. }
  1329. else {
  1330. s1 = peg$FAILED;
  1331. if (peg$silentFails === 0) {
  1332. peg$fail(peg$c33);
  1333. }
  1334. }
  1335. }
  1336. }
  1337. }
  1338. else {
  1339. s0 = peg$FAILED;
  1340. }
  1341. }
  1342. return s0;
  1343. }
  1344. function peg$parsedateTimeSkeletonPattern() {
  1345. var s0, s1;
  1346. s0 = [];
  1347. if (peg$c34.test(input.charAt(peg$currPos))) {
  1348. s1 = input.charAt(peg$currPos);
  1349. peg$currPos++;
  1350. }
  1351. else {
  1352. s1 = peg$FAILED;
  1353. if (peg$silentFails === 0) {
  1354. peg$fail(peg$c35);
  1355. }
  1356. }
  1357. if (s1 !== peg$FAILED) {
  1358. while (s1 !== peg$FAILED) {
  1359. s0.push(s1);
  1360. if (peg$c34.test(input.charAt(peg$currPos))) {
  1361. s1 = input.charAt(peg$currPos);
  1362. peg$currPos++;
  1363. }
  1364. else {
  1365. s1 = peg$FAILED;
  1366. if (peg$silentFails === 0) {
  1367. peg$fail(peg$c35);
  1368. }
  1369. }
  1370. }
  1371. }
  1372. else {
  1373. s0 = peg$FAILED;
  1374. }
  1375. return s0;
  1376. }
  1377. function peg$parsedateTimeSkeleton() {
  1378. var s0, s1, s2, s3;
  1379. s0 = peg$currPos;
  1380. s1 = peg$currPos;
  1381. s2 = [];
  1382. s3 = peg$parsedateTimeSkeletonLiteral();
  1383. if (s3 === peg$FAILED) {
  1384. s3 = peg$parsedateTimeSkeletonPattern();
  1385. }
  1386. if (s3 !== peg$FAILED) {
  1387. while (s3 !== peg$FAILED) {
  1388. s2.push(s3);
  1389. s3 = peg$parsedateTimeSkeletonLiteral();
  1390. if (s3 === peg$FAILED) {
  1391. s3 = peg$parsedateTimeSkeletonPattern();
  1392. }
  1393. }
  1394. }
  1395. else {
  1396. s2 = peg$FAILED;
  1397. }
  1398. if (s2 !== peg$FAILED) {
  1399. s1 = input.substring(s1, peg$currPos);
  1400. }
  1401. else {
  1402. s1 = s2;
  1403. }
  1404. if (s1 !== peg$FAILED) {
  1405. peg$savedPos = s0;
  1406. s1 = peg$c36(s1);
  1407. }
  1408. s0 = s1;
  1409. return s0;
  1410. }
  1411. function peg$parsedateOrTimeArgStyle() {
  1412. var s0, s1, s2;
  1413. s0 = peg$currPos;
  1414. if (input.substr(peg$currPos, 2) === peg$c19) {
  1415. s1 = peg$c19;
  1416. peg$currPos += 2;
  1417. }
  1418. else {
  1419. s1 = peg$FAILED;
  1420. if (peg$silentFails === 0) {
  1421. peg$fail(peg$c20);
  1422. }
  1423. }
  1424. if (s1 !== peg$FAILED) {
  1425. s2 = peg$parsedateTimeSkeleton();
  1426. if (s2 !== peg$FAILED) {
  1427. peg$savedPos = s0;
  1428. s1 = peg$c21(s2);
  1429. s0 = s1;
  1430. }
  1431. else {
  1432. peg$currPos = s0;
  1433. s0 = peg$FAILED;
  1434. }
  1435. }
  1436. else {
  1437. peg$currPos = s0;
  1438. s0 = peg$FAILED;
  1439. }
  1440. if (s0 === peg$FAILED) {
  1441. s0 = peg$currPos;
  1442. s1 = peg$parsemessageText();
  1443. if (s1 !== peg$FAILED) {
  1444. peg$savedPos = s0;
  1445. s1 = peg$c22(s1);
  1446. }
  1447. s0 = s1;
  1448. }
  1449. return s0;
  1450. }
  1451. function peg$parsedateOrTimeFormatElement() {
  1452. var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
  1453. s0 = peg$currPos;
  1454. if (input.charCodeAt(peg$currPos) === 123) {
  1455. s1 = peg$c3;
  1456. peg$currPos++;
  1457. }
  1458. else {
  1459. s1 = peg$FAILED;
  1460. if (peg$silentFails === 0) {
  1461. peg$fail(peg$c4);
  1462. }
  1463. }
  1464. if (s1 !== peg$FAILED) {
  1465. s2 = peg$parse_();
  1466. if (s2 !== peg$FAILED) {
  1467. s3 = peg$parseargNameOrNumber();
  1468. if (s3 !== peg$FAILED) {
  1469. s4 = peg$parse_();
  1470. if (s4 !== peg$FAILED) {
  1471. if (input.charCodeAt(peg$currPos) === 44) {
  1472. s5 = peg$c23;
  1473. peg$currPos++;
  1474. }
  1475. else {
  1476. s5 = peg$FAILED;
  1477. if (peg$silentFails === 0) {
  1478. peg$fail(peg$c24);
  1479. }
  1480. }
  1481. if (s5 !== peg$FAILED) {
  1482. s6 = peg$parse_();
  1483. if (s6 !== peg$FAILED) {
  1484. if (input.substr(peg$currPos, 4) === peg$c37) {
  1485. s7 = peg$c37;
  1486. peg$currPos += 4;
  1487. }
  1488. else {
  1489. s7 = peg$FAILED;
  1490. if (peg$silentFails === 0) {
  1491. peg$fail(peg$c38);
  1492. }
  1493. }
  1494. if (s7 === peg$FAILED) {
  1495. if (input.substr(peg$currPos, 4) === peg$c39) {
  1496. s7 = peg$c39;
  1497. peg$currPos += 4;
  1498. }
  1499. else {
  1500. s7 = peg$FAILED;
  1501. if (peg$silentFails === 0) {
  1502. peg$fail(peg$c40);
  1503. }
  1504. }
  1505. }
  1506. if (s7 !== peg$FAILED) {
  1507. s8 = peg$parse_();
  1508. if (s8 !== peg$FAILED) {
  1509. s9 = peg$currPos;
  1510. if (input.charCodeAt(peg$currPos) === 44) {
  1511. s10 = peg$c23;
  1512. peg$currPos++;
  1513. }
  1514. else {
  1515. s10 = peg$FAILED;
  1516. if (peg$silentFails === 0) {
  1517. peg$fail(peg$c24);
  1518. }
  1519. }
  1520. if (s10 !== peg$FAILED) {
  1521. s11 = peg$parse_();
  1522. if (s11 !== peg$FAILED) {
  1523. s12 = peg$parsedateOrTimeArgStyle();
  1524. if (s12 !== peg$FAILED) {
  1525. s10 = [s10, s11, s12];
  1526. s9 = s10;
  1527. }
  1528. else {
  1529. peg$currPos = s9;
  1530. s9 = peg$FAILED;
  1531. }
  1532. }
  1533. else {
  1534. peg$currPos = s9;
  1535. s9 = peg$FAILED;
  1536. }
  1537. }
  1538. else {
  1539. peg$currPos = s9;
  1540. s9 = peg$FAILED;
  1541. }
  1542. if (s9 === peg$FAILED) {
  1543. s9 = null;
  1544. }
  1545. if (s9 !== peg$FAILED) {
  1546. s10 = peg$parse_();
  1547. if (s10 !== peg$FAILED) {
  1548. if (input.charCodeAt(peg$currPos) === 125) {
  1549. s11 = peg$c5;
  1550. peg$currPos++;
  1551. }
  1552. else {
  1553. s11 = peg$FAILED;
  1554. if (peg$silentFails === 0) {
  1555. peg$fail(peg$c6);
  1556. }
  1557. }
  1558. if (s11 !== peg$FAILED) {
  1559. peg$savedPos = s0;
  1560. s1 = peg$c27(s3, s7, s9);
  1561. s0 = s1;
  1562. }
  1563. else {
  1564. peg$currPos = s0;
  1565. s0 = peg$FAILED;
  1566. }
  1567. }
  1568. else {
  1569. peg$currPos = s0;
  1570. s0 = peg$FAILED;
  1571. }
  1572. }
  1573. else {
  1574. peg$currPos = s0;
  1575. s0 = peg$FAILED;
  1576. }
  1577. }
  1578. else {
  1579. peg$currPos = s0;
  1580. s0 = peg$FAILED;
  1581. }
  1582. }
  1583. else {
  1584. peg$currPos = s0;
  1585. s0 = peg$FAILED;
  1586. }
  1587. }
  1588. else {
  1589. peg$currPos = s0;
  1590. s0 = peg$FAILED;
  1591. }
  1592. }
  1593. else {
  1594. peg$currPos = s0;
  1595. s0 = peg$FAILED;
  1596. }
  1597. }
  1598. else {
  1599. peg$currPos = s0;
  1600. s0 = peg$FAILED;
  1601. }
  1602. }
  1603. else {
  1604. peg$currPos = s0;
  1605. s0 = peg$FAILED;
  1606. }
  1607. }
  1608. else {
  1609. peg$currPos = s0;
  1610. s0 = peg$FAILED;
  1611. }
  1612. }
  1613. else {
  1614. peg$currPos = s0;
  1615. s0 = peg$FAILED;
  1616. }
  1617. return s0;
  1618. }
  1619. function peg$parsesimpleFormatElement() {
  1620. var s0;
  1621. s0 = peg$parsenumberFormatElement();
  1622. if (s0 === peg$FAILED) {
  1623. s0 = peg$parsedateOrTimeFormatElement();
  1624. }
  1625. return s0;
  1626. }
  1627. function peg$parsepluralElement() {
  1628. var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
  1629. s0 = peg$currPos;
  1630. if (input.charCodeAt(peg$currPos) === 123) {
  1631. s1 = peg$c3;
  1632. peg$currPos++;
  1633. }
  1634. else {
  1635. s1 = peg$FAILED;
  1636. if (peg$silentFails === 0) {
  1637. peg$fail(peg$c4);
  1638. }
  1639. }
  1640. if (s1 !== peg$FAILED) {
  1641. s2 = peg$parse_();
  1642. if (s2 !== peg$FAILED) {
  1643. s3 = peg$parseargNameOrNumber();
  1644. if (s3 !== peg$FAILED) {
  1645. s4 = peg$parse_();
  1646. if (s4 !== peg$FAILED) {
  1647. if (input.charCodeAt(peg$currPos) === 44) {
  1648. s5 = peg$c23;
  1649. peg$currPos++;
  1650. }
  1651. else {
  1652. s5 = peg$FAILED;
  1653. if (peg$silentFails === 0) {
  1654. peg$fail(peg$c24);
  1655. }
  1656. }
  1657. if (s5 !== peg$FAILED) {
  1658. s6 = peg$parse_();
  1659. if (s6 !== peg$FAILED) {
  1660. if (input.substr(peg$currPos, 6) === peg$c41) {
  1661. s7 = peg$c41;
  1662. peg$currPos += 6;
  1663. }
  1664. else {
  1665. s7 = peg$FAILED;
  1666. if (peg$silentFails === 0) {
  1667. peg$fail(peg$c42);
  1668. }
  1669. }
  1670. if (s7 === peg$FAILED) {
  1671. if (input.substr(peg$currPos, 13) === peg$c43) {
  1672. s7 = peg$c43;
  1673. peg$currPos += 13;
  1674. }
  1675. else {
  1676. s7 = peg$FAILED;
  1677. if (peg$silentFails === 0) {
  1678. peg$fail(peg$c44);
  1679. }
  1680. }
  1681. }
  1682. if (s7 !== peg$FAILED) {
  1683. s8 = peg$parse_();
  1684. if (s8 !== peg$FAILED) {
  1685. if (input.charCodeAt(peg$currPos) === 44) {
  1686. s9 = peg$c23;
  1687. peg$currPos++;
  1688. }
  1689. else {
  1690. s9 = peg$FAILED;
  1691. if (peg$silentFails === 0) {
  1692. peg$fail(peg$c24);
  1693. }
  1694. }
  1695. if (s9 !== peg$FAILED) {
  1696. s10 = peg$parse_();
  1697. if (s10 !== peg$FAILED) {
  1698. s11 = peg$currPos;
  1699. if (input.substr(peg$currPos, 7) === peg$c45) {
  1700. s12 = peg$c45;
  1701. peg$currPos += 7;
  1702. }
  1703. else {
  1704. s12 = peg$FAILED;
  1705. if (peg$silentFails === 0) {
  1706. peg$fail(peg$c46);
  1707. }
  1708. }
  1709. if (s12 !== peg$FAILED) {
  1710. s13 = peg$parse_();
  1711. if (s13 !== peg$FAILED) {
  1712. s14 = peg$parsenumber();
  1713. if (s14 !== peg$FAILED) {
  1714. s12 = [s12, s13, s14];
  1715. s11 = s12;
  1716. }
  1717. else {
  1718. peg$currPos = s11;
  1719. s11 = peg$FAILED;
  1720. }
  1721. }
  1722. else {
  1723. peg$currPos = s11;
  1724. s11 = peg$FAILED;
  1725. }
  1726. }
  1727. else {
  1728. peg$currPos = s11;
  1729. s11 = peg$FAILED;
  1730. }
  1731. if (s11 === peg$FAILED) {
  1732. s11 = null;
  1733. }
  1734. if (s11 !== peg$FAILED) {
  1735. s12 = peg$parse_();
  1736. if (s12 !== peg$FAILED) {
  1737. s13 = [];
  1738. s14 = peg$parsepluralOption();
  1739. if (s14 !== peg$FAILED) {
  1740. while (s14 !== peg$FAILED) {
  1741. s13.push(s14);
  1742. s14 = peg$parsepluralOption();
  1743. }
  1744. }
  1745. else {
  1746. s13 = peg$FAILED;
  1747. }
  1748. if (s13 !== peg$FAILED) {
  1749. s14 = peg$parse_();
  1750. if (s14 !== peg$FAILED) {
  1751. if (input.charCodeAt(peg$currPos) === 125) {
  1752. s15 = peg$c5;
  1753. peg$currPos++;
  1754. }
  1755. else {
  1756. s15 = peg$FAILED;
  1757. if (peg$silentFails === 0) {
  1758. peg$fail(peg$c6);
  1759. }
  1760. }
  1761. if (s15 !== peg$FAILED) {
  1762. peg$savedPos = s0;
  1763. s1 = peg$c47(s3, s7, s11, s13);
  1764. s0 = s1;
  1765. }
  1766. else {
  1767. peg$currPos = s0;
  1768. s0 = peg$FAILED;
  1769. }
  1770. }
  1771. else {
  1772. peg$currPos = s0;
  1773. s0 = peg$FAILED;
  1774. }
  1775. }
  1776. else {
  1777. peg$currPos = s0;
  1778. s0 = peg$FAILED;
  1779. }
  1780. }
  1781. else {
  1782. peg$currPos = s0;
  1783. s0 = peg$FAILED;
  1784. }
  1785. }
  1786. else {
  1787. peg$currPos = s0;
  1788. s0 = peg$FAILED;
  1789. }
  1790. }
  1791. else {
  1792. peg$currPos = s0;
  1793. s0 = peg$FAILED;
  1794. }
  1795. }
  1796. else {
  1797. peg$currPos = s0;
  1798. s0 = peg$FAILED;
  1799. }
  1800. }
  1801. else {
  1802. peg$currPos = s0;
  1803. s0 = peg$FAILED;
  1804. }
  1805. }
  1806. else {
  1807. peg$currPos = s0;
  1808. s0 = peg$FAILED;
  1809. }
  1810. }
  1811. else {
  1812. peg$currPos = s0;
  1813. s0 = peg$FAILED;
  1814. }
  1815. }
  1816. else {
  1817. peg$currPos = s0;
  1818. s0 = peg$FAILED;
  1819. }
  1820. }
  1821. else {
  1822. peg$currPos = s0;
  1823. s0 = peg$FAILED;
  1824. }
  1825. }
  1826. else {
  1827. peg$currPos = s0;
  1828. s0 = peg$FAILED;
  1829. }
  1830. }
  1831. else {
  1832. peg$currPos = s0;
  1833. s0 = peg$FAILED;
  1834. }
  1835. }
  1836. else {
  1837. peg$currPos = s0;
  1838. s0 = peg$FAILED;
  1839. }
  1840. return s0;
  1841. }
  1842. function peg$parseselectElement() {
  1843. var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
  1844. s0 = peg$currPos;
  1845. if (input.charCodeAt(peg$currPos) === 123) {
  1846. s1 = peg$c3;
  1847. peg$currPos++;
  1848. }
  1849. else {
  1850. s1 = peg$FAILED;
  1851. if (peg$silentFails === 0) {
  1852. peg$fail(peg$c4);
  1853. }
  1854. }
  1855. if (s1 !== peg$FAILED) {
  1856. s2 = peg$parse_();
  1857. if (s2 !== peg$FAILED) {
  1858. s3 = peg$parseargNameOrNumber();
  1859. if (s3 !== peg$FAILED) {
  1860. s4 = peg$parse_();
  1861. if (s4 !== peg$FAILED) {
  1862. if (input.charCodeAt(peg$currPos) === 44) {
  1863. s5 = peg$c23;
  1864. peg$currPos++;
  1865. }
  1866. else {
  1867. s5 = peg$FAILED;
  1868. if (peg$silentFails === 0) {
  1869. peg$fail(peg$c24);
  1870. }
  1871. }
  1872. if (s5 !== peg$FAILED) {
  1873. s6 = peg$parse_();
  1874. if (s6 !== peg$FAILED) {
  1875. if (input.substr(peg$currPos, 6) === peg$c48) {
  1876. s7 = peg$c48;
  1877. peg$currPos += 6;
  1878. }
  1879. else {
  1880. s7 = peg$FAILED;
  1881. if (peg$silentFails === 0) {
  1882. peg$fail(peg$c49);
  1883. }
  1884. }
  1885. if (s7 !== peg$FAILED) {
  1886. s8 = peg$parse_();
  1887. if (s8 !== peg$FAILED) {
  1888. if (input.charCodeAt(peg$currPos) === 44) {
  1889. s9 = peg$c23;
  1890. peg$currPos++;
  1891. }
  1892. else {
  1893. s9 = peg$FAILED;
  1894. if (peg$silentFails === 0) {
  1895. peg$fail(peg$c24);
  1896. }
  1897. }
  1898. if (s9 !== peg$FAILED) {
  1899. s10 = peg$parse_();
  1900. if (s10 !== peg$FAILED) {
  1901. s11 = [];
  1902. s12 = peg$parseselectOption();
  1903. if (s12 !== peg$FAILED) {
  1904. while (s12 !== peg$FAILED) {
  1905. s11.push(s12);
  1906. s12 = peg$parseselectOption();
  1907. }
  1908. }
  1909. else {
  1910. s11 = peg$FAILED;
  1911. }
  1912. if (s11 !== peg$FAILED) {
  1913. s12 = peg$parse_();
  1914. if (s12 !== peg$FAILED) {
  1915. if (input.charCodeAt(peg$currPos) === 125) {
  1916. s13 = peg$c5;
  1917. peg$currPos++;
  1918. }
  1919. else {
  1920. s13 = peg$FAILED;
  1921. if (peg$silentFails === 0) {
  1922. peg$fail(peg$c6);
  1923. }
  1924. }
  1925. if (s13 !== peg$FAILED) {
  1926. peg$savedPos = s0;
  1927. s1 = peg$c50(s3, s11);
  1928. s0 = s1;
  1929. }
  1930. else {
  1931. peg$currPos = s0;
  1932. s0 = peg$FAILED;
  1933. }
  1934. }
  1935. else {
  1936. peg$currPos = s0;
  1937. s0 = peg$FAILED;
  1938. }
  1939. }
  1940. else {
  1941. peg$currPos = s0;
  1942. s0 = peg$FAILED;
  1943. }
  1944. }
  1945. else {
  1946. peg$currPos = s0;
  1947. s0 = peg$FAILED;
  1948. }
  1949. }
  1950. else {
  1951. peg$currPos = s0;
  1952. s0 = peg$FAILED;
  1953. }
  1954. }
  1955. else {
  1956. peg$currPos = s0;
  1957. s0 = peg$FAILED;
  1958. }
  1959. }
  1960. else {
  1961. peg$currPos = s0;
  1962. s0 = peg$FAILED;
  1963. }
  1964. }
  1965. else {
  1966. peg$currPos = s0;
  1967. s0 = peg$FAILED;
  1968. }
  1969. }
  1970. else {
  1971. peg$currPos = s0;
  1972. s0 = peg$FAILED;
  1973. }
  1974. }
  1975. else {
  1976. peg$currPos = s0;
  1977. s0 = peg$FAILED;
  1978. }
  1979. }
  1980. else {
  1981. peg$currPos = s0;
  1982. s0 = peg$FAILED;
  1983. }
  1984. }
  1985. else {
  1986. peg$currPos = s0;
  1987. s0 = peg$FAILED;
  1988. }
  1989. }
  1990. else {
  1991. peg$currPos = s0;
  1992. s0 = peg$FAILED;
  1993. }
  1994. return s0;
  1995. }
  1996. function peg$parsepluralRuleSelectValue() {
  1997. var s0, s1, s2, s3;
  1998. s0 = peg$currPos;
  1999. s1 = peg$currPos;
  2000. if (input.charCodeAt(peg$currPos) === 61) {
  2001. s2 = peg$c51;
  2002. peg$currPos++;
  2003. }
  2004. else {
  2005. s2 = peg$FAILED;
  2006. if (peg$silentFails === 0) {
  2007. peg$fail(peg$c52);
  2008. }
  2009. }
  2010. if (s2 !== peg$FAILED) {
  2011. s3 = peg$parsenumber();
  2012. if (s3 !== peg$FAILED) {
  2013. s2 = [s2, s3];
  2014. s1 = s2;
  2015. }
  2016. else {
  2017. peg$currPos = s1;
  2018. s1 = peg$FAILED;
  2019. }
  2020. }
  2021. else {
  2022. peg$currPos = s1;
  2023. s1 = peg$FAILED;
  2024. }
  2025. if (s1 !== peg$FAILED) {
  2026. s0 = input.substring(s0, peg$currPos);
  2027. }
  2028. else {
  2029. s0 = s1;
  2030. }
  2031. if (s0 === peg$FAILED) {
  2032. s0 = peg$parseargName();
  2033. }
  2034. return s0;
  2035. }
  2036. function peg$parseselectOption() {
  2037. var s0, s1, s2, s3, s4, s5, s6;
  2038. s0 = peg$currPos;
  2039. s1 = peg$parse_();
  2040. if (s1 !== peg$FAILED) {
  2041. s2 = peg$parseargName();
  2042. if (s2 !== peg$FAILED) {
  2043. s3 = peg$parse_();
  2044. if (s3 !== peg$FAILED) {
  2045. if (input.charCodeAt(peg$currPos) === 123) {
  2046. s4 = peg$c3;
  2047. peg$currPos++;
  2048. }
  2049. else {
  2050. s4 = peg$FAILED;
  2051. if (peg$silentFails === 0) {
  2052. peg$fail(peg$c4);
  2053. }
  2054. }
  2055. if (s4 !== peg$FAILED) {
  2056. s5 = peg$parsemessage();
  2057. if (s5 !== peg$FAILED) {
  2058. if (input.charCodeAt(peg$currPos) === 125) {
  2059. s6 = peg$c5;
  2060. peg$currPos++;
  2061. }
  2062. else {
  2063. s6 = peg$FAILED;
  2064. if (peg$silentFails === 0) {
  2065. peg$fail(peg$c6);
  2066. }
  2067. }
  2068. if (s6 !== peg$FAILED) {
  2069. peg$savedPos = s0;
  2070. s1 = peg$c53(s2, s5);
  2071. s0 = s1;
  2072. }
  2073. else {
  2074. peg$currPos = s0;
  2075. s0 = peg$FAILED;
  2076. }
  2077. }
  2078. else {
  2079. peg$currPos = s0;
  2080. s0 = peg$FAILED;
  2081. }
  2082. }
  2083. else {
  2084. peg$currPos = s0;
  2085. s0 = peg$FAILED;
  2086. }
  2087. }
  2088. else {
  2089. peg$currPos = s0;
  2090. s0 = peg$FAILED;
  2091. }
  2092. }
  2093. else {
  2094. peg$currPos = s0;
  2095. s0 = peg$FAILED;
  2096. }
  2097. }
  2098. else {
  2099. peg$currPos = s0;
  2100. s0 = peg$FAILED;
  2101. }
  2102. return s0;
  2103. }
  2104. function peg$parsepluralOption() {
  2105. var s0, s1, s2, s3, s4, s5, s6;
  2106. s0 = peg$currPos;
  2107. s1 = peg$parse_();
  2108. if (s1 !== peg$FAILED) {
  2109. s2 = peg$parsepluralRuleSelectValue();
  2110. if (s2 !== peg$FAILED) {
  2111. s3 = peg$parse_();
  2112. if (s3 !== peg$FAILED) {
  2113. if (input.charCodeAt(peg$currPos) === 123) {
  2114. s4 = peg$c3;
  2115. peg$currPos++;
  2116. }
  2117. else {
  2118. s4 = peg$FAILED;
  2119. if (peg$silentFails === 0) {
  2120. peg$fail(peg$c4);
  2121. }
  2122. }
  2123. if (s4 !== peg$FAILED) {
  2124. s5 = peg$parsemessage();
  2125. if (s5 !== peg$FAILED) {
  2126. if (input.charCodeAt(peg$currPos) === 125) {
  2127. s6 = peg$c5;
  2128. peg$currPos++;
  2129. }
  2130. else {
  2131. s6 = peg$FAILED;
  2132. if (peg$silentFails === 0) {
  2133. peg$fail(peg$c6);
  2134. }
  2135. }
  2136. if (s6 !== peg$FAILED) {
  2137. peg$savedPos = s0;
  2138. s1 = peg$c54(s2, s5);
  2139. s0 = s1;
  2140. }
  2141. else {
  2142. peg$currPos = s0;
  2143. s0 = peg$FAILED;
  2144. }
  2145. }
  2146. else {
  2147. peg$currPos = s0;
  2148. s0 = peg$FAILED;
  2149. }
  2150. }
  2151. else {
  2152. peg$currPos = s0;
  2153. s0 = peg$FAILED;
  2154. }
  2155. }
  2156. else {
  2157. peg$currPos = s0;
  2158. s0 = peg$FAILED;
  2159. }
  2160. }
  2161. else {
  2162. peg$currPos = s0;
  2163. s0 = peg$FAILED;
  2164. }
  2165. }
  2166. else {
  2167. peg$currPos = s0;
  2168. s0 = peg$FAILED;
  2169. }
  2170. return s0;
  2171. }
  2172. function peg$parsepatternWhiteSpace() {
  2173. var s0;
  2174. peg$silentFails++;
  2175. if (peg$c56.test(input.charAt(peg$currPos))) {
  2176. s0 = input.charAt(peg$currPos);
  2177. peg$currPos++;
  2178. }
  2179. else {
  2180. s0 = peg$FAILED;
  2181. if (peg$silentFails === 0) {
  2182. peg$fail(peg$c57);
  2183. }
  2184. }
  2185. peg$silentFails--;
  2186. if (s0 === peg$FAILED) {
  2187. if (peg$silentFails === 0) {
  2188. peg$fail(peg$c55);
  2189. }
  2190. }
  2191. return s0;
  2192. }
  2193. function peg$parsepatternSyntax() {
  2194. var s0;
  2195. peg$silentFails++;
  2196. if (peg$c59.test(input.charAt(peg$currPos))) {
  2197. s0 = input.charAt(peg$currPos);
  2198. peg$currPos++;
  2199. }
  2200. else {
  2201. s0 = peg$FAILED;
  2202. if (peg$silentFails === 0) {
  2203. peg$fail(peg$c60);
  2204. }
  2205. }
  2206. peg$silentFails--;
  2207. if (s0 === peg$FAILED) {
  2208. if (peg$silentFails === 0) {
  2209. peg$fail(peg$c58);
  2210. }
  2211. }
  2212. return s0;
  2213. }
  2214. function peg$parse_() {
  2215. var s0, s1, s2;
  2216. peg$silentFails++;
  2217. s0 = peg$currPos;
  2218. s1 = [];
  2219. s2 = peg$parsepatternWhiteSpace();
  2220. while (s2 !== peg$FAILED) {
  2221. s1.push(s2);
  2222. s2 = peg$parsepatternWhiteSpace();
  2223. }
  2224. if (s1 !== peg$FAILED) {
  2225. s0 = input.substring(s0, peg$currPos);
  2226. }
  2227. else {
  2228. s0 = s1;
  2229. }
  2230. peg$silentFails--;
  2231. if (s0 === peg$FAILED) {
  2232. s1 = peg$FAILED;
  2233. if (peg$silentFails === 0) {
  2234. peg$fail(peg$c61);
  2235. }
  2236. }
  2237. return s0;
  2238. }
  2239. function peg$parsenumber() {
  2240. var s0, s1, s2;
  2241. peg$silentFails++;
  2242. s0 = peg$currPos;
  2243. if (input.charCodeAt(peg$currPos) === 45) {
  2244. s1 = peg$c63;
  2245. peg$currPos++;
  2246. }
  2247. else {
  2248. s1 = peg$FAILED;
  2249. if (peg$silentFails === 0) {
  2250. peg$fail(peg$c64);
  2251. }
  2252. }
  2253. if (s1 === peg$FAILED) {
  2254. s1 = null;
  2255. }
  2256. if (s1 !== peg$FAILED) {
  2257. s2 = peg$parseargNumber();
  2258. if (s2 !== peg$FAILED) {
  2259. peg$savedPos = s0;
  2260. s1 = peg$c65(s1, s2);
  2261. s0 = s1;
  2262. }
  2263. else {
  2264. peg$currPos = s0;
  2265. s0 = peg$FAILED;
  2266. }
  2267. }
  2268. else {
  2269. peg$currPos = s0;
  2270. s0 = peg$FAILED;
  2271. }
  2272. peg$silentFails--;
  2273. if (s0 === peg$FAILED) {
  2274. s1 = peg$FAILED;
  2275. if (peg$silentFails === 0) {
  2276. peg$fail(peg$c62);
  2277. }
  2278. }
  2279. return s0;
  2280. }
  2281. function peg$parsedoubleApostrophes() {
  2282. var s0, s1;
  2283. peg$silentFails++;
  2284. s0 = peg$currPos;
  2285. if (input.substr(peg$currPos, 2) === peg$c68) {
  2286. s1 = peg$c68;
  2287. peg$currPos += 2;
  2288. }
  2289. else {
  2290. s1 = peg$FAILED;
  2291. if (peg$silentFails === 0) {
  2292. peg$fail(peg$c69);
  2293. }
  2294. }
  2295. if (s1 !== peg$FAILED) {
  2296. peg$savedPos = s0;
  2297. s1 = peg$c70();
  2298. }
  2299. s0 = s1;
  2300. peg$silentFails--;
  2301. if (s0 === peg$FAILED) {
  2302. s1 = peg$FAILED;
  2303. if (peg$silentFails === 0) {
  2304. peg$fail(peg$c67);
  2305. }
  2306. }
  2307. return s0;
  2308. }
  2309. function peg$parsequotedString() {
  2310. var s0, s1, s2, s3, s4, s5;
  2311. s0 = peg$currPos;
  2312. if (input.charCodeAt(peg$currPos) === 39) {
  2313. s1 = peg$c28;
  2314. peg$currPos++;
  2315. }
  2316. else {
  2317. s1 = peg$FAILED;
  2318. if (peg$silentFails === 0) {
  2319. peg$fail(peg$c29);
  2320. }
  2321. }
  2322. if (s1 !== peg$FAILED) {
  2323. if (peg$c71.test(input.charAt(peg$currPos))) {
  2324. s2 = input.charAt(peg$currPos);
  2325. peg$currPos++;
  2326. }
  2327. else {
  2328. s2 = peg$FAILED;
  2329. if (peg$silentFails === 0) {
  2330. peg$fail(peg$c72);
  2331. }
  2332. }
  2333. if (s2 !== peg$FAILED) {
  2334. s3 = peg$currPos;
  2335. s4 = [];
  2336. if (input.substr(peg$currPos, 2) === peg$c68) {
  2337. s5 = peg$c68;
  2338. peg$currPos += 2;
  2339. }
  2340. else {
  2341. s5 = peg$FAILED;
  2342. if (peg$silentFails === 0) {
  2343. peg$fail(peg$c69);
  2344. }
  2345. }
  2346. if (s5 === peg$FAILED) {
  2347. if (peg$c30.test(input.charAt(peg$currPos))) {
  2348. s5 = input.charAt(peg$currPos);
  2349. peg$currPos++;
  2350. }
  2351. else {
  2352. s5 = peg$FAILED;
  2353. if (peg$silentFails === 0) {
  2354. peg$fail(peg$c31);
  2355. }
  2356. }
  2357. }
  2358. while (s5 !== peg$FAILED) {
  2359. s4.push(s5);
  2360. if (input.substr(peg$currPos, 2) === peg$c68) {
  2361. s5 = peg$c68;
  2362. peg$currPos += 2;
  2363. }
  2364. else {
  2365. s5 = peg$FAILED;
  2366. if (peg$silentFails === 0) {
  2367. peg$fail(peg$c69);
  2368. }
  2369. }
  2370. if (s5 === peg$FAILED) {
  2371. if (peg$c30.test(input.charAt(peg$currPos))) {
  2372. s5 = input.charAt(peg$currPos);
  2373. peg$currPos++;
  2374. }
  2375. else {
  2376. s5 = peg$FAILED;
  2377. if (peg$silentFails === 0) {
  2378. peg$fail(peg$c31);
  2379. }
  2380. }
  2381. }
  2382. }
  2383. if (s4 !== peg$FAILED) {
  2384. s3 = input.substring(s3, peg$currPos);
  2385. }
  2386. else {
  2387. s3 = s4;
  2388. }
  2389. if (s3 !== peg$FAILED) {
  2390. if (input.charCodeAt(peg$currPos) === 39) {
  2391. s4 = peg$c28;
  2392. peg$currPos++;
  2393. }
  2394. else {
  2395. s4 = peg$FAILED;
  2396. if (peg$silentFails === 0) {
  2397. peg$fail(peg$c29);
  2398. }
  2399. }
  2400. if (s4 !== peg$FAILED) {
  2401. peg$savedPos = s0;
  2402. s1 = peg$c73(s2, s3);
  2403. s0 = s1;
  2404. }
  2405. else {
  2406. peg$currPos = s0;
  2407. s0 = peg$FAILED;
  2408. }
  2409. }
  2410. else {
  2411. peg$currPos = s0;
  2412. s0 = peg$FAILED;
  2413. }
  2414. }
  2415. else {
  2416. peg$currPos = s0;
  2417. s0 = peg$FAILED;
  2418. }
  2419. }
  2420. else {
  2421. peg$currPos = s0;
  2422. s0 = peg$FAILED;
  2423. }
  2424. return s0;
  2425. }
  2426. function peg$parseunquotedString() {
  2427. var s0, s1;
  2428. s0 = peg$currPos;
  2429. if (peg$c74.test(input.charAt(peg$currPos))) {
  2430. s1 = input.charAt(peg$currPos);
  2431. peg$currPos++;
  2432. }
  2433. else {
  2434. s1 = peg$FAILED;
  2435. if (peg$silentFails === 0) {
  2436. peg$fail(peg$c75);
  2437. }
  2438. }
  2439. if (s1 !== peg$FAILED) {
  2440. s0 = input.substring(s0, peg$currPos);
  2441. }
  2442. else {
  2443. s0 = s1;
  2444. }
  2445. return s0;
  2446. }
  2447. function peg$parseargNameOrNumber() {
  2448. var s0, s1;
  2449. peg$silentFails++;
  2450. s0 = peg$currPos;
  2451. s1 = peg$parseargNumber();
  2452. if (s1 === peg$FAILED) {
  2453. s1 = peg$parseargName();
  2454. }
  2455. if (s1 !== peg$FAILED) {
  2456. s0 = input.substring(s0, peg$currPos);
  2457. }
  2458. else {
  2459. s0 = s1;
  2460. }
  2461. peg$silentFails--;
  2462. if (s0 === peg$FAILED) {
  2463. s1 = peg$FAILED;
  2464. if (peg$silentFails === 0) {
  2465. peg$fail(peg$c76);
  2466. }
  2467. }
  2468. return s0;
  2469. }
  2470. function peg$parseargNumber() {
  2471. var s0, s1, s2, s3, s4;
  2472. peg$silentFails++;
  2473. s0 = peg$currPos;
  2474. if (input.charCodeAt(peg$currPos) === 48) {
  2475. s1 = peg$c78;
  2476. peg$currPos++;
  2477. }
  2478. else {
  2479. s1 = peg$FAILED;
  2480. if (peg$silentFails === 0) {
  2481. peg$fail(peg$c79);
  2482. }
  2483. }
  2484. if (s1 !== peg$FAILED) {
  2485. peg$savedPos = s0;
  2486. s1 = peg$c80();
  2487. }
  2488. s0 = s1;
  2489. if (s0 === peg$FAILED) {
  2490. s0 = peg$currPos;
  2491. s1 = peg$currPos;
  2492. if (peg$c81.test(input.charAt(peg$currPos))) {
  2493. s2 = input.charAt(peg$currPos);
  2494. peg$currPos++;
  2495. }
  2496. else {
  2497. s2 = peg$FAILED;
  2498. if (peg$silentFails === 0) {
  2499. peg$fail(peg$c82);
  2500. }
  2501. }
  2502. if (s2 !== peg$FAILED) {
  2503. s3 = [];
  2504. if (peg$c83.test(input.charAt(peg$currPos))) {
  2505. s4 = input.charAt(peg$currPos);
  2506. peg$currPos++;
  2507. }
  2508. else {
  2509. s4 = peg$FAILED;
  2510. if (peg$silentFails === 0) {
  2511. peg$fail(peg$c84);
  2512. }
  2513. }
  2514. while (s4 !== peg$FAILED) {
  2515. s3.push(s4);
  2516. if (peg$c83.test(input.charAt(peg$currPos))) {
  2517. s4 = input.charAt(peg$currPos);
  2518. peg$currPos++;
  2519. }
  2520. else {
  2521. s4 = peg$FAILED;
  2522. if (peg$silentFails === 0) {
  2523. peg$fail(peg$c84);
  2524. }
  2525. }
  2526. }
  2527. if (s3 !== peg$FAILED) {
  2528. s2 = [s2, s3];
  2529. s1 = s2;
  2530. }
  2531. else {
  2532. peg$currPos = s1;
  2533. s1 = peg$FAILED;
  2534. }
  2535. }
  2536. else {
  2537. peg$currPos = s1;
  2538. s1 = peg$FAILED;
  2539. }
  2540. if (s1 !== peg$FAILED) {
  2541. peg$savedPos = s0;
  2542. s1 = peg$c85(s1);
  2543. }
  2544. s0 = s1;
  2545. }
  2546. peg$silentFails--;
  2547. if (s0 === peg$FAILED) {
  2548. s1 = peg$FAILED;
  2549. if (peg$silentFails === 0) {
  2550. peg$fail(peg$c77);
  2551. }
  2552. }
  2553. return s0;
  2554. }
  2555. function peg$parseargName() {
  2556. var s0, s1, s2, s3, s4;
  2557. peg$silentFails++;
  2558. s0 = peg$currPos;
  2559. s1 = [];
  2560. s2 = peg$currPos;
  2561. s3 = peg$currPos;
  2562. peg$silentFails++;
  2563. s4 = peg$parsepatternWhiteSpace();
  2564. if (s4 === peg$FAILED) {
  2565. s4 = peg$parsepatternSyntax();
  2566. }
  2567. peg$silentFails--;
  2568. if (s4 === peg$FAILED) {
  2569. s3 = undefined;
  2570. }
  2571. else {
  2572. peg$currPos = s3;
  2573. s3 = peg$FAILED;
  2574. }
  2575. if (s3 !== peg$FAILED) {
  2576. if (input.length > peg$currPos) {
  2577. s4 = input.charAt(peg$currPos);
  2578. peg$currPos++;
  2579. }
  2580. else {
  2581. s4 = peg$FAILED;
  2582. if (peg$silentFails === 0) {
  2583. peg$fail(peg$c11);
  2584. }
  2585. }
  2586. if (s4 !== peg$FAILED) {
  2587. s3 = [s3, s4];
  2588. s2 = s3;
  2589. }
  2590. else {
  2591. peg$currPos = s2;
  2592. s2 = peg$FAILED;
  2593. }
  2594. }
  2595. else {
  2596. peg$currPos = s2;
  2597. s2 = peg$FAILED;
  2598. }
  2599. if (s2 !== peg$FAILED) {
  2600. while (s2 !== peg$FAILED) {
  2601. s1.push(s2);
  2602. s2 = peg$currPos;
  2603. s3 = peg$currPos;
  2604. peg$silentFails++;
  2605. s4 = peg$parsepatternWhiteSpace();
  2606. if (s4 === peg$FAILED) {
  2607. s4 = peg$parsepatternSyntax();
  2608. }
  2609. peg$silentFails--;
  2610. if (s4 === peg$FAILED) {
  2611. s3 = undefined;
  2612. }
  2613. else {
  2614. peg$currPos = s3;
  2615. s3 = peg$FAILED;
  2616. }
  2617. if (s3 !== peg$FAILED) {
  2618. if (input.length > peg$currPos) {
  2619. s4 = input.charAt(peg$currPos);
  2620. peg$currPos++;
  2621. }
  2622. else {
  2623. s4 = peg$FAILED;
  2624. if (peg$silentFails === 0) {
  2625. peg$fail(peg$c11);
  2626. }
  2627. }
  2628. if (s4 !== peg$FAILED) {
  2629. s3 = [s3, s4];
  2630. s2 = s3;
  2631. }
  2632. else {
  2633. peg$currPos = s2;
  2634. s2 = peg$FAILED;
  2635. }
  2636. }
  2637. else {
  2638. peg$currPos = s2;
  2639. s2 = peg$FAILED;
  2640. }
  2641. }
  2642. }
  2643. else {
  2644. s1 = peg$FAILED;
  2645. }
  2646. if (s1 !== peg$FAILED) {
  2647. s0 = input.substring(s0, peg$currPos);
  2648. }
  2649. else {
  2650. s0 = s1;
  2651. }
  2652. peg$silentFails--;
  2653. if (s0 === peg$FAILED) {
  2654. s1 = peg$FAILED;
  2655. if (peg$silentFails === 0) {
  2656. peg$fail(peg$c86);
  2657. }
  2658. }
  2659. return s0;
  2660. }
  2661. function insertLocation() {
  2662. return options && options.captureLocation ? {
  2663. location: location()
  2664. } : {};
  2665. }
  2666. peg$result = peg$startRuleFunction();
  2667. if (peg$result !== peg$FAILED && peg$currPos === input.length) {
  2668. return peg$result;
  2669. }
  2670. else {
  2671. if (peg$result !== peg$FAILED && peg$currPos < input.length) {
  2672. peg$fail(peg$endExpectation());
  2673. }
  2674. throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length
  2675. ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
  2676. : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
  2677. }
  2678. }
  2679. exports.pegParse = peg$parse;
  2680. });
  2681. styleInject_es.unwrapExports(parser);
  2682. var parser_1 = parser.SyntaxError;
  2683. var parser_2 = parser.pegParse;
  2684. var normalize = styleInject_es.createCommonjsModule(function (module, exports) {
  2685. var __spreadArrays = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__spreadArrays) || function () {
  2686. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  2687. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  2688. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  2689. r[k] = a[j];
  2690. return r;
  2691. };
  2692. Object.defineProperty(exports, "__esModule", { value: true });
  2693. var PLURAL_HASHTAG_REGEX = /(^|[^\\])#/g;
  2694. /**
  2695. * Whether to convert `#` in plural rule options
  2696. * to `{var, number}`
  2697. * @param el AST Element
  2698. * @param pluralStack current plural stack
  2699. */
  2700. function normalizeHashtagInPlural(els) {
  2701. els.forEach(function (el) {
  2702. // If we're encountering a plural el
  2703. if (!types.isPluralElement(el) && !types.isSelectElement(el)) {
  2704. return;
  2705. }
  2706. // Go down the options and search for # in any literal element
  2707. Object.keys(el.options).forEach(function (id) {
  2708. var _a;
  2709. var opt = el.options[id];
  2710. // If we got a match, we have to split this
  2711. // and inject a NumberElement in the middle
  2712. var matchingLiteralElIndex = -1;
  2713. var literalEl = undefined;
  2714. for (var i = 0; i < opt.value.length; i++) {
  2715. var el_1 = opt.value[i];
  2716. if (types.isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {
  2717. matchingLiteralElIndex = i;
  2718. literalEl = el_1;
  2719. break;
  2720. }
  2721. }
  2722. if (literalEl) {
  2723. var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, "$1{" + el.value + ", number}");
  2724. var newEls = parser.pegParse(newValue);
  2725. (_a = opt.value).splice.apply(_a, __spreadArrays([matchingLiteralElIndex, 1], newEls));
  2726. }
  2727. normalizeHashtagInPlural(opt.value);
  2728. });
  2729. });
  2730. }
  2731. exports.normalizeHashtagInPlural = normalizeHashtagInPlural;
  2732. });
  2733. styleInject_es.unwrapExports(normalize);
  2734. var normalize_1 = normalize.normalizeHashtagInPlural;
  2735. var skeleton = styleInject_es.createCommonjsModule(function (module, exports) {
  2736. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  2737. __assign = Object.assign || function(t) {
  2738. for (var s, i = 1, n = arguments.length; i < n; i++) {
  2739. s = arguments[i];
  2740. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  2741. t[p] = s[p];
  2742. }
  2743. return t;
  2744. };
  2745. return __assign.apply(this, arguments);
  2746. };
  2747. Object.defineProperty(exports, "__esModule", { value: true });
  2748. /**
  2749. * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
  2750. * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
  2751. * with some tweaks
  2752. */
  2753. var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
  2754. /**
  2755. * Parse Date time skeleton into Intl.DateTimeFormatOptions
  2756. * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
  2757. * @public
  2758. * @param skeleton skeleton string
  2759. */
  2760. function parseDateTimeSkeleton(skeleton) {
  2761. var result = {};
  2762. skeleton.replace(DATE_TIME_REGEX, function (match) {
  2763. var len = match.length;
  2764. switch (match[0]) {
  2765. // Era
  2766. case 'G':
  2767. result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';
  2768. break;
  2769. // Year
  2770. case 'y':
  2771. result.year = len === 2 ? '2-digit' : 'numeric';
  2772. break;
  2773. case 'Y':
  2774. case 'u':
  2775. case 'U':
  2776. case 'r':
  2777. throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');
  2778. // Quarter
  2779. case 'q':
  2780. case 'Q':
  2781. throw new RangeError('`q/Q` (quarter) patterns are not supported');
  2782. // Month
  2783. case 'M':
  2784. case 'L':
  2785. result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];
  2786. break;
  2787. // Week
  2788. case 'w':
  2789. case 'W':
  2790. throw new RangeError('`w/W` (week) patterns are not supported');
  2791. case 'd':
  2792. result.day = ['numeric', '2-digit'][len - 1];
  2793. break;
  2794. case 'D':
  2795. case 'F':
  2796. case 'g':
  2797. throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');
  2798. // Weekday
  2799. case 'E':
  2800. result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';
  2801. break;
  2802. case 'e':
  2803. if (len < 4) {
  2804. throw new RangeError('`e..eee` (weekday) patterns are not supported');
  2805. }
  2806. result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];
  2807. break;
  2808. case 'c':
  2809. if (len < 4) {
  2810. throw new RangeError('`c..ccc` (weekday) patterns are not supported');
  2811. }
  2812. result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];
  2813. break;
  2814. // Period
  2815. case 'a': // AM, PM
  2816. result.hour12 = true;
  2817. break;
  2818. case 'b': // am, pm, noon, midnight
  2819. case 'B': // flexible day periods
  2820. throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');
  2821. // Hour
  2822. case 'h':
  2823. result.hourCycle = 'h12';
  2824. result.hour = ['numeric', '2-digit'][len - 1];
  2825. break;
  2826. case 'H':
  2827. result.hourCycle = 'h23';
  2828. result.hour = ['numeric', '2-digit'][len - 1];
  2829. break;
  2830. case 'K':
  2831. result.hourCycle = 'h11';
  2832. result.hour = ['numeric', '2-digit'][len - 1];
  2833. break;
  2834. case 'k':
  2835. result.hourCycle = 'h24';
  2836. result.hour = ['numeric', '2-digit'][len - 1];
  2837. break;
  2838. case 'j':
  2839. case 'J':
  2840. case 'C':
  2841. throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');
  2842. // Minute
  2843. case 'm':
  2844. result.minute = ['numeric', '2-digit'][len - 1];
  2845. break;
  2846. // Second
  2847. case 's':
  2848. result.second = ['numeric', '2-digit'][len - 1];
  2849. break;
  2850. case 'S':
  2851. case 'A':
  2852. throw new RangeError('`S/A` (second) pattenrs are not supported, use `s` instead');
  2853. // Zone
  2854. case 'z': // 1..3, 4: specific non-location format
  2855. result.timeZoneName = len < 4 ? 'short' : 'long';
  2856. break;
  2857. case 'Z': // 1..3, 4, 5: The ISO8601 varios formats
  2858. case 'O': // 1, 4: miliseconds in day short, long
  2859. case 'v': // 1, 4: generic non-location format
  2860. case 'V': // 1, 2, 3, 4: time zone ID or city
  2861. case 'X': // 1, 2, 3, 4: The ISO8601 varios formats
  2862. case 'x': // 1, 2, 3, 4: The ISO8601 varios formats
  2863. throw new RangeError('`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead');
  2864. }
  2865. return '';
  2866. });
  2867. return result;
  2868. }
  2869. exports.parseDateTimeSkeleton = parseDateTimeSkeleton;
  2870. function icuUnitToEcma(unit) {
  2871. return unit.replace(/^(.*?)-/, '');
  2872. }
  2873. var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\+|#+)?)?$/g;
  2874. var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
  2875. function parseSignificantPrecision(str) {
  2876. var result = {};
  2877. str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
  2878. // @@@ case
  2879. if (typeof g2 !== 'string') {
  2880. result.minimumSignificantDigits = g1.length;
  2881. result.maximumSignificantDigits = g1.length;
  2882. }
  2883. // @@@+ case
  2884. else if (g2 === '+') {
  2885. result.minimumSignificantDigits = g1.length;
  2886. }
  2887. // .### case
  2888. else if (g1[0] === '#') {
  2889. result.maximumSignificantDigits = g1.length;
  2890. }
  2891. // .@@## or .@@@ case
  2892. else {
  2893. result.minimumSignificantDigits = g1.length;
  2894. result.maximumSignificantDigits =
  2895. g1.length + (typeof g2 === 'string' ? g2.length : 0);
  2896. }
  2897. return '';
  2898. });
  2899. return result;
  2900. }
  2901. function parseSign(str) {
  2902. switch (str) {
  2903. case 'sign-auto':
  2904. return {
  2905. signDisplay: 'auto',
  2906. };
  2907. case 'sign-accounting':
  2908. return {
  2909. currencySign: 'accounting',
  2910. };
  2911. case 'sign-always':
  2912. return {
  2913. signDisplay: 'always',
  2914. };
  2915. case 'sign-accounting-always':
  2916. return {
  2917. signDisplay: 'always',
  2918. currencySign: 'accounting',
  2919. };
  2920. case 'sign-except-zero':
  2921. return {
  2922. signDisplay: 'exceptZero',
  2923. };
  2924. case 'sign-accounting-except-zero':
  2925. return {
  2926. signDisplay: 'exceptZero',
  2927. currencySign: 'accounting',
  2928. };
  2929. case 'sign-never':
  2930. return {
  2931. signDisplay: 'never',
  2932. };
  2933. }
  2934. }
  2935. function parseNotationOptions(opt) {
  2936. var result = {};
  2937. var signOpts = parseSign(opt);
  2938. if (signOpts) {
  2939. return signOpts;
  2940. }
  2941. return result;
  2942. }
  2943. /**
  2944. * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
  2945. */
  2946. function convertNumberSkeletonToNumberFormatOptions(tokens) {
  2947. var result = {};
  2948. for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
  2949. var token = tokens_1[_i];
  2950. switch (token.stem) {
  2951. case 'percent':
  2952. result.style = 'percent';
  2953. continue;
  2954. case 'currency':
  2955. result.style = 'currency';
  2956. result.currency = token.options[0];
  2957. continue;
  2958. case 'group-off':
  2959. result.useGrouping = false;
  2960. continue;
  2961. case 'precision-integer':
  2962. result.maximumFractionDigits = 0;
  2963. continue;
  2964. case 'measure-unit':
  2965. result.style = 'unit';
  2966. result.unit = icuUnitToEcma(token.options[0]);
  2967. continue;
  2968. case 'compact-short':
  2969. result.notation = 'compact';
  2970. result.compactDisplay = 'short';
  2971. continue;
  2972. case 'compact-long':
  2973. result.notation = 'compact';
  2974. result.compactDisplay = 'long';
  2975. continue;
  2976. case 'scientific':
  2977. result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));
  2978. continue;
  2979. case 'engineering':
  2980. result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));
  2981. continue;
  2982. case 'notation-simple':
  2983. result.notation = 'standard';
  2984. continue;
  2985. // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
  2986. case 'unit-width-narrow':
  2987. result.currencyDisplay = 'narrowSymbol';
  2988. result.unitDisplay = 'narrow';
  2989. continue;
  2990. case 'unit-width-short':
  2991. result.currencyDisplay = 'code';
  2992. result.unitDisplay = 'short';
  2993. continue;
  2994. case 'unit-width-full-name':
  2995. result.currencyDisplay = 'name';
  2996. result.unitDisplay = 'long';
  2997. continue;
  2998. case 'unit-width-iso-code':
  2999. result.currencyDisplay = 'symbol';
  3000. continue;
  3001. }
  3002. // Precision
  3003. // https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#fraction-precision
  3004. if (FRACTION_PRECISION_REGEX.test(token.stem)) {
  3005. if (token.options.length > 1) {
  3006. throw new RangeError('Fraction-precision stems only accept a single optional option');
  3007. }
  3008. token.stem.replace(FRACTION_PRECISION_REGEX, function (match, g1, g2) {
  3009. // precision-integer case
  3010. if (match === '.') {
  3011. result.maximumFractionDigits = 0;
  3012. }
  3013. // .000+ case
  3014. else if (g2 === '+') {
  3015. result.minimumFractionDigits = g2.length;
  3016. }
  3017. // .### case
  3018. else if (g1[0] === '#') {
  3019. result.maximumFractionDigits = g1.length;
  3020. }
  3021. // .00## or .000 case
  3022. else {
  3023. result.minimumFractionDigits = g1.length;
  3024. result.maximumFractionDigits =
  3025. g1.length + (typeof g2 === 'string' ? g2.length : 0);
  3026. }
  3027. return '';
  3028. });
  3029. if (token.options.length) {
  3030. result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
  3031. }
  3032. continue;
  3033. }
  3034. if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
  3035. result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));
  3036. continue;
  3037. }
  3038. var signOpts = parseSign(token.stem);
  3039. if (signOpts) {
  3040. result = __assign(__assign({}, result), signOpts);
  3041. }
  3042. }
  3043. return result;
  3044. }
  3045. exports.convertNumberSkeletonToNumberFormatOptions = convertNumberSkeletonToNumberFormatOptions;
  3046. });
  3047. styleInject_es.unwrapExports(skeleton);
  3048. var skeleton_1 = skeleton.parseDateTimeSkeleton;
  3049. var skeleton_2 = skeleton.convertNumberSkeletonToNumberFormatOptions;
  3050. var dist$1 = styleInject_es.createCommonjsModule(function (module, exports) {
  3051. function __export(m) {
  3052. for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  3053. }
  3054. Object.defineProperty(exports, "__esModule", { value: true });
  3055. __export(types);
  3056. __export(parser);
  3057. __export(skeleton);
  3058. function parse(input, opts) {
  3059. var els = parser.pegParse(input, opts);
  3060. if (!opts || opts.normalizeHashtagInPlural !== false) {
  3061. normalize.normalizeHashtagInPlural(els);
  3062. }
  3063. return els;
  3064. }
  3065. exports.parse = parse;
  3066. });
  3067. styleInject_es.unwrapExports(dist$1);
  3068. var dist_1$1 = dist$1.parse;
  3069. var dist$2 = styleInject_es.createCommonjsModule(function (module, exports) {
  3070. /*
  3071. Copyright (c) 2014, Yahoo! Inc. All rights reserved.
  3072. Copyrights licensed under the New BSD License.
  3073. See the accompanying LICENSE file for terms.
  3074. */
  3075. var __spreadArrays = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__spreadArrays) || function () {
  3076. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  3077. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  3078. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  3079. r[k] = a[j];
  3080. return r;
  3081. };
  3082. Object.defineProperty(exports, "__esModule", { value: true });
  3083. // -- Utilities ----------------------------------------------------------------
  3084. function getCacheId(inputs) {
  3085. return JSON.stringify(inputs.map(function (input) {
  3086. return input && typeof input === 'object' ? orderedProps(input) : input;
  3087. }));
  3088. }
  3089. function orderedProps(obj) {
  3090. return Object.keys(obj)
  3091. .sort()
  3092. .map(function (k) {
  3093. var _a;
  3094. return (_a = {}, _a[k] = obj[k], _a);
  3095. });
  3096. }
  3097. var memoizeFormatConstructor = function (FormatConstructor, cache) {
  3098. if (cache === void 0) { cache = {}; }
  3099. return function () {
  3100. var _a;
  3101. var args = [];
  3102. for (var _i = 0; _i < arguments.length; _i++) {
  3103. args[_i] = arguments[_i];
  3104. }
  3105. var cacheId = getCacheId(args);
  3106. var format = cacheId && cache[cacheId];
  3107. if (!format) {
  3108. format = new ((_a = FormatConstructor).bind.apply(_a, __spreadArrays([void 0], args)))();
  3109. if (cacheId) {
  3110. cache[cacheId] = format;
  3111. }
  3112. }
  3113. return format;
  3114. };
  3115. };
  3116. exports.default = memoizeFormatConstructor;
  3117. });
  3118. styleInject_es.unwrapExports(dist$2);
  3119. var formatters = styleInject_es.createCommonjsModule(function (module, exports) {
  3120. var __extends = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__extends) || (function () {
  3121. var extendStatics = function (d, b) {
  3122. extendStatics = Object.setPrototypeOf ||
  3123. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  3124. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  3125. return extendStatics(d, b);
  3126. };
  3127. return function (d, b) {
  3128. extendStatics(d, b);
  3129. function __() { this.constructor = d; }
  3130. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  3131. };
  3132. })();
  3133. var __spreadArrays = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__spreadArrays) || function () {
  3134. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  3135. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  3136. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  3137. r[k] = a[j];
  3138. return r;
  3139. };
  3140. Object.defineProperty(exports, "__esModule", { value: true });
  3141. var ESCAPE_HASH_REGEX = /\\#/g;
  3142. var PLURAL_HASH = /(^|[^\\])#/g;
  3143. var FormatError = /** @class */ (function (_super) {
  3144. __extends(FormatError, _super);
  3145. function FormatError(msg, variableId) {
  3146. var _this = _super.call(this, msg) || this;
  3147. _this.variableId = variableId;
  3148. return _this;
  3149. }
  3150. return FormatError;
  3151. }(Error));
  3152. function mergeLiteral(parts) {
  3153. if (parts.length < 2) {
  3154. return parts;
  3155. }
  3156. return parts.reduce(function (all, part) {
  3157. var lastPart = all[all.length - 1];
  3158. if (!lastPart ||
  3159. lastPart.type !== 0 /* literal */ ||
  3160. part.type !== 0 /* literal */) {
  3161. all.push(part);
  3162. }
  3163. else {
  3164. lastPart.value += part.value;
  3165. }
  3166. return all;
  3167. }, []);
  3168. }
  3169. // TODO(skeleton): add skeleton support
  3170. function formatToParts(els, locales, formatters, formats, values, currentPluralValue,
  3171. // For debugging
  3172. originalMessage) {
  3173. // Hot path for straight simple msg translations
  3174. if (els.length === 1 && dist$1.isLiteralElement(els[0])) {
  3175. var value = els[0].value;
  3176. if (typeof currentPluralValue === 'number') {
  3177. value = value.replace(PLURAL_HASH, '$1' + formatters.getNumberFormat(locales).format(currentPluralValue));
  3178. }
  3179. return [
  3180. {
  3181. type: 0 /* literal */,
  3182. value: value.replace(ESCAPE_HASH_REGEX, '#'),
  3183. },
  3184. ];
  3185. }
  3186. var result = [];
  3187. for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
  3188. var el = els_1[_i];
  3189. // Exit early for string parts.
  3190. if (dist$1.isLiteralElement(el)) {
  3191. var value_1 = el.value;
  3192. if (typeof currentPluralValue === 'number') {
  3193. value_1 = value_1.replace(PLURAL_HASH, '$1' + formatters.getNumberFormat(locales).format(currentPluralValue));
  3194. }
  3195. result.push({
  3196. type: 0 /* literal */,
  3197. value: value_1.replace(ESCAPE_HASH_REGEX, '#'),
  3198. });
  3199. continue;
  3200. }
  3201. var varName = el.value;
  3202. // Enforce that all required values are provided by the caller.
  3203. if (!(values && varName in values)) {
  3204. throw new FormatError("The intl string context variable \"" + varName + "\" was not provided to the string \"" + originalMessage + "\"");
  3205. }
  3206. var value = values[varName];
  3207. if (dist$1.isArgumentElement(el)) {
  3208. if (!value || typeof value === 'string' || typeof value === 'number') {
  3209. value =
  3210. typeof value === 'string' || typeof value === 'number'
  3211. ? String(value)
  3212. : '';
  3213. }
  3214. result.push({
  3215. type: 1 /* argument */,
  3216. value: value,
  3217. });
  3218. continue;
  3219. }
  3220. // Recursively format plural and select parts' option — which can be a
  3221. // nested pattern structure. The choosing of the option to use is
  3222. // abstracted-by and delegated-to the part helper object.
  3223. if (dist$1.isDateElement(el)) {
  3224. var style = typeof el.style === 'string' ? formats.date[el.style] : undefined;
  3225. result.push({
  3226. type: 0 /* literal */,
  3227. value: formatters
  3228. .getDateTimeFormat(locales, style)
  3229. .format(value),
  3230. });
  3231. continue;
  3232. }
  3233. if (dist$1.isTimeElement(el)) {
  3234. var style = typeof el.style === 'string'
  3235. ? formats.time[el.style]
  3236. : dist$1.isDateTimeSkeleton(el.style)
  3237. ? dist$1.parseDateTimeSkeleton(el.style.pattern)
  3238. : undefined;
  3239. result.push({
  3240. type: 0 /* literal */,
  3241. value: formatters
  3242. .getDateTimeFormat(locales, style)
  3243. .format(value),
  3244. });
  3245. continue;
  3246. }
  3247. if (dist$1.isNumberElement(el)) {
  3248. var style = typeof el.style === 'string'
  3249. ? formats.number[el.style]
  3250. : dist$1.isNumberSkeleton(el.style)
  3251. ? dist$1.convertNumberSkeletonToNumberFormatOptions(el.style.tokens)
  3252. : undefined;
  3253. result.push({
  3254. type: 0 /* literal */,
  3255. value: formatters
  3256. .getNumberFormat(locales, style)
  3257. .format(value),
  3258. });
  3259. continue;
  3260. }
  3261. if (dist$1.isSelectElement(el)) {
  3262. var opt = el.options[value] || el.options.other;
  3263. if (!opt) {
  3264. throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\"");
  3265. }
  3266. result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
  3267. continue;
  3268. }
  3269. if (dist$1.isPluralElement(el)) {
  3270. var opt = el.options["=" + value];
  3271. if (!opt) {
  3272. if (!Intl.PluralRules) {
  3273. throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n");
  3274. }
  3275. var rule = formatters
  3276. .getPluralRules(locales, { type: el.pluralType })
  3277. .select(value - (el.offset || 0));
  3278. opt = el.options[rule] || el.options.other;
  3279. }
  3280. if (!opt) {
  3281. throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\"");
  3282. }
  3283. result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));
  3284. continue;
  3285. }
  3286. }
  3287. return mergeLiteral(result);
  3288. }
  3289. exports.formatToParts = formatToParts;
  3290. function formatToString(els, locales, formatters, formats, values,
  3291. // For debugging
  3292. originalMessage) {
  3293. var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);
  3294. // Hot path for straight simple msg translations
  3295. if (parts.length === 1) {
  3296. return parts[0].value;
  3297. }
  3298. return parts.reduce(function (all, part) { return (all += part.value); }, '');
  3299. }
  3300. exports.formatToString = formatToString;
  3301. // Singleton
  3302. var domParser;
  3303. var TOKEN_DELIMITER = '@@';
  3304. var TOKEN_REGEX = /@@(\d+_\d+)@@/g;
  3305. var counter = 0;
  3306. function generateId() {
  3307. return Date.now() + "_" + ++counter;
  3308. }
  3309. function restoreRichPlaceholderMessage(text, objectParts) {
  3310. return text
  3311. .split(TOKEN_REGEX)
  3312. .filter(Boolean)
  3313. .map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); })
  3314. .reduce(function (all, c) {
  3315. if (!all.length) {
  3316. all.push(c);
  3317. }
  3318. else if (typeof c === 'string' &&
  3319. typeof all[all.length - 1] === 'string') {
  3320. all[all.length - 1] += c;
  3321. }
  3322. else {
  3323. all.push(c);
  3324. }
  3325. return all;
  3326. }, []);
  3327. }
  3328. /**
  3329. * Not exhaustive, just for sanity check
  3330. */
  3331. var SIMPLE_XML_REGEX = /(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/;
  3332. var TEMPLATE_ID = Date.now() + '@@';
  3333. var VOID_ELEMENTS = [
  3334. 'area',
  3335. 'base',
  3336. 'br',
  3337. 'col',
  3338. 'embed',
  3339. 'hr',
  3340. 'img',
  3341. 'input',
  3342. 'link',
  3343. 'meta',
  3344. 'param',
  3345. 'source',
  3346. 'track',
  3347. 'wbr',
  3348. ];
  3349. function formatHTMLElement(el, objectParts, values) {
  3350. var tagName = el.tagName;
  3351. var outerHTML = el.outerHTML, textContent = el.textContent, childNodes = el.childNodes;
  3352. // Regular text
  3353. if (!tagName) {
  3354. return restoreRichPlaceholderMessage(textContent || '', objectParts);
  3355. }
  3356. tagName = tagName.toLowerCase();
  3357. var isVoidElement = ~VOID_ELEMENTS.indexOf(tagName);
  3358. var formatFnOrValue = values[tagName];
  3359. if (formatFnOrValue && isVoidElement) {
  3360. throw new FormatError(tagName + " is a self-closing tag and can not be used, please use another tag name.");
  3361. }
  3362. if (!childNodes.length) {
  3363. return [outerHTML];
  3364. }
  3365. var chunks = Array.prototype.slice.call(childNodes).reduce(function (all, child) {
  3366. return all.concat(formatHTMLElement(child, objectParts, values));
  3367. }, []);
  3368. // Legacy HTML
  3369. if (!formatFnOrValue) {
  3370. return __spreadArrays(["<" + tagName + ">"], chunks, ["</" + tagName + ">"]);
  3371. }
  3372. // HTML Tag replacement
  3373. if (typeof formatFnOrValue === 'function') {
  3374. return [formatFnOrValue.apply(void 0, chunks)];
  3375. }
  3376. return [formatFnOrValue];
  3377. }
  3378. function formatHTMLMessage(els, locales, formatters, formats, values,
  3379. // For debugging
  3380. originalMessage) {
  3381. var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);
  3382. var objectParts = {};
  3383. var formattedMessage = parts.reduce(function (all, part) {
  3384. if (part.type === 0 /* literal */) {
  3385. return (all += part.value);
  3386. }
  3387. var id = generateId();
  3388. objectParts[id] = part.value;
  3389. return (all += "" + TOKEN_DELIMITER + id + TOKEN_DELIMITER);
  3390. }, '');
  3391. // Not designed to filter out aggressively
  3392. if (!SIMPLE_XML_REGEX.test(formattedMessage)) {
  3393. return restoreRichPlaceholderMessage(formattedMessage, objectParts);
  3394. }
  3395. if (!values) {
  3396. throw new FormatError('Message has placeholders but no values was given');
  3397. }
  3398. if (typeof DOMParser === 'undefined') {
  3399. throw new FormatError('Cannot format XML message without DOMParser');
  3400. }
  3401. if (!domParser) {
  3402. domParser = new DOMParser();
  3403. }
  3404. var content = domParser
  3405. .parseFromString("<formatted-message id=\"" + TEMPLATE_ID + "\">" + formattedMessage + "</formatted-message>", 'text/html')
  3406. .getElementById(TEMPLATE_ID);
  3407. if (!content) {
  3408. throw new FormatError("Malformed HTML message " + formattedMessage);
  3409. }
  3410. var tagsToFormat = Object.keys(values).filter(function (varName) { return !!content.getElementsByTagName(varName).length; });
  3411. // No tags to format
  3412. if (!tagsToFormat.length) {
  3413. return restoreRichPlaceholderMessage(formattedMessage, objectParts);
  3414. }
  3415. var caseSensitiveTags = tagsToFormat.filter(function (tagName) { return tagName !== tagName.toLowerCase(); });
  3416. if (caseSensitiveTags.length) {
  3417. throw new FormatError("HTML tag must be lowercased but the following tags are not: " + caseSensitiveTags.join(', '));
  3418. }
  3419. // We're doing this since top node is `<formatted-message/>` which does not have a formatter
  3420. return Array.prototype.slice
  3421. .call(content.childNodes)
  3422. .reduce(function (all, child) { return all.concat(formatHTMLElement(child, objectParts, values)); }, []);
  3423. }
  3424. exports.formatHTMLMessage = formatHTMLMessage;
  3425. });
  3426. styleInject_es.unwrapExports(formatters);
  3427. var formatters_1 = formatters.formatToParts;
  3428. var formatters_2 = formatters.formatToString;
  3429. var formatters_3 = formatters.formatHTMLMessage;
  3430. var core = styleInject_es.createCommonjsModule(function (module, exports) {
  3431. /*
  3432. Copyright (c) 2014, Yahoo! Inc. All rights reserved.
  3433. Copyrights licensed under the New BSD License.
  3434. See the accompanying LICENSE file for terms.
  3435. */
  3436. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  3437. __assign = Object.assign || function(t) {
  3438. for (var s, i = 1, n = arguments.length; i < n; i++) {
  3439. s = arguments[i];
  3440. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  3441. t[p] = s[p];
  3442. }
  3443. return t;
  3444. };
  3445. return __assign.apply(this, arguments);
  3446. };
  3447. Object.defineProperty(exports, "__esModule", { value: true });
  3448. // -- MessageFormat --------------------------------------------------------
  3449. function mergeConfig(c1, c2) {
  3450. if (!c2) {
  3451. return c1;
  3452. }
  3453. return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {
  3454. all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));
  3455. return all;
  3456. }, {}));
  3457. }
  3458. function mergeConfigs(defaultConfig, configs) {
  3459. if (!configs) {
  3460. return defaultConfig;
  3461. }
  3462. return Object.keys(defaultConfig).reduce(function (all, k) {
  3463. all[k] = mergeConfig(defaultConfig[k], configs[k]);
  3464. return all;
  3465. }, __assign({}, defaultConfig));
  3466. }
  3467. function createDefaultFormatters(cache) {
  3468. if (cache === void 0) { cache = {
  3469. number: {},
  3470. dateTime: {},
  3471. pluralRules: {},
  3472. }; }
  3473. return {
  3474. getNumberFormat: dist$2.default(Intl.NumberFormat, cache.number),
  3475. getDateTimeFormat: dist$2.default(Intl.DateTimeFormat, cache.dateTime),
  3476. getPluralRules: dist$2.default(Intl.PluralRules, cache.pluralRules),
  3477. };
  3478. }
  3479. exports.createDefaultFormatters = createDefaultFormatters;
  3480. var IntlMessageFormat = /** @class */ (function () {
  3481. function IntlMessageFormat(message, locales, overrideFormats, opts) {
  3482. var _this = this;
  3483. if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }
  3484. this.formatterCache = {
  3485. number: {},
  3486. dateTime: {},
  3487. pluralRules: {},
  3488. };
  3489. this.format = function (values) {
  3490. return formatters.formatToString(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);
  3491. };
  3492. this.formatToParts = function (values) {
  3493. return formatters.formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);
  3494. };
  3495. this.formatHTMLMessage = function (values) {
  3496. return formatters.formatHTMLMessage(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);
  3497. };
  3498. this.resolvedOptions = function () { return ({
  3499. locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
  3500. }); };
  3501. this.getAst = function () { return _this.ast; };
  3502. if (typeof message === 'string') {
  3503. this.message = message;
  3504. if (!IntlMessageFormat.__parse) {
  3505. throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');
  3506. }
  3507. // Parse string messages into an AST.
  3508. this.ast = IntlMessageFormat.__parse(message, {
  3509. normalizeHashtagInPlural: false,
  3510. });
  3511. }
  3512. else {
  3513. this.ast = message;
  3514. }
  3515. if (!Array.isArray(this.ast)) {
  3516. throw new TypeError('A message must be provided as a String or AST.');
  3517. }
  3518. // Creates a new object with the specified `formats` merged with the default
  3519. // formats.
  3520. this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
  3521. // Defined first because it's used to build the format pattern.
  3522. this.locales = locales;
  3523. this.formatters =
  3524. (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);
  3525. }
  3526. IntlMessageFormat.defaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
  3527. IntlMessageFormat.__parse = dist$1.parse;
  3528. // Default format options used as the prototype of the `formats` provided to the
  3529. // constructor. These are used when constructing the internal Intl.NumberFormat
  3530. // and Intl.DateTimeFormat instances.
  3531. IntlMessageFormat.formats = {
  3532. number: {
  3533. currency: {
  3534. style: 'currency',
  3535. },
  3536. percent: {
  3537. style: 'percent',
  3538. },
  3539. },
  3540. date: {
  3541. short: {
  3542. month: 'numeric',
  3543. day: 'numeric',
  3544. year: '2-digit',
  3545. },
  3546. medium: {
  3547. month: 'short',
  3548. day: 'numeric',
  3549. year: 'numeric',
  3550. },
  3551. long: {
  3552. month: 'long',
  3553. day: 'numeric',
  3554. year: 'numeric',
  3555. },
  3556. full: {
  3557. weekday: 'long',
  3558. month: 'long',
  3559. day: 'numeric',
  3560. year: 'numeric',
  3561. },
  3562. },
  3563. time: {
  3564. short: {
  3565. hour: 'numeric',
  3566. minute: 'numeric',
  3567. },
  3568. medium: {
  3569. hour: 'numeric',
  3570. minute: 'numeric',
  3571. second: 'numeric',
  3572. },
  3573. long: {
  3574. hour: 'numeric',
  3575. minute: 'numeric',
  3576. second: 'numeric',
  3577. timeZoneName: 'short',
  3578. },
  3579. full: {
  3580. hour: 'numeric',
  3581. minute: 'numeric',
  3582. second: 'numeric',
  3583. timeZoneName: 'short',
  3584. },
  3585. },
  3586. };
  3587. return IntlMessageFormat;
  3588. }());
  3589. exports.IntlMessageFormat = IntlMessageFormat;
  3590. exports.default = IntlMessageFormat;
  3591. });
  3592. styleInject_es.unwrapExports(core);
  3593. var core_1 = core.createDefaultFormatters;
  3594. var core_2 = core.IntlMessageFormat;
  3595. var dist$3 = styleInject_es.createCommonjsModule(function (module, exports) {
  3596. /*
  3597. Copyright (c) 2014, Yahoo! Inc. All rights reserved.
  3598. Copyrights licensed under the New BSD License.
  3599. See the accompanying LICENSE file for terms.
  3600. */
  3601. function __export(m) {
  3602. for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  3603. }
  3604. Object.defineProperty(exports, "__esModule", { value: true });
  3605. __export(formatters);
  3606. __export(core);
  3607. exports.default = core.default;
  3608. });
  3609. styleInject_es.unwrapExports(dist$3);
  3610. /**
  3611. * Copyright (c) 2013-present, Facebook, Inc.
  3612. *
  3613. * This source code is licensed under the MIT license found in the
  3614. * LICENSE file in the root directory of this source tree.
  3615. */
  3616. /**
  3617. * Use invariant() to assert state which your program assumes to be true.
  3618. *
  3619. * Provide sprintf-style format (only %s is supported) and arguments
  3620. * to provide information about what broke and what you were
  3621. * expecting.
  3622. *
  3623. * The invariant message will be stripped in production, but the invariant
  3624. * will remain to ensure logic does not differ in production.
  3625. */
  3626. var invariant = function(condition, format, a, b, c, d, e, f) {
  3627. if (process.env.NODE_ENV !== 'production') {
  3628. if (format === undefined) {
  3629. throw new Error('invariant requires an error message argument');
  3630. }
  3631. }
  3632. if (!condition) {
  3633. var error;
  3634. if (format === undefined) {
  3635. error = new Error(
  3636. 'Minified exception occurred; use the non-minified dev environment ' +
  3637. 'for the full error message and additional helpful warnings.'
  3638. );
  3639. } else {
  3640. var args = [a, b, c, d, e, f];
  3641. var argIndex = 0;
  3642. error = new Error(
  3643. format.replace(/%s/g, function() { return args[argIndex++]; })
  3644. );
  3645. error.name = 'Invariant Violation';
  3646. }
  3647. error.framesToPop = 1; // we don't care about invariant's own frame
  3648. throw error;
  3649. }
  3650. };
  3651. var browser = invariant;
  3652. var utils = styleInject_es.createCommonjsModule(function (module, exports) {
  3653. /*
  3654. HTML escaping is the same as React's
  3655. (on purpose.) Therefore, it has the following Copyright and Licensing:
  3656. Copyright 2013-2014, Facebook, Inc.
  3657. All rights reserved.
  3658. This source code is licensed under the BSD-style license found in the LICENSE
  3659. file in the root directory of React's source tree.
  3660. */
  3661. Object.defineProperty(exports, "__esModule", { value: true });
  3662. // Since rollup cannot deal with namespace being a function,
  3663. // this is to interop with TypeScript since `invariant`
  3664. // does not export a default
  3665. // https://github.com/rollup/rollup/issues/1267
  3666. var invariant = browser.default || browser;
  3667. var ESCAPED_CHARS = {
  3668. 38: '&amp;',
  3669. 62: '&gt;',
  3670. 60: '&lt;',
  3671. 34: '&quot;',
  3672. 39: '&#x27;',
  3673. };
  3674. var UNSAFE_CHARS_REGEX = /[&><"']/g;
  3675. function escape(str) {
  3676. return ('' + str).replace(UNSAFE_CHARS_REGEX, function (match) { return ESCAPED_CHARS[match.charCodeAt(0)]; });
  3677. }
  3678. exports.escape = escape;
  3679. function filterProps(props, whitelist, defaults) {
  3680. if (defaults === void 0) { defaults = {}; }
  3681. return whitelist.reduce(function (filtered, name) {
  3682. if (name in props) {
  3683. filtered[name] = props[name];
  3684. }
  3685. else if (name in defaults) {
  3686. filtered[name] = defaults[name];
  3687. }
  3688. return filtered;
  3689. }, {});
  3690. }
  3691. exports.filterProps = filterProps;
  3692. function invariantIntlContext(intl) {
  3693. invariant(intl, '[React Intl] Could not find required `intl` object. ' +
  3694. '<IntlProvider> needs to exist in the component ancestry.');
  3695. }
  3696. exports.invariantIntlContext = invariantIntlContext;
  3697. function createError(message, exception) {
  3698. var eMsg = exception ? "\n" + exception.stack : '';
  3699. return "[React Intl] " + message + eMsg;
  3700. }
  3701. exports.createError = createError;
  3702. function defaultErrorHandler(error) {
  3703. if (process.env.NODE_ENV !== 'production') {
  3704. console.error(error);
  3705. }
  3706. }
  3707. exports.defaultErrorHandler = defaultErrorHandler;
  3708. exports.DEFAULT_INTL_CONFIG = {
  3709. formats: {},
  3710. messages: {},
  3711. timeZone: undefined,
  3712. textComponent: React__default.Fragment,
  3713. defaultLocale: 'en',
  3714. defaultFormats: {},
  3715. onError: defaultErrorHandler,
  3716. };
  3717. function createIntlCache() {
  3718. return {
  3719. dateTime: {},
  3720. number: {},
  3721. message: {},
  3722. relativeTime: {},
  3723. pluralRules: {},
  3724. list: {},
  3725. };
  3726. }
  3727. exports.createIntlCache = createIntlCache;
  3728. /**
  3729. * Create intl formatters and populate cache
  3730. * @param cache explicit cache to prevent leaking memory
  3731. */
  3732. function createFormatters(cache) {
  3733. if (cache === void 0) { cache = createIntlCache(); }
  3734. var RelativeTimeFormat = Intl.RelativeTimeFormat;
  3735. var ListFormat = Intl.ListFormat;
  3736. return {
  3737. getDateTimeFormat: dist$2.default(Intl.DateTimeFormat, cache.dateTime),
  3738. getNumberFormat: dist$2.default(Intl.NumberFormat, cache.number),
  3739. getMessageFormat: dist$2.default(dist$3.default, cache.message),
  3740. getRelativeTimeFormat: dist$2.default(RelativeTimeFormat, cache.relativeTime),
  3741. getPluralRules: dist$2.default(Intl.PluralRules, cache.pluralRules),
  3742. getListFormat: dist$2.default(ListFormat, cache.list),
  3743. };
  3744. }
  3745. exports.createFormatters = createFormatters;
  3746. function getNamedFormat(formats, type, name, onError) {
  3747. var formatType = formats && formats[type];
  3748. var format;
  3749. if (formatType) {
  3750. format = formatType[name];
  3751. }
  3752. if (format) {
  3753. return format;
  3754. }
  3755. onError(createError("No " + type + " format named: " + name));
  3756. }
  3757. exports.getNamedFormat = getNamedFormat;
  3758. });
  3759. styleInject_es.unwrapExports(utils);
  3760. var utils_1 = utils.escape;
  3761. var utils_2 = utils.filterProps;
  3762. var utils_3 = utils.invariantIntlContext;
  3763. var utils_4 = utils.createError;
  3764. var utils_5 = utils.defaultErrorHandler;
  3765. var utils_6 = utils.DEFAULT_INTL_CONFIG;
  3766. var utils_7 = utils.createIntlCache;
  3767. var utils_8 = utils.createFormatters;
  3768. var utils_9 = utils.getNamedFormat;
  3769. var reactIs_production_min = styleInject_es.createCommonjsModule(function (module, exports) {
  3770. Object.defineProperty(exports,"__esModule",{value:!0});
  3771. var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
  3772. 60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function z(a){return y(a)===m}
  3773. exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
  3774. exports.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
  3775. exports.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
  3776. });
  3777. styleInject_es.unwrapExports(reactIs_production_min);
  3778. var reactIs_production_min_1 = reactIs_production_min.typeOf;
  3779. var reactIs_production_min_2 = reactIs_production_min.AsyncMode;
  3780. var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;
  3781. var reactIs_production_min_4 = reactIs_production_min.ContextConsumer;
  3782. var reactIs_production_min_5 = reactIs_production_min.ContextProvider;
  3783. var reactIs_production_min_6 = reactIs_production_min.Element;
  3784. var reactIs_production_min_7 = reactIs_production_min.ForwardRef;
  3785. var reactIs_production_min_8 = reactIs_production_min.Fragment;
  3786. var reactIs_production_min_9 = reactIs_production_min.Lazy;
  3787. var reactIs_production_min_10 = reactIs_production_min.Memo;
  3788. var reactIs_production_min_11 = reactIs_production_min.Portal;
  3789. var reactIs_production_min_12 = reactIs_production_min.Profiler;
  3790. var reactIs_production_min_13 = reactIs_production_min.StrictMode;
  3791. var reactIs_production_min_14 = reactIs_production_min.Suspense;
  3792. var reactIs_production_min_15 = reactIs_production_min.isValidElementType;
  3793. var reactIs_production_min_16 = reactIs_production_min.isAsyncMode;
  3794. var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode;
  3795. var reactIs_production_min_18 = reactIs_production_min.isContextConsumer;
  3796. var reactIs_production_min_19 = reactIs_production_min.isContextProvider;
  3797. var reactIs_production_min_20 = reactIs_production_min.isElement;
  3798. var reactIs_production_min_21 = reactIs_production_min.isForwardRef;
  3799. var reactIs_production_min_22 = reactIs_production_min.isFragment;
  3800. var reactIs_production_min_23 = reactIs_production_min.isLazy;
  3801. var reactIs_production_min_24 = reactIs_production_min.isMemo;
  3802. var reactIs_production_min_25 = reactIs_production_min.isPortal;
  3803. var reactIs_production_min_26 = reactIs_production_min.isProfiler;
  3804. var reactIs_production_min_27 = reactIs_production_min.isStrictMode;
  3805. var reactIs_production_min_28 = reactIs_production_min.isSuspense;
  3806. var reactIs_development = styleInject_es.createCommonjsModule(function (module, exports) {
  3807. if (process.env.NODE_ENV !== "production") {
  3808. (function() {
  3809. Object.defineProperty(exports, '__esModule', { value: true });
  3810. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  3811. // nor polyfill, then a plain number is used for performance.
  3812. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  3813. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  3814. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  3815. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  3816. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  3817. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  3818. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  3819. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  3820. // (unstable) APIs that have been removed. Can we remove the symbols?
  3821. var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
  3822. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  3823. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  3824. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  3825. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  3826. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  3827. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  3828. var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
  3829. var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
  3830. var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
  3831. function isValidElementType(type) {
  3832. return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  3833. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);
  3834. }
  3835. /**
  3836. * Forked from fbjs/warning:
  3837. * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
  3838. *
  3839. * Only change is we use console.warn instead of console.error,
  3840. * and do nothing when 'console' is not supported.
  3841. * This really simplifies the code.
  3842. * ---
  3843. * Similar to invariant but only logs a warning if the condition is not met.
  3844. * This can be used to log issues in development environments in critical
  3845. * paths. Removing the logging code for production environments will keep the
  3846. * same logic and follow the same code paths.
  3847. */
  3848. var lowPriorityWarningWithoutStack = function () {};
  3849. {
  3850. var printWarning = function (format) {
  3851. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  3852. args[_key - 1] = arguments[_key];
  3853. }
  3854. var argIndex = 0;
  3855. var message = 'Warning: ' + format.replace(/%s/g, function () {
  3856. return args[argIndex++];
  3857. });
  3858. if (typeof console !== 'undefined') {
  3859. console.warn(message);
  3860. }
  3861. try {
  3862. // --- Welcome to debugging React ---
  3863. // This error was thrown as a convenience so that you can use this stack
  3864. // to find the callsite that caused this warning to fire.
  3865. throw new Error(message);
  3866. } catch (x) {}
  3867. };
  3868. lowPriorityWarningWithoutStack = function (condition, format) {
  3869. if (format === undefined) {
  3870. throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
  3871. }
  3872. if (!condition) {
  3873. for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  3874. args[_key2 - 2] = arguments[_key2];
  3875. }
  3876. printWarning.apply(void 0, [format].concat(args));
  3877. }
  3878. };
  3879. }
  3880. var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
  3881. function typeOf(object) {
  3882. if (typeof object === 'object' && object !== null) {
  3883. var $$typeof = object.$$typeof;
  3884. switch ($$typeof) {
  3885. case REACT_ELEMENT_TYPE:
  3886. var type = object.type;
  3887. switch (type) {
  3888. case REACT_ASYNC_MODE_TYPE:
  3889. case REACT_CONCURRENT_MODE_TYPE:
  3890. case REACT_FRAGMENT_TYPE:
  3891. case REACT_PROFILER_TYPE:
  3892. case REACT_STRICT_MODE_TYPE:
  3893. case REACT_SUSPENSE_TYPE:
  3894. return type;
  3895. default:
  3896. var $$typeofType = type && type.$$typeof;
  3897. switch ($$typeofType) {
  3898. case REACT_CONTEXT_TYPE:
  3899. case REACT_FORWARD_REF_TYPE:
  3900. case REACT_LAZY_TYPE:
  3901. case REACT_MEMO_TYPE:
  3902. case REACT_PROVIDER_TYPE:
  3903. return $$typeofType;
  3904. default:
  3905. return $$typeof;
  3906. }
  3907. }
  3908. case REACT_PORTAL_TYPE:
  3909. return $$typeof;
  3910. }
  3911. }
  3912. return undefined;
  3913. } // AsyncMode is deprecated along with isAsyncMode
  3914. var AsyncMode = REACT_ASYNC_MODE_TYPE;
  3915. var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  3916. var ContextConsumer = REACT_CONTEXT_TYPE;
  3917. var ContextProvider = REACT_PROVIDER_TYPE;
  3918. var Element = REACT_ELEMENT_TYPE;
  3919. var ForwardRef = REACT_FORWARD_REF_TYPE;
  3920. var Fragment = REACT_FRAGMENT_TYPE;
  3921. var Lazy = REACT_LAZY_TYPE;
  3922. var Memo = REACT_MEMO_TYPE;
  3923. var Portal = REACT_PORTAL_TYPE;
  3924. var Profiler = REACT_PROFILER_TYPE;
  3925. var StrictMode = REACT_STRICT_MODE_TYPE;
  3926. var Suspense = REACT_SUSPENSE_TYPE;
  3927. var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
  3928. function isAsyncMode(object) {
  3929. {
  3930. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  3931. hasWarnedAboutDeprecatedIsAsyncMode = true;
  3932. lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
  3933. }
  3934. }
  3935. return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  3936. }
  3937. function isConcurrentMode(object) {
  3938. return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  3939. }
  3940. function isContextConsumer(object) {
  3941. return typeOf(object) === REACT_CONTEXT_TYPE;
  3942. }
  3943. function isContextProvider(object) {
  3944. return typeOf(object) === REACT_PROVIDER_TYPE;
  3945. }
  3946. function isElement(object) {
  3947. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  3948. }
  3949. function isForwardRef(object) {
  3950. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  3951. }
  3952. function isFragment(object) {
  3953. return typeOf(object) === REACT_FRAGMENT_TYPE;
  3954. }
  3955. function isLazy(object) {
  3956. return typeOf(object) === REACT_LAZY_TYPE;
  3957. }
  3958. function isMemo(object) {
  3959. return typeOf(object) === REACT_MEMO_TYPE;
  3960. }
  3961. function isPortal(object) {
  3962. return typeOf(object) === REACT_PORTAL_TYPE;
  3963. }
  3964. function isProfiler(object) {
  3965. return typeOf(object) === REACT_PROFILER_TYPE;
  3966. }
  3967. function isStrictMode(object) {
  3968. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  3969. }
  3970. function isSuspense(object) {
  3971. return typeOf(object) === REACT_SUSPENSE_TYPE;
  3972. }
  3973. exports.typeOf = typeOf;
  3974. exports.AsyncMode = AsyncMode;
  3975. exports.ConcurrentMode = ConcurrentMode;
  3976. exports.ContextConsumer = ContextConsumer;
  3977. exports.ContextProvider = ContextProvider;
  3978. exports.Element = Element;
  3979. exports.ForwardRef = ForwardRef;
  3980. exports.Fragment = Fragment;
  3981. exports.Lazy = Lazy;
  3982. exports.Memo = Memo;
  3983. exports.Portal = Portal;
  3984. exports.Profiler = Profiler;
  3985. exports.StrictMode = StrictMode;
  3986. exports.Suspense = Suspense;
  3987. exports.isValidElementType = isValidElementType;
  3988. exports.isAsyncMode = isAsyncMode;
  3989. exports.isConcurrentMode = isConcurrentMode;
  3990. exports.isContextConsumer = isContextConsumer;
  3991. exports.isContextProvider = isContextProvider;
  3992. exports.isElement = isElement;
  3993. exports.isForwardRef = isForwardRef;
  3994. exports.isFragment = isFragment;
  3995. exports.isLazy = isLazy;
  3996. exports.isMemo = isMemo;
  3997. exports.isPortal = isPortal;
  3998. exports.isProfiler = isProfiler;
  3999. exports.isStrictMode = isStrictMode;
  4000. exports.isSuspense = isSuspense;
  4001. })();
  4002. }
  4003. });
  4004. styleInject_es.unwrapExports(reactIs_development);
  4005. var reactIs_development_1 = reactIs_development.typeOf;
  4006. var reactIs_development_2 = reactIs_development.AsyncMode;
  4007. var reactIs_development_3 = reactIs_development.ConcurrentMode;
  4008. var reactIs_development_4 = reactIs_development.ContextConsumer;
  4009. var reactIs_development_5 = reactIs_development.ContextProvider;
  4010. var reactIs_development_6 = reactIs_development.Element;
  4011. var reactIs_development_7 = reactIs_development.ForwardRef;
  4012. var reactIs_development_8 = reactIs_development.Fragment;
  4013. var reactIs_development_9 = reactIs_development.Lazy;
  4014. var reactIs_development_10 = reactIs_development.Memo;
  4015. var reactIs_development_11 = reactIs_development.Portal;
  4016. var reactIs_development_12 = reactIs_development.Profiler;
  4017. var reactIs_development_13 = reactIs_development.StrictMode;
  4018. var reactIs_development_14 = reactIs_development.Suspense;
  4019. var reactIs_development_15 = reactIs_development.isValidElementType;
  4020. var reactIs_development_16 = reactIs_development.isAsyncMode;
  4021. var reactIs_development_17 = reactIs_development.isConcurrentMode;
  4022. var reactIs_development_18 = reactIs_development.isContextConsumer;
  4023. var reactIs_development_19 = reactIs_development.isContextProvider;
  4024. var reactIs_development_20 = reactIs_development.isElement;
  4025. var reactIs_development_21 = reactIs_development.isForwardRef;
  4026. var reactIs_development_22 = reactIs_development.isFragment;
  4027. var reactIs_development_23 = reactIs_development.isLazy;
  4028. var reactIs_development_24 = reactIs_development.isMemo;
  4029. var reactIs_development_25 = reactIs_development.isPortal;
  4030. var reactIs_development_26 = reactIs_development.isProfiler;
  4031. var reactIs_development_27 = reactIs_development.isStrictMode;
  4032. var reactIs_development_28 = reactIs_development.isSuspense;
  4033. var reactIs = styleInject_es.createCommonjsModule(function (module) {
  4034. if (process.env.NODE_ENV === 'production') {
  4035. module.exports = reactIs_production_min;
  4036. } else {
  4037. module.exports = reactIs_development;
  4038. }
  4039. });
  4040. /**
  4041. * Copyright 2015, Yahoo! Inc.
  4042. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  4043. */
  4044. var REACT_STATICS = {
  4045. childContextTypes: true,
  4046. contextType: true,
  4047. contextTypes: true,
  4048. defaultProps: true,
  4049. displayName: true,
  4050. getDefaultProps: true,
  4051. getDerivedStateFromError: true,
  4052. getDerivedStateFromProps: true,
  4053. mixins: true,
  4054. propTypes: true,
  4055. type: true
  4056. };
  4057. var KNOWN_STATICS = {
  4058. name: true,
  4059. length: true,
  4060. prototype: true,
  4061. caller: true,
  4062. callee: true,
  4063. arguments: true,
  4064. arity: true
  4065. };
  4066. var FORWARD_REF_STATICS = {
  4067. '$$typeof': true,
  4068. render: true,
  4069. defaultProps: true,
  4070. displayName: true,
  4071. propTypes: true
  4072. };
  4073. var MEMO_STATICS = {
  4074. '$$typeof': true,
  4075. compare: true,
  4076. defaultProps: true,
  4077. displayName: true,
  4078. propTypes: true,
  4079. type: true
  4080. };
  4081. var TYPE_STATICS = {};
  4082. TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
  4083. function getStatics(component) {
  4084. if (reactIs.isMemo(component)) {
  4085. return MEMO_STATICS;
  4086. }
  4087. return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
  4088. }
  4089. var defineProperty = Object.defineProperty;
  4090. var getOwnPropertyNames = Object.getOwnPropertyNames;
  4091. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  4092. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  4093. var getPrototypeOf = Object.getPrototypeOf;
  4094. var objectPrototype = Object.prototype;
  4095. function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  4096. if (typeof sourceComponent !== 'string') {
  4097. // don't hoist over string (html) components
  4098. if (objectPrototype) {
  4099. var inheritedComponent = getPrototypeOf(sourceComponent);
  4100. if (inheritedComponent && inheritedComponent !== objectPrototype) {
  4101. hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
  4102. }
  4103. }
  4104. var keys = getOwnPropertyNames(sourceComponent);
  4105. if (getOwnPropertySymbols) {
  4106. keys = keys.concat(getOwnPropertySymbols(sourceComponent));
  4107. }
  4108. var targetStatics = getStatics(targetComponent);
  4109. var sourceStatics = getStatics(sourceComponent);
  4110. for (var i = 0; i < keys.length; ++i) {
  4111. var key = keys[i];
  4112. if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
  4113. var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
  4114. try {
  4115. // Avoid failures from read-only properties
  4116. defineProperty(targetComponent, key, descriptor);
  4117. } catch (e) {}
  4118. }
  4119. }
  4120. }
  4121. return targetComponent;
  4122. }
  4123. var hoistNonReactStatics_cjs = hoistNonReactStatics;
  4124. var injectIntl_1 = styleInject_es.createCommonjsModule(function (module, exports) {
  4125. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  4126. __assign = Object.assign || function(t) {
  4127. for (var s, i = 1, n = arguments.length; i < n; i++) {
  4128. s = arguments[i];
  4129. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  4130. t[p] = s[p];
  4131. }
  4132. return t;
  4133. };
  4134. return __assign.apply(this, arguments);
  4135. };
  4136. Object.defineProperty(exports, "__esModule", { value: true });
  4137. // Since rollup cannot deal with namespace being a function,
  4138. // this is to interop with TypeScript since `invariant`
  4139. // does not export a default
  4140. // https://github.com/rollup/rollup/issues/1267
  4141. var hoistNonReactStatics = hoistNonReactStatics_cjs.default || hoistNonReactStatics_cjs;
  4142. function getDisplayName(Component) {
  4143. return Component.displayName || Component.name || 'Component';
  4144. }
  4145. // TODO: We should provide initial value here
  4146. var IntlContext = React__default.createContext(null);
  4147. var IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;
  4148. exports.Provider = IntlProvider;
  4149. exports.Context = IntlContext;
  4150. function injectIntl(WrappedComponent, options) {
  4151. var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === void 0 ? 'intl' : _b, _c = _a.forwardRef, forwardRef = _c === void 0 ? false : _c, _d = _a.enforceContext, enforceContext = _d === void 0 ? true : _d;
  4152. var WithIntl = function (props) { return (React__default.createElement(IntlConsumer, null, function (intl) {
  4153. var _a;
  4154. if (enforceContext) {
  4155. utils.invariantIntlContext(intl);
  4156. }
  4157. return (React__default.createElement(WrappedComponent, __assign({}, props, (_a = {},
  4158. _a[intlPropName] = intl,
  4159. _a), { ref: forwardRef ? props.forwardedRef : null })));
  4160. })); };
  4161. WithIntl.displayName = "injectIntl(" + getDisplayName(WrappedComponent) + ")";
  4162. WithIntl.WrappedComponent = WrappedComponent;
  4163. if (forwardRef) {
  4164. return hoistNonReactStatics(React__default.forwardRef(function (props, ref) { return (React__default.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }))); }), WrappedComponent);
  4165. }
  4166. return hoistNonReactStatics(WithIntl, WrappedComponent);
  4167. }
  4168. exports.default = injectIntl;
  4169. });
  4170. styleInject_es.unwrapExports(injectIntl_1);
  4171. var injectIntl_2 = injectIntl_1.Provider;
  4172. var injectIntl_3 = injectIntl_1.Context;
  4173. var createFormattedComponent_1 = styleInject_es.createCommonjsModule(function (module, exports) {
  4174. var __rest = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__rest) || function (s, e) {
  4175. var t = {};
  4176. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  4177. t[p] = s[p];
  4178. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  4179. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
  4180. t[p[i]] = s[p[i]];
  4181. return t;
  4182. };
  4183. Object.defineProperty(exports, "__esModule", { value: true });
  4184. var DisplayName;
  4185. (function (DisplayName) {
  4186. DisplayName["formatDate"] = "FormattedDate";
  4187. DisplayName["formatTime"] = "FormattedTime";
  4188. DisplayName["formatNumber"] = "FormattedNumber";
  4189. DisplayName["formatList"] = "FormattedList";
  4190. })(DisplayName || (DisplayName = {}));
  4191. var DisplayNameParts;
  4192. (function (DisplayNameParts) {
  4193. DisplayNameParts["formatDate"] = "FormattedDateParts";
  4194. DisplayNameParts["formatTime"] = "FormattedTimeParts";
  4195. DisplayNameParts["formatNumber"] = "FormattedNumberParts";
  4196. DisplayNameParts["formatList"] = "FormattedListParts";
  4197. })(DisplayNameParts || (DisplayNameParts = {}));
  4198. exports.FormattedNumberParts = function (props) { return (React__default.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
  4199. utils.invariantIntlContext(intl);
  4200. var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
  4201. return children(intl.formatNumberToParts(value, formatProps));
  4202. })); };
  4203. exports.FormattedNumberParts.displayName = 'FormattedNumberParts';
  4204. function createFormattedDateTimePartsComponent(name) {
  4205. var ComponentParts = function (props) { return (React__default.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
  4206. utils.invariantIntlContext(intl);
  4207. var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
  4208. var date = typeof value === 'string' ? new Date(value || 0) : value;
  4209. var formattedParts = name === 'formatDate'
  4210. ? intl.formatDateToParts(date, formatProps)
  4211. : intl.formatTimeToParts(date, formatProps);
  4212. return children(formattedParts);
  4213. })); };
  4214. ComponentParts.displayName = DisplayNameParts[name];
  4215. return ComponentParts;
  4216. }
  4217. exports.createFormattedDateTimePartsComponent = createFormattedDateTimePartsComponent;
  4218. function createFormattedComponent(name) {
  4219. var Component = function (props) { return (React__default.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
  4220. utils.invariantIntlContext(intl);
  4221. var value = props.value, children = props.children, formatProps = __rest(props, ["value", "children"]);
  4222. // TODO: fix TS type definition for localeMatcher upstream
  4223. var formattedValue = intl[name](value, formatProps);
  4224. if (typeof children === 'function') {
  4225. return children(formattedValue);
  4226. }
  4227. var Text = intl.textComponent || React__default.Fragment;
  4228. return React__default.createElement(Text, null, formattedValue);
  4229. })); };
  4230. Component.displayName = DisplayName[name];
  4231. return Component;
  4232. }
  4233. exports.createFormattedComponent = createFormattedComponent;
  4234. });
  4235. styleInject_es.unwrapExports(createFormattedComponent_1);
  4236. var createFormattedComponent_2 = createFormattedComponent_1.FormattedNumberParts;
  4237. var createFormattedComponent_3 = createFormattedComponent_1.createFormattedDateTimePartsComponent;
  4238. var createFormattedComponent_4 = createFormattedComponent_1.createFormattedComponent;
  4239. var useIntl_1 = styleInject_es.createCommonjsModule(function (module, exports) {
  4240. Object.defineProperty(exports, "__esModule", { value: true });
  4241. function useIntl() {
  4242. var intl = React__default.useContext(injectIntl_1.Context);
  4243. utils.invariantIntlContext(intl);
  4244. return intl;
  4245. }
  4246. exports.default = useIntl;
  4247. });
  4248. styleInject_es.unwrapExports(useIntl_1);
  4249. var dist$4 = styleInject_es.createCommonjsModule(function (module, exports) {
  4250. /*
  4251. * Copyright 2015, Yahoo Inc.
  4252. * Copyrights licensed under the New BSD License.
  4253. * See the accompanying LICENSE file for terms.
  4254. */
  4255. Object.defineProperty(exports, "__esModule", { value: true });
  4256. function areIntlLocalesSupported(locales, constructorsToCheck) {
  4257. if (typeof Intl === 'undefined') {
  4258. return false;
  4259. }
  4260. if (!locales) {
  4261. throw new Error('locales must be supplied.');
  4262. }
  4263. if (!Array.isArray(locales)) {
  4264. locales = [locales];
  4265. }
  4266. var intlConstructors = constructorsToCheck || [
  4267. Intl.DateTimeFormat,
  4268. Intl.NumberFormat,
  4269. Intl.PluralRules,
  4270. ];
  4271. intlConstructors = intlConstructors.filter(Boolean);
  4272. if (intlConstructors.length === 0 ||
  4273. (constructorsToCheck &&
  4274. intlConstructors.length !== constructorsToCheck.length)) {
  4275. return false;
  4276. }
  4277. return intlConstructors.every(function (intlConstructor) {
  4278. return intlConstructor.supportedLocalesOf(locales).length === locales.length;
  4279. });
  4280. }
  4281. exports.default = areIntlLocalesSupported;
  4282. });
  4283. styleInject_es.unwrapExports(dist$4);
  4284. var number = styleInject_es.createCommonjsModule(function (module, exports) {
  4285. Object.defineProperty(exports, "__esModule", { value: true });
  4286. var NUMBER_FORMAT_OPTIONS = [
  4287. 'localeMatcher',
  4288. 'style',
  4289. 'currency',
  4290. 'currencyDisplay',
  4291. 'unit',
  4292. 'unitDisplay',
  4293. 'useGrouping',
  4294. 'minimumIntegerDigits',
  4295. 'minimumFractionDigits',
  4296. 'maximumFractionDigits',
  4297. 'minimumSignificantDigits',
  4298. 'maximumSignificantDigits',
  4299. // Unified NumberFormat (Stage 3 as of 10/22/19)
  4300. 'compactDisplay',
  4301. 'currencyDisplay',
  4302. 'currencySign',
  4303. 'notation',
  4304. 'signDisplay',
  4305. 'unit',
  4306. 'unitDisplay',
  4307. ];
  4308. function getFormatter(_a, getNumberFormat, options) {
  4309. var locale = _a.locale, formats = _a.formats, onError = _a.onError;
  4310. if (options === void 0) { options = {}; }
  4311. var format = options.format;
  4312. var defaults = ((format &&
  4313. utils.getNamedFormat(formats, 'number', format, onError)) ||
  4314. {});
  4315. var filteredOptions = utils.filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);
  4316. return getNumberFormat(locale, filteredOptions);
  4317. }
  4318. exports.getFormatter = getFormatter;
  4319. function formatNumber(config, getNumberFormat, value, options) {
  4320. if (options === void 0) { options = {}; }
  4321. try {
  4322. return getFormatter(config, getNumberFormat, options).format(value);
  4323. }
  4324. catch (e) {
  4325. config.onError(utils.createError('Error formatting number.', e));
  4326. }
  4327. return String(value);
  4328. }
  4329. exports.formatNumber = formatNumber;
  4330. function formatNumberToParts(config, getNumberFormat, value, options) {
  4331. if (options === void 0) { options = {}; }
  4332. try {
  4333. return getFormatter(config, getNumberFormat, options).formatToParts(value);
  4334. }
  4335. catch (e) {
  4336. config.onError(utils.createError('Error formatting number.', e));
  4337. }
  4338. return [];
  4339. }
  4340. exports.formatNumberToParts = formatNumberToParts;
  4341. });
  4342. styleInject_es.unwrapExports(number);
  4343. var number_1 = number.getFormatter;
  4344. var number_2 = number.formatNumber;
  4345. var number_3 = number.formatNumberToParts;
  4346. var relativeTime = styleInject_es.createCommonjsModule(function (module, exports) {
  4347. Object.defineProperty(exports, "__esModule", { value: true });
  4348. var RELATIVE_TIME_FORMAT_OPTIONS = [
  4349. 'numeric',
  4350. 'style',
  4351. ];
  4352. function getFormatter(_a, getRelativeTimeFormat, options) {
  4353. var locale = _a.locale, formats = _a.formats, onError = _a.onError;
  4354. if (options === void 0) { options = {}; }
  4355. var format = options.format;
  4356. var defaults = (!!format && utils.getNamedFormat(formats, 'relative', format, onError)) || {};
  4357. var filteredOptions = utils.filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);
  4358. return getRelativeTimeFormat(locale, filteredOptions);
  4359. }
  4360. function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options) {
  4361. if (options === void 0) { options = {}; }
  4362. if (!unit) {
  4363. unit = 'second';
  4364. }
  4365. var RelativeTimeFormat = Intl.RelativeTimeFormat;
  4366. if (!RelativeTimeFormat) {
  4367. config.onError(utils.createError("Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-relativetimeformat\"\n"));
  4368. }
  4369. try {
  4370. return getFormatter(config, getRelativeTimeFormat, options).format(value, unit);
  4371. }
  4372. catch (e) {
  4373. config.onError(utils.createError('Error formatting relative time.', e));
  4374. }
  4375. return String(value);
  4376. }
  4377. exports.formatRelativeTime = formatRelativeTime;
  4378. });
  4379. styleInject_es.unwrapExports(relativeTime);
  4380. var relativeTime_1 = relativeTime.formatRelativeTime;
  4381. var dateTime = styleInject_es.createCommonjsModule(function (module, exports) {
  4382. /*
  4383. * Copyright 2015, Yahoo Inc.
  4384. * Copyrights licensed under the New BSD License.
  4385. * See the accompanying LICENSE file for terms.
  4386. */
  4387. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  4388. __assign = Object.assign || function(t) {
  4389. for (var s, i = 1, n = arguments.length; i < n; i++) {
  4390. s = arguments[i];
  4391. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  4392. t[p] = s[p];
  4393. }
  4394. return t;
  4395. };
  4396. return __assign.apply(this, arguments);
  4397. };
  4398. Object.defineProperty(exports, "__esModule", { value: true });
  4399. var DATE_TIME_FORMAT_OPTIONS = [
  4400. 'localeMatcher',
  4401. 'formatMatcher',
  4402. 'timeZone',
  4403. 'hour12',
  4404. 'weekday',
  4405. 'era',
  4406. 'year',
  4407. 'month',
  4408. 'day',
  4409. 'hour',
  4410. 'minute',
  4411. 'second',
  4412. 'timeZoneName',
  4413. ];
  4414. function getFormatter(_a, type, getDateTimeFormat, options) {
  4415. var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;
  4416. if (options === void 0) { options = {}; }
  4417. var format = options.format;
  4418. var defaults = __assign({}, (timeZone && { timeZone: timeZone }), (format && utils.getNamedFormat(formats, type, format, onError)));
  4419. var filteredOptions = utils.filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
  4420. if (type === 'time' &&
  4421. !filteredOptions.hour &&
  4422. !filteredOptions.minute &&
  4423. !filteredOptions.second) {
  4424. // Add default formatting options if hour, minute, or second isn't defined.
  4425. filteredOptions = __assign({}, filteredOptions, { hour: 'numeric', minute: 'numeric' });
  4426. }
  4427. return getDateTimeFormat(locale, filteredOptions);
  4428. }
  4429. exports.getFormatter = getFormatter;
  4430. function formatDate(config, getDateTimeFormat, value, options) {
  4431. if (options === void 0) { options = {}; }
  4432. var date = typeof value === 'string' ? new Date(value || 0) : value;
  4433. try {
  4434. return getFormatter(config, 'date', getDateTimeFormat, options).format(date);
  4435. }
  4436. catch (e) {
  4437. config.onError(utils.createError('Error formatting date.', e));
  4438. }
  4439. return String(date);
  4440. }
  4441. exports.formatDate = formatDate;
  4442. function formatTime(config, getDateTimeFormat, value, options) {
  4443. if (options === void 0) { options = {}; }
  4444. var date = typeof value === 'string' ? new Date(value || 0) : value;
  4445. try {
  4446. return getFormatter(config, 'time', getDateTimeFormat, options).format(date);
  4447. }
  4448. catch (e) {
  4449. config.onError(utils.createError('Error formatting time.', e));
  4450. }
  4451. return String(date);
  4452. }
  4453. exports.formatTime = formatTime;
  4454. function formatDateToParts(config, getDateTimeFormat, value, options) {
  4455. if (options === void 0) { options = {}; }
  4456. var date = typeof value === 'string' ? new Date(value || 0) : value;
  4457. try {
  4458. return getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date);
  4459. }
  4460. catch (e) {
  4461. config.onError(utils.createError('Error formatting date.', e));
  4462. }
  4463. return [];
  4464. }
  4465. exports.formatDateToParts = formatDateToParts;
  4466. function formatTimeToParts(config, getDateTimeFormat, value, options) {
  4467. if (options === void 0) { options = {}; }
  4468. var date = typeof value === 'string' ? new Date(value || 0) : value;
  4469. try {
  4470. return getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date);
  4471. }
  4472. catch (e) {
  4473. config.onError(utils.createError('Error formatting time.', e));
  4474. }
  4475. return [];
  4476. }
  4477. exports.formatTimeToParts = formatTimeToParts;
  4478. });
  4479. styleInject_es.unwrapExports(dateTime);
  4480. var dateTime_1 = dateTime.getFormatter;
  4481. var dateTime_2 = dateTime.formatDate;
  4482. var dateTime_3 = dateTime.formatTime;
  4483. var dateTime_4 = dateTime.formatDateToParts;
  4484. var dateTime_5 = dateTime.formatTimeToParts;
  4485. var plural = styleInject_es.createCommonjsModule(function (module, exports) {
  4486. Object.defineProperty(exports, "__esModule", { value: true });
  4487. var PLURAL_FORMAT_OPTIONS = [
  4488. 'localeMatcher',
  4489. 'type',
  4490. ];
  4491. function formatPlural(_a, getPluralRules, value, options) {
  4492. var locale = _a.locale, onError = _a.onError;
  4493. if (options === void 0) { options = {}; }
  4494. if (!Intl.PluralRules) {
  4495. onError(utils.createError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n"));
  4496. }
  4497. var filteredOptions = utils.filterProps(options, PLURAL_FORMAT_OPTIONS);
  4498. try {
  4499. return getPluralRules(locale, filteredOptions).select(value);
  4500. }
  4501. catch (e) {
  4502. onError(utils.createError('Error formatting plural.', e));
  4503. }
  4504. return 'other';
  4505. }
  4506. exports.formatPlural = formatPlural;
  4507. });
  4508. styleInject_es.unwrapExports(plural);
  4509. var plural_1 = plural.formatPlural;
  4510. var message = styleInject_es.createCommonjsModule(function (module, exports) {
  4511. /*
  4512. * Copyright 2015, Yahoo Inc.
  4513. * Copyrights licensed under the New BSD License.
  4514. * See the accompanying LICENSE file for terms.
  4515. */
  4516. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  4517. __assign = Object.assign || function(t) {
  4518. for (var s, i = 1, n = arguments.length; i < n; i++) {
  4519. s = arguments[i];
  4520. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  4521. t[p] = s[p];
  4522. }
  4523. return t;
  4524. };
  4525. return __assign.apply(this, arguments);
  4526. };
  4527. Object.defineProperty(exports, "__esModule", { value: true });
  4528. // Since rollup cannot deal with namespace being a function,
  4529. // this is to interop with TypeScript since `invariant`
  4530. // does not export a default
  4531. // https://github.com/rollup/rollup/issues/1267
  4532. var invariant = browser.default || browser;
  4533. function setTimeZoneInOptions(opts, timeZone) {
  4534. return Object.keys(opts).reduce(function (all, k) {
  4535. all[k] = __assign({ timeZone: timeZone }, opts[k]);
  4536. return all;
  4537. }, {});
  4538. }
  4539. function deepMergeOptions(opts1, opts2) {
  4540. var keys = Object.keys(__assign({}, opts1, opts2));
  4541. return keys.reduce(function (all, k) {
  4542. all[k] = __assign({}, (opts1[k] || {}), (opts2[k] || {}));
  4543. return all;
  4544. }, {});
  4545. }
  4546. function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
  4547. if (!timeZone) {
  4548. return f1;
  4549. }
  4550. var mfFormats = dist$3.default.formats;
  4551. return __assign({}, mfFormats, f1, { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });
  4552. }
  4553. function formatMessage(_a, state, messageDescriptor, values) {
  4554. var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, onError = _a.onError, timeZone = _a.timeZone;
  4555. if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
  4556. if (values === void 0) { values = {}; }
  4557. var id = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
  4558. // `id` is a required field of a Message Descriptor.
  4559. invariant(id, '[React Intl] An `id` must be provided to format a message.');
  4560. if (!id) {
  4561. throw new Error('[React Intl] An `id` must be provided to format a message.');
  4562. }
  4563. var message = messages && messages[id];
  4564. formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
  4565. defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
  4566. var formattedMessageParts = [];
  4567. if (message) {
  4568. try {
  4569. var formatter = state.getMessageFormat(message, locale, formats, {
  4570. formatters: state,
  4571. });
  4572. formattedMessageParts = formatter.formatHTMLMessage(values);
  4573. }
  4574. catch (e) {
  4575. onError(utils.createError("Error formatting message: \"" + id + "\" for locale: \"" + locale + "\"" +
  4576. (defaultMessage ? ', using default message as fallback.' : ''), e));
  4577. }
  4578. }
  4579. else {
  4580. // This prevents warnings from littering the console in development
  4581. // when no `messages` are passed into the <IntlProvider> for the
  4582. // default locale, and a default message is in the source.
  4583. if (!defaultMessage ||
  4584. (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
  4585. onError(utils.createError("Missing message: \"" + id + "\" for locale: \"" + locale + "\"" +
  4586. (defaultMessage ? ', using default message as fallback.' : '')));
  4587. }
  4588. }
  4589. if (!formattedMessageParts.length && defaultMessage) {
  4590. try {
  4591. var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);
  4592. formattedMessageParts = formatter.formatHTMLMessage(values);
  4593. }
  4594. catch (e) {
  4595. onError(utils.createError("Error formatting the default message for: \"" + id + "\"", e));
  4596. }
  4597. }
  4598. if (!formattedMessageParts.length) {
  4599. onError(utils.createError("Cannot format message: \"" + id + "\", " +
  4600. ("using message " + (message || defaultMessage ? 'source' : 'id') + " as fallback.")));
  4601. if (typeof message === 'string') {
  4602. return message || defaultMessage || id;
  4603. }
  4604. return defaultMessage || id;
  4605. }
  4606. if (formattedMessageParts.length === 1 &&
  4607. typeof formattedMessageParts[0] === 'string') {
  4608. return formattedMessageParts[0] || defaultMessage || id;
  4609. }
  4610. return formattedMessageParts;
  4611. }
  4612. exports.formatMessage = formatMessage;
  4613. function formatHTMLMessage(config, state, messageDescriptor, rawValues) {
  4614. if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
  4615. if (rawValues === void 0) { rawValues = {}; }
  4616. // Process all the values before they are used when formatting the ICU
  4617. // Message string. Since the formatted message might be injected via
  4618. // `innerHTML`, all String-based values need to be HTML-escaped.
  4619. var escapedValues = Object.keys(rawValues).reduce(function (escaped, name) {
  4620. var value = rawValues[name];
  4621. escaped[name] = typeof value === 'string' ? utils.escape(value) : value;
  4622. return escaped;
  4623. }, {});
  4624. return formatMessage(config, state, messageDescriptor, escapedValues);
  4625. }
  4626. exports.formatHTMLMessage = formatHTMLMessage;
  4627. });
  4628. styleInject_es.unwrapExports(message);
  4629. var message_1 = message.formatMessage;
  4630. var message_2 = message.formatHTMLMessage;
  4631. function shallowEqualObjects(objA, objB) {
  4632. if (objA === objB) {
  4633. return true;
  4634. }
  4635. if (!objA || !objB) {
  4636. return false;
  4637. }
  4638. var aKeys = Object.keys(objA);
  4639. var bKeys = Object.keys(objB);
  4640. var len = aKeys.length;
  4641. if (bKeys.length !== len) {
  4642. return false;
  4643. }
  4644. for (var i = 0; i < len; i++) {
  4645. var key = aKeys[i];
  4646. if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
  4647. return false;
  4648. }
  4649. }
  4650. return true;
  4651. }
  4652. var objects = shallowEqualObjects;
  4653. var list = styleInject_es.createCommonjsModule(function (module, exports) {
  4654. Object.defineProperty(exports, "__esModule", { value: true });
  4655. var LIST_FORMAT_OPTIONS = [
  4656. 'localeMatcher',
  4657. 'type',
  4658. 'style',
  4659. ];
  4660. var now = Date.now();
  4661. function generateToken(i) {
  4662. return now + "_" + i + "_" + now;
  4663. }
  4664. function formatList(_a, getListFormat, values, options) {
  4665. var locale = _a.locale, onError = _a.onError;
  4666. if (options === void 0) { options = {}; }
  4667. var ListFormat = Intl.ListFormat;
  4668. if (!ListFormat) {
  4669. onError(utils.createError("Intl.ListFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-listformat\"\n"));
  4670. }
  4671. var filteredOptions = utils.filterProps(options, LIST_FORMAT_OPTIONS);
  4672. try {
  4673. var richValues_1 = {};
  4674. var serializedValues = values.map(function (v, i) {
  4675. if (typeof v === 'object') {
  4676. var id = generateToken(i);
  4677. richValues_1[id] = v;
  4678. return id;
  4679. }
  4680. return String(v);
  4681. });
  4682. if (!Object.keys(richValues_1).length) {
  4683. return getListFormat(locale, filteredOptions).format(serializedValues);
  4684. }
  4685. var parts = getListFormat(locale, filteredOptions).formatToParts(serializedValues);
  4686. return parts.reduce(function (all, el) {
  4687. var val = el.value;
  4688. if (richValues_1[val]) {
  4689. all.push(richValues_1[val]);
  4690. }
  4691. else if (typeof all[all.length - 1] === 'string') {
  4692. all[all.length - 1] += val;
  4693. }
  4694. else {
  4695. all.push(val);
  4696. }
  4697. return all;
  4698. }, []);
  4699. }
  4700. catch (e) {
  4701. onError(utils.createError('Error formatting list.', e));
  4702. }
  4703. return values;
  4704. }
  4705. exports.formatList = formatList;
  4706. });
  4707. styleInject_es.unwrapExports(list);
  4708. var list_1 = list.formatList;
  4709. var provider = styleInject_es.createCommonjsModule(function (module, exports) {
  4710. /*
  4711. * Copyright 2015, Yahoo Inc.
  4712. * Copyrights licensed under the New BSD License.
  4713. * See the accompanying LICENSE file for terms.
  4714. */
  4715. var __extends = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__extends) || (function () {
  4716. var extendStatics = function (d, b) {
  4717. extendStatics = Object.setPrototypeOf ||
  4718. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4719. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  4720. return extendStatics(d, b);
  4721. };
  4722. return function (d, b) {
  4723. extendStatics(d, b);
  4724. function __() { this.constructor = d; }
  4725. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  4726. };
  4727. })();
  4728. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  4729. __assign = Object.assign || function(t) {
  4730. for (var s, i = 1, n = arguments.length; i < n; i++) {
  4731. s = arguments[i];
  4732. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  4733. t[p] = s[p];
  4734. }
  4735. return t;
  4736. };
  4737. return __assign.apply(this, arguments);
  4738. };
  4739. Object.defineProperty(exports, "__esModule", { value: true });
  4740. var shallowEquals = objects.default || objects;
  4741. function processIntlConfig(config) {
  4742. return {
  4743. locale: config.locale,
  4744. timeZone: config.timeZone,
  4745. formats: config.formats,
  4746. textComponent: config.textComponent,
  4747. messages: config.messages,
  4748. defaultLocale: config.defaultLocale,
  4749. defaultFormats: config.defaultFormats,
  4750. onError: config.onError,
  4751. };
  4752. }
  4753. /**
  4754. * Create intl object
  4755. * @param config intl config
  4756. * @param cache cache for formatter instances to prevent memory leak
  4757. */
  4758. function createIntl(config, cache) {
  4759. var formatters = utils.createFormatters(cache);
  4760. var resolvedConfig = __assign({}, utils.DEFAULT_INTL_CONFIG, config);
  4761. if (!resolvedConfig.locale ||
  4762. !dist$4.default(resolvedConfig.locale)) {
  4763. var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
  4764. if (typeof onError === 'function') {
  4765. onError(utils.createError("Missing locale data for locale: \"" + locale + "\". " +
  4766. ("Using default locale: \"" + defaultLocale + "\" as fallback.")));
  4767. }
  4768. // Since there's no registered locale data for `locale`, this will
  4769. // fallback to the `defaultLocale` to make sure things can render.
  4770. // The `messages` are overridden to the `defaultProps` empty object
  4771. // to maintain referential equality across re-renders. It's assumed
  4772. // each <FormattedMessage> contains a `defaultMessage` prop.
  4773. resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
  4774. }
  4775. return __assign({}, resolvedConfig, { formatters: formatters, formatNumber: number.formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: number.formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: relativeTime.formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: dateTime.formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: dateTime.formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: dateTime.formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: dateTime.formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: plural.formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: message.formatMessage.bind(null, resolvedConfig, formatters), formatHTMLMessage: message.formatHTMLMessage.bind(null, resolvedConfig, formatters), formatList: list.formatList.bind(null, resolvedConfig, formatters.getListFormat) });
  4776. }
  4777. exports.createIntl = createIntl;
  4778. var IntlProvider = /** @class */ (function (_super) {
  4779. __extends(IntlProvider, _super);
  4780. function IntlProvider() {
  4781. var _this = _super !== null && _super.apply(this, arguments) || this;
  4782. _this.cache = utils.createIntlCache();
  4783. _this.state = {
  4784. cache: _this.cache,
  4785. intl: createIntl(processIntlConfig(_this.props), _this.cache),
  4786. prevConfig: processIntlConfig(_this.props),
  4787. };
  4788. return _this;
  4789. }
  4790. IntlProvider.getDerivedStateFromProps = function (props, _a) {
  4791. var prevConfig = _a.prevConfig, cache = _a.cache;
  4792. var config = processIntlConfig(props);
  4793. if (!shallowEquals(prevConfig, config)) {
  4794. return {
  4795. intl: createIntl(config, cache),
  4796. prevConfig: config,
  4797. };
  4798. }
  4799. return null;
  4800. };
  4801. IntlProvider.prototype.render = function () {
  4802. utils.invariantIntlContext(this.state.intl);
  4803. return React__default.createElement(injectIntl_1.Provider, { value: this.state.intl }, this.props.children);
  4804. };
  4805. IntlProvider.displayName = 'IntlProvider';
  4806. IntlProvider.defaultProps = utils.DEFAULT_INTL_CONFIG;
  4807. return IntlProvider;
  4808. }(React__default.PureComponent));
  4809. exports.default = IntlProvider;
  4810. });
  4811. styleInject_es.unwrapExports(provider);
  4812. var provider_1 = provider.createIntl;
  4813. var relative = styleInject_es.createCommonjsModule(function (module, exports) {
  4814. var __extends = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__extends) || (function () {
  4815. var extendStatics = function (d, b) {
  4816. extendStatics = Object.setPrototypeOf ||
  4817. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4818. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  4819. return extendStatics(d, b);
  4820. };
  4821. return function (d, b) {
  4822. extendStatics(d, b);
  4823. function __() { this.constructor = d; }
  4824. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  4825. };
  4826. })();
  4827. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  4828. __assign = Object.assign || function(t) {
  4829. for (var s, i = 1, n = arguments.length; i < n; i++) {
  4830. s = arguments[i];
  4831. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  4832. t[p] = s[p];
  4833. }
  4834. return t;
  4835. };
  4836. return __assign.apply(this, arguments);
  4837. };
  4838. Object.defineProperty(exports, "__esModule", { value: true });
  4839. /*
  4840. * Copyright 2015, Yahoo Inc.
  4841. * Copyrights licensed under the New BSD License.
  4842. * See the accompanying LICENSE file for terms.
  4843. */
  4844. // Since rollup cannot deal with namespace being a function,
  4845. // this is to interop with TypeScript since `invariant`
  4846. // does not export a default
  4847. // https://github.com/rollup/rollup/issues/1267
  4848. var invariant = browser.default || browser;
  4849. var MINUTE = 60;
  4850. var HOUR = 60 * 60;
  4851. var DAY = 60 * 60 * 24;
  4852. function selectUnit(seconds) {
  4853. var absValue = Math.abs(seconds);
  4854. if (absValue < MINUTE) {
  4855. return 'second';
  4856. }
  4857. if (absValue < HOUR) {
  4858. return 'minute';
  4859. }
  4860. if (absValue < DAY) {
  4861. return 'hour';
  4862. }
  4863. return 'day';
  4864. }
  4865. function getDurationInSeconds(unit) {
  4866. switch (unit) {
  4867. case 'second':
  4868. return 1;
  4869. case 'minute':
  4870. return MINUTE;
  4871. case 'hour':
  4872. return HOUR;
  4873. default:
  4874. return DAY;
  4875. }
  4876. }
  4877. function valueToSeconds(value, unit) {
  4878. if (!value) {
  4879. return 0;
  4880. }
  4881. switch (unit) {
  4882. case 'second':
  4883. return value;
  4884. case 'minute':
  4885. return value * MINUTE;
  4886. default:
  4887. return value * HOUR;
  4888. }
  4889. }
  4890. var INCREMENTABLE_UNITS = ['second', 'minute', 'hour'];
  4891. function canIncrement(unit) {
  4892. if (unit === void 0) { unit = 'second'; }
  4893. return INCREMENTABLE_UNITS.includes(unit);
  4894. }
  4895. function verifyProps(updateIntervalInSeconds, unit) {
  4896. invariant(!updateIntervalInSeconds || (updateIntervalInSeconds && canIncrement(unit)), 'Cannot schedule update with unit longer than hour');
  4897. }
  4898. var FormattedRelativeTime = /** @class */ (function (_super) {
  4899. __extends(FormattedRelativeTime, _super);
  4900. function FormattedRelativeTime(props) {
  4901. var _this = _super.call(this, props) || this;
  4902. // Public for testing
  4903. _this._updateTimer = null;
  4904. _this.state = {
  4905. prevUnit: _this.props.unit,
  4906. prevValue: _this.props.value,
  4907. currentValueInSeconds: canIncrement(_this.props.unit)
  4908. ? valueToSeconds(_this.props.value, _this.props.unit)
  4909. : 0,
  4910. };
  4911. verifyProps(props.updateIntervalInSeconds, props.unit);
  4912. return _this;
  4913. }
  4914. FormattedRelativeTime.prototype.scheduleNextUpdate = function (_a, _b) {
  4915. var _this = this;
  4916. var updateIntervalInSeconds = _a.updateIntervalInSeconds, unit = _a.unit;
  4917. var currentValueInSeconds = _b.currentValueInSeconds;
  4918. clearTimeout(this._updateTimer);
  4919. this._updateTimer = null;
  4920. // If there's no interval and we cannot increment this unit, do nothing
  4921. if (!updateIntervalInSeconds || !canIncrement(unit)) {
  4922. return;
  4923. }
  4924. // Figure out the next interesting time
  4925. var nextValueInSeconds = currentValueInSeconds - updateIntervalInSeconds;
  4926. var nextUnit = selectUnit(nextValueInSeconds);
  4927. // We've reached the max auto incrementable unit, don't schedule another update
  4928. if (nextUnit === 'day') {
  4929. return;
  4930. }
  4931. var unitDuration = getDurationInSeconds(nextUnit);
  4932. var remainder = nextValueInSeconds % unitDuration;
  4933. var prevInterestingValueInSeconds = nextValueInSeconds - remainder;
  4934. var nextInterestingValueInSeconds = prevInterestingValueInSeconds >= currentValueInSeconds
  4935. ? prevInterestingValueInSeconds - unitDuration
  4936. : prevInterestingValueInSeconds;
  4937. var delayInSeconds = Math.abs(nextInterestingValueInSeconds - currentValueInSeconds);
  4938. this._updateTimer = setTimeout(function () {
  4939. return _this.setState({
  4940. currentValueInSeconds: nextInterestingValueInSeconds,
  4941. });
  4942. }, delayInSeconds * 1e3);
  4943. };
  4944. FormattedRelativeTime.prototype.componentDidMount = function () {
  4945. this.scheduleNextUpdate(this.props, this.state);
  4946. };
  4947. FormattedRelativeTime.prototype.componentDidUpdate = function () {
  4948. this.scheduleNextUpdate(this.props, this.state);
  4949. };
  4950. FormattedRelativeTime.prototype.componentWillUnmount = function () {
  4951. clearTimeout(this._updateTimer);
  4952. this._updateTimer = null;
  4953. };
  4954. FormattedRelativeTime.getDerivedStateFromProps = function (props, state) {
  4955. if (props.unit !== state.prevUnit || props.value !== state.prevValue) {
  4956. return {
  4957. prevValue: props.value,
  4958. prevUnit: props.unit,
  4959. currentValueInSeconds: canIncrement(props.unit)
  4960. ? valueToSeconds(props.value, props.unit)
  4961. : 0,
  4962. };
  4963. }
  4964. return null;
  4965. };
  4966. FormattedRelativeTime.prototype.render = function () {
  4967. var _this = this;
  4968. return (React__default.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
  4969. utils.invariantIntlContext(intl);
  4970. var formatRelativeTime = intl.formatRelativeTime, Text = intl.textComponent;
  4971. var _a = _this.props, children = _a.children, value = _a.value, unit = _a.unit, updateIntervalInSeconds = _a.updateIntervalInSeconds;
  4972. var currentValueInSeconds = _this.state.currentValueInSeconds;
  4973. var currentValue = value || 0;
  4974. var currentUnit = unit;
  4975. if (canIncrement(unit) &&
  4976. typeof currentValueInSeconds === 'number' &&
  4977. updateIntervalInSeconds) {
  4978. currentUnit = selectUnit(currentValueInSeconds);
  4979. var unitDuration = getDurationInSeconds(currentUnit);
  4980. currentValue = Math.round(currentValueInSeconds / unitDuration);
  4981. }
  4982. var formattedRelativeTime = formatRelativeTime(currentValue, currentUnit, __assign({}, _this.props));
  4983. if (typeof children === 'function') {
  4984. return children(formattedRelativeTime);
  4985. }
  4986. if (Text) {
  4987. return React__default.createElement(Text, null, formattedRelativeTime);
  4988. }
  4989. return formattedRelativeTime;
  4990. }));
  4991. };
  4992. FormattedRelativeTime.displayName = 'FormattedRelativeTime';
  4993. FormattedRelativeTime.defaultProps = {
  4994. value: 0,
  4995. unit: 'second',
  4996. };
  4997. return FormattedRelativeTime;
  4998. }(React__default.PureComponent));
  4999. exports.FormattedRelativeTime = FormattedRelativeTime;
  5000. exports.default = FormattedRelativeTime;
  5001. });
  5002. styleInject_es.unwrapExports(relative);
  5003. var relative_1 = relative.FormattedRelativeTime;
  5004. var plural$1 = styleInject_es.createCommonjsModule(function (module, exports) {
  5005. /*
  5006. * Copyright 2015, Yahoo Inc.
  5007. * Copyrights licensed under the New BSD License.
  5008. * See the accompanying LICENSE file for terms.
  5009. */
  5010. Object.defineProperty(exports, "__esModule", { value: true });
  5011. var FormattedPlural = function (props) {
  5012. var value = props.value, other = props.other, children = props.children, _a = props.intl, formatPlural = _a.formatPlural, Text = _a.textComponent;
  5013. var pluralCategory = formatPlural(value, props);
  5014. var formattedPlural = props[pluralCategory] || other;
  5015. if (typeof children === 'function') {
  5016. return children(formattedPlural);
  5017. }
  5018. if (Text) {
  5019. return React__default.createElement(Text, null, formattedPlural);
  5020. }
  5021. // Work around @types/react where React.FC cannot return string
  5022. return formattedPlural;
  5023. };
  5024. FormattedPlural.defaultProps = {
  5025. type: 'cardinal',
  5026. };
  5027. FormattedPlural.displayName = 'FormattedPlural';
  5028. exports.default = injectIntl_1.default(FormattedPlural);
  5029. });
  5030. styleInject_es.unwrapExports(plural$1);
  5031. var message$1 = styleInject_es.createCommonjsModule(function (module, exports) {
  5032. /*
  5033. * Copyright 2015, Yahoo Inc.
  5034. * Copyrights licensed under the New BSD License.
  5035. * See the accompanying LICENSE file for terms.
  5036. */
  5037. var __extends = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__extends) || (function () {
  5038. var extendStatics = function (d, b) {
  5039. extendStatics = Object.setPrototypeOf ||
  5040. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  5041. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5042. return extendStatics(d, b);
  5043. };
  5044. return function (d, b) {
  5045. extendStatics(d, b);
  5046. function __() { this.constructor = d; }
  5047. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  5048. };
  5049. })();
  5050. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  5051. __assign = Object.assign || function(t) {
  5052. for (var s, i = 1, n = arguments.length; i < n; i++) {
  5053. s = arguments[i];
  5054. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  5055. t[p] = s[p];
  5056. }
  5057. return t;
  5058. };
  5059. return __assign.apply(this, arguments);
  5060. };
  5061. var __rest = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__rest) || function (s, e) {
  5062. var t = {};
  5063. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  5064. t[p] = s[p];
  5065. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  5066. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
  5067. t[p[i]] = s[p[i]];
  5068. return t;
  5069. };
  5070. Object.defineProperty(exports, "__esModule", { value: true });
  5071. var shallowEquals = objects.default || objects;
  5072. var defaultFormatMessage = function (descriptor, values) {
  5073. if (process.env.NODE_ENV !== 'production') {
  5074. console.error('[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry. Using default message as fallback.');
  5075. }
  5076. return message.formatMessage(__assign({}, utils.DEFAULT_INTL_CONFIG, { locale: 'en' }), utils.createFormatters(), descriptor, values);
  5077. };
  5078. var FormattedMessage = /** @class */ (function (_super) {
  5079. __extends(FormattedMessage, _super);
  5080. function FormattedMessage() {
  5081. return _super !== null && _super.apply(this, arguments) || this;
  5082. }
  5083. FormattedMessage.prototype.shouldComponentUpdate = function (nextProps) {
  5084. var _a = this.props, values = _a.values, otherProps = __rest(_a, ["values"]);
  5085. var nextValues = nextProps.values, nextOtherProps = __rest(nextProps, ["values"]);
  5086. return (!shallowEquals(nextValues, values) ||
  5087. !shallowEquals(otherProps, nextOtherProps));
  5088. };
  5089. FormattedMessage.prototype.render = function () {
  5090. var _this = this;
  5091. return (React__default.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
  5092. if (!_this.props.defaultMessage) {
  5093. utils.invariantIntlContext(intl);
  5094. }
  5095. var _a = intl || {}, _b = _a.formatMessage, formatMessage = _b === void 0 ? defaultFormatMessage : _b, _c = _a.textComponent, Text = _c === void 0 ? React__default.Fragment : _c;
  5096. var _d = _this.props, id = _d.id, description = _d.description, defaultMessage = _d.defaultMessage, values = _d.values, children = _d.children, _e = _d.tagName, Component = _e === void 0 ? Text : _e;
  5097. var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
  5098. var nodes = formatMessage(descriptor, values);
  5099. if (!Array.isArray(nodes)) {
  5100. nodes = [nodes];
  5101. }
  5102. if (typeof children === 'function') {
  5103. return children.apply(void 0, nodes);
  5104. }
  5105. if (Component) {
  5106. // Needs to use `createElement()` instead of JSX, otherwise React will
  5107. // warn about a missing `key` prop with rich-text message formatting.
  5108. return React__default.createElement.apply(React__default, [Component, null].concat(nodes));
  5109. }
  5110. return nodes;
  5111. }));
  5112. };
  5113. FormattedMessage.displayName = 'FormattedMessage';
  5114. FormattedMessage.defaultProps = {
  5115. values: {},
  5116. };
  5117. return FormattedMessage;
  5118. }(React__default.Component));
  5119. exports.default = FormattedMessage;
  5120. });
  5121. styleInject_es.unwrapExports(message$1);
  5122. var htmlMessage = styleInject_es.createCommonjsModule(function (module, exports) {
  5123. /*
  5124. * Copyright 2015, Yahoo Inc.
  5125. * Copyrights licensed under the New BSD License.
  5126. * See the accompanying LICENSE file for terms.
  5127. */
  5128. var __extends = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__extends) || (function () {
  5129. var extendStatics = function (d, b) {
  5130. extendStatics = Object.setPrototypeOf ||
  5131. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  5132. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5133. return extendStatics(d, b);
  5134. };
  5135. return function (d, b) {
  5136. extendStatics(d, b);
  5137. function __() { this.constructor = d; }
  5138. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  5139. };
  5140. })();
  5141. var __assign = (styleInject_es.commonjsGlobal && styleInject_es.commonjsGlobal.__assign) || function () {
  5142. __assign = Object.assign || function(t) {
  5143. for (var s, i = 1, n = arguments.length; i < n; i++) {
  5144. s = arguments[i];
  5145. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
  5146. t[p] = s[p];
  5147. }
  5148. return t;
  5149. };
  5150. return __assign.apply(this, arguments);
  5151. };
  5152. Object.defineProperty(exports, "__esModule", { value: true });
  5153. var FormattedHTMLMessage = /** @class */ (function (_super) {
  5154. __extends(FormattedHTMLMessage, _super);
  5155. function FormattedHTMLMessage() {
  5156. return _super !== null && _super.apply(this, arguments) || this;
  5157. }
  5158. FormattedHTMLMessage.prototype.render = function () {
  5159. var _this = this;
  5160. return (React__default.createElement(injectIntl_1.Context.Consumer, null, function (intl) {
  5161. if (!_this.props.defaultMessage) {
  5162. utils.invariantIntlContext(intl);
  5163. }
  5164. var formatHTMLMessage = intl.formatHTMLMessage, textComponent = intl.textComponent;
  5165. var _a = _this.props, id = _a.id, description = _a.description, defaultMessage = _a.defaultMessage, rawValues = _a.values, children = _a.children;
  5166. var Component = _this.props.tagName;
  5167. // This is bc of TS3.3 doesn't recognize `defaultProps`
  5168. if (!Component) {
  5169. Component = textComponent || 'span';
  5170. }
  5171. var descriptor = { id: id, description: description, defaultMessage: defaultMessage };
  5172. var formattedHTMLMessage = formatHTMLMessage(descriptor, rawValues);
  5173. if (typeof children === 'function') {
  5174. return children(formattedHTMLMessage);
  5175. }
  5176. // Since the message presumably has HTML in it, we need to set
  5177. // `innerHTML` in order for it to be rendered and not escaped by React.
  5178. // To be safe, all string prop values were escaped when formatting the
  5179. // message. It is assumed that the message is not UGC, and came from the
  5180. // developer making it more like a template.
  5181. //
  5182. // Note: There's a perf impact of using this component since there's no
  5183. // way for React to do its virtual DOM diffing.
  5184. var html = { __html: formattedHTMLMessage };
  5185. return React__default.createElement(Component, { dangerouslySetInnerHTML: html });
  5186. }));
  5187. };
  5188. FormattedHTMLMessage.displayName = 'FormattedHTMLMessage';
  5189. FormattedHTMLMessage.defaultProps = __assign({}, message$1.default.defaultProps, { tagName: 'span' });
  5190. return FormattedHTMLMessage;
  5191. }(message$1.default));
  5192. exports.default = FormattedHTMLMessage;
  5193. });
  5194. styleInject_es.unwrapExports(htmlMessage);
  5195. var dist$5 = styleInject_es.createCommonjsModule(function (module, exports) {
  5196. Object.defineProperty(exports, "__esModule", { value: true });
  5197. exports.defineMessages = dist.defineMessages;
  5198. exports.injectIntl = injectIntl_1.default;
  5199. exports.RawIntlProvider = injectIntl_1.Provider;
  5200. exports.IntlContext = injectIntl_1.Context;
  5201. exports.useIntl = useIntl_1.default;
  5202. exports.IntlProvider = provider.default;
  5203. exports.createIntl = provider.createIntl;
  5204. // IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./types').CustomFormatConfig`
  5205. exports.FormattedDate = createFormattedComponent_1.createFormattedComponent('formatDate');
  5206. exports.FormattedTime = createFormattedComponent_1.createFormattedComponent('formatTime');
  5207. exports.FormattedNumber = createFormattedComponent_1.createFormattedComponent('formatNumber');
  5208. exports.FormattedList = createFormattedComponent_1.createFormattedComponent('formatList');
  5209. exports.FormattedDateParts = createFormattedComponent_1.createFormattedDateTimePartsComponent('formatDate');
  5210. exports.FormattedTimeParts = createFormattedComponent_1.createFormattedDateTimePartsComponent('formatTime');
  5211. var createFormattedComponent_2 = createFormattedComponent_1;
  5212. exports.FormattedNumberParts = createFormattedComponent_2.FormattedNumberParts;
  5213. exports.FormattedRelativeTime = relative.default;
  5214. exports.FormattedPlural = plural$1.default;
  5215. exports.FormattedMessage = message$1.default;
  5216. exports.FormattedHTMLMessage = htmlMessage.default;
  5217. exports.createIntlCache = utils.createIntlCache;
  5218. });
  5219. styleInject_es.unwrapExports(dist$5);
  5220. var dist_1$2 = dist$5.defineMessages;
  5221. var dist_2$1 = dist$5.injectIntl;
  5222. var dist_3 = dist$5.RawIntlProvider;
  5223. var dist_4 = dist$5.IntlContext;
  5224. var dist_5 = dist$5.useIntl;
  5225. var dist_6 = dist$5.IntlProvider;
  5226. var dist_7 = dist$5.createIntl;
  5227. var dist_8 = dist$5.FormattedDate;
  5228. var dist_9 = dist$5.FormattedTime;
  5229. var dist_10 = dist$5.FormattedNumber;
  5230. var dist_11 = dist$5.FormattedList;
  5231. var dist_12 = dist$5.FormattedDateParts;
  5232. var dist_13 = dist$5.FormattedTimeParts;
  5233. var dist_14 = dist$5.FormattedNumberParts;
  5234. var dist_15 = dist$5.FormattedRelativeTime;
  5235. var dist_16 = dist$5.FormattedPlural;
  5236. var dist_17 = dist$5.FormattedMessage;
  5237. var dist_18 = dist$5.FormattedHTMLMessage;
  5238. var dist_19 = dist$5.createIntlCache;
  5239. const img$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAABECAYAAAAGGj65AAAXgklEQVR4Xu1deXwc1ZH+qufSjbFlbHwbX4C57QDTPZJakg8MxECICQSShUCcDfAjLOQAFoiBEEgWNtmwAcIZJwQI5ohtgk9pRpa6RSAQwCaAuWxsZGMZbEvWNUfX/l7L48z0jGa6RzKyvOr/pK5Xr169b+q9V1WvmjD4DGqgHzVA/dj3YNeDGsAgAAdB0K8aGARgv6p/sPNBAA5ioF81MAjAflX/YOdpASjXtFb5XLjlk/bYzOYuFLREDOmgVBURl3rJGJlHrZOLXfX5bs+NT53qe/uglHVQqLQaSAbg8pbSk3xY+8bu6IkDUV8+F3HVEZ7VK7YVnoULKDYQx/D/Teb9AJy8snX63kjsb9s7jMKBroQZQ93bDx9SfPTambRnoI/lUJe/G4Av7Boy0k2bt3cYJYfKgJVS90daVcmkAzUeVVVLARQJ/l7DMPXoYt67or6++UD1eTDxnRUIHBVlPiJFJo9nUygU2m5XVlNxJ65pqX1zV7TSbqOBQnfJBO//PHFq0bV9LW+lLJ9jgJ8HkLw3JjxZpzVe3Nv+5s2b52tv2f0OgQ5P5EXgh4Na44+d8K8qKzvFMGI3JbfhnSGt8d+d8LHSVsryYwb4shQeJF1Xp2m/ssubip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81UjEmgGmUFz1KIZFLBYgWfQDwtu8Az65rAF/msOYgYbWu6gjPNg33IHHRh1fdsddGC/F8mgJbPDHXEHkWbLCTrPIDkj4rukFGHVwNMPrEUEySN14YO1KAFceZQi2uwdxfq02ZIsvKXNFiQMMshMzY5DEl4wuyDhnF6LloSzFWaDtTDA7NhzgN3MBobl0pIYtq8keZPv9HECNQA+usBHPGB5qgDsu8Chy1pAiemUxQrYzWyviN8l6I/T+wU2HDmgaaHs/gAAAABJRU5ErkJggg==';
  5245. var css$1 = ".PayPlatformOptions_flexContainer__1-MCg {\n display: flex;\n justify-content: space-around;\n align-items: center;\n}\n.PayPlatformOptions_label__1E4pz {\n font-size: 14px;\n font-weight: 400;\n color: #616A79;\n}\n.PayPlatformOptions_payment-method-box__Iiao- {\n padding: 20px 10px 10px 10px;\n text-align: center;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payment-method__3fVWP {\n display: inline-block;\n margin: 0;\n width: 60%;\n vertical-align: middle;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payment-method-before__2Lu24 {\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payitem__2o3qS {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n border: 1px solid transparent;\n height: 66px;\n line-height: 66px;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payitem__2o3qS .PayPlatformOptions_platformName__2VrlA {\n text-align: center;\n white-space: nowrap;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payitem__2o3qS.PayPlatformOptions_small__kkYKV {\n width: 88px;\n height: 36px;\n line-height: 36px;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payitem__2o3qS.PayPlatformOptions_small__kkYKV .PayPlatformOptions_payment-method__3fVWP {\n margin: 0;\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payitem__2o3qS.PayPlatformOptions_active__3uZ7L {\n border-radius: 5px;\n border-color: #1790FF;\n box-shadow: 0px 2px 6px 0px rgba(163, 163, 163, 0.3);\n}\n.PayPlatformOptions_payment-method-box__Iiao- .PayPlatformOptions_payitem__2o3qS.PayPlatformOptions_en__2udua {\n font-size: 12px;\n}\n.PayPlatformOptions_payment-method-box__Iiao-.PayPlatformOptions_mobile__XZq_G {\n padding: 8px 10px 10px 8px;\n}\n.PayPlatformOptions_payment-method-box__Iiao-.PayPlatformOptions_mobile__XZq_G .PayPlatformOptions_payitem__2o3qS {\n display: inline-block;\n width: 78px;\n height: 80px;\n border: 1px solid transparent;\n}\n.PayPlatformOptions_payment-method-box__Iiao-.PayPlatformOptions_mobile__XZq_G .PayPlatformOptions_payitem__2o3qS.PayPlatformOptions_active__3uZ7L {\n border-radius: 4px;\n border-color: #1790FF;\n}\n.PayPlatformOptions_payment-method-box__Iiao-.PayPlatformOptions_mobile__XZq_G .PayPlatformOptions_payitem__2o3qS .PayPlatformOptions_payment-method__3fVWP {\n display: inline-block;\n width: 34px;\n height: 34px;\n}\n@media (max-width: 768px) {\n .PayPlatformOptions_payitem__2o3qS {\n cursor: pointer;\n border: 1px solid transparent;\n }\n .PayPlatformOptions_payitem__2o3qS.PayPlatformOptions_active__3uZ7L {\n border-radius: 5px;\n border-color: #1790FF;\n }\n}\n";
  5246. var styles$1 = {"flexContainer":"PayPlatformOptions_flexContainer__1-MCg","label":"PayPlatformOptions_label__1E4pz","payment-method-box":"PayPlatformOptions_payment-method-box__Iiao-","payment-method":"PayPlatformOptions_payment-method__3fVWP","payment-method-before":"PayPlatformOptions_payment-method-before__2Lu24","payitem":"PayPlatformOptions_payitem__2o3qS","platformName":"PayPlatformOptions_platformName__2VrlA","small":"PayPlatformOptions_small__kkYKV","active":"PayPlatformOptions_active__3uZ7L","en":"PayPlatformOptions_en__2udua","mobile":"PayPlatformOptions_mobile__XZq_G","paymentMethodBox":"PayPlatformOptions_payment-method-box__Iiao-","paymentMethod":"PayPlatformOptions_payment-method__3fVWP","paymentMethodBefore":"PayPlatformOptions_payment-method-before__2Lu24"};
  5247. styleInject_es.styleInject(css$1);
  5248. var PAY_CHANNEL = {
  5249. PAYPAL: "PAYPAL_PAYPAL",
  5250. // PAYPAL_LIVE
  5251. ALI_WEB: "ALI_WEB",
  5252. ALI_WAP: "ALI_WAP",
  5253. WX_WAP: "WX_WAP",
  5254. WX_NATIVE: "WX_NATIVE"
  5255. };
  5256. var PayPlatformOptions =
  5257. /*#__PURE__*/
  5258. function (_PureComponent) {
  5259. styleInject_es._inherits(PayPlatformOptions, _PureComponent);
  5260. function PayPlatformOptions() {
  5261. styleInject_es._classCallCheck(this, PayPlatformOptions);
  5262. return styleInject_es._possibleConstructorReturn(this, styleInject_es._getPrototypeOf(PayPlatformOptions).apply(this, arguments));
  5263. }
  5264. styleInject_es._createClass(PayPlatformOptions, [{
  5265. key: "render",
  5266. value: function render() {
  5267. var _classnames5, _classnames6, _classnames7;
  5268. var _this$props = this.props,
  5269. payitem = _this$props.payitem,
  5270. onPayItemChange = _this$props.onPayItemChange,
  5271. _this$props$isMobile = _this$props.isMobile,
  5272. isMobile = _this$props$isMobile === void 0 ? false : _this$props$isMobile,
  5273. _this$props$size = _this$props.size,
  5274. size = _this$props$size === void 0 ? "normal" : _this$props$size,
  5275. _this$props$withTitle = _this$props.withTitle,
  5276. withTitle = _this$props$withTitle === void 0 ? true : _this$props$withTitle,
  5277. _this$props$locale = _this$props.locale,
  5278. locale = _this$props$locale === void 0 ? "zh" : _this$props$locale;
  5279. var titleDOM = null;
  5280. if (withTitle) {
  5281. titleDOM = React__default.createElement("div", {
  5282. className: styles$1.label
  5283. }, React__default.createElement(dist_17, {
  5284. id: "pay.channel.select.text"
  5285. }));
  5286. }
  5287. if (isMobile) {
  5288. var _classnames2, _classnames3, _classnames4;
  5289. return React__default.createElement("div", null, titleDOM, React__default.createElement("div", {
  5290. className: styleInject_es.classnames(styles$1["payment-method-box"], styleInject_es._defineProperty({}, styles$1.mobile, isMobile))
  5291. }, React__default.createElement("div", {
  5292. className: styles$1.flexContainer
  5293. }, React__default.createElement("div", {
  5294. className: styles$1.flexItem
  5295. }, React__default.createElement("div", {
  5296. className: styleInject_es.classnames((_classnames2 = {}, styleInject_es._defineProperty(_classnames2, styles$1.payitem, true), styleInject_es._defineProperty(_classnames2, styles$1.active, payitem === PAY_CHANNEL.ALI_WEB), styleInject_es._defineProperty(_classnames2, styles$1.small, size === "small"), _classnames2), styles$1[locale]),
  5297. onClick: function onClick() {
  5298. onPayItemChange(PAY_CHANNEL.ALI_WEB);
  5299. }
  5300. }, React__default.createElement("img", {
  5301. src: img$4,
  5302. alt: "alipay",
  5303. className: styles$1["payment-method"]
  5304. }), React__default.createElement("div", {
  5305. className: styles$1.platformName
  5306. }, React__default.createElement(dist_17, {
  5307. id: "pay.channel.ali"
  5308. })))), React__default.createElement("div", {
  5309. className: styles$1.flexItem
  5310. }, React__default.createElement("div", {
  5311. className: styleInject_es.classnames((_classnames3 = {}, styleInject_es._defineProperty(_classnames3, styles$1.payitem, true), styleInject_es._defineProperty(_classnames3, styles$1.active, payitem === PAY_CHANNEL.WX_NATIVE), styleInject_es._defineProperty(_classnames3, styles$1.small, size === "small"), _classnames3), styles$1[locale]),
  5312. onClick: function onClick() {
  5313. onPayItemChange(PAY_CHANNEL.WX_NATIVE);
  5314. }
  5315. }, React__default.createElement("img", {
  5316. src: img$5,
  5317. alt: "wechatpay",
  5318. className: styles$1["payment-method"]
  5319. }), React__default.createElement("div", {
  5320. className: styles$1.platformName
  5321. }, React__default.createElement(dist_17, {
  5322. id: "pay.channel.wechat"
  5323. })))), React__default.createElement("div", {
  5324. className: styles$1.flexItem
  5325. }, React__default.createElement("div", {
  5326. className: styleInject_es.classnames((_classnames4 = {}, styleInject_es._defineProperty(_classnames4, styles$1.payitem, true), styleInject_es._defineProperty(_classnames4, styles$1.active, payitem === PAY_CHANNEL.PAYPAL), styleInject_es._defineProperty(_classnames4, styles$1.small, size === "small"), _classnames4), styles$1[locale]),
  5327. onClick: function onClick() {
  5328. onPayItemChange(PAY_CHANNEL.PAYPAL);
  5329. }
  5330. }, React__default.createElement("img", {
  5331. src: img$6,
  5332. alt: "paypal",
  5333. className: styles$1["payment-method"]
  5334. }), React__default.createElement("div", {
  5335. className: styles$1.platformName
  5336. }, React__default.createElement(dist_17, {
  5337. id: "pay.channel.paypal"
  5338. })))))));
  5339. }
  5340. return React__default.createElement("div", null, titleDOM, React__default.createElement("div", {
  5341. className: styles$1["payment-method-box"]
  5342. }, React__default.createElement("div", {
  5343. className: styles$1.flexContainer
  5344. }, React__default.createElement("div", {
  5345. className: styles$1.flexItem
  5346. }, React__default.createElement("div", {
  5347. className: styleInject_es.classnames((_classnames5 = {}, styleInject_es._defineProperty(_classnames5, styles$1.payitem, true), styleInject_es._defineProperty(_classnames5, styles$1.active, payitem === PAY_CHANNEL.ALI_WEB), styleInject_es._defineProperty(_classnames5, styles$1.small, size === "small"), _classnames5), styles$1[locale]),
  5348. onClick: function onClick() {
  5349. onPayItemChange(PAY_CHANNEL.ALI_WEB);
  5350. }
  5351. }, React__default.createElement("span", {
  5352. className: styles$1["payment-method-before"]
  5353. }), React__default.createElement("img", {
  5354. src: img$1,
  5355. alt: "alipay",
  5356. className: styles$1["payment-method"]
  5357. }))), React__default.createElement("div", {
  5358. className: styles$1.flexItem
  5359. }, React__default.createElement("div", {
  5360. className: styleInject_es.classnames((_classnames6 = {}, styleInject_es._defineProperty(_classnames6, styles$1.payitem, true), styleInject_es._defineProperty(_classnames6, styles$1.active, payitem === PAY_CHANNEL.WX_NATIVE), styleInject_es._defineProperty(_classnames6, styles$1.small, size === "small"), _classnames6), styles$1[locale]),
  5361. onClick: function onClick() {
  5362. onPayItemChange(PAY_CHANNEL.WX_NATIVE);
  5363. }
  5364. }, React__default.createElement("span", {
  5365. className: styles$1["payment-method-before"]
  5366. }), React__default.createElement("img", {
  5367. src: img$2,
  5368. alt: "wechatpay",
  5369. className: styles$1["payment-method"]
  5370. }))), React__default.createElement("div", {
  5371. className: styles$1.flexItem
  5372. }, React__default.createElement("div", {
  5373. className: styleInject_es.classnames((_classnames7 = {}, styleInject_es._defineProperty(_classnames7, styles$1.payitem, true), styleInject_es._defineProperty(_classnames7, styles$1.active, payitem === PAY_CHANNEL.PAYPAL), styleInject_es._defineProperty(_classnames7, styles$1.small, size === "small"), _classnames7), styles$1[locale]),
  5374. onClick: function onClick() {
  5375. onPayItemChange(PAY_CHANNEL.PAYPAL);
  5376. }
  5377. }, React__default.createElement("span", {
  5378. className: styles$1["payment-method-before"]
  5379. }), React__default.createElement("img", {
  5380. src: img$3,
  5381. alt: "paypal",
  5382. className: styles$1["payment-method"]
  5383. }))))));
  5384. }
  5385. }]);
  5386. return PayPlatformOptions;
  5387. }(React.PureComponent);
  5388. var css$2 = ".PriceOptions_options__iSN_S {\n padding: 20px 50px;\n border-bottom: 1px dashed #00000017;\n}\n.PriceOptions_options__iSN_S p {\n font-size: 14px;\n font-weight: 400;\n color: #616a79;\n margin-bottom: 20px;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD {\n padding-right: 0;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceItem__3ahwJ {\n background: rgba(243, 243, 243, 0.14);\n border-radius: 4px;\n border: 1px solid #cfcfcf;\n font-size: 14px;\n font-weight: 600;\n color: #616a79;\n display: inline-block;\n text-align: center;\n vertical-align: top;\n height: 30px;\n width: 70px;\n line-height: 30px;\n cursor: pointer;\n margin: 6px;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceItem__3ahwJ.PriceOptions_active__3cl1G {\n background: rgba(255, 50, 102, 0.1);\n border-radius: 4px;\n border: 1px solid #ff3266;\n color: #616a79;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceInput__2GSDh {\n display: inline-block;\n min-width: 70px;\n width: auto;\n margin: 6px;\n text-align: center;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n height: 30px;\n width: 50px;\n vertical-align: top;\n padding: 0 5px;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_rate__FJSKL {\n margin-left: 10px;\n}\n.PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_rate__FJSKL i {\n margin-right: 5px;\n color: #1790FF;\n}\n.PriceOptions_options__iSN_S.PriceOptions_small__3O05i {\n padding: 0 0 12px 0;\n border-bottom: none;\n}\n.PriceOptions_options__iSN_S.PriceOptions_small__3O05i p {\n margin-bottom: 8px;\n}\n.PriceOptions_options__iSN_S.PriceOptions_small__3O05i .PriceOptions_infoItem__p5iwD {\n text-align: center;\n}\n.PriceOptions_options__iSN_S.PriceOptions_small__3O05i .PriceOptions_infoItem__p5iwD .PriceOptions_priceItem__3ahwJ {\n border-radius: 6px;\n height: 32px;\n width: 72px;\n margin: 0 0 12px 19px;\n}\n.PriceOptions_options__iSN_S.PriceOptions_small__3O05i .PriceOptions_infoItem__p5iwD .PriceOptions_priceItem__3ahwJ:first-child {\n margin: 0 0 12px 0px;\n}\n.PriceOptions_options__iSN_S.PriceOptions_small__3O05i .PriceOptions_infoItem__p5iwD .PriceOptions_priceInput__2GSDh {\n display: block;\n width: 254px;\n border-radius: 6px;\n height: 32px;\n}\n@media (max-width: 768px) {\n .PriceOptions_options__iSN_S {\n padding: 20px 20px;\n }\n .PriceOptions_options__iSN_S p {\n font-size: 14px;\n font-weight: 400;\n color: #616a79;\n }\n .PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD {\n padding-right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n .PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceBtn__2vdWf {\n display: flex;\n justify-content: space-between;\n }\n .PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceItem__3ahwJ {\n display: inline-block;\n background-color: #fff;\n width: 74px;\n height: 36px;\n line-height: 36px;\n border-radius: 6px;\n border: 1px solid #cfcfcf;\n }\n .PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceItem__3ahwJ.PriceOptions_active__3cl1G {\n background-color: #fff;\n color: #FF3266FF;\n border-radius: 4px;\n border: 1px solid #ff3266;\n }\n .PriceOptions_options__iSN_S .PriceOptions_infoItem__p5iwD .PriceOptions_priceInput__2GSDh {\n border-radius: 6px;\n height: 36px;\n width: auto;\n }\n}\n";
  5389. var styles$2 = {"options":"PriceOptions_options__iSN_S","infoItem":"PriceOptions_infoItem__p5iwD","priceItem":"PriceOptions_priceItem__3ahwJ","active":"PriceOptions_active__3cl1G","priceInput":"PriceOptions_priceInput__2GSDh","rate":"PriceOptions_rate__FJSKL","small":"PriceOptions_small__3O05i","priceBtn":"PriceOptions_priceBtn__2vdWf"};
  5390. styleInject_es.styleInject(css$2);
  5391. var PriceOptions = function PriceOptions(_ref) {
  5392. var price = _ref.price,
  5393. onPriceChange = _ref.onPriceChange,
  5394. _ref$size = _ref.size,
  5395. size = _ref$size === void 0 ? 'normal' : _ref$size,
  5396. _ref$focusScroll = _ref.focusScroll,
  5397. focusScroll = _ref$focusScroll === void 0 ? true : _ref$focusScroll,
  5398. _ref$withTitle = _ref.withTitle,
  5399. withTitle = _ref$withTitle === void 0 ? true : _ref$withTitle,
  5400. inputRef = _ref.inputRef;
  5401. var intl = dist_5();
  5402. var defaultOptions = [100, 600, 800]; // 控制是否为其他金额输入情况
  5403. var _useState = React.useState(false),
  5404. _useState2 = styleInject_es._slicedToArray(_useState, 2),
  5405. inputStatus = _useState2[0],
  5406. setInputStatus = _useState2[1];
  5407. return React__default.createElement("div", {
  5408. className: styleInject_es.classnames(styles$2.options, styleInject_es._defineProperty({}, styles$2[size], true))
  5409. }, withTitle ? React__default.createElement("p", null, React__default.createElement(dist_17, {
  5410. id: "pay.price.select.text"
  5411. })) : null, React__default.createElement("div", {
  5412. className: styles$2.infoItem,
  5413. style: {
  5414. marginBottom: '-12px'
  5415. }
  5416. }, React__default.createElement("span", {
  5417. className: styles$2.priceBtn
  5418. }, defaultOptions.map(function (item) {
  5419. var _classnames2;
  5420. return React__default.createElement("span", {
  5421. className: styleInject_es.classnames((_classnames2 = {}, styleInject_es._defineProperty(_classnames2, styles$2.priceItem, true), styleInject_es._defineProperty(_classnames2, styles$2.active, price === item && !inputStatus), _classnames2)),
  5422. key: item,
  5423. onClick: function onClick() {
  5424. onPriceChange(item);
  5425. setInputStatus(false);
  5426. }
  5427. }, React__default.createElement(dist_17, {
  5428. id: "pay.price.money.text",
  5429. values: {
  5430. value: formatMoney(item / 100, 0)
  5431. }
  5432. }));
  5433. })), React__default.createElement(_Input, {
  5434. ref: inputRef,
  5435. onMouseEnter: function onMouseEnter() {
  5436. if (inputStatus && inputRef && inputRef.current) {
  5437. inputRef.current.focus();
  5438. inputRef.current.select();
  5439. }
  5440. },
  5441. suffix: "\xA5",
  5442. className: styles$2.priceInput,
  5443. value: inputStatus ? price / 100 || '' : '',
  5444. placeholder: intl.formatMessage({
  5445. id: 'pay.price.money.others'
  5446. }),
  5447. onChange: function onChange(e) {
  5448. var n = +e.target.value;
  5449. if (Number.isNaN(n)) {
  5450. return;
  5451. } // 测试暂时改成1分
  5452. onPriceChange(n * 100);
  5453. },
  5454. onClick: function onClick(e) {
  5455. onPriceChange(0);
  5456. setInputStatus(true);
  5457. },
  5458. onFocus: function onFocus(e) {
  5459. if (focusScroll) {
  5460. e.target.scrollIntoView();
  5461. }
  5462. }
  5463. })));
  5464. };
  5465. var css$3 = ".WaitPayInfoView_waitingContainer__3wZ0a {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n";
  5466. var styles$3 = {"waitingContainer":"WaitPayInfoView_waitingContainer__3wZ0a"};
  5467. styleInject_es.styleInject(css$3);
  5468. const img$7 = 'data:image/svg+xml;base64,PD94b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S40MjE5NjUzIDAsMTguMTkxOTA3NSAwLDE2LjY3MDUyMDIgTDAsMi43NTE0NDUwOSBDMCwxLjI0NjI0Mjc3IDEuMTMyMzUyOTQsMCAyLjUsMCBDMy44Njc2NDcwNiwwIDUsMS4yMzAwNTc4IDUsMi43NTE0NDUwOSBMNSwxNi42NzA1MjAyIEM1LDE4LjE5MTkwNzUgMy44Njc2NDcwNiwxOS40MjE5NjUzIDIuNSwxOS40MjE5NjUzIFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+';
  5469. var WaitPayInfoView =
  5470. /*#__PURE__*/
  5471. function (_Component) {
  5472. styleInject_es._inherits(WaitPayInfoView, _Component);
  5473. function WaitPayInfoView() {
  5474. styleInject_es._classCallCheck(this, WaitPayInfoView);
  5475. return styleInject_es._possibleConstructorReturn(this, styleInject_es._getPrototypeOf(WaitPayInfoView).apply(this, arguments));
  5476. }
  5477. styleInject_es._createClass(WaitPayInfoView, [{
  5478. key: "render",
  5479. value: function render() {
  5480. var _this$props = this.props,
  5481. onClickPayed = _this$props.onClickPayed,
  5482. onClickProblem = _this$props.onClickProblem;
  5483. return React__default.createElement("div", {
  5484. className: styles$3.waitingContainer
  5485. }, React__default.createElement("div", {
  5486. className: styles$3.infoIconImgContainer
  5487. }, React__default.createElement("img", {
  5488. src: img$7,
  5489. alt: "info label icon"
  5490. })), React__default.createElement("div", null, React__default.createElement("div", {
  5491. className: styles$3.pay_text
  5492. }, "live.course_info.pay.notification"), React__default.createElement("div", {
  5493. className: styles$3.btn_row
  5494. }, React__default.createElement(_Button, {
  5495. className: styleInject_es.classnames(styles$3.pay_btn, styles$3.btn_default),
  5496. size: "small",
  5497. onClick: function onClick() {
  5498. onClickPayed && onClickPayed();
  5499. }
  5500. }, "live.course_info.pay.payed"), React__default.createElement(_Button, {
  5501. className: styles$3.btn_default,
  5502. size: "small",
  5503. style: {
  5504. marginLeft: '16px'
  5505. },
  5506. onClick: function onClick() {
  5507. onClickProblem && onClickProblem();
  5508. }
  5509. }, "live.course_info.pay.help"))));
  5510. }
  5511. }]);
  5512. return WaitPayInfoView;
  5513. }(React.Component);
  5514. styleInject_es._defineProperty(WaitPayInfoView, "defaultProps", {
  5515. onClickPayed: function onClickPayed() {
  5516. console.log("onClickPayed");
  5517. },
  5518. onClickProblem: function onClickProblem() {
  5519. console.log("onClickProblem");
  5520. }
  5521. });
  5522. exports.ConsumeListView = ConsumeListView;
  5523. exports.PayPlatformOptions = PayPlatformOptions;
  5524. exports.PriceOptions = PriceOptions;
  5525. exports.WaitPayInfoView = WaitPayInfoView;
  5526. //# sourceMappingURL=index-c6999c10.js.map