vue-grid-layout.umd.js 379 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365
  1. /*! vue-grid-layout - 3.0.0-beta1 | (c) 2015, 2021 Gustavo Santos (JBay Solutions) <gustavo.santos@jbaysolutions.com> (http://www.jbaysolutions.com) | https://github.com/jbaysolutions/vue-grid-layout */
  2. (function webpackUniversalModuleDefinition(root, factory) {
  3. if(typeof exports === 'object' && typeof module === 'object')
  4. module.exports = factory(require("vue"));
  5. else if(typeof define === 'function' && define.amd)
  6. define([], factory);
  7. else if(typeof exports === 'object')
  8. exports["VueGridLayout"] = factory(require("vue"));
  9. else
  10. root["VueGridLayout"] = factory(root["Vue"]);
  11. })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {
  12. return /******/ (function(modules) { // webpackBootstrap
  13. /******/ // The module cache
  14. /******/ var installedModules = {};
  15. /******/
  16. /******/ // The require function
  17. /******/ function __webpack_require__(moduleId) {
  18. /******/
  19. /******/ // Check if module is in cache
  20. /******/ if(installedModules[moduleId]) {
  21. /******/ return installedModules[moduleId].exports;
  22. /******/ }
  23. /******/ // Create a new module (and put it into the cache)
  24. /******/ var module = installedModules[moduleId] = {
  25. /******/ i: moduleId,
  26. /******/ l: false,
  27. /******/ exports: {}
  28. /******/ };
  29. /******/
  30. /******/ // Execute the module function
  31. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  32. /******/
  33. /******/ // Flag the module as loaded
  34. /******/ module.l = true;
  35. /******/
  36. /******/ // Return the exports of the module
  37. /******/ return module.exports;
  38. /******/ }
  39. /******/
  40. /******/
  41. /******/ // expose the modules object (__webpack_modules__)
  42. /******/ __webpack_require__.m = modules;
  43. /******/
  44. /******/ // expose the module cache
  45. /******/ __webpack_require__.c = installedModules;
  46. /******/
  47. /******/ // define getter function for harmony exports
  48. /******/ __webpack_require__.d = function(exports, name, getter) {
  49. /******/ if(!__webpack_require__.o(exports, name)) {
  50. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  51. /******/ }
  52. /******/ };
  53. /******/
  54. /******/ // define __esModule on exports
  55. /******/ __webpack_require__.r = function(exports) {
  56. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  57. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  58. /******/ }
  59. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  60. /******/ };
  61. /******/
  62. /******/ // create a fake namespace object
  63. /******/ // mode & 1: value is a module id, require it
  64. /******/ // mode & 2: merge all properties of value into the ns
  65. /******/ // mode & 4: return value when already ns object
  66. /******/ // mode & 8|1: behave like require
  67. /******/ __webpack_require__.t = function(value, mode) {
  68. /******/ if(mode & 1) value = __webpack_require__(value);
  69. /******/ if(mode & 8) return value;
  70. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  71. /******/ var ns = Object.create(null);
  72. /******/ __webpack_require__.r(ns);
  73. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  74. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  75. /******/ return ns;
  76. /******/ };
  77. /******/
  78. /******/ // getDefaultExport function for compatibility with non-harmony modules
  79. /******/ __webpack_require__.n = function(module) {
  80. /******/ var getter = module && module.__esModule ?
  81. /******/ function getDefault() { return module['default']; } :
  82. /******/ function getModuleExports() { return module; };
  83. /******/ __webpack_require__.d(getter, 'a', getter);
  84. /******/ return getter;
  85. /******/ };
  86. /******/
  87. /******/ // Object.prototype.hasOwnProperty.call
  88. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  89. /******/
  90. /******/ // __webpack_public_path__
  91. /******/ __webpack_require__.p = "";
  92. /******/
  93. /******/
  94. /******/ // Load entry module and return exports
  95. /******/ return __webpack_require__(__webpack_require__.s = "fb15");
  96. /******/ })
  97. /************************************************************************/
  98. /******/ ({
  99. /***/ "01f9":
  100. /***/ (function(module, exports, __webpack_require__) {
  101. "use strict";
  102. var LIBRARY = __webpack_require__("2d00");
  103. var $export = __webpack_require__("5ca1");
  104. var redefine = __webpack_require__("2aba");
  105. var hide = __webpack_require__("32e9");
  106. var Iterators = __webpack_require__("84f2");
  107. var $iterCreate = __webpack_require__("41a0");
  108. var setToStringTag = __webpack_require__("7f20");
  109. var getPrototypeOf = __webpack_require__("38fd");
  110. var ITERATOR = __webpack_require__("2b4c")('iterator');
  111. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  112. var FF_ITERATOR = '@@iterator';
  113. var KEYS = 'keys';
  114. var VALUES = 'values';
  115. var returnThis = function () { return this; };
  116. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  117. $iterCreate(Constructor, NAME, next);
  118. var getMethod = function (kind) {
  119. if (!BUGGY && kind in proto) return proto[kind];
  120. switch (kind) {
  121. case KEYS: return function keys() { return new Constructor(this, kind); };
  122. case VALUES: return function values() { return new Constructor(this, kind); };
  123. } return function entries() { return new Constructor(this, kind); };
  124. };
  125. var TAG = NAME + ' Iterator';
  126. var DEF_VALUES = DEFAULT == VALUES;
  127. var VALUES_BUG = false;
  128. var proto = Base.prototype;
  129. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  130. var $default = $native || getMethod(DEFAULT);
  131. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  132. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  133. var methods, key, IteratorPrototype;
  134. // Fix native
  135. if ($anyNative) {
  136. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  137. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  138. // Set @@toStringTag to native iterators
  139. setToStringTag(IteratorPrototype, TAG, true);
  140. // fix for some old engines
  141. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  142. }
  143. }
  144. // fix Array#{values, @@iterator}.name in V8 / FF
  145. if (DEF_VALUES && $native && $native.name !== VALUES) {
  146. VALUES_BUG = true;
  147. $default = function values() { return $native.call(this); };
  148. }
  149. // Define iterator
  150. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  151. hide(proto, ITERATOR, $default);
  152. }
  153. // Plug for library
  154. Iterators[NAME] = $default;
  155. Iterators[TAG] = returnThis;
  156. if (DEFAULT) {
  157. methods = {
  158. values: DEF_VALUES ? $default : getMethod(VALUES),
  159. keys: IS_SET ? $default : getMethod(KEYS),
  160. entries: $entries
  161. };
  162. if (FORCED) for (key in methods) {
  163. if (!(key in proto)) redefine(proto, key, methods[key]);
  164. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  165. }
  166. return methods;
  167. };
  168. /***/ }),
  169. /***/ "02f4":
  170. /***/ (function(module, exports, __webpack_require__) {
  171. var toInteger = __webpack_require__("4588");
  172. var defined = __webpack_require__("be13");
  173. // true -> String#at
  174. // false -> String#codePointAt
  175. module.exports = function (TO_STRING) {
  176. return function (that, pos) {
  177. var s = String(defined(that));
  178. var i = toInteger(pos);
  179. var l = s.length;
  180. var a, b;
  181. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  182. a = s.charCodeAt(i);
  183. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  184. ? TO_STRING ? s.charAt(i) : a
  185. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  186. };
  187. };
  188. /***/ }),
  189. /***/ "0390":
  190. /***/ (function(module, exports, __webpack_require__) {
  191. "use strict";
  192. var at = __webpack_require__("02f4")(true);
  193. // `AdvanceStringIndex` abstract operation
  194. // https://tc39.github.io/ecma262/#sec-advancestringindex
  195. module.exports = function (S, index, unicode) {
  196. return index + (unicode ? at(S, index).length : 1);
  197. };
  198. /***/ }),
  199. /***/ "083e":
  200. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  201. "use strict";
  202. /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_GridItem_vue_vue_type_style_index_0_id_46ff2fc8_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c541");
  203. /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_GridItem_vue_vue_type_style_index_0_id_46ff2fc8_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_GridItem_vue_vue_type_style_index_0_id_46ff2fc8_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  204. /* unused harmony reexport * */
  205. /***/ }),
  206. /***/ "0bfb":
  207. /***/ (function(module, exports, __webpack_require__) {
  208. "use strict";
  209. // 21.2.5.3 get RegExp.prototype.flags
  210. var anObject = __webpack_require__("cb7c");
  211. module.exports = function () {
  212. var that = anObject(this);
  213. var result = '';
  214. if (that.global) result += 'g';
  215. if (that.ignoreCase) result += 'i';
  216. if (that.multiline) result += 'm';
  217. if (that.unicode) result += 'u';
  218. if (that.sticky) result += 'y';
  219. return result;
  220. };
  221. /***/ }),
  222. /***/ "0d58":
  223. /***/ (function(module, exports, __webpack_require__) {
  224. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  225. var $keys = __webpack_require__("ce10");
  226. var enumBugKeys = __webpack_require__("e11e");
  227. module.exports = Object.keys || function keys(O) {
  228. return $keys(O, enumBugKeys);
  229. };
  230. /***/ }),
  231. /***/ "11e9":
  232. /***/ (function(module, exports, __webpack_require__) {
  233. var pIE = __webpack_require__("52a7");
  234. var createDesc = __webpack_require__("4630");
  235. var toIObject = __webpack_require__("6821");
  236. var toPrimitive = __webpack_require__("6a99");
  237. var has = __webpack_require__("69a8");
  238. var IE8_DOM_DEFINE = __webpack_require__("c69a");
  239. var gOPD = Object.getOwnPropertyDescriptor;
  240. exports.f = __webpack_require__("9e1e") ? gOPD : function getOwnPropertyDescriptor(O, P) {
  241. O = toIObject(O);
  242. P = toPrimitive(P, true);
  243. if (IE8_DOM_DEFINE) try {
  244. return gOPD(O, P);
  245. } catch (e) { /* empty */ }
  246. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  247. };
  248. /***/ }),
  249. /***/ "1495":
  250. /***/ (function(module, exports, __webpack_require__) {
  251. var dP = __webpack_require__("86cc");
  252. var anObject = __webpack_require__("cb7c");
  253. var getKeys = __webpack_require__("0d58");
  254. module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) {
  255. anObject(O);
  256. var keys = getKeys(Properties);
  257. var length = keys.length;
  258. var i = 0;
  259. var P;
  260. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  261. return O;
  262. };
  263. /***/ }),
  264. /***/ "18d2":
  265. /***/ (function(module, exports, __webpack_require__) {
  266. "use strict";
  267. /**
  268. * Resize detection strategy that injects objects to elements in order to detect resize events.
  269. * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
  270. */
  271. var browserDetector = __webpack_require__("18e9");
  272. module.exports = function(options) {
  273. options = options || {};
  274. var reporter = options.reporter;
  275. var batchProcessor = options.batchProcessor;
  276. var getState = options.stateHandler.getState;
  277. if(!reporter) {
  278. throw new Error("Missing required dependency: reporter.");
  279. }
  280. /**
  281. * Adds a resize event listener to the element.
  282. * @public
  283. * @param {element} element The element that should have the listener added.
  284. * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
  285. */
  286. function addListener(element, listener) {
  287. function listenerProxy() {
  288. listener(element);
  289. }
  290. if(browserDetector.isIE(8)) {
  291. //IE 8 does not support object, but supports the resize event directly on elements.
  292. getState(element).object = {
  293. proxy: listenerProxy
  294. };
  295. element.attachEvent("onresize", listenerProxy);
  296. } else {
  297. var object = getObject(element);
  298. if(!object) {
  299. throw new Error("Element is not detectable by this strategy.");
  300. }
  301. object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
  302. }
  303. }
  304. function buildCssTextString(rules) {
  305. var seperator = options.important ? " !important; " : "; ";
  306. return (rules.join(seperator) + seperator).trim();
  307. }
  308. /**
  309. * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
  310. * @private
  311. * @param {object} options Optional options object.
  312. * @param {element} element The element to make detectable
  313. * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
  314. */
  315. function makeDetectable(options, element, callback) {
  316. if (!callback) {
  317. callback = element;
  318. element = options;
  319. options = null;
  320. }
  321. options = options || {};
  322. var debug = options.debug;
  323. function injectObject(element, callback) {
  324. var OBJECT_STYLE = buildCssTextString(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]);
  325. //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
  326. // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
  327. var positionCheckPerformed = false;
  328. // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
  329. // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
  330. var style = window.getComputedStyle(element);
  331. var width = element.offsetWidth;
  332. var height = element.offsetHeight;
  333. getState(element).startSize = {
  334. width: width,
  335. height: height
  336. };
  337. function mutateDom() {
  338. function alterPositionStyles() {
  339. if(style.position === "static") {
  340. element.style.setProperty("position", "relative", options.important ? "important" : "");
  341. var removeRelativeStyles = function(reporter, element, style, property) {
  342. function getNumericalValue(value) {
  343. return value.replace(/[^-\d\.]/g, "");
  344. }
  345. var value = style[property];
  346. if(value !== "auto" && getNumericalValue(value) !== "0") {
  347. reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
  348. element.style.setProperty(property, "0", options.important ? "important" : "");
  349. }
  350. };
  351. //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
  352. //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
  353. removeRelativeStyles(reporter, element, style, "top");
  354. removeRelativeStyles(reporter, element, style, "right");
  355. removeRelativeStyles(reporter, element, style, "bottom");
  356. removeRelativeStyles(reporter, element, style, "left");
  357. }
  358. }
  359. function onObjectLoad() {
  360. // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
  361. if (!positionCheckPerformed) {
  362. alterPositionStyles();
  363. }
  364. /*jshint validthis: true */
  365. function getDocument(element, callback) {
  366. //Opera 12 seem to call the object.onload before the actual document has been created.
  367. //So if it is not present, poll it with an timeout until it is present.
  368. //TODO: Could maybe be handled better with object.onreadystatechange or similar.
  369. if(!element.contentDocument) {
  370. var state = getState(element);
  371. if (state.checkForObjectDocumentTimeoutId) {
  372. window.clearTimeout(state.checkForObjectDocumentTimeoutId);
  373. }
  374. state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {
  375. state.checkForObjectDocumentTimeoutId = 0;
  376. getDocument(element, callback);
  377. }, 100);
  378. return;
  379. }
  380. callback(element.contentDocument);
  381. }
  382. //Mutating the object element here seems to fire another load event.
  383. //Mutating the inner document of the object element is fine though.
  384. var objectElement = this;
  385. //Create the style element to be added to the object.
  386. getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
  387. //Notify that the element is ready to be listened to.
  388. callback(element);
  389. });
  390. }
  391. // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
  392. // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.
  393. if (style.position !== "") {
  394. alterPositionStyles(style);
  395. positionCheckPerformed = true;
  396. }
  397. //Add an object element as a child to the target element that will be listened to for resize events.
  398. var object = document.createElement("object");
  399. object.style.cssText = OBJECT_STYLE;
  400. object.tabIndex = -1;
  401. object.type = "text/html";
  402. object.setAttribute("aria-hidden", "true");
  403. object.onload = onObjectLoad;
  404. //Safari: This must occur before adding the object to the DOM.
  405. //IE: Does not like that this happens before, even if it is also added after.
  406. if(!browserDetector.isIE()) {
  407. object.data = "about:blank";
  408. }
  409. if (!getState(element)) {
  410. // The element has been uninstalled before the actual loading happened.
  411. return;
  412. }
  413. element.appendChild(object);
  414. getState(element).object = object;
  415. //IE: This must occur after adding the object to the DOM.
  416. if(browserDetector.isIE()) {
  417. object.data = "about:blank";
  418. }
  419. }
  420. if(batchProcessor) {
  421. batchProcessor.add(mutateDom);
  422. } else {
  423. mutateDom();
  424. }
  425. }
  426. if(browserDetector.isIE(8)) {
  427. //IE 8 does not support objects properly. Luckily they do support the resize event.
  428. //So do not inject the object and notify that the element is already ready to be listened to.
  429. //The event handler for the resize event is attached in the utils.addListener instead.
  430. callback(element);
  431. } else {
  432. injectObject(element, callback);
  433. }
  434. }
  435. /**
  436. * Returns the child object of the target element.
  437. * @private
  438. * @param {element} element The target element.
  439. * @returns The object element of the target.
  440. */
  441. function getObject(element) {
  442. return getState(element).object;
  443. }
  444. function uninstall(element) {
  445. if (!getState(element)) {
  446. return;
  447. }
  448. var object = getObject(element);
  449. if (!object) {
  450. return;
  451. }
  452. if (browserDetector.isIE(8)) {
  453. element.detachEvent("onresize", object.proxy);
  454. } else {
  455. element.removeChild(object);
  456. }
  457. if (getState(element).checkForObjectDocumentTimeoutId) {
  458. window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);
  459. }
  460. delete getState(element).object;
  461. }
  462. return {
  463. makeDetectable: makeDetectable,
  464. addListener: addListener,
  465. uninstall: uninstall
  466. };
  467. };
  468. /***/ }),
  469. /***/ "18e9":
  470. /***/ (function(module, exports, __webpack_require__) {
  471. "use strict";
  472. var detector = module.exports = {};
  473. detector.isIE = function(version) {
  474. function isAnyIeVersion() {
  475. var agent = navigator.userAgent.toLowerCase();
  476. return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
  477. }
  478. if(!isAnyIeVersion()) {
  479. return false;
  480. }
  481. if(!version) {
  482. return true;
  483. }
  484. //Shamelessly stolen from https://gist.github.com/padolsey/527683
  485. var ieVersion = (function(){
  486. var undef,
  487. v = 3,
  488. div = document.createElement("div"),
  489. all = div.getElementsByTagName("i");
  490. do {
  491. div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
  492. }
  493. while (all[0]);
  494. return v > 4 ? v : undef;
  495. }());
  496. return version === ieVersion;
  497. };
  498. detector.isLegacyOpera = function() {
  499. return !!window.opera;
  500. };
  501. /***/ }),
  502. /***/ "214f":
  503. /***/ (function(module, exports, __webpack_require__) {
  504. "use strict";
  505. __webpack_require__("b0c5");
  506. var redefine = __webpack_require__("2aba");
  507. var hide = __webpack_require__("32e9");
  508. var fails = __webpack_require__("79e5");
  509. var defined = __webpack_require__("be13");
  510. var wks = __webpack_require__("2b4c");
  511. var regexpExec = __webpack_require__("520a");
  512. var SPECIES = wks('species');
  513. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  514. // #replace needs built-in support for named groups.
  515. // #match works fine because it just return the exec results, even if it has
  516. // a "grops" property.
  517. var re = /./;
  518. re.exec = function () {
  519. var result = [];
  520. result.groups = { a: '7' };
  521. return result;
  522. };
  523. return ''.replace(re, '$<a>') !== '7';
  524. });
  525. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
  526. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  527. var re = /(?:)/;
  528. var originalExec = re.exec;
  529. re.exec = function () { return originalExec.apply(this, arguments); };
  530. var result = 'ab'.split(re);
  531. return result.length === 2 && result[0] === 'a' && result[1] === 'b';
  532. })();
  533. module.exports = function (KEY, length, exec) {
  534. var SYMBOL = wks(KEY);
  535. var DELEGATES_TO_SYMBOL = !fails(function () {
  536. // String methods call symbol-named RegEp methods
  537. var O = {};
  538. O[SYMBOL] = function () { return 7; };
  539. return ''[KEY](O) != 7;
  540. });
  541. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
  542. // Symbol-named RegExp methods call .exec
  543. var execCalled = false;
  544. var re = /a/;
  545. re.exec = function () { execCalled = true; return null; };
  546. if (KEY === 'split') {
  547. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  548. // a new one. We need to return the patched regex when creating the new one.
  549. re.constructor = {};
  550. re.constructor[SPECIES] = function () { return re; };
  551. }
  552. re[SYMBOL]('');
  553. return !execCalled;
  554. }) : undefined;
  555. if (
  556. !DELEGATES_TO_SYMBOL ||
  557. !DELEGATES_TO_EXEC ||
  558. (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
  559. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  560. ) {
  561. var nativeRegExpMethod = /./[SYMBOL];
  562. var fns = exec(
  563. defined,
  564. SYMBOL,
  565. ''[KEY],
  566. function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
  567. if (regexp.exec === regexpExec) {
  568. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  569. // The native String method already delegates to @@method (this
  570. // polyfilled function), leasing to infinite recursion.
  571. // We avoid it by directly calling the native @@method method.
  572. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  573. }
  574. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  575. }
  576. return { done: false };
  577. }
  578. );
  579. var strfn = fns[0];
  580. var rxfn = fns[1];
  581. redefine(String.prototype, KEY, strfn);
  582. hide(RegExp.prototype, SYMBOL, length == 2
  583. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  584. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  585. ? function (string, arg) { return rxfn.call(string, this, arg); }
  586. // 21.2.5.6 RegExp.prototype[@@match](string)
  587. // 21.2.5.9 RegExp.prototype[@@search](string)
  588. : function (string) { return rxfn.call(string, this); }
  589. );
  590. }
  591. };
  592. /***/ }),
  593. /***/ "230e":
  594. /***/ (function(module, exports, __webpack_require__) {
  595. var isObject = __webpack_require__("d3f4");
  596. var document = __webpack_require__("7726").document;
  597. // typeof document.createElement is 'object' in old IE
  598. var is = isObject(document) && isObject(document.createElement);
  599. module.exports = function (it) {
  600. return is ? document.createElement(it) : {};
  601. };
  602. /***/ }),
  603. /***/ "23c6":
  604. /***/ (function(module, exports, __webpack_require__) {
  605. // getting tag from 19.1.3.6 Object.prototype.toString()
  606. var cof = __webpack_require__("2d95");
  607. var TAG = __webpack_require__("2b4c")('toStringTag');
  608. // ES3 wrong here
  609. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  610. // fallback for IE11 Script Access Denied error
  611. var tryGet = function (it, key) {
  612. try {
  613. return it[key];
  614. } catch (e) { /* empty */ }
  615. };
  616. module.exports = function (it) {
  617. var O, T, B;
  618. return it === undefined ? 'Undefined' : it === null ? 'Null'
  619. // @@toStringTag case
  620. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  621. // builtinTag case
  622. : ARG ? cof(O)
  623. // ES3 arguments fallback
  624. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  625. };
  626. /***/ }),
  627. /***/ "24fb":
  628. /***/ (function(module, exports, __webpack_require__) {
  629. "use strict";
  630. /*
  631. MIT License http://www.opensource.org/licenses/mit-license.php
  632. Author Tobias Koppers @sokra
  633. */
  634. // css base code, injected by the css-loader
  635. // eslint-disable-next-line func-names
  636. module.exports = function (useSourceMap) {
  637. var list = []; // return the list of modules as css string
  638. list.toString = function toString() {
  639. return this.map(function (item) {
  640. var content = cssWithMappingToString(item, useSourceMap);
  641. if (item[2]) {
  642. return "@media ".concat(item[2], " {").concat(content, "}");
  643. }
  644. return content;
  645. }).join('');
  646. }; // import a list of modules into the list
  647. // eslint-disable-next-line func-names
  648. list.i = function (modules, mediaQuery, dedupe) {
  649. if (typeof modules === 'string') {
  650. // eslint-disable-next-line no-param-reassign
  651. modules = [[null, modules, '']];
  652. }
  653. var alreadyImportedModules = {};
  654. if (dedupe) {
  655. for (var i = 0; i < this.length; i++) {
  656. // eslint-disable-next-line prefer-destructuring
  657. var id = this[i][0];
  658. if (id != null) {
  659. alreadyImportedModules[id] = true;
  660. }
  661. }
  662. }
  663. for (var _i = 0; _i < modules.length; _i++) {
  664. var item = [].concat(modules[_i]);
  665. if (dedupe && alreadyImportedModules[item[0]]) {
  666. // eslint-disable-next-line no-continue
  667. continue;
  668. }
  669. if (mediaQuery) {
  670. if (!item[2]) {
  671. item[2] = mediaQuery;
  672. } else {
  673. item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
  674. }
  675. }
  676. list.push(item);
  677. }
  678. };
  679. return list;
  680. };
  681. function cssWithMappingToString(item, useSourceMap) {
  682. var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
  683. var cssMapping = item[3];
  684. if (!cssMapping) {
  685. return content;
  686. }
  687. if (useSourceMap && typeof btoa === 'function') {
  688. var sourceMapping = toComment(cssMapping);
  689. var sourceURLs = cssMapping.sources.map(function (source) {
  690. return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
  691. });
  692. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  693. }
  694. return [content].join('\n');
  695. } // Adapted from convert-source-map (MIT)
  696. function toComment(sourceMap) {
  697. // eslint-disable-next-line no-undef
  698. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  699. var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  700. return "/*# ".concat(data, " */");
  701. }
  702. /***/ }),
  703. /***/ "2621":
  704. /***/ (function(module, exports) {
  705. exports.f = Object.getOwnPropertySymbols;
  706. /***/ }),
  707. /***/ "2aba":
  708. /***/ (function(module, exports, __webpack_require__) {
  709. var global = __webpack_require__("7726");
  710. var hide = __webpack_require__("32e9");
  711. var has = __webpack_require__("69a8");
  712. var SRC = __webpack_require__("ca5a")('src');
  713. var $toString = __webpack_require__("fa5b");
  714. var TO_STRING = 'toString';
  715. var TPL = ('' + $toString).split(TO_STRING);
  716. __webpack_require__("8378").inspectSource = function (it) {
  717. return $toString.call(it);
  718. };
  719. (module.exports = function (O, key, val, safe) {
  720. var isFunction = typeof val == 'function';
  721. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  722. if (O[key] === val) return;
  723. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  724. if (O === global) {
  725. O[key] = val;
  726. } else if (!safe) {
  727. delete O[key];
  728. hide(O, key, val);
  729. } else if (O[key]) {
  730. O[key] = val;
  731. } else {
  732. hide(O, key, val);
  733. }
  734. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  735. })(Function.prototype, TO_STRING, function toString() {
  736. return typeof this == 'function' && this[SRC] || $toString.call(this);
  737. });
  738. /***/ }),
  739. /***/ "2aeb":
  740. /***/ (function(module, exports, __webpack_require__) {
  741. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  742. var anObject = __webpack_require__("cb7c");
  743. var dPs = __webpack_require__("1495");
  744. var enumBugKeys = __webpack_require__("e11e");
  745. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  746. var Empty = function () { /* empty */ };
  747. var PROTOTYPE = 'prototype';
  748. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  749. var createDict = function () {
  750. // Thrash, waste and sodomy: IE GC bug
  751. var iframe = __webpack_require__("230e")('iframe');
  752. var i = enumBugKeys.length;
  753. var lt = '<';
  754. var gt = '>';
  755. var iframeDocument;
  756. iframe.style.display = 'none';
  757. __webpack_require__("fab2").appendChild(iframe);
  758. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  759. // createDict = iframe.contentWindow.Object;
  760. // html.removeChild(iframe);
  761. iframeDocument = iframe.contentWindow.document;
  762. iframeDocument.open();
  763. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  764. iframeDocument.close();
  765. createDict = iframeDocument.F;
  766. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  767. return createDict();
  768. };
  769. module.exports = Object.create || function create(O, Properties) {
  770. var result;
  771. if (O !== null) {
  772. Empty[PROTOTYPE] = anObject(O);
  773. result = new Empty();
  774. Empty[PROTOTYPE] = null;
  775. // add "__proto__" for Object.getPrototypeOf polyfill
  776. result[IE_PROTO] = O;
  777. } else result = createDict();
  778. return Properties === undefined ? result : dPs(result, Properties);
  779. };
  780. /***/ }),
  781. /***/ "2b4c":
  782. /***/ (function(module, exports, __webpack_require__) {
  783. var store = __webpack_require__("5537")('wks');
  784. var uid = __webpack_require__("ca5a");
  785. var Symbol = __webpack_require__("7726").Symbol;
  786. var USE_SYMBOL = typeof Symbol == 'function';
  787. var $exports = module.exports = function (name) {
  788. return store[name] || (store[name] =
  789. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  790. };
  791. $exports.store = store;
  792. /***/ }),
  793. /***/ "2cef":
  794. /***/ (function(module, exports, __webpack_require__) {
  795. "use strict";
  796. module.exports = function() {
  797. var idCount = 1;
  798. /**
  799. * Generates a new unique id in the context.
  800. * @public
  801. * @returns {number} A unique id in the context.
  802. */
  803. function generate() {
  804. return idCount++;
  805. }
  806. return {
  807. generate: generate
  808. };
  809. };
  810. /***/ }),
  811. /***/ "2d00":
  812. /***/ (function(module, exports) {
  813. module.exports = false;
  814. /***/ }),
  815. /***/ "2d95":
  816. /***/ (function(module, exports) {
  817. var toString = {}.toString;
  818. module.exports = function (it) {
  819. return toString.call(it).slice(8, -1);
  820. };
  821. /***/ }),
  822. /***/ "2f21":
  823. /***/ (function(module, exports, __webpack_require__) {
  824. "use strict";
  825. var fails = __webpack_require__("79e5");
  826. module.exports = function (method, arg) {
  827. return !!method && fails(function () {
  828. // eslint-disable-next-line no-useless-call
  829. arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  830. });
  831. };
  832. /***/ }),
  833. /***/ "32e9":
  834. /***/ (function(module, exports, __webpack_require__) {
  835. var dP = __webpack_require__("86cc");
  836. var createDesc = __webpack_require__("4630");
  837. module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
  838. return dP.f(object, key, createDesc(1, value));
  839. } : function (object, key, value) {
  840. object[key] = value;
  841. return object;
  842. };
  843. /***/ }),
  844. /***/ "38fd":
  845. /***/ (function(module, exports, __webpack_require__) {
  846. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  847. var has = __webpack_require__("69a8");
  848. var toObject = __webpack_require__("4bf8");
  849. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  850. var ObjectProto = Object.prototype;
  851. module.exports = Object.getPrototypeOf || function (O) {
  852. O = toObject(O);
  853. if (has(O, IE_PROTO)) return O[IE_PROTO];
  854. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  855. return O.constructor.prototype;
  856. } return O instanceof Object ? ObjectProto : null;
  857. };
  858. /***/ }),
  859. /***/ "41a0":
  860. /***/ (function(module, exports, __webpack_require__) {
  861. "use strict";
  862. var create = __webpack_require__("2aeb");
  863. var descriptor = __webpack_require__("4630");
  864. var setToStringTag = __webpack_require__("7f20");
  865. var IteratorPrototype = {};
  866. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  867. __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
  868. module.exports = function (Constructor, NAME, next) {
  869. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  870. setToStringTag(Constructor, NAME + ' Iterator');
  871. };
  872. /***/ }),
  873. /***/ "456d":
  874. /***/ (function(module, exports, __webpack_require__) {
  875. // 19.1.2.14 Object.keys(O)
  876. var toObject = __webpack_require__("4bf8");
  877. var $keys = __webpack_require__("0d58");
  878. __webpack_require__("5eda")('keys', function () {
  879. return function keys(it) {
  880. return $keys(toObject(it));
  881. };
  882. });
  883. /***/ }),
  884. /***/ "4588":
  885. /***/ (function(module, exports) {
  886. // 7.1.4 ToInteger
  887. var ceil = Math.ceil;
  888. var floor = Math.floor;
  889. module.exports = function (it) {
  890. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  891. };
  892. /***/ }),
  893. /***/ "4630":
  894. /***/ (function(module, exports) {
  895. module.exports = function (bitmap, value) {
  896. return {
  897. enumerable: !(bitmap & 1),
  898. configurable: !(bitmap & 2),
  899. writable: !(bitmap & 4),
  900. value: value
  901. };
  902. };
  903. /***/ }),
  904. /***/ "4917":
  905. /***/ (function(module, exports, __webpack_require__) {
  906. "use strict";
  907. var anObject = __webpack_require__("cb7c");
  908. var toLength = __webpack_require__("9def");
  909. var advanceStringIndex = __webpack_require__("0390");
  910. var regExpExec = __webpack_require__("5f1b");
  911. // @@match logic
  912. __webpack_require__("214f")('match', 1, function (defined, MATCH, $match, maybeCallNative) {
  913. return [
  914. // `String.prototype.match` method
  915. // https://tc39.github.io/ecma262/#sec-string.prototype.match
  916. function match(regexp) {
  917. var O = defined(this);
  918. var fn = regexp == undefined ? undefined : regexp[MATCH];
  919. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  920. },
  921. // `RegExp.prototype[@@match]` method
  922. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
  923. function (regexp) {
  924. var res = maybeCallNative($match, regexp, this);
  925. if (res.done) return res.value;
  926. var rx = anObject(regexp);
  927. var S = String(this);
  928. if (!rx.global) return regExpExec(rx, S);
  929. var fullUnicode = rx.unicode;
  930. rx.lastIndex = 0;
  931. var A = [];
  932. var n = 0;
  933. var result;
  934. while ((result = regExpExec(rx, S)) !== null) {
  935. var matchStr = String(result[0]);
  936. A[n] = matchStr;
  937. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  938. n++;
  939. }
  940. return n === 0 ? null : A;
  941. }
  942. ];
  943. });
  944. /***/ }),
  945. /***/ "493e":
  946. /***/ (function(module, exports, __webpack_require__) {
  947. // Imports
  948. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
  949. exports = ___CSS_LOADER_API_IMPORT___(false);
  950. // Module
  951. exports.push([module.i, ".vue-grid-item{-webkit-transition:all .2s ease;transition:all .2s ease;-webkit-transition-property:left,top,right;transition-property:left,top,right}.vue-grid-item,.vue-grid-item.no-touch{-ms-touch-action:none;touch-action:none}.vue-grid-item.cssTransforms{-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;left:0;right:auto}.vue-grid-item.cssTransforms.render-rtl{left:auto;right:0}.vue-grid-item.resizing{opacity:.6;z-index:3}.vue-grid-item.vue-draggable-dragging{-webkit-transition:none;transition:none;z-index:3}.vue-grid-item.vue-grid-placeholder{background:red;opacity:.2;-webkit-transition-duration:.1s;transition-duration:.1s;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.vue-grid-item>.vue-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url(\"data:image/svg+xml;base64,PHN2ZyBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZ6IiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+\");background-position:100% 100%;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:se-resize}.vue-grid-item>.vue-rtl-resizable-handle{bottom:0;left:0;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTS0xLTFoMTJ2MTJILTF6Ii8+PGc+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InVuZGVmaW5lZCIgc3Ryb2tlLWxpbmVqb2luPSJ1bmRlZmluZWQiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2U9IiMwMDAiIGZpbGw9Im5vbmUiIGQ9Ik0xNDQuODIxLTM4LjM5M2wtMjAuMzU3LTMxLjc4NSIvPjxwYXRoIHN0cm9rZT0iIzY2NiIgc3Ryb2tlLWxpbmVjYXA9InVuZGVmaW5lZCIgc3Ryb2tlLWxpbmVqb2luPSJ1bmRlZmluZWQiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgZD0iTS45NDctLjAxOHY5LjEyNU0tLjY1NiA5aDEwLjczIi8+PC9nPjwvc3ZnPg==);background-position:0 100%;padding-left:3px;background-repeat:no-repeat;background-origin:content-box;cursor:sw-resize;right:auto}.vue-grid-item.disable-userselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}", ""]);
  952. // Exports
  953. module.exports = exports;
  954. /***/ }),
  955. /***/ "499e":
  956. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  957. "use strict";
  958. // ESM COMPAT FLAG
  959. __webpack_require__.r(__webpack_exports__);
  960. // EXPORTS
  961. __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesClient; });
  962. // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js
  963. /**
  964. * Translates the list format produced by css-loader into something
  965. * easier to manipulate.
  966. */
  967. function listToStyles (parentId, list) {
  968. var styles = []
  969. var newStyles = {}
  970. for (var i = 0; i < list.length; i++) {
  971. var item = list[i]
  972. var id = item[0]
  973. var css = item[1]
  974. var media = item[2]
  975. var sourceMap = item[3]
  976. var part = {
  977. id: parentId + ':' + i,
  978. css: css,
  979. media: media,
  980. sourceMap: sourceMap
  981. }
  982. if (!newStyles[id]) {
  983. styles.push(newStyles[id] = { id: id, parts: [part] })
  984. } else {
  985. newStyles[id].parts.push(part)
  986. }
  987. }
  988. return styles
  989. }
  990. // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js
  991. /*
  992. MIT License http://www.opensource.org/licenses/mit-license.php
  993. Author Tobias Koppers @sokra
  994. Modified by Evan You @yyx990803
  995. */
  996. var hasDocument = typeof document !== 'undefined'
  997. if (typeof DEBUG !== 'undefined' && DEBUG) {
  998. if (!hasDocument) {
  999. throw new Error(
  1000. 'vue-style-loader cannot be used in a non-browser environment. ' +
  1001. "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
  1002. ) }
  1003. }
  1004. /*
  1005. type StyleObject = {
  1006. id: number;
  1007. parts: Array<StyleObjectPart>
  1008. }
  1009. type StyleObjectPart = {
  1010. css: string;
  1011. media: string;
  1012. sourceMap: ?string
  1013. }
  1014. */
  1015. var stylesInDom = {/*
  1016. [id: number]: {
  1017. id: number,
  1018. refs: number,
  1019. parts: Array<(obj?: StyleObjectPart) => void>
  1020. }
  1021. */}
  1022. var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
  1023. var singletonElement = null
  1024. var singletonCounter = 0
  1025. var isProduction = false
  1026. var noop = function () {}
  1027. var options = null
  1028. var ssrIdKey = 'data-vue-ssr-id'
  1029. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1030. // tags it will allow on a page
  1031. var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
  1032. function addStylesClient (parentId, list, _isProduction, _options) {
  1033. isProduction = _isProduction
  1034. options = _options || {}
  1035. var styles = listToStyles(parentId, list)
  1036. addStylesToDom(styles)
  1037. return function update (newList) {
  1038. var mayRemove = []
  1039. for (var i = 0; i < styles.length; i++) {
  1040. var item = styles[i]
  1041. var domStyle = stylesInDom[item.id]
  1042. domStyle.refs--
  1043. mayRemove.push(domStyle)
  1044. }
  1045. if (newList) {
  1046. styles = listToStyles(parentId, newList)
  1047. addStylesToDom(styles)
  1048. } else {
  1049. styles = []
  1050. }
  1051. for (var i = 0; i < mayRemove.length; i++) {
  1052. var domStyle = mayRemove[i]
  1053. if (domStyle.refs === 0) {
  1054. for (var j = 0; j < domStyle.parts.length; j++) {
  1055. domStyle.parts[j]()
  1056. }
  1057. delete stylesInDom[domStyle.id]
  1058. }
  1059. }
  1060. }
  1061. }
  1062. function addStylesToDom (styles /* Array<StyleObject> */) {
  1063. for (var i = 0; i < styles.length; i++) {
  1064. var item = styles[i]
  1065. var domStyle = stylesInDom[item.id]
  1066. if (domStyle) {
  1067. domStyle.refs++
  1068. for (var j = 0; j < domStyle.parts.length; j++) {
  1069. domStyle.parts[j](item.parts[j])
  1070. }
  1071. for (; j < item.parts.length; j++) {
  1072. domStyle.parts.push(addStyle(item.parts[j]))
  1073. }
  1074. if (domStyle.parts.length > item.parts.length) {
  1075. domStyle.parts.length = item.parts.length
  1076. }
  1077. } else {
  1078. var parts = []
  1079. for (var j = 0; j < item.parts.length; j++) {
  1080. parts.push(addStyle(item.parts[j]))
  1081. }
  1082. stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
  1083. }
  1084. }
  1085. }
  1086. function createStyleElement () {
  1087. var styleElement = document.createElement('style')
  1088. styleElement.type = 'text/css'
  1089. head.appendChild(styleElement)
  1090. return styleElement
  1091. }
  1092. function addStyle (obj /* StyleObjectPart */) {
  1093. var update, remove
  1094. var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
  1095. if (styleElement) {
  1096. if (isProduction) {
  1097. // has SSR styles and in production mode.
  1098. // simply do nothing.
  1099. return noop
  1100. } else {
  1101. // has SSR styles but in dev mode.
  1102. // for some reason Chrome can't handle source map in server-rendered
  1103. // style tags - source maps in <style> only works if the style tag is
  1104. // created and inserted dynamically. So we remove the server rendered
  1105. // styles and inject new ones.
  1106. styleElement.parentNode.removeChild(styleElement)
  1107. }
  1108. }
  1109. if (isOldIE) {
  1110. // use singleton mode for IE9.
  1111. var styleIndex = singletonCounter++
  1112. styleElement = singletonElement || (singletonElement = createStyleElement())
  1113. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
  1114. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
  1115. } else {
  1116. // use multi-style-tag mode in all other cases
  1117. styleElement = createStyleElement()
  1118. update = applyToTag.bind(null, styleElement)
  1119. remove = function () {
  1120. styleElement.parentNode.removeChild(styleElement)
  1121. }
  1122. }
  1123. update(obj)
  1124. return function updateStyle (newObj /* StyleObjectPart */) {
  1125. if (newObj) {
  1126. if (newObj.css === obj.css &&
  1127. newObj.media === obj.media &&
  1128. newObj.sourceMap === obj.sourceMap) {
  1129. return
  1130. }
  1131. update(obj = newObj)
  1132. } else {
  1133. remove()
  1134. }
  1135. }
  1136. }
  1137. var replaceText = (function () {
  1138. var textStore = []
  1139. return function (index, replacement) {
  1140. textStore[index] = replacement
  1141. return textStore.filter(Boolean).join('\n')
  1142. }
  1143. })()
  1144. function applyToSingletonTag (styleElement, index, remove, obj) {
  1145. var css = remove ? '' : obj.css
  1146. if (styleElement.styleSheet) {
  1147. styleElement.styleSheet.cssText = replaceText(index, css)
  1148. } else {
  1149. var cssNode = document.createTextNode(css)
  1150. var childNodes = styleElement.childNodes
  1151. if (childNodes[index]) styleElement.removeChild(childNodes[index])
  1152. if (childNodes.length) {
  1153. styleElement.insertBefore(cssNode, childNodes[index])
  1154. } else {
  1155. styleElement.appendChild(cssNode)
  1156. }
  1157. }
  1158. }
  1159. function applyToTag (styleElement, obj) {
  1160. var css = obj.css
  1161. var media = obj.media
  1162. var sourceMap = obj.sourceMap
  1163. if (media) {
  1164. styleElement.setAttribute('media', media)
  1165. }
  1166. if (options.ssrId) {
  1167. styleElement.setAttribute(ssrIdKey, obj.id)
  1168. }
  1169. if (sourceMap) {
  1170. // https://developer.chrome.com/devtools/docs/javascript-debugging
  1171. // this makes source maps inside style tags work properly in Chrome
  1172. css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
  1173. // http://stackoverflow.com/a/26603875
  1174. css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
  1175. }
  1176. if (styleElement.styleSheet) {
  1177. styleElement.styleSheet.cssText = css
  1178. } else {
  1179. while (styleElement.firstChild) {
  1180. styleElement.removeChild(styleElement.firstChild)
  1181. }
  1182. styleElement.appendChild(document.createTextNode(css))
  1183. }
  1184. }
  1185. /***/ }),
  1186. /***/ "49ad":
  1187. /***/ (function(module, exports, __webpack_require__) {
  1188. "use strict";
  1189. module.exports = function(idHandler) {
  1190. var eventListeners = {};
  1191. /**
  1192. * Gets all listeners for the given element.
  1193. * @public
  1194. * @param {element} element The element to get all listeners for.
  1195. * @returns All listeners for the given element.
  1196. */
  1197. function getListeners(element) {
  1198. var id = idHandler.get(element);
  1199. if (id === undefined) {
  1200. return [];
  1201. }
  1202. return eventListeners[id] || [];
  1203. }
  1204. /**
  1205. * Stores the given listener for the given element. Will not actually add the listener to the element.
  1206. * @public
  1207. * @param {element} element The element that should have the listener added.
  1208. * @param {function} listener The callback that the element has added.
  1209. */
  1210. function addListener(element, listener) {
  1211. var id = idHandler.get(element);
  1212. if(!eventListeners[id]) {
  1213. eventListeners[id] = [];
  1214. }
  1215. eventListeners[id].push(listener);
  1216. }
  1217. function removeListener(element, listener) {
  1218. var listeners = getListeners(element);
  1219. for (var i = 0, len = listeners.length; i < len; ++i) {
  1220. if (listeners[i] === listener) {
  1221. listeners.splice(i, 1);
  1222. break;
  1223. }
  1224. }
  1225. }
  1226. function removeAllListeners(element) {
  1227. var listeners = getListeners(element);
  1228. if (!listeners) { return; }
  1229. listeners.length = 0;
  1230. }
  1231. return {
  1232. get: getListeners,
  1233. add: addListener,
  1234. removeListener: removeListener,
  1235. removeAllListeners: removeAllListeners
  1236. };
  1237. };
  1238. /***/ }),
  1239. /***/ "4bf8":
  1240. /***/ (function(module, exports, __webpack_require__) {
  1241. // 7.1.13 ToObject(argument)
  1242. var defined = __webpack_require__("be13");
  1243. module.exports = function (it) {
  1244. return Object(defined(it));
  1245. };
  1246. /***/ }),
  1247. /***/ "5058":
  1248. /***/ (function(module, exports, __webpack_require__) {
  1249. "use strict";
  1250. module.exports = function(options) {
  1251. var idGenerator = options.idGenerator;
  1252. var getState = options.stateHandler.getState;
  1253. /**
  1254. * Gets the resize detector id of the element.
  1255. * @public
  1256. * @param {element} element The target element to get the id of.
  1257. * @returns {string|number|null} The id of the element. Null if it has no id.
  1258. */
  1259. function getId(element) {
  1260. var state = getState(element);
  1261. if (state && state.id !== undefined) {
  1262. return state.id;
  1263. }
  1264. return null;
  1265. }
  1266. /**
  1267. * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
  1268. * @public
  1269. * @param {element} element The target element to set the id of.
  1270. * @returns {string|number|null} The id of the element.
  1271. */
  1272. function setId(element) {
  1273. var state = getState(element);
  1274. if (!state) {
  1275. throw new Error("setId required the element to have a resize detection state.");
  1276. }
  1277. var id = idGenerator.generate();
  1278. state.id = id;
  1279. return id;
  1280. }
  1281. return {
  1282. get: getId,
  1283. set: setId
  1284. };
  1285. };
  1286. /***/ }),
  1287. /***/ "50bf":
  1288. /***/ (function(module, exports, __webpack_require__) {
  1289. "use strict";
  1290. var utils = module.exports = {};
  1291. utils.getOption = getOption;
  1292. function getOption(options, name, defaultValue) {
  1293. var value = options[name];
  1294. if((value === undefined || value === null) && defaultValue !== undefined) {
  1295. return defaultValue;
  1296. }
  1297. return value;
  1298. }
  1299. /***/ }),
  1300. /***/ "520a":
  1301. /***/ (function(module, exports, __webpack_require__) {
  1302. "use strict";
  1303. var regexpFlags = __webpack_require__("0bfb");
  1304. var nativeExec = RegExp.prototype.exec;
  1305. // This always refers to the native implementation, because the
  1306. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  1307. // which loads this file before patching the method.
  1308. var nativeReplace = String.prototype.replace;
  1309. var patchedExec = nativeExec;
  1310. var LAST_INDEX = 'lastIndex';
  1311. var UPDATES_LAST_INDEX_WRONG = (function () {
  1312. var re1 = /a/,
  1313. re2 = /b*/g;
  1314. nativeExec.call(re1, 'a');
  1315. nativeExec.call(re2, 'a');
  1316. return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
  1317. })();
  1318. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1319. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1320. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  1321. if (PATCH) {
  1322. patchedExec = function exec(str) {
  1323. var re = this;
  1324. var lastIndex, reCopy, match, i;
  1325. if (NPCG_INCLUDED) {
  1326. reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
  1327. }
  1328. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
  1329. match = nativeExec.call(re, str);
  1330. if (UPDATES_LAST_INDEX_WRONG && match) {
  1331. re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
  1332. }
  1333. if (NPCG_INCLUDED && match && match.length > 1) {
  1334. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1335. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  1336. // eslint-disable-next-line no-loop-func
  1337. nativeReplace.call(match[0], reCopy, function () {
  1338. for (i = 1; i < arguments.length - 2; i++) {
  1339. if (arguments[i] === undefined) match[i] = undefined;
  1340. }
  1341. });
  1342. }
  1343. return match;
  1344. };
  1345. }
  1346. module.exports = patchedExec;
  1347. /***/ }),
  1348. /***/ "52a7":
  1349. /***/ (function(module, exports) {
  1350. exports.f = {}.propertyIsEnumerable;
  1351. /***/ }),
  1352. /***/ "5537":
  1353. /***/ (function(module, exports, __webpack_require__) {
  1354. var core = __webpack_require__("8378");
  1355. var global = __webpack_require__("7726");
  1356. var SHARED = '__core-js_shared__';
  1357. var store = global[SHARED] || (global[SHARED] = {});
  1358. (module.exports = function (key, value) {
  1359. return store[key] || (store[key] = value !== undefined ? value : {});
  1360. })('versions', []).push({
  1361. version: core.version,
  1362. mode: __webpack_require__("2d00") ? 'pure' : 'global',
  1363. copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
  1364. });
  1365. /***/ }),
  1366. /***/ "55dd":
  1367. /***/ (function(module, exports, __webpack_require__) {
  1368. "use strict";
  1369. var $export = __webpack_require__("5ca1");
  1370. var aFunction = __webpack_require__("d8e8");
  1371. var toObject = __webpack_require__("4bf8");
  1372. var fails = __webpack_require__("79e5");
  1373. var $sort = [].sort;
  1374. var test = [1, 2, 3];
  1375. $export($export.P + $export.F * (fails(function () {
  1376. // IE8-
  1377. test.sort(undefined);
  1378. }) || !fails(function () {
  1379. // V8 bug
  1380. test.sort(null);
  1381. // Old WebKit
  1382. }) || !__webpack_require__("2f21")($sort)), 'Array', {
  1383. // 22.1.3.25 Array.prototype.sort(comparefn)
  1384. sort: function sort(comparefn) {
  1385. return comparefn === undefined
  1386. ? $sort.call(toObject(this))
  1387. : $sort.call(toObject(this), aFunction(comparefn));
  1388. }
  1389. });
  1390. /***/ }),
  1391. /***/ "5be5":
  1392. /***/ (function(module, exports, __webpack_require__) {
  1393. "use strict";
  1394. module.exports = function(options) {
  1395. var getState = options.stateHandler.getState;
  1396. /**
  1397. * Tells if the element has been made detectable and ready to be listened for resize events.
  1398. * @public
  1399. * @param {element} The element to check.
  1400. * @returns {boolean} True or false depending on if the element is detectable or not.
  1401. */
  1402. function isDetectable(element) {
  1403. var state = getState(element);
  1404. return state && !!state.isDetectable;
  1405. }
  1406. /**
  1407. * Marks the element that it has been made detectable and ready to be listened for resize events.
  1408. * @public
  1409. * @param {element} The element to mark.
  1410. */
  1411. function markAsDetectable(element) {
  1412. getState(element).isDetectable = true;
  1413. }
  1414. /**
  1415. * Tells if the element is busy or not.
  1416. * @public
  1417. * @param {element} The element to check.
  1418. * @returns {boolean} True or false depending on if the element is busy or not.
  1419. */
  1420. function isBusy(element) {
  1421. return !!getState(element).busy;
  1422. }
  1423. /**
  1424. * Marks the object is busy and should not be made detectable.
  1425. * @public
  1426. * @param {element} element The element to mark.
  1427. * @param {boolean} busy If the element is busy or not.
  1428. */
  1429. function markBusy(element, busy) {
  1430. getState(element).busy = !!busy;
  1431. }
  1432. return {
  1433. isDetectable: isDetectable,
  1434. markAsDetectable: markAsDetectable,
  1435. isBusy: isBusy,
  1436. markBusy: markBusy
  1437. };
  1438. };
  1439. /***/ }),
  1440. /***/ "5ca1":
  1441. /***/ (function(module, exports, __webpack_require__) {
  1442. var global = __webpack_require__("7726");
  1443. var core = __webpack_require__("8378");
  1444. var hide = __webpack_require__("32e9");
  1445. var redefine = __webpack_require__("2aba");
  1446. var ctx = __webpack_require__("9b43");
  1447. var PROTOTYPE = 'prototype';
  1448. var $export = function (type, name, source) {
  1449. var IS_FORCED = type & $export.F;
  1450. var IS_GLOBAL = type & $export.G;
  1451. var IS_STATIC = type & $export.S;
  1452. var IS_PROTO = type & $export.P;
  1453. var IS_BIND = type & $export.B;
  1454. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  1455. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  1456. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  1457. var key, own, out, exp;
  1458. if (IS_GLOBAL) source = name;
  1459. for (key in source) {
  1460. // contains in native
  1461. own = !IS_FORCED && target && target[key] !== undefined;
  1462. // export native or passed
  1463. out = (own ? target : source)[key];
  1464. // bind timers to global for call from export context
  1465. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  1466. // extend global
  1467. if (target) redefine(target, key, out, type & $export.U);
  1468. // export
  1469. if (exports[key] != out) hide(exports, key, exp);
  1470. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  1471. }
  1472. };
  1473. global.core = core;
  1474. // type bitmap
  1475. $export.F = 1; // forced
  1476. $export.G = 2; // global
  1477. $export.S = 4; // static
  1478. $export.P = 8; // proto
  1479. $export.B = 16; // bind
  1480. $export.W = 32; // wrap
  1481. $export.U = 64; // safe
  1482. $export.R = 128; // real proto method for `library`
  1483. module.exports = $export;
  1484. /***/ }),
  1485. /***/ "5dbc":
  1486. /***/ (function(module, exports, __webpack_require__) {
  1487. var isObject = __webpack_require__("d3f4");
  1488. var setPrototypeOf = __webpack_require__("8b97").set;
  1489. module.exports = function (that, target, C) {
  1490. var S = target.constructor;
  1491. var P;
  1492. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  1493. setPrototypeOf(that, P);
  1494. } return that;
  1495. };
  1496. /***/ }),
  1497. /***/ "5eda":
  1498. /***/ (function(module, exports, __webpack_require__) {
  1499. // most Object methods by ES6 should accept primitives
  1500. var $export = __webpack_require__("5ca1");
  1501. var core = __webpack_require__("8378");
  1502. var fails = __webpack_require__("79e5");
  1503. module.exports = function (KEY, exec) {
  1504. var fn = (core.Object || {})[KEY] || Object[KEY];
  1505. var exp = {};
  1506. exp[KEY] = exec(fn);
  1507. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  1508. };
  1509. /***/ }),
  1510. /***/ "5f1b":
  1511. /***/ (function(module, exports, __webpack_require__) {
  1512. "use strict";
  1513. var classof = __webpack_require__("23c6");
  1514. var builtinExec = RegExp.prototype.exec;
  1515. // `RegExpExec` abstract operation
  1516. // https://tc39.github.io/ecma262/#sec-regexpexec
  1517. module.exports = function (R, S) {
  1518. var exec = R.exec;
  1519. if (typeof exec === 'function') {
  1520. var result = exec.call(R, S);
  1521. if (typeof result !== 'object') {
  1522. throw new TypeError('RegExp exec method returned something other than an Object or null');
  1523. }
  1524. return result;
  1525. }
  1526. if (classof(R) !== 'RegExp') {
  1527. throw new TypeError('RegExp#exec called on incompatible receiver');
  1528. }
  1529. return builtinExec.call(R, S);
  1530. };
  1531. /***/ }),
  1532. /***/ "613b":
  1533. /***/ (function(module, exports, __webpack_require__) {
  1534. var shared = __webpack_require__("5537")('keys');
  1535. var uid = __webpack_require__("ca5a");
  1536. module.exports = function (key) {
  1537. return shared[key] || (shared[key] = uid(key));
  1538. };
  1539. /***/ }),
  1540. /***/ "626a":
  1541. /***/ (function(module, exports, __webpack_require__) {
  1542. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1543. var cof = __webpack_require__("2d95");
  1544. // eslint-disable-next-line no-prototype-builtins
  1545. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  1546. return cof(it) == 'String' ? it.split('') : Object(it);
  1547. };
  1548. /***/ }),
  1549. /***/ "6521":
  1550. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1551. "use strict";
  1552. /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_GridLayout_vue_vue_type_style_index_0_id_fc5948f6_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("92bf");
  1553. /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_GridLayout_vue_vue_type_style_index_0_id_fc5948f6_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_GridLayout_vue_vue_type_style_index_0_id_fc5948f6_lang_css__WEBPACK_IMPORTED_MODULE_0__);
  1554. /* unused harmony reexport * */
  1555. /***/ }),
  1556. /***/ "6821":
  1557. /***/ (function(module, exports, __webpack_require__) {
  1558. // to indexed object, toObject with fallback for non-array-like ES3 strings
  1559. var IObject = __webpack_require__("626a");
  1560. var defined = __webpack_require__("be13");
  1561. module.exports = function (it) {
  1562. return IObject(defined(it));
  1563. };
  1564. /***/ }),
  1565. /***/ "69a8":
  1566. /***/ (function(module, exports) {
  1567. var hasOwnProperty = {}.hasOwnProperty;
  1568. module.exports = function (it, key) {
  1569. return hasOwnProperty.call(it, key);
  1570. };
  1571. /***/ }),
  1572. /***/ "6a99":
  1573. /***/ (function(module, exports, __webpack_require__) {
  1574. // 7.1.1 ToPrimitive(input [, PreferredType])
  1575. var isObject = __webpack_require__("d3f4");
  1576. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  1577. // and the second argument - flag - preferred type is a string
  1578. module.exports = function (it, S) {
  1579. if (!isObject(it)) return it;
  1580. var fn, val;
  1581. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  1582. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  1583. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  1584. throw TypeError("Can't convert object to primitive value");
  1585. };
  1586. /***/ }),
  1587. /***/ "7333":
  1588. /***/ (function(module, exports, __webpack_require__) {
  1589. "use strict";
  1590. // 19.1.2.1 Object.assign(target, source, ...)
  1591. var DESCRIPTORS = __webpack_require__("9e1e");
  1592. var getKeys = __webpack_require__("0d58");
  1593. var gOPS = __webpack_require__("2621");
  1594. var pIE = __webpack_require__("52a7");
  1595. var toObject = __webpack_require__("4bf8");
  1596. var IObject = __webpack_require__("626a");
  1597. var $assign = Object.assign;
  1598. // should work with symbols and should have deterministic property order (V8 bug)
  1599. module.exports = !$assign || __webpack_require__("79e5")(function () {
  1600. var A = {};
  1601. var B = {};
  1602. // eslint-disable-next-line no-undef
  1603. var S = Symbol();
  1604. var K = 'abcdefghijklmnopqrst';
  1605. A[S] = 7;
  1606. K.split('').forEach(function (k) { B[k] = k; });
  1607. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  1608. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  1609. var T = toObject(target);
  1610. var aLen = arguments.length;
  1611. var index = 1;
  1612. var getSymbols = gOPS.f;
  1613. var isEnum = pIE.f;
  1614. while (aLen > index) {
  1615. var S = IObject(arguments[index++]);
  1616. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  1617. var length = keys.length;
  1618. var j = 0;
  1619. var key;
  1620. while (length > j) {
  1621. key = keys[j++];
  1622. if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
  1623. }
  1624. } return T;
  1625. } : $assign;
  1626. /***/ }),
  1627. /***/ "7726":
  1628. /***/ (function(module, exports) {
  1629. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1630. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  1631. ? window : typeof self != 'undefined' && self.Math == Math ? self
  1632. // eslint-disable-next-line no-new-func
  1633. : Function('return this')();
  1634. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  1635. /***/ }),
  1636. /***/ "77f1":
  1637. /***/ (function(module, exports, __webpack_require__) {
  1638. var toInteger = __webpack_require__("4588");
  1639. var max = Math.max;
  1640. var min = Math.min;
  1641. module.exports = function (index, length) {
  1642. index = toInteger(index);
  1643. return index < 0 ? max(index + length, 0) : min(index, length);
  1644. };
  1645. /***/ }),
  1646. /***/ "79e5":
  1647. /***/ (function(module, exports) {
  1648. module.exports = function (exec) {
  1649. try {
  1650. return !!exec();
  1651. } catch (e) {
  1652. return true;
  1653. }
  1654. };
  1655. /***/ }),
  1656. /***/ "7f20":
  1657. /***/ (function(module, exports, __webpack_require__) {
  1658. var def = __webpack_require__("86cc").f;
  1659. var has = __webpack_require__("69a8");
  1660. var TAG = __webpack_require__("2b4c")('toStringTag');
  1661. module.exports = function (it, tag, stat) {
  1662. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  1663. };
  1664. /***/ }),
  1665. /***/ "8378":
  1666. /***/ (function(module, exports) {
  1667. var core = module.exports = { version: '2.6.12' };
  1668. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  1669. /***/ }),
  1670. /***/ "848e":
  1671. /***/ (function(module, exports, __webpack_require__) {
  1672. // Imports
  1673. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
  1674. exports = ___CSS_LOADER_API_IMPORT___(false);
  1675. // Module
  1676. exports.push([module.i, ".vue-grid-layout{position:relative;-webkit-transition:height .2s ease;transition:height .2s ease}", ""]);
  1677. // Exports
  1678. module.exports = exports;
  1679. /***/ }),
  1680. /***/ "84f2":
  1681. /***/ (function(module, exports) {
  1682. module.exports = {};
  1683. /***/ }),
  1684. /***/ "86cc":
  1685. /***/ (function(module, exports, __webpack_require__) {
  1686. var anObject = __webpack_require__("cb7c");
  1687. var IE8_DOM_DEFINE = __webpack_require__("c69a");
  1688. var toPrimitive = __webpack_require__("6a99");
  1689. var dP = Object.defineProperty;
  1690. exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  1691. anObject(O);
  1692. P = toPrimitive(P, true);
  1693. anObject(Attributes);
  1694. if (IE8_DOM_DEFINE) try {
  1695. return dP(O, P, Attributes);
  1696. } catch (e) { /* empty */ }
  1697. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  1698. if ('value' in Attributes) O[P] = Attributes.value;
  1699. return O;
  1700. };
  1701. /***/ }),
  1702. /***/ "8875":
  1703. /***/ (function(module, exports, __webpack_require__) {
  1704. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
  1705. // MIT license
  1706. // source: https://github.com/amiller-gh/currentScript-polyfill
  1707. // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
  1708. (function (root, factory) {
  1709. if (true) {
  1710. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  1711. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  1712. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  1713. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  1714. } else {}
  1715. }(typeof self !== 'undefined' ? self : this, function () {
  1716. function getCurrentScript () {
  1717. var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
  1718. // for chrome
  1719. if (!descriptor && 'currentScript' in document && document.currentScript) {
  1720. return document.currentScript
  1721. }
  1722. // for other browsers with native support for currentScript
  1723. if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
  1724. return document.currentScript
  1725. }
  1726. // IE 8-10 support script readyState
  1727. // IE 11+ & Firefox support stack trace
  1728. try {
  1729. throw new Error();
  1730. }
  1731. catch (err) {
  1732. // Find the second match for the "at" string to get file src url from stack.
  1733. var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
  1734. ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
  1735. stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
  1736. scriptLocation = (stackDetails && stackDetails[1]) || false,
  1737. line = (stackDetails && stackDetails[2]) || false,
  1738. currentLocation = document.location.href.replace(document.location.hash, ''),
  1739. pageSource,
  1740. inlineScriptSourceRegExp,
  1741. inlineScriptSource,
  1742. scripts = document.getElementsByTagName('script'); // Live NodeList collection
  1743. if (scriptLocation === currentLocation) {
  1744. pageSource = document.documentElement.outerHTML;
  1745. inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
  1746. inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
  1747. }
  1748. for (var i = 0; i < scripts.length; i++) {
  1749. // If ready state is interactive, return the script tag
  1750. if (scripts[i].readyState === 'interactive') {
  1751. return scripts[i];
  1752. }
  1753. // If src matches, return the script tag
  1754. if (scripts[i].src === scriptLocation) {
  1755. return scripts[i];
  1756. }
  1757. // If inline source matches, return the script tag
  1758. if (
  1759. scriptLocation === currentLocation &&
  1760. scripts[i].innerHTML &&
  1761. scripts[i].innerHTML.trim() === inlineScriptSource
  1762. ) {
  1763. return scripts[i];
  1764. }
  1765. }
  1766. // If no match, return null
  1767. return null;
  1768. }
  1769. };
  1770. return getCurrentScript
  1771. }));
  1772. /***/ }),
  1773. /***/ "8b97":
  1774. /***/ (function(module, exports, __webpack_require__) {
  1775. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1776. /* eslint-disable no-proto */
  1777. var isObject = __webpack_require__("d3f4");
  1778. var anObject = __webpack_require__("cb7c");
  1779. var check = function (O, proto) {
  1780. anObject(O);
  1781. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  1782. };
  1783. module.exports = {
  1784. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  1785. function (test, buggy, set) {
  1786. try {
  1787. set = __webpack_require__("9b43")(Function.call, __webpack_require__("11e9").f(Object.prototype, '__proto__').set, 2);
  1788. set(test, []);
  1789. buggy = !(test instanceof Array);
  1790. } catch (e) { buggy = true; }
  1791. return function setPrototypeOf(O, proto) {
  1792. check(O, proto);
  1793. if (buggy) O.__proto__ = proto;
  1794. else set(O, proto);
  1795. return O;
  1796. };
  1797. }({}, false) : undefined),
  1798. check: check
  1799. };
  1800. /***/ }),
  1801. /***/ "8bbf":
  1802. /***/ (function(module, exports) {
  1803. module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
  1804. /***/ }),
  1805. /***/ "8e6e":
  1806. /***/ (function(module, exports, __webpack_require__) {
  1807. // https://github.com/tc39/proposal-object-getownpropertydescriptors
  1808. var $export = __webpack_require__("5ca1");
  1809. var ownKeys = __webpack_require__("990b");
  1810. var toIObject = __webpack_require__("6821");
  1811. var gOPD = __webpack_require__("11e9");
  1812. var createProperty = __webpack_require__("f1ae");
  1813. $export($export.S, 'Object', {
  1814. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  1815. var O = toIObject(object);
  1816. var getDesc = gOPD.f;
  1817. var keys = ownKeys(O);
  1818. var result = {};
  1819. var i = 0;
  1820. var key, desc;
  1821. while (keys.length > i) {
  1822. desc = getDesc(O, key = keys[i++]);
  1823. if (desc !== undefined) createProperty(result, key, desc);
  1824. }
  1825. return result;
  1826. }
  1827. });
  1828. /***/ }),
  1829. /***/ "9093":
  1830. /***/ (function(module, exports, __webpack_require__) {
  1831. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  1832. var $keys = __webpack_require__("ce10");
  1833. var hiddenKeys = __webpack_require__("e11e").concat('length', 'prototype');
  1834. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1835. return $keys(O, hiddenKeys);
  1836. };
  1837. /***/ }),
  1838. /***/ "92bf":
  1839. /***/ (function(module, exports, __webpack_require__) {
  1840. // style-loader: Adds some css to the DOM by adding a <style> tag
  1841. // load the styles
  1842. var content = __webpack_require__("848e");
  1843. if(typeof content === 'string') content = [[module.i, content, '']];
  1844. if(content.locals) module.exports = content.locals;
  1845. // add the styles to the DOM
  1846. var add = __webpack_require__("499e").default
  1847. var update = add("ff1827d0", content, true, {"sourceMap":false,"shadowMode":false});
  1848. /***/ }),
  1849. /***/ "990b":
  1850. /***/ (function(module, exports, __webpack_require__) {
  1851. // all object keys, includes non-enumerable and symbols
  1852. var gOPN = __webpack_require__("9093");
  1853. var gOPS = __webpack_require__("2621");
  1854. var anObject = __webpack_require__("cb7c");
  1855. var Reflect = __webpack_require__("7726").Reflect;
  1856. module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  1857. var keys = gOPN.f(anObject(it));
  1858. var getSymbols = gOPS.f;
  1859. return getSymbols ? keys.concat(getSymbols(it)) : keys;
  1860. };
  1861. /***/ }),
  1862. /***/ "9b43":
  1863. /***/ (function(module, exports, __webpack_require__) {
  1864. // optional / simple context binding
  1865. var aFunction = __webpack_require__("d8e8");
  1866. module.exports = function (fn, that, length) {
  1867. aFunction(fn);
  1868. if (that === undefined) return fn;
  1869. switch (length) {
  1870. case 1: return function (a) {
  1871. return fn.call(that, a);
  1872. };
  1873. case 2: return function (a, b) {
  1874. return fn.call(that, a, b);
  1875. };
  1876. case 3: return function (a, b, c) {
  1877. return fn.call(that, a, b, c);
  1878. };
  1879. }
  1880. return function (/* ...args */) {
  1881. return fn.apply(that, arguments);
  1882. };
  1883. };
  1884. /***/ }),
  1885. /***/ "9c6c":
  1886. /***/ (function(module, exports, __webpack_require__) {
  1887. // 22.1.3.31 Array.prototype[@@unscopables]
  1888. var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
  1889. var ArrayProto = Array.prototype;
  1890. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
  1891. module.exports = function (key) {
  1892. ArrayProto[UNSCOPABLES][key] = true;
  1893. };
  1894. /***/ }),
  1895. /***/ "9def":
  1896. /***/ (function(module, exports, __webpack_require__) {
  1897. // 7.1.15 ToLength
  1898. var toInteger = __webpack_require__("4588");
  1899. var min = Math.min;
  1900. module.exports = function (it) {
  1901. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  1902. };
  1903. /***/ }),
  1904. /***/ "9e1e":
  1905. /***/ (function(module, exports, __webpack_require__) {
  1906. // Thank's IE8 for his funny defineProperty
  1907. module.exports = !__webpack_require__("79e5")(function () {
  1908. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  1909. });
  1910. /***/ }),
  1911. /***/ "a481":
  1912. /***/ (function(module, exports, __webpack_require__) {
  1913. "use strict";
  1914. var anObject = __webpack_require__("cb7c");
  1915. var toObject = __webpack_require__("4bf8");
  1916. var toLength = __webpack_require__("9def");
  1917. var toInteger = __webpack_require__("4588");
  1918. var advanceStringIndex = __webpack_require__("0390");
  1919. var regExpExec = __webpack_require__("5f1b");
  1920. var max = Math.max;
  1921. var min = Math.min;
  1922. var floor = Math.floor;
  1923. var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  1924. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  1925. var maybeToString = function (it) {
  1926. return it === undefined ? it : String(it);
  1927. };
  1928. // @@replace logic
  1929. __webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
  1930. return [
  1931. // `String.prototype.replace` method
  1932. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  1933. function replace(searchValue, replaceValue) {
  1934. var O = defined(this);
  1935. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  1936. return fn !== undefined
  1937. ? fn.call(searchValue, O, replaceValue)
  1938. : $replace.call(String(O), searchValue, replaceValue);
  1939. },
  1940. // `RegExp.prototype[@@replace]` method
  1941. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  1942. function (regexp, replaceValue) {
  1943. var res = maybeCallNative($replace, regexp, this, replaceValue);
  1944. if (res.done) return res.value;
  1945. var rx = anObject(regexp);
  1946. var S = String(this);
  1947. var functionalReplace = typeof replaceValue === 'function';
  1948. if (!functionalReplace) replaceValue = String(replaceValue);
  1949. var global = rx.global;
  1950. if (global) {
  1951. var fullUnicode = rx.unicode;
  1952. rx.lastIndex = 0;
  1953. }
  1954. var results = [];
  1955. while (true) {
  1956. var result = regExpExec(rx, S);
  1957. if (result === null) break;
  1958. results.push(result);
  1959. if (!global) break;
  1960. var matchStr = String(result[0]);
  1961. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1962. }
  1963. var accumulatedResult = '';
  1964. var nextSourcePosition = 0;
  1965. for (var i = 0; i < results.length; i++) {
  1966. result = results[i];
  1967. var matched = String(result[0]);
  1968. var position = max(min(toInteger(result.index), S.length), 0);
  1969. var captures = [];
  1970. // NOTE: This is equivalent to
  1971. // captures = result.slice(1).map(maybeToString)
  1972. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1973. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1974. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1975. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  1976. var namedCaptures = result.groups;
  1977. if (functionalReplace) {
  1978. var replacerArgs = [matched].concat(captures, position, S);
  1979. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  1980. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  1981. } else {
  1982. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1983. }
  1984. if (position >= nextSourcePosition) {
  1985. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  1986. nextSourcePosition = position + matched.length;
  1987. }
  1988. }
  1989. return accumulatedResult + S.slice(nextSourcePosition);
  1990. }
  1991. ];
  1992. // https://tc39.github.io/ecma262/#sec-getsubstitution
  1993. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  1994. var tailPos = position + matched.length;
  1995. var m = captures.length;
  1996. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1997. if (namedCaptures !== undefined) {
  1998. namedCaptures = toObject(namedCaptures);
  1999. symbols = SUBSTITUTION_SYMBOLS;
  2000. }
  2001. return $replace.call(replacement, symbols, function (match, ch) {
  2002. var capture;
  2003. switch (ch.charAt(0)) {
  2004. case '$': return '$';
  2005. case '&': return matched;
  2006. case '`': return str.slice(0, position);
  2007. case "'": return str.slice(tailPos);
  2008. case '<':
  2009. capture = namedCaptures[ch.slice(1, -1)];
  2010. break;
  2011. default: // \d\d?
  2012. var n = +ch;
  2013. if (n === 0) return match;
  2014. if (n > m) {
  2015. var f = floor(n / 10);
  2016. if (f === 0) return match;
  2017. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  2018. return match;
  2019. }
  2020. capture = captures[n - 1];
  2021. }
  2022. return capture === undefined ? '' : capture;
  2023. });
  2024. }
  2025. });
  2026. /***/ }),
  2027. /***/ "aa77":
  2028. /***/ (function(module, exports, __webpack_require__) {
  2029. var $export = __webpack_require__("5ca1");
  2030. var defined = __webpack_require__("be13");
  2031. var fails = __webpack_require__("79e5");
  2032. var spaces = __webpack_require__("fdef");
  2033. var space = '[' + spaces + ']';
  2034. var non = '\u200b\u0085';
  2035. var ltrim = RegExp('^' + space + space + '*');
  2036. var rtrim = RegExp(space + space + '*$');
  2037. var exporter = function (KEY, exec, ALIAS) {
  2038. var exp = {};
  2039. var FORCE = fails(function () {
  2040. return !!spaces[KEY]() || non[KEY]() != non;
  2041. });
  2042. var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  2043. if (ALIAS) exp[ALIAS] = fn;
  2044. $export($export.P + $export.F * FORCE, 'String', exp);
  2045. };
  2046. // 1 -> String#trimLeft
  2047. // 2 -> String#trimRight
  2048. // 3 -> String#trim
  2049. var trim = exporter.trim = function (string, TYPE) {
  2050. string = String(defined(string));
  2051. if (TYPE & 1) string = string.replace(ltrim, '');
  2052. if (TYPE & 2) string = string.replace(rtrim, '');
  2053. return string;
  2054. };
  2055. module.exports = exporter;
  2056. /***/ }),
  2057. /***/ "abb4":
  2058. /***/ (function(module, exports, __webpack_require__) {
  2059. "use strict";
  2060. /* global console: false */
  2061. /**
  2062. * Reporter that handles the reporting of logs, warnings and errors.
  2063. * @public
  2064. * @param {boolean} quiet Tells if the reporter should be quiet or not.
  2065. */
  2066. module.exports = function(quiet) {
  2067. function noop() {
  2068. //Does nothing.
  2069. }
  2070. var reporter = {
  2071. log: noop,
  2072. warn: noop,
  2073. error: noop
  2074. };
  2075. if(!quiet && window.console) {
  2076. var attachFunction = function(reporter, name) {
  2077. //The proxy is needed to be able to call the method with the console context,
  2078. //since we cannot use bind.
  2079. reporter[name] = function reporterProxy() {
  2080. var f = console[name];
  2081. if (f.apply) { //IE9 does not support console.log.apply :)
  2082. f.apply(console, arguments);
  2083. } else {
  2084. for (var i = 0; i < arguments.length; i++) {
  2085. f(arguments[i]);
  2086. }
  2087. }
  2088. };
  2089. };
  2090. attachFunction(reporter, "log");
  2091. attachFunction(reporter, "warn");
  2092. attachFunction(reporter, "error");
  2093. }
  2094. return reporter;
  2095. };
  2096. /***/ }),
  2097. /***/ "ac6a":
  2098. /***/ (function(module, exports, __webpack_require__) {
  2099. var $iterators = __webpack_require__("cadf");
  2100. var getKeys = __webpack_require__("0d58");
  2101. var redefine = __webpack_require__("2aba");
  2102. var global = __webpack_require__("7726");
  2103. var hide = __webpack_require__("32e9");
  2104. var Iterators = __webpack_require__("84f2");
  2105. var wks = __webpack_require__("2b4c");
  2106. var ITERATOR = wks('iterator');
  2107. var TO_STRING_TAG = wks('toStringTag');
  2108. var ArrayValues = Iterators.Array;
  2109. var DOMIterables = {
  2110. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  2111. CSSStyleDeclaration: false,
  2112. CSSValueList: false,
  2113. ClientRectList: false,
  2114. DOMRectList: false,
  2115. DOMStringList: false,
  2116. DOMTokenList: true,
  2117. DataTransferItemList: false,
  2118. FileList: false,
  2119. HTMLAllCollection: false,
  2120. HTMLCollection: false,
  2121. HTMLFormElement: false,
  2122. HTMLSelectElement: false,
  2123. MediaList: true, // TODO: Not spec compliant, should be false.
  2124. MimeTypeArray: false,
  2125. NamedNodeMap: false,
  2126. NodeList: true,
  2127. PaintRequestList: false,
  2128. Plugin: false,
  2129. PluginArray: false,
  2130. SVGLengthList: false,
  2131. SVGNumberList: false,
  2132. SVGPathSegList: false,
  2133. SVGPointList: false,
  2134. SVGStringList: false,
  2135. SVGTransformList: false,
  2136. SourceBufferList: false,
  2137. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  2138. TextTrackCueList: false,
  2139. TextTrackList: false,
  2140. TouchList: false
  2141. };
  2142. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  2143. var NAME = collections[i];
  2144. var explicit = DOMIterables[NAME];
  2145. var Collection = global[NAME];
  2146. var proto = Collection && Collection.prototype;
  2147. var key;
  2148. if (proto) {
  2149. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  2150. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  2151. Iterators[NAME] = ArrayValues;
  2152. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  2153. }
  2154. }
  2155. /***/ }),
  2156. /***/ "b0c5":
  2157. /***/ (function(module, exports, __webpack_require__) {
  2158. "use strict";
  2159. var regexpExec = __webpack_require__("520a");
  2160. __webpack_require__("5ca1")({
  2161. target: 'RegExp',
  2162. proto: true,
  2163. forced: regexpExec !== /./.exec
  2164. }, {
  2165. exec: regexpExec
  2166. });
  2167. /***/ }),
  2168. /***/ "b770":
  2169. /***/ (function(module, exports, __webpack_require__) {
  2170. "use strict";
  2171. var utils = module.exports = {};
  2172. /**
  2173. * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.
  2174. * @public
  2175. * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
  2176. * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.
  2177. * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
  2178. */
  2179. utils.forEach = function(collection, callback) {
  2180. for(var i = 0; i < collection.length; i++) {
  2181. var result = callback(collection[i]);
  2182. if(result) {
  2183. return result;
  2184. }
  2185. }
  2186. };
  2187. /***/ }),
  2188. /***/ "be13":
  2189. /***/ (function(module, exports) {
  2190. // 7.2.1 RequireObjectCoercible(argument)
  2191. module.exports = function (it) {
  2192. if (it == undefined) throw TypeError("Can't call method on " + it);
  2193. return it;
  2194. };
  2195. /***/ }),
  2196. /***/ "c274":
  2197. /***/ (function(module, exports, __webpack_require__) {
  2198. "use strict";
  2199. var utils = __webpack_require__("50bf");
  2200. module.exports = function batchProcessorMaker(options) {
  2201. options = options || {};
  2202. var reporter = options.reporter;
  2203. var asyncProcess = utils.getOption(options, "async", true);
  2204. var autoProcess = utils.getOption(options, "auto", true);
  2205. if(autoProcess && !asyncProcess) {
  2206. reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
  2207. asyncProcess = true;
  2208. }
  2209. var batch = Batch();
  2210. var asyncFrameHandler;
  2211. var isProcessing = false;
  2212. function addFunction(level, fn) {
  2213. if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
  2214. // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
  2215. // This needs to be done before, since we're checking the size of the batch to be 0.
  2216. processBatchAsync();
  2217. }
  2218. batch.add(level, fn);
  2219. }
  2220. function processBatch() {
  2221. // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
  2222. // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
  2223. isProcessing = true;
  2224. while (batch.size()) {
  2225. var processingBatch = batch;
  2226. batch = Batch();
  2227. processingBatch.process();
  2228. }
  2229. isProcessing = false;
  2230. }
  2231. function forceProcessBatch(localAsyncProcess) {
  2232. if (isProcessing) {
  2233. return;
  2234. }
  2235. if(localAsyncProcess === undefined) {
  2236. localAsyncProcess = asyncProcess;
  2237. }
  2238. if(asyncFrameHandler) {
  2239. cancelFrame(asyncFrameHandler);
  2240. asyncFrameHandler = null;
  2241. }
  2242. if(localAsyncProcess) {
  2243. processBatchAsync();
  2244. } else {
  2245. processBatch();
  2246. }
  2247. }
  2248. function processBatchAsync() {
  2249. asyncFrameHandler = requestFrame(processBatch);
  2250. }
  2251. function clearBatch() {
  2252. batch = {};
  2253. batchSize = 0;
  2254. topLevel = 0;
  2255. bottomLevel = 0;
  2256. }
  2257. function cancelFrame(listener) {
  2258. // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
  2259. var cancel = clearTimeout;
  2260. return cancel(listener);
  2261. }
  2262. function requestFrame(callback) {
  2263. // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
  2264. var raf = function(fn) { return setTimeout(fn, 0); };
  2265. return raf(callback);
  2266. }
  2267. return {
  2268. add: addFunction,
  2269. force: forceProcessBatch
  2270. };
  2271. };
  2272. function Batch() {
  2273. var batch = {};
  2274. var size = 0;
  2275. var topLevel = 0;
  2276. var bottomLevel = 0;
  2277. function add(level, fn) {
  2278. if(!fn) {
  2279. fn = level;
  2280. level = 0;
  2281. }
  2282. if(level > topLevel) {
  2283. topLevel = level;
  2284. } else if(level < bottomLevel) {
  2285. bottomLevel = level;
  2286. }
  2287. if(!batch[level]) {
  2288. batch[level] = [];
  2289. }
  2290. batch[level].push(fn);
  2291. size++;
  2292. }
  2293. function process() {
  2294. for(var level = bottomLevel; level <= topLevel; level++) {
  2295. var fns = batch[level];
  2296. for(var i = 0; i < fns.length; i++) {
  2297. var fn = fns[i];
  2298. fn();
  2299. }
  2300. }
  2301. }
  2302. function getSize() {
  2303. return size;
  2304. }
  2305. return {
  2306. add: add,
  2307. process: process,
  2308. size: getSize
  2309. };
  2310. }
  2311. /***/ }),
  2312. /***/ "c366":
  2313. /***/ (function(module, exports, __webpack_require__) {
  2314. // false -> Array#indexOf
  2315. // true -> Array#includes
  2316. var toIObject = __webpack_require__("6821");
  2317. var toLength = __webpack_require__("9def");
  2318. var toAbsoluteIndex = __webpack_require__("77f1");
  2319. module.exports = function (IS_INCLUDES) {
  2320. return function ($this, el, fromIndex) {
  2321. var O = toIObject($this);
  2322. var length = toLength(O.length);
  2323. var index = toAbsoluteIndex(fromIndex, length);
  2324. var value;
  2325. // Array#includes uses SameValueZero equality algorithm
  2326. // eslint-disable-next-line no-self-compare
  2327. if (IS_INCLUDES && el != el) while (length > index) {
  2328. value = O[index++];
  2329. // eslint-disable-next-line no-self-compare
  2330. if (value != value) return true;
  2331. // Array#indexOf ignores holes, Array#includes - not
  2332. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  2333. if (O[index] === el) return IS_INCLUDES || index || 0;
  2334. } return !IS_INCLUDES && -1;
  2335. };
  2336. };
  2337. /***/ }),
  2338. /***/ "c541":
  2339. /***/ (function(module, exports, __webpack_require__) {
  2340. // style-loader: Adds some css to the DOM by adding a <style> tag
  2341. // load the styles
  2342. var content = __webpack_require__("493e");
  2343. if(typeof content === 'string') content = [[module.i, content, '']];
  2344. if(content.locals) module.exports = content.locals;
  2345. // add the styles to the DOM
  2346. var add = __webpack_require__("499e").default
  2347. var update = add("40158674", content, true, {"sourceMap":false,"shadowMode":false});
  2348. /***/ }),
  2349. /***/ "c5f6":
  2350. /***/ (function(module, exports, __webpack_require__) {
  2351. "use strict";
  2352. var global = __webpack_require__("7726");
  2353. var has = __webpack_require__("69a8");
  2354. var cof = __webpack_require__("2d95");
  2355. var inheritIfRequired = __webpack_require__("5dbc");
  2356. var toPrimitive = __webpack_require__("6a99");
  2357. var fails = __webpack_require__("79e5");
  2358. var gOPN = __webpack_require__("9093").f;
  2359. var gOPD = __webpack_require__("11e9").f;
  2360. var dP = __webpack_require__("86cc").f;
  2361. var $trim = __webpack_require__("aa77").trim;
  2362. var NUMBER = 'Number';
  2363. var $Number = global[NUMBER];
  2364. var Base = $Number;
  2365. var proto = $Number.prototype;
  2366. // Opera ~12 has broken Object#toString
  2367. var BROKEN_COF = cof(__webpack_require__("2aeb")(proto)) == NUMBER;
  2368. var TRIM = 'trim' in String.prototype;
  2369. // 7.1.3 ToNumber(argument)
  2370. var toNumber = function (argument) {
  2371. var it = toPrimitive(argument, false);
  2372. if (typeof it == 'string' && it.length > 2) {
  2373. it = TRIM ? it.trim() : $trim(it, 3);
  2374. var first = it.charCodeAt(0);
  2375. var third, radix, maxCode;
  2376. if (first === 43 || first === 45) {
  2377. third = it.charCodeAt(2);
  2378. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  2379. } else if (first === 48) {
  2380. switch (it.charCodeAt(1)) {
  2381. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
  2382. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
  2383. default: return +it;
  2384. }
  2385. for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
  2386. code = digits.charCodeAt(i);
  2387. // parseInt parses a string to a first unavailable symbol
  2388. // but ToNumber should return NaN if a string contains unavailable symbols
  2389. if (code < 48 || code > maxCode) return NaN;
  2390. } return parseInt(digits, radix);
  2391. }
  2392. } return +it;
  2393. };
  2394. if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  2395. $Number = function Number(value) {
  2396. var it = arguments.length < 1 ? 0 : value;
  2397. var that = this;
  2398. return that instanceof $Number
  2399. // check on 1..constructor(foo) case
  2400. && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
  2401. ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  2402. };
  2403. for (var keys = __webpack_require__("9e1e") ? gOPN(Base) : (
  2404. // ES3:
  2405. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  2406. // ES6 (in case, if modules with ES6 Number statics required before):
  2407. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  2408. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  2409. ).split(','), j = 0, key; keys.length > j; j++) {
  2410. if (has(Base, key = keys[j]) && !has($Number, key)) {
  2411. dP($Number, key, gOPD(Base, key));
  2412. }
  2413. }
  2414. $Number.prototype = proto;
  2415. proto.constructor = $Number;
  2416. __webpack_require__("2aba")(global, NUMBER, $Number);
  2417. }
  2418. /***/ }),
  2419. /***/ "c69a":
  2420. /***/ (function(module, exports, __webpack_require__) {
  2421. module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
  2422. return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
  2423. });
  2424. /***/ }),
  2425. /***/ "c946":
  2426. /***/ (function(module, exports, __webpack_require__) {
  2427. "use strict";
  2428. /**
  2429. * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
  2430. * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
  2431. */
  2432. var forEach = __webpack_require__("b770").forEach;
  2433. module.exports = function(options) {
  2434. options = options || {};
  2435. var reporter = options.reporter;
  2436. var batchProcessor = options.batchProcessor;
  2437. var getState = options.stateHandler.getState;
  2438. var hasState = options.stateHandler.hasState;
  2439. var idHandler = options.idHandler;
  2440. if (!batchProcessor) {
  2441. throw new Error("Missing required dependency: batchProcessor");
  2442. }
  2443. if (!reporter) {
  2444. throw new Error("Missing required dependency: reporter.");
  2445. }
  2446. //TODO: Could this perhaps be done at installation time?
  2447. var scrollbarSizes = getScrollbarSizes();
  2448. var styleId = "erd_scroll_detection_scrollbar_style";
  2449. var detectionContainerClass = "erd_scroll_detection_container";
  2450. function initDocument(targetDocument) {
  2451. // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
  2452. // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
  2453. injectScrollStyle(targetDocument, styleId, detectionContainerClass);
  2454. }
  2455. initDocument(window.document);
  2456. function buildCssTextString(rules) {
  2457. var seperator = options.important ? " !important; " : "; ";
  2458. return (rules.join(seperator) + seperator).trim();
  2459. }
  2460. function getScrollbarSizes() {
  2461. var width = 500;
  2462. var height = 500;
  2463. var child = document.createElement("div");
  2464. child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  2465. var container = document.createElement("div");
  2466. container.style.cssText = buildCssTextString(["position: absolute", "width: " + width + "px", "height: " + height + "px", "overflow: scroll", "visibility: none", "top: " + -width*3 + "px", "left: " + -height*3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  2467. container.appendChild(child);
  2468. document.body.insertBefore(container, document.body.firstChild);
  2469. var widthSize = width - container.clientWidth;
  2470. var heightSize = height - container.clientHeight;
  2471. document.body.removeChild(container);
  2472. return {
  2473. width: widthSize,
  2474. height: heightSize
  2475. };
  2476. }
  2477. function injectScrollStyle(targetDocument, styleId, containerClass) {
  2478. function injectStyle(style, method) {
  2479. method = method || function (element) {
  2480. targetDocument.head.appendChild(element);
  2481. };
  2482. var styleElement = targetDocument.createElement("style");
  2483. styleElement.innerHTML = style;
  2484. styleElement.id = styleId;
  2485. method(styleElement);
  2486. return styleElement;
  2487. }
  2488. if (!targetDocument.getElementById(styleId)) {
  2489. var containerAnimationClass = containerClass + "_animation";
  2490. var containerAnimationActiveClass = containerClass + "_animation_active";
  2491. var style = "/* Created by the element-resize-detector library. */\n";
  2492. style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n";
  2493. style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n";
  2494. style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
  2495. style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
  2496. injectStyle(style);
  2497. }
  2498. }
  2499. function addAnimationClass(element) {
  2500. element.className += " " + detectionContainerClass + "_animation_active";
  2501. }
  2502. function addEvent(el, name, cb) {
  2503. if (el.addEventListener) {
  2504. el.addEventListener(name, cb);
  2505. } else if(el.attachEvent) {
  2506. el.attachEvent("on" + name, cb);
  2507. } else {
  2508. return reporter.error("[scroll] Don't know how to add event listeners.");
  2509. }
  2510. }
  2511. function removeEvent(el, name, cb) {
  2512. if (el.removeEventListener) {
  2513. el.removeEventListener(name, cb);
  2514. } else if(el.detachEvent) {
  2515. el.detachEvent("on" + name, cb);
  2516. } else {
  2517. return reporter.error("[scroll] Don't know how to remove event listeners.");
  2518. }
  2519. }
  2520. function getExpandElement(element) {
  2521. return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
  2522. }
  2523. function getShrinkElement(element) {
  2524. return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
  2525. }
  2526. /**
  2527. * Adds a resize event listener to the element.
  2528. * @public
  2529. * @param {element} element The element that should have the listener added.
  2530. * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
  2531. */
  2532. function addListener(element, listener) {
  2533. var listeners = getState(element).listeners;
  2534. if (!listeners.push) {
  2535. throw new Error("Cannot add listener to an element that is not detectable.");
  2536. }
  2537. getState(element).listeners.push(listener);
  2538. }
  2539. /**
  2540. * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
  2541. * @private
  2542. * @param {object} options Optional options object.
  2543. * @param {element} element The element to make detectable
  2544. * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
  2545. */
  2546. function makeDetectable(options, element, callback) {
  2547. if (!callback) {
  2548. callback = element;
  2549. element = options;
  2550. options = null;
  2551. }
  2552. options = options || {};
  2553. function debug() {
  2554. if (options.debug) {
  2555. var args = Array.prototype.slice.call(arguments);
  2556. args.unshift(idHandler.get(element), "Scroll: ");
  2557. if (reporter.log.apply) {
  2558. reporter.log.apply(null, args);
  2559. } else {
  2560. for (var i = 0; i < args.length; i++) {
  2561. reporter.log(args[i]);
  2562. }
  2563. }
  2564. }
  2565. }
  2566. function isDetached(element) {
  2567. function isInDocument(element) {
  2568. return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
  2569. }
  2570. if (!isInDocument(element)) {
  2571. return true;
  2572. }
  2573. // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520
  2574. if (window.getComputedStyle(element) === null) {
  2575. return true;
  2576. }
  2577. return false;
  2578. }
  2579. function isUnrendered(element) {
  2580. // Check the absolute positioned container since the top level container is display: inline.
  2581. var container = getState(element).container.childNodes[0];
  2582. var style = window.getComputedStyle(container);
  2583. return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered.
  2584. }
  2585. function getStyle() {
  2586. // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
  2587. // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
  2588. var elementStyle = window.getComputedStyle(element);
  2589. var style = {};
  2590. style.position = elementStyle.position;
  2591. style.width = element.offsetWidth;
  2592. style.height = element.offsetHeight;
  2593. style.top = elementStyle.top;
  2594. style.right = elementStyle.right;
  2595. style.bottom = elementStyle.bottom;
  2596. style.left = elementStyle.left;
  2597. style.widthCSS = elementStyle.width;
  2598. style.heightCSS = elementStyle.height;
  2599. return style;
  2600. }
  2601. function storeStartSize() {
  2602. var style = getStyle();
  2603. getState(element).startSize = {
  2604. width: style.width,
  2605. height: style.height
  2606. };
  2607. debug("Element start size", getState(element).startSize);
  2608. }
  2609. function initListeners() {
  2610. getState(element).listeners = [];
  2611. }
  2612. function storeStyle() {
  2613. debug("storeStyle invoked.");
  2614. if (!getState(element)) {
  2615. debug("Aborting because element has been uninstalled");
  2616. return;
  2617. }
  2618. var style = getStyle();
  2619. getState(element).style = style;
  2620. }
  2621. function storeCurrentSize(element, width, height) {
  2622. getState(element).lastWidth = width;
  2623. getState(element).lastHeight = height;
  2624. }
  2625. function getExpandChildElement(element) {
  2626. return getExpandElement(element).childNodes[0];
  2627. }
  2628. function getWidthOffset() {
  2629. return 2 * scrollbarSizes.width + 1;
  2630. }
  2631. function getHeightOffset() {
  2632. return 2 * scrollbarSizes.height + 1;
  2633. }
  2634. function getExpandWidth(width) {
  2635. return width + 10 + getWidthOffset();
  2636. }
  2637. function getExpandHeight(height) {
  2638. return height + 10 + getHeightOffset();
  2639. }
  2640. function getShrinkWidth(width) {
  2641. return width * 2 + getWidthOffset();
  2642. }
  2643. function getShrinkHeight(height) {
  2644. return height * 2 + getHeightOffset();
  2645. }
  2646. function positionScrollbars(element, width, height) {
  2647. var expand = getExpandElement(element);
  2648. var shrink = getShrinkElement(element);
  2649. var expandWidth = getExpandWidth(width);
  2650. var expandHeight = getExpandHeight(height);
  2651. var shrinkWidth = getShrinkWidth(width);
  2652. var shrinkHeight = getShrinkHeight(height);
  2653. expand.scrollLeft = expandWidth;
  2654. expand.scrollTop = expandHeight;
  2655. shrink.scrollLeft = shrinkWidth;
  2656. shrink.scrollTop = shrinkHeight;
  2657. }
  2658. function injectContainerElement() {
  2659. var container = getState(element).container;
  2660. if (!container) {
  2661. container = document.createElement("div");
  2662. container.className = detectionContainerClass;
  2663. container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]);
  2664. getState(element).container = container;
  2665. addAnimationClass(container);
  2666. element.appendChild(container);
  2667. var onAnimationStart = function () {
  2668. getState(element).onRendered && getState(element).onRendered();
  2669. };
  2670. addEvent(container, "animationstart", onAnimationStart);
  2671. // Store the event handler here so that they may be removed when uninstall is called.
  2672. // See uninstall function for an explanation why it is needed.
  2673. getState(element).onAnimationStart = onAnimationStart;
  2674. }
  2675. return container;
  2676. }
  2677. function injectScrollElements() {
  2678. function alterPositionStyles() {
  2679. var style = getState(element).style;
  2680. if(style.position === "static") {
  2681. element.style.setProperty("position", "relative",options.important ? "important" : "");
  2682. var removeRelativeStyles = function(reporter, element, style, property) {
  2683. function getNumericalValue(value) {
  2684. return value.replace(/[^-\d\.]/g, "");
  2685. }
  2686. var value = style[property];
  2687. if(value !== "auto" && getNumericalValue(value) !== "0") {
  2688. reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
  2689. element.style[property] = 0;
  2690. }
  2691. };
  2692. //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
  2693. //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
  2694. removeRelativeStyles(reporter, element, style, "top");
  2695. removeRelativeStyles(reporter, element, style, "right");
  2696. removeRelativeStyles(reporter, element, style, "bottom");
  2697. removeRelativeStyles(reporter, element, style, "left");
  2698. }
  2699. }
  2700. function getLeftTopBottomRightCssText(left, top, bottom, right) {
  2701. left = (!left ? "0" : (left + "px"));
  2702. top = (!top ? "0" : (top + "px"));
  2703. bottom = (!bottom ? "0" : (bottom + "px"));
  2704. right = (!right ? "0" : (right + "px"));
  2705. return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom];
  2706. }
  2707. debug("Injecting elements");
  2708. if (!getState(element)) {
  2709. debug("Aborting because element has been uninstalled");
  2710. return;
  2711. }
  2712. alterPositionStyles();
  2713. var rootContainer = getState(element).container;
  2714. if (!rootContainer) {
  2715. rootContainer = injectContainerElement();
  2716. }
  2717. // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),
  2718. // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than
  2719. // the targeted element.
  2720. // When the bug is resolved, "containerContainer" may be removed.
  2721. // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).
  2722. // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
  2723. var scrollbarWidth = scrollbarSizes.width;
  2724. var scrollbarHeight = scrollbarSizes.height;
  2725. var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]);
  2726. var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));
  2727. var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
  2728. var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
  2729. var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]);
  2730. var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]);
  2731. var containerContainer = document.createElement("div");
  2732. var container = document.createElement("div");
  2733. var expand = document.createElement("div");
  2734. var expandChild = document.createElement("div");
  2735. var shrink = document.createElement("div");
  2736. var shrinkChild = document.createElement("div");
  2737. // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
  2738. // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
  2739. containerContainer.dir = "ltr";
  2740. containerContainer.style.cssText = containerContainerStyle;
  2741. containerContainer.className = detectionContainerClass;
  2742. container.className = detectionContainerClass;
  2743. container.style.cssText = containerStyle;
  2744. expand.style.cssText = expandStyle;
  2745. expandChild.style.cssText = expandChildStyle;
  2746. shrink.style.cssText = shrinkStyle;
  2747. shrinkChild.style.cssText = shrinkChildStyle;
  2748. expand.appendChild(expandChild);
  2749. shrink.appendChild(shrinkChild);
  2750. container.appendChild(expand);
  2751. container.appendChild(shrink);
  2752. containerContainer.appendChild(container);
  2753. rootContainer.appendChild(containerContainer);
  2754. function onExpandScroll() {
  2755. getState(element).onExpand && getState(element).onExpand();
  2756. }
  2757. function onShrinkScroll() {
  2758. getState(element).onShrink && getState(element).onShrink();
  2759. }
  2760. addEvent(expand, "scroll", onExpandScroll);
  2761. addEvent(shrink, "scroll", onShrinkScroll);
  2762. // Store the event handlers here so that they may be removed when uninstall is called.
  2763. // See uninstall function for an explanation why it is needed.
  2764. getState(element).onExpandScroll = onExpandScroll;
  2765. getState(element).onShrinkScroll = onShrinkScroll;
  2766. }
  2767. function registerListenersAndPositionElements() {
  2768. function updateChildSizes(element, width, height) {
  2769. var expandChild = getExpandChildElement(element);
  2770. var expandWidth = getExpandWidth(width);
  2771. var expandHeight = getExpandHeight(height);
  2772. expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : "");
  2773. expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
  2774. }
  2775. function updateDetectorElements(done) {
  2776. var width = element.offsetWidth;
  2777. var height = element.offsetHeight;
  2778. // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.
  2779. var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
  2780. debug("Storing current size", width, height);
  2781. // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
  2782. // Otherwise the if-check in handleScroll is useless.
  2783. storeCurrentSize(element, width, height);
  2784. // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
  2785. // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
  2786. batchProcessor.add(0, function performUpdateChildSizes() {
  2787. if (!sizeChanged) {
  2788. return;
  2789. }
  2790. if (!getState(element)) {
  2791. debug("Aborting because element has been uninstalled");
  2792. return;
  2793. }
  2794. if (!areElementsInjected()) {
  2795. debug("Aborting because element container has not been initialized");
  2796. return;
  2797. }
  2798. if (options.debug) {
  2799. var w = element.offsetWidth;
  2800. var h = element.offsetHeight;
  2801. if (w !== width || h !== height) {
  2802. reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
  2803. }
  2804. }
  2805. updateChildSizes(element, width, height);
  2806. });
  2807. batchProcessor.add(1, function updateScrollbars() {
  2808. // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then
  2809. // been restored to the original size, which will have changed the scrollbar positions.
  2810. if (!getState(element)) {
  2811. debug("Aborting because element has been uninstalled");
  2812. return;
  2813. }
  2814. if (!areElementsInjected()) {
  2815. debug("Aborting because element container has not been initialized");
  2816. return;
  2817. }
  2818. positionScrollbars(element, width, height);
  2819. });
  2820. if (sizeChanged && done) {
  2821. batchProcessor.add(2, function () {
  2822. if (!getState(element)) {
  2823. debug("Aborting because element has been uninstalled");
  2824. return;
  2825. }
  2826. if (!areElementsInjected()) {
  2827. debug("Aborting because element container has not been initialized");
  2828. return;
  2829. }
  2830. done();
  2831. });
  2832. }
  2833. }
  2834. function areElementsInjected() {
  2835. return !!getState(element).container;
  2836. }
  2837. function notifyListenersIfNeeded() {
  2838. function isFirstNotify() {
  2839. return getState(element).lastNotifiedWidth === undefined;
  2840. }
  2841. debug("notifyListenersIfNeeded invoked");
  2842. var state = getState(element);
  2843. // Don't notify if the current size is the start size, and this is the first notification.
  2844. if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
  2845. return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
  2846. }
  2847. // Don't notify if the size already has been notified.
  2848. if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
  2849. return debug("Not notifying: Size already notified");
  2850. }
  2851. debug("Current size not notified, notifying...");
  2852. state.lastNotifiedWidth = state.lastWidth;
  2853. state.lastNotifiedHeight = state.lastHeight;
  2854. forEach(getState(element).listeners, function (listener) {
  2855. listener(element);
  2856. });
  2857. }
  2858. function handleRender() {
  2859. debug("startanimation triggered.");
  2860. if (isUnrendered(element)) {
  2861. debug("Ignoring since element is still unrendered...");
  2862. return;
  2863. }
  2864. debug("Element rendered.");
  2865. var expand = getExpandElement(element);
  2866. var shrink = getShrinkElement(element);
  2867. if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
  2868. debug("Scrollbars out of sync. Updating detector elements...");
  2869. updateDetectorElements(notifyListenersIfNeeded);
  2870. }
  2871. }
  2872. function handleScroll() {
  2873. debug("Scroll detected.");
  2874. if (isUnrendered(element)) {
  2875. // Element is still unrendered. Skip this scroll event.
  2876. debug("Scroll event fired while unrendered. Ignoring...");
  2877. return;
  2878. }
  2879. updateDetectorElements(notifyListenersIfNeeded);
  2880. }
  2881. debug("registerListenersAndPositionElements invoked.");
  2882. if (!getState(element)) {
  2883. debug("Aborting because element has been uninstalled");
  2884. return;
  2885. }
  2886. getState(element).onRendered = handleRender;
  2887. getState(element).onExpand = handleScroll;
  2888. getState(element).onShrink = handleScroll;
  2889. var style = getState(element).style;
  2890. updateChildSizes(element, style.width, style.height);
  2891. }
  2892. function finalizeDomMutation() {
  2893. debug("finalizeDomMutation invoked.");
  2894. if (!getState(element)) {
  2895. debug("Aborting because element has been uninstalled");
  2896. return;
  2897. }
  2898. var style = getState(element).style;
  2899. storeCurrentSize(element, style.width, style.height);
  2900. positionScrollbars(element, style.width, style.height);
  2901. }
  2902. function ready() {
  2903. callback(element);
  2904. }
  2905. function install() {
  2906. debug("Installing...");
  2907. initListeners();
  2908. storeStartSize();
  2909. batchProcessor.add(0, storeStyle);
  2910. batchProcessor.add(1, injectScrollElements);
  2911. batchProcessor.add(2, registerListenersAndPositionElements);
  2912. batchProcessor.add(3, finalizeDomMutation);
  2913. batchProcessor.add(4, ready);
  2914. }
  2915. debug("Making detectable...");
  2916. if (isDetached(element)) {
  2917. debug("Element is detached");
  2918. injectContainerElement();
  2919. debug("Waiting until element is attached...");
  2920. getState(element).onRendered = function () {
  2921. debug("Element is now attached");
  2922. install();
  2923. };
  2924. } else {
  2925. install();
  2926. }
  2927. }
  2928. function uninstall(element) {
  2929. var state = getState(element);
  2930. if (!state) {
  2931. // Uninstall has been called on a non-erd element.
  2932. return;
  2933. }
  2934. // Uninstall may have been called in the following scenarios:
  2935. // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
  2936. // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).
  2937. // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
  2938. // So to be on the safe side, let's check for each thing before removing.
  2939. // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.
  2940. state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
  2941. state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
  2942. state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
  2943. state.container && element.removeChild(state.container);
  2944. }
  2945. return {
  2946. makeDetectable: makeDetectable,
  2947. addListener: addListener,
  2948. uninstall: uninstall,
  2949. initDocument: initDocument
  2950. };
  2951. };
  2952. /***/ }),
  2953. /***/ "ca5a":
  2954. /***/ (function(module, exports) {
  2955. var id = 0;
  2956. var px = Math.random();
  2957. module.exports = function (key) {
  2958. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  2959. };
  2960. /***/ }),
  2961. /***/ "cadf":
  2962. /***/ (function(module, exports, __webpack_require__) {
  2963. "use strict";
  2964. var addToUnscopables = __webpack_require__("9c6c");
  2965. var step = __webpack_require__("d53b");
  2966. var Iterators = __webpack_require__("84f2");
  2967. var toIObject = __webpack_require__("6821");
  2968. // 22.1.3.4 Array.prototype.entries()
  2969. // 22.1.3.13 Array.prototype.keys()
  2970. // 22.1.3.29 Array.prototype.values()
  2971. // 22.1.3.30 Array.prototype[@@iterator]()
  2972. module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
  2973. this._t = toIObject(iterated); // target
  2974. this._i = 0; // next index
  2975. this._k = kind; // kind
  2976. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  2977. }, function () {
  2978. var O = this._t;
  2979. var kind = this._k;
  2980. var index = this._i++;
  2981. if (!O || index >= O.length) {
  2982. this._t = undefined;
  2983. return step(1);
  2984. }
  2985. if (kind == 'keys') return step(0, index);
  2986. if (kind == 'values') return step(0, O[index]);
  2987. return step(0, [index, O[index]]);
  2988. }, 'values');
  2989. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  2990. Iterators.Arguments = Iterators.Array;
  2991. addToUnscopables('keys');
  2992. addToUnscopables('values');
  2993. addToUnscopables('entries');
  2994. /***/ }),
  2995. /***/ "cb7c":
  2996. /***/ (function(module, exports, __webpack_require__) {
  2997. var isObject = __webpack_require__("d3f4");
  2998. module.exports = function (it) {
  2999. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  3000. return it;
  3001. };
  3002. /***/ }),
  3003. /***/ "ce10":
  3004. /***/ (function(module, exports, __webpack_require__) {
  3005. var has = __webpack_require__("69a8");
  3006. var toIObject = __webpack_require__("6821");
  3007. var arrayIndexOf = __webpack_require__("c366")(false);
  3008. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  3009. module.exports = function (object, names) {
  3010. var O = toIObject(object);
  3011. var i = 0;
  3012. var result = [];
  3013. var key;
  3014. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  3015. // Don't enum bug & hidden keys
  3016. while (names.length > i) if (has(O, key = names[i++])) {
  3017. ~arrayIndexOf(result, key) || result.push(key);
  3018. }
  3019. return result;
  3020. };
  3021. /***/ }),
  3022. /***/ "d3f4":
  3023. /***/ (function(module, exports) {
  3024. module.exports = function (it) {
  3025. return typeof it === 'object' ? it !== null : typeof it === 'function';
  3026. };
  3027. /***/ }),
  3028. /***/ "d53b":
  3029. /***/ (function(module, exports) {
  3030. module.exports = function (done, value) {
  3031. return { value: value, done: !!done };
  3032. };
  3033. /***/ }),
  3034. /***/ "d6eb":
  3035. /***/ (function(module, exports, __webpack_require__) {
  3036. "use strict";
  3037. var prop = "_erd";
  3038. function initState(element) {
  3039. element[prop] = {};
  3040. return getState(element);
  3041. }
  3042. function getState(element) {
  3043. return element[prop];
  3044. }
  3045. function cleanState(element) {
  3046. delete element[prop];
  3047. }
  3048. module.exports = {
  3049. initState: initState,
  3050. getState: getState,
  3051. cleanState: cleanState
  3052. };
  3053. /***/ }),
  3054. /***/ "d8e8":
  3055. /***/ (function(module, exports) {
  3056. module.exports = function (it) {
  3057. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  3058. return it;
  3059. };
  3060. /***/ }),
  3061. /***/ "e11e":
  3062. /***/ (function(module, exports) {
  3063. // IE 8- don't enum bug keys
  3064. module.exports = (
  3065. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  3066. ).split(',');
  3067. /***/ }),
  3068. /***/ "eec4":
  3069. /***/ (function(module, exports, __webpack_require__) {
  3070. "use strict";
  3071. var forEach = __webpack_require__("b770").forEach;
  3072. var elementUtilsMaker = __webpack_require__("5be5");
  3073. var listenerHandlerMaker = __webpack_require__("49ad");
  3074. var idGeneratorMaker = __webpack_require__("2cef");
  3075. var idHandlerMaker = __webpack_require__("5058");
  3076. var reporterMaker = __webpack_require__("abb4");
  3077. var browserDetector = __webpack_require__("18e9");
  3078. var batchProcessorMaker = __webpack_require__("c274");
  3079. var stateHandler = __webpack_require__("d6eb");
  3080. //Detection strategies.
  3081. var objectStrategyMaker = __webpack_require__("18d2");
  3082. var scrollStrategyMaker = __webpack_require__("c946");
  3083. function isCollection(obj) {
  3084. return Array.isArray(obj) || obj.length !== undefined;
  3085. }
  3086. function toArray(collection) {
  3087. if (!Array.isArray(collection)) {
  3088. var array = [];
  3089. forEach(collection, function (obj) {
  3090. array.push(obj);
  3091. });
  3092. return array;
  3093. } else {
  3094. return collection;
  3095. }
  3096. }
  3097. function isElement(obj) {
  3098. return obj && obj.nodeType === 1;
  3099. }
  3100. /**
  3101. * @typedef idHandler
  3102. * @type {object}
  3103. * @property {function} get Gets the resize detector id of the element.
  3104. * @property {function} set Generate and sets the resize detector id of the element.
  3105. */
  3106. /**
  3107. * @typedef Options
  3108. * @type {object}
  3109. * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
  3110. Default is true. If true, the listener is guaranteed to be called when it has been added.
  3111. If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
  3112. * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
  3113. If not provided, a default id handler will be used.
  3114. * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
  3115. If not provided, a default id handler will be used.
  3116. If set to false, then nothing will be reported.
  3117. * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
  3118. */
  3119. /**
  3120. * Creates an element resize detector instance.
  3121. * @public
  3122. * @param {Options?} options Optional global options object that will decide how this instance will work.
  3123. */
  3124. module.exports = function(options) {
  3125. options = options || {};
  3126. //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
  3127. var idHandler;
  3128. if (options.idHandler) {
  3129. // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
  3130. // so that readonly flag always is true when it's used here. This may be removed next major version bump.
  3131. idHandler = {
  3132. get: function (element) { return options.idHandler.get(element, true); },
  3133. set: options.idHandler.set
  3134. };
  3135. } else {
  3136. var idGenerator = idGeneratorMaker();
  3137. var defaultIdHandler = idHandlerMaker({
  3138. idGenerator: idGenerator,
  3139. stateHandler: stateHandler
  3140. });
  3141. idHandler = defaultIdHandler;
  3142. }
  3143. //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
  3144. var reporter = options.reporter;
  3145. if(!reporter) {
  3146. //If options.reporter is false, then the reporter should be quiet.
  3147. var quiet = reporter === false;
  3148. reporter = reporterMaker(quiet);
  3149. }
  3150. //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
  3151. var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
  3152. //Options to be used as default for the listenTo function.
  3153. var globalOptions = {};
  3154. globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
  3155. globalOptions.debug = !!getOption(options, "debug", false);
  3156. var eventListenerHandler = listenerHandlerMaker(idHandler);
  3157. var elementUtils = elementUtilsMaker({
  3158. stateHandler: stateHandler
  3159. });
  3160. //The detection strategy to be used.
  3161. var detectionStrategy;
  3162. var desiredStrategy = getOption(options, "strategy", "object");
  3163. var importantCssRules = getOption(options, "important", false);
  3164. var strategyOptions = {
  3165. reporter: reporter,
  3166. batchProcessor: batchProcessor,
  3167. stateHandler: stateHandler,
  3168. idHandler: idHandler,
  3169. important: importantCssRules
  3170. };
  3171. if(desiredStrategy === "scroll") {
  3172. if (browserDetector.isLegacyOpera()) {
  3173. reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
  3174. desiredStrategy = "object";
  3175. } else if (browserDetector.isIE(9)) {
  3176. reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
  3177. desiredStrategy = "object";
  3178. }
  3179. }
  3180. if(desiredStrategy === "scroll") {
  3181. detectionStrategy = scrollStrategyMaker(strategyOptions);
  3182. } else if(desiredStrategy === "object") {
  3183. detectionStrategy = objectStrategyMaker(strategyOptions);
  3184. } else {
  3185. throw new Error("Invalid strategy name: " + desiredStrategy);
  3186. }
  3187. //Calls can be made to listenTo with elements that are still being installed.
  3188. //Also, same elements can occur in the elements list in the listenTo function.
  3189. //With this map, the ready callbacks can be synchronized between the calls
  3190. //so that the ready callback can always be called when an element is ready - even if
  3191. //it wasn't installed from the function itself.
  3192. var onReadyCallbacks = {};
  3193. /**
  3194. * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.
  3195. * @public
  3196. * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
  3197. * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
  3198. * @param {function} listener The callback to be executed for each resize event for each element.
  3199. */
  3200. function listenTo(options, elements, listener) {
  3201. function onResizeCallback(element) {
  3202. var listeners = eventListenerHandler.get(element);
  3203. forEach(listeners, function callListenerProxy(listener) {
  3204. listener(element);
  3205. });
  3206. }
  3207. function addListener(callOnAdd, element, listener) {
  3208. eventListenerHandler.add(element, listener);
  3209. if(callOnAdd) {
  3210. listener(element);
  3211. }
  3212. }
  3213. //Options object may be omitted.
  3214. if(!listener) {
  3215. listener = elements;
  3216. elements = options;
  3217. options = {};
  3218. }
  3219. if(!elements) {
  3220. throw new Error("At least one element required.");
  3221. }
  3222. if(!listener) {
  3223. throw new Error("Listener required.");
  3224. }
  3225. if (isElement(elements)) {
  3226. // A single element has been passed in.
  3227. elements = [elements];
  3228. } else if (isCollection(elements)) {
  3229. // Convert collection to array for plugins.
  3230. // TODO: May want to check so that all the elements in the collection are valid elements.
  3231. elements = toArray(elements);
  3232. } else {
  3233. return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
  3234. }
  3235. var elementsReady = 0;
  3236. var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
  3237. var onReadyCallback = getOption(options, "onReady", function noop() {});
  3238. var debug = getOption(options, "debug", globalOptions.debug);
  3239. forEach(elements, function attachListenerToElement(element) {
  3240. if (!stateHandler.getState(element)) {
  3241. stateHandler.initState(element);
  3242. idHandler.set(element);
  3243. }
  3244. var id = idHandler.get(element);
  3245. debug && reporter.log("Attaching listener to element", id, element);
  3246. if(!elementUtils.isDetectable(element)) {
  3247. debug && reporter.log(id, "Not detectable.");
  3248. if(elementUtils.isBusy(element)) {
  3249. debug && reporter.log(id, "System busy making it detectable");
  3250. //The element is being prepared to be detectable. Do not make it detectable.
  3251. //Just add the listener, because the element will soon be detectable.
  3252. addListener(callOnAdd, element, listener);
  3253. onReadyCallbacks[id] = onReadyCallbacks[id] || [];
  3254. onReadyCallbacks[id].push(function onReady() {
  3255. elementsReady++;
  3256. if(elementsReady === elements.length) {
  3257. onReadyCallback();
  3258. }
  3259. });
  3260. return;
  3261. }
  3262. debug && reporter.log(id, "Making detectable...");
  3263. //The element is not prepared to be detectable, so do prepare it and add a listener to it.
  3264. elementUtils.markBusy(element, true);
  3265. return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {
  3266. debug && reporter.log(id, "onElementDetectable");
  3267. if (stateHandler.getState(element)) {
  3268. elementUtils.markAsDetectable(element);
  3269. elementUtils.markBusy(element, false);
  3270. detectionStrategy.addListener(element, onResizeCallback);
  3271. addListener(callOnAdd, element, listener);
  3272. // Since the element size might have changed since the call to "listenTo", we need to check for this change,
  3273. // so that a resize event may be emitted.
  3274. // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.
  3275. // Also, check the state existance before since the element may have been uninstalled in the installation process.
  3276. var state = stateHandler.getState(element);
  3277. if (state && state.startSize) {
  3278. var width = element.offsetWidth;
  3279. var height = element.offsetHeight;
  3280. if (state.startSize.width !== width || state.startSize.height !== height) {
  3281. onResizeCallback(element);
  3282. }
  3283. }
  3284. if(onReadyCallbacks[id]) {
  3285. forEach(onReadyCallbacks[id], function(callback) {
  3286. callback();
  3287. });
  3288. }
  3289. } else {
  3290. // The element has been unisntalled before being detectable.
  3291. debug && reporter.log(id, "Element uninstalled before being detectable.");
  3292. }
  3293. delete onReadyCallbacks[id];
  3294. elementsReady++;
  3295. if(elementsReady === elements.length) {
  3296. onReadyCallback();
  3297. }
  3298. });
  3299. }
  3300. debug && reporter.log(id, "Already detecable, adding listener.");
  3301. //The element has been prepared to be detectable and is ready to be listened to.
  3302. addListener(callOnAdd, element, listener);
  3303. elementsReady++;
  3304. });
  3305. if(elementsReady === elements.length) {
  3306. onReadyCallback();
  3307. }
  3308. }
  3309. function uninstall(elements) {
  3310. if(!elements) {
  3311. return reporter.error("At least one element is required.");
  3312. }
  3313. if (isElement(elements)) {
  3314. // A single element has been passed in.
  3315. elements = [elements];
  3316. } else if (isCollection(elements)) {
  3317. // Convert collection to array for plugins.
  3318. // TODO: May want to check so that all the elements in the collection are valid elements.
  3319. elements = toArray(elements);
  3320. } else {
  3321. return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
  3322. }
  3323. forEach(elements, function (element) {
  3324. eventListenerHandler.removeAllListeners(element);
  3325. detectionStrategy.uninstall(element);
  3326. stateHandler.cleanState(element);
  3327. });
  3328. }
  3329. function initDocument(targetDocument) {
  3330. detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
  3331. }
  3332. return {
  3333. listenTo: listenTo,
  3334. removeListener: eventListenerHandler.removeListener,
  3335. removeAllListeners: eventListenerHandler.removeAllListeners,
  3336. uninstall: uninstall,
  3337. initDocument: initDocument
  3338. };
  3339. };
  3340. function getOption(options, name, defaultValue) {
  3341. var value = options[name];
  3342. if((value === undefined || value === null) && defaultValue !== undefined) {
  3343. return defaultValue;
  3344. }
  3345. return value;
  3346. }
  3347. /***/ }),
  3348. /***/ "f1ae":
  3349. /***/ (function(module, exports, __webpack_require__) {
  3350. "use strict";
  3351. var $defineProperty = __webpack_require__("86cc");
  3352. var createDesc = __webpack_require__("4630");
  3353. module.exports = function (object, index, value) {
  3354. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  3355. else object[index] = value;
  3356. };
  3357. /***/ }),
  3358. /***/ "f751":
  3359. /***/ (function(module, exports, __webpack_require__) {
  3360. // 19.1.3.1 Object.assign(target, source)
  3361. var $export = __webpack_require__("5ca1");
  3362. $export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
  3363. /***/ }),
  3364. /***/ "fa5b":
  3365. /***/ (function(module, exports, __webpack_require__) {
  3366. module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString);
  3367. /***/ }),
  3368. /***/ "fab2":
  3369. /***/ (function(module, exports, __webpack_require__) {
  3370. var document = __webpack_require__("7726").document;
  3371. module.exports = document && document.documentElement;
  3372. /***/ }),
  3373. /***/ "fb15":
  3374. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3375. "use strict";
  3376. // ESM COMPAT FLAG
  3377. __webpack_require__.r(__webpack_exports__);
  3378. // EXPORTS
  3379. __webpack_require__.d(__webpack_exports__, "GridLayout", function() { return /* reexport */ GridLayout; });
  3380. __webpack_require__.d(__webpack_exports__, "GridItem", function() { return /* reexport */ GridItem; });
  3381. // NAMESPACE OBJECT: ./node_modules/@interactjs/snappers/all.js
  3382. var all_namespaceObject = {};
  3383. __webpack_require__.r(all_namespaceObject);
  3384. __webpack_require__.d(all_namespaceObject, "edgeTarget", function() { return edgeTarget; });
  3385. __webpack_require__.d(all_namespaceObject, "elements", function() { return snappers_elements; });
  3386. __webpack_require__.d(all_namespaceObject, "grid", function() { return grid; });
  3387. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  3388. // This file is imported into lib/wc client bundles.
  3389. if (typeof window !== 'undefined') {
  3390. var currentScript = window.document.currentScript
  3391. if (true) {
  3392. var getCurrentScript = __webpack_require__("8875")
  3393. currentScript = getCurrentScript()
  3394. // for backward compatibility, because previously we directly included the polyfill
  3395. if (!('currentScript' in document)) {
  3396. Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
  3397. }
  3398. }
  3399. var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  3400. if (src) {
  3401. __webpack_require__.p = src[1] // eslint-disable-line
  3402. }
  3403. }
  3404. // Indicate to webpack that this file can be concatenated
  3405. /* harmony default export */ var setPublicPath = (null);
  3406. // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
  3407. var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
  3408. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/GridItem.vue?vue&type=template&id=46ff2fc8
  3409. function render(_ctx, _cache, $props, $setup, $data, $options) {
  3410. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
  3411. ref: "item",
  3412. class: ["vue-grid-item", $options.classObj],
  3413. style: _ctx.style
  3414. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default"), $options.resizableAndNotStatic ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", {
  3415. key: 0,
  3416. ref: "handle",
  3417. class: $options.resizableHandleClass
  3418. }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 6);
  3419. }
  3420. // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=template&id=46ff2fc8
  3421. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
  3422. var es6_regexp_replace = __webpack_require__("a481");
  3423. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.match.js
  3424. var es6_regexp_match = __webpack_require__("4917");
  3425. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js
  3426. var es6_number_constructor = __webpack_require__("c5f6");
  3427. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
  3428. var es6_array_iterator = __webpack_require__("cadf");
  3429. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
  3430. var es6_object_keys = __webpack_require__("456d");
  3431. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
  3432. var web_dom_iterable = __webpack_require__("ac6a");
  3433. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.sort.js
  3434. var es6_array_sort = __webpack_require__("55dd");
  3435. // CONCATENATED MODULE: ./src/helpers/utils.js
  3436. // @flow
  3437. /*:: export type LayoutItemRequired = {w: number, h: number, x: number, y: number, i: string};*/
  3438. /*:: export type LayoutItem = LayoutItemRequired &
  3439. {minW?: number, minH?: number, maxW?: number, maxH?: number,
  3440. moved?: boolean, static?: boolean,
  3441. isDraggable?: ?boolean, isResizable?: ?boolean};*/
  3442. // export type Position = {left: number, top: number, width: number, height: number};
  3443. /*
  3444. export type DragCallbackData = {
  3445. node: HTMLElement,
  3446. x: number, y: number,
  3447. deltaX: number, deltaY: number,
  3448. lastX: number, lastY: number
  3449. };
  3450. */
  3451. // export type DragEvent = {e: Event} & DragCallbackData;
  3452. /*:: export type Layout = Array<LayoutItem>;*/
  3453. // export type ResizeEvent = {e: Event, node: HTMLElement, size: Size};
  3454. // const isProduction = process.env.NODE_ENV === 'production';
  3455. /**
  3456. * Return the bottom coordinate of the layout.
  3457. *
  3458. * @param {Array} layout Layout array.
  3459. * @return {Number} Bottom coordinate.
  3460. */
  3461. /*:: export type Size = {width: number, height: number};*/
  3462. function bottom(layout
  3463. /*: Layout*/
  3464. )
  3465. /*: number*/
  3466. {
  3467. var max = 0,
  3468. bottomY;
  3469. for (var i = 0, len = layout.length; i < len; i++) {
  3470. bottomY = layout[i].y + layout[i].h;
  3471. if (bottomY > max) max = bottomY;
  3472. }
  3473. return max;
  3474. }
  3475. function cloneLayout(layout
  3476. /*: Layout*/
  3477. )
  3478. /*: Layout*/
  3479. {
  3480. var newLayout = Array(layout.length);
  3481. for (var i = 0, len = layout.length; i < len; i++) {
  3482. newLayout[i] = cloneLayoutItem(layout[i]);
  3483. }
  3484. return newLayout;
  3485. } // Fast path to cloning, since this is monomorphic
  3486. function cloneLayoutItem(layoutItem
  3487. /*: LayoutItem*/
  3488. )
  3489. /*: LayoutItem*/
  3490. {
  3491. /*return {
  3492. w: layoutItem.w, h: layoutItem.h, x: layoutItem.x, y: layoutItem.y, i: layoutItem.i,
  3493. minW: layoutItem.minW, maxW: layoutItem.maxW, minH: layoutItem.minH, maxH: layoutItem.maxH,
  3494. moved: Boolean(layoutItem.moved), static: Boolean(layoutItem.static),
  3495. // These can be null
  3496. isDraggable: layoutItem.isDraggable, isResizable: layoutItem.isResizable
  3497. };*/
  3498. return JSON.parse(JSON.stringify(layoutItem));
  3499. }
  3500. /**
  3501. * Given two layoutitems, check if they collide.
  3502. *
  3503. * @return {Boolean} True if colliding.
  3504. */
  3505. function collides(l1
  3506. /*: LayoutItem*/
  3507. , l2
  3508. /*: LayoutItem*/
  3509. )
  3510. /*: boolean*/
  3511. {
  3512. if (l1 === l2) return false; // same element
  3513. if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2
  3514. if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2
  3515. if (l1.y + l1.h <= l2.y) return false; // l1 is above l2
  3516. if (l1.y >= l2.y + l2.h) return false; // l1 is below l2
  3517. return true; // boxes overlap
  3518. }
  3519. /**
  3520. * Given a layout, compact it. This involves going down each y coordinate and removing gaps
  3521. * between items.
  3522. *
  3523. * @param {Array} layout Layout.
  3524. * @param {Boolean} verticalCompact Whether or not to compact the layout
  3525. * vertically.
  3526. * @return {Array} Compacted Layout.
  3527. */
  3528. function compact(layout
  3529. /*: Layout*/
  3530. , verticalCompact
  3531. /*: Boolean*/
  3532. )
  3533. /*: Layout*/
  3534. {
  3535. // Statics go in the compareWith array right away so items flow around them.
  3536. var compareWith = getStatics(layout); // We go through the items by row and column.
  3537. var sorted = sortLayoutItemsByRowCol(layout); // Holding for new items.
  3538. var out = Array(layout.length);
  3539. for (var i = 0, len = sorted.length; i < len; i++) {
  3540. var l = sorted[i]; // Don't move static elements
  3541. if (!l.static) {
  3542. l = compactItem(compareWith, l, verticalCompact); // Add to comparison array. We only collide with items before this one.
  3543. // Statics are already in this array.
  3544. compareWith.push(l);
  3545. } // Add to output array to make sure they still come out in the right order.
  3546. out[layout.indexOf(l)] = l; // Clear moved flag, if it exists.
  3547. l.moved = false;
  3548. }
  3549. return out;
  3550. }
  3551. /**
  3552. * Compact an item in the layout.
  3553. */
  3554. function compactItem(compareWith
  3555. /*: Layout*/
  3556. , l
  3557. /*: LayoutItem*/
  3558. , verticalCompact
  3559. /*: boolean*/
  3560. )
  3561. /*: LayoutItem*/
  3562. {
  3563. if (verticalCompact) {
  3564. // Move the element up as far as it can go without colliding.
  3565. while (l.y > 0 && !getFirstCollision(compareWith, l)) {
  3566. l.y--;
  3567. }
  3568. } // Move it down, and keep moving it down if it's colliding.
  3569. var collides;
  3570. while (collides = getFirstCollision(compareWith, l)) {
  3571. l.y = collides.y + collides.h;
  3572. }
  3573. return l;
  3574. }
  3575. /**
  3576. * Given a layout, make sure all elements fit within its bounds.
  3577. *
  3578. * @param {Array} layout Layout array.
  3579. * @param {Number} bounds Number of columns.
  3580. */
  3581. function correctBounds(layout
  3582. /*: Layout*/
  3583. , bounds
  3584. /*: {cols: number}*/
  3585. )
  3586. /*: Layout*/
  3587. {
  3588. var collidesWith = getStatics(layout);
  3589. for (var i = 0, len = layout.length; i < len; i++) {
  3590. var l = layout[i]; // Overflows right
  3591. if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left
  3592. if (l.x < 0) {
  3593. l.x = 0;
  3594. l.w = bounds.cols;
  3595. }
  3596. if (!l.static) collidesWith.push(l);else {
  3597. // If this is static and collides with other statics, we must move it down.
  3598. // We have to do something nicer than just letting them overlap.
  3599. while (getFirstCollision(collidesWith, l)) {
  3600. l.y++;
  3601. }
  3602. }
  3603. }
  3604. return layout;
  3605. }
  3606. /**
  3607. * Get a layout item by ID. Used so we can override later on if necessary.
  3608. *
  3609. * @param {Array} layout Layout array.
  3610. * @param {String} id ID
  3611. * @return {LayoutItem} Item at ID.
  3612. */
  3613. function getLayoutItem(layout
  3614. /*: Layout*/
  3615. , id
  3616. /*: string*/
  3617. )
  3618. /*: ?LayoutItem*/
  3619. {
  3620. for (var i = 0, len = layout.length; i < len; i++) {
  3621. if (layout[i].i === id) return layout[i];
  3622. }
  3623. }
  3624. /**
  3625. * Returns the first item this layout collides with.
  3626. * It doesn't appear to matter which order we approach this from, although
  3627. * perhaps that is the wrong thing to do.
  3628. *
  3629. * @param {Object} layoutItem Layout item.
  3630. * @return {Object|undefined} A colliding layout item, or undefined.
  3631. */
  3632. function getFirstCollision(layout
  3633. /*: Layout*/
  3634. , layoutItem
  3635. /*: LayoutItem*/
  3636. )
  3637. /*: ?LayoutItem*/
  3638. {
  3639. for (var i = 0, len = layout.length; i < len; i++) {
  3640. if (collides(layout[i], layoutItem)) return layout[i];
  3641. }
  3642. }
  3643. function getAllCollisions(layout
  3644. /*: Layout*/
  3645. , layoutItem
  3646. /*: LayoutItem*/
  3647. )
  3648. /*: Array<LayoutItem>*/
  3649. {
  3650. return layout.filter(function (l) {
  3651. return collides(l, layoutItem);
  3652. });
  3653. }
  3654. /**
  3655. * Get all static elements.
  3656. * @param {Array} layout Array of layout objects.
  3657. * @return {Array} Array of static layout items..
  3658. */
  3659. function getStatics(layout
  3660. /*: Layout*/
  3661. )
  3662. /*: Array<LayoutItem>*/
  3663. {
  3664. //return [];
  3665. return layout.filter(function (l) {
  3666. return l.static;
  3667. });
  3668. }
  3669. /**
  3670. * Move an element. Responsible for doing cascading movements of other elements.
  3671. *
  3672. * @param {Array} layout Full layout to modify.
  3673. * @param {LayoutItem} l element to move.
  3674. * @param {Number} [x] X position in grid units.
  3675. * @param {Number} [y] Y position in grid units.
  3676. * @param {Boolean} [isUserAction] If true, designates that the item we're moving is
  3677. * being dragged/resized by th euser.
  3678. */
  3679. function moveElement(layout
  3680. /*: Layout*/
  3681. , l
  3682. /*: LayoutItem*/
  3683. , x
  3684. /*: Number*/
  3685. , y
  3686. /*: Number*/
  3687. , isUserAction
  3688. /*: Boolean*/
  3689. , preventCollision
  3690. /*: Boolean*/
  3691. )
  3692. /*: Layout*/
  3693. {
  3694. if (l.static) return layout; // Short-circuit if nothing to do.
  3695. //if (l.y === y && l.x === x) return layout;
  3696. var oldX = l.x;
  3697. var oldY = l.y;
  3698. var movingUp = y && l.y > y; // This is quite a bit faster than extending the object
  3699. if (typeof x === 'number') l.x = x;
  3700. if (typeof y === 'number') l.y = y;
  3701. l.moved = true; // If this collides with anything, move it.
  3702. // When doing this comparison, we have to sort the items we compare with
  3703. // to ensure, in the case of multiple collisions, that we're getting the
  3704. // nearest collision.
  3705. var sorted = sortLayoutItemsByRowCol(layout);
  3706. if (movingUp) sorted = sorted.reverse();
  3707. var collisions = getAllCollisions(sorted, l);
  3708. if (preventCollision && collisions.length) {
  3709. l.x = oldX;
  3710. l.y = oldY;
  3711. l.moved = false;
  3712. return layout;
  3713. } // Move each item that collides away from this element.
  3714. for (var i = 0, len = collisions.length; i < len; i++) {
  3715. var collision = collisions[i]; // console.log('resolving collision between', l.i, 'at', l.y, 'and', collision.i, 'at', collision.y);
  3716. // Short circuit so we can't infinite loop
  3717. if (collision.moved) continue; // This makes it feel a bit more precise by waiting to swap for just a bit when moving up.
  3718. if (l.y > collision.y && l.y - collision.y > collision.h / 4) continue; // Don't move static items - we have to move *this* element away
  3719. if (collision.static) {
  3720. layout = moveElementAwayFromCollision(layout, collision, l, isUserAction);
  3721. } else {
  3722. layout = moveElementAwayFromCollision(layout, l, collision, isUserAction);
  3723. }
  3724. }
  3725. return layout;
  3726. }
  3727. /**
  3728. * This is where the magic needs to happen - given a collision, move an element away from the collision.
  3729. * We attempt to move it up if there's room, otherwise it goes below.
  3730. *
  3731. * @param {Array} layout Full layout to modify.
  3732. * @param {LayoutItem} collidesWith Layout item we're colliding with.
  3733. * @param {LayoutItem} itemToMove Layout item we're moving.
  3734. * @param {Boolean} [isUserAction] If true, designates that the item we're moving is being dragged/resized
  3735. * by the user.
  3736. */
  3737. function moveElementAwayFromCollision(layout
  3738. /*: Layout*/
  3739. , collidesWith
  3740. /*: LayoutItem*/
  3741. , itemToMove
  3742. /*: LayoutItem*/
  3743. , isUserAction
  3744. /*: ?boolean*/
  3745. )
  3746. /*: Layout*/
  3747. {
  3748. var preventCollision = false; // we're already colliding
  3749. // If there is enough space above the collision to put this element, move it there.
  3750. // We only do this on the main collision as this can get funky in cascades and cause
  3751. // unwanted swapping behavior.
  3752. if (isUserAction) {
  3753. // Make a mock item so we don't modify the item here, only modify in moveElement.
  3754. var fakeItem
  3755. /*: LayoutItem*/
  3756. = {
  3757. x: itemToMove.x,
  3758. y: itemToMove.y,
  3759. w: itemToMove.w,
  3760. h: itemToMove.h,
  3761. i: '-1'
  3762. };
  3763. fakeItem.y = Math.max(collidesWith.y - itemToMove.h, 0);
  3764. if (!getFirstCollision(layout, fakeItem)) {
  3765. return moveElement(layout, itemToMove, undefined, fakeItem.y, preventCollision);
  3766. }
  3767. } // Previously this was optimized to move below the collision directly, but this can cause problems
  3768. // with cascading moves, as an item may actually leapflog a collision and cause a reversal in order.
  3769. return moveElement(layout, itemToMove, undefined, itemToMove.y + 1, preventCollision);
  3770. }
  3771. /**
  3772. * Helper to convert a number to a percentage string.
  3773. *
  3774. * @param {Number} num Any number
  3775. * @return {String} That number as a percentage.
  3776. */
  3777. function perc(num
  3778. /*: number*/
  3779. )
  3780. /*: string*/
  3781. {
  3782. return num * 100 + '%';
  3783. }
  3784. function setTransform(top, left, width, height)
  3785. /*: Object*/
  3786. {
  3787. // Replace unitless items with px
  3788. var translate = "translate3d(" + left + "px," + top + "px, 0)";
  3789. return {
  3790. transform: translate,
  3791. WebkitTransform: translate,
  3792. MozTransform: translate,
  3793. msTransform: translate,
  3794. OTransform: translate,
  3795. width: width + "px",
  3796. height: height + "px",
  3797. position: 'absolute'
  3798. };
  3799. }
  3800. /**
  3801. * Just like the setTransform method, but instead it will return a negative value of right.
  3802. *
  3803. * @param top
  3804. * @param right
  3805. * @param width
  3806. * @param height
  3807. * @returns {{transform: string, WebkitTransform: string, MozTransform: string, msTransform: string, OTransform: string, width: string, height: string, position: string}}
  3808. */
  3809. function setTransformRtl(top, right, width, height)
  3810. /*: Object*/
  3811. {
  3812. // Replace unitless items with px
  3813. var translate = "translate3d(" + right * -1 + "px," + top + "px, 0)";
  3814. return {
  3815. transform: translate,
  3816. WebkitTransform: translate,
  3817. MozTransform: translate,
  3818. msTransform: translate,
  3819. OTransform: translate,
  3820. width: width + "px",
  3821. height: height + "px",
  3822. position: 'absolute'
  3823. };
  3824. }
  3825. function setTopLeft(top, left, width, height)
  3826. /*: Object*/
  3827. {
  3828. return {
  3829. top: top + "px",
  3830. left: left + "px",
  3831. width: width + "px",
  3832. height: height + "px",
  3833. position: 'absolute'
  3834. };
  3835. }
  3836. /**
  3837. * Just like the setTopLeft method, but instead, it will return a right property instead of left.
  3838. *
  3839. * @param top
  3840. * @param right
  3841. * @param width
  3842. * @param height
  3843. * @returns {{top: string, right: string, width: string, height: string, position: string}}
  3844. */
  3845. function setTopRight(top, right, width, height)
  3846. /*: Object*/
  3847. {
  3848. return {
  3849. top: top + "px",
  3850. right: right + "px",
  3851. width: width + "px",
  3852. height: height + "px",
  3853. position: 'absolute'
  3854. };
  3855. }
  3856. /**
  3857. * Get layout items sorted from top left to right and down.
  3858. *
  3859. * @return {Array} Array of layout objects.
  3860. * @return {Array} Layout, sorted static items first.
  3861. */
  3862. function sortLayoutItemsByRowCol(layout
  3863. /*: Layout*/
  3864. )
  3865. /*: Layout*/
  3866. {
  3867. return [].concat(layout).sort(function (a, b) {
  3868. if (a.y === b.y && a.x === b.x) {
  3869. return 0;
  3870. }
  3871. if (a.y > b.y || a.y === b.y && a.x > b.x) {
  3872. return 1;
  3873. }
  3874. return -1;
  3875. });
  3876. }
  3877. /**
  3878. * Generate a layout using the initialLayout and children as a template.
  3879. * Missing entries will be added, extraneous ones will be truncated.
  3880. *
  3881. * @param {Array} initialLayout Layout passed in through props.
  3882. * @param {String} breakpoint Current responsive breakpoint.
  3883. * @param {Boolean} verticalCompact Whether or not to compact the layout vertically.
  3884. * @return {Array} Working layout.
  3885. */
  3886. /*
  3887. export function synchronizeLayoutWithChildren(initialLayout: Layout, children: Array<React.Element>|React.Element,
  3888. cols: number, verticalCompact: boolean): Layout {
  3889. // ensure 'children' is always an array
  3890. if (!Array.isArray(children)) {
  3891. children = [children];
  3892. }
  3893. initialLayout = initialLayout || [];
  3894. // Generate one layout item per child.
  3895. let layout: Layout = [];
  3896. for (let i = 0, len = children.length; i < len; i++) {
  3897. let newItem;
  3898. const child = children[i];
  3899. // Don't overwrite if it already exists.
  3900. const exists = getLayoutItem(initialLayout, child.key || "1" /!* FIXME satisfies Flow *!/);
  3901. if (exists) {
  3902. newItem = exists;
  3903. } else {
  3904. const g = child.props._grid;
  3905. // Hey, this item has a _grid property, use it.
  3906. if (g) {
  3907. if (!isProduction) {
  3908. validateLayout([g], 'ReactGridLayout.children');
  3909. }
  3910. // Validated; add it to the layout. Bottom 'y' possible is the bottom of the layout.
  3911. // This allows you to do nice stuff like specify {y: Infinity}
  3912. if (verticalCompact) {
  3913. newItem = cloneLayoutItem({...g, y: Math.min(bottom(layout), g.y), i: child.key});
  3914. } else {
  3915. newItem = cloneLayoutItem({...g, y: g.y, i: child.key});
  3916. }
  3917. }
  3918. // Nothing provided: ensure this is added to the bottom
  3919. else {
  3920. newItem = cloneLayoutItem({w: 1, h: 1, x: 0, y: bottom(layout), i: child.key || "1"});
  3921. }
  3922. }
  3923. layout[i] = newItem;
  3924. }
  3925. // Correct the layout.
  3926. layout = correctBounds(layout, {cols: cols});
  3927. layout = compact(layout, verticalCompact);
  3928. return layout;
  3929. }
  3930. */
  3931. /**
  3932. * Validate a layout. Throws errors.
  3933. *
  3934. * @param {Array} layout Array of layout items.
  3935. * @param {String} [contextName] Context name for errors.
  3936. * @throw {Error} Validation error.
  3937. */
  3938. function validateLayout(layout
  3939. /*: Layout*/
  3940. , contextName
  3941. /*: string*/
  3942. )
  3943. /*: void*/
  3944. {
  3945. contextName = contextName || "Layout";
  3946. var subProps = ['x', 'y', 'w', 'h'];
  3947. var keyArr = [];
  3948. if (!Array.isArray(layout)) throw new Error(contextName + " must be an array!");
  3949. for (var i = 0, len = layout.length; i < len; i++) {
  3950. var item = layout[i];
  3951. for (var j = 0; j < subProps.length; j++) {
  3952. if (typeof item[subProps[j]] !== 'number') {
  3953. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].' + subProps[j] + ' must be a number!');
  3954. }
  3955. }
  3956. if (item.i === undefined || item.i === null) {
  3957. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i cannot be null!');
  3958. }
  3959. if (typeof item.i !== 'number' && typeof item.i !== 'string') {
  3960. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be a string or number!');
  3961. }
  3962. if (keyArr.indexOf(item.i) >= 0) {
  3963. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be unique!');
  3964. }
  3965. keyArr.push(item.i);
  3966. if (item.static !== undefined && typeof item.static !== 'boolean') {
  3967. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].static must be a boolean!');
  3968. }
  3969. }
  3970. } // Flow can't really figure this out, so we just use Object
  3971. function autoBindHandlers(el
  3972. /*: Object*/
  3973. , fns
  3974. /*: Array<string>*/
  3975. )
  3976. /*: void*/
  3977. {
  3978. fns.forEach(function (key) {
  3979. return el[key] = el[key].bind(el);
  3980. });
  3981. }
  3982. /**
  3983. * Convert a JS object to CSS string. Similar to React's output of CSS.
  3984. * @param obj
  3985. * @returns {string}
  3986. */
  3987. function createMarkup(obj) {
  3988. var keys = Object.keys(obj);
  3989. if (!keys.length) return '';
  3990. var i,
  3991. len = keys.length;
  3992. var result = '';
  3993. for (i = 0; i < len; i++) {
  3994. var key = keys[i];
  3995. var val = obj[key];
  3996. result += hyphenate(key) + ':' + addPx(key, val) + ';';
  3997. }
  3998. return result;
  3999. }
  4000. /* The following list is defined in React's core */
  4001. var IS_UNITLESS = {
  4002. animationIterationCount: true,
  4003. boxFlex: true,
  4004. boxFlexGroup: true,
  4005. boxOrdinalGroup: true,
  4006. columnCount: true,
  4007. flex: true,
  4008. flexGrow: true,
  4009. flexPositive: true,
  4010. flexShrink: true,
  4011. flexNegative: true,
  4012. flexOrder: true,
  4013. gridRow: true,
  4014. gridColumn: true,
  4015. fontWeight: true,
  4016. lineClamp: true,
  4017. lineHeight: true,
  4018. opacity: true,
  4019. order: true,
  4020. orphans: true,
  4021. tabSize: true,
  4022. widows: true,
  4023. zIndex: true,
  4024. zoom: true,
  4025. // SVG-related properties
  4026. fillOpacity: true,
  4027. stopOpacity: true,
  4028. strokeDashoffset: true,
  4029. strokeOpacity: true,
  4030. strokeWidth: true
  4031. };
  4032. /**
  4033. * Will add px to the end of style values which are Numbers.
  4034. * @param name
  4035. * @param value
  4036. * @returns {*}
  4037. */
  4038. function addPx(name, value) {
  4039. if (typeof value === 'number' && !IS_UNITLESS[name]) {
  4040. return value + 'px';
  4041. } else {
  4042. return value;
  4043. }
  4044. }
  4045. /**
  4046. * Hyphenate a camelCase string.
  4047. *
  4048. * @param {String} str
  4049. * @return {String}
  4050. */
  4051. var hyphenateRE = /([a-z\d])([A-Z])/g;
  4052. function hyphenate(str) {
  4053. return str.replace(hyphenateRE, '$1-$2').toLowerCase();
  4054. }
  4055. function findItemInArray(array, property, value) {
  4056. for (var i = 0; i < array.length; i++) {
  4057. if (array[i][property] == value) return true;
  4058. }
  4059. return false;
  4060. }
  4061. function findAndRemove(array, property, value) {
  4062. array.forEach(function (result, index) {
  4063. if (result[property] === value) {
  4064. //Remove from array
  4065. array.splice(index, 1);
  4066. }
  4067. });
  4068. }
  4069. // CONCATENATED MODULE: ./src/helpers/draggableUtils.js
  4070. // Get {x, y} positions from event.
  4071. function getControlPosition(e) {
  4072. return offsetXYFromParentOf(e);
  4073. } // Get from offsetParent
  4074. function offsetXYFromParentOf(evt) {
  4075. var offsetParent = evt.target.offsetParent || document.body;
  4076. var offsetParentRect = evt.offsetParent === document.body ? {
  4077. left: 0,
  4078. top: 0
  4079. } : offsetParent.getBoundingClientRect();
  4080. var x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;
  4081. var y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;
  4082. /*const x = Math.round(evt.clientX + offsetParent.scrollLeft - offsetParentRect.left);
  4083. const y = Math.round(evt.clientY + offsetParent.scrollTop - offsetParentRect.top);*/
  4084. return {
  4085. x: x,
  4086. y: y
  4087. };
  4088. } // Create an data object exposed by <DraggableCore>'s events
  4089. function createCoreData(lastX, lastY, x, y) {
  4090. // State changes are often (but not always!) async. We want the latest value.
  4091. var isStart = !isNum(lastX);
  4092. if (isStart) {
  4093. // If this is our first move, use the x and y as last coords.
  4094. return {
  4095. deltaX: 0,
  4096. deltaY: 0,
  4097. lastX: x,
  4098. lastY: y,
  4099. x: x,
  4100. y: y
  4101. };
  4102. } else {
  4103. // Otherwise calculate proper values.
  4104. return {
  4105. deltaX: x - lastX,
  4106. deltaY: y - lastY,
  4107. lastX: lastX,
  4108. lastY: lastY,
  4109. x: x,
  4110. y: y
  4111. };
  4112. }
  4113. }
  4114. function isNum(num) {
  4115. return typeof num === 'number' && !isNaN(num);
  4116. }
  4117. // CONCATENATED MODULE: ./src/helpers/responsiveUtils.js
  4118. // @flow
  4119. /*:: import type {Layout} from './utils';*/
  4120. /*:: export type ResponsiveLayout = {lg?: Layout, md?: Layout, sm?: Layout, xs?: Layout, xxs?: Layout};*/
  4121. /*:: type Breakpoint = string;*/
  4122. /**
  4123. * Given a width, find the highest breakpoint that matches is valid for it (width > breakpoint).
  4124. *
  4125. * @param {Object} breakpoints Breakpoints object (e.g. {lg: 1200, md: 960, ...})
  4126. * @param {Number} width Screen width.
  4127. * @return {String} Highest breakpoint that is less than width.
  4128. */
  4129. /*:: type Breakpoints = {lg?: number, md?: number, sm?: number, xs?: number, xxs?: number};*/
  4130. function getBreakpointFromWidth(breakpoints
  4131. /*: Breakpoints*/
  4132. , width
  4133. /*: number*/
  4134. )
  4135. /*: Breakpoint*/
  4136. {
  4137. var sorted = sortBreakpoints(breakpoints);
  4138. var matching = sorted[0];
  4139. for (var i = 1, len = sorted.length; i < len; i++) {
  4140. var breakpointName = sorted[i];
  4141. if (width > breakpoints[breakpointName]) matching = breakpointName;
  4142. }
  4143. return matching;
  4144. }
  4145. /**
  4146. * Given a breakpoint, get the # of cols set for it.
  4147. * @param {String} breakpoint Breakpoint name.
  4148. * @param {Object} cols Map of breakpoints to cols.
  4149. * @return {Number} Number of cols.
  4150. */
  4151. function getColsFromBreakpoint(breakpoint
  4152. /*: Breakpoint*/
  4153. , cols
  4154. /*: Breakpoints*/
  4155. )
  4156. /*: number*/
  4157. {
  4158. if (!cols[breakpoint]) {
  4159. throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint " + breakpoint + " is missing!");
  4160. }
  4161. return cols[breakpoint];
  4162. }
  4163. /**
  4164. * Given existing layouts and a new breakpoint, find or generate a new layout.
  4165. *
  4166. * This finds the layout above the new one and generates from it, if it exists.
  4167. *
  4168. * @param {Array} orgLayout Original layout.
  4169. * @param {Object} layouts Existing layouts.
  4170. * @param {Array} breakpoints All breakpoints.
  4171. * @param {String} breakpoint New breakpoint.
  4172. * @param {String} breakpoint Last breakpoint (for fallback).
  4173. * @param {Number} cols Column count at new breakpoint.
  4174. * @param {Boolean} verticalCompact Whether or not to compact the layout
  4175. * vertically.
  4176. * @return {Array} New layout.
  4177. */
  4178. function findOrGenerateResponsiveLayout(orgLayout
  4179. /*: Layout*/
  4180. , layouts
  4181. /*: ResponsiveLayout*/
  4182. , breakpoints
  4183. /*: Breakpoints*/
  4184. , breakpoint
  4185. /*: Breakpoint*/
  4186. , lastBreakpoint
  4187. /*: Breakpoint*/
  4188. , cols
  4189. /*: number*/
  4190. , verticalCompact
  4191. /*: boolean*/
  4192. )
  4193. /*: Layout*/
  4194. {
  4195. // If it already exists, just return it.
  4196. if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]); // Find or generate the next layout
  4197. var layout = orgLayout;
  4198. var breakpointsSorted = sortBreakpoints(breakpoints);
  4199. var breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
  4200. for (var i = 0, len = breakpointsAbove.length; i < len; i++) {
  4201. var b = breakpointsAbove[i];
  4202. if (layouts[b]) {
  4203. layout = layouts[b];
  4204. break;
  4205. }
  4206. }
  4207. layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
  4208. return compact(correctBounds(layout, {
  4209. cols: cols
  4210. }), verticalCompact);
  4211. }
  4212. function generateResponsiveLayout(layout
  4213. /*: Layout*/
  4214. , breakpoints
  4215. /*: Breakpoints*/
  4216. , breakpoint
  4217. /*: Breakpoint*/
  4218. , lastBreakpoint
  4219. /*: Breakpoint*/
  4220. , cols
  4221. /*: number*/
  4222. , verticalCompact
  4223. /*: boolean*/
  4224. )
  4225. /*: Layout*/
  4226. {
  4227. // If it already exists, just return it.
  4228. /*if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]);
  4229. // Find or generate the next layout
  4230. let layout = layouts[lastBreakpoint];*/
  4231. /*const breakpointsSorted = sortBreakpoints(breakpoints);
  4232. const breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
  4233. for (let i = 0, len = breakpointsAbove.length; i < len; i++) {
  4234. const b = breakpointsAbove[i];
  4235. if (layouts[b]) {
  4236. layout = layouts[b];
  4237. break;
  4238. }
  4239. }*/
  4240. layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
  4241. return compact(correctBounds(layout, {
  4242. cols: cols
  4243. }), verticalCompact);
  4244. }
  4245. /**
  4246. * Given breakpoints, return an array of breakpoints sorted by width. This is usually
  4247. * e.g. ['xxs', 'xs', 'sm', ...]
  4248. *
  4249. * @param {Object} breakpoints Key/value pair of breakpoint names to widths.
  4250. * @return {Array} Sorted breakpoints.
  4251. */
  4252. function sortBreakpoints(breakpoints
  4253. /*: Breakpoints*/
  4254. )
  4255. /*: Array<Breakpoint>*/
  4256. {
  4257. var keys
  4258. /*: Array<string>*/
  4259. = Object.keys(breakpoints);
  4260. return keys.sort(function (a, b) {
  4261. return breakpoints[a] - breakpoints[b];
  4262. });
  4263. }
  4264. // CONCATENATED MODULE: ./src/helpers/DOM.js
  4265. var currentDir
  4266. /*: "ltr" | "rtl" | "auto"*/
  4267. = "auto"; // let currentDir = "auto";
  4268. function hasDocument() {
  4269. return typeof document !== "undefined";
  4270. }
  4271. function hasWindow() {
  4272. return typeof window !== "undefined";
  4273. }
  4274. function getDocumentDir() {
  4275. if (!hasDocument()) {
  4276. return currentDir;
  4277. }
  4278. var direction = typeof document.dir !== "undefined" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir");
  4279. return direction;
  4280. }
  4281. function setDocumentDir(dir
  4282. /*: "ltr" | "rtl" | "auto"*/
  4283. ) {
  4284. // export function setDocumentDir(dir){
  4285. if (!hasDocument) {
  4286. currentDir = dir;
  4287. return;
  4288. }
  4289. var html = document.getElementsByTagName("html")[0];
  4290. html.setAttribute("dir", dir);
  4291. }
  4292. function addWindowEventListener(event
  4293. /*:string*/
  4294. , callback
  4295. /*: () => mixed*/
  4296. ) {
  4297. if (!hasWindow) {
  4298. callback();
  4299. return;
  4300. }
  4301. window.addEventListener(event, callback);
  4302. }
  4303. function removeWindowEventListener(event
  4304. /*:string*/
  4305. , callback
  4306. /*: () => mixed*/
  4307. ) {
  4308. if (!hasWindow) {
  4309. return;
  4310. }
  4311. window.removeEventListener(event, callback);
  4312. }
  4313. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/domObjects.js
  4314. const domObjects = {
  4315. init,
  4316. document: null,
  4317. DocumentFragment: null,
  4318. SVGElement: null,
  4319. SVGSVGElement: null,
  4320. SVGElementInstance: null,
  4321. Element: null,
  4322. HTMLElement: null,
  4323. Event: null,
  4324. Touch: null,
  4325. PointerEvent: null
  4326. };
  4327. function blank() {}
  4328. /* harmony default export */ var utils_domObjects = (domObjects);
  4329. function init(window) {
  4330. const win = window;
  4331. domObjects.document = win.document;
  4332. domObjects.DocumentFragment = win.DocumentFragment || blank;
  4333. domObjects.SVGElement = win.SVGElement || blank;
  4334. domObjects.SVGSVGElement = win.SVGSVGElement || blank;
  4335. domObjects.SVGElementInstance = win.SVGElementInstance || blank;
  4336. domObjects.Element = win.Element || blank;
  4337. domObjects.HTMLElement = win.HTMLElement || domObjects.Element;
  4338. domObjects.Event = win.Event;
  4339. domObjects.Touch = win.Touch || blank;
  4340. domObjects.PointerEvent = win.PointerEvent || win.MSPointerEvent;
  4341. }
  4342. //# sourceMappingURL=domObjects.js.map
  4343. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/isWindow.js
  4344. /* harmony default export */ var isWindow = (thing => !!(thing && thing.Window) && thing instanceof thing.Window);
  4345. //# sourceMappingURL=isWindow.js.map
  4346. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/window.js
  4347. let realWindow = undefined;
  4348. let win = undefined;
  4349. function window_init(window) {
  4350. // get wrapped window if using Shadow DOM polyfill
  4351. realWindow = window; // create a TextNode
  4352. const el = window.document.createTextNode(''); // check if it's wrapped by a polyfill
  4353. if (el.ownerDocument !== window.document && typeof window.wrap === 'function' && window.wrap(el) === el) {
  4354. // use wrapped window
  4355. window = window.wrap(window);
  4356. }
  4357. win = window;
  4358. }
  4359. if (typeof window !== 'undefined' && !!window) {
  4360. window_init(window);
  4361. }
  4362. function getWindow(node) {
  4363. if (isWindow(node)) {
  4364. return node;
  4365. }
  4366. const rootNode = node.ownerDocument || node;
  4367. return rootNode.defaultView || win.window;
  4368. }
  4369. //# sourceMappingURL=window.js.map
  4370. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/is.js
  4371. const is_window = thing => thing === win || isWindow(thing);
  4372. const docFrag = thing => object(thing) && thing.nodeType === 11;
  4373. const object = thing => !!thing && typeof thing === 'object';
  4374. const func = thing => typeof thing === 'function';
  4375. const number = thing => typeof thing === 'number';
  4376. const bool = thing => typeof thing === 'boolean';
  4377. const string = thing => typeof thing === 'string';
  4378. const is_element = thing => {
  4379. if (!thing || typeof thing !== 'object') {
  4380. return false;
  4381. } // eslint-disable-next-line import/no-named-as-default-member
  4382. const _window = getWindow(thing) || win;
  4383. return /object|function/.test(typeof _window.Element) ? thing instanceof _window.Element // DOM2
  4384. : thing.nodeType === 1 && typeof thing.nodeName === 'string';
  4385. };
  4386. const plainObject = thing => object(thing) && !!thing.constructor && /function Object\b/.test(thing.constructor.toString());
  4387. const array = thing => object(thing) && typeof thing.length !== 'undefined' && func(thing.splice);
  4388. /* harmony default export */ var is = ({
  4389. window: is_window,
  4390. docFrag,
  4391. object,
  4392. func,
  4393. number,
  4394. bool,
  4395. string,
  4396. element: is_element,
  4397. plainObject,
  4398. array
  4399. });
  4400. //# sourceMappingURL=is.js.map
  4401. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/browser.js
  4402. const browser = {
  4403. init: browser_init,
  4404. supportsTouch: null,
  4405. supportsPointerEvent: null,
  4406. isIOS7: null,
  4407. isIOS: null,
  4408. isIe9: null,
  4409. isOperaMobile: null,
  4410. prefixedMatchesSelector: null,
  4411. pEventTypes: null,
  4412. wheelEvent: null
  4413. };
  4414. function browser_init(window) {
  4415. const Element = utils_domObjects.Element;
  4416. const navigator = win.navigator; // Does the browser support touch input?
  4417. browser.supportsTouch = 'ontouchstart' in window || is.func(window.DocumentTouch) && utils_domObjects.document instanceof window.DocumentTouch; // Does the browser support PointerEvents
  4418. browser.supportsPointerEvent = navigator.pointerEnabled !== false && !!utils_domObjects.PointerEvent;
  4419. browser.isIOS = /iP(hone|od|ad)/.test(navigator.platform); // scrolling doesn't change the result of getClientRects on iOS 7
  4420. browser.isIOS7 = /iP(hone|od|ad)/.test(navigator.platform) && /OS 7[^\d]/.test(navigator.appVersion);
  4421. browser.isIe9 = /MSIE 9/.test(navigator.userAgent); // Opera Mobile must be handled differently
  4422. browser.isOperaMobile = navigator.appName === 'Opera' && browser.supportsTouch && /Presto/.test(navigator.userAgent); // prefix matchesSelector
  4423. browser.prefixedMatchesSelector = 'matches' in Element.prototype ? 'matches' : 'webkitMatchesSelector' in Element.prototype ? 'webkitMatchesSelector' : 'mozMatchesSelector' in Element.prototype ? 'mozMatchesSelector' : 'oMatchesSelector' in Element.prototype ? 'oMatchesSelector' : 'msMatchesSelector';
  4424. browser.pEventTypes = browser.supportsPointerEvent ? utils_domObjects.PointerEvent === window.MSPointerEvent ? {
  4425. up: 'MSPointerUp',
  4426. down: 'MSPointerDown',
  4427. over: 'mouseover',
  4428. out: 'mouseout',
  4429. move: 'MSPointerMove',
  4430. cancel: 'MSPointerCancel'
  4431. } : {
  4432. up: 'pointerup',
  4433. down: 'pointerdown',
  4434. over: 'pointerover',
  4435. out: 'pointerout',
  4436. move: 'pointermove',
  4437. cancel: 'pointercancel'
  4438. } : null; // because Webkit and Opera still use 'mousewheel' event type
  4439. browser.wheelEvent = 'onmousewheel' in utils_domObjects.document ? 'mousewheel' : 'wheel';
  4440. }
  4441. /* harmony default export */ var utils_browser = (browser);
  4442. //# sourceMappingURL=browser.js.map
  4443. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/arr.js
  4444. const contains = (array, target) => array.indexOf(target) !== -1;
  4445. const arr_remove = (array, target) => array.splice(array.indexOf(target), 1);
  4446. const merge = (target, source) => {
  4447. for (const item of source) {
  4448. target.push(item);
  4449. }
  4450. return target;
  4451. };
  4452. const from = source => merge([], source);
  4453. const findIndex = (array, func) => {
  4454. for (let i = 0; i < array.length; i++) {
  4455. if (func(array[i], i, array)) {
  4456. return i;
  4457. }
  4458. }
  4459. return -1;
  4460. };
  4461. const find = (array, func) => array[findIndex(array, func)];
  4462. //# sourceMappingURL=arr.js.map
  4463. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/clone.js
  4464. // tslint:disable-next-line ban-types
  4465. function clone(source) {
  4466. const dest = {};
  4467. for (const prop in source) {
  4468. const value = source[prop];
  4469. if (is.plainObject(value)) {
  4470. dest[prop] = clone(value);
  4471. } else if (is.array(value)) {
  4472. dest[prop] = from(value);
  4473. } else {
  4474. dest[prop] = value;
  4475. }
  4476. }
  4477. return dest;
  4478. }
  4479. //# sourceMappingURL=clone.js.map
  4480. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/extend.js
  4481. function extend(dest, source) {
  4482. for (const prop in source) {
  4483. dest[prop] = source[prop];
  4484. }
  4485. const ret = dest;
  4486. return ret;
  4487. }
  4488. //# sourceMappingURL=extend.js.map
  4489. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/raf.js
  4490. let lastTime = 0;
  4491. let request;
  4492. let cancel;
  4493. function raf_init(window) {
  4494. request = window.requestAnimationFrame;
  4495. cancel = window.cancelAnimationFrame;
  4496. if (!request) {
  4497. const vendors = ['ms', 'moz', 'webkit', 'o'];
  4498. for (const vendor of vendors) {
  4499. request = window[`${vendor}RequestAnimationFrame`];
  4500. cancel = window[`${vendor}CancelAnimationFrame`] || window[`${vendor}CancelRequestAnimationFrame`];
  4501. }
  4502. }
  4503. request = request && request.bind(window);
  4504. cancel = cancel && cancel.bind(window);
  4505. if (!request) {
  4506. request = callback => {
  4507. const currTime = Date.now();
  4508. const timeToCall = Math.max(0, 16 - (currTime - lastTime)); // eslint-disable-next-line node/no-callback-literal
  4509. const token = window.setTimeout(() => {
  4510. callback(currTime + timeToCall);
  4511. }, timeToCall);
  4512. lastTime = currTime + timeToCall;
  4513. return token;
  4514. };
  4515. cancel = token => clearTimeout(token);
  4516. }
  4517. }
  4518. /* harmony default export */ var raf = ({
  4519. request: callback => request(callback),
  4520. cancel: token => cancel(token),
  4521. init: raf_init
  4522. });
  4523. //# sourceMappingURL=raf.js.map
  4524. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/normalizeListeners.js
  4525. function normalize(type, listeners, result) {
  4526. result = result || {};
  4527. if (is.string(type) && type.search(' ') !== -1) {
  4528. type = split(type);
  4529. }
  4530. if (is.array(type)) {
  4531. return type.reduce((acc, t) => extend(acc, normalize(t, listeners, result)), result);
  4532. } // ({ type: fn }) -> ('', { type: fn })
  4533. if (is.object(type)) {
  4534. listeners = type;
  4535. type = '';
  4536. }
  4537. if (is.func(listeners)) {
  4538. result[type] = result[type] || [];
  4539. result[type].push(listeners);
  4540. } else if (is.array(listeners)) {
  4541. for (const l of listeners) {
  4542. normalize(type, l, result);
  4543. }
  4544. } else if (is.object(listeners)) {
  4545. for (const prefix in listeners) {
  4546. const combinedTypes = split(prefix).map(p => `${type}${p}`);
  4547. normalize(combinedTypes, listeners[prefix], result);
  4548. }
  4549. }
  4550. return result;
  4551. }
  4552. function split(type) {
  4553. return type.trim().split(/ +/);
  4554. }
  4555. //# sourceMappingURL=normalizeListeners.js.map
  4556. // CONCATENATED MODULE: ./node_modules/@interactjs/core/Eventable.js
  4557. function fireUntilImmediateStopped(event, listeners) {
  4558. for (const listener of listeners) {
  4559. if (event.immediatePropagationStopped) {
  4560. break;
  4561. }
  4562. listener(event);
  4563. }
  4564. }
  4565. class Eventable_Eventable {
  4566. constructor(options) {
  4567. this.options = void 0;
  4568. this.types = {};
  4569. this.propagationStopped = false;
  4570. this.immediatePropagationStopped = false;
  4571. this.global = void 0;
  4572. this.options = extend({}, options || {});
  4573. }
  4574. fire(event) {
  4575. let listeners;
  4576. const global = this.global; // Interactable#on() listeners
  4577. // tslint:disable no-conditional-assignment
  4578. if (listeners = this.types[event.type]) {
  4579. fireUntilImmediateStopped(event, listeners);
  4580. } // interact.on() listeners
  4581. if (!event.propagationStopped && global && (listeners = global[event.type])) {
  4582. fireUntilImmediateStopped(event, listeners);
  4583. }
  4584. }
  4585. on(type, listener) {
  4586. const listeners = normalize(type, listener);
  4587. for (type in listeners) {
  4588. this.types[type] = merge(this.types[type] || [], listeners[type]);
  4589. }
  4590. }
  4591. off(type, listener) {
  4592. const listeners = normalize(type, listener);
  4593. for (type in listeners) {
  4594. const eventList = this.types[type];
  4595. if (!eventList || !eventList.length) {
  4596. continue;
  4597. }
  4598. for (const subListener of listeners[type]) {
  4599. const index = eventList.indexOf(subListener);
  4600. if (index !== -1) {
  4601. eventList.splice(index, 1);
  4602. }
  4603. }
  4604. }
  4605. }
  4606. getRect(_element) {
  4607. return null;
  4608. }
  4609. }
  4610. //# sourceMappingURL=Eventable.js.map
  4611. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/domUtils.js
  4612. function nodeContains(parent, child) {
  4613. if (parent.contains) {
  4614. return parent.contains(child);
  4615. }
  4616. while (child) {
  4617. if (child === parent) {
  4618. return true;
  4619. }
  4620. child = child.parentNode;
  4621. }
  4622. return false;
  4623. }
  4624. function domUtils_closest(element, selector) {
  4625. while (is.element(element)) {
  4626. if (matchesSelector(element, selector)) {
  4627. return element;
  4628. }
  4629. element = parentNode(element);
  4630. }
  4631. return null;
  4632. }
  4633. function parentNode(node) {
  4634. let parent = node.parentNode;
  4635. if (is.docFrag(parent)) {
  4636. // skip past #shado-root fragments
  4637. // tslint:disable-next-line
  4638. while ((parent = parent.host) && is.docFrag(parent)) {
  4639. continue;
  4640. }
  4641. return parent;
  4642. }
  4643. return parent;
  4644. }
  4645. function matchesSelector(element, selector) {
  4646. // remove /deep/ from selectors if shadowDOM polyfill is used
  4647. if (win !== realWindow) {
  4648. selector = selector.replace(/\/deep\//g, ' ');
  4649. }
  4650. return element[utils_browser.prefixedMatchesSelector](selector);
  4651. }
  4652. const getParent = el => el.parentNode || el.host; // Test for the element that's "above" all other qualifiers
  4653. function indexOfDeepestElement(elements) {
  4654. let deepestNodeParents = [];
  4655. let deepestNodeIndex;
  4656. for (let i = 0; i < elements.length; i++) {
  4657. const currentNode = elements[i];
  4658. const deepestNode = elements[deepestNodeIndex]; // node may appear in elements array multiple times
  4659. if (!currentNode || i === deepestNodeIndex) {
  4660. continue;
  4661. }
  4662. if (!deepestNode) {
  4663. deepestNodeIndex = i;
  4664. continue;
  4665. }
  4666. const currentNodeParent = getParent(currentNode);
  4667. const deepestNodeParent = getParent(deepestNode); // check if the deepest or current are document.documentElement/rootElement
  4668. // - if the current node is, do nothing and continue
  4669. if (currentNodeParent === currentNode.ownerDocument) {
  4670. continue;
  4671. } // - if deepest is, update with the current node and continue to next
  4672. else if (deepestNodeParent === currentNode.ownerDocument) {
  4673. deepestNodeIndex = i;
  4674. continue;
  4675. } // compare zIndex of siblings
  4676. if (currentNodeParent === deepestNodeParent) {
  4677. if (zIndexIsHigherThan(currentNode, deepestNode)) {
  4678. deepestNodeIndex = i;
  4679. }
  4680. continue;
  4681. } // populate the ancestry array for the latest deepest node
  4682. deepestNodeParents = deepestNodeParents.length ? deepestNodeParents : getNodeParents(deepestNode);
  4683. let ancestryStart; // if the deepest node is an HTMLElement and the current node is a non root svg element
  4684. if (deepestNode instanceof utils_domObjects.HTMLElement && currentNode instanceof utils_domObjects.SVGElement && !(currentNode instanceof utils_domObjects.SVGSVGElement)) {
  4685. // TODO: is this check necessary? Was this for HTML elements embedded in SVG?
  4686. if (currentNode === deepestNodeParent) {
  4687. continue;
  4688. }
  4689. ancestryStart = currentNode.ownerSVGElement;
  4690. } else {
  4691. ancestryStart = currentNode;
  4692. }
  4693. const currentNodeParents = getNodeParents(ancestryStart, deepestNode.ownerDocument);
  4694. let commonIndex = 0; // get (position of closest common ancestor) + 1
  4695. while (currentNodeParents[commonIndex] && currentNodeParents[commonIndex] === deepestNodeParents[commonIndex]) {
  4696. commonIndex++;
  4697. }
  4698. const parents = [currentNodeParents[commonIndex - 1], currentNodeParents[commonIndex], deepestNodeParents[commonIndex]];
  4699. let child = parents[0].lastChild;
  4700. while (child) {
  4701. if (child === parents[1]) {
  4702. deepestNodeIndex = i;
  4703. deepestNodeParents = currentNodeParents;
  4704. break;
  4705. } else if (child === parents[2]) {
  4706. break;
  4707. }
  4708. child = child.previousSibling;
  4709. }
  4710. }
  4711. return deepestNodeIndex;
  4712. }
  4713. function getNodeParents(node, limit) {
  4714. const parents = [];
  4715. let parent = node;
  4716. let parentParent;
  4717. while ((parentParent = getParent(parent)) && parent !== limit && parentParent !== parent.ownerDocument) {
  4718. parents.unshift(parent);
  4719. parent = parentParent;
  4720. }
  4721. return parents;
  4722. }
  4723. function zIndexIsHigherThan(higherNode, lowerNode) {
  4724. const higherIndex = parseInt(getWindow(higherNode).getComputedStyle(higherNode).zIndex, 10) || 0;
  4725. const lowerIndex = parseInt(getWindow(lowerNode).getComputedStyle(lowerNode).zIndex, 10) || 0;
  4726. return higherIndex >= lowerIndex;
  4727. }
  4728. function matchesUpTo(element, selector, limit) {
  4729. while (is.element(element)) {
  4730. if (matchesSelector(element, selector)) {
  4731. return true;
  4732. }
  4733. element = parentNode(element);
  4734. if (element === limit) {
  4735. return matchesSelector(element, selector);
  4736. }
  4737. }
  4738. return false;
  4739. }
  4740. function getActualElement(element) {
  4741. return element.correspondingUseElement || element;
  4742. }
  4743. function getScrollXY(relevantWindow) {
  4744. relevantWindow = relevantWindow || win;
  4745. return {
  4746. x: relevantWindow.scrollX || relevantWindow.document.documentElement.scrollLeft,
  4747. y: relevantWindow.scrollY || relevantWindow.document.documentElement.scrollTop
  4748. };
  4749. }
  4750. function getElementClientRect(element) {
  4751. const clientRect = element instanceof utils_domObjects.SVGElement ? element.getBoundingClientRect() : element.getClientRects()[0];
  4752. return clientRect && {
  4753. left: clientRect.left,
  4754. right: clientRect.right,
  4755. top: clientRect.top,
  4756. bottom: clientRect.bottom,
  4757. width: clientRect.width || clientRect.right - clientRect.left,
  4758. height: clientRect.height || clientRect.bottom - clientRect.top
  4759. };
  4760. }
  4761. function getElementRect(element) {
  4762. const clientRect = getElementClientRect(element);
  4763. if (!utils_browser.isIOS7 && clientRect) {
  4764. const scroll = getScrollXY(getWindow(element));
  4765. clientRect.left += scroll.x;
  4766. clientRect.right += scroll.x;
  4767. clientRect.top += scroll.y;
  4768. clientRect.bottom += scroll.y;
  4769. }
  4770. return clientRect;
  4771. }
  4772. function getPath(node) {
  4773. const path = [];
  4774. while (node) {
  4775. path.push(node);
  4776. node = parentNode(node);
  4777. }
  4778. return path;
  4779. }
  4780. function trySelector(value) {
  4781. if (!is.string(value)) {
  4782. return false;
  4783. } // an exception will be raised if it is invalid
  4784. utils_domObjects.document.querySelector(value);
  4785. return true;
  4786. }
  4787. //# sourceMappingURL=domUtils.js.map
  4788. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/rect.js
  4789. function getStringOptionResult(value, target, element) {
  4790. if (value === 'parent') {
  4791. return parentNode(element);
  4792. }
  4793. if (value === 'self') {
  4794. return target.getRect(element);
  4795. }
  4796. return domUtils_closest(element, value);
  4797. }
  4798. function resolveRectLike(value, target, element, functionArgs) {
  4799. let returnValue = value;
  4800. if (is.string(returnValue)) {
  4801. returnValue = getStringOptionResult(returnValue, target, element);
  4802. } else if (is.func(returnValue)) {
  4803. returnValue = returnValue(...functionArgs);
  4804. }
  4805. if (is.element(returnValue)) {
  4806. returnValue = getElementRect(returnValue);
  4807. }
  4808. return returnValue;
  4809. }
  4810. function rectToXY(rect) {
  4811. return rect && {
  4812. x: 'x' in rect ? rect.x : rect.left,
  4813. y: 'y' in rect ? rect.y : rect.top
  4814. };
  4815. }
  4816. function xywhToTlbr(rect) {
  4817. if (rect && !('left' in rect && 'top' in rect)) {
  4818. rect = extend({}, rect);
  4819. rect.left = rect.x || 0;
  4820. rect.top = rect.y || 0;
  4821. rect.right = rect.right || rect.left + rect.width;
  4822. rect.bottom = rect.bottom || rect.top + rect.height;
  4823. }
  4824. return rect;
  4825. }
  4826. function tlbrToXywh(rect) {
  4827. if (rect && !('x' in rect && 'y' in rect)) {
  4828. rect = extend({}, rect);
  4829. rect.x = rect.left || 0;
  4830. rect.y = rect.top || 0;
  4831. rect.width = rect.width || (rect.right || 0) - rect.x;
  4832. rect.height = rect.height || (rect.bottom || 0) - rect.y;
  4833. }
  4834. return rect;
  4835. }
  4836. function addEdges(edges, rect, delta) {
  4837. if (edges.left) {
  4838. rect.left += delta.x;
  4839. }
  4840. if (edges.right) {
  4841. rect.right += delta.x;
  4842. }
  4843. if (edges.top) {
  4844. rect.top += delta.y;
  4845. }
  4846. if (edges.bottom) {
  4847. rect.bottom += delta.y;
  4848. }
  4849. rect.width = rect.right - rect.left;
  4850. rect.height = rect.bottom - rect.top;
  4851. }
  4852. //# sourceMappingURL=rect.js.map
  4853. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/getOriginXY.js
  4854. /* harmony default export */ var getOriginXY = (function (target, element, actionName) {
  4855. const actionOptions = target.options[actionName];
  4856. const actionOrigin = actionOptions && actionOptions.origin;
  4857. const origin = actionOrigin || target.options.origin;
  4858. const originRect = resolveRectLike(origin, target, element, [target && element]);
  4859. return rectToXY(originRect) || {
  4860. x: 0,
  4861. y: 0
  4862. };
  4863. });
  4864. //# sourceMappingURL=getOriginXY.js.map
  4865. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/hypot.js
  4866. /* harmony default export */ var hypot = ((x, y) => Math.sqrt(x * x + y * y));
  4867. //# sourceMappingURL=hypot.js.map
  4868. // CONCATENATED MODULE: ./node_modules/@interactjs/core/BaseEvent.js
  4869. class BaseEvent {
  4870. constructor(interaction) {
  4871. this.type = void 0;
  4872. this.target = void 0;
  4873. this.currentTarget = void 0;
  4874. this.interactable = void 0;
  4875. this._interaction = void 0;
  4876. this.timeStamp = void 0;
  4877. this.immediatePropagationStopped = false;
  4878. this.propagationStopped = false;
  4879. this._interaction = interaction;
  4880. }
  4881. preventDefault() {}
  4882. /**
  4883. * Don't call any other listeners (even on the current target)
  4884. */
  4885. stopPropagation() {
  4886. this.propagationStopped = true;
  4887. }
  4888. /**
  4889. * Don't call listeners on the remaining targets
  4890. */
  4891. stopImmediatePropagation() {
  4892. this.immediatePropagationStopped = this.propagationStopped = true;
  4893. }
  4894. } // defined outside of class definition to avoid assignment of undefined during
  4895. // construction
  4896. // getters and setters defined here to support typescript 3.6 and below which
  4897. // don't support getter and setters in .d.ts files
  4898. Object.defineProperty(BaseEvent.prototype, 'interaction', {
  4899. get() {
  4900. return this._interaction._proxy;
  4901. },
  4902. set() {}
  4903. });
  4904. //# sourceMappingURL=BaseEvent.js.map
  4905. // CONCATENATED MODULE: ./node_modules/@interactjs/core/defaultOptions.js
  4906. // eslint-disable-next-line @typescript-eslint/no-empty-interface
  4907. // export interface Options extends BaseDefaults, PerActionDefaults {}
  4908. const defaultOptions_defaults = {
  4909. base: {
  4910. preventDefault: 'auto',
  4911. deltaSource: 'page'
  4912. },
  4913. perAction: {
  4914. enabled: false,
  4915. origin: {
  4916. x: 0,
  4917. y: 0
  4918. }
  4919. },
  4920. actions: {}
  4921. };
  4922. //# sourceMappingURL=defaultOptions.js.map
  4923. // CONCATENATED MODULE: ./node_modules/@interactjs/core/InteractEvent.js
  4924. class InteractEvent_InteractEvent extends BaseEvent {
  4925. // resize
  4926. /** */
  4927. constructor(interaction, event, actionName, phase, element, preEnd, type) {
  4928. super(interaction);
  4929. this.target = void 0;
  4930. this.currentTarget = void 0;
  4931. this.relatedTarget = null;
  4932. this.screenX = void 0;
  4933. this.screenY = void 0;
  4934. this.button = void 0;
  4935. this.buttons = void 0;
  4936. this.ctrlKey = void 0;
  4937. this.shiftKey = void 0;
  4938. this.altKey = void 0;
  4939. this.metaKey = void 0;
  4940. this.page = void 0;
  4941. this.client = void 0;
  4942. this.delta = void 0;
  4943. this.rect = void 0;
  4944. this.x0 = void 0;
  4945. this.y0 = void 0;
  4946. this.t0 = void 0;
  4947. this.dt = void 0;
  4948. this.duration = void 0;
  4949. this.clientX0 = void 0;
  4950. this.clientY0 = void 0;
  4951. this.velocity = void 0;
  4952. this.speed = void 0;
  4953. this.swipe = void 0;
  4954. this.timeStamp = void 0;
  4955. this.axes = void 0;
  4956. this.preEnd = void 0;
  4957. element = element || interaction.element;
  4958. const target = interaction.interactable;
  4959. const deltaSource = (target && target.options || defaultOptions_defaults).deltaSource;
  4960. const origin = getOriginXY(target, element, actionName);
  4961. const starting = phase === 'start';
  4962. const ending = phase === 'end';
  4963. const prevEvent = starting ? this : interaction.prevEvent;
  4964. const coords = starting ? interaction.coords.start : ending ? {
  4965. page: prevEvent.page,
  4966. client: prevEvent.client,
  4967. timeStamp: interaction.coords.cur.timeStamp
  4968. } : interaction.coords.cur;
  4969. this.page = extend({}, coords.page);
  4970. this.client = extend({}, coords.client);
  4971. this.rect = extend({}, interaction.rect);
  4972. this.timeStamp = coords.timeStamp;
  4973. if (!ending) {
  4974. this.page.x -= origin.x;
  4975. this.page.y -= origin.y;
  4976. this.client.x -= origin.x;
  4977. this.client.y -= origin.y;
  4978. }
  4979. this.ctrlKey = event.ctrlKey;
  4980. this.altKey = event.altKey;
  4981. this.shiftKey = event.shiftKey;
  4982. this.metaKey = event.metaKey;
  4983. this.button = event.button;
  4984. this.buttons = event.buttons;
  4985. this.target = element;
  4986. this.currentTarget = element;
  4987. this.preEnd = preEnd;
  4988. this.type = type || actionName + (phase || '');
  4989. this.interactable = target;
  4990. this.t0 = starting ? interaction.pointers[interaction.pointers.length - 1].downTime : prevEvent.t0;
  4991. this.x0 = interaction.coords.start.page.x - origin.x;
  4992. this.y0 = interaction.coords.start.page.y - origin.y;
  4993. this.clientX0 = interaction.coords.start.client.x - origin.x;
  4994. this.clientY0 = interaction.coords.start.client.y - origin.y;
  4995. if (starting || ending) {
  4996. this.delta = {
  4997. x: 0,
  4998. y: 0
  4999. };
  5000. } else {
  5001. this.delta = {
  5002. x: this[deltaSource].x - prevEvent[deltaSource].x,
  5003. y: this[deltaSource].y - prevEvent[deltaSource].y
  5004. };
  5005. }
  5006. this.dt = interaction.coords.delta.timeStamp;
  5007. this.duration = this.timeStamp - this.t0; // velocity and speed in pixels per second
  5008. this.velocity = extend({}, interaction.coords.velocity[deltaSource]);
  5009. this.speed = hypot(this.velocity.x, this.velocity.y);
  5010. this.swipe = ending || phase === 'inertiastart' ? this.getSwipe() : null;
  5011. }
  5012. getSwipe() {
  5013. const interaction = this._interaction;
  5014. if (interaction.prevEvent.speed < 600 || this.timeStamp - interaction.prevEvent.timeStamp > 150) {
  5015. return null;
  5016. }
  5017. let angle = 180 * Math.atan2(interaction.prevEvent.velocityY, interaction.prevEvent.velocityX) / Math.PI;
  5018. const overlap = 22.5;
  5019. if (angle < 0) {
  5020. angle += 360;
  5021. }
  5022. const left = 135 - overlap <= angle && angle < 225 + overlap;
  5023. const up = 225 - overlap <= angle && angle < 315 + overlap;
  5024. const right = !left && (315 - overlap <= angle || angle < 45 + overlap);
  5025. const down = !up && 45 - overlap <= angle && angle < 135 + overlap;
  5026. return {
  5027. up,
  5028. down,
  5029. left,
  5030. right,
  5031. angle,
  5032. speed: interaction.prevEvent.speed,
  5033. velocity: {
  5034. x: interaction.prevEvent.velocityX,
  5035. y: interaction.prevEvent.velocityY
  5036. }
  5037. };
  5038. }
  5039. preventDefault() {}
  5040. /**
  5041. * Don't call listeners on the remaining targets
  5042. */
  5043. stopImmediatePropagation() {
  5044. this.immediatePropagationStopped = this.propagationStopped = true;
  5045. }
  5046. /**
  5047. * Don't call any other listeners (even on the current target)
  5048. */
  5049. stopPropagation() {
  5050. this.propagationStopped = true;
  5051. }
  5052. } // getters and setters defined here to support typescript 3.6 and below which
  5053. // don't support getter and setters in .d.ts files
  5054. Object.defineProperties(InteractEvent_InteractEvent.prototype, {
  5055. pageX: {
  5056. get() {
  5057. return this.page.x;
  5058. },
  5059. set(value) {
  5060. this.page.x = value;
  5061. }
  5062. },
  5063. pageY: {
  5064. get() {
  5065. return this.page.y;
  5066. },
  5067. set(value) {
  5068. this.page.y = value;
  5069. }
  5070. },
  5071. clientX: {
  5072. get() {
  5073. return this.client.x;
  5074. },
  5075. set(value) {
  5076. this.client.x = value;
  5077. }
  5078. },
  5079. clientY: {
  5080. get() {
  5081. return this.client.y;
  5082. },
  5083. set(value) {
  5084. this.client.y = value;
  5085. }
  5086. },
  5087. dx: {
  5088. get() {
  5089. return this.delta.x;
  5090. },
  5091. set(value) {
  5092. this.delta.x = value;
  5093. }
  5094. },
  5095. dy: {
  5096. get() {
  5097. return this.delta.y;
  5098. },
  5099. set(value) {
  5100. this.delta.y = value;
  5101. }
  5102. },
  5103. velocityX: {
  5104. get() {
  5105. return this.velocity.x;
  5106. },
  5107. set(value) {
  5108. this.velocity.x = value;
  5109. }
  5110. },
  5111. velocityY: {
  5112. get() {
  5113. return this.velocity.y;
  5114. },
  5115. set(value) {
  5116. this.velocity.y = value;
  5117. }
  5118. }
  5119. });
  5120. //# sourceMappingURL=InteractEvent.js.map
  5121. // CONCATENATED MODULE: ./node_modules/@interactjs/core/isNonNativeEvent.js
  5122. function isNonNativeEvent(type, actions) {
  5123. if (actions.phaselessTypes[type]) {
  5124. return true;
  5125. }
  5126. for (const name in actions.map) {
  5127. if (type.indexOf(name) === 0 && type.substr(name.length) in actions.phases) {
  5128. return true;
  5129. }
  5130. }
  5131. return false;
  5132. }
  5133. //# sourceMappingURL=isNonNativeEvent.js.map
  5134. // CONCATENATED MODULE: ./node_modules/@interactjs/core/Interactable.js
  5135. /* eslint-disable no-dupe-class-members */
  5136. /** */
  5137. class Interactable_Interactable {
  5138. /** @internal */
  5139. get _defaults() {
  5140. return {
  5141. base: {},
  5142. perAction: {},
  5143. actions: {}
  5144. };
  5145. }
  5146. /** */
  5147. constructor(target, options, defaultContext, scopeEvents) {
  5148. this.options = void 0;
  5149. this._actions = void 0;
  5150. this.target = void 0;
  5151. this.events = new Eventable_Eventable();
  5152. this._context = void 0;
  5153. this._win = void 0;
  5154. this._doc = void 0;
  5155. this._scopeEvents = void 0;
  5156. this._rectChecker = void 0;
  5157. this._actions = options.actions;
  5158. this.target = target;
  5159. this._context = options.context || defaultContext;
  5160. this._win = getWindow(trySelector(target) ? this._context : target);
  5161. this._doc = this._win.document;
  5162. this._scopeEvents = scopeEvents;
  5163. this.set(options);
  5164. }
  5165. setOnEvents(actionName, phases) {
  5166. if (is.func(phases.onstart)) {
  5167. this.on(`${actionName}start`, phases.onstart);
  5168. }
  5169. if (is.func(phases.onmove)) {
  5170. this.on(`${actionName}move`, phases.onmove);
  5171. }
  5172. if (is.func(phases.onend)) {
  5173. this.on(`${actionName}end`, phases.onend);
  5174. }
  5175. if (is.func(phases.oninertiastart)) {
  5176. this.on(`${actionName}inertiastart`, phases.oninertiastart);
  5177. }
  5178. return this;
  5179. }
  5180. updatePerActionListeners(actionName, prev, cur) {
  5181. if (is.array(prev) || is.object(prev)) {
  5182. this.off(actionName, prev);
  5183. }
  5184. if (is.array(cur) || is.object(cur)) {
  5185. this.on(actionName, cur);
  5186. }
  5187. }
  5188. setPerAction(actionName, options) {
  5189. const defaults = this._defaults; // for all the default per-action options
  5190. for (const optionName_ in options) {
  5191. const optionName = optionName_;
  5192. const actionOptions = this.options[actionName];
  5193. const optionValue = options[optionName]; // remove old event listeners and add new ones
  5194. if (optionName === 'listeners') {
  5195. this.updatePerActionListeners(actionName, actionOptions.listeners, optionValue);
  5196. } // if the option value is an array
  5197. if (is.array(optionValue)) {
  5198. actionOptions[optionName] = from(optionValue);
  5199. } // if the option value is an object
  5200. else if (is.plainObject(optionValue)) {
  5201. // copy the object
  5202. actionOptions[optionName] = extend(actionOptions[optionName] || {}, clone(optionValue)); // set anabled field to true if it exists in the defaults
  5203. if (is.object(defaults.perAction[optionName]) && 'enabled' in defaults.perAction[optionName]) {
  5204. actionOptions[optionName].enabled = optionValue.enabled !== false;
  5205. }
  5206. } // if the option value is a boolean and the default is an object
  5207. else if (is.bool(optionValue) && is.object(defaults.perAction[optionName])) {
  5208. actionOptions[optionName].enabled = optionValue;
  5209. } // if it's anything else, do a plain assignment
  5210. else {
  5211. actionOptions[optionName] = optionValue;
  5212. }
  5213. }
  5214. }
  5215. /**
  5216. * The default function to get an Interactables bounding rect. Can be
  5217. * overridden using {@link Interactable.rectChecker}.
  5218. *
  5219. * @param {Element} [element] The element to measure.
  5220. * @return {Rect} The object's bounding rectangle.
  5221. */
  5222. getRect(element) {
  5223. element = element || (is.element(this.target) ? this.target : null);
  5224. if (is.string(this.target)) {
  5225. element = element || this._context.querySelector(this.target);
  5226. }
  5227. return getElementRect(element);
  5228. }
  5229. /**
  5230. * Returns or sets the function used to calculate the interactable's
  5231. * element's rectangle
  5232. *
  5233. * @param {function} [checker] A function which returns this Interactable's
  5234. * bounding rectangle. See {@link Interactable.getRect}
  5235. * @return {function | object} The checker function or this Interactable
  5236. */
  5237. rectChecker(checker) {
  5238. if (is.func(checker)) {
  5239. this._rectChecker = checker;
  5240. this.getRect = element => {
  5241. const rect = extend({}, this._rectChecker(element));
  5242. if (!('width' in rect)) {
  5243. rect.width = rect.right - rect.left;
  5244. rect.height = rect.bottom - rect.top;
  5245. }
  5246. return rect;
  5247. };
  5248. return this;
  5249. }
  5250. if (checker === null) {
  5251. delete this.getRect;
  5252. delete this._rectChecker;
  5253. return this;
  5254. }
  5255. return this.getRect;
  5256. }
  5257. _backCompatOption(optionName, newValue) {
  5258. if (trySelector(newValue) || is.object(newValue)) {
  5259. this.options[optionName] = newValue;
  5260. for (const action in this._actions.map) {
  5261. this.options[action][optionName] = newValue;
  5262. }
  5263. return this;
  5264. }
  5265. return this.options[optionName];
  5266. }
  5267. /**
  5268. * Gets or sets the origin of the Interactable's element. The x and y
  5269. * of the origin will be subtracted from action event coordinates.
  5270. *
  5271. * @param {Element | object | string} [origin] An HTML or SVG Element whose
  5272. * rect will be used, an object eg. { x: 0, y: 0 } or string 'parent', 'self'
  5273. * or any CSS selector
  5274. *
  5275. * @return {object} The current origin or this Interactable
  5276. */
  5277. origin(newValue) {
  5278. return this._backCompatOption('origin', newValue);
  5279. }
  5280. /**
  5281. * Returns or sets the mouse coordinate types used to calculate the
  5282. * movement of the pointer.
  5283. *
  5284. * @param {string} [newValue] Use 'client' if you will be scrolling while
  5285. * interacting; Use 'page' if you want autoScroll to work
  5286. * @return {string | object} The current deltaSource or this Interactable
  5287. */
  5288. deltaSource(newValue) {
  5289. if (newValue === 'page' || newValue === 'client') {
  5290. this.options.deltaSource = newValue;
  5291. return this;
  5292. }
  5293. return this.options.deltaSource;
  5294. }
  5295. /**
  5296. * Gets the selector context Node of the Interactable. The default is
  5297. * `window.document`.
  5298. *
  5299. * @return {Node} The context Node of this Interactable
  5300. */
  5301. context() {
  5302. return this._context;
  5303. }
  5304. inContext(element) {
  5305. return this._context === element.ownerDocument || nodeContains(this._context, element);
  5306. }
  5307. testIgnoreAllow(options, targetNode, eventTarget) {
  5308. return !this.testIgnore(options.ignoreFrom, targetNode, eventTarget) && this.testAllow(options.allowFrom, targetNode, eventTarget);
  5309. }
  5310. testAllow(allowFrom, targetNode, element) {
  5311. if (!allowFrom) {
  5312. return true;
  5313. }
  5314. if (!is.element(element)) {
  5315. return false;
  5316. }
  5317. if (is.string(allowFrom)) {
  5318. return matchesUpTo(element, allowFrom, targetNode);
  5319. } else if (is.element(allowFrom)) {
  5320. return nodeContains(allowFrom, element);
  5321. }
  5322. return false;
  5323. }
  5324. testIgnore(ignoreFrom, targetNode, element) {
  5325. if (!ignoreFrom || !is.element(element)) {
  5326. return false;
  5327. }
  5328. if (is.string(ignoreFrom)) {
  5329. return matchesUpTo(element, ignoreFrom, targetNode);
  5330. } else if (is.element(ignoreFrom)) {
  5331. return nodeContains(ignoreFrom, element);
  5332. }
  5333. return false;
  5334. }
  5335. /**
  5336. * Calls listeners for the given InteractEvent type bound globally
  5337. * and directly to this Interactable
  5338. *
  5339. * @param {InteractEvent} iEvent The InteractEvent object to be fired on this
  5340. * Interactable
  5341. * @return {Interactable} this Interactable
  5342. */
  5343. fire(iEvent) {
  5344. this.events.fire(iEvent);
  5345. return this;
  5346. }
  5347. _onOff(method, typeArg, listenerArg, options) {
  5348. if (is.object(typeArg) && !is.array(typeArg)) {
  5349. options = listenerArg;
  5350. listenerArg = null;
  5351. }
  5352. const addRemove = method === 'on' ? 'add' : 'remove';
  5353. const listeners = normalize(typeArg, listenerArg);
  5354. for (let type in listeners) {
  5355. if (type === 'wheel') {
  5356. type = utils_browser.wheelEvent;
  5357. }
  5358. for (const listener of listeners[type]) {
  5359. // if it is an action event type
  5360. if (isNonNativeEvent(type, this._actions)) {
  5361. this.events[method](type, listener);
  5362. } // delegated event
  5363. else if (is.string(this.target)) {
  5364. this._scopeEvents[`${addRemove}Delegate`](this.target, this._context, type, listener, options);
  5365. } // remove listener from this Interactable's element
  5366. else {
  5367. this._scopeEvents[addRemove](this.target, type, listener, options);
  5368. }
  5369. }
  5370. }
  5371. return this;
  5372. }
  5373. /**
  5374. * Binds a listener for an InteractEvent, pointerEvent or DOM event.
  5375. *
  5376. * @param {string | array | object} types The types of events to listen
  5377. * for
  5378. * @param {function | array | object} [listener] The event listener function(s)
  5379. * @param {object | boolean} [options] options object or useCapture flag for
  5380. * addEventListener
  5381. * @return {Interactable} This Interactable
  5382. */
  5383. on(types, listener, options) {
  5384. return this._onOff('on', types, listener, options);
  5385. }
  5386. /**
  5387. * Removes an InteractEvent, pointerEvent or DOM event listener.
  5388. *
  5389. * @param {string | array | object} types The types of events that were
  5390. * listened for
  5391. * @param {function | array | object} [listener] The event listener function(s)
  5392. * @param {object | boolean} [options] options object or useCapture flag for
  5393. * removeEventListener
  5394. * @return {Interactable} This Interactable
  5395. */
  5396. off(types, listener, options) {
  5397. return this._onOff('off', types, listener, options);
  5398. }
  5399. /**
  5400. * Reset the options of this Interactable
  5401. *
  5402. * @param {object} options The new settings to apply
  5403. * @return {object} This Interactable
  5404. */
  5405. set(options) {
  5406. const defaults = this._defaults;
  5407. if (!is.object(options)) {
  5408. options = {};
  5409. }
  5410. this.options = clone(defaults.base);
  5411. for (const actionName_ in this._actions.methodDict) {
  5412. const actionName = actionName_;
  5413. const methodName = this._actions.methodDict[actionName];
  5414. this.options[actionName] = {};
  5415. this.setPerAction(actionName, extend(extend({}, defaults.perAction), defaults.actions[actionName]));
  5416. this[methodName](options[actionName]);
  5417. }
  5418. for (const setting in options) {
  5419. if (is.func(this[setting])) {
  5420. this[setting](options[setting]);
  5421. }
  5422. }
  5423. return this;
  5424. }
  5425. /**
  5426. * Remove this interactable from the list of interactables and remove it's
  5427. * action capabilities and event listeners
  5428. */
  5429. unset() {
  5430. if (is.string(this.target)) {
  5431. // remove delegated events
  5432. for (const type in this._scopeEvents.delegatedEvents) {
  5433. const delegated = this._scopeEvents.delegatedEvents[type];
  5434. for (let i = delegated.length - 1; i >= 0; i--) {
  5435. const {
  5436. selector,
  5437. context,
  5438. listeners
  5439. } = delegated[i];
  5440. if (selector === this.target && context === this._context) {
  5441. delegated.splice(i, 1);
  5442. }
  5443. for (let l = listeners.length - 1; l >= 0; l--) {
  5444. this._scopeEvents.removeDelegate(this.target, this._context, type, listeners[l][0], listeners[l][1]);
  5445. }
  5446. }
  5447. }
  5448. } else {
  5449. this._scopeEvents.remove(this.target, 'all');
  5450. }
  5451. }
  5452. }
  5453. //# sourceMappingURL=Interactable.js.map
  5454. // CONCATENATED MODULE: ./node_modules/@interactjs/core/InteractableSet.js
  5455. class InteractableSet_InteractableSet {
  5456. // all set interactables
  5457. constructor(scope) {
  5458. this.list = [];
  5459. this.selectorMap = {};
  5460. this.scope = void 0;
  5461. this.scope = scope;
  5462. scope.addListeners({
  5463. 'interactable:unset': ({
  5464. interactable
  5465. }) => {
  5466. const {
  5467. target,
  5468. _context: context
  5469. } = interactable;
  5470. const targetMappings = is.string(target) ? this.selectorMap[target] : target[this.scope.id];
  5471. const targetIndex = findIndex(targetMappings, m => m.context === context);
  5472. if (targetMappings[targetIndex]) {
  5473. // Destroying mappingInfo's context and interactable
  5474. targetMappings[targetIndex].context = null;
  5475. targetMappings[targetIndex].interactable = null;
  5476. }
  5477. targetMappings.splice(targetIndex, 1);
  5478. }
  5479. });
  5480. }
  5481. new(target, options) {
  5482. options = extend(options || {}, {
  5483. actions: this.scope.actions
  5484. });
  5485. const interactable = new this.scope.Interactable(target, options, this.scope.document, this.scope.events);
  5486. const mappingInfo = {
  5487. context: interactable._context,
  5488. interactable
  5489. };
  5490. this.scope.addDocument(interactable._doc);
  5491. this.list.push(interactable);
  5492. if (is.string(target)) {
  5493. if (!this.selectorMap[target]) {
  5494. this.selectorMap[target] = [];
  5495. }
  5496. this.selectorMap[target].push(mappingInfo);
  5497. } else {
  5498. if (!interactable.target[this.scope.id]) {
  5499. Object.defineProperty(target, this.scope.id, {
  5500. value: [],
  5501. configurable: true
  5502. });
  5503. }
  5504. target[this.scope.id].push(mappingInfo);
  5505. }
  5506. this.scope.fire('interactable:new', {
  5507. target,
  5508. options,
  5509. interactable,
  5510. win: this.scope._win
  5511. });
  5512. return interactable;
  5513. }
  5514. get(target, options) {
  5515. const context = options && options.context || this.scope.document;
  5516. const isSelector = is.string(target);
  5517. const targetMappings = isSelector ? this.selectorMap[target] : target[this.scope.id];
  5518. if (!targetMappings) {
  5519. return null;
  5520. }
  5521. const found = find(targetMappings, m => m.context === context && (isSelector || m.interactable.inContext(target)));
  5522. return found && found.interactable;
  5523. }
  5524. forEachMatch(node, callback) {
  5525. for (const interactable of this.list) {
  5526. let ret;
  5527. if ((is.string(interactable.target) // target is a selector and the element matches
  5528. ? is.element(node) && matchesSelector(node, interactable.target) : // target is the element
  5529. node === interactable.target) && // the element is in context
  5530. interactable.inContext(node)) {
  5531. ret = callback(interactable);
  5532. }
  5533. if (ret !== undefined) {
  5534. return ret;
  5535. }
  5536. }
  5537. }
  5538. }
  5539. //# sourceMappingURL=InteractableSet.js.map
  5540. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/pointerExtend.js
  5541. function pointerExtend(dest, source) {
  5542. for (const prop in source) {
  5543. const prefixedPropREs = pointerExtend.prefixedPropREs;
  5544. let deprecated = false; // skip deprecated prefixed properties
  5545. for (const vendor in prefixedPropREs) {
  5546. if (prop.indexOf(vendor) === 0 && prefixedPropREs[vendor].test(prop)) {
  5547. deprecated = true;
  5548. break;
  5549. }
  5550. }
  5551. if (!deprecated && typeof source[prop] !== 'function') {
  5552. dest[prop] = source[prop];
  5553. }
  5554. }
  5555. return dest;
  5556. }
  5557. pointerExtend.prefixedPropREs = {
  5558. webkit: /(Movement[XY]|Radius[XY]|RotationAngle|Force)$/,
  5559. moz: /(Pressure)$/
  5560. };
  5561. /* harmony default export */ var utils_pointerExtend = (pointerExtend);
  5562. //# sourceMappingURL=pointerExtend.js.map
  5563. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/pointerUtils.js
  5564. function copyCoords(dest, src) {
  5565. dest.page = dest.page || {};
  5566. dest.page.x = src.page.x;
  5567. dest.page.y = src.page.y;
  5568. dest.client = dest.client || {};
  5569. dest.client.x = src.client.x;
  5570. dest.client.y = src.client.y;
  5571. dest.timeStamp = src.timeStamp;
  5572. }
  5573. function setCoordDeltas(targetObj, prev, cur) {
  5574. targetObj.page.x = cur.page.x - prev.page.x;
  5575. targetObj.page.y = cur.page.y - prev.page.y;
  5576. targetObj.client.x = cur.client.x - prev.client.x;
  5577. targetObj.client.y = cur.client.y - prev.client.y;
  5578. targetObj.timeStamp = cur.timeStamp - prev.timeStamp;
  5579. }
  5580. function setCoordVelocity(targetObj, delta) {
  5581. const dt = Math.max(delta.timeStamp / 1000, 0.001);
  5582. targetObj.page.x = delta.page.x / dt;
  5583. targetObj.page.y = delta.page.y / dt;
  5584. targetObj.client.x = delta.client.x / dt;
  5585. targetObj.client.y = delta.client.y / dt;
  5586. targetObj.timeStamp = dt;
  5587. }
  5588. function setZeroCoords(targetObj) {
  5589. targetObj.page.x = 0;
  5590. targetObj.page.y = 0;
  5591. targetObj.client.x = 0;
  5592. targetObj.client.y = 0;
  5593. }
  5594. function isNativePointer(pointer) {
  5595. return pointer instanceof utils_domObjects.Event || pointer instanceof utils_domObjects.Touch;
  5596. } // Get specified X/Y coords for mouse or event.touches[0]
  5597. function getXY(type, pointer, xy) {
  5598. xy = xy || {};
  5599. type = type || 'page';
  5600. xy.x = pointer[type + 'X'];
  5601. xy.y = pointer[type + 'Y'];
  5602. return xy;
  5603. }
  5604. function getPageXY(pointer, page) {
  5605. page = page || {
  5606. x: 0,
  5607. y: 0
  5608. }; // Opera Mobile handles the viewport and scrolling oddly
  5609. if (utils_browser.isOperaMobile && isNativePointer(pointer)) {
  5610. getXY('screen', pointer, page);
  5611. page.x += window.scrollX;
  5612. page.y += window.scrollY;
  5613. } else {
  5614. getXY('page', pointer, page);
  5615. }
  5616. return page;
  5617. }
  5618. function getClientXY(pointer, client) {
  5619. client = client || {};
  5620. if (utils_browser.isOperaMobile && isNativePointer(pointer)) {
  5621. // Opera Mobile handles the viewport and scrolling oddly
  5622. getXY('screen', pointer, client);
  5623. } else {
  5624. getXY('client', pointer, client);
  5625. }
  5626. return client;
  5627. }
  5628. function getPointerId(pointer) {
  5629. return is.number(pointer.pointerId) ? pointer.pointerId : pointer.identifier;
  5630. }
  5631. function setCoords(dest, pointers, timeStamp) {
  5632. const pointer = pointers.length > 1 ? pointerAverage(pointers) : pointers[0];
  5633. getPageXY(pointer, dest.page);
  5634. getClientXY(pointer, dest.client);
  5635. dest.timeStamp = timeStamp;
  5636. }
  5637. function getTouchPair(event) {
  5638. const touches = []; // array of touches is supplied
  5639. if (is.array(event)) {
  5640. touches[0] = event[0];
  5641. touches[1] = event[1];
  5642. } // an event
  5643. else {
  5644. if (event.type === 'touchend') {
  5645. if (event.touches.length === 1) {
  5646. touches[0] = event.touches[0];
  5647. touches[1] = event.changedTouches[0];
  5648. } else if (event.touches.length === 0) {
  5649. touches[0] = event.changedTouches[0];
  5650. touches[1] = event.changedTouches[1];
  5651. }
  5652. } else {
  5653. touches[0] = event.touches[0];
  5654. touches[1] = event.touches[1];
  5655. }
  5656. }
  5657. return touches;
  5658. }
  5659. function pointerAverage(pointers) {
  5660. const average = {
  5661. pageX: 0,
  5662. pageY: 0,
  5663. clientX: 0,
  5664. clientY: 0,
  5665. screenX: 0,
  5666. screenY: 0
  5667. };
  5668. for (const pointer of pointers) {
  5669. for (const prop in average) {
  5670. average[prop] += pointer[prop];
  5671. }
  5672. }
  5673. for (const prop in average) {
  5674. average[prop] /= pointers.length;
  5675. }
  5676. return average;
  5677. }
  5678. function touchBBox(event) {
  5679. if (!event.length) {
  5680. return null;
  5681. }
  5682. const touches = getTouchPair(event);
  5683. const minX = Math.min(touches[0].pageX, touches[1].pageX);
  5684. const minY = Math.min(touches[0].pageY, touches[1].pageY);
  5685. const maxX = Math.max(touches[0].pageX, touches[1].pageX);
  5686. const maxY = Math.max(touches[0].pageY, touches[1].pageY);
  5687. return {
  5688. x: minX,
  5689. y: minY,
  5690. left: minX,
  5691. top: minY,
  5692. right: maxX,
  5693. bottom: maxY,
  5694. width: maxX - minX,
  5695. height: maxY - minY
  5696. };
  5697. }
  5698. function touchDistance(event, deltaSource) {
  5699. const sourceX = deltaSource + 'X';
  5700. const sourceY = deltaSource + 'Y';
  5701. const touches = getTouchPair(event);
  5702. const dx = touches[0][sourceX] - touches[1][sourceX];
  5703. const dy = touches[0][sourceY] - touches[1][sourceY];
  5704. return hypot(dx, dy);
  5705. }
  5706. function touchAngle(event, deltaSource) {
  5707. const sourceX = deltaSource + 'X';
  5708. const sourceY = deltaSource + 'Y';
  5709. const touches = getTouchPair(event);
  5710. const dx = touches[1][sourceX] - touches[0][sourceX];
  5711. const dy = touches[1][sourceY] - touches[0][sourceY];
  5712. const angle = 180 * Math.atan2(dy, dx) / Math.PI;
  5713. return angle;
  5714. }
  5715. function getPointerType(pointer) {
  5716. return is.string(pointer.pointerType) ? pointer.pointerType : is.number(pointer.pointerType) ? [undefined, undefined, 'touch', 'pen', 'mouse'][pointer.pointerType] // if the PointerEvent API isn't available, then the "pointer" must
  5717. // be either a MouseEvent, TouchEvent, or Touch object
  5718. : /touch/.test(pointer.type) || pointer instanceof utils_domObjects.Touch ? 'touch' : 'mouse';
  5719. } // [ event.target, event.currentTarget ]
  5720. function getEventTargets(event) {
  5721. const path = is.func(event.composedPath) ? event.composedPath() : event.path;
  5722. return [getActualElement(path ? path[0] : event.target), getActualElement(event.currentTarget)];
  5723. }
  5724. function newCoords() {
  5725. return {
  5726. page: {
  5727. x: 0,
  5728. y: 0
  5729. },
  5730. client: {
  5731. x: 0,
  5732. y: 0
  5733. },
  5734. timeStamp: 0
  5735. };
  5736. }
  5737. function coordsToEvent(coords) {
  5738. const event = {
  5739. coords,
  5740. get page() {
  5741. return this.coords.page;
  5742. },
  5743. get client() {
  5744. return this.coords.client;
  5745. },
  5746. get timeStamp() {
  5747. return this.coords.timeStamp;
  5748. },
  5749. get pageX() {
  5750. return this.coords.page.x;
  5751. },
  5752. get pageY() {
  5753. return this.coords.page.y;
  5754. },
  5755. get clientX() {
  5756. return this.coords.client.x;
  5757. },
  5758. get clientY() {
  5759. return this.coords.client.y;
  5760. },
  5761. get pointerId() {
  5762. return this.coords.pointerId;
  5763. },
  5764. get target() {
  5765. return this.coords.target;
  5766. },
  5767. get type() {
  5768. return this.coords.type;
  5769. },
  5770. get pointerType() {
  5771. return this.coords.pointerType;
  5772. },
  5773. get buttons() {
  5774. return this.coords.buttons;
  5775. },
  5776. preventDefault() {}
  5777. };
  5778. return event;
  5779. }
  5780. //# sourceMappingURL=pointerUtils.js.map
  5781. // CONCATENATED MODULE: ./node_modules/@interactjs/core/events.js
  5782. function events_install(scope) {
  5783. const targets = [];
  5784. const delegatedEvents = {};
  5785. const documents = [];
  5786. const eventsMethods = {
  5787. add,
  5788. remove,
  5789. addDelegate,
  5790. removeDelegate,
  5791. delegateListener,
  5792. delegateUseCapture,
  5793. delegatedEvents,
  5794. documents,
  5795. targets,
  5796. supportsOptions: false,
  5797. supportsPassive: false
  5798. }; // check if browser supports passive events and options arg
  5799. scope.document.createElement('div').addEventListener('test', null, {
  5800. get capture() {
  5801. return eventsMethods.supportsOptions = true;
  5802. },
  5803. get passive() {
  5804. return eventsMethods.supportsPassive = true;
  5805. }
  5806. });
  5807. scope.events = eventsMethods;
  5808. function add(eventTarget, type, listener, optionalArg) {
  5809. const options = getOptions(optionalArg);
  5810. let target = find(targets, t => t.eventTarget === eventTarget);
  5811. if (!target) {
  5812. target = {
  5813. eventTarget,
  5814. events: {}
  5815. };
  5816. targets.push(target);
  5817. }
  5818. if (!target.events[type]) {
  5819. target.events[type] = [];
  5820. }
  5821. if (eventTarget.addEventListener && !contains(target.events[type], listener)) {
  5822. eventTarget.addEventListener(type, listener, eventsMethods.supportsOptions ? options : options.capture);
  5823. target.events[type].push(listener);
  5824. }
  5825. }
  5826. function remove(eventTarget, type, listener, optionalArg) {
  5827. const options = getOptions(optionalArg);
  5828. const targetIndex = findIndex(targets, t => t.eventTarget === eventTarget);
  5829. const target = targets[targetIndex];
  5830. if (!target || !target.events) {
  5831. return;
  5832. }
  5833. if (type === 'all') {
  5834. for (type in target.events) {
  5835. if (target.events.hasOwnProperty(type)) {
  5836. remove(eventTarget, type, 'all');
  5837. }
  5838. }
  5839. return;
  5840. }
  5841. let typeIsEmpty = false;
  5842. const typeListeners = target.events[type];
  5843. if (typeListeners) {
  5844. if (listener === 'all') {
  5845. for (let i = typeListeners.length - 1; i >= 0; i--) {
  5846. remove(eventTarget, type, typeListeners[i], options);
  5847. }
  5848. return;
  5849. } else {
  5850. for (let i = 0; i < typeListeners.length; i++) {
  5851. if (typeListeners[i] === listener) {
  5852. eventTarget.removeEventListener(type, listener, eventsMethods.supportsOptions ? options : options.capture);
  5853. typeListeners.splice(i, 1);
  5854. if (typeListeners.length === 0) {
  5855. delete target.events[type];
  5856. typeIsEmpty = true;
  5857. }
  5858. break;
  5859. }
  5860. }
  5861. }
  5862. }
  5863. if (typeIsEmpty && !Object.keys(target.events).length) {
  5864. targets.splice(targetIndex, 1);
  5865. }
  5866. }
  5867. function addDelegate(selector, context, type, listener, optionalArg) {
  5868. const options = getOptions(optionalArg);
  5869. if (!delegatedEvents[type]) {
  5870. delegatedEvents[type] = []; // add delegate listener functions
  5871. for (const doc of documents) {
  5872. add(doc, type, delegateListener);
  5873. add(doc, type, delegateUseCapture, true);
  5874. }
  5875. }
  5876. const delegates = delegatedEvents[type];
  5877. let delegate = find(delegates, d => d.selector === selector && d.context === context);
  5878. if (!delegate) {
  5879. delegate = {
  5880. selector,
  5881. context,
  5882. listeners: []
  5883. };
  5884. delegates.push(delegate);
  5885. }
  5886. delegate.listeners.push([listener, options]);
  5887. }
  5888. function removeDelegate(selector, context, type, listener, optionalArg) {
  5889. const options = getOptions(optionalArg);
  5890. const delegates = delegatedEvents[type];
  5891. let matchFound = false;
  5892. let index;
  5893. if (!delegates) {
  5894. return;
  5895. } // count from last index of delegated to 0
  5896. for (index = delegates.length - 1; index >= 0; index--) {
  5897. const cur = delegates[index]; // look for matching selector and context Node
  5898. if (cur.selector === selector && cur.context === context) {
  5899. const {
  5900. listeners
  5901. } = cur; // each item of the listeners array is an array: [function, capture, passive]
  5902. for (let i = listeners.length - 1; i >= 0; i--) {
  5903. const [fn, {
  5904. capture,
  5905. passive
  5906. }] = listeners[i]; // check if the listener functions and capture and passive flags match
  5907. if (fn === listener && capture === options.capture && passive === options.passive) {
  5908. // remove the listener from the array of listeners
  5909. listeners.splice(i, 1); // if all listeners for this target have been removed
  5910. // remove the target from the delegates array
  5911. if (!listeners.length) {
  5912. delegates.splice(index, 1); // remove delegate function from context
  5913. remove(context, type, delegateListener);
  5914. remove(context, type, delegateUseCapture, true);
  5915. } // only remove one listener
  5916. matchFound = true;
  5917. break;
  5918. }
  5919. }
  5920. if (matchFound) {
  5921. break;
  5922. }
  5923. }
  5924. }
  5925. } // bound to the interactable context when a DOM event
  5926. // listener is added to a selector interactable
  5927. function delegateListener(event, optionalArg) {
  5928. const options = getOptions(optionalArg);
  5929. const fakeEvent = new events_FakeEvent(event);
  5930. const delegates = delegatedEvents[event.type];
  5931. const [eventTarget] = getEventTargets(event);
  5932. let element = eventTarget; // climb up document tree looking for selector matches
  5933. while (is.element(element)) {
  5934. for (let i = 0; i < delegates.length; i++) {
  5935. const cur = delegates[i];
  5936. const {
  5937. selector,
  5938. context
  5939. } = cur;
  5940. if (matchesSelector(element, selector) && nodeContains(context, eventTarget) && nodeContains(context, element)) {
  5941. const {
  5942. listeners
  5943. } = cur;
  5944. fakeEvent.currentTarget = element;
  5945. for (const [fn, {
  5946. capture,
  5947. passive
  5948. }] of listeners) {
  5949. if (capture === options.capture && passive === options.passive) {
  5950. fn(fakeEvent);
  5951. }
  5952. }
  5953. }
  5954. }
  5955. element = parentNode(element);
  5956. }
  5957. }
  5958. function delegateUseCapture(event) {
  5959. return delegateListener.call(this, event, true);
  5960. } // for type inferrence
  5961. return eventsMethods;
  5962. }
  5963. class events_FakeEvent {
  5964. constructor(originalEvent) {
  5965. this.currentTarget = void 0;
  5966. this.originalEvent = void 0;
  5967. this.type = void 0;
  5968. this.originalEvent = originalEvent; // duplicate the event so that currentTarget can be changed
  5969. utils_pointerExtend(this, originalEvent);
  5970. }
  5971. preventOriginalDefault() {
  5972. this.originalEvent.preventDefault();
  5973. }
  5974. stopPropagation() {
  5975. this.originalEvent.stopPropagation();
  5976. }
  5977. stopImmediatePropagation() {
  5978. this.originalEvent.stopImmediatePropagation();
  5979. }
  5980. }
  5981. function getOptions(param) {
  5982. if (!is.object(param)) {
  5983. return {
  5984. capture: !!param,
  5985. passive: false
  5986. };
  5987. }
  5988. const options = extend({}, param);
  5989. options.capture = !!param.capture;
  5990. options.passive = !!param.passive;
  5991. return options;
  5992. }
  5993. /* harmony default export */ var events = ({
  5994. id: 'events',
  5995. install: events_install
  5996. });
  5997. //# sourceMappingURL=events.js.map
  5998. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/misc.js
  5999. function warnOnce(method, message) {
  6000. let warned = false;
  6001. return function () {
  6002. if (!warned) {
  6003. win.console.warn(message);
  6004. warned = true;
  6005. }
  6006. return method.apply(this, arguments);
  6007. };
  6008. }
  6009. function copyAction(dest, src) {
  6010. dest.name = src.name;
  6011. dest.axis = src.axis;
  6012. dest.edges = src.edges;
  6013. return dest;
  6014. }
  6015. //# sourceMappingURL=misc.js.map
  6016. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactStatic.js
  6017. /** @module interact */
  6018. function createInteractStatic(scope) {
  6019. /**
  6020. * ```js
  6021. * interact('#draggable').draggable(true)
  6022. *
  6023. * var rectables = interact('rect')
  6024. * rectables
  6025. * .gesturable(true)
  6026. * .on('gesturemove', function (event) {
  6027. * // ...
  6028. * })
  6029. * ```
  6030. *
  6031. * The methods of this variable can be used to set elements as interactables
  6032. * and also to change various default settings.
  6033. *
  6034. * Calling it as a function and passing an element or a valid CSS selector
  6035. * string returns an Interactable object which has various methods to configure
  6036. * it.
  6037. *
  6038. * @global
  6039. *
  6040. * @param {Element | string} target The HTML or SVG Element to interact with
  6041. * or CSS selector
  6042. * @return {Interactable}
  6043. */
  6044. const interact = (target, options) => {
  6045. let interactable = scope.interactables.get(target, options);
  6046. if (!interactable) {
  6047. interactable = scope.interactables.new(target, options);
  6048. interactable.events.global = interact.globalEvents;
  6049. }
  6050. return interactable;
  6051. }; // expose the functions used to calculate multi-touch properties
  6052. interact.getPointerAverage = pointerAverage;
  6053. interact.getTouchBBox = touchBBox;
  6054. interact.getTouchDistance = touchDistance;
  6055. interact.getTouchAngle = touchAngle;
  6056. interact.getElementRect = getElementRect;
  6057. interact.getElementClientRect = getElementClientRect;
  6058. interact.matchesSelector = matchesSelector;
  6059. interact.closest = domUtils_closest;
  6060. interact.globalEvents = {}; // eslint-disable-next-line no-undef
  6061. interact.version = "1.10.2";
  6062. interact.scope = scope;
  6063. /**
  6064. * Use a plugin
  6065. *
  6066. * @alias module:interact.use
  6067. *
  6068. */
  6069. interact.use = function (plugin, options) {
  6070. this.scope.usePlugin(plugin, options);
  6071. return this;
  6072. };
  6073. /**
  6074. * Check if an element or selector has been set with the {@link interact}
  6075. * function
  6076. *
  6077. * @alias module:interact.isSet
  6078. *
  6079. * @param {Target} target The Element or string being searched for
  6080. * @param {object} options
  6081. * @return {boolean} Indicates if the element or CSS selector was previously
  6082. * passed to interact
  6083. */
  6084. interact.isSet = function (target, options) {
  6085. return !!this.scope.interactables.get(target, options && options.context);
  6086. };
  6087. /**
  6088. * @deprecated
  6089. * Add a global listener for an InteractEvent or adds a DOM event to `document`
  6090. *
  6091. * @alias module:interact.on
  6092. *
  6093. * @param {string | array | object} type The types of events to listen for
  6094. * @param {function} listener The function event (s)
  6095. * @param {object | boolean} [options] object or useCapture flag for
  6096. * addEventListener
  6097. * @return {object} interact
  6098. */
  6099. interact.on = warnOnce(function on(type, listener, options) {
  6100. if (is.string(type) && type.search(' ') !== -1) {
  6101. type = type.trim().split(/ +/);
  6102. }
  6103. if (is.array(type)) {
  6104. for (const eventType of type) {
  6105. this.on(eventType, listener, options);
  6106. }
  6107. return this;
  6108. }
  6109. if (is.object(type)) {
  6110. for (const prop in type) {
  6111. this.on(prop, type[prop], listener);
  6112. }
  6113. return this;
  6114. } // if it is an InteractEvent type, add listener to globalEvents
  6115. if (isNonNativeEvent(type, this.scope.actions)) {
  6116. // if this type of event was never bound
  6117. if (!this.globalEvents[type]) {
  6118. this.globalEvents[type] = [listener];
  6119. } else {
  6120. this.globalEvents[type].push(listener);
  6121. }
  6122. } // If non InteractEvent type, addEventListener to document
  6123. else {
  6124. this.scope.events.add(this.scope.document, type, listener, {
  6125. options
  6126. });
  6127. }
  6128. return this;
  6129. }, 'The interact.on() method is being deprecated');
  6130. /**
  6131. * @deprecated
  6132. * Removes a global InteractEvent listener or DOM event from `document`
  6133. *
  6134. * @alias module:interact.off
  6135. *
  6136. * @param {string | array | object} type The types of events that were listened
  6137. * for
  6138. * @param {function} listener The listener function to be removed
  6139. * @param {object | boolean} options [options] object or useCapture flag for
  6140. * removeEventListener
  6141. * @return {object} interact
  6142. */
  6143. interact.off = warnOnce(function off(type, listener, options) {
  6144. if (is.string(type) && type.search(' ') !== -1) {
  6145. type = type.trim().split(/ +/);
  6146. }
  6147. if (is.array(type)) {
  6148. for (const eventType of type) {
  6149. this.off(eventType, listener, options);
  6150. }
  6151. return this;
  6152. }
  6153. if (is.object(type)) {
  6154. for (const prop in type) {
  6155. this.off(prop, type[prop], listener);
  6156. }
  6157. return this;
  6158. }
  6159. if (isNonNativeEvent(type, this.scope.actions)) {
  6160. let index;
  6161. if (type in this.globalEvents && (index = this.globalEvents[type].indexOf(listener)) !== -1) {
  6162. this.globalEvents[type].splice(index, 1);
  6163. }
  6164. } else {
  6165. this.scope.events.remove(this.scope.document, type, listener, options);
  6166. }
  6167. return this;
  6168. }, 'The interact.off() method is being deprecated');
  6169. interact.debug = function () {
  6170. return this.scope;
  6171. };
  6172. /**
  6173. * @alias module:interact.supportsTouch
  6174. *
  6175. * @return {boolean} Whether or not the browser supports touch input
  6176. */
  6177. interact.supportsTouch = function () {
  6178. return utils_browser.supportsTouch;
  6179. };
  6180. /**
  6181. * @alias module:interact.supportsPointerEvent
  6182. *
  6183. * @return {boolean} Whether or not the browser supports PointerEvents
  6184. */
  6185. interact.supportsPointerEvent = function () {
  6186. return utils_browser.supportsPointerEvent;
  6187. };
  6188. /**
  6189. * Cancels all interactions (end events are not fired)
  6190. *
  6191. * @alias module:interact.stop
  6192. *
  6193. * @return {object} interact
  6194. */
  6195. interact.stop = function () {
  6196. for (const interaction of this.scope.interactions.list) {
  6197. interaction.stop();
  6198. }
  6199. return this;
  6200. };
  6201. /**
  6202. * Returns or sets the distance the pointer must be moved before an action
  6203. * sequence occurs. This also affects tolerance for tap events.
  6204. *
  6205. * @alias module:interact.pointerMoveTolerance
  6206. *
  6207. * @param {number} [newValue] The movement from the start position must be greater than this value
  6208. * @return {interact | number}
  6209. */
  6210. interact.pointerMoveTolerance = function (newValue) {
  6211. if (is.number(newValue)) {
  6212. this.scope.interactions.pointerMoveTolerance = newValue;
  6213. return this;
  6214. }
  6215. return this.scope.interactions.pointerMoveTolerance;
  6216. };
  6217. interact.addDocument = function (doc, options) {
  6218. this.scope.addDocument(doc, options);
  6219. };
  6220. interact.removeDocument = function (doc) {
  6221. this.scope.removeDocument(doc);
  6222. };
  6223. return interact;
  6224. }
  6225. //# sourceMappingURL=interactStatic.js.map
  6226. // CONCATENATED MODULE: ./node_modules/@interactjs/core/PointerInfo.js
  6227. class PointerInfo {
  6228. constructor(id, pointer, event, downTime, downTarget) {
  6229. this.id = void 0;
  6230. this.pointer = void 0;
  6231. this.event = void 0;
  6232. this.downTime = void 0;
  6233. this.downTarget = void 0;
  6234. this.id = id;
  6235. this.pointer = pointer;
  6236. this.event = event;
  6237. this.downTime = downTime;
  6238. this.downTarget = downTarget;
  6239. }
  6240. }
  6241. //# sourceMappingURL=PointerInfo.js.map
  6242. // CONCATENATED MODULE: ./node_modules/@interactjs/core/Interaction.js
  6243. let _ProxyValues;
  6244. (function (_ProxyValues) {
  6245. _ProxyValues["interactable"] = "";
  6246. _ProxyValues["element"] = "";
  6247. _ProxyValues["prepared"] = "";
  6248. _ProxyValues["pointerIsDown"] = "";
  6249. _ProxyValues["pointerWasMoved"] = "";
  6250. _ProxyValues["_proxy"] = "";
  6251. })(_ProxyValues || (_ProxyValues = {}));
  6252. let _ProxyMethods;
  6253. (function (_ProxyMethods) {
  6254. _ProxyMethods["start"] = "";
  6255. _ProxyMethods["move"] = "";
  6256. _ProxyMethods["end"] = "";
  6257. _ProxyMethods["stop"] = "";
  6258. _ProxyMethods["interacting"] = "";
  6259. })(_ProxyMethods || (_ProxyMethods = {}));
  6260. let idCounter = 0;
  6261. class Interaction_Interaction {
  6262. // current interactable being interacted with
  6263. // the target element of the interactable
  6264. // action that's ready to be fired on next move event
  6265. // keep track of added pointers
  6266. // pointerdown/mousedown/touchstart event
  6267. // previous action event
  6268. /** @internal */
  6269. get pointerMoveTolerance() {
  6270. return 1;
  6271. }
  6272. /**
  6273. * @alias Interaction.prototype.move
  6274. */
  6275. /** */
  6276. constructor({
  6277. pointerType,
  6278. scopeFire
  6279. }) {
  6280. this.interactable = null;
  6281. this.element = null;
  6282. this.rect = void 0;
  6283. this._rects = void 0;
  6284. this.edges = void 0;
  6285. this._scopeFire = void 0;
  6286. this.prepared = {
  6287. name: null,
  6288. axis: null,
  6289. edges: null
  6290. };
  6291. this.pointerType = void 0;
  6292. this.pointers = [];
  6293. this.downEvent = null;
  6294. this.downPointer = {};
  6295. this._latestPointer = {
  6296. pointer: null,
  6297. event: null,
  6298. eventTarget: null
  6299. };
  6300. this.prevEvent = null;
  6301. this.pointerIsDown = false;
  6302. this.pointerWasMoved = false;
  6303. this._interacting = false;
  6304. this._ending = false;
  6305. this._stopped = true;
  6306. this._proxy = null;
  6307. this.simulation = null;
  6308. this.doMove = warnOnce(function (signalArg) {
  6309. this.move(signalArg);
  6310. }, 'The interaction.doMove() method has been renamed to interaction.move()');
  6311. this.coords = {
  6312. // Starting InteractEvent pointer coordinates
  6313. start: newCoords(),
  6314. // Previous native pointer move event coordinates
  6315. prev: newCoords(),
  6316. // current native pointer move event coordinates
  6317. cur: newCoords(),
  6318. // Change in coordinates and time of the pointer
  6319. delta: newCoords(),
  6320. // pointer velocity
  6321. velocity: newCoords()
  6322. };
  6323. this._id = idCounter++;
  6324. this._scopeFire = scopeFire;
  6325. this.pointerType = pointerType;
  6326. const that = this;
  6327. this._proxy = {};
  6328. for (const key in _ProxyValues) {
  6329. Object.defineProperty(this._proxy, key, {
  6330. get() {
  6331. return that[key];
  6332. }
  6333. });
  6334. }
  6335. for (const key in _ProxyMethods) {
  6336. Object.defineProperty(this._proxy, key, {
  6337. value: (...args) => that[key](...args)
  6338. });
  6339. }
  6340. this._scopeFire('interactions:new', {
  6341. interaction: this
  6342. });
  6343. }
  6344. pointerDown(pointer, event, eventTarget) {
  6345. const pointerIndex = this.updatePointer(pointer, event, eventTarget, true);
  6346. const pointerInfo = this.pointers[pointerIndex];
  6347. this._scopeFire('interactions:down', {
  6348. pointer,
  6349. event,
  6350. eventTarget,
  6351. pointerIndex,
  6352. pointerInfo,
  6353. type: 'down',
  6354. interaction: this
  6355. });
  6356. }
  6357. /**
  6358. * ```js
  6359. * interact(target)
  6360. * .draggable({
  6361. * // disable the default drag start by down->move
  6362. * manualStart: true
  6363. * })
  6364. * // start dragging after the user holds the pointer down
  6365. * .on('hold', function (event) {
  6366. * var interaction = event.interaction
  6367. *
  6368. * if (!interaction.interacting()) {
  6369. * interaction.start({ name: 'drag' },
  6370. * event.interactable,
  6371. * event.currentTarget)
  6372. * }
  6373. * })
  6374. * ```
  6375. *
  6376. * Start an action with the given Interactable and Element as tartgets. The
  6377. * action must be enabled for the target Interactable and an appropriate
  6378. * number of pointers must be held down - 1 for drag/resize, 2 for gesture.
  6379. *
  6380. * Use it with `interactable.<action>able({ manualStart: false })` to always
  6381. * [start actions manually](https://github.com/taye/interact.js/issues/114)
  6382. *
  6383. * @param {object} action The action to be performed - drag, resize, etc.
  6384. * @param {Interactable} target The Interactable to target
  6385. * @param {Element} element The DOM Element to target
  6386. * @return {Boolean} Whether the interaction was successfully started
  6387. */
  6388. start(action, interactable, element) {
  6389. if (this.interacting() || !this.pointerIsDown || this.pointers.length < (action.name === 'gesture' ? 2 : 1) || !interactable.options[action.name].enabled) {
  6390. return false;
  6391. }
  6392. copyAction(this.prepared, action);
  6393. this.interactable = interactable;
  6394. this.element = element;
  6395. this.rect = interactable.getRect(element);
  6396. this.edges = this.prepared.edges ? extend({}, this.prepared.edges) : {
  6397. left: true,
  6398. right: true,
  6399. top: true,
  6400. bottom: true
  6401. };
  6402. this._stopped = false;
  6403. this._interacting = this._doPhase({
  6404. interaction: this,
  6405. event: this.downEvent,
  6406. phase: 'start'
  6407. }) && !this._stopped;
  6408. return this._interacting;
  6409. }
  6410. pointerMove(pointer, event, eventTarget) {
  6411. if (!this.simulation && !(this.modification && this.modification.endResult)) {
  6412. this.updatePointer(pointer, event, eventTarget, false);
  6413. }
  6414. const duplicateMove = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
  6415. let dx;
  6416. let dy; // register movement greater than pointerMoveTolerance
  6417. if (this.pointerIsDown && !this.pointerWasMoved) {
  6418. dx = this.coords.cur.client.x - this.coords.start.client.x;
  6419. dy = this.coords.cur.client.y - this.coords.start.client.y;
  6420. this.pointerWasMoved = hypot(dx, dy) > this.pointerMoveTolerance;
  6421. }
  6422. const pointerIndex = this.getPointerIndex(pointer);
  6423. const signalArg = {
  6424. pointer,
  6425. pointerIndex,
  6426. pointerInfo: this.pointers[pointerIndex],
  6427. event,
  6428. type: 'move',
  6429. eventTarget,
  6430. dx,
  6431. dy,
  6432. duplicate: duplicateMove,
  6433. interaction: this
  6434. };
  6435. if (!duplicateMove) {
  6436. // set pointer coordinate, time changes and velocity
  6437. setCoordVelocity(this.coords.velocity, this.coords.delta);
  6438. }
  6439. this._scopeFire('interactions:move', signalArg);
  6440. if (!duplicateMove && !this.simulation) {
  6441. // if interacting, fire an 'action-move' signal etc
  6442. if (this.interacting()) {
  6443. signalArg.type = null;
  6444. this.move(signalArg);
  6445. }
  6446. if (this.pointerWasMoved) {
  6447. copyCoords(this.coords.prev, this.coords.cur);
  6448. }
  6449. }
  6450. }
  6451. /**
  6452. * ```js
  6453. * interact(target)
  6454. * .draggable(true)
  6455. * .on('dragmove', function (event) {
  6456. * if (someCondition) {
  6457. * // change the snap settings
  6458. * event.interactable.draggable({ snap: { targets: [] }})
  6459. * // fire another move event with re-calculated snap
  6460. * event.interaction.move()
  6461. * }
  6462. * })
  6463. * ```
  6464. *
  6465. * Force a move of the current action at the same coordinates. Useful if
  6466. * snap/restrict has been changed and you want a movement with the new
  6467. * settings.
  6468. */
  6469. move(signalArg) {
  6470. if (!signalArg || !signalArg.event) {
  6471. setZeroCoords(this.coords.delta);
  6472. }
  6473. signalArg = extend({
  6474. pointer: this._latestPointer.pointer,
  6475. event: this._latestPointer.event,
  6476. eventTarget: this._latestPointer.eventTarget,
  6477. interaction: this
  6478. }, signalArg || {});
  6479. signalArg.phase = 'move';
  6480. this._doPhase(signalArg);
  6481. } // End interact move events and stop auto-scroll unless simulation is running
  6482. pointerUp(pointer, event, eventTarget, curEventTarget) {
  6483. let pointerIndex = this.getPointerIndex(pointer);
  6484. if (pointerIndex === -1) {
  6485. pointerIndex = this.updatePointer(pointer, event, eventTarget, false);
  6486. }
  6487. const type = /cancel$/i.test(event.type) ? 'cancel' : 'up';
  6488. this._scopeFire(`interactions:${type}`, {
  6489. pointer,
  6490. pointerIndex,
  6491. pointerInfo: this.pointers[pointerIndex],
  6492. event,
  6493. eventTarget,
  6494. type: type,
  6495. curEventTarget,
  6496. interaction: this
  6497. });
  6498. if (!this.simulation) {
  6499. this.end(event);
  6500. }
  6501. this.removePointer(pointer, event);
  6502. }
  6503. documentBlur(event) {
  6504. this.end(event);
  6505. this._scopeFire('interactions:blur', {
  6506. event,
  6507. type: 'blur',
  6508. interaction: this
  6509. });
  6510. }
  6511. /**
  6512. * ```js
  6513. * interact(target)
  6514. * .draggable(true)
  6515. * .on('move', function (event) {
  6516. * if (event.pageX > 1000) {
  6517. * // end the current action
  6518. * event.interaction.end()
  6519. * // stop all further listeners from being called
  6520. * event.stopImmediatePropagation()
  6521. * }
  6522. * })
  6523. * ```
  6524. *
  6525. * @param {PointerEvent} [event]
  6526. */
  6527. end(event) {
  6528. this._ending = true;
  6529. event = event || this._latestPointer.event;
  6530. let endPhaseResult;
  6531. if (this.interacting()) {
  6532. endPhaseResult = this._doPhase({
  6533. event,
  6534. interaction: this,
  6535. phase: 'end'
  6536. });
  6537. }
  6538. this._ending = false;
  6539. if (endPhaseResult === true) {
  6540. this.stop();
  6541. }
  6542. }
  6543. currentAction() {
  6544. return this._interacting ? this.prepared.name : null;
  6545. }
  6546. interacting() {
  6547. return this._interacting;
  6548. }
  6549. /** */
  6550. stop() {
  6551. this._scopeFire('interactions:stop', {
  6552. interaction: this
  6553. });
  6554. this.interactable = this.element = null;
  6555. this._interacting = false;
  6556. this._stopped = true;
  6557. this.prepared.name = this.prevEvent = null;
  6558. }
  6559. getPointerIndex(pointer) {
  6560. const pointerId = getPointerId(pointer); // mouse and pen interactions may have only one pointer
  6561. return this.pointerType === 'mouse' || this.pointerType === 'pen' ? this.pointers.length - 1 : findIndex(this.pointers, curPointer => curPointer.id === pointerId);
  6562. }
  6563. getPointerInfo(pointer) {
  6564. return this.pointers[this.getPointerIndex(pointer)];
  6565. }
  6566. updatePointer(pointer, event, eventTarget, down) {
  6567. const id = getPointerId(pointer);
  6568. let pointerIndex = this.getPointerIndex(pointer);
  6569. let pointerInfo = this.pointers[pointerIndex];
  6570. down = down === false ? false : down || /(down|start)$/i.test(event.type);
  6571. if (!pointerInfo) {
  6572. pointerInfo = new PointerInfo(id, pointer, event, null, null);
  6573. pointerIndex = this.pointers.length;
  6574. this.pointers.push(pointerInfo);
  6575. } else {
  6576. pointerInfo.pointer = pointer;
  6577. }
  6578. setCoords(this.coords.cur, this.pointers.map(p => p.pointer), this._now());
  6579. setCoordDeltas(this.coords.delta, this.coords.prev, this.coords.cur);
  6580. if (down) {
  6581. this.pointerIsDown = true;
  6582. pointerInfo.downTime = this.coords.cur.timeStamp;
  6583. pointerInfo.downTarget = eventTarget;
  6584. utils_pointerExtend(this.downPointer, pointer);
  6585. if (!this.interacting()) {
  6586. copyCoords(this.coords.start, this.coords.cur);
  6587. copyCoords(this.coords.prev, this.coords.cur);
  6588. this.downEvent = event;
  6589. this.pointerWasMoved = false;
  6590. }
  6591. }
  6592. this._updateLatestPointer(pointer, event, eventTarget);
  6593. this._scopeFire('interactions:update-pointer', {
  6594. pointer,
  6595. event,
  6596. eventTarget,
  6597. down,
  6598. pointerInfo,
  6599. pointerIndex,
  6600. interaction: this
  6601. });
  6602. return pointerIndex;
  6603. }
  6604. removePointer(pointer, event) {
  6605. const pointerIndex = this.getPointerIndex(pointer);
  6606. if (pointerIndex === -1) {
  6607. return;
  6608. }
  6609. const pointerInfo = this.pointers[pointerIndex];
  6610. this._scopeFire('interactions:remove-pointer', {
  6611. pointer,
  6612. event,
  6613. eventTarget: null,
  6614. pointerIndex,
  6615. pointerInfo,
  6616. interaction: this
  6617. });
  6618. this.pointers.splice(pointerIndex, 1);
  6619. this.pointerIsDown = false;
  6620. }
  6621. _updateLatestPointer(pointer, event, eventTarget) {
  6622. this._latestPointer.pointer = pointer;
  6623. this._latestPointer.event = event;
  6624. this._latestPointer.eventTarget = eventTarget;
  6625. }
  6626. destroy() {
  6627. this._latestPointer.pointer = null;
  6628. this._latestPointer.event = null;
  6629. this._latestPointer.eventTarget = null;
  6630. }
  6631. _createPreparedEvent(event, phase, preEnd, type) {
  6632. return new InteractEvent_InteractEvent(this, event, this.prepared.name, phase, this.element, preEnd, type);
  6633. }
  6634. _fireEvent(iEvent) {
  6635. this.interactable.fire(iEvent);
  6636. if (!this.prevEvent || iEvent.timeStamp >= this.prevEvent.timeStamp) {
  6637. this.prevEvent = iEvent;
  6638. }
  6639. }
  6640. _doPhase(signalArg) {
  6641. const {
  6642. event,
  6643. phase,
  6644. preEnd,
  6645. type
  6646. } = signalArg;
  6647. const {
  6648. rect
  6649. } = this;
  6650. if (rect && phase === 'move') {
  6651. // update the rect changes due to pointer move
  6652. addEdges(this.edges, rect, this.coords.delta[this.interactable.options.deltaSource]);
  6653. rect.width = rect.right - rect.left;
  6654. rect.height = rect.bottom - rect.top;
  6655. }
  6656. const beforeResult = this._scopeFire(`interactions:before-action-${phase}`, signalArg);
  6657. if (beforeResult === false) {
  6658. return false;
  6659. }
  6660. const iEvent = signalArg.iEvent = this._createPreparedEvent(event, phase, preEnd, type);
  6661. this._scopeFire(`interactions:action-${phase}`, signalArg);
  6662. if (phase === 'start') {
  6663. this.prevEvent = iEvent;
  6664. }
  6665. this._fireEvent(iEvent);
  6666. this._scopeFire(`interactions:after-action-${phase}`, signalArg);
  6667. return true;
  6668. }
  6669. _now() {
  6670. return Date.now();
  6671. }
  6672. }
  6673. /* harmony default export */ var core_Interaction = (Interaction_Interaction);
  6674. //# sourceMappingURL=Interaction.js.map
  6675. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactablePreventDefault.js
  6676. function preventDefault(newValue) {
  6677. if (/^(always|never|auto)$/.test(newValue)) {
  6678. this.options.preventDefault = newValue;
  6679. return this;
  6680. }
  6681. if (is.bool(newValue)) {
  6682. this.options.preventDefault = newValue ? 'always' : 'never';
  6683. return this;
  6684. }
  6685. return this.options.preventDefault;
  6686. }
  6687. function checkAndPreventDefault(interactable, scope, event) {
  6688. const setting = interactable.options.preventDefault;
  6689. if (setting === 'never') {
  6690. return;
  6691. }
  6692. if (setting === 'always') {
  6693. event.preventDefault();
  6694. return;
  6695. } // setting === 'auto'
  6696. // if the browser supports passive event listeners and isn't running on iOS,
  6697. // don't preventDefault of touch{start,move} events. CSS touch-action and
  6698. // user-select should be used instead of calling event.preventDefault().
  6699. if (scope.events.supportsPassive && /^touch(start|move)$/.test(event.type)) {
  6700. const doc = getWindow(event.target).document;
  6701. const docOptions = scope.getDocOptions(doc);
  6702. if (!(docOptions && docOptions.events) || docOptions.events.passive !== false) {
  6703. return;
  6704. }
  6705. } // don't preventDefault of pointerdown events
  6706. if (/^(mouse|pointer|touch)*(down|start)/i.test(event.type)) {
  6707. return;
  6708. } // don't preventDefault on editable elements
  6709. if (is.element(event.target) && matchesSelector(event.target, 'input,select,textarea,[contenteditable=true],[contenteditable=true] *')) {
  6710. return;
  6711. }
  6712. event.preventDefault();
  6713. }
  6714. function onInteractionEvent({
  6715. interaction,
  6716. event
  6717. }) {
  6718. if (interaction.interactable) {
  6719. interaction.interactable.checkAndPreventDefault(event);
  6720. }
  6721. }
  6722. function interactablePreventDefault_install(scope) {
  6723. /** @lends Interactable */
  6724. const {
  6725. Interactable
  6726. } = scope;
  6727. /**
  6728. * Returns or sets whether to prevent the browser's default behaviour in
  6729. * response to pointer events. Can be set to:
  6730. * - `'always'` to always prevent
  6731. * - `'never'` to never prevent
  6732. * - `'auto'` to let interact.js try to determine what would be best
  6733. *
  6734. * @param {string} [newValue] `'always'`, `'never'` or `'auto'`
  6735. * @return {string | Interactable} The current setting or this Interactable
  6736. */
  6737. Interactable.prototype.preventDefault = preventDefault;
  6738. Interactable.prototype.checkAndPreventDefault = function (event) {
  6739. return checkAndPreventDefault(this, scope, event);
  6740. }; // prevent native HTML5 drag on interact.js target elements
  6741. scope.interactions.docEvents.push({
  6742. type: 'dragstart',
  6743. listener(event) {
  6744. for (const interaction of scope.interactions.list) {
  6745. if (interaction.element && (interaction.element === event.target || nodeContains(interaction.element, event.target))) {
  6746. interaction.interactable.checkAndPreventDefault(event);
  6747. return;
  6748. }
  6749. }
  6750. }
  6751. });
  6752. }
  6753. /* harmony default export */ var interactablePreventDefault = ({
  6754. id: 'core/interactablePreventDefault',
  6755. install: interactablePreventDefault_install,
  6756. listeners: ['down', 'move', 'up', 'cancel'].reduce((acc, eventType) => {
  6757. acc[`interactions:${eventType}`] = onInteractionEvent;
  6758. return acc;
  6759. }, {})
  6760. });
  6761. //# sourceMappingURL=interactablePreventDefault.js.map
  6762. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactionFinder.js
  6763. const finder = {
  6764. methodOrder: ['simulationResume', 'mouseOrPen', 'hasPointer', 'idle'],
  6765. search(details) {
  6766. for (const method of finder.methodOrder) {
  6767. const interaction = finder[method](details);
  6768. if (interaction) {
  6769. return interaction;
  6770. }
  6771. }
  6772. return null;
  6773. },
  6774. // try to resume simulation with a new pointer
  6775. simulationResume({
  6776. pointerType,
  6777. eventType,
  6778. eventTarget,
  6779. scope
  6780. }) {
  6781. if (!/down|start/i.test(eventType)) {
  6782. return null;
  6783. }
  6784. for (const interaction of scope.interactions.list) {
  6785. let element = eventTarget;
  6786. if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) {
  6787. while (element) {
  6788. // if the element is the interaction element
  6789. if (element === interaction.element) {
  6790. return interaction;
  6791. }
  6792. element = parentNode(element);
  6793. }
  6794. }
  6795. }
  6796. return null;
  6797. },
  6798. // if it's a mouse or pen interaction
  6799. mouseOrPen({
  6800. pointerId,
  6801. pointerType,
  6802. eventType,
  6803. scope
  6804. }) {
  6805. if (pointerType !== 'mouse' && pointerType !== 'pen') {
  6806. return null;
  6807. }
  6808. let firstNonActive;
  6809. for (const interaction of scope.interactions.list) {
  6810. if (interaction.pointerType === pointerType) {
  6811. // if it's a down event, skip interactions with running simulations
  6812. if (interaction.simulation && !hasPointerId(interaction, pointerId)) {
  6813. continue;
  6814. } // if the interaction is active, return it immediately
  6815. if (interaction.interacting()) {
  6816. return interaction;
  6817. } // otherwise save it and look for another active interaction
  6818. else if (!firstNonActive) {
  6819. firstNonActive = interaction;
  6820. }
  6821. }
  6822. } // if no active mouse interaction was found use the first inactive mouse
  6823. // interaction
  6824. if (firstNonActive) {
  6825. return firstNonActive;
  6826. } // find any mouse or pen interaction.
  6827. // ignore the interaction if the eventType is a *down, and a simulation
  6828. // is active
  6829. for (const interaction of scope.interactions.list) {
  6830. if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {
  6831. return interaction;
  6832. }
  6833. }
  6834. return null;
  6835. },
  6836. // get interaction that has this pointer
  6837. hasPointer({
  6838. pointerId,
  6839. scope
  6840. }) {
  6841. for (const interaction of scope.interactions.list) {
  6842. if (hasPointerId(interaction, pointerId)) {
  6843. return interaction;
  6844. }
  6845. }
  6846. return null;
  6847. },
  6848. // get first idle interaction with a matching pointerType
  6849. idle({
  6850. pointerType,
  6851. scope
  6852. }) {
  6853. for (const interaction of scope.interactions.list) {
  6854. // if there's already a pointer held down
  6855. if (interaction.pointers.length === 1) {
  6856. const target = interaction.interactable; // don't add this pointer if there is a target interactable and it
  6857. // isn't gesturable
  6858. if (target && !(target.options.gesture && target.options.gesture.enabled)) {
  6859. continue;
  6860. }
  6861. } // maximum of 2 pointers per interaction
  6862. else if (interaction.pointers.length >= 2) {
  6863. continue;
  6864. }
  6865. if (!interaction.interacting() && pointerType === interaction.pointerType) {
  6866. return interaction;
  6867. }
  6868. }
  6869. return null;
  6870. }
  6871. };
  6872. function hasPointerId(interaction, pointerId) {
  6873. return interaction.pointers.some(({
  6874. id
  6875. }) => id === pointerId);
  6876. }
  6877. /* harmony default export */ var interactionFinder = (finder);
  6878. //# sourceMappingURL=interactionFinder.js.map
  6879. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactions.js
  6880. const methodNames = ['pointerDown', 'pointerMove', 'pointerUp', 'updatePointer', 'removePointer', 'windowBlur'];
  6881. function interactions_install(scope) {
  6882. const listeners = {};
  6883. for (const method of methodNames) {
  6884. listeners[method] = doOnInteractions(method, scope);
  6885. }
  6886. const pEventTypes = utils_browser.pEventTypes;
  6887. let docEvents;
  6888. if (utils_domObjects.PointerEvent) {
  6889. docEvents = [{
  6890. type: pEventTypes.down,
  6891. listener: releasePointersOnRemovedEls
  6892. }, {
  6893. type: pEventTypes.down,
  6894. listener: listeners.pointerDown
  6895. }, {
  6896. type: pEventTypes.move,
  6897. listener: listeners.pointerMove
  6898. }, {
  6899. type: pEventTypes.up,
  6900. listener: listeners.pointerUp
  6901. }, {
  6902. type: pEventTypes.cancel,
  6903. listener: listeners.pointerUp
  6904. }];
  6905. } else {
  6906. docEvents = [{
  6907. type: 'mousedown',
  6908. listener: listeners.pointerDown
  6909. }, {
  6910. type: 'mousemove',
  6911. listener: listeners.pointerMove
  6912. }, {
  6913. type: 'mouseup',
  6914. listener: listeners.pointerUp
  6915. }, {
  6916. type: 'touchstart',
  6917. listener: releasePointersOnRemovedEls
  6918. }, {
  6919. type: 'touchstart',
  6920. listener: listeners.pointerDown
  6921. }, {
  6922. type: 'touchmove',
  6923. listener: listeners.pointerMove
  6924. }, {
  6925. type: 'touchend',
  6926. listener: listeners.pointerUp
  6927. }, {
  6928. type: 'touchcancel',
  6929. listener: listeners.pointerUp
  6930. }];
  6931. }
  6932. docEvents.push({
  6933. type: 'blur',
  6934. listener(event) {
  6935. for (const interaction of scope.interactions.list) {
  6936. interaction.documentBlur(event);
  6937. }
  6938. }
  6939. }); // for ignoring browser's simulated mouse events
  6940. scope.prevTouchTime = 0;
  6941. scope.Interaction = class extends core_Interaction {
  6942. get pointerMoveTolerance() {
  6943. return scope.interactions.pointerMoveTolerance;
  6944. }
  6945. set pointerMoveTolerance(value) {
  6946. scope.interactions.pointerMoveTolerance = value;
  6947. }
  6948. _now() {
  6949. return scope.now();
  6950. }
  6951. };
  6952. scope.interactions = {
  6953. // all active and idle interactions
  6954. list: [],
  6955. new(options) {
  6956. options.scopeFire = (name, arg) => scope.fire(name, arg);
  6957. const interaction = new scope.Interaction(options);
  6958. scope.interactions.list.push(interaction);
  6959. return interaction;
  6960. },
  6961. listeners,
  6962. docEvents,
  6963. pointerMoveTolerance: 1
  6964. };
  6965. function releasePointersOnRemovedEls() {
  6966. // for all inactive touch interactions with pointers down
  6967. for (const interaction of scope.interactions.list) {
  6968. if (!interaction.pointerIsDown || interaction.pointerType !== 'touch' || interaction._interacting) {
  6969. continue;
  6970. } // if a pointer is down on an element that is no longer in the DOM tree
  6971. for (const pointer of interaction.pointers) {
  6972. if (!scope.documents.some(({
  6973. doc
  6974. }) => nodeContains(doc, pointer.downTarget))) {
  6975. // remove the pointer from the interaction
  6976. interaction.removePointer(pointer.pointer, pointer.event);
  6977. }
  6978. }
  6979. }
  6980. }
  6981. scope.usePlugin(interactablePreventDefault);
  6982. }
  6983. function doOnInteractions(method, scope) {
  6984. return function (event) {
  6985. const interactions = scope.interactions.list;
  6986. const pointerType = getPointerType(event);
  6987. const [eventTarget, curEventTarget] = getEventTargets(event);
  6988. const matches = []; // [ [pointer, interaction], ...]
  6989. if (/^touch/.test(event.type)) {
  6990. scope.prevTouchTime = scope.now(); // @ts-expect-error
  6991. for (const changedTouch of event.changedTouches) {
  6992. const pointer = changedTouch;
  6993. const pointerId = getPointerId(pointer);
  6994. const searchDetails = {
  6995. pointer,
  6996. pointerId,
  6997. pointerType,
  6998. eventType: event.type,
  6999. eventTarget,
  7000. curEventTarget,
  7001. scope
  7002. };
  7003. const interaction = getInteraction(searchDetails);
  7004. matches.push([searchDetails.pointer, searchDetails.eventTarget, searchDetails.curEventTarget, interaction]);
  7005. }
  7006. } else {
  7007. let invalidPointer = false;
  7008. if (!utils_browser.supportsPointerEvent && /mouse/.test(event.type)) {
  7009. // ignore mouse events while touch interactions are active
  7010. for (let i = 0; i < interactions.length && !invalidPointer; i++) {
  7011. invalidPointer = interactions[i].pointerType !== 'mouse' && interactions[i].pointerIsDown;
  7012. } // try to ignore mouse events that are simulated by the browser
  7013. // after a touch event
  7014. invalidPointer = invalidPointer || scope.now() - scope.prevTouchTime < 500 || // on iOS and Firefox Mobile, MouseEvent.timeStamp is zero if simulated
  7015. event.timeStamp === 0;
  7016. }
  7017. if (!invalidPointer) {
  7018. const searchDetails = {
  7019. pointer: event,
  7020. pointerId: getPointerId(event),
  7021. pointerType,
  7022. eventType: event.type,
  7023. curEventTarget,
  7024. eventTarget,
  7025. scope
  7026. };
  7027. const interaction = getInteraction(searchDetails);
  7028. matches.push([searchDetails.pointer, searchDetails.eventTarget, searchDetails.curEventTarget, interaction]);
  7029. }
  7030. } // eslint-disable-next-line no-shadow
  7031. for (const [pointer, eventTarget, curEventTarget, interaction] of matches) {
  7032. interaction[method](pointer, event, eventTarget, curEventTarget);
  7033. }
  7034. };
  7035. }
  7036. function getInteraction(searchDetails) {
  7037. const {
  7038. pointerType,
  7039. scope
  7040. } = searchDetails;
  7041. const foundInteraction = interactionFinder.search(searchDetails);
  7042. const signalArg = {
  7043. interaction: foundInteraction,
  7044. searchDetails
  7045. };
  7046. scope.fire('interactions:find', signalArg);
  7047. return signalArg.interaction || scope.interactions.new({
  7048. pointerType
  7049. });
  7050. }
  7051. function onDocSignal({
  7052. doc,
  7053. scope,
  7054. options
  7055. }, eventMethodName) {
  7056. const {
  7057. interactions: {
  7058. docEvents
  7059. },
  7060. events
  7061. } = scope;
  7062. const eventMethod = events[eventMethodName];
  7063. if (scope.browser.isIOS && !options.events) {
  7064. options.events = {
  7065. passive: false
  7066. };
  7067. } // delegate event listener
  7068. for (const eventType in events.delegatedEvents) {
  7069. eventMethod(doc, eventType, events.delegateListener);
  7070. eventMethod(doc, eventType, events.delegateUseCapture, true);
  7071. }
  7072. const eventOptions = options && options.events;
  7073. for (const {
  7074. type,
  7075. listener
  7076. } of docEvents) {
  7077. eventMethod(doc, type, listener, eventOptions);
  7078. }
  7079. }
  7080. const interactions_interactions = {
  7081. id: 'core/interactions',
  7082. install: interactions_install,
  7083. listeners: {
  7084. 'scope:add-document': arg => onDocSignal(arg, 'add'),
  7085. 'scope:remove-document': arg => onDocSignal(arg, 'remove'),
  7086. 'interactable:unset': ({
  7087. interactable
  7088. }, scope) => {
  7089. // Stop and destroy related interactions when an Interactable is unset
  7090. for (let i = scope.interactions.list.length - 1; i >= 0; i--) {
  7091. const interaction = scope.interactions.list[i];
  7092. if (interaction.interactable !== interactable) {
  7093. continue;
  7094. }
  7095. interaction.stop();
  7096. scope.fire('interactions:destroy', {
  7097. interaction
  7098. });
  7099. interaction.destroy();
  7100. if (scope.interactions.list.length > 2) {
  7101. scope.interactions.list.splice(i, 1);
  7102. }
  7103. }
  7104. }
  7105. },
  7106. onDocSignal,
  7107. doOnInteractions,
  7108. methodNames
  7109. };
  7110. /* harmony default export */ var core_interactions = (interactions_interactions);
  7111. //# sourceMappingURL=interactions.js.map
  7112. // CONCATENATED MODULE: ./node_modules/@interactjs/core/scope.js
  7113. class scope_Scope {
  7114. // main window
  7115. // main document
  7116. // main window
  7117. // all documents being listened to
  7118. constructor() {
  7119. this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`;
  7120. this.isInitialized = false;
  7121. this.listenerMaps = [];
  7122. this.browser = utils_browser;
  7123. this.defaults = clone(defaultOptions_defaults);
  7124. this.Eventable = Eventable_Eventable;
  7125. this.actions = {
  7126. map: {},
  7127. phases: {
  7128. start: true,
  7129. move: true,
  7130. end: true
  7131. },
  7132. methodDict: {},
  7133. phaselessTypes: {}
  7134. };
  7135. this.interactStatic = createInteractStatic(this);
  7136. this.InteractEvent = InteractEvent_InteractEvent;
  7137. this.Interactable = void 0;
  7138. this.interactables = new InteractableSet_InteractableSet(this);
  7139. this._win = void 0;
  7140. this.document = void 0;
  7141. this.window = void 0;
  7142. this.documents = [];
  7143. this._plugins = {
  7144. list: [],
  7145. map: {}
  7146. };
  7147. this.onWindowUnload = event => this.removeDocument(event.target);
  7148. const scope = this;
  7149. this.Interactable = class extends Interactable_Interactable {
  7150. get _defaults() {
  7151. return scope.defaults;
  7152. }
  7153. set(options) {
  7154. super.set(options);
  7155. scope.fire('interactable:set', {
  7156. options,
  7157. interactable: this
  7158. });
  7159. return this;
  7160. }
  7161. unset() {
  7162. super.unset();
  7163. scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1);
  7164. scope.fire('interactable:unset', {
  7165. interactable: this
  7166. });
  7167. }
  7168. };
  7169. }
  7170. addListeners(map, id) {
  7171. this.listenerMaps.push({
  7172. id,
  7173. map
  7174. });
  7175. }
  7176. fire(name, arg) {
  7177. for (const {
  7178. map: {
  7179. [name]: listener
  7180. }
  7181. } of this.listenerMaps) {
  7182. if (!!listener && listener(arg, this, name) === false) {
  7183. return false;
  7184. }
  7185. }
  7186. }
  7187. init(window) {
  7188. return this.isInitialized ? this : initScope(this, window);
  7189. }
  7190. pluginIsInstalled(plugin) {
  7191. return this._plugins.map[plugin.id] || this._plugins.list.indexOf(plugin) !== -1;
  7192. }
  7193. usePlugin(plugin, options) {
  7194. if (!this.isInitialized) {
  7195. return this;
  7196. }
  7197. if (this.pluginIsInstalled(plugin)) {
  7198. return this;
  7199. }
  7200. if (plugin.id) {
  7201. this._plugins.map[plugin.id] = plugin;
  7202. }
  7203. this._plugins.list.push(plugin);
  7204. if (plugin.install) {
  7205. plugin.install(this, options);
  7206. }
  7207. if (plugin.listeners && plugin.before) {
  7208. let index = 0;
  7209. const len = this.listenerMaps.length;
  7210. const before = plugin.before.reduce((acc, id) => {
  7211. acc[id] = true;
  7212. acc[pluginIdRoot(id)] = true;
  7213. return acc;
  7214. }, {});
  7215. for (; index < len; index++) {
  7216. const otherId = this.listenerMaps[index].id;
  7217. if (before[otherId] || before[pluginIdRoot(otherId)]) {
  7218. break;
  7219. }
  7220. }
  7221. this.listenerMaps.splice(index, 0, {
  7222. id: plugin.id,
  7223. map: plugin.listeners
  7224. });
  7225. } else if (plugin.listeners) {
  7226. this.listenerMaps.push({
  7227. id: plugin.id,
  7228. map: plugin.listeners
  7229. });
  7230. }
  7231. return this;
  7232. }
  7233. addDocument(doc, options) {
  7234. // do nothing if document is already known
  7235. if (this.getDocIndex(doc) !== -1) {
  7236. return false;
  7237. }
  7238. const window = getWindow(doc);
  7239. options = options ? extend({}, options) : {};
  7240. this.documents.push({
  7241. doc,
  7242. options
  7243. });
  7244. this.events.documents.push(doc); // don't add an unload event for the main document
  7245. // so that the page may be cached in browser history
  7246. if (doc !== this.document) {
  7247. this.events.add(window, 'unload', this.onWindowUnload);
  7248. }
  7249. this.fire('scope:add-document', {
  7250. doc,
  7251. window,
  7252. scope: this,
  7253. options
  7254. });
  7255. }
  7256. removeDocument(doc) {
  7257. const index = this.getDocIndex(doc);
  7258. const window = getWindow(doc);
  7259. const options = this.documents[index].options;
  7260. this.events.remove(window, 'unload', this.onWindowUnload);
  7261. this.documents.splice(index, 1);
  7262. this.events.documents.splice(index, 1);
  7263. this.fire('scope:remove-document', {
  7264. doc,
  7265. window,
  7266. scope: this,
  7267. options
  7268. });
  7269. }
  7270. getDocIndex(doc) {
  7271. for (let i = 0; i < this.documents.length; i++) {
  7272. if (this.documents[i].doc === doc) {
  7273. return i;
  7274. }
  7275. }
  7276. return -1;
  7277. }
  7278. getDocOptions(doc) {
  7279. const docIndex = this.getDocIndex(doc);
  7280. return docIndex === -1 ? null : this.documents[docIndex].options;
  7281. }
  7282. now() {
  7283. return (this.window.Date || Date).now();
  7284. }
  7285. }
  7286. function initScope(scope, window) {
  7287. scope.isInitialized = true;
  7288. window_init(window);
  7289. utils_domObjects.init(window);
  7290. utils_browser.init(window);
  7291. raf.init(window);
  7292. scope.window = window;
  7293. scope.document = window.document;
  7294. scope.usePlugin(core_interactions);
  7295. scope.usePlugin(events);
  7296. return scope;
  7297. }
  7298. function pluginIdRoot(id) {
  7299. return id && id.replace(/\/.*$/, '');
  7300. }
  7301. //# sourceMappingURL=scope.js.map
  7302. // CONCATENATED MODULE: ./node_modules/@interactjs/interact/index.js
  7303. const interact_scope = new scope_Scope();
  7304. const interact_interact = interact_scope.interactStatic;
  7305. /* harmony default export */ var _interactjs_interact = (interact_interact);
  7306. const interact_init = win => interact_scope.init(win);
  7307. if (typeof window === 'object' && !!window) {
  7308. interact_init(window);
  7309. }
  7310. //# sourceMappingURL=index.js.map
  7311. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/InteractableMethods.js
  7312. function InteractableMethods_install(scope) {
  7313. const {
  7314. /** @lends Interactable */
  7315. Interactable // tslint:disable-line no-shadowed-variable
  7316. } = scope;
  7317. Interactable.prototype.getAction = function getAction(pointer, event, interaction, element) {
  7318. const action = defaultActionChecker(this, event, interaction, element, scope);
  7319. if (this.options.actionChecker) {
  7320. return this.options.actionChecker(pointer, event, action, this, element, interaction);
  7321. }
  7322. return action;
  7323. };
  7324. /**
  7325. * If the target of the `mousedown`, `pointerdown` or `touchstart` event or any
  7326. * of it's parents match the given CSS selector or Element, no
  7327. * drag/resize/gesture is started.
  7328. *
  7329. * @deprecated
  7330. * Don't use this method. Instead set the `ignoreFrom` option for each action
  7331. * or for `pointerEvents`
  7332. *
  7333. * ```js
  7334. * interact(targett)
  7335. * .draggable({
  7336. * ignoreFrom: 'input, textarea, a[href]'',
  7337. * })
  7338. * .pointerEvents({
  7339. * ignoreFrom: '[no-pointer]',
  7340. * })
  7341. * ```
  7342. *
  7343. * @param {string | Element | null} [newValue] a CSS selector string, an
  7344. * Element or `null` to not ignore any elements
  7345. * @return {string | Element | object} The current ignoreFrom value or this
  7346. * Interactable
  7347. */
  7348. Interactable.prototype.ignoreFrom = warnOnce(function (newValue) {
  7349. return this._backCompatOption('ignoreFrom', newValue);
  7350. }, 'Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).');
  7351. /**
  7352. *
  7353. * A drag/resize/gesture is started only If the target of the `mousedown`,
  7354. * `pointerdown` or `touchstart` event or any of it's parents match the given
  7355. * CSS selector or Element.
  7356. *
  7357. * @deprecated
  7358. * Don't use this method. Instead set the `allowFrom` option for each action
  7359. * or for `pointerEvents`
  7360. *
  7361. * ```js
  7362. * interact(targett)
  7363. * .resizable({
  7364. * allowFrom: '.resize-handle',
  7365. * .pointerEvents({
  7366. * allowFrom: '.handle',,
  7367. * })
  7368. * ```
  7369. *
  7370. * @param {string | Element | null} [newValue] a CSS selector string, an
  7371. * Element or `null` to allow from any element
  7372. * @return {string | Element | object} The current allowFrom value or this
  7373. * Interactable
  7374. */
  7375. Interactable.prototype.allowFrom = warnOnce(function (newValue) {
  7376. return this._backCompatOption('allowFrom', newValue);
  7377. }, 'Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).');
  7378. /**
  7379. * ```js
  7380. * interact('.resize-drag')
  7381. * .resizable(true)
  7382. * .draggable(true)
  7383. * .actionChecker(function (pointer, event, action, interactable, element, interaction) {
  7384. *
  7385. * if (interact.matchesSelector(event.target, '.drag-handle')) {
  7386. * // force drag with handle target
  7387. * action.name = drag
  7388. * }
  7389. * else {
  7390. * // resize from the top and right edges
  7391. * action.name = 'resize'
  7392. * action.edges = { top: true, right: true }
  7393. * }
  7394. *
  7395. * return action
  7396. * })
  7397. * ```
  7398. *
  7399. * Returns or sets the function used to check action to be performed on
  7400. * pointerDown
  7401. *
  7402. * @param {function | null} [checker] A function which takes a pointer event,
  7403. * defaultAction string, interactable, element and interaction as parameters
  7404. * and returns an object with name property 'drag' 'resize' or 'gesture' and
  7405. * optionally an `edges` object with boolean 'top', 'left', 'bottom' and right
  7406. * props.
  7407. * @return {Function | Interactable} The checker function or this Interactable
  7408. */
  7409. Interactable.prototype.actionChecker = actionChecker;
  7410. /**
  7411. * Returns or sets whether the the cursor should be changed depending on the
  7412. * action that would be performed if the mouse were pressed and dragged.
  7413. *
  7414. * @param {boolean} [newValue]
  7415. * @return {boolean | Interactable} The current setting or this Interactable
  7416. */
  7417. Interactable.prototype.styleCursor = styleCursor;
  7418. }
  7419. function defaultActionChecker(interactable, event, interaction, element, scope) {
  7420. const rect = interactable.getRect(element);
  7421. const buttons = event.buttons || {
  7422. 0: 1,
  7423. 1: 4,
  7424. 3: 8,
  7425. 4: 16
  7426. }[event.button];
  7427. const arg = {
  7428. action: null,
  7429. interactable,
  7430. interaction,
  7431. element,
  7432. rect,
  7433. buttons
  7434. };
  7435. scope.fire('auto-start:check', arg);
  7436. return arg.action;
  7437. }
  7438. function styleCursor(newValue) {
  7439. if (is.bool(newValue)) {
  7440. this.options.styleCursor = newValue;
  7441. return this;
  7442. }
  7443. if (newValue === null) {
  7444. delete this.options.styleCursor;
  7445. return this;
  7446. }
  7447. return this.options.styleCursor;
  7448. }
  7449. function actionChecker(checker) {
  7450. if (is.func(checker)) {
  7451. this.options.actionChecker = checker;
  7452. return this;
  7453. }
  7454. if (checker === null) {
  7455. delete this.options.actionChecker;
  7456. return this;
  7457. }
  7458. return this.options.actionChecker;
  7459. }
  7460. /* harmony default export */ var InteractableMethods = ({
  7461. id: 'auto-start/interactableMethods',
  7462. install: InteractableMethods_install
  7463. });
  7464. //# sourceMappingURL=InteractableMethods.js.map
  7465. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/base.js
  7466. function base_install(scope) {
  7467. const {
  7468. interactStatic: interact,
  7469. defaults
  7470. } = scope;
  7471. scope.usePlugin(InteractableMethods);
  7472. defaults.base.actionChecker = null;
  7473. defaults.base.styleCursor = true;
  7474. extend(defaults.perAction, {
  7475. manualStart: false,
  7476. max: Infinity,
  7477. maxPerElement: 1,
  7478. allowFrom: null,
  7479. ignoreFrom: null,
  7480. // only allow left button by default
  7481. // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#Return_value
  7482. mouseButtons: 1
  7483. });
  7484. /**
  7485. * Returns or sets the maximum number of concurrent interactions allowed. By
  7486. * default only 1 interaction is allowed at a time (for backwards
  7487. * compatibility). To allow multiple interactions on the same Interactables and
  7488. * elements, you need to enable it in the draggable, resizable and gesturable
  7489. * `'max'` and `'maxPerElement'` options.
  7490. *
  7491. * @alias module:interact.maxInteractions
  7492. *
  7493. * @param {number} [newValue] Any number. newValue <= 0 means no interactions.
  7494. */
  7495. interact.maxInteractions = newValue => maxInteractions(newValue, scope);
  7496. scope.autoStart = {
  7497. // Allow this many interactions to happen simultaneously
  7498. maxInteractions: Infinity,
  7499. withinInteractionLimit,
  7500. cursorElement: null
  7501. };
  7502. }
  7503. function prepareOnDown({
  7504. interaction,
  7505. pointer,
  7506. event,
  7507. eventTarget
  7508. }, scope) {
  7509. if (interaction.interacting()) {
  7510. return;
  7511. }
  7512. const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope);
  7513. prepare(interaction, actionInfo, scope);
  7514. }
  7515. function prepareOnMove({
  7516. interaction,
  7517. pointer,
  7518. event,
  7519. eventTarget
  7520. }, scope) {
  7521. if (interaction.pointerType !== 'mouse' || interaction.pointerIsDown || interaction.interacting()) {
  7522. return;
  7523. }
  7524. const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope);
  7525. prepare(interaction, actionInfo, scope);
  7526. }
  7527. function startOnMove(arg, scope) {
  7528. const {
  7529. interaction
  7530. } = arg;
  7531. if (!interaction.pointerIsDown || interaction.interacting() || !interaction.pointerWasMoved || !interaction.prepared.name) {
  7532. return;
  7533. }
  7534. scope.fire('autoStart:before-start', arg);
  7535. const {
  7536. interactable
  7537. } = interaction;
  7538. const actionName = interaction.prepared.name;
  7539. if (actionName && interactable) {
  7540. // check manualStart and interaction limit
  7541. if (interactable.options[actionName].manualStart || !withinInteractionLimit(interactable, interaction.element, interaction.prepared, scope)) {
  7542. interaction.stop();
  7543. } else {
  7544. interaction.start(interaction.prepared, interactable, interaction.element);
  7545. setInteractionCursor(interaction, scope);
  7546. }
  7547. }
  7548. }
  7549. function clearCursorOnStop({
  7550. interaction
  7551. }, scope) {
  7552. const {
  7553. interactable
  7554. } = interaction;
  7555. if (interactable && interactable.options.styleCursor) {
  7556. setCursor(interaction.element, '', scope);
  7557. }
  7558. } // Check if the current interactable supports the action.
  7559. // If so, return the validated action. Otherwise, return null
  7560. function validateAction(action, interactable, element, eventTarget, scope) {
  7561. if (interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) && interactable.options[action.name].enabled && withinInteractionLimit(interactable, element, action, scope)) {
  7562. return action;
  7563. }
  7564. return null;
  7565. }
  7566. function validateMatches(interaction, pointer, event, matches, matchElements, eventTarget, scope) {
  7567. for (let i = 0, len = matches.length; i < len; i++) {
  7568. const match = matches[i];
  7569. const matchElement = matchElements[i];
  7570. const matchAction = match.getAction(pointer, event, interaction, matchElement);
  7571. if (!matchAction) {
  7572. continue;
  7573. }
  7574. const action = validateAction(matchAction, match, matchElement, eventTarget, scope);
  7575. if (action) {
  7576. return {
  7577. action,
  7578. interactable: match,
  7579. element: matchElement
  7580. };
  7581. }
  7582. }
  7583. return {
  7584. action: null,
  7585. interactable: null,
  7586. element: null
  7587. };
  7588. }
  7589. function getActionInfo(interaction, pointer, event, eventTarget, scope) {
  7590. let matches = [];
  7591. let matchElements = [];
  7592. let element = eventTarget;
  7593. function pushMatches(interactable) {
  7594. matches.push(interactable);
  7595. matchElements.push(element);
  7596. }
  7597. while (is.element(element)) {
  7598. matches = [];
  7599. matchElements = [];
  7600. scope.interactables.forEachMatch(element, pushMatches);
  7601. const actionInfo = validateMatches(interaction, pointer, event, matches, matchElements, eventTarget, scope);
  7602. if (actionInfo.action && !actionInfo.interactable.options[actionInfo.action.name].manualStart) {
  7603. return actionInfo;
  7604. }
  7605. element = parentNode(element);
  7606. }
  7607. return {
  7608. action: null,
  7609. interactable: null,
  7610. element: null
  7611. };
  7612. }
  7613. function prepare(interaction, {
  7614. action,
  7615. interactable,
  7616. element
  7617. }, scope) {
  7618. action = action || {
  7619. name: null
  7620. };
  7621. interaction.interactable = interactable;
  7622. interaction.element = element;
  7623. copyAction(interaction.prepared, action);
  7624. interaction.rect = interactable && action.name ? interactable.getRect(element) : null;
  7625. setInteractionCursor(interaction, scope);
  7626. scope.fire('autoStart:prepared', {
  7627. interaction
  7628. });
  7629. }
  7630. function withinInteractionLimit(interactable, element, action, scope) {
  7631. const options = interactable.options;
  7632. const maxActions = options[action.name].max;
  7633. const maxPerElement = options[action.name].maxPerElement;
  7634. const autoStartMax = scope.autoStart.maxInteractions;
  7635. let activeInteractions = 0;
  7636. let interactableCount = 0;
  7637. let elementCount = 0; // no actions if any of these values == 0
  7638. if (!(maxActions && maxPerElement && autoStartMax)) {
  7639. return false;
  7640. }
  7641. for (const interaction of scope.interactions.list) {
  7642. const otherAction = interaction.prepared.name;
  7643. if (!interaction.interacting()) {
  7644. continue;
  7645. }
  7646. activeInteractions++;
  7647. if (activeInteractions >= autoStartMax) {
  7648. return false;
  7649. }
  7650. if (interaction.interactable !== interactable) {
  7651. continue;
  7652. }
  7653. interactableCount += otherAction === action.name ? 1 : 0;
  7654. if (interactableCount >= maxActions) {
  7655. return false;
  7656. }
  7657. if (interaction.element === element) {
  7658. elementCount++;
  7659. if (otherAction === action.name && elementCount >= maxPerElement) {
  7660. return false;
  7661. }
  7662. }
  7663. }
  7664. return autoStartMax > 0;
  7665. }
  7666. function maxInteractions(newValue, scope) {
  7667. if (is.number(newValue)) {
  7668. scope.autoStart.maxInteractions = newValue;
  7669. return this;
  7670. }
  7671. return scope.autoStart.maxInteractions;
  7672. }
  7673. function setCursor(element, cursor, scope) {
  7674. const {
  7675. cursorElement: prevCursorElement
  7676. } = scope.autoStart;
  7677. if (prevCursorElement && prevCursorElement !== element) {
  7678. prevCursorElement.style.cursor = '';
  7679. }
  7680. element.ownerDocument.documentElement.style.cursor = cursor;
  7681. element.style.cursor = cursor;
  7682. scope.autoStart.cursorElement = cursor ? element : null;
  7683. }
  7684. function setInteractionCursor(interaction, scope) {
  7685. const {
  7686. interactable,
  7687. element,
  7688. prepared
  7689. } = interaction;
  7690. if (!(interaction.pointerType === 'mouse' && interactable && interactable.options.styleCursor)) {
  7691. // clear previous target element cursor
  7692. if (scope.autoStart.cursorElement) {
  7693. setCursor(scope.autoStart.cursorElement, '', scope);
  7694. }
  7695. return;
  7696. }
  7697. let cursor = '';
  7698. if (prepared.name) {
  7699. const cursorChecker = interactable.options[prepared.name].cursorChecker;
  7700. if (is.func(cursorChecker)) {
  7701. cursor = cursorChecker(prepared, interactable, element, interaction._interacting);
  7702. } else {
  7703. cursor = scope.actions.map[prepared.name].getCursor(prepared);
  7704. }
  7705. }
  7706. setCursor(interaction.element, cursor || '', scope);
  7707. }
  7708. const autoStart = {
  7709. id: 'auto-start/base',
  7710. before: ['actions'],
  7711. install: base_install,
  7712. listeners: {
  7713. 'interactions:down': prepareOnDown,
  7714. 'interactions:move': (arg, scope) => {
  7715. prepareOnMove(arg, scope);
  7716. startOnMove(arg, scope);
  7717. },
  7718. 'interactions:stop': clearCursorOnStop
  7719. },
  7720. maxInteractions,
  7721. withinInteractionLimit,
  7722. validateAction
  7723. };
  7724. /* harmony default export */ var base = (autoStart);
  7725. //# sourceMappingURL=base.js.map
  7726. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/dragAxis.js
  7727. function beforeStart({
  7728. interaction,
  7729. eventTarget,
  7730. dx,
  7731. dy
  7732. }, scope) {
  7733. if (interaction.prepared.name !== 'drag') {
  7734. return;
  7735. } // check if a drag is in the correct axis
  7736. const absX = Math.abs(dx);
  7737. const absY = Math.abs(dy);
  7738. const targetOptions = interaction.interactable.options.drag;
  7739. const startAxis = targetOptions.startAxis;
  7740. const currentAxis = absX > absY ? 'x' : absX < absY ? 'y' : 'xy';
  7741. interaction.prepared.axis = targetOptions.lockAxis === 'start' ? currentAxis[0] // always lock to one axis even if currentAxis === 'xy'
  7742. : targetOptions.lockAxis; // if the movement isn't in the startAxis of the interactable
  7743. if (currentAxis !== 'xy' && startAxis !== 'xy' && startAxis !== currentAxis) {
  7744. // cancel the prepared action
  7745. interaction.prepared.name = null; // then try to get a drag from another ineractable
  7746. let element = eventTarget;
  7747. const getDraggable = function (interactable) {
  7748. if (interactable === interaction.interactable) {
  7749. return;
  7750. }
  7751. const options = interaction.interactable.options.drag;
  7752. if (!options.manualStart && interactable.testIgnoreAllow(options, element, eventTarget)) {
  7753. const action = interactable.getAction(interaction.downPointer, interaction.downEvent, interaction, element);
  7754. if (action && action.name === 'drag' && checkStartAxis(currentAxis, interactable) && base.validateAction(action, interactable, element, eventTarget, scope)) {
  7755. return interactable;
  7756. }
  7757. }
  7758. }; // check all interactables
  7759. while (is.element(element)) {
  7760. const interactable = scope.interactables.forEachMatch(element, getDraggable);
  7761. if (interactable) {
  7762. interaction.prepared.name = 'drag';
  7763. interaction.interactable = interactable;
  7764. interaction.element = element;
  7765. break;
  7766. }
  7767. element = parentNode(element);
  7768. }
  7769. }
  7770. }
  7771. function checkStartAxis(startAxis, interactable) {
  7772. if (!interactable) {
  7773. return false;
  7774. }
  7775. const thisAxis = interactable.options.drag.startAxis;
  7776. return startAxis === 'xy' || thisAxis === 'xy' || thisAxis === startAxis;
  7777. }
  7778. /* harmony default export */ var dragAxis = ({
  7779. id: 'auto-start/dragAxis',
  7780. listeners: {
  7781. 'autoStart:before-start': beforeStart
  7782. }
  7783. });
  7784. //# sourceMappingURL=dragAxis.js.map
  7785. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/hold.js
  7786. function hold_install(scope) {
  7787. const {
  7788. defaults
  7789. } = scope;
  7790. scope.usePlugin(base);
  7791. defaults.perAction.hold = 0;
  7792. defaults.perAction.delay = 0;
  7793. }
  7794. function getHoldDuration(interaction) {
  7795. const actionName = interaction.prepared && interaction.prepared.name;
  7796. if (!actionName) {
  7797. return null;
  7798. }
  7799. const options = interaction.interactable.options;
  7800. return options[actionName].hold || options[actionName].delay;
  7801. }
  7802. const hold = {
  7803. id: 'auto-start/hold',
  7804. install: hold_install,
  7805. listeners: {
  7806. 'interactions:new': ({
  7807. interaction
  7808. }) => {
  7809. interaction.autoStartHoldTimer = null;
  7810. },
  7811. 'autoStart:prepared': ({
  7812. interaction
  7813. }) => {
  7814. const hold = getHoldDuration(interaction);
  7815. if (hold > 0) {
  7816. interaction.autoStartHoldTimer = setTimeout(() => {
  7817. interaction.start(interaction.prepared, interaction.interactable, interaction.element);
  7818. }, hold);
  7819. }
  7820. },
  7821. 'interactions:move': ({
  7822. interaction,
  7823. duplicate
  7824. }) => {
  7825. if (interaction.autoStartHoldTimer && interaction.pointerWasMoved && !duplicate) {
  7826. clearTimeout(interaction.autoStartHoldTimer);
  7827. interaction.autoStartHoldTimer = null;
  7828. }
  7829. },
  7830. // prevent regular down->move autoStart
  7831. 'autoStart:before-start': ({
  7832. interaction
  7833. }) => {
  7834. const holdDuration = getHoldDuration(interaction);
  7835. if (holdDuration > 0) {
  7836. interaction.prepared.name = null;
  7837. }
  7838. }
  7839. },
  7840. getHoldDuration
  7841. };
  7842. /* harmony default export */ var auto_start_hold = (hold);
  7843. //# sourceMappingURL=hold.js.map
  7844. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/plugin.js
  7845. /* harmony default export */ var auto_start_plugin = ({
  7846. id: 'auto-start',
  7847. install(scope) {
  7848. scope.usePlugin(base);
  7849. scope.usePlugin(auto_start_hold);
  7850. scope.usePlugin(dragAxis);
  7851. }
  7852. });
  7853. //# sourceMappingURL=plugin.js.map
  7854. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/index.js
  7855. /* eslint-disable import/order, no-console, eol-last */
  7856. if (typeof window === 'object' && !!window) {
  7857. interact_init(window);
  7858. }
  7859. _interactjs_interact.use(auto_start_plugin);
  7860. //# sourceMappingURL=index.js.map
  7861. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/drag/plugin.js
  7862. function plugin_install(scope) {
  7863. const {
  7864. actions,
  7865. Interactable,
  7866. defaults
  7867. } = scope;
  7868. Interactable.prototype.draggable = drag.draggable;
  7869. actions.map.drag = drag;
  7870. actions.methodDict.drag = 'draggable';
  7871. defaults.actions.drag = drag.defaults;
  7872. }
  7873. function beforeMove({
  7874. interaction
  7875. }) {
  7876. if (interaction.prepared.name !== 'drag') {
  7877. return;
  7878. }
  7879. const axis = interaction.prepared.axis;
  7880. if (axis === 'x') {
  7881. interaction.coords.cur.page.y = interaction.coords.start.page.y;
  7882. interaction.coords.cur.client.y = interaction.coords.start.client.y;
  7883. interaction.coords.velocity.client.y = 0;
  7884. interaction.coords.velocity.page.y = 0;
  7885. } else if (axis === 'y') {
  7886. interaction.coords.cur.page.x = interaction.coords.start.page.x;
  7887. interaction.coords.cur.client.x = interaction.coords.start.client.x;
  7888. interaction.coords.velocity.client.x = 0;
  7889. interaction.coords.velocity.page.x = 0;
  7890. }
  7891. }
  7892. function move({
  7893. iEvent,
  7894. interaction
  7895. }) {
  7896. if (interaction.prepared.name !== 'drag') {
  7897. return;
  7898. }
  7899. const axis = interaction.prepared.axis;
  7900. if (axis === 'x' || axis === 'y') {
  7901. const opposite = axis === 'x' ? 'y' : 'x';
  7902. iEvent.page[opposite] = interaction.coords.start.page[opposite];
  7903. iEvent.client[opposite] = interaction.coords.start.client[opposite];
  7904. iEvent.delta[opposite] = 0;
  7905. }
  7906. }
  7907. /**
  7908. * ```js
  7909. * interact(element).draggable({
  7910. * onstart: function (event) {},
  7911. * onmove : function (event) {},
  7912. * onend : function (event) {},
  7913. *
  7914. * // the axis in which the first movement must be
  7915. * // for the drag sequence to start
  7916. * // 'xy' by default - any direction
  7917. * startAxis: 'x' || 'y' || 'xy',
  7918. *
  7919. * // 'xy' by default - don't restrict to one axis (move in any direction)
  7920. * // 'x' or 'y' to restrict movement to either axis
  7921. * // 'start' to restrict movement to the axis the drag started in
  7922. * lockAxis: 'x' || 'y' || 'xy' || 'start',
  7923. *
  7924. * // max number of drags that can happen concurrently
  7925. * // with elements of this Interactable. Infinity by default
  7926. * max: Infinity,
  7927. *
  7928. * // max number of drags that can target the same element+Interactable
  7929. * // 1 by default
  7930. * maxPerElement: 2
  7931. * })
  7932. *
  7933. * var isDraggable = interact('element').draggable(); // true
  7934. * ```
  7935. *
  7936. * Get or set whether drag actions can be performed on the target
  7937. *
  7938. * @alias Interactable.prototype.draggable
  7939. *
  7940. * @param {boolean | object} [options] true/false or An object with event
  7941. * listeners to be fired on drag events (object makes the Interactable
  7942. * draggable)
  7943. * @return {boolean | Interactable} boolean indicating if this can be the
  7944. * target of drag events, or this Interctable
  7945. */
  7946. const plugin_draggable = function draggable(options) {
  7947. if (is.object(options)) {
  7948. this.options.drag.enabled = options.enabled !== false;
  7949. this.setPerAction('drag', options);
  7950. this.setOnEvents('drag', options);
  7951. if (/^(xy|x|y|start)$/.test(options.lockAxis)) {
  7952. this.options.drag.lockAxis = options.lockAxis;
  7953. }
  7954. if (/^(xy|x|y)$/.test(options.startAxis)) {
  7955. this.options.drag.startAxis = options.startAxis;
  7956. }
  7957. return this;
  7958. }
  7959. if (is.bool(options)) {
  7960. this.options.drag.enabled = options;
  7961. return this;
  7962. }
  7963. return this.options.drag;
  7964. };
  7965. const drag = {
  7966. id: 'actions/drag',
  7967. install: plugin_install,
  7968. listeners: {
  7969. 'interactions:before-action-move': beforeMove,
  7970. 'interactions:action-resume': beforeMove,
  7971. // dragmove
  7972. 'interactions:action-move': move,
  7973. 'auto-start:check': arg => {
  7974. const {
  7975. interaction,
  7976. interactable,
  7977. buttons
  7978. } = arg;
  7979. const dragOptions = interactable.options.drag;
  7980. if (!(dragOptions && dragOptions.enabled) || // check mouseButton setting if the pointer is down
  7981. interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & interactable.options.drag.mouseButtons) === 0) {
  7982. return undefined;
  7983. }
  7984. arg.action = {
  7985. name: 'drag',
  7986. axis: dragOptions.lockAxis === 'start' ? dragOptions.startAxis : dragOptions.lockAxis
  7987. };
  7988. return false;
  7989. }
  7990. },
  7991. draggable: plugin_draggable,
  7992. beforeMove,
  7993. move,
  7994. defaults: {
  7995. startAxis: 'xy',
  7996. lockAxis: 'xy'
  7997. },
  7998. getCursor() {
  7999. return 'move';
  8000. }
  8001. };
  8002. /* harmony default export */ var drag_plugin = (drag);
  8003. //# sourceMappingURL=plugin.js.map
  8004. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/drag/index.js
  8005. /* eslint-disable import/order, no-console, eol-last */
  8006. if (typeof window === 'object' && !!window) {
  8007. interact_init(window);
  8008. }
  8009. _interactjs_interact.use(drag_plugin);
  8010. //# sourceMappingURL=index.js.map
  8011. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/resize/plugin.js
  8012. function resize_plugin_install(scope) {
  8013. const {
  8014. actions,
  8015. browser,
  8016. /** @lends Interactable */
  8017. Interactable,
  8018. // tslint:disable-line no-shadowed-variable
  8019. defaults
  8020. } = scope; // Less Precision with touch input
  8021. resize.cursors = initCursors(browser);
  8022. resize.defaultMargin = browser.supportsTouch || browser.supportsPointerEvent ? 20 : 10;
  8023. /**
  8024. * ```js
  8025. * interact(element).resizable({
  8026. * onstart: function (event) {},
  8027. * onmove : function (event) {},
  8028. * onend : function (event) {},
  8029. *
  8030. * edges: {
  8031. * top : true, // Use pointer coords to check for resize.
  8032. * left : false, // Disable resizing from left edge.
  8033. * bottom: '.resize-s',// Resize if pointer target matches selector
  8034. * right : handleEl // Resize if pointer target is the given Element
  8035. * },
  8036. *
  8037. * // Width and height can be adjusted independently. When `true`, width and
  8038. * // height are adjusted at a 1:1 ratio.
  8039. * square: false,
  8040. *
  8041. * // Width and height can be adjusted independently. When `true`, width and
  8042. * // height maintain the aspect ratio they had when resizing started.
  8043. * preserveAspectRatio: false,
  8044. *
  8045. * // a value of 'none' will limit the resize rect to a minimum of 0x0
  8046. * // 'negate' will allow the rect to have negative width/height
  8047. * // 'reposition' will keep the width/height positive by swapping
  8048. * // the top and bottom edges and/or swapping the left and right edges
  8049. * invert: 'none' || 'negate' || 'reposition'
  8050. *
  8051. * // limit multiple resizes.
  8052. * // See the explanation in the {@link Interactable.draggable} example
  8053. * max: Infinity,
  8054. * maxPerElement: 1,
  8055. * })
  8056. *
  8057. * var isResizeable = interact(element).resizable()
  8058. * ```
  8059. *
  8060. * Gets or sets whether resize actions can be performed on the target
  8061. *
  8062. * @param {boolean | object} [options] true/false or An object with event
  8063. * listeners to be fired on resize events (object makes the Interactable
  8064. * resizable)
  8065. * @return {boolean | Interactable} A boolean indicating if this can be the
  8066. * target of resize elements, or this Interactable
  8067. */
  8068. Interactable.prototype.resizable = function (options) {
  8069. return resizable(this, options, scope);
  8070. };
  8071. actions.map.resize = resize;
  8072. actions.methodDict.resize = 'resizable';
  8073. defaults.actions.resize = resize.defaults;
  8074. }
  8075. function resizeChecker(arg) {
  8076. const {
  8077. interaction,
  8078. interactable,
  8079. element,
  8080. rect,
  8081. buttons
  8082. } = arg;
  8083. if (!rect) {
  8084. return undefined;
  8085. }
  8086. const page = extend({}, interaction.coords.cur.page);
  8087. const resizeOptions = interactable.options.resize;
  8088. if (!(resizeOptions && resizeOptions.enabled) || // check mouseButton setting if the pointer is down
  8089. interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & resizeOptions.mouseButtons) === 0) {
  8090. return undefined;
  8091. } // if using resize.edges
  8092. if (is.object(resizeOptions.edges)) {
  8093. const resizeEdges = {
  8094. left: false,
  8095. right: false,
  8096. top: false,
  8097. bottom: false
  8098. };
  8099. for (const edge in resizeEdges) {
  8100. resizeEdges[edge] = checkResizeEdge(edge, resizeOptions.edges[edge], page, interaction._latestPointer.eventTarget, element, rect, resizeOptions.margin || resize.defaultMargin);
  8101. }
  8102. resizeEdges.left = resizeEdges.left && !resizeEdges.right;
  8103. resizeEdges.top = resizeEdges.top && !resizeEdges.bottom;
  8104. if (resizeEdges.left || resizeEdges.right || resizeEdges.top || resizeEdges.bottom) {
  8105. arg.action = {
  8106. name: 'resize',
  8107. edges: resizeEdges
  8108. };
  8109. }
  8110. } else {
  8111. const right = resizeOptions.axis !== 'y' && page.x > rect.right - resize.defaultMargin;
  8112. const bottom = resizeOptions.axis !== 'x' && page.y > rect.bottom - resize.defaultMargin;
  8113. if (right || bottom) {
  8114. arg.action = {
  8115. name: 'resize',
  8116. axes: (right ? 'x' : '') + (bottom ? 'y' : '')
  8117. };
  8118. }
  8119. }
  8120. return arg.action ? false : undefined;
  8121. }
  8122. function resizable(interactable, options, scope) {
  8123. if (is.object(options)) {
  8124. interactable.options.resize.enabled = options.enabled !== false;
  8125. interactable.setPerAction('resize', options);
  8126. interactable.setOnEvents('resize', options);
  8127. if (is.string(options.axis) && /^x$|^y$|^xy$/.test(options.axis)) {
  8128. interactable.options.resize.axis = options.axis;
  8129. } else if (options.axis === null) {
  8130. interactable.options.resize.axis = scope.defaults.actions.resize.axis;
  8131. }
  8132. if (is.bool(options.preserveAspectRatio)) {
  8133. interactable.options.resize.preserveAspectRatio = options.preserveAspectRatio;
  8134. } else if (is.bool(options.square)) {
  8135. interactable.options.resize.square = options.square;
  8136. }
  8137. return interactable;
  8138. }
  8139. if (is.bool(options)) {
  8140. interactable.options.resize.enabled = options;
  8141. return interactable;
  8142. }
  8143. return interactable.options.resize;
  8144. }
  8145. function checkResizeEdge(name, value, page, element, interactableElement, rect, margin) {
  8146. // false, '', undefined, null
  8147. if (!value) {
  8148. return false;
  8149. } // true value, use pointer coords and element rect
  8150. if (value === true) {
  8151. // if dimensions are negative, "switch" edges
  8152. const width = is.number(rect.width) ? rect.width : rect.right - rect.left;
  8153. const height = is.number(rect.height) ? rect.height : rect.bottom - rect.top; // don't use margin greater than half the relevent dimension
  8154. margin = Math.min(margin, Math.abs((name === 'left' || name === 'right' ? width : height) / 2));
  8155. if (width < 0) {
  8156. if (name === 'left') {
  8157. name = 'right';
  8158. } else if (name === 'right') {
  8159. name = 'left';
  8160. }
  8161. }
  8162. if (height < 0) {
  8163. if (name === 'top') {
  8164. name = 'bottom';
  8165. } else if (name === 'bottom') {
  8166. name = 'top';
  8167. }
  8168. }
  8169. if (name === 'left') {
  8170. return page.x < (width >= 0 ? rect.left : rect.right) + margin;
  8171. }
  8172. if (name === 'top') {
  8173. return page.y < (height >= 0 ? rect.top : rect.bottom) + margin;
  8174. }
  8175. if (name === 'right') {
  8176. return page.x > (width >= 0 ? rect.right : rect.left) - margin;
  8177. }
  8178. if (name === 'bottom') {
  8179. return page.y > (height >= 0 ? rect.bottom : rect.top) - margin;
  8180. }
  8181. } // the remaining checks require an element
  8182. if (!is.element(element)) {
  8183. return false;
  8184. }
  8185. return is.element(value) // the value is an element to use as a resize handle
  8186. ? value === element // otherwise check if element matches value as selector
  8187. : matchesUpTo(element, value, interactableElement);
  8188. }
  8189. /* eslint-disable multiline-ternary */
  8190. function initCursors(browser) {
  8191. return browser.isIe9 ? {
  8192. x: 'e-resize',
  8193. y: 's-resize',
  8194. xy: 'se-resize',
  8195. top: 'n-resize',
  8196. left: 'w-resize',
  8197. bottom: 's-resize',
  8198. right: 'e-resize',
  8199. topleft: 'se-resize',
  8200. bottomright: 'se-resize',
  8201. topright: 'ne-resize',
  8202. bottomleft: 'ne-resize'
  8203. } : {
  8204. x: 'ew-resize',
  8205. y: 'ns-resize',
  8206. xy: 'nwse-resize',
  8207. top: 'ns-resize',
  8208. left: 'ew-resize',
  8209. bottom: 'ns-resize',
  8210. right: 'ew-resize',
  8211. topleft: 'nwse-resize',
  8212. bottomright: 'nwse-resize',
  8213. topright: 'nesw-resize',
  8214. bottomleft: 'nesw-resize'
  8215. };
  8216. }
  8217. /* eslint-enable multiline-ternary */
  8218. function start({
  8219. iEvent,
  8220. interaction
  8221. }) {
  8222. if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
  8223. return;
  8224. }
  8225. const resizeEvent = iEvent;
  8226. const rect = interaction.rect;
  8227. interaction._rects = {
  8228. start: extend({}, rect),
  8229. corrected: extend({}, rect),
  8230. previous: extend({}, rect),
  8231. delta: {
  8232. left: 0,
  8233. right: 0,
  8234. width: 0,
  8235. top: 0,
  8236. bottom: 0,
  8237. height: 0
  8238. }
  8239. };
  8240. resizeEvent.edges = interaction.prepared.edges;
  8241. resizeEvent.rect = interaction._rects.corrected;
  8242. resizeEvent.deltaRect = interaction._rects.delta;
  8243. }
  8244. function plugin_move({
  8245. iEvent,
  8246. interaction
  8247. }) {
  8248. if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
  8249. return;
  8250. }
  8251. const resizeEvent = iEvent;
  8252. const resizeOptions = interaction.interactable.options.resize;
  8253. const invert = resizeOptions.invert;
  8254. const invertible = invert === 'reposition' || invert === 'negate';
  8255. const current = interaction.rect;
  8256. const {
  8257. start: startRect,
  8258. corrected,
  8259. delta: deltaRect,
  8260. previous
  8261. } = interaction._rects;
  8262. extend(previous, corrected);
  8263. if (invertible) {
  8264. // if invertible, copy the current rect
  8265. extend(corrected, current);
  8266. if (invert === 'reposition') {
  8267. // swap edge values if necessary to keep width/height positive
  8268. if (corrected.top > corrected.bottom) {
  8269. const swap = corrected.top;
  8270. corrected.top = corrected.bottom;
  8271. corrected.bottom = swap;
  8272. }
  8273. if (corrected.left > corrected.right) {
  8274. const swap = corrected.left;
  8275. corrected.left = corrected.right;
  8276. corrected.right = swap;
  8277. }
  8278. }
  8279. } else {
  8280. // if not invertible, restrict to minimum of 0x0 rect
  8281. corrected.top = Math.min(current.top, startRect.bottom);
  8282. corrected.bottom = Math.max(current.bottom, startRect.top);
  8283. corrected.left = Math.min(current.left, startRect.right);
  8284. corrected.right = Math.max(current.right, startRect.left);
  8285. }
  8286. corrected.width = corrected.right - corrected.left;
  8287. corrected.height = corrected.bottom - corrected.top;
  8288. for (const edge in corrected) {
  8289. deltaRect[edge] = corrected[edge] - previous[edge];
  8290. }
  8291. resizeEvent.edges = interaction.prepared.edges;
  8292. resizeEvent.rect = corrected;
  8293. resizeEvent.deltaRect = deltaRect;
  8294. }
  8295. function end({
  8296. iEvent,
  8297. interaction
  8298. }) {
  8299. if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
  8300. return;
  8301. }
  8302. const resizeEvent = iEvent;
  8303. resizeEvent.edges = interaction.prepared.edges;
  8304. resizeEvent.rect = interaction._rects.corrected;
  8305. resizeEvent.deltaRect = interaction._rects.delta;
  8306. }
  8307. function updateEventAxes({
  8308. iEvent,
  8309. interaction
  8310. }) {
  8311. if (interaction.prepared.name !== 'resize' || !interaction.resizeAxes) {
  8312. return;
  8313. }
  8314. const options = interaction.interactable.options;
  8315. const resizeEvent = iEvent;
  8316. if (options.resize.square) {
  8317. if (interaction.resizeAxes === 'y') {
  8318. resizeEvent.delta.x = resizeEvent.delta.y;
  8319. } else {
  8320. resizeEvent.delta.y = resizeEvent.delta.x;
  8321. }
  8322. resizeEvent.axes = 'xy';
  8323. } else {
  8324. resizeEvent.axes = interaction.resizeAxes;
  8325. if (interaction.resizeAxes === 'x') {
  8326. resizeEvent.delta.y = 0;
  8327. } else if (interaction.resizeAxes === 'y') {
  8328. resizeEvent.delta.x = 0;
  8329. }
  8330. }
  8331. }
  8332. const resize = {
  8333. id: 'actions/resize',
  8334. before: ['actions/drag'],
  8335. install: resize_plugin_install,
  8336. listeners: {
  8337. 'interactions:new': ({
  8338. interaction
  8339. }) => {
  8340. interaction.resizeAxes = 'xy';
  8341. },
  8342. 'interactions:action-start': arg => {
  8343. start(arg);
  8344. updateEventAxes(arg);
  8345. },
  8346. 'interactions:action-move': arg => {
  8347. plugin_move(arg);
  8348. updateEventAxes(arg);
  8349. },
  8350. 'interactions:action-end': end,
  8351. 'auto-start:check': resizeChecker
  8352. },
  8353. defaults: {
  8354. square: false,
  8355. preserveAspectRatio: false,
  8356. axis: 'xy',
  8357. // use default margin
  8358. margin: NaN,
  8359. // object with props left, right, top, bottom which are
  8360. // true/false values to resize when the pointer is over that edge,
  8361. // CSS selectors to match the handles for each direction
  8362. // or the Elements for each handle
  8363. edges: null,
  8364. // a value of 'none' will limit the resize rect to a minimum of 0x0
  8365. // 'negate' will alow the rect to have negative width/height
  8366. // 'reposition' will keep the width/height positive by swapping
  8367. // the top and bottom edges and/or swapping the left and right edges
  8368. invert: 'none'
  8369. },
  8370. cursors: null,
  8371. getCursor({
  8372. edges,
  8373. axis,
  8374. name
  8375. }) {
  8376. const cursors = resize.cursors;
  8377. let result = null;
  8378. if (axis) {
  8379. result = cursors[name + axis];
  8380. } else if (edges) {
  8381. let cursorKey = '';
  8382. for (const edge of ['top', 'bottom', 'left', 'right']) {
  8383. if (edges[edge]) {
  8384. cursorKey += edge;
  8385. }
  8386. }
  8387. result = cursors[cursorKey];
  8388. }
  8389. return result;
  8390. },
  8391. defaultMargin: null
  8392. };
  8393. /* harmony default export */ var resize_plugin = (resize);
  8394. //# sourceMappingURL=plugin.js.map
  8395. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/resize/index.js
  8396. /* eslint-disable import/order, no-console, eol-last */
  8397. if (typeof window === 'object' && !!window) {
  8398. interact_init(window);
  8399. }
  8400. _interactjs_interact.use(resize_plugin);
  8401. //# sourceMappingURL=index.js.map
  8402. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/edgeTarget.js
  8403. /* harmony default export */ var edgeTarget = (() => {});
  8404. //# sourceMappingURL=edgeTarget.js.map
  8405. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/elements.js
  8406. /* harmony default export */ var snappers_elements = (() => {});
  8407. //# sourceMappingURL=elements.js.map
  8408. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/grid.js
  8409. /* harmony default export */ var grid = (grid => {
  8410. const coordFields = [['x', 'y'], ['left', 'top'], ['right', 'bottom'], ['width', 'height']].filter(([xField, yField]) => xField in grid || yField in grid);
  8411. const gridFunc = (x, y) => {
  8412. const {
  8413. range,
  8414. limits = {
  8415. left: -Infinity,
  8416. right: Infinity,
  8417. top: -Infinity,
  8418. bottom: Infinity
  8419. },
  8420. offset = {
  8421. x: 0,
  8422. y: 0
  8423. }
  8424. } = grid;
  8425. const result = {
  8426. range,
  8427. grid,
  8428. x: null,
  8429. y: null
  8430. };
  8431. for (const [xField, yField] of coordFields) {
  8432. const gridx = Math.round((x - offset.x) / grid[xField]);
  8433. const gridy = Math.round((y - offset.y) / grid[yField]);
  8434. result[xField] = Math.max(limits.left, Math.min(limits.right, gridx * grid[xField] + offset.x));
  8435. result[yField] = Math.max(limits.top, Math.min(limits.bottom, gridy * grid[yField] + offset.y));
  8436. }
  8437. return result;
  8438. };
  8439. gridFunc.grid = grid;
  8440. gridFunc.coordFields = coordFields;
  8441. return gridFunc;
  8442. });
  8443. //# sourceMappingURL=grid.js.map
  8444. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/all.js
  8445. //# sourceMappingURL=all.js.map
  8446. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/plugin.js
  8447. const snappersPlugin = {
  8448. id: 'snappers',
  8449. install(scope) {
  8450. const {
  8451. interactStatic: interact
  8452. } = scope;
  8453. interact.snappers = extend(interact.snappers || {}, all_namespaceObject);
  8454. interact.createSnapGrid = interact.snappers.grid;
  8455. }
  8456. };
  8457. /* harmony default export */ var snappers_plugin = (snappersPlugin);
  8458. //# sourceMappingURL=plugin.js.map
  8459. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/Modification.js
  8460. class Modification_Modification {
  8461. constructor(interaction) {
  8462. this.states = [];
  8463. this.startOffset = {
  8464. left: 0,
  8465. right: 0,
  8466. top: 0,
  8467. bottom: 0
  8468. };
  8469. this.startDelta = null;
  8470. this.result = null;
  8471. this.endResult = null;
  8472. this.edges = void 0;
  8473. this.interaction = void 0;
  8474. this.interaction = interaction;
  8475. this.result = createResult();
  8476. }
  8477. start({
  8478. phase
  8479. }, pageCoords) {
  8480. const {
  8481. interaction
  8482. } = this;
  8483. const modifierList = getModifierList(interaction);
  8484. this.prepareStates(modifierList);
  8485. this.edges = extend({}, interaction.edges);
  8486. this.startOffset = getRectOffset(interaction.rect, pageCoords);
  8487. this.startDelta = {
  8488. x: 0,
  8489. y: 0
  8490. };
  8491. const arg = {
  8492. phase,
  8493. pageCoords,
  8494. preEnd: false
  8495. };
  8496. this.result = createResult();
  8497. this.startAll(arg);
  8498. const result = this.result = this.setAll(arg);
  8499. return result;
  8500. }
  8501. fillArg(arg) {
  8502. const {
  8503. interaction
  8504. } = this;
  8505. arg.interaction = interaction;
  8506. arg.interactable = interaction.interactable;
  8507. arg.element = interaction.element;
  8508. arg.rect = arg.rect || interaction.rect;
  8509. arg.edges = this.edges;
  8510. arg.startOffset = this.startOffset;
  8511. }
  8512. startAll(arg) {
  8513. this.fillArg(arg);
  8514. for (const state of this.states) {
  8515. if (state.methods.start) {
  8516. arg.state = state;
  8517. state.methods.start(arg);
  8518. }
  8519. }
  8520. }
  8521. setAll(arg) {
  8522. this.fillArg(arg);
  8523. const {
  8524. phase,
  8525. preEnd,
  8526. skipModifiers,
  8527. rect: unmodifiedRect
  8528. } = arg;
  8529. arg.coords = extend({}, arg.pageCoords);
  8530. arg.rect = extend({}, unmodifiedRect);
  8531. const states = skipModifiers ? this.states.slice(skipModifiers) : this.states;
  8532. const newResult = createResult(arg.coords, arg.rect);
  8533. for (const state of states) {
  8534. const {
  8535. options
  8536. } = state;
  8537. const lastModifierCoords = extend({}, arg.coords);
  8538. let returnValue = null;
  8539. if (state.methods.set && this.shouldDo(options, preEnd, phase)) {
  8540. arg.state = state;
  8541. returnValue = state.methods.set(arg);
  8542. addEdges(this.interaction.edges, arg.rect, {
  8543. x: arg.coords.x - lastModifierCoords.x,
  8544. y: arg.coords.y - lastModifierCoords.y
  8545. });
  8546. }
  8547. newResult.eventProps.push(returnValue);
  8548. }
  8549. newResult.delta.x = arg.coords.x - arg.pageCoords.x;
  8550. newResult.delta.y = arg.coords.y - arg.pageCoords.y;
  8551. newResult.rectDelta.left = arg.rect.left - unmodifiedRect.left;
  8552. newResult.rectDelta.right = arg.rect.right - unmodifiedRect.right;
  8553. newResult.rectDelta.top = arg.rect.top - unmodifiedRect.top;
  8554. newResult.rectDelta.bottom = arg.rect.bottom - unmodifiedRect.bottom;
  8555. const prevCoords = this.result.coords;
  8556. const prevRect = this.result.rect;
  8557. if (prevCoords && prevRect) {
  8558. const rectChanged = newResult.rect.left !== prevRect.left || newResult.rect.right !== prevRect.right || newResult.rect.top !== prevRect.top || newResult.rect.bottom !== prevRect.bottom;
  8559. newResult.changed = rectChanged || prevCoords.x !== newResult.coords.x || prevCoords.y !== newResult.coords.y;
  8560. }
  8561. return newResult;
  8562. }
  8563. applyToInteraction(arg) {
  8564. const {
  8565. interaction
  8566. } = this;
  8567. const {
  8568. phase
  8569. } = arg;
  8570. const curCoords = interaction.coords.cur;
  8571. const startCoords = interaction.coords.start;
  8572. const {
  8573. result,
  8574. startDelta
  8575. } = this;
  8576. const curDelta = result.delta;
  8577. if (phase === 'start') {
  8578. extend(this.startDelta, result.delta);
  8579. }
  8580. for (const [coordsSet, delta] of [[startCoords, startDelta], [curCoords, curDelta]]) {
  8581. coordsSet.page.x += delta.x;
  8582. coordsSet.page.y += delta.y;
  8583. coordsSet.client.x += delta.x;
  8584. coordsSet.client.y += delta.y;
  8585. }
  8586. const {
  8587. rectDelta
  8588. } = this.result;
  8589. const rect = arg.rect || interaction.rect;
  8590. rect.left += rectDelta.left;
  8591. rect.right += rectDelta.right;
  8592. rect.top += rectDelta.top;
  8593. rect.bottom += rectDelta.bottom;
  8594. rect.width = rect.right - rect.left;
  8595. rect.height = rect.bottom - rect.top;
  8596. }
  8597. setAndApply(arg) {
  8598. const {
  8599. interaction
  8600. } = this;
  8601. const {
  8602. phase,
  8603. preEnd,
  8604. skipModifiers
  8605. } = arg;
  8606. const result = this.setAll({
  8607. preEnd,
  8608. phase,
  8609. pageCoords: arg.modifiedCoords || interaction.coords.cur.page
  8610. });
  8611. this.result = result; // don't fire an action move if a modifier would keep the event in the same
  8612. // cordinates as before
  8613. if (!result.changed && (!skipModifiers || skipModifiers < this.states.length) && interaction.interacting()) {
  8614. return false;
  8615. }
  8616. if (arg.modifiedCoords) {
  8617. const {
  8618. page
  8619. } = interaction.coords.cur;
  8620. const adjustment = {
  8621. x: arg.modifiedCoords.x - page.x,
  8622. y: arg.modifiedCoords.y - page.y
  8623. };
  8624. result.coords.x += adjustment.x;
  8625. result.coords.y += adjustment.y;
  8626. result.delta.x += adjustment.x;
  8627. result.delta.y += adjustment.y;
  8628. }
  8629. this.applyToInteraction(arg);
  8630. }
  8631. beforeEnd(arg) {
  8632. const {
  8633. interaction,
  8634. event
  8635. } = arg;
  8636. const states = this.states;
  8637. if (!states || !states.length) {
  8638. return;
  8639. }
  8640. let doPreend = false;
  8641. for (const state of states) {
  8642. arg.state = state;
  8643. const {
  8644. options,
  8645. methods
  8646. } = state;
  8647. const endPosition = methods.beforeEnd && methods.beforeEnd(arg);
  8648. if (endPosition) {
  8649. this.endResult = endPosition;
  8650. return false;
  8651. }
  8652. doPreend = doPreend || !doPreend && this.shouldDo(options, true, arg.phase, true);
  8653. }
  8654. if (doPreend) {
  8655. // trigger a final modified move before ending
  8656. interaction.move({
  8657. event,
  8658. preEnd: true
  8659. });
  8660. }
  8661. }
  8662. stop(arg) {
  8663. const {
  8664. interaction
  8665. } = arg;
  8666. if (!this.states || !this.states.length) {
  8667. return;
  8668. }
  8669. const modifierArg = extend({
  8670. states: this.states,
  8671. interactable: interaction.interactable,
  8672. element: interaction.element,
  8673. rect: null
  8674. }, arg);
  8675. this.fillArg(modifierArg);
  8676. for (const state of this.states) {
  8677. modifierArg.state = state;
  8678. if (state.methods.stop) {
  8679. state.methods.stop(modifierArg);
  8680. }
  8681. }
  8682. this.states = null;
  8683. this.endResult = null;
  8684. }
  8685. prepareStates(modifierList) {
  8686. this.states = [];
  8687. for (let index = 0; index < modifierList.length; index++) {
  8688. const {
  8689. options,
  8690. methods,
  8691. name
  8692. } = modifierList[index];
  8693. this.states.push({
  8694. options,
  8695. methods,
  8696. index,
  8697. name
  8698. });
  8699. }
  8700. return this.states;
  8701. }
  8702. restoreInteractionCoords({
  8703. interaction: {
  8704. coords,
  8705. rect,
  8706. modification
  8707. }
  8708. }) {
  8709. if (!modification.result) {
  8710. return;
  8711. }
  8712. const {
  8713. startDelta
  8714. } = modification;
  8715. const {
  8716. delta: curDelta,
  8717. rectDelta
  8718. } = modification.result;
  8719. const coordsAndDeltas = [[coords.start, startDelta], [coords.cur, curDelta]];
  8720. for (const [coordsSet, delta] of coordsAndDeltas) {
  8721. coordsSet.page.x -= delta.x;
  8722. coordsSet.page.y -= delta.y;
  8723. coordsSet.client.x -= delta.x;
  8724. coordsSet.client.y -= delta.y;
  8725. }
  8726. rect.left -= rectDelta.left;
  8727. rect.right -= rectDelta.right;
  8728. rect.top -= rectDelta.top;
  8729. rect.bottom -= rectDelta.bottom;
  8730. }
  8731. shouldDo(options, preEnd, phase, requireEndOnly) {
  8732. if ( // ignore disabled modifiers
  8733. !options || options.enabled === false || // check if we require endOnly option to fire move before end
  8734. requireEndOnly && !options.endOnly || // don't apply endOnly modifiers when not ending
  8735. options.endOnly && !preEnd || // check if modifier should run be applied on start
  8736. phase === 'start' && !options.setStart) {
  8737. return false;
  8738. }
  8739. return true;
  8740. }
  8741. copyFrom(other) {
  8742. this.startOffset = other.startOffset;
  8743. this.startDelta = other.startDelta;
  8744. this.edges = other.edges;
  8745. this.states = other.states.map(s => clone(s));
  8746. this.result = createResult(extend({}, other.result.coords), extend({}, other.result.rect));
  8747. }
  8748. destroy() {
  8749. for (const prop in this) {
  8750. this[prop] = null;
  8751. }
  8752. }
  8753. }
  8754. function createResult(coords, rect) {
  8755. return {
  8756. rect,
  8757. coords,
  8758. delta: {
  8759. x: 0,
  8760. y: 0
  8761. },
  8762. rectDelta: {
  8763. left: 0,
  8764. right: 0,
  8765. top: 0,
  8766. bottom: 0
  8767. },
  8768. eventProps: [],
  8769. changed: true
  8770. };
  8771. }
  8772. function getModifierList(interaction) {
  8773. const actionOptions = interaction.interactable.options[interaction.prepared.name];
  8774. const actionModifiers = actionOptions.modifiers;
  8775. if (actionModifiers && actionModifiers.length) {
  8776. return actionModifiers;
  8777. }
  8778. return ['snap', 'snapSize', 'snapEdges', 'restrict', 'restrictEdges', 'restrictSize'].map(type => {
  8779. const options = actionOptions[type];
  8780. return options && options.enabled && {
  8781. options,
  8782. methods: options._methods
  8783. };
  8784. }).filter(m => !!m);
  8785. }
  8786. function getRectOffset(rect, coords) {
  8787. return rect ? {
  8788. left: coords.x - rect.left,
  8789. top: coords.y - rect.top,
  8790. right: rect.right - coords.x,
  8791. bottom: rect.bottom - coords.y
  8792. } : {
  8793. left: 0,
  8794. top: 0,
  8795. right: 0,
  8796. bottom: 0
  8797. };
  8798. }
  8799. //# sourceMappingURL=Modification.js.map
  8800. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/base.js
  8801. function makeModifier(module, name) {
  8802. const {
  8803. defaults
  8804. } = module;
  8805. const methods = {
  8806. start: module.start,
  8807. set: module.set,
  8808. beforeEnd: module.beforeEnd,
  8809. stop: module.stop
  8810. };
  8811. const modifier = _options => {
  8812. const options = _options || {};
  8813. options.enabled = options.enabled !== false; // add missing defaults to options
  8814. for (const prop in defaults) {
  8815. if (!(prop in options)) {
  8816. options[prop] = defaults[prop];
  8817. }
  8818. }
  8819. const m = {
  8820. options,
  8821. methods,
  8822. name,
  8823. enable: () => {
  8824. options.enabled = true;
  8825. return m;
  8826. },
  8827. disable: () => {
  8828. options.enabled = false;
  8829. return m;
  8830. }
  8831. };
  8832. return m;
  8833. };
  8834. if (name && typeof name === 'string') {
  8835. // for backwrads compatibility
  8836. modifier._defaults = defaults;
  8837. modifier._methods = methods;
  8838. }
  8839. return modifier;
  8840. }
  8841. function addEventModifiers({
  8842. iEvent,
  8843. interaction: {
  8844. modification: {
  8845. result
  8846. }
  8847. }
  8848. }) {
  8849. if (result) {
  8850. iEvent.modifiers = result.eventProps;
  8851. }
  8852. }
  8853. const modifiersBase = {
  8854. id: 'modifiers/base',
  8855. before: ['actions'],
  8856. install: scope => {
  8857. scope.defaults.perAction.modifiers = [];
  8858. },
  8859. listeners: {
  8860. 'interactions:new': ({
  8861. interaction
  8862. }) => {
  8863. interaction.modification = new Modification_Modification(interaction);
  8864. },
  8865. 'interactions:before-action-start': arg => {
  8866. const {
  8867. modification
  8868. } = arg.interaction;
  8869. modification.start(arg, arg.interaction.coords.start.page);
  8870. arg.interaction.edges = modification.edges;
  8871. modification.applyToInteraction(arg);
  8872. },
  8873. 'interactions:before-action-move': arg => arg.interaction.modification.setAndApply(arg),
  8874. 'interactions:before-action-end': arg => arg.interaction.modification.beforeEnd(arg),
  8875. 'interactions:action-start': addEventModifiers,
  8876. 'interactions:action-move': addEventModifiers,
  8877. 'interactions:action-end': addEventModifiers,
  8878. 'interactions:after-action-start': arg => arg.interaction.modification.restoreInteractionCoords(arg),
  8879. 'interactions:after-action-move': arg => arg.interaction.modification.restoreInteractionCoords(arg),
  8880. 'interactions:stop': arg => arg.interaction.modification.stop(arg)
  8881. }
  8882. };
  8883. /* harmony default export */ var modifiers_base = (modifiersBase);
  8884. //# sourceMappingURL=base.js.map
  8885. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/aspectRatio.js
  8886. /**
  8887. * @module modifiers/aspectRatio
  8888. *
  8889. * @description
  8890. * This module forces elements to be resized with a specified dx/dy ratio.
  8891. *
  8892. * ```js
  8893. * interact(target).resizable({
  8894. * modifiers: [
  8895. * interact.modifiers.snapSize({
  8896. * targets: [ interact.snappers.grid({ x: 20, y: 20 }) ],
  8897. * }),
  8898. * interact.aspectRatio({ ratio: 'preserve' }),
  8899. * ],
  8900. * });
  8901. * ```
  8902. */
  8903. const aspectRatio = {
  8904. start(arg) {
  8905. const {
  8906. state,
  8907. rect,
  8908. edges: originalEdges,
  8909. pageCoords: coords
  8910. } = arg;
  8911. let {
  8912. ratio
  8913. } = state.options;
  8914. const {
  8915. equalDelta,
  8916. modifiers
  8917. } = state.options;
  8918. if (ratio === 'preserve') {
  8919. ratio = rect.width / rect.height;
  8920. }
  8921. state.startCoords = extend({}, coords);
  8922. state.startRect = extend({}, rect);
  8923. state.ratio = ratio;
  8924. state.equalDelta = equalDelta;
  8925. const linkedEdges = state.linkedEdges = {
  8926. top: originalEdges.top || originalEdges.left && !originalEdges.bottom,
  8927. left: originalEdges.left || originalEdges.top && !originalEdges.right,
  8928. bottom: originalEdges.bottom || originalEdges.right && !originalEdges.top,
  8929. right: originalEdges.right || originalEdges.bottom && !originalEdges.left
  8930. };
  8931. state.xIsPrimaryAxis = !!(originalEdges.left || originalEdges.right);
  8932. if (state.equalDelta) {
  8933. state.edgeSign = (linkedEdges.left ? 1 : -1) * (linkedEdges.top ? 1 : -1);
  8934. } else {
  8935. const negativeSecondaryEdge = state.xIsPrimaryAxis ? linkedEdges.top : linkedEdges.left;
  8936. state.edgeSign = negativeSecondaryEdge ? -1 : 1;
  8937. }
  8938. extend(arg.edges, linkedEdges);
  8939. if (!modifiers || !modifiers.length) {
  8940. return;
  8941. }
  8942. const subModification = new Modification_Modification(arg.interaction);
  8943. subModification.copyFrom(arg.interaction.modification);
  8944. subModification.prepareStates(modifiers);
  8945. state.subModification = subModification;
  8946. subModification.startAll({ ...arg
  8947. });
  8948. },
  8949. set(arg) {
  8950. const {
  8951. state,
  8952. rect,
  8953. coords
  8954. } = arg;
  8955. const initialCoords = extend({}, coords);
  8956. const aspectMethod = state.equalDelta ? setEqualDelta : setRatio;
  8957. aspectMethod(state, state.xIsPrimaryAxis, coords, rect);
  8958. if (!state.subModification) {
  8959. return null;
  8960. }
  8961. const correctedRect = extend({}, rect);
  8962. addEdges(state.linkedEdges, correctedRect, {
  8963. x: coords.x - initialCoords.x,
  8964. y: coords.y - initialCoords.y
  8965. });
  8966. const result = state.subModification.setAll({ ...arg,
  8967. rect: correctedRect,
  8968. edges: state.linkedEdges,
  8969. pageCoords: coords,
  8970. prevCoords: coords,
  8971. prevRect: correctedRect
  8972. });
  8973. const {
  8974. delta
  8975. } = result;
  8976. if (result.changed) {
  8977. const xIsCriticalAxis = Math.abs(delta.x) > Math.abs(delta.y); // do aspect modification again with critical edge axis as primary
  8978. aspectMethod(state, xIsCriticalAxis, result.coords, result.rect);
  8979. extend(coords, result.coords);
  8980. }
  8981. return result.eventProps;
  8982. },
  8983. defaults: {
  8984. ratio: 'preserve',
  8985. equalDelta: false,
  8986. modifiers: [],
  8987. enabled: false
  8988. }
  8989. };
  8990. function setEqualDelta({
  8991. startCoords,
  8992. edgeSign
  8993. }, xIsPrimaryAxis, coords) {
  8994. if (xIsPrimaryAxis) {
  8995. coords.y = startCoords.y + (coords.x - startCoords.x) * edgeSign;
  8996. } else {
  8997. coords.x = startCoords.x + (coords.y - startCoords.y) * edgeSign;
  8998. }
  8999. }
  9000. function setRatio({
  9001. startRect,
  9002. startCoords,
  9003. ratio,
  9004. edgeSign
  9005. }, xIsPrimaryAxis, coords, rect) {
  9006. if (xIsPrimaryAxis) {
  9007. const newHeight = rect.width / ratio;
  9008. coords.y = startCoords.y + (newHeight - startRect.height) * edgeSign;
  9009. } else {
  9010. const newWidth = rect.height * ratio;
  9011. coords.x = startCoords.x + (newWidth - startRect.width) * edgeSign;
  9012. }
  9013. }
  9014. /* harmony default export */ var modifiers_aspectRatio = (makeModifier(aspectRatio, 'aspectRatio'));
  9015. //# sourceMappingURL=aspectRatio.js.map
  9016. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/noop.js
  9017. const noop = () => {};
  9018. noop._defaults = {};
  9019. /* harmony default export */ var modifiers_noop = (noop);
  9020. //# sourceMappingURL=noop.js.map
  9021. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/pointer.js
  9022. function pointer_start({
  9023. rect,
  9024. startOffset,
  9025. state,
  9026. interaction,
  9027. pageCoords
  9028. }) {
  9029. const {
  9030. options
  9031. } = state;
  9032. const {
  9033. elementRect
  9034. } = options;
  9035. const offset = extend({
  9036. left: 0,
  9037. top: 0,
  9038. right: 0,
  9039. bottom: 0
  9040. }, options.offset || {});
  9041. if (rect && elementRect) {
  9042. const restriction = getRestrictionRect(options.restriction, interaction, pageCoords);
  9043. if (restriction) {
  9044. const widthDiff = restriction.right - restriction.left - rect.width;
  9045. const heightDiff = restriction.bottom - restriction.top - rect.height;
  9046. if (widthDiff < 0) {
  9047. offset.left += widthDiff;
  9048. offset.right += widthDiff;
  9049. }
  9050. if (heightDiff < 0) {
  9051. offset.top += heightDiff;
  9052. offset.bottom += heightDiff;
  9053. }
  9054. }
  9055. offset.left += startOffset.left - rect.width * elementRect.left;
  9056. offset.top += startOffset.top - rect.height * elementRect.top;
  9057. offset.right += startOffset.right - rect.width * (1 - elementRect.right);
  9058. offset.bottom += startOffset.bottom - rect.height * (1 - elementRect.bottom);
  9059. }
  9060. state.offset = offset;
  9061. }
  9062. function set({
  9063. coords,
  9064. interaction,
  9065. state
  9066. }) {
  9067. const {
  9068. options,
  9069. offset
  9070. } = state;
  9071. const restriction = getRestrictionRect(options.restriction, interaction, coords);
  9072. if (!restriction) {
  9073. return;
  9074. }
  9075. const rect = xywhToTlbr(restriction);
  9076. coords.x = Math.max(Math.min(rect.right - offset.right, coords.x), rect.left + offset.left);
  9077. coords.y = Math.max(Math.min(rect.bottom - offset.bottom, coords.y), rect.top + offset.top);
  9078. }
  9079. function getRestrictionRect(value, interaction, coords) {
  9080. if (is.func(value)) {
  9081. return resolveRectLike(value, interaction.interactable, interaction.element, [coords.x, coords.y, interaction]);
  9082. } else {
  9083. return resolveRectLike(value, interaction.interactable, interaction.element);
  9084. }
  9085. }
  9086. const pointer_defaults = {
  9087. restriction: null,
  9088. elementRect: null,
  9089. offset: null,
  9090. endOnly: false,
  9091. enabled: false
  9092. };
  9093. const restrict = {
  9094. start: pointer_start,
  9095. set,
  9096. defaults: pointer_defaults
  9097. };
  9098. /* harmony default export */ var restrict_pointer = (makeModifier(restrict, 'restrict'));
  9099. //# sourceMappingURL=pointer.js.map
  9100. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/edges.js
  9101. // This module adds the options.resize.restrictEdges setting which sets min and
  9102. // max for the top, left, bottom and right edges of the target being resized.
  9103. //
  9104. // interact(target).resize({
  9105. // edges: { top: true, left: true },
  9106. // restrictEdges: {
  9107. // inner: { top: 200, left: 200, right: 400, bottom: 400 },
  9108. // outer: { top: 0, left: 0, right: 600, bottom: 600 },
  9109. // },
  9110. // })
  9111. const noInner = {
  9112. top: +Infinity,
  9113. left: +Infinity,
  9114. bottom: -Infinity,
  9115. right: -Infinity
  9116. };
  9117. const noOuter = {
  9118. top: -Infinity,
  9119. left: -Infinity,
  9120. bottom: +Infinity,
  9121. right: +Infinity
  9122. };
  9123. function edges_start({
  9124. interaction,
  9125. startOffset,
  9126. state
  9127. }) {
  9128. const {
  9129. options
  9130. } = state;
  9131. let offset;
  9132. if (options) {
  9133. const offsetRect = getRestrictionRect(options.offset, interaction, interaction.coords.start.page);
  9134. offset = rectToXY(offsetRect);
  9135. }
  9136. offset = offset || {
  9137. x: 0,
  9138. y: 0
  9139. };
  9140. state.offset = {
  9141. top: offset.y + startOffset.top,
  9142. left: offset.x + startOffset.left,
  9143. bottom: offset.y - startOffset.bottom,
  9144. right: offset.x - startOffset.right
  9145. };
  9146. }
  9147. function edges_set({
  9148. coords,
  9149. edges,
  9150. interaction,
  9151. state
  9152. }) {
  9153. const {
  9154. offset,
  9155. options
  9156. } = state;
  9157. if (!edges) {
  9158. return;
  9159. }
  9160. const page = extend({}, coords);
  9161. const inner = getRestrictionRect(options.inner, interaction, page) || {};
  9162. const outer = getRestrictionRect(options.outer, interaction, page) || {};
  9163. fixRect(inner, noInner);
  9164. fixRect(outer, noOuter);
  9165. if (edges.top) {
  9166. coords.y = Math.min(Math.max(outer.top + offset.top, page.y), inner.top + offset.top);
  9167. } else if (edges.bottom) {
  9168. coords.y = Math.max(Math.min(outer.bottom + offset.bottom, page.y), inner.bottom + offset.bottom);
  9169. }
  9170. if (edges.left) {
  9171. coords.x = Math.min(Math.max(outer.left + offset.left, page.x), inner.left + offset.left);
  9172. } else if (edges.right) {
  9173. coords.x = Math.max(Math.min(outer.right + offset.right, page.x), inner.right + offset.right);
  9174. }
  9175. }
  9176. function fixRect(rect, defaults) {
  9177. for (const edge of ['top', 'left', 'bottom', 'right']) {
  9178. if (!(edge in rect)) {
  9179. rect[edge] = defaults[edge];
  9180. }
  9181. }
  9182. return rect;
  9183. }
  9184. const edges_defaults = {
  9185. inner: null,
  9186. outer: null,
  9187. offset: null,
  9188. endOnly: false,
  9189. enabled: false
  9190. };
  9191. const restrictEdges = {
  9192. noInner,
  9193. noOuter,
  9194. start: edges_start,
  9195. set: edges_set,
  9196. defaults: edges_defaults
  9197. };
  9198. /* harmony default export */ var restrict_edges = (makeModifier(restrictEdges, 'restrictEdges'));
  9199. //# sourceMappingURL=edges.js.map
  9200. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/rect.js
  9201. const rect_defaults = extend({
  9202. get elementRect() {
  9203. return {
  9204. top: 0,
  9205. left: 0,
  9206. bottom: 1,
  9207. right: 1
  9208. };
  9209. },
  9210. set elementRect(_) {}
  9211. }, restrict.defaults);
  9212. const restrictRect = {
  9213. start: restrict.start,
  9214. set: restrict.set,
  9215. defaults: rect_defaults
  9216. };
  9217. /* harmony default export */ var restrict_rect = (makeModifier(restrictRect, 'restrictRect'));
  9218. //# sourceMappingURL=rect.js.map
  9219. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/size.js
  9220. const noMin = {
  9221. width: -Infinity,
  9222. height: -Infinity
  9223. };
  9224. const noMax = {
  9225. width: +Infinity,
  9226. height: +Infinity
  9227. };
  9228. function size_start(arg) {
  9229. return restrictEdges.start(arg);
  9230. }
  9231. function size_set(arg) {
  9232. const {
  9233. interaction,
  9234. state,
  9235. rect,
  9236. edges
  9237. } = arg;
  9238. const {
  9239. options
  9240. } = state;
  9241. if (!edges) {
  9242. return;
  9243. }
  9244. const minSize = tlbrToXywh(getRestrictionRect(options.min, interaction, arg.coords)) || noMin;
  9245. const maxSize = tlbrToXywh(getRestrictionRect(options.max, interaction, arg.coords)) || noMax;
  9246. state.options = {
  9247. endOnly: options.endOnly,
  9248. inner: extend({}, restrictEdges.noInner),
  9249. outer: extend({}, restrictEdges.noOuter)
  9250. };
  9251. if (edges.top) {
  9252. state.options.inner.top = rect.bottom - minSize.height;
  9253. state.options.outer.top = rect.bottom - maxSize.height;
  9254. } else if (edges.bottom) {
  9255. state.options.inner.bottom = rect.top + minSize.height;
  9256. state.options.outer.bottom = rect.top + maxSize.height;
  9257. }
  9258. if (edges.left) {
  9259. state.options.inner.left = rect.right - minSize.width;
  9260. state.options.outer.left = rect.right - maxSize.width;
  9261. } else if (edges.right) {
  9262. state.options.inner.right = rect.left + minSize.width;
  9263. state.options.outer.right = rect.left + maxSize.width;
  9264. }
  9265. restrictEdges.set(arg);
  9266. state.options = options;
  9267. }
  9268. const size_defaults = {
  9269. min: null,
  9270. max: null,
  9271. endOnly: false,
  9272. enabled: false
  9273. };
  9274. const restrictSize = {
  9275. start: size_start,
  9276. set: size_set,
  9277. defaults: size_defaults
  9278. };
  9279. /* harmony default export */ var size = (makeModifier(restrictSize, 'restrictSize'));
  9280. //# sourceMappingURL=size.js.map
  9281. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/pointer.js
  9282. function snap_pointer_start(arg) {
  9283. const {
  9284. interaction,
  9285. interactable,
  9286. element,
  9287. rect,
  9288. state,
  9289. startOffset
  9290. } = arg;
  9291. const {
  9292. options
  9293. } = state;
  9294. const origin = options.offsetWithOrigin ? getOrigin(arg) : {
  9295. x: 0,
  9296. y: 0
  9297. };
  9298. let snapOffset;
  9299. if (options.offset === 'startCoords') {
  9300. snapOffset = {
  9301. x: interaction.coords.start.page.x,
  9302. y: interaction.coords.start.page.y
  9303. };
  9304. } else {
  9305. const offsetRect = resolveRectLike(options.offset, interactable, element, [interaction]);
  9306. snapOffset = rectToXY(offsetRect) || {
  9307. x: 0,
  9308. y: 0
  9309. };
  9310. snapOffset.x += origin.x;
  9311. snapOffset.y += origin.y;
  9312. }
  9313. const {
  9314. relativePoints
  9315. } = options;
  9316. state.offsets = rect && relativePoints && relativePoints.length ? relativePoints.map((relativePoint, index) => ({
  9317. index,
  9318. relativePoint,
  9319. x: startOffset.left - rect.width * relativePoint.x + snapOffset.x,
  9320. y: startOffset.top - rect.height * relativePoint.y + snapOffset.y
  9321. })) : [extend({
  9322. index: 0,
  9323. relativePoint: null
  9324. }, snapOffset)];
  9325. }
  9326. function pointer_set(arg) {
  9327. const {
  9328. interaction,
  9329. coords,
  9330. state
  9331. } = arg;
  9332. const {
  9333. options,
  9334. offsets
  9335. } = state;
  9336. const origin = getOriginXY(interaction.interactable, interaction.element, interaction.prepared.name);
  9337. const page = extend({}, coords);
  9338. const targets = [];
  9339. if (!options.offsetWithOrigin) {
  9340. page.x -= origin.x;
  9341. page.y -= origin.y;
  9342. }
  9343. for (const offset of offsets) {
  9344. const relativeX = page.x - offset.x;
  9345. const relativeY = page.y - offset.y;
  9346. for (let index = 0, len = options.targets.length; index < len; index++) {
  9347. const snapTarget = options.targets[index];
  9348. let target;
  9349. if (is.func(snapTarget)) {
  9350. target = snapTarget(relativeX, relativeY, interaction._proxy, offset, index);
  9351. } else {
  9352. target = snapTarget;
  9353. }
  9354. if (!target) {
  9355. continue;
  9356. }
  9357. targets.push({
  9358. x: (is.number(target.x) ? target.x : relativeX) + offset.x,
  9359. y: (is.number(target.y) ? target.y : relativeY) + offset.y,
  9360. range: is.number(target.range) ? target.range : options.range,
  9361. source: snapTarget,
  9362. index,
  9363. offset
  9364. });
  9365. }
  9366. }
  9367. const closest = {
  9368. target: null,
  9369. inRange: false,
  9370. distance: 0,
  9371. range: 0,
  9372. delta: {
  9373. x: 0,
  9374. y: 0
  9375. }
  9376. };
  9377. for (const target of targets) {
  9378. const range = target.range;
  9379. const dx = target.x - page.x;
  9380. const dy = target.y - page.y;
  9381. const distance = hypot(dx, dy);
  9382. let inRange = distance <= range; // Infinite targets count as being out of range
  9383. // compared to non infinite ones that are in range
  9384. if (range === Infinity && closest.inRange && closest.range !== Infinity) {
  9385. inRange = false;
  9386. }
  9387. if (!closest.target || (inRange // is the closest target in range?
  9388. ? closest.inRange && range !== Infinity // the pointer is relatively deeper in this target
  9389. ? distance / range < closest.distance / closest.range // this target has Infinite range and the closest doesn't
  9390. : range === Infinity && closest.range !== Infinity || // OR this target is closer that the previous closest
  9391. distance < closest.distance : // The other is not in range and the pointer is closer to this target
  9392. !closest.inRange && distance < closest.distance)) {
  9393. closest.target = target;
  9394. closest.distance = distance;
  9395. closest.range = range;
  9396. closest.inRange = inRange;
  9397. closest.delta.x = dx;
  9398. closest.delta.y = dy;
  9399. }
  9400. }
  9401. if (closest.inRange) {
  9402. coords.x = closest.target.x;
  9403. coords.y = closest.target.y;
  9404. }
  9405. state.closest = closest;
  9406. return closest;
  9407. }
  9408. function getOrigin(arg) {
  9409. const {
  9410. element
  9411. } = arg.interaction;
  9412. const optionsOrigin = rectToXY(resolveRectLike(arg.state.options.origin, null, null, [element]));
  9413. const origin = optionsOrigin || getOriginXY(arg.interactable, element, arg.interaction.prepared.name);
  9414. return origin;
  9415. }
  9416. const snap_pointer_defaults = {
  9417. range: Infinity,
  9418. targets: null,
  9419. offset: null,
  9420. offsetWithOrigin: true,
  9421. origin: null,
  9422. relativePoints: null,
  9423. endOnly: false,
  9424. enabled: false
  9425. };
  9426. const snap = {
  9427. start: snap_pointer_start,
  9428. set: pointer_set,
  9429. defaults: snap_pointer_defaults
  9430. };
  9431. /* harmony default export */ var snap_pointer = (makeModifier(snap, 'snap'));
  9432. //# sourceMappingURL=pointer.js.map
  9433. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/size.js
  9434. // This module allows snapping of the size of targets during resize
  9435. // interactions.
  9436. function snap_size_start(arg) {
  9437. const {
  9438. state,
  9439. edges
  9440. } = arg;
  9441. const {
  9442. options
  9443. } = state;
  9444. if (!edges) {
  9445. return null;
  9446. }
  9447. arg.state = {
  9448. options: {
  9449. targets: null,
  9450. relativePoints: [{
  9451. x: edges.left ? 0 : 1,
  9452. y: edges.top ? 0 : 1
  9453. }],
  9454. offset: options.offset || 'self',
  9455. origin: {
  9456. x: 0,
  9457. y: 0
  9458. },
  9459. range: options.range
  9460. }
  9461. };
  9462. state.targetFields = state.targetFields || [['width', 'height'], ['x', 'y']];
  9463. snap.start(arg);
  9464. state.offsets = arg.state.offsets;
  9465. arg.state = state;
  9466. }
  9467. function snap_size_set(arg) {
  9468. const {
  9469. interaction,
  9470. state,
  9471. coords
  9472. } = arg;
  9473. const {
  9474. options,
  9475. offsets
  9476. } = state;
  9477. const relative = {
  9478. x: coords.x - offsets[0].x,
  9479. y: coords.y - offsets[0].y
  9480. };
  9481. state.options = extend({}, options);
  9482. state.options.targets = [];
  9483. for (const snapTarget of options.targets || []) {
  9484. let target;
  9485. if (is.func(snapTarget)) {
  9486. target = snapTarget(relative.x, relative.y, interaction);
  9487. } else {
  9488. target = snapTarget;
  9489. }
  9490. if (!target) {
  9491. continue;
  9492. }
  9493. for (const [xField, yField] of state.targetFields) {
  9494. if (xField in target || yField in target) {
  9495. target.x = target[xField];
  9496. target.y = target[yField];
  9497. break;
  9498. }
  9499. }
  9500. state.options.targets.push(target);
  9501. }
  9502. const returnValue = snap.set(arg);
  9503. state.options = options;
  9504. return returnValue;
  9505. }
  9506. const snap_size_defaults = {
  9507. range: Infinity,
  9508. targets: null,
  9509. offset: null,
  9510. endOnly: false,
  9511. enabled: false
  9512. };
  9513. const snapSize = {
  9514. start: snap_size_start,
  9515. set: snap_size_set,
  9516. defaults: snap_size_defaults
  9517. };
  9518. /* harmony default export */ var snap_size = (makeModifier(snapSize, 'snapSize'));
  9519. //# sourceMappingURL=size.js.map
  9520. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/edges.js
  9521. /**
  9522. * @module modifiers/snapEdges
  9523. *
  9524. * @description
  9525. * WOW> This module allows snapping of the edges of targets during resize
  9526. * interactions.
  9527. *
  9528. * ```js
  9529. * interact(target).resizable({
  9530. * snapEdges: {
  9531. * targets: [interact.snappers.grid({ x: 100, y: 50 })],
  9532. * },
  9533. * })
  9534. *
  9535. * interact(target).resizable({
  9536. * snapEdges: {
  9537. * targets: [
  9538. * interact.snappers.grid({
  9539. * top: 50,
  9540. * left: 50,
  9541. * bottom: 100,
  9542. * right: 100,
  9543. * }),
  9544. * ],
  9545. * },
  9546. * })
  9547. * ```
  9548. */
  9549. function snap_edges_start(arg) {
  9550. const {
  9551. edges
  9552. } = arg;
  9553. if (!edges) {
  9554. return null;
  9555. }
  9556. arg.state.targetFields = arg.state.targetFields || [[edges.left ? 'left' : 'right', edges.top ? 'top' : 'bottom']];
  9557. return snapSize.start(arg);
  9558. }
  9559. const snapEdges = {
  9560. start: snap_edges_start,
  9561. set: snapSize.set,
  9562. defaults: extend(clone(snapSize.defaults), {
  9563. targets: null,
  9564. range: null,
  9565. offset: {
  9566. x: 0,
  9567. y: 0
  9568. }
  9569. })
  9570. };
  9571. /* harmony default export */ var snap_edges = (makeModifier(snapEdges, 'snapEdges'));
  9572. //# sourceMappingURL=edges.js.map
  9573. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/all.js
  9574. /* eslint-disable node/no-extraneous-import */
  9575. /* harmony default export */ var modifiers_all = ({
  9576. aspectRatio: modifiers_aspectRatio,
  9577. restrictEdges: restrict_edges,
  9578. restrict: restrict_pointer,
  9579. restrictRect: restrict_rect,
  9580. restrictSize: size,
  9581. snapEdges: snap_edges,
  9582. snap: snap_pointer,
  9583. snapSize: snap_size,
  9584. spring: modifiers_noop,
  9585. avoid: modifiers_noop,
  9586. transform: modifiers_noop,
  9587. rubberband: modifiers_noop
  9588. });
  9589. //# sourceMappingURL=all.js.map
  9590. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/plugin.js
  9591. const plugin_modifiers = {
  9592. id: 'modifiers',
  9593. install(scope) {
  9594. const {
  9595. interactStatic: interact
  9596. } = scope;
  9597. scope.usePlugin(modifiers_base);
  9598. scope.usePlugin(snappers_plugin);
  9599. interact.modifiers = modifiers_all; // for backwrads compatibility
  9600. for (const type in modifiers_all) {
  9601. const {
  9602. _defaults,
  9603. _methods
  9604. } = modifiers_all[type];
  9605. _defaults._methods = _methods;
  9606. scope.defaults.perAction[type] = _defaults;
  9607. }
  9608. }
  9609. };
  9610. /* harmony default export */ var modifiers_plugin = (plugin_modifiers);
  9611. //# sourceMappingURL=plugin.js.map
  9612. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/index.js
  9613. /* eslint-disable import/order, no-console, eol-last */
  9614. if (typeof window === 'object' && !!window) {
  9615. interact_init(window);
  9616. }
  9617. _interactjs_interact.use(modifiers_plugin);
  9618. //# sourceMappingURL=index.js.map
  9619. // CONCATENATED MODULE: ./node_modules/@interactjs/dev-tools/plugin.js
  9620. /* eslint-disable no-console */
  9621. var CheckName;
  9622. (function (CheckName) {
  9623. CheckName["touchAction"] = "touchAction";
  9624. CheckName["boxSizing"] = "boxSizing";
  9625. CheckName["noListeners"] = "noListeners";
  9626. })(CheckName || (CheckName = {}));
  9627. const prefix = '[interact.js] ';
  9628. const links = {
  9629. touchAction: 'https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action',
  9630. boxSizing: 'https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing'
  9631. }; // eslint-disable-next-line no-undef
  9632. const isProduction = "development" === 'production'; // eslint-disable-next-line no-restricted-syntax
  9633. function dev_tools_plugin_install(scope, {
  9634. logger
  9635. } = {}) {
  9636. const {
  9637. Interactable,
  9638. defaults
  9639. } = scope;
  9640. scope.logger = logger || console;
  9641. defaults.base.devTools = {
  9642. ignore: {}
  9643. };
  9644. Interactable.prototype.devTools = function (options) {
  9645. if (options) {
  9646. extend(this.options.devTools, options);
  9647. return this;
  9648. }
  9649. return this.options.devTools;
  9650. };
  9651. }
  9652. const checks = [{
  9653. name: CheckName.touchAction,
  9654. perform({
  9655. element
  9656. }) {
  9657. return !parentHasStyle(element, 'touchAction', /pan-|pinch|none/);
  9658. },
  9659. getInfo({
  9660. element
  9661. }) {
  9662. return [element, links.touchAction];
  9663. },
  9664. text: 'Consider adding CSS "touch-action: none" to this element\n'
  9665. }, {
  9666. name: CheckName.boxSizing,
  9667. perform(interaction) {
  9668. const {
  9669. element
  9670. } = interaction;
  9671. return interaction.prepared.name === 'resize' && element instanceof utils_domObjects.HTMLElement && !hasStyle(element, 'boxSizing', /border-box/);
  9672. },
  9673. text: 'Consider adding CSS "box-sizing: border-box" to this resizable element',
  9674. getInfo({
  9675. element
  9676. }) {
  9677. return [element, links.boxSizing];
  9678. }
  9679. }, {
  9680. name: CheckName.noListeners,
  9681. perform(interaction) {
  9682. const actionName = interaction.prepared.name;
  9683. const moveListeners = interaction.interactable.events.types[`${actionName}move`] || [];
  9684. return !moveListeners.length;
  9685. },
  9686. getInfo(interaction) {
  9687. return [interaction.prepared.name, interaction.interactable];
  9688. },
  9689. text: 'There are no listeners set for this action'
  9690. }];
  9691. function hasStyle(element, prop, styleRe) {
  9692. const value = element.style[prop] || win.getComputedStyle(element)[prop];
  9693. return styleRe.test((value || '').toString());
  9694. }
  9695. function parentHasStyle(element, prop, styleRe) {
  9696. let parent = element;
  9697. while (is.element(parent)) {
  9698. if (hasStyle(parent, prop, styleRe)) {
  9699. return true;
  9700. }
  9701. parent = parentNode(parent);
  9702. }
  9703. return false;
  9704. }
  9705. const plugin_id = 'dev-tools';
  9706. const defaultExport = isProduction ? {
  9707. id: plugin_id,
  9708. install: () => {}
  9709. } : {
  9710. id: plugin_id,
  9711. install: dev_tools_plugin_install,
  9712. listeners: {
  9713. 'interactions:action-start': ({
  9714. interaction
  9715. }, scope) => {
  9716. for (const check of checks) {
  9717. const options = interaction.interactable && interaction.interactable.options;
  9718. if (!(options && options.devTools && options.devTools.ignore[check.name]) && check.perform(interaction)) {
  9719. scope.logger.warn(prefix + check.text, ...check.getInfo(interaction));
  9720. }
  9721. }
  9722. }
  9723. },
  9724. checks,
  9725. CheckName,
  9726. links,
  9727. prefix
  9728. };
  9729. /* harmony default export */ var dev_tools_plugin = (defaultExport);
  9730. //# sourceMappingURL=plugin.js.map
  9731. // CONCATENATED MODULE: ./node_modules/@interactjs/dev-tools/index.js
  9732. /* eslint-disable import/order, no-console, eol-last */
  9733. if (typeof window === 'object' && !!window) {
  9734. interact_init(window);
  9735. }
  9736. _interactjs_interact.use(dev_tools_plugin);
  9737. //# sourceMappingURL=index.js.map
  9738. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/GridItem.vue?vue&type=script&lang=js
  9739. // var eventBus = require('./eventBus');
  9740. /* harmony default export */ var GridItemvue_type_script_lang_js = ({
  9741. name: "GridItem",
  9742. props: {
  9743. /*cols: {
  9744. type: Number,
  9745. required: true
  9746. },*/
  9747. /*containerWidth: {
  9748. type: Number,
  9749. required: true
  9750. },
  9751. rowHeight: {
  9752. type: Number,
  9753. required: true
  9754. },
  9755. margin: {
  9756. type: Array,
  9757. required: true
  9758. },
  9759. maxRows: {
  9760. type: Number,
  9761. required: true
  9762. },*/
  9763. isDraggable: {
  9764. type: Boolean,
  9765. required: false,
  9766. default: null
  9767. },
  9768. isResizable: {
  9769. type: Boolean,
  9770. required: false,
  9771. default: null
  9772. },
  9773. /*useCssTransforms: {
  9774. type: Boolean,
  9775. required: true
  9776. },
  9777. */
  9778. static: {
  9779. type: Boolean,
  9780. required: false,
  9781. default: false
  9782. },
  9783. minH: {
  9784. type: Number,
  9785. required: false,
  9786. default: 1
  9787. },
  9788. minW: {
  9789. type: Number,
  9790. required: false,
  9791. default: 1
  9792. },
  9793. maxH: {
  9794. type: Number,
  9795. required: false,
  9796. default: Infinity
  9797. },
  9798. maxW: {
  9799. type: Number,
  9800. required: false,
  9801. default: Infinity
  9802. },
  9803. x: {
  9804. type: Number,
  9805. required: true
  9806. },
  9807. y: {
  9808. type: Number,
  9809. required: true
  9810. },
  9811. w: {
  9812. type: Number,
  9813. required: true
  9814. },
  9815. h: {
  9816. type: Number,
  9817. required: true
  9818. },
  9819. i: {
  9820. required: true
  9821. },
  9822. dragIgnoreFrom: {
  9823. type: String,
  9824. required: false,
  9825. default: 'a, button'
  9826. },
  9827. dragAllowFrom: {
  9828. type: String,
  9829. required: false,
  9830. default: null
  9831. },
  9832. resizeIgnoreFrom: {
  9833. type: String,
  9834. required: false,
  9835. default: 'a, button'
  9836. },
  9837. preserveAspectRatio: {
  9838. type: Boolean,
  9839. required: false,
  9840. default: false
  9841. }
  9842. },
  9843. inject: ["eventBus", "layout"],
  9844. data: function data() {
  9845. return {
  9846. cols: 1,
  9847. containerWidth: 100,
  9848. rowHeight: 30,
  9849. margin: [10, 10],
  9850. maxRows: Infinity,
  9851. draggable: null,
  9852. resizable: null,
  9853. useCssTransforms: true,
  9854. useStyleCursor: true,
  9855. isDragging: false,
  9856. dragging: null,
  9857. isResizing: false,
  9858. resizing: null,
  9859. lastX: NaN,
  9860. lastY: NaN,
  9861. lastW: NaN,
  9862. lastH: NaN,
  9863. style: {},
  9864. rtl: false,
  9865. dragEventSet: false,
  9866. resizeEventSet: false,
  9867. previousW: null,
  9868. previousH: null,
  9869. previousX: null,
  9870. previousY: null,
  9871. innerX: this.x,
  9872. innerY: this.y,
  9873. innerW: this.w,
  9874. innerH: this.h
  9875. };
  9876. },
  9877. created: function created() {
  9878. var _this = this;
  9879. var self = this; // Accessible refernces of functions for removing in beforeUnmount
  9880. self.updateWidthHandler = function (width) {
  9881. self.updateWidth(width);
  9882. };
  9883. self.compactHandler = function (layout) {
  9884. self.compact(layout);
  9885. };
  9886. self.setDraggableHandler = function (isDraggable) {
  9887. if (self.isDraggable === null) {
  9888. self.draggable = isDraggable;
  9889. }
  9890. };
  9891. self.setResizableHandler = function (isResizable) {
  9892. if (self.isResizable === null) {
  9893. self.resizable = isResizable;
  9894. }
  9895. };
  9896. self.setRowHeightHandler = function (rowHeight) {
  9897. self.rowHeight = rowHeight;
  9898. };
  9899. self.setMaxRowsHandler = function (maxRows) {
  9900. self.maxRows = maxRows;
  9901. };
  9902. self.directionchangeHandler = function () {
  9903. _this.rtl = getDocumentDir() === 'rtl';
  9904. _this.compact();
  9905. };
  9906. self.setColNum = function (colNum) {
  9907. self.cols = parseInt(colNum);
  9908. };
  9909. this.eventBus.on('updateWidth', self.updateWidthHandler);
  9910. this.eventBus.on('compact', self.compactHandler);
  9911. this.eventBus.on('setDraggable', self.setDraggableHandler);
  9912. this.eventBus.on('setResizable', self.setResizableHandler);
  9913. this.eventBus.on('setRowHeight', self.setRowHeightHandler);
  9914. this.eventBus.on('setMaxRows', self.setMaxRowsHandler);
  9915. this.eventBus.on('directionchange', self.directionchangeHandler);
  9916. this.eventBus.on('setColNum', self.setColNum);
  9917. this.rtl = getDocumentDir() === 'rtl';
  9918. },
  9919. beforeUnmount: function beforeUnmount() {
  9920. var self = this; //Remove listeners
  9921. this.eventBus.off('updateWidth', self.updateWidthHandler);
  9922. this.eventBus.off('compact', self.compactHandler);
  9923. this.eventBus.off('setDraggable', self.setDraggableHandler);
  9924. this.eventBus.off('setResizable', self.setResizableHandler);
  9925. this.eventBus.off('setRowHeight', self.setRowHeightHandler);
  9926. this.eventBus.off('setMaxRows', self.setMaxRowsHandler);
  9927. this.eventBus.off('directionchange', self.directionchangeHandler);
  9928. this.eventBus.off('setColNum', self.setColNum);
  9929. if (this.interactObj) {
  9930. this.interactObj.unset(); // destroy interact intance
  9931. }
  9932. },
  9933. mounted: function mounted() {
  9934. if (this.layout.responsive && this.layout.lastBreakpoint) {
  9935. this.cols = getColsFromBreakpoint(this.layout.lastBreakpoint, this.layout.cols);
  9936. } else {
  9937. this.cols = this.layout.colNum;
  9938. }
  9939. this.rowHeight = this.layout.rowHeight;
  9940. this.containerWidth = this.layout.width !== null ? this.layout.width : 100;
  9941. this.margin = this.layout.margin !== undefined ? this.layout.margin : [10, 10];
  9942. this.maxRows = this.layout.maxRows;
  9943. if (this.isDraggable === null) {
  9944. this.draggable = this.layout.isDraggable;
  9945. } else {
  9946. this.draggable = this.isDraggable;
  9947. }
  9948. if (this.isResizable === null) {
  9949. this.resizable = this.layout.isResizable;
  9950. } else {
  9951. this.resizable = this.isResizable;
  9952. }
  9953. this.useCssTransforms = this.layout.useCssTransforms;
  9954. this.useStyleCursor = this.layout.useStyleCursor;
  9955. this.createStyle();
  9956. },
  9957. watch: {
  9958. isDraggable: function isDraggable() {
  9959. this.draggable = this.isDraggable;
  9960. },
  9961. static: function _static() {
  9962. this.tryMakeDraggable();
  9963. this.tryMakeResizable();
  9964. },
  9965. draggable: function draggable() {
  9966. this.tryMakeDraggable();
  9967. },
  9968. isResizable: function isResizable() {
  9969. this.resizable = this.isResizable;
  9970. },
  9971. resizable: function resizable() {
  9972. this.tryMakeResizable();
  9973. },
  9974. rowHeight: function rowHeight() {
  9975. this.createStyle();
  9976. this.emitContainerResized();
  9977. },
  9978. cols: function cols() {
  9979. this.tryMakeResizable();
  9980. this.createStyle();
  9981. this.emitContainerResized();
  9982. },
  9983. containerWidth: function containerWidth() {
  9984. this.tryMakeResizable();
  9985. this.createStyle();
  9986. this.emitContainerResized();
  9987. },
  9988. x: function x(newVal) {
  9989. this.innerX = newVal;
  9990. this.createStyle();
  9991. },
  9992. y: function y(newVal) {
  9993. this.innerY = newVal;
  9994. this.createStyle();
  9995. },
  9996. h: function h(newVal) {
  9997. this.innerH = newVal;
  9998. this.createStyle(); // this.emitContainerResized();
  9999. },
  10000. w: function w(newVal) {
  10001. this.innerW = newVal;
  10002. this.createStyle(); // this.emitContainerResized();
  10003. },
  10004. renderRtl: function renderRtl() {
  10005. // console.log("### renderRtl");
  10006. this.tryMakeResizable();
  10007. this.createStyle();
  10008. },
  10009. minH: function minH() {
  10010. this.tryMakeResizable();
  10011. },
  10012. maxH: function maxH() {
  10013. this.tryMakeResizable();
  10014. },
  10015. minW: function minW() {
  10016. this.tryMakeResizable();
  10017. },
  10018. maxW: function maxW() {
  10019. this.tryMakeResizable();
  10020. },
  10021. "$parent.margin": function $parentMargin(margin) {
  10022. if (!margin || margin[0] == this.margin[0] && margin[1] == this.margin[1]) {
  10023. return;
  10024. }
  10025. this.margin = margin.map(function (m) {
  10026. return Number(m);
  10027. });
  10028. this.createStyle();
  10029. this.emitContainerResized();
  10030. }
  10031. },
  10032. computed: {
  10033. classObj: function classObj() {
  10034. return {
  10035. 'vue-resizable': this.resizableAndNotStatic,
  10036. 'static': this.static,
  10037. 'resizing': this.isResizing,
  10038. 'vue-draggable-dragging': this.isDragging,
  10039. 'cssTransforms': this.useCssTransforms,
  10040. 'render-rtl': this.renderRtl,
  10041. 'disable-userselect': this.isDragging,
  10042. 'no-touch': this.isAndroid && this.draggableOrResizableAndNotStatic
  10043. };
  10044. },
  10045. resizableAndNotStatic: function resizableAndNotStatic() {
  10046. return this.resizable && !this.static;
  10047. },
  10048. draggableOrResizableAndNotStatic: function draggableOrResizableAndNotStatic() {
  10049. return (this.draggable || this.resizable) && !this.static;
  10050. },
  10051. isAndroid: function isAndroid() {
  10052. return navigator.userAgent.toLowerCase().indexOf("android") !== -1;
  10053. },
  10054. renderRtl: function renderRtl() {
  10055. return this.layout.isMirrored ? !this.rtl : this.rtl;
  10056. },
  10057. resizableHandleClass: function resizableHandleClass() {
  10058. if (this.renderRtl) {
  10059. return 'vue-resizable-handle vue-rtl-resizable-handle';
  10060. } else {
  10061. return 'vue-resizable-handle';
  10062. }
  10063. }
  10064. },
  10065. methods: {
  10066. createStyle: function createStyle() {
  10067. if (this.x + this.w > this.cols) {
  10068. this.innerX = 0;
  10069. this.innerW = this.w > this.cols ? this.cols : this.w;
  10070. } else {
  10071. this.innerX = this.x;
  10072. this.innerW = this.w;
  10073. }
  10074. var pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  10075. if (this.isDragging) {
  10076. pos.top = this.dragging.top; // Add rtl support
  10077. if (this.renderRtl) {
  10078. pos.right = this.dragging.left;
  10079. } else {
  10080. pos.left = this.dragging.left;
  10081. }
  10082. }
  10083. if (this.isResizing) {
  10084. pos.width = this.resizing.width;
  10085. pos.height = this.resizing.height;
  10086. }
  10087. var style; // CSS Transforms support (default)
  10088. if (this.useCssTransforms) {
  10089. // Add rtl support
  10090. if (this.renderRtl) {
  10091. style = setTransformRtl(pos.top, pos.right, pos.width, pos.height);
  10092. } else {
  10093. style = setTransform(pos.top, pos.left, pos.width, pos.height);
  10094. }
  10095. } else {
  10096. // top,left (slow)
  10097. // Add rtl support
  10098. if (this.renderRtl) {
  10099. style = setTopRight(pos.top, pos.right, pos.width, pos.height);
  10100. } else {
  10101. style = setTopLeft(pos.top, pos.left, pos.width, pos.height);
  10102. }
  10103. }
  10104. this.style = style;
  10105. },
  10106. emitContainerResized: function emitContainerResized() {
  10107. // this.style has width and height with trailing 'px'. The
  10108. // resized event is without them
  10109. var styleProps = {};
  10110. for (var _i = 0, _arr = ['width', 'height']; _i < _arr.length; _i++) {
  10111. var prop = _arr[_i];
  10112. var val = this.style[prop];
  10113. var matches = val.match(/^(\d+)px$/);
  10114. if (!matches) return;
  10115. styleProps[prop] = matches[1];
  10116. }
  10117. this.$emit("container-resized", this.i, this.h, this.w, styleProps.height, styleProps.width);
  10118. },
  10119. handleResize: function handleResize(event) {
  10120. if (this.static) return;
  10121. var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
  10122. if (position == null) return; // not possible but satisfies flow
  10123. var x = position.x,
  10124. y = position.y;
  10125. var newSize = {
  10126. width: 0,
  10127. height: 0
  10128. };
  10129. var pos;
  10130. switch (event.type) {
  10131. case "resizestart":
  10132. {
  10133. this.previousW = this.innerW;
  10134. this.previousH = this.innerH;
  10135. pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  10136. newSize.width = pos.width;
  10137. newSize.height = pos.height;
  10138. this.resizing = newSize;
  10139. this.isResizing = true;
  10140. break;
  10141. }
  10142. case "resizemove":
  10143. {
  10144. // console.log("### resize => " + event.type + ", lastW=" + this.lastW + ", lastH=" + this.lastH);
  10145. var coreEvent = createCoreData(this.lastW, this.lastH, x, y);
  10146. if (this.renderRtl) {
  10147. newSize.width = this.resizing.width - coreEvent.deltaX;
  10148. } else {
  10149. newSize.width = this.resizing.width + coreEvent.deltaX;
  10150. }
  10151. newSize.height = this.resizing.height + coreEvent.deltaY; ///console.log("### resize => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
  10152. this.resizing = newSize;
  10153. break;
  10154. }
  10155. case "resizeend":
  10156. {
  10157. //console.log("### resize end => x=" +this.innerX + " y=" + this.innerY + " w=" + this.innerW + " h=" + this.innerH);
  10158. pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  10159. newSize.width = pos.width;
  10160. newSize.height = pos.height; // console.log("### resize end => " + JSON.stringify(newSize));
  10161. this.resizing = null;
  10162. this.isResizing = false;
  10163. break;
  10164. }
  10165. } // Get new WH
  10166. pos = this.calcWH(newSize.height, newSize.width);
  10167. if (pos.w < this.minW) {
  10168. pos.w = this.minW;
  10169. }
  10170. if (pos.w > this.maxW) {
  10171. pos.w = this.maxW;
  10172. }
  10173. if (pos.h < this.minH) {
  10174. pos.h = this.minH;
  10175. }
  10176. if (pos.h > this.maxH) {
  10177. pos.h = this.maxH;
  10178. }
  10179. if (pos.h < 1) {
  10180. pos.h = 1;
  10181. }
  10182. if (pos.w < 1) {
  10183. pos.w = 1;
  10184. }
  10185. this.lastW = x;
  10186. this.lastH = y;
  10187. if (this.innerW !== pos.w || this.innerH !== pos.h) {
  10188. this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10189. }
  10190. if (event.type === "resizeend" && (this.previousW !== this.innerW || this.previousH !== this.innerH)) {
  10191. this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10192. }
  10193. this.eventBus.emit("resizeEvent", {
  10194. eventType: event.type,
  10195. i: this.i,
  10196. x: this.innerX,
  10197. y: this.innerY,
  10198. h: pos.h,
  10199. w: pos.w
  10200. });
  10201. },
  10202. handleDrag: function handleDrag(event) {
  10203. if (this.static) return;
  10204. if (this.isResizing) return;
  10205. var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
  10206. if (position === null) return; // not possible but satisfies flow
  10207. var x = position.x,
  10208. y = position.y; // let shouldUpdate = false;
  10209. var newPosition = {
  10210. top: 0,
  10211. left: 0
  10212. };
  10213. switch (event.type) {
  10214. case "dragstart":
  10215. {
  10216. this.previousX = this.innerX;
  10217. this.previousY = this.innerY;
  10218. var parentRect = event.target.offsetParent.getBoundingClientRect();
  10219. var clientRect = event.target.getBoundingClientRect();
  10220. if (this.renderRtl) {
  10221. newPosition.left = (clientRect.right - parentRect.right) * -1;
  10222. } else {
  10223. newPosition.left = clientRect.left - parentRect.left;
  10224. }
  10225. newPosition.top = clientRect.top - parentRect.top;
  10226. this.dragging = newPosition;
  10227. this.isDragging = true;
  10228. break;
  10229. }
  10230. case "dragend":
  10231. {
  10232. if (!this.isDragging) return;
  10233. var _parentRect = event.target.offsetParent.getBoundingClientRect();
  10234. var _clientRect = event.target.getBoundingClientRect(); // Add rtl support
  10235. if (this.renderRtl) {
  10236. newPosition.left = (_clientRect.right - _parentRect.right) * -1;
  10237. } else {
  10238. newPosition.left = _clientRect.left - _parentRect.left;
  10239. }
  10240. newPosition.top = _clientRect.top - _parentRect.top; // console.log("### drag end => " + JSON.stringify(newPosition));
  10241. // console.log("### DROP: " + JSON.stringify(newPosition));
  10242. this.dragging = null;
  10243. this.isDragging = false; // shouldUpdate = true;
  10244. break;
  10245. }
  10246. case "dragmove":
  10247. {
  10248. var coreEvent = createCoreData(this.lastX, this.lastY, x, y); // Add rtl support
  10249. if (this.renderRtl) {
  10250. newPosition.left = this.dragging.left - coreEvent.deltaX;
  10251. } else {
  10252. newPosition.left = this.dragging.left + coreEvent.deltaX;
  10253. }
  10254. newPosition.top = this.dragging.top + coreEvent.deltaY; // console.log("### drag => " + event.type + ", x=" + x + ", y=" + y);
  10255. // console.log("### drag => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
  10256. // console.log("### drag end => " + JSON.stringify(newPosition));
  10257. this.dragging = newPosition;
  10258. break;
  10259. }
  10260. } // Get new XY
  10261. var pos;
  10262. if (this.renderRtl) {
  10263. pos = this.calcXY(newPosition.top, newPosition.left);
  10264. } else {
  10265. pos = this.calcXY(newPosition.top, newPosition.left);
  10266. }
  10267. this.lastX = x;
  10268. this.lastY = y;
  10269. if (this.innerX !== pos.x || this.innerY !== pos.y) {
  10270. this.$emit("move", this.i, pos.x, pos.y);
  10271. }
  10272. if (event.type === "dragend" && (this.previousX !== this.innerX || this.previousY !== this.innerY)) {
  10273. this.$emit("moved", this.i, pos.x, pos.y);
  10274. }
  10275. this.eventBus.emit("dragEvent", {
  10276. eventType: event.type,
  10277. i: this.i,
  10278. x: pos.x,
  10279. y: pos.y,
  10280. h: this.innerH,
  10281. w: this.innerW
  10282. });
  10283. },
  10284. calcPosition: function calcPosition(x, y, w, h) {
  10285. var colWidth = this.calcColWidth(); // add rtl support
  10286. var out;
  10287. if (this.renderRtl) {
  10288. out = {
  10289. right: Math.round(colWidth * x + (x + 1) * this.margin[0]),
  10290. top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
  10291. // 0 * Infinity === NaN, which causes problems with resize constriants;
  10292. // Fix this if it occurs.
  10293. // Note we do it here rather than later because Math.round(Infinity) causes deopt
  10294. width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
  10295. height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
  10296. };
  10297. } else {
  10298. out = {
  10299. left: Math.round(colWidth * x + (x + 1) * this.margin[0]),
  10300. top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
  10301. // 0 * Infinity === NaN, which causes problems with resize constriants;
  10302. // Fix this if it occurs.
  10303. // Note we do it here rather than later because Math.round(Infinity) causes deopt
  10304. width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
  10305. height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
  10306. };
  10307. }
  10308. return out;
  10309. },
  10310. /**
  10311. * Translate x and y coordinates from pixels to grid units.
  10312. * @param {Number} top Top position (relative to parent) in pixels.
  10313. * @param {Number} left Left position (relative to parent) in pixels.
  10314. * @return {Object} x and y in grid units.
  10315. */
  10316. // TODO check if this function needs change in order to support rtl.
  10317. calcXY: function calcXY(top, left) {
  10318. var colWidth = this.calcColWidth(); // left = colWidth * x + margin * (x + 1)
  10319. // l = cx + m(x+1)
  10320. // l = cx + mx + m
  10321. // l - m = cx + mx
  10322. // l - m = x(c + m)
  10323. // (l - m) / (c + m) = x
  10324. // x = (left - margin) / (coldWidth + margin)
  10325. var x = Math.round((left - this.margin[0]) / (colWidth + this.margin[0]));
  10326. var y = Math.round((top - this.margin[1]) / (this.rowHeight + this.margin[1])); // Capping
  10327. x = Math.max(Math.min(x, this.cols - this.innerW), 0);
  10328. y = Math.max(Math.min(y, this.maxRows - this.innerH), 0);
  10329. return {
  10330. x: x,
  10331. y: y
  10332. };
  10333. },
  10334. // Helper for generating column width
  10335. calcColWidth: function calcColWidth() {
  10336. var colWidth = (this.containerWidth - this.margin[0] * (this.cols + 1)) / this.cols; // console.log("### COLS=" + this.cols + " COL WIDTH=" + colWidth + " MARGIN " + this.margin[0]);
  10337. return colWidth;
  10338. },
  10339. /**
  10340. * Given a height and width in pixel values, calculate grid units.
  10341. * @param {Number} height Height in pixels.
  10342. * @param {Number} width Width in pixels.
  10343. * @param {Boolean} autoSizeFlag function autoSize identifier.
  10344. * @return {Object} w, h as grid units.
  10345. */
  10346. calcWH: function calcWH(height, width) {
  10347. var autoSizeFlag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  10348. var colWidth = this.calcColWidth(); // width = colWidth * w - (margin * (w - 1))
  10349. // ...
  10350. // w = (width + margin) / (colWidth + margin)
  10351. var w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
  10352. var h = 0;
  10353. if (!autoSizeFlag) {
  10354. h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
  10355. } else {
  10356. h = Math.ceil((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
  10357. } // Capping
  10358. w = Math.max(Math.min(w, this.cols - this.innerX), 0);
  10359. h = Math.max(Math.min(h, this.maxRows - this.innerY), 0);
  10360. return {
  10361. w: w,
  10362. h: h
  10363. };
  10364. },
  10365. updateWidth: function updateWidth(width, colNum) {
  10366. this.containerWidth = width;
  10367. if (colNum !== undefined && colNum !== null) {
  10368. this.cols = colNum;
  10369. }
  10370. },
  10371. compact: function compact() {
  10372. this.createStyle();
  10373. },
  10374. tryMakeDraggable: function tryMakeDraggable() {
  10375. var self = this;
  10376. if (this.interactObj === null || this.interactObj === undefined) {
  10377. this.interactObj = _interactjs_interact(this.$refs.item);
  10378. if (!this.useStyleCursor) {
  10379. this.interactObj.styleCursor(false);
  10380. }
  10381. }
  10382. if (this.draggable && !this.static) {
  10383. var opts = {
  10384. ignoreFrom: this.dragIgnoreFrom,
  10385. allowFrom: this.dragAllowFrom
  10386. };
  10387. this.interactObj.draggable(opts);
  10388. /*this.interactObj.draggable({allowFrom: '.vue-draggable-handle'});*/
  10389. if (!this.dragEventSet) {
  10390. this.dragEventSet = true;
  10391. this.interactObj.on('dragstart dragmove dragend', function (event) {
  10392. self.handleDrag(event);
  10393. });
  10394. }
  10395. } else {
  10396. this.interactObj.draggable({
  10397. enabled: false
  10398. });
  10399. }
  10400. },
  10401. tryMakeResizable: function tryMakeResizable() {
  10402. var self = this;
  10403. if (this.interactObj === null || this.interactObj === undefined) {
  10404. this.interactObj = _interactjs_interact(this.$refs.item);
  10405. if (!this.useStyleCursor) {
  10406. this.interactObj.styleCursor(false);
  10407. }
  10408. }
  10409. if (this.resizable && !this.static) {
  10410. var maximum = this.calcPosition(0, 0, this.maxW, this.maxH);
  10411. var minimum = this.calcPosition(0, 0, this.minW, this.minH); // console.log("### MAX " + JSON.stringify(maximum));
  10412. // console.log("### MIN " + JSON.stringify(minimum));
  10413. var opts = {
  10414. // allowFrom: "." + this.resizableHandleClass.trim().replace(" ", "."),
  10415. edges: {
  10416. left: false,
  10417. right: "." + this.resizableHandleClass.trim().replace(" ", "."),
  10418. bottom: "." + this.resizableHandleClass.trim().replace(" ", "."),
  10419. top: false
  10420. },
  10421. ignoreFrom: this.resizeIgnoreFrom,
  10422. restrictSize: {
  10423. min: {
  10424. height: minimum.height,
  10425. width: minimum.width
  10426. },
  10427. max: {
  10428. height: maximum.height,
  10429. width: maximum.width
  10430. }
  10431. }
  10432. };
  10433. if (this.preserveAspectRatio) {
  10434. opts.modifiers = [_interactjs_interact.modifiers.aspectRatio({
  10435. ratio: 'preserve'
  10436. })];
  10437. }
  10438. this.interactObj.resizable(opts);
  10439. if (!this.resizeEventSet) {
  10440. this.resizeEventSet = true;
  10441. this.interactObj.on('resizestart resizemove resizeend', function (event) {
  10442. self.handleResize(event);
  10443. });
  10444. }
  10445. } else {
  10446. this.interactObj.resizable({
  10447. enabled: false
  10448. });
  10449. }
  10450. },
  10451. autoSize: function autoSize() {
  10452. // ok here we want to calculate if a resize is needed
  10453. this.previousW = this.innerW;
  10454. this.previousH = this.innerH;
  10455. var newSize = this.$slots().default[0].elm.getBoundingClientRect();
  10456. var pos = this.calcWH(newSize.height, newSize.width, true);
  10457. if (pos.w < this.minW) {
  10458. pos.w = this.minW;
  10459. }
  10460. if (pos.w > this.maxW) {
  10461. pos.w = this.maxW;
  10462. }
  10463. if (pos.h < this.minH) {
  10464. pos.h = this.minH;
  10465. }
  10466. if (pos.h > this.maxH) {
  10467. pos.h = this.maxH;
  10468. }
  10469. if (pos.h < 1) {
  10470. pos.h = 1;
  10471. }
  10472. if (pos.w < 1) {
  10473. pos.w = 1;
  10474. } // this.lastW = x; // basically, this is copied from resizehandler, but shouldn't be needed
  10475. // this.lastH = y;
  10476. if (this.innerW !== pos.w || this.innerH !== pos.h) {
  10477. this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10478. }
  10479. if (this.previousW !== pos.w || this.previousH !== pos.h) {
  10480. this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10481. this.eventBus.emit("resizeEvent", {
  10482. eventType: "resizeend",
  10483. i: this.i,
  10484. x: this.innerX,
  10485. y: this.innerY,
  10486. h: pos.h,
  10487. w: pos.w
  10488. });
  10489. }
  10490. }
  10491. }
  10492. });
  10493. // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=script&lang=js
  10494. // EXTERNAL MODULE: ./src/components/GridItem.vue?vue&type=style&index=0&id=46ff2fc8&lang=css
  10495. var GridItemvue_type_style_index_0_id_46ff2fc8_lang_css = __webpack_require__("083e");
  10496. // CONCATENATED MODULE: ./src/components/GridItem.vue
  10497. GridItemvue_type_script_lang_js.render = render
  10498. /* harmony default export */ var GridItem = (GridItemvue_type_script_lang_js);
  10499. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/GridLayout.vue?vue&type=template&id=fc5948f6
  10500. function GridLayoutvue_type_template_id_fc5948f6_render(_ctx, _cache, $props, $setup, $data, $options) {
  10501. var _component_grid_item = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("grid-item");
  10502. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
  10503. ref: "item",
  10504. class: "vue-grid-layout",
  10505. style: _ctx.mergedStyle
  10506. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default"), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_grid_item, {
  10507. class: "vue-grid-placeholder",
  10508. x: _ctx.placeholder.x,
  10509. y: _ctx.placeholder.y,
  10510. w: _ctx.placeholder.w,
  10511. h: _ctx.placeholder.h,
  10512. i: _ctx.placeholder.i
  10513. }, null, 8, ["x", "y", "w", "h", "i"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isDragging]])], 4);
  10514. }
  10515. // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=template&id=fc5948f6
  10516. // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
  10517. var es7_object_get_own_property_descriptors = __webpack_require__("8e6e");
  10518. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
  10519. var es6_object_assign = __webpack_require__("f751");
  10520. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.is-finite.js
  10521. var es6_number_is_finite = __webpack_require__("fca0");
  10522. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  10523. function _defineProperty(obj, key, value) {
  10524. if (key in obj) {
  10525. Object.defineProperty(obj, key, {
  10526. value: value,
  10527. enumerable: true,
  10528. configurable: true,
  10529. writable: true
  10530. });
  10531. } else {
  10532. obj[key] = value;
  10533. }
  10534. return obj;
  10535. }
  10536. // CONCATENATED MODULE: ./node_modules/mitt/dist/mitt.es.js
  10537. /* harmony default export */ var mitt_es = (function(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i&&i.push(e)||n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&i.splice(i.indexOf(e)>>>0,1)},emit:function(t,e){(n.get(t)||[]).slice().map(function(n){n(e)}),(n.get("*")||[]).slice().map(function(n){n(t,e)})}}});
  10538. //# sourceMappingURL=mitt.es.js.map
  10539. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/GridLayout.vue?vue&type=script&lang=js
  10540. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  10541. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  10542. var elementResizeDetectorMaker = __webpack_require__("eec4");
  10543. //var eventBus = require('./eventBus');
  10544. /* harmony default export */ var GridLayoutvue_type_script_lang_js = ({
  10545. name: "GridLayout",
  10546. provide: function provide() {
  10547. return {
  10548. eventBus: this.eventBus,
  10549. layout: this
  10550. };
  10551. },
  10552. components: {
  10553. GridItem: GridItem
  10554. },
  10555. props: {
  10556. // If true, the container height swells and contracts to fit contents
  10557. autoSize: {
  10558. type: Boolean,
  10559. default: true
  10560. },
  10561. colNum: {
  10562. type: Number,
  10563. default: 12
  10564. },
  10565. rowHeight: {
  10566. type: Number,
  10567. default: 150
  10568. },
  10569. maxRows: {
  10570. type: Number,
  10571. default: Infinity
  10572. },
  10573. margin: {
  10574. type: Array,
  10575. default: function _default() {
  10576. return [10, 10];
  10577. }
  10578. },
  10579. isDraggable: {
  10580. type: Boolean,
  10581. default: true
  10582. },
  10583. isResizable: {
  10584. type: Boolean,
  10585. default: true
  10586. },
  10587. isMirrored: {
  10588. type: Boolean,
  10589. default: false
  10590. },
  10591. useCssTransforms: {
  10592. type: Boolean,
  10593. default: true
  10594. },
  10595. verticalCompact: {
  10596. type: Boolean,
  10597. default: true
  10598. },
  10599. layout: {
  10600. type: Array,
  10601. required: true
  10602. },
  10603. responsive: {
  10604. type: Boolean,
  10605. default: false
  10606. },
  10607. responsiveLayouts: {
  10608. type: Object,
  10609. default: function _default() {
  10610. return {};
  10611. }
  10612. },
  10613. breakpoints: {
  10614. type: Object,
  10615. default: function _default() {
  10616. return {
  10617. lg: 1200,
  10618. md: 996,
  10619. sm: 768,
  10620. xs: 480,
  10621. xxs: 0
  10622. };
  10623. }
  10624. },
  10625. cols: {
  10626. type: Object,
  10627. default: function _default() {
  10628. return {
  10629. lg: 12,
  10630. md: 10,
  10631. sm: 6,
  10632. xs: 4,
  10633. xxs: 2
  10634. };
  10635. }
  10636. },
  10637. preventCollision: {
  10638. type: Boolean,
  10639. default: false
  10640. },
  10641. useStyleCursor: {
  10642. type: Boolean,
  10643. default: true
  10644. }
  10645. },
  10646. data: function data() {
  10647. return {
  10648. eventBus: mitt_es(),
  10649. width: null,
  10650. mergedStyle: {},
  10651. lastLayoutLength: 0,
  10652. isDragging: false,
  10653. placeholder: {
  10654. x: 0,
  10655. y: 0,
  10656. w: 0,
  10657. h: 0,
  10658. i: -1
  10659. },
  10660. layouts: {},
  10661. // array to store all layouts from different breakpoints
  10662. lastBreakpoint: null,
  10663. // store last active breakpoint
  10664. originalLayout: null // store original Layout
  10665. // layout: JSON.parse(JSON.stringify(this.value)),
  10666. };
  10667. },
  10668. created: function created() {
  10669. var self = this; // Accessible refernces of functions for removing in beforeUnmount
  10670. self.resizeEventHandler = function (_ref) {
  10671. var eventType = _ref.eventType,
  10672. i = _ref.i,
  10673. x = _ref.x,
  10674. y = _ref.y,
  10675. h = _ref.h,
  10676. w = _ref.w;
  10677. self.resizeEvent(eventType, i, x, y, h, w);
  10678. };
  10679. self.dragEventHandler = function (_ref2) {
  10680. var eventType = _ref2.eventType,
  10681. i = _ref2.i,
  10682. x = _ref2.x,
  10683. y = _ref2.y,
  10684. h = _ref2.h,
  10685. w = _ref2.w;
  10686. self.dragEvent(eventType, i, x, y, h, w);
  10687. };
  10688. self.eventBus.on('resizeEvent', self.resizeEventHandler);
  10689. self.eventBus.on('dragEvent', self.dragEventHandler);
  10690. self.$emit('layout-created', self.layout);
  10691. },
  10692. beforeUnmount: function beforeUnmount() {
  10693. //Remove listeners
  10694. this.eventBus.off('resizeEvent', this.resizeEventHandler);
  10695. this.eventBus.off('dragEvent', this.dragEventHandler);
  10696. removeWindowEventListener("resize", this.onWindowResize);
  10697. if (this.erd) {
  10698. this.erd.uninstall(this.$refs.item);
  10699. }
  10700. },
  10701. beforeMount: function beforeMount() {
  10702. this.$emit('layout-before-mount', this.layout);
  10703. },
  10704. mounted: function mounted() {
  10705. this.$emit('layout-mounted', this.layout);
  10706. this.$nextTick(function () {
  10707. validateLayout(this.layout);
  10708. this.originalLayout = this.layout;
  10709. var self = this;
  10710. this.$nextTick(function () {
  10711. self.onWindowResize();
  10712. self.initResponsiveFeatures(); //self.width = self.$el.offsetWidth;
  10713. addWindowEventListener('resize', self.onWindowResize);
  10714. compact(self.layout, self.verticalCompact);
  10715. self.$emit('layout-updated', self.layout);
  10716. self.updateHeight();
  10717. self.$nextTick(function () {
  10718. this.erd = elementResizeDetectorMaker({
  10719. strategy: "scroll",
  10720. //<- For ultra performance.
  10721. // See https://github.com/wnr/element-resize-detector/issues/110 about callOnAdd.
  10722. callOnAdd: false
  10723. });
  10724. this.erd.listenTo(self.$refs.item, function () {
  10725. self.onWindowResize();
  10726. });
  10727. });
  10728. });
  10729. });
  10730. },
  10731. watch: {
  10732. width: function width(newval, oldval) {
  10733. var self = this;
  10734. this.$nextTick(function () {
  10735. var _this = this;
  10736. //this.$broadcast("updateWidth", this.width);
  10737. this.eventBus.emit("updateWidth", this.width);
  10738. if (oldval === null) {
  10739. /*
  10740. If oldval == null is when the width has never been
  10741. set before. That only occurs when mouting is
  10742. finished, and onWindowResize has been called and
  10743. this.width has been changed the first time after it
  10744. got set to null in the constructor. It is now time
  10745. to issue layout-ready events as the GridItems have
  10746. their sizes configured properly.
  10747. The reason for emitting the layout-ready events on
  10748. the next tick is to allow for the newly-emitted
  10749. updateWidth event (above) to have reached the
  10750. children GridItem-s and had their effect, so we're
  10751. sure that they have the final size before we emit
  10752. layout-ready (for this GridLayout) and
  10753. item-layout-ready (for the GridItem-s).
  10754. This way any client event handlers can reliably
  10755. invistigate stable sizes of GridItem-s.
  10756. */
  10757. this.$nextTick(function () {
  10758. _this.$emit('layout-ready', self.layout);
  10759. });
  10760. }
  10761. this.updateHeight();
  10762. });
  10763. },
  10764. layout: function layout() {
  10765. this.layoutUpdate();
  10766. },
  10767. colNum: function colNum(val) {
  10768. this.eventBus.emit("setColNum", val);
  10769. },
  10770. rowHeight: function rowHeight() {
  10771. this.eventBus.emit("setRowHeight", this.rowHeight);
  10772. },
  10773. isDraggable: function isDraggable() {
  10774. this.eventBus.emit("setDraggable", this.isDraggable);
  10775. },
  10776. isResizable: function isResizable() {
  10777. this.eventBus.emit("setResizable", this.isResizable);
  10778. },
  10779. responsive: function responsive() {
  10780. if (!this.responsive) {
  10781. this.$emit('update:layout', this.originalLayout);
  10782. this.eventBus.emit("setColNum", this.colNum);
  10783. }
  10784. this.onWindowResize();
  10785. },
  10786. maxRows: function maxRows() {
  10787. this.eventBus.emit("setMaxRows", this.maxRows);
  10788. },
  10789. margin: function margin() {
  10790. this.updateHeight();
  10791. }
  10792. },
  10793. methods: {
  10794. layoutUpdate: function layoutUpdate() {
  10795. if (this.layout !== undefined && this.originalLayout !== null) {
  10796. if (this.layout.length !== this.originalLayout.length) {
  10797. // console.log("### LAYOUT UPDATE!", this.layout.length, this.originalLayout.length);
  10798. var diff = this.findDifference(this.layout, this.originalLayout);
  10799. if (diff.length > 0) {
  10800. // console.log(diff);
  10801. if (this.layout.length > this.originalLayout.length) {
  10802. this.originalLayout = this.originalLayout.concat(diff);
  10803. } else {
  10804. this.originalLayout = this.originalLayout.filter(function (obj) {
  10805. return !diff.some(function (obj2) {
  10806. return obj.i === obj2.i;
  10807. });
  10808. });
  10809. }
  10810. }
  10811. this.lastLayoutLength = this.layout.length;
  10812. this.initResponsiveFeatures();
  10813. }
  10814. compact(this.layout, this.verticalCompact);
  10815. this.eventBus.emit("updateWidth", this.width);
  10816. this.updateHeight();
  10817. this.$emit('layout-updated', this.layout);
  10818. }
  10819. },
  10820. updateHeight: function updateHeight() {
  10821. this.mergedStyle = {
  10822. height: this.containerHeight()
  10823. };
  10824. },
  10825. onWindowResize: function onWindowResize() {
  10826. if (this.$refs !== null && this.$refs.item !== null && this.$refs.item !== undefined) {
  10827. this.width = this.$refs.item.offsetWidth;
  10828. }
  10829. this.eventBus.emit("resizeEvent", {});
  10830. },
  10831. containerHeight: function containerHeight() {
  10832. if (!this.autoSize) return; // console.log("bottom: " + bottom(this.layout))
  10833. // console.log("rowHeight + margins: " + (this.rowHeight + this.margin[1]) + this.margin[1])
  10834. var containerHeight = bottom(this.layout) * (this.rowHeight + this.margin[1]) + this.margin[1] + 'px';
  10835. return containerHeight;
  10836. },
  10837. dragEvent: function dragEvent(eventName, id, x, y, h, w) {
  10838. //console.log(eventName + " id=" + id + ", x=" + x + ", y=" + y);
  10839. var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes returns null object
  10840. if (l === undefined || l === null) {
  10841. l = {
  10842. x: 0,
  10843. y: 0
  10844. };
  10845. }
  10846. if (eventName === "dragmove" || eventName === "dragstart") {
  10847. this.placeholder.i = id;
  10848. this.placeholder.x = l.x;
  10849. this.placeholder.y = l.y;
  10850. this.placeholder.w = w;
  10851. this.placeholder.h = h;
  10852. this.$nextTick(function () {
  10853. this.isDragging = true;
  10854. }); //this.$broadcast("updateWidth", this.width);
  10855. this.eventBus.emit("updateWidth", this.width);
  10856. } else {
  10857. this.$nextTick(function () {
  10858. this.isDragging = false;
  10859. });
  10860. } // Move the element to the dragged location.
  10861. this.$emit("update:layout", moveElement(this.layout, l, x, y, true, this.preventCollision));
  10862. compact(this.layout, this.verticalCompact); // needed because vue can't detect changes on array element properties
  10863. this.eventBus.emit("compact");
  10864. this.updateHeight();
  10865. if (eventName === 'dragend') this.$emit('layout-updated', this.layout);
  10866. },
  10867. resizeEvent: function resizeEvent(eventName, id, x, y, h, w) {
  10868. var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes return null object
  10869. if (l === undefined || l === null) {
  10870. l = {
  10871. h: 0,
  10872. w: 0
  10873. };
  10874. }
  10875. var hasCollisions;
  10876. if (this.preventCollision) {
  10877. var collisions = getAllCollisions(this.layout, _objectSpread(_objectSpread({}, l), {}, {
  10878. w: w,
  10879. h: h
  10880. })).filter(function (layoutItem) {
  10881. return layoutItem.i !== l.i;
  10882. });
  10883. hasCollisions = collisions.length > 0; // If we're colliding, we need adjust the placeholder.
  10884. if (hasCollisions) {
  10885. // adjust w && h to maximum allowed space
  10886. var leastX = Infinity,
  10887. leastY = Infinity;
  10888. collisions.forEach(function (layoutItem) {
  10889. if (layoutItem.x > l.x) leastX = Math.min(leastX, layoutItem.x);
  10890. if (layoutItem.y > l.y) leastY = Math.min(leastY, layoutItem.y);
  10891. });
  10892. if (Number.isFinite(leastX)) l.w = leastX - l.x;
  10893. if (Number.isFinite(leastY)) l.h = leastY - l.y;
  10894. }
  10895. }
  10896. if (!hasCollisions) {
  10897. // Set new width and height.
  10898. l.w = w;
  10899. l.h = h;
  10900. }
  10901. if (eventName === "resizestart" || eventName === "resizemove") {
  10902. this.placeholder.i = id;
  10903. this.placeholder.x = x;
  10904. this.placeholder.y = y;
  10905. this.placeholder.w = l.w;
  10906. this.placeholder.h = l.h;
  10907. this.$nextTick(function () {
  10908. this.isDragging = true;
  10909. }); //this.$broadcast("updateWidth", this.width);
  10910. this.eventBus.emit("updateWidth", this.width);
  10911. } else {
  10912. this.$nextTick(function () {
  10913. this.isDragging = false;
  10914. });
  10915. }
  10916. if (this.responsive) this.responsiveGridLayout();
  10917. compact(this.layout, this.verticalCompact);
  10918. this.eventBus.emit("compact");
  10919. this.updateHeight();
  10920. if (eventName === 'resizeend') this.$emit('layout-updated', this.layout);
  10921. },
  10922. // finds or generates new layouts for set breakpoints
  10923. responsiveGridLayout: function responsiveGridLayout() {
  10924. var newBreakpoint = getBreakpointFromWidth(this.breakpoints, this.width);
  10925. var newCols = getColsFromBreakpoint(newBreakpoint, this.cols); // save actual layout in layouts
  10926. if (this.lastBreakpoint != null && !this.layouts[this.lastBreakpoint]) this.layouts[this.lastBreakpoint] = cloneLayout(this.layout); // Find or generate a new layout.
  10927. var layout = findOrGenerateResponsiveLayout(this.originalLayout, this.layouts, this.breakpoints, newBreakpoint, this.lastBreakpoint, newCols, this.verticalCompact); // Store the new layout.
  10928. this.layouts[newBreakpoint] = layout;
  10929. if (this.lastBreakpoint !== newBreakpoint) {
  10930. this.$emit('breakpoint-changed', newBreakpoint, layout);
  10931. } // new prop sync
  10932. this.$emit('update:layout', layout);
  10933. this.lastBreakpoint = newBreakpoint;
  10934. this.eventBus.emit("setColNum", getColsFromBreakpoint(newBreakpoint, this.cols));
  10935. },
  10936. // clear all responsive layouts
  10937. initResponsiveFeatures: function initResponsiveFeatures() {
  10938. // clear layouts
  10939. this.layouts = Object.assign({}, this.responsiveLayouts);
  10940. },
  10941. // find difference in layouts
  10942. findDifference: function findDifference(layout, originalLayout) {
  10943. //Find values that are in result1 but not in result2
  10944. var uniqueResultOne = layout.filter(function (obj) {
  10945. return !originalLayout.some(function (obj2) {
  10946. return obj.i === obj2.i;
  10947. });
  10948. }); //Find values that are in result2 but not in result1
  10949. var uniqueResultTwo = originalLayout.filter(function (obj) {
  10950. return !layout.some(function (obj2) {
  10951. return obj.i === obj2.i;
  10952. });
  10953. }); //Combine the two arrays of unique entries#
  10954. return uniqueResultOne.concat(uniqueResultTwo);
  10955. }
  10956. }
  10957. });
  10958. // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=script&lang=js
  10959. // EXTERNAL MODULE: ./src/components/GridLayout.vue?vue&type=style&index=0&id=fc5948f6&lang=css
  10960. var GridLayoutvue_type_style_index_0_id_fc5948f6_lang_css = __webpack_require__("6521");
  10961. // CONCATENATED MODULE: ./src/components/GridLayout.vue
  10962. GridLayoutvue_type_script_lang_js.render = GridLayoutvue_type_template_id_fc5948f6_render
  10963. /* harmony default export */ var GridLayout = (GridLayoutvue_type_script_lang_js);
  10964. // CONCATENATED MODULE: ./src/components/index.js
  10965. var components_install = function install(app
  10966. /*: App*/
  10967. ) {
  10968. app.component('grid-layout', GridLayout);
  10969. app.component('grid-item', GridItem);
  10970. };
  10971. /* harmony default export */ var components = (components_install);
  10972. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  10973. /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components);
  10974. /***/ }),
  10975. /***/ "fca0":
  10976. /***/ (function(module, exports, __webpack_require__) {
  10977. // 20.1.2.2 Number.isFinite(number)
  10978. var $export = __webpack_require__("5ca1");
  10979. var _isFinite = __webpack_require__("7726").isFinite;
  10980. $export($export.S, 'Number', {
  10981. isFinite: function isFinite(it) {
  10982. return typeof it == 'number' && _isFinite(it);
  10983. }
  10984. });
  10985. /***/ }),
  10986. /***/ "fdef":
  10987. /***/ (function(module, exports) {
  10988. module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  10989. '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  10990. /***/ })
  10991. /******/ })["default"];
  10992. });
  10993. //# sourceMappingURL=vue-grid-layout.umd.js.map