bootstrap-table-filter-control.js 182 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($$k) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$k);
  8. function _typeof(obj) {
  9. "@babel/helpers - typeof";
  10. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  11. return typeof obj;
  12. } : function (obj) {
  13. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  14. }, _typeof(obj);
  15. }
  16. function _classCallCheck(instance, Constructor) {
  17. if (!(instance instanceof Constructor)) {
  18. throw new TypeError("Cannot call a class as a function");
  19. }
  20. }
  21. function _defineProperties(target, props) {
  22. for (var i = 0; i < props.length; i++) {
  23. var descriptor = props[i];
  24. descriptor.enumerable = descriptor.enumerable || false;
  25. descriptor.configurable = true;
  26. if ("value" in descriptor) descriptor.writable = true;
  27. Object.defineProperty(target, descriptor.key, descriptor);
  28. }
  29. }
  30. function _createClass(Constructor, protoProps, staticProps) {
  31. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  32. if (staticProps) _defineProperties(Constructor, staticProps);
  33. Object.defineProperty(Constructor, "prototype", {
  34. writable: false
  35. });
  36. return Constructor;
  37. }
  38. function _inherits(subClass, superClass) {
  39. if (typeof superClass !== "function" && superClass !== null) {
  40. throw new TypeError("Super expression must either be null or a function");
  41. }
  42. subClass.prototype = Object.create(superClass && superClass.prototype, {
  43. constructor: {
  44. value: subClass,
  45. writable: true,
  46. configurable: true
  47. }
  48. });
  49. Object.defineProperty(subClass, "prototype", {
  50. writable: false
  51. });
  52. if (superClass) _setPrototypeOf(subClass, superClass);
  53. }
  54. function _getPrototypeOf(o) {
  55. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  56. return o.__proto__ || Object.getPrototypeOf(o);
  57. };
  58. return _getPrototypeOf(o);
  59. }
  60. function _setPrototypeOf(o, p) {
  61. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  62. o.__proto__ = p;
  63. return o;
  64. };
  65. return _setPrototypeOf(o, p);
  66. }
  67. function _isNativeReflectConstruct() {
  68. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  69. if (Reflect.construct.sham) return false;
  70. if (typeof Proxy === "function") return true;
  71. try {
  72. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  73. return true;
  74. } catch (e) {
  75. return false;
  76. }
  77. }
  78. function _assertThisInitialized(self) {
  79. if (self === void 0) {
  80. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  81. }
  82. return self;
  83. }
  84. function _possibleConstructorReturn(self, call) {
  85. if (call && (typeof call === "object" || typeof call === "function")) {
  86. return call;
  87. } else if (call !== void 0) {
  88. throw new TypeError("Derived constructors may only return object or undefined");
  89. }
  90. return _assertThisInitialized(self);
  91. }
  92. function _createSuper(Derived) {
  93. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  94. return function _createSuperInternal() {
  95. var Super = _getPrototypeOf(Derived),
  96. result;
  97. if (hasNativeReflectConstruct) {
  98. var NewTarget = _getPrototypeOf(this).constructor;
  99. result = Reflect.construct(Super, arguments, NewTarget);
  100. } else {
  101. result = Super.apply(this, arguments);
  102. }
  103. return _possibleConstructorReturn(this, result);
  104. };
  105. }
  106. function _superPropBase(object, property) {
  107. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  108. object = _getPrototypeOf(object);
  109. if (object === null) break;
  110. }
  111. return object;
  112. }
  113. function _get() {
  114. if (typeof Reflect !== "undefined" && Reflect.get) {
  115. _get = Reflect.get;
  116. } else {
  117. _get = function _get(target, property, receiver) {
  118. var base = _superPropBase(target, property);
  119. if (!base) return;
  120. var desc = Object.getOwnPropertyDescriptor(base, property);
  121. if (desc.get) {
  122. return desc.get.call(arguments.length < 3 ? target : receiver);
  123. }
  124. return desc.value;
  125. };
  126. }
  127. return _get.apply(this, arguments);
  128. }
  129. function _toConsumableArray(arr) {
  130. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  131. }
  132. function _arrayWithoutHoles(arr) {
  133. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  134. }
  135. function _iterableToArray(iter) {
  136. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  137. }
  138. function _unsupportedIterableToArray(o, minLen) {
  139. if (!o) return;
  140. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  141. var n = Object.prototype.toString.call(o).slice(8, -1);
  142. if (n === "Object" && o.constructor) n = o.constructor.name;
  143. if (n === "Map" || n === "Set") return Array.from(o);
  144. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  145. }
  146. function _arrayLikeToArray(arr, len) {
  147. if (len == null || len > arr.length) len = arr.length;
  148. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  149. return arr2;
  150. }
  151. function _nonIterableSpread() {
  152. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  153. }
  154. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  155. var check = function (it) {
  156. return it && it.Math == Math && it;
  157. };
  158. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  159. var global$L =
  160. // eslint-disable-next-line es-x/no-global-this -- safe
  161. check(typeof globalThis == 'object' && globalThis) ||
  162. check(typeof window == 'object' && window) ||
  163. // eslint-disable-next-line no-restricted-globals -- safe
  164. check(typeof self == 'object' && self) ||
  165. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  166. // eslint-disable-next-line no-new-func -- fallback
  167. (function () { return this; })() || Function('return this')();
  168. var objectGetOwnPropertyDescriptor = {};
  169. var fails$q = function (exec) {
  170. try {
  171. return !!exec();
  172. } catch (error) {
  173. return true;
  174. }
  175. };
  176. var fails$p = fails$q;
  177. // Detect IE8's incomplete defineProperty implementation
  178. var descriptors = !fails$p(function () {
  179. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  180. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  181. });
  182. var fails$o = fails$q;
  183. var functionBindNative = !fails$o(function () {
  184. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  185. var test = (function () { /* empty */ }).bind();
  186. // eslint-disable-next-line no-prototype-builtins -- safe
  187. return typeof test != 'function' || test.hasOwnProperty('prototype');
  188. });
  189. var NATIVE_BIND$3 = functionBindNative;
  190. var call$j = Function.prototype.call;
  191. var functionCall = NATIVE_BIND$3 ? call$j.bind(call$j) : function () {
  192. return call$j.apply(call$j, arguments);
  193. };
  194. var objectPropertyIsEnumerable = {};
  195. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  196. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  197. var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
  198. // Nashorn ~ JDK8 bug
  199. var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  200. // `Object.prototype.propertyIsEnumerable` method implementation
  201. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  202. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  203. var descriptor = getOwnPropertyDescriptor$2(this, V);
  204. return !!descriptor && descriptor.enumerable;
  205. } : $propertyIsEnumerable$1;
  206. var createPropertyDescriptor$3 = function (bitmap, value) {
  207. return {
  208. enumerable: !(bitmap & 1),
  209. configurable: !(bitmap & 2),
  210. writable: !(bitmap & 4),
  211. value: value
  212. };
  213. };
  214. var NATIVE_BIND$2 = functionBindNative;
  215. var FunctionPrototype$2 = Function.prototype;
  216. var bind$6 = FunctionPrototype$2.bind;
  217. var call$i = FunctionPrototype$2.call;
  218. var uncurryThis$s = NATIVE_BIND$2 && bind$6.bind(call$i, call$i);
  219. var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
  220. return fn && uncurryThis$s(fn);
  221. } : function (fn) {
  222. return fn && function () {
  223. return call$i.apply(fn, arguments);
  224. };
  225. };
  226. var uncurryThis$r = functionUncurryThis;
  227. var toString$c = uncurryThis$r({}.toString);
  228. var stringSlice$5 = uncurryThis$r(''.slice);
  229. var classofRaw$1 = function (it) {
  230. return stringSlice$5(toString$c(it), 8, -1);
  231. };
  232. var global$K = global$L;
  233. var uncurryThis$q = functionUncurryThis;
  234. var fails$n = fails$q;
  235. var classof$9 = classofRaw$1;
  236. var Object$4 = global$K.Object;
  237. var split = uncurryThis$q(''.split);
  238. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  239. var indexedObject = fails$n(function () {
  240. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  241. // eslint-disable-next-line no-prototype-builtins -- safe
  242. return !Object$4('z').propertyIsEnumerable(0);
  243. }) ? function (it) {
  244. return classof$9(it) == 'String' ? split(it, '') : Object$4(it);
  245. } : Object$4;
  246. var global$J = global$L;
  247. var TypeError$h = global$J.TypeError;
  248. // `RequireObjectCoercible` abstract operation
  249. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  250. var requireObjectCoercible$8 = function (it) {
  251. if (it == undefined) throw TypeError$h("Can't call method on " + it);
  252. return it;
  253. };
  254. // toObject with fallback for non-array-like ES3 strings
  255. var IndexedObject$3 = indexedObject;
  256. var requireObjectCoercible$7 = requireObjectCoercible$8;
  257. var toIndexedObject$6 = function (it) {
  258. return IndexedObject$3(requireObjectCoercible$7(it));
  259. };
  260. // `IsCallable` abstract operation
  261. // https://tc39.es/ecma262/#sec-iscallable
  262. var isCallable$j = function (argument) {
  263. return typeof argument == 'function';
  264. };
  265. var isCallable$i = isCallable$j;
  266. var isObject$a = function (it) {
  267. return typeof it == 'object' ? it !== null : isCallable$i(it);
  268. };
  269. var global$I = global$L;
  270. var isCallable$h = isCallable$j;
  271. var aFunction = function (argument) {
  272. return isCallable$h(argument) ? argument : undefined;
  273. };
  274. var getBuiltIn$8 = function (namespace, method) {
  275. return arguments.length < 2 ? aFunction(global$I[namespace]) : global$I[namespace] && global$I[namespace][method];
  276. };
  277. var uncurryThis$p = functionUncurryThis;
  278. var objectIsPrototypeOf = uncurryThis$p({}.isPrototypeOf);
  279. var getBuiltIn$7 = getBuiltIn$8;
  280. var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
  281. var global$H = global$L;
  282. var userAgent$5 = engineUserAgent;
  283. var process$3 = global$H.process;
  284. var Deno$1 = global$H.Deno;
  285. var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
  286. var v8 = versions && versions.v8;
  287. var match, version;
  288. if (v8) {
  289. match = v8.split('.');
  290. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  291. // but their correct versions are not interesting for us
  292. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  293. }
  294. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  295. // so check `userAgent` even if `.v8` exists, but 0
  296. if (!version && userAgent$5) {
  297. match = userAgent$5.match(/Edge\/(\d+)/);
  298. if (!match || match[1] >= 74) {
  299. match = userAgent$5.match(/Chrome\/(\d+)/);
  300. if (match) version = +match[1];
  301. }
  302. }
  303. var engineV8Version = version;
  304. /* eslint-disable es-x/no-symbol -- required for testing */
  305. var V8_VERSION$3 = engineV8Version;
  306. var fails$m = fails$q;
  307. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  308. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$m(function () {
  309. var symbol = Symbol();
  310. // Chrome 38 Symbol has incorrect toString conversion
  311. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  312. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  313. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  314. !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41;
  315. });
  316. /* eslint-disable es-x/no-symbol -- required for testing */
  317. var NATIVE_SYMBOL$1 = nativeSymbol;
  318. var useSymbolAsUid = NATIVE_SYMBOL$1
  319. && !Symbol.sham
  320. && typeof Symbol.iterator == 'symbol';
  321. var global$G = global$L;
  322. var getBuiltIn$6 = getBuiltIn$8;
  323. var isCallable$g = isCallable$j;
  324. var isPrototypeOf$3 = objectIsPrototypeOf;
  325. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  326. var Object$3 = global$G.Object;
  327. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  328. return typeof it == 'symbol';
  329. } : function (it) {
  330. var $Symbol = getBuiltIn$6('Symbol');
  331. return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, Object$3(it));
  332. };
  333. var global$F = global$L;
  334. var String$5 = global$F.String;
  335. var tryToString$4 = function (argument) {
  336. try {
  337. return String$5(argument);
  338. } catch (error) {
  339. return 'Object';
  340. }
  341. };
  342. var global$E = global$L;
  343. var isCallable$f = isCallable$j;
  344. var tryToString$3 = tryToString$4;
  345. var TypeError$g = global$E.TypeError;
  346. // `Assert: IsCallable(argument) is true`
  347. var aCallable$8 = function (argument) {
  348. if (isCallable$f(argument)) return argument;
  349. throw TypeError$g(tryToString$3(argument) + ' is not a function');
  350. };
  351. var aCallable$7 = aCallable$8;
  352. // `GetMethod` abstract operation
  353. // https://tc39.es/ecma262/#sec-getmethod
  354. var getMethod$6 = function (V, P) {
  355. var func = V[P];
  356. return func == null ? undefined : aCallable$7(func);
  357. };
  358. var global$D = global$L;
  359. var call$h = functionCall;
  360. var isCallable$e = isCallable$j;
  361. var isObject$9 = isObject$a;
  362. var TypeError$f = global$D.TypeError;
  363. // `OrdinaryToPrimitive` abstract operation
  364. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  365. var ordinaryToPrimitive$1 = function (input, pref) {
  366. var fn, val;
  367. if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
  368. if (isCallable$e(fn = input.valueOf) && !isObject$9(val = call$h(fn, input))) return val;
  369. if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
  370. throw TypeError$f("Can't convert object to primitive value");
  371. };
  372. var shared$4 = {exports: {}};
  373. var global$C = global$L;
  374. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  375. var defineProperty$3 = Object.defineProperty;
  376. var setGlobal$3 = function (key, value) {
  377. try {
  378. defineProperty$3(global$C, key, { value: value, configurable: true, writable: true });
  379. } catch (error) {
  380. global$C[key] = value;
  381. } return value;
  382. };
  383. var global$B = global$L;
  384. var setGlobal$2 = setGlobal$3;
  385. var SHARED = '__core-js_shared__';
  386. var store$3 = global$B[SHARED] || setGlobal$2(SHARED, {});
  387. var sharedStore = store$3;
  388. var store$2 = sharedStore;
  389. (shared$4.exports = function (key, value) {
  390. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  391. })('versions', []).push({
  392. version: '3.22.5',
  393. mode: 'global',
  394. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  395. license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
  396. source: 'https://github.com/zloirock/core-js'
  397. });
  398. var global$A = global$L;
  399. var requireObjectCoercible$6 = requireObjectCoercible$8;
  400. var Object$2 = global$A.Object;
  401. // `ToObject` abstract operation
  402. // https://tc39.es/ecma262/#sec-toobject
  403. var toObject$7 = function (argument) {
  404. return Object$2(requireObjectCoercible$6(argument));
  405. };
  406. var uncurryThis$o = functionUncurryThis;
  407. var toObject$6 = toObject$7;
  408. var hasOwnProperty = uncurryThis$o({}.hasOwnProperty);
  409. // `HasOwnProperty` abstract operation
  410. // https://tc39.es/ecma262/#sec-hasownproperty
  411. // eslint-disable-next-line es-x/no-object-hasown -- safe
  412. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  413. return hasOwnProperty(toObject$6(it), key);
  414. };
  415. var uncurryThis$n = functionUncurryThis;
  416. var id = 0;
  417. var postfix = Math.random();
  418. var toString$b = uncurryThis$n(1.0.toString);
  419. var uid$2 = function (key) {
  420. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$b(++id + postfix, 36);
  421. };
  422. var global$z = global$L;
  423. var shared$3 = shared$4.exports;
  424. var hasOwn$9 = hasOwnProperty_1;
  425. var uid$1 = uid$2;
  426. var NATIVE_SYMBOL = nativeSymbol;
  427. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  428. var WellKnownSymbolsStore = shared$3('wks');
  429. var Symbol$2 = global$z.Symbol;
  430. var symbolFor = Symbol$2 && Symbol$2['for'];
  431. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  432. var wellKnownSymbol$i = function (name) {
  433. if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  434. var description = 'Symbol.' + name;
  435. if (NATIVE_SYMBOL && hasOwn$9(Symbol$2, name)) {
  436. WellKnownSymbolsStore[name] = Symbol$2[name];
  437. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  438. WellKnownSymbolsStore[name] = symbolFor(description);
  439. } else {
  440. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  441. }
  442. } return WellKnownSymbolsStore[name];
  443. };
  444. var global$y = global$L;
  445. var call$g = functionCall;
  446. var isObject$8 = isObject$a;
  447. var isSymbol$1 = isSymbol$2;
  448. var getMethod$5 = getMethod$6;
  449. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  450. var wellKnownSymbol$h = wellKnownSymbol$i;
  451. var TypeError$e = global$y.TypeError;
  452. var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
  453. // `ToPrimitive` abstract operation
  454. // https://tc39.es/ecma262/#sec-toprimitive
  455. var toPrimitive$1 = function (input, pref) {
  456. if (!isObject$8(input) || isSymbol$1(input)) return input;
  457. var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
  458. var result;
  459. if (exoticToPrim) {
  460. if (pref === undefined) pref = 'default';
  461. result = call$g(exoticToPrim, input, pref);
  462. if (!isObject$8(result) || isSymbol$1(result)) return result;
  463. throw TypeError$e("Can't convert object to primitive value");
  464. }
  465. if (pref === undefined) pref = 'number';
  466. return ordinaryToPrimitive(input, pref);
  467. };
  468. var toPrimitive = toPrimitive$1;
  469. var isSymbol = isSymbol$2;
  470. // `ToPropertyKey` abstract operation
  471. // https://tc39.es/ecma262/#sec-topropertykey
  472. var toPropertyKey$3 = function (argument) {
  473. var key = toPrimitive(argument, 'string');
  474. return isSymbol(key) ? key : key + '';
  475. };
  476. var global$x = global$L;
  477. var isObject$7 = isObject$a;
  478. var document$3 = global$x.document;
  479. // typeof document.createElement is 'object' in old IE
  480. var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
  481. var documentCreateElement$2 = function (it) {
  482. return EXISTS$1 ? document$3.createElement(it) : {};
  483. };
  484. var DESCRIPTORS$a = descriptors;
  485. var fails$l = fails$q;
  486. var createElement$1 = documentCreateElement$2;
  487. // Thanks to IE8 for its funny defineProperty
  488. var ie8DomDefine = !DESCRIPTORS$a && !fails$l(function () {
  489. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  490. return Object.defineProperty(createElement$1('div'), 'a', {
  491. get: function () { return 7; }
  492. }).a != 7;
  493. });
  494. var DESCRIPTORS$9 = descriptors;
  495. var call$f = functionCall;
  496. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  497. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  498. var toIndexedObject$5 = toIndexedObject$6;
  499. var toPropertyKey$2 = toPropertyKey$3;
  500. var hasOwn$8 = hasOwnProperty_1;
  501. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  502. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  503. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  504. // `Object.getOwnPropertyDescriptor` method
  505. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  506. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  507. O = toIndexedObject$5(O);
  508. P = toPropertyKey$2(P);
  509. if (IE8_DOM_DEFINE$1) try {
  510. return $getOwnPropertyDescriptor$1(O, P);
  511. } catch (error) { /* empty */ }
  512. if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$f(propertyIsEnumerableModule$1.f, O, P), O[P]);
  513. };
  514. var objectDefineProperty = {};
  515. var DESCRIPTORS$8 = descriptors;
  516. var fails$k = fails$q;
  517. // V8 ~ Chrome 36-
  518. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  519. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$k(function () {
  520. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  521. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  522. value: 42,
  523. writable: false
  524. }).prototype != 42;
  525. });
  526. var global$w = global$L;
  527. var isObject$6 = isObject$a;
  528. var String$4 = global$w.String;
  529. var TypeError$d = global$w.TypeError;
  530. // `Assert: Type(argument) is Object`
  531. var anObject$g = function (argument) {
  532. if (isObject$6(argument)) return argument;
  533. throw TypeError$d(String$4(argument) + ' is not an object');
  534. };
  535. var global$v = global$L;
  536. var DESCRIPTORS$7 = descriptors;
  537. var IE8_DOM_DEFINE = ie8DomDefine;
  538. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  539. var anObject$f = anObject$g;
  540. var toPropertyKey$1 = toPropertyKey$3;
  541. var TypeError$c = global$v.TypeError;
  542. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  543. var $defineProperty = Object.defineProperty;
  544. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  545. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  546. var ENUMERABLE = 'enumerable';
  547. var CONFIGURABLE$1 = 'configurable';
  548. var WRITABLE = 'writable';
  549. // `Object.defineProperty` method
  550. // https://tc39.es/ecma262/#sec-object.defineproperty
  551. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  552. anObject$f(O);
  553. P = toPropertyKey$1(P);
  554. anObject$f(Attributes);
  555. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  556. var current = $getOwnPropertyDescriptor(O, P);
  557. if (current && current[WRITABLE]) {
  558. O[P] = Attributes.value;
  559. Attributes = {
  560. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  561. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  562. writable: false
  563. };
  564. }
  565. } return $defineProperty(O, P, Attributes);
  566. } : $defineProperty : function defineProperty(O, P, Attributes) {
  567. anObject$f(O);
  568. P = toPropertyKey$1(P);
  569. anObject$f(Attributes);
  570. if (IE8_DOM_DEFINE) try {
  571. return $defineProperty(O, P, Attributes);
  572. } catch (error) { /* empty */ }
  573. if ('get' in Attributes || 'set' in Attributes) throw TypeError$c('Accessors not supported');
  574. if ('value' in Attributes) O[P] = Attributes.value;
  575. return O;
  576. };
  577. var DESCRIPTORS$6 = descriptors;
  578. var definePropertyModule$5 = objectDefineProperty;
  579. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  580. var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
  581. return definePropertyModule$5.f(object, key, createPropertyDescriptor$1(1, value));
  582. } : function (object, key, value) {
  583. object[key] = value;
  584. return object;
  585. };
  586. var makeBuiltIn$2 = {exports: {}};
  587. var DESCRIPTORS$5 = descriptors;
  588. var hasOwn$7 = hasOwnProperty_1;
  589. var FunctionPrototype$1 = Function.prototype;
  590. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  591. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  592. var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
  593. // additional protection from minified / mangled / dropped function names
  594. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  595. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  596. var functionName = {
  597. EXISTS: EXISTS,
  598. PROPER: PROPER,
  599. CONFIGURABLE: CONFIGURABLE
  600. };
  601. var uncurryThis$m = functionUncurryThis;
  602. var isCallable$d = isCallable$j;
  603. var store$1 = sharedStore;
  604. var functionToString = uncurryThis$m(Function.toString);
  605. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  606. if (!isCallable$d(store$1.inspectSource)) {
  607. store$1.inspectSource = function (it) {
  608. return functionToString(it);
  609. };
  610. }
  611. var inspectSource$4 = store$1.inspectSource;
  612. var global$u = global$L;
  613. var isCallable$c = isCallable$j;
  614. var inspectSource$3 = inspectSource$4;
  615. var WeakMap$1 = global$u.WeakMap;
  616. var nativeWeakMap = isCallable$c(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
  617. var shared$2 = shared$4.exports;
  618. var uid = uid$2;
  619. var keys = shared$2('keys');
  620. var sharedKey$2 = function (key) {
  621. return keys[key] || (keys[key] = uid(key));
  622. };
  623. var hiddenKeys$4 = {};
  624. var NATIVE_WEAK_MAP = nativeWeakMap;
  625. var global$t = global$L;
  626. var uncurryThis$l = functionUncurryThis;
  627. var isObject$5 = isObject$a;
  628. var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
  629. var hasOwn$6 = hasOwnProperty_1;
  630. var shared$1 = sharedStore;
  631. var sharedKey$1 = sharedKey$2;
  632. var hiddenKeys$3 = hiddenKeys$4;
  633. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  634. var TypeError$b = global$t.TypeError;
  635. var WeakMap = global$t.WeakMap;
  636. var set$1, get, has;
  637. var enforce = function (it) {
  638. return has(it) ? get(it) : set$1(it, {});
  639. };
  640. var getterFor = function (TYPE) {
  641. return function (it) {
  642. var state;
  643. if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
  644. throw TypeError$b('Incompatible receiver, ' + TYPE + ' required');
  645. } return state;
  646. };
  647. };
  648. if (NATIVE_WEAK_MAP || shared$1.state) {
  649. var store = shared$1.state || (shared$1.state = new WeakMap());
  650. var wmget = uncurryThis$l(store.get);
  651. var wmhas = uncurryThis$l(store.has);
  652. var wmset = uncurryThis$l(store.set);
  653. set$1 = function (it, metadata) {
  654. if (wmhas(store, it)) throw new TypeError$b(OBJECT_ALREADY_INITIALIZED);
  655. metadata.facade = it;
  656. wmset(store, it, metadata);
  657. return metadata;
  658. };
  659. get = function (it) {
  660. return wmget(store, it) || {};
  661. };
  662. has = function (it) {
  663. return wmhas(store, it);
  664. };
  665. } else {
  666. var STATE = sharedKey$1('state');
  667. hiddenKeys$3[STATE] = true;
  668. set$1 = function (it, metadata) {
  669. if (hasOwn$6(it, STATE)) throw new TypeError$b(OBJECT_ALREADY_INITIALIZED);
  670. metadata.facade = it;
  671. createNonEnumerableProperty$4(it, STATE, metadata);
  672. return metadata;
  673. };
  674. get = function (it) {
  675. return hasOwn$6(it, STATE) ? it[STATE] : {};
  676. };
  677. has = function (it) {
  678. return hasOwn$6(it, STATE);
  679. };
  680. }
  681. var internalState = {
  682. set: set$1,
  683. get: get,
  684. has: has,
  685. enforce: enforce,
  686. getterFor: getterFor
  687. };
  688. var fails$j = fails$q;
  689. var isCallable$b = isCallable$j;
  690. var hasOwn$5 = hasOwnProperty_1;
  691. var DESCRIPTORS$4 = descriptors;
  692. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  693. var inspectSource$2 = inspectSource$4;
  694. var InternalStateModule$1 = internalState;
  695. var enforceInternalState = InternalStateModule$1.enforce;
  696. var getInternalState$1 = InternalStateModule$1.get;
  697. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  698. var defineProperty$2 = Object.defineProperty;
  699. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$j(function () {
  700. return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  701. });
  702. var TEMPLATE = String(String).split('String');
  703. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  704. if (String(name).slice(0, 7) === 'Symbol(') {
  705. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  706. }
  707. if (options && options.getter) name = 'get ' + name;
  708. if (options && options.setter) name = 'set ' + name;
  709. if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  710. defineProperty$2(value, 'name', { value: name, configurable: true });
  711. }
  712. if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
  713. defineProperty$2(value, 'length', { value: options.arity });
  714. }
  715. if (options && hasOwn$5(options, 'constructor') && options.constructor) {
  716. if (DESCRIPTORS$4) try {
  717. defineProperty$2(value, 'prototype', { writable: false });
  718. } catch (error) { /* empty */ }
  719. } else value.prototype = undefined;
  720. var state = enforceInternalState(value);
  721. if (!hasOwn$5(state, 'source')) {
  722. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  723. } return value;
  724. };
  725. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  726. // eslint-disable-next-line no-extend-native -- required
  727. Function.prototype.toString = makeBuiltIn$1(function toString() {
  728. return isCallable$b(this) && getInternalState$1(this).source || inspectSource$2(this);
  729. }, 'toString');
  730. var global$s = global$L;
  731. var isCallable$a = isCallable$j;
  732. var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
  733. var makeBuiltIn = makeBuiltIn$2.exports;
  734. var setGlobal$1 = setGlobal$3;
  735. var defineBuiltIn$6 = function (O, key, value, options) {
  736. var unsafe = options ? !!options.unsafe : false;
  737. var simple = options ? !!options.enumerable : false;
  738. var noTargetGet = options ? !!options.noTargetGet : false;
  739. var name = options && options.name !== undefined ? options.name : key;
  740. if (isCallable$a(value)) makeBuiltIn(value, name, options);
  741. if (O === global$s) {
  742. if (simple) O[key] = value;
  743. else setGlobal$1(key, value);
  744. return O;
  745. } else if (!unsafe) {
  746. delete O[key];
  747. } else if (!noTargetGet && O[key]) {
  748. simple = true;
  749. }
  750. if (simple) O[key] = value;
  751. else createNonEnumerableProperty$3(O, key, value);
  752. return O;
  753. };
  754. var objectGetOwnPropertyNames = {};
  755. var ceil = Math.ceil;
  756. var floor$2 = Math.floor;
  757. // `ToIntegerOrInfinity` abstract operation
  758. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  759. var toIntegerOrInfinity$4 = function (argument) {
  760. var number = +argument;
  761. // eslint-disable-next-line no-self-compare -- safe
  762. return number !== number || number === 0 ? 0 : (number > 0 ? floor$2 : ceil)(number);
  763. };
  764. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  765. var max$2 = Math.max;
  766. var min$3 = Math.min;
  767. // Helper for a popular repeating case of the spec:
  768. // Let integer be ? ToInteger(index).
  769. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  770. var toAbsoluteIndex$2 = function (index, length) {
  771. var integer = toIntegerOrInfinity$3(index);
  772. return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
  773. };
  774. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  775. var min$2 = Math.min;
  776. // `ToLength` abstract operation
  777. // https://tc39.es/ecma262/#sec-tolength
  778. var toLength$4 = function (argument) {
  779. return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  780. };
  781. var toLength$3 = toLength$4;
  782. // `LengthOfArrayLike` abstract operation
  783. // https://tc39.es/ecma262/#sec-lengthofarraylike
  784. var lengthOfArrayLike$6 = function (obj) {
  785. return toLength$3(obj.length);
  786. };
  787. var toIndexedObject$4 = toIndexedObject$6;
  788. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  789. var lengthOfArrayLike$5 = lengthOfArrayLike$6;
  790. // `Array.prototype.{ indexOf, includes }` methods implementation
  791. var createMethod$4 = function (IS_INCLUDES) {
  792. return function ($this, el, fromIndex) {
  793. var O = toIndexedObject$4($this);
  794. var length = lengthOfArrayLike$5(O);
  795. var index = toAbsoluteIndex$1(fromIndex, length);
  796. var value;
  797. // Array#includes uses SameValueZero equality algorithm
  798. // eslint-disable-next-line no-self-compare -- NaN check
  799. if (IS_INCLUDES && el != el) while (length > index) {
  800. value = O[index++];
  801. // eslint-disable-next-line no-self-compare -- NaN check
  802. if (value != value) return true;
  803. // Array#indexOf ignores holes, Array#includes - not
  804. } else for (;length > index; index++) {
  805. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  806. } return !IS_INCLUDES && -1;
  807. };
  808. };
  809. var arrayIncludes = {
  810. // `Array.prototype.includes` method
  811. // https://tc39.es/ecma262/#sec-array.prototype.includes
  812. includes: createMethod$4(true),
  813. // `Array.prototype.indexOf` method
  814. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  815. indexOf: createMethod$4(false)
  816. };
  817. var uncurryThis$k = functionUncurryThis;
  818. var hasOwn$4 = hasOwnProperty_1;
  819. var toIndexedObject$3 = toIndexedObject$6;
  820. var indexOf$1 = arrayIncludes.indexOf;
  821. var hiddenKeys$2 = hiddenKeys$4;
  822. var push$5 = uncurryThis$k([].push);
  823. var objectKeysInternal = function (object, names) {
  824. var O = toIndexedObject$3(object);
  825. var i = 0;
  826. var result = [];
  827. var key;
  828. for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$5(result, key);
  829. // Don't enum bug & hidden keys
  830. while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
  831. ~indexOf$1(result, key) || push$5(result, key);
  832. }
  833. return result;
  834. };
  835. // IE8- don't enum bug keys
  836. var enumBugKeys$3 = [
  837. 'constructor',
  838. 'hasOwnProperty',
  839. 'isPrototypeOf',
  840. 'propertyIsEnumerable',
  841. 'toLocaleString',
  842. 'toString',
  843. 'valueOf'
  844. ];
  845. var internalObjectKeys$1 = objectKeysInternal;
  846. var enumBugKeys$2 = enumBugKeys$3;
  847. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  848. // `Object.getOwnPropertyNames` method
  849. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  850. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  851. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  852. return internalObjectKeys$1(O, hiddenKeys$1);
  853. };
  854. var objectGetOwnPropertySymbols = {};
  855. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  856. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  857. var getBuiltIn$5 = getBuiltIn$8;
  858. var uncurryThis$j = functionUncurryThis;
  859. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  860. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  861. var anObject$e = anObject$g;
  862. var concat$2 = uncurryThis$j([].concat);
  863. // all object keys, includes non-enumerable and symbols
  864. var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
  865. var keys = getOwnPropertyNamesModule.f(anObject$e(it));
  866. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  867. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  868. };
  869. var hasOwn$3 = hasOwnProperty_1;
  870. var ownKeys = ownKeys$1;
  871. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  872. var definePropertyModule$4 = objectDefineProperty;
  873. var copyConstructorProperties$1 = function (target, source, exceptions) {
  874. var keys = ownKeys(source);
  875. var defineProperty = definePropertyModule$4.f;
  876. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  877. for (var i = 0; i < keys.length; i++) {
  878. var key = keys[i];
  879. if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
  880. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  881. }
  882. }
  883. };
  884. var fails$i = fails$q;
  885. var isCallable$9 = isCallable$j;
  886. var replacement = /#|\.prototype\./;
  887. var isForced$2 = function (feature, detection) {
  888. var value = data[normalize(feature)];
  889. return value == POLYFILL ? true
  890. : value == NATIVE ? false
  891. : isCallable$9(detection) ? fails$i(detection)
  892. : !!detection;
  893. };
  894. var normalize = isForced$2.normalize = function (string) {
  895. return String(string).replace(replacement, '.').toLowerCase();
  896. };
  897. var data = isForced$2.data = {};
  898. var NATIVE = isForced$2.NATIVE = 'N';
  899. var POLYFILL = isForced$2.POLYFILL = 'P';
  900. var isForced_1 = isForced$2;
  901. var global$r = global$L;
  902. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  903. var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
  904. var defineBuiltIn$5 = defineBuiltIn$6;
  905. var setGlobal = setGlobal$3;
  906. var copyConstructorProperties = copyConstructorProperties$1;
  907. var isForced$1 = isForced_1;
  908. /*
  909. options.target - name of the target object
  910. options.global - target is the global object
  911. options.stat - export as static methods of target
  912. options.proto - export as prototype methods of target
  913. options.real - real prototype method for the `pure` version
  914. options.forced - export even if the native feature is available
  915. options.bind - bind methods to the target, required for the `pure` version
  916. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  917. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  918. options.sham - add a flag to not completely full polyfills
  919. options.enumerable - export as enumerable property
  920. options.noTargetGet - prevent calling a getter on target
  921. options.name - the .name of the function if it does not match the key
  922. */
  923. var _export = function (options, source) {
  924. var TARGET = options.target;
  925. var GLOBAL = options.global;
  926. var STATIC = options.stat;
  927. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  928. if (GLOBAL) {
  929. target = global$r;
  930. } else if (STATIC) {
  931. target = global$r[TARGET] || setGlobal(TARGET, {});
  932. } else {
  933. target = (global$r[TARGET] || {}).prototype;
  934. }
  935. if (target) for (key in source) {
  936. sourceProperty = source[key];
  937. if (options.noTargetGet) {
  938. descriptor = getOwnPropertyDescriptor$1(target, key);
  939. targetProperty = descriptor && descriptor.value;
  940. } else targetProperty = target[key];
  941. FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  942. // contained in target
  943. if (!FORCED && targetProperty !== undefined) {
  944. if (typeof sourceProperty == typeof targetProperty) continue;
  945. copyConstructorProperties(sourceProperty, targetProperty);
  946. }
  947. // add a flag to not completely full polyfills
  948. if (options.sham || (targetProperty && targetProperty.sham)) {
  949. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  950. }
  951. defineBuiltIn$5(target, key, sourceProperty, options);
  952. }
  953. };
  954. var uncurryThis$i = functionUncurryThis;
  955. var aCallable$6 = aCallable$8;
  956. var NATIVE_BIND$1 = functionBindNative;
  957. var bind$5 = uncurryThis$i(uncurryThis$i.bind);
  958. // optional / simple context binding
  959. var functionBindContext = function (fn, that) {
  960. aCallable$6(fn);
  961. return that === undefined ? fn : NATIVE_BIND$1 ? bind$5(fn, that) : function (/* ...args */) {
  962. return fn.apply(that, arguments);
  963. };
  964. };
  965. var classof$8 = classofRaw$1;
  966. // `IsArray` abstract operation
  967. // https://tc39.es/ecma262/#sec-isarray
  968. // eslint-disable-next-line es-x/no-array-isarray -- safe
  969. var isArray$2 = Array.isArray || function isArray(argument) {
  970. return classof$8(argument) == 'Array';
  971. };
  972. var wellKnownSymbol$g = wellKnownSymbol$i;
  973. var TO_STRING_TAG$2 = wellKnownSymbol$g('toStringTag');
  974. var test$1 = {};
  975. test$1[TO_STRING_TAG$2] = 'z';
  976. var toStringTagSupport = String(test$1) === '[object z]';
  977. var global$q = global$L;
  978. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  979. var isCallable$8 = isCallable$j;
  980. var classofRaw = classofRaw$1;
  981. var wellKnownSymbol$f = wellKnownSymbol$i;
  982. var TO_STRING_TAG$1 = wellKnownSymbol$f('toStringTag');
  983. var Object$1 = global$q.Object;
  984. // ES3 wrong here
  985. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  986. // fallback for IE11 Script Access Denied error
  987. var tryGet = function (it, key) {
  988. try {
  989. return it[key];
  990. } catch (error) { /* empty */ }
  991. };
  992. // getting tag from ES6+ `Object.prototype.toString`
  993. var classof$7 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  994. var O, tag, result;
  995. return it === undefined ? 'Undefined' : it === null ? 'Null'
  996. // @@toStringTag case
  997. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
  998. // builtinTag case
  999. : CORRECT_ARGUMENTS ? classofRaw(O)
  1000. // ES3 arguments fallback
  1001. : (result = classofRaw(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
  1002. };
  1003. var uncurryThis$h = functionUncurryThis;
  1004. var fails$h = fails$q;
  1005. var isCallable$7 = isCallable$j;
  1006. var classof$6 = classof$7;
  1007. var getBuiltIn$4 = getBuiltIn$8;
  1008. var inspectSource$1 = inspectSource$4;
  1009. var noop = function () { /* empty */ };
  1010. var empty = [];
  1011. var construct = getBuiltIn$4('Reflect', 'construct');
  1012. var constructorRegExp = /^\s*(?:class|function)\b/;
  1013. var exec$3 = uncurryThis$h(constructorRegExp.exec);
  1014. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1015. var isConstructorModern = function isConstructor(argument) {
  1016. if (!isCallable$7(argument)) return false;
  1017. try {
  1018. construct(noop, empty, argument);
  1019. return true;
  1020. } catch (error) {
  1021. return false;
  1022. }
  1023. };
  1024. var isConstructorLegacy = function isConstructor(argument) {
  1025. if (!isCallable$7(argument)) return false;
  1026. switch (classof$6(argument)) {
  1027. case 'AsyncFunction':
  1028. case 'GeneratorFunction':
  1029. case 'AsyncGeneratorFunction': return false;
  1030. }
  1031. try {
  1032. // we can't check .prototype since constructors produced by .bind haven't it
  1033. // `Function#toString` throws on some built-it function in some legacy engines
  1034. // (for example, `DOMQuad` and similar in FF41-)
  1035. return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
  1036. } catch (error) {
  1037. return true;
  1038. }
  1039. };
  1040. isConstructorLegacy.sham = true;
  1041. // `IsConstructor` abstract operation
  1042. // https://tc39.es/ecma262/#sec-isconstructor
  1043. var isConstructor$2 = !construct || fails$h(function () {
  1044. var called;
  1045. return isConstructorModern(isConstructorModern.call)
  1046. || !isConstructorModern(Object)
  1047. || !isConstructorModern(function () { called = true; })
  1048. || called;
  1049. }) ? isConstructorLegacy : isConstructorModern;
  1050. var global$p = global$L;
  1051. var isArray$1 = isArray$2;
  1052. var isConstructor$1 = isConstructor$2;
  1053. var isObject$4 = isObject$a;
  1054. var wellKnownSymbol$e = wellKnownSymbol$i;
  1055. var SPECIES$5 = wellKnownSymbol$e('species');
  1056. var Array$2 = global$p.Array;
  1057. // a part of `ArraySpeciesCreate` abstract operation
  1058. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1059. var arraySpeciesConstructor$1 = function (originalArray) {
  1060. var C;
  1061. if (isArray$1(originalArray)) {
  1062. C = originalArray.constructor;
  1063. // cross-realm fallback
  1064. if (isConstructor$1(C) && (C === Array$2 || isArray$1(C.prototype))) C = undefined;
  1065. else if (isObject$4(C)) {
  1066. C = C[SPECIES$5];
  1067. if (C === null) C = undefined;
  1068. }
  1069. } return C === undefined ? Array$2 : C;
  1070. };
  1071. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1072. // `ArraySpeciesCreate` abstract operation
  1073. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1074. var arraySpeciesCreate$2 = function (originalArray, length) {
  1075. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1076. };
  1077. var bind$4 = functionBindContext;
  1078. var uncurryThis$g = functionUncurryThis;
  1079. var IndexedObject$2 = indexedObject;
  1080. var toObject$5 = toObject$7;
  1081. var lengthOfArrayLike$4 = lengthOfArrayLike$6;
  1082. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1083. var push$4 = uncurryThis$g([].push);
  1084. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1085. var createMethod$3 = function (TYPE) {
  1086. var IS_MAP = TYPE == 1;
  1087. var IS_FILTER = TYPE == 2;
  1088. var IS_SOME = TYPE == 3;
  1089. var IS_EVERY = TYPE == 4;
  1090. var IS_FIND_INDEX = TYPE == 6;
  1091. var IS_FILTER_REJECT = TYPE == 7;
  1092. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1093. return function ($this, callbackfn, that, specificCreate) {
  1094. var O = toObject$5($this);
  1095. var self = IndexedObject$2(O);
  1096. var boundFunction = bind$4(callbackfn, that);
  1097. var length = lengthOfArrayLike$4(self);
  1098. var index = 0;
  1099. var create = specificCreate || arraySpeciesCreate$1;
  1100. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1101. var value, result;
  1102. for (;length > index; index++) if (NO_HOLES || index in self) {
  1103. value = self[index];
  1104. result = boundFunction(value, index, O);
  1105. if (TYPE) {
  1106. if (IS_MAP) target[index] = result; // map
  1107. else if (result) switch (TYPE) {
  1108. case 3: return true; // some
  1109. case 5: return value; // find
  1110. case 6: return index; // findIndex
  1111. case 2: push$4(target, value); // filter
  1112. } else switch (TYPE) {
  1113. case 4: return false; // every
  1114. case 7: push$4(target, value); // filterReject
  1115. }
  1116. }
  1117. }
  1118. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1119. };
  1120. };
  1121. var arrayIteration = {
  1122. // `Array.prototype.forEach` method
  1123. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1124. forEach: createMethod$3(0),
  1125. // `Array.prototype.map` method
  1126. // https://tc39.es/ecma262/#sec-array.prototype.map
  1127. map: createMethod$3(1),
  1128. // `Array.prototype.filter` method
  1129. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1130. filter: createMethod$3(2),
  1131. // `Array.prototype.some` method
  1132. // https://tc39.es/ecma262/#sec-array.prototype.some
  1133. some: createMethod$3(3),
  1134. // `Array.prototype.every` method
  1135. // https://tc39.es/ecma262/#sec-array.prototype.every
  1136. every: createMethod$3(4),
  1137. // `Array.prototype.find` method
  1138. // https://tc39.es/ecma262/#sec-array.prototype.find
  1139. find: createMethod$3(5),
  1140. // `Array.prototype.findIndex` method
  1141. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1142. findIndex: createMethod$3(6),
  1143. // `Array.prototype.filterReject` method
  1144. // https://github.com/tc39/proposal-array-filtering
  1145. filterReject: createMethod$3(7)
  1146. };
  1147. var fails$g = fails$q;
  1148. var wellKnownSymbol$d = wellKnownSymbol$i;
  1149. var V8_VERSION$2 = engineV8Version;
  1150. var SPECIES$4 = wellKnownSymbol$d('species');
  1151. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1152. // We can't use this feature detection in V8 since it causes
  1153. // deoptimization and serious performance degradation
  1154. // https://github.com/zloirock/core-js/issues/677
  1155. return V8_VERSION$2 >= 51 || !fails$g(function () {
  1156. var array = [];
  1157. var constructor = array.constructor = {};
  1158. constructor[SPECIES$4] = function () {
  1159. return { foo: 1 };
  1160. };
  1161. return array[METHOD_NAME](Boolean).foo !== 1;
  1162. });
  1163. };
  1164. var $$j = _export;
  1165. var $filter = arrayIteration.filter;
  1166. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1167. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('filter');
  1168. // `Array.prototype.filter` method
  1169. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1170. // with adding support of @@species
  1171. $$j({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1172. filter: function filter(callbackfn /* , thisArg */) {
  1173. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1174. }
  1175. });
  1176. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1177. var classof$5 = classof$7;
  1178. // `Object.prototype.toString` method implementation
  1179. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1180. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1181. return '[object ' + classof$5(this) + ']';
  1182. };
  1183. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1184. var defineBuiltIn$4 = defineBuiltIn$6;
  1185. var toString$a = objectToString;
  1186. // `Object.prototype.toString` method
  1187. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1188. if (!TO_STRING_TAG_SUPPORT) {
  1189. defineBuiltIn$4(Object.prototype, 'toString', toString$a, { unsafe: true });
  1190. }
  1191. var internalObjectKeys = objectKeysInternal;
  1192. var enumBugKeys$1 = enumBugKeys$3;
  1193. // `Object.keys` method
  1194. // https://tc39.es/ecma262/#sec-object.keys
  1195. // eslint-disable-next-line es-x/no-object-keys -- safe
  1196. var objectKeys$3 = Object.keys || function keys(O) {
  1197. return internalObjectKeys(O, enumBugKeys$1);
  1198. };
  1199. var $$i = _export;
  1200. var toObject$4 = toObject$7;
  1201. var nativeKeys = objectKeys$3;
  1202. var fails$f = fails$q;
  1203. var FAILS_ON_PRIMITIVES = fails$f(function () { nativeKeys(1); });
  1204. // `Object.keys` method
  1205. // https://tc39.es/ecma262/#sec-object.keys
  1206. $$i({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  1207. keys: function keys(it) {
  1208. return nativeKeys(toObject$4(it));
  1209. }
  1210. });
  1211. var toPropertyKey = toPropertyKey$3;
  1212. var definePropertyModule$3 = objectDefineProperty;
  1213. var createPropertyDescriptor = createPropertyDescriptor$3;
  1214. var createProperty$2 = function (object, key, value) {
  1215. var propertyKey = toPropertyKey(key);
  1216. if (propertyKey in object) definePropertyModule$3.f(object, propertyKey, createPropertyDescriptor(0, value));
  1217. else object[propertyKey] = value;
  1218. };
  1219. var $$h = _export;
  1220. var global$o = global$L;
  1221. var fails$e = fails$q;
  1222. var isArray = isArray$2;
  1223. var isObject$3 = isObject$a;
  1224. var toObject$3 = toObject$7;
  1225. var lengthOfArrayLike$3 = lengthOfArrayLike$6;
  1226. var createProperty$1 = createProperty$2;
  1227. var arraySpeciesCreate = arraySpeciesCreate$2;
  1228. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1229. var wellKnownSymbol$c = wellKnownSymbol$i;
  1230. var V8_VERSION$1 = engineV8Version;
  1231. var IS_CONCAT_SPREADABLE = wellKnownSymbol$c('isConcatSpreadable');
  1232. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1233. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1234. var TypeError$a = global$o.TypeError;
  1235. // We can't use this feature detection in V8 since it causes
  1236. // deoptimization and serious performance degradation
  1237. // https://github.com/zloirock/core-js/issues/679
  1238. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION$1 >= 51 || !fails$e(function () {
  1239. var array = [];
  1240. array[IS_CONCAT_SPREADABLE] = false;
  1241. return array.concat()[0] !== array;
  1242. });
  1243. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1244. var isConcatSpreadable = function (O) {
  1245. if (!isObject$3(O)) return false;
  1246. var spreadable = O[IS_CONCAT_SPREADABLE];
  1247. return spreadable !== undefined ? !!spreadable : isArray(O);
  1248. };
  1249. var FORCED$2 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1250. // `Array.prototype.concat` method
  1251. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1252. // with adding support of @@isConcatSpreadable and @@species
  1253. $$h({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
  1254. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1255. concat: function concat(arg) {
  1256. var O = toObject$3(this);
  1257. var A = arraySpeciesCreate(O, 0);
  1258. var n = 0;
  1259. var i, k, length, len, E;
  1260. for (i = -1, length = arguments.length; i < length; i++) {
  1261. E = i === -1 ? O : arguments[i];
  1262. if (isConcatSpreadable(E)) {
  1263. len = lengthOfArrayLike$3(E);
  1264. if (n + len > MAX_SAFE_INTEGER) throw TypeError$a(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1265. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1266. } else {
  1267. if (n >= MAX_SAFE_INTEGER) throw TypeError$a(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1268. createProperty$1(A, n++, E);
  1269. }
  1270. }
  1271. A.length = n;
  1272. return A;
  1273. }
  1274. });
  1275. var objectDefineProperties = {};
  1276. var DESCRIPTORS$3 = descriptors;
  1277. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1278. var definePropertyModule$2 = objectDefineProperty;
  1279. var anObject$d = anObject$g;
  1280. var toIndexedObject$2 = toIndexedObject$6;
  1281. var objectKeys$2 = objectKeys$3;
  1282. // `Object.defineProperties` method
  1283. // https://tc39.es/ecma262/#sec-object.defineproperties
  1284. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  1285. objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1286. anObject$d(O);
  1287. var props = toIndexedObject$2(Properties);
  1288. var keys = objectKeys$2(Properties);
  1289. var length = keys.length;
  1290. var index = 0;
  1291. var key;
  1292. while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
  1293. return O;
  1294. };
  1295. var getBuiltIn$3 = getBuiltIn$8;
  1296. var html$2 = getBuiltIn$3('document', 'documentElement');
  1297. /* global ActiveXObject -- old IE, WSH */
  1298. var anObject$c = anObject$g;
  1299. var definePropertiesModule = objectDefineProperties;
  1300. var enumBugKeys = enumBugKeys$3;
  1301. var hiddenKeys = hiddenKeys$4;
  1302. var html$1 = html$2;
  1303. var documentCreateElement$1 = documentCreateElement$2;
  1304. var sharedKey = sharedKey$2;
  1305. var GT = '>';
  1306. var LT = '<';
  1307. var PROTOTYPE = 'prototype';
  1308. var SCRIPT = 'script';
  1309. var IE_PROTO = sharedKey('IE_PROTO');
  1310. var EmptyConstructor = function () { /* empty */ };
  1311. var scriptTag = function (content) {
  1312. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1313. };
  1314. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1315. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1316. activeXDocument.write(scriptTag(''));
  1317. activeXDocument.close();
  1318. var temp = activeXDocument.parentWindow.Object;
  1319. activeXDocument = null; // avoid memory leak
  1320. return temp;
  1321. };
  1322. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1323. var NullProtoObjectViaIFrame = function () {
  1324. // Thrash, waste and sodomy: IE GC bug
  1325. var iframe = documentCreateElement$1('iframe');
  1326. var JS = 'java' + SCRIPT + ':';
  1327. var iframeDocument;
  1328. iframe.style.display = 'none';
  1329. html$1.appendChild(iframe);
  1330. // https://github.com/zloirock/core-js/issues/475
  1331. iframe.src = String(JS);
  1332. iframeDocument = iframe.contentWindow.document;
  1333. iframeDocument.open();
  1334. iframeDocument.write(scriptTag('document.F=Object'));
  1335. iframeDocument.close();
  1336. return iframeDocument.F;
  1337. };
  1338. // Check for document.domain and active x support
  1339. // No need to use active x approach when document.domain is not set
  1340. // see https://github.com/es-shims/es5-shim/issues/150
  1341. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1342. // avoid IE GC bug
  1343. var activeXDocument;
  1344. var NullProtoObject = function () {
  1345. try {
  1346. activeXDocument = new ActiveXObject('htmlfile');
  1347. } catch (error) { /* ignore */ }
  1348. NullProtoObject = typeof document != 'undefined'
  1349. ? document.domain && activeXDocument
  1350. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1351. : NullProtoObjectViaIFrame()
  1352. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1353. var length = enumBugKeys.length;
  1354. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1355. return NullProtoObject();
  1356. };
  1357. hiddenKeys[IE_PROTO] = true;
  1358. // `Object.create` method
  1359. // https://tc39.es/ecma262/#sec-object.create
  1360. // eslint-disable-next-line es-x/no-object-create -- safe
  1361. var objectCreate = Object.create || function create(O, Properties) {
  1362. var result;
  1363. if (O !== null) {
  1364. EmptyConstructor[PROTOTYPE] = anObject$c(O);
  1365. result = new EmptyConstructor();
  1366. EmptyConstructor[PROTOTYPE] = null;
  1367. // add "__proto__" for Object.getPrototypeOf polyfill
  1368. result[IE_PROTO] = O;
  1369. } else result = NullProtoObject();
  1370. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1371. };
  1372. var wellKnownSymbol$b = wellKnownSymbol$i;
  1373. var create$1 = objectCreate;
  1374. var definePropertyModule$1 = objectDefineProperty;
  1375. var UNSCOPABLES = wellKnownSymbol$b('unscopables');
  1376. var ArrayPrototype$1 = Array.prototype;
  1377. // Array.prototype[@@unscopables]
  1378. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1379. if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
  1380. definePropertyModule$1.f(ArrayPrototype$1, UNSCOPABLES, {
  1381. configurable: true,
  1382. value: create$1(null)
  1383. });
  1384. }
  1385. // add a key to Array.prototype[@@unscopables]
  1386. var addToUnscopables$2 = function (key) {
  1387. ArrayPrototype$1[UNSCOPABLES][key] = true;
  1388. };
  1389. var $$g = _export;
  1390. var $includes = arrayIncludes.includes;
  1391. var fails$d = fails$q;
  1392. var addToUnscopables$1 = addToUnscopables$2;
  1393. // FF99+ bug
  1394. var BROKEN_ON_SPARSE = fails$d(function () {
  1395. return !Array(1).includes();
  1396. });
  1397. // `Array.prototype.includes` method
  1398. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1399. $$g({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1400. includes: function includes(el /* , fromIndex = 0 */) {
  1401. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1402. }
  1403. });
  1404. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1405. addToUnscopables$1('includes');
  1406. var isObject$2 = isObject$a;
  1407. var classof$4 = classofRaw$1;
  1408. var wellKnownSymbol$a = wellKnownSymbol$i;
  1409. var MATCH$1 = wellKnownSymbol$a('match');
  1410. // `IsRegExp` abstract operation
  1411. // https://tc39.es/ecma262/#sec-isregexp
  1412. var isRegexp = function (it) {
  1413. var isRegExp;
  1414. return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) == 'RegExp');
  1415. };
  1416. var global$n = global$L;
  1417. var isRegExp$1 = isRegexp;
  1418. var TypeError$9 = global$n.TypeError;
  1419. var notARegexp = function (it) {
  1420. if (isRegExp$1(it)) {
  1421. throw TypeError$9("The method doesn't accept regular expressions");
  1422. } return it;
  1423. };
  1424. var global$m = global$L;
  1425. var classof$3 = classof$7;
  1426. var String$3 = global$m.String;
  1427. var toString$9 = function (argument) {
  1428. if (classof$3(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1429. return String$3(argument);
  1430. };
  1431. var wellKnownSymbol$9 = wellKnownSymbol$i;
  1432. var MATCH = wellKnownSymbol$9('match');
  1433. var correctIsRegexpLogic = function (METHOD_NAME) {
  1434. var regexp = /./;
  1435. try {
  1436. '/./'[METHOD_NAME](regexp);
  1437. } catch (error1) {
  1438. try {
  1439. regexp[MATCH] = false;
  1440. return '/./'[METHOD_NAME](regexp);
  1441. } catch (error2) { /* empty */ }
  1442. } return false;
  1443. };
  1444. var $$f = _export;
  1445. var uncurryThis$f = functionUncurryThis;
  1446. var notARegExp = notARegexp;
  1447. var requireObjectCoercible$5 = requireObjectCoercible$8;
  1448. var toString$8 = toString$9;
  1449. var correctIsRegExpLogic = correctIsRegexpLogic;
  1450. var stringIndexOf$1 = uncurryThis$f(''.indexOf);
  1451. // `String.prototype.includes` method
  1452. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1453. $$f({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  1454. includes: function includes(searchString /* , position = 0 */) {
  1455. return !!~stringIndexOf$1(
  1456. toString$8(requireObjectCoercible$5(this)),
  1457. toString$8(notARegExp(searchString)),
  1458. arguments.length > 1 ? arguments[1] : undefined
  1459. );
  1460. }
  1461. });
  1462. // iterable DOM collections
  1463. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  1464. var domIterables = {
  1465. CSSRuleList: 0,
  1466. CSSStyleDeclaration: 0,
  1467. CSSValueList: 0,
  1468. ClientRectList: 0,
  1469. DOMRectList: 0,
  1470. DOMStringList: 0,
  1471. DOMTokenList: 1,
  1472. DataTransferItemList: 0,
  1473. FileList: 0,
  1474. HTMLAllCollection: 0,
  1475. HTMLCollection: 0,
  1476. HTMLFormElement: 0,
  1477. HTMLSelectElement: 0,
  1478. MediaList: 0,
  1479. MimeTypeArray: 0,
  1480. NamedNodeMap: 0,
  1481. NodeList: 1,
  1482. PaintRequestList: 0,
  1483. Plugin: 0,
  1484. PluginArray: 0,
  1485. SVGLengthList: 0,
  1486. SVGNumberList: 0,
  1487. SVGPathSegList: 0,
  1488. SVGPointList: 0,
  1489. SVGStringList: 0,
  1490. SVGTransformList: 0,
  1491. SourceBufferList: 0,
  1492. StyleSheetList: 0,
  1493. TextTrackCueList: 0,
  1494. TextTrackList: 0,
  1495. TouchList: 0
  1496. };
  1497. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  1498. var documentCreateElement = documentCreateElement$2;
  1499. var classList = documentCreateElement('span').classList;
  1500. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  1501. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  1502. var fails$c = fails$q;
  1503. var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
  1504. var method = [][METHOD_NAME];
  1505. return !!method && fails$c(function () {
  1506. // eslint-disable-next-line no-useless-call -- required for testing
  1507. method.call(null, argument || function () { return 1; }, 1);
  1508. });
  1509. };
  1510. var $forEach = arrayIteration.forEach;
  1511. var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
  1512. var STRICT_METHOD$3 = arrayMethodIsStrict$3('forEach');
  1513. // `Array.prototype.forEach` method implementation
  1514. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1515. var arrayForEach = !STRICT_METHOD$3 ? function forEach(callbackfn /* , thisArg */) {
  1516. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1517. // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
  1518. } : [].forEach;
  1519. var global$l = global$L;
  1520. var DOMIterables = domIterables;
  1521. var DOMTokenListPrototype = domTokenListPrototype;
  1522. var forEach = arrayForEach;
  1523. var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
  1524. var handlePrototype = function (CollectionPrototype) {
  1525. // some Chrome versions have non-configurable methods on DOMTokenList
  1526. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  1527. createNonEnumerableProperty$1(CollectionPrototype, 'forEach', forEach);
  1528. } catch (error) {
  1529. CollectionPrototype.forEach = forEach;
  1530. }
  1531. };
  1532. for (var COLLECTION_NAME in DOMIterables) {
  1533. if (DOMIterables[COLLECTION_NAME]) {
  1534. handlePrototype(global$l[COLLECTION_NAME] && global$l[COLLECTION_NAME].prototype);
  1535. }
  1536. }
  1537. handlePrototype(DOMTokenListPrototype);
  1538. var DESCRIPTORS$2 = descriptors;
  1539. var uncurryThis$e = functionUncurryThis;
  1540. var objectKeys$1 = objectKeys$3;
  1541. var toIndexedObject$1 = toIndexedObject$6;
  1542. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1543. var propertyIsEnumerable = uncurryThis$e($propertyIsEnumerable);
  1544. var push$3 = uncurryThis$e([].push);
  1545. // `Object.{ entries, values }` methods implementation
  1546. var createMethod$2 = function (TO_ENTRIES) {
  1547. return function (it) {
  1548. var O = toIndexedObject$1(it);
  1549. var keys = objectKeys$1(O);
  1550. var length = keys.length;
  1551. var i = 0;
  1552. var result = [];
  1553. var key;
  1554. while (length > i) {
  1555. key = keys[i++];
  1556. if (!DESCRIPTORS$2 || propertyIsEnumerable(O, key)) {
  1557. push$3(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  1558. }
  1559. }
  1560. return result;
  1561. };
  1562. };
  1563. var objectToArray = {
  1564. // `Object.entries` method
  1565. // https://tc39.es/ecma262/#sec-object.entries
  1566. entries: createMethod$2(true),
  1567. // `Object.values` method
  1568. // https://tc39.es/ecma262/#sec-object.values
  1569. values: createMethod$2(false)
  1570. };
  1571. var $$e = _export;
  1572. var $values = objectToArray.values;
  1573. // `Object.values` method
  1574. // https://tc39.es/ecma262/#sec-object.values
  1575. $$e({ target: 'Object', stat: true }, {
  1576. values: function values(O) {
  1577. return $values(O);
  1578. }
  1579. });
  1580. var anObject$b = anObject$g;
  1581. // `RegExp.prototype.flags` getter implementation
  1582. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1583. var regexpFlags$1 = function () {
  1584. var that = anObject$b(this);
  1585. var result = '';
  1586. if (that.hasIndices) result += 'd';
  1587. if (that.global) result += 'g';
  1588. if (that.ignoreCase) result += 'i';
  1589. if (that.multiline) result += 'm';
  1590. if (that.dotAll) result += 's';
  1591. if (that.unicode) result += 'u';
  1592. if (that.sticky) result += 'y';
  1593. return result;
  1594. };
  1595. var call$e = functionCall;
  1596. var hasOwn$2 = hasOwnProperty_1;
  1597. var isPrototypeOf$2 = objectIsPrototypeOf;
  1598. var regExpFlags = regexpFlags$1;
  1599. var RegExpPrototype$2 = RegExp.prototype;
  1600. var regexpGetFlags = function (R) {
  1601. var flags = R.flags;
  1602. return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn$2(R, 'flags') && isPrototypeOf$2(RegExpPrototype$2, R)
  1603. ? call$e(regExpFlags, R) : flags;
  1604. };
  1605. var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
  1606. var defineBuiltIn$3 = defineBuiltIn$6;
  1607. var anObject$a = anObject$g;
  1608. var $toString = toString$9;
  1609. var fails$b = fails$q;
  1610. var getRegExpFlags = regexpGetFlags;
  1611. var TO_STRING = 'toString';
  1612. var RegExpPrototype$1 = RegExp.prototype;
  1613. var n$ToString = RegExpPrototype$1[TO_STRING];
  1614. var NOT_GENERIC = fails$b(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  1615. // FF44- RegExp#toString has a wrong name
  1616. var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && n$ToString.name != TO_STRING;
  1617. // `RegExp.prototype.toString` method
  1618. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1619. if (NOT_GENERIC || INCORRECT_NAME) {
  1620. defineBuiltIn$3(RegExp.prototype, TO_STRING, function toString() {
  1621. var R = anObject$a(this);
  1622. var pattern = $toString(R.source);
  1623. var flags = $toString(getRegExpFlags(R));
  1624. return '/' + pattern + '/' + flags;
  1625. }, { unsafe: true });
  1626. }
  1627. /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
  1628. var $$d = _export;
  1629. var uncurryThis$d = functionUncurryThis;
  1630. var $IndexOf = arrayIncludes.indexOf;
  1631. var arrayMethodIsStrict$2 = arrayMethodIsStrict$4;
  1632. var un$IndexOf = uncurryThis$d([].indexOf);
  1633. var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
  1634. var STRICT_METHOD$2 = arrayMethodIsStrict$2('indexOf');
  1635. // `Array.prototype.indexOf` method
  1636. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1637. $$d({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$2 }, {
  1638. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1639. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1640. return NEGATIVE_ZERO
  1641. // convert -0 to +0
  1642. ? un$IndexOf(this, searchElement, fromIndex) || 0
  1643. : $IndexOf(this, searchElement, fromIndex);
  1644. }
  1645. });
  1646. var fails$a = fails$q;
  1647. var global$k = global$L;
  1648. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1649. var $RegExp$2 = global$k.RegExp;
  1650. var UNSUPPORTED_Y$2 = fails$a(function () {
  1651. var re = $RegExp$2('a', 'y');
  1652. re.lastIndex = 2;
  1653. return re.exec('abcd') != null;
  1654. });
  1655. // UC Browser bug
  1656. // https://github.com/zloirock/core-js/issues/1008
  1657. var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$a(function () {
  1658. return !$RegExp$2('a', 'y').sticky;
  1659. });
  1660. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$a(function () {
  1661. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1662. var re = $RegExp$2('^r', 'gy');
  1663. re.lastIndex = 2;
  1664. return re.exec('str') != null;
  1665. });
  1666. var regexpStickyHelpers = {
  1667. BROKEN_CARET: BROKEN_CARET,
  1668. MISSED_STICKY: MISSED_STICKY,
  1669. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  1670. };
  1671. var fails$9 = fails$q;
  1672. var global$j = global$L;
  1673. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1674. var $RegExp$1 = global$j.RegExp;
  1675. var regexpUnsupportedDotAll = fails$9(function () {
  1676. var re = $RegExp$1('.', 's');
  1677. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  1678. });
  1679. var fails$8 = fails$q;
  1680. var global$i = global$L;
  1681. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1682. var $RegExp = global$i.RegExp;
  1683. var regexpUnsupportedNcg = fails$8(function () {
  1684. var re = $RegExp('(?<a>b)', 'g');
  1685. return re.exec('b').groups.a !== 'b' ||
  1686. 'b'.replace(re, '$<a>c') !== 'bc';
  1687. });
  1688. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1689. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1690. var call$d = functionCall;
  1691. var uncurryThis$c = functionUncurryThis;
  1692. var toString$7 = toString$9;
  1693. var regexpFlags = regexpFlags$1;
  1694. var stickyHelpers$1 = regexpStickyHelpers;
  1695. var shared = shared$4.exports;
  1696. var create = objectCreate;
  1697. var getInternalState = internalState.get;
  1698. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1699. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1700. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1701. var nativeExec = RegExp.prototype.exec;
  1702. var patchedExec = nativeExec;
  1703. var charAt$3 = uncurryThis$c(''.charAt);
  1704. var indexOf = uncurryThis$c(''.indexOf);
  1705. var replace$2 = uncurryThis$c(''.replace);
  1706. var stringSlice$4 = uncurryThis$c(''.slice);
  1707. var UPDATES_LAST_INDEX_WRONG = (function () {
  1708. var re1 = /a/;
  1709. var re2 = /b*/g;
  1710. call$d(nativeExec, re1, 'a');
  1711. call$d(nativeExec, re2, 'a');
  1712. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1713. })();
  1714. var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
  1715. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1716. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1717. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1718. if (PATCH) {
  1719. patchedExec = function exec(string) {
  1720. var re = this;
  1721. var state = getInternalState(re);
  1722. var str = toString$7(string);
  1723. var raw = state.raw;
  1724. var result, reCopy, lastIndex, match, i, object, group;
  1725. if (raw) {
  1726. raw.lastIndex = re.lastIndex;
  1727. result = call$d(patchedExec, raw, str);
  1728. re.lastIndex = raw.lastIndex;
  1729. return result;
  1730. }
  1731. var groups = state.groups;
  1732. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  1733. var flags = call$d(regexpFlags, re);
  1734. var source = re.source;
  1735. var charsAdded = 0;
  1736. var strCopy = str;
  1737. if (sticky) {
  1738. flags = replace$2(flags, 'y', '');
  1739. if (indexOf(flags, 'g') === -1) {
  1740. flags += 'g';
  1741. }
  1742. strCopy = stringSlice$4(str, re.lastIndex);
  1743. // Support anchored sticky behavior.
  1744. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1745. source = '(?: ' + source + ')';
  1746. strCopy = ' ' + strCopy;
  1747. charsAdded++;
  1748. }
  1749. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1750. // simulate the 'y' flag.
  1751. reCopy = new RegExp('^(?:' + source + ')', flags);
  1752. }
  1753. if (NPCG_INCLUDED) {
  1754. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1755. }
  1756. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1757. match = call$d(nativeExec, sticky ? reCopy : re, strCopy);
  1758. if (sticky) {
  1759. if (match) {
  1760. match.input = stringSlice$4(match.input, charsAdded);
  1761. match[0] = stringSlice$4(match[0], charsAdded);
  1762. match.index = re.lastIndex;
  1763. re.lastIndex += match[0].length;
  1764. } else re.lastIndex = 0;
  1765. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1766. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1767. }
  1768. if (NPCG_INCLUDED && match && match.length > 1) {
  1769. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1770. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  1771. call$d(nativeReplace, match[0], reCopy, function () {
  1772. for (i = 1; i < arguments.length - 2; i++) {
  1773. if (arguments[i] === undefined) match[i] = undefined;
  1774. }
  1775. });
  1776. }
  1777. if (match && groups) {
  1778. match.groups = object = create(null);
  1779. for (i = 0; i < groups.length; i++) {
  1780. group = groups[i];
  1781. object[group[0]] = match[group[1]];
  1782. }
  1783. }
  1784. return match;
  1785. };
  1786. }
  1787. var regexpExec$3 = patchedExec;
  1788. var $$c = _export;
  1789. var exec$2 = regexpExec$3;
  1790. // `RegExp.prototype.exec` method
  1791. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1792. $$c({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
  1793. exec: exec$2
  1794. });
  1795. // a string of all valid unicode whitespaces
  1796. var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1797. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1798. var uncurryThis$b = functionUncurryThis;
  1799. var requireObjectCoercible$4 = requireObjectCoercible$8;
  1800. var toString$6 = toString$9;
  1801. var whitespaces$2 = whitespaces$3;
  1802. var replace$1 = uncurryThis$b(''.replace);
  1803. var whitespace = '[' + whitespaces$2 + ']';
  1804. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1805. var rtrim = RegExp(whitespace + whitespace + '*$');
  1806. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1807. var createMethod$1 = function (TYPE) {
  1808. return function ($this) {
  1809. var string = toString$6(requireObjectCoercible$4($this));
  1810. if (TYPE & 1) string = replace$1(string, ltrim, '');
  1811. if (TYPE & 2) string = replace$1(string, rtrim, '');
  1812. return string;
  1813. };
  1814. };
  1815. var stringTrim = {
  1816. // `String.prototype.{ trimLeft, trimStart }` methods
  1817. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1818. start: createMethod$1(1),
  1819. // `String.prototype.{ trimRight, trimEnd }` methods
  1820. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1821. end: createMethod$1(2),
  1822. // `String.prototype.trim` method
  1823. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1824. trim: createMethod$1(3)
  1825. };
  1826. var global$h = global$L;
  1827. var fails$7 = fails$q;
  1828. var uncurryThis$a = functionUncurryThis;
  1829. var toString$5 = toString$9;
  1830. var trim = stringTrim.trim;
  1831. var whitespaces$1 = whitespaces$3;
  1832. var $parseInt$1 = global$h.parseInt;
  1833. var Symbol$1 = global$h.Symbol;
  1834. var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
  1835. var hex = /^[+-]?0x/i;
  1836. var exec$1 = uncurryThis$a(hex.exec);
  1837. var FORCED$1 = $parseInt$1(whitespaces$1 + '08') !== 8 || $parseInt$1(whitespaces$1 + '0x16') !== 22
  1838. // MS Edge 18- broken with boxed symbols
  1839. || (ITERATOR$3 && !fails$7(function () { $parseInt$1(Object(ITERATOR$3)); }));
  1840. // `parseInt` method
  1841. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1842. var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
  1843. var S = trim(toString$5(string));
  1844. return $parseInt$1(S, (radix >>> 0) || (exec$1(hex, S) ? 16 : 10));
  1845. } : $parseInt$1;
  1846. var $$b = _export;
  1847. var $parseInt = numberParseInt;
  1848. // `parseInt` method
  1849. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1850. $$b({ global: true, forced: parseInt != $parseInt }, {
  1851. parseInt: $parseInt
  1852. });
  1853. var DESCRIPTORS$1 = descriptors;
  1854. var uncurryThis$9 = functionUncurryThis;
  1855. var call$c = functionCall;
  1856. var fails$6 = fails$q;
  1857. var objectKeys = objectKeys$3;
  1858. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1859. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1860. var toObject$2 = toObject$7;
  1861. var IndexedObject$1 = indexedObject;
  1862. // eslint-disable-next-line es-x/no-object-assign -- safe
  1863. var $assign = Object.assign;
  1864. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  1865. var defineProperty$1 = Object.defineProperty;
  1866. var concat$1 = uncurryThis$9([].concat);
  1867. // `Object.assign` method
  1868. // https://tc39.es/ecma262/#sec-object.assign
  1869. var objectAssign = !$assign || fails$6(function () {
  1870. // should have correct order of operations (Edge bug)
  1871. if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
  1872. enumerable: true,
  1873. get: function () {
  1874. defineProperty$1(this, 'b', {
  1875. value: 3,
  1876. enumerable: false
  1877. });
  1878. }
  1879. }), { b: 2 })).b !== 1) return true;
  1880. // should work with symbols and should have deterministic property order (V8 bug)
  1881. var A = {};
  1882. var B = {};
  1883. // eslint-disable-next-line es-x/no-symbol -- safe
  1884. var symbol = Symbol();
  1885. var alphabet = 'abcdefghijklmnopqrst';
  1886. A[symbol] = 7;
  1887. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1888. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1889. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1890. var T = toObject$2(target);
  1891. var argumentsLength = arguments.length;
  1892. var index = 1;
  1893. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1894. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1895. while (argumentsLength > index) {
  1896. var S = IndexedObject$1(arguments[index++]);
  1897. var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1898. var length = keys.length;
  1899. var j = 0;
  1900. var key;
  1901. while (length > j) {
  1902. key = keys[j++];
  1903. if (!DESCRIPTORS$1 || call$c(propertyIsEnumerable, S, key)) T[key] = S[key];
  1904. }
  1905. } return T;
  1906. } : $assign;
  1907. var $$a = _export;
  1908. var assign = objectAssign;
  1909. // `Object.assign` method
  1910. // https://tc39.es/ecma262/#sec-object.assign
  1911. // eslint-disable-next-line es-x/no-object-assign -- required for testing
  1912. $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1913. assign: assign
  1914. });
  1915. var $$9 = _export;
  1916. var $find = arrayIteration.find;
  1917. var addToUnscopables = addToUnscopables$2;
  1918. var FIND = 'find';
  1919. var SKIPS_HOLES = true;
  1920. // Shouldn't skip holes
  1921. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1922. // `Array.prototype.find` method
  1923. // https://tc39.es/ecma262/#sec-array.prototype.find
  1924. $$9({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1925. find: function find(callbackfn /* , that = undefined */) {
  1926. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1927. }
  1928. });
  1929. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1930. addToUnscopables(FIND);
  1931. var classof$2 = classofRaw$1;
  1932. var global$g = global$L;
  1933. var engineIsNode = classof$2(global$g.process) == 'process';
  1934. var global$f = global$L;
  1935. var isCallable$6 = isCallable$j;
  1936. var String$2 = global$f.String;
  1937. var TypeError$8 = global$f.TypeError;
  1938. var aPossiblePrototype$1 = function (argument) {
  1939. if (typeof argument == 'object' || isCallable$6(argument)) return argument;
  1940. throw TypeError$8("Can't set " + String$2(argument) + ' as a prototype');
  1941. };
  1942. /* eslint-disable no-proto -- safe */
  1943. var uncurryThis$8 = functionUncurryThis;
  1944. var anObject$9 = anObject$g;
  1945. var aPossiblePrototype = aPossiblePrototype$1;
  1946. // `Object.setPrototypeOf` method
  1947. // https://tc39.es/ecma262/#sec-object.setprototypeof
  1948. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1949. // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
  1950. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  1951. var CORRECT_SETTER = false;
  1952. var test = {};
  1953. var setter;
  1954. try {
  1955. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1956. setter = uncurryThis$8(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  1957. setter(test, []);
  1958. CORRECT_SETTER = test instanceof Array;
  1959. } catch (error) { /* empty */ }
  1960. return function setPrototypeOf(O, proto) {
  1961. anObject$9(O);
  1962. aPossiblePrototype(proto);
  1963. if (CORRECT_SETTER) setter(O, proto);
  1964. else O.__proto__ = proto;
  1965. return O;
  1966. };
  1967. }() : undefined);
  1968. var defineProperty = objectDefineProperty.f;
  1969. var hasOwn$1 = hasOwnProperty_1;
  1970. var wellKnownSymbol$8 = wellKnownSymbol$i;
  1971. var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
  1972. var setToStringTag$1 = function (target, TAG, STATIC) {
  1973. if (target && !STATIC) target = target.prototype;
  1974. if (target && !hasOwn$1(target, TO_STRING_TAG)) {
  1975. defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
  1976. }
  1977. };
  1978. var getBuiltIn$2 = getBuiltIn$8;
  1979. var definePropertyModule = objectDefineProperty;
  1980. var wellKnownSymbol$7 = wellKnownSymbol$i;
  1981. var DESCRIPTORS = descriptors;
  1982. var SPECIES$3 = wellKnownSymbol$7('species');
  1983. var setSpecies$1 = function (CONSTRUCTOR_NAME) {
  1984. var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
  1985. var defineProperty = definePropertyModule.f;
  1986. if (DESCRIPTORS && Constructor && !Constructor[SPECIES$3]) {
  1987. defineProperty(Constructor, SPECIES$3, {
  1988. configurable: true,
  1989. get: function () { return this; }
  1990. });
  1991. }
  1992. };
  1993. var global$e = global$L;
  1994. var isPrototypeOf$1 = objectIsPrototypeOf;
  1995. var TypeError$7 = global$e.TypeError;
  1996. var anInstance$1 = function (it, Prototype) {
  1997. if (isPrototypeOf$1(Prototype, it)) return it;
  1998. throw TypeError$7('Incorrect invocation');
  1999. };
  2000. var global$d = global$L;
  2001. var isConstructor = isConstructor$2;
  2002. var tryToString$2 = tryToString$4;
  2003. var TypeError$6 = global$d.TypeError;
  2004. // `Assert: IsConstructor(argument) is true`
  2005. var aConstructor$1 = function (argument) {
  2006. if (isConstructor(argument)) return argument;
  2007. throw TypeError$6(tryToString$2(argument) + ' is not a constructor');
  2008. };
  2009. var anObject$8 = anObject$g;
  2010. var aConstructor = aConstructor$1;
  2011. var wellKnownSymbol$6 = wellKnownSymbol$i;
  2012. var SPECIES$2 = wellKnownSymbol$6('species');
  2013. // `SpeciesConstructor` abstract operation
  2014. // https://tc39.es/ecma262/#sec-speciesconstructor
  2015. var speciesConstructor$2 = function (O, defaultConstructor) {
  2016. var C = anObject$8(O).constructor;
  2017. var S;
  2018. return C === undefined || (S = anObject$8(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
  2019. };
  2020. var NATIVE_BIND = functionBindNative;
  2021. var FunctionPrototype = Function.prototype;
  2022. var apply$3 = FunctionPrototype.apply;
  2023. var call$b = FunctionPrototype.call;
  2024. // eslint-disable-next-line es-x/no-reflect -- safe
  2025. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$b.bind(apply$3) : function () {
  2026. return call$b.apply(apply$3, arguments);
  2027. });
  2028. var uncurryThis$7 = functionUncurryThis;
  2029. var arraySlice$3 = uncurryThis$7([].slice);
  2030. var global$c = global$L;
  2031. var TypeError$5 = global$c.TypeError;
  2032. var validateArgumentsLength$1 = function (passed, required) {
  2033. if (passed < required) throw TypeError$5('Not enough arguments');
  2034. return passed;
  2035. };
  2036. var userAgent$4 = engineUserAgent;
  2037. var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
  2038. var global$b = global$L;
  2039. var apply$2 = functionApply;
  2040. var bind$3 = functionBindContext;
  2041. var isCallable$5 = isCallable$j;
  2042. var hasOwn = hasOwnProperty_1;
  2043. var fails$5 = fails$q;
  2044. var html = html$2;
  2045. var arraySlice$2 = arraySlice$3;
  2046. var createElement = documentCreateElement$2;
  2047. var validateArgumentsLength = validateArgumentsLength$1;
  2048. var IS_IOS$1 = engineIsIos;
  2049. var IS_NODE$2 = engineIsNode;
  2050. var set = global$b.setImmediate;
  2051. var clear = global$b.clearImmediate;
  2052. var process$2 = global$b.process;
  2053. var Dispatch = global$b.Dispatch;
  2054. var Function$1 = global$b.Function;
  2055. var MessageChannel = global$b.MessageChannel;
  2056. var String$1 = global$b.String;
  2057. var counter = 0;
  2058. var queue$1 = {};
  2059. var ONREADYSTATECHANGE = 'onreadystatechange';
  2060. var location, defer, channel, port;
  2061. try {
  2062. // Deno throws a ReferenceError on `location` access without `--location` flag
  2063. location = global$b.location;
  2064. } catch (error) { /* empty */ }
  2065. var run = function (id) {
  2066. if (hasOwn(queue$1, id)) {
  2067. var fn = queue$1[id];
  2068. delete queue$1[id];
  2069. fn();
  2070. }
  2071. };
  2072. var runner = function (id) {
  2073. return function () {
  2074. run(id);
  2075. };
  2076. };
  2077. var listener = function (event) {
  2078. run(event.data);
  2079. };
  2080. var post = function (id) {
  2081. // old engines have not location.origin
  2082. global$b.postMessage(String$1(id), location.protocol + '//' + location.host);
  2083. };
  2084. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  2085. if (!set || !clear) {
  2086. set = function setImmediate(handler) {
  2087. validateArgumentsLength(arguments.length, 1);
  2088. var fn = isCallable$5(handler) ? handler : Function$1(handler);
  2089. var args = arraySlice$2(arguments, 1);
  2090. queue$1[++counter] = function () {
  2091. apply$2(fn, undefined, args);
  2092. };
  2093. defer(counter);
  2094. return counter;
  2095. };
  2096. clear = function clearImmediate(id) {
  2097. delete queue$1[id];
  2098. };
  2099. // Node.js 0.8-
  2100. if (IS_NODE$2) {
  2101. defer = function (id) {
  2102. process$2.nextTick(runner(id));
  2103. };
  2104. // Sphere (JS game engine) Dispatch API
  2105. } else if (Dispatch && Dispatch.now) {
  2106. defer = function (id) {
  2107. Dispatch.now(runner(id));
  2108. };
  2109. // Browsers with MessageChannel, includes WebWorkers
  2110. // except iOS - https://github.com/zloirock/core-js/issues/624
  2111. } else if (MessageChannel && !IS_IOS$1) {
  2112. channel = new MessageChannel();
  2113. port = channel.port2;
  2114. channel.port1.onmessage = listener;
  2115. defer = bind$3(port.postMessage, port);
  2116. // Browsers with postMessage, skip WebWorkers
  2117. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  2118. } else if (
  2119. global$b.addEventListener &&
  2120. isCallable$5(global$b.postMessage) &&
  2121. !global$b.importScripts &&
  2122. location && location.protocol !== 'file:' &&
  2123. !fails$5(post)
  2124. ) {
  2125. defer = post;
  2126. global$b.addEventListener('message', listener, false);
  2127. // IE8-
  2128. } else if (ONREADYSTATECHANGE in createElement('script')) {
  2129. defer = function (id) {
  2130. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  2131. html.removeChild(this);
  2132. run(id);
  2133. };
  2134. };
  2135. // Rest old browsers
  2136. } else {
  2137. defer = function (id) {
  2138. setTimeout(runner(id), 0);
  2139. };
  2140. }
  2141. }
  2142. var task$1 = {
  2143. set: set,
  2144. clear: clear
  2145. };
  2146. var userAgent$3 = engineUserAgent;
  2147. var global$a = global$L;
  2148. var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && global$a.Pebble !== undefined;
  2149. var userAgent$2 = engineUserAgent;
  2150. var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
  2151. var global$9 = global$L;
  2152. var bind$2 = functionBindContext;
  2153. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  2154. var macrotask = task$1.set;
  2155. var IS_IOS = engineIsIos;
  2156. var IS_IOS_PEBBLE = engineIsIosPebble;
  2157. var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
  2158. var IS_NODE$1 = engineIsNode;
  2159. var MutationObserver = global$9.MutationObserver || global$9.WebKitMutationObserver;
  2160. var document$2 = global$9.document;
  2161. var process$1 = global$9.process;
  2162. var Promise$1 = global$9.Promise;
  2163. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  2164. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$9, 'queueMicrotask');
  2165. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  2166. var flush, head, last, notify$1, toggle, node, promise, then;
  2167. // modern engines have queueMicrotask method
  2168. if (!queueMicrotask) {
  2169. flush = function () {
  2170. var parent, fn;
  2171. if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
  2172. while (head) {
  2173. fn = head.fn;
  2174. head = head.next;
  2175. try {
  2176. fn();
  2177. } catch (error) {
  2178. if (head) notify$1();
  2179. else last = undefined;
  2180. throw error;
  2181. }
  2182. } last = undefined;
  2183. if (parent) parent.enter();
  2184. };
  2185. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  2186. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  2187. if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
  2188. toggle = true;
  2189. node = document$2.createTextNode('');
  2190. new MutationObserver(flush).observe(node, { characterData: true });
  2191. notify$1 = function () {
  2192. node.data = toggle = !toggle;
  2193. };
  2194. // environments with maybe non-completely correct, but existent Promise
  2195. } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
  2196. // Promise.resolve without an argument throws an error in LG WebOS 2
  2197. promise = Promise$1.resolve(undefined);
  2198. // workaround of WebKit ~ iOS Safari 10.1 bug
  2199. promise.constructor = Promise$1;
  2200. then = bind$2(promise.then, promise);
  2201. notify$1 = function () {
  2202. then(flush);
  2203. };
  2204. // Node.js without promises
  2205. } else if (IS_NODE$1) {
  2206. notify$1 = function () {
  2207. process$1.nextTick(flush);
  2208. };
  2209. // for other environments - macrotask based on:
  2210. // - setImmediate
  2211. // - MessageChannel
  2212. // - window.postMessage
  2213. // - onreadystatechange
  2214. // - setTimeout
  2215. } else {
  2216. // strange IE + webpack dev server bug - use .bind(global)
  2217. macrotask = bind$2(macrotask, global$9);
  2218. notify$1 = function () {
  2219. macrotask(flush);
  2220. };
  2221. }
  2222. }
  2223. var microtask$1 = queueMicrotask || function (fn) {
  2224. var task = { fn: fn, next: undefined };
  2225. if (last) last.next = task;
  2226. if (!head) {
  2227. head = task;
  2228. notify$1();
  2229. } last = task;
  2230. };
  2231. var global$8 = global$L;
  2232. var hostReportErrors$1 = function (a, b) {
  2233. var console = global$8.console;
  2234. if (console && console.error) {
  2235. arguments.length == 1 ? console.error(a) : console.error(a, b);
  2236. }
  2237. };
  2238. var perform$3 = function (exec) {
  2239. try {
  2240. return { error: false, value: exec() };
  2241. } catch (error) {
  2242. return { error: true, value: error };
  2243. }
  2244. };
  2245. var Queue$1 = function () {
  2246. this.head = null;
  2247. this.tail = null;
  2248. };
  2249. Queue$1.prototype = {
  2250. add: function (item) {
  2251. var entry = { item: item, next: null };
  2252. if (this.head) this.tail.next = entry;
  2253. else this.head = entry;
  2254. this.tail = entry;
  2255. },
  2256. get: function () {
  2257. var entry = this.head;
  2258. if (entry) {
  2259. this.head = entry.next;
  2260. if (this.tail === entry) this.tail = null;
  2261. return entry.item;
  2262. }
  2263. }
  2264. };
  2265. var queue = Queue$1;
  2266. var global$7 = global$L;
  2267. var promiseNativeConstructor = global$7.Promise;
  2268. var engineIsBrowser = typeof window == 'object' && typeof Deno != 'object';
  2269. var global$6 = global$L;
  2270. var NativePromiseConstructor$3 = promiseNativeConstructor;
  2271. var isCallable$4 = isCallable$j;
  2272. var isForced = isForced_1;
  2273. var inspectSource = inspectSource$4;
  2274. var wellKnownSymbol$5 = wellKnownSymbol$i;
  2275. var IS_BROWSER = engineIsBrowser;
  2276. var V8_VERSION = engineV8Version;
  2277. NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
  2278. var SPECIES$1 = wellKnownSymbol$5('species');
  2279. var SUBCLASSING = false;
  2280. var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$4(global$6.PromiseRejectionEvent);
  2281. var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
  2282. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
  2283. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
  2284. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2285. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2286. // We can't detect it synchronously, so just check versions
  2287. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2288. // We can't use @@species feature detection in V8 since it causes
  2289. // deoptimization and performance degradation
  2290. // https://github.com/zloirock/core-js/issues/679
  2291. if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
  2292. // Detect correctness of subclassing with @@species support
  2293. var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
  2294. var FakePromise = function (exec) {
  2295. exec(function () { /* empty */ }, function () { /* empty */ });
  2296. };
  2297. var constructor = promise.constructor = {};
  2298. constructor[SPECIES$1] = FakePromise;
  2299. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2300. if (!SUBCLASSING) return true;
  2301. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2302. return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_PROMISE_REJECTION_EVENT$1;
  2303. });
  2304. var promiseConstructorDetection = {
  2305. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
  2306. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
  2307. SUBCLASSING: SUBCLASSING
  2308. };
  2309. var newPromiseCapability$2 = {};
  2310. var aCallable$5 = aCallable$8;
  2311. var PromiseCapability = function (C) {
  2312. var resolve, reject;
  2313. this.promise = new C(function ($$resolve, $$reject) {
  2314. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  2315. resolve = $$resolve;
  2316. reject = $$reject;
  2317. });
  2318. this.resolve = aCallable$5(resolve);
  2319. this.reject = aCallable$5(reject);
  2320. };
  2321. // `NewPromiseCapability` abstract operation
  2322. // https://tc39.es/ecma262/#sec-newpromisecapability
  2323. newPromiseCapability$2.f = function (C) {
  2324. return new PromiseCapability(C);
  2325. };
  2326. var $$8 = _export;
  2327. var IS_NODE = engineIsNode;
  2328. var global$5 = global$L;
  2329. var call$a = functionCall;
  2330. var defineBuiltIn$2 = defineBuiltIn$6;
  2331. var setPrototypeOf = objectSetPrototypeOf;
  2332. var setToStringTag = setToStringTag$1;
  2333. var setSpecies = setSpecies$1;
  2334. var aCallable$4 = aCallable$8;
  2335. var isCallable$3 = isCallable$j;
  2336. var isObject$1 = isObject$a;
  2337. var anInstance = anInstance$1;
  2338. var speciesConstructor$1 = speciesConstructor$2;
  2339. var task = task$1.set;
  2340. var microtask = microtask$1;
  2341. var hostReportErrors = hostReportErrors$1;
  2342. var perform$2 = perform$3;
  2343. var Queue = queue;
  2344. var InternalStateModule = internalState;
  2345. var NativePromiseConstructor$2 = promiseNativeConstructor;
  2346. var PromiseConstructorDetection = promiseConstructorDetection;
  2347. var newPromiseCapabilityModule$3 = newPromiseCapability$2;
  2348. var PROMISE = 'Promise';
  2349. var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
  2350. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  2351. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  2352. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  2353. var setInternalState = InternalStateModule.set;
  2354. var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
  2355. var PromiseConstructor = NativePromiseConstructor$2;
  2356. var PromisePrototype = NativePromisePrototype$1;
  2357. var TypeError$4 = global$5.TypeError;
  2358. var document$1 = global$5.document;
  2359. var process = global$5.process;
  2360. var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
  2361. var newGenericPromiseCapability = newPromiseCapability$1;
  2362. var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$5.dispatchEvent);
  2363. var UNHANDLED_REJECTION = 'unhandledrejection';
  2364. var REJECTION_HANDLED = 'rejectionhandled';
  2365. var PENDING = 0;
  2366. var FULFILLED = 1;
  2367. var REJECTED = 2;
  2368. var HANDLED = 1;
  2369. var UNHANDLED = 2;
  2370. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  2371. // helpers
  2372. var isThenable = function (it) {
  2373. var then;
  2374. return isObject$1(it) && isCallable$3(then = it.then) ? then : false;
  2375. };
  2376. var callReaction = function (reaction, state) {
  2377. var value = state.value;
  2378. var ok = state.state == FULFILLED;
  2379. var handler = ok ? reaction.ok : reaction.fail;
  2380. var resolve = reaction.resolve;
  2381. var reject = reaction.reject;
  2382. var domain = reaction.domain;
  2383. var result, then, exited;
  2384. try {
  2385. if (handler) {
  2386. if (!ok) {
  2387. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  2388. state.rejection = HANDLED;
  2389. }
  2390. if (handler === true) result = value;
  2391. else {
  2392. if (domain) domain.enter();
  2393. result = handler(value); // can throw
  2394. if (domain) {
  2395. domain.exit();
  2396. exited = true;
  2397. }
  2398. }
  2399. if (result === reaction.promise) {
  2400. reject(TypeError$4('Promise-chain cycle'));
  2401. } else if (then = isThenable(result)) {
  2402. call$a(then, result, resolve, reject);
  2403. } else resolve(result);
  2404. } else reject(value);
  2405. } catch (error) {
  2406. if (domain && !exited) domain.exit();
  2407. reject(error);
  2408. }
  2409. };
  2410. var notify = function (state, isReject) {
  2411. if (state.notified) return;
  2412. state.notified = true;
  2413. microtask(function () {
  2414. var reactions = state.reactions;
  2415. var reaction;
  2416. while (reaction = reactions.get()) {
  2417. callReaction(reaction, state);
  2418. }
  2419. state.notified = false;
  2420. if (isReject && !state.rejection) onUnhandled(state);
  2421. });
  2422. };
  2423. var dispatchEvent = function (name, promise, reason) {
  2424. var event, handler;
  2425. if (DISPATCH_EVENT) {
  2426. event = document$1.createEvent('Event');
  2427. event.promise = promise;
  2428. event.reason = reason;
  2429. event.initEvent(name, false, true);
  2430. global$5.dispatchEvent(event);
  2431. } else event = { promise: promise, reason: reason };
  2432. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$5['on' + name])) handler(event);
  2433. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  2434. };
  2435. var onUnhandled = function (state) {
  2436. call$a(task, global$5, function () {
  2437. var promise = state.facade;
  2438. var value = state.value;
  2439. var IS_UNHANDLED = isUnhandled(state);
  2440. var result;
  2441. if (IS_UNHANDLED) {
  2442. result = perform$2(function () {
  2443. if (IS_NODE) {
  2444. process.emit('unhandledRejection', value, promise);
  2445. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  2446. });
  2447. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  2448. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  2449. if (result.error) throw result.value;
  2450. }
  2451. });
  2452. };
  2453. var isUnhandled = function (state) {
  2454. return state.rejection !== HANDLED && !state.parent;
  2455. };
  2456. var onHandleUnhandled = function (state) {
  2457. call$a(task, global$5, function () {
  2458. var promise = state.facade;
  2459. if (IS_NODE) {
  2460. process.emit('rejectionHandled', promise);
  2461. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  2462. });
  2463. };
  2464. var bind$1 = function (fn, state, unwrap) {
  2465. return function (value) {
  2466. fn(state, value, unwrap);
  2467. };
  2468. };
  2469. var internalReject = function (state, value, unwrap) {
  2470. if (state.done) return;
  2471. state.done = true;
  2472. if (unwrap) state = unwrap;
  2473. state.value = value;
  2474. state.state = REJECTED;
  2475. notify(state, true);
  2476. };
  2477. var internalResolve = function (state, value, unwrap) {
  2478. if (state.done) return;
  2479. state.done = true;
  2480. if (unwrap) state = unwrap;
  2481. try {
  2482. if (state.facade === value) throw TypeError$4("Promise can't be resolved itself");
  2483. var then = isThenable(value);
  2484. if (then) {
  2485. microtask(function () {
  2486. var wrapper = { done: false };
  2487. try {
  2488. call$a(then, value,
  2489. bind$1(internalResolve, wrapper, state),
  2490. bind$1(internalReject, wrapper, state)
  2491. );
  2492. } catch (error) {
  2493. internalReject(wrapper, error, state);
  2494. }
  2495. });
  2496. } else {
  2497. state.value = value;
  2498. state.state = FULFILLED;
  2499. notify(state, false);
  2500. }
  2501. } catch (error) {
  2502. internalReject({ done: false }, error, state);
  2503. }
  2504. };
  2505. // constructor polyfill
  2506. if (FORCED_PROMISE_CONSTRUCTOR$4) {
  2507. // 25.4.3.1 Promise(executor)
  2508. PromiseConstructor = function Promise(executor) {
  2509. anInstance(this, PromisePrototype);
  2510. aCallable$4(executor);
  2511. call$a(Internal, this);
  2512. var state = getInternalPromiseState(this);
  2513. try {
  2514. executor(bind$1(internalResolve, state), bind$1(internalReject, state));
  2515. } catch (error) {
  2516. internalReject(state, error);
  2517. }
  2518. };
  2519. PromisePrototype = PromiseConstructor.prototype;
  2520. // eslint-disable-next-line no-unused-vars -- required for `.length`
  2521. Internal = function Promise(executor) {
  2522. setInternalState(this, {
  2523. type: PROMISE,
  2524. done: false,
  2525. notified: false,
  2526. parent: false,
  2527. reactions: new Queue(),
  2528. rejection: false,
  2529. state: PENDING,
  2530. value: undefined
  2531. });
  2532. };
  2533. // `Promise.prototype.then` method
  2534. // https://tc39.es/ecma262/#sec-promise.prototype.then
  2535. Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  2536. var state = getInternalPromiseState(this);
  2537. var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
  2538. state.parent = true;
  2539. reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
  2540. reaction.fail = isCallable$3(onRejected) && onRejected;
  2541. reaction.domain = IS_NODE ? process.domain : undefined;
  2542. if (state.state == PENDING) state.reactions.add(reaction);
  2543. else microtask(function () {
  2544. callReaction(reaction, state);
  2545. });
  2546. return reaction.promise;
  2547. });
  2548. OwnPromiseCapability = function () {
  2549. var promise = new Internal();
  2550. var state = getInternalPromiseState(promise);
  2551. this.promise = promise;
  2552. this.resolve = bind$1(internalResolve, state);
  2553. this.reject = bind$1(internalReject, state);
  2554. };
  2555. newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
  2556. return C === PromiseConstructor || C === PromiseWrapper
  2557. ? new OwnPromiseCapability(C)
  2558. : newGenericPromiseCapability(C);
  2559. };
  2560. if (isCallable$3(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
  2561. nativeThen = NativePromisePrototype$1.then;
  2562. if (!NATIVE_PROMISE_SUBCLASSING) {
  2563. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  2564. defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
  2565. var that = this;
  2566. return new PromiseConstructor(function (resolve, reject) {
  2567. call$a(nativeThen, that, resolve, reject);
  2568. }).then(onFulfilled, onRejected);
  2569. // https://github.com/zloirock/core-js/issues/640
  2570. }, { unsafe: true });
  2571. }
  2572. // make `.constructor === Promise` work for native promise-based APIs
  2573. try {
  2574. delete NativePromisePrototype$1.constructor;
  2575. } catch (error) { /* empty */ }
  2576. // make `instanceof Promise` work for native promise-based APIs
  2577. if (setPrototypeOf) {
  2578. setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
  2579. }
  2580. }
  2581. }
  2582. $$8({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
  2583. Promise: PromiseConstructor
  2584. });
  2585. setToStringTag(PromiseConstructor, PROMISE, false);
  2586. setSpecies(PROMISE);
  2587. var iterators = {};
  2588. var wellKnownSymbol$4 = wellKnownSymbol$i;
  2589. var Iterators$1 = iterators;
  2590. var ITERATOR$2 = wellKnownSymbol$4('iterator');
  2591. var ArrayPrototype = Array.prototype;
  2592. // check on default Array iterator
  2593. var isArrayIteratorMethod$1 = function (it) {
  2594. return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
  2595. };
  2596. var classof$1 = classof$7;
  2597. var getMethod$4 = getMethod$6;
  2598. var Iterators = iterators;
  2599. var wellKnownSymbol$3 = wellKnownSymbol$i;
  2600. var ITERATOR$1 = wellKnownSymbol$3('iterator');
  2601. var getIteratorMethod$2 = function (it) {
  2602. if (it != undefined) return getMethod$4(it, ITERATOR$1)
  2603. || getMethod$4(it, '@@iterator')
  2604. || Iterators[classof$1(it)];
  2605. };
  2606. var global$4 = global$L;
  2607. var call$9 = functionCall;
  2608. var aCallable$3 = aCallable$8;
  2609. var anObject$7 = anObject$g;
  2610. var tryToString$1 = tryToString$4;
  2611. var getIteratorMethod$1 = getIteratorMethod$2;
  2612. var TypeError$3 = global$4.TypeError;
  2613. var getIterator$1 = function (argument, usingIterator) {
  2614. var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
  2615. if (aCallable$3(iteratorMethod)) return anObject$7(call$9(iteratorMethod, argument));
  2616. throw TypeError$3(tryToString$1(argument) + ' is not iterable');
  2617. };
  2618. var call$8 = functionCall;
  2619. var anObject$6 = anObject$g;
  2620. var getMethod$3 = getMethod$6;
  2621. var iteratorClose$1 = function (iterator, kind, value) {
  2622. var innerResult, innerError;
  2623. anObject$6(iterator);
  2624. try {
  2625. innerResult = getMethod$3(iterator, 'return');
  2626. if (!innerResult) {
  2627. if (kind === 'throw') throw value;
  2628. return value;
  2629. }
  2630. innerResult = call$8(innerResult, iterator);
  2631. } catch (error) {
  2632. innerError = true;
  2633. innerResult = error;
  2634. }
  2635. if (kind === 'throw') throw value;
  2636. if (innerError) throw innerResult;
  2637. anObject$6(innerResult);
  2638. return value;
  2639. };
  2640. var global$3 = global$L;
  2641. var bind = functionBindContext;
  2642. var call$7 = functionCall;
  2643. var anObject$5 = anObject$g;
  2644. var tryToString = tryToString$4;
  2645. var isArrayIteratorMethod = isArrayIteratorMethod$1;
  2646. var lengthOfArrayLike$2 = lengthOfArrayLike$6;
  2647. var isPrototypeOf = objectIsPrototypeOf;
  2648. var getIterator = getIterator$1;
  2649. var getIteratorMethod = getIteratorMethod$2;
  2650. var iteratorClose = iteratorClose$1;
  2651. var TypeError$2 = global$3.TypeError;
  2652. var Result = function (stopped, result) {
  2653. this.stopped = stopped;
  2654. this.result = result;
  2655. };
  2656. var ResultPrototype = Result.prototype;
  2657. var iterate$2 = function (iterable, unboundFunction, options) {
  2658. var that = options && options.that;
  2659. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  2660. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  2661. var INTERRUPTED = !!(options && options.INTERRUPTED);
  2662. var fn = bind(unboundFunction, that);
  2663. var iterator, iterFn, index, length, result, next, step;
  2664. var stop = function (condition) {
  2665. if (iterator) iteratorClose(iterator, 'normal', condition);
  2666. return new Result(true, condition);
  2667. };
  2668. var callFn = function (value) {
  2669. if (AS_ENTRIES) {
  2670. anObject$5(value);
  2671. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  2672. } return INTERRUPTED ? fn(value, stop) : fn(value);
  2673. };
  2674. if (IS_ITERATOR) {
  2675. iterator = iterable;
  2676. } else {
  2677. iterFn = getIteratorMethod(iterable);
  2678. if (!iterFn) throw TypeError$2(tryToString(iterable) + ' is not iterable');
  2679. // optimisation for array iterators
  2680. if (isArrayIteratorMethod(iterFn)) {
  2681. for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
  2682. result = callFn(iterable[index]);
  2683. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  2684. } return new Result(false);
  2685. }
  2686. iterator = getIterator(iterable, iterFn);
  2687. }
  2688. next = iterator.next;
  2689. while (!(step = call$7(next, iterator)).done) {
  2690. try {
  2691. result = callFn(step.value);
  2692. } catch (error) {
  2693. iteratorClose(iterator, 'throw', error);
  2694. }
  2695. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  2696. } return new Result(false);
  2697. };
  2698. var wellKnownSymbol$2 = wellKnownSymbol$i;
  2699. var ITERATOR = wellKnownSymbol$2('iterator');
  2700. var SAFE_CLOSING = false;
  2701. try {
  2702. var called = 0;
  2703. var iteratorWithReturn = {
  2704. next: function () {
  2705. return { done: !!called++ };
  2706. },
  2707. 'return': function () {
  2708. SAFE_CLOSING = true;
  2709. }
  2710. };
  2711. iteratorWithReturn[ITERATOR] = function () {
  2712. return this;
  2713. };
  2714. // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
  2715. Array.from(iteratorWithReturn, function () { throw 2; });
  2716. } catch (error) { /* empty */ }
  2717. var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
  2718. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  2719. var ITERATION_SUPPORT = false;
  2720. try {
  2721. var object = {};
  2722. object[ITERATOR] = function () {
  2723. return {
  2724. next: function () {
  2725. return { done: ITERATION_SUPPORT = true };
  2726. }
  2727. };
  2728. };
  2729. exec(object);
  2730. } catch (error) { /* empty */ }
  2731. return ITERATION_SUPPORT;
  2732. };
  2733. var NativePromiseConstructor$1 = promiseNativeConstructor;
  2734. var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
  2735. var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
  2736. var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
  2737. NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
  2738. });
  2739. var $$7 = _export;
  2740. var call$6 = functionCall;
  2741. var aCallable$2 = aCallable$8;
  2742. var newPromiseCapabilityModule$2 = newPromiseCapability$2;
  2743. var perform$1 = perform$3;
  2744. var iterate$1 = iterate$2;
  2745. var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
  2746. // `Promise.all` method
  2747. // https://tc39.es/ecma262/#sec-promise.all
  2748. $$7({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
  2749. all: function all(iterable) {
  2750. var C = this;
  2751. var capability = newPromiseCapabilityModule$2.f(C);
  2752. var resolve = capability.resolve;
  2753. var reject = capability.reject;
  2754. var result = perform$1(function () {
  2755. var $promiseResolve = aCallable$2(C.resolve);
  2756. var values = [];
  2757. var counter = 0;
  2758. var remaining = 1;
  2759. iterate$1(iterable, function (promise) {
  2760. var index = counter++;
  2761. var alreadyCalled = false;
  2762. remaining++;
  2763. call$6($promiseResolve, C, promise).then(function (value) {
  2764. if (alreadyCalled) return;
  2765. alreadyCalled = true;
  2766. values[index] = value;
  2767. --remaining || resolve(values);
  2768. }, reject);
  2769. });
  2770. --remaining || resolve(values);
  2771. });
  2772. if (result.error) reject(result.value);
  2773. return capability.promise;
  2774. }
  2775. });
  2776. var $$6 = _export;
  2777. var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
  2778. var NativePromiseConstructor = promiseNativeConstructor;
  2779. var getBuiltIn$1 = getBuiltIn$8;
  2780. var isCallable$2 = isCallable$j;
  2781. var defineBuiltIn$1 = defineBuiltIn$6;
  2782. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  2783. // `Promise.prototype.catch` method
  2784. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  2785. $$6({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
  2786. 'catch': function (onRejected) {
  2787. return this.then(undefined, onRejected);
  2788. }
  2789. });
  2790. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  2791. if (isCallable$2(NativePromiseConstructor)) {
  2792. var method = getBuiltIn$1('Promise').prototype['catch'];
  2793. if (NativePromisePrototype['catch'] !== method) {
  2794. defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
  2795. }
  2796. }
  2797. var $$5 = _export;
  2798. var call$5 = functionCall;
  2799. var aCallable$1 = aCallable$8;
  2800. var newPromiseCapabilityModule$1 = newPromiseCapability$2;
  2801. var perform = perform$3;
  2802. var iterate = iterate$2;
  2803. var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
  2804. // `Promise.race` method
  2805. // https://tc39.es/ecma262/#sec-promise.race
  2806. $$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  2807. race: function race(iterable) {
  2808. var C = this;
  2809. var capability = newPromiseCapabilityModule$1.f(C);
  2810. var reject = capability.reject;
  2811. var result = perform(function () {
  2812. var $promiseResolve = aCallable$1(C.resolve);
  2813. iterate(iterable, function (promise) {
  2814. call$5($promiseResolve, C, promise).then(capability.resolve, reject);
  2815. });
  2816. });
  2817. if (result.error) reject(result.value);
  2818. return capability.promise;
  2819. }
  2820. });
  2821. var $$4 = _export;
  2822. var call$4 = functionCall;
  2823. var newPromiseCapabilityModule = newPromiseCapability$2;
  2824. var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
  2825. // `Promise.reject` method
  2826. // https://tc39.es/ecma262/#sec-promise.reject
  2827. $$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
  2828. reject: function reject(r) {
  2829. var capability = newPromiseCapabilityModule.f(this);
  2830. call$4(capability.reject, undefined, r);
  2831. return capability.promise;
  2832. }
  2833. });
  2834. var anObject$4 = anObject$g;
  2835. var isObject = isObject$a;
  2836. var newPromiseCapability = newPromiseCapability$2;
  2837. var promiseResolve$1 = function (C, x) {
  2838. anObject$4(C);
  2839. if (isObject(x) && x.constructor === C) return x;
  2840. var promiseCapability = newPromiseCapability.f(C);
  2841. var resolve = promiseCapability.resolve;
  2842. resolve(x);
  2843. return promiseCapability.promise;
  2844. };
  2845. var $$3 = _export;
  2846. var getBuiltIn = getBuiltIn$8;
  2847. var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
  2848. var promiseResolve = promiseResolve$1;
  2849. getBuiltIn('Promise');
  2850. // `Promise.resolve` method
  2851. // https://tc39.es/ecma262/#sec-promise.resolve
  2852. $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  2853. resolve: function resolve(x) {
  2854. return promiseResolve(this, x);
  2855. }
  2856. });
  2857. var PROPER_FUNCTION_NAME = functionName.PROPER;
  2858. var fails$4 = fails$q;
  2859. var whitespaces = whitespaces$3;
  2860. var non = '\u200B\u0085\u180E';
  2861. // check that a method works with the correct list
  2862. // of whitespaces and has a correct name
  2863. var stringTrimForced = function (METHOD_NAME) {
  2864. return fails$4(function () {
  2865. return !!whitespaces[METHOD_NAME]()
  2866. || non[METHOD_NAME]() !== non
  2867. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  2868. });
  2869. };
  2870. var $$2 = _export;
  2871. var $trim = stringTrim.trim;
  2872. var forcedStringTrimMethod = stringTrimForced;
  2873. // `String.prototype.trim` method
  2874. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2875. $$2({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  2876. trim: function trim() {
  2877. return $trim(this);
  2878. }
  2879. });
  2880. var global$2 = global$L;
  2881. var toAbsoluteIndex = toAbsoluteIndex$2;
  2882. var lengthOfArrayLike$1 = lengthOfArrayLike$6;
  2883. var createProperty = createProperty$2;
  2884. var Array$1 = global$2.Array;
  2885. var max$1 = Math.max;
  2886. var arraySliceSimple = function (O, start, end) {
  2887. var length = lengthOfArrayLike$1(O);
  2888. var k = toAbsoluteIndex(start, length);
  2889. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  2890. var result = Array$1(max$1(fin - k, 0));
  2891. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  2892. result.length = n;
  2893. return result;
  2894. };
  2895. var arraySlice$1 = arraySliceSimple;
  2896. var floor$1 = Math.floor;
  2897. var mergeSort = function (array, comparefn) {
  2898. var length = array.length;
  2899. var middle = floor$1(length / 2);
  2900. return length < 8 ? insertionSort(array, comparefn) : merge(
  2901. array,
  2902. mergeSort(arraySlice$1(array, 0, middle), comparefn),
  2903. mergeSort(arraySlice$1(array, middle), comparefn),
  2904. comparefn
  2905. );
  2906. };
  2907. var insertionSort = function (array, comparefn) {
  2908. var length = array.length;
  2909. var i = 1;
  2910. var element, j;
  2911. while (i < length) {
  2912. j = i;
  2913. element = array[i];
  2914. while (j && comparefn(array[j - 1], element) > 0) {
  2915. array[j] = array[--j];
  2916. }
  2917. if (j !== i++) array[j] = element;
  2918. } return array;
  2919. };
  2920. var merge = function (array, left, right, comparefn) {
  2921. var llength = left.length;
  2922. var rlength = right.length;
  2923. var lindex = 0;
  2924. var rindex = 0;
  2925. while (lindex < llength || rindex < rlength) {
  2926. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  2927. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  2928. : lindex < llength ? left[lindex++] : right[rindex++];
  2929. } return array;
  2930. };
  2931. var arraySort = mergeSort;
  2932. var userAgent$1 = engineUserAgent;
  2933. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  2934. var engineFfVersion = !!firefox && +firefox[1];
  2935. var UA = engineUserAgent;
  2936. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  2937. var userAgent = engineUserAgent;
  2938. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  2939. var engineWebkitVersion = !!webkit && +webkit[1];
  2940. var $$1 = _export;
  2941. var uncurryThis$6 = functionUncurryThis;
  2942. var aCallable = aCallable$8;
  2943. var toObject$1 = toObject$7;
  2944. var lengthOfArrayLike = lengthOfArrayLike$6;
  2945. var toString$4 = toString$9;
  2946. var fails$3 = fails$q;
  2947. var internalSort = arraySort;
  2948. var arrayMethodIsStrict$1 = arrayMethodIsStrict$4;
  2949. var FF = engineFfVersion;
  2950. var IE_OR_EDGE = engineIsIeOrEdge;
  2951. var V8 = engineV8Version;
  2952. var WEBKIT = engineWebkitVersion;
  2953. var test = [];
  2954. var un$Sort = uncurryThis$6(test.sort);
  2955. var push$2 = uncurryThis$6(test.push);
  2956. // IE8-
  2957. var FAILS_ON_UNDEFINED = fails$3(function () {
  2958. test.sort(undefined);
  2959. });
  2960. // V8 bug
  2961. var FAILS_ON_NULL = fails$3(function () {
  2962. test.sort(null);
  2963. });
  2964. // Old WebKit
  2965. var STRICT_METHOD$1 = arrayMethodIsStrict$1('sort');
  2966. var STABLE_SORT = !fails$3(function () {
  2967. // feature detection can be too slow, so check engines versions
  2968. if (V8) return V8 < 70;
  2969. if (FF && FF > 3) return;
  2970. if (IE_OR_EDGE) return true;
  2971. if (WEBKIT) return WEBKIT < 603;
  2972. var result = '';
  2973. var code, chr, value, index;
  2974. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  2975. for (code = 65; code < 76; code++) {
  2976. chr = String.fromCharCode(code);
  2977. switch (code) {
  2978. case 66: case 69: case 70: case 72: value = 3; break;
  2979. case 68: case 71: value = 4; break;
  2980. default: value = 2;
  2981. }
  2982. for (index = 0; index < 47; index++) {
  2983. test.push({ k: chr + index, v: value });
  2984. }
  2985. }
  2986. test.sort(function (a, b) { return b.v - a.v; });
  2987. for (index = 0; index < test.length; index++) {
  2988. chr = test[index].k.charAt(0);
  2989. if (result.charAt(result.length - 1) !== chr) result += chr;
  2990. }
  2991. return result !== 'DGBEFHACIJK';
  2992. });
  2993. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  2994. var getSortCompare = function (comparefn) {
  2995. return function (x, y) {
  2996. if (y === undefined) return -1;
  2997. if (x === undefined) return 1;
  2998. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  2999. return toString$4(x) > toString$4(y) ? 1 : -1;
  3000. };
  3001. };
  3002. // `Array.prototype.sort` method
  3003. // https://tc39.es/ecma262/#sec-array.prototype.sort
  3004. $$1({ target: 'Array', proto: true, forced: FORCED }, {
  3005. sort: function sort(comparefn) {
  3006. if (comparefn !== undefined) aCallable(comparefn);
  3007. var array = toObject$1(this);
  3008. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  3009. var items = [];
  3010. var arrayLength = lengthOfArrayLike(array);
  3011. var itemsLength, index;
  3012. for (index = 0; index < arrayLength; index++) {
  3013. if (index in array) push$2(items, array[index]);
  3014. }
  3015. internalSort(items, getSortCompare(comparefn));
  3016. itemsLength = items.length;
  3017. index = 0;
  3018. while (index < itemsLength) array[index] = items[index++];
  3019. while (index < arrayLength) delete array[index++];
  3020. return array;
  3021. }
  3022. });
  3023. // TODO: Remove from `core-js@4` since it's moved to entry points
  3024. var uncurryThis$5 = functionUncurryThis;
  3025. var defineBuiltIn = defineBuiltIn$6;
  3026. var regexpExec$2 = regexpExec$3;
  3027. var fails$2 = fails$q;
  3028. var wellKnownSymbol$1 = wellKnownSymbol$i;
  3029. var createNonEnumerableProperty = createNonEnumerableProperty$5;
  3030. var SPECIES = wellKnownSymbol$1('species');
  3031. var RegExpPrototype = RegExp.prototype;
  3032. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  3033. var SYMBOL = wellKnownSymbol$1(KEY);
  3034. var DELEGATES_TO_SYMBOL = !fails$2(function () {
  3035. // String methods call symbol-named RegEp methods
  3036. var O = {};
  3037. O[SYMBOL] = function () { return 7; };
  3038. return ''[KEY](O) != 7;
  3039. });
  3040. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$2(function () {
  3041. // Symbol-named RegExp methods call .exec
  3042. var execCalled = false;
  3043. var re = /a/;
  3044. if (KEY === 'split') {
  3045. // We can't use real regex here since it causes deoptimization
  3046. // and serious performance degradation in V8
  3047. // https://github.com/zloirock/core-js/issues/306
  3048. re = {};
  3049. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  3050. // a new one. We need to return the patched regex when creating the new one.
  3051. re.constructor = {};
  3052. re.constructor[SPECIES] = function () { return re; };
  3053. re.flags = '';
  3054. re[SYMBOL] = /./[SYMBOL];
  3055. }
  3056. re.exec = function () { execCalled = true; return null; };
  3057. re[SYMBOL]('');
  3058. return !execCalled;
  3059. });
  3060. if (
  3061. !DELEGATES_TO_SYMBOL ||
  3062. !DELEGATES_TO_EXEC ||
  3063. FORCED
  3064. ) {
  3065. var uncurriedNativeRegExpMethod = uncurryThis$5(/./[SYMBOL]);
  3066. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  3067. var uncurriedNativeMethod = uncurryThis$5(nativeMethod);
  3068. var $exec = regexp.exec;
  3069. if ($exec === regexpExec$2 || $exec === RegExpPrototype.exec) {
  3070. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  3071. // The native String method already delegates to @@method (this
  3072. // polyfilled function), leasing to infinite recursion.
  3073. // We avoid it by directly calling the native @@method method.
  3074. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  3075. }
  3076. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  3077. }
  3078. return { done: false };
  3079. });
  3080. defineBuiltIn(String.prototype, KEY, methods[0]);
  3081. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  3082. }
  3083. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  3084. };
  3085. var uncurryThis$4 = functionUncurryThis;
  3086. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  3087. var toString$3 = toString$9;
  3088. var requireObjectCoercible$3 = requireObjectCoercible$8;
  3089. var charAt$2 = uncurryThis$4(''.charAt);
  3090. var charCodeAt = uncurryThis$4(''.charCodeAt);
  3091. var stringSlice$3 = uncurryThis$4(''.slice);
  3092. var createMethod = function (CONVERT_TO_STRING) {
  3093. return function ($this, pos) {
  3094. var S = toString$3(requireObjectCoercible$3($this));
  3095. var position = toIntegerOrInfinity$1(pos);
  3096. var size = S.length;
  3097. var first, second;
  3098. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  3099. first = charCodeAt(S, position);
  3100. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  3101. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  3102. ? CONVERT_TO_STRING
  3103. ? charAt$2(S, position)
  3104. : first
  3105. : CONVERT_TO_STRING
  3106. ? stringSlice$3(S, position, position + 2)
  3107. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  3108. };
  3109. };
  3110. var stringMultibyte = {
  3111. // `String.prototype.codePointAt` method
  3112. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  3113. codeAt: createMethod(false),
  3114. // `String.prototype.at` method
  3115. // https://github.com/mathiasbynens/String.prototype.at
  3116. charAt: createMethod(true)
  3117. };
  3118. var charAt$1 = stringMultibyte.charAt;
  3119. // `AdvanceStringIndex` abstract operation
  3120. // https://tc39.es/ecma262/#sec-advancestringindex
  3121. var advanceStringIndex$3 = function (S, index, unicode) {
  3122. return index + (unicode ? charAt$1(S, index).length : 1);
  3123. };
  3124. var uncurryThis$3 = functionUncurryThis;
  3125. var toObject = toObject$7;
  3126. var floor = Math.floor;
  3127. var charAt = uncurryThis$3(''.charAt);
  3128. var replace = uncurryThis$3(''.replace);
  3129. var stringSlice$2 = uncurryThis$3(''.slice);
  3130. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  3131. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  3132. // `GetSubstitution` abstract operation
  3133. // https://tc39.es/ecma262/#sec-getsubstitution
  3134. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  3135. var tailPos = position + matched.length;
  3136. var m = captures.length;
  3137. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  3138. if (namedCaptures !== undefined) {
  3139. namedCaptures = toObject(namedCaptures);
  3140. symbols = SUBSTITUTION_SYMBOLS;
  3141. }
  3142. return replace(replacement, symbols, function (match, ch) {
  3143. var capture;
  3144. switch (charAt(ch, 0)) {
  3145. case '$': return '$';
  3146. case '&': return matched;
  3147. case '`': return stringSlice$2(str, 0, position);
  3148. case "'": return stringSlice$2(str, tailPos);
  3149. case '<':
  3150. capture = namedCaptures[stringSlice$2(ch, 1, -1)];
  3151. break;
  3152. default: // \d\d?
  3153. var n = +ch;
  3154. if (n === 0) return match;
  3155. if (n > m) {
  3156. var f = floor(n / 10);
  3157. if (f === 0) return match;
  3158. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  3159. return match;
  3160. }
  3161. capture = captures[n - 1];
  3162. }
  3163. return capture === undefined ? '' : capture;
  3164. });
  3165. };
  3166. var global$1 = global$L;
  3167. var call$3 = functionCall;
  3168. var anObject$3 = anObject$g;
  3169. var isCallable$1 = isCallable$j;
  3170. var classof = classofRaw$1;
  3171. var regexpExec$1 = regexpExec$3;
  3172. var TypeError$1 = global$1.TypeError;
  3173. // `RegExpExec` abstract operation
  3174. // https://tc39.es/ecma262/#sec-regexpexec
  3175. var regexpExecAbstract = function (R, S) {
  3176. var exec = R.exec;
  3177. if (isCallable$1(exec)) {
  3178. var result = call$3(exec, R, S);
  3179. if (result !== null) anObject$3(result);
  3180. return result;
  3181. }
  3182. if (classof(R) === 'RegExp') return call$3(regexpExec$1, R, S);
  3183. throw TypeError$1('RegExp#exec called on incompatible receiver');
  3184. };
  3185. var apply$1 = functionApply;
  3186. var call$2 = functionCall;
  3187. var uncurryThis$2 = functionUncurryThis;
  3188. var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
  3189. var fails$1 = fails$q;
  3190. var anObject$2 = anObject$g;
  3191. var isCallable = isCallable$j;
  3192. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  3193. var toLength$2 = toLength$4;
  3194. var toString$2 = toString$9;
  3195. var requireObjectCoercible$2 = requireObjectCoercible$8;
  3196. var advanceStringIndex$2 = advanceStringIndex$3;
  3197. var getMethod$2 = getMethod$6;
  3198. var getSubstitution = getSubstitution$1;
  3199. var regExpExec$1 = regexpExecAbstract;
  3200. var wellKnownSymbol = wellKnownSymbol$i;
  3201. var REPLACE = wellKnownSymbol('replace');
  3202. var max = Math.max;
  3203. var min$1 = Math.min;
  3204. var concat = uncurryThis$2([].concat);
  3205. var push$1 = uncurryThis$2([].push);
  3206. var stringIndexOf = uncurryThis$2(''.indexOf);
  3207. var stringSlice$1 = uncurryThis$2(''.slice);
  3208. var maybeToString = function (it) {
  3209. return it === undefined ? it : String(it);
  3210. };
  3211. // IE <= 11 replaces $0 with the whole match, as if it was $&
  3212. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  3213. var REPLACE_KEEPS_$0 = (function () {
  3214. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  3215. return 'a'.replace(/./, '$0') === '$0';
  3216. })();
  3217. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  3218. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  3219. if (/./[REPLACE]) {
  3220. return /./[REPLACE]('a', '$0') === '';
  3221. }
  3222. return false;
  3223. })();
  3224. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$1(function () {
  3225. var re = /./;
  3226. re.exec = function () {
  3227. var result = [];
  3228. result.groups = { a: '7' };
  3229. return result;
  3230. };
  3231. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  3232. return ''.replace(re, '$<a>') !== '7';
  3233. });
  3234. // @@replace logic
  3235. fixRegExpWellKnownSymbolLogic$2('replace', function (_, nativeReplace, maybeCallNative) {
  3236. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  3237. return [
  3238. // `String.prototype.replace` method
  3239. // https://tc39.es/ecma262/#sec-string.prototype.replace
  3240. function replace(searchValue, replaceValue) {
  3241. var O = requireObjectCoercible$2(this);
  3242. var replacer = searchValue == undefined ? undefined : getMethod$2(searchValue, REPLACE);
  3243. return replacer
  3244. ? call$2(replacer, searchValue, O, replaceValue)
  3245. : call$2(nativeReplace, toString$2(O), searchValue, replaceValue);
  3246. },
  3247. // `RegExp.prototype[@@replace]` method
  3248. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  3249. function (string, replaceValue) {
  3250. var rx = anObject$2(this);
  3251. var S = toString$2(string);
  3252. if (
  3253. typeof replaceValue == 'string' &&
  3254. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  3255. stringIndexOf(replaceValue, '$<') === -1
  3256. ) {
  3257. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  3258. if (res.done) return res.value;
  3259. }
  3260. var functionalReplace = isCallable(replaceValue);
  3261. if (!functionalReplace) replaceValue = toString$2(replaceValue);
  3262. var global = rx.global;
  3263. if (global) {
  3264. var fullUnicode = rx.unicode;
  3265. rx.lastIndex = 0;
  3266. }
  3267. var results = [];
  3268. while (true) {
  3269. var result = regExpExec$1(rx, S);
  3270. if (result === null) break;
  3271. push$1(results, result);
  3272. if (!global) break;
  3273. var matchStr = toString$2(result[0]);
  3274. if (matchStr === '') rx.lastIndex = advanceStringIndex$2(S, toLength$2(rx.lastIndex), fullUnicode);
  3275. }
  3276. var accumulatedResult = '';
  3277. var nextSourcePosition = 0;
  3278. for (var i = 0; i < results.length; i++) {
  3279. result = results[i];
  3280. var matched = toString$2(result[0]);
  3281. var position = max(min$1(toIntegerOrInfinity(result.index), S.length), 0);
  3282. var captures = [];
  3283. // NOTE: This is equivalent to
  3284. // captures = result.slice(1).map(maybeToString)
  3285. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3286. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3287. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3288. for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j]));
  3289. var namedCaptures = result.groups;
  3290. if (functionalReplace) {
  3291. var replacerArgs = concat([matched], captures, position, S);
  3292. if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
  3293. var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs));
  3294. } else {
  3295. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3296. }
  3297. if (position >= nextSourcePosition) {
  3298. accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
  3299. nextSourcePosition = position + matched.length;
  3300. }
  3301. }
  3302. return accumulatedResult + stringSlice$1(S, nextSourcePosition);
  3303. }
  3304. ];
  3305. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  3306. var call$1 = functionCall;
  3307. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  3308. var anObject$1 = anObject$g;
  3309. var toLength$1 = toLength$4;
  3310. var toString$1 = toString$9;
  3311. var requireObjectCoercible$1 = requireObjectCoercible$8;
  3312. var getMethod$1 = getMethod$6;
  3313. var advanceStringIndex$1 = advanceStringIndex$3;
  3314. var regExpExec = regexpExecAbstract;
  3315. // @@match logic
  3316. fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) {
  3317. return [
  3318. // `String.prototype.match` method
  3319. // https://tc39.es/ecma262/#sec-string.prototype.match
  3320. function match(regexp) {
  3321. var O = requireObjectCoercible$1(this);
  3322. var matcher = regexp == undefined ? undefined : getMethod$1(regexp, MATCH);
  3323. return matcher ? call$1(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$1(O));
  3324. },
  3325. // `RegExp.prototype[@@match]` method
  3326. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  3327. function (string) {
  3328. var rx = anObject$1(this);
  3329. var S = toString$1(string);
  3330. var res = maybeCallNative(nativeMatch, rx, S);
  3331. if (res.done) return res.value;
  3332. if (!rx.global) return regExpExec(rx, S);
  3333. var fullUnicode = rx.unicode;
  3334. rx.lastIndex = 0;
  3335. var A = [];
  3336. var n = 0;
  3337. var result;
  3338. while ((result = regExpExec(rx, S)) !== null) {
  3339. var matchStr = toString$1(result[0]);
  3340. A[n] = matchStr;
  3341. if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
  3342. n++;
  3343. }
  3344. return n === 0 ? null : A;
  3345. }
  3346. ];
  3347. });
  3348. var apply = functionApply;
  3349. var call = functionCall;
  3350. var uncurryThis$1 = functionUncurryThis;
  3351. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  3352. var isRegExp = isRegexp;
  3353. var anObject = anObject$g;
  3354. var requireObjectCoercible = requireObjectCoercible$8;
  3355. var speciesConstructor = speciesConstructor$2;
  3356. var advanceStringIndex = advanceStringIndex$3;
  3357. var toLength = toLength$4;
  3358. var toString = toString$9;
  3359. var getMethod = getMethod$6;
  3360. var arraySlice = arraySliceSimple;
  3361. var callRegExpExec = regexpExecAbstract;
  3362. var regexpExec = regexpExec$3;
  3363. var stickyHelpers = regexpStickyHelpers;
  3364. var fails = fails$q;
  3365. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  3366. var MAX_UINT32 = 0xFFFFFFFF;
  3367. var min = Math.min;
  3368. var $push = [].push;
  3369. var exec = uncurryThis$1(/./.exec);
  3370. var push = uncurryThis$1($push);
  3371. var stringSlice = uncurryThis$1(''.slice);
  3372. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  3373. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  3374. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  3375. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3376. var re = /(?:)/;
  3377. var originalExec = re.exec;
  3378. re.exec = function () { return originalExec.apply(this, arguments); };
  3379. var result = 'ab'.split(re);
  3380. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  3381. });
  3382. // @@split logic
  3383. fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
  3384. var internalSplit;
  3385. if (
  3386. 'abbc'.split(/(b)*/)[1] == 'c' ||
  3387. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3388. 'test'.split(/(?:)/, -1).length != 4 ||
  3389. 'ab'.split(/(?:ab)*/).length != 2 ||
  3390. '.'.split(/(.?)(.?)/).length != 4 ||
  3391. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  3392. '.'.split(/()()/).length > 1 ||
  3393. ''.split(/.?/).length
  3394. ) {
  3395. // based on es5-shim implementation, need to rework it
  3396. internalSplit = function (separator, limit) {
  3397. var string = toString(requireObjectCoercible(this));
  3398. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  3399. if (lim === 0) return [];
  3400. if (separator === undefined) return [string];
  3401. // If `separator` is not a regex, use native split
  3402. if (!isRegExp(separator)) {
  3403. return call(nativeSplit, string, separator, lim);
  3404. }
  3405. var output = [];
  3406. var flags = (separator.ignoreCase ? 'i' : '') +
  3407. (separator.multiline ? 'm' : '') +
  3408. (separator.unicode ? 'u' : '') +
  3409. (separator.sticky ? 'y' : '');
  3410. var lastLastIndex = 0;
  3411. // Make `global` and avoid `lastIndex` issues by working with a copy
  3412. var separatorCopy = new RegExp(separator.source, flags + 'g');
  3413. var match, lastIndex, lastLength;
  3414. while (match = call(regexpExec, separatorCopy, string)) {
  3415. lastIndex = separatorCopy.lastIndex;
  3416. if (lastIndex > lastLastIndex) {
  3417. push(output, stringSlice(string, lastLastIndex, match.index));
  3418. if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
  3419. lastLength = match[0].length;
  3420. lastLastIndex = lastIndex;
  3421. if (output.length >= lim) break;
  3422. }
  3423. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  3424. }
  3425. if (lastLastIndex === string.length) {
  3426. if (lastLength || !exec(separatorCopy, '')) push(output, '');
  3427. } else push(output, stringSlice(string, lastLastIndex));
  3428. return output.length > lim ? arraySlice(output, 0, lim) : output;
  3429. };
  3430. // Chakra, V8
  3431. } else if ('0'.split(undefined, 0).length) {
  3432. internalSplit = function (separator, limit) {
  3433. return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
  3434. };
  3435. } else internalSplit = nativeSplit;
  3436. return [
  3437. // `String.prototype.split` method
  3438. // https://tc39.es/ecma262/#sec-string.prototype.split
  3439. function split(separator, limit) {
  3440. var O = requireObjectCoercible(this);
  3441. var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
  3442. return splitter
  3443. ? call(splitter, separator, O, limit)
  3444. : call(internalSplit, toString(O), separator, limit);
  3445. },
  3446. // `RegExp.prototype[@@split]` method
  3447. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  3448. //
  3449. // NOTE: This cannot be properly polyfilled in engines that don't support
  3450. // the 'y' flag.
  3451. function (string, limit) {
  3452. var rx = anObject(this);
  3453. var S = toString(string);
  3454. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  3455. if (res.done) return res.value;
  3456. var C = speciesConstructor(rx, RegExp);
  3457. var unicodeMatching = rx.unicode;
  3458. var flags = (rx.ignoreCase ? 'i' : '') +
  3459. (rx.multiline ? 'm' : '') +
  3460. (rx.unicode ? 'u' : '') +
  3461. (UNSUPPORTED_Y ? 'g' : 'y');
  3462. // ^(? + rx + ) is needed, in combination with some S slicing, to
  3463. // simulate the 'y' flag.
  3464. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  3465. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  3466. if (lim === 0) return [];
  3467. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  3468. var p = 0;
  3469. var q = 0;
  3470. var A = [];
  3471. while (q < S.length) {
  3472. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  3473. var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
  3474. var e;
  3475. if (
  3476. z === null ||
  3477. (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  3478. ) {
  3479. q = advanceStringIndex(S, q, unicodeMatching);
  3480. } else {
  3481. push(A, stringSlice(S, p, q));
  3482. if (A.length === lim) return A;
  3483. for (var i = 1; i <= z.length - 1; i++) {
  3484. push(A, z[i]);
  3485. if (A.length === lim) return A;
  3486. }
  3487. q = p = e;
  3488. }
  3489. }
  3490. push(A, stringSlice(S, p));
  3491. return A;
  3492. }
  3493. ];
  3494. }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  3495. var $ = _export;
  3496. var uncurryThis = functionUncurryThis;
  3497. var IndexedObject = indexedObject;
  3498. var toIndexedObject = toIndexedObject$6;
  3499. var arrayMethodIsStrict = arrayMethodIsStrict$4;
  3500. var un$Join = uncurryThis([].join);
  3501. var ES3_STRINGS = IndexedObject != Object;
  3502. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  3503. // `Array.prototype.join` method
  3504. // https://tc39.es/ecma262/#sec-array.prototype.join
  3505. $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  3506. join: function join(separator) {
  3507. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  3508. }
  3509. });
  3510. /* eslint-disable no-use-before-define */
  3511. var Utils$1 = $__default["default"].fn.bootstrapTable.utils;
  3512. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  3513. function getInputClass(that) {
  3514. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3515. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  3516. return that.options.iconSize ? Utils$1.sprintf('%s-%s', formControlClass, that.options.iconSize) : formControlClass;
  3517. }
  3518. function getOptionsFromSelectControl(selectControl) {
  3519. return selectControl[0].options;
  3520. }
  3521. function getControlContainer(that) {
  3522. if (that.options.filterControlContainer) {
  3523. return $__default["default"]("".concat(that.options.filterControlContainer));
  3524. }
  3525. if (that.options.height && that._initialized) {
  3526. return $__default["default"]('.fixed-table-header table thead');
  3527. }
  3528. return that.$header;
  3529. }
  3530. function isKeyAllowed(keyCode) {
  3531. return $__default["default"].inArray(keyCode, [37, 38, 39, 40]) > -1;
  3532. }
  3533. function getSearchControls(that) {
  3534. return getControlContainer(that).find(searchControls);
  3535. }
  3536. function existOptionInSelectControl(selectControl, value) {
  3537. var options = getOptionsFromSelectControl(selectControl);
  3538. for (var i = 0; i < options.length; i++) {
  3539. if (options[i].value === Utils$1.unescapeHTML(value)) {
  3540. // The value is not valid to add
  3541. return true;
  3542. }
  3543. } // If we get here, the value is valid to add
  3544. return false;
  3545. }
  3546. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  3547. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  3548. value = Utils$1.removeHTML(value);
  3549. text = Utils$1.removeHTML(text);
  3550. if (existOptionInSelectControl(selectControl, value)) {
  3551. return;
  3552. }
  3553. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  3554. var option = new Option(text, value, false, isSelected);
  3555. selectControl.get(0).add(option);
  3556. }
  3557. function sortSelectControl(selectControl, orderBy) {
  3558. var $selectControl = selectControl.get(0);
  3559. if (orderBy === 'server') {
  3560. return;
  3561. }
  3562. var tmpAry = new Array();
  3563. for (var i = 0; i < $selectControl.options.length; i++) {
  3564. tmpAry[i] = new Array();
  3565. tmpAry[i][0] = $selectControl.options[i].text;
  3566. tmpAry[i][1] = $selectControl.options[i].value;
  3567. tmpAry[i][2] = $selectControl.options[i].selected;
  3568. }
  3569. tmpAry.sort(function (a, b) {
  3570. return Utils$1.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1);
  3571. });
  3572. while ($selectControl.options.length > 0) {
  3573. $selectControl.options[0] = null;
  3574. }
  3575. for (var _i = 0; _i < tmpAry.length; _i++) {
  3576. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  3577. $selectControl.add(op);
  3578. }
  3579. }
  3580. function fixHeaderCSS(_ref) {
  3581. var $tableHeader = _ref.$tableHeader;
  3582. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  3583. }
  3584. function getElementClass($element) {
  3585. return $element.attr('class').replace('form-control', '').replace('focus-temp', '').replace('search-input', '').trim();
  3586. }
  3587. function getCursorPosition(el) {
  3588. if ($__default["default"](el).is('input[type=search]')) {
  3589. var pos = 0;
  3590. if ('selectionStart' in el) {
  3591. pos = el.selectionStart;
  3592. } else if ('selection' in document) {
  3593. el.focus();
  3594. var Sel = document.selection.createRange();
  3595. var SelLength = document.selection.createRange().text.length;
  3596. Sel.moveStart('character', -el.value.length);
  3597. pos = Sel.text.length - SelLength;
  3598. }
  3599. return pos;
  3600. }
  3601. return -1;
  3602. }
  3603. function cacheValues(that) {
  3604. var searchControls = getSearchControls(that);
  3605. that._valuesFilterControl = [];
  3606. searchControls.each(function () {
  3607. var $field = $__default["default"](this);
  3608. var fieldClass = getElementClass($field);
  3609. if (that.options.height && !that.options.filterControlContainer) {
  3610. $field = $__default["default"](".fixed-table-header .".concat(fieldClass));
  3611. } else if (that.options.filterControlContainer) {
  3612. $field = $__default["default"]("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  3613. } else {
  3614. $field = $__default["default"](".".concat(fieldClass));
  3615. }
  3616. that._valuesFilterControl.push({
  3617. field: $field.closest('[data-field]').data('field'),
  3618. value: $field.val(),
  3619. position: getCursorPosition($field.get(0)),
  3620. hasFocus: $field.is(':focus')
  3621. });
  3622. });
  3623. }
  3624. function setCaretPosition(elem, caretPos) {
  3625. try {
  3626. if (elem) {
  3627. if (elem.createTextRange) {
  3628. var range = elem.createTextRange();
  3629. range.move('character', caretPos);
  3630. range.select();
  3631. } else {
  3632. elem.setSelectionRange(caretPos, caretPos);
  3633. }
  3634. }
  3635. } catch (ex) {// ignored
  3636. }
  3637. }
  3638. function setValues(that) {
  3639. var field = null;
  3640. var result = [];
  3641. var searchControls = getSearchControls(that);
  3642. if (that._valuesFilterControl.length > 0) {
  3643. // Callback to apply after settings fields values
  3644. var callbacks = [];
  3645. searchControls.each(function (i, el) {
  3646. var $this = $__default["default"](el);
  3647. field = $this.closest('[data-field]').data('field');
  3648. result = that._valuesFilterControl.filter(function (valueObj) {
  3649. return valueObj.field === field;
  3650. });
  3651. if (result.length > 0) {
  3652. if (result[0].hasFocus || result[0].value) {
  3653. var fieldToFocusCallback = function (element, cacheElementInfo) {
  3654. // Closure here to capture the field information
  3655. var closedCallback = function closedCallback() {
  3656. if (cacheElementInfo.hasFocus) {
  3657. element.focus();
  3658. }
  3659. if (Array.isArray(cacheElementInfo.value)) {
  3660. var $element = $__default["default"](element);
  3661. $__default["default"].each(cacheElementInfo.value, function (i, e) {
  3662. $element.find(Utils$1.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  3663. });
  3664. } else {
  3665. element.value = cacheElementInfo.value;
  3666. }
  3667. setCaretPosition(element, cacheElementInfo.position);
  3668. };
  3669. return closedCallback;
  3670. }($this.get(0), result[0]);
  3671. callbacks.push(fieldToFocusCallback);
  3672. }
  3673. }
  3674. }); // Callback call.
  3675. if (callbacks.length > 0) {
  3676. callbacks.forEach(function (callback) {
  3677. return callback();
  3678. });
  3679. }
  3680. }
  3681. }
  3682. function collectBootstrapTableFilterCookies() {
  3683. var cookies = [];
  3684. var foundCookies = document.cookie.match(/bs\.table\.(filterControl|searchText)/g);
  3685. var foundLocalStorage = localStorage;
  3686. if (foundCookies) {
  3687. $__default["default"].each(foundCookies, function (i, _cookie) {
  3688. var cookie = _cookie;
  3689. if (/./.test(cookie)) {
  3690. cookie = cookie.split('.').pop();
  3691. }
  3692. if ($__default["default"].inArray(cookie, cookies) === -1) {
  3693. cookies.push(cookie);
  3694. }
  3695. });
  3696. }
  3697. if (foundLocalStorage) {
  3698. for (var i = 0; i < foundLocalStorage.length; i++) {
  3699. var cookie = foundLocalStorage.key(i);
  3700. if (/./.test(cookie)) {
  3701. cookie = cookie.split('.').pop();
  3702. }
  3703. if (!cookies.includes(cookie)) {
  3704. cookies.push(cookie);
  3705. }
  3706. }
  3707. }
  3708. return cookies;
  3709. }
  3710. function escapeID(id) {
  3711. // eslint-disable-next-line no-useless-escape
  3712. return String(id).replace(/([:.\[\],])/g, '\\$1');
  3713. }
  3714. function isColumnSearchableViaSelect(_ref2) {
  3715. var filterControl = _ref2.filterControl,
  3716. searchable = _ref2.searchable;
  3717. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  3718. }
  3719. function isFilterDataNotGiven(_ref3) {
  3720. var filterData = _ref3.filterData;
  3721. return filterData === undefined || filterData.toLowerCase() === 'column';
  3722. }
  3723. function hasSelectControlElement(selectControl) {
  3724. return selectControl && selectControl.length > 0;
  3725. }
  3726. function initFilterSelectControls(that) {
  3727. var data = that.options.data;
  3728. $__default["default"].each(that.header.fields, function (j, field) {
  3729. var column = that.columns[that.fieldsColumnsIndex[field]];
  3730. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3731. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  3732. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  3733. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  3734. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  3735. }
  3736. var uniqueValues = {};
  3737. for (var i = 0; i < data.length; i++) {
  3738. // Added a new value
  3739. var fieldValue = Utils$1.getItemField(data[i], field, false);
  3740. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  3741. var formattedValue = Utils$1.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  3742. if (!fieldValue) {
  3743. fieldValue = formattedValue;
  3744. column._forceFormatter = true;
  3745. }
  3746. if (column.filterDataCollector) {
  3747. formattedValue = Utils$1.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  3748. }
  3749. if (column.searchFormatter) {
  3750. fieldValue = formattedValue;
  3751. }
  3752. uniqueValues[formattedValue] = fieldValue;
  3753. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  3754. formattedValue.forEach(function (value) {
  3755. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  3756. });
  3757. continue;
  3758. }
  3759. } // eslint-disable-next-line guard-for-in
  3760. for (var key in uniqueValues) {
  3761. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  3762. }
  3763. }
  3764. });
  3765. }
  3766. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  3767. var keys = Object.keys(objFilterDataMethod);
  3768. for (var i = 0; i < keys.length; i++) {
  3769. if (keys[i] === searchTerm) {
  3770. return objFilterDataMethod[searchTerm];
  3771. }
  3772. }
  3773. return null;
  3774. }
  3775. function createControls(that, header) {
  3776. var addedFilterControl = false;
  3777. var html;
  3778. $__default["default"].each(that.columns, function (_, column) {
  3779. html = [];
  3780. if (!column.visible) {
  3781. return;
  3782. }
  3783. if (!column.filterControl && !that.options.filterControlContainer) {
  3784. html.push('<div class="no-filter-control"></div>');
  3785. } else if (that.options.filterControlContainer) {
  3786. // Use a filter control container instead of th
  3787. var $filterControls = $__default["default"](".bootstrap-table-filter-control-".concat(column.field));
  3788. $__default["default"].each($filterControls, function (_, filterControl) {
  3789. var $filterControl = $__default["default"](filterControl);
  3790. if (!$filterControl.is('[type=radio]')) {
  3791. var placeholder = column.filterControlPlaceholder || '';
  3792. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  3793. }
  3794. $filterControl.attr('data-field', column.field);
  3795. });
  3796. addedFilterControl = true;
  3797. } else {
  3798. // Create the control based on the html defined in the filterTemplate array.
  3799. var nameControl = column.filterControl.toLowerCase();
  3800. html.push('<div class="filter-control">');
  3801. addedFilterControl = true;
  3802. if (column.searchable && that.options.filterTemplate[nameControl]) {
  3803. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  3804. }
  3805. } // Filtering by default when it is set.
  3806. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  3807. if ($__default["default"].isEmptyObject(that.filterColumnsPartial)) {
  3808. that.filterColumnsPartial = {};
  3809. }
  3810. that.filterColumnsPartial[column.field] = column.filterDefault;
  3811. }
  3812. $__default["default"].each(header.find('th'), function (_, th) {
  3813. var $th = $__default["default"](th);
  3814. if ($th.data('field') === column.field) {
  3815. $th.find('.filter-control').remove();
  3816. $th.find('.fht-cell').html(html.join(''));
  3817. return false;
  3818. }
  3819. });
  3820. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  3821. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  3822. var filterDataSource;
  3823. var selectControl;
  3824. if (filterDataType) {
  3825. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  3826. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3827. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  3828. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  3829. } else {
  3830. throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, obj, json, url, func.' + ' Use like this: var: {key: "value"}');
  3831. }
  3832. }
  3833. });
  3834. if (addedFilterControl) {
  3835. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  3836. var currentTarget = _ref4.currentTarget,
  3837. keyCode = _ref4.keyCode;
  3838. keyCode = obj ? obj.keyCode : keyCode;
  3839. if (that.options.searchOnEnterKey && keyCode !== 13) {
  3840. return;
  3841. }
  3842. if (isKeyAllowed(keyCode)) {
  3843. return;
  3844. }
  3845. var $currentTarget = $__default["default"](currentTarget);
  3846. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  3847. return;
  3848. }
  3849. clearTimeout(currentTarget.timeoutId || 0);
  3850. currentTarget.timeoutId = setTimeout(function () {
  3851. that.onColumnSearch({
  3852. currentTarget: currentTarget,
  3853. keyCode: keyCode
  3854. });
  3855. }, that.options.searchTimeOut);
  3856. });
  3857. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  3858. var currentTarget = _ref5.currentTarget,
  3859. keyCode = _ref5.keyCode;
  3860. var $selectControl = $__default["default"](currentTarget);
  3861. var value = $selectControl.val();
  3862. if (Array.isArray(value)) {
  3863. for (var i = 0; i < value.length; i++) {
  3864. if (value[i] && value[i].length > 0 && value[i].trim()) {
  3865. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  3866. }
  3867. }
  3868. } else if (value && value.length > 0 && value.trim()) {
  3869. $selectControl.find('option[selected]').removeAttr('selected');
  3870. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  3871. } else {
  3872. $selectControl.find('option[selected]').removeAttr('selected');
  3873. }
  3874. clearTimeout(currentTarget.timeoutId || 0);
  3875. currentTarget.timeoutId = setTimeout(function () {
  3876. that.onColumnSearch({
  3877. currentTarget: currentTarget,
  3878. keyCode: keyCode
  3879. });
  3880. }, that.options.searchTimeOut);
  3881. });
  3882. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  3883. var currentTarget = _ref6.currentTarget,
  3884. keyCode = _ref6.keyCode;
  3885. var $input = $__default["default"](currentTarget);
  3886. var oldValue = $input.val();
  3887. if (oldValue === '') {
  3888. return;
  3889. }
  3890. setTimeout(function () {
  3891. var newValue = $input.val();
  3892. if (newValue === '') {
  3893. clearTimeout(currentTarget.timeoutId || 0);
  3894. currentTarget.timeoutId = setTimeout(function () {
  3895. that.onColumnSearch({
  3896. currentTarget: currentTarget,
  3897. keyCode: keyCode
  3898. });
  3899. }, that.options.searchTimeOut);
  3900. }
  3901. }, 1);
  3902. });
  3903. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  3904. var currentTarget = _ref7.currentTarget,
  3905. keyCode = _ref7.keyCode;
  3906. clearTimeout(currentTarget.timeoutId || 0);
  3907. currentTarget.timeoutId = setTimeout(function () {
  3908. that.onColumnSearch({
  3909. currentTarget: currentTarget,
  3910. keyCode: keyCode
  3911. });
  3912. }, that.options.searchTimeOut);
  3913. }); // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  3914. if (header.find('.date-filter-control').length > 0) {
  3915. $__default["default"].each(that.columns, function (i, _ref8) {
  3916. var filterDefault = _ref8.filterDefault,
  3917. filterControl = _ref8.filterControl,
  3918. field = _ref8.field,
  3919. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  3920. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  3921. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(field));
  3922. if (filterDefault) {
  3923. $datepicker.value(filterDefault);
  3924. }
  3925. if (filterDatepickerOptions.min) {
  3926. $datepicker.attr('min', filterDatepickerOptions.min);
  3927. }
  3928. if (filterDatepickerOptions.max) {
  3929. $datepicker.attr('max', filterDatepickerOptions.max);
  3930. }
  3931. if (filterDatepickerOptions.step) {
  3932. $datepicker.attr('step', filterDatepickerOptions.step);
  3933. }
  3934. if (filterDatepickerOptions.pattern) {
  3935. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  3936. }
  3937. $datepicker.on('change', function (_ref9) {
  3938. var currentTarget = _ref9.currentTarget;
  3939. clearTimeout(currentTarget.timeoutId || 0);
  3940. currentTarget.timeoutId = setTimeout(function () {
  3941. that.onColumnSearch({
  3942. currentTarget: currentTarget
  3943. });
  3944. }, that.options.searchTimeOut);
  3945. });
  3946. }
  3947. });
  3948. }
  3949. if (that.options.sidePagination !== 'server') {
  3950. that.triggerSearch();
  3951. }
  3952. if (!that.options.filterControlVisible) {
  3953. header.find('.filter-control, .no-filter-control').hide();
  3954. }
  3955. } else {
  3956. header.find('.filter-control, .no-filter-control').hide();
  3957. }
  3958. that.trigger('created-controls');
  3959. }
  3960. function getDirectionOfSelectOptions(_alignment) {
  3961. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  3962. switch (alignment) {
  3963. case 'left':
  3964. return 'ltr';
  3965. case 'right':
  3966. return 'rtl';
  3967. case 'auto':
  3968. return 'auto';
  3969. default:
  3970. return 'ltr';
  3971. }
  3972. }
  3973. function syncHeaders(that) {
  3974. if (!that.options.height) {
  3975. return;
  3976. }
  3977. var fixedHeader = $__default["default"]('.fixed-table-header table thead');
  3978. if (fixedHeader.length === 0) {
  3979. return;
  3980. }
  3981. that.$header.children().find('th[data-field]').each(function (_, element) {
  3982. if (element.classList[0] !== 'bs-checkbox') {
  3983. var $element = $__default["default"](element);
  3984. var $field = $element.data('field');
  3985. var $fixedField = $__default["default"]("th[data-field='".concat($field, "']")).not($element);
  3986. var input = $element.find('input');
  3987. var fixedInput = $fixedField.find('input');
  3988. if (input.length > 0 && fixedInput.length > 0) {
  3989. if (input.val() !== fixedInput.val()) {
  3990. input.val(fixedInput.val());
  3991. }
  3992. }
  3993. }
  3994. });
  3995. }
  3996. var filterDataMethods = {
  3997. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  3998. var variableValues = window[filterDataSource].apply(); // eslint-disable-next-line guard-for-in
  3999. for (var key in variableValues) {
  4000. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4001. }
  4002. if (that.options.sortSelectOptions) {
  4003. sortSelectControl(selectControl, filterOrderBy);
  4004. }
  4005. setValues(that);
  4006. },
  4007. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4008. var objectKeys = filterDataSource.split('.');
  4009. var variableName = objectKeys.shift();
  4010. var variableValues = window[variableName];
  4011. if (objectKeys.length > 0) {
  4012. objectKeys.forEach(function (key) {
  4013. variableValues = variableValues[key];
  4014. });
  4015. } // eslint-disable-next-line guard-for-in
  4016. for (var key in variableValues) {
  4017. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4018. }
  4019. if (that.options.sortSelectOptions) {
  4020. sortSelectControl(selectControl, filterOrderBy);
  4021. }
  4022. setValues(that);
  4023. },
  4024. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4025. var variableValues = window[filterDataSource];
  4026. var isArray = Array.isArray(variableValues);
  4027. for (var key in variableValues) {
  4028. if (isArray) {
  4029. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  4030. } else {
  4031. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  4032. }
  4033. }
  4034. if (that.options.sortSelectOptions) {
  4035. sortSelectControl(selectControl, filterOrderBy);
  4036. }
  4037. setValues(that);
  4038. },
  4039. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4040. $__default["default"].ajax({
  4041. url: filterDataSource,
  4042. dataType: 'json',
  4043. success: function success(data) {
  4044. // eslint-disable-next-line guard-for-in
  4045. for (var key in data) {
  4046. addOptionToSelectControl(selectControl, key, data[key], selected);
  4047. }
  4048. if (that.options.sortSelectOptions) {
  4049. sortSelectControl(selectControl, filterOrderBy);
  4050. }
  4051. setValues(that);
  4052. }
  4053. });
  4054. },
  4055. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4056. var variableValues = JSON.parse(filterDataSource); // eslint-disable-next-line guard-for-in
  4057. for (var key in variableValues) {
  4058. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4059. }
  4060. if (that.options.sortSelectOptions) {
  4061. sortSelectControl(selectControl, filterOrderBy);
  4062. }
  4063. setValues(that);
  4064. }
  4065. };
  4066. var Utils = $__default["default"].fn.bootstrapTable.utils;
  4067. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  4068. filterControl: false,
  4069. filterControlVisible: true,
  4070. // eslint-disable-next-line no-unused-vars
  4071. onColumnSearch: function onColumnSearch(field, text) {
  4072. return false;
  4073. },
  4074. onCreatedControls: function onCreatedControls() {
  4075. return false;
  4076. },
  4077. alignmentSelectControlOptions: undefined,
  4078. filterTemplate: {
  4079. input: function input(that, column, placeholder, value) {
  4080. return Utils.sprintf('<input type="search" class="%s bootstrap-table-filter-control-%s search-input" style="width: 100%;" placeholder="%s" value="%s">', getInputClass(that), column.field, 'undefined' === typeof placeholder ? '' : placeholder, 'undefined' === typeof value ? '' : value);
  4081. },
  4082. select: function select(that, column) {
  4083. return Utils.sprintf('<select class="%s bootstrap-table-filter-control-%s %s" %s style="width: 100%;" dir="%s"></select>', getInputClass(that, true), column.field, '', '', getDirectionOfSelectOptions(that.options.alignmentSelectControlOptions));
  4084. },
  4085. datepicker: function datepicker(that, column, value) {
  4086. return Utils.sprintf('<input type="date" class="%s date-filter-control bootstrap-table-filter-control-%s" style="width: 100%;" value="%s">', getInputClass(that), column.field, 'undefined' === typeof value ? '' : value);
  4087. }
  4088. },
  4089. searchOnEnterKey: false,
  4090. showFilterControlSwitch: false,
  4091. sortSelectOptions: false,
  4092. // internal variables
  4093. _valuesFilterControl: [],
  4094. _initialized: false,
  4095. _isRendering: false,
  4096. _usingMultipleSelect: false
  4097. });
  4098. $__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, {
  4099. filterControl: undefined,
  4100. // input, select, datepicker
  4101. filterControlMultipleSelect: false,
  4102. filterControlMultipleSelectOptions: {},
  4103. filterDataCollector: undefined,
  4104. filterData: undefined,
  4105. filterDatepickerOptions: {},
  4106. filterStrictSearch: false,
  4107. filterStartsWithSearch: false,
  4108. filterControlPlaceholder: '',
  4109. filterDefault: '',
  4110. filterOrderBy: 'asc',
  4111. // asc || desc
  4112. filterCustomSearch: undefined
  4113. });
  4114. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  4115. 'column-search.bs.table': 'onColumnSearch',
  4116. 'created-controls.bs.table': 'onCreatedControls'
  4117. });
  4118. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  4119. filterControlSwitchHide: {
  4120. bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
  4121. bootstrap5: 'bi-zoom-out',
  4122. materialize: 'zoom_out'
  4123. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-search-minus',
  4124. filterControlSwitchShow: {
  4125. bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
  4126. bootstrap5: 'bi-zoom-in',
  4127. materialize: 'zoom_in'
  4128. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-search-plus'
  4129. });
  4130. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  4131. formatFilterControlSwitch: function formatFilterControlSwitch() {
  4132. return 'Hide/Show controls';
  4133. },
  4134. formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
  4135. return 'Hide controls';
  4136. },
  4137. formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
  4138. return 'Show controls';
  4139. }
  4140. });
  4141. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  4142. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  4143. formatClearSearch: function formatClearSearch() {
  4144. return 'Clear filters';
  4145. }
  4146. });
  4147. $__default["default"].fn.bootstrapTable.methods.push('triggerSearch');
  4148. $__default["default"].fn.bootstrapTable.methods.push('clearFilterControl');
  4149. $__default["default"].fn.bootstrapTable.methods.push('toggleFilterControl');
  4150. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  4151. _inherits(_class, _$$BootstrapTable);
  4152. var _super = _createSuper(_class);
  4153. function _class() {
  4154. _classCallCheck(this, _class);
  4155. return _super.apply(this, arguments);
  4156. }
  4157. _createClass(_class, [{
  4158. key: "init",
  4159. value: function init() {
  4160. var _this = this;
  4161. // Make sure that the filterControl option is set
  4162. if (this.options.filterControl) {
  4163. // Make sure that the internal variables are set correctly
  4164. this._valuesFilterControl = [];
  4165. this._initialized = false;
  4166. this._usingMultipleSelect = false;
  4167. this._isRendering = false;
  4168. this.$el.on('reset-view.bs.table', Utils.debounce(function () {
  4169. initFilterSelectControls(_this);
  4170. setValues(_this);
  4171. }, 3)).on('toggle.bs.table', Utils.debounce(function (_, cardView) {
  4172. _this._initialized = false;
  4173. if (!cardView) {
  4174. initFilterSelectControls(_this);
  4175. setValues(_this);
  4176. _this._initialized = true;
  4177. }
  4178. }, 1)).on('post-header.bs.table', Utils.debounce(function () {
  4179. initFilterSelectControls(_this);
  4180. setValues(_this);
  4181. }, 3)).on('column-switch.bs.table', Utils.debounce(function () {
  4182. setValues(_this);
  4183. if (_this.options.height) {
  4184. _this.fitHeader();
  4185. }
  4186. }, 1)).on('post-body.bs.table', Utils.debounce(function () {
  4187. if (_this.options.height && !_this.options.filterControlContainer && _this.options.filterControlVisible) {
  4188. fixHeaderCSS(_this);
  4189. }
  4190. _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
  4191. }, 1)).on('all.bs.table', function () {
  4192. syncHeaders(_this);
  4193. });
  4194. }
  4195. _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
  4196. }
  4197. }, {
  4198. key: "initBody",
  4199. value: function initBody() {
  4200. var _this2 = this;
  4201. _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this);
  4202. if (!this.options.filterControl) {
  4203. return;
  4204. }
  4205. setTimeout(function () {
  4206. initFilterSelectControls(_this2);
  4207. setValues(_this2);
  4208. }, 3);
  4209. }
  4210. }, {
  4211. key: "load",
  4212. value: function load(data) {
  4213. _get(_getPrototypeOf(_class.prototype), "load", this).call(this, data);
  4214. if (!this.options.filterControl) {
  4215. return;
  4216. }
  4217. createControls(this, getControlContainer(this));
  4218. setValues(this);
  4219. }
  4220. }, {
  4221. key: "initHeader",
  4222. value: function initHeader() {
  4223. _get(_getPrototypeOf(_class.prototype), "initHeader", this).call(this);
  4224. if (!this.options.filterControl) {
  4225. return;
  4226. }
  4227. createControls(this, getControlContainer(this));
  4228. this._initialized = true;
  4229. }
  4230. }, {
  4231. key: "initSearch",
  4232. value: function initSearch() {
  4233. var _this3 = this;
  4234. var that = this;
  4235. var filterPartial = $__default["default"].isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
  4236. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  4237. if (this.options.sidePagination === 'server' || filterPartial === null) {
  4238. return;
  4239. } // Check partial column filter
  4240. that.data = filterPartial ? that.data.filter(function (item, i) {
  4241. var itemIsExpected = [];
  4242. var keys1 = Object.keys(item);
  4243. var keys2 = Object.keys(filterPartial);
  4244. var keys = keys1.concat(keys2.filter(function (item) {
  4245. return !keys1.includes(item);
  4246. }));
  4247. keys.forEach(function (key) {
  4248. var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
  4249. var rawFilterValue = filterPartial[key] || '';
  4250. var filterValue = rawFilterValue.toLowerCase();
  4251. var value = Utils.unescapeHTML(Utils.getItemField(item, key, false));
  4252. var tmpItemIsExpected;
  4253. if (filterValue === '') {
  4254. tmpItemIsExpected = true;
  4255. } else {
  4256. // Fix #142: search use formatted data
  4257. if (thisColumn) {
  4258. if (thisColumn.searchFormatter || thisColumn._forceFormatter) {
  4259. value = $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(that.header, that.header.formatters[$__default["default"].inArray(key, that.header.fields)], [value, item, i], value);
  4260. }
  4261. }
  4262. if ($__default["default"].inArray(key, that.header.fields) !== -1) {
  4263. if (value === undefined || value === null) {
  4264. tmpItemIsExpected = false;
  4265. } else if (_typeof(value) === 'object' && thisColumn.filterCustomSearch) {
  4266. itemIsExpected.push(that.isValueExpected(rawFilterValue, value, thisColumn, key));
  4267. return;
  4268. } else if (_typeof(value) === 'object' && Array.isArray(value)) {
  4269. value.forEach(function (objectValue) {
  4270. if (tmpItemIsExpected) {
  4271. return;
  4272. }
  4273. if (_this3.options.searchAccentNeutralise) {
  4274. objectValue = Utils.normalizeAccent(objectValue);
  4275. }
  4276. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4277. });
  4278. } else if (_typeof(value) === 'object' && !Array.isArray(value)) {
  4279. Object.values(value).forEach(function (objectValue) {
  4280. if (tmpItemIsExpected) {
  4281. return;
  4282. }
  4283. if (_this3.options.searchAccentNeutralise) {
  4284. objectValue = Utils.normalizeAccent(objectValue);
  4285. }
  4286. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4287. });
  4288. } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  4289. if (_this3.options.searchAccentNeutralise) {
  4290. value = Utils.normalizeAccent(value);
  4291. }
  4292. tmpItemIsExpected = that.isValueExpected(filterValue, value, thisColumn, key);
  4293. }
  4294. }
  4295. }
  4296. itemIsExpected.push(tmpItemIsExpected);
  4297. });
  4298. return !itemIsExpected.includes(false);
  4299. }) : that.data;
  4300. that.unsortedData = _toConsumableArray(that.data);
  4301. }
  4302. }, {
  4303. key: "isValueExpected",
  4304. value: function isValueExpected(searchValue, value, column, key) {
  4305. var tmpItemIsExpected = false;
  4306. if (column.filterStrictSearch) {
  4307. tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
  4308. } else if (column.filterStartsWithSearch) {
  4309. tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
  4310. } else if (column.filterControl === 'datepicker') {
  4311. tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime();
  4312. } else if (this.options.regexSearch) {
  4313. tmpItemIsExpected = Utils.regexCompare(value, searchValue);
  4314. } else {
  4315. tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
  4316. }
  4317. var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
  4318. var matches = largerSmallerEqualsRegex.exec(searchValue);
  4319. if (matches) {
  4320. var operator = matches[1] || "".concat(matches[5], "l");
  4321. var comparisonValue = matches[2] || matches[3];
  4322. var int = parseInt(value, 10);
  4323. var comparisonInt = parseInt(comparisonValue, 10);
  4324. switch (operator) {
  4325. case '>':
  4326. case '<l':
  4327. tmpItemIsExpected = int > comparisonInt;
  4328. break;
  4329. case '<':
  4330. case '>l':
  4331. tmpItemIsExpected = int < comparisonInt;
  4332. break;
  4333. case '<=':
  4334. case '=<':
  4335. case '>=l':
  4336. case '=>l':
  4337. tmpItemIsExpected = int <= comparisonInt;
  4338. break;
  4339. case '>=':
  4340. case '=>':
  4341. case '<=l':
  4342. case '=<l':
  4343. tmpItemIsExpected = int >= comparisonInt;
  4344. break;
  4345. }
  4346. }
  4347. if (column.filterCustomSearch) {
  4348. var customSearchResult = Utils.calculateObjectValue(this, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
  4349. if (customSearchResult !== null) {
  4350. tmpItemIsExpected = customSearchResult;
  4351. }
  4352. }
  4353. return tmpItemIsExpected;
  4354. }
  4355. }, {
  4356. key: "initColumnSearch",
  4357. value: function initColumnSearch(filterColumnsDefaults) {
  4358. cacheValues(this);
  4359. if (filterColumnsDefaults) {
  4360. this.filterColumnsPartial = filterColumnsDefaults;
  4361. this.updatePagination(); // eslint-disable-next-line guard-for-in
  4362. for (var filter in filterColumnsDefaults) {
  4363. this.trigger('column-search', filter, filterColumnsDefaults[filter]);
  4364. }
  4365. }
  4366. }
  4367. }, {
  4368. key: "initToolbar",
  4369. value: function initToolbar() {
  4370. this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
  4371. this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
  4372. if (this.options.showFilterControlSwitch) {
  4373. this.buttons = Object.assign(this.buttons, {
  4374. filterControlSwitch: {
  4375. text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
  4376. icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
  4377. event: this.toggleFilterControl,
  4378. attributes: {
  4379. 'aria-label': this.options.formatFilterControlSwitch(),
  4380. title: this.options.formatFilterControlSwitch()
  4381. }
  4382. }
  4383. });
  4384. }
  4385. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  4386. }
  4387. }, {
  4388. key: "resetSearch",
  4389. value: function resetSearch(text) {
  4390. if (this.options.filterControl && this.options.showSearchClearButton) {
  4391. this.clearFilterControl();
  4392. }
  4393. _get(_getPrototypeOf(_class.prototype), "resetSearch", this).call(this, text);
  4394. }
  4395. }, {
  4396. key: "clearFilterControl",
  4397. value: function clearFilterControl() {
  4398. if (!this.options.filterControl) {
  4399. return;
  4400. }
  4401. var that = this;
  4402. var table = this.$el.closest('table');
  4403. var cookies = collectBootstrapTableFilterCookies();
  4404. var controls = getSearchControls(that); // const search = Utils.getSearchInput(this)
  4405. var hasValues = false;
  4406. var timeoutId = 0; // Clear cache values
  4407. $__default["default"].each(that._valuesFilterControl, function (i, item) {
  4408. hasValues = hasValues ? true : item.value !== '';
  4409. item.value = '';
  4410. }); // Clear controls in UI
  4411. $__default["default"].each(controls, function (i, item) {
  4412. item.value = '';
  4413. }); // Cache controls again
  4414. setValues(that); // clear cookies once the filters are clean
  4415. clearTimeout(timeoutId);
  4416. timeoutId = setTimeout(function () {
  4417. if (cookies && cookies.length > 0) {
  4418. $__default["default"].each(cookies, function (i, item) {
  4419. if (that.deleteCookie !== undefined) {
  4420. that.deleteCookie(item);
  4421. }
  4422. });
  4423. }
  4424. }, that.options.searchTimeOut); // If there is not any value in the controls exit this method
  4425. if (!hasValues) {
  4426. return;
  4427. } // Clear each type of filter if it exists.
  4428. // Requires the body to reload each time a type of filter is found because we never know
  4429. // which ones are going to be present.
  4430. if (controls.length > 0) {
  4431. this.filterColumnsPartial = {};
  4432. controls.eq(0).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', {
  4433. keyCode: 13
  4434. });
  4435. /* controls.each(function () {
  4436. $(this).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', { keyCode: 13 })
  4437. })*/
  4438. } else {
  4439. return;
  4440. }
  4441. /* if (search.length > 0) {
  4442. that.resetSearch('fc')
  4443. }*/
  4444. // use the default sort order if it exists. do nothing if it does not
  4445. if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
  4446. var sorter = this.$header.find(Utils.sprintf('[data-field="%s"]', $__default["default"](controls[0]).closest('table').data('sortName')));
  4447. if (sorter.length > 0) {
  4448. that.onSort({
  4449. type: 'keypress',
  4450. currentTarget: sorter
  4451. });
  4452. $__default["default"](sorter).find('.sortable').trigger('click');
  4453. }
  4454. }
  4455. } // EVENTS
  4456. }, {
  4457. key: "onColumnSearch",
  4458. value: function onColumnSearch(_ref) {
  4459. var _this4 = this;
  4460. var currentTarget = _ref.currentTarget,
  4461. keyCode = _ref.keyCode;
  4462. if (isKeyAllowed(keyCode)) {
  4463. return;
  4464. }
  4465. cacheValues(this); // Cookie extension support
  4466. if (!this.options.cookie) {
  4467. this.options.pageNumber = 1;
  4468. } else {
  4469. // Force call the initServer method in Cookie extension
  4470. this._filterControlValuesLoaded = true;
  4471. }
  4472. if ($__default["default"].isEmptyObject(this.filterColumnsPartial)) {
  4473. this.filterColumnsPartial = {};
  4474. } // If searchOnEnterKey is set to true, then we need to iterate over all controls and grab their values.
  4475. var controls = this.options.searchOnEnterKey ? getSearchControls(this).toArray() : [currentTarget];
  4476. controls.forEach(function (element) {
  4477. var $element = $__default["default"](element);
  4478. var elementValue = $element.val();
  4479. var text = elementValue ? elementValue.trim() : '';
  4480. var $field = $element.closest('[data-field]').data('field');
  4481. _this4.trigger('column-search', $field, text);
  4482. if (text) {
  4483. _this4.filterColumnsPartial[$field] = text;
  4484. } else {
  4485. delete _this4.filterColumnsPartial[$field];
  4486. }
  4487. });
  4488. this.onSearch({
  4489. currentTarget: currentTarget
  4490. }, false);
  4491. }
  4492. }, {
  4493. key: "toggleFilterControl",
  4494. value: function toggleFilterControl() {
  4495. this.options.filterControlVisible = !this.options.filterControlVisible; // Controls in original header or container.
  4496. var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
  4497. if (this.options.filterControlVisible) {
  4498. $filterControls.show();
  4499. } else {
  4500. $filterControls.hide();
  4501. this.clearFilterControl();
  4502. } // Controls in fixed header
  4503. if (this.options.height) {
  4504. var $fixedControls = $__default["default"]('.fixed-table-header table thead').find('.filter-control, .no-filter-control');
  4505. $fixedControls.toggle(this.options.filterControlVisible);
  4506. fixHeaderCSS(this);
  4507. }
  4508. var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
  4509. var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
  4510. this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
  4511. }
  4512. }, {
  4513. key: "triggerSearch",
  4514. value: function triggerSearch() {
  4515. var searchControls = getSearchControls(this);
  4516. searchControls.each(function () {
  4517. var $element = $__default["default"](this);
  4518. if ($element.is('select')) {
  4519. $element.trigger('change');
  4520. } else {
  4521. $element.trigger('keyup');
  4522. }
  4523. });
  4524. }
  4525. }, {
  4526. key: "_toggleColumn",
  4527. value: function _toggleColumn(index, checked, needUpdate) {
  4528. this._initialized = false;
  4529. _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this).call(this, index, checked, needUpdate);
  4530. syncHeaders(this);
  4531. }
  4532. }]);
  4533. return _class;
  4534. }($__default["default"].BootstrapTable);
  4535. }));