| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365 |
- /*! 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 */
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("vue"));
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["VueGridLayout"] = factory(require("vue"));
- else
- root["VueGridLayout"] = factory(root["Vue"]);
- })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __webpack_require__.t = function(value, mode) {
- /******/ if(mode & 1) value = __webpack_require__(value);
- /******/ if(mode & 8) return value;
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- /******/ var ns = Object.create(null);
- /******/ __webpack_require__.r(ns);
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- /******/ return ns;
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = "fb15");
- /******/ })
- /************************************************************************/
- /******/ ({
- /***/ "01f9":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var LIBRARY = __webpack_require__("2d00");
- var $export = __webpack_require__("5ca1");
- var redefine = __webpack_require__("2aba");
- var hide = __webpack_require__("32e9");
- var Iterators = __webpack_require__("84f2");
- var $iterCreate = __webpack_require__("41a0");
- var setToStringTag = __webpack_require__("7f20");
- var getPrototypeOf = __webpack_require__("38fd");
- var ITERATOR = __webpack_require__("2b4c")('iterator');
- var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
- var FF_ITERATOR = '@@iterator';
- var KEYS = 'keys';
- var VALUES = 'values';
- var returnThis = function () { return this; };
- module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- $iterCreate(Constructor, NAME, next);
- var getMethod = function (kind) {
- if (!BUGGY && kind in proto) return proto[kind];
- switch (kind) {
- case KEYS: return function keys() { return new Constructor(this, kind); };
- case VALUES: return function values() { return new Constructor(this, kind); };
- } return function entries() { return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator';
- var DEF_VALUES = DEFAULT == VALUES;
- var VALUES_BUG = false;
- var proto = Base.prototype;
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
- var $default = $native || getMethod(DEFAULT);
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
- var methods, key, IteratorPrototype;
- // Fix native
- if ($anyNative) {
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEF_VALUES && $native && $native.name !== VALUES) {
- VALUES_BUG = true;
- $default = function values() { return $native.call(this); };
- }
- // Define iterator
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if (DEFAULT) {
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if (FORCED) for (key in methods) {
- if (!(key in proto)) redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
- };
- /***/ }),
- /***/ "02f4":
- /***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__("4588");
- var defined = __webpack_require__("be13");
- // true -> String#at
- // false -> String#codePointAt
- module.exports = function (TO_STRING) {
- return function (that, pos) {
- var s = String(defined(that));
- var i = toInteger(pos);
- var l = s.length;
- var a, b;
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
- };
- /***/ }),
- /***/ "0390":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var at = __webpack_require__("02f4")(true);
- // `AdvanceStringIndex` abstract operation
- // https://tc39.github.io/ecma262/#sec-advancestringindex
- module.exports = function (S, index, unicode) {
- return index + (unicode ? at(S, index).length : 1);
- };
- /***/ }),
- /***/ "083e":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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");
- /* 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__);
- /* unused harmony reexport * */
- /***/ }),
- /***/ "0bfb":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // 21.2.5.3 get RegExp.prototype.flags
- var anObject = __webpack_require__("cb7c");
- module.exports = function () {
- var that = anObject(this);
- var result = '';
- if (that.global) result += 'g';
- if (that.ignoreCase) result += 'i';
- if (that.multiline) result += 'm';
- if (that.unicode) result += 'u';
- if (that.sticky) result += 'y';
- return result;
- };
- /***/ }),
- /***/ "0d58":
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__("ce10");
- var enumBugKeys = __webpack_require__("e11e");
- module.exports = Object.keys || function keys(O) {
- return $keys(O, enumBugKeys);
- };
- /***/ }),
- /***/ "11e9":
- /***/ (function(module, exports, __webpack_require__) {
- var pIE = __webpack_require__("52a7");
- var createDesc = __webpack_require__("4630");
- var toIObject = __webpack_require__("6821");
- var toPrimitive = __webpack_require__("6a99");
- var has = __webpack_require__("69a8");
- var IE8_DOM_DEFINE = __webpack_require__("c69a");
- var gOPD = Object.getOwnPropertyDescriptor;
- exports.f = __webpack_require__("9e1e") ? gOPD : function getOwnPropertyDescriptor(O, P) {
- O = toIObject(O);
- P = toPrimitive(P, true);
- if (IE8_DOM_DEFINE) try {
- return gOPD(O, P);
- } catch (e) { /* empty */ }
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
- };
- /***/ }),
- /***/ "1495":
- /***/ (function(module, exports, __webpack_require__) {
- var dP = __webpack_require__("86cc");
- var anObject = __webpack_require__("cb7c");
- var getKeys = __webpack_require__("0d58");
- module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = getKeys(Properties);
- var length = keys.length;
- var i = 0;
- var P;
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
- return O;
- };
- /***/ }),
- /***/ "18d2":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Resize detection strategy that injects objects to elements in order to detect resize events.
- * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
- */
- var browserDetector = __webpack_require__("18e9");
- module.exports = function(options) {
- options = options || {};
- var reporter = options.reporter;
- var batchProcessor = options.batchProcessor;
- var getState = options.stateHandler.getState;
- if(!reporter) {
- throw new Error("Missing required dependency: reporter.");
- }
- /**
- * Adds a resize event listener to the element.
- * @public
- * @param {element} element The element that should have the listener added.
- * @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.
- */
- function addListener(element, listener) {
- function listenerProxy() {
- listener(element);
- }
- if(browserDetector.isIE(8)) {
- //IE 8 does not support object, but supports the resize event directly on elements.
- getState(element).object = {
- proxy: listenerProxy
- };
- element.attachEvent("onresize", listenerProxy);
- } else {
- var object = getObject(element);
- if(!object) {
- throw new Error("Element is not detectable by this strategy.");
- }
- object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
- }
- }
- function buildCssTextString(rules) {
- var seperator = options.important ? " !important; " : "; ";
- return (rules.join(seperator) + seperator).trim();
- }
- /**
- * 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.
- * @private
- * @param {object} options Optional options object.
- * @param {element} element The element to make detectable
- * @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.
- */
- function makeDetectable(options, element, callback) {
- if (!callback) {
- callback = element;
- element = options;
- options = null;
- }
- options = options || {};
- var debug = options.debug;
- function injectObject(element, callback) {
- 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"]);
- //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
- // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
- var positionCheckPerformed = false;
- // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
- // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
- var style = window.getComputedStyle(element);
- var width = element.offsetWidth;
- var height = element.offsetHeight;
- getState(element).startSize = {
- width: width,
- height: height
- };
- function mutateDom() {
- function alterPositionStyles() {
- if(style.position === "static") {
- element.style.setProperty("position", "relative", options.important ? "important" : "");
- var removeRelativeStyles = function(reporter, element, style, property) {
- function getNumericalValue(value) {
- return value.replace(/[^-\d\.]/g, "");
- }
- var value = style[property];
- if(value !== "auto" && getNumericalValue(value) !== "0") {
- 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);
- element.style.setProperty(property, "0", options.important ? "important" : "");
- }
- };
- //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
- //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).
- removeRelativeStyles(reporter, element, style, "top");
- removeRelativeStyles(reporter, element, style, "right");
- removeRelativeStyles(reporter, element, style, "bottom");
- removeRelativeStyles(reporter, element, style, "left");
- }
- }
- function onObjectLoad() {
- // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
- if (!positionCheckPerformed) {
- alterPositionStyles();
- }
- /*jshint validthis: true */
- function getDocument(element, callback) {
- //Opera 12 seem to call the object.onload before the actual document has been created.
- //So if it is not present, poll it with an timeout until it is present.
- //TODO: Could maybe be handled better with object.onreadystatechange or similar.
- if(!element.contentDocument) {
- var state = getState(element);
- if (state.checkForObjectDocumentTimeoutId) {
- window.clearTimeout(state.checkForObjectDocumentTimeoutId);
- }
- state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {
- state.checkForObjectDocumentTimeoutId = 0;
- getDocument(element, callback);
- }, 100);
- return;
- }
- callback(element.contentDocument);
- }
- //Mutating the object element here seems to fire another load event.
- //Mutating the inner document of the object element is fine though.
- var objectElement = this;
- //Create the style element to be added to the object.
- getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
- //Notify that the element is ready to be listened to.
- callback(element);
- });
- }
- // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
- // 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.
- if (style.position !== "") {
- alterPositionStyles(style);
- positionCheckPerformed = true;
- }
- //Add an object element as a child to the target element that will be listened to for resize events.
- var object = document.createElement("object");
- object.style.cssText = OBJECT_STYLE;
- object.tabIndex = -1;
- object.type = "text/html";
- object.setAttribute("aria-hidden", "true");
- object.onload = onObjectLoad;
- //Safari: This must occur before adding the object to the DOM.
- //IE: Does not like that this happens before, even if it is also added after.
- if(!browserDetector.isIE()) {
- object.data = "about:blank";
- }
- if (!getState(element)) {
- // The element has been uninstalled before the actual loading happened.
- return;
- }
- element.appendChild(object);
- getState(element).object = object;
- //IE: This must occur after adding the object to the DOM.
- if(browserDetector.isIE()) {
- object.data = "about:blank";
- }
- }
- if(batchProcessor) {
- batchProcessor.add(mutateDom);
- } else {
- mutateDom();
- }
- }
- if(browserDetector.isIE(8)) {
- //IE 8 does not support objects properly. Luckily they do support the resize event.
- //So do not inject the object and notify that the element is already ready to be listened to.
- //The event handler for the resize event is attached in the utils.addListener instead.
- callback(element);
- } else {
- injectObject(element, callback);
- }
- }
- /**
- * Returns the child object of the target element.
- * @private
- * @param {element} element The target element.
- * @returns The object element of the target.
- */
- function getObject(element) {
- return getState(element).object;
- }
- function uninstall(element) {
- if (!getState(element)) {
- return;
- }
- var object = getObject(element);
- if (!object) {
- return;
- }
- if (browserDetector.isIE(8)) {
- element.detachEvent("onresize", object.proxy);
- } else {
- element.removeChild(object);
- }
- if (getState(element).checkForObjectDocumentTimeoutId) {
- window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);
- }
- delete getState(element).object;
- }
- return {
- makeDetectable: makeDetectable,
- addListener: addListener,
- uninstall: uninstall
- };
- };
- /***/ }),
- /***/ "18e9":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var detector = module.exports = {};
- detector.isIE = function(version) {
- function isAnyIeVersion() {
- var agent = navigator.userAgent.toLowerCase();
- return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
- }
- if(!isAnyIeVersion()) {
- return false;
- }
- if(!version) {
- return true;
- }
- //Shamelessly stolen from https://gist.github.com/padolsey/527683
- var ieVersion = (function(){
- var undef,
- v = 3,
- div = document.createElement("div"),
- all = div.getElementsByTagName("i");
- do {
- div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
- }
- while (all[0]);
- return v > 4 ? v : undef;
- }());
- return version === ieVersion;
- };
- detector.isLegacyOpera = function() {
- return !!window.opera;
- };
- /***/ }),
- /***/ "214f":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- __webpack_require__("b0c5");
- var redefine = __webpack_require__("2aba");
- var hide = __webpack_require__("32e9");
- var fails = __webpack_require__("79e5");
- var defined = __webpack_require__("be13");
- var wks = __webpack_require__("2b4c");
- var regexpExec = __webpack_require__("520a");
- var SPECIES = wks('species');
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
- // #replace needs built-in support for named groups.
- // #match works fine because it just return the exec results, even if it has
- // a "grops" property.
- var re = /./;
- re.exec = function () {
- var result = [];
- result.groups = { a: '7' };
- return result;
- };
- return ''.replace(re, '$<a>') !== '7';
- });
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
- // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
- var re = /(?:)/;
- var originalExec = re.exec;
- re.exec = function () { return originalExec.apply(this, arguments); };
- var result = 'ab'.split(re);
- return result.length === 2 && result[0] === 'a' && result[1] === 'b';
- })();
- module.exports = function (KEY, length, exec) {
- var SYMBOL = wks(KEY);
- var DELEGATES_TO_SYMBOL = !fails(function () {
- // String methods call symbol-named RegEp methods
- var O = {};
- O[SYMBOL] = function () { return 7; };
- return ''[KEY](O) != 7;
- });
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
- // Symbol-named RegExp methods call .exec
- var execCalled = false;
- var re = /a/;
- re.exec = function () { execCalled = true; return null; };
- if (KEY === 'split') {
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
- // a new one. We need to return the patched regex when creating the new one.
- re.constructor = {};
- re.constructor[SPECIES] = function () { return re; };
- }
- re[SYMBOL]('');
- return !execCalled;
- }) : undefined;
- if (
- !DELEGATES_TO_SYMBOL ||
- !DELEGATES_TO_EXEC ||
- (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
- (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
- ) {
- var nativeRegExpMethod = /./[SYMBOL];
- var fns = exec(
- defined,
- SYMBOL,
- ''[KEY],
- function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
- if (regexp.exec === regexpExec) {
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
- // The native String method already delegates to @@method (this
- // polyfilled function), leasing to infinite recursion.
- // We avoid it by directly calling the native @@method method.
- return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
- }
- return { done: true, value: nativeMethod.call(str, regexp, arg2) };
- }
- return { done: false };
- }
- );
- var strfn = fns[0];
- var rxfn = fns[1];
- redefine(String.prototype, KEY, strfn);
- hide(RegExp.prototype, SYMBOL, length == 2
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
- ? function (string, arg) { return rxfn.call(string, this, arg); }
- // 21.2.5.6 RegExp.prototype[@@match](string)
- // 21.2.5.9 RegExp.prototype[@@search](string)
- : function (string) { return rxfn.call(string, this); }
- );
- }
- };
- /***/ }),
- /***/ "230e":
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__("d3f4");
- var document = __webpack_require__("7726").document;
- // typeof document.createElement is 'object' in old IE
- var is = isObject(document) && isObject(document.createElement);
- module.exports = function (it) {
- return is ? document.createElement(it) : {};
- };
- /***/ }),
- /***/ "23c6":
- /***/ (function(module, exports, __webpack_require__) {
- // getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__("2d95");
- var TAG = __webpack_require__("2b4c")('toStringTag');
- // ES3 wrong here
- var ARG = cof(function () { return arguments; }()) == 'Arguments';
- // fallback for IE11 Script Access Denied error
- var tryGet = function (it, key) {
- try {
- return it[key];
- } catch (e) { /* empty */ }
- };
- module.exports = function (it) {
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
- };
- /***/ }),
- /***/ "24fb":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- // eslint-disable-next-line func-names
- module.exports = function (useSourceMap) {
- var list = []; // return the list of modules as css string
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
- if (item[2]) {
- return "@media ".concat(item[2], " {").concat(content, "}");
- }
- return content;
- }).join('');
- }; // import a list of modules into the list
- // eslint-disable-next-line func-names
- list.i = function (modules, mediaQuery, dedupe) {
- if (typeof modules === 'string') {
- // eslint-disable-next-line no-param-reassign
- modules = [[null, modules, '']];
- }
- var alreadyImportedModules = {};
- if (dedupe) {
- for (var i = 0; i < this.length; i++) {
- // eslint-disable-next-line prefer-destructuring
- var id = this[i][0];
- if (id != null) {
- alreadyImportedModules[id] = true;
- }
- }
- }
- for (var _i = 0; _i < modules.length; _i++) {
- var item = [].concat(modules[_i]);
- if (dedupe && alreadyImportedModules[item[0]]) {
- // eslint-disable-next-line no-continue
- continue;
- }
- if (mediaQuery) {
- if (!item[2]) {
- item[2] = mediaQuery;
- } else {
- item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
- }
- }
- list.push(item);
- }
- };
- return list;
- };
- function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
- var cssMapping = item[3];
- if (!cssMapping) {
- return content;
- }
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
- return [content].join('\n');
- } // Adapted from convert-source-map (MIT)
- function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
- return "/*# ".concat(data, " */");
- }
- /***/ }),
- /***/ "2621":
- /***/ (function(module, exports) {
- exports.f = Object.getOwnPropertySymbols;
- /***/ }),
- /***/ "2aba":
- /***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__("7726");
- var hide = __webpack_require__("32e9");
- var has = __webpack_require__("69a8");
- var SRC = __webpack_require__("ca5a")('src');
- var $toString = __webpack_require__("fa5b");
- var TO_STRING = 'toString';
- var TPL = ('' + $toString).split(TO_STRING);
- __webpack_require__("8378").inspectSource = function (it) {
- return $toString.call(it);
- };
- (module.exports = function (O, key, val, safe) {
- var isFunction = typeof val == 'function';
- if (isFunction) has(val, 'name') || hide(val, 'name', key);
- if (O[key] === val) return;
- if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
- if (O === global) {
- O[key] = val;
- } else if (!safe) {
- delete O[key];
- hide(O, key, val);
- } else if (O[key]) {
- O[key] = val;
- } else {
- hide(O, key, val);
- }
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
- })(Function.prototype, TO_STRING, function toString() {
- return typeof this == 'function' && this[SRC] || $toString.call(this);
- });
- /***/ }),
- /***/ "2aeb":
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__("cb7c");
- var dPs = __webpack_require__("1495");
- var enumBugKeys = __webpack_require__("e11e");
- var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
- var Empty = function () { /* empty */ };
- var PROTOTYPE = 'prototype';
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__("230e")('iframe');
- var i = enumBugKeys.length;
- var lt = '<';
- var gt = '>';
- var iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__("fab2").appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
- module.exports = Object.create || function create(O, Properties) {
- var result;
- if (O !== null) {
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty();
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
- };
- /***/ }),
- /***/ "2b4c":
- /***/ (function(module, exports, __webpack_require__) {
- var store = __webpack_require__("5537")('wks');
- var uid = __webpack_require__("ca5a");
- var Symbol = __webpack_require__("7726").Symbol;
- var USE_SYMBOL = typeof Symbol == 'function';
- var $exports = module.exports = function (name) {
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
- };
- $exports.store = store;
- /***/ }),
- /***/ "2cef":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = function() {
- var idCount = 1;
- /**
- * Generates a new unique id in the context.
- * @public
- * @returns {number} A unique id in the context.
- */
- function generate() {
- return idCount++;
- }
- return {
- generate: generate
- };
- };
- /***/ }),
- /***/ "2d00":
- /***/ (function(module, exports) {
- module.exports = false;
- /***/ }),
- /***/ "2d95":
- /***/ (function(module, exports) {
- var toString = {}.toString;
- module.exports = function (it) {
- return toString.call(it).slice(8, -1);
- };
- /***/ }),
- /***/ "2f21":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var fails = __webpack_require__("79e5");
- module.exports = function (method, arg) {
- return !!method && fails(function () {
- // eslint-disable-next-line no-useless-call
- arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
- });
- };
- /***/ }),
- /***/ "32e9":
- /***/ (function(module, exports, __webpack_require__) {
- var dP = __webpack_require__("86cc");
- var createDesc = __webpack_require__("4630");
- module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
- return dP.f(object, key, createDesc(1, value));
- } : function (object, key, value) {
- object[key] = value;
- return object;
- };
- /***/ }),
- /***/ "38fd":
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__("69a8");
- var toObject = __webpack_require__("4bf8");
- var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
- var ObjectProto = Object.prototype;
- module.exports = Object.getPrototypeOf || function (O) {
- O = toObject(O);
- if (has(O, IE_PROTO)) return O[IE_PROTO];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
- };
- /***/ }),
- /***/ "41a0":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var create = __webpack_require__("2aeb");
- var descriptor = __webpack_require__("4630");
- var setToStringTag = __webpack_require__("7f20");
- var IteratorPrototype = {};
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
- module.exports = function (Constructor, NAME, next) {
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
- setToStringTag(Constructor, NAME + ' Iterator');
- };
- /***/ }),
- /***/ "456d":
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__("4bf8");
- var $keys = __webpack_require__("0d58");
- __webpack_require__("5eda")('keys', function () {
- return function keys(it) {
- return $keys(toObject(it));
- };
- });
- /***/ }),
- /***/ "4588":
- /***/ (function(module, exports) {
- // 7.1.4 ToInteger
- var ceil = Math.ceil;
- var floor = Math.floor;
- module.exports = function (it) {
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
- };
- /***/ }),
- /***/ "4630":
- /***/ (function(module, exports) {
- module.exports = function (bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
- };
- /***/ }),
- /***/ "4917":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var anObject = __webpack_require__("cb7c");
- var toLength = __webpack_require__("9def");
- var advanceStringIndex = __webpack_require__("0390");
- var regExpExec = __webpack_require__("5f1b");
- // @@match logic
- __webpack_require__("214f")('match', 1, function (defined, MATCH, $match, maybeCallNative) {
- return [
- // `String.prototype.match` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.match
- function match(regexp) {
- var O = defined(this);
- var fn = regexp == undefined ? undefined : regexp[MATCH];
- return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- },
- // `RegExp.prototype[@@match]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
- function (regexp) {
- var res = maybeCallNative($match, regexp, this);
- if (res.done) return res.value;
- var rx = anObject(regexp);
- var S = String(this);
- if (!rx.global) return regExpExec(rx, S);
- var fullUnicode = rx.unicode;
- rx.lastIndex = 0;
- var A = [];
- var n = 0;
- var result;
- while ((result = regExpExec(rx, S)) !== null) {
- var matchStr = String(result[0]);
- A[n] = matchStr;
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
- n++;
- }
- return n === 0 ? null : A;
- }
- ];
- });
- /***/ }),
- /***/ "493e":
- /***/ (function(module, exports, __webpack_require__) {
- // Imports
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
- exports = ___CSS_LOADER_API_IMPORT___(false);
- // Module
- 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}", ""]);
- // Exports
- module.exports = exports;
- /***/ }),
- /***/ "499e":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesClient; });
- // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js
- /**
- * Translates the list format produced by css-loader into something
- * easier to manipulate.
- */
- function listToStyles (parentId, list) {
- var styles = []
- var newStyles = {}
- for (var i = 0; i < list.length; i++) {
- var item = list[i]
- var id = item[0]
- var css = item[1]
- var media = item[2]
- var sourceMap = item[3]
- var part = {
- id: parentId + ':' + i,
- css: css,
- media: media,
- sourceMap: sourceMap
- }
- if (!newStyles[id]) {
- styles.push(newStyles[id] = { id: id, parts: [part] })
- } else {
- newStyles[id].parts.push(part)
- }
- }
- return styles
- }
- // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- Modified by Evan You @yyx990803
- */
- var hasDocument = typeof document !== 'undefined'
- if (typeof DEBUG !== 'undefined' && DEBUG) {
- if (!hasDocument) {
- throw new Error(
- 'vue-style-loader cannot be used in a non-browser environment. ' +
- "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
- ) }
- }
- /*
- type StyleObject = {
- id: number;
- parts: Array<StyleObjectPart>
- }
- type StyleObjectPart = {
- css: string;
- media: string;
- sourceMap: ?string
- }
- */
- var stylesInDom = {/*
- [id: number]: {
- id: number,
- refs: number,
- parts: Array<(obj?: StyleObjectPart) => void>
- }
- */}
- var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
- var singletonElement = null
- var singletonCounter = 0
- var isProduction = false
- var noop = function () {}
- var options = null
- var ssrIdKey = 'data-vue-ssr-id'
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
- // tags it will allow on a page
- var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
- function addStylesClient (parentId, list, _isProduction, _options) {
- isProduction = _isProduction
- options = _options || {}
- var styles = listToStyles(parentId, list)
- addStylesToDom(styles)
- return function update (newList) {
- var mayRemove = []
- for (var i = 0; i < styles.length; i++) {
- var item = styles[i]
- var domStyle = stylesInDom[item.id]
- domStyle.refs--
- mayRemove.push(domStyle)
- }
- if (newList) {
- styles = listToStyles(parentId, newList)
- addStylesToDom(styles)
- } else {
- styles = []
- }
- for (var i = 0; i < mayRemove.length; i++) {
- var domStyle = mayRemove[i]
- if (domStyle.refs === 0) {
- for (var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j]()
- }
- delete stylesInDom[domStyle.id]
- }
- }
- }
- }
- function addStylesToDom (styles /* Array<StyleObject> */) {
- for (var i = 0; i < styles.length; i++) {
- var item = styles[i]
- var domStyle = stylesInDom[item.id]
- if (domStyle) {
- domStyle.refs++
- for (var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j](item.parts[j])
- }
- for (; j < item.parts.length; j++) {
- domStyle.parts.push(addStyle(item.parts[j]))
- }
- if (domStyle.parts.length > item.parts.length) {
- domStyle.parts.length = item.parts.length
- }
- } else {
- var parts = []
- for (var j = 0; j < item.parts.length; j++) {
- parts.push(addStyle(item.parts[j]))
- }
- stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
- }
- }
- }
- function createStyleElement () {
- var styleElement = document.createElement('style')
- styleElement.type = 'text/css'
- head.appendChild(styleElement)
- return styleElement
- }
- function addStyle (obj /* StyleObjectPart */) {
- var update, remove
- var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
- if (styleElement) {
- if (isProduction) {
- // has SSR styles and in production mode.
- // simply do nothing.
- return noop
- } else {
- // has SSR styles but in dev mode.
- // for some reason Chrome can't handle source map in server-rendered
- // style tags - source maps in <style> only works if the style tag is
- // created and inserted dynamically. So we remove the server rendered
- // styles and inject new ones.
- styleElement.parentNode.removeChild(styleElement)
- }
- }
- if (isOldIE) {
- // use singleton mode for IE9.
- var styleIndex = singletonCounter++
- styleElement = singletonElement || (singletonElement = createStyleElement())
- update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
- remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
- } else {
- // use multi-style-tag mode in all other cases
- styleElement = createStyleElement()
- update = applyToTag.bind(null, styleElement)
- remove = function () {
- styleElement.parentNode.removeChild(styleElement)
- }
- }
- update(obj)
- return function updateStyle (newObj /* StyleObjectPart */) {
- if (newObj) {
- if (newObj.css === obj.css &&
- newObj.media === obj.media &&
- newObj.sourceMap === obj.sourceMap) {
- return
- }
- update(obj = newObj)
- } else {
- remove()
- }
- }
- }
- var replaceText = (function () {
- var textStore = []
- return function (index, replacement) {
- textStore[index] = replacement
- return textStore.filter(Boolean).join('\n')
- }
- })()
- function applyToSingletonTag (styleElement, index, remove, obj) {
- var css = remove ? '' : obj.css
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = replaceText(index, css)
- } else {
- var cssNode = document.createTextNode(css)
- var childNodes = styleElement.childNodes
- if (childNodes[index]) styleElement.removeChild(childNodes[index])
- if (childNodes.length) {
- styleElement.insertBefore(cssNode, childNodes[index])
- } else {
- styleElement.appendChild(cssNode)
- }
- }
- }
- function applyToTag (styleElement, obj) {
- var css = obj.css
- var media = obj.media
- var sourceMap = obj.sourceMap
- if (media) {
- styleElement.setAttribute('media', media)
- }
- if (options.ssrId) {
- styleElement.setAttribute(ssrIdKey, obj.id)
- }
- if (sourceMap) {
- // https://developer.chrome.com/devtools/docs/javascript-debugging
- // this makes source maps inside style tags work properly in Chrome
- css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
- // http://stackoverflow.com/a/26603875
- css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
- }
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = css
- } else {
- while (styleElement.firstChild) {
- styleElement.removeChild(styleElement.firstChild)
- }
- styleElement.appendChild(document.createTextNode(css))
- }
- }
- /***/ }),
- /***/ "49ad":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = function(idHandler) {
- var eventListeners = {};
- /**
- * Gets all listeners for the given element.
- * @public
- * @param {element} element The element to get all listeners for.
- * @returns All listeners for the given element.
- */
- function getListeners(element) {
- var id = idHandler.get(element);
- if (id === undefined) {
- return [];
- }
- return eventListeners[id] || [];
- }
- /**
- * Stores the given listener for the given element. Will not actually add the listener to the element.
- * @public
- * @param {element} element The element that should have the listener added.
- * @param {function} listener The callback that the element has added.
- */
- function addListener(element, listener) {
- var id = idHandler.get(element);
- if(!eventListeners[id]) {
- eventListeners[id] = [];
- }
- eventListeners[id].push(listener);
- }
- function removeListener(element, listener) {
- var listeners = getListeners(element);
- for (var i = 0, len = listeners.length; i < len; ++i) {
- if (listeners[i] === listener) {
- listeners.splice(i, 1);
- break;
- }
- }
- }
- function removeAllListeners(element) {
- var listeners = getListeners(element);
- if (!listeners) { return; }
- listeners.length = 0;
- }
- return {
- get: getListeners,
- add: addListener,
- removeListener: removeListener,
- removeAllListeners: removeAllListeners
- };
- };
- /***/ }),
- /***/ "4bf8":
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__("be13");
- module.exports = function (it) {
- return Object(defined(it));
- };
- /***/ }),
- /***/ "5058":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = function(options) {
- var idGenerator = options.idGenerator;
- var getState = options.stateHandler.getState;
- /**
- * Gets the resize detector id of the element.
- * @public
- * @param {element} element The target element to get the id of.
- * @returns {string|number|null} The id of the element. Null if it has no id.
- */
- function getId(element) {
- var state = getState(element);
- if (state && state.id !== undefined) {
- return state.id;
- }
- return null;
- }
- /**
- * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
- * @public
- * @param {element} element The target element to set the id of.
- * @returns {string|number|null} The id of the element.
- */
- function setId(element) {
- var state = getState(element);
- if (!state) {
- throw new Error("setId required the element to have a resize detection state.");
- }
- var id = idGenerator.generate();
- state.id = id;
- return id;
- }
- return {
- get: getId,
- set: setId
- };
- };
- /***/ }),
- /***/ "50bf":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var utils = module.exports = {};
- utils.getOption = getOption;
- function getOption(options, name, defaultValue) {
- var value = options[name];
- if((value === undefined || value === null) && defaultValue !== undefined) {
- return defaultValue;
- }
- return value;
- }
- /***/ }),
- /***/ "520a":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var regexpFlags = __webpack_require__("0bfb");
- var nativeExec = RegExp.prototype.exec;
- // This always refers to the native implementation, because the
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
- // which loads this file before patching the method.
- var nativeReplace = String.prototype.replace;
- var patchedExec = nativeExec;
- var LAST_INDEX = 'lastIndex';
- var UPDATES_LAST_INDEX_WRONG = (function () {
- var re1 = /a/,
- re2 = /b*/g;
- nativeExec.call(re1, 'a');
- nativeExec.call(re2, 'a');
- return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
- })();
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
- if (PATCH) {
- patchedExec = function exec(str) {
- var re = this;
- var lastIndex, reCopy, match, i;
- if (NPCG_INCLUDED) {
- reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
- }
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
- match = nativeExec.call(re, str);
- if (UPDATES_LAST_INDEX_WRONG && match) {
- re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
- }
- if (NPCG_INCLUDED && match && match.length > 1) {
- // Fix browsers whose `exec` methods don't consistently return `undefined`
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
- // eslint-disable-next-line no-loop-func
- nativeReplace.call(match[0], reCopy, function () {
- for (i = 1; i < arguments.length - 2; i++) {
- if (arguments[i] === undefined) match[i] = undefined;
- }
- });
- }
- return match;
- };
- }
- module.exports = patchedExec;
- /***/ }),
- /***/ "52a7":
- /***/ (function(module, exports) {
- exports.f = {}.propertyIsEnumerable;
- /***/ }),
- /***/ "5537":
- /***/ (function(module, exports, __webpack_require__) {
- var core = __webpack_require__("8378");
- var global = __webpack_require__("7726");
- var SHARED = '__core-js_shared__';
- var store = global[SHARED] || (global[SHARED] = {});
- (module.exports = function (key, value) {
- return store[key] || (store[key] = value !== undefined ? value : {});
- })('versions', []).push({
- version: core.version,
- mode: __webpack_require__("2d00") ? 'pure' : 'global',
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
- });
- /***/ }),
- /***/ "55dd":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var $export = __webpack_require__("5ca1");
- var aFunction = __webpack_require__("d8e8");
- var toObject = __webpack_require__("4bf8");
- var fails = __webpack_require__("79e5");
- var $sort = [].sort;
- var test = [1, 2, 3];
- $export($export.P + $export.F * (fails(function () {
- // IE8-
- test.sort(undefined);
- }) || !fails(function () {
- // V8 bug
- test.sort(null);
- // Old WebKit
- }) || !__webpack_require__("2f21")($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn) {
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
- });
- /***/ }),
- /***/ "5be5":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- module.exports = function(options) {
- var getState = options.stateHandler.getState;
- /**
- * Tells if the element has been made detectable and ready to be listened for resize events.
- * @public
- * @param {element} The element to check.
- * @returns {boolean} True or false depending on if the element is detectable or not.
- */
- function isDetectable(element) {
- var state = getState(element);
- return state && !!state.isDetectable;
- }
- /**
- * Marks the element that it has been made detectable and ready to be listened for resize events.
- * @public
- * @param {element} The element to mark.
- */
- function markAsDetectable(element) {
- getState(element).isDetectable = true;
- }
- /**
- * Tells if the element is busy or not.
- * @public
- * @param {element} The element to check.
- * @returns {boolean} True or false depending on if the element is busy or not.
- */
- function isBusy(element) {
- return !!getState(element).busy;
- }
- /**
- * Marks the object is busy and should not be made detectable.
- * @public
- * @param {element} element The element to mark.
- * @param {boolean} busy If the element is busy or not.
- */
- function markBusy(element, busy) {
- getState(element).busy = !!busy;
- }
- return {
- isDetectable: isDetectable,
- markAsDetectable: markAsDetectable,
- isBusy: isBusy,
- markBusy: markBusy
- };
- };
- /***/ }),
- /***/ "5ca1":
- /***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__("7726");
- var core = __webpack_require__("8378");
- var hide = __webpack_require__("32e9");
- var redefine = __webpack_require__("2aba");
- var ctx = __webpack_require__("9b43");
- var PROTOTYPE = 'prototype';
- var $export = function (type, name, source) {
- var IS_FORCED = type & $export.F;
- var IS_GLOBAL = type & $export.G;
- var IS_STATIC = type & $export.S;
- var IS_PROTO = type & $export.P;
- var IS_BIND = type & $export.B;
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
- var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
- var key, own, out, exp;
- if (IS_GLOBAL) source = name;
- for (key in source) {
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- // export native or passed
- out = (own ? target : source)[key];
- // bind timers to global for call from export context
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // extend global
- if (target) redefine(target, key, out, type & $export.U);
- // export
- if (exports[key] != out) hide(exports, key, exp);
- if (IS_PROTO && expProto[key] != out) expProto[key] = out;
- }
- };
- global.core = core;
- // type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
- module.exports = $export;
- /***/ }),
- /***/ "5dbc":
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__("d3f4");
- var setPrototypeOf = __webpack_require__("8b97").set;
- module.exports = function (that, target, C) {
- var S = target.constructor;
- var P;
- if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
- setPrototypeOf(that, P);
- } return that;
- };
- /***/ }),
- /***/ "5eda":
- /***/ (function(module, exports, __webpack_require__) {
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__("5ca1");
- var core = __webpack_require__("8378");
- var fails = __webpack_require__("79e5");
- module.exports = function (KEY, exec) {
- var fn = (core.Object || {})[KEY] || Object[KEY];
- var exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
- };
- /***/ }),
- /***/ "5f1b":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var classof = __webpack_require__("23c6");
- var builtinExec = RegExp.prototype.exec;
- // `RegExpExec` abstract operation
- // https://tc39.github.io/ecma262/#sec-regexpexec
- module.exports = function (R, S) {
- var exec = R.exec;
- if (typeof exec === 'function') {
- var result = exec.call(R, S);
- if (typeof result !== 'object') {
- throw new TypeError('RegExp exec method returned something other than an Object or null');
- }
- return result;
- }
- if (classof(R) !== 'RegExp') {
- throw new TypeError('RegExp#exec called on incompatible receiver');
- }
- return builtinExec.call(R, S);
- };
- /***/ }),
- /***/ "613b":
- /***/ (function(module, exports, __webpack_require__) {
- var shared = __webpack_require__("5537")('keys');
- var uid = __webpack_require__("ca5a");
- module.exports = function (key) {
- return shared[key] || (shared[key] = uid(key));
- };
- /***/ }),
- /***/ "626a":
- /***/ (function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__("2d95");
- // eslint-disable-next-line no-prototype-builtins
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
- /***/ }),
- /***/ "6521":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* 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");
- /* 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__);
- /* unused harmony reexport * */
- /***/ }),
- /***/ "6821":
- /***/ (function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__("626a");
- var defined = __webpack_require__("be13");
- module.exports = function (it) {
- return IObject(defined(it));
- };
- /***/ }),
- /***/ "69a8":
- /***/ (function(module, exports) {
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function (it, key) {
- return hasOwnProperty.call(it, key);
- };
- /***/ }),
- /***/ "6a99":
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__("d3f4");
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function (it, S) {
- if (!isObject(it)) return it;
- var fn, val;
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- throw TypeError("Can't convert object to primitive value");
- };
- /***/ }),
- /***/ "7333":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- // 19.1.2.1 Object.assign(target, source, ...)
- var DESCRIPTORS = __webpack_require__("9e1e");
- var getKeys = __webpack_require__("0d58");
- var gOPS = __webpack_require__("2621");
- var pIE = __webpack_require__("52a7");
- var toObject = __webpack_require__("4bf8");
- var IObject = __webpack_require__("626a");
- var $assign = Object.assign;
- // should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__("79e5")(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var S = Symbol();
- var K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function (k) { B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var aLen = arguments.length;
- var index = 1;
- var getSymbols = gOPS.f;
- var isEnum = pIE.f;
- while (aLen > index) {
- var S = IObject(arguments[index++]);
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) {
- key = keys[j++];
- if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
- }
- } return T;
- } : $assign;
- /***/ }),
- /***/ "7726":
- /***/ (function(module, exports) {
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self
- // eslint-disable-next-line no-new-func
- : Function('return this')();
- if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
- /***/ }),
- /***/ "77f1":
- /***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__("4588");
- var max = Math.max;
- var min = Math.min;
- module.exports = function (index, length) {
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
- };
- /***/ }),
- /***/ "79e5":
- /***/ (function(module, exports) {
- module.exports = function (exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
- };
- /***/ }),
- /***/ "7f20":
- /***/ (function(module, exports, __webpack_require__) {
- var def = __webpack_require__("86cc").f;
- var has = __webpack_require__("69a8");
- var TAG = __webpack_require__("2b4c")('toStringTag');
- module.exports = function (it, tag, stat) {
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
- };
- /***/ }),
- /***/ "8378":
- /***/ (function(module, exports) {
- var core = module.exports = { version: '2.6.12' };
- if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
- /***/ }),
- /***/ "848e":
- /***/ (function(module, exports, __webpack_require__) {
- // Imports
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
- exports = ___CSS_LOADER_API_IMPORT___(false);
- // Module
- exports.push([module.i, ".vue-grid-layout{position:relative;-webkit-transition:height .2s ease;transition:height .2s ease}", ""]);
- // Exports
- module.exports = exports;
- /***/ }),
- /***/ "84f2":
- /***/ (function(module, exports) {
- module.exports = {};
- /***/ }),
- /***/ "86cc":
- /***/ (function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__("cb7c");
- var IE8_DOM_DEFINE = __webpack_require__("c69a");
- var toPrimitive = __webpack_require__("6a99");
- var dP = Object.defineProperty;
- exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if (IE8_DOM_DEFINE) try {
- return dP(O, P, Attributes);
- } catch (e) { /* empty */ }
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
- if ('value' in Attributes) O[P] = Attributes.value;
- return O;
- };
- /***/ }),
- /***/ "8875":
- /***/ (function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
- // MIT license
- // source: https://github.com/amiller-gh/currentScript-polyfill
- // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
- (function (root, factory) {
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
- }(typeof self !== 'undefined' ? self : this, function () {
- function getCurrentScript () {
- var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
- // for chrome
- if (!descriptor && 'currentScript' in document && document.currentScript) {
- return document.currentScript
- }
- // for other browsers with native support for currentScript
- if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
- return document.currentScript
- }
-
- // IE 8-10 support script readyState
- // IE 11+ & Firefox support stack trace
- try {
- throw new Error();
- }
- catch (err) {
- // Find the second match for the "at" string to get file src url from stack.
- var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
- ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
- stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
- scriptLocation = (stackDetails && stackDetails[1]) || false,
- line = (stackDetails && stackDetails[2]) || false,
- currentLocation = document.location.href.replace(document.location.hash, ''),
- pageSource,
- inlineScriptSourceRegExp,
- inlineScriptSource,
- scripts = document.getElementsByTagName('script'); // Live NodeList collection
-
- if (scriptLocation === currentLocation) {
- pageSource = document.documentElement.outerHTML;
- inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
- inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
- }
-
- for (var i = 0; i < scripts.length; i++) {
- // If ready state is interactive, return the script tag
- if (scripts[i].readyState === 'interactive') {
- return scripts[i];
- }
-
- // If src matches, return the script tag
- if (scripts[i].src === scriptLocation) {
- return scripts[i];
- }
-
- // If inline source matches, return the script tag
- if (
- scriptLocation === currentLocation &&
- scripts[i].innerHTML &&
- scripts[i].innerHTML.trim() === inlineScriptSource
- ) {
- return scripts[i];
- }
- }
-
- // If no match, return null
- return null;
- }
- };
- return getCurrentScript
- }));
- /***/ }),
- /***/ "8b97":
- /***/ (function(module, exports, __webpack_require__) {
- // Works with __proto__ only. Old v8 can't work with null proto objects.
- /* eslint-disable no-proto */
- var isObject = __webpack_require__("d3f4");
- var anObject = __webpack_require__("cb7c");
- var check = function (O, proto) {
- anObject(O);
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
- };
- module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function (test, buggy, set) {
- try {
- set = __webpack_require__("9b43")(Function.call, __webpack_require__("11e9").f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch (e) { buggy = true; }
- return function setPrototypeOf(O, proto) {
- check(O, proto);
- if (buggy) O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
- };
- /***/ }),
- /***/ "8bbf":
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
- /***/ }),
- /***/ "8e6e":
- /***/ (function(module, exports, __webpack_require__) {
- // https://github.com/tc39/proposal-object-getownpropertydescriptors
- var $export = __webpack_require__("5ca1");
- var ownKeys = __webpack_require__("990b");
- var toIObject = __webpack_require__("6821");
- var gOPD = __webpack_require__("11e9");
- var createProperty = __webpack_require__("f1ae");
- $export($export.S, 'Object', {
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
- var O = toIObject(object);
- var getDesc = gOPD.f;
- var keys = ownKeys(O);
- var result = {};
- var i = 0;
- var key, desc;
- while (keys.length > i) {
- desc = getDesc(O, key = keys[i++]);
- if (desc !== undefined) createProperty(result, key, desc);
- }
- return result;
- }
- });
- /***/ }),
- /***/ "9093":
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__("ce10");
- var hiddenKeys = __webpack_require__("e11e").concat('length', 'prototype');
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return $keys(O, hiddenKeys);
- };
- /***/ }),
- /***/ "92bf":
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__("848e");
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var add = __webpack_require__("499e").default
- var update = add("ff1827d0", content, true, {"sourceMap":false,"shadowMode":false});
- /***/ }),
- /***/ "990b":
- /***/ (function(module, exports, __webpack_require__) {
- // all object keys, includes non-enumerable and symbols
- var gOPN = __webpack_require__("9093");
- var gOPS = __webpack_require__("2621");
- var anObject = __webpack_require__("cb7c");
- var Reflect = __webpack_require__("7726").Reflect;
- module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
- var keys = gOPN.f(anObject(it));
- var getSymbols = gOPS.f;
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
- };
- /***/ }),
- /***/ "9b43":
- /***/ (function(module, exports, __webpack_require__) {
- // optional / simple context binding
- var aFunction = __webpack_require__("d8e8");
- module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
- };
- /***/ }),
- /***/ "9c6c":
- /***/ (function(module, exports, __webpack_require__) {
- // 22.1.3.31 Array.prototype[@@unscopables]
- var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
- var ArrayProto = Array.prototype;
- if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
- module.exports = function (key) {
- ArrayProto[UNSCOPABLES][key] = true;
- };
- /***/ }),
- /***/ "9def":
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.15 ToLength
- var toInteger = __webpack_require__("4588");
- var min = Math.min;
- module.exports = function (it) {
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
- };
- /***/ }),
- /***/ "9e1e":
- /***/ (function(module, exports, __webpack_require__) {
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__("79e5")(function () {
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
- });
- /***/ }),
- /***/ "a481":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var anObject = __webpack_require__("cb7c");
- var toObject = __webpack_require__("4bf8");
- var toLength = __webpack_require__("9def");
- var toInteger = __webpack_require__("4588");
- var advanceStringIndex = __webpack_require__("0390");
- var regExpExec = __webpack_require__("5f1b");
- var max = Math.max;
- var min = Math.min;
- var floor = Math.floor;
- var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
- var maybeToString = function (it) {
- return it === undefined ? it : String(it);
- };
- // @@replace logic
- __webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
- return [
- // `String.prototype.replace` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.replace
- function replace(searchValue, replaceValue) {
- var O = defined(this);
- var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
- return fn !== undefined
- ? fn.call(searchValue, O, replaceValue)
- : $replace.call(String(O), searchValue, replaceValue);
- },
- // `RegExp.prototype[@@replace]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
- function (regexp, replaceValue) {
- var res = maybeCallNative($replace, regexp, this, replaceValue);
- if (res.done) return res.value;
- var rx = anObject(regexp);
- var S = String(this);
- var functionalReplace = typeof replaceValue === 'function';
- if (!functionalReplace) replaceValue = String(replaceValue);
- var global = rx.global;
- if (global) {
- var fullUnicode = rx.unicode;
- rx.lastIndex = 0;
- }
- var results = [];
- while (true) {
- var result = regExpExec(rx, S);
- if (result === null) break;
- results.push(result);
- if (!global) break;
- var matchStr = String(result[0]);
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
- }
- var accumulatedResult = '';
- var nextSourcePosition = 0;
- for (var i = 0; i < results.length; i++) {
- result = results[i];
- var matched = String(result[0]);
- var position = max(min(toInteger(result.index), S.length), 0);
- var captures = [];
- // NOTE: This is equivalent to
- // captures = result.slice(1).map(maybeToString)
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
- for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
- var namedCaptures = result.groups;
- if (functionalReplace) {
- var replacerArgs = [matched].concat(captures, position, S);
- if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
- var replacement = String(replaceValue.apply(undefined, replacerArgs));
- } else {
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
- }
- if (position >= nextSourcePosition) {
- accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
- nextSourcePosition = position + matched.length;
- }
- }
- return accumulatedResult + S.slice(nextSourcePosition);
- }
- ];
- // https://tc39.github.io/ecma262/#sec-getsubstitution
- function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
- var tailPos = position + matched.length;
- var m = captures.length;
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
- if (namedCaptures !== undefined) {
- namedCaptures = toObject(namedCaptures);
- symbols = SUBSTITUTION_SYMBOLS;
- }
- return $replace.call(replacement, symbols, function (match, ch) {
- var capture;
- switch (ch.charAt(0)) {
- case '$': return '$';
- case '&': return matched;
- case '`': return str.slice(0, position);
- case "'": return str.slice(tailPos);
- case '<':
- capture = namedCaptures[ch.slice(1, -1)];
- break;
- default: // \d\d?
- var n = +ch;
- if (n === 0) return match;
- if (n > m) {
- var f = floor(n / 10);
- if (f === 0) return match;
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
- return match;
- }
- capture = captures[n - 1];
- }
- return capture === undefined ? '' : capture;
- });
- }
- });
- /***/ }),
- /***/ "aa77":
- /***/ (function(module, exports, __webpack_require__) {
- var $export = __webpack_require__("5ca1");
- var defined = __webpack_require__("be13");
- var fails = __webpack_require__("79e5");
- var spaces = __webpack_require__("fdef");
- var space = '[' + spaces + ']';
- var non = '\u200b\u0085';
- var ltrim = RegExp('^' + space + space + '*');
- var rtrim = RegExp(space + space + '*$');
- var exporter = function (KEY, exec, ALIAS) {
- var exp = {};
- var FORCE = fails(function () {
- return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if (ALIAS) exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
- };
- // 1 -> String#trimLeft
- // 2 -> String#trimRight
- // 3 -> String#trim
- var trim = exporter.trim = function (string, TYPE) {
- string = String(defined(string));
- if (TYPE & 1) string = string.replace(ltrim, '');
- if (TYPE & 2) string = string.replace(rtrim, '');
- return string;
- };
- module.exports = exporter;
- /***/ }),
- /***/ "abb4":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* global console: false */
- /**
- * Reporter that handles the reporting of logs, warnings and errors.
- * @public
- * @param {boolean} quiet Tells if the reporter should be quiet or not.
- */
- module.exports = function(quiet) {
- function noop() {
- //Does nothing.
- }
- var reporter = {
- log: noop,
- warn: noop,
- error: noop
- };
- if(!quiet && window.console) {
- var attachFunction = function(reporter, name) {
- //The proxy is needed to be able to call the method with the console context,
- //since we cannot use bind.
- reporter[name] = function reporterProxy() {
- var f = console[name];
- if (f.apply) { //IE9 does not support console.log.apply :)
- f.apply(console, arguments);
- } else {
- for (var i = 0; i < arguments.length; i++) {
- f(arguments[i]);
- }
- }
- };
- };
- attachFunction(reporter, "log");
- attachFunction(reporter, "warn");
- attachFunction(reporter, "error");
- }
- return reporter;
- };
- /***/ }),
- /***/ "ac6a":
- /***/ (function(module, exports, __webpack_require__) {
- var $iterators = __webpack_require__("cadf");
- var getKeys = __webpack_require__("0d58");
- var redefine = __webpack_require__("2aba");
- var global = __webpack_require__("7726");
- var hide = __webpack_require__("32e9");
- var Iterators = __webpack_require__("84f2");
- var wks = __webpack_require__("2b4c");
- var ITERATOR = wks('iterator');
- var TO_STRING_TAG = wks('toStringTag');
- var ArrayValues = Iterators.Array;
- var DOMIterables = {
- CSSRuleList: true, // TODO: Not spec compliant, should be false.
- CSSStyleDeclaration: false,
- CSSValueList: false,
- ClientRectList: false,
- DOMRectList: false,
- DOMStringList: false,
- DOMTokenList: true,
- DataTransferItemList: false,
- FileList: false,
- HTMLAllCollection: false,
- HTMLCollection: false,
- HTMLFormElement: false,
- HTMLSelectElement: false,
- MediaList: true, // TODO: Not spec compliant, should be false.
- MimeTypeArray: false,
- NamedNodeMap: false,
- NodeList: true,
- PaintRequestList: false,
- Plugin: false,
- PluginArray: false,
- SVGLengthList: false,
- SVGNumberList: false,
- SVGPathSegList: false,
- SVGPointList: false,
- SVGStringList: false,
- SVGTransformList: false,
- SourceBufferList: false,
- StyleSheetList: true, // TODO: Not spec compliant, should be false.
- TextTrackCueList: false,
- TextTrackList: false,
- TouchList: false
- };
- for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
- var NAME = collections[i];
- var explicit = DOMIterables[NAME];
- var Collection = global[NAME];
- var proto = Collection && Collection.prototype;
- var key;
- if (proto) {
- if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
- if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = ArrayValues;
- if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
- }
- }
- /***/ }),
- /***/ "b0c5":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var regexpExec = __webpack_require__("520a");
- __webpack_require__("5ca1")({
- target: 'RegExp',
- proto: true,
- forced: regexpExec !== /./.exec
- }, {
- exec: regexpExec
- });
- /***/ }),
- /***/ "b770":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var utils = module.exports = {};
- /**
- * 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.
- * @public
- * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
- * @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.
- * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
- */
- utils.forEach = function(collection, callback) {
- for(var i = 0; i < collection.length; i++) {
- var result = callback(collection[i]);
- if(result) {
- return result;
- }
- }
- };
- /***/ }),
- /***/ "be13":
- /***/ (function(module, exports) {
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function (it) {
- if (it == undefined) throw TypeError("Can't call method on " + it);
- return it;
- };
- /***/ }),
- /***/ "c274":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var utils = __webpack_require__("50bf");
- module.exports = function batchProcessorMaker(options) {
- options = options || {};
- var reporter = options.reporter;
- var asyncProcess = utils.getOption(options, "async", true);
- var autoProcess = utils.getOption(options, "auto", true);
- if(autoProcess && !asyncProcess) {
- reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
- asyncProcess = true;
- }
- var batch = Batch();
- var asyncFrameHandler;
- var isProcessing = false;
- function addFunction(level, fn) {
- if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
- // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
- // This needs to be done before, since we're checking the size of the batch to be 0.
- processBatchAsync();
- }
- batch.add(level, fn);
- }
- function processBatch() {
- // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
- // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
- isProcessing = true;
- while (batch.size()) {
- var processingBatch = batch;
- batch = Batch();
- processingBatch.process();
- }
- isProcessing = false;
- }
- function forceProcessBatch(localAsyncProcess) {
- if (isProcessing) {
- return;
- }
- if(localAsyncProcess === undefined) {
- localAsyncProcess = asyncProcess;
- }
- if(asyncFrameHandler) {
- cancelFrame(asyncFrameHandler);
- asyncFrameHandler = null;
- }
- if(localAsyncProcess) {
- processBatchAsync();
- } else {
- processBatch();
- }
- }
- function processBatchAsync() {
- asyncFrameHandler = requestFrame(processBatch);
- }
- function clearBatch() {
- batch = {};
- batchSize = 0;
- topLevel = 0;
- bottomLevel = 0;
- }
- function cancelFrame(listener) {
- // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
- var cancel = clearTimeout;
- return cancel(listener);
- }
- function requestFrame(callback) {
- // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
- var raf = function(fn) { return setTimeout(fn, 0); };
- return raf(callback);
- }
- return {
- add: addFunction,
- force: forceProcessBatch
- };
- };
- function Batch() {
- var batch = {};
- var size = 0;
- var topLevel = 0;
- var bottomLevel = 0;
- function add(level, fn) {
- if(!fn) {
- fn = level;
- level = 0;
- }
- if(level > topLevel) {
- topLevel = level;
- } else if(level < bottomLevel) {
- bottomLevel = level;
- }
- if(!batch[level]) {
- batch[level] = [];
- }
- batch[level].push(fn);
- size++;
- }
- function process() {
- for(var level = bottomLevel; level <= topLevel; level++) {
- var fns = batch[level];
- for(var i = 0; i < fns.length; i++) {
- var fn = fns[i];
- fn();
- }
- }
- }
- function getSize() {
- return size;
- }
- return {
- add: add,
- process: process,
- size: getSize
- };
- }
- /***/ }),
- /***/ "c366":
- /***/ (function(module, exports, __webpack_require__) {
- // false -> Array#indexOf
- // true -> Array#includes
- var toIObject = __webpack_require__("6821");
- var toLength = __webpack_require__("9def");
- var toAbsoluteIndex = __webpack_require__("77f1");
- module.exports = function (IS_INCLUDES) {
- return function ($this, el, fromIndex) {
- var O = toIObject($this);
- var length = toLength(O.length);
- var index = toAbsoluteIndex(fromIndex, length);
- var value;
- // Array#includes uses SameValueZero equality algorithm
- // eslint-disable-next-line no-self-compare
- if (IS_INCLUDES && el != el) while (length > index) {
- value = O[index++];
- // eslint-disable-next-line no-self-compare
- if (value != value) return true;
- // Array#indexOf ignores holes, Array#includes - not
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
- if (O[index] === el) return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
- };
- /***/ }),
- /***/ "c541":
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__("493e");
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var add = __webpack_require__("499e").default
- var update = add("40158674", content, true, {"sourceMap":false,"shadowMode":false});
- /***/ }),
- /***/ "c5f6":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var global = __webpack_require__("7726");
- var has = __webpack_require__("69a8");
- var cof = __webpack_require__("2d95");
- var inheritIfRequired = __webpack_require__("5dbc");
- var toPrimitive = __webpack_require__("6a99");
- var fails = __webpack_require__("79e5");
- var gOPN = __webpack_require__("9093").f;
- var gOPD = __webpack_require__("11e9").f;
- var dP = __webpack_require__("86cc").f;
- var $trim = __webpack_require__("aa77").trim;
- var NUMBER = 'Number';
- var $Number = global[NUMBER];
- var Base = $Number;
- var proto = $Number.prototype;
- // Opera ~12 has broken Object#toString
- var BROKEN_COF = cof(__webpack_require__("2aeb")(proto)) == NUMBER;
- var TRIM = 'trim' in String.prototype;
- // 7.1.3 ToNumber(argument)
- var toNumber = function (argument) {
- var it = toPrimitive(argument, false);
- if (typeof it == 'string' && it.length > 2) {
- it = TRIM ? it.trim() : $trim(it, 3);
- var first = it.charCodeAt(0);
- var third, radix, maxCode;
- if (first === 43 || first === 45) {
- third = it.charCodeAt(2);
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
- } else if (first === 48) {
- switch (it.charCodeAt(1)) {
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
- default: return +it;
- }
- for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
- code = digits.charCodeAt(i);
- // parseInt parses a string to a first unavailable symbol
- // but ToNumber should return NaN if a string contains unavailable symbols
- if (code < 48 || code > maxCode) return NaN;
- } return parseInt(digits, radix);
- }
- } return +it;
- };
- if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
- $Number = function Number(value) {
- var it = arguments.length < 1 ? 0 : value;
- var that = this;
- return that instanceof $Number
- // check on 1..constructor(foo) case
- && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
- };
- for (var keys = __webpack_require__("9e1e") ? gOPN(Base) : (
- // ES3:
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
- // ES6 (in case, if modules with ES6 Number statics required before):
- 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
- ).split(','), j = 0, key; keys.length > j; j++) {
- if (has(Base, key = keys[j]) && !has($Number, key)) {
- dP($Number, key, gOPD(Base, key));
- }
- }
- $Number.prototype = proto;
- proto.constructor = $Number;
- __webpack_require__("2aba")(global, NUMBER, $Number);
- }
- /***/ }),
- /***/ "c69a":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
- return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
- });
- /***/ }),
- /***/ "c946":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /**
- * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
- * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
- */
- var forEach = __webpack_require__("b770").forEach;
- module.exports = function(options) {
- options = options || {};
- var reporter = options.reporter;
- var batchProcessor = options.batchProcessor;
- var getState = options.stateHandler.getState;
- var hasState = options.stateHandler.hasState;
- var idHandler = options.idHandler;
- if (!batchProcessor) {
- throw new Error("Missing required dependency: batchProcessor");
- }
- if (!reporter) {
- throw new Error("Missing required dependency: reporter.");
- }
- //TODO: Could this perhaps be done at installation time?
- var scrollbarSizes = getScrollbarSizes();
- var styleId = "erd_scroll_detection_scrollbar_style";
- var detectionContainerClass = "erd_scroll_detection_container";
- function initDocument(targetDocument) {
- // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
- // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
- injectScrollStyle(targetDocument, styleId, detectionContainerClass);
- }
- initDocument(window.document);
- function buildCssTextString(rules) {
- var seperator = options.important ? " !important; " : "; ";
- return (rules.join(seperator) + seperator).trim();
- }
- function getScrollbarSizes() {
- var width = 500;
- var height = 500;
- var child = document.createElement("div");
- child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
- var container = document.createElement("div");
- 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"]);
- container.appendChild(child);
- document.body.insertBefore(container, document.body.firstChild);
- var widthSize = width - container.clientWidth;
- var heightSize = height - container.clientHeight;
- document.body.removeChild(container);
- return {
- width: widthSize,
- height: heightSize
- };
- }
- function injectScrollStyle(targetDocument, styleId, containerClass) {
- function injectStyle(style, method) {
- method = method || function (element) {
- targetDocument.head.appendChild(element);
- };
- var styleElement = targetDocument.createElement("style");
- styleElement.innerHTML = style;
- styleElement.id = styleId;
- method(styleElement);
- return styleElement;
- }
- if (!targetDocument.getElementById(styleId)) {
- var containerAnimationClass = containerClass + "_animation";
- var containerAnimationActiveClass = containerClass + "_animation_active";
- var style = "/* Created by the element-resize-detector library. */\n";
- style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n";
- style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n";
- style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
- style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
- injectStyle(style);
- }
- }
- function addAnimationClass(element) {
- element.className += " " + detectionContainerClass + "_animation_active";
- }
- function addEvent(el, name, cb) {
- if (el.addEventListener) {
- el.addEventListener(name, cb);
- } else if(el.attachEvent) {
- el.attachEvent("on" + name, cb);
- } else {
- return reporter.error("[scroll] Don't know how to add event listeners.");
- }
- }
- function removeEvent(el, name, cb) {
- if (el.removeEventListener) {
- el.removeEventListener(name, cb);
- } else if(el.detachEvent) {
- el.detachEvent("on" + name, cb);
- } else {
- return reporter.error("[scroll] Don't know how to remove event listeners.");
- }
- }
- function getExpandElement(element) {
- return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
- }
- function getShrinkElement(element) {
- return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
- }
- /**
- * Adds a resize event listener to the element.
- * @public
- * @param {element} element The element that should have the listener added.
- * @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.
- */
- function addListener(element, listener) {
- var listeners = getState(element).listeners;
- if (!listeners.push) {
- throw new Error("Cannot add listener to an element that is not detectable.");
- }
- getState(element).listeners.push(listener);
- }
- /**
- * 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.
- * @private
- * @param {object} options Optional options object.
- * @param {element} element The element to make detectable
- * @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.
- */
- function makeDetectable(options, element, callback) {
- if (!callback) {
- callback = element;
- element = options;
- options = null;
- }
- options = options || {};
- function debug() {
- if (options.debug) {
- var args = Array.prototype.slice.call(arguments);
- args.unshift(idHandler.get(element), "Scroll: ");
- if (reporter.log.apply) {
- reporter.log.apply(null, args);
- } else {
- for (var i = 0; i < args.length; i++) {
- reporter.log(args[i]);
- }
- }
- }
- }
- function isDetached(element) {
- function isInDocument(element) {
- return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
- }
- if (!isInDocument(element)) {
- return true;
- }
- // 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
- if (window.getComputedStyle(element) === null) {
- return true;
- }
- return false;
- }
- function isUnrendered(element) {
- // Check the absolute positioned container since the top level container is display: inline.
- var container = getState(element).container.childNodes[0];
- var style = window.getComputedStyle(container);
- return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered.
- }
- function getStyle() {
- // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
- // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
- var elementStyle = window.getComputedStyle(element);
- var style = {};
- style.position = elementStyle.position;
- style.width = element.offsetWidth;
- style.height = element.offsetHeight;
- style.top = elementStyle.top;
- style.right = elementStyle.right;
- style.bottom = elementStyle.bottom;
- style.left = elementStyle.left;
- style.widthCSS = elementStyle.width;
- style.heightCSS = elementStyle.height;
- return style;
- }
- function storeStartSize() {
- var style = getStyle();
- getState(element).startSize = {
- width: style.width,
- height: style.height
- };
- debug("Element start size", getState(element).startSize);
- }
- function initListeners() {
- getState(element).listeners = [];
- }
- function storeStyle() {
- debug("storeStyle invoked.");
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- var style = getStyle();
- getState(element).style = style;
- }
- function storeCurrentSize(element, width, height) {
- getState(element).lastWidth = width;
- getState(element).lastHeight = height;
- }
- function getExpandChildElement(element) {
- return getExpandElement(element).childNodes[0];
- }
- function getWidthOffset() {
- return 2 * scrollbarSizes.width + 1;
- }
- function getHeightOffset() {
- return 2 * scrollbarSizes.height + 1;
- }
- function getExpandWidth(width) {
- return width + 10 + getWidthOffset();
- }
- function getExpandHeight(height) {
- return height + 10 + getHeightOffset();
- }
- function getShrinkWidth(width) {
- return width * 2 + getWidthOffset();
- }
- function getShrinkHeight(height) {
- return height * 2 + getHeightOffset();
- }
- function positionScrollbars(element, width, height) {
- var expand = getExpandElement(element);
- var shrink = getShrinkElement(element);
- var expandWidth = getExpandWidth(width);
- var expandHeight = getExpandHeight(height);
- var shrinkWidth = getShrinkWidth(width);
- var shrinkHeight = getShrinkHeight(height);
- expand.scrollLeft = expandWidth;
- expand.scrollTop = expandHeight;
- shrink.scrollLeft = shrinkWidth;
- shrink.scrollTop = shrinkHeight;
- }
- function injectContainerElement() {
- var container = getState(element).container;
- if (!container) {
- container = document.createElement("div");
- container.className = detectionContainerClass;
- container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]);
- getState(element).container = container;
- addAnimationClass(container);
- element.appendChild(container);
- var onAnimationStart = function () {
- getState(element).onRendered && getState(element).onRendered();
- };
- addEvent(container, "animationstart", onAnimationStart);
- // Store the event handler here so that they may be removed when uninstall is called.
- // See uninstall function for an explanation why it is needed.
- getState(element).onAnimationStart = onAnimationStart;
- }
- return container;
- }
- function injectScrollElements() {
- function alterPositionStyles() {
- var style = getState(element).style;
- if(style.position === "static") {
- element.style.setProperty("position", "relative",options.important ? "important" : "");
- var removeRelativeStyles = function(reporter, element, style, property) {
- function getNumericalValue(value) {
- return value.replace(/[^-\d\.]/g, "");
- }
- var value = style[property];
- if(value !== "auto" && getNumericalValue(value) !== "0") {
- 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);
- element.style[property] = 0;
- }
- };
- //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
- //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).
- removeRelativeStyles(reporter, element, style, "top");
- removeRelativeStyles(reporter, element, style, "right");
- removeRelativeStyles(reporter, element, style, "bottom");
- removeRelativeStyles(reporter, element, style, "left");
- }
- }
- function getLeftTopBottomRightCssText(left, top, bottom, right) {
- left = (!left ? "0" : (left + "px"));
- top = (!top ? "0" : (top + "px"));
- bottom = (!bottom ? "0" : (bottom + "px"));
- right = (!right ? "0" : (right + "px"));
- return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom];
- }
- debug("Injecting elements");
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- alterPositionStyles();
- var rootContainer = getState(element).container;
- if (!rootContainer) {
- rootContainer = injectContainerElement();
- }
- // 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),
- // 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
- // the targeted element.
- // When the bug is resolved, "containerContainer" may be removed.
- // 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).
- // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
- var scrollbarWidth = scrollbarSizes.width;
- var scrollbarHeight = scrollbarSizes.height;
- var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]);
- var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));
- var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
- var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
- var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]);
- var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]);
- var containerContainer = document.createElement("div");
- var container = document.createElement("div");
- var expand = document.createElement("div");
- var expandChild = document.createElement("div");
- var shrink = document.createElement("div");
- var shrinkChild = document.createElement("div");
- // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
- // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
- containerContainer.dir = "ltr";
- containerContainer.style.cssText = containerContainerStyle;
- containerContainer.className = detectionContainerClass;
- container.className = detectionContainerClass;
- container.style.cssText = containerStyle;
- expand.style.cssText = expandStyle;
- expandChild.style.cssText = expandChildStyle;
- shrink.style.cssText = shrinkStyle;
- shrinkChild.style.cssText = shrinkChildStyle;
- expand.appendChild(expandChild);
- shrink.appendChild(shrinkChild);
- container.appendChild(expand);
- container.appendChild(shrink);
- containerContainer.appendChild(container);
- rootContainer.appendChild(containerContainer);
- function onExpandScroll() {
- getState(element).onExpand && getState(element).onExpand();
- }
- function onShrinkScroll() {
- getState(element).onShrink && getState(element).onShrink();
- }
- addEvent(expand, "scroll", onExpandScroll);
- addEvent(shrink, "scroll", onShrinkScroll);
- // Store the event handlers here so that they may be removed when uninstall is called.
- // See uninstall function for an explanation why it is needed.
- getState(element).onExpandScroll = onExpandScroll;
- getState(element).onShrinkScroll = onShrinkScroll;
- }
- function registerListenersAndPositionElements() {
- function updateChildSizes(element, width, height) {
- var expandChild = getExpandChildElement(element);
- var expandWidth = getExpandWidth(width);
- var expandHeight = getExpandHeight(height);
- expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : "");
- expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
- }
- function updateDetectorElements(done) {
- var width = element.offsetWidth;
- var height = element.offsetHeight;
- // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.
- var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
- debug("Storing current size", width, height);
- // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
- // Otherwise the if-check in handleScroll is useless.
- storeCurrentSize(element, width, height);
- // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
- // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
- batchProcessor.add(0, function performUpdateChildSizes() {
- if (!sizeChanged) {
- return;
- }
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- if (!areElementsInjected()) {
- debug("Aborting because element container has not been initialized");
- return;
- }
- if (options.debug) {
- var w = element.offsetWidth;
- var h = element.offsetHeight;
- if (w !== width || h !== height) {
- reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
- }
- }
- updateChildSizes(element, width, height);
- });
- batchProcessor.add(1, function updateScrollbars() {
- // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then
- // been restored to the original size, which will have changed the scrollbar positions.
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- if (!areElementsInjected()) {
- debug("Aborting because element container has not been initialized");
- return;
- }
- positionScrollbars(element, width, height);
- });
- if (sizeChanged && done) {
- batchProcessor.add(2, function () {
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- if (!areElementsInjected()) {
- debug("Aborting because element container has not been initialized");
- return;
- }
- done();
- });
- }
- }
- function areElementsInjected() {
- return !!getState(element).container;
- }
- function notifyListenersIfNeeded() {
- function isFirstNotify() {
- return getState(element).lastNotifiedWidth === undefined;
- }
- debug("notifyListenersIfNeeded invoked");
- var state = getState(element);
- // Don't notify if the current size is the start size, and this is the first notification.
- if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
- return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
- }
- // Don't notify if the size already has been notified.
- if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
- return debug("Not notifying: Size already notified");
- }
- debug("Current size not notified, notifying...");
- state.lastNotifiedWidth = state.lastWidth;
- state.lastNotifiedHeight = state.lastHeight;
- forEach(getState(element).listeners, function (listener) {
- listener(element);
- });
- }
- function handleRender() {
- debug("startanimation triggered.");
- if (isUnrendered(element)) {
- debug("Ignoring since element is still unrendered...");
- return;
- }
- debug("Element rendered.");
- var expand = getExpandElement(element);
- var shrink = getShrinkElement(element);
- if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
- debug("Scrollbars out of sync. Updating detector elements...");
- updateDetectorElements(notifyListenersIfNeeded);
- }
- }
- function handleScroll() {
- debug("Scroll detected.");
- if (isUnrendered(element)) {
- // Element is still unrendered. Skip this scroll event.
- debug("Scroll event fired while unrendered. Ignoring...");
- return;
- }
- updateDetectorElements(notifyListenersIfNeeded);
- }
- debug("registerListenersAndPositionElements invoked.");
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- getState(element).onRendered = handleRender;
- getState(element).onExpand = handleScroll;
- getState(element).onShrink = handleScroll;
- var style = getState(element).style;
- updateChildSizes(element, style.width, style.height);
- }
- function finalizeDomMutation() {
- debug("finalizeDomMutation invoked.");
- if (!getState(element)) {
- debug("Aborting because element has been uninstalled");
- return;
- }
- var style = getState(element).style;
- storeCurrentSize(element, style.width, style.height);
- positionScrollbars(element, style.width, style.height);
- }
- function ready() {
- callback(element);
- }
- function install() {
- debug("Installing...");
- initListeners();
- storeStartSize();
- batchProcessor.add(0, storeStyle);
- batchProcessor.add(1, injectScrollElements);
- batchProcessor.add(2, registerListenersAndPositionElements);
- batchProcessor.add(3, finalizeDomMutation);
- batchProcessor.add(4, ready);
- }
- debug("Making detectable...");
- if (isDetached(element)) {
- debug("Element is detached");
- injectContainerElement();
- debug("Waiting until element is attached...");
- getState(element).onRendered = function () {
- debug("Element is now attached");
- install();
- };
- } else {
- install();
- }
- }
- function uninstall(element) {
- var state = getState(element);
- if (!state) {
- // Uninstall has been called on a non-erd element.
- return;
- }
- // Uninstall may have been called in the following scenarios:
- // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
- // (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).
- // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
- // So to be on the safe side, let's check for each thing before removing.
- // 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.
- state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
- state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
- state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
- state.container && element.removeChild(state.container);
- }
- return {
- makeDetectable: makeDetectable,
- addListener: addListener,
- uninstall: uninstall,
- initDocument: initDocument
- };
- };
- /***/ }),
- /***/ "ca5a":
- /***/ (function(module, exports) {
- var id = 0;
- var px = Math.random();
- module.exports = function (key) {
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
- };
- /***/ }),
- /***/ "cadf":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var addToUnscopables = __webpack_require__("9c6c");
- var step = __webpack_require__("d53b");
- var Iterators = __webpack_require__("84f2");
- var toIObject = __webpack_require__("6821");
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function () {
- var O = this._t;
- var kind = this._k;
- var index = this._i++;
- if (!O || index >= O.length) {
- this._t = undefined;
- return step(1);
- }
- if (kind == 'keys') return step(0, index);
- if (kind == 'values') return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
- /***/ }),
- /***/ "cb7c":
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__("d3f4");
- module.exports = function (it) {
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
- return it;
- };
- /***/ }),
- /***/ "ce10":
- /***/ (function(module, exports, __webpack_require__) {
- var has = __webpack_require__("69a8");
- var toIObject = __webpack_require__("6821");
- var arrayIndexOf = __webpack_require__("c366")(false);
- var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
- module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
- };
- /***/ }),
- /***/ "d3f4":
- /***/ (function(module, exports) {
- module.exports = function (it) {
- return typeof it === 'object' ? it !== null : typeof it === 'function';
- };
- /***/ }),
- /***/ "d53b":
- /***/ (function(module, exports) {
- module.exports = function (done, value) {
- return { value: value, done: !!done };
- };
- /***/ }),
- /***/ "d6eb":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var prop = "_erd";
- function initState(element) {
- element[prop] = {};
- return getState(element);
- }
- function getState(element) {
- return element[prop];
- }
- function cleanState(element) {
- delete element[prop];
- }
- module.exports = {
- initState: initState,
- getState: getState,
- cleanState: cleanState
- };
- /***/ }),
- /***/ "d8e8":
- /***/ (function(module, exports) {
- module.exports = function (it) {
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
- return it;
- };
- /***/ }),
- /***/ "e11e":
- /***/ (function(module, exports) {
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
- /***/ }),
- /***/ "eec4":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var forEach = __webpack_require__("b770").forEach;
- var elementUtilsMaker = __webpack_require__("5be5");
- var listenerHandlerMaker = __webpack_require__("49ad");
- var idGeneratorMaker = __webpack_require__("2cef");
- var idHandlerMaker = __webpack_require__("5058");
- var reporterMaker = __webpack_require__("abb4");
- var browserDetector = __webpack_require__("18e9");
- var batchProcessorMaker = __webpack_require__("c274");
- var stateHandler = __webpack_require__("d6eb");
- //Detection strategies.
- var objectStrategyMaker = __webpack_require__("18d2");
- var scrollStrategyMaker = __webpack_require__("c946");
- function isCollection(obj) {
- return Array.isArray(obj) || obj.length !== undefined;
- }
- function toArray(collection) {
- if (!Array.isArray(collection)) {
- var array = [];
- forEach(collection, function (obj) {
- array.push(obj);
- });
- return array;
- } else {
- return collection;
- }
- }
- function isElement(obj) {
- return obj && obj.nodeType === 1;
- }
- /**
- * @typedef idHandler
- * @type {object}
- * @property {function} get Gets the resize detector id of the element.
- * @property {function} set Generate and sets the resize detector id of the element.
- */
- /**
- * @typedef Options
- * @type {object}
- * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
- Default is true. If true, the listener is guaranteed to be called when it has been added.
- If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
- * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
- If not provided, a default id handler will be used.
- * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
- If not provided, a default id handler will be used.
- If set to false, then nothing will be reported.
- * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
- */
- /**
- * Creates an element resize detector instance.
- * @public
- * @param {Options?} options Optional global options object that will decide how this instance will work.
- */
- module.exports = function(options) {
- options = options || {};
- //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
- var idHandler;
- if (options.idHandler) {
- // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
- // so that readonly flag always is true when it's used here. This may be removed next major version bump.
- idHandler = {
- get: function (element) { return options.idHandler.get(element, true); },
- set: options.idHandler.set
- };
- } else {
- var idGenerator = idGeneratorMaker();
- var defaultIdHandler = idHandlerMaker({
- idGenerator: idGenerator,
- stateHandler: stateHandler
- });
- idHandler = defaultIdHandler;
- }
- //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
- var reporter = options.reporter;
- if(!reporter) {
- //If options.reporter is false, then the reporter should be quiet.
- var quiet = reporter === false;
- reporter = reporterMaker(quiet);
- }
- //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
- var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
- //Options to be used as default for the listenTo function.
- var globalOptions = {};
- globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
- globalOptions.debug = !!getOption(options, "debug", false);
- var eventListenerHandler = listenerHandlerMaker(idHandler);
- var elementUtils = elementUtilsMaker({
- stateHandler: stateHandler
- });
- //The detection strategy to be used.
- var detectionStrategy;
- var desiredStrategy = getOption(options, "strategy", "object");
- var importantCssRules = getOption(options, "important", false);
- var strategyOptions = {
- reporter: reporter,
- batchProcessor: batchProcessor,
- stateHandler: stateHandler,
- idHandler: idHandler,
- important: importantCssRules
- };
- if(desiredStrategy === "scroll") {
- if (browserDetector.isLegacyOpera()) {
- reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
- desiredStrategy = "object";
- } else if (browserDetector.isIE(9)) {
- reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
- desiredStrategy = "object";
- }
- }
- if(desiredStrategy === "scroll") {
- detectionStrategy = scrollStrategyMaker(strategyOptions);
- } else if(desiredStrategy === "object") {
- detectionStrategy = objectStrategyMaker(strategyOptions);
- } else {
- throw new Error("Invalid strategy name: " + desiredStrategy);
- }
- //Calls can be made to listenTo with elements that are still being installed.
- //Also, same elements can occur in the elements list in the listenTo function.
- //With this map, the ready callbacks can be synchronized between the calls
- //so that the ready callback can always be called when an element is ready - even if
- //it wasn't installed from the function itself.
- var onReadyCallbacks = {};
- /**
- * 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.
- * @public
- * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
- * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
- * @param {function} listener The callback to be executed for each resize event for each element.
- */
- function listenTo(options, elements, listener) {
- function onResizeCallback(element) {
- var listeners = eventListenerHandler.get(element);
- forEach(listeners, function callListenerProxy(listener) {
- listener(element);
- });
- }
- function addListener(callOnAdd, element, listener) {
- eventListenerHandler.add(element, listener);
- if(callOnAdd) {
- listener(element);
- }
- }
- //Options object may be omitted.
- if(!listener) {
- listener = elements;
- elements = options;
- options = {};
- }
- if(!elements) {
- throw new Error("At least one element required.");
- }
- if(!listener) {
- throw new Error("Listener required.");
- }
- if (isElement(elements)) {
- // A single element has been passed in.
- elements = [elements];
- } else if (isCollection(elements)) {
- // Convert collection to array for plugins.
- // TODO: May want to check so that all the elements in the collection are valid elements.
- elements = toArray(elements);
- } else {
- return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
- }
- var elementsReady = 0;
- var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
- var onReadyCallback = getOption(options, "onReady", function noop() {});
- var debug = getOption(options, "debug", globalOptions.debug);
- forEach(elements, function attachListenerToElement(element) {
- if (!stateHandler.getState(element)) {
- stateHandler.initState(element);
- idHandler.set(element);
- }
- var id = idHandler.get(element);
- debug && reporter.log("Attaching listener to element", id, element);
- if(!elementUtils.isDetectable(element)) {
- debug && reporter.log(id, "Not detectable.");
- if(elementUtils.isBusy(element)) {
- debug && reporter.log(id, "System busy making it detectable");
- //The element is being prepared to be detectable. Do not make it detectable.
- //Just add the listener, because the element will soon be detectable.
- addListener(callOnAdd, element, listener);
- onReadyCallbacks[id] = onReadyCallbacks[id] || [];
- onReadyCallbacks[id].push(function onReady() {
- elementsReady++;
- if(elementsReady === elements.length) {
- onReadyCallback();
- }
- });
- return;
- }
- debug && reporter.log(id, "Making detectable...");
- //The element is not prepared to be detectable, so do prepare it and add a listener to it.
- elementUtils.markBusy(element, true);
- return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {
- debug && reporter.log(id, "onElementDetectable");
- if (stateHandler.getState(element)) {
- elementUtils.markAsDetectable(element);
- elementUtils.markBusy(element, false);
- detectionStrategy.addListener(element, onResizeCallback);
- addListener(callOnAdd, element, listener);
- // Since the element size might have changed since the call to "listenTo", we need to check for this change,
- // so that a resize event may be emitted.
- // 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.
- // Also, check the state existance before since the element may have been uninstalled in the installation process.
- var state = stateHandler.getState(element);
- if (state && state.startSize) {
- var width = element.offsetWidth;
- var height = element.offsetHeight;
- if (state.startSize.width !== width || state.startSize.height !== height) {
- onResizeCallback(element);
- }
- }
- if(onReadyCallbacks[id]) {
- forEach(onReadyCallbacks[id], function(callback) {
- callback();
- });
- }
- } else {
- // The element has been unisntalled before being detectable.
- debug && reporter.log(id, "Element uninstalled before being detectable.");
- }
- delete onReadyCallbacks[id];
- elementsReady++;
- if(elementsReady === elements.length) {
- onReadyCallback();
- }
- });
- }
- debug && reporter.log(id, "Already detecable, adding listener.");
- //The element has been prepared to be detectable and is ready to be listened to.
- addListener(callOnAdd, element, listener);
- elementsReady++;
- });
- if(elementsReady === elements.length) {
- onReadyCallback();
- }
- }
- function uninstall(elements) {
- if(!elements) {
- return reporter.error("At least one element is required.");
- }
- if (isElement(elements)) {
- // A single element has been passed in.
- elements = [elements];
- } else if (isCollection(elements)) {
- // Convert collection to array for plugins.
- // TODO: May want to check so that all the elements in the collection are valid elements.
- elements = toArray(elements);
- } else {
- return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
- }
- forEach(elements, function (element) {
- eventListenerHandler.removeAllListeners(element);
- detectionStrategy.uninstall(element);
- stateHandler.cleanState(element);
- });
- }
- function initDocument(targetDocument) {
- detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
- }
- return {
- listenTo: listenTo,
- removeListener: eventListenerHandler.removeListener,
- removeAllListeners: eventListenerHandler.removeAllListeners,
- uninstall: uninstall,
- initDocument: initDocument
- };
- };
- function getOption(options, name, defaultValue) {
- var value = options[name];
- if((value === undefined || value === null) && defaultValue !== undefined) {
- return defaultValue;
- }
- return value;
- }
- /***/ }),
- /***/ "f1ae":
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var $defineProperty = __webpack_require__("86cc");
- var createDesc = __webpack_require__("4630");
- module.exports = function (object, index, value) {
- if (index in object) $defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
- };
- /***/ }),
- /***/ "f751":
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__("5ca1");
- $export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
- /***/ }),
- /***/ "fa5b":
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString);
- /***/ }),
- /***/ "fab2":
- /***/ (function(module, exports, __webpack_require__) {
- var document = __webpack_require__("7726").document;
- module.exports = document && document.documentElement;
- /***/ }),
- /***/ "fb15":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, "GridLayout", function() { return /* reexport */ GridLayout; });
- __webpack_require__.d(__webpack_exports__, "GridItem", function() { return /* reexport */ GridItem; });
- // NAMESPACE OBJECT: ./node_modules/@interactjs/snappers/all.js
- var all_namespaceObject = {};
- __webpack_require__.r(all_namespaceObject);
- __webpack_require__.d(all_namespaceObject, "edgeTarget", function() { return edgeTarget; });
- __webpack_require__.d(all_namespaceObject, "elements", function() { return snappers_elements; });
- __webpack_require__.d(all_namespaceObject, "grid", function() { return grid; });
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
- // This file is imported into lib/wc client bundles.
- if (typeof window !== 'undefined') {
- var currentScript = window.document.currentScript
- if (true) {
- var getCurrentScript = __webpack_require__("8875")
- currentScript = getCurrentScript()
- // for backward compatibility, because previously we directly included the polyfill
- if (!('currentScript' in document)) {
- Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
- }
- }
- var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
- if (src) {
- __webpack_require__.p = src[1] // eslint-disable-line
- }
- }
- // Indicate to webpack that this file can be concatenated
- /* harmony default export */ var setPublicPath = (null);
- // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
- var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
- // 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
- function render(_ctx, _cache, $props, $setup, $data, $options) {
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
- ref: "item",
- class: ["vue-grid-item", $options.classObj],
- style: _ctx.style
- }, [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", {
- key: 0,
- ref: "handle",
- class: $options.resizableHandleClass
- }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 6);
- }
- // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=template&id=46ff2fc8
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
- var es6_regexp_replace = __webpack_require__("a481");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.match.js
- var es6_regexp_match = __webpack_require__("4917");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js
- var es6_number_constructor = __webpack_require__("c5f6");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
- var es6_array_iterator = __webpack_require__("cadf");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
- var es6_object_keys = __webpack_require__("456d");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
- var web_dom_iterable = __webpack_require__("ac6a");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.sort.js
- var es6_array_sort = __webpack_require__("55dd");
- // CONCATENATED MODULE: ./src/helpers/utils.js
- // @flow
- /*:: export type LayoutItemRequired = {w: number, h: number, x: number, y: number, i: string};*/
- /*:: export type LayoutItem = LayoutItemRequired &
- {minW?: number, minH?: number, maxW?: number, maxH?: number,
- moved?: boolean, static?: boolean,
- isDraggable?: ?boolean, isResizable?: ?boolean};*/
- // export type Position = {left: number, top: number, width: number, height: number};
- /*
- export type DragCallbackData = {
- node: HTMLElement,
- x: number, y: number,
- deltaX: number, deltaY: number,
- lastX: number, lastY: number
- };
- */
- // export type DragEvent = {e: Event} & DragCallbackData;
- /*:: export type Layout = Array<LayoutItem>;*/
- // export type ResizeEvent = {e: Event, node: HTMLElement, size: Size};
- // const isProduction = process.env.NODE_ENV === 'production';
- /**
- * Return the bottom coordinate of the layout.
- *
- * @param {Array} layout Layout array.
- * @return {Number} Bottom coordinate.
- */
- /*:: export type Size = {width: number, height: number};*/
- function bottom(layout
- /*: Layout*/
- )
- /*: number*/
- {
- var max = 0,
- bottomY;
- for (var i = 0, len = layout.length; i < len; i++) {
- bottomY = layout[i].y + layout[i].h;
- if (bottomY > max) max = bottomY;
- }
- return max;
- }
- function cloneLayout(layout
- /*: Layout*/
- )
- /*: Layout*/
- {
- var newLayout = Array(layout.length);
- for (var i = 0, len = layout.length; i < len; i++) {
- newLayout[i] = cloneLayoutItem(layout[i]);
- }
- return newLayout;
- } // Fast path to cloning, since this is monomorphic
- function cloneLayoutItem(layoutItem
- /*: LayoutItem*/
- )
- /*: LayoutItem*/
- {
- /*return {
- w: layoutItem.w, h: layoutItem.h, x: layoutItem.x, y: layoutItem.y, i: layoutItem.i,
- minW: layoutItem.minW, maxW: layoutItem.maxW, minH: layoutItem.minH, maxH: layoutItem.maxH,
- moved: Boolean(layoutItem.moved), static: Boolean(layoutItem.static),
- // These can be null
- isDraggable: layoutItem.isDraggable, isResizable: layoutItem.isResizable
- };*/
- return JSON.parse(JSON.stringify(layoutItem));
- }
- /**
- * Given two layoutitems, check if they collide.
- *
- * @return {Boolean} True if colliding.
- */
- function collides(l1
- /*: LayoutItem*/
- , l2
- /*: LayoutItem*/
- )
- /*: boolean*/
- {
- if (l1 === l2) return false; // same element
- if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2
- if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2
- if (l1.y + l1.h <= l2.y) return false; // l1 is above l2
- if (l1.y >= l2.y + l2.h) return false; // l1 is below l2
- return true; // boxes overlap
- }
- /**
- * Given a layout, compact it. This involves going down each y coordinate and removing gaps
- * between items.
- *
- * @param {Array} layout Layout.
- * @param {Boolean} verticalCompact Whether or not to compact the layout
- * vertically.
- * @return {Array} Compacted Layout.
- */
- function compact(layout
- /*: Layout*/
- , verticalCompact
- /*: Boolean*/
- )
- /*: Layout*/
- {
- // Statics go in the compareWith array right away so items flow around them.
- var compareWith = getStatics(layout); // We go through the items by row and column.
- var sorted = sortLayoutItemsByRowCol(layout); // Holding for new items.
- var out = Array(layout.length);
- for (var i = 0, len = sorted.length; i < len; i++) {
- var l = sorted[i]; // Don't move static elements
- if (!l.static) {
- l = compactItem(compareWith, l, verticalCompact); // Add to comparison array. We only collide with items before this one.
- // Statics are already in this array.
- compareWith.push(l);
- } // Add to output array to make sure they still come out in the right order.
- out[layout.indexOf(l)] = l; // Clear moved flag, if it exists.
- l.moved = false;
- }
- return out;
- }
- /**
- * Compact an item in the layout.
- */
- function compactItem(compareWith
- /*: Layout*/
- , l
- /*: LayoutItem*/
- , verticalCompact
- /*: boolean*/
- )
- /*: LayoutItem*/
- {
- if (verticalCompact) {
- // Move the element up as far as it can go without colliding.
- while (l.y > 0 && !getFirstCollision(compareWith, l)) {
- l.y--;
- }
- } // Move it down, and keep moving it down if it's colliding.
- var collides;
- while (collides = getFirstCollision(compareWith, l)) {
- l.y = collides.y + collides.h;
- }
- return l;
- }
- /**
- * Given a layout, make sure all elements fit within its bounds.
- *
- * @param {Array} layout Layout array.
- * @param {Number} bounds Number of columns.
- */
- function correctBounds(layout
- /*: Layout*/
- , bounds
- /*: {cols: number}*/
- )
- /*: Layout*/
- {
- var collidesWith = getStatics(layout);
- for (var i = 0, len = layout.length; i < len; i++) {
- var l = layout[i]; // Overflows right
- if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left
- if (l.x < 0) {
- l.x = 0;
- l.w = bounds.cols;
- }
- if (!l.static) collidesWith.push(l);else {
- // If this is static and collides with other statics, we must move it down.
- // We have to do something nicer than just letting them overlap.
- while (getFirstCollision(collidesWith, l)) {
- l.y++;
- }
- }
- }
- return layout;
- }
- /**
- * Get a layout item by ID. Used so we can override later on if necessary.
- *
- * @param {Array} layout Layout array.
- * @param {String} id ID
- * @return {LayoutItem} Item at ID.
- */
- function getLayoutItem(layout
- /*: Layout*/
- , id
- /*: string*/
- )
- /*: ?LayoutItem*/
- {
- for (var i = 0, len = layout.length; i < len; i++) {
- if (layout[i].i === id) return layout[i];
- }
- }
- /**
- * Returns the first item this layout collides with.
- * It doesn't appear to matter which order we approach this from, although
- * perhaps that is the wrong thing to do.
- *
- * @param {Object} layoutItem Layout item.
- * @return {Object|undefined} A colliding layout item, or undefined.
- */
- function getFirstCollision(layout
- /*: Layout*/
- , layoutItem
- /*: LayoutItem*/
- )
- /*: ?LayoutItem*/
- {
- for (var i = 0, len = layout.length; i < len; i++) {
- if (collides(layout[i], layoutItem)) return layout[i];
- }
- }
- function getAllCollisions(layout
- /*: Layout*/
- , layoutItem
- /*: LayoutItem*/
- )
- /*: Array<LayoutItem>*/
- {
- return layout.filter(function (l) {
- return collides(l, layoutItem);
- });
- }
- /**
- * Get all static elements.
- * @param {Array} layout Array of layout objects.
- * @return {Array} Array of static layout items..
- */
- function getStatics(layout
- /*: Layout*/
- )
- /*: Array<LayoutItem>*/
- {
- //return [];
- return layout.filter(function (l) {
- return l.static;
- });
- }
- /**
- * Move an element. Responsible for doing cascading movements of other elements.
- *
- * @param {Array} layout Full layout to modify.
- * @param {LayoutItem} l element to move.
- * @param {Number} [x] X position in grid units.
- * @param {Number} [y] Y position in grid units.
- * @param {Boolean} [isUserAction] If true, designates that the item we're moving is
- * being dragged/resized by th euser.
- */
- function moveElement(layout
- /*: Layout*/
- , l
- /*: LayoutItem*/
- , x
- /*: Number*/
- , y
- /*: Number*/
- , isUserAction
- /*: Boolean*/
- , preventCollision
- /*: Boolean*/
- )
- /*: Layout*/
- {
- if (l.static) return layout; // Short-circuit if nothing to do.
- //if (l.y === y && l.x === x) return layout;
- var oldX = l.x;
- var oldY = l.y;
- var movingUp = y && l.y > y; // This is quite a bit faster than extending the object
- if (typeof x === 'number') l.x = x;
- if (typeof y === 'number') l.y = y;
- l.moved = true; // If this collides with anything, move it.
- // When doing this comparison, we have to sort the items we compare with
- // to ensure, in the case of multiple collisions, that we're getting the
- // nearest collision.
- var sorted = sortLayoutItemsByRowCol(layout);
- if (movingUp) sorted = sorted.reverse();
- var collisions = getAllCollisions(sorted, l);
- if (preventCollision && collisions.length) {
- l.x = oldX;
- l.y = oldY;
- l.moved = false;
- return layout;
- } // Move each item that collides away from this element.
- for (var i = 0, len = collisions.length; i < len; i++) {
- var collision = collisions[i]; // console.log('resolving collision between', l.i, 'at', l.y, 'and', collision.i, 'at', collision.y);
- // Short circuit so we can't infinite loop
- if (collision.moved) continue; // This makes it feel a bit more precise by waiting to swap for just a bit when moving up.
- 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
- if (collision.static) {
- layout = moveElementAwayFromCollision(layout, collision, l, isUserAction);
- } else {
- layout = moveElementAwayFromCollision(layout, l, collision, isUserAction);
- }
- }
- return layout;
- }
- /**
- * This is where the magic needs to happen - given a collision, move an element away from the collision.
- * We attempt to move it up if there's room, otherwise it goes below.
- *
- * @param {Array} layout Full layout to modify.
- * @param {LayoutItem} collidesWith Layout item we're colliding with.
- * @param {LayoutItem} itemToMove Layout item we're moving.
- * @param {Boolean} [isUserAction] If true, designates that the item we're moving is being dragged/resized
- * by the user.
- */
- function moveElementAwayFromCollision(layout
- /*: Layout*/
- , collidesWith
- /*: LayoutItem*/
- , itemToMove
- /*: LayoutItem*/
- , isUserAction
- /*: ?boolean*/
- )
- /*: Layout*/
- {
- var preventCollision = false; // we're already colliding
- // If there is enough space above the collision to put this element, move it there.
- // We only do this on the main collision as this can get funky in cascades and cause
- // unwanted swapping behavior.
- if (isUserAction) {
- // Make a mock item so we don't modify the item here, only modify in moveElement.
- var fakeItem
- /*: LayoutItem*/
- = {
- x: itemToMove.x,
- y: itemToMove.y,
- w: itemToMove.w,
- h: itemToMove.h,
- i: '-1'
- };
- fakeItem.y = Math.max(collidesWith.y - itemToMove.h, 0);
- if (!getFirstCollision(layout, fakeItem)) {
- return moveElement(layout, itemToMove, undefined, fakeItem.y, preventCollision);
- }
- } // Previously this was optimized to move below the collision directly, but this can cause problems
- // with cascading moves, as an item may actually leapflog a collision and cause a reversal in order.
- return moveElement(layout, itemToMove, undefined, itemToMove.y + 1, preventCollision);
- }
- /**
- * Helper to convert a number to a percentage string.
- *
- * @param {Number} num Any number
- * @return {String} That number as a percentage.
- */
- function perc(num
- /*: number*/
- )
- /*: string*/
- {
- return num * 100 + '%';
- }
- function setTransform(top, left, width, height)
- /*: Object*/
- {
- // Replace unitless items with px
- var translate = "translate3d(" + left + "px," + top + "px, 0)";
- return {
- transform: translate,
- WebkitTransform: translate,
- MozTransform: translate,
- msTransform: translate,
- OTransform: translate,
- width: width + "px",
- height: height + "px",
- position: 'absolute'
- };
- }
- /**
- * Just like the setTransform method, but instead it will return a negative value of right.
- *
- * @param top
- * @param right
- * @param width
- * @param height
- * @returns {{transform: string, WebkitTransform: string, MozTransform: string, msTransform: string, OTransform: string, width: string, height: string, position: string}}
- */
- function setTransformRtl(top, right, width, height)
- /*: Object*/
- {
- // Replace unitless items with px
- var translate = "translate3d(" + right * -1 + "px," + top + "px, 0)";
- return {
- transform: translate,
- WebkitTransform: translate,
- MozTransform: translate,
- msTransform: translate,
- OTransform: translate,
- width: width + "px",
- height: height + "px",
- position: 'absolute'
- };
- }
- function setTopLeft(top, left, width, height)
- /*: Object*/
- {
- return {
- top: top + "px",
- left: left + "px",
- width: width + "px",
- height: height + "px",
- position: 'absolute'
- };
- }
- /**
- * Just like the setTopLeft method, but instead, it will return a right property instead of left.
- *
- * @param top
- * @param right
- * @param width
- * @param height
- * @returns {{top: string, right: string, width: string, height: string, position: string}}
- */
- function setTopRight(top, right, width, height)
- /*: Object*/
- {
- return {
- top: top + "px",
- right: right + "px",
- width: width + "px",
- height: height + "px",
- position: 'absolute'
- };
- }
- /**
- * Get layout items sorted from top left to right and down.
- *
- * @return {Array} Array of layout objects.
- * @return {Array} Layout, sorted static items first.
- */
- function sortLayoutItemsByRowCol(layout
- /*: Layout*/
- )
- /*: Layout*/
- {
- return [].concat(layout).sort(function (a, b) {
- if (a.y === b.y && a.x === b.x) {
- return 0;
- }
- if (a.y > b.y || a.y === b.y && a.x > b.x) {
- return 1;
- }
- return -1;
- });
- }
- /**
- * Generate a layout using the initialLayout and children as a template.
- * Missing entries will be added, extraneous ones will be truncated.
- *
- * @param {Array} initialLayout Layout passed in through props.
- * @param {String} breakpoint Current responsive breakpoint.
- * @param {Boolean} verticalCompact Whether or not to compact the layout vertically.
- * @return {Array} Working layout.
- */
- /*
- export function synchronizeLayoutWithChildren(initialLayout: Layout, children: Array<React.Element>|React.Element,
- cols: number, verticalCompact: boolean): Layout {
- // ensure 'children' is always an array
- if (!Array.isArray(children)) {
- children = [children];
- }
- initialLayout = initialLayout || [];
- // Generate one layout item per child.
- let layout: Layout = [];
- for (let i = 0, len = children.length; i < len; i++) {
- let newItem;
- const child = children[i];
- // Don't overwrite if it already exists.
- const exists = getLayoutItem(initialLayout, child.key || "1" /!* FIXME satisfies Flow *!/);
- if (exists) {
- newItem = exists;
- } else {
- const g = child.props._grid;
- // Hey, this item has a _grid property, use it.
- if (g) {
- if (!isProduction) {
- validateLayout([g], 'ReactGridLayout.children');
- }
- // Validated; add it to the layout. Bottom 'y' possible is the bottom of the layout.
- // This allows you to do nice stuff like specify {y: Infinity}
- if (verticalCompact) {
- newItem = cloneLayoutItem({...g, y: Math.min(bottom(layout), g.y), i: child.key});
- } else {
- newItem = cloneLayoutItem({...g, y: g.y, i: child.key});
- }
- }
- // Nothing provided: ensure this is added to the bottom
- else {
- newItem = cloneLayoutItem({w: 1, h: 1, x: 0, y: bottom(layout), i: child.key || "1"});
- }
- }
- layout[i] = newItem;
- }
- // Correct the layout.
- layout = correctBounds(layout, {cols: cols});
- layout = compact(layout, verticalCompact);
- return layout;
- }
- */
- /**
- * Validate a layout. Throws errors.
- *
- * @param {Array} layout Array of layout items.
- * @param {String} [contextName] Context name for errors.
- * @throw {Error} Validation error.
- */
- function validateLayout(layout
- /*: Layout*/
- , contextName
- /*: string*/
- )
- /*: void*/
- {
- contextName = contextName || "Layout";
- var subProps = ['x', 'y', 'w', 'h'];
- var keyArr = [];
- if (!Array.isArray(layout)) throw new Error(contextName + " must be an array!");
- for (var i = 0, len = layout.length; i < len; i++) {
- var item = layout[i];
- for (var j = 0; j < subProps.length; j++) {
- if (typeof item[subProps[j]] !== 'number') {
- throw new Error('VueGridLayout: ' + contextName + '[' + i + '].' + subProps[j] + ' must be a number!');
- }
- }
- if (item.i === undefined || item.i === null) {
- throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i cannot be null!');
- }
- if (typeof item.i !== 'number' && typeof item.i !== 'string') {
- throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be a string or number!');
- }
- if (keyArr.indexOf(item.i) >= 0) {
- throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be unique!');
- }
- keyArr.push(item.i);
- if (item.static !== undefined && typeof item.static !== 'boolean') {
- throw new Error('VueGridLayout: ' + contextName + '[' + i + '].static must be a boolean!');
- }
- }
- } // Flow can't really figure this out, so we just use Object
- function autoBindHandlers(el
- /*: Object*/
- , fns
- /*: Array<string>*/
- )
- /*: void*/
- {
- fns.forEach(function (key) {
- return el[key] = el[key].bind(el);
- });
- }
- /**
- * Convert a JS object to CSS string. Similar to React's output of CSS.
- * @param obj
- * @returns {string}
- */
- function createMarkup(obj) {
- var keys = Object.keys(obj);
- if (!keys.length) return '';
- var i,
- len = keys.length;
- var result = '';
- for (i = 0; i < len; i++) {
- var key = keys[i];
- var val = obj[key];
- result += hyphenate(key) + ':' + addPx(key, val) + ';';
- }
- return result;
- }
- /* The following list is defined in React's core */
- var IS_UNITLESS = {
- animationIterationCount: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridRow: true,
- gridColumn: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- stopOpacity: true,
- strokeDashoffset: true,
- strokeOpacity: true,
- strokeWidth: true
- };
- /**
- * Will add px to the end of style values which are Numbers.
- * @param name
- * @param value
- * @returns {*}
- */
- function addPx(name, value) {
- if (typeof value === 'number' && !IS_UNITLESS[name]) {
- return value + 'px';
- } else {
- return value;
- }
- }
- /**
- * Hyphenate a camelCase string.
- *
- * @param {String} str
- * @return {String}
- */
- var hyphenateRE = /([a-z\d])([A-Z])/g;
- function hyphenate(str) {
- return str.replace(hyphenateRE, '$1-$2').toLowerCase();
- }
- function findItemInArray(array, property, value) {
- for (var i = 0; i < array.length; i++) {
- if (array[i][property] == value) return true;
- }
- return false;
- }
- function findAndRemove(array, property, value) {
- array.forEach(function (result, index) {
- if (result[property] === value) {
- //Remove from array
- array.splice(index, 1);
- }
- });
- }
- // CONCATENATED MODULE: ./src/helpers/draggableUtils.js
- // Get {x, y} positions from event.
- function getControlPosition(e) {
- return offsetXYFromParentOf(e);
- } // Get from offsetParent
- function offsetXYFromParentOf(evt) {
- var offsetParent = evt.target.offsetParent || document.body;
- var offsetParentRect = evt.offsetParent === document.body ? {
- left: 0,
- top: 0
- } : offsetParent.getBoundingClientRect();
- var x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;
- var y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;
- /*const x = Math.round(evt.clientX + offsetParent.scrollLeft - offsetParentRect.left);
- const y = Math.round(evt.clientY + offsetParent.scrollTop - offsetParentRect.top);*/
- return {
- x: x,
- y: y
- };
- } // Create an data object exposed by <DraggableCore>'s events
- function createCoreData(lastX, lastY, x, y) {
- // State changes are often (but not always!) async. We want the latest value.
- var isStart = !isNum(lastX);
- if (isStart) {
- // If this is our first move, use the x and y as last coords.
- return {
- deltaX: 0,
- deltaY: 0,
- lastX: x,
- lastY: y,
- x: x,
- y: y
- };
- } else {
- // Otherwise calculate proper values.
- return {
- deltaX: x - lastX,
- deltaY: y - lastY,
- lastX: lastX,
- lastY: lastY,
- x: x,
- y: y
- };
- }
- }
- function isNum(num) {
- return typeof num === 'number' && !isNaN(num);
- }
- // CONCATENATED MODULE: ./src/helpers/responsiveUtils.js
- // @flow
- /*:: import type {Layout} from './utils';*/
- /*:: export type ResponsiveLayout = {lg?: Layout, md?: Layout, sm?: Layout, xs?: Layout, xxs?: Layout};*/
- /*:: type Breakpoint = string;*/
- /**
- * Given a width, find the highest breakpoint that matches is valid for it (width > breakpoint).
- *
- * @param {Object} breakpoints Breakpoints object (e.g. {lg: 1200, md: 960, ...})
- * @param {Number} width Screen width.
- * @return {String} Highest breakpoint that is less than width.
- */
- /*:: type Breakpoints = {lg?: number, md?: number, sm?: number, xs?: number, xxs?: number};*/
- function getBreakpointFromWidth(breakpoints
- /*: Breakpoints*/
- , width
- /*: number*/
- )
- /*: Breakpoint*/
- {
- var sorted = sortBreakpoints(breakpoints);
- var matching = sorted[0];
- for (var i = 1, len = sorted.length; i < len; i++) {
- var breakpointName = sorted[i];
- if (width > breakpoints[breakpointName]) matching = breakpointName;
- }
- return matching;
- }
- /**
- * Given a breakpoint, get the # of cols set for it.
- * @param {String} breakpoint Breakpoint name.
- * @param {Object} cols Map of breakpoints to cols.
- * @return {Number} Number of cols.
- */
- function getColsFromBreakpoint(breakpoint
- /*: Breakpoint*/
- , cols
- /*: Breakpoints*/
- )
- /*: number*/
- {
- if (!cols[breakpoint]) {
- throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint " + breakpoint + " is missing!");
- }
- return cols[breakpoint];
- }
- /**
- * Given existing layouts and a new breakpoint, find or generate a new layout.
- *
- * This finds the layout above the new one and generates from it, if it exists.
- *
- * @param {Array} orgLayout Original layout.
- * @param {Object} layouts Existing layouts.
- * @param {Array} breakpoints All breakpoints.
- * @param {String} breakpoint New breakpoint.
- * @param {String} breakpoint Last breakpoint (for fallback).
- * @param {Number} cols Column count at new breakpoint.
- * @param {Boolean} verticalCompact Whether or not to compact the layout
- * vertically.
- * @return {Array} New layout.
- */
- function findOrGenerateResponsiveLayout(orgLayout
- /*: Layout*/
- , layouts
- /*: ResponsiveLayout*/
- , breakpoints
- /*: Breakpoints*/
- , breakpoint
- /*: Breakpoint*/
- , lastBreakpoint
- /*: Breakpoint*/
- , cols
- /*: number*/
- , verticalCompact
- /*: boolean*/
- )
- /*: Layout*/
- {
- // If it already exists, just return it.
- if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]); // Find or generate the next layout
- var layout = orgLayout;
- var breakpointsSorted = sortBreakpoints(breakpoints);
- var breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
- for (var i = 0, len = breakpointsAbove.length; i < len; i++) {
- var b = breakpointsAbove[i];
- if (layouts[b]) {
- layout = layouts[b];
- break;
- }
- }
- layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
- return compact(correctBounds(layout, {
- cols: cols
- }), verticalCompact);
- }
- function generateResponsiveLayout(layout
- /*: Layout*/
- , breakpoints
- /*: Breakpoints*/
- , breakpoint
- /*: Breakpoint*/
- , lastBreakpoint
- /*: Breakpoint*/
- , cols
- /*: number*/
- , verticalCompact
- /*: boolean*/
- )
- /*: Layout*/
- {
- // If it already exists, just return it.
- /*if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]);
- // Find or generate the next layout
- let layout = layouts[lastBreakpoint];*/
- /*const breakpointsSorted = sortBreakpoints(breakpoints);
- const breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
- for (let i = 0, len = breakpointsAbove.length; i < len; i++) {
- const b = breakpointsAbove[i];
- if (layouts[b]) {
- layout = layouts[b];
- break;
- }
- }*/
- layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
- return compact(correctBounds(layout, {
- cols: cols
- }), verticalCompact);
- }
- /**
- * Given breakpoints, return an array of breakpoints sorted by width. This is usually
- * e.g. ['xxs', 'xs', 'sm', ...]
- *
- * @param {Object} breakpoints Key/value pair of breakpoint names to widths.
- * @return {Array} Sorted breakpoints.
- */
- function sortBreakpoints(breakpoints
- /*: Breakpoints*/
- )
- /*: Array<Breakpoint>*/
- {
- var keys
- /*: Array<string>*/
- = Object.keys(breakpoints);
- return keys.sort(function (a, b) {
- return breakpoints[a] - breakpoints[b];
- });
- }
- // CONCATENATED MODULE: ./src/helpers/DOM.js
- var currentDir
- /*: "ltr" | "rtl" | "auto"*/
- = "auto"; // let currentDir = "auto";
- function hasDocument() {
- return typeof document !== "undefined";
- }
- function hasWindow() {
- return typeof window !== "undefined";
- }
- function getDocumentDir() {
- if (!hasDocument()) {
- return currentDir;
- }
- var direction = typeof document.dir !== "undefined" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir");
- return direction;
- }
- function setDocumentDir(dir
- /*: "ltr" | "rtl" | "auto"*/
- ) {
- // export function setDocumentDir(dir){
- if (!hasDocument) {
- currentDir = dir;
- return;
- }
- var html = document.getElementsByTagName("html")[0];
- html.setAttribute("dir", dir);
- }
- function addWindowEventListener(event
- /*:string*/
- , callback
- /*: () => mixed*/
- ) {
- if (!hasWindow) {
- callback();
- return;
- }
- window.addEventListener(event, callback);
- }
- function removeWindowEventListener(event
- /*:string*/
- , callback
- /*: () => mixed*/
- ) {
- if (!hasWindow) {
- return;
- }
- window.removeEventListener(event, callback);
- }
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/domObjects.js
- const domObjects = {
- init,
- document: null,
- DocumentFragment: null,
- SVGElement: null,
- SVGSVGElement: null,
- SVGElementInstance: null,
- Element: null,
- HTMLElement: null,
- Event: null,
- Touch: null,
- PointerEvent: null
- };
- function blank() {}
- /* harmony default export */ var utils_domObjects = (domObjects);
- function init(window) {
- const win = window;
- domObjects.document = win.document;
- domObjects.DocumentFragment = win.DocumentFragment || blank;
- domObjects.SVGElement = win.SVGElement || blank;
- domObjects.SVGSVGElement = win.SVGSVGElement || blank;
- domObjects.SVGElementInstance = win.SVGElementInstance || blank;
- domObjects.Element = win.Element || blank;
- domObjects.HTMLElement = win.HTMLElement || domObjects.Element;
- domObjects.Event = win.Event;
- domObjects.Touch = win.Touch || blank;
- domObjects.PointerEvent = win.PointerEvent || win.MSPointerEvent;
- }
- //# sourceMappingURL=domObjects.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/isWindow.js
- /* harmony default export */ var isWindow = (thing => !!(thing && thing.Window) && thing instanceof thing.Window);
- //# sourceMappingURL=isWindow.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/window.js
- let realWindow = undefined;
- let win = undefined;
- function window_init(window) {
- // get wrapped window if using Shadow DOM polyfill
- realWindow = window; // create a TextNode
- const el = window.document.createTextNode(''); // check if it's wrapped by a polyfill
- if (el.ownerDocument !== window.document && typeof window.wrap === 'function' && window.wrap(el) === el) {
- // use wrapped window
- window = window.wrap(window);
- }
- win = window;
- }
- if (typeof window !== 'undefined' && !!window) {
- window_init(window);
- }
- function getWindow(node) {
- if (isWindow(node)) {
- return node;
- }
- const rootNode = node.ownerDocument || node;
- return rootNode.defaultView || win.window;
- }
- //# sourceMappingURL=window.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/is.js
- const is_window = thing => thing === win || isWindow(thing);
- const docFrag = thing => object(thing) && thing.nodeType === 11;
- const object = thing => !!thing && typeof thing === 'object';
- const func = thing => typeof thing === 'function';
- const number = thing => typeof thing === 'number';
- const bool = thing => typeof thing === 'boolean';
- const string = thing => typeof thing === 'string';
- const is_element = thing => {
- if (!thing || typeof thing !== 'object') {
- return false;
- } // eslint-disable-next-line import/no-named-as-default-member
- const _window = getWindow(thing) || win;
- return /object|function/.test(typeof _window.Element) ? thing instanceof _window.Element // DOM2
- : thing.nodeType === 1 && typeof thing.nodeName === 'string';
- };
- const plainObject = thing => object(thing) && !!thing.constructor && /function Object\b/.test(thing.constructor.toString());
- const array = thing => object(thing) && typeof thing.length !== 'undefined' && func(thing.splice);
- /* harmony default export */ var is = ({
- window: is_window,
- docFrag,
- object,
- func,
- number,
- bool,
- string,
- element: is_element,
- plainObject,
- array
- });
- //# sourceMappingURL=is.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/browser.js
- const browser = {
- init: browser_init,
- supportsTouch: null,
- supportsPointerEvent: null,
- isIOS7: null,
- isIOS: null,
- isIe9: null,
- isOperaMobile: null,
- prefixedMatchesSelector: null,
- pEventTypes: null,
- wheelEvent: null
- };
- function browser_init(window) {
- const Element = utils_domObjects.Element;
- const navigator = win.navigator; // Does the browser support touch input?
- browser.supportsTouch = 'ontouchstart' in window || is.func(window.DocumentTouch) && utils_domObjects.document instanceof window.DocumentTouch; // Does the browser support PointerEvents
- browser.supportsPointerEvent = navigator.pointerEnabled !== false && !!utils_domObjects.PointerEvent;
- browser.isIOS = /iP(hone|od|ad)/.test(navigator.platform); // scrolling doesn't change the result of getClientRects on iOS 7
- browser.isIOS7 = /iP(hone|od|ad)/.test(navigator.platform) && /OS 7[^\d]/.test(navigator.appVersion);
- browser.isIe9 = /MSIE 9/.test(navigator.userAgent); // Opera Mobile must be handled differently
- browser.isOperaMobile = navigator.appName === 'Opera' && browser.supportsTouch && /Presto/.test(navigator.userAgent); // prefix matchesSelector
- browser.prefixedMatchesSelector = 'matches' in Element.prototype ? 'matches' : 'webkitMatchesSelector' in Element.prototype ? 'webkitMatchesSelector' : 'mozMatchesSelector' in Element.prototype ? 'mozMatchesSelector' : 'oMatchesSelector' in Element.prototype ? 'oMatchesSelector' : 'msMatchesSelector';
- browser.pEventTypes = browser.supportsPointerEvent ? utils_domObjects.PointerEvent === window.MSPointerEvent ? {
- up: 'MSPointerUp',
- down: 'MSPointerDown',
- over: 'mouseover',
- out: 'mouseout',
- move: 'MSPointerMove',
- cancel: 'MSPointerCancel'
- } : {
- up: 'pointerup',
- down: 'pointerdown',
- over: 'pointerover',
- out: 'pointerout',
- move: 'pointermove',
- cancel: 'pointercancel'
- } : null; // because Webkit and Opera still use 'mousewheel' event type
- browser.wheelEvent = 'onmousewheel' in utils_domObjects.document ? 'mousewheel' : 'wheel';
- }
- /* harmony default export */ var utils_browser = (browser);
- //# sourceMappingURL=browser.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/arr.js
- const contains = (array, target) => array.indexOf(target) !== -1;
- const arr_remove = (array, target) => array.splice(array.indexOf(target), 1);
- const merge = (target, source) => {
- for (const item of source) {
- target.push(item);
- }
- return target;
- };
- const from = source => merge([], source);
- const findIndex = (array, func) => {
- for (let i = 0; i < array.length; i++) {
- if (func(array[i], i, array)) {
- return i;
- }
- }
- return -1;
- };
- const find = (array, func) => array[findIndex(array, func)];
- //# sourceMappingURL=arr.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/clone.js
- // tslint:disable-next-line ban-types
- function clone(source) {
- const dest = {};
- for (const prop in source) {
- const value = source[prop];
- if (is.plainObject(value)) {
- dest[prop] = clone(value);
- } else if (is.array(value)) {
- dest[prop] = from(value);
- } else {
- dest[prop] = value;
- }
- }
- return dest;
- }
- //# sourceMappingURL=clone.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/extend.js
- function extend(dest, source) {
- for (const prop in source) {
- dest[prop] = source[prop];
- }
- const ret = dest;
- return ret;
- }
- //# sourceMappingURL=extend.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/raf.js
- let lastTime = 0;
- let request;
- let cancel;
- function raf_init(window) {
- request = window.requestAnimationFrame;
- cancel = window.cancelAnimationFrame;
- if (!request) {
- const vendors = ['ms', 'moz', 'webkit', 'o'];
- for (const vendor of vendors) {
- request = window[`${vendor}RequestAnimationFrame`];
- cancel = window[`${vendor}CancelAnimationFrame`] || window[`${vendor}CancelRequestAnimationFrame`];
- }
- }
- request = request && request.bind(window);
- cancel = cancel && cancel.bind(window);
- if (!request) {
- request = callback => {
- const currTime = Date.now();
- const timeToCall = Math.max(0, 16 - (currTime - lastTime)); // eslint-disable-next-line node/no-callback-literal
- const token = window.setTimeout(() => {
- callback(currTime + timeToCall);
- }, timeToCall);
- lastTime = currTime + timeToCall;
- return token;
- };
- cancel = token => clearTimeout(token);
- }
- }
- /* harmony default export */ var raf = ({
- request: callback => request(callback),
- cancel: token => cancel(token),
- init: raf_init
- });
- //# sourceMappingURL=raf.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/normalizeListeners.js
- function normalize(type, listeners, result) {
- result = result || {};
- if (is.string(type) && type.search(' ') !== -1) {
- type = split(type);
- }
- if (is.array(type)) {
- return type.reduce((acc, t) => extend(acc, normalize(t, listeners, result)), result);
- } // ({ type: fn }) -> ('', { type: fn })
- if (is.object(type)) {
- listeners = type;
- type = '';
- }
- if (is.func(listeners)) {
- result[type] = result[type] || [];
- result[type].push(listeners);
- } else if (is.array(listeners)) {
- for (const l of listeners) {
- normalize(type, l, result);
- }
- } else if (is.object(listeners)) {
- for (const prefix in listeners) {
- const combinedTypes = split(prefix).map(p => `${type}${p}`);
- normalize(combinedTypes, listeners[prefix], result);
- }
- }
- return result;
- }
- function split(type) {
- return type.trim().split(/ +/);
- }
- //# sourceMappingURL=normalizeListeners.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/Eventable.js
- function fireUntilImmediateStopped(event, listeners) {
- for (const listener of listeners) {
- if (event.immediatePropagationStopped) {
- break;
- }
- listener(event);
- }
- }
- class Eventable_Eventable {
- constructor(options) {
- this.options = void 0;
- this.types = {};
- this.propagationStopped = false;
- this.immediatePropagationStopped = false;
- this.global = void 0;
- this.options = extend({}, options || {});
- }
- fire(event) {
- let listeners;
- const global = this.global; // Interactable#on() listeners
- // tslint:disable no-conditional-assignment
- if (listeners = this.types[event.type]) {
- fireUntilImmediateStopped(event, listeners);
- } // interact.on() listeners
- if (!event.propagationStopped && global && (listeners = global[event.type])) {
- fireUntilImmediateStopped(event, listeners);
- }
- }
- on(type, listener) {
- const listeners = normalize(type, listener);
- for (type in listeners) {
- this.types[type] = merge(this.types[type] || [], listeners[type]);
- }
- }
- off(type, listener) {
- const listeners = normalize(type, listener);
- for (type in listeners) {
- const eventList = this.types[type];
- if (!eventList || !eventList.length) {
- continue;
- }
- for (const subListener of listeners[type]) {
- const index = eventList.indexOf(subListener);
- if (index !== -1) {
- eventList.splice(index, 1);
- }
- }
- }
- }
- getRect(_element) {
- return null;
- }
- }
- //# sourceMappingURL=Eventable.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/domUtils.js
- function nodeContains(parent, child) {
- if (parent.contains) {
- return parent.contains(child);
- }
- while (child) {
- if (child === parent) {
- return true;
- }
- child = child.parentNode;
- }
- return false;
- }
- function domUtils_closest(element, selector) {
- while (is.element(element)) {
- if (matchesSelector(element, selector)) {
- return element;
- }
- element = parentNode(element);
- }
- return null;
- }
- function parentNode(node) {
- let parent = node.parentNode;
- if (is.docFrag(parent)) {
- // skip past #shado-root fragments
- // tslint:disable-next-line
- while ((parent = parent.host) && is.docFrag(parent)) {
- continue;
- }
- return parent;
- }
- return parent;
- }
- function matchesSelector(element, selector) {
- // remove /deep/ from selectors if shadowDOM polyfill is used
- if (win !== realWindow) {
- selector = selector.replace(/\/deep\//g, ' ');
- }
- return element[utils_browser.prefixedMatchesSelector](selector);
- }
- const getParent = el => el.parentNode || el.host; // Test for the element that's "above" all other qualifiers
- function indexOfDeepestElement(elements) {
- let deepestNodeParents = [];
- let deepestNodeIndex;
- for (let i = 0; i < elements.length; i++) {
- const currentNode = elements[i];
- const deepestNode = elements[deepestNodeIndex]; // node may appear in elements array multiple times
- if (!currentNode || i === deepestNodeIndex) {
- continue;
- }
- if (!deepestNode) {
- deepestNodeIndex = i;
- continue;
- }
- const currentNodeParent = getParent(currentNode);
- const deepestNodeParent = getParent(deepestNode); // check if the deepest or current are document.documentElement/rootElement
- // - if the current node is, do nothing and continue
- if (currentNodeParent === currentNode.ownerDocument) {
- continue;
- } // - if deepest is, update with the current node and continue to next
- else if (deepestNodeParent === currentNode.ownerDocument) {
- deepestNodeIndex = i;
- continue;
- } // compare zIndex of siblings
- if (currentNodeParent === deepestNodeParent) {
- if (zIndexIsHigherThan(currentNode, deepestNode)) {
- deepestNodeIndex = i;
- }
- continue;
- } // populate the ancestry array for the latest deepest node
- deepestNodeParents = deepestNodeParents.length ? deepestNodeParents : getNodeParents(deepestNode);
- let ancestryStart; // if the deepest node is an HTMLElement and the current node is a non root svg element
- if (deepestNode instanceof utils_domObjects.HTMLElement && currentNode instanceof utils_domObjects.SVGElement && !(currentNode instanceof utils_domObjects.SVGSVGElement)) {
- // TODO: is this check necessary? Was this for HTML elements embedded in SVG?
- if (currentNode === deepestNodeParent) {
- continue;
- }
- ancestryStart = currentNode.ownerSVGElement;
- } else {
- ancestryStart = currentNode;
- }
- const currentNodeParents = getNodeParents(ancestryStart, deepestNode.ownerDocument);
- let commonIndex = 0; // get (position of closest common ancestor) + 1
- while (currentNodeParents[commonIndex] && currentNodeParents[commonIndex] === deepestNodeParents[commonIndex]) {
- commonIndex++;
- }
- const parents = [currentNodeParents[commonIndex - 1], currentNodeParents[commonIndex], deepestNodeParents[commonIndex]];
- let child = parents[0].lastChild;
- while (child) {
- if (child === parents[1]) {
- deepestNodeIndex = i;
- deepestNodeParents = currentNodeParents;
- break;
- } else if (child === parents[2]) {
- break;
- }
- child = child.previousSibling;
- }
- }
- return deepestNodeIndex;
- }
- function getNodeParents(node, limit) {
- const parents = [];
- let parent = node;
- let parentParent;
- while ((parentParent = getParent(parent)) && parent !== limit && parentParent !== parent.ownerDocument) {
- parents.unshift(parent);
- parent = parentParent;
- }
- return parents;
- }
- function zIndexIsHigherThan(higherNode, lowerNode) {
- const higherIndex = parseInt(getWindow(higherNode).getComputedStyle(higherNode).zIndex, 10) || 0;
- const lowerIndex = parseInt(getWindow(lowerNode).getComputedStyle(lowerNode).zIndex, 10) || 0;
- return higherIndex >= lowerIndex;
- }
- function matchesUpTo(element, selector, limit) {
- while (is.element(element)) {
- if (matchesSelector(element, selector)) {
- return true;
- }
- element = parentNode(element);
- if (element === limit) {
- return matchesSelector(element, selector);
- }
- }
- return false;
- }
- function getActualElement(element) {
- return element.correspondingUseElement || element;
- }
- function getScrollXY(relevantWindow) {
- relevantWindow = relevantWindow || win;
- return {
- x: relevantWindow.scrollX || relevantWindow.document.documentElement.scrollLeft,
- y: relevantWindow.scrollY || relevantWindow.document.documentElement.scrollTop
- };
- }
- function getElementClientRect(element) {
- const clientRect = element instanceof utils_domObjects.SVGElement ? element.getBoundingClientRect() : element.getClientRects()[0];
- return clientRect && {
- left: clientRect.left,
- right: clientRect.right,
- top: clientRect.top,
- bottom: clientRect.bottom,
- width: clientRect.width || clientRect.right - clientRect.left,
- height: clientRect.height || clientRect.bottom - clientRect.top
- };
- }
- function getElementRect(element) {
- const clientRect = getElementClientRect(element);
- if (!utils_browser.isIOS7 && clientRect) {
- const scroll = getScrollXY(getWindow(element));
- clientRect.left += scroll.x;
- clientRect.right += scroll.x;
- clientRect.top += scroll.y;
- clientRect.bottom += scroll.y;
- }
- return clientRect;
- }
- function getPath(node) {
- const path = [];
- while (node) {
- path.push(node);
- node = parentNode(node);
- }
- return path;
- }
- function trySelector(value) {
- if (!is.string(value)) {
- return false;
- } // an exception will be raised if it is invalid
- utils_domObjects.document.querySelector(value);
- return true;
- }
- //# sourceMappingURL=domUtils.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/rect.js
- function getStringOptionResult(value, target, element) {
- if (value === 'parent') {
- return parentNode(element);
- }
- if (value === 'self') {
- return target.getRect(element);
- }
- return domUtils_closest(element, value);
- }
- function resolveRectLike(value, target, element, functionArgs) {
- let returnValue = value;
- if (is.string(returnValue)) {
- returnValue = getStringOptionResult(returnValue, target, element);
- } else if (is.func(returnValue)) {
- returnValue = returnValue(...functionArgs);
- }
- if (is.element(returnValue)) {
- returnValue = getElementRect(returnValue);
- }
- return returnValue;
- }
- function rectToXY(rect) {
- return rect && {
- x: 'x' in rect ? rect.x : rect.left,
- y: 'y' in rect ? rect.y : rect.top
- };
- }
- function xywhToTlbr(rect) {
- if (rect && !('left' in rect && 'top' in rect)) {
- rect = extend({}, rect);
- rect.left = rect.x || 0;
- rect.top = rect.y || 0;
- rect.right = rect.right || rect.left + rect.width;
- rect.bottom = rect.bottom || rect.top + rect.height;
- }
- return rect;
- }
- function tlbrToXywh(rect) {
- if (rect && !('x' in rect && 'y' in rect)) {
- rect = extend({}, rect);
- rect.x = rect.left || 0;
- rect.y = rect.top || 0;
- rect.width = rect.width || (rect.right || 0) - rect.x;
- rect.height = rect.height || (rect.bottom || 0) - rect.y;
- }
- return rect;
- }
- function addEdges(edges, rect, delta) {
- if (edges.left) {
- rect.left += delta.x;
- }
- if (edges.right) {
- rect.right += delta.x;
- }
- if (edges.top) {
- rect.top += delta.y;
- }
- if (edges.bottom) {
- rect.bottom += delta.y;
- }
- rect.width = rect.right - rect.left;
- rect.height = rect.bottom - rect.top;
- }
- //# sourceMappingURL=rect.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/getOriginXY.js
- /* harmony default export */ var getOriginXY = (function (target, element, actionName) {
- const actionOptions = target.options[actionName];
- const actionOrigin = actionOptions && actionOptions.origin;
- const origin = actionOrigin || target.options.origin;
- const originRect = resolveRectLike(origin, target, element, [target && element]);
- return rectToXY(originRect) || {
- x: 0,
- y: 0
- };
- });
- //# sourceMappingURL=getOriginXY.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/hypot.js
- /* harmony default export */ var hypot = ((x, y) => Math.sqrt(x * x + y * y));
- //# sourceMappingURL=hypot.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/BaseEvent.js
- class BaseEvent {
- constructor(interaction) {
- this.type = void 0;
- this.target = void 0;
- this.currentTarget = void 0;
- this.interactable = void 0;
- this._interaction = void 0;
- this.timeStamp = void 0;
- this.immediatePropagationStopped = false;
- this.propagationStopped = false;
- this._interaction = interaction;
- }
- preventDefault() {}
- /**
- * Don't call any other listeners (even on the current target)
- */
- stopPropagation() {
- this.propagationStopped = true;
- }
- /**
- * Don't call listeners on the remaining targets
- */
- stopImmediatePropagation() {
- this.immediatePropagationStopped = this.propagationStopped = true;
- }
- } // defined outside of class definition to avoid assignment of undefined during
- // construction
- // getters and setters defined here to support typescript 3.6 and below which
- // don't support getter and setters in .d.ts files
- Object.defineProperty(BaseEvent.prototype, 'interaction', {
- get() {
- return this._interaction._proxy;
- },
- set() {}
- });
- //# sourceMappingURL=BaseEvent.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/defaultOptions.js
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- // export interface Options extends BaseDefaults, PerActionDefaults {}
- const defaultOptions_defaults = {
- base: {
- preventDefault: 'auto',
- deltaSource: 'page'
- },
- perAction: {
- enabled: false,
- origin: {
- x: 0,
- y: 0
- }
- },
- actions: {}
- };
- //# sourceMappingURL=defaultOptions.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/InteractEvent.js
- class InteractEvent_InteractEvent extends BaseEvent {
- // resize
- /** */
- constructor(interaction, event, actionName, phase, element, preEnd, type) {
- super(interaction);
- this.target = void 0;
- this.currentTarget = void 0;
- this.relatedTarget = null;
- this.screenX = void 0;
- this.screenY = void 0;
- this.button = void 0;
- this.buttons = void 0;
- this.ctrlKey = void 0;
- this.shiftKey = void 0;
- this.altKey = void 0;
- this.metaKey = void 0;
- this.page = void 0;
- this.client = void 0;
- this.delta = void 0;
- this.rect = void 0;
- this.x0 = void 0;
- this.y0 = void 0;
- this.t0 = void 0;
- this.dt = void 0;
- this.duration = void 0;
- this.clientX0 = void 0;
- this.clientY0 = void 0;
- this.velocity = void 0;
- this.speed = void 0;
- this.swipe = void 0;
- this.timeStamp = void 0;
- this.axes = void 0;
- this.preEnd = void 0;
- element = element || interaction.element;
- const target = interaction.interactable;
- const deltaSource = (target && target.options || defaultOptions_defaults).deltaSource;
- const origin = getOriginXY(target, element, actionName);
- const starting = phase === 'start';
- const ending = phase === 'end';
- const prevEvent = starting ? this : interaction.prevEvent;
- const coords = starting ? interaction.coords.start : ending ? {
- page: prevEvent.page,
- client: prevEvent.client,
- timeStamp: interaction.coords.cur.timeStamp
- } : interaction.coords.cur;
- this.page = extend({}, coords.page);
- this.client = extend({}, coords.client);
- this.rect = extend({}, interaction.rect);
- this.timeStamp = coords.timeStamp;
- if (!ending) {
- this.page.x -= origin.x;
- this.page.y -= origin.y;
- this.client.x -= origin.x;
- this.client.y -= origin.y;
- }
- this.ctrlKey = event.ctrlKey;
- this.altKey = event.altKey;
- this.shiftKey = event.shiftKey;
- this.metaKey = event.metaKey;
- this.button = event.button;
- this.buttons = event.buttons;
- this.target = element;
- this.currentTarget = element;
- this.preEnd = preEnd;
- this.type = type || actionName + (phase || '');
- this.interactable = target;
- this.t0 = starting ? interaction.pointers[interaction.pointers.length - 1].downTime : prevEvent.t0;
- this.x0 = interaction.coords.start.page.x - origin.x;
- this.y0 = interaction.coords.start.page.y - origin.y;
- this.clientX0 = interaction.coords.start.client.x - origin.x;
- this.clientY0 = interaction.coords.start.client.y - origin.y;
- if (starting || ending) {
- this.delta = {
- x: 0,
- y: 0
- };
- } else {
- this.delta = {
- x: this[deltaSource].x - prevEvent[deltaSource].x,
- y: this[deltaSource].y - prevEvent[deltaSource].y
- };
- }
- this.dt = interaction.coords.delta.timeStamp;
- this.duration = this.timeStamp - this.t0; // velocity and speed in pixels per second
- this.velocity = extend({}, interaction.coords.velocity[deltaSource]);
- this.speed = hypot(this.velocity.x, this.velocity.y);
- this.swipe = ending || phase === 'inertiastart' ? this.getSwipe() : null;
- }
- getSwipe() {
- const interaction = this._interaction;
- if (interaction.prevEvent.speed < 600 || this.timeStamp - interaction.prevEvent.timeStamp > 150) {
- return null;
- }
- let angle = 180 * Math.atan2(interaction.prevEvent.velocityY, interaction.prevEvent.velocityX) / Math.PI;
- const overlap = 22.5;
- if (angle < 0) {
- angle += 360;
- }
- const left = 135 - overlap <= angle && angle < 225 + overlap;
- const up = 225 - overlap <= angle && angle < 315 + overlap;
- const right = !left && (315 - overlap <= angle || angle < 45 + overlap);
- const down = !up && 45 - overlap <= angle && angle < 135 + overlap;
- return {
- up,
- down,
- left,
- right,
- angle,
- speed: interaction.prevEvent.speed,
- velocity: {
- x: interaction.prevEvent.velocityX,
- y: interaction.prevEvent.velocityY
- }
- };
- }
- preventDefault() {}
- /**
- * Don't call listeners on the remaining targets
- */
- stopImmediatePropagation() {
- this.immediatePropagationStopped = this.propagationStopped = true;
- }
- /**
- * Don't call any other listeners (even on the current target)
- */
- stopPropagation() {
- this.propagationStopped = true;
- }
- } // getters and setters defined here to support typescript 3.6 and below which
- // don't support getter and setters in .d.ts files
- Object.defineProperties(InteractEvent_InteractEvent.prototype, {
- pageX: {
- get() {
- return this.page.x;
- },
- set(value) {
- this.page.x = value;
- }
- },
- pageY: {
- get() {
- return this.page.y;
- },
- set(value) {
- this.page.y = value;
- }
- },
- clientX: {
- get() {
- return this.client.x;
- },
- set(value) {
- this.client.x = value;
- }
- },
- clientY: {
- get() {
- return this.client.y;
- },
- set(value) {
- this.client.y = value;
- }
- },
- dx: {
- get() {
- return this.delta.x;
- },
- set(value) {
- this.delta.x = value;
- }
- },
- dy: {
- get() {
- return this.delta.y;
- },
- set(value) {
- this.delta.y = value;
- }
- },
- velocityX: {
- get() {
- return this.velocity.x;
- },
- set(value) {
- this.velocity.x = value;
- }
- },
- velocityY: {
- get() {
- return this.velocity.y;
- },
- set(value) {
- this.velocity.y = value;
- }
- }
- });
- //# sourceMappingURL=InteractEvent.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/isNonNativeEvent.js
- function isNonNativeEvent(type, actions) {
- if (actions.phaselessTypes[type]) {
- return true;
- }
- for (const name in actions.map) {
- if (type.indexOf(name) === 0 && type.substr(name.length) in actions.phases) {
- return true;
- }
- }
- return false;
- }
- //# sourceMappingURL=isNonNativeEvent.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/Interactable.js
- /* eslint-disable no-dupe-class-members */
- /** */
- class Interactable_Interactable {
- /** @internal */
- get _defaults() {
- return {
- base: {},
- perAction: {},
- actions: {}
- };
- }
- /** */
- constructor(target, options, defaultContext, scopeEvents) {
- this.options = void 0;
- this._actions = void 0;
- this.target = void 0;
- this.events = new Eventable_Eventable();
- this._context = void 0;
- this._win = void 0;
- this._doc = void 0;
- this._scopeEvents = void 0;
- this._rectChecker = void 0;
- this._actions = options.actions;
- this.target = target;
- this._context = options.context || defaultContext;
- this._win = getWindow(trySelector(target) ? this._context : target);
- this._doc = this._win.document;
- this._scopeEvents = scopeEvents;
- this.set(options);
- }
- setOnEvents(actionName, phases) {
- if (is.func(phases.onstart)) {
- this.on(`${actionName}start`, phases.onstart);
- }
- if (is.func(phases.onmove)) {
- this.on(`${actionName}move`, phases.onmove);
- }
- if (is.func(phases.onend)) {
- this.on(`${actionName}end`, phases.onend);
- }
- if (is.func(phases.oninertiastart)) {
- this.on(`${actionName}inertiastart`, phases.oninertiastart);
- }
- return this;
- }
- updatePerActionListeners(actionName, prev, cur) {
- if (is.array(prev) || is.object(prev)) {
- this.off(actionName, prev);
- }
- if (is.array(cur) || is.object(cur)) {
- this.on(actionName, cur);
- }
- }
- setPerAction(actionName, options) {
- const defaults = this._defaults; // for all the default per-action options
- for (const optionName_ in options) {
- const optionName = optionName_;
- const actionOptions = this.options[actionName];
- const optionValue = options[optionName]; // remove old event listeners and add new ones
- if (optionName === 'listeners') {
- this.updatePerActionListeners(actionName, actionOptions.listeners, optionValue);
- } // if the option value is an array
- if (is.array(optionValue)) {
- actionOptions[optionName] = from(optionValue);
- } // if the option value is an object
- else if (is.plainObject(optionValue)) {
- // copy the object
- actionOptions[optionName] = extend(actionOptions[optionName] || {}, clone(optionValue)); // set anabled field to true if it exists in the defaults
- if (is.object(defaults.perAction[optionName]) && 'enabled' in defaults.perAction[optionName]) {
- actionOptions[optionName].enabled = optionValue.enabled !== false;
- }
- } // if the option value is a boolean and the default is an object
- else if (is.bool(optionValue) && is.object(defaults.perAction[optionName])) {
- actionOptions[optionName].enabled = optionValue;
- } // if it's anything else, do a plain assignment
- else {
- actionOptions[optionName] = optionValue;
- }
- }
- }
- /**
- * The default function to get an Interactables bounding rect. Can be
- * overridden using {@link Interactable.rectChecker}.
- *
- * @param {Element} [element] The element to measure.
- * @return {Rect} The object's bounding rectangle.
- */
- getRect(element) {
- element = element || (is.element(this.target) ? this.target : null);
- if (is.string(this.target)) {
- element = element || this._context.querySelector(this.target);
- }
- return getElementRect(element);
- }
- /**
- * Returns or sets the function used to calculate the interactable's
- * element's rectangle
- *
- * @param {function} [checker] A function which returns this Interactable's
- * bounding rectangle. See {@link Interactable.getRect}
- * @return {function | object} The checker function or this Interactable
- */
- rectChecker(checker) {
- if (is.func(checker)) {
- this._rectChecker = checker;
- this.getRect = element => {
- const rect = extend({}, this._rectChecker(element));
- if (!('width' in rect)) {
- rect.width = rect.right - rect.left;
- rect.height = rect.bottom - rect.top;
- }
- return rect;
- };
- return this;
- }
- if (checker === null) {
- delete this.getRect;
- delete this._rectChecker;
- return this;
- }
- return this.getRect;
- }
- _backCompatOption(optionName, newValue) {
- if (trySelector(newValue) || is.object(newValue)) {
- this.options[optionName] = newValue;
- for (const action in this._actions.map) {
- this.options[action][optionName] = newValue;
- }
- return this;
- }
- return this.options[optionName];
- }
- /**
- * Gets or sets the origin of the Interactable's element. The x and y
- * of the origin will be subtracted from action event coordinates.
- *
- * @param {Element | object | string} [origin] An HTML or SVG Element whose
- * rect will be used, an object eg. { x: 0, y: 0 } or string 'parent', 'self'
- * or any CSS selector
- *
- * @return {object} The current origin or this Interactable
- */
- origin(newValue) {
- return this._backCompatOption('origin', newValue);
- }
- /**
- * Returns or sets the mouse coordinate types used to calculate the
- * movement of the pointer.
- *
- * @param {string} [newValue] Use 'client' if you will be scrolling while
- * interacting; Use 'page' if you want autoScroll to work
- * @return {string | object} The current deltaSource or this Interactable
- */
- deltaSource(newValue) {
- if (newValue === 'page' || newValue === 'client') {
- this.options.deltaSource = newValue;
- return this;
- }
- return this.options.deltaSource;
- }
- /**
- * Gets the selector context Node of the Interactable. The default is
- * `window.document`.
- *
- * @return {Node} The context Node of this Interactable
- */
- context() {
- return this._context;
- }
- inContext(element) {
- return this._context === element.ownerDocument || nodeContains(this._context, element);
- }
- testIgnoreAllow(options, targetNode, eventTarget) {
- return !this.testIgnore(options.ignoreFrom, targetNode, eventTarget) && this.testAllow(options.allowFrom, targetNode, eventTarget);
- }
- testAllow(allowFrom, targetNode, element) {
- if (!allowFrom) {
- return true;
- }
- if (!is.element(element)) {
- return false;
- }
- if (is.string(allowFrom)) {
- return matchesUpTo(element, allowFrom, targetNode);
- } else if (is.element(allowFrom)) {
- return nodeContains(allowFrom, element);
- }
- return false;
- }
- testIgnore(ignoreFrom, targetNode, element) {
- if (!ignoreFrom || !is.element(element)) {
- return false;
- }
- if (is.string(ignoreFrom)) {
- return matchesUpTo(element, ignoreFrom, targetNode);
- } else if (is.element(ignoreFrom)) {
- return nodeContains(ignoreFrom, element);
- }
- return false;
- }
- /**
- * Calls listeners for the given InteractEvent type bound globally
- * and directly to this Interactable
- *
- * @param {InteractEvent} iEvent The InteractEvent object to be fired on this
- * Interactable
- * @return {Interactable} this Interactable
- */
- fire(iEvent) {
- this.events.fire(iEvent);
- return this;
- }
- _onOff(method, typeArg, listenerArg, options) {
- if (is.object(typeArg) && !is.array(typeArg)) {
- options = listenerArg;
- listenerArg = null;
- }
- const addRemove = method === 'on' ? 'add' : 'remove';
- const listeners = normalize(typeArg, listenerArg);
- for (let type in listeners) {
- if (type === 'wheel') {
- type = utils_browser.wheelEvent;
- }
- for (const listener of listeners[type]) {
- // if it is an action event type
- if (isNonNativeEvent(type, this._actions)) {
- this.events[method](type, listener);
- } // delegated event
- else if (is.string(this.target)) {
- this._scopeEvents[`${addRemove}Delegate`](this.target, this._context, type, listener, options);
- } // remove listener from this Interactable's element
- else {
- this._scopeEvents[addRemove](this.target, type, listener, options);
- }
- }
- }
- return this;
- }
- /**
- * Binds a listener for an InteractEvent, pointerEvent or DOM event.
- *
- * @param {string | array | object} types The types of events to listen
- * for
- * @param {function | array | object} [listener] The event listener function(s)
- * @param {object | boolean} [options] options object or useCapture flag for
- * addEventListener
- * @return {Interactable} This Interactable
- */
- on(types, listener, options) {
- return this._onOff('on', types, listener, options);
- }
- /**
- * Removes an InteractEvent, pointerEvent or DOM event listener.
- *
- * @param {string | array | object} types The types of events that were
- * listened for
- * @param {function | array | object} [listener] The event listener function(s)
- * @param {object | boolean} [options] options object or useCapture flag for
- * removeEventListener
- * @return {Interactable} This Interactable
- */
- off(types, listener, options) {
- return this._onOff('off', types, listener, options);
- }
- /**
- * Reset the options of this Interactable
- *
- * @param {object} options The new settings to apply
- * @return {object} This Interactable
- */
- set(options) {
- const defaults = this._defaults;
- if (!is.object(options)) {
- options = {};
- }
- this.options = clone(defaults.base);
- for (const actionName_ in this._actions.methodDict) {
- const actionName = actionName_;
- const methodName = this._actions.methodDict[actionName];
- this.options[actionName] = {};
- this.setPerAction(actionName, extend(extend({}, defaults.perAction), defaults.actions[actionName]));
- this[methodName](options[actionName]);
- }
- for (const setting in options) {
- if (is.func(this[setting])) {
- this[setting](options[setting]);
- }
- }
- return this;
- }
- /**
- * Remove this interactable from the list of interactables and remove it's
- * action capabilities and event listeners
- */
- unset() {
- if (is.string(this.target)) {
- // remove delegated events
- for (const type in this._scopeEvents.delegatedEvents) {
- const delegated = this._scopeEvents.delegatedEvents[type];
- for (let i = delegated.length - 1; i >= 0; i--) {
- const {
- selector,
- context,
- listeners
- } = delegated[i];
- if (selector === this.target && context === this._context) {
- delegated.splice(i, 1);
- }
- for (let l = listeners.length - 1; l >= 0; l--) {
- this._scopeEvents.removeDelegate(this.target, this._context, type, listeners[l][0], listeners[l][1]);
- }
- }
- }
- } else {
- this._scopeEvents.remove(this.target, 'all');
- }
- }
- }
- //# sourceMappingURL=Interactable.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/InteractableSet.js
- class InteractableSet_InteractableSet {
- // all set interactables
- constructor(scope) {
- this.list = [];
- this.selectorMap = {};
- this.scope = void 0;
- this.scope = scope;
- scope.addListeners({
- 'interactable:unset': ({
- interactable
- }) => {
- const {
- target,
- _context: context
- } = interactable;
- const targetMappings = is.string(target) ? this.selectorMap[target] : target[this.scope.id];
- const targetIndex = findIndex(targetMappings, m => m.context === context);
- if (targetMappings[targetIndex]) {
- // Destroying mappingInfo's context and interactable
- targetMappings[targetIndex].context = null;
- targetMappings[targetIndex].interactable = null;
- }
- targetMappings.splice(targetIndex, 1);
- }
- });
- }
- new(target, options) {
- options = extend(options || {}, {
- actions: this.scope.actions
- });
- const interactable = new this.scope.Interactable(target, options, this.scope.document, this.scope.events);
- const mappingInfo = {
- context: interactable._context,
- interactable
- };
- this.scope.addDocument(interactable._doc);
- this.list.push(interactable);
- if (is.string(target)) {
- if (!this.selectorMap[target]) {
- this.selectorMap[target] = [];
- }
- this.selectorMap[target].push(mappingInfo);
- } else {
- if (!interactable.target[this.scope.id]) {
- Object.defineProperty(target, this.scope.id, {
- value: [],
- configurable: true
- });
- }
- target[this.scope.id].push(mappingInfo);
- }
- this.scope.fire('interactable:new', {
- target,
- options,
- interactable,
- win: this.scope._win
- });
- return interactable;
- }
- get(target, options) {
- const context = options && options.context || this.scope.document;
- const isSelector = is.string(target);
- const targetMappings = isSelector ? this.selectorMap[target] : target[this.scope.id];
- if (!targetMappings) {
- return null;
- }
- const found = find(targetMappings, m => m.context === context && (isSelector || m.interactable.inContext(target)));
- return found && found.interactable;
- }
- forEachMatch(node, callback) {
- for (const interactable of this.list) {
- let ret;
- if ((is.string(interactable.target) // target is a selector and the element matches
- ? is.element(node) && matchesSelector(node, interactable.target) : // target is the element
- node === interactable.target) && // the element is in context
- interactable.inContext(node)) {
- ret = callback(interactable);
- }
- if (ret !== undefined) {
- return ret;
- }
- }
- }
- }
- //# sourceMappingURL=InteractableSet.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/pointerExtend.js
- function pointerExtend(dest, source) {
- for (const prop in source) {
- const prefixedPropREs = pointerExtend.prefixedPropREs;
- let deprecated = false; // skip deprecated prefixed properties
- for (const vendor in prefixedPropREs) {
- if (prop.indexOf(vendor) === 0 && prefixedPropREs[vendor].test(prop)) {
- deprecated = true;
- break;
- }
- }
- if (!deprecated && typeof source[prop] !== 'function') {
- dest[prop] = source[prop];
- }
- }
- return dest;
- }
- pointerExtend.prefixedPropREs = {
- webkit: /(Movement[XY]|Radius[XY]|RotationAngle|Force)$/,
- moz: /(Pressure)$/
- };
- /* harmony default export */ var utils_pointerExtend = (pointerExtend);
- //# sourceMappingURL=pointerExtend.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/pointerUtils.js
- function copyCoords(dest, src) {
- dest.page = dest.page || {};
- dest.page.x = src.page.x;
- dest.page.y = src.page.y;
- dest.client = dest.client || {};
- dest.client.x = src.client.x;
- dest.client.y = src.client.y;
- dest.timeStamp = src.timeStamp;
- }
- function setCoordDeltas(targetObj, prev, cur) {
- targetObj.page.x = cur.page.x - prev.page.x;
- targetObj.page.y = cur.page.y - prev.page.y;
- targetObj.client.x = cur.client.x - prev.client.x;
- targetObj.client.y = cur.client.y - prev.client.y;
- targetObj.timeStamp = cur.timeStamp - prev.timeStamp;
- }
- function setCoordVelocity(targetObj, delta) {
- const dt = Math.max(delta.timeStamp / 1000, 0.001);
- targetObj.page.x = delta.page.x / dt;
- targetObj.page.y = delta.page.y / dt;
- targetObj.client.x = delta.client.x / dt;
- targetObj.client.y = delta.client.y / dt;
- targetObj.timeStamp = dt;
- }
- function setZeroCoords(targetObj) {
- targetObj.page.x = 0;
- targetObj.page.y = 0;
- targetObj.client.x = 0;
- targetObj.client.y = 0;
- }
- function isNativePointer(pointer) {
- return pointer instanceof utils_domObjects.Event || pointer instanceof utils_domObjects.Touch;
- } // Get specified X/Y coords for mouse or event.touches[0]
- function getXY(type, pointer, xy) {
- xy = xy || {};
- type = type || 'page';
- xy.x = pointer[type + 'X'];
- xy.y = pointer[type + 'Y'];
- return xy;
- }
- function getPageXY(pointer, page) {
- page = page || {
- x: 0,
- y: 0
- }; // Opera Mobile handles the viewport and scrolling oddly
- if (utils_browser.isOperaMobile && isNativePointer(pointer)) {
- getXY('screen', pointer, page);
- page.x += window.scrollX;
- page.y += window.scrollY;
- } else {
- getXY('page', pointer, page);
- }
- return page;
- }
- function getClientXY(pointer, client) {
- client = client || {};
- if (utils_browser.isOperaMobile && isNativePointer(pointer)) {
- // Opera Mobile handles the viewport and scrolling oddly
- getXY('screen', pointer, client);
- } else {
- getXY('client', pointer, client);
- }
- return client;
- }
- function getPointerId(pointer) {
- return is.number(pointer.pointerId) ? pointer.pointerId : pointer.identifier;
- }
- function setCoords(dest, pointers, timeStamp) {
- const pointer = pointers.length > 1 ? pointerAverage(pointers) : pointers[0];
- getPageXY(pointer, dest.page);
- getClientXY(pointer, dest.client);
- dest.timeStamp = timeStamp;
- }
- function getTouchPair(event) {
- const touches = []; // array of touches is supplied
- if (is.array(event)) {
- touches[0] = event[0];
- touches[1] = event[1];
- } // an event
- else {
- if (event.type === 'touchend') {
- if (event.touches.length === 1) {
- touches[0] = event.touches[0];
- touches[1] = event.changedTouches[0];
- } else if (event.touches.length === 0) {
- touches[0] = event.changedTouches[0];
- touches[1] = event.changedTouches[1];
- }
- } else {
- touches[0] = event.touches[0];
- touches[1] = event.touches[1];
- }
- }
- return touches;
- }
- function pointerAverage(pointers) {
- const average = {
- pageX: 0,
- pageY: 0,
- clientX: 0,
- clientY: 0,
- screenX: 0,
- screenY: 0
- };
- for (const pointer of pointers) {
- for (const prop in average) {
- average[prop] += pointer[prop];
- }
- }
- for (const prop in average) {
- average[prop] /= pointers.length;
- }
- return average;
- }
- function touchBBox(event) {
- if (!event.length) {
- return null;
- }
- const touches = getTouchPair(event);
- const minX = Math.min(touches[0].pageX, touches[1].pageX);
- const minY = Math.min(touches[0].pageY, touches[1].pageY);
- const maxX = Math.max(touches[0].pageX, touches[1].pageX);
- const maxY = Math.max(touches[0].pageY, touches[1].pageY);
- return {
- x: minX,
- y: minY,
- left: minX,
- top: minY,
- right: maxX,
- bottom: maxY,
- width: maxX - minX,
- height: maxY - minY
- };
- }
- function touchDistance(event, deltaSource) {
- const sourceX = deltaSource + 'X';
- const sourceY = deltaSource + 'Y';
- const touches = getTouchPair(event);
- const dx = touches[0][sourceX] - touches[1][sourceX];
- const dy = touches[0][sourceY] - touches[1][sourceY];
- return hypot(dx, dy);
- }
- function touchAngle(event, deltaSource) {
- const sourceX = deltaSource + 'X';
- const sourceY = deltaSource + 'Y';
- const touches = getTouchPair(event);
- const dx = touches[1][sourceX] - touches[0][sourceX];
- const dy = touches[1][sourceY] - touches[0][sourceY];
- const angle = 180 * Math.atan2(dy, dx) / Math.PI;
- return angle;
- }
- function getPointerType(pointer) {
- 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
- // be either a MouseEvent, TouchEvent, or Touch object
- : /touch/.test(pointer.type) || pointer instanceof utils_domObjects.Touch ? 'touch' : 'mouse';
- } // [ event.target, event.currentTarget ]
- function getEventTargets(event) {
- const path = is.func(event.composedPath) ? event.composedPath() : event.path;
- return [getActualElement(path ? path[0] : event.target), getActualElement(event.currentTarget)];
- }
- function newCoords() {
- return {
- page: {
- x: 0,
- y: 0
- },
- client: {
- x: 0,
- y: 0
- },
- timeStamp: 0
- };
- }
- function coordsToEvent(coords) {
- const event = {
- coords,
- get page() {
- return this.coords.page;
- },
- get client() {
- return this.coords.client;
- },
- get timeStamp() {
- return this.coords.timeStamp;
- },
- get pageX() {
- return this.coords.page.x;
- },
- get pageY() {
- return this.coords.page.y;
- },
- get clientX() {
- return this.coords.client.x;
- },
- get clientY() {
- return this.coords.client.y;
- },
- get pointerId() {
- return this.coords.pointerId;
- },
- get target() {
- return this.coords.target;
- },
- get type() {
- return this.coords.type;
- },
- get pointerType() {
- return this.coords.pointerType;
- },
- get buttons() {
- return this.coords.buttons;
- },
- preventDefault() {}
- };
- return event;
- }
- //# sourceMappingURL=pointerUtils.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/events.js
- function events_install(scope) {
- const targets = [];
- const delegatedEvents = {};
- const documents = [];
- const eventsMethods = {
- add,
- remove,
- addDelegate,
- removeDelegate,
- delegateListener,
- delegateUseCapture,
- delegatedEvents,
- documents,
- targets,
- supportsOptions: false,
- supportsPassive: false
- }; // check if browser supports passive events and options arg
- scope.document.createElement('div').addEventListener('test', null, {
- get capture() {
- return eventsMethods.supportsOptions = true;
- },
- get passive() {
- return eventsMethods.supportsPassive = true;
- }
- });
- scope.events = eventsMethods;
- function add(eventTarget, type, listener, optionalArg) {
- const options = getOptions(optionalArg);
- let target = find(targets, t => t.eventTarget === eventTarget);
- if (!target) {
- target = {
- eventTarget,
- events: {}
- };
- targets.push(target);
- }
- if (!target.events[type]) {
- target.events[type] = [];
- }
- if (eventTarget.addEventListener && !contains(target.events[type], listener)) {
- eventTarget.addEventListener(type, listener, eventsMethods.supportsOptions ? options : options.capture);
- target.events[type].push(listener);
- }
- }
- function remove(eventTarget, type, listener, optionalArg) {
- const options = getOptions(optionalArg);
- const targetIndex = findIndex(targets, t => t.eventTarget === eventTarget);
- const target = targets[targetIndex];
- if (!target || !target.events) {
- return;
- }
- if (type === 'all') {
- for (type in target.events) {
- if (target.events.hasOwnProperty(type)) {
- remove(eventTarget, type, 'all');
- }
- }
- return;
- }
- let typeIsEmpty = false;
- const typeListeners = target.events[type];
- if (typeListeners) {
- if (listener === 'all') {
- for (let i = typeListeners.length - 1; i >= 0; i--) {
- remove(eventTarget, type, typeListeners[i], options);
- }
- return;
- } else {
- for (let i = 0; i < typeListeners.length; i++) {
- if (typeListeners[i] === listener) {
- eventTarget.removeEventListener(type, listener, eventsMethods.supportsOptions ? options : options.capture);
- typeListeners.splice(i, 1);
- if (typeListeners.length === 0) {
- delete target.events[type];
- typeIsEmpty = true;
- }
- break;
- }
- }
- }
- }
- if (typeIsEmpty && !Object.keys(target.events).length) {
- targets.splice(targetIndex, 1);
- }
- }
- function addDelegate(selector, context, type, listener, optionalArg) {
- const options = getOptions(optionalArg);
- if (!delegatedEvents[type]) {
- delegatedEvents[type] = []; // add delegate listener functions
- for (const doc of documents) {
- add(doc, type, delegateListener);
- add(doc, type, delegateUseCapture, true);
- }
- }
- const delegates = delegatedEvents[type];
- let delegate = find(delegates, d => d.selector === selector && d.context === context);
- if (!delegate) {
- delegate = {
- selector,
- context,
- listeners: []
- };
- delegates.push(delegate);
- }
- delegate.listeners.push([listener, options]);
- }
- function removeDelegate(selector, context, type, listener, optionalArg) {
- const options = getOptions(optionalArg);
- const delegates = delegatedEvents[type];
- let matchFound = false;
- let index;
- if (!delegates) {
- return;
- } // count from last index of delegated to 0
- for (index = delegates.length - 1; index >= 0; index--) {
- const cur = delegates[index]; // look for matching selector and context Node
- if (cur.selector === selector && cur.context === context) {
- const {
- listeners
- } = cur; // each item of the listeners array is an array: [function, capture, passive]
- for (let i = listeners.length - 1; i >= 0; i--) {
- const [fn, {
- capture,
- passive
- }] = listeners[i]; // check if the listener functions and capture and passive flags match
- if (fn === listener && capture === options.capture && passive === options.passive) {
- // remove the listener from the array of listeners
- listeners.splice(i, 1); // if all listeners for this target have been removed
- // remove the target from the delegates array
- if (!listeners.length) {
- delegates.splice(index, 1); // remove delegate function from context
- remove(context, type, delegateListener);
- remove(context, type, delegateUseCapture, true);
- } // only remove one listener
- matchFound = true;
- break;
- }
- }
- if (matchFound) {
- break;
- }
- }
- }
- } // bound to the interactable context when a DOM event
- // listener is added to a selector interactable
- function delegateListener(event, optionalArg) {
- const options = getOptions(optionalArg);
- const fakeEvent = new events_FakeEvent(event);
- const delegates = delegatedEvents[event.type];
- const [eventTarget] = getEventTargets(event);
- let element = eventTarget; // climb up document tree looking for selector matches
- while (is.element(element)) {
- for (let i = 0; i < delegates.length; i++) {
- const cur = delegates[i];
- const {
- selector,
- context
- } = cur;
- if (matchesSelector(element, selector) && nodeContains(context, eventTarget) && nodeContains(context, element)) {
- const {
- listeners
- } = cur;
- fakeEvent.currentTarget = element;
- for (const [fn, {
- capture,
- passive
- }] of listeners) {
- if (capture === options.capture && passive === options.passive) {
- fn(fakeEvent);
- }
- }
- }
- }
- element = parentNode(element);
- }
- }
- function delegateUseCapture(event) {
- return delegateListener.call(this, event, true);
- } // for type inferrence
- return eventsMethods;
- }
- class events_FakeEvent {
- constructor(originalEvent) {
- this.currentTarget = void 0;
- this.originalEvent = void 0;
- this.type = void 0;
- this.originalEvent = originalEvent; // duplicate the event so that currentTarget can be changed
- utils_pointerExtend(this, originalEvent);
- }
- preventOriginalDefault() {
- this.originalEvent.preventDefault();
- }
- stopPropagation() {
- this.originalEvent.stopPropagation();
- }
- stopImmediatePropagation() {
- this.originalEvent.stopImmediatePropagation();
- }
- }
- function getOptions(param) {
- if (!is.object(param)) {
- return {
- capture: !!param,
- passive: false
- };
- }
- const options = extend({}, param);
- options.capture = !!param.capture;
- options.passive = !!param.passive;
- return options;
- }
- /* harmony default export */ var events = ({
- id: 'events',
- install: events_install
- });
- //# sourceMappingURL=events.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/utils/misc.js
- function warnOnce(method, message) {
- let warned = false;
- return function () {
- if (!warned) {
- win.console.warn(message);
- warned = true;
- }
- return method.apply(this, arguments);
- };
- }
- function copyAction(dest, src) {
- dest.name = src.name;
- dest.axis = src.axis;
- dest.edges = src.edges;
- return dest;
- }
- //# sourceMappingURL=misc.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactStatic.js
- /** @module interact */
- function createInteractStatic(scope) {
- /**
- * ```js
- * interact('#draggable').draggable(true)
- *
- * var rectables = interact('rect')
- * rectables
- * .gesturable(true)
- * .on('gesturemove', function (event) {
- * // ...
- * })
- * ```
- *
- * The methods of this variable can be used to set elements as interactables
- * and also to change various default settings.
- *
- * Calling it as a function and passing an element or a valid CSS selector
- * string returns an Interactable object which has various methods to configure
- * it.
- *
- * @global
- *
- * @param {Element | string} target The HTML or SVG Element to interact with
- * or CSS selector
- * @return {Interactable}
- */
- const interact = (target, options) => {
- let interactable = scope.interactables.get(target, options);
- if (!interactable) {
- interactable = scope.interactables.new(target, options);
- interactable.events.global = interact.globalEvents;
- }
- return interactable;
- }; // expose the functions used to calculate multi-touch properties
- interact.getPointerAverage = pointerAverage;
- interact.getTouchBBox = touchBBox;
- interact.getTouchDistance = touchDistance;
- interact.getTouchAngle = touchAngle;
- interact.getElementRect = getElementRect;
- interact.getElementClientRect = getElementClientRect;
- interact.matchesSelector = matchesSelector;
- interact.closest = domUtils_closest;
- interact.globalEvents = {}; // eslint-disable-next-line no-undef
- interact.version = "1.10.2";
- interact.scope = scope;
- /**
- * Use a plugin
- *
- * @alias module:interact.use
- *
- */
- interact.use = function (plugin, options) {
- this.scope.usePlugin(plugin, options);
- return this;
- };
- /**
- * Check if an element or selector has been set with the {@link interact}
- * function
- *
- * @alias module:interact.isSet
- *
- * @param {Target} target The Element or string being searched for
- * @param {object} options
- * @return {boolean} Indicates if the element or CSS selector was previously
- * passed to interact
- */
- interact.isSet = function (target, options) {
- return !!this.scope.interactables.get(target, options && options.context);
- };
- /**
- * @deprecated
- * Add a global listener for an InteractEvent or adds a DOM event to `document`
- *
- * @alias module:interact.on
- *
- * @param {string | array | object} type The types of events to listen for
- * @param {function} listener The function event (s)
- * @param {object | boolean} [options] object or useCapture flag for
- * addEventListener
- * @return {object} interact
- */
- interact.on = warnOnce(function on(type, listener, options) {
- if (is.string(type) && type.search(' ') !== -1) {
- type = type.trim().split(/ +/);
- }
- if (is.array(type)) {
- for (const eventType of type) {
- this.on(eventType, listener, options);
- }
- return this;
- }
- if (is.object(type)) {
- for (const prop in type) {
- this.on(prop, type[prop], listener);
- }
- return this;
- } // if it is an InteractEvent type, add listener to globalEvents
- if (isNonNativeEvent(type, this.scope.actions)) {
- // if this type of event was never bound
- if (!this.globalEvents[type]) {
- this.globalEvents[type] = [listener];
- } else {
- this.globalEvents[type].push(listener);
- }
- } // If non InteractEvent type, addEventListener to document
- else {
- this.scope.events.add(this.scope.document, type, listener, {
- options
- });
- }
- return this;
- }, 'The interact.on() method is being deprecated');
- /**
- * @deprecated
- * Removes a global InteractEvent listener or DOM event from `document`
- *
- * @alias module:interact.off
- *
- * @param {string | array | object} type The types of events that were listened
- * for
- * @param {function} listener The listener function to be removed
- * @param {object | boolean} options [options] object or useCapture flag for
- * removeEventListener
- * @return {object} interact
- */
- interact.off = warnOnce(function off(type, listener, options) {
- if (is.string(type) && type.search(' ') !== -1) {
- type = type.trim().split(/ +/);
- }
- if (is.array(type)) {
- for (const eventType of type) {
- this.off(eventType, listener, options);
- }
- return this;
- }
- if (is.object(type)) {
- for (const prop in type) {
- this.off(prop, type[prop], listener);
- }
- return this;
- }
- if (isNonNativeEvent(type, this.scope.actions)) {
- let index;
- if (type in this.globalEvents && (index = this.globalEvents[type].indexOf(listener)) !== -1) {
- this.globalEvents[type].splice(index, 1);
- }
- } else {
- this.scope.events.remove(this.scope.document, type, listener, options);
- }
- return this;
- }, 'The interact.off() method is being deprecated');
- interact.debug = function () {
- return this.scope;
- };
- /**
- * @alias module:interact.supportsTouch
- *
- * @return {boolean} Whether or not the browser supports touch input
- */
- interact.supportsTouch = function () {
- return utils_browser.supportsTouch;
- };
- /**
- * @alias module:interact.supportsPointerEvent
- *
- * @return {boolean} Whether or not the browser supports PointerEvents
- */
- interact.supportsPointerEvent = function () {
- return utils_browser.supportsPointerEvent;
- };
- /**
- * Cancels all interactions (end events are not fired)
- *
- * @alias module:interact.stop
- *
- * @return {object} interact
- */
- interact.stop = function () {
- for (const interaction of this.scope.interactions.list) {
- interaction.stop();
- }
- return this;
- };
- /**
- * Returns or sets the distance the pointer must be moved before an action
- * sequence occurs. This also affects tolerance for tap events.
- *
- * @alias module:interact.pointerMoveTolerance
- *
- * @param {number} [newValue] The movement from the start position must be greater than this value
- * @return {interact | number}
- */
- interact.pointerMoveTolerance = function (newValue) {
- if (is.number(newValue)) {
- this.scope.interactions.pointerMoveTolerance = newValue;
- return this;
- }
- return this.scope.interactions.pointerMoveTolerance;
- };
- interact.addDocument = function (doc, options) {
- this.scope.addDocument(doc, options);
- };
- interact.removeDocument = function (doc) {
- this.scope.removeDocument(doc);
- };
- return interact;
- }
- //# sourceMappingURL=interactStatic.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/PointerInfo.js
- class PointerInfo {
- constructor(id, pointer, event, downTime, downTarget) {
- this.id = void 0;
- this.pointer = void 0;
- this.event = void 0;
- this.downTime = void 0;
- this.downTarget = void 0;
- this.id = id;
- this.pointer = pointer;
- this.event = event;
- this.downTime = downTime;
- this.downTarget = downTarget;
- }
- }
- //# sourceMappingURL=PointerInfo.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/Interaction.js
- let _ProxyValues;
- (function (_ProxyValues) {
- _ProxyValues["interactable"] = "";
- _ProxyValues["element"] = "";
- _ProxyValues["prepared"] = "";
- _ProxyValues["pointerIsDown"] = "";
- _ProxyValues["pointerWasMoved"] = "";
- _ProxyValues["_proxy"] = "";
- })(_ProxyValues || (_ProxyValues = {}));
- let _ProxyMethods;
- (function (_ProxyMethods) {
- _ProxyMethods["start"] = "";
- _ProxyMethods["move"] = "";
- _ProxyMethods["end"] = "";
- _ProxyMethods["stop"] = "";
- _ProxyMethods["interacting"] = "";
- })(_ProxyMethods || (_ProxyMethods = {}));
- let idCounter = 0;
- class Interaction_Interaction {
- // current interactable being interacted with
- // the target element of the interactable
- // action that's ready to be fired on next move event
- // keep track of added pointers
- // pointerdown/mousedown/touchstart event
- // previous action event
- /** @internal */
- get pointerMoveTolerance() {
- return 1;
- }
- /**
- * @alias Interaction.prototype.move
- */
- /** */
- constructor({
- pointerType,
- scopeFire
- }) {
- this.interactable = null;
- this.element = null;
- this.rect = void 0;
- this._rects = void 0;
- this.edges = void 0;
- this._scopeFire = void 0;
- this.prepared = {
- name: null,
- axis: null,
- edges: null
- };
- this.pointerType = void 0;
- this.pointers = [];
- this.downEvent = null;
- this.downPointer = {};
- this._latestPointer = {
- pointer: null,
- event: null,
- eventTarget: null
- };
- this.prevEvent = null;
- this.pointerIsDown = false;
- this.pointerWasMoved = false;
- this._interacting = false;
- this._ending = false;
- this._stopped = true;
- this._proxy = null;
- this.simulation = null;
- this.doMove = warnOnce(function (signalArg) {
- this.move(signalArg);
- }, 'The interaction.doMove() method has been renamed to interaction.move()');
- this.coords = {
- // Starting InteractEvent pointer coordinates
- start: newCoords(),
- // Previous native pointer move event coordinates
- prev: newCoords(),
- // current native pointer move event coordinates
- cur: newCoords(),
- // Change in coordinates and time of the pointer
- delta: newCoords(),
- // pointer velocity
- velocity: newCoords()
- };
- this._id = idCounter++;
- this._scopeFire = scopeFire;
- this.pointerType = pointerType;
- const that = this;
- this._proxy = {};
- for (const key in _ProxyValues) {
- Object.defineProperty(this._proxy, key, {
- get() {
- return that[key];
- }
- });
- }
- for (const key in _ProxyMethods) {
- Object.defineProperty(this._proxy, key, {
- value: (...args) => that[key](...args)
- });
- }
- this._scopeFire('interactions:new', {
- interaction: this
- });
- }
- pointerDown(pointer, event, eventTarget) {
- const pointerIndex = this.updatePointer(pointer, event, eventTarget, true);
- const pointerInfo = this.pointers[pointerIndex];
- this._scopeFire('interactions:down', {
- pointer,
- event,
- eventTarget,
- pointerIndex,
- pointerInfo,
- type: 'down',
- interaction: this
- });
- }
- /**
- * ```js
- * interact(target)
- * .draggable({
- * // disable the default drag start by down->move
- * manualStart: true
- * })
- * // start dragging after the user holds the pointer down
- * .on('hold', function (event) {
- * var interaction = event.interaction
- *
- * if (!interaction.interacting()) {
- * interaction.start({ name: 'drag' },
- * event.interactable,
- * event.currentTarget)
- * }
- * })
- * ```
- *
- * Start an action with the given Interactable and Element as tartgets. The
- * action must be enabled for the target Interactable and an appropriate
- * number of pointers must be held down - 1 for drag/resize, 2 for gesture.
- *
- * Use it with `interactable.<action>able({ manualStart: false })` to always
- * [start actions manually](https://github.com/taye/interact.js/issues/114)
- *
- * @param {object} action The action to be performed - drag, resize, etc.
- * @param {Interactable} target The Interactable to target
- * @param {Element} element The DOM Element to target
- * @return {Boolean} Whether the interaction was successfully started
- */
- start(action, interactable, element) {
- if (this.interacting() || !this.pointerIsDown || this.pointers.length < (action.name === 'gesture' ? 2 : 1) || !interactable.options[action.name].enabled) {
- return false;
- }
- copyAction(this.prepared, action);
- this.interactable = interactable;
- this.element = element;
- this.rect = interactable.getRect(element);
- this.edges = this.prepared.edges ? extend({}, this.prepared.edges) : {
- left: true,
- right: true,
- top: true,
- bottom: true
- };
- this._stopped = false;
- this._interacting = this._doPhase({
- interaction: this,
- event: this.downEvent,
- phase: 'start'
- }) && !this._stopped;
- return this._interacting;
- }
- pointerMove(pointer, event, eventTarget) {
- if (!this.simulation && !(this.modification && this.modification.endResult)) {
- this.updatePointer(pointer, event, eventTarget, false);
- }
- 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;
- let dx;
- let dy; // register movement greater than pointerMoveTolerance
- if (this.pointerIsDown && !this.pointerWasMoved) {
- dx = this.coords.cur.client.x - this.coords.start.client.x;
- dy = this.coords.cur.client.y - this.coords.start.client.y;
- this.pointerWasMoved = hypot(dx, dy) > this.pointerMoveTolerance;
- }
- const pointerIndex = this.getPointerIndex(pointer);
- const signalArg = {
- pointer,
- pointerIndex,
- pointerInfo: this.pointers[pointerIndex],
- event,
- type: 'move',
- eventTarget,
- dx,
- dy,
- duplicate: duplicateMove,
- interaction: this
- };
- if (!duplicateMove) {
- // set pointer coordinate, time changes and velocity
- setCoordVelocity(this.coords.velocity, this.coords.delta);
- }
- this._scopeFire('interactions:move', signalArg);
- if (!duplicateMove && !this.simulation) {
- // if interacting, fire an 'action-move' signal etc
- if (this.interacting()) {
- signalArg.type = null;
- this.move(signalArg);
- }
- if (this.pointerWasMoved) {
- copyCoords(this.coords.prev, this.coords.cur);
- }
- }
- }
- /**
- * ```js
- * interact(target)
- * .draggable(true)
- * .on('dragmove', function (event) {
- * if (someCondition) {
- * // change the snap settings
- * event.interactable.draggable({ snap: { targets: [] }})
- * // fire another move event with re-calculated snap
- * event.interaction.move()
- * }
- * })
- * ```
- *
- * Force a move of the current action at the same coordinates. Useful if
- * snap/restrict has been changed and you want a movement with the new
- * settings.
- */
- move(signalArg) {
- if (!signalArg || !signalArg.event) {
- setZeroCoords(this.coords.delta);
- }
- signalArg = extend({
- pointer: this._latestPointer.pointer,
- event: this._latestPointer.event,
- eventTarget: this._latestPointer.eventTarget,
- interaction: this
- }, signalArg || {});
- signalArg.phase = 'move';
- this._doPhase(signalArg);
- } // End interact move events and stop auto-scroll unless simulation is running
- pointerUp(pointer, event, eventTarget, curEventTarget) {
- let pointerIndex = this.getPointerIndex(pointer);
- if (pointerIndex === -1) {
- pointerIndex = this.updatePointer(pointer, event, eventTarget, false);
- }
- const type = /cancel$/i.test(event.type) ? 'cancel' : 'up';
- this._scopeFire(`interactions:${type}`, {
- pointer,
- pointerIndex,
- pointerInfo: this.pointers[pointerIndex],
- event,
- eventTarget,
- type: type,
- curEventTarget,
- interaction: this
- });
- if (!this.simulation) {
- this.end(event);
- }
- this.removePointer(pointer, event);
- }
- documentBlur(event) {
- this.end(event);
- this._scopeFire('interactions:blur', {
- event,
- type: 'blur',
- interaction: this
- });
- }
- /**
- * ```js
- * interact(target)
- * .draggable(true)
- * .on('move', function (event) {
- * if (event.pageX > 1000) {
- * // end the current action
- * event.interaction.end()
- * // stop all further listeners from being called
- * event.stopImmediatePropagation()
- * }
- * })
- * ```
- *
- * @param {PointerEvent} [event]
- */
- end(event) {
- this._ending = true;
- event = event || this._latestPointer.event;
- let endPhaseResult;
- if (this.interacting()) {
- endPhaseResult = this._doPhase({
- event,
- interaction: this,
- phase: 'end'
- });
- }
- this._ending = false;
- if (endPhaseResult === true) {
- this.stop();
- }
- }
- currentAction() {
- return this._interacting ? this.prepared.name : null;
- }
- interacting() {
- return this._interacting;
- }
- /** */
- stop() {
- this._scopeFire('interactions:stop', {
- interaction: this
- });
- this.interactable = this.element = null;
- this._interacting = false;
- this._stopped = true;
- this.prepared.name = this.prevEvent = null;
- }
- getPointerIndex(pointer) {
- const pointerId = getPointerId(pointer); // mouse and pen interactions may have only one pointer
- return this.pointerType === 'mouse' || this.pointerType === 'pen' ? this.pointers.length - 1 : findIndex(this.pointers, curPointer => curPointer.id === pointerId);
- }
- getPointerInfo(pointer) {
- return this.pointers[this.getPointerIndex(pointer)];
- }
- updatePointer(pointer, event, eventTarget, down) {
- const id = getPointerId(pointer);
- let pointerIndex = this.getPointerIndex(pointer);
- let pointerInfo = this.pointers[pointerIndex];
- down = down === false ? false : down || /(down|start)$/i.test(event.type);
- if (!pointerInfo) {
- pointerInfo = new PointerInfo(id, pointer, event, null, null);
- pointerIndex = this.pointers.length;
- this.pointers.push(pointerInfo);
- } else {
- pointerInfo.pointer = pointer;
- }
- setCoords(this.coords.cur, this.pointers.map(p => p.pointer), this._now());
- setCoordDeltas(this.coords.delta, this.coords.prev, this.coords.cur);
- if (down) {
- this.pointerIsDown = true;
- pointerInfo.downTime = this.coords.cur.timeStamp;
- pointerInfo.downTarget = eventTarget;
- utils_pointerExtend(this.downPointer, pointer);
- if (!this.interacting()) {
- copyCoords(this.coords.start, this.coords.cur);
- copyCoords(this.coords.prev, this.coords.cur);
- this.downEvent = event;
- this.pointerWasMoved = false;
- }
- }
- this._updateLatestPointer(pointer, event, eventTarget);
- this._scopeFire('interactions:update-pointer', {
- pointer,
- event,
- eventTarget,
- down,
- pointerInfo,
- pointerIndex,
- interaction: this
- });
- return pointerIndex;
- }
- removePointer(pointer, event) {
- const pointerIndex = this.getPointerIndex(pointer);
- if (pointerIndex === -1) {
- return;
- }
- const pointerInfo = this.pointers[pointerIndex];
- this._scopeFire('interactions:remove-pointer', {
- pointer,
- event,
- eventTarget: null,
- pointerIndex,
- pointerInfo,
- interaction: this
- });
- this.pointers.splice(pointerIndex, 1);
- this.pointerIsDown = false;
- }
- _updateLatestPointer(pointer, event, eventTarget) {
- this._latestPointer.pointer = pointer;
- this._latestPointer.event = event;
- this._latestPointer.eventTarget = eventTarget;
- }
- destroy() {
- this._latestPointer.pointer = null;
- this._latestPointer.event = null;
- this._latestPointer.eventTarget = null;
- }
- _createPreparedEvent(event, phase, preEnd, type) {
- return new InteractEvent_InteractEvent(this, event, this.prepared.name, phase, this.element, preEnd, type);
- }
- _fireEvent(iEvent) {
- this.interactable.fire(iEvent);
- if (!this.prevEvent || iEvent.timeStamp >= this.prevEvent.timeStamp) {
- this.prevEvent = iEvent;
- }
- }
- _doPhase(signalArg) {
- const {
- event,
- phase,
- preEnd,
- type
- } = signalArg;
- const {
- rect
- } = this;
- if (rect && phase === 'move') {
- // update the rect changes due to pointer move
- addEdges(this.edges, rect, this.coords.delta[this.interactable.options.deltaSource]);
- rect.width = rect.right - rect.left;
- rect.height = rect.bottom - rect.top;
- }
- const beforeResult = this._scopeFire(`interactions:before-action-${phase}`, signalArg);
- if (beforeResult === false) {
- return false;
- }
- const iEvent = signalArg.iEvent = this._createPreparedEvent(event, phase, preEnd, type);
- this._scopeFire(`interactions:action-${phase}`, signalArg);
- if (phase === 'start') {
- this.prevEvent = iEvent;
- }
- this._fireEvent(iEvent);
- this._scopeFire(`interactions:after-action-${phase}`, signalArg);
- return true;
- }
- _now() {
- return Date.now();
- }
- }
- /* harmony default export */ var core_Interaction = (Interaction_Interaction);
- //# sourceMappingURL=Interaction.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactablePreventDefault.js
- function preventDefault(newValue) {
- if (/^(always|never|auto)$/.test(newValue)) {
- this.options.preventDefault = newValue;
- return this;
- }
- if (is.bool(newValue)) {
- this.options.preventDefault = newValue ? 'always' : 'never';
- return this;
- }
- return this.options.preventDefault;
- }
- function checkAndPreventDefault(interactable, scope, event) {
- const setting = interactable.options.preventDefault;
- if (setting === 'never') {
- return;
- }
- if (setting === 'always') {
- event.preventDefault();
- return;
- } // setting === 'auto'
- // if the browser supports passive event listeners and isn't running on iOS,
- // don't preventDefault of touch{start,move} events. CSS touch-action and
- // user-select should be used instead of calling event.preventDefault().
- if (scope.events.supportsPassive && /^touch(start|move)$/.test(event.type)) {
- const doc = getWindow(event.target).document;
- const docOptions = scope.getDocOptions(doc);
- if (!(docOptions && docOptions.events) || docOptions.events.passive !== false) {
- return;
- }
- } // don't preventDefault of pointerdown events
- if (/^(mouse|pointer|touch)*(down|start)/i.test(event.type)) {
- return;
- } // don't preventDefault on editable elements
- if (is.element(event.target) && matchesSelector(event.target, 'input,select,textarea,[contenteditable=true],[contenteditable=true] *')) {
- return;
- }
- event.preventDefault();
- }
- function onInteractionEvent({
- interaction,
- event
- }) {
- if (interaction.interactable) {
- interaction.interactable.checkAndPreventDefault(event);
- }
- }
- function interactablePreventDefault_install(scope) {
- /** @lends Interactable */
- const {
- Interactable
- } = scope;
- /**
- * Returns or sets whether to prevent the browser's default behaviour in
- * response to pointer events. Can be set to:
- * - `'always'` to always prevent
- * - `'never'` to never prevent
- * - `'auto'` to let interact.js try to determine what would be best
- *
- * @param {string} [newValue] `'always'`, `'never'` or `'auto'`
- * @return {string | Interactable} The current setting or this Interactable
- */
- Interactable.prototype.preventDefault = preventDefault;
- Interactable.prototype.checkAndPreventDefault = function (event) {
- return checkAndPreventDefault(this, scope, event);
- }; // prevent native HTML5 drag on interact.js target elements
- scope.interactions.docEvents.push({
- type: 'dragstart',
- listener(event) {
- for (const interaction of scope.interactions.list) {
- if (interaction.element && (interaction.element === event.target || nodeContains(interaction.element, event.target))) {
- interaction.interactable.checkAndPreventDefault(event);
- return;
- }
- }
- }
- });
- }
- /* harmony default export */ var interactablePreventDefault = ({
- id: 'core/interactablePreventDefault',
- install: interactablePreventDefault_install,
- listeners: ['down', 'move', 'up', 'cancel'].reduce((acc, eventType) => {
- acc[`interactions:${eventType}`] = onInteractionEvent;
- return acc;
- }, {})
- });
- //# sourceMappingURL=interactablePreventDefault.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactionFinder.js
- const finder = {
- methodOrder: ['simulationResume', 'mouseOrPen', 'hasPointer', 'idle'],
- search(details) {
- for (const method of finder.methodOrder) {
- const interaction = finder[method](details);
- if (interaction) {
- return interaction;
- }
- }
- return null;
- },
- // try to resume simulation with a new pointer
- simulationResume({
- pointerType,
- eventType,
- eventTarget,
- scope
- }) {
- if (!/down|start/i.test(eventType)) {
- return null;
- }
- for (const interaction of scope.interactions.list) {
- let element = eventTarget;
- if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) {
- while (element) {
- // if the element is the interaction element
- if (element === interaction.element) {
- return interaction;
- }
- element = parentNode(element);
- }
- }
- }
- return null;
- },
- // if it's a mouse or pen interaction
- mouseOrPen({
- pointerId,
- pointerType,
- eventType,
- scope
- }) {
- if (pointerType !== 'mouse' && pointerType !== 'pen') {
- return null;
- }
- let firstNonActive;
- for (const interaction of scope.interactions.list) {
- if (interaction.pointerType === pointerType) {
- // if it's a down event, skip interactions with running simulations
- if (interaction.simulation && !hasPointerId(interaction, pointerId)) {
- continue;
- } // if the interaction is active, return it immediately
- if (interaction.interacting()) {
- return interaction;
- } // otherwise save it and look for another active interaction
- else if (!firstNonActive) {
- firstNonActive = interaction;
- }
- }
- } // if no active mouse interaction was found use the first inactive mouse
- // interaction
- if (firstNonActive) {
- return firstNonActive;
- } // find any mouse or pen interaction.
- // ignore the interaction if the eventType is a *down, and a simulation
- // is active
- for (const interaction of scope.interactions.list) {
- if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {
- return interaction;
- }
- }
- return null;
- },
- // get interaction that has this pointer
- hasPointer({
- pointerId,
- scope
- }) {
- for (const interaction of scope.interactions.list) {
- if (hasPointerId(interaction, pointerId)) {
- return interaction;
- }
- }
- return null;
- },
- // get first idle interaction with a matching pointerType
- idle({
- pointerType,
- scope
- }) {
- for (const interaction of scope.interactions.list) {
- // if there's already a pointer held down
- if (interaction.pointers.length === 1) {
- const target = interaction.interactable; // don't add this pointer if there is a target interactable and it
- // isn't gesturable
- if (target && !(target.options.gesture && target.options.gesture.enabled)) {
- continue;
- }
- } // maximum of 2 pointers per interaction
- else if (interaction.pointers.length >= 2) {
- continue;
- }
- if (!interaction.interacting() && pointerType === interaction.pointerType) {
- return interaction;
- }
- }
- return null;
- }
- };
- function hasPointerId(interaction, pointerId) {
- return interaction.pointers.some(({
- id
- }) => id === pointerId);
- }
- /* harmony default export */ var interactionFinder = (finder);
- //# sourceMappingURL=interactionFinder.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactions.js
- const methodNames = ['pointerDown', 'pointerMove', 'pointerUp', 'updatePointer', 'removePointer', 'windowBlur'];
- function interactions_install(scope) {
- const listeners = {};
- for (const method of methodNames) {
- listeners[method] = doOnInteractions(method, scope);
- }
- const pEventTypes = utils_browser.pEventTypes;
- let docEvents;
- if (utils_domObjects.PointerEvent) {
- docEvents = [{
- type: pEventTypes.down,
- listener: releasePointersOnRemovedEls
- }, {
- type: pEventTypes.down,
- listener: listeners.pointerDown
- }, {
- type: pEventTypes.move,
- listener: listeners.pointerMove
- }, {
- type: pEventTypes.up,
- listener: listeners.pointerUp
- }, {
- type: pEventTypes.cancel,
- listener: listeners.pointerUp
- }];
- } else {
- docEvents = [{
- type: 'mousedown',
- listener: listeners.pointerDown
- }, {
- type: 'mousemove',
- listener: listeners.pointerMove
- }, {
- type: 'mouseup',
- listener: listeners.pointerUp
- }, {
- type: 'touchstart',
- listener: releasePointersOnRemovedEls
- }, {
- type: 'touchstart',
- listener: listeners.pointerDown
- }, {
- type: 'touchmove',
- listener: listeners.pointerMove
- }, {
- type: 'touchend',
- listener: listeners.pointerUp
- }, {
- type: 'touchcancel',
- listener: listeners.pointerUp
- }];
- }
- docEvents.push({
- type: 'blur',
- listener(event) {
- for (const interaction of scope.interactions.list) {
- interaction.documentBlur(event);
- }
- }
- }); // for ignoring browser's simulated mouse events
- scope.prevTouchTime = 0;
- scope.Interaction = class extends core_Interaction {
- get pointerMoveTolerance() {
- return scope.interactions.pointerMoveTolerance;
- }
- set pointerMoveTolerance(value) {
- scope.interactions.pointerMoveTolerance = value;
- }
- _now() {
- return scope.now();
- }
- };
- scope.interactions = {
- // all active and idle interactions
- list: [],
- new(options) {
- options.scopeFire = (name, arg) => scope.fire(name, arg);
- const interaction = new scope.Interaction(options);
- scope.interactions.list.push(interaction);
- return interaction;
- },
- listeners,
- docEvents,
- pointerMoveTolerance: 1
- };
- function releasePointersOnRemovedEls() {
- // for all inactive touch interactions with pointers down
- for (const interaction of scope.interactions.list) {
- if (!interaction.pointerIsDown || interaction.pointerType !== 'touch' || interaction._interacting) {
- continue;
- } // if a pointer is down on an element that is no longer in the DOM tree
- for (const pointer of interaction.pointers) {
- if (!scope.documents.some(({
- doc
- }) => nodeContains(doc, pointer.downTarget))) {
- // remove the pointer from the interaction
- interaction.removePointer(pointer.pointer, pointer.event);
- }
- }
- }
- }
- scope.usePlugin(interactablePreventDefault);
- }
- function doOnInteractions(method, scope) {
- return function (event) {
- const interactions = scope.interactions.list;
- const pointerType = getPointerType(event);
- const [eventTarget, curEventTarget] = getEventTargets(event);
- const matches = []; // [ [pointer, interaction], ...]
- if (/^touch/.test(event.type)) {
- scope.prevTouchTime = scope.now(); // @ts-expect-error
- for (const changedTouch of event.changedTouches) {
- const pointer = changedTouch;
- const pointerId = getPointerId(pointer);
- const searchDetails = {
- pointer,
- pointerId,
- pointerType,
- eventType: event.type,
- eventTarget,
- curEventTarget,
- scope
- };
- const interaction = getInteraction(searchDetails);
- matches.push([searchDetails.pointer, searchDetails.eventTarget, searchDetails.curEventTarget, interaction]);
- }
- } else {
- let invalidPointer = false;
- if (!utils_browser.supportsPointerEvent && /mouse/.test(event.type)) {
- // ignore mouse events while touch interactions are active
- for (let i = 0; i < interactions.length && !invalidPointer; i++) {
- invalidPointer = interactions[i].pointerType !== 'mouse' && interactions[i].pointerIsDown;
- } // try to ignore mouse events that are simulated by the browser
- // after a touch event
- invalidPointer = invalidPointer || scope.now() - scope.prevTouchTime < 500 || // on iOS and Firefox Mobile, MouseEvent.timeStamp is zero if simulated
- event.timeStamp === 0;
- }
- if (!invalidPointer) {
- const searchDetails = {
- pointer: event,
- pointerId: getPointerId(event),
- pointerType,
- eventType: event.type,
- curEventTarget,
- eventTarget,
- scope
- };
- const interaction = getInteraction(searchDetails);
- matches.push([searchDetails.pointer, searchDetails.eventTarget, searchDetails.curEventTarget, interaction]);
- }
- } // eslint-disable-next-line no-shadow
- for (const [pointer, eventTarget, curEventTarget, interaction] of matches) {
- interaction[method](pointer, event, eventTarget, curEventTarget);
- }
- };
- }
- function getInteraction(searchDetails) {
- const {
- pointerType,
- scope
- } = searchDetails;
- const foundInteraction = interactionFinder.search(searchDetails);
- const signalArg = {
- interaction: foundInteraction,
- searchDetails
- };
- scope.fire('interactions:find', signalArg);
- return signalArg.interaction || scope.interactions.new({
- pointerType
- });
- }
- function onDocSignal({
- doc,
- scope,
- options
- }, eventMethodName) {
- const {
- interactions: {
- docEvents
- },
- events
- } = scope;
- const eventMethod = events[eventMethodName];
- if (scope.browser.isIOS && !options.events) {
- options.events = {
- passive: false
- };
- } // delegate event listener
- for (const eventType in events.delegatedEvents) {
- eventMethod(doc, eventType, events.delegateListener);
- eventMethod(doc, eventType, events.delegateUseCapture, true);
- }
- const eventOptions = options && options.events;
- for (const {
- type,
- listener
- } of docEvents) {
- eventMethod(doc, type, listener, eventOptions);
- }
- }
- const interactions_interactions = {
- id: 'core/interactions',
- install: interactions_install,
- listeners: {
- 'scope:add-document': arg => onDocSignal(arg, 'add'),
- 'scope:remove-document': arg => onDocSignal(arg, 'remove'),
- 'interactable:unset': ({
- interactable
- }, scope) => {
- // Stop and destroy related interactions when an Interactable is unset
- for (let i = scope.interactions.list.length - 1; i >= 0; i--) {
- const interaction = scope.interactions.list[i];
- if (interaction.interactable !== interactable) {
- continue;
- }
- interaction.stop();
- scope.fire('interactions:destroy', {
- interaction
- });
- interaction.destroy();
- if (scope.interactions.list.length > 2) {
- scope.interactions.list.splice(i, 1);
- }
- }
- }
- },
- onDocSignal,
- doOnInteractions,
- methodNames
- };
- /* harmony default export */ var core_interactions = (interactions_interactions);
- //# sourceMappingURL=interactions.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/core/scope.js
- class scope_Scope {
- // main window
- // main document
- // main window
- // all documents being listened to
- constructor() {
- this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`;
- this.isInitialized = false;
- this.listenerMaps = [];
- this.browser = utils_browser;
- this.defaults = clone(defaultOptions_defaults);
- this.Eventable = Eventable_Eventable;
- this.actions = {
- map: {},
- phases: {
- start: true,
- move: true,
- end: true
- },
- methodDict: {},
- phaselessTypes: {}
- };
- this.interactStatic = createInteractStatic(this);
- this.InteractEvent = InteractEvent_InteractEvent;
- this.Interactable = void 0;
- this.interactables = new InteractableSet_InteractableSet(this);
- this._win = void 0;
- this.document = void 0;
- this.window = void 0;
- this.documents = [];
- this._plugins = {
- list: [],
- map: {}
- };
- this.onWindowUnload = event => this.removeDocument(event.target);
- const scope = this;
- this.Interactable = class extends Interactable_Interactable {
- get _defaults() {
- return scope.defaults;
- }
- set(options) {
- super.set(options);
- scope.fire('interactable:set', {
- options,
- interactable: this
- });
- return this;
- }
- unset() {
- super.unset();
- scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1);
- scope.fire('interactable:unset', {
- interactable: this
- });
- }
- };
- }
- addListeners(map, id) {
- this.listenerMaps.push({
- id,
- map
- });
- }
- fire(name, arg) {
- for (const {
- map: {
- [name]: listener
- }
- } of this.listenerMaps) {
- if (!!listener && listener(arg, this, name) === false) {
- return false;
- }
- }
- }
- init(window) {
- return this.isInitialized ? this : initScope(this, window);
- }
- pluginIsInstalled(plugin) {
- return this._plugins.map[plugin.id] || this._plugins.list.indexOf(plugin) !== -1;
- }
- usePlugin(plugin, options) {
- if (!this.isInitialized) {
- return this;
- }
- if (this.pluginIsInstalled(plugin)) {
- return this;
- }
- if (plugin.id) {
- this._plugins.map[plugin.id] = plugin;
- }
- this._plugins.list.push(plugin);
- if (plugin.install) {
- plugin.install(this, options);
- }
- if (plugin.listeners && plugin.before) {
- let index = 0;
- const len = this.listenerMaps.length;
- const before = plugin.before.reduce((acc, id) => {
- acc[id] = true;
- acc[pluginIdRoot(id)] = true;
- return acc;
- }, {});
- for (; index < len; index++) {
- const otherId = this.listenerMaps[index].id;
- if (before[otherId] || before[pluginIdRoot(otherId)]) {
- break;
- }
- }
- this.listenerMaps.splice(index, 0, {
- id: plugin.id,
- map: plugin.listeners
- });
- } else if (plugin.listeners) {
- this.listenerMaps.push({
- id: plugin.id,
- map: plugin.listeners
- });
- }
- return this;
- }
- addDocument(doc, options) {
- // do nothing if document is already known
- if (this.getDocIndex(doc) !== -1) {
- return false;
- }
- const window = getWindow(doc);
- options = options ? extend({}, options) : {};
- this.documents.push({
- doc,
- options
- });
- this.events.documents.push(doc); // don't add an unload event for the main document
- // so that the page may be cached in browser history
- if (doc !== this.document) {
- this.events.add(window, 'unload', this.onWindowUnload);
- }
- this.fire('scope:add-document', {
- doc,
- window,
- scope: this,
- options
- });
- }
- removeDocument(doc) {
- const index = this.getDocIndex(doc);
- const window = getWindow(doc);
- const options = this.documents[index].options;
- this.events.remove(window, 'unload', this.onWindowUnload);
- this.documents.splice(index, 1);
- this.events.documents.splice(index, 1);
- this.fire('scope:remove-document', {
- doc,
- window,
- scope: this,
- options
- });
- }
- getDocIndex(doc) {
- for (let i = 0; i < this.documents.length; i++) {
- if (this.documents[i].doc === doc) {
- return i;
- }
- }
- return -1;
- }
- getDocOptions(doc) {
- const docIndex = this.getDocIndex(doc);
- return docIndex === -1 ? null : this.documents[docIndex].options;
- }
- now() {
- return (this.window.Date || Date).now();
- }
- }
- function initScope(scope, window) {
- scope.isInitialized = true;
- window_init(window);
- utils_domObjects.init(window);
- utils_browser.init(window);
- raf.init(window);
- scope.window = window;
- scope.document = window.document;
- scope.usePlugin(core_interactions);
- scope.usePlugin(events);
- return scope;
- }
- function pluginIdRoot(id) {
- return id && id.replace(/\/.*$/, '');
- }
- //# sourceMappingURL=scope.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/interact/index.js
- const interact_scope = new scope_Scope();
- const interact_interact = interact_scope.interactStatic;
- /* harmony default export */ var _interactjs_interact = (interact_interact);
- const interact_init = win => interact_scope.init(win);
- if (typeof window === 'object' && !!window) {
- interact_init(window);
- }
- //# sourceMappingURL=index.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/InteractableMethods.js
- function InteractableMethods_install(scope) {
- const {
- /** @lends Interactable */
- Interactable // tslint:disable-line no-shadowed-variable
- } = scope;
- Interactable.prototype.getAction = function getAction(pointer, event, interaction, element) {
- const action = defaultActionChecker(this, event, interaction, element, scope);
- if (this.options.actionChecker) {
- return this.options.actionChecker(pointer, event, action, this, element, interaction);
- }
- return action;
- };
- /**
- * If the target of the `mousedown`, `pointerdown` or `touchstart` event or any
- * of it's parents match the given CSS selector or Element, no
- * drag/resize/gesture is started.
- *
- * @deprecated
- * Don't use this method. Instead set the `ignoreFrom` option for each action
- * or for `pointerEvents`
- *
- * ```js
- * interact(targett)
- * .draggable({
- * ignoreFrom: 'input, textarea, a[href]'',
- * })
- * .pointerEvents({
- * ignoreFrom: '[no-pointer]',
- * })
- * ```
- *
- * @param {string | Element | null} [newValue] a CSS selector string, an
- * Element or `null` to not ignore any elements
- * @return {string | Element | object} The current ignoreFrom value or this
- * Interactable
- */
- Interactable.prototype.ignoreFrom = warnOnce(function (newValue) {
- return this._backCompatOption('ignoreFrom', newValue);
- }, 'Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).');
- /**
- *
- * A drag/resize/gesture is started only If the target of the `mousedown`,
- * `pointerdown` or `touchstart` event or any of it's parents match the given
- * CSS selector or Element.
- *
- * @deprecated
- * Don't use this method. Instead set the `allowFrom` option for each action
- * or for `pointerEvents`
- *
- * ```js
- * interact(targett)
- * .resizable({
- * allowFrom: '.resize-handle',
- * .pointerEvents({
- * allowFrom: '.handle',,
- * })
- * ```
- *
- * @param {string | Element | null} [newValue] a CSS selector string, an
- * Element or `null` to allow from any element
- * @return {string | Element | object} The current allowFrom value or this
- * Interactable
- */
- Interactable.prototype.allowFrom = warnOnce(function (newValue) {
- return this._backCompatOption('allowFrom', newValue);
- }, 'Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).');
- /**
- * ```js
- * interact('.resize-drag')
- * .resizable(true)
- * .draggable(true)
- * .actionChecker(function (pointer, event, action, interactable, element, interaction) {
- *
- * if (interact.matchesSelector(event.target, '.drag-handle')) {
- * // force drag with handle target
- * action.name = drag
- * }
- * else {
- * // resize from the top and right edges
- * action.name = 'resize'
- * action.edges = { top: true, right: true }
- * }
- *
- * return action
- * })
- * ```
- *
- * Returns or sets the function used to check action to be performed on
- * pointerDown
- *
- * @param {function | null} [checker] A function which takes a pointer event,
- * defaultAction string, interactable, element and interaction as parameters
- * and returns an object with name property 'drag' 'resize' or 'gesture' and
- * optionally an `edges` object with boolean 'top', 'left', 'bottom' and right
- * props.
- * @return {Function | Interactable} The checker function or this Interactable
- */
- Interactable.prototype.actionChecker = actionChecker;
- /**
- * Returns or sets whether the the cursor should be changed depending on the
- * action that would be performed if the mouse were pressed and dragged.
- *
- * @param {boolean} [newValue]
- * @return {boolean | Interactable} The current setting or this Interactable
- */
- Interactable.prototype.styleCursor = styleCursor;
- }
- function defaultActionChecker(interactable, event, interaction, element, scope) {
- const rect = interactable.getRect(element);
- const buttons = event.buttons || {
- 0: 1,
- 1: 4,
- 3: 8,
- 4: 16
- }[event.button];
- const arg = {
- action: null,
- interactable,
- interaction,
- element,
- rect,
- buttons
- };
- scope.fire('auto-start:check', arg);
- return arg.action;
- }
- function styleCursor(newValue) {
- if (is.bool(newValue)) {
- this.options.styleCursor = newValue;
- return this;
- }
- if (newValue === null) {
- delete this.options.styleCursor;
- return this;
- }
- return this.options.styleCursor;
- }
- function actionChecker(checker) {
- if (is.func(checker)) {
- this.options.actionChecker = checker;
- return this;
- }
- if (checker === null) {
- delete this.options.actionChecker;
- return this;
- }
- return this.options.actionChecker;
- }
- /* harmony default export */ var InteractableMethods = ({
- id: 'auto-start/interactableMethods',
- install: InteractableMethods_install
- });
- //# sourceMappingURL=InteractableMethods.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/base.js
- function base_install(scope) {
- const {
- interactStatic: interact,
- defaults
- } = scope;
- scope.usePlugin(InteractableMethods);
- defaults.base.actionChecker = null;
- defaults.base.styleCursor = true;
- extend(defaults.perAction, {
- manualStart: false,
- max: Infinity,
- maxPerElement: 1,
- allowFrom: null,
- ignoreFrom: null,
- // only allow left button by default
- // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#Return_value
- mouseButtons: 1
- });
- /**
- * Returns or sets the maximum number of concurrent interactions allowed. By
- * default only 1 interaction is allowed at a time (for backwards
- * compatibility). To allow multiple interactions on the same Interactables and
- * elements, you need to enable it in the draggable, resizable and gesturable
- * `'max'` and `'maxPerElement'` options.
- *
- * @alias module:interact.maxInteractions
- *
- * @param {number} [newValue] Any number. newValue <= 0 means no interactions.
- */
- interact.maxInteractions = newValue => maxInteractions(newValue, scope);
- scope.autoStart = {
- // Allow this many interactions to happen simultaneously
- maxInteractions: Infinity,
- withinInteractionLimit,
- cursorElement: null
- };
- }
- function prepareOnDown({
- interaction,
- pointer,
- event,
- eventTarget
- }, scope) {
- if (interaction.interacting()) {
- return;
- }
- const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope);
- prepare(interaction, actionInfo, scope);
- }
- function prepareOnMove({
- interaction,
- pointer,
- event,
- eventTarget
- }, scope) {
- if (interaction.pointerType !== 'mouse' || interaction.pointerIsDown || interaction.interacting()) {
- return;
- }
- const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope);
- prepare(interaction, actionInfo, scope);
- }
- function startOnMove(arg, scope) {
- const {
- interaction
- } = arg;
- if (!interaction.pointerIsDown || interaction.interacting() || !interaction.pointerWasMoved || !interaction.prepared.name) {
- return;
- }
- scope.fire('autoStart:before-start', arg);
- const {
- interactable
- } = interaction;
- const actionName = interaction.prepared.name;
- if (actionName && interactable) {
- // check manualStart and interaction limit
- if (interactable.options[actionName].manualStart || !withinInteractionLimit(interactable, interaction.element, interaction.prepared, scope)) {
- interaction.stop();
- } else {
- interaction.start(interaction.prepared, interactable, interaction.element);
- setInteractionCursor(interaction, scope);
- }
- }
- }
- function clearCursorOnStop({
- interaction
- }, scope) {
- const {
- interactable
- } = interaction;
- if (interactable && interactable.options.styleCursor) {
- setCursor(interaction.element, '', scope);
- }
- } // Check if the current interactable supports the action.
- // If so, return the validated action. Otherwise, return null
- function validateAction(action, interactable, element, eventTarget, scope) {
- if (interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) && interactable.options[action.name].enabled && withinInteractionLimit(interactable, element, action, scope)) {
- return action;
- }
- return null;
- }
- function validateMatches(interaction, pointer, event, matches, matchElements, eventTarget, scope) {
- for (let i = 0, len = matches.length; i < len; i++) {
- const match = matches[i];
- const matchElement = matchElements[i];
- const matchAction = match.getAction(pointer, event, interaction, matchElement);
- if (!matchAction) {
- continue;
- }
- const action = validateAction(matchAction, match, matchElement, eventTarget, scope);
- if (action) {
- return {
- action,
- interactable: match,
- element: matchElement
- };
- }
- }
- return {
- action: null,
- interactable: null,
- element: null
- };
- }
- function getActionInfo(interaction, pointer, event, eventTarget, scope) {
- let matches = [];
- let matchElements = [];
- let element = eventTarget;
- function pushMatches(interactable) {
- matches.push(interactable);
- matchElements.push(element);
- }
- while (is.element(element)) {
- matches = [];
- matchElements = [];
- scope.interactables.forEachMatch(element, pushMatches);
- const actionInfo = validateMatches(interaction, pointer, event, matches, matchElements, eventTarget, scope);
- if (actionInfo.action && !actionInfo.interactable.options[actionInfo.action.name].manualStart) {
- return actionInfo;
- }
- element = parentNode(element);
- }
- return {
- action: null,
- interactable: null,
- element: null
- };
- }
- function prepare(interaction, {
- action,
- interactable,
- element
- }, scope) {
- action = action || {
- name: null
- };
- interaction.interactable = interactable;
- interaction.element = element;
- copyAction(interaction.prepared, action);
- interaction.rect = interactable && action.name ? interactable.getRect(element) : null;
- setInteractionCursor(interaction, scope);
- scope.fire('autoStart:prepared', {
- interaction
- });
- }
- function withinInteractionLimit(interactable, element, action, scope) {
- const options = interactable.options;
- const maxActions = options[action.name].max;
- const maxPerElement = options[action.name].maxPerElement;
- const autoStartMax = scope.autoStart.maxInteractions;
- let activeInteractions = 0;
- let interactableCount = 0;
- let elementCount = 0; // no actions if any of these values == 0
- if (!(maxActions && maxPerElement && autoStartMax)) {
- return false;
- }
- for (const interaction of scope.interactions.list) {
- const otherAction = interaction.prepared.name;
- if (!interaction.interacting()) {
- continue;
- }
- activeInteractions++;
- if (activeInteractions >= autoStartMax) {
- return false;
- }
- if (interaction.interactable !== interactable) {
- continue;
- }
- interactableCount += otherAction === action.name ? 1 : 0;
- if (interactableCount >= maxActions) {
- return false;
- }
- if (interaction.element === element) {
- elementCount++;
- if (otherAction === action.name && elementCount >= maxPerElement) {
- return false;
- }
- }
- }
- return autoStartMax > 0;
- }
- function maxInteractions(newValue, scope) {
- if (is.number(newValue)) {
- scope.autoStart.maxInteractions = newValue;
- return this;
- }
- return scope.autoStart.maxInteractions;
- }
- function setCursor(element, cursor, scope) {
- const {
- cursorElement: prevCursorElement
- } = scope.autoStart;
- if (prevCursorElement && prevCursorElement !== element) {
- prevCursorElement.style.cursor = '';
- }
- element.ownerDocument.documentElement.style.cursor = cursor;
- element.style.cursor = cursor;
- scope.autoStart.cursorElement = cursor ? element : null;
- }
- function setInteractionCursor(interaction, scope) {
- const {
- interactable,
- element,
- prepared
- } = interaction;
- if (!(interaction.pointerType === 'mouse' && interactable && interactable.options.styleCursor)) {
- // clear previous target element cursor
- if (scope.autoStart.cursorElement) {
- setCursor(scope.autoStart.cursorElement, '', scope);
- }
- return;
- }
- let cursor = '';
- if (prepared.name) {
- const cursorChecker = interactable.options[prepared.name].cursorChecker;
- if (is.func(cursorChecker)) {
- cursor = cursorChecker(prepared, interactable, element, interaction._interacting);
- } else {
- cursor = scope.actions.map[prepared.name].getCursor(prepared);
- }
- }
- setCursor(interaction.element, cursor || '', scope);
- }
- const autoStart = {
- id: 'auto-start/base',
- before: ['actions'],
- install: base_install,
- listeners: {
- 'interactions:down': prepareOnDown,
- 'interactions:move': (arg, scope) => {
- prepareOnMove(arg, scope);
- startOnMove(arg, scope);
- },
- 'interactions:stop': clearCursorOnStop
- },
- maxInteractions,
- withinInteractionLimit,
- validateAction
- };
- /* harmony default export */ var base = (autoStart);
- //# sourceMappingURL=base.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/dragAxis.js
- function beforeStart({
- interaction,
- eventTarget,
- dx,
- dy
- }, scope) {
- if (interaction.prepared.name !== 'drag') {
- return;
- } // check if a drag is in the correct axis
- const absX = Math.abs(dx);
- const absY = Math.abs(dy);
- const targetOptions = interaction.interactable.options.drag;
- const startAxis = targetOptions.startAxis;
- const currentAxis = absX > absY ? 'x' : absX < absY ? 'y' : 'xy';
- interaction.prepared.axis = targetOptions.lockAxis === 'start' ? currentAxis[0] // always lock to one axis even if currentAxis === 'xy'
- : targetOptions.lockAxis; // if the movement isn't in the startAxis of the interactable
- if (currentAxis !== 'xy' && startAxis !== 'xy' && startAxis !== currentAxis) {
- // cancel the prepared action
- interaction.prepared.name = null; // then try to get a drag from another ineractable
- let element = eventTarget;
- const getDraggable = function (interactable) {
- if (interactable === interaction.interactable) {
- return;
- }
- const options = interaction.interactable.options.drag;
- if (!options.manualStart && interactable.testIgnoreAllow(options, element, eventTarget)) {
- const action = interactable.getAction(interaction.downPointer, interaction.downEvent, interaction, element);
- if (action && action.name === 'drag' && checkStartAxis(currentAxis, interactable) && base.validateAction(action, interactable, element, eventTarget, scope)) {
- return interactable;
- }
- }
- }; // check all interactables
- while (is.element(element)) {
- const interactable = scope.interactables.forEachMatch(element, getDraggable);
- if (interactable) {
- interaction.prepared.name = 'drag';
- interaction.interactable = interactable;
- interaction.element = element;
- break;
- }
- element = parentNode(element);
- }
- }
- }
- function checkStartAxis(startAxis, interactable) {
- if (!interactable) {
- return false;
- }
- const thisAxis = interactable.options.drag.startAxis;
- return startAxis === 'xy' || thisAxis === 'xy' || thisAxis === startAxis;
- }
- /* harmony default export */ var dragAxis = ({
- id: 'auto-start/dragAxis',
- listeners: {
- 'autoStart:before-start': beforeStart
- }
- });
- //# sourceMappingURL=dragAxis.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/hold.js
- function hold_install(scope) {
- const {
- defaults
- } = scope;
- scope.usePlugin(base);
- defaults.perAction.hold = 0;
- defaults.perAction.delay = 0;
- }
- function getHoldDuration(interaction) {
- const actionName = interaction.prepared && interaction.prepared.name;
- if (!actionName) {
- return null;
- }
- const options = interaction.interactable.options;
- return options[actionName].hold || options[actionName].delay;
- }
- const hold = {
- id: 'auto-start/hold',
- install: hold_install,
- listeners: {
- 'interactions:new': ({
- interaction
- }) => {
- interaction.autoStartHoldTimer = null;
- },
- 'autoStart:prepared': ({
- interaction
- }) => {
- const hold = getHoldDuration(interaction);
- if (hold > 0) {
- interaction.autoStartHoldTimer = setTimeout(() => {
- interaction.start(interaction.prepared, interaction.interactable, interaction.element);
- }, hold);
- }
- },
- 'interactions:move': ({
- interaction,
- duplicate
- }) => {
- if (interaction.autoStartHoldTimer && interaction.pointerWasMoved && !duplicate) {
- clearTimeout(interaction.autoStartHoldTimer);
- interaction.autoStartHoldTimer = null;
- }
- },
- // prevent regular down->move autoStart
- 'autoStart:before-start': ({
- interaction
- }) => {
- const holdDuration = getHoldDuration(interaction);
- if (holdDuration > 0) {
- interaction.prepared.name = null;
- }
- }
- },
- getHoldDuration
- };
- /* harmony default export */ var auto_start_hold = (hold);
- //# sourceMappingURL=hold.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/plugin.js
- /* harmony default export */ var auto_start_plugin = ({
- id: 'auto-start',
- install(scope) {
- scope.usePlugin(base);
- scope.usePlugin(auto_start_hold);
- scope.usePlugin(dragAxis);
- }
- });
- //# sourceMappingURL=plugin.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/index.js
- /* eslint-disable import/order, no-console, eol-last */
- if (typeof window === 'object' && !!window) {
- interact_init(window);
- }
- _interactjs_interact.use(auto_start_plugin);
- //# sourceMappingURL=index.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/actions/drag/plugin.js
- function plugin_install(scope) {
- const {
- actions,
- Interactable,
- defaults
- } = scope;
- Interactable.prototype.draggable = drag.draggable;
- actions.map.drag = drag;
- actions.methodDict.drag = 'draggable';
- defaults.actions.drag = drag.defaults;
- }
- function beforeMove({
- interaction
- }) {
- if (interaction.prepared.name !== 'drag') {
- return;
- }
- const axis = interaction.prepared.axis;
- if (axis === 'x') {
- interaction.coords.cur.page.y = interaction.coords.start.page.y;
- interaction.coords.cur.client.y = interaction.coords.start.client.y;
- interaction.coords.velocity.client.y = 0;
- interaction.coords.velocity.page.y = 0;
- } else if (axis === 'y') {
- interaction.coords.cur.page.x = interaction.coords.start.page.x;
- interaction.coords.cur.client.x = interaction.coords.start.client.x;
- interaction.coords.velocity.client.x = 0;
- interaction.coords.velocity.page.x = 0;
- }
- }
- function move({
- iEvent,
- interaction
- }) {
- if (interaction.prepared.name !== 'drag') {
- return;
- }
- const axis = interaction.prepared.axis;
- if (axis === 'x' || axis === 'y') {
- const opposite = axis === 'x' ? 'y' : 'x';
- iEvent.page[opposite] = interaction.coords.start.page[opposite];
- iEvent.client[opposite] = interaction.coords.start.client[opposite];
- iEvent.delta[opposite] = 0;
- }
- }
- /**
- * ```js
- * interact(element).draggable({
- * onstart: function (event) {},
- * onmove : function (event) {},
- * onend : function (event) {},
- *
- * // the axis in which the first movement must be
- * // for the drag sequence to start
- * // 'xy' by default - any direction
- * startAxis: 'x' || 'y' || 'xy',
- *
- * // 'xy' by default - don't restrict to one axis (move in any direction)
- * // 'x' or 'y' to restrict movement to either axis
- * // 'start' to restrict movement to the axis the drag started in
- * lockAxis: 'x' || 'y' || 'xy' || 'start',
- *
- * // max number of drags that can happen concurrently
- * // with elements of this Interactable. Infinity by default
- * max: Infinity,
- *
- * // max number of drags that can target the same element+Interactable
- * // 1 by default
- * maxPerElement: 2
- * })
- *
- * var isDraggable = interact('element').draggable(); // true
- * ```
- *
- * Get or set whether drag actions can be performed on the target
- *
- * @alias Interactable.prototype.draggable
- *
- * @param {boolean | object} [options] true/false or An object with event
- * listeners to be fired on drag events (object makes the Interactable
- * draggable)
- * @return {boolean | Interactable} boolean indicating if this can be the
- * target of drag events, or this Interctable
- */
- const plugin_draggable = function draggable(options) {
- if (is.object(options)) {
- this.options.drag.enabled = options.enabled !== false;
- this.setPerAction('drag', options);
- this.setOnEvents('drag', options);
- if (/^(xy|x|y|start)$/.test(options.lockAxis)) {
- this.options.drag.lockAxis = options.lockAxis;
- }
- if (/^(xy|x|y)$/.test(options.startAxis)) {
- this.options.drag.startAxis = options.startAxis;
- }
- return this;
- }
- if (is.bool(options)) {
- this.options.drag.enabled = options;
- return this;
- }
- return this.options.drag;
- };
- const drag = {
- id: 'actions/drag',
- install: plugin_install,
- listeners: {
- 'interactions:before-action-move': beforeMove,
- 'interactions:action-resume': beforeMove,
- // dragmove
- 'interactions:action-move': move,
- 'auto-start:check': arg => {
- const {
- interaction,
- interactable,
- buttons
- } = arg;
- const dragOptions = interactable.options.drag;
- if (!(dragOptions && dragOptions.enabled) || // check mouseButton setting if the pointer is down
- interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & interactable.options.drag.mouseButtons) === 0) {
- return undefined;
- }
- arg.action = {
- name: 'drag',
- axis: dragOptions.lockAxis === 'start' ? dragOptions.startAxis : dragOptions.lockAxis
- };
- return false;
- }
- },
- draggable: plugin_draggable,
- beforeMove,
- move,
- defaults: {
- startAxis: 'xy',
- lockAxis: 'xy'
- },
- getCursor() {
- return 'move';
- }
- };
- /* harmony default export */ var drag_plugin = (drag);
- //# sourceMappingURL=plugin.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/actions/drag/index.js
- /* eslint-disable import/order, no-console, eol-last */
- if (typeof window === 'object' && !!window) {
- interact_init(window);
- }
- _interactjs_interact.use(drag_plugin);
- //# sourceMappingURL=index.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/actions/resize/plugin.js
- function resize_plugin_install(scope) {
- const {
- actions,
- browser,
- /** @lends Interactable */
- Interactable,
- // tslint:disable-line no-shadowed-variable
- defaults
- } = scope; // Less Precision with touch input
- resize.cursors = initCursors(browser);
- resize.defaultMargin = browser.supportsTouch || browser.supportsPointerEvent ? 20 : 10;
- /**
- * ```js
- * interact(element).resizable({
- * onstart: function (event) {},
- * onmove : function (event) {},
- * onend : function (event) {},
- *
- * edges: {
- * top : true, // Use pointer coords to check for resize.
- * left : false, // Disable resizing from left edge.
- * bottom: '.resize-s',// Resize if pointer target matches selector
- * right : handleEl // Resize if pointer target is the given Element
- * },
- *
- * // Width and height can be adjusted independently. When `true`, width and
- * // height are adjusted at a 1:1 ratio.
- * square: false,
- *
- * // Width and height can be adjusted independently. When `true`, width and
- * // height maintain the aspect ratio they had when resizing started.
- * preserveAspectRatio: false,
- *
- * // a value of 'none' will limit the resize rect to a minimum of 0x0
- * // 'negate' will allow the rect to have negative width/height
- * // 'reposition' will keep the width/height positive by swapping
- * // the top and bottom edges and/or swapping the left and right edges
- * invert: 'none' || 'negate' || 'reposition'
- *
- * // limit multiple resizes.
- * // See the explanation in the {@link Interactable.draggable} example
- * max: Infinity,
- * maxPerElement: 1,
- * })
- *
- * var isResizeable = interact(element).resizable()
- * ```
- *
- * Gets or sets whether resize actions can be performed on the target
- *
- * @param {boolean | object} [options] true/false or An object with event
- * listeners to be fired on resize events (object makes the Interactable
- * resizable)
- * @return {boolean | Interactable} A boolean indicating if this can be the
- * target of resize elements, or this Interactable
- */
- Interactable.prototype.resizable = function (options) {
- return resizable(this, options, scope);
- };
- actions.map.resize = resize;
- actions.methodDict.resize = 'resizable';
- defaults.actions.resize = resize.defaults;
- }
- function resizeChecker(arg) {
- const {
- interaction,
- interactable,
- element,
- rect,
- buttons
- } = arg;
- if (!rect) {
- return undefined;
- }
- const page = extend({}, interaction.coords.cur.page);
- const resizeOptions = interactable.options.resize;
- if (!(resizeOptions && resizeOptions.enabled) || // check mouseButton setting if the pointer is down
- interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & resizeOptions.mouseButtons) === 0) {
- return undefined;
- } // if using resize.edges
- if (is.object(resizeOptions.edges)) {
- const resizeEdges = {
- left: false,
- right: false,
- top: false,
- bottom: false
- };
- for (const edge in resizeEdges) {
- resizeEdges[edge] = checkResizeEdge(edge, resizeOptions.edges[edge], page, interaction._latestPointer.eventTarget, element, rect, resizeOptions.margin || resize.defaultMargin);
- }
- resizeEdges.left = resizeEdges.left && !resizeEdges.right;
- resizeEdges.top = resizeEdges.top && !resizeEdges.bottom;
- if (resizeEdges.left || resizeEdges.right || resizeEdges.top || resizeEdges.bottom) {
- arg.action = {
- name: 'resize',
- edges: resizeEdges
- };
- }
- } else {
- const right = resizeOptions.axis !== 'y' && page.x > rect.right - resize.defaultMargin;
- const bottom = resizeOptions.axis !== 'x' && page.y > rect.bottom - resize.defaultMargin;
- if (right || bottom) {
- arg.action = {
- name: 'resize',
- axes: (right ? 'x' : '') + (bottom ? 'y' : '')
- };
- }
- }
- return arg.action ? false : undefined;
- }
- function resizable(interactable, options, scope) {
- if (is.object(options)) {
- interactable.options.resize.enabled = options.enabled !== false;
- interactable.setPerAction('resize', options);
- interactable.setOnEvents('resize', options);
- if (is.string(options.axis) && /^x$|^y$|^xy$/.test(options.axis)) {
- interactable.options.resize.axis = options.axis;
- } else if (options.axis === null) {
- interactable.options.resize.axis = scope.defaults.actions.resize.axis;
- }
- if (is.bool(options.preserveAspectRatio)) {
- interactable.options.resize.preserveAspectRatio = options.preserveAspectRatio;
- } else if (is.bool(options.square)) {
- interactable.options.resize.square = options.square;
- }
- return interactable;
- }
- if (is.bool(options)) {
- interactable.options.resize.enabled = options;
- return interactable;
- }
- return interactable.options.resize;
- }
- function checkResizeEdge(name, value, page, element, interactableElement, rect, margin) {
- // false, '', undefined, null
- if (!value) {
- return false;
- } // true value, use pointer coords and element rect
- if (value === true) {
- // if dimensions are negative, "switch" edges
- const width = is.number(rect.width) ? rect.width : rect.right - rect.left;
- const height = is.number(rect.height) ? rect.height : rect.bottom - rect.top; // don't use margin greater than half the relevent dimension
- margin = Math.min(margin, Math.abs((name === 'left' || name === 'right' ? width : height) / 2));
- if (width < 0) {
- if (name === 'left') {
- name = 'right';
- } else if (name === 'right') {
- name = 'left';
- }
- }
- if (height < 0) {
- if (name === 'top') {
- name = 'bottom';
- } else if (name === 'bottom') {
- name = 'top';
- }
- }
- if (name === 'left') {
- return page.x < (width >= 0 ? rect.left : rect.right) + margin;
- }
- if (name === 'top') {
- return page.y < (height >= 0 ? rect.top : rect.bottom) + margin;
- }
- if (name === 'right') {
- return page.x > (width >= 0 ? rect.right : rect.left) - margin;
- }
- if (name === 'bottom') {
- return page.y > (height >= 0 ? rect.bottom : rect.top) - margin;
- }
- } // the remaining checks require an element
- if (!is.element(element)) {
- return false;
- }
- return is.element(value) // the value is an element to use as a resize handle
- ? value === element // otherwise check if element matches value as selector
- : matchesUpTo(element, value, interactableElement);
- }
- /* eslint-disable multiline-ternary */
- function initCursors(browser) {
- return browser.isIe9 ? {
- x: 'e-resize',
- y: 's-resize',
- xy: 'se-resize',
- top: 'n-resize',
- left: 'w-resize',
- bottom: 's-resize',
- right: 'e-resize',
- topleft: 'se-resize',
- bottomright: 'se-resize',
- topright: 'ne-resize',
- bottomleft: 'ne-resize'
- } : {
- x: 'ew-resize',
- y: 'ns-resize',
- xy: 'nwse-resize',
- top: 'ns-resize',
- left: 'ew-resize',
- bottom: 'ns-resize',
- right: 'ew-resize',
- topleft: 'nwse-resize',
- bottomright: 'nwse-resize',
- topright: 'nesw-resize',
- bottomleft: 'nesw-resize'
- };
- }
- /* eslint-enable multiline-ternary */
- function start({
- iEvent,
- interaction
- }) {
- if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
- return;
- }
- const resizeEvent = iEvent;
- const rect = interaction.rect;
- interaction._rects = {
- start: extend({}, rect),
- corrected: extend({}, rect),
- previous: extend({}, rect),
- delta: {
- left: 0,
- right: 0,
- width: 0,
- top: 0,
- bottom: 0,
- height: 0
- }
- };
- resizeEvent.edges = interaction.prepared.edges;
- resizeEvent.rect = interaction._rects.corrected;
- resizeEvent.deltaRect = interaction._rects.delta;
- }
- function plugin_move({
- iEvent,
- interaction
- }) {
- if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
- return;
- }
- const resizeEvent = iEvent;
- const resizeOptions = interaction.interactable.options.resize;
- const invert = resizeOptions.invert;
- const invertible = invert === 'reposition' || invert === 'negate';
- const current = interaction.rect;
- const {
- start: startRect,
- corrected,
- delta: deltaRect,
- previous
- } = interaction._rects;
- extend(previous, corrected);
- if (invertible) {
- // if invertible, copy the current rect
- extend(corrected, current);
- if (invert === 'reposition') {
- // swap edge values if necessary to keep width/height positive
- if (corrected.top > corrected.bottom) {
- const swap = corrected.top;
- corrected.top = corrected.bottom;
- corrected.bottom = swap;
- }
- if (corrected.left > corrected.right) {
- const swap = corrected.left;
- corrected.left = corrected.right;
- corrected.right = swap;
- }
- }
- } else {
- // if not invertible, restrict to minimum of 0x0 rect
- corrected.top = Math.min(current.top, startRect.bottom);
- corrected.bottom = Math.max(current.bottom, startRect.top);
- corrected.left = Math.min(current.left, startRect.right);
- corrected.right = Math.max(current.right, startRect.left);
- }
- corrected.width = corrected.right - corrected.left;
- corrected.height = corrected.bottom - corrected.top;
- for (const edge in corrected) {
- deltaRect[edge] = corrected[edge] - previous[edge];
- }
- resizeEvent.edges = interaction.prepared.edges;
- resizeEvent.rect = corrected;
- resizeEvent.deltaRect = deltaRect;
- }
- function end({
- iEvent,
- interaction
- }) {
- if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
- return;
- }
- const resizeEvent = iEvent;
- resizeEvent.edges = interaction.prepared.edges;
- resizeEvent.rect = interaction._rects.corrected;
- resizeEvent.deltaRect = interaction._rects.delta;
- }
- function updateEventAxes({
- iEvent,
- interaction
- }) {
- if (interaction.prepared.name !== 'resize' || !interaction.resizeAxes) {
- return;
- }
- const options = interaction.interactable.options;
- const resizeEvent = iEvent;
- if (options.resize.square) {
- if (interaction.resizeAxes === 'y') {
- resizeEvent.delta.x = resizeEvent.delta.y;
- } else {
- resizeEvent.delta.y = resizeEvent.delta.x;
- }
- resizeEvent.axes = 'xy';
- } else {
- resizeEvent.axes = interaction.resizeAxes;
- if (interaction.resizeAxes === 'x') {
- resizeEvent.delta.y = 0;
- } else if (interaction.resizeAxes === 'y') {
- resizeEvent.delta.x = 0;
- }
- }
- }
- const resize = {
- id: 'actions/resize',
- before: ['actions/drag'],
- install: resize_plugin_install,
- listeners: {
- 'interactions:new': ({
- interaction
- }) => {
- interaction.resizeAxes = 'xy';
- },
- 'interactions:action-start': arg => {
- start(arg);
- updateEventAxes(arg);
- },
- 'interactions:action-move': arg => {
- plugin_move(arg);
- updateEventAxes(arg);
- },
- 'interactions:action-end': end,
- 'auto-start:check': resizeChecker
- },
- defaults: {
- square: false,
- preserveAspectRatio: false,
- axis: 'xy',
- // use default margin
- margin: NaN,
- // object with props left, right, top, bottom which are
- // true/false values to resize when the pointer is over that edge,
- // CSS selectors to match the handles for each direction
- // or the Elements for each handle
- edges: null,
- // a value of 'none' will limit the resize rect to a minimum of 0x0
- // 'negate' will alow the rect to have negative width/height
- // 'reposition' will keep the width/height positive by swapping
- // the top and bottom edges and/or swapping the left and right edges
- invert: 'none'
- },
- cursors: null,
- getCursor({
- edges,
- axis,
- name
- }) {
- const cursors = resize.cursors;
- let result = null;
- if (axis) {
- result = cursors[name + axis];
- } else if (edges) {
- let cursorKey = '';
- for (const edge of ['top', 'bottom', 'left', 'right']) {
- if (edges[edge]) {
- cursorKey += edge;
- }
- }
- result = cursors[cursorKey];
- }
- return result;
- },
- defaultMargin: null
- };
- /* harmony default export */ var resize_plugin = (resize);
- //# sourceMappingURL=plugin.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/actions/resize/index.js
- /* eslint-disable import/order, no-console, eol-last */
- if (typeof window === 'object' && !!window) {
- interact_init(window);
- }
- _interactjs_interact.use(resize_plugin);
- //# sourceMappingURL=index.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/edgeTarget.js
- /* harmony default export */ var edgeTarget = (() => {});
- //# sourceMappingURL=edgeTarget.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/elements.js
- /* harmony default export */ var snappers_elements = (() => {});
- //# sourceMappingURL=elements.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/grid.js
- /* harmony default export */ var grid = (grid => {
- const coordFields = [['x', 'y'], ['left', 'top'], ['right', 'bottom'], ['width', 'height']].filter(([xField, yField]) => xField in grid || yField in grid);
- const gridFunc = (x, y) => {
- const {
- range,
- limits = {
- left: -Infinity,
- right: Infinity,
- top: -Infinity,
- bottom: Infinity
- },
- offset = {
- x: 0,
- y: 0
- }
- } = grid;
- const result = {
- range,
- grid,
- x: null,
- y: null
- };
- for (const [xField, yField] of coordFields) {
- const gridx = Math.round((x - offset.x) / grid[xField]);
- const gridy = Math.round((y - offset.y) / grid[yField]);
- result[xField] = Math.max(limits.left, Math.min(limits.right, gridx * grid[xField] + offset.x));
- result[yField] = Math.max(limits.top, Math.min(limits.bottom, gridy * grid[yField] + offset.y));
- }
- return result;
- };
- gridFunc.grid = grid;
- gridFunc.coordFields = coordFields;
- return gridFunc;
- });
- //# sourceMappingURL=grid.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/all.js
- //# sourceMappingURL=all.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/plugin.js
- const snappersPlugin = {
- id: 'snappers',
- install(scope) {
- const {
- interactStatic: interact
- } = scope;
- interact.snappers = extend(interact.snappers || {}, all_namespaceObject);
- interact.createSnapGrid = interact.snappers.grid;
- }
- };
- /* harmony default export */ var snappers_plugin = (snappersPlugin);
- //# sourceMappingURL=plugin.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/Modification.js
- class Modification_Modification {
- constructor(interaction) {
- this.states = [];
- this.startOffset = {
- left: 0,
- right: 0,
- top: 0,
- bottom: 0
- };
- this.startDelta = null;
- this.result = null;
- this.endResult = null;
- this.edges = void 0;
- this.interaction = void 0;
- this.interaction = interaction;
- this.result = createResult();
- }
- start({
- phase
- }, pageCoords) {
- const {
- interaction
- } = this;
- const modifierList = getModifierList(interaction);
- this.prepareStates(modifierList);
- this.edges = extend({}, interaction.edges);
- this.startOffset = getRectOffset(interaction.rect, pageCoords);
- this.startDelta = {
- x: 0,
- y: 0
- };
- const arg = {
- phase,
- pageCoords,
- preEnd: false
- };
- this.result = createResult();
- this.startAll(arg);
- const result = this.result = this.setAll(arg);
- return result;
- }
- fillArg(arg) {
- const {
- interaction
- } = this;
- arg.interaction = interaction;
- arg.interactable = interaction.interactable;
- arg.element = interaction.element;
- arg.rect = arg.rect || interaction.rect;
- arg.edges = this.edges;
- arg.startOffset = this.startOffset;
- }
- startAll(arg) {
- this.fillArg(arg);
- for (const state of this.states) {
- if (state.methods.start) {
- arg.state = state;
- state.methods.start(arg);
- }
- }
- }
- setAll(arg) {
- this.fillArg(arg);
- const {
- phase,
- preEnd,
- skipModifiers,
- rect: unmodifiedRect
- } = arg;
- arg.coords = extend({}, arg.pageCoords);
- arg.rect = extend({}, unmodifiedRect);
- const states = skipModifiers ? this.states.slice(skipModifiers) : this.states;
- const newResult = createResult(arg.coords, arg.rect);
- for (const state of states) {
- const {
- options
- } = state;
- const lastModifierCoords = extend({}, arg.coords);
- let returnValue = null;
- if (state.methods.set && this.shouldDo(options, preEnd, phase)) {
- arg.state = state;
- returnValue = state.methods.set(arg);
- addEdges(this.interaction.edges, arg.rect, {
- x: arg.coords.x - lastModifierCoords.x,
- y: arg.coords.y - lastModifierCoords.y
- });
- }
- newResult.eventProps.push(returnValue);
- }
- newResult.delta.x = arg.coords.x - arg.pageCoords.x;
- newResult.delta.y = arg.coords.y - arg.pageCoords.y;
- newResult.rectDelta.left = arg.rect.left - unmodifiedRect.left;
- newResult.rectDelta.right = arg.rect.right - unmodifiedRect.right;
- newResult.rectDelta.top = arg.rect.top - unmodifiedRect.top;
- newResult.rectDelta.bottom = arg.rect.bottom - unmodifiedRect.bottom;
- const prevCoords = this.result.coords;
- const prevRect = this.result.rect;
- if (prevCoords && prevRect) {
- const rectChanged = newResult.rect.left !== prevRect.left || newResult.rect.right !== prevRect.right || newResult.rect.top !== prevRect.top || newResult.rect.bottom !== prevRect.bottom;
- newResult.changed = rectChanged || prevCoords.x !== newResult.coords.x || prevCoords.y !== newResult.coords.y;
- }
- return newResult;
- }
- applyToInteraction(arg) {
- const {
- interaction
- } = this;
- const {
- phase
- } = arg;
- const curCoords = interaction.coords.cur;
- const startCoords = interaction.coords.start;
- const {
- result,
- startDelta
- } = this;
- const curDelta = result.delta;
- if (phase === 'start') {
- extend(this.startDelta, result.delta);
- }
- for (const [coordsSet, delta] of [[startCoords, startDelta], [curCoords, curDelta]]) {
- coordsSet.page.x += delta.x;
- coordsSet.page.y += delta.y;
- coordsSet.client.x += delta.x;
- coordsSet.client.y += delta.y;
- }
- const {
- rectDelta
- } = this.result;
- const rect = arg.rect || interaction.rect;
- rect.left += rectDelta.left;
- rect.right += rectDelta.right;
- rect.top += rectDelta.top;
- rect.bottom += rectDelta.bottom;
- rect.width = rect.right - rect.left;
- rect.height = rect.bottom - rect.top;
- }
- setAndApply(arg) {
- const {
- interaction
- } = this;
- const {
- phase,
- preEnd,
- skipModifiers
- } = arg;
- const result = this.setAll({
- preEnd,
- phase,
- pageCoords: arg.modifiedCoords || interaction.coords.cur.page
- });
- this.result = result; // don't fire an action move if a modifier would keep the event in the same
- // cordinates as before
- if (!result.changed && (!skipModifiers || skipModifiers < this.states.length) && interaction.interacting()) {
- return false;
- }
- if (arg.modifiedCoords) {
- const {
- page
- } = interaction.coords.cur;
- const adjustment = {
- x: arg.modifiedCoords.x - page.x,
- y: arg.modifiedCoords.y - page.y
- };
- result.coords.x += adjustment.x;
- result.coords.y += adjustment.y;
- result.delta.x += adjustment.x;
- result.delta.y += adjustment.y;
- }
- this.applyToInteraction(arg);
- }
- beforeEnd(arg) {
- const {
- interaction,
- event
- } = arg;
- const states = this.states;
- if (!states || !states.length) {
- return;
- }
- let doPreend = false;
- for (const state of states) {
- arg.state = state;
- const {
- options,
- methods
- } = state;
- const endPosition = methods.beforeEnd && methods.beforeEnd(arg);
- if (endPosition) {
- this.endResult = endPosition;
- return false;
- }
- doPreend = doPreend || !doPreend && this.shouldDo(options, true, arg.phase, true);
- }
- if (doPreend) {
- // trigger a final modified move before ending
- interaction.move({
- event,
- preEnd: true
- });
- }
- }
- stop(arg) {
- const {
- interaction
- } = arg;
- if (!this.states || !this.states.length) {
- return;
- }
- const modifierArg = extend({
- states: this.states,
- interactable: interaction.interactable,
- element: interaction.element,
- rect: null
- }, arg);
- this.fillArg(modifierArg);
- for (const state of this.states) {
- modifierArg.state = state;
- if (state.methods.stop) {
- state.methods.stop(modifierArg);
- }
- }
- this.states = null;
- this.endResult = null;
- }
- prepareStates(modifierList) {
- this.states = [];
- for (let index = 0; index < modifierList.length; index++) {
- const {
- options,
- methods,
- name
- } = modifierList[index];
- this.states.push({
- options,
- methods,
- index,
- name
- });
- }
- return this.states;
- }
- restoreInteractionCoords({
- interaction: {
- coords,
- rect,
- modification
- }
- }) {
- if (!modification.result) {
- return;
- }
- const {
- startDelta
- } = modification;
- const {
- delta: curDelta,
- rectDelta
- } = modification.result;
- const coordsAndDeltas = [[coords.start, startDelta], [coords.cur, curDelta]];
- for (const [coordsSet, delta] of coordsAndDeltas) {
- coordsSet.page.x -= delta.x;
- coordsSet.page.y -= delta.y;
- coordsSet.client.x -= delta.x;
- coordsSet.client.y -= delta.y;
- }
- rect.left -= rectDelta.left;
- rect.right -= rectDelta.right;
- rect.top -= rectDelta.top;
- rect.bottom -= rectDelta.bottom;
- }
- shouldDo(options, preEnd, phase, requireEndOnly) {
- if ( // ignore disabled modifiers
- !options || options.enabled === false || // check if we require endOnly option to fire move before end
- requireEndOnly && !options.endOnly || // don't apply endOnly modifiers when not ending
- options.endOnly && !preEnd || // check if modifier should run be applied on start
- phase === 'start' && !options.setStart) {
- return false;
- }
- return true;
- }
- copyFrom(other) {
- this.startOffset = other.startOffset;
- this.startDelta = other.startDelta;
- this.edges = other.edges;
- this.states = other.states.map(s => clone(s));
- this.result = createResult(extend({}, other.result.coords), extend({}, other.result.rect));
- }
- destroy() {
- for (const prop in this) {
- this[prop] = null;
- }
- }
- }
- function createResult(coords, rect) {
- return {
- rect,
- coords,
- delta: {
- x: 0,
- y: 0
- },
- rectDelta: {
- left: 0,
- right: 0,
- top: 0,
- bottom: 0
- },
- eventProps: [],
- changed: true
- };
- }
- function getModifierList(interaction) {
- const actionOptions = interaction.interactable.options[interaction.prepared.name];
- const actionModifiers = actionOptions.modifiers;
- if (actionModifiers && actionModifiers.length) {
- return actionModifiers;
- }
- return ['snap', 'snapSize', 'snapEdges', 'restrict', 'restrictEdges', 'restrictSize'].map(type => {
- const options = actionOptions[type];
- return options && options.enabled && {
- options,
- methods: options._methods
- };
- }).filter(m => !!m);
- }
- function getRectOffset(rect, coords) {
- return rect ? {
- left: coords.x - rect.left,
- top: coords.y - rect.top,
- right: rect.right - coords.x,
- bottom: rect.bottom - coords.y
- } : {
- left: 0,
- top: 0,
- right: 0,
- bottom: 0
- };
- }
- //# sourceMappingURL=Modification.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/base.js
- function makeModifier(module, name) {
- const {
- defaults
- } = module;
- const methods = {
- start: module.start,
- set: module.set,
- beforeEnd: module.beforeEnd,
- stop: module.stop
- };
- const modifier = _options => {
- const options = _options || {};
- options.enabled = options.enabled !== false; // add missing defaults to options
- for (const prop in defaults) {
- if (!(prop in options)) {
- options[prop] = defaults[prop];
- }
- }
- const m = {
- options,
- methods,
- name,
- enable: () => {
- options.enabled = true;
- return m;
- },
- disable: () => {
- options.enabled = false;
- return m;
- }
- };
- return m;
- };
- if (name && typeof name === 'string') {
- // for backwrads compatibility
- modifier._defaults = defaults;
- modifier._methods = methods;
- }
- return modifier;
- }
- function addEventModifiers({
- iEvent,
- interaction: {
- modification: {
- result
- }
- }
- }) {
- if (result) {
- iEvent.modifiers = result.eventProps;
- }
- }
- const modifiersBase = {
- id: 'modifiers/base',
- before: ['actions'],
- install: scope => {
- scope.defaults.perAction.modifiers = [];
- },
- listeners: {
- 'interactions:new': ({
- interaction
- }) => {
- interaction.modification = new Modification_Modification(interaction);
- },
- 'interactions:before-action-start': arg => {
- const {
- modification
- } = arg.interaction;
- modification.start(arg, arg.interaction.coords.start.page);
- arg.interaction.edges = modification.edges;
- modification.applyToInteraction(arg);
- },
- 'interactions:before-action-move': arg => arg.interaction.modification.setAndApply(arg),
- 'interactions:before-action-end': arg => arg.interaction.modification.beforeEnd(arg),
- 'interactions:action-start': addEventModifiers,
- 'interactions:action-move': addEventModifiers,
- 'interactions:action-end': addEventModifiers,
- 'interactions:after-action-start': arg => arg.interaction.modification.restoreInteractionCoords(arg),
- 'interactions:after-action-move': arg => arg.interaction.modification.restoreInteractionCoords(arg),
- 'interactions:stop': arg => arg.interaction.modification.stop(arg)
- }
- };
- /* harmony default export */ var modifiers_base = (modifiersBase);
- //# sourceMappingURL=base.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/aspectRatio.js
- /**
- * @module modifiers/aspectRatio
- *
- * @description
- * This module forces elements to be resized with a specified dx/dy ratio.
- *
- * ```js
- * interact(target).resizable({
- * modifiers: [
- * interact.modifiers.snapSize({
- * targets: [ interact.snappers.grid({ x: 20, y: 20 }) ],
- * }),
- * interact.aspectRatio({ ratio: 'preserve' }),
- * ],
- * });
- * ```
- */
- const aspectRatio = {
- start(arg) {
- const {
- state,
- rect,
- edges: originalEdges,
- pageCoords: coords
- } = arg;
- let {
- ratio
- } = state.options;
- const {
- equalDelta,
- modifiers
- } = state.options;
- if (ratio === 'preserve') {
- ratio = rect.width / rect.height;
- }
- state.startCoords = extend({}, coords);
- state.startRect = extend({}, rect);
- state.ratio = ratio;
- state.equalDelta = equalDelta;
- const linkedEdges = state.linkedEdges = {
- top: originalEdges.top || originalEdges.left && !originalEdges.bottom,
- left: originalEdges.left || originalEdges.top && !originalEdges.right,
- bottom: originalEdges.bottom || originalEdges.right && !originalEdges.top,
- right: originalEdges.right || originalEdges.bottom && !originalEdges.left
- };
- state.xIsPrimaryAxis = !!(originalEdges.left || originalEdges.right);
- if (state.equalDelta) {
- state.edgeSign = (linkedEdges.left ? 1 : -1) * (linkedEdges.top ? 1 : -1);
- } else {
- const negativeSecondaryEdge = state.xIsPrimaryAxis ? linkedEdges.top : linkedEdges.left;
- state.edgeSign = negativeSecondaryEdge ? -1 : 1;
- }
- extend(arg.edges, linkedEdges);
- if (!modifiers || !modifiers.length) {
- return;
- }
- const subModification = new Modification_Modification(arg.interaction);
- subModification.copyFrom(arg.interaction.modification);
- subModification.prepareStates(modifiers);
- state.subModification = subModification;
- subModification.startAll({ ...arg
- });
- },
- set(arg) {
- const {
- state,
- rect,
- coords
- } = arg;
- const initialCoords = extend({}, coords);
- const aspectMethod = state.equalDelta ? setEqualDelta : setRatio;
- aspectMethod(state, state.xIsPrimaryAxis, coords, rect);
- if (!state.subModification) {
- return null;
- }
- const correctedRect = extend({}, rect);
- addEdges(state.linkedEdges, correctedRect, {
- x: coords.x - initialCoords.x,
- y: coords.y - initialCoords.y
- });
- const result = state.subModification.setAll({ ...arg,
- rect: correctedRect,
- edges: state.linkedEdges,
- pageCoords: coords,
- prevCoords: coords,
- prevRect: correctedRect
- });
- const {
- delta
- } = result;
- if (result.changed) {
- const xIsCriticalAxis = Math.abs(delta.x) > Math.abs(delta.y); // do aspect modification again with critical edge axis as primary
- aspectMethod(state, xIsCriticalAxis, result.coords, result.rect);
- extend(coords, result.coords);
- }
- return result.eventProps;
- },
- defaults: {
- ratio: 'preserve',
- equalDelta: false,
- modifiers: [],
- enabled: false
- }
- };
- function setEqualDelta({
- startCoords,
- edgeSign
- }, xIsPrimaryAxis, coords) {
- if (xIsPrimaryAxis) {
- coords.y = startCoords.y + (coords.x - startCoords.x) * edgeSign;
- } else {
- coords.x = startCoords.x + (coords.y - startCoords.y) * edgeSign;
- }
- }
- function setRatio({
- startRect,
- startCoords,
- ratio,
- edgeSign
- }, xIsPrimaryAxis, coords, rect) {
- if (xIsPrimaryAxis) {
- const newHeight = rect.width / ratio;
- coords.y = startCoords.y + (newHeight - startRect.height) * edgeSign;
- } else {
- const newWidth = rect.height * ratio;
- coords.x = startCoords.x + (newWidth - startRect.width) * edgeSign;
- }
- }
- /* harmony default export */ var modifiers_aspectRatio = (makeModifier(aspectRatio, 'aspectRatio'));
- //# sourceMappingURL=aspectRatio.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/noop.js
- const noop = () => {};
- noop._defaults = {};
- /* harmony default export */ var modifiers_noop = (noop);
- //# sourceMappingURL=noop.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/pointer.js
- function pointer_start({
- rect,
- startOffset,
- state,
- interaction,
- pageCoords
- }) {
- const {
- options
- } = state;
- const {
- elementRect
- } = options;
- const offset = extend({
- left: 0,
- top: 0,
- right: 0,
- bottom: 0
- }, options.offset || {});
- if (rect && elementRect) {
- const restriction = getRestrictionRect(options.restriction, interaction, pageCoords);
- if (restriction) {
- const widthDiff = restriction.right - restriction.left - rect.width;
- const heightDiff = restriction.bottom - restriction.top - rect.height;
- if (widthDiff < 0) {
- offset.left += widthDiff;
- offset.right += widthDiff;
- }
- if (heightDiff < 0) {
- offset.top += heightDiff;
- offset.bottom += heightDiff;
- }
- }
- offset.left += startOffset.left - rect.width * elementRect.left;
- offset.top += startOffset.top - rect.height * elementRect.top;
- offset.right += startOffset.right - rect.width * (1 - elementRect.right);
- offset.bottom += startOffset.bottom - rect.height * (1 - elementRect.bottom);
- }
- state.offset = offset;
- }
- function set({
- coords,
- interaction,
- state
- }) {
- const {
- options,
- offset
- } = state;
- const restriction = getRestrictionRect(options.restriction, interaction, coords);
- if (!restriction) {
- return;
- }
- const rect = xywhToTlbr(restriction);
- coords.x = Math.max(Math.min(rect.right - offset.right, coords.x), rect.left + offset.left);
- coords.y = Math.max(Math.min(rect.bottom - offset.bottom, coords.y), rect.top + offset.top);
- }
- function getRestrictionRect(value, interaction, coords) {
- if (is.func(value)) {
- return resolveRectLike(value, interaction.interactable, interaction.element, [coords.x, coords.y, interaction]);
- } else {
- return resolveRectLike(value, interaction.interactable, interaction.element);
- }
- }
- const pointer_defaults = {
- restriction: null,
- elementRect: null,
- offset: null,
- endOnly: false,
- enabled: false
- };
- const restrict = {
- start: pointer_start,
- set,
- defaults: pointer_defaults
- };
- /* harmony default export */ var restrict_pointer = (makeModifier(restrict, 'restrict'));
- //# sourceMappingURL=pointer.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/edges.js
- // This module adds the options.resize.restrictEdges setting which sets min and
- // max for the top, left, bottom and right edges of the target being resized.
- //
- // interact(target).resize({
- // edges: { top: true, left: true },
- // restrictEdges: {
- // inner: { top: 200, left: 200, right: 400, bottom: 400 },
- // outer: { top: 0, left: 0, right: 600, bottom: 600 },
- // },
- // })
- const noInner = {
- top: +Infinity,
- left: +Infinity,
- bottom: -Infinity,
- right: -Infinity
- };
- const noOuter = {
- top: -Infinity,
- left: -Infinity,
- bottom: +Infinity,
- right: +Infinity
- };
- function edges_start({
- interaction,
- startOffset,
- state
- }) {
- const {
- options
- } = state;
- let offset;
- if (options) {
- const offsetRect = getRestrictionRect(options.offset, interaction, interaction.coords.start.page);
- offset = rectToXY(offsetRect);
- }
- offset = offset || {
- x: 0,
- y: 0
- };
- state.offset = {
- top: offset.y + startOffset.top,
- left: offset.x + startOffset.left,
- bottom: offset.y - startOffset.bottom,
- right: offset.x - startOffset.right
- };
- }
- function edges_set({
- coords,
- edges,
- interaction,
- state
- }) {
- const {
- offset,
- options
- } = state;
- if (!edges) {
- return;
- }
- const page = extend({}, coords);
- const inner = getRestrictionRect(options.inner, interaction, page) || {};
- const outer = getRestrictionRect(options.outer, interaction, page) || {};
- fixRect(inner, noInner);
- fixRect(outer, noOuter);
- if (edges.top) {
- coords.y = Math.min(Math.max(outer.top + offset.top, page.y), inner.top + offset.top);
- } else if (edges.bottom) {
- coords.y = Math.max(Math.min(outer.bottom + offset.bottom, page.y), inner.bottom + offset.bottom);
- }
- if (edges.left) {
- coords.x = Math.min(Math.max(outer.left + offset.left, page.x), inner.left + offset.left);
- } else if (edges.right) {
- coords.x = Math.max(Math.min(outer.right + offset.right, page.x), inner.right + offset.right);
- }
- }
- function fixRect(rect, defaults) {
- for (const edge of ['top', 'left', 'bottom', 'right']) {
- if (!(edge in rect)) {
- rect[edge] = defaults[edge];
- }
- }
- return rect;
- }
- const edges_defaults = {
- inner: null,
- outer: null,
- offset: null,
- endOnly: false,
- enabled: false
- };
- const restrictEdges = {
- noInner,
- noOuter,
- start: edges_start,
- set: edges_set,
- defaults: edges_defaults
- };
- /* harmony default export */ var restrict_edges = (makeModifier(restrictEdges, 'restrictEdges'));
- //# sourceMappingURL=edges.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/rect.js
- const rect_defaults = extend({
- get elementRect() {
- return {
- top: 0,
- left: 0,
- bottom: 1,
- right: 1
- };
- },
- set elementRect(_) {}
- }, restrict.defaults);
- const restrictRect = {
- start: restrict.start,
- set: restrict.set,
- defaults: rect_defaults
- };
- /* harmony default export */ var restrict_rect = (makeModifier(restrictRect, 'restrictRect'));
- //# sourceMappingURL=rect.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/size.js
- const noMin = {
- width: -Infinity,
- height: -Infinity
- };
- const noMax = {
- width: +Infinity,
- height: +Infinity
- };
- function size_start(arg) {
- return restrictEdges.start(arg);
- }
- function size_set(arg) {
- const {
- interaction,
- state,
- rect,
- edges
- } = arg;
- const {
- options
- } = state;
- if (!edges) {
- return;
- }
- const minSize = tlbrToXywh(getRestrictionRect(options.min, interaction, arg.coords)) || noMin;
- const maxSize = tlbrToXywh(getRestrictionRect(options.max, interaction, arg.coords)) || noMax;
- state.options = {
- endOnly: options.endOnly,
- inner: extend({}, restrictEdges.noInner),
- outer: extend({}, restrictEdges.noOuter)
- };
- if (edges.top) {
- state.options.inner.top = rect.bottom - minSize.height;
- state.options.outer.top = rect.bottom - maxSize.height;
- } else if (edges.bottom) {
- state.options.inner.bottom = rect.top + minSize.height;
- state.options.outer.bottom = rect.top + maxSize.height;
- }
- if (edges.left) {
- state.options.inner.left = rect.right - minSize.width;
- state.options.outer.left = rect.right - maxSize.width;
- } else if (edges.right) {
- state.options.inner.right = rect.left + minSize.width;
- state.options.outer.right = rect.left + maxSize.width;
- }
- restrictEdges.set(arg);
- state.options = options;
- }
- const size_defaults = {
- min: null,
- max: null,
- endOnly: false,
- enabled: false
- };
- const restrictSize = {
- start: size_start,
- set: size_set,
- defaults: size_defaults
- };
- /* harmony default export */ var size = (makeModifier(restrictSize, 'restrictSize'));
- //# sourceMappingURL=size.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/pointer.js
- function snap_pointer_start(arg) {
- const {
- interaction,
- interactable,
- element,
- rect,
- state,
- startOffset
- } = arg;
- const {
- options
- } = state;
- const origin = options.offsetWithOrigin ? getOrigin(arg) : {
- x: 0,
- y: 0
- };
- let snapOffset;
- if (options.offset === 'startCoords') {
- snapOffset = {
- x: interaction.coords.start.page.x,
- y: interaction.coords.start.page.y
- };
- } else {
- const offsetRect = resolveRectLike(options.offset, interactable, element, [interaction]);
- snapOffset = rectToXY(offsetRect) || {
- x: 0,
- y: 0
- };
- snapOffset.x += origin.x;
- snapOffset.y += origin.y;
- }
- const {
- relativePoints
- } = options;
- state.offsets = rect && relativePoints && relativePoints.length ? relativePoints.map((relativePoint, index) => ({
- index,
- relativePoint,
- x: startOffset.left - rect.width * relativePoint.x + snapOffset.x,
- y: startOffset.top - rect.height * relativePoint.y + snapOffset.y
- })) : [extend({
- index: 0,
- relativePoint: null
- }, snapOffset)];
- }
- function pointer_set(arg) {
- const {
- interaction,
- coords,
- state
- } = arg;
- const {
- options,
- offsets
- } = state;
- const origin = getOriginXY(interaction.interactable, interaction.element, interaction.prepared.name);
- const page = extend({}, coords);
- const targets = [];
- if (!options.offsetWithOrigin) {
- page.x -= origin.x;
- page.y -= origin.y;
- }
- for (const offset of offsets) {
- const relativeX = page.x - offset.x;
- const relativeY = page.y - offset.y;
- for (let index = 0, len = options.targets.length; index < len; index++) {
- const snapTarget = options.targets[index];
- let target;
- if (is.func(snapTarget)) {
- target = snapTarget(relativeX, relativeY, interaction._proxy, offset, index);
- } else {
- target = snapTarget;
- }
- if (!target) {
- continue;
- }
- targets.push({
- x: (is.number(target.x) ? target.x : relativeX) + offset.x,
- y: (is.number(target.y) ? target.y : relativeY) + offset.y,
- range: is.number(target.range) ? target.range : options.range,
- source: snapTarget,
- index,
- offset
- });
- }
- }
- const closest = {
- target: null,
- inRange: false,
- distance: 0,
- range: 0,
- delta: {
- x: 0,
- y: 0
- }
- };
- for (const target of targets) {
- const range = target.range;
- const dx = target.x - page.x;
- const dy = target.y - page.y;
- const distance = hypot(dx, dy);
- let inRange = distance <= range; // Infinite targets count as being out of range
- // compared to non infinite ones that are in range
- if (range === Infinity && closest.inRange && closest.range !== Infinity) {
- inRange = false;
- }
- if (!closest.target || (inRange // is the closest target in range?
- ? closest.inRange && range !== Infinity // the pointer is relatively deeper in this target
- ? distance / range < closest.distance / closest.range // this target has Infinite range and the closest doesn't
- : range === Infinity && closest.range !== Infinity || // OR this target is closer that the previous closest
- distance < closest.distance : // The other is not in range and the pointer is closer to this target
- !closest.inRange && distance < closest.distance)) {
- closest.target = target;
- closest.distance = distance;
- closest.range = range;
- closest.inRange = inRange;
- closest.delta.x = dx;
- closest.delta.y = dy;
- }
- }
- if (closest.inRange) {
- coords.x = closest.target.x;
- coords.y = closest.target.y;
- }
- state.closest = closest;
- return closest;
- }
- function getOrigin(arg) {
- const {
- element
- } = arg.interaction;
- const optionsOrigin = rectToXY(resolveRectLike(arg.state.options.origin, null, null, [element]));
- const origin = optionsOrigin || getOriginXY(arg.interactable, element, arg.interaction.prepared.name);
- return origin;
- }
- const snap_pointer_defaults = {
- range: Infinity,
- targets: null,
- offset: null,
- offsetWithOrigin: true,
- origin: null,
- relativePoints: null,
- endOnly: false,
- enabled: false
- };
- const snap = {
- start: snap_pointer_start,
- set: pointer_set,
- defaults: snap_pointer_defaults
- };
- /* harmony default export */ var snap_pointer = (makeModifier(snap, 'snap'));
- //# sourceMappingURL=pointer.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/size.js
- // This module allows snapping of the size of targets during resize
- // interactions.
- function snap_size_start(arg) {
- const {
- state,
- edges
- } = arg;
- const {
- options
- } = state;
- if (!edges) {
- return null;
- }
- arg.state = {
- options: {
- targets: null,
- relativePoints: [{
- x: edges.left ? 0 : 1,
- y: edges.top ? 0 : 1
- }],
- offset: options.offset || 'self',
- origin: {
- x: 0,
- y: 0
- },
- range: options.range
- }
- };
- state.targetFields = state.targetFields || [['width', 'height'], ['x', 'y']];
- snap.start(arg);
- state.offsets = arg.state.offsets;
- arg.state = state;
- }
- function snap_size_set(arg) {
- const {
- interaction,
- state,
- coords
- } = arg;
- const {
- options,
- offsets
- } = state;
- const relative = {
- x: coords.x - offsets[0].x,
- y: coords.y - offsets[0].y
- };
- state.options = extend({}, options);
- state.options.targets = [];
- for (const snapTarget of options.targets || []) {
- let target;
- if (is.func(snapTarget)) {
- target = snapTarget(relative.x, relative.y, interaction);
- } else {
- target = snapTarget;
- }
- if (!target) {
- continue;
- }
- for (const [xField, yField] of state.targetFields) {
- if (xField in target || yField in target) {
- target.x = target[xField];
- target.y = target[yField];
- break;
- }
- }
- state.options.targets.push(target);
- }
- const returnValue = snap.set(arg);
- state.options = options;
- return returnValue;
- }
- const snap_size_defaults = {
- range: Infinity,
- targets: null,
- offset: null,
- endOnly: false,
- enabled: false
- };
- const snapSize = {
- start: snap_size_start,
- set: snap_size_set,
- defaults: snap_size_defaults
- };
- /* harmony default export */ var snap_size = (makeModifier(snapSize, 'snapSize'));
- //# sourceMappingURL=size.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/edges.js
- /**
- * @module modifiers/snapEdges
- *
- * @description
- * WOW> This module allows snapping of the edges of targets during resize
- * interactions.
- *
- * ```js
- * interact(target).resizable({
- * snapEdges: {
- * targets: [interact.snappers.grid({ x: 100, y: 50 })],
- * },
- * })
- *
- * interact(target).resizable({
- * snapEdges: {
- * targets: [
- * interact.snappers.grid({
- * top: 50,
- * left: 50,
- * bottom: 100,
- * right: 100,
- * }),
- * ],
- * },
- * })
- * ```
- */
- function snap_edges_start(arg) {
- const {
- edges
- } = arg;
- if (!edges) {
- return null;
- }
- arg.state.targetFields = arg.state.targetFields || [[edges.left ? 'left' : 'right', edges.top ? 'top' : 'bottom']];
- return snapSize.start(arg);
- }
- const snapEdges = {
- start: snap_edges_start,
- set: snapSize.set,
- defaults: extend(clone(snapSize.defaults), {
- targets: null,
- range: null,
- offset: {
- x: 0,
- y: 0
- }
- })
- };
- /* harmony default export */ var snap_edges = (makeModifier(snapEdges, 'snapEdges'));
- //# sourceMappingURL=edges.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/all.js
- /* eslint-disable node/no-extraneous-import */
- /* harmony default export */ var modifiers_all = ({
- aspectRatio: modifiers_aspectRatio,
- restrictEdges: restrict_edges,
- restrict: restrict_pointer,
- restrictRect: restrict_rect,
- restrictSize: size,
- snapEdges: snap_edges,
- snap: snap_pointer,
- snapSize: snap_size,
- spring: modifiers_noop,
- avoid: modifiers_noop,
- transform: modifiers_noop,
- rubberband: modifiers_noop
- });
- //# sourceMappingURL=all.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/plugin.js
- const plugin_modifiers = {
- id: 'modifiers',
- install(scope) {
- const {
- interactStatic: interact
- } = scope;
- scope.usePlugin(modifiers_base);
- scope.usePlugin(snappers_plugin);
- interact.modifiers = modifiers_all; // for backwrads compatibility
- for (const type in modifiers_all) {
- const {
- _defaults,
- _methods
- } = modifiers_all[type];
- _defaults._methods = _methods;
- scope.defaults.perAction[type] = _defaults;
- }
- }
- };
- /* harmony default export */ var modifiers_plugin = (plugin_modifiers);
- //# sourceMappingURL=plugin.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/index.js
- /* eslint-disable import/order, no-console, eol-last */
- if (typeof window === 'object' && !!window) {
- interact_init(window);
- }
- _interactjs_interact.use(modifiers_plugin);
- //# sourceMappingURL=index.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/dev-tools/plugin.js
- /* eslint-disable no-console */
- var CheckName;
- (function (CheckName) {
- CheckName["touchAction"] = "touchAction";
- CheckName["boxSizing"] = "boxSizing";
- CheckName["noListeners"] = "noListeners";
- })(CheckName || (CheckName = {}));
- const prefix = '[interact.js] ';
- const links = {
- touchAction: 'https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action',
- boxSizing: 'https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing'
- }; // eslint-disable-next-line no-undef
- const isProduction = "development" === 'production'; // eslint-disable-next-line no-restricted-syntax
- function dev_tools_plugin_install(scope, {
- logger
- } = {}) {
- const {
- Interactable,
- defaults
- } = scope;
- scope.logger = logger || console;
- defaults.base.devTools = {
- ignore: {}
- };
- Interactable.prototype.devTools = function (options) {
- if (options) {
- extend(this.options.devTools, options);
- return this;
- }
- return this.options.devTools;
- };
- }
- const checks = [{
- name: CheckName.touchAction,
- perform({
- element
- }) {
- return !parentHasStyle(element, 'touchAction', /pan-|pinch|none/);
- },
- getInfo({
- element
- }) {
- return [element, links.touchAction];
- },
- text: 'Consider adding CSS "touch-action: none" to this element\n'
- }, {
- name: CheckName.boxSizing,
- perform(interaction) {
- const {
- element
- } = interaction;
- return interaction.prepared.name === 'resize' && element instanceof utils_domObjects.HTMLElement && !hasStyle(element, 'boxSizing', /border-box/);
- },
- text: 'Consider adding CSS "box-sizing: border-box" to this resizable element',
- getInfo({
- element
- }) {
- return [element, links.boxSizing];
- }
- }, {
- name: CheckName.noListeners,
- perform(interaction) {
- const actionName = interaction.prepared.name;
- const moveListeners = interaction.interactable.events.types[`${actionName}move`] || [];
- return !moveListeners.length;
- },
- getInfo(interaction) {
- return [interaction.prepared.name, interaction.interactable];
- },
- text: 'There are no listeners set for this action'
- }];
- function hasStyle(element, prop, styleRe) {
- const value = element.style[prop] || win.getComputedStyle(element)[prop];
- return styleRe.test((value || '').toString());
- }
- function parentHasStyle(element, prop, styleRe) {
- let parent = element;
- while (is.element(parent)) {
- if (hasStyle(parent, prop, styleRe)) {
- return true;
- }
- parent = parentNode(parent);
- }
- return false;
- }
- const plugin_id = 'dev-tools';
- const defaultExport = isProduction ? {
- id: plugin_id,
- install: () => {}
- } : {
- id: plugin_id,
- install: dev_tools_plugin_install,
- listeners: {
- 'interactions:action-start': ({
- interaction
- }, scope) => {
- for (const check of checks) {
- const options = interaction.interactable && interaction.interactable.options;
- if (!(options && options.devTools && options.devTools.ignore[check.name]) && check.perform(interaction)) {
- scope.logger.warn(prefix + check.text, ...check.getInfo(interaction));
- }
- }
- }
- },
- checks,
- CheckName,
- links,
- prefix
- };
- /* harmony default export */ var dev_tools_plugin = (defaultExport);
- //# sourceMappingURL=plugin.js.map
- // CONCATENATED MODULE: ./node_modules/@interactjs/dev-tools/index.js
- /* eslint-disable import/order, no-console, eol-last */
- if (typeof window === 'object' && !!window) {
- interact_init(window);
- }
- _interactjs_interact.use(dev_tools_plugin);
- //# sourceMappingURL=index.js.map
- // 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
- // var eventBus = require('./eventBus');
- /* harmony default export */ var GridItemvue_type_script_lang_js = ({
- name: "GridItem",
- props: {
- /*cols: {
- type: Number,
- required: true
- },*/
- /*containerWidth: {
- type: Number,
- required: true
- },
- rowHeight: {
- type: Number,
- required: true
- },
- margin: {
- type: Array,
- required: true
- },
- maxRows: {
- type: Number,
- required: true
- },*/
- isDraggable: {
- type: Boolean,
- required: false,
- default: null
- },
- isResizable: {
- type: Boolean,
- required: false,
- default: null
- },
- /*useCssTransforms: {
- type: Boolean,
- required: true
- },
- */
- static: {
- type: Boolean,
- required: false,
- default: false
- },
- minH: {
- type: Number,
- required: false,
- default: 1
- },
- minW: {
- type: Number,
- required: false,
- default: 1
- },
- maxH: {
- type: Number,
- required: false,
- default: Infinity
- },
- maxW: {
- type: Number,
- required: false,
- default: Infinity
- },
- x: {
- type: Number,
- required: true
- },
- y: {
- type: Number,
- required: true
- },
- w: {
- type: Number,
- required: true
- },
- h: {
- type: Number,
- required: true
- },
- i: {
- required: true
- },
- dragIgnoreFrom: {
- type: String,
- required: false,
- default: 'a, button'
- },
- dragAllowFrom: {
- type: String,
- required: false,
- default: null
- },
- resizeIgnoreFrom: {
- type: String,
- required: false,
- default: 'a, button'
- },
- preserveAspectRatio: {
- type: Boolean,
- required: false,
- default: false
- }
- },
- inject: ["eventBus", "layout"],
- data: function data() {
- return {
- cols: 1,
- containerWidth: 100,
- rowHeight: 30,
- margin: [10, 10],
- maxRows: Infinity,
- draggable: null,
- resizable: null,
- useCssTransforms: true,
- useStyleCursor: true,
- isDragging: false,
- dragging: null,
- isResizing: false,
- resizing: null,
- lastX: NaN,
- lastY: NaN,
- lastW: NaN,
- lastH: NaN,
- style: {},
- rtl: false,
- dragEventSet: false,
- resizeEventSet: false,
- previousW: null,
- previousH: null,
- previousX: null,
- previousY: null,
- innerX: this.x,
- innerY: this.y,
- innerW: this.w,
- innerH: this.h
- };
- },
- created: function created() {
- var _this = this;
- var self = this; // Accessible refernces of functions for removing in beforeUnmount
- self.updateWidthHandler = function (width) {
- self.updateWidth(width);
- };
- self.compactHandler = function (layout) {
- self.compact(layout);
- };
- self.setDraggableHandler = function (isDraggable) {
- if (self.isDraggable === null) {
- self.draggable = isDraggable;
- }
- };
- self.setResizableHandler = function (isResizable) {
- if (self.isResizable === null) {
- self.resizable = isResizable;
- }
- };
- self.setRowHeightHandler = function (rowHeight) {
- self.rowHeight = rowHeight;
- };
- self.setMaxRowsHandler = function (maxRows) {
- self.maxRows = maxRows;
- };
- self.directionchangeHandler = function () {
- _this.rtl = getDocumentDir() === 'rtl';
- _this.compact();
- };
- self.setColNum = function (colNum) {
- self.cols = parseInt(colNum);
- };
- this.eventBus.on('updateWidth', self.updateWidthHandler);
- this.eventBus.on('compact', self.compactHandler);
- this.eventBus.on('setDraggable', self.setDraggableHandler);
- this.eventBus.on('setResizable', self.setResizableHandler);
- this.eventBus.on('setRowHeight', self.setRowHeightHandler);
- this.eventBus.on('setMaxRows', self.setMaxRowsHandler);
- this.eventBus.on('directionchange', self.directionchangeHandler);
- this.eventBus.on('setColNum', self.setColNum);
- this.rtl = getDocumentDir() === 'rtl';
- },
- beforeUnmount: function beforeUnmount() {
- var self = this; //Remove listeners
- this.eventBus.off('updateWidth', self.updateWidthHandler);
- this.eventBus.off('compact', self.compactHandler);
- this.eventBus.off('setDraggable', self.setDraggableHandler);
- this.eventBus.off('setResizable', self.setResizableHandler);
- this.eventBus.off('setRowHeight', self.setRowHeightHandler);
- this.eventBus.off('setMaxRows', self.setMaxRowsHandler);
- this.eventBus.off('directionchange', self.directionchangeHandler);
- this.eventBus.off('setColNum', self.setColNum);
- if (this.interactObj) {
- this.interactObj.unset(); // destroy interact intance
- }
- },
- mounted: function mounted() {
- if (this.layout.responsive && this.layout.lastBreakpoint) {
- this.cols = getColsFromBreakpoint(this.layout.lastBreakpoint, this.layout.cols);
- } else {
- this.cols = this.layout.colNum;
- }
- this.rowHeight = this.layout.rowHeight;
- this.containerWidth = this.layout.width !== null ? this.layout.width : 100;
- this.margin = this.layout.margin !== undefined ? this.layout.margin : [10, 10];
- this.maxRows = this.layout.maxRows;
- if (this.isDraggable === null) {
- this.draggable = this.layout.isDraggable;
- } else {
- this.draggable = this.isDraggable;
- }
- if (this.isResizable === null) {
- this.resizable = this.layout.isResizable;
- } else {
- this.resizable = this.isResizable;
- }
- this.useCssTransforms = this.layout.useCssTransforms;
- this.useStyleCursor = this.layout.useStyleCursor;
- this.createStyle();
- },
- watch: {
- isDraggable: function isDraggable() {
- this.draggable = this.isDraggable;
- },
- static: function _static() {
- this.tryMakeDraggable();
- this.tryMakeResizable();
- },
- draggable: function draggable() {
- this.tryMakeDraggable();
- },
- isResizable: function isResizable() {
- this.resizable = this.isResizable;
- },
- resizable: function resizable() {
- this.tryMakeResizable();
- },
- rowHeight: function rowHeight() {
- this.createStyle();
- this.emitContainerResized();
- },
- cols: function cols() {
- this.tryMakeResizable();
- this.createStyle();
- this.emitContainerResized();
- },
- containerWidth: function containerWidth() {
- this.tryMakeResizable();
- this.createStyle();
- this.emitContainerResized();
- },
- x: function x(newVal) {
- this.innerX = newVal;
- this.createStyle();
- },
- y: function y(newVal) {
- this.innerY = newVal;
- this.createStyle();
- },
- h: function h(newVal) {
- this.innerH = newVal;
- this.createStyle(); // this.emitContainerResized();
- },
- w: function w(newVal) {
- this.innerW = newVal;
- this.createStyle(); // this.emitContainerResized();
- },
- renderRtl: function renderRtl() {
- // console.log("### renderRtl");
- this.tryMakeResizable();
- this.createStyle();
- },
- minH: function minH() {
- this.tryMakeResizable();
- },
- maxH: function maxH() {
- this.tryMakeResizable();
- },
- minW: function minW() {
- this.tryMakeResizable();
- },
- maxW: function maxW() {
- this.tryMakeResizable();
- },
- "$parent.margin": function $parentMargin(margin) {
- if (!margin || margin[0] == this.margin[0] && margin[1] == this.margin[1]) {
- return;
- }
- this.margin = margin.map(function (m) {
- return Number(m);
- });
- this.createStyle();
- this.emitContainerResized();
- }
- },
- computed: {
- classObj: function classObj() {
- return {
- 'vue-resizable': this.resizableAndNotStatic,
- 'static': this.static,
- 'resizing': this.isResizing,
- 'vue-draggable-dragging': this.isDragging,
- 'cssTransforms': this.useCssTransforms,
- 'render-rtl': this.renderRtl,
- 'disable-userselect': this.isDragging,
- 'no-touch': this.isAndroid && this.draggableOrResizableAndNotStatic
- };
- },
- resizableAndNotStatic: function resizableAndNotStatic() {
- return this.resizable && !this.static;
- },
- draggableOrResizableAndNotStatic: function draggableOrResizableAndNotStatic() {
- return (this.draggable || this.resizable) && !this.static;
- },
- isAndroid: function isAndroid() {
- return navigator.userAgent.toLowerCase().indexOf("android") !== -1;
- },
- renderRtl: function renderRtl() {
- return this.layout.isMirrored ? !this.rtl : this.rtl;
- },
- resizableHandleClass: function resizableHandleClass() {
- if (this.renderRtl) {
- return 'vue-resizable-handle vue-rtl-resizable-handle';
- } else {
- return 'vue-resizable-handle';
- }
- }
- },
- methods: {
- createStyle: function createStyle() {
- if (this.x + this.w > this.cols) {
- this.innerX = 0;
- this.innerW = this.w > this.cols ? this.cols : this.w;
- } else {
- this.innerX = this.x;
- this.innerW = this.w;
- }
- var pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
- if (this.isDragging) {
- pos.top = this.dragging.top; // Add rtl support
- if (this.renderRtl) {
- pos.right = this.dragging.left;
- } else {
- pos.left = this.dragging.left;
- }
- }
- if (this.isResizing) {
- pos.width = this.resizing.width;
- pos.height = this.resizing.height;
- }
- var style; // CSS Transforms support (default)
- if (this.useCssTransforms) {
- // Add rtl support
- if (this.renderRtl) {
- style = setTransformRtl(pos.top, pos.right, pos.width, pos.height);
- } else {
- style = setTransform(pos.top, pos.left, pos.width, pos.height);
- }
- } else {
- // top,left (slow)
- // Add rtl support
- if (this.renderRtl) {
- style = setTopRight(pos.top, pos.right, pos.width, pos.height);
- } else {
- style = setTopLeft(pos.top, pos.left, pos.width, pos.height);
- }
- }
- this.style = style;
- },
- emitContainerResized: function emitContainerResized() {
- // this.style has width and height with trailing 'px'. The
- // resized event is without them
- var styleProps = {};
- for (var _i = 0, _arr = ['width', 'height']; _i < _arr.length; _i++) {
- var prop = _arr[_i];
- var val = this.style[prop];
- var matches = val.match(/^(\d+)px$/);
- if (!matches) return;
- styleProps[prop] = matches[1];
- }
- this.$emit("container-resized", this.i, this.h, this.w, styleProps.height, styleProps.width);
- },
- handleResize: function handleResize(event) {
- if (this.static) return;
- var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
- if (position == null) return; // not possible but satisfies flow
- var x = position.x,
- y = position.y;
- var newSize = {
- width: 0,
- height: 0
- };
- var pos;
- switch (event.type) {
- case "resizestart":
- {
- this.previousW = this.innerW;
- this.previousH = this.innerH;
- pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
- newSize.width = pos.width;
- newSize.height = pos.height;
- this.resizing = newSize;
- this.isResizing = true;
- break;
- }
- case "resizemove":
- {
- // console.log("### resize => " + event.type + ", lastW=" + this.lastW + ", lastH=" + this.lastH);
- var coreEvent = createCoreData(this.lastW, this.lastH, x, y);
- if (this.renderRtl) {
- newSize.width = this.resizing.width - coreEvent.deltaX;
- } else {
- newSize.width = this.resizing.width + coreEvent.deltaX;
- }
- newSize.height = this.resizing.height + coreEvent.deltaY; ///console.log("### resize => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
- this.resizing = newSize;
- break;
- }
- case "resizeend":
- {
- //console.log("### resize end => x=" +this.innerX + " y=" + this.innerY + " w=" + this.innerW + " h=" + this.innerH);
- pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
- newSize.width = pos.width;
- newSize.height = pos.height; // console.log("### resize end => " + JSON.stringify(newSize));
- this.resizing = null;
- this.isResizing = false;
- break;
- }
- } // Get new WH
- pos = this.calcWH(newSize.height, newSize.width);
- if (pos.w < this.minW) {
- pos.w = this.minW;
- }
- if (pos.w > this.maxW) {
- pos.w = this.maxW;
- }
- if (pos.h < this.minH) {
- pos.h = this.minH;
- }
- if (pos.h > this.maxH) {
- pos.h = this.maxH;
- }
- if (pos.h < 1) {
- pos.h = 1;
- }
- if (pos.w < 1) {
- pos.w = 1;
- }
- this.lastW = x;
- this.lastH = y;
- if (this.innerW !== pos.w || this.innerH !== pos.h) {
- this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
- }
- if (event.type === "resizeend" && (this.previousW !== this.innerW || this.previousH !== this.innerH)) {
- this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
- }
- this.eventBus.emit("resizeEvent", {
- eventType: event.type,
- i: this.i,
- x: this.innerX,
- y: this.innerY,
- h: pos.h,
- w: pos.w
- });
- },
- handleDrag: function handleDrag(event) {
- if (this.static) return;
- if (this.isResizing) return;
- var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
- if (position === null) return; // not possible but satisfies flow
- var x = position.x,
- y = position.y; // let shouldUpdate = false;
- var newPosition = {
- top: 0,
- left: 0
- };
- switch (event.type) {
- case "dragstart":
- {
- this.previousX = this.innerX;
- this.previousY = this.innerY;
- var parentRect = event.target.offsetParent.getBoundingClientRect();
- var clientRect = event.target.getBoundingClientRect();
- if (this.renderRtl) {
- newPosition.left = (clientRect.right - parentRect.right) * -1;
- } else {
- newPosition.left = clientRect.left - parentRect.left;
- }
- newPosition.top = clientRect.top - parentRect.top;
- this.dragging = newPosition;
- this.isDragging = true;
- break;
- }
- case "dragend":
- {
- if (!this.isDragging) return;
- var _parentRect = event.target.offsetParent.getBoundingClientRect();
- var _clientRect = event.target.getBoundingClientRect(); // Add rtl support
- if (this.renderRtl) {
- newPosition.left = (_clientRect.right - _parentRect.right) * -1;
- } else {
- newPosition.left = _clientRect.left - _parentRect.left;
- }
- newPosition.top = _clientRect.top - _parentRect.top; // console.log("### drag end => " + JSON.stringify(newPosition));
- // console.log("### DROP: " + JSON.stringify(newPosition));
- this.dragging = null;
- this.isDragging = false; // shouldUpdate = true;
- break;
- }
- case "dragmove":
- {
- var coreEvent = createCoreData(this.lastX, this.lastY, x, y); // Add rtl support
- if (this.renderRtl) {
- newPosition.left = this.dragging.left - coreEvent.deltaX;
- } else {
- newPosition.left = this.dragging.left + coreEvent.deltaX;
- }
- newPosition.top = this.dragging.top + coreEvent.deltaY; // console.log("### drag => " + event.type + ", x=" + x + ", y=" + y);
- // console.log("### drag => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
- // console.log("### drag end => " + JSON.stringify(newPosition));
- this.dragging = newPosition;
- break;
- }
- } // Get new XY
- var pos;
- if (this.renderRtl) {
- pos = this.calcXY(newPosition.top, newPosition.left);
- } else {
- pos = this.calcXY(newPosition.top, newPosition.left);
- }
- this.lastX = x;
- this.lastY = y;
- if (this.innerX !== pos.x || this.innerY !== pos.y) {
- this.$emit("move", this.i, pos.x, pos.y);
- }
- if (event.type === "dragend" && (this.previousX !== this.innerX || this.previousY !== this.innerY)) {
- this.$emit("moved", this.i, pos.x, pos.y);
- }
- this.eventBus.emit("dragEvent", {
- eventType: event.type,
- i: this.i,
- x: pos.x,
- y: pos.y,
- h: this.innerH,
- w: this.innerW
- });
- },
- calcPosition: function calcPosition(x, y, w, h) {
- var colWidth = this.calcColWidth(); // add rtl support
- var out;
- if (this.renderRtl) {
- out = {
- right: Math.round(colWidth * x + (x + 1) * this.margin[0]),
- top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
- // 0 * Infinity === NaN, which causes problems with resize constriants;
- // Fix this if it occurs.
- // Note we do it here rather than later because Math.round(Infinity) causes deopt
- width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
- height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
- };
- } else {
- out = {
- left: Math.round(colWidth * x + (x + 1) * this.margin[0]),
- top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
- // 0 * Infinity === NaN, which causes problems with resize constriants;
- // Fix this if it occurs.
- // Note we do it here rather than later because Math.round(Infinity) causes deopt
- width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
- height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
- };
- }
- return out;
- },
- /**
- * Translate x and y coordinates from pixels to grid units.
- * @param {Number} top Top position (relative to parent) in pixels.
- * @param {Number} left Left position (relative to parent) in pixels.
- * @return {Object} x and y in grid units.
- */
- // TODO check if this function needs change in order to support rtl.
- calcXY: function calcXY(top, left) {
- var colWidth = this.calcColWidth(); // left = colWidth * x + margin * (x + 1)
- // l = cx + m(x+1)
- // l = cx + mx + m
- // l - m = cx + mx
- // l - m = x(c + m)
- // (l - m) / (c + m) = x
- // x = (left - margin) / (coldWidth + margin)
- var x = Math.round((left - this.margin[0]) / (colWidth + this.margin[0]));
- var y = Math.round((top - this.margin[1]) / (this.rowHeight + this.margin[1])); // Capping
- x = Math.max(Math.min(x, this.cols - this.innerW), 0);
- y = Math.max(Math.min(y, this.maxRows - this.innerH), 0);
- return {
- x: x,
- y: y
- };
- },
- // Helper for generating column width
- calcColWidth: function calcColWidth() {
- var colWidth = (this.containerWidth - this.margin[0] * (this.cols + 1)) / this.cols; // console.log("### COLS=" + this.cols + " COL WIDTH=" + colWidth + " MARGIN " + this.margin[0]);
- return colWidth;
- },
- /**
- * Given a height and width in pixel values, calculate grid units.
- * @param {Number} height Height in pixels.
- * @param {Number} width Width in pixels.
- * @param {Boolean} autoSizeFlag function autoSize identifier.
- * @return {Object} w, h as grid units.
- */
- calcWH: function calcWH(height, width) {
- var autoSizeFlag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var colWidth = this.calcColWidth(); // width = colWidth * w - (margin * (w - 1))
- // ...
- // w = (width + margin) / (colWidth + margin)
- var w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
- var h = 0;
- if (!autoSizeFlag) {
- h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
- } else {
- h = Math.ceil((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
- } // Capping
- w = Math.max(Math.min(w, this.cols - this.innerX), 0);
- h = Math.max(Math.min(h, this.maxRows - this.innerY), 0);
- return {
- w: w,
- h: h
- };
- },
- updateWidth: function updateWidth(width, colNum) {
- this.containerWidth = width;
- if (colNum !== undefined && colNum !== null) {
- this.cols = colNum;
- }
- },
- compact: function compact() {
- this.createStyle();
- },
- tryMakeDraggable: function tryMakeDraggable() {
- var self = this;
- if (this.interactObj === null || this.interactObj === undefined) {
- this.interactObj = _interactjs_interact(this.$refs.item);
- if (!this.useStyleCursor) {
- this.interactObj.styleCursor(false);
- }
- }
- if (this.draggable && !this.static) {
- var opts = {
- ignoreFrom: this.dragIgnoreFrom,
- allowFrom: this.dragAllowFrom
- };
- this.interactObj.draggable(opts);
- /*this.interactObj.draggable({allowFrom: '.vue-draggable-handle'});*/
- if (!this.dragEventSet) {
- this.dragEventSet = true;
- this.interactObj.on('dragstart dragmove dragend', function (event) {
- self.handleDrag(event);
- });
- }
- } else {
- this.interactObj.draggable({
- enabled: false
- });
- }
- },
- tryMakeResizable: function tryMakeResizable() {
- var self = this;
- if (this.interactObj === null || this.interactObj === undefined) {
- this.interactObj = _interactjs_interact(this.$refs.item);
- if (!this.useStyleCursor) {
- this.interactObj.styleCursor(false);
- }
- }
- if (this.resizable && !this.static) {
- var maximum = this.calcPosition(0, 0, this.maxW, this.maxH);
- var minimum = this.calcPosition(0, 0, this.minW, this.minH); // console.log("### MAX " + JSON.stringify(maximum));
- // console.log("### MIN " + JSON.stringify(minimum));
- var opts = {
- // allowFrom: "." + this.resizableHandleClass.trim().replace(" ", "."),
- edges: {
- left: false,
- right: "." + this.resizableHandleClass.trim().replace(" ", "."),
- bottom: "." + this.resizableHandleClass.trim().replace(" ", "."),
- top: false
- },
- ignoreFrom: this.resizeIgnoreFrom,
- restrictSize: {
- min: {
- height: minimum.height,
- width: minimum.width
- },
- max: {
- height: maximum.height,
- width: maximum.width
- }
- }
- };
- if (this.preserveAspectRatio) {
- opts.modifiers = [_interactjs_interact.modifiers.aspectRatio({
- ratio: 'preserve'
- })];
- }
- this.interactObj.resizable(opts);
- if (!this.resizeEventSet) {
- this.resizeEventSet = true;
- this.interactObj.on('resizestart resizemove resizeend', function (event) {
- self.handleResize(event);
- });
- }
- } else {
- this.interactObj.resizable({
- enabled: false
- });
- }
- },
- autoSize: function autoSize() {
- // ok here we want to calculate if a resize is needed
- this.previousW = this.innerW;
- this.previousH = this.innerH;
- var newSize = this.$slots().default[0].elm.getBoundingClientRect();
- var pos = this.calcWH(newSize.height, newSize.width, true);
- if (pos.w < this.minW) {
- pos.w = this.minW;
- }
- if (pos.w > this.maxW) {
- pos.w = this.maxW;
- }
- if (pos.h < this.minH) {
- pos.h = this.minH;
- }
- if (pos.h > this.maxH) {
- pos.h = this.maxH;
- }
- if (pos.h < 1) {
- pos.h = 1;
- }
- if (pos.w < 1) {
- pos.w = 1;
- } // this.lastW = x; // basically, this is copied from resizehandler, but shouldn't be needed
- // this.lastH = y;
- if (this.innerW !== pos.w || this.innerH !== pos.h) {
- this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
- }
- if (this.previousW !== pos.w || this.previousH !== pos.h) {
- this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
- this.eventBus.emit("resizeEvent", {
- eventType: "resizeend",
- i: this.i,
- x: this.innerX,
- y: this.innerY,
- h: pos.h,
- w: pos.w
- });
- }
- }
- }
- });
- // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=script&lang=js
-
- // EXTERNAL MODULE: ./src/components/GridItem.vue?vue&type=style&index=0&id=46ff2fc8&lang=css
- var GridItemvue_type_style_index_0_id_46ff2fc8_lang_css = __webpack_require__("083e");
- // CONCATENATED MODULE: ./src/components/GridItem.vue
- GridItemvue_type_script_lang_js.render = render
- /* harmony default export */ var GridItem = (GridItemvue_type_script_lang_js);
- // 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
- function GridLayoutvue_type_template_id_fc5948f6_render(_ctx, _cache, $props, $setup, $data, $options) {
- var _component_grid_item = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("grid-item");
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
- ref: "item",
- class: "vue-grid-layout",
- style: _ctx.mergedStyle
- }, [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, {
- class: "vue-grid-placeholder",
- x: _ctx.placeholder.x,
- y: _ctx.placeholder.y,
- w: _ctx.placeholder.w,
- h: _ctx.placeholder.h,
- i: _ctx.placeholder.i
- }, null, 8, ["x", "y", "w", "h", "i"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isDragging]])], 4);
- }
- // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=template&id=fc5948f6
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
- var es7_object_get_own_property_descriptors = __webpack_require__("8e6e");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
- var es6_object_assign = __webpack_require__("f751");
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.is-finite.js
- var es6_number_is_finite = __webpack_require__("fca0");
- // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
- return obj;
- }
- // CONCATENATED MODULE: ./node_modules/mitt/dist/mitt.es.js
- /* 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)})}}});
- //# sourceMappingURL=mitt.es.js.map
- // 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
- 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; }
- 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; }
- var elementResizeDetectorMaker = __webpack_require__("eec4");
- //var eventBus = require('./eventBus');
- /* harmony default export */ var GridLayoutvue_type_script_lang_js = ({
- name: "GridLayout",
- provide: function provide() {
- return {
- eventBus: this.eventBus,
- layout: this
- };
- },
- components: {
- GridItem: GridItem
- },
- props: {
- // If true, the container height swells and contracts to fit contents
- autoSize: {
- type: Boolean,
- default: true
- },
- colNum: {
- type: Number,
- default: 12
- },
- rowHeight: {
- type: Number,
- default: 150
- },
- maxRows: {
- type: Number,
- default: Infinity
- },
- margin: {
- type: Array,
- default: function _default() {
- return [10, 10];
- }
- },
- isDraggable: {
- type: Boolean,
- default: true
- },
- isResizable: {
- type: Boolean,
- default: true
- },
- isMirrored: {
- type: Boolean,
- default: false
- },
- useCssTransforms: {
- type: Boolean,
- default: true
- },
- verticalCompact: {
- type: Boolean,
- default: true
- },
- layout: {
- type: Array,
- required: true
- },
- responsive: {
- type: Boolean,
- default: false
- },
- responsiveLayouts: {
- type: Object,
- default: function _default() {
- return {};
- }
- },
- breakpoints: {
- type: Object,
- default: function _default() {
- return {
- lg: 1200,
- md: 996,
- sm: 768,
- xs: 480,
- xxs: 0
- };
- }
- },
- cols: {
- type: Object,
- default: function _default() {
- return {
- lg: 12,
- md: 10,
- sm: 6,
- xs: 4,
- xxs: 2
- };
- }
- },
- preventCollision: {
- type: Boolean,
- default: false
- },
- useStyleCursor: {
- type: Boolean,
- default: true
- }
- },
- data: function data() {
- return {
- eventBus: mitt_es(),
- width: null,
- mergedStyle: {},
- lastLayoutLength: 0,
- isDragging: false,
- placeholder: {
- x: 0,
- y: 0,
- w: 0,
- h: 0,
- i: -1
- },
- layouts: {},
- // array to store all layouts from different breakpoints
- lastBreakpoint: null,
- // store last active breakpoint
- originalLayout: null // store original Layout
- // layout: JSON.parse(JSON.stringify(this.value)),
- };
- },
- created: function created() {
- var self = this; // Accessible refernces of functions for removing in beforeUnmount
- self.resizeEventHandler = function (_ref) {
- var eventType = _ref.eventType,
- i = _ref.i,
- x = _ref.x,
- y = _ref.y,
- h = _ref.h,
- w = _ref.w;
- self.resizeEvent(eventType, i, x, y, h, w);
- };
- self.dragEventHandler = function (_ref2) {
- var eventType = _ref2.eventType,
- i = _ref2.i,
- x = _ref2.x,
- y = _ref2.y,
- h = _ref2.h,
- w = _ref2.w;
- self.dragEvent(eventType, i, x, y, h, w);
- };
- self.eventBus.on('resizeEvent', self.resizeEventHandler);
- self.eventBus.on('dragEvent', self.dragEventHandler);
- self.$emit('layout-created', self.layout);
- },
- beforeUnmount: function beforeUnmount() {
- //Remove listeners
- this.eventBus.off('resizeEvent', this.resizeEventHandler);
- this.eventBus.off('dragEvent', this.dragEventHandler);
- removeWindowEventListener("resize", this.onWindowResize);
- if (this.erd) {
- this.erd.uninstall(this.$refs.item);
- }
- },
- beforeMount: function beforeMount() {
- this.$emit('layout-before-mount', this.layout);
- },
- mounted: function mounted() {
- this.$emit('layout-mounted', this.layout);
- this.$nextTick(function () {
- validateLayout(this.layout);
- this.originalLayout = this.layout;
- var self = this;
- this.$nextTick(function () {
- self.onWindowResize();
- self.initResponsiveFeatures(); //self.width = self.$el.offsetWidth;
- addWindowEventListener('resize', self.onWindowResize);
- compact(self.layout, self.verticalCompact);
- self.$emit('layout-updated', self.layout);
- self.updateHeight();
- self.$nextTick(function () {
- this.erd = elementResizeDetectorMaker({
- strategy: "scroll",
- //<- For ultra performance.
- // See https://github.com/wnr/element-resize-detector/issues/110 about callOnAdd.
- callOnAdd: false
- });
- this.erd.listenTo(self.$refs.item, function () {
- self.onWindowResize();
- });
- });
- });
- });
- },
- watch: {
- width: function width(newval, oldval) {
- var self = this;
- this.$nextTick(function () {
- var _this = this;
- //this.$broadcast("updateWidth", this.width);
- this.eventBus.emit("updateWidth", this.width);
- if (oldval === null) {
- /*
- If oldval == null is when the width has never been
- set before. That only occurs when mouting is
- finished, and onWindowResize has been called and
- this.width has been changed the first time after it
- got set to null in the constructor. It is now time
- to issue layout-ready events as the GridItems have
- their sizes configured properly.
- The reason for emitting the layout-ready events on
- the next tick is to allow for the newly-emitted
- updateWidth event (above) to have reached the
- children GridItem-s and had their effect, so we're
- sure that they have the final size before we emit
- layout-ready (for this GridLayout) and
- item-layout-ready (for the GridItem-s).
- This way any client event handlers can reliably
- invistigate stable sizes of GridItem-s.
- */
- this.$nextTick(function () {
- _this.$emit('layout-ready', self.layout);
- });
- }
- this.updateHeight();
- });
- },
- layout: function layout() {
- this.layoutUpdate();
- },
- colNum: function colNum(val) {
- this.eventBus.emit("setColNum", val);
- },
- rowHeight: function rowHeight() {
- this.eventBus.emit("setRowHeight", this.rowHeight);
- },
- isDraggable: function isDraggable() {
- this.eventBus.emit("setDraggable", this.isDraggable);
- },
- isResizable: function isResizable() {
- this.eventBus.emit("setResizable", this.isResizable);
- },
- responsive: function responsive() {
- if (!this.responsive) {
- this.$emit('update:layout', this.originalLayout);
- this.eventBus.emit("setColNum", this.colNum);
- }
- this.onWindowResize();
- },
- maxRows: function maxRows() {
- this.eventBus.emit("setMaxRows", this.maxRows);
- },
- margin: function margin() {
- this.updateHeight();
- }
- },
- methods: {
- layoutUpdate: function layoutUpdate() {
- if (this.layout !== undefined && this.originalLayout !== null) {
- if (this.layout.length !== this.originalLayout.length) {
- // console.log("### LAYOUT UPDATE!", this.layout.length, this.originalLayout.length);
- var diff = this.findDifference(this.layout, this.originalLayout);
- if (diff.length > 0) {
- // console.log(diff);
- if (this.layout.length > this.originalLayout.length) {
- this.originalLayout = this.originalLayout.concat(diff);
- } else {
- this.originalLayout = this.originalLayout.filter(function (obj) {
- return !diff.some(function (obj2) {
- return obj.i === obj2.i;
- });
- });
- }
- }
- this.lastLayoutLength = this.layout.length;
- this.initResponsiveFeatures();
- }
- compact(this.layout, this.verticalCompact);
- this.eventBus.emit("updateWidth", this.width);
- this.updateHeight();
- this.$emit('layout-updated', this.layout);
- }
- },
- updateHeight: function updateHeight() {
- this.mergedStyle = {
- height: this.containerHeight()
- };
- },
- onWindowResize: function onWindowResize() {
- if (this.$refs !== null && this.$refs.item !== null && this.$refs.item !== undefined) {
- this.width = this.$refs.item.offsetWidth;
- }
- this.eventBus.emit("resizeEvent", {});
- },
- containerHeight: function containerHeight() {
- if (!this.autoSize) return; // console.log("bottom: " + bottom(this.layout))
- // console.log("rowHeight + margins: " + (this.rowHeight + this.margin[1]) + this.margin[1])
- var containerHeight = bottom(this.layout) * (this.rowHeight + this.margin[1]) + this.margin[1] + 'px';
- return containerHeight;
- },
- dragEvent: function dragEvent(eventName, id, x, y, h, w) {
- //console.log(eventName + " id=" + id + ", x=" + x + ", y=" + y);
- var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes returns null object
- if (l === undefined || l === null) {
- l = {
- x: 0,
- y: 0
- };
- }
- if (eventName === "dragmove" || eventName === "dragstart") {
- this.placeholder.i = id;
- this.placeholder.x = l.x;
- this.placeholder.y = l.y;
- this.placeholder.w = w;
- this.placeholder.h = h;
- this.$nextTick(function () {
- this.isDragging = true;
- }); //this.$broadcast("updateWidth", this.width);
- this.eventBus.emit("updateWidth", this.width);
- } else {
- this.$nextTick(function () {
- this.isDragging = false;
- });
- } // Move the element to the dragged location.
- this.$emit("update:layout", moveElement(this.layout, l, x, y, true, this.preventCollision));
- compact(this.layout, this.verticalCompact); // needed because vue can't detect changes on array element properties
- this.eventBus.emit("compact");
- this.updateHeight();
- if (eventName === 'dragend') this.$emit('layout-updated', this.layout);
- },
- resizeEvent: function resizeEvent(eventName, id, x, y, h, w) {
- var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes return null object
- if (l === undefined || l === null) {
- l = {
- h: 0,
- w: 0
- };
- }
- var hasCollisions;
- if (this.preventCollision) {
- var collisions = getAllCollisions(this.layout, _objectSpread(_objectSpread({}, l), {}, {
- w: w,
- h: h
- })).filter(function (layoutItem) {
- return layoutItem.i !== l.i;
- });
- hasCollisions = collisions.length > 0; // If we're colliding, we need adjust the placeholder.
- if (hasCollisions) {
- // adjust w && h to maximum allowed space
- var leastX = Infinity,
- leastY = Infinity;
- collisions.forEach(function (layoutItem) {
- if (layoutItem.x > l.x) leastX = Math.min(leastX, layoutItem.x);
- if (layoutItem.y > l.y) leastY = Math.min(leastY, layoutItem.y);
- });
- if (Number.isFinite(leastX)) l.w = leastX - l.x;
- if (Number.isFinite(leastY)) l.h = leastY - l.y;
- }
- }
- if (!hasCollisions) {
- // Set new width and height.
- l.w = w;
- l.h = h;
- }
- if (eventName === "resizestart" || eventName === "resizemove") {
- this.placeholder.i = id;
- this.placeholder.x = x;
- this.placeholder.y = y;
- this.placeholder.w = l.w;
- this.placeholder.h = l.h;
- this.$nextTick(function () {
- this.isDragging = true;
- }); //this.$broadcast("updateWidth", this.width);
- this.eventBus.emit("updateWidth", this.width);
- } else {
- this.$nextTick(function () {
- this.isDragging = false;
- });
- }
- if (this.responsive) this.responsiveGridLayout();
- compact(this.layout, this.verticalCompact);
- this.eventBus.emit("compact");
- this.updateHeight();
- if (eventName === 'resizeend') this.$emit('layout-updated', this.layout);
- },
- // finds or generates new layouts for set breakpoints
- responsiveGridLayout: function responsiveGridLayout() {
- var newBreakpoint = getBreakpointFromWidth(this.breakpoints, this.width);
- var newCols = getColsFromBreakpoint(newBreakpoint, this.cols); // save actual layout in layouts
- if (this.lastBreakpoint != null && !this.layouts[this.lastBreakpoint]) this.layouts[this.lastBreakpoint] = cloneLayout(this.layout); // Find or generate a new layout.
- var layout = findOrGenerateResponsiveLayout(this.originalLayout, this.layouts, this.breakpoints, newBreakpoint, this.lastBreakpoint, newCols, this.verticalCompact); // Store the new layout.
- this.layouts[newBreakpoint] = layout;
- if (this.lastBreakpoint !== newBreakpoint) {
- this.$emit('breakpoint-changed', newBreakpoint, layout);
- } // new prop sync
- this.$emit('update:layout', layout);
- this.lastBreakpoint = newBreakpoint;
- this.eventBus.emit("setColNum", getColsFromBreakpoint(newBreakpoint, this.cols));
- },
- // clear all responsive layouts
- initResponsiveFeatures: function initResponsiveFeatures() {
- // clear layouts
- this.layouts = Object.assign({}, this.responsiveLayouts);
- },
- // find difference in layouts
- findDifference: function findDifference(layout, originalLayout) {
- //Find values that are in result1 but not in result2
- var uniqueResultOne = layout.filter(function (obj) {
- return !originalLayout.some(function (obj2) {
- return obj.i === obj2.i;
- });
- }); //Find values that are in result2 but not in result1
- var uniqueResultTwo = originalLayout.filter(function (obj) {
- return !layout.some(function (obj2) {
- return obj.i === obj2.i;
- });
- }); //Combine the two arrays of unique entries#
- return uniqueResultOne.concat(uniqueResultTwo);
- }
- }
- });
- // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=script&lang=js
-
- // EXTERNAL MODULE: ./src/components/GridLayout.vue?vue&type=style&index=0&id=fc5948f6&lang=css
- var GridLayoutvue_type_style_index_0_id_fc5948f6_lang_css = __webpack_require__("6521");
- // CONCATENATED MODULE: ./src/components/GridLayout.vue
- GridLayoutvue_type_script_lang_js.render = GridLayoutvue_type_template_id_fc5948f6_render
- /* harmony default export */ var GridLayout = (GridLayoutvue_type_script_lang_js);
- // CONCATENATED MODULE: ./src/components/index.js
- var components_install = function install(app
- /*: App*/
- ) {
- app.component('grid-layout', GridLayout);
- app.component('grid-item', GridItem);
- };
- /* harmony default export */ var components = (components_install);
- // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
- /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components);
- /***/ }),
- /***/ "fca0":
- /***/ (function(module, exports, __webpack_require__) {
- // 20.1.2.2 Number.isFinite(number)
- var $export = __webpack_require__("5ca1");
- var _isFinite = __webpack_require__("7726").isFinite;
- $export($export.S, 'Number', {
- isFinite: function isFinite(it) {
- return typeof it == 'number' && _isFinite(it);
- }
- });
- /***/ }),
- /***/ "fdef":
- /***/ (function(module, exports) {
- module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
- /***/ })
- /******/ })["default"];
- });
- //# sourceMappingURL=vue-grid-layout.umd.js.map
|