vue-grid-layout.common.js 379 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355
  1. /*! vue-grid-layout - 3.0.0-beta1 | (c) 2015, 2021 Gustavo Santos (JBay Solutions) <gustavo.santos@jbaysolutions.com> (http://www.jbaysolutions.com) | https://github.com/jbaysolutions/vue-grid-layout */
  2. module.exports =
  3. /******/ (function(modules) { // webpackBootstrap
  4. /******/ // The module cache
  5. /******/ var installedModules = {};
  6. /******/
  7. /******/ // The require function
  8. /******/ function __webpack_require__(moduleId) {
  9. /******/
  10. /******/ // Check if module is in cache
  11. /******/ if(installedModules[moduleId]) {
  12. /******/ return installedModules[moduleId].exports;
  13. /******/ }
  14. /******/ // Create a new module (and put it into the cache)
  15. /******/ var module = installedModules[moduleId] = {
  16. /******/ i: moduleId,
  17. /******/ l: false,
  18. /******/ exports: {}
  19. /******/ };
  20. /******/
  21. /******/ // Execute the module function
  22. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  23. /******/
  24. /******/ // Flag the module as loaded
  25. /******/ module.l = true;
  26. /******/
  27. /******/ // Return the exports of the module
  28. /******/ return module.exports;
  29. /******/ }
  30. /******/
  31. /******/
  32. /******/ // expose the modules object (__webpack_modules__)
  33. /******/ __webpack_require__.m = modules;
  34. /******/
  35. /******/ // expose the module cache
  36. /******/ __webpack_require__.c = installedModules;
  37. /******/
  38. /******/ // define getter function for harmony exports
  39. /******/ __webpack_require__.d = function(exports, name, getter) {
  40. /******/ if(!__webpack_require__.o(exports, name)) {
  41. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  42. /******/ }
  43. /******/ };
  44. /******/
  45. /******/ // define __esModule on exports
  46. /******/ __webpack_require__.r = function(exports) {
  47. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  48. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  49. /******/ }
  50. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  51. /******/ };
  52. /******/
  53. /******/ // create a fake namespace object
  54. /******/ // mode & 1: value is a module id, require it
  55. /******/ // mode & 2: merge all properties of value into the ns
  56. /******/ // mode & 4: return value when already ns object
  57. /******/ // mode & 8|1: behave like require
  58. /******/ __webpack_require__.t = function(value, mode) {
  59. /******/ if(mode & 1) value = __webpack_require__(value);
  60. /******/ if(mode & 8) return value;
  61. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  62. /******/ var ns = Object.create(null);
  63. /******/ __webpack_require__.r(ns);
  64. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  65. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  66. /******/ return ns;
  67. /******/ };
  68. /******/
  69. /******/ // getDefaultExport function for compatibility with non-harmony modules
  70. /******/ __webpack_require__.n = function(module) {
  71. /******/ var getter = module && module.__esModule ?
  72. /******/ function getDefault() { return module['default']; } :
  73. /******/ function getModuleExports() { return module; };
  74. /******/ __webpack_require__.d(getter, 'a', getter);
  75. /******/ return getter;
  76. /******/ };
  77. /******/
  78. /******/ // Object.prototype.hasOwnProperty.call
  79. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  80. /******/
  81. /******/ // __webpack_public_path__
  82. /******/ __webpack_require__.p = "";
  83. /******/
  84. /******/
  85. /******/ // Load entry module and return exports
  86. /******/ return __webpack_require__(__webpack_require__.s = "fb15");
  87. /******/ })
  88. /************************************************************************/
  89. /******/ ({
  90. /***/ "01f9":
  91. /***/ (function(module, exports, __webpack_require__) {
  92. "use strict";
  93. var LIBRARY = __webpack_require__("2d00");
  94. var $export = __webpack_require__("5ca1");
  95. var redefine = __webpack_require__("2aba");
  96. var hide = __webpack_require__("32e9");
  97. var Iterators = __webpack_require__("84f2");
  98. var $iterCreate = __webpack_require__("41a0");
  99. var setToStringTag = __webpack_require__("7f20");
  100. var getPrototypeOf = __webpack_require__("38fd");
  101. var ITERATOR = __webpack_require__("2b4c")('iterator');
  102. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  103. var FF_ITERATOR = '@@iterator';
  104. var KEYS = 'keys';
  105. var VALUES = 'values';
  106. var returnThis = function () { return this; };
  107. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  108. $iterCreate(Constructor, NAME, next);
  109. var getMethod = function (kind) {
  110. if (!BUGGY && kind in proto) return proto[kind];
  111. switch (kind) {
  112. case KEYS: return function keys() { return new Constructor(this, kind); };
  113. case VALUES: return function values() { return new Constructor(this, kind); };
  114. } return function entries() { return new Constructor(this, kind); };
  115. };
  116. var TAG = NAME + ' Iterator';
  117. var DEF_VALUES = DEFAULT == VALUES;
  118. var VALUES_BUG = false;
  119. var proto = Base.prototype;
  120. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  121. var $default = $native || getMethod(DEFAULT);
  122. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  123. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  124. var methods, key, IteratorPrototype;
  125. // Fix native
  126. if ($anyNative) {
  127. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  128. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  129. // Set @@toStringTag to native iterators
  130. setToStringTag(IteratorPrototype, TAG, true);
  131. // fix for some old engines
  132. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  133. }
  134. }
  135. // fix Array#{values, @@iterator}.name in V8 / FF
  136. if (DEF_VALUES && $native && $native.name !== VALUES) {
  137. VALUES_BUG = true;
  138. $default = function values() { return $native.call(this); };
  139. }
  140. // Define iterator
  141. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  142. hide(proto, ITERATOR, $default);
  143. }
  144. // Plug for library
  145. Iterators[NAME] = $default;
  146. Iterators[TAG] = returnThis;
  147. if (DEFAULT) {
  148. methods = {
  149. values: DEF_VALUES ? $default : getMethod(VALUES),
  150. keys: IS_SET ? $default : getMethod(KEYS),
  151. entries: $entries
  152. };
  153. if (FORCED) for (key in methods) {
  154. if (!(key in proto)) redefine(proto, key, methods[key]);
  155. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  156. }
  157. return methods;
  158. };
  159. /***/ }),
  160. /***/ "02f4":
  161. /***/ (function(module, exports, __webpack_require__) {
  162. var toInteger = __webpack_require__("4588");
  163. var defined = __webpack_require__("be13");
  164. // true -> String#at
  165. // false -> String#codePointAt
  166. module.exports = function (TO_STRING) {
  167. return function (that, pos) {
  168. var s = String(defined(that));
  169. var i = toInteger(pos);
  170. var l = s.length;
  171. var a, b;
  172. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  173. a = s.charCodeAt(i);
  174. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  175. ? TO_STRING ? s.charAt(i) : a
  176. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  177. };
  178. };
  179. /***/ }),
  180. /***/ "0390":
  181. /***/ (function(module, exports, __webpack_require__) {
  182. "use strict";
  183. var at = __webpack_require__("02f4")(true);
  184. // `AdvanceStringIndex` abstract operation
  185. // https://tc39.github.io/ecma262/#sec-advancestringindex
  186. module.exports = function (S, index, unicode) {
  187. return index + (unicode ? at(S, index).length : 1);
  188. };
  189. /***/ }),
  190. /***/ "083e":
  191. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  192. "use strict";
  193. /* 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");
  194. /* 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__);
  195. /* unused harmony reexport * */
  196. /***/ }),
  197. /***/ "0bfb":
  198. /***/ (function(module, exports, __webpack_require__) {
  199. "use strict";
  200. // 21.2.5.3 get RegExp.prototype.flags
  201. var anObject = __webpack_require__("cb7c");
  202. module.exports = function () {
  203. var that = anObject(this);
  204. var result = '';
  205. if (that.global) result += 'g';
  206. if (that.ignoreCase) result += 'i';
  207. if (that.multiline) result += 'm';
  208. if (that.unicode) result += 'u';
  209. if (that.sticky) result += 'y';
  210. return result;
  211. };
  212. /***/ }),
  213. /***/ "0d58":
  214. /***/ (function(module, exports, __webpack_require__) {
  215. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  216. var $keys = __webpack_require__("ce10");
  217. var enumBugKeys = __webpack_require__("e11e");
  218. module.exports = Object.keys || function keys(O) {
  219. return $keys(O, enumBugKeys);
  220. };
  221. /***/ }),
  222. /***/ "11e9":
  223. /***/ (function(module, exports, __webpack_require__) {
  224. var pIE = __webpack_require__("52a7");
  225. var createDesc = __webpack_require__("4630");
  226. var toIObject = __webpack_require__("6821");
  227. var toPrimitive = __webpack_require__("6a99");
  228. var has = __webpack_require__("69a8");
  229. var IE8_DOM_DEFINE = __webpack_require__("c69a");
  230. var gOPD = Object.getOwnPropertyDescriptor;
  231. exports.f = __webpack_require__("9e1e") ? gOPD : function getOwnPropertyDescriptor(O, P) {
  232. O = toIObject(O);
  233. P = toPrimitive(P, true);
  234. if (IE8_DOM_DEFINE) try {
  235. return gOPD(O, P);
  236. } catch (e) { /* empty */ }
  237. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  238. };
  239. /***/ }),
  240. /***/ "1495":
  241. /***/ (function(module, exports, __webpack_require__) {
  242. var dP = __webpack_require__("86cc");
  243. var anObject = __webpack_require__("cb7c");
  244. var getKeys = __webpack_require__("0d58");
  245. module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) {
  246. anObject(O);
  247. var keys = getKeys(Properties);
  248. var length = keys.length;
  249. var i = 0;
  250. var P;
  251. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  252. return O;
  253. };
  254. /***/ }),
  255. /***/ "18d2":
  256. /***/ (function(module, exports, __webpack_require__) {
  257. "use strict";
  258. /**
  259. * Resize detection strategy that injects objects to elements in order to detect resize events.
  260. * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
  261. */
  262. var browserDetector = __webpack_require__("18e9");
  263. module.exports = function(options) {
  264. options = options || {};
  265. var reporter = options.reporter;
  266. var batchProcessor = options.batchProcessor;
  267. var getState = options.stateHandler.getState;
  268. if(!reporter) {
  269. throw new Error("Missing required dependency: reporter.");
  270. }
  271. /**
  272. * Adds a resize event listener to the element.
  273. * @public
  274. * @param {element} element The element that should have the listener added.
  275. * @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.
  276. */
  277. function addListener(element, listener) {
  278. function listenerProxy() {
  279. listener(element);
  280. }
  281. if(browserDetector.isIE(8)) {
  282. //IE 8 does not support object, but supports the resize event directly on elements.
  283. getState(element).object = {
  284. proxy: listenerProxy
  285. };
  286. element.attachEvent("onresize", listenerProxy);
  287. } else {
  288. var object = getObject(element);
  289. if(!object) {
  290. throw new Error("Element is not detectable by this strategy.");
  291. }
  292. object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
  293. }
  294. }
  295. function buildCssTextString(rules) {
  296. var seperator = options.important ? " !important; " : "; ";
  297. return (rules.join(seperator) + seperator).trim();
  298. }
  299. /**
  300. * 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.
  301. * @private
  302. * @param {object} options Optional options object.
  303. * @param {element} element The element to make detectable
  304. * @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.
  305. */
  306. function makeDetectable(options, element, callback) {
  307. if (!callback) {
  308. callback = element;
  309. element = options;
  310. options = null;
  311. }
  312. options = options || {};
  313. var debug = options.debug;
  314. function injectObject(element, callback) {
  315. 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"]);
  316. //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
  317. // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
  318. var positionCheckPerformed = false;
  319. // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
  320. // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
  321. var style = window.getComputedStyle(element);
  322. var width = element.offsetWidth;
  323. var height = element.offsetHeight;
  324. getState(element).startSize = {
  325. width: width,
  326. height: height
  327. };
  328. function mutateDom() {
  329. function alterPositionStyles() {
  330. if(style.position === "static") {
  331. element.style.setProperty("position", "relative", options.important ? "important" : "");
  332. var removeRelativeStyles = function(reporter, element, style, property) {
  333. function getNumericalValue(value) {
  334. return value.replace(/[^-\d\.]/g, "");
  335. }
  336. var value = style[property];
  337. if(value !== "auto" && getNumericalValue(value) !== "0") {
  338. 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);
  339. element.style.setProperty(property, "0", options.important ? "important" : "");
  340. }
  341. };
  342. //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
  343. //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).
  344. removeRelativeStyles(reporter, element, style, "top");
  345. removeRelativeStyles(reporter, element, style, "right");
  346. removeRelativeStyles(reporter, element, style, "bottom");
  347. removeRelativeStyles(reporter, element, style, "left");
  348. }
  349. }
  350. function onObjectLoad() {
  351. // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
  352. if (!positionCheckPerformed) {
  353. alterPositionStyles();
  354. }
  355. /*jshint validthis: true */
  356. function getDocument(element, callback) {
  357. //Opera 12 seem to call the object.onload before the actual document has been created.
  358. //So if it is not present, poll it with an timeout until it is present.
  359. //TODO: Could maybe be handled better with object.onreadystatechange or similar.
  360. if(!element.contentDocument) {
  361. var state = getState(element);
  362. if (state.checkForObjectDocumentTimeoutId) {
  363. window.clearTimeout(state.checkForObjectDocumentTimeoutId);
  364. }
  365. state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {
  366. state.checkForObjectDocumentTimeoutId = 0;
  367. getDocument(element, callback);
  368. }, 100);
  369. return;
  370. }
  371. callback(element.contentDocument);
  372. }
  373. //Mutating the object element here seems to fire another load event.
  374. //Mutating the inner document of the object element is fine though.
  375. var objectElement = this;
  376. //Create the style element to be added to the object.
  377. getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
  378. //Notify that the element is ready to be listened to.
  379. callback(element);
  380. });
  381. }
  382. // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
  383. // 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.
  384. if (style.position !== "") {
  385. alterPositionStyles(style);
  386. positionCheckPerformed = true;
  387. }
  388. //Add an object element as a child to the target element that will be listened to for resize events.
  389. var object = document.createElement("object");
  390. object.style.cssText = OBJECT_STYLE;
  391. object.tabIndex = -1;
  392. object.type = "text/html";
  393. object.setAttribute("aria-hidden", "true");
  394. object.onload = onObjectLoad;
  395. //Safari: This must occur before adding the object to the DOM.
  396. //IE: Does not like that this happens before, even if it is also added after.
  397. if(!browserDetector.isIE()) {
  398. object.data = "about:blank";
  399. }
  400. if (!getState(element)) {
  401. // The element has been uninstalled before the actual loading happened.
  402. return;
  403. }
  404. element.appendChild(object);
  405. getState(element).object = object;
  406. //IE: This must occur after adding the object to the DOM.
  407. if(browserDetector.isIE()) {
  408. object.data = "about:blank";
  409. }
  410. }
  411. if(batchProcessor) {
  412. batchProcessor.add(mutateDom);
  413. } else {
  414. mutateDom();
  415. }
  416. }
  417. if(browserDetector.isIE(8)) {
  418. //IE 8 does not support objects properly. Luckily they do support the resize event.
  419. //So do not inject the object and notify that the element is already ready to be listened to.
  420. //The event handler for the resize event is attached in the utils.addListener instead.
  421. callback(element);
  422. } else {
  423. injectObject(element, callback);
  424. }
  425. }
  426. /**
  427. * Returns the child object of the target element.
  428. * @private
  429. * @param {element} element The target element.
  430. * @returns The object element of the target.
  431. */
  432. function getObject(element) {
  433. return getState(element).object;
  434. }
  435. function uninstall(element) {
  436. if (!getState(element)) {
  437. return;
  438. }
  439. var object = getObject(element);
  440. if (!object) {
  441. return;
  442. }
  443. if (browserDetector.isIE(8)) {
  444. element.detachEvent("onresize", object.proxy);
  445. } else {
  446. element.removeChild(object);
  447. }
  448. if (getState(element).checkForObjectDocumentTimeoutId) {
  449. window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);
  450. }
  451. delete getState(element).object;
  452. }
  453. return {
  454. makeDetectable: makeDetectable,
  455. addListener: addListener,
  456. uninstall: uninstall
  457. };
  458. };
  459. /***/ }),
  460. /***/ "18e9":
  461. /***/ (function(module, exports, __webpack_require__) {
  462. "use strict";
  463. var detector = module.exports = {};
  464. detector.isIE = function(version) {
  465. function isAnyIeVersion() {
  466. var agent = navigator.userAgent.toLowerCase();
  467. return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
  468. }
  469. if(!isAnyIeVersion()) {
  470. return false;
  471. }
  472. if(!version) {
  473. return true;
  474. }
  475. //Shamelessly stolen from https://gist.github.com/padolsey/527683
  476. var ieVersion = (function(){
  477. var undef,
  478. v = 3,
  479. div = document.createElement("div"),
  480. all = div.getElementsByTagName("i");
  481. do {
  482. div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
  483. }
  484. while (all[0]);
  485. return v > 4 ? v : undef;
  486. }());
  487. return version === ieVersion;
  488. };
  489. detector.isLegacyOpera = function() {
  490. return !!window.opera;
  491. };
  492. /***/ }),
  493. /***/ "214f":
  494. /***/ (function(module, exports, __webpack_require__) {
  495. "use strict";
  496. __webpack_require__("b0c5");
  497. var redefine = __webpack_require__("2aba");
  498. var hide = __webpack_require__("32e9");
  499. var fails = __webpack_require__("79e5");
  500. var defined = __webpack_require__("be13");
  501. var wks = __webpack_require__("2b4c");
  502. var regexpExec = __webpack_require__("520a");
  503. var SPECIES = wks('species');
  504. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  505. // #replace needs built-in support for named groups.
  506. // #match works fine because it just return the exec results, even if it has
  507. // a "grops" property.
  508. var re = /./;
  509. re.exec = function () {
  510. var result = [];
  511. result.groups = { a: '7' };
  512. return result;
  513. };
  514. return ''.replace(re, '$<a>') !== '7';
  515. });
  516. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
  517. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  518. var re = /(?:)/;
  519. var originalExec = re.exec;
  520. re.exec = function () { return originalExec.apply(this, arguments); };
  521. var result = 'ab'.split(re);
  522. return result.length === 2 && result[0] === 'a' && result[1] === 'b';
  523. })();
  524. module.exports = function (KEY, length, exec) {
  525. var SYMBOL = wks(KEY);
  526. var DELEGATES_TO_SYMBOL = !fails(function () {
  527. // String methods call symbol-named RegEp methods
  528. var O = {};
  529. O[SYMBOL] = function () { return 7; };
  530. return ''[KEY](O) != 7;
  531. });
  532. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
  533. // Symbol-named RegExp methods call .exec
  534. var execCalled = false;
  535. var re = /a/;
  536. re.exec = function () { execCalled = true; return null; };
  537. if (KEY === 'split') {
  538. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  539. // a new one. We need to return the patched regex when creating the new one.
  540. re.constructor = {};
  541. re.constructor[SPECIES] = function () { return re; };
  542. }
  543. re[SYMBOL]('');
  544. return !execCalled;
  545. }) : undefined;
  546. if (
  547. !DELEGATES_TO_SYMBOL ||
  548. !DELEGATES_TO_EXEC ||
  549. (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
  550. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  551. ) {
  552. var nativeRegExpMethod = /./[SYMBOL];
  553. var fns = exec(
  554. defined,
  555. SYMBOL,
  556. ''[KEY],
  557. function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
  558. if (regexp.exec === regexpExec) {
  559. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  560. // The native String method already delegates to @@method (this
  561. // polyfilled function), leasing to infinite recursion.
  562. // We avoid it by directly calling the native @@method method.
  563. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  564. }
  565. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  566. }
  567. return { done: false };
  568. }
  569. );
  570. var strfn = fns[0];
  571. var rxfn = fns[1];
  572. redefine(String.prototype, KEY, strfn);
  573. hide(RegExp.prototype, SYMBOL, length == 2
  574. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  575. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  576. ? function (string, arg) { return rxfn.call(string, this, arg); }
  577. // 21.2.5.6 RegExp.prototype[@@match](string)
  578. // 21.2.5.9 RegExp.prototype[@@search](string)
  579. : function (string) { return rxfn.call(string, this); }
  580. );
  581. }
  582. };
  583. /***/ }),
  584. /***/ "230e":
  585. /***/ (function(module, exports, __webpack_require__) {
  586. var isObject = __webpack_require__("d3f4");
  587. var document = __webpack_require__("7726").document;
  588. // typeof document.createElement is 'object' in old IE
  589. var is = isObject(document) && isObject(document.createElement);
  590. module.exports = function (it) {
  591. return is ? document.createElement(it) : {};
  592. };
  593. /***/ }),
  594. /***/ "23c6":
  595. /***/ (function(module, exports, __webpack_require__) {
  596. // getting tag from 19.1.3.6 Object.prototype.toString()
  597. var cof = __webpack_require__("2d95");
  598. var TAG = __webpack_require__("2b4c")('toStringTag');
  599. // ES3 wrong here
  600. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  601. // fallback for IE11 Script Access Denied error
  602. var tryGet = function (it, key) {
  603. try {
  604. return it[key];
  605. } catch (e) { /* empty */ }
  606. };
  607. module.exports = function (it) {
  608. var O, T, B;
  609. return it === undefined ? 'Undefined' : it === null ? 'Null'
  610. // @@toStringTag case
  611. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  612. // builtinTag case
  613. : ARG ? cof(O)
  614. // ES3 arguments fallback
  615. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  616. };
  617. /***/ }),
  618. /***/ "24fb":
  619. /***/ (function(module, exports, __webpack_require__) {
  620. "use strict";
  621. /*
  622. MIT License http://www.opensource.org/licenses/mit-license.php
  623. Author Tobias Koppers @sokra
  624. */
  625. // css base code, injected by the css-loader
  626. // eslint-disable-next-line func-names
  627. module.exports = function (useSourceMap) {
  628. var list = []; // return the list of modules as css string
  629. list.toString = function toString() {
  630. return this.map(function (item) {
  631. var content = cssWithMappingToString(item, useSourceMap);
  632. if (item[2]) {
  633. return "@media ".concat(item[2], " {").concat(content, "}");
  634. }
  635. return content;
  636. }).join('');
  637. }; // import a list of modules into the list
  638. // eslint-disable-next-line func-names
  639. list.i = function (modules, mediaQuery, dedupe) {
  640. if (typeof modules === 'string') {
  641. // eslint-disable-next-line no-param-reassign
  642. modules = [[null, modules, '']];
  643. }
  644. var alreadyImportedModules = {};
  645. if (dedupe) {
  646. for (var i = 0; i < this.length; i++) {
  647. // eslint-disable-next-line prefer-destructuring
  648. var id = this[i][0];
  649. if (id != null) {
  650. alreadyImportedModules[id] = true;
  651. }
  652. }
  653. }
  654. for (var _i = 0; _i < modules.length; _i++) {
  655. var item = [].concat(modules[_i]);
  656. if (dedupe && alreadyImportedModules[item[0]]) {
  657. // eslint-disable-next-line no-continue
  658. continue;
  659. }
  660. if (mediaQuery) {
  661. if (!item[2]) {
  662. item[2] = mediaQuery;
  663. } else {
  664. item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
  665. }
  666. }
  667. list.push(item);
  668. }
  669. };
  670. return list;
  671. };
  672. function cssWithMappingToString(item, useSourceMap) {
  673. var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
  674. var cssMapping = item[3];
  675. if (!cssMapping) {
  676. return content;
  677. }
  678. if (useSourceMap && typeof btoa === 'function') {
  679. var sourceMapping = toComment(cssMapping);
  680. var sourceURLs = cssMapping.sources.map(function (source) {
  681. return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
  682. });
  683. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  684. }
  685. return [content].join('\n');
  686. } // Adapted from convert-source-map (MIT)
  687. function toComment(sourceMap) {
  688. // eslint-disable-next-line no-undef
  689. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  690. var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  691. return "/*# ".concat(data, " */");
  692. }
  693. /***/ }),
  694. /***/ "2621":
  695. /***/ (function(module, exports) {
  696. exports.f = Object.getOwnPropertySymbols;
  697. /***/ }),
  698. /***/ "2aba":
  699. /***/ (function(module, exports, __webpack_require__) {
  700. var global = __webpack_require__("7726");
  701. var hide = __webpack_require__("32e9");
  702. var has = __webpack_require__("69a8");
  703. var SRC = __webpack_require__("ca5a")('src');
  704. var $toString = __webpack_require__("fa5b");
  705. var TO_STRING = 'toString';
  706. var TPL = ('' + $toString).split(TO_STRING);
  707. __webpack_require__("8378").inspectSource = function (it) {
  708. return $toString.call(it);
  709. };
  710. (module.exports = function (O, key, val, safe) {
  711. var isFunction = typeof val == 'function';
  712. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  713. if (O[key] === val) return;
  714. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  715. if (O === global) {
  716. O[key] = val;
  717. } else if (!safe) {
  718. delete O[key];
  719. hide(O, key, val);
  720. } else if (O[key]) {
  721. O[key] = val;
  722. } else {
  723. hide(O, key, val);
  724. }
  725. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  726. })(Function.prototype, TO_STRING, function toString() {
  727. return typeof this == 'function' && this[SRC] || $toString.call(this);
  728. });
  729. /***/ }),
  730. /***/ "2aeb":
  731. /***/ (function(module, exports, __webpack_require__) {
  732. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  733. var anObject = __webpack_require__("cb7c");
  734. var dPs = __webpack_require__("1495");
  735. var enumBugKeys = __webpack_require__("e11e");
  736. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  737. var Empty = function () { /* empty */ };
  738. var PROTOTYPE = 'prototype';
  739. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  740. var createDict = function () {
  741. // Thrash, waste and sodomy: IE GC bug
  742. var iframe = __webpack_require__("230e")('iframe');
  743. var i = enumBugKeys.length;
  744. var lt = '<';
  745. var gt = '>';
  746. var iframeDocument;
  747. iframe.style.display = 'none';
  748. __webpack_require__("fab2").appendChild(iframe);
  749. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  750. // createDict = iframe.contentWindow.Object;
  751. // html.removeChild(iframe);
  752. iframeDocument = iframe.contentWindow.document;
  753. iframeDocument.open();
  754. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  755. iframeDocument.close();
  756. createDict = iframeDocument.F;
  757. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  758. return createDict();
  759. };
  760. module.exports = Object.create || function create(O, Properties) {
  761. var result;
  762. if (O !== null) {
  763. Empty[PROTOTYPE] = anObject(O);
  764. result = new Empty();
  765. Empty[PROTOTYPE] = null;
  766. // add "__proto__" for Object.getPrototypeOf polyfill
  767. result[IE_PROTO] = O;
  768. } else result = createDict();
  769. return Properties === undefined ? result : dPs(result, Properties);
  770. };
  771. /***/ }),
  772. /***/ "2b4c":
  773. /***/ (function(module, exports, __webpack_require__) {
  774. var store = __webpack_require__("5537")('wks');
  775. var uid = __webpack_require__("ca5a");
  776. var Symbol = __webpack_require__("7726").Symbol;
  777. var USE_SYMBOL = typeof Symbol == 'function';
  778. var $exports = module.exports = function (name) {
  779. return store[name] || (store[name] =
  780. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  781. };
  782. $exports.store = store;
  783. /***/ }),
  784. /***/ "2cef":
  785. /***/ (function(module, exports, __webpack_require__) {
  786. "use strict";
  787. module.exports = function() {
  788. var idCount = 1;
  789. /**
  790. * Generates a new unique id in the context.
  791. * @public
  792. * @returns {number} A unique id in the context.
  793. */
  794. function generate() {
  795. return idCount++;
  796. }
  797. return {
  798. generate: generate
  799. };
  800. };
  801. /***/ }),
  802. /***/ "2d00":
  803. /***/ (function(module, exports) {
  804. module.exports = false;
  805. /***/ }),
  806. /***/ "2d95":
  807. /***/ (function(module, exports) {
  808. var toString = {}.toString;
  809. module.exports = function (it) {
  810. return toString.call(it).slice(8, -1);
  811. };
  812. /***/ }),
  813. /***/ "2f21":
  814. /***/ (function(module, exports, __webpack_require__) {
  815. "use strict";
  816. var fails = __webpack_require__("79e5");
  817. module.exports = function (method, arg) {
  818. return !!method && fails(function () {
  819. // eslint-disable-next-line no-useless-call
  820. arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  821. });
  822. };
  823. /***/ }),
  824. /***/ "32e9":
  825. /***/ (function(module, exports, __webpack_require__) {
  826. var dP = __webpack_require__("86cc");
  827. var createDesc = __webpack_require__("4630");
  828. module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
  829. return dP.f(object, key, createDesc(1, value));
  830. } : function (object, key, value) {
  831. object[key] = value;
  832. return object;
  833. };
  834. /***/ }),
  835. /***/ "38fd":
  836. /***/ (function(module, exports, __webpack_require__) {
  837. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  838. var has = __webpack_require__("69a8");
  839. var toObject = __webpack_require__("4bf8");
  840. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  841. var ObjectProto = Object.prototype;
  842. module.exports = Object.getPrototypeOf || function (O) {
  843. O = toObject(O);
  844. if (has(O, IE_PROTO)) return O[IE_PROTO];
  845. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  846. return O.constructor.prototype;
  847. } return O instanceof Object ? ObjectProto : null;
  848. };
  849. /***/ }),
  850. /***/ "41a0":
  851. /***/ (function(module, exports, __webpack_require__) {
  852. "use strict";
  853. var create = __webpack_require__("2aeb");
  854. var descriptor = __webpack_require__("4630");
  855. var setToStringTag = __webpack_require__("7f20");
  856. var IteratorPrototype = {};
  857. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  858. __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
  859. module.exports = function (Constructor, NAME, next) {
  860. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  861. setToStringTag(Constructor, NAME + ' Iterator');
  862. };
  863. /***/ }),
  864. /***/ "456d":
  865. /***/ (function(module, exports, __webpack_require__) {
  866. // 19.1.2.14 Object.keys(O)
  867. var toObject = __webpack_require__("4bf8");
  868. var $keys = __webpack_require__("0d58");
  869. __webpack_require__("5eda")('keys', function () {
  870. return function keys(it) {
  871. return $keys(toObject(it));
  872. };
  873. });
  874. /***/ }),
  875. /***/ "4588":
  876. /***/ (function(module, exports) {
  877. // 7.1.4 ToInteger
  878. var ceil = Math.ceil;
  879. var floor = Math.floor;
  880. module.exports = function (it) {
  881. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  882. };
  883. /***/ }),
  884. /***/ "4630":
  885. /***/ (function(module, exports) {
  886. module.exports = function (bitmap, value) {
  887. return {
  888. enumerable: !(bitmap & 1),
  889. configurable: !(bitmap & 2),
  890. writable: !(bitmap & 4),
  891. value: value
  892. };
  893. };
  894. /***/ }),
  895. /***/ "4917":
  896. /***/ (function(module, exports, __webpack_require__) {
  897. "use strict";
  898. var anObject = __webpack_require__("cb7c");
  899. var toLength = __webpack_require__("9def");
  900. var advanceStringIndex = __webpack_require__("0390");
  901. var regExpExec = __webpack_require__("5f1b");
  902. // @@match logic
  903. __webpack_require__("214f")('match', 1, function (defined, MATCH, $match, maybeCallNative) {
  904. return [
  905. // `String.prototype.match` method
  906. // https://tc39.github.io/ecma262/#sec-string.prototype.match
  907. function match(regexp) {
  908. var O = defined(this);
  909. var fn = regexp == undefined ? undefined : regexp[MATCH];
  910. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  911. },
  912. // `RegExp.prototype[@@match]` method
  913. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
  914. function (regexp) {
  915. var res = maybeCallNative($match, regexp, this);
  916. if (res.done) return res.value;
  917. var rx = anObject(regexp);
  918. var S = String(this);
  919. if (!rx.global) return regExpExec(rx, S);
  920. var fullUnicode = rx.unicode;
  921. rx.lastIndex = 0;
  922. var A = [];
  923. var n = 0;
  924. var result;
  925. while ((result = regExpExec(rx, S)) !== null) {
  926. var matchStr = String(result[0]);
  927. A[n] = matchStr;
  928. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  929. n++;
  930. }
  931. return n === 0 ? null : A;
  932. }
  933. ];
  934. });
  935. /***/ }),
  936. /***/ "493e":
  937. /***/ (function(module, exports, __webpack_require__) {
  938. // Imports
  939. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
  940. exports = ___CSS_LOADER_API_IMPORT___(false);
  941. // Module
  942. 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}", ""]);
  943. // Exports
  944. module.exports = exports;
  945. /***/ }),
  946. /***/ "499e":
  947. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  948. "use strict";
  949. // ESM COMPAT FLAG
  950. __webpack_require__.r(__webpack_exports__);
  951. // EXPORTS
  952. __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesClient; });
  953. // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js
  954. /**
  955. * Translates the list format produced by css-loader into something
  956. * easier to manipulate.
  957. */
  958. function listToStyles (parentId, list) {
  959. var styles = []
  960. var newStyles = {}
  961. for (var i = 0; i < list.length; i++) {
  962. var item = list[i]
  963. var id = item[0]
  964. var css = item[1]
  965. var media = item[2]
  966. var sourceMap = item[3]
  967. var part = {
  968. id: parentId + ':' + i,
  969. css: css,
  970. media: media,
  971. sourceMap: sourceMap
  972. }
  973. if (!newStyles[id]) {
  974. styles.push(newStyles[id] = { id: id, parts: [part] })
  975. } else {
  976. newStyles[id].parts.push(part)
  977. }
  978. }
  979. return styles
  980. }
  981. // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js
  982. /*
  983. MIT License http://www.opensource.org/licenses/mit-license.php
  984. Author Tobias Koppers @sokra
  985. Modified by Evan You @yyx990803
  986. */
  987. var hasDocument = typeof document !== 'undefined'
  988. if (typeof DEBUG !== 'undefined' && DEBUG) {
  989. if (!hasDocument) {
  990. throw new Error(
  991. 'vue-style-loader cannot be used in a non-browser environment. ' +
  992. "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
  993. ) }
  994. }
  995. /*
  996. type StyleObject = {
  997. id: number;
  998. parts: Array<StyleObjectPart>
  999. }
  1000. type StyleObjectPart = {
  1001. css: string;
  1002. media: string;
  1003. sourceMap: ?string
  1004. }
  1005. */
  1006. var stylesInDom = {/*
  1007. [id: number]: {
  1008. id: number,
  1009. refs: number,
  1010. parts: Array<(obj?: StyleObjectPart) => void>
  1011. }
  1012. */}
  1013. var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
  1014. var singletonElement = null
  1015. var singletonCounter = 0
  1016. var isProduction = false
  1017. var noop = function () {}
  1018. var options = null
  1019. var ssrIdKey = 'data-vue-ssr-id'
  1020. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1021. // tags it will allow on a page
  1022. var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
  1023. function addStylesClient (parentId, list, _isProduction, _options) {
  1024. isProduction = _isProduction
  1025. options = _options || {}
  1026. var styles = listToStyles(parentId, list)
  1027. addStylesToDom(styles)
  1028. return function update (newList) {
  1029. var mayRemove = []
  1030. for (var i = 0; i < styles.length; i++) {
  1031. var item = styles[i]
  1032. var domStyle = stylesInDom[item.id]
  1033. domStyle.refs--
  1034. mayRemove.push(domStyle)
  1035. }
  1036. if (newList) {
  1037. styles = listToStyles(parentId, newList)
  1038. addStylesToDom(styles)
  1039. } else {
  1040. styles = []
  1041. }
  1042. for (var i = 0; i < mayRemove.length; i++) {
  1043. var domStyle = mayRemove[i]
  1044. if (domStyle.refs === 0) {
  1045. for (var j = 0; j < domStyle.parts.length; j++) {
  1046. domStyle.parts[j]()
  1047. }
  1048. delete stylesInDom[domStyle.id]
  1049. }
  1050. }
  1051. }
  1052. }
  1053. function addStylesToDom (styles /* Array<StyleObject> */) {
  1054. for (var i = 0; i < styles.length; i++) {
  1055. var item = styles[i]
  1056. var domStyle = stylesInDom[item.id]
  1057. if (domStyle) {
  1058. domStyle.refs++
  1059. for (var j = 0; j < domStyle.parts.length; j++) {
  1060. domStyle.parts[j](item.parts[j])
  1061. }
  1062. for (; j < item.parts.length; j++) {
  1063. domStyle.parts.push(addStyle(item.parts[j]))
  1064. }
  1065. if (domStyle.parts.length > item.parts.length) {
  1066. domStyle.parts.length = item.parts.length
  1067. }
  1068. } else {
  1069. var parts = []
  1070. for (var j = 0; j < item.parts.length; j++) {
  1071. parts.push(addStyle(item.parts[j]))
  1072. }
  1073. stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
  1074. }
  1075. }
  1076. }
  1077. function createStyleElement () {
  1078. var styleElement = document.createElement('style')
  1079. styleElement.type = 'text/css'
  1080. head.appendChild(styleElement)
  1081. return styleElement
  1082. }
  1083. function addStyle (obj /* StyleObjectPart */) {
  1084. var update, remove
  1085. var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
  1086. if (styleElement) {
  1087. if (isProduction) {
  1088. // has SSR styles and in production mode.
  1089. // simply do nothing.
  1090. return noop
  1091. } else {
  1092. // has SSR styles but in dev mode.
  1093. // for some reason Chrome can't handle source map in server-rendered
  1094. // style tags - source maps in <style> only works if the style tag is
  1095. // created and inserted dynamically. So we remove the server rendered
  1096. // styles and inject new ones.
  1097. styleElement.parentNode.removeChild(styleElement)
  1098. }
  1099. }
  1100. if (isOldIE) {
  1101. // use singleton mode for IE9.
  1102. var styleIndex = singletonCounter++
  1103. styleElement = singletonElement || (singletonElement = createStyleElement())
  1104. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
  1105. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
  1106. } else {
  1107. // use multi-style-tag mode in all other cases
  1108. styleElement = createStyleElement()
  1109. update = applyToTag.bind(null, styleElement)
  1110. remove = function () {
  1111. styleElement.parentNode.removeChild(styleElement)
  1112. }
  1113. }
  1114. update(obj)
  1115. return function updateStyle (newObj /* StyleObjectPart */) {
  1116. if (newObj) {
  1117. if (newObj.css === obj.css &&
  1118. newObj.media === obj.media &&
  1119. newObj.sourceMap === obj.sourceMap) {
  1120. return
  1121. }
  1122. update(obj = newObj)
  1123. } else {
  1124. remove()
  1125. }
  1126. }
  1127. }
  1128. var replaceText = (function () {
  1129. var textStore = []
  1130. return function (index, replacement) {
  1131. textStore[index] = replacement
  1132. return textStore.filter(Boolean).join('\n')
  1133. }
  1134. })()
  1135. function applyToSingletonTag (styleElement, index, remove, obj) {
  1136. var css = remove ? '' : obj.css
  1137. if (styleElement.styleSheet) {
  1138. styleElement.styleSheet.cssText = replaceText(index, css)
  1139. } else {
  1140. var cssNode = document.createTextNode(css)
  1141. var childNodes = styleElement.childNodes
  1142. if (childNodes[index]) styleElement.removeChild(childNodes[index])
  1143. if (childNodes.length) {
  1144. styleElement.insertBefore(cssNode, childNodes[index])
  1145. } else {
  1146. styleElement.appendChild(cssNode)
  1147. }
  1148. }
  1149. }
  1150. function applyToTag (styleElement, obj) {
  1151. var css = obj.css
  1152. var media = obj.media
  1153. var sourceMap = obj.sourceMap
  1154. if (media) {
  1155. styleElement.setAttribute('media', media)
  1156. }
  1157. if (options.ssrId) {
  1158. styleElement.setAttribute(ssrIdKey, obj.id)
  1159. }
  1160. if (sourceMap) {
  1161. // https://developer.chrome.com/devtools/docs/javascript-debugging
  1162. // this makes source maps inside style tags work properly in Chrome
  1163. css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
  1164. // http://stackoverflow.com/a/26603875
  1165. css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
  1166. }
  1167. if (styleElement.styleSheet) {
  1168. styleElement.styleSheet.cssText = css
  1169. } else {
  1170. while (styleElement.firstChild) {
  1171. styleElement.removeChild(styleElement.firstChild)
  1172. }
  1173. styleElement.appendChild(document.createTextNode(css))
  1174. }
  1175. }
  1176. /***/ }),
  1177. /***/ "49ad":
  1178. /***/ (function(module, exports, __webpack_require__) {
  1179. "use strict";
  1180. module.exports = function(idHandler) {
  1181. var eventListeners = {};
  1182. /**
  1183. * Gets all listeners for the given element.
  1184. * @public
  1185. * @param {element} element The element to get all listeners for.
  1186. * @returns All listeners for the given element.
  1187. */
  1188. function getListeners(element) {
  1189. var id = idHandler.get(element);
  1190. if (id === undefined) {
  1191. return [];
  1192. }
  1193. return eventListeners[id] || [];
  1194. }
  1195. /**
  1196. * Stores the given listener for the given element. Will not actually add the listener to the element.
  1197. * @public
  1198. * @param {element} element The element that should have the listener added.
  1199. * @param {function} listener The callback that the element has added.
  1200. */
  1201. function addListener(element, listener) {
  1202. var id = idHandler.get(element);
  1203. if(!eventListeners[id]) {
  1204. eventListeners[id] = [];
  1205. }
  1206. eventListeners[id].push(listener);
  1207. }
  1208. function removeListener(element, listener) {
  1209. var listeners = getListeners(element);
  1210. for (var i = 0, len = listeners.length; i < len; ++i) {
  1211. if (listeners[i] === listener) {
  1212. listeners.splice(i, 1);
  1213. break;
  1214. }
  1215. }
  1216. }
  1217. function removeAllListeners(element) {
  1218. var listeners = getListeners(element);
  1219. if (!listeners) { return; }
  1220. listeners.length = 0;
  1221. }
  1222. return {
  1223. get: getListeners,
  1224. add: addListener,
  1225. removeListener: removeListener,
  1226. removeAllListeners: removeAllListeners
  1227. };
  1228. };
  1229. /***/ }),
  1230. /***/ "4bf8":
  1231. /***/ (function(module, exports, __webpack_require__) {
  1232. // 7.1.13 ToObject(argument)
  1233. var defined = __webpack_require__("be13");
  1234. module.exports = function (it) {
  1235. return Object(defined(it));
  1236. };
  1237. /***/ }),
  1238. /***/ "5058":
  1239. /***/ (function(module, exports, __webpack_require__) {
  1240. "use strict";
  1241. module.exports = function(options) {
  1242. var idGenerator = options.idGenerator;
  1243. var getState = options.stateHandler.getState;
  1244. /**
  1245. * Gets the resize detector id of the element.
  1246. * @public
  1247. * @param {element} element The target element to get the id of.
  1248. * @returns {string|number|null} The id of the element. Null if it has no id.
  1249. */
  1250. function getId(element) {
  1251. var state = getState(element);
  1252. if (state && state.id !== undefined) {
  1253. return state.id;
  1254. }
  1255. return null;
  1256. }
  1257. /**
  1258. * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
  1259. * @public
  1260. * @param {element} element The target element to set the id of.
  1261. * @returns {string|number|null} The id of the element.
  1262. */
  1263. function setId(element) {
  1264. var state = getState(element);
  1265. if (!state) {
  1266. throw new Error("setId required the element to have a resize detection state.");
  1267. }
  1268. var id = idGenerator.generate();
  1269. state.id = id;
  1270. return id;
  1271. }
  1272. return {
  1273. get: getId,
  1274. set: setId
  1275. };
  1276. };
  1277. /***/ }),
  1278. /***/ "50bf":
  1279. /***/ (function(module, exports, __webpack_require__) {
  1280. "use strict";
  1281. var utils = module.exports = {};
  1282. utils.getOption = getOption;
  1283. function getOption(options, name, defaultValue) {
  1284. var value = options[name];
  1285. if((value === undefined || value === null) && defaultValue !== undefined) {
  1286. return defaultValue;
  1287. }
  1288. return value;
  1289. }
  1290. /***/ }),
  1291. /***/ "520a":
  1292. /***/ (function(module, exports, __webpack_require__) {
  1293. "use strict";
  1294. var regexpFlags = __webpack_require__("0bfb");
  1295. var nativeExec = RegExp.prototype.exec;
  1296. // This always refers to the native implementation, because the
  1297. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  1298. // which loads this file before patching the method.
  1299. var nativeReplace = String.prototype.replace;
  1300. var patchedExec = nativeExec;
  1301. var LAST_INDEX = 'lastIndex';
  1302. var UPDATES_LAST_INDEX_WRONG = (function () {
  1303. var re1 = /a/,
  1304. re2 = /b*/g;
  1305. nativeExec.call(re1, 'a');
  1306. nativeExec.call(re2, 'a');
  1307. return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
  1308. })();
  1309. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1310. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1311. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  1312. if (PATCH) {
  1313. patchedExec = function exec(str) {
  1314. var re = this;
  1315. var lastIndex, reCopy, match, i;
  1316. if (NPCG_INCLUDED) {
  1317. reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
  1318. }
  1319. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
  1320. match = nativeExec.call(re, str);
  1321. if (UPDATES_LAST_INDEX_WRONG && match) {
  1322. re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
  1323. }
  1324. if (NPCG_INCLUDED && match && match.length > 1) {
  1325. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1326. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  1327. // eslint-disable-next-line no-loop-func
  1328. nativeReplace.call(match[0], reCopy, function () {
  1329. for (i = 1; i < arguments.length - 2; i++) {
  1330. if (arguments[i] === undefined) match[i] = undefined;
  1331. }
  1332. });
  1333. }
  1334. return match;
  1335. };
  1336. }
  1337. module.exports = patchedExec;
  1338. /***/ }),
  1339. /***/ "52a7":
  1340. /***/ (function(module, exports) {
  1341. exports.f = {}.propertyIsEnumerable;
  1342. /***/ }),
  1343. /***/ "5537":
  1344. /***/ (function(module, exports, __webpack_require__) {
  1345. var core = __webpack_require__("8378");
  1346. var global = __webpack_require__("7726");
  1347. var SHARED = '__core-js_shared__';
  1348. var store = global[SHARED] || (global[SHARED] = {});
  1349. (module.exports = function (key, value) {
  1350. return store[key] || (store[key] = value !== undefined ? value : {});
  1351. })('versions', []).push({
  1352. version: core.version,
  1353. mode: __webpack_require__("2d00") ? 'pure' : 'global',
  1354. copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
  1355. });
  1356. /***/ }),
  1357. /***/ "55dd":
  1358. /***/ (function(module, exports, __webpack_require__) {
  1359. "use strict";
  1360. var $export = __webpack_require__("5ca1");
  1361. var aFunction = __webpack_require__("d8e8");
  1362. var toObject = __webpack_require__("4bf8");
  1363. var fails = __webpack_require__("79e5");
  1364. var $sort = [].sort;
  1365. var test = [1, 2, 3];
  1366. $export($export.P + $export.F * (fails(function () {
  1367. // IE8-
  1368. test.sort(undefined);
  1369. }) || !fails(function () {
  1370. // V8 bug
  1371. test.sort(null);
  1372. // Old WebKit
  1373. }) || !__webpack_require__("2f21")($sort)), 'Array', {
  1374. // 22.1.3.25 Array.prototype.sort(comparefn)
  1375. sort: function sort(comparefn) {
  1376. return comparefn === undefined
  1377. ? $sort.call(toObject(this))
  1378. : $sort.call(toObject(this), aFunction(comparefn));
  1379. }
  1380. });
  1381. /***/ }),
  1382. /***/ "5be5":
  1383. /***/ (function(module, exports, __webpack_require__) {
  1384. "use strict";
  1385. module.exports = function(options) {
  1386. var getState = options.stateHandler.getState;
  1387. /**
  1388. * Tells if the element has been made detectable and ready to be listened for resize events.
  1389. * @public
  1390. * @param {element} The element to check.
  1391. * @returns {boolean} True or false depending on if the element is detectable or not.
  1392. */
  1393. function isDetectable(element) {
  1394. var state = getState(element);
  1395. return state && !!state.isDetectable;
  1396. }
  1397. /**
  1398. * Marks the element that it has been made detectable and ready to be listened for resize events.
  1399. * @public
  1400. * @param {element} The element to mark.
  1401. */
  1402. function markAsDetectable(element) {
  1403. getState(element).isDetectable = true;
  1404. }
  1405. /**
  1406. * Tells if the element is busy or not.
  1407. * @public
  1408. * @param {element} The element to check.
  1409. * @returns {boolean} True or false depending on if the element is busy or not.
  1410. */
  1411. function isBusy(element) {
  1412. return !!getState(element).busy;
  1413. }
  1414. /**
  1415. * Marks the object is busy and should not be made detectable.
  1416. * @public
  1417. * @param {element} element The element to mark.
  1418. * @param {boolean} busy If the element is busy or not.
  1419. */
  1420. function markBusy(element, busy) {
  1421. getState(element).busy = !!busy;
  1422. }
  1423. return {
  1424. isDetectable: isDetectable,
  1425. markAsDetectable: markAsDetectable,
  1426. isBusy: isBusy,
  1427. markBusy: markBusy
  1428. };
  1429. };
  1430. /***/ }),
  1431. /***/ "5ca1":
  1432. /***/ (function(module, exports, __webpack_require__) {
  1433. var global = __webpack_require__("7726");
  1434. var core = __webpack_require__("8378");
  1435. var hide = __webpack_require__("32e9");
  1436. var redefine = __webpack_require__("2aba");
  1437. var ctx = __webpack_require__("9b43");
  1438. var PROTOTYPE = 'prototype';
  1439. var $export = function (type, name, source) {
  1440. var IS_FORCED = type & $export.F;
  1441. var IS_GLOBAL = type & $export.G;
  1442. var IS_STATIC = type & $export.S;
  1443. var IS_PROTO = type & $export.P;
  1444. var IS_BIND = type & $export.B;
  1445. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  1446. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  1447. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  1448. var key, own, out, exp;
  1449. if (IS_GLOBAL) source = name;
  1450. for (key in source) {
  1451. // contains in native
  1452. own = !IS_FORCED && target && target[key] !== undefined;
  1453. // export native or passed
  1454. out = (own ? target : source)[key];
  1455. // bind timers to global for call from export context
  1456. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  1457. // extend global
  1458. if (target) redefine(target, key, out, type & $export.U);
  1459. // export
  1460. if (exports[key] != out) hide(exports, key, exp);
  1461. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  1462. }
  1463. };
  1464. global.core = core;
  1465. // type bitmap
  1466. $export.F = 1; // forced
  1467. $export.G = 2; // global
  1468. $export.S = 4; // static
  1469. $export.P = 8; // proto
  1470. $export.B = 16; // bind
  1471. $export.W = 32; // wrap
  1472. $export.U = 64; // safe
  1473. $export.R = 128; // real proto method for `library`
  1474. module.exports = $export;
  1475. /***/ }),
  1476. /***/ "5dbc":
  1477. /***/ (function(module, exports, __webpack_require__) {
  1478. var isObject = __webpack_require__("d3f4");
  1479. var setPrototypeOf = __webpack_require__("8b97").set;
  1480. module.exports = function (that, target, C) {
  1481. var S = target.constructor;
  1482. var P;
  1483. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  1484. setPrototypeOf(that, P);
  1485. } return that;
  1486. };
  1487. /***/ }),
  1488. /***/ "5eda":
  1489. /***/ (function(module, exports, __webpack_require__) {
  1490. // most Object methods by ES6 should accept primitives
  1491. var $export = __webpack_require__("5ca1");
  1492. var core = __webpack_require__("8378");
  1493. var fails = __webpack_require__("79e5");
  1494. module.exports = function (KEY, exec) {
  1495. var fn = (core.Object || {})[KEY] || Object[KEY];
  1496. var exp = {};
  1497. exp[KEY] = exec(fn);
  1498. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  1499. };
  1500. /***/ }),
  1501. /***/ "5f1b":
  1502. /***/ (function(module, exports, __webpack_require__) {
  1503. "use strict";
  1504. var classof = __webpack_require__("23c6");
  1505. var builtinExec = RegExp.prototype.exec;
  1506. // `RegExpExec` abstract operation
  1507. // https://tc39.github.io/ecma262/#sec-regexpexec
  1508. module.exports = function (R, S) {
  1509. var exec = R.exec;
  1510. if (typeof exec === 'function') {
  1511. var result = exec.call(R, S);
  1512. if (typeof result !== 'object') {
  1513. throw new TypeError('RegExp exec method returned something other than an Object or null');
  1514. }
  1515. return result;
  1516. }
  1517. if (classof(R) !== 'RegExp') {
  1518. throw new TypeError('RegExp#exec called on incompatible receiver');
  1519. }
  1520. return builtinExec.call(R, S);
  1521. };
  1522. /***/ }),
  1523. /***/ "613b":
  1524. /***/ (function(module, exports, __webpack_require__) {
  1525. var shared = __webpack_require__("5537")('keys');
  1526. var uid = __webpack_require__("ca5a");
  1527. module.exports = function (key) {
  1528. return shared[key] || (shared[key] = uid(key));
  1529. };
  1530. /***/ }),
  1531. /***/ "626a":
  1532. /***/ (function(module, exports, __webpack_require__) {
  1533. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1534. var cof = __webpack_require__("2d95");
  1535. // eslint-disable-next-line no-prototype-builtins
  1536. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  1537. return cof(it) == 'String' ? it.split('') : Object(it);
  1538. };
  1539. /***/ }),
  1540. /***/ "6521":
  1541. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1542. "use strict";
  1543. /* 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");
  1544. /* 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__);
  1545. /* unused harmony reexport * */
  1546. /***/ }),
  1547. /***/ "6821":
  1548. /***/ (function(module, exports, __webpack_require__) {
  1549. // to indexed object, toObject with fallback for non-array-like ES3 strings
  1550. var IObject = __webpack_require__("626a");
  1551. var defined = __webpack_require__("be13");
  1552. module.exports = function (it) {
  1553. return IObject(defined(it));
  1554. };
  1555. /***/ }),
  1556. /***/ "69a8":
  1557. /***/ (function(module, exports) {
  1558. var hasOwnProperty = {}.hasOwnProperty;
  1559. module.exports = function (it, key) {
  1560. return hasOwnProperty.call(it, key);
  1561. };
  1562. /***/ }),
  1563. /***/ "6a99":
  1564. /***/ (function(module, exports, __webpack_require__) {
  1565. // 7.1.1 ToPrimitive(input [, PreferredType])
  1566. var isObject = __webpack_require__("d3f4");
  1567. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  1568. // and the second argument - flag - preferred type is a string
  1569. module.exports = function (it, S) {
  1570. if (!isObject(it)) return it;
  1571. var fn, val;
  1572. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  1573. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  1574. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  1575. throw TypeError("Can't convert object to primitive value");
  1576. };
  1577. /***/ }),
  1578. /***/ "7333":
  1579. /***/ (function(module, exports, __webpack_require__) {
  1580. "use strict";
  1581. // 19.1.2.1 Object.assign(target, source, ...)
  1582. var DESCRIPTORS = __webpack_require__("9e1e");
  1583. var getKeys = __webpack_require__("0d58");
  1584. var gOPS = __webpack_require__("2621");
  1585. var pIE = __webpack_require__("52a7");
  1586. var toObject = __webpack_require__("4bf8");
  1587. var IObject = __webpack_require__("626a");
  1588. var $assign = Object.assign;
  1589. // should work with symbols and should have deterministic property order (V8 bug)
  1590. module.exports = !$assign || __webpack_require__("79e5")(function () {
  1591. var A = {};
  1592. var B = {};
  1593. // eslint-disable-next-line no-undef
  1594. var S = Symbol();
  1595. var K = 'abcdefghijklmnopqrst';
  1596. A[S] = 7;
  1597. K.split('').forEach(function (k) { B[k] = k; });
  1598. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  1599. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  1600. var T = toObject(target);
  1601. var aLen = arguments.length;
  1602. var index = 1;
  1603. var getSymbols = gOPS.f;
  1604. var isEnum = pIE.f;
  1605. while (aLen > index) {
  1606. var S = IObject(arguments[index++]);
  1607. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  1608. var length = keys.length;
  1609. var j = 0;
  1610. var key;
  1611. while (length > j) {
  1612. key = keys[j++];
  1613. if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
  1614. }
  1615. } return T;
  1616. } : $assign;
  1617. /***/ }),
  1618. /***/ "7726":
  1619. /***/ (function(module, exports) {
  1620. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1621. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  1622. ? window : typeof self != 'undefined' && self.Math == Math ? self
  1623. // eslint-disable-next-line no-new-func
  1624. : Function('return this')();
  1625. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  1626. /***/ }),
  1627. /***/ "77f1":
  1628. /***/ (function(module, exports, __webpack_require__) {
  1629. var toInteger = __webpack_require__("4588");
  1630. var max = Math.max;
  1631. var min = Math.min;
  1632. module.exports = function (index, length) {
  1633. index = toInteger(index);
  1634. return index < 0 ? max(index + length, 0) : min(index, length);
  1635. };
  1636. /***/ }),
  1637. /***/ "79e5":
  1638. /***/ (function(module, exports) {
  1639. module.exports = function (exec) {
  1640. try {
  1641. return !!exec();
  1642. } catch (e) {
  1643. return true;
  1644. }
  1645. };
  1646. /***/ }),
  1647. /***/ "7f20":
  1648. /***/ (function(module, exports, __webpack_require__) {
  1649. var def = __webpack_require__("86cc").f;
  1650. var has = __webpack_require__("69a8");
  1651. var TAG = __webpack_require__("2b4c")('toStringTag');
  1652. module.exports = function (it, tag, stat) {
  1653. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  1654. };
  1655. /***/ }),
  1656. /***/ "8378":
  1657. /***/ (function(module, exports) {
  1658. var core = module.exports = { version: '2.6.12' };
  1659. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  1660. /***/ }),
  1661. /***/ "848e":
  1662. /***/ (function(module, exports, __webpack_require__) {
  1663. // Imports
  1664. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
  1665. exports = ___CSS_LOADER_API_IMPORT___(false);
  1666. // Module
  1667. exports.push([module.i, ".vue-grid-layout{position:relative;-webkit-transition:height .2s ease;transition:height .2s ease}", ""]);
  1668. // Exports
  1669. module.exports = exports;
  1670. /***/ }),
  1671. /***/ "84f2":
  1672. /***/ (function(module, exports) {
  1673. module.exports = {};
  1674. /***/ }),
  1675. /***/ "86cc":
  1676. /***/ (function(module, exports, __webpack_require__) {
  1677. var anObject = __webpack_require__("cb7c");
  1678. var IE8_DOM_DEFINE = __webpack_require__("c69a");
  1679. var toPrimitive = __webpack_require__("6a99");
  1680. var dP = Object.defineProperty;
  1681. exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  1682. anObject(O);
  1683. P = toPrimitive(P, true);
  1684. anObject(Attributes);
  1685. if (IE8_DOM_DEFINE) try {
  1686. return dP(O, P, Attributes);
  1687. } catch (e) { /* empty */ }
  1688. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  1689. if ('value' in Attributes) O[P] = Attributes.value;
  1690. return O;
  1691. };
  1692. /***/ }),
  1693. /***/ "8875":
  1694. /***/ (function(module, exports, __webpack_require__) {
  1695. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
  1696. // MIT license
  1697. // source: https://github.com/amiller-gh/currentScript-polyfill
  1698. // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
  1699. (function (root, factory) {
  1700. if (true) {
  1701. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  1702. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  1703. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  1704. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  1705. } else {}
  1706. }(typeof self !== 'undefined' ? self : this, function () {
  1707. function getCurrentScript () {
  1708. var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
  1709. // for chrome
  1710. if (!descriptor && 'currentScript' in document && document.currentScript) {
  1711. return document.currentScript
  1712. }
  1713. // for other browsers with native support for currentScript
  1714. if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
  1715. return document.currentScript
  1716. }
  1717. // IE 8-10 support script readyState
  1718. // IE 11+ & Firefox support stack trace
  1719. try {
  1720. throw new Error();
  1721. }
  1722. catch (err) {
  1723. // Find the second match for the "at" string to get file src url from stack.
  1724. var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
  1725. ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
  1726. stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
  1727. scriptLocation = (stackDetails && stackDetails[1]) || false,
  1728. line = (stackDetails && stackDetails[2]) || false,
  1729. currentLocation = document.location.href.replace(document.location.hash, ''),
  1730. pageSource,
  1731. inlineScriptSourceRegExp,
  1732. inlineScriptSource,
  1733. scripts = document.getElementsByTagName('script'); // Live NodeList collection
  1734. if (scriptLocation === currentLocation) {
  1735. pageSource = document.documentElement.outerHTML;
  1736. inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
  1737. inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
  1738. }
  1739. for (var i = 0; i < scripts.length; i++) {
  1740. // If ready state is interactive, return the script tag
  1741. if (scripts[i].readyState === 'interactive') {
  1742. return scripts[i];
  1743. }
  1744. // If src matches, return the script tag
  1745. if (scripts[i].src === scriptLocation) {
  1746. return scripts[i];
  1747. }
  1748. // If inline source matches, return the script tag
  1749. if (
  1750. scriptLocation === currentLocation &&
  1751. scripts[i].innerHTML &&
  1752. scripts[i].innerHTML.trim() === inlineScriptSource
  1753. ) {
  1754. return scripts[i];
  1755. }
  1756. }
  1757. // If no match, return null
  1758. return null;
  1759. }
  1760. };
  1761. return getCurrentScript
  1762. }));
  1763. /***/ }),
  1764. /***/ "8b97":
  1765. /***/ (function(module, exports, __webpack_require__) {
  1766. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1767. /* eslint-disable no-proto */
  1768. var isObject = __webpack_require__("d3f4");
  1769. var anObject = __webpack_require__("cb7c");
  1770. var check = function (O, proto) {
  1771. anObject(O);
  1772. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  1773. };
  1774. module.exports = {
  1775. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  1776. function (test, buggy, set) {
  1777. try {
  1778. set = __webpack_require__("9b43")(Function.call, __webpack_require__("11e9").f(Object.prototype, '__proto__').set, 2);
  1779. set(test, []);
  1780. buggy = !(test instanceof Array);
  1781. } catch (e) { buggy = true; }
  1782. return function setPrototypeOf(O, proto) {
  1783. check(O, proto);
  1784. if (buggy) O.__proto__ = proto;
  1785. else set(O, proto);
  1786. return O;
  1787. };
  1788. }({}, false) : undefined),
  1789. check: check
  1790. };
  1791. /***/ }),
  1792. /***/ "8bbf":
  1793. /***/ (function(module, exports) {
  1794. module.exports = require("vue");
  1795. /***/ }),
  1796. /***/ "8e6e":
  1797. /***/ (function(module, exports, __webpack_require__) {
  1798. // https://github.com/tc39/proposal-object-getownpropertydescriptors
  1799. var $export = __webpack_require__("5ca1");
  1800. var ownKeys = __webpack_require__("990b");
  1801. var toIObject = __webpack_require__("6821");
  1802. var gOPD = __webpack_require__("11e9");
  1803. var createProperty = __webpack_require__("f1ae");
  1804. $export($export.S, 'Object', {
  1805. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  1806. var O = toIObject(object);
  1807. var getDesc = gOPD.f;
  1808. var keys = ownKeys(O);
  1809. var result = {};
  1810. var i = 0;
  1811. var key, desc;
  1812. while (keys.length > i) {
  1813. desc = getDesc(O, key = keys[i++]);
  1814. if (desc !== undefined) createProperty(result, key, desc);
  1815. }
  1816. return result;
  1817. }
  1818. });
  1819. /***/ }),
  1820. /***/ "9093":
  1821. /***/ (function(module, exports, __webpack_require__) {
  1822. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  1823. var $keys = __webpack_require__("ce10");
  1824. var hiddenKeys = __webpack_require__("e11e").concat('length', 'prototype');
  1825. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1826. return $keys(O, hiddenKeys);
  1827. };
  1828. /***/ }),
  1829. /***/ "92bf":
  1830. /***/ (function(module, exports, __webpack_require__) {
  1831. // style-loader: Adds some css to the DOM by adding a <style> tag
  1832. // load the styles
  1833. var content = __webpack_require__("848e");
  1834. if(typeof content === 'string') content = [[module.i, content, '']];
  1835. if(content.locals) module.exports = content.locals;
  1836. // add the styles to the DOM
  1837. var add = __webpack_require__("499e").default
  1838. var update = add("ff1827d0", content, true, {"sourceMap":false,"shadowMode":false});
  1839. /***/ }),
  1840. /***/ "990b":
  1841. /***/ (function(module, exports, __webpack_require__) {
  1842. // all object keys, includes non-enumerable and symbols
  1843. var gOPN = __webpack_require__("9093");
  1844. var gOPS = __webpack_require__("2621");
  1845. var anObject = __webpack_require__("cb7c");
  1846. var Reflect = __webpack_require__("7726").Reflect;
  1847. module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  1848. var keys = gOPN.f(anObject(it));
  1849. var getSymbols = gOPS.f;
  1850. return getSymbols ? keys.concat(getSymbols(it)) : keys;
  1851. };
  1852. /***/ }),
  1853. /***/ "9b43":
  1854. /***/ (function(module, exports, __webpack_require__) {
  1855. // optional / simple context binding
  1856. var aFunction = __webpack_require__("d8e8");
  1857. module.exports = function (fn, that, length) {
  1858. aFunction(fn);
  1859. if (that === undefined) return fn;
  1860. switch (length) {
  1861. case 1: return function (a) {
  1862. return fn.call(that, a);
  1863. };
  1864. case 2: return function (a, b) {
  1865. return fn.call(that, a, b);
  1866. };
  1867. case 3: return function (a, b, c) {
  1868. return fn.call(that, a, b, c);
  1869. };
  1870. }
  1871. return function (/* ...args */) {
  1872. return fn.apply(that, arguments);
  1873. };
  1874. };
  1875. /***/ }),
  1876. /***/ "9c6c":
  1877. /***/ (function(module, exports, __webpack_require__) {
  1878. // 22.1.3.31 Array.prototype[@@unscopables]
  1879. var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
  1880. var ArrayProto = Array.prototype;
  1881. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
  1882. module.exports = function (key) {
  1883. ArrayProto[UNSCOPABLES][key] = true;
  1884. };
  1885. /***/ }),
  1886. /***/ "9def":
  1887. /***/ (function(module, exports, __webpack_require__) {
  1888. // 7.1.15 ToLength
  1889. var toInteger = __webpack_require__("4588");
  1890. var min = Math.min;
  1891. module.exports = function (it) {
  1892. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  1893. };
  1894. /***/ }),
  1895. /***/ "9e1e":
  1896. /***/ (function(module, exports, __webpack_require__) {
  1897. // Thank's IE8 for his funny defineProperty
  1898. module.exports = !__webpack_require__("79e5")(function () {
  1899. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  1900. });
  1901. /***/ }),
  1902. /***/ "a481":
  1903. /***/ (function(module, exports, __webpack_require__) {
  1904. "use strict";
  1905. var anObject = __webpack_require__("cb7c");
  1906. var toObject = __webpack_require__("4bf8");
  1907. var toLength = __webpack_require__("9def");
  1908. var toInteger = __webpack_require__("4588");
  1909. var advanceStringIndex = __webpack_require__("0390");
  1910. var regExpExec = __webpack_require__("5f1b");
  1911. var max = Math.max;
  1912. var min = Math.min;
  1913. var floor = Math.floor;
  1914. var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  1915. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  1916. var maybeToString = function (it) {
  1917. return it === undefined ? it : String(it);
  1918. };
  1919. // @@replace logic
  1920. __webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
  1921. return [
  1922. // `String.prototype.replace` method
  1923. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  1924. function replace(searchValue, replaceValue) {
  1925. var O = defined(this);
  1926. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  1927. return fn !== undefined
  1928. ? fn.call(searchValue, O, replaceValue)
  1929. : $replace.call(String(O), searchValue, replaceValue);
  1930. },
  1931. // `RegExp.prototype[@@replace]` method
  1932. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  1933. function (regexp, replaceValue) {
  1934. var res = maybeCallNative($replace, regexp, this, replaceValue);
  1935. if (res.done) return res.value;
  1936. var rx = anObject(regexp);
  1937. var S = String(this);
  1938. var functionalReplace = typeof replaceValue === 'function';
  1939. if (!functionalReplace) replaceValue = String(replaceValue);
  1940. var global = rx.global;
  1941. if (global) {
  1942. var fullUnicode = rx.unicode;
  1943. rx.lastIndex = 0;
  1944. }
  1945. var results = [];
  1946. while (true) {
  1947. var result = regExpExec(rx, S);
  1948. if (result === null) break;
  1949. results.push(result);
  1950. if (!global) break;
  1951. var matchStr = String(result[0]);
  1952. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1953. }
  1954. var accumulatedResult = '';
  1955. var nextSourcePosition = 0;
  1956. for (var i = 0; i < results.length; i++) {
  1957. result = results[i];
  1958. var matched = String(result[0]);
  1959. var position = max(min(toInteger(result.index), S.length), 0);
  1960. var captures = [];
  1961. // NOTE: This is equivalent to
  1962. // captures = result.slice(1).map(maybeToString)
  1963. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1964. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1965. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1966. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  1967. var namedCaptures = result.groups;
  1968. if (functionalReplace) {
  1969. var replacerArgs = [matched].concat(captures, position, S);
  1970. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  1971. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  1972. } else {
  1973. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1974. }
  1975. if (position >= nextSourcePosition) {
  1976. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  1977. nextSourcePosition = position + matched.length;
  1978. }
  1979. }
  1980. return accumulatedResult + S.slice(nextSourcePosition);
  1981. }
  1982. ];
  1983. // https://tc39.github.io/ecma262/#sec-getsubstitution
  1984. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  1985. var tailPos = position + matched.length;
  1986. var m = captures.length;
  1987. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1988. if (namedCaptures !== undefined) {
  1989. namedCaptures = toObject(namedCaptures);
  1990. symbols = SUBSTITUTION_SYMBOLS;
  1991. }
  1992. return $replace.call(replacement, symbols, function (match, ch) {
  1993. var capture;
  1994. switch (ch.charAt(0)) {
  1995. case '$': return '$';
  1996. case '&': return matched;
  1997. case '`': return str.slice(0, position);
  1998. case "'": return str.slice(tailPos);
  1999. case '<':
  2000. capture = namedCaptures[ch.slice(1, -1)];
  2001. break;
  2002. default: // \d\d?
  2003. var n = +ch;
  2004. if (n === 0) return match;
  2005. if (n > m) {
  2006. var f = floor(n / 10);
  2007. if (f === 0) return match;
  2008. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  2009. return match;
  2010. }
  2011. capture = captures[n - 1];
  2012. }
  2013. return capture === undefined ? '' : capture;
  2014. });
  2015. }
  2016. });
  2017. /***/ }),
  2018. /***/ "aa77":
  2019. /***/ (function(module, exports, __webpack_require__) {
  2020. var $export = __webpack_require__("5ca1");
  2021. var defined = __webpack_require__("be13");
  2022. var fails = __webpack_require__("79e5");
  2023. var spaces = __webpack_require__("fdef");
  2024. var space = '[' + spaces + ']';
  2025. var non = '\u200b\u0085';
  2026. var ltrim = RegExp('^' + space + space + '*');
  2027. var rtrim = RegExp(space + space + '*$');
  2028. var exporter = function (KEY, exec, ALIAS) {
  2029. var exp = {};
  2030. var FORCE = fails(function () {
  2031. return !!spaces[KEY]() || non[KEY]() != non;
  2032. });
  2033. var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  2034. if (ALIAS) exp[ALIAS] = fn;
  2035. $export($export.P + $export.F * FORCE, 'String', exp);
  2036. };
  2037. // 1 -> String#trimLeft
  2038. // 2 -> String#trimRight
  2039. // 3 -> String#trim
  2040. var trim = exporter.trim = function (string, TYPE) {
  2041. string = String(defined(string));
  2042. if (TYPE & 1) string = string.replace(ltrim, '');
  2043. if (TYPE & 2) string = string.replace(rtrim, '');
  2044. return string;
  2045. };
  2046. module.exports = exporter;
  2047. /***/ }),
  2048. /***/ "abb4":
  2049. /***/ (function(module, exports, __webpack_require__) {
  2050. "use strict";
  2051. /* global console: false */
  2052. /**
  2053. * Reporter that handles the reporting of logs, warnings and errors.
  2054. * @public
  2055. * @param {boolean} quiet Tells if the reporter should be quiet or not.
  2056. */
  2057. module.exports = function(quiet) {
  2058. function noop() {
  2059. //Does nothing.
  2060. }
  2061. var reporter = {
  2062. log: noop,
  2063. warn: noop,
  2064. error: noop
  2065. };
  2066. if(!quiet && window.console) {
  2067. var attachFunction = function(reporter, name) {
  2068. //The proxy is needed to be able to call the method with the console context,
  2069. //since we cannot use bind.
  2070. reporter[name] = function reporterProxy() {
  2071. var f = console[name];
  2072. if (f.apply) { //IE9 does not support console.log.apply :)
  2073. f.apply(console, arguments);
  2074. } else {
  2075. for (var i = 0; i < arguments.length; i++) {
  2076. f(arguments[i]);
  2077. }
  2078. }
  2079. };
  2080. };
  2081. attachFunction(reporter, "log");
  2082. attachFunction(reporter, "warn");
  2083. attachFunction(reporter, "error");
  2084. }
  2085. return reporter;
  2086. };
  2087. /***/ }),
  2088. /***/ "ac6a":
  2089. /***/ (function(module, exports, __webpack_require__) {
  2090. var $iterators = __webpack_require__("cadf");
  2091. var getKeys = __webpack_require__("0d58");
  2092. var redefine = __webpack_require__("2aba");
  2093. var global = __webpack_require__("7726");
  2094. var hide = __webpack_require__("32e9");
  2095. var Iterators = __webpack_require__("84f2");
  2096. var wks = __webpack_require__("2b4c");
  2097. var ITERATOR = wks('iterator');
  2098. var TO_STRING_TAG = wks('toStringTag');
  2099. var ArrayValues = Iterators.Array;
  2100. var DOMIterables = {
  2101. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  2102. CSSStyleDeclaration: false,
  2103. CSSValueList: false,
  2104. ClientRectList: false,
  2105. DOMRectList: false,
  2106. DOMStringList: false,
  2107. DOMTokenList: true,
  2108. DataTransferItemList: false,
  2109. FileList: false,
  2110. HTMLAllCollection: false,
  2111. HTMLCollection: false,
  2112. HTMLFormElement: false,
  2113. HTMLSelectElement: false,
  2114. MediaList: true, // TODO: Not spec compliant, should be false.
  2115. MimeTypeArray: false,
  2116. NamedNodeMap: false,
  2117. NodeList: true,
  2118. PaintRequestList: false,
  2119. Plugin: false,
  2120. PluginArray: false,
  2121. SVGLengthList: false,
  2122. SVGNumberList: false,
  2123. SVGPathSegList: false,
  2124. SVGPointList: false,
  2125. SVGStringList: false,
  2126. SVGTransformList: false,
  2127. SourceBufferList: false,
  2128. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  2129. TextTrackCueList: false,
  2130. TextTrackList: false,
  2131. TouchList: false
  2132. };
  2133. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  2134. var NAME = collections[i];
  2135. var explicit = DOMIterables[NAME];
  2136. var Collection = global[NAME];
  2137. var proto = Collection && Collection.prototype;
  2138. var key;
  2139. if (proto) {
  2140. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  2141. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  2142. Iterators[NAME] = ArrayValues;
  2143. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  2144. }
  2145. }
  2146. /***/ }),
  2147. /***/ "b0c5":
  2148. /***/ (function(module, exports, __webpack_require__) {
  2149. "use strict";
  2150. var regexpExec = __webpack_require__("520a");
  2151. __webpack_require__("5ca1")({
  2152. target: 'RegExp',
  2153. proto: true,
  2154. forced: regexpExec !== /./.exec
  2155. }, {
  2156. exec: regexpExec
  2157. });
  2158. /***/ }),
  2159. /***/ "b770":
  2160. /***/ (function(module, exports, __webpack_require__) {
  2161. "use strict";
  2162. var utils = module.exports = {};
  2163. /**
  2164. * 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.
  2165. * @public
  2166. * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
  2167. * @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.
  2168. * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
  2169. */
  2170. utils.forEach = function(collection, callback) {
  2171. for(var i = 0; i < collection.length; i++) {
  2172. var result = callback(collection[i]);
  2173. if(result) {
  2174. return result;
  2175. }
  2176. }
  2177. };
  2178. /***/ }),
  2179. /***/ "be13":
  2180. /***/ (function(module, exports) {
  2181. // 7.2.1 RequireObjectCoercible(argument)
  2182. module.exports = function (it) {
  2183. if (it == undefined) throw TypeError("Can't call method on " + it);
  2184. return it;
  2185. };
  2186. /***/ }),
  2187. /***/ "c274":
  2188. /***/ (function(module, exports, __webpack_require__) {
  2189. "use strict";
  2190. var utils = __webpack_require__("50bf");
  2191. module.exports = function batchProcessorMaker(options) {
  2192. options = options || {};
  2193. var reporter = options.reporter;
  2194. var asyncProcess = utils.getOption(options, "async", true);
  2195. var autoProcess = utils.getOption(options, "auto", true);
  2196. if(autoProcess && !asyncProcess) {
  2197. reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
  2198. asyncProcess = true;
  2199. }
  2200. var batch = Batch();
  2201. var asyncFrameHandler;
  2202. var isProcessing = false;
  2203. function addFunction(level, fn) {
  2204. if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
  2205. // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
  2206. // This needs to be done before, since we're checking the size of the batch to be 0.
  2207. processBatchAsync();
  2208. }
  2209. batch.add(level, fn);
  2210. }
  2211. function processBatch() {
  2212. // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
  2213. // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
  2214. isProcessing = true;
  2215. while (batch.size()) {
  2216. var processingBatch = batch;
  2217. batch = Batch();
  2218. processingBatch.process();
  2219. }
  2220. isProcessing = false;
  2221. }
  2222. function forceProcessBatch(localAsyncProcess) {
  2223. if (isProcessing) {
  2224. return;
  2225. }
  2226. if(localAsyncProcess === undefined) {
  2227. localAsyncProcess = asyncProcess;
  2228. }
  2229. if(asyncFrameHandler) {
  2230. cancelFrame(asyncFrameHandler);
  2231. asyncFrameHandler = null;
  2232. }
  2233. if(localAsyncProcess) {
  2234. processBatchAsync();
  2235. } else {
  2236. processBatch();
  2237. }
  2238. }
  2239. function processBatchAsync() {
  2240. asyncFrameHandler = requestFrame(processBatch);
  2241. }
  2242. function clearBatch() {
  2243. batch = {};
  2244. batchSize = 0;
  2245. topLevel = 0;
  2246. bottomLevel = 0;
  2247. }
  2248. function cancelFrame(listener) {
  2249. // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
  2250. var cancel = clearTimeout;
  2251. return cancel(listener);
  2252. }
  2253. function requestFrame(callback) {
  2254. // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
  2255. var raf = function(fn) { return setTimeout(fn, 0); };
  2256. return raf(callback);
  2257. }
  2258. return {
  2259. add: addFunction,
  2260. force: forceProcessBatch
  2261. };
  2262. };
  2263. function Batch() {
  2264. var batch = {};
  2265. var size = 0;
  2266. var topLevel = 0;
  2267. var bottomLevel = 0;
  2268. function add(level, fn) {
  2269. if(!fn) {
  2270. fn = level;
  2271. level = 0;
  2272. }
  2273. if(level > topLevel) {
  2274. topLevel = level;
  2275. } else if(level < bottomLevel) {
  2276. bottomLevel = level;
  2277. }
  2278. if(!batch[level]) {
  2279. batch[level] = [];
  2280. }
  2281. batch[level].push(fn);
  2282. size++;
  2283. }
  2284. function process() {
  2285. for(var level = bottomLevel; level <= topLevel; level++) {
  2286. var fns = batch[level];
  2287. for(var i = 0; i < fns.length; i++) {
  2288. var fn = fns[i];
  2289. fn();
  2290. }
  2291. }
  2292. }
  2293. function getSize() {
  2294. return size;
  2295. }
  2296. return {
  2297. add: add,
  2298. process: process,
  2299. size: getSize
  2300. };
  2301. }
  2302. /***/ }),
  2303. /***/ "c366":
  2304. /***/ (function(module, exports, __webpack_require__) {
  2305. // false -> Array#indexOf
  2306. // true -> Array#includes
  2307. var toIObject = __webpack_require__("6821");
  2308. var toLength = __webpack_require__("9def");
  2309. var toAbsoluteIndex = __webpack_require__("77f1");
  2310. module.exports = function (IS_INCLUDES) {
  2311. return function ($this, el, fromIndex) {
  2312. var O = toIObject($this);
  2313. var length = toLength(O.length);
  2314. var index = toAbsoluteIndex(fromIndex, length);
  2315. var value;
  2316. // Array#includes uses SameValueZero equality algorithm
  2317. // eslint-disable-next-line no-self-compare
  2318. if (IS_INCLUDES && el != el) while (length > index) {
  2319. value = O[index++];
  2320. // eslint-disable-next-line no-self-compare
  2321. if (value != value) return true;
  2322. // Array#indexOf ignores holes, Array#includes - not
  2323. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  2324. if (O[index] === el) return IS_INCLUDES || index || 0;
  2325. } return !IS_INCLUDES && -1;
  2326. };
  2327. };
  2328. /***/ }),
  2329. /***/ "c541":
  2330. /***/ (function(module, exports, __webpack_require__) {
  2331. // style-loader: Adds some css to the DOM by adding a <style> tag
  2332. // load the styles
  2333. var content = __webpack_require__("493e");
  2334. if(typeof content === 'string') content = [[module.i, content, '']];
  2335. if(content.locals) module.exports = content.locals;
  2336. // add the styles to the DOM
  2337. var add = __webpack_require__("499e").default
  2338. var update = add("40158674", content, true, {"sourceMap":false,"shadowMode":false});
  2339. /***/ }),
  2340. /***/ "c5f6":
  2341. /***/ (function(module, exports, __webpack_require__) {
  2342. "use strict";
  2343. var global = __webpack_require__("7726");
  2344. var has = __webpack_require__("69a8");
  2345. var cof = __webpack_require__("2d95");
  2346. var inheritIfRequired = __webpack_require__("5dbc");
  2347. var toPrimitive = __webpack_require__("6a99");
  2348. var fails = __webpack_require__("79e5");
  2349. var gOPN = __webpack_require__("9093").f;
  2350. var gOPD = __webpack_require__("11e9").f;
  2351. var dP = __webpack_require__("86cc").f;
  2352. var $trim = __webpack_require__("aa77").trim;
  2353. var NUMBER = 'Number';
  2354. var $Number = global[NUMBER];
  2355. var Base = $Number;
  2356. var proto = $Number.prototype;
  2357. // Opera ~12 has broken Object#toString
  2358. var BROKEN_COF = cof(__webpack_require__("2aeb")(proto)) == NUMBER;
  2359. var TRIM = 'trim' in String.prototype;
  2360. // 7.1.3 ToNumber(argument)
  2361. var toNumber = function (argument) {
  2362. var it = toPrimitive(argument, false);
  2363. if (typeof it == 'string' && it.length > 2) {
  2364. it = TRIM ? it.trim() : $trim(it, 3);
  2365. var first = it.charCodeAt(0);
  2366. var third, radix, maxCode;
  2367. if (first === 43 || first === 45) {
  2368. third = it.charCodeAt(2);
  2369. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  2370. } else if (first === 48) {
  2371. switch (it.charCodeAt(1)) {
  2372. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
  2373. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
  2374. default: return +it;
  2375. }
  2376. for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
  2377. code = digits.charCodeAt(i);
  2378. // parseInt parses a string to a first unavailable symbol
  2379. // but ToNumber should return NaN if a string contains unavailable symbols
  2380. if (code < 48 || code > maxCode) return NaN;
  2381. } return parseInt(digits, radix);
  2382. }
  2383. } return +it;
  2384. };
  2385. if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  2386. $Number = function Number(value) {
  2387. var it = arguments.length < 1 ? 0 : value;
  2388. var that = this;
  2389. return that instanceof $Number
  2390. // check on 1..constructor(foo) case
  2391. && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
  2392. ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  2393. };
  2394. for (var keys = __webpack_require__("9e1e") ? gOPN(Base) : (
  2395. // ES3:
  2396. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  2397. // ES6 (in case, if modules with ES6 Number statics required before):
  2398. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  2399. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  2400. ).split(','), j = 0, key; keys.length > j; j++) {
  2401. if (has(Base, key = keys[j]) && !has($Number, key)) {
  2402. dP($Number, key, gOPD(Base, key));
  2403. }
  2404. }
  2405. $Number.prototype = proto;
  2406. proto.constructor = $Number;
  2407. __webpack_require__("2aba")(global, NUMBER, $Number);
  2408. }
  2409. /***/ }),
  2410. /***/ "c69a":
  2411. /***/ (function(module, exports, __webpack_require__) {
  2412. module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
  2413. return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
  2414. });
  2415. /***/ }),
  2416. /***/ "c946":
  2417. /***/ (function(module, exports, __webpack_require__) {
  2418. "use strict";
  2419. /**
  2420. * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
  2421. * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
  2422. */
  2423. var forEach = __webpack_require__("b770").forEach;
  2424. module.exports = function(options) {
  2425. options = options || {};
  2426. var reporter = options.reporter;
  2427. var batchProcessor = options.batchProcessor;
  2428. var getState = options.stateHandler.getState;
  2429. var hasState = options.stateHandler.hasState;
  2430. var idHandler = options.idHandler;
  2431. if (!batchProcessor) {
  2432. throw new Error("Missing required dependency: batchProcessor");
  2433. }
  2434. if (!reporter) {
  2435. throw new Error("Missing required dependency: reporter.");
  2436. }
  2437. //TODO: Could this perhaps be done at installation time?
  2438. var scrollbarSizes = getScrollbarSizes();
  2439. var styleId = "erd_scroll_detection_scrollbar_style";
  2440. var detectionContainerClass = "erd_scroll_detection_container";
  2441. function initDocument(targetDocument) {
  2442. // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
  2443. // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
  2444. injectScrollStyle(targetDocument, styleId, detectionContainerClass);
  2445. }
  2446. initDocument(window.document);
  2447. function buildCssTextString(rules) {
  2448. var seperator = options.important ? " !important; " : "; ";
  2449. return (rules.join(seperator) + seperator).trim();
  2450. }
  2451. function getScrollbarSizes() {
  2452. var width = 500;
  2453. var height = 500;
  2454. var child = document.createElement("div");
  2455. child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  2456. var container = document.createElement("div");
  2457. 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"]);
  2458. container.appendChild(child);
  2459. document.body.insertBefore(container, document.body.firstChild);
  2460. var widthSize = width - container.clientWidth;
  2461. var heightSize = height - container.clientHeight;
  2462. document.body.removeChild(container);
  2463. return {
  2464. width: widthSize,
  2465. height: heightSize
  2466. };
  2467. }
  2468. function injectScrollStyle(targetDocument, styleId, containerClass) {
  2469. function injectStyle(style, method) {
  2470. method = method || function (element) {
  2471. targetDocument.head.appendChild(element);
  2472. };
  2473. var styleElement = targetDocument.createElement("style");
  2474. styleElement.innerHTML = style;
  2475. styleElement.id = styleId;
  2476. method(styleElement);
  2477. return styleElement;
  2478. }
  2479. if (!targetDocument.getElementById(styleId)) {
  2480. var containerAnimationClass = containerClass + "_animation";
  2481. var containerAnimationActiveClass = containerClass + "_animation_active";
  2482. var style = "/* Created by the element-resize-detector library. */\n";
  2483. style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n";
  2484. style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n";
  2485. style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
  2486. style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
  2487. injectStyle(style);
  2488. }
  2489. }
  2490. function addAnimationClass(element) {
  2491. element.className += " " + detectionContainerClass + "_animation_active";
  2492. }
  2493. function addEvent(el, name, cb) {
  2494. if (el.addEventListener) {
  2495. el.addEventListener(name, cb);
  2496. } else if(el.attachEvent) {
  2497. el.attachEvent("on" + name, cb);
  2498. } else {
  2499. return reporter.error("[scroll] Don't know how to add event listeners.");
  2500. }
  2501. }
  2502. function removeEvent(el, name, cb) {
  2503. if (el.removeEventListener) {
  2504. el.removeEventListener(name, cb);
  2505. } else if(el.detachEvent) {
  2506. el.detachEvent("on" + name, cb);
  2507. } else {
  2508. return reporter.error("[scroll] Don't know how to remove event listeners.");
  2509. }
  2510. }
  2511. function getExpandElement(element) {
  2512. return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
  2513. }
  2514. function getShrinkElement(element) {
  2515. return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
  2516. }
  2517. /**
  2518. * Adds a resize event listener to the element.
  2519. * @public
  2520. * @param {element} element The element that should have the listener added.
  2521. * @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.
  2522. */
  2523. function addListener(element, listener) {
  2524. var listeners = getState(element).listeners;
  2525. if (!listeners.push) {
  2526. throw new Error("Cannot add listener to an element that is not detectable.");
  2527. }
  2528. getState(element).listeners.push(listener);
  2529. }
  2530. /**
  2531. * 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.
  2532. * @private
  2533. * @param {object} options Optional options object.
  2534. * @param {element} element The element to make detectable
  2535. * @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.
  2536. */
  2537. function makeDetectable(options, element, callback) {
  2538. if (!callback) {
  2539. callback = element;
  2540. element = options;
  2541. options = null;
  2542. }
  2543. options = options || {};
  2544. function debug() {
  2545. if (options.debug) {
  2546. var args = Array.prototype.slice.call(arguments);
  2547. args.unshift(idHandler.get(element), "Scroll: ");
  2548. if (reporter.log.apply) {
  2549. reporter.log.apply(null, args);
  2550. } else {
  2551. for (var i = 0; i < args.length; i++) {
  2552. reporter.log(args[i]);
  2553. }
  2554. }
  2555. }
  2556. }
  2557. function isDetached(element) {
  2558. function isInDocument(element) {
  2559. return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
  2560. }
  2561. if (!isInDocument(element)) {
  2562. return true;
  2563. }
  2564. // 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
  2565. if (window.getComputedStyle(element) === null) {
  2566. return true;
  2567. }
  2568. return false;
  2569. }
  2570. function isUnrendered(element) {
  2571. // Check the absolute positioned container since the top level container is display: inline.
  2572. var container = getState(element).container.childNodes[0];
  2573. var style = window.getComputedStyle(container);
  2574. return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered.
  2575. }
  2576. function getStyle() {
  2577. // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
  2578. // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
  2579. var elementStyle = window.getComputedStyle(element);
  2580. var style = {};
  2581. style.position = elementStyle.position;
  2582. style.width = element.offsetWidth;
  2583. style.height = element.offsetHeight;
  2584. style.top = elementStyle.top;
  2585. style.right = elementStyle.right;
  2586. style.bottom = elementStyle.bottom;
  2587. style.left = elementStyle.left;
  2588. style.widthCSS = elementStyle.width;
  2589. style.heightCSS = elementStyle.height;
  2590. return style;
  2591. }
  2592. function storeStartSize() {
  2593. var style = getStyle();
  2594. getState(element).startSize = {
  2595. width: style.width,
  2596. height: style.height
  2597. };
  2598. debug("Element start size", getState(element).startSize);
  2599. }
  2600. function initListeners() {
  2601. getState(element).listeners = [];
  2602. }
  2603. function storeStyle() {
  2604. debug("storeStyle invoked.");
  2605. if (!getState(element)) {
  2606. debug("Aborting because element has been uninstalled");
  2607. return;
  2608. }
  2609. var style = getStyle();
  2610. getState(element).style = style;
  2611. }
  2612. function storeCurrentSize(element, width, height) {
  2613. getState(element).lastWidth = width;
  2614. getState(element).lastHeight = height;
  2615. }
  2616. function getExpandChildElement(element) {
  2617. return getExpandElement(element).childNodes[0];
  2618. }
  2619. function getWidthOffset() {
  2620. return 2 * scrollbarSizes.width + 1;
  2621. }
  2622. function getHeightOffset() {
  2623. return 2 * scrollbarSizes.height + 1;
  2624. }
  2625. function getExpandWidth(width) {
  2626. return width + 10 + getWidthOffset();
  2627. }
  2628. function getExpandHeight(height) {
  2629. return height + 10 + getHeightOffset();
  2630. }
  2631. function getShrinkWidth(width) {
  2632. return width * 2 + getWidthOffset();
  2633. }
  2634. function getShrinkHeight(height) {
  2635. return height * 2 + getHeightOffset();
  2636. }
  2637. function positionScrollbars(element, width, height) {
  2638. var expand = getExpandElement(element);
  2639. var shrink = getShrinkElement(element);
  2640. var expandWidth = getExpandWidth(width);
  2641. var expandHeight = getExpandHeight(height);
  2642. var shrinkWidth = getShrinkWidth(width);
  2643. var shrinkHeight = getShrinkHeight(height);
  2644. expand.scrollLeft = expandWidth;
  2645. expand.scrollTop = expandHeight;
  2646. shrink.scrollLeft = shrinkWidth;
  2647. shrink.scrollTop = shrinkHeight;
  2648. }
  2649. function injectContainerElement() {
  2650. var container = getState(element).container;
  2651. if (!container) {
  2652. container = document.createElement("div");
  2653. container.className = detectionContainerClass;
  2654. container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]);
  2655. getState(element).container = container;
  2656. addAnimationClass(container);
  2657. element.appendChild(container);
  2658. var onAnimationStart = function () {
  2659. getState(element).onRendered && getState(element).onRendered();
  2660. };
  2661. addEvent(container, "animationstart", onAnimationStart);
  2662. // Store the event handler here so that they may be removed when uninstall is called.
  2663. // See uninstall function for an explanation why it is needed.
  2664. getState(element).onAnimationStart = onAnimationStart;
  2665. }
  2666. return container;
  2667. }
  2668. function injectScrollElements() {
  2669. function alterPositionStyles() {
  2670. var style = getState(element).style;
  2671. if(style.position === "static") {
  2672. element.style.setProperty("position", "relative",options.important ? "important" : "");
  2673. var removeRelativeStyles = function(reporter, element, style, property) {
  2674. function getNumericalValue(value) {
  2675. return value.replace(/[^-\d\.]/g, "");
  2676. }
  2677. var value = style[property];
  2678. if(value !== "auto" && getNumericalValue(value) !== "0") {
  2679. 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);
  2680. element.style[property] = 0;
  2681. }
  2682. };
  2683. //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
  2684. //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).
  2685. removeRelativeStyles(reporter, element, style, "top");
  2686. removeRelativeStyles(reporter, element, style, "right");
  2687. removeRelativeStyles(reporter, element, style, "bottom");
  2688. removeRelativeStyles(reporter, element, style, "left");
  2689. }
  2690. }
  2691. function getLeftTopBottomRightCssText(left, top, bottom, right) {
  2692. left = (!left ? "0" : (left + "px"));
  2693. top = (!top ? "0" : (top + "px"));
  2694. bottom = (!bottom ? "0" : (bottom + "px"));
  2695. right = (!right ? "0" : (right + "px"));
  2696. return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom];
  2697. }
  2698. debug("Injecting elements");
  2699. if (!getState(element)) {
  2700. debug("Aborting because element has been uninstalled");
  2701. return;
  2702. }
  2703. alterPositionStyles();
  2704. var rootContainer = getState(element).container;
  2705. if (!rootContainer) {
  2706. rootContainer = injectContainerElement();
  2707. }
  2708. // 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),
  2709. // 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
  2710. // the targeted element.
  2711. // When the bug is resolved, "containerContainer" may be removed.
  2712. // 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).
  2713. // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
  2714. var scrollbarWidth = scrollbarSizes.width;
  2715. var scrollbarHeight = scrollbarSizes.height;
  2716. var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]);
  2717. var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));
  2718. var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
  2719. var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
  2720. var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]);
  2721. var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]);
  2722. var containerContainer = document.createElement("div");
  2723. var container = document.createElement("div");
  2724. var expand = document.createElement("div");
  2725. var expandChild = document.createElement("div");
  2726. var shrink = document.createElement("div");
  2727. var shrinkChild = document.createElement("div");
  2728. // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
  2729. // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
  2730. containerContainer.dir = "ltr";
  2731. containerContainer.style.cssText = containerContainerStyle;
  2732. containerContainer.className = detectionContainerClass;
  2733. container.className = detectionContainerClass;
  2734. container.style.cssText = containerStyle;
  2735. expand.style.cssText = expandStyle;
  2736. expandChild.style.cssText = expandChildStyle;
  2737. shrink.style.cssText = shrinkStyle;
  2738. shrinkChild.style.cssText = shrinkChildStyle;
  2739. expand.appendChild(expandChild);
  2740. shrink.appendChild(shrinkChild);
  2741. container.appendChild(expand);
  2742. container.appendChild(shrink);
  2743. containerContainer.appendChild(container);
  2744. rootContainer.appendChild(containerContainer);
  2745. function onExpandScroll() {
  2746. getState(element).onExpand && getState(element).onExpand();
  2747. }
  2748. function onShrinkScroll() {
  2749. getState(element).onShrink && getState(element).onShrink();
  2750. }
  2751. addEvent(expand, "scroll", onExpandScroll);
  2752. addEvent(shrink, "scroll", onShrinkScroll);
  2753. // Store the event handlers here so that they may be removed when uninstall is called.
  2754. // See uninstall function for an explanation why it is needed.
  2755. getState(element).onExpandScroll = onExpandScroll;
  2756. getState(element).onShrinkScroll = onShrinkScroll;
  2757. }
  2758. function registerListenersAndPositionElements() {
  2759. function updateChildSizes(element, width, height) {
  2760. var expandChild = getExpandChildElement(element);
  2761. var expandWidth = getExpandWidth(width);
  2762. var expandHeight = getExpandHeight(height);
  2763. expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : "");
  2764. expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
  2765. }
  2766. function updateDetectorElements(done) {
  2767. var width = element.offsetWidth;
  2768. var height = element.offsetHeight;
  2769. // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.
  2770. var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
  2771. debug("Storing current size", width, height);
  2772. // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
  2773. // Otherwise the if-check in handleScroll is useless.
  2774. storeCurrentSize(element, width, height);
  2775. // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
  2776. // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
  2777. batchProcessor.add(0, function performUpdateChildSizes() {
  2778. if (!sizeChanged) {
  2779. return;
  2780. }
  2781. if (!getState(element)) {
  2782. debug("Aborting because element has been uninstalled");
  2783. return;
  2784. }
  2785. if (!areElementsInjected()) {
  2786. debug("Aborting because element container has not been initialized");
  2787. return;
  2788. }
  2789. if (options.debug) {
  2790. var w = element.offsetWidth;
  2791. var h = element.offsetHeight;
  2792. if (w !== width || h !== height) {
  2793. reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
  2794. }
  2795. }
  2796. updateChildSizes(element, width, height);
  2797. });
  2798. batchProcessor.add(1, function updateScrollbars() {
  2799. // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then
  2800. // been restored to the original size, which will have changed the scrollbar positions.
  2801. if (!getState(element)) {
  2802. debug("Aborting because element has been uninstalled");
  2803. return;
  2804. }
  2805. if (!areElementsInjected()) {
  2806. debug("Aborting because element container has not been initialized");
  2807. return;
  2808. }
  2809. positionScrollbars(element, width, height);
  2810. });
  2811. if (sizeChanged && done) {
  2812. batchProcessor.add(2, function () {
  2813. if (!getState(element)) {
  2814. debug("Aborting because element has been uninstalled");
  2815. return;
  2816. }
  2817. if (!areElementsInjected()) {
  2818. debug("Aborting because element container has not been initialized");
  2819. return;
  2820. }
  2821. done();
  2822. });
  2823. }
  2824. }
  2825. function areElementsInjected() {
  2826. return !!getState(element).container;
  2827. }
  2828. function notifyListenersIfNeeded() {
  2829. function isFirstNotify() {
  2830. return getState(element).lastNotifiedWidth === undefined;
  2831. }
  2832. debug("notifyListenersIfNeeded invoked");
  2833. var state = getState(element);
  2834. // Don't notify if the current size is the start size, and this is the first notification.
  2835. if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
  2836. return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
  2837. }
  2838. // Don't notify if the size already has been notified.
  2839. if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
  2840. return debug("Not notifying: Size already notified");
  2841. }
  2842. debug("Current size not notified, notifying...");
  2843. state.lastNotifiedWidth = state.lastWidth;
  2844. state.lastNotifiedHeight = state.lastHeight;
  2845. forEach(getState(element).listeners, function (listener) {
  2846. listener(element);
  2847. });
  2848. }
  2849. function handleRender() {
  2850. debug("startanimation triggered.");
  2851. if (isUnrendered(element)) {
  2852. debug("Ignoring since element is still unrendered...");
  2853. return;
  2854. }
  2855. debug("Element rendered.");
  2856. var expand = getExpandElement(element);
  2857. var shrink = getShrinkElement(element);
  2858. if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
  2859. debug("Scrollbars out of sync. Updating detector elements...");
  2860. updateDetectorElements(notifyListenersIfNeeded);
  2861. }
  2862. }
  2863. function handleScroll() {
  2864. debug("Scroll detected.");
  2865. if (isUnrendered(element)) {
  2866. // Element is still unrendered. Skip this scroll event.
  2867. debug("Scroll event fired while unrendered. Ignoring...");
  2868. return;
  2869. }
  2870. updateDetectorElements(notifyListenersIfNeeded);
  2871. }
  2872. debug("registerListenersAndPositionElements invoked.");
  2873. if (!getState(element)) {
  2874. debug("Aborting because element has been uninstalled");
  2875. return;
  2876. }
  2877. getState(element).onRendered = handleRender;
  2878. getState(element).onExpand = handleScroll;
  2879. getState(element).onShrink = handleScroll;
  2880. var style = getState(element).style;
  2881. updateChildSizes(element, style.width, style.height);
  2882. }
  2883. function finalizeDomMutation() {
  2884. debug("finalizeDomMutation invoked.");
  2885. if (!getState(element)) {
  2886. debug("Aborting because element has been uninstalled");
  2887. return;
  2888. }
  2889. var style = getState(element).style;
  2890. storeCurrentSize(element, style.width, style.height);
  2891. positionScrollbars(element, style.width, style.height);
  2892. }
  2893. function ready() {
  2894. callback(element);
  2895. }
  2896. function install() {
  2897. debug("Installing...");
  2898. initListeners();
  2899. storeStartSize();
  2900. batchProcessor.add(0, storeStyle);
  2901. batchProcessor.add(1, injectScrollElements);
  2902. batchProcessor.add(2, registerListenersAndPositionElements);
  2903. batchProcessor.add(3, finalizeDomMutation);
  2904. batchProcessor.add(4, ready);
  2905. }
  2906. debug("Making detectable...");
  2907. if (isDetached(element)) {
  2908. debug("Element is detached");
  2909. injectContainerElement();
  2910. debug("Waiting until element is attached...");
  2911. getState(element).onRendered = function () {
  2912. debug("Element is now attached");
  2913. install();
  2914. };
  2915. } else {
  2916. install();
  2917. }
  2918. }
  2919. function uninstall(element) {
  2920. var state = getState(element);
  2921. if (!state) {
  2922. // Uninstall has been called on a non-erd element.
  2923. return;
  2924. }
  2925. // Uninstall may have been called in the following scenarios:
  2926. // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
  2927. // (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).
  2928. // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
  2929. // So to be on the safe side, let's check for each thing before removing.
  2930. // 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.
  2931. state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
  2932. state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
  2933. state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
  2934. state.container && element.removeChild(state.container);
  2935. }
  2936. return {
  2937. makeDetectable: makeDetectable,
  2938. addListener: addListener,
  2939. uninstall: uninstall,
  2940. initDocument: initDocument
  2941. };
  2942. };
  2943. /***/ }),
  2944. /***/ "ca5a":
  2945. /***/ (function(module, exports) {
  2946. var id = 0;
  2947. var px = Math.random();
  2948. module.exports = function (key) {
  2949. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  2950. };
  2951. /***/ }),
  2952. /***/ "cadf":
  2953. /***/ (function(module, exports, __webpack_require__) {
  2954. "use strict";
  2955. var addToUnscopables = __webpack_require__("9c6c");
  2956. var step = __webpack_require__("d53b");
  2957. var Iterators = __webpack_require__("84f2");
  2958. var toIObject = __webpack_require__("6821");
  2959. // 22.1.3.4 Array.prototype.entries()
  2960. // 22.1.3.13 Array.prototype.keys()
  2961. // 22.1.3.29 Array.prototype.values()
  2962. // 22.1.3.30 Array.prototype[@@iterator]()
  2963. module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
  2964. this._t = toIObject(iterated); // target
  2965. this._i = 0; // next index
  2966. this._k = kind; // kind
  2967. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  2968. }, function () {
  2969. var O = this._t;
  2970. var kind = this._k;
  2971. var index = this._i++;
  2972. if (!O || index >= O.length) {
  2973. this._t = undefined;
  2974. return step(1);
  2975. }
  2976. if (kind == 'keys') return step(0, index);
  2977. if (kind == 'values') return step(0, O[index]);
  2978. return step(0, [index, O[index]]);
  2979. }, 'values');
  2980. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  2981. Iterators.Arguments = Iterators.Array;
  2982. addToUnscopables('keys');
  2983. addToUnscopables('values');
  2984. addToUnscopables('entries');
  2985. /***/ }),
  2986. /***/ "cb7c":
  2987. /***/ (function(module, exports, __webpack_require__) {
  2988. var isObject = __webpack_require__("d3f4");
  2989. module.exports = function (it) {
  2990. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  2991. return it;
  2992. };
  2993. /***/ }),
  2994. /***/ "ce10":
  2995. /***/ (function(module, exports, __webpack_require__) {
  2996. var has = __webpack_require__("69a8");
  2997. var toIObject = __webpack_require__("6821");
  2998. var arrayIndexOf = __webpack_require__("c366")(false);
  2999. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  3000. module.exports = function (object, names) {
  3001. var O = toIObject(object);
  3002. var i = 0;
  3003. var result = [];
  3004. var key;
  3005. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  3006. // Don't enum bug & hidden keys
  3007. while (names.length > i) if (has(O, key = names[i++])) {
  3008. ~arrayIndexOf(result, key) || result.push(key);
  3009. }
  3010. return result;
  3011. };
  3012. /***/ }),
  3013. /***/ "d3f4":
  3014. /***/ (function(module, exports) {
  3015. module.exports = function (it) {
  3016. return typeof it === 'object' ? it !== null : typeof it === 'function';
  3017. };
  3018. /***/ }),
  3019. /***/ "d53b":
  3020. /***/ (function(module, exports) {
  3021. module.exports = function (done, value) {
  3022. return { value: value, done: !!done };
  3023. };
  3024. /***/ }),
  3025. /***/ "d6eb":
  3026. /***/ (function(module, exports, __webpack_require__) {
  3027. "use strict";
  3028. var prop = "_erd";
  3029. function initState(element) {
  3030. element[prop] = {};
  3031. return getState(element);
  3032. }
  3033. function getState(element) {
  3034. return element[prop];
  3035. }
  3036. function cleanState(element) {
  3037. delete element[prop];
  3038. }
  3039. module.exports = {
  3040. initState: initState,
  3041. getState: getState,
  3042. cleanState: cleanState
  3043. };
  3044. /***/ }),
  3045. /***/ "d8e8":
  3046. /***/ (function(module, exports) {
  3047. module.exports = function (it) {
  3048. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  3049. return it;
  3050. };
  3051. /***/ }),
  3052. /***/ "e11e":
  3053. /***/ (function(module, exports) {
  3054. // IE 8- don't enum bug keys
  3055. module.exports = (
  3056. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  3057. ).split(',');
  3058. /***/ }),
  3059. /***/ "eec4":
  3060. /***/ (function(module, exports, __webpack_require__) {
  3061. "use strict";
  3062. var forEach = __webpack_require__("b770").forEach;
  3063. var elementUtilsMaker = __webpack_require__("5be5");
  3064. var listenerHandlerMaker = __webpack_require__("49ad");
  3065. var idGeneratorMaker = __webpack_require__("2cef");
  3066. var idHandlerMaker = __webpack_require__("5058");
  3067. var reporterMaker = __webpack_require__("abb4");
  3068. var browserDetector = __webpack_require__("18e9");
  3069. var batchProcessorMaker = __webpack_require__("c274");
  3070. var stateHandler = __webpack_require__("d6eb");
  3071. //Detection strategies.
  3072. var objectStrategyMaker = __webpack_require__("18d2");
  3073. var scrollStrategyMaker = __webpack_require__("c946");
  3074. function isCollection(obj) {
  3075. return Array.isArray(obj) || obj.length !== undefined;
  3076. }
  3077. function toArray(collection) {
  3078. if (!Array.isArray(collection)) {
  3079. var array = [];
  3080. forEach(collection, function (obj) {
  3081. array.push(obj);
  3082. });
  3083. return array;
  3084. } else {
  3085. return collection;
  3086. }
  3087. }
  3088. function isElement(obj) {
  3089. return obj && obj.nodeType === 1;
  3090. }
  3091. /**
  3092. * @typedef idHandler
  3093. * @type {object}
  3094. * @property {function} get Gets the resize detector id of the element.
  3095. * @property {function} set Generate and sets the resize detector id of the element.
  3096. */
  3097. /**
  3098. * @typedef Options
  3099. * @type {object}
  3100. * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
  3101. Default is true. If true, the listener is guaranteed to be called when it has been added.
  3102. If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
  3103. * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
  3104. If not provided, a default id handler will be used.
  3105. * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
  3106. If not provided, a default id handler will be used.
  3107. If set to false, then nothing will be reported.
  3108. * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
  3109. */
  3110. /**
  3111. * Creates an element resize detector instance.
  3112. * @public
  3113. * @param {Options?} options Optional global options object that will decide how this instance will work.
  3114. */
  3115. module.exports = function(options) {
  3116. options = options || {};
  3117. //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
  3118. var idHandler;
  3119. if (options.idHandler) {
  3120. // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
  3121. // so that readonly flag always is true when it's used here. This may be removed next major version bump.
  3122. idHandler = {
  3123. get: function (element) { return options.idHandler.get(element, true); },
  3124. set: options.idHandler.set
  3125. };
  3126. } else {
  3127. var idGenerator = idGeneratorMaker();
  3128. var defaultIdHandler = idHandlerMaker({
  3129. idGenerator: idGenerator,
  3130. stateHandler: stateHandler
  3131. });
  3132. idHandler = defaultIdHandler;
  3133. }
  3134. //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
  3135. var reporter = options.reporter;
  3136. if(!reporter) {
  3137. //If options.reporter is false, then the reporter should be quiet.
  3138. var quiet = reporter === false;
  3139. reporter = reporterMaker(quiet);
  3140. }
  3141. //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
  3142. var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
  3143. //Options to be used as default for the listenTo function.
  3144. var globalOptions = {};
  3145. globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
  3146. globalOptions.debug = !!getOption(options, "debug", false);
  3147. var eventListenerHandler = listenerHandlerMaker(idHandler);
  3148. var elementUtils = elementUtilsMaker({
  3149. stateHandler: stateHandler
  3150. });
  3151. //The detection strategy to be used.
  3152. var detectionStrategy;
  3153. var desiredStrategy = getOption(options, "strategy", "object");
  3154. var importantCssRules = getOption(options, "important", false);
  3155. var strategyOptions = {
  3156. reporter: reporter,
  3157. batchProcessor: batchProcessor,
  3158. stateHandler: stateHandler,
  3159. idHandler: idHandler,
  3160. important: importantCssRules
  3161. };
  3162. if(desiredStrategy === "scroll") {
  3163. if (browserDetector.isLegacyOpera()) {
  3164. reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
  3165. desiredStrategy = "object";
  3166. } else if (browserDetector.isIE(9)) {
  3167. reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
  3168. desiredStrategy = "object";
  3169. }
  3170. }
  3171. if(desiredStrategy === "scroll") {
  3172. detectionStrategy = scrollStrategyMaker(strategyOptions);
  3173. } else if(desiredStrategy === "object") {
  3174. detectionStrategy = objectStrategyMaker(strategyOptions);
  3175. } else {
  3176. throw new Error("Invalid strategy name: " + desiredStrategy);
  3177. }
  3178. //Calls can be made to listenTo with elements that are still being installed.
  3179. //Also, same elements can occur in the elements list in the listenTo function.
  3180. //With this map, the ready callbacks can be synchronized between the calls
  3181. //so that the ready callback can always be called when an element is ready - even if
  3182. //it wasn't installed from the function itself.
  3183. var onReadyCallbacks = {};
  3184. /**
  3185. * 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.
  3186. * @public
  3187. * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
  3188. * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
  3189. * @param {function} listener The callback to be executed for each resize event for each element.
  3190. */
  3191. function listenTo(options, elements, listener) {
  3192. function onResizeCallback(element) {
  3193. var listeners = eventListenerHandler.get(element);
  3194. forEach(listeners, function callListenerProxy(listener) {
  3195. listener(element);
  3196. });
  3197. }
  3198. function addListener(callOnAdd, element, listener) {
  3199. eventListenerHandler.add(element, listener);
  3200. if(callOnAdd) {
  3201. listener(element);
  3202. }
  3203. }
  3204. //Options object may be omitted.
  3205. if(!listener) {
  3206. listener = elements;
  3207. elements = options;
  3208. options = {};
  3209. }
  3210. if(!elements) {
  3211. throw new Error("At least one element required.");
  3212. }
  3213. if(!listener) {
  3214. throw new Error("Listener required.");
  3215. }
  3216. if (isElement(elements)) {
  3217. // A single element has been passed in.
  3218. elements = [elements];
  3219. } else if (isCollection(elements)) {
  3220. // Convert collection to array for plugins.
  3221. // TODO: May want to check so that all the elements in the collection are valid elements.
  3222. elements = toArray(elements);
  3223. } else {
  3224. return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
  3225. }
  3226. var elementsReady = 0;
  3227. var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
  3228. var onReadyCallback = getOption(options, "onReady", function noop() {});
  3229. var debug = getOption(options, "debug", globalOptions.debug);
  3230. forEach(elements, function attachListenerToElement(element) {
  3231. if (!stateHandler.getState(element)) {
  3232. stateHandler.initState(element);
  3233. idHandler.set(element);
  3234. }
  3235. var id = idHandler.get(element);
  3236. debug && reporter.log("Attaching listener to element", id, element);
  3237. if(!elementUtils.isDetectable(element)) {
  3238. debug && reporter.log(id, "Not detectable.");
  3239. if(elementUtils.isBusy(element)) {
  3240. debug && reporter.log(id, "System busy making it detectable");
  3241. //The element is being prepared to be detectable. Do not make it detectable.
  3242. //Just add the listener, because the element will soon be detectable.
  3243. addListener(callOnAdd, element, listener);
  3244. onReadyCallbacks[id] = onReadyCallbacks[id] || [];
  3245. onReadyCallbacks[id].push(function onReady() {
  3246. elementsReady++;
  3247. if(elementsReady === elements.length) {
  3248. onReadyCallback();
  3249. }
  3250. });
  3251. return;
  3252. }
  3253. debug && reporter.log(id, "Making detectable...");
  3254. //The element is not prepared to be detectable, so do prepare it and add a listener to it.
  3255. elementUtils.markBusy(element, true);
  3256. return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {
  3257. debug && reporter.log(id, "onElementDetectable");
  3258. if (stateHandler.getState(element)) {
  3259. elementUtils.markAsDetectable(element);
  3260. elementUtils.markBusy(element, false);
  3261. detectionStrategy.addListener(element, onResizeCallback);
  3262. addListener(callOnAdd, element, listener);
  3263. // Since the element size might have changed since the call to "listenTo", we need to check for this change,
  3264. // so that a resize event may be emitted.
  3265. // 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.
  3266. // Also, check the state existance before since the element may have been uninstalled in the installation process.
  3267. var state = stateHandler.getState(element);
  3268. if (state && state.startSize) {
  3269. var width = element.offsetWidth;
  3270. var height = element.offsetHeight;
  3271. if (state.startSize.width !== width || state.startSize.height !== height) {
  3272. onResizeCallback(element);
  3273. }
  3274. }
  3275. if(onReadyCallbacks[id]) {
  3276. forEach(onReadyCallbacks[id], function(callback) {
  3277. callback();
  3278. });
  3279. }
  3280. } else {
  3281. // The element has been unisntalled before being detectable.
  3282. debug && reporter.log(id, "Element uninstalled before being detectable.");
  3283. }
  3284. delete onReadyCallbacks[id];
  3285. elementsReady++;
  3286. if(elementsReady === elements.length) {
  3287. onReadyCallback();
  3288. }
  3289. });
  3290. }
  3291. debug && reporter.log(id, "Already detecable, adding listener.");
  3292. //The element has been prepared to be detectable and is ready to be listened to.
  3293. addListener(callOnAdd, element, listener);
  3294. elementsReady++;
  3295. });
  3296. if(elementsReady === elements.length) {
  3297. onReadyCallback();
  3298. }
  3299. }
  3300. function uninstall(elements) {
  3301. if(!elements) {
  3302. return reporter.error("At least one element is required.");
  3303. }
  3304. if (isElement(elements)) {
  3305. // A single element has been passed in.
  3306. elements = [elements];
  3307. } else if (isCollection(elements)) {
  3308. // Convert collection to array for plugins.
  3309. // TODO: May want to check so that all the elements in the collection are valid elements.
  3310. elements = toArray(elements);
  3311. } else {
  3312. return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
  3313. }
  3314. forEach(elements, function (element) {
  3315. eventListenerHandler.removeAllListeners(element);
  3316. detectionStrategy.uninstall(element);
  3317. stateHandler.cleanState(element);
  3318. });
  3319. }
  3320. function initDocument(targetDocument) {
  3321. detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
  3322. }
  3323. return {
  3324. listenTo: listenTo,
  3325. removeListener: eventListenerHandler.removeListener,
  3326. removeAllListeners: eventListenerHandler.removeAllListeners,
  3327. uninstall: uninstall,
  3328. initDocument: initDocument
  3329. };
  3330. };
  3331. function getOption(options, name, defaultValue) {
  3332. var value = options[name];
  3333. if((value === undefined || value === null) && defaultValue !== undefined) {
  3334. return defaultValue;
  3335. }
  3336. return value;
  3337. }
  3338. /***/ }),
  3339. /***/ "f1ae":
  3340. /***/ (function(module, exports, __webpack_require__) {
  3341. "use strict";
  3342. var $defineProperty = __webpack_require__("86cc");
  3343. var createDesc = __webpack_require__("4630");
  3344. module.exports = function (object, index, value) {
  3345. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  3346. else object[index] = value;
  3347. };
  3348. /***/ }),
  3349. /***/ "f751":
  3350. /***/ (function(module, exports, __webpack_require__) {
  3351. // 19.1.3.1 Object.assign(target, source)
  3352. var $export = __webpack_require__("5ca1");
  3353. $export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
  3354. /***/ }),
  3355. /***/ "fa5b":
  3356. /***/ (function(module, exports, __webpack_require__) {
  3357. module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString);
  3358. /***/ }),
  3359. /***/ "fab2":
  3360. /***/ (function(module, exports, __webpack_require__) {
  3361. var document = __webpack_require__("7726").document;
  3362. module.exports = document && document.documentElement;
  3363. /***/ }),
  3364. /***/ "fb15":
  3365. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3366. "use strict";
  3367. // ESM COMPAT FLAG
  3368. __webpack_require__.r(__webpack_exports__);
  3369. // EXPORTS
  3370. __webpack_require__.d(__webpack_exports__, "GridLayout", function() { return /* reexport */ GridLayout; });
  3371. __webpack_require__.d(__webpack_exports__, "GridItem", function() { return /* reexport */ GridItem; });
  3372. // NAMESPACE OBJECT: ./node_modules/@interactjs/snappers/all.js
  3373. var all_namespaceObject = {};
  3374. __webpack_require__.r(all_namespaceObject);
  3375. __webpack_require__.d(all_namespaceObject, "edgeTarget", function() { return edgeTarget; });
  3376. __webpack_require__.d(all_namespaceObject, "elements", function() { return snappers_elements; });
  3377. __webpack_require__.d(all_namespaceObject, "grid", function() { return grid; });
  3378. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  3379. // This file is imported into lib/wc client bundles.
  3380. if (typeof window !== 'undefined') {
  3381. var currentScript = window.document.currentScript
  3382. if (true) {
  3383. var getCurrentScript = __webpack_require__("8875")
  3384. currentScript = getCurrentScript()
  3385. // for backward compatibility, because previously we directly included the polyfill
  3386. if (!('currentScript' in document)) {
  3387. Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
  3388. }
  3389. }
  3390. var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  3391. if (src) {
  3392. __webpack_require__.p = src[1] // eslint-disable-line
  3393. }
  3394. }
  3395. // Indicate to webpack that this file can be concatenated
  3396. /* harmony default export */ var setPublicPath = (null);
  3397. // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
  3398. var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
  3399. // 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
  3400. function render(_ctx, _cache, $props, $setup, $data, $options) {
  3401. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
  3402. ref: "item",
  3403. class: ["vue-grid-item", $options.classObj],
  3404. style: _ctx.style
  3405. }, [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", {
  3406. key: 0,
  3407. ref: "handle",
  3408. class: $options.resizableHandleClass
  3409. }, null, 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 6);
  3410. }
  3411. // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=template&id=46ff2fc8
  3412. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
  3413. var es6_regexp_replace = __webpack_require__("a481");
  3414. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.match.js
  3415. var es6_regexp_match = __webpack_require__("4917");
  3416. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js
  3417. var es6_number_constructor = __webpack_require__("c5f6");
  3418. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
  3419. var es6_array_iterator = __webpack_require__("cadf");
  3420. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
  3421. var es6_object_keys = __webpack_require__("456d");
  3422. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
  3423. var web_dom_iterable = __webpack_require__("ac6a");
  3424. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.sort.js
  3425. var es6_array_sort = __webpack_require__("55dd");
  3426. // CONCATENATED MODULE: ./src/helpers/utils.js
  3427. // @flow
  3428. /*:: export type LayoutItemRequired = {w: number, h: number, x: number, y: number, i: string};*/
  3429. /*:: export type LayoutItem = LayoutItemRequired &
  3430. {minW?: number, minH?: number, maxW?: number, maxH?: number,
  3431. moved?: boolean, static?: boolean,
  3432. isDraggable?: ?boolean, isResizable?: ?boolean};*/
  3433. // export type Position = {left: number, top: number, width: number, height: number};
  3434. /*
  3435. export type DragCallbackData = {
  3436. node: HTMLElement,
  3437. x: number, y: number,
  3438. deltaX: number, deltaY: number,
  3439. lastX: number, lastY: number
  3440. };
  3441. */
  3442. // export type DragEvent = {e: Event} & DragCallbackData;
  3443. /*:: export type Layout = Array<LayoutItem>;*/
  3444. // export type ResizeEvent = {e: Event, node: HTMLElement, size: Size};
  3445. // const isProduction = process.env.NODE_ENV === 'production';
  3446. /**
  3447. * Return the bottom coordinate of the layout.
  3448. *
  3449. * @param {Array} layout Layout array.
  3450. * @return {Number} Bottom coordinate.
  3451. */
  3452. /*:: export type Size = {width: number, height: number};*/
  3453. function bottom(layout
  3454. /*: Layout*/
  3455. )
  3456. /*: number*/
  3457. {
  3458. var max = 0,
  3459. bottomY;
  3460. for (var i = 0, len = layout.length; i < len; i++) {
  3461. bottomY = layout[i].y + layout[i].h;
  3462. if (bottomY > max) max = bottomY;
  3463. }
  3464. return max;
  3465. }
  3466. function cloneLayout(layout
  3467. /*: Layout*/
  3468. )
  3469. /*: Layout*/
  3470. {
  3471. var newLayout = Array(layout.length);
  3472. for (var i = 0, len = layout.length; i < len; i++) {
  3473. newLayout[i] = cloneLayoutItem(layout[i]);
  3474. }
  3475. return newLayout;
  3476. } // Fast path to cloning, since this is monomorphic
  3477. function cloneLayoutItem(layoutItem
  3478. /*: LayoutItem*/
  3479. )
  3480. /*: LayoutItem*/
  3481. {
  3482. /*return {
  3483. w: layoutItem.w, h: layoutItem.h, x: layoutItem.x, y: layoutItem.y, i: layoutItem.i,
  3484. minW: layoutItem.minW, maxW: layoutItem.maxW, minH: layoutItem.minH, maxH: layoutItem.maxH,
  3485. moved: Boolean(layoutItem.moved), static: Boolean(layoutItem.static),
  3486. // These can be null
  3487. isDraggable: layoutItem.isDraggable, isResizable: layoutItem.isResizable
  3488. };*/
  3489. return JSON.parse(JSON.stringify(layoutItem));
  3490. }
  3491. /**
  3492. * Given two layoutitems, check if they collide.
  3493. *
  3494. * @return {Boolean} True if colliding.
  3495. */
  3496. function collides(l1
  3497. /*: LayoutItem*/
  3498. , l2
  3499. /*: LayoutItem*/
  3500. )
  3501. /*: boolean*/
  3502. {
  3503. if (l1 === l2) return false; // same element
  3504. if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2
  3505. if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2
  3506. if (l1.y + l1.h <= l2.y) return false; // l1 is above l2
  3507. if (l1.y >= l2.y + l2.h) return false; // l1 is below l2
  3508. return true; // boxes overlap
  3509. }
  3510. /**
  3511. * Given a layout, compact it. This involves going down each y coordinate and removing gaps
  3512. * between items.
  3513. *
  3514. * @param {Array} layout Layout.
  3515. * @param {Boolean} verticalCompact Whether or not to compact the layout
  3516. * vertically.
  3517. * @return {Array} Compacted Layout.
  3518. */
  3519. function compact(layout
  3520. /*: Layout*/
  3521. , verticalCompact
  3522. /*: Boolean*/
  3523. )
  3524. /*: Layout*/
  3525. {
  3526. // Statics go in the compareWith array right away so items flow around them.
  3527. var compareWith = getStatics(layout); // We go through the items by row and column.
  3528. var sorted = sortLayoutItemsByRowCol(layout); // Holding for new items.
  3529. var out = Array(layout.length);
  3530. for (var i = 0, len = sorted.length; i < len; i++) {
  3531. var l = sorted[i]; // Don't move static elements
  3532. if (!l.static) {
  3533. l = compactItem(compareWith, l, verticalCompact); // Add to comparison array. We only collide with items before this one.
  3534. // Statics are already in this array.
  3535. compareWith.push(l);
  3536. } // Add to output array to make sure they still come out in the right order.
  3537. out[layout.indexOf(l)] = l; // Clear moved flag, if it exists.
  3538. l.moved = false;
  3539. }
  3540. return out;
  3541. }
  3542. /**
  3543. * Compact an item in the layout.
  3544. */
  3545. function compactItem(compareWith
  3546. /*: Layout*/
  3547. , l
  3548. /*: LayoutItem*/
  3549. , verticalCompact
  3550. /*: boolean*/
  3551. )
  3552. /*: LayoutItem*/
  3553. {
  3554. if (verticalCompact) {
  3555. // Move the element up as far as it can go without colliding.
  3556. while (l.y > 0 && !getFirstCollision(compareWith, l)) {
  3557. l.y--;
  3558. }
  3559. } // Move it down, and keep moving it down if it's colliding.
  3560. var collides;
  3561. while (collides = getFirstCollision(compareWith, l)) {
  3562. l.y = collides.y + collides.h;
  3563. }
  3564. return l;
  3565. }
  3566. /**
  3567. * Given a layout, make sure all elements fit within its bounds.
  3568. *
  3569. * @param {Array} layout Layout array.
  3570. * @param {Number} bounds Number of columns.
  3571. */
  3572. function correctBounds(layout
  3573. /*: Layout*/
  3574. , bounds
  3575. /*: {cols: number}*/
  3576. )
  3577. /*: Layout*/
  3578. {
  3579. var collidesWith = getStatics(layout);
  3580. for (var i = 0, len = layout.length; i < len; i++) {
  3581. var l = layout[i]; // Overflows right
  3582. if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left
  3583. if (l.x < 0) {
  3584. l.x = 0;
  3585. l.w = bounds.cols;
  3586. }
  3587. if (!l.static) collidesWith.push(l);else {
  3588. // If this is static and collides with other statics, we must move it down.
  3589. // We have to do something nicer than just letting them overlap.
  3590. while (getFirstCollision(collidesWith, l)) {
  3591. l.y++;
  3592. }
  3593. }
  3594. }
  3595. return layout;
  3596. }
  3597. /**
  3598. * Get a layout item by ID. Used so we can override later on if necessary.
  3599. *
  3600. * @param {Array} layout Layout array.
  3601. * @param {String} id ID
  3602. * @return {LayoutItem} Item at ID.
  3603. */
  3604. function getLayoutItem(layout
  3605. /*: Layout*/
  3606. , id
  3607. /*: string*/
  3608. )
  3609. /*: ?LayoutItem*/
  3610. {
  3611. for (var i = 0, len = layout.length; i < len; i++) {
  3612. if (layout[i].i === id) return layout[i];
  3613. }
  3614. }
  3615. /**
  3616. * Returns the first item this layout collides with.
  3617. * It doesn't appear to matter which order we approach this from, although
  3618. * perhaps that is the wrong thing to do.
  3619. *
  3620. * @param {Object} layoutItem Layout item.
  3621. * @return {Object|undefined} A colliding layout item, or undefined.
  3622. */
  3623. function getFirstCollision(layout
  3624. /*: Layout*/
  3625. , layoutItem
  3626. /*: LayoutItem*/
  3627. )
  3628. /*: ?LayoutItem*/
  3629. {
  3630. for (var i = 0, len = layout.length; i < len; i++) {
  3631. if (collides(layout[i], layoutItem)) return layout[i];
  3632. }
  3633. }
  3634. function getAllCollisions(layout
  3635. /*: Layout*/
  3636. , layoutItem
  3637. /*: LayoutItem*/
  3638. )
  3639. /*: Array<LayoutItem>*/
  3640. {
  3641. return layout.filter(function (l) {
  3642. return collides(l, layoutItem);
  3643. });
  3644. }
  3645. /**
  3646. * Get all static elements.
  3647. * @param {Array} layout Array of layout objects.
  3648. * @return {Array} Array of static layout items..
  3649. */
  3650. function getStatics(layout
  3651. /*: Layout*/
  3652. )
  3653. /*: Array<LayoutItem>*/
  3654. {
  3655. //return [];
  3656. return layout.filter(function (l) {
  3657. return l.static;
  3658. });
  3659. }
  3660. /**
  3661. * Move an element. Responsible for doing cascading movements of other elements.
  3662. *
  3663. * @param {Array} layout Full layout to modify.
  3664. * @param {LayoutItem} l element to move.
  3665. * @param {Number} [x] X position in grid units.
  3666. * @param {Number} [y] Y position in grid units.
  3667. * @param {Boolean} [isUserAction] If true, designates that the item we're moving is
  3668. * being dragged/resized by th euser.
  3669. */
  3670. function moveElement(layout
  3671. /*: Layout*/
  3672. , l
  3673. /*: LayoutItem*/
  3674. , x
  3675. /*: Number*/
  3676. , y
  3677. /*: Number*/
  3678. , isUserAction
  3679. /*: Boolean*/
  3680. , preventCollision
  3681. /*: Boolean*/
  3682. )
  3683. /*: Layout*/
  3684. {
  3685. if (l.static) return layout; // Short-circuit if nothing to do.
  3686. //if (l.y === y && l.x === x) return layout;
  3687. var oldX = l.x;
  3688. var oldY = l.y;
  3689. var movingUp = y && l.y > y; // This is quite a bit faster than extending the object
  3690. if (typeof x === 'number') l.x = x;
  3691. if (typeof y === 'number') l.y = y;
  3692. l.moved = true; // If this collides with anything, move it.
  3693. // When doing this comparison, we have to sort the items we compare with
  3694. // to ensure, in the case of multiple collisions, that we're getting the
  3695. // nearest collision.
  3696. var sorted = sortLayoutItemsByRowCol(layout);
  3697. if (movingUp) sorted = sorted.reverse();
  3698. var collisions = getAllCollisions(sorted, l);
  3699. if (preventCollision && collisions.length) {
  3700. l.x = oldX;
  3701. l.y = oldY;
  3702. l.moved = false;
  3703. return layout;
  3704. } // Move each item that collides away from this element.
  3705. for (var i = 0, len = collisions.length; i < len; i++) {
  3706. var collision = collisions[i]; // console.log('resolving collision between', l.i, 'at', l.y, 'and', collision.i, 'at', collision.y);
  3707. // Short circuit so we can't infinite loop
  3708. if (collision.moved) continue; // This makes it feel a bit more precise by waiting to swap for just a bit when moving up.
  3709. 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
  3710. if (collision.static) {
  3711. layout = moveElementAwayFromCollision(layout, collision, l, isUserAction);
  3712. } else {
  3713. layout = moveElementAwayFromCollision(layout, l, collision, isUserAction);
  3714. }
  3715. }
  3716. return layout;
  3717. }
  3718. /**
  3719. * This is where the magic needs to happen - given a collision, move an element away from the collision.
  3720. * We attempt to move it up if there's room, otherwise it goes below.
  3721. *
  3722. * @param {Array} layout Full layout to modify.
  3723. * @param {LayoutItem} collidesWith Layout item we're colliding with.
  3724. * @param {LayoutItem} itemToMove Layout item we're moving.
  3725. * @param {Boolean} [isUserAction] If true, designates that the item we're moving is being dragged/resized
  3726. * by the user.
  3727. */
  3728. function moveElementAwayFromCollision(layout
  3729. /*: Layout*/
  3730. , collidesWith
  3731. /*: LayoutItem*/
  3732. , itemToMove
  3733. /*: LayoutItem*/
  3734. , isUserAction
  3735. /*: ?boolean*/
  3736. )
  3737. /*: Layout*/
  3738. {
  3739. var preventCollision = false; // we're already colliding
  3740. // If there is enough space above the collision to put this element, move it there.
  3741. // We only do this on the main collision as this can get funky in cascades and cause
  3742. // unwanted swapping behavior.
  3743. if (isUserAction) {
  3744. // Make a mock item so we don't modify the item here, only modify in moveElement.
  3745. var fakeItem
  3746. /*: LayoutItem*/
  3747. = {
  3748. x: itemToMove.x,
  3749. y: itemToMove.y,
  3750. w: itemToMove.w,
  3751. h: itemToMove.h,
  3752. i: '-1'
  3753. };
  3754. fakeItem.y = Math.max(collidesWith.y - itemToMove.h, 0);
  3755. if (!getFirstCollision(layout, fakeItem)) {
  3756. return moveElement(layout, itemToMove, undefined, fakeItem.y, preventCollision);
  3757. }
  3758. } // Previously this was optimized to move below the collision directly, but this can cause problems
  3759. // with cascading moves, as an item may actually leapflog a collision and cause a reversal in order.
  3760. return moveElement(layout, itemToMove, undefined, itemToMove.y + 1, preventCollision);
  3761. }
  3762. /**
  3763. * Helper to convert a number to a percentage string.
  3764. *
  3765. * @param {Number} num Any number
  3766. * @return {String} That number as a percentage.
  3767. */
  3768. function perc(num
  3769. /*: number*/
  3770. )
  3771. /*: string*/
  3772. {
  3773. return num * 100 + '%';
  3774. }
  3775. function setTransform(top, left, width, height)
  3776. /*: Object*/
  3777. {
  3778. // Replace unitless items with px
  3779. var translate = "translate3d(" + left + "px," + top + "px, 0)";
  3780. return {
  3781. transform: translate,
  3782. WebkitTransform: translate,
  3783. MozTransform: translate,
  3784. msTransform: translate,
  3785. OTransform: translate,
  3786. width: width + "px",
  3787. height: height + "px",
  3788. position: 'absolute'
  3789. };
  3790. }
  3791. /**
  3792. * Just like the setTransform method, but instead it will return a negative value of right.
  3793. *
  3794. * @param top
  3795. * @param right
  3796. * @param width
  3797. * @param height
  3798. * @returns {{transform: string, WebkitTransform: string, MozTransform: string, msTransform: string, OTransform: string, width: string, height: string, position: string}}
  3799. */
  3800. function setTransformRtl(top, right, width, height)
  3801. /*: Object*/
  3802. {
  3803. // Replace unitless items with px
  3804. var translate = "translate3d(" + right * -1 + "px," + top + "px, 0)";
  3805. return {
  3806. transform: translate,
  3807. WebkitTransform: translate,
  3808. MozTransform: translate,
  3809. msTransform: translate,
  3810. OTransform: translate,
  3811. width: width + "px",
  3812. height: height + "px",
  3813. position: 'absolute'
  3814. };
  3815. }
  3816. function setTopLeft(top, left, width, height)
  3817. /*: Object*/
  3818. {
  3819. return {
  3820. top: top + "px",
  3821. left: left + "px",
  3822. width: width + "px",
  3823. height: height + "px",
  3824. position: 'absolute'
  3825. };
  3826. }
  3827. /**
  3828. * Just like the setTopLeft method, but instead, it will return a right property instead of left.
  3829. *
  3830. * @param top
  3831. * @param right
  3832. * @param width
  3833. * @param height
  3834. * @returns {{top: string, right: string, width: string, height: string, position: string}}
  3835. */
  3836. function setTopRight(top, right, width, height)
  3837. /*: Object*/
  3838. {
  3839. return {
  3840. top: top + "px",
  3841. right: right + "px",
  3842. width: width + "px",
  3843. height: height + "px",
  3844. position: 'absolute'
  3845. };
  3846. }
  3847. /**
  3848. * Get layout items sorted from top left to right and down.
  3849. *
  3850. * @return {Array} Array of layout objects.
  3851. * @return {Array} Layout, sorted static items first.
  3852. */
  3853. function sortLayoutItemsByRowCol(layout
  3854. /*: Layout*/
  3855. )
  3856. /*: Layout*/
  3857. {
  3858. return [].concat(layout).sort(function (a, b) {
  3859. if (a.y === b.y && a.x === b.x) {
  3860. return 0;
  3861. }
  3862. if (a.y > b.y || a.y === b.y && a.x > b.x) {
  3863. return 1;
  3864. }
  3865. return -1;
  3866. });
  3867. }
  3868. /**
  3869. * Generate a layout using the initialLayout and children as a template.
  3870. * Missing entries will be added, extraneous ones will be truncated.
  3871. *
  3872. * @param {Array} initialLayout Layout passed in through props.
  3873. * @param {String} breakpoint Current responsive breakpoint.
  3874. * @param {Boolean} verticalCompact Whether or not to compact the layout vertically.
  3875. * @return {Array} Working layout.
  3876. */
  3877. /*
  3878. export function synchronizeLayoutWithChildren(initialLayout: Layout, children: Array<React.Element>|React.Element,
  3879. cols: number, verticalCompact: boolean): Layout {
  3880. // ensure 'children' is always an array
  3881. if (!Array.isArray(children)) {
  3882. children = [children];
  3883. }
  3884. initialLayout = initialLayout || [];
  3885. // Generate one layout item per child.
  3886. let layout: Layout = [];
  3887. for (let i = 0, len = children.length; i < len; i++) {
  3888. let newItem;
  3889. const child = children[i];
  3890. // Don't overwrite if it already exists.
  3891. const exists = getLayoutItem(initialLayout, child.key || "1" /!* FIXME satisfies Flow *!/);
  3892. if (exists) {
  3893. newItem = exists;
  3894. } else {
  3895. const g = child.props._grid;
  3896. // Hey, this item has a _grid property, use it.
  3897. if (g) {
  3898. if (!isProduction) {
  3899. validateLayout([g], 'ReactGridLayout.children');
  3900. }
  3901. // Validated; add it to the layout. Bottom 'y' possible is the bottom of the layout.
  3902. // This allows you to do nice stuff like specify {y: Infinity}
  3903. if (verticalCompact) {
  3904. newItem = cloneLayoutItem({...g, y: Math.min(bottom(layout), g.y), i: child.key});
  3905. } else {
  3906. newItem = cloneLayoutItem({...g, y: g.y, i: child.key});
  3907. }
  3908. }
  3909. // Nothing provided: ensure this is added to the bottom
  3910. else {
  3911. newItem = cloneLayoutItem({w: 1, h: 1, x: 0, y: bottom(layout), i: child.key || "1"});
  3912. }
  3913. }
  3914. layout[i] = newItem;
  3915. }
  3916. // Correct the layout.
  3917. layout = correctBounds(layout, {cols: cols});
  3918. layout = compact(layout, verticalCompact);
  3919. return layout;
  3920. }
  3921. */
  3922. /**
  3923. * Validate a layout. Throws errors.
  3924. *
  3925. * @param {Array} layout Array of layout items.
  3926. * @param {String} [contextName] Context name for errors.
  3927. * @throw {Error} Validation error.
  3928. */
  3929. function validateLayout(layout
  3930. /*: Layout*/
  3931. , contextName
  3932. /*: string*/
  3933. )
  3934. /*: void*/
  3935. {
  3936. contextName = contextName || "Layout";
  3937. var subProps = ['x', 'y', 'w', 'h'];
  3938. var keyArr = [];
  3939. if (!Array.isArray(layout)) throw new Error(contextName + " must be an array!");
  3940. for (var i = 0, len = layout.length; i < len; i++) {
  3941. var item = layout[i];
  3942. for (var j = 0; j < subProps.length; j++) {
  3943. if (typeof item[subProps[j]] !== 'number') {
  3944. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].' + subProps[j] + ' must be a number!');
  3945. }
  3946. }
  3947. if (item.i === undefined || item.i === null) {
  3948. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i cannot be null!');
  3949. }
  3950. if (typeof item.i !== 'number' && typeof item.i !== 'string') {
  3951. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be a string or number!');
  3952. }
  3953. if (keyArr.indexOf(item.i) >= 0) {
  3954. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be unique!');
  3955. }
  3956. keyArr.push(item.i);
  3957. if (item.static !== undefined && typeof item.static !== 'boolean') {
  3958. throw new Error('VueGridLayout: ' + contextName + '[' + i + '].static must be a boolean!');
  3959. }
  3960. }
  3961. } // Flow can't really figure this out, so we just use Object
  3962. function autoBindHandlers(el
  3963. /*: Object*/
  3964. , fns
  3965. /*: Array<string>*/
  3966. )
  3967. /*: void*/
  3968. {
  3969. fns.forEach(function (key) {
  3970. return el[key] = el[key].bind(el);
  3971. });
  3972. }
  3973. /**
  3974. * Convert a JS object to CSS string. Similar to React's output of CSS.
  3975. * @param obj
  3976. * @returns {string}
  3977. */
  3978. function createMarkup(obj) {
  3979. var keys = Object.keys(obj);
  3980. if (!keys.length) return '';
  3981. var i,
  3982. len = keys.length;
  3983. var result = '';
  3984. for (i = 0; i < len; i++) {
  3985. var key = keys[i];
  3986. var val = obj[key];
  3987. result += hyphenate(key) + ':' + addPx(key, val) + ';';
  3988. }
  3989. return result;
  3990. }
  3991. /* The following list is defined in React's core */
  3992. var IS_UNITLESS = {
  3993. animationIterationCount: true,
  3994. boxFlex: true,
  3995. boxFlexGroup: true,
  3996. boxOrdinalGroup: true,
  3997. columnCount: true,
  3998. flex: true,
  3999. flexGrow: true,
  4000. flexPositive: true,
  4001. flexShrink: true,
  4002. flexNegative: true,
  4003. flexOrder: true,
  4004. gridRow: true,
  4005. gridColumn: true,
  4006. fontWeight: true,
  4007. lineClamp: true,
  4008. lineHeight: true,
  4009. opacity: true,
  4010. order: true,
  4011. orphans: true,
  4012. tabSize: true,
  4013. widows: true,
  4014. zIndex: true,
  4015. zoom: true,
  4016. // SVG-related properties
  4017. fillOpacity: true,
  4018. stopOpacity: true,
  4019. strokeDashoffset: true,
  4020. strokeOpacity: true,
  4021. strokeWidth: true
  4022. };
  4023. /**
  4024. * Will add px to the end of style values which are Numbers.
  4025. * @param name
  4026. * @param value
  4027. * @returns {*}
  4028. */
  4029. function addPx(name, value) {
  4030. if (typeof value === 'number' && !IS_UNITLESS[name]) {
  4031. return value + 'px';
  4032. } else {
  4033. return value;
  4034. }
  4035. }
  4036. /**
  4037. * Hyphenate a camelCase string.
  4038. *
  4039. * @param {String} str
  4040. * @return {String}
  4041. */
  4042. var hyphenateRE = /([a-z\d])([A-Z])/g;
  4043. function hyphenate(str) {
  4044. return str.replace(hyphenateRE, '$1-$2').toLowerCase();
  4045. }
  4046. function findItemInArray(array, property, value) {
  4047. for (var i = 0; i < array.length; i++) {
  4048. if (array[i][property] == value) return true;
  4049. }
  4050. return false;
  4051. }
  4052. function findAndRemove(array, property, value) {
  4053. array.forEach(function (result, index) {
  4054. if (result[property] === value) {
  4055. //Remove from array
  4056. array.splice(index, 1);
  4057. }
  4058. });
  4059. }
  4060. // CONCATENATED MODULE: ./src/helpers/draggableUtils.js
  4061. // Get {x, y} positions from event.
  4062. function getControlPosition(e) {
  4063. return offsetXYFromParentOf(e);
  4064. } // Get from offsetParent
  4065. function offsetXYFromParentOf(evt) {
  4066. var offsetParent = evt.target.offsetParent || document.body;
  4067. var offsetParentRect = evt.offsetParent === document.body ? {
  4068. left: 0,
  4069. top: 0
  4070. } : offsetParent.getBoundingClientRect();
  4071. var x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;
  4072. var y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;
  4073. /*const x = Math.round(evt.clientX + offsetParent.scrollLeft - offsetParentRect.left);
  4074. const y = Math.round(evt.clientY + offsetParent.scrollTop - offsetParentRect.top);*/
  4075. return {
  4076. x: x,
  4077. y: y
  4078. };
  4079. } // Create an data object exposed by <DraggableCore>'s events
  4080. function createCoreData(lastX, lastY, x, y) {
  4081. // State changes are often (but not always!) async. We want the latest value.
  4082. var isStart = !isNum(lastX);
  4083. if (isStart) {
  4084. // If this is our first move, use the x and y as last coords.
  4085. return {
  4086. deltaX: 0,
  4087. deltaY: 0,
  4088. lastX: x,
  4089. lastY: y,
  4090. x: x,
  4091. y: y
  4092. };
  4093. } else {
  4094. // Otherwise calculate proper values.
  4095. return {
  4096. deltaX: x - lastX,
  4097. deltaY: y - lastY,
  4098. lastX: lastX,
  4099. lastY: lastY,
  4100. x: x,
  4101. y: y
  4102. };
  4103. }
  4104. }
  4105. function isNum(num) {
  4106. return typeof num === 'number' && !isNaN(num);
  4107. }
  4108. // CONCATENATED MODULE: ./src/helpers/responsiveUtils.js
  4109. // @flow
  4110. /*:: import type {Layout} from './utils';*/
  4111. /*:: export type ResponsiveLayout = {lg?: Layout, md?: Layout, sm?: Layout, xs?: Layout, xxs?: Layout};*/
  4112. /*:: type Breakpoint = string;*/
  4113. /**
  4114. * Given a width, find the highest breakpoint that matches is valid for it (width > breakpoint).
  4115. *
  4116. * @param {Object} breakpoints Breakpoints object (e.g. {lg: 1200, md: 960, ...})
  4117. * @param {Number} width Screen width.
  4118. * @return {String} Highest breakpoint that is less than width.
  4119. */
  4120. /*:: type Breakpoints = {lg?: number, md?: number, sm?: number, xs?: number, xxs?: number};*/
  4121. function getBreakpointFromWidth(breakpoints
  4122. /*: Breakpoints*/
  4123. , width
  4124. /*: number*/
  4125. )
  4126. /*: Breakpoint*/
  4127. {
  4128. var sorted = sortBreakpoints(breakpoints);
  4129. var matching = sorted[0];
  4130. for (var i = 1, len = sorted.length; i < len; i++) {
  4131. var breakpointName = sorted[i];
  4132. if (width > breakpoints[breakpointName]) matching = breakpointName;
  4133. }
  4134. return matching;
  4135. }
  4136. /**
  4137. * Given a breakpoint, get the # of cols set for it.
  4138. * @param {String} breakpoint Breakpoint name.
  4139. * @param {Object} cols Map of breakpoints to cols.
  4140. * @return {Number} Number of cols.
  4141. */
  4142. function getColsFromBreakpoint(breakpoint
  4143. /*: Breakpoint*/
  4144. , cols
  4145. /*: Breakpoints*/
  4146. )
  4147. /*: number*/
  4148. {
  4149. if (!cols[breakpoint]) {
  4150. throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint " + breakpoint + " is missing!");
  4151. }
  4152. return cols[breakpoint];
  4153. }
  4154. /**
  4155. * Given existing layouts and a new breakpoint, find or generate a new layout.
  4156. *
  4157. * This finds the layout above the new one and generates from it, if it exists.
  4158. *
  4159. * @param {Array} orgLayout Original layout.
  4160. * @param {Object} layouts Existing layouts.
  4161. * @param {Array} breakpoints All breakpoints.
  4162. * @param {String} breakpoint New breakpoint.
  4163. * @param {String} breakpoint Last breakpoint (for fallback).
  4164. * @param {Number} cols Column count at new breakpoint.
  4165. * @param {Boolean} verticalCompact Whether or not to compact the layout
  4166. * vertically.
  4167. * @return {Array} New layout.
  4168. */
  4169. function findOrGenerateResponsiveLayout(orgLayout
  4170. /*: Layout*/
  4171. , layouts
  4172. /*: ResponsiveLayout*/
  4173. , breakpoints
  4174. /*: Breakpoints*/
  4175. , breakpoint
  4176. /*: Breakpoint*/
  4177. , lastBreakpoint
  4178. /*: Breakpoint*/
  4179. , cols
  4180. /*: number*/
  4181. , verticalCompact
  4182. /*: boolean*/
  4183. )
  4184. /*: Layout*/
  4185. {
  4186. // If it already exists, just return it.
  4187. if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]); // Find or generate the next layout
  4188. var layout = orgLayout;
  4189. var breakpointsSorted = sortBreakpoints(breakpoints);
  4190. var breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
  4191. for (var i = 0, len = breakpointsAbove.length; i < len; i++) {
  4192. var b = breakpointsAbove[i];
  4193. if (layouts[b]) {
  4194. layout = layouts[b];
  4195. break;
  4196. }
  4197. }
  4198. layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
  4199. return compact(correctBounds(layout, {
  4200. cols: cols
  4201. }), verticalCompact);
  4202. }
  4203. function generateResponsiveLayout(layout
  4204. /*: Layout*/
  4205. , breakpoints
  4206. /*: Breakpoints*/
  4207. , breakpoint
  4208. /*: Breakpoint*/
  4209. , lastBreakpoint
  4210. /*: Breakpoint*/
  4211. , cols
  4212. /*: number*/
  4213. , verticalCompact
  4214. /*: boolean*/
  4215. )
  4216. /*: Layout*/
  4217. {
  4218. // If it already exists, just return it.
  4219. /*if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]);
  4220. // Find or generate the next layout
  4221. let layout = layouts[lastBreakpoint];*/
  4222. /*const breakpointsSorted = sortBreakpoints(breakpoints);
  4223. const breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
  4224. for (let i = 0, len = breakpointsAbove.length; i < len; i++) {
  4225. const b = breakpointsAbove[i];
  4226. if (layouts[b]) {
  4227. layout = layouts[b];
  4228. break;
  4229. }
  4230. }*/
  4231. layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
  4232. return compact(correctBounds(layout, {
  4233. cols: cols
  4234. }), verticalCompact);
  4235. }
  4236. /**
  4237. * Given breakpoints, return an array of breakpoints sorted by width. This is usually
  4238. * e.g. ['xxs', 'xs', 'sm', ...]
  4239. *
  4240. * @param {Object} breakpoints Key/value pair of breakpoint names to widths.
  4241. * @return {Array} Sorted breakpoints.
  4242. */
  4243. function sortBreakpoints(breakpoints
  4244. /*: Breakpoints*/
  4245. )
  4246. /*: Array<Breakpoint>*/
  4247. {
  4248. var keys
  4249. /*: Array<string>*/
  4250. = Object.keys(breakpoints);
  4251. return keys.sort(function (a, b) {
  4252. return breakpoints[a] - breakpoints[b];
  4253. });
  4254. }
  4255. // CONCATENATED MODULE: ./src/helpers/DOM.js
  4256. var currentDir
  4257. /*: "ltr" | "rtl" | "auto"*/
  4258. = "auto"; // let currentDir = "auto";
  4259. function hasDocument() {
  4260. return typeof document !== "undefined";
  4261. }
  4262. function hasWindow() {
  4263. return typeof window !== "undefined";
  4264. }
  4265. function getDocumentDir() {
  4266. if (!hasDocument()) {
  4267. return currentDir;
  4268. }
  4269. var direction = typeof document.dir !== "undefined" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir");
  4270. return direction;
  4271. }
  4272. function setDocumentDir(dir
  4273. /*: "ltr" | "rtl" | "auto"*/
  4274. ) {
  4275. // export function setDocumentDir(dir){
  4276. if (!hasDocument) {
  4277. currentDir = dir;
  4278. return;
  4279. }
  4280. var html = document.getElementsByTagName("html")[0];
  4281. html.setAttribute("dir", dir);
  4282. }
  4283. function addWindowEventListener(event
  4284. /*:string*/
  4285. , callback
  4286. /*: () => mixed*/
  4287. ) {
  4288. if (!hasWindow) {
  4289. callback();
  4290. return;
  4291. }
  4292. window.addEventListener(event, callback);
  4293. }
  4294. function removeWindowEventListener(event
  4295. /*:string*/
  4296. , callback
  4297. /*: () => mixed*/
  4298. ) {
  4299. if (!hasWindow) {
  4300. return;
  4301. }
  4302. window.removeEventListener(event, callback);
  4303. }
  4304. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/domObjects.js
  4305. const domObjects = {
  4306. init,
  4307. document: null,
  4308. DocumentFragment: null,
  4309. SVGElement: null,
  4310. SVGSVGElement: null,
  4311. SVGElementInstance: null,
  4312. Element: null,
  4313. HTMLElement: null,
  4314. Event: null,
  4315. Touch: null,
  4316. PointerEvent: null
  4317. };
  4318. function blank() {}
  4319. /* harmony default export */ var utils_domObjects = (domObjects);
  4320. function init(window) {
  4321. const win = window;
  4322. domObjects.document = win.document;
  4323. domObjects.DocumentFragment = win.DocumentFragment || blank;
  4324. domObjects.SVGElement = win.SVGElement || blank;
  4325. domObjects.SVGSVGElement = win.SVGSVGElement || blank;
  4326. domObjects.SVGElementInstance = win.SVGElementInstance || blank;
  4327. domObjects.Element = win.Element || blank;
  4328. domObjects.HTMLElement = win.HTMLElement || domObjects.Element;
  4329. domObjects.Event = win.Event;
  4330. domObjects.Touch = win.Touch || blank;
  4331. domObjects.PointerEvent = win.PointerEvent || win.MSPointerEvent;
  4332. }
  4333. //# sourceMappingURL=domObjects.js.map
  4334. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/isWindow.js
  4335. /* harmony default export */ var isWindow = (thing => !!(thing && thing.Window) && thing instanceof thing.Window);
  4336. //# sourceMappingURL=isWindow.js.map
  4337. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/window.js
  4338. let realWindow = undefined;
  4339. let win = undefined;
  4340. function window_init(window) {
  4341. // get wrapped window if using Shadow DOM polyfill
  4342. realWindow = window; // create a TextNode
  4343. const el = window.document.createTextNode(''); // check if it's wrapped by a polyfill
  4344. if (el.ownerDocument !== window.document && typeof window.wrap === 'function' && window.wrap(el) === el) {
  4345. // use wrapped window
  4346. window = window.wrap(window);
  4347. }
  4348. win = window;
  4349. }
  4350. if (typeof window !== 'undefined' && !!window) {
  4351. window_init(window);
  4352. }
  4353. function getWindow(node) {
  4354. if (isWindow(node)) {
  4355. return node;
  4356. }
  4357. const rootNode = node.ownerDocument || node;
  4358. return rootNode.defaultView || win.window;
  4359. }
  4360. //# sourceMappingURL=window.js.map
  4361. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/is.js
  4362. const is_window = thing => thing === win || isWindow(thing);
  4363. const docFrag = thing => object(thing) && thing.nodeType === 11;
  4364. const object = thing => !!thing && typeof thing === 'object';
  4365. const func = thing => typeof thing === 'function';
  4366. const number = thing => typeof thing === 'number';
  4367. const bool = thing => typeof thing === 'boolean';
  4368. const string = thing => typeof thing === 'string';
  4369. const is_element = thing => {
  4370. if (!thing || typeof thing !== 'object') {
  4371. return false;
  4372. } // eslint-disable-next-line import/no-named-as-default-member
  4373. const _window = getWindow(thing) || win;
  4374. return /object|function/.test(typeof _window.Element) ? thing instanceof _window.Element // DOM2
  4375. : thing.nodeType === 1 && typeof thing.nodeName === 'string';
  4376. };
  4377. const plainObject = thing => object(thing) && !!thing.constructor && /function Object\b/.test(thing.constructor.toString());
  4378. const array = thing => object(thing) && typeof thing.length !== 'undefined' && func(thing.splice);
  4379. /* harmony default export */ var is = ({
  4380. window: is_window,
  4381. docFrag,
  4382. object,
  4383. func,
  4384. number,
  4385. bool,
  4386. string,
  4387. element: is_element,
  4388. plainObject,
  4389. array
  4390. });
  4391. //# sourceMappingURL=is.js.map
  4392. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/browser.js
  4393. const browser = {
  4394. init: browser_init,
  4395. supportsTouch: null,
  4396. supportsPointerEvent: null,
  4397. isIOS7: null,
  4398. isIOS: null,
  4399. isIe9: null,
  4400. isOperaMobile: null,
  4401. prefixedMatchesSelector: null,
  4402. pEventTypes: null,
  4403. wheelEvent: null
  4404. };
  4405. function browser_init(window) {
  4406. const Element = utils_domObjects.Element;
  4407. const navigator = win.navigator; // Does the browser support touch input?
  4408. browser.supportsTouch = 'ontouchstart' in window || is.func(window.DocumentTouch) && utils_domObjects.document instanceof window.DocumentTouch; // Does the browser support PointerEvents
  4409. browser.supportsPointerEvent = navigator.pointerEnabled !== false && !!utils_domObjects.PointerEvent;
  4410. browser.isIOS = /iP(hone|od|ad)/.test(navigator.platform); // scrolling doesn't change the result of getClientRects on iOS 7
  4411. browser.isIOS7 = /iP(hone|od|ad)/.test(navigator.platform) && /OS 7[^\d]/.test(navigator.appVersion);
  4412. browser.isIe9 = /MSIE 9/.test(navigator.userAgent); // Opera Mobile must be handled differently
  4413. browser.isOperaMobile = navigator.appName === 'Opera' && browser.supportsTouch && /Presto/.test(navigator.userAgent); // prefix matchesSelector
  4414. browser.prefixedMatchesSelector = 'matches' in Element.prototype ? 'matches' : 'webkitMatchesSelector' in Element.prototype ? 'webkitMatchesSelector' : 'mozMatchesSelector' in Element.prototype ? 'mozMatchesSelector' : 'oMatchesSelector' in Element.prototype ? 'oMatchesSelector' : 'msMatchesSelector';
  4415. browser.pEventTypes = browser.supportsPointerEvent ? utils_domObjects.PointerEvent === window.MSPointerEvent ? {
  4416. up: 'MSPointerUp',
  4417. down: 'MSPointerDown',
  4418. over: 'mouseover',
  4419. out: 'mouseout',
  4420. move: 'MSPointerMove',
  4421. cancel: 'MSPointerCancel'
  4422. } : {
  4423. up: 'pointerup',
  4424. down: 'pointerdown',
  4425. over: 'pointerover',
  4426. out: 'pointerout',
  4427. move: 'pointermove',
  4428. cancel: 'pointercancel'
  4429. } : null; // because Webkit and Opera still use 'mousewheel' event type
  4430. browser.wheelEvent = 'onmousewheel' in utils_domObjects.document ? 'mousewheel' : 'wheel';
  4431. }
  4432. /* harmony default export */ var utils_browser = (browser);
  4433. //# sourceMappingURL=browser.js.map
  4434. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/arr.js
  4435. const contains = (array, target) => array.indexOf(target) !== -1;
  4436. const arr_remove = (array, target) => array.splice(array.indexOf(target), 1);
  4437. const merge = (target, source) => {
  4438. for (const item of source) {
  4439. target.push(item);
  4440. }
  4441. return target;
  4442. };
  4443. const from = source => merge([], source);
  4444. const findIndex = (array, func) => {
  4445. for (let i = 0; i < array.length; i++) {
  4446. if (func(array[i], i, array)) {
  4447. return i;
  4448. }
  4449. }
  4450. return -1;
  4451. };
  4452. const find = (array, func) => array[findIndex(array, func)];
  4453. //# sourceMappingURL=arr.js.map
  4454. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/clone.js
  4455. // tslint:disable-next-line ban-types
  4456. function clone(source) {
  4457. const dest = {};
  4458. for (const prop in source) {
  4459. const value = source[prop];
  4460. if (is.plainObject(value)) {
  4461. dest[prop] = clone(value);
  4462. } else if (is.array(value)) {
  4463. dest[prop] = from(value);
  4464. } else {
  4465. dest[prop] = value;
  4466. }
  4467. }
  4468. return dest;
  4469. }
  4470. //# sourceMappingURL=clone.js.map
  4471. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/extend.js
  4472. function extend(dest, source) {
  4473. for (const prop in source) {
  4474. dest[prop] = source[prop];
  4475. }
  4476. const ret = dest;
  4477. return ret;
  4478. }
  4479. //# sourceMappingURL=extend.js.map
  4480. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/raf.js
  4481. let lastTime = 0;
  4482. let request;
  4483. let cancel;
  4484. function raf_init(window) {
  4485. request = window.requestAnimationFrame;
  4486. cancel = window.cancelAnimationFrame;
  4487. if (!request) {
  4488. const vendors = ['ms', 'moz', 'webkit', 'o'];
  4489. for (const vendor of vendors) {
  4490. request = window[`${vendor}RequestAnimationFrame`];
  4491. cancel = window[`${vendor}CancelAnimationFrame`] || window[`${vendor}CancelRequestAnimationFrame`];
  4492. }
  4493. }
  4494. request = request && request.bind(window);
  4495. cancel = cancel && cancel.bind(window);
  4496. if (!request) {
  4497. request = callback => {
  4498. const currTime = Date.now();
  4499. const timeToCall = Math.max(0, 16 - (currTime - lastTime)); // eslint-disable-next-line node/no-callback-literal
  4500. const token = window.setTimeout(() => {
  4501. callback(currTime + timeToCall);
  4502. }, timeToCall);
  4503. lastTime = currTime + timeToCall;
  4504. return token;
  4505. };
  4506. cancel = token => clearTimeout(token);
  4507. }
  4508. }
  4509. /* harmony default export */ var raf = ({
  4510. request: callback => request(callback),
  4511. cancel: token => cancel(token),
  4512. init: raf_init
  4513. });
  4514. //# sourceMappingURL=raf.js.map
  4515. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/normalizeListeners.js
  4516. function normalize(type, listeners, result) {
  4517. result = result || {};
  4518. if (is.string(type) && type.search(' ') !== -1) {
  4519. type = split(type);
  4520. }
  4521. if (is.array(type)) {
  4522. return type.reduce((acc, t) => extend(acc, normalize(t, listeners, result)), result);
  4523. } // ({ type: fn }) -> ('', { type: fn })
  4524. if (is.object(type)) {
  4525. listeners = type;
  4526. type = '';
  4527. }
  4528. if (is.func(listeners)) {
  4529. result[type] = result[type] || [];
  4530. result[type].push(listeners);
  4531. } else if (is.array(listeners)) {
  4532. for (const l of listeners) {
  4533. normalize(type, l, result);
  4534. }
  4535. } else if (is.object(listeners)) {
  4536. for (const prefix in listeners) {
  4537. const combinedTypes = split(prefix).map(p => `${type}${p}`);
  4538. normalize(combinedTypes, listeners[prefix], result);
  4539. }
  4540. }
  4541. return result;
  4542. }
  4543. function split(type) {
  4544. return type.trim().split(/ +/);
  4545. }
  4546. //# sourceMappingURL=normalizeListeners.js.map
  4547. // CONCATENATED MODULE: ./node_modules/@interactjs/core/Eventable.js
  4548. function fireUntilImmediateStopped(event, listeners) {
  4549. for (const listener of listeners) {
  4550. if (event.immediatePropagationStopped) {
  4551. break;
  4552. }
  4553. listener(event);
  4554. }
  4555. }
  4556. class Eventable_Eventable {
  4557. constructor(options) {
  4558. this.options = void 0;
  4559. this.types = {};
  4560. this.propagationStopped = false;
  4561. this.immediatePropagationStopped = false;
  4562. this.global = void 0;
  4563. this.options = extend({}, options || {});
  4564. }
  4565. fire(event) {
  4566. let listeners;
  4567. const global = this.global; // Interactable#on() listeners
  4568. // tslint:disable no-conditional-assignment
  4569. if (listeners = this.types[event.type]) {
  4570. fireUntilImmediateStopped(event, listeners);
  4571. } // interact.on() listeners
  4572. if (!event.propagationStopped && global && (listeners = global[event.type])) {
  4573. fireUntilImmediateStopped(event, listeners);
  4574. }
  4575. }
  4576. on(type, listener) {
  4577. const listeners = normalize(type, listener);
  4578. for (type in listeners) {
  4579. this.types[type] = merge(this.types[type] || [], listeners[type]);
  4580. }
  4581. }
  4582. off(type, listener) {
  4583. const listeners = normalize(type, listener);
  4584. for (type in listeners) {
  4585. const eventList = this.types[type];
  4586. if (!eventList || !eventList.length) {
  4587. continue;
  4588. }
  4589. for (const subListener of listeners[type]) {
  4590. const index = eventList.indexOf(subListener);
  4591. if (index !== -1) {
  4592. eventList.splice(index, 1);
  4593. }
  4594. }
  4595. }
  4596. }
  4597. getRect(_element) {
  4598. return null;
  4599. }
  4600. }
  4601. //# sourceMappingURL=Eventable.js.map
  4602. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/domUtils.js
  4603. function nodeContains(parent, child) {
  4604. if (parent.contains) {
  4605. return parent.contains(child);
  4606. }
  4607. while (child) {
  4608. if (child === parent) {
  4609. return true;
  4610. }
  4611. child = child.parentNode;
  4612. }
  4613. return false;
  4614. }
  4615. function domUtils_closest(element, selector) {
  4616. while (is.element(element)) {
  4617. if (matchesSelector(element, selector)) {
  4618. return element;
  4619. }
  4620. element = parentNode(element);
  4621. }
  4622. return null;
  4623. }
  4624. function parentNode(node) {
  4625. let parent = node.parentNode;
  4626. if (is.docFrag(parent)) {
  4627. // skip past #shado-root fragments
  4628. // tslint:disable-next-line
  4629. while ((parent = parent.host) && is.docFrag(parent)) {
  4630. continue;
  4631. }
  4632. return parent;
  4633. }
  4634. return parent;
  4635. }
  4636. function matchesSelector(element, selector) {
  4637. // remove /deep/ from selectors if shadowDOM polyfill is used
  4638. if (win !== realWindow) {
  4639. selector = selector.replace(/\/deep\//g, ' ');
  4640. }
  4641. return element[utils_browser.prefixedMatchesSelector](selector);
  4642. }
  4643. const getParent = el => el.parentNode || el.host; // Test for the element that's "above" all other qualifiers
  4644. function indexOfDeepestElement(elements) {
  4645. let deepestNodeParents = [];
  4646. let deepestNodeIndex;
  4647. for (let i = 0; i < elements.length; i++) {
  4648. const currentNode = elements[i];
  4649. const deepestNode = elements[deepestNodeIndex]; // node may appear in elements array multiple times
  4650. if (!currentNode || i === deepestNodeIndex) {
  4651. continue;
  4652. }
  4653. if (!deepestNode) {
  4654. deepestNodeIndex = i;
  4655. continue;
  4656. }
  4657. const currentNodeParent = getParent(currentNode);
  4658. const deepestNodeParent = getParent(deepestNode); // check if the deepest or current are document.documentElement/rootElement
  4659. // - if the current node is, do nothing and continue
  4660. if (currentNodeParent === currentNode.ownerDocument) {
  4661. continue;
  4662. } // - if deepest is, update with the current node and continue to next
  4663. else if (deepestNodeParent === currentNode.ownerDocument) {
  4664. deepestNodeIndex = i;
  4665. continue;
  4666. } // compare zIndex of siblings
  4667. if (currentNodeParent === deepestNodeParent) {
  4668. if (zIndexIsHigherThan(currentNode, deepestNode)) {
  4669. deepestNodeIndex = i;
  4670. }
  4671. continue;
  4672. } // populate the ancestry array for the latest deepest node
  4673. deepestNodeParents = deepestNodeParents.length ? deepestNodeParents : getNodeParents(deepestNode);
  4674. let ancestryStart; // if the deepest node is an HTMLElement and the current node is a non root svg element
  4675. if (deepestNode instanceof utils_domObjects.HTMLElement && currentNode instanceof utils_domObjects.SVGElement && !(currentNode instanceof utils_domObjects.SVGSVGElement)) {
  4676. // TODO: is this check necessary? Was this for HTML elements embedded in SVG?
  4677. if (currentNode === deepestNodeParent) {
  4678. continue;
  4679. }
  4680. ancestryStart = currentNode.ownerSVGElement;
  4681. } else {
  4682. ancestryStart = currentNode;
  4683. }
  4684. const currentNodeParents = getNodeParents(ancestryStart, deepestNode.ownerDocument);
  4685. let commonIndex = 0; // get (position of closest common ancestor) + 1
  4686. while (currentNodeParents[commonIndex] && currentNodeParents[commonIndex] === deepestNodeParents[commonIndex]) {
  4687. commonIndex++;
  4688. }
  4689. const parents = [currentNodeParents[commonIndex - 1], currentNodeParents[commonIndex], deepestNodeParents[commonIndex]];
  4690. let child = parents[0].lastChild;
  4691. while (child) {
  4692. if (child === parents[1]) {
  4693. deepestNodeIndex = i;
  4694. deepestNodeParents = currentNodeParents;
  4695. break;
  4696. } else if (child === parents[2]) {
  4697. break;
  4698. }
  4699. child = child.previousSibling;
  4700. }
  4701. }
  4702. return deepestNodeIndex;
  4703. }
  4704. function getNodeParents(node, limit) {
  4705. const parents = [];
  4706. let parent = node;
  4707. let parentParent;
  4708. while ((parentParent = getParent(parent)) && parent !== limit && parentParent !== parent.ownerDocument) {
  4709. parents.unshift(parent);
  4710. parent = parentParent;
  4711. }
  4712. return parents;
  4713. }
  4714. function zIndexIsHigherThan(higherNode, lowerNode) {
  4715. const higherIndex = parseInt(getWindow(higherNode).getComputedStyle(higherNode).zIndex, 10) || 0;
  4716. const lowerIndex = parseInt(getWindow(lowerNode).getComputedStyle(lowerNode).zIndex, 10) || 0;
  4717. return higherIndex >= lowerIndex;
  4718. }
  4719. function matchesUpTo(element, selector, limit) {
  4720. while (is.element(element)) {
  4721. if (matchesSelector(element, selector)) {
  4722. return true;
  4723. }
  4724. element = parentNode(element);
  4725. if (element === limit) {
  4726. return matchesSelector(element, selector);
  4727. }
  4728. }
  4729. return false;
  4730. }
  4731. function getActualElement(element) {
  4732. return element.correspondingUseElement || element;
  4733. }
  4734. function getScrollXY(relevantWindow) {
  4735. relevantWindow = relevantWindow || win;
  4736. return {
  4737. x: relevantWindow.scrollX || relevantWindow.document.documentElement.scrollLeft,
  4738. y: relevantWindow.scrollY || relevantWindow.document.documentElement.scrollTop
  4739. };
  4740. }
  4741. function getElementClientRect(element) {
  4742. const clientRect = element instanceof utils_domObjects.SVGElement ? element.getBoundingClientRect() : element.getClientRects()[0];
  4743. return clientRect && {
  4744. left: clientRect.left,
  4745. right: clientRect.right,
  4746. top: clientRect.top,
  4747. bottom: clientRect.bottom,
  4748. width: clientRect.width || clientRect.right - clientRect.left,
  4749. height: clientRect.height || clientRect.bottom - clientRect.top
  4750. };
  4751. }
  4752. function getElementRect(element) {
  4753. const clientRect = getElementClientRect(element);
  4754. if (!utils_browser.isIOS7 && clientRect) {
  4755. const scroll = getScrollXY(getWindow(element));
  4756. clientRect.left += scroll.x;
  4757. clientRect.right += scroll.x;
  4758. clientRect.top += scroll.y;
  4759. clientRect.bottom += scroll.y;
  4760. }
  4761. return clientRect;
  4762. }
  4763. function getPath(node) {
  4764. const path = [];
  4765. while (node) {
  4766. path.push(node);
  4767. node = parentNode(node);
  4768. }
  4769. return path;
  4770. }
  4771. function trySelector(value) {
  4772. if (!is.string(value)) {
  4773. return false;
  4774. } // an exception will be raised if it is invalid
  4775. utils_domObjects.document.querySelector(value);
  4776. return true;
  4777. }
  4778. //# sourceMappingURL=domUtils.js.map
  4779. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/rect.js
  4780. function getStringOptionResult(value, target, element) {
  4781. if (value === 'parent') {
  4782. return parentNode(element);
  4783. }
  4784. if (value === 'self') {
  4785. return target.getRect(element);
  4786. }
  4787. return domUtils_closest(element, value);
  4788. }
  4789. function resolveRectLike(value, target, element, functionArgs) {
  4790. let returnValue = value;
  4791. if (is.string(returnValue)) {
  4792. returnValue = getStringOptionResult(returnValue, target, element);
  4793. } else if (is.func(returnValue)) {
  4794. returnValue = returnValue(...functionArgs);
  4795. }
  4796. if (is.element(returnValue)) {
  4797. returnValue = getElementRect(returnValue);
  4798. }
  4799. return returnValue;
  4800. }
  4801. function rectToXY(rect) {
  4802. return rect && {
  4803. x: 'x' in rect ? rect.x : rect.left,
  4804. y: 'y' in rect ? rect.y : rect.top
  4805. };
  4806. }
  4807. function xywhToTlbr(rect) {
  4808. if (rect && !('left' in rect && 'top' in rect)) {
  4809. rect = extend({}, rect);
  4810. rect.left = rect.x || 0;
  4811. rect.top = rect.y || 0;
  4812. rect.right = rect.right || rect.left + rect.width;
  4813. rect.bottom = rect.bottom || rect.top + rect.height;
  4814. }
  4815. return rect;
  4816. }
  4817. function tlbrToXywh(rect) {
  4818. if (rect && !('x' in rect && 'y' in rect)) {
  4819. rect = extend({}, rect);
  4820. rect.x = rect.left || 0;
  4821. rect.y = rect.top || 0;
  4822. rect.width = rect.width || (rect.right || 0) - rect.x;
  4823. rect.height = rect.height || (rect.bottom || 0) - rect.y;
  4824. }
  4825. return rect;
  4826. }
  4827. function addEdges(edges, rect, delta) {
  4828. if (edges.left) {
  4829. rect.left += delta.x;
  4830. }
  4831. if (edges.right) {
  4832. rect.right += delta.x;
  4833. }
  4834. if (edges.top) {
  4835. rect.top += delta.y;
  4836. }
  4837. if (edges.bottom) {
  4838. rect.bottom += delta.y;
  4839. }
  4840. rect.width = rect.right - rect.left;
  4841. rect.height = rect.bottom - rect.top;
  4842. }
  4843. //# sourceMappingURL=rect.js.map
  4844. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/getOriginXY.js
  4845. /* harmony default export */ var getOriginXY = (function (target, element, actionName) {
  4846. const actionOptions = target.options[actionName];
  4847. const actionOrigin = actionOptions && actionOptions.origin;
  4848. const origin = actionOrigin || target.options.origin;
  4849. const originRect = resolveRectLike(origin, target, element, [target && element]);
  4850. return rectToXY(originRect) || {
  4851. x: 0,
  4852. y: 0
  4853. };
  4854. });
  4855. //# sourceMappingURL=getOriginXY.js.map
  4856. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/hypot.js
  4857. /* harmony default export */ var hypot = ((x, y) => Math.sqrt(x * x + y * y));
  4858. //# sourceMappingURL=hypot.js.map
  4859. // CONCATENATED MODULE: ./node_modules/@interactjs/core/BaseEvent.js
  4860. class BaseEvent {
  4861. constructor(interaction) {
  4862. this.type = void 0;
  4863. this.target = void 0;
  4864. this.currentTarget = void 0;
  4865. this.interactable = void 0;
  4866. this._interaction = void 0;
  4867. this.timeStamp = void 0;
  4868. this.immediatePropagationStopped = false;
  4869. this.propagationStopped = false;
  4870. this._interaction = interaction;
  4871. }
  4872. preventDefault() {}
  4873. /**
  4874. * Don't call any other listeners (even on the current target)
  4875. */
  4876. stopPropagation() {
  4877. this.propagationStopped = true;
  4878. }
  4879. /**
  4880. * Don't call listeners on the remaining targets
  4881. */
  4882. stopImmediatePropagation() {
  4883. this.immediatePropagationStopped = this.propagationStopped = true;
  4884. }
  4885. } // defined outside of class definition to avoid assignment of undefined during
  4886. // construction
  4887. // getters and setters defined here to support typescript 3.6 and below which
  4888. // don't support getter and setters in .d.ts files
  4889. Object.defineProperty(BaseEvent.prototype, 'interaction', {
  4890. get() {
  4891. return this._interaction._proxy;
  4892. },
  4893. set() {}
  4894. });
  4895. //# sourceMappingURL=BaseEvent.js.map
  4896. // CONCATENATED MODULE: ./node_modules/@interactjs/core/defaultOptions.js
  4897. // eslint-disable-next-line @typescript-eslint/no-empty-interface
  4898. // export interface Options extends BaseDefaults, PerActionDefaults {}
  4899. const defaultOptions_defaults = {
  4900. base: {
  4901. preventDefault: 'auto',
  4902. deltaSource: 'page'
  4903. },
  4904. perAction: {
  4905. enabled: false,
  4906. origin: {
  4907. x: 0,
  4908. y: 0
  4909. }
  4910. },
  4911. actions: {}
  4912. };
  4913. //# sourceMappingURL=defaultOptions.js.map
  4914. // CONCATENATED MODULE: ./node_modules/@interactjs/core/InteractEvent.js
  4915. class InteractEvent_InteractEvent extends BaseEvent {
  4916. // resize
  4917. /** */
  4918. constructor(interaction, event, actionName, phase, element, preEnd, type) {
  4919. super(interaction);
  4920. this.target = void 0;
  4921. this.currentTarget = void 0;
  4922. this.relatedTarget = null;
  4923. this.screenX = void 0;
  4924. this.screenY = void 0;
  4925. this.button = void 0;
  4926. this.buttons = void 0;
  4927. this.ctrlKey = void 0;
  4928. this.shiftKey = void 0;
  4929. this.altKey = void 0;
  4930. this.metaKey = void 0;
  4931. this.page = void 0;
  4932. this.client = void 0;
  4933. this.delta = void 0;
  4934. this.rect = void 0;
  4935. this.x0 = void 0;
  4936. this.y0 = void 0;
  4937. this.t0 = void 0;
  4938. this.dt = void 0;
  4939. this.duration = void 0;
  4940. this.clientX0 = void 0;
  4941. this.clientY0 = void 0;
  4942. this.velocity = void 0;
  4943. this.speed = void 0;
  4944. this.swipe = void 0;
  4945. this.timeStamp = void 0;
  4946. this.axes = void 0;
  4947. this.preEnd = void 0;
  4948. element = element || interaction.element;
  4949. const target = interaction.interactable;
  4950. const deltaSource = (target && target.options || defaultOptions_defaults).deltaSource;
  4951. const origin = getOriginXY(target, element, actionName);
  4952. const starting = phase === 'start';
  4953. const ending = phase === 'end';
  4954. const prevEvent = starting ? this : interaction.prevEvent;
  4955. const coords = starting ? interaction.coords.start : ending ? {
  4956. page: prevEvent.page,
  4957. client: prevEvent.client,
  4958. timeStamp: interaction.coords.cur.timeStamp
  4959. } : interaction.coords.cur;
  4960. this.page = extend({}, coords.page);
  4961. this.client = extend({}, coords.client);
  4962. this.rect = extend({}, interaction.rect);
  4963. this.timeStamp = coords.timeStamp;
  4964. if (!ending) {
  4965. this.page.x -= origin.x;
  4966. this.page.y -= origin.y;
  4967. this.client.x -= origin.x;
  4968. this.client.y -= origin.y;
  4969. }
  4970. this.ctrlKey = event.ctrlKey;
  4971. this.altKey = event.altKey;
  4972. this.shiftKey = event.shiftKey;
  4973. this.metaKey = event.metaKey;
  4974. this.button = event.button;
  4975. this.buttons = event.buttons;
  4976. this.target = element;
  4977. this.currentTarget = element;
  4978. this.preEnd = preEnd;
  4979. this.type = type || actionName + (phase || '');
  4980. this.interactable = target;
  4981. this.t0 = starting ? interaction.pointers[interaction.pointers.length - 1].downTime : prevEvent.t0;
  4982. this.x0 = interaction.coords.start.page.x - origin.x;
  4983. this.y0 = interaction.coords.start.page.y - origin.y;
  4984. this.clientX0 = interaction.coords.start.client.x - origin.x;
  4985. this.clientY0 = interaction.coords.start.client.y - origin.y;
  4986. if (starting || ending) {
  4987. this.delta = {
  4988. x: 0,
  4989. y: 0
  4990. };
  4991. } else {
  4992. this.delta = {
  4993. x: this[deltaSource].x - prevEvent[deltaSource].x,
  4994. y: this[deltaSource].y - prevEvent[deltaSource].y
  4995. };
  4996. }
  4997. this.dt = interaction.coords.delta.timeStamp;
  4998. this.duration = this.timeStamp - this.t0; // velocity and speed in pixels per second
  4999. this.velocity = extend({}, interaction.coords.velocity[deltaSource]);
  5000. this.speed = hypot(this.velocity.x, this.velocity.y);
  5001. this.swipe = ending || phase === 'inertiastart' ? this.getSwipe() : null;
  5002. }
  5003. getSwipe() {
  5004. const interaction = this._interaction;
  5005. if (interaction.prevEvent.speed < 600 || this.timeStamp - interaction.prevEvent.timeStamp > 150) {
  5006. return null;
  5007. }
  5008. let angle = 180 * Math.atan2(interaction.prevEvent.velocityY, interaction.prevEvent.velocityX) / Math.PI;
  5009. const overlap = 22.5;
  5010. if (angle < 0) {
  5011. angle += 360;
  5012. }
  5013. const left = 135 - overlap <= angle && angle < 225 + overlap;
  5014. const up = 225 - overlap <= angle && angle < 315 + overlap;
  5015. const right = !left && (315 - overlap <= angle || angle < 45 + overlap);
  5016. const down = !up && 45 - overlap <= angle && angle < 135 + overlap;
  5017. return {
  5018. up,
  5019. down,
  5020. left,
  5021. right,
  5022. angle,
  5023. speed: interaction.prevEvent.speed,
  5024. velocity: {
  5025. x: interaction.prevEvent.velocityX,
  5026. y: interaction.prevEvent.velocityY
  5027. }
  5028. };
  5029. }
  5030. preventDefault() {}
  5031. /**
  5032. * Don't call listeners on the remaining targets
  5033. */
  5034. stopImmediatePropagation() {
  5035. this.immediatePropagationStopped = this.propagationStopped = true;
  5036. }
  5037. /**
  5038. * Don't call any other listeners (even on the current target)
  5039. */
  5040. stopPropagation() {
  5041. this.propagationStopped = true;
  5042. }
  5043. } // getters and setters defined here to support typescript 3.6 and below which
  5044. // don't support getter and setters in .d.ts files
  5045. Object.defineProperties(InteractEvent_InteractEvent.prototype, {
  5046. pageX: {
  5047. get() {
  5048. return this.page.x;
  5049. },
  5050. set(value) {
  5051. this.page.x = value;
  5052. }
  5053. },
  5054. pageY: {
  5055. get() {
  5056. return this.page.y;
  5057. },
  5058. set(value) {
  5059. this.page.y = value;
  5060. }
  5061. },
  5062. clientX: {
  5063. get() {
  5064. return this.client.x;
  5065. },
  5066. set(value) {
  5067. this.client.x = value;
  5068. }
  5069. },
  5070. clientY: {
  5071. get() {
  5072. return this.client.y;
  5073. },
  5074. set(value) {
  5075. this.client.y = value;
  5076. }
  5077. },
  5078. dx: {
  5079. get() {
  5080. return this.delta.x;
  5081. },
  5082. set(value) {
  5083. this.delta.x = value;
  5084. }
  5085. },
  5086. dy: {
  5087. get() {
  5088. return this.delta.y;
  5089. },
  5090. set(value) {
  5091. this.delta.y = value;
  5092. }
  5093. },
  5094. velocityX: {
  5095. get() {
  5096. return this.velocity.x;
  5097. },
  5098. set(value) {
  5099. this.velocity.x = value;
  5100. }
  5101. },
  5102. velocityY: {
  5103. get() {
  5104. return this.velocity.y;
  5105. },
  5106. set(value) {
  5107. this.velocity.y = value;
  5108. }
  5109. }
  5110. });
  5111. //# sourceMappingURL=InteractEvent.js.map
  5112. // CONCATENATED MODULE: ./node_modules/@interactjs/core/isNonNativeEvent.js
  5113. function isNonNativeEvent(type, actions) {
  5114. if (actions.phaselessTypes[type]) {
  5115. return true;
  5116. }
  5117. for (const name in actions.map) {
  5118. if (type.indexOf(name) === 0 && type.substr(name.length) in actions.phases) {
  5119. return true;
  5120. }
  5121. }
  5122. return false;
  5123. }
  5124. //# sourceMappingURL=isNonNativeEvent.js.map
  5125. // CONCATENATED MODULE: ./node_modules/@interactjs/core/Interactable.js
  5126. /* eslint-disable no-dupe-class-members */
  5127. /** */
  5128. class Interactable_Interactable {
  5129. /** @internal */
  5130. get _defaults() {
  5131. return {
  5132. base: {},
  5133. perAction: {},
  5134. actions: {}
  5135. };
  5136. }
  5137. /** */
  5138. constructor(target, options, defaultContext, scopeEvents) {
  5139. this.options = void 0;
  5140. this._actions = void 0;
  5141. this.target = void 0;
  5142. this.events = new Eventable_Eventable();
  5143. this._context = void 0;
  5144. this._win = void 0;
  5145. this._doc = void 0;
  5146. this._scopeEvents = void 0;
  5147. this._rectChecker = void 0;
  5148. this._actions = options.actions;
  5149. this.target = target;
  5150. this._context = options.context || defaultContext;
  5151. this._win = getWindow(trySelector(target) ? this._context : target);
  5152. this._doc = this._win.document;
  5153. this._scopeEvents = scopeEvents;
  5154. this.set(options);
  5155. }
  5156. setOnEvents(actionName, phases) {
  5157. if (is.func(phases.onstart)) {
  5158. this.on(`${actionName}start`, phases.onstart);
  5159. }
  5160. if (is.func(phases.onmove)) {
  5161. this.on(`${actionName}move`, phases.onmove);
  5162. }
  5163. if (is.func(phases.onend)) {
  5164. this.on(`${actionName}end`, phases.onend);
  5165. }
  5166. if (is.func(phases.oninertiastart)) {
  5167. this.on(`${actionName}inertiastart`, phases.oninertiastart);
  5168. }
  5169. return this;
  5170. }
  5171. updatePerActionListeners(actionName, prev, cur) {
  5172. if (is.array(prev) || is.object(prev)) {
  5173. this.off(actionName, prev);
  5174. }
  5175. if (is.array(cur) || is.object(cur)) {
  5176. this.on(actionName, cur);
  5177. }
  5178. }
  5179. setPerAction(actionName, options) {
  5180. const defaults = this._defaults; // for all the default per-action options
  5181. for (const optionName_ in options) {
  5182. const optionName = optionName_;
  5183. const actionOptions = this.options[actionName];
  5184. const optionValue = options[optionName]; // remove old event listeners and add new ones
  5185. if (optionName === 'listeners') {
  5186. this.updatePerActionListeners(actionName, actionOptions.listeners, optionValue);
  5187. } // if the option value is an array
  5188. if (is.array(optionValue)) {
  5189. actionOptions[optionName] = from(optionValue);
  5190. } // if the option value is an object
  5191. else if (is.plainObject(optionValue)) {
  5192. // copy the object
  5193. actionOptions[optionName] = extend(actionOptions[optionName] || {}, clone(optionValue)); // set anabled field to true if it exists in the defaults
  5194. if (is.object(defaults.perAction[optionName]) && 'enabled' in defaults.perAction[optionName]) {
  5195. actionOptions[optionName].enabled = optionValue.enabled !== false;
  5196. }
  5197. } // if the option value is a boolean and the default is an object
  5198. else if (is.bool(optionValue) && is.object(defaults.perAction[optionName])) {
  5199. actionOptions[optionName].enabled = optionValue;
  5200. } // if it's anything else, do a plain assignment
  5201. else {
  5202. actionOptions[optionName] = optionValue;
  5203. }
  5204. }
  5205. }
  5206. /**
  5207. * The default function to get an Interactables bounding rect. Can be
  5208. * overridden using {@link Interactable.rectChecker}.
  5209. *
  5210. * @param {Element} [element] The element to measure.
  5211. * @return {Rect} The object's bounding rectangle.
  5212. */
  5213. getRect(element) {
  5214. element = element || (is.element(this.target) ? this.target : null);
  5215. if (is.string(this.target)) {
  5216. element = element || this._context.querySelector(this.target);
  5217. }
  5218. return getElementRect(element);
  5219. }
  5220. /**
  5221. * Returns or sets the function used to calculate the interactable's
  5222. * element's rectangle
  5223. *
  5224. * @param {function} [checker] A function which returns this Interactable's
  5225. * bounding rectangle. See {@link Interactable.getRect}
  5226. * @return {function | object} The checker function or this Interactable
  5227. */
  5228. rectChecker(checker) {
  5229. if (is.func(checker)) {
  5230. this._rectChecker = checker;
  5231. this.getRect = element => {
  5232. const rect = extend({}, this._rectChecker(element));
  5233. if (!('width' in rect)) {
  5234. rect.width = rect.right - rect.left;
  5235. rect.height = rect.bottom - rect.top;
  5236. }
  5237. return rect;
  5238. };
  5239. return this;
  5240. }
  5241. if (checker === null) {
  5242. delete this.getRect;
  5243. delete this._rectChecker;
  5244. return this;
  5245. }
  5246. return this.getRect;
  5247. }
  5248. _backCompatOption(optionName, newValue) {
  5249. if (trySelector(newValue) || is.object(newValue)) {
  5250. this.options[optionName] = newValue;
  5251. for (const action in this._actions.map) {
  5252. this.options[action][optionName] = newValue;
  5253. }
  5254. return this;
  5255. }
  5256. return this.options[optionName];
  5257. }
  5258. /**
  5259. * Gets or sets the origin of the Interactable's element. The x and y
  5260. * of the origin will be subtracted from action event coordinates.
  5261. *
  5262. * @param {Element | object | string} [origin] An HTML or SVG Element whose
  5263. * rect will be used, an object eg. { x: 0, y: 0 } or string 'parent', 'self'
  5264. * or any CSS selector
  5265. *
  5266. * @return {object} The current origin or this Interactable
  5267. */
  5268. origin(newValue) {
  5269. return this._backCompatOption('origin', newValue);
  5270. }
  5271. /**
  5272. * Returns or sets the mouse coordinate types used to calculate the
  5273. * movement of the pointer.
  5274. *
  5275. * @param {string} [newValue] Use 'client' if you will be scrolling while
  5276. * interacting; Use 'page' if you want autoScroll to work
  5277. * @return {string | object} The current deltaSource or this Interactable
  5278. */
  5279. deltaSource(newValue) {
  5280. if (newValue === 'page' || newValue === 'client') {
  5281. this.options.deltaSource = newValue;
  5282. return this;
  5283. }
  5284. return this.options.deltaSource;
  5285. }
  5286. /**
  5287. * Gets the selector context Node of the Interactable. The default is
  5288. * `window.document`.
  5289. *
  5290. * @return {Node} The context Node of this Interactable
  5291. */
  5292. context() {
  5293. return this._context;
  5294. }
  5295. inContext(element) {
  5296. return this._context === element.ownerDocument || nodeContains(this._context, element);
  5297. }
  5298. testIgnoreAllow(options, targetNode, eventTarget) {
  5299. return !this.testIgnore(options.ignoreFrom, targetNode, eventTarget) && this.testAllow(options.allowFrom, targetNode, eventTarget);
  5300. }
  5301. testAllow(allowFrom, targetNode, element) {
  5302. if (!allowFrom) {
  5303. return true;
  5304. }
  5305. if (!is.element(element)) {
  5306. return false;
  5307. }
  5308. if (is.string(allowFrom)) {
  5309. return matchesUpTo(element, allowFrom, targetNode);
  5310. } else if (is.element(allowFrom)) {
  5311. return nodeContains(allowFrom, element);
  5312. }
  5313. return false;
  5314. }
  5315. testIgnore(ignoreFrom, targetNode, element) {
  5316. if (!ignoreFrom || !is.element(element)) {
  5317. return false;
  5318. }
  5319. if (is.string(ignoreFrom)) {
  5320. return matchesUpTo(element, ignoreFrom, targetNode);
  5321. } else if (is.element(ignoreFrom)) {
  5322. return nodeContains(ignoreFrom, element);
  5323. }
  5324. return false;
  5325. }
  5326. /**
  5327. * Calls listeners for the given InteractEvent type bound globally
  5328. * and directly to this Interactable
  5329. *
  5330. * @param {InteractEvent} iEvent The InteractEvent object to be fired on this
  5331. * Interactable
  5332. * @return {Interactable} this Interactable
  5333. */
  5334. fire(iEvent) {
  5335. this.events.fire(iEvent);
  5336. return this;
  5337. }
  5338. _onOff(method, typeArg, listenerArg, options) {
  5339. if (is.object(typeArg) && !is.array(typeArg)) {
  5340. options = listenerArg;
  5341. listenerArg = null;
  5342. }
  5343. const addRemove = method === 'on' ? 'add' : 'remove';
  5344. const listeners = normalize(typeArg, listenerArg);
  5345. for (let type in listeners) {
  5346. if (type === 'wheel') {
  5347. type = utils_browser.wheelEvent;
  5348. }
  5349. for (const listener of listeners[type]) {
  5350. // if it is an action event type
  5351. if (isNonNativeEvent(type, this._actions)) {
  5352. this.events[method](type, listener);
  5353. } // delegated event
  5354. else if (is.string(this.target)) {
  5355. this._scopeEvents[`${addRemove}Delegate`](this.target, this._context, type, listener, options);
  5356. } // remove listener from this Interactable's element
  5357. else {
  5358. this._scopeEvents[addRemove](this.target, type, listener, options);
  5359. }
  5360. }
  5361. }
  5362. return this;
  5363. }
  5364. /**
  5365. * Binds a listener for an InteractEvent, pointerEvent or DOM event.
  5366. *
  5367. * @param {string | array | object} types The types of events to listen
  5368. * for
  5369. * @param {function | array | object} [listener] The event listener function(s)
  5370. * @param {object | boolean} [options] options object or useCapture flag for
  5371. * addEventListener
  5372. * @return {Interactable} This Interactable
  5373. */
  5374. on(types, listener, options) {
  5375. return this._onOff('on', types, listener, options);
  5376. }
  5377. /**
  5378. * Removes an InteractEvent, pointerEvent or DOM event listener.
  5379. *
  5380. * @param {string | array | object} types The types of events that were
  5381. * listened for
  5382. * @param {function | array | object} [listener] The event listener function(s)
  5383. * @param {object | boolean} [options] options object or useCapture flag for
  5384. * removeEventListener
  5385. * @return {Interactable} This Interactable
  5386. */
  5387. off(types, listener, options) {
  5388. return this._onOff('off', types, listener, options);
  5389. }
  5390. /**
  5391. * Reset the options of this Interactable
  5392. *
  5393. * @param {object} options The new settings to apply
  5394. * @return {object} This Interactable
  5395. */
  5396. set(options) {
  5397. const defaults = this._defaults;
  5398. if (!is.object(options)) {
  5399. options = {};
  5400. }
  5401. this.options = clone(defaults.base);
  5402. for (const actionName_ in this._actions.methodDict) {
  5403. const actionName = actionName_;
  5404. const methodName = this._actions.methodDict[actionName];
  5405. this.options[actionName] = {};
  5406. this.setPerAction(actionName, extend(extend({}, defaults.perAction), defaults.actions[actionName]));
  5407. this[methodName](options[actionName]);
  5408. }
  5409. for (const setting in options) {
  5410. if (is.func(this[setting])) {
  5411. this[setting](options[setting]);
  5412. }
  5413. }
  5414. return this;
  5415. }
  5416. /**
  5417. * Remove this interactable from the list of interactables and remove it's
  5418. * action capabilities and event listeners
  5419. */
  5420. unset() {
  5421. if (is.string(this.target)) {
  5422. // remove delegated events
  5423. for (const type in this._scopeEvents.delegatedEvents) {
  5424. const delegated = this._scopeEvents.delegatedEvents[type];
  5425. for (let i = delegated.length - 1; i >= 0; i--) {
  5426. const {
  5427. selector,
  5428. context,
  5429. listeners
  5430. } = delegated[i];
  5431. if (selector === this.target && context === this._context) {
  5432. delegated.splice(i, 1);
  5433. }
  5434. for (let l = listeners.length - 1; l >= 0; l--) {
  5435. this._scopeEvents.removeDelegate(this.target, this._context, type, listeners[l][0], listeners[l][1]);
  5436. }
  5437. }
  5438. }
  5439. } else {
  5440. this._scopeEvents.remove(this.target, 'all');
  5441. }
  5442. }
  5443. }
  5444. //# sourceMappingURL=Interactable.js.map
  5445. // CONCATENATED MODULE: ./node_modules/@interactjs/core/InteractableSet.js
  5446. class InteractableSet_InteractableSet {
  5447. // all set interactables
  5448. constructor(scope) {
  5449. this.list = [];
  5450. this.selectorMap = {};
  5451. this.scope = void 0;
  5452. this.scope = scope;
  5453. scope.addListeners({
  5454. 'interactable:unset': ({
  5455. interactable
  5456. }) => {
  5457. const {
  5458. target,
  5459. _context: context
  5460. } = interactable;
  5461. const targetMappings = is.string(target) ? this.selectorMap[target] : target[this.scope.id];
  5462. const targetIndex = findIndex(targetMappings, m => m.context === context);
  5463. if (targetMappings[targetIndex]) {
  5464. // Destroying mappingInfo's context and interactable
  5465. targetMappings[targetIndex].context = null;
  5466. targetMappings[targetIndex].interactable = null;
  5467. }
  5468. targetMappings.splice(targetIndex, 1);
  5469. }
  5470. });
  5471. }
  5472. new(target, options) {
  5473. options = extend(options || {}, {
  5474. actions: this.scope.actions
  5475. });
  5476. const interactable = new this.scope.Interactable(target, options, this.scope.document, this.scope.events);
  5477. const mappingInfo = {
  5478. context: interactable._context,
  5479. interactable
  5480. };
  5481. this.scope.addDocument(interactable._doc);
  5482. this.list.push(interactable);
  5483. if (is.string(target)) {
  5484. if (!this.selectorMap[target]) {
  5485. this.selectorMap[target] = [];
  5486. }
  5487. this.selectorMap[target].push(mappingInfo);
  5488. } else {
  5489. if (!interactable.target[this.scope.id]) {
  5490. Object.defineProperty(target, this.scope.id, {
  5491. value: [],
  5492. configurable: true
  5493. });
  5494. }
  5495. target[this.scope.id].push(mappingInfo);
  5496. }
  5497. this.scope.fire('interactable:new', {
  5498. target,
  5499. options,
  5500. interactable,
  5501. win: this.scope._win
  5502. });
  5503. return interactable;
  5504. }
  5505. get(target, options) {
  5506. const context = options && options.context || this.scope.document;
  5507. const isSelector = is.string(target);
  5508. const targetMappings = isSelector ? this.selectorMap[target] : target[this.scope.id];
  5509. if (!targetMappings) {
  5510. return null;
  5511. }
  5512. const found = find(targetMappings, m => m.context === context && (isSelector || m.interactable.inContext(target)));
  5513. return found && found.interactable;
  5514. }
  5515. forEachMatch(node, callback) {
  5516. for (const interactable of this.list) {
  5517. let ret;
  5518. if ((is.string(interactable.target) // target is a selector and the element matches
  5519. ? is.element(node) && matchesSelector(node, interactable.target) : // target is the element
  5520. node === interactable.target) && // the element is in context
  5521. interactable.inContext(node)) {
  5522. ret = callback(interactable);
  5523. }
  5524. if (ret !== undefined) {
  5525. return ret;
  5526. }
  5527. }
  5528. }
  5529. }
  5530. //# sourceMappingURL=InteractableSet.js.map
  5531. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/pointerExtend.js
  5532. function pointerExtend(dest, source) {
  5533. for (const prop in source) {
  5534. const prefixedPropREs = pointerExtend.prefixedPropREs;
  5535. let deprecated = false; // skip deprecated prefixed properties
  5536. for (const vendor in prefixedPropREs) {
  5537. if (prop.indexOf(vendor) === 0 && prefixedPropREs[vendor].test(prop)) {
  5538. deprecated = true;
  5539. break;
  5540. }
  5541. }
  5542. if (!deprecated && typeof source[prop] !== 'function') {
  5543. dest[prop] = source[prop];
  5544. }
  5545. }
  5546. return dest;
  5547. }
  5548. pointerExtend.prefixedPropREs = {
  5549. webkit: /(Movement[XY]|Radius[XY]|RotationAngle|Force)$/,
  5550. moz: /(Pressure)$/
  5551. };
  5552. /* harmony default export */ var utils_pointerExtend = (pointerExtend);
  5553. //# sourceMappingURL=pointerExtend.js.map
  5554. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/pointerUtils.js
  5555. function copyCoords(dest, src) {
  5556. dest.page = dest.page || {};
  5557. dest.page.x = src.page.x;
  5558. dest.page.y = src.page.y;
  5559. dest.client = dest.client || {};
  5560. dest.client.x = src.client.x;
  5561. dest.client.y = src.client.y;
  5562. dest.timeStamp = src.timeStamp;
  5563. }
  5564. function setCoordDeltas(targetObj, prev, cur) {
  5565. targetObj.page.x = cur.page.x - prev.page.x;
  5566. targetObj.page.y = cur.page.y - prev.page.y;
  5567. targetObj.client.x = cur.client.x - prev.client.x;
  5568. targetObj.client.y = cur.client.y - prev.client.y;
  5569. targetObj.timeStamp = cur.timeStamp - prev.timeStamp;
  5570. }
  5571. function setCoordVelocity(targetObj, delta) {
  5572. const dt = Math.max(delta.timeStamp / 1000, 0.001);
  5573. targetObj.page.x = delta.page.x / dt;
  5574. targetObj.page.y = delta.page.y / dt;
  5575. targetObj.client.x = delta.client.x / dt;
  5576. targetObj.client.y = delta.client.y / dt;
  5577. targetObj.timeStamp = dt;
  5578. }
  5579. function setZeroCoords(targetObj) {
  5580. targetObj.page.x = 0;
  5581. targetObj.page.y = 0;
  5582. targetObj.client.x = 0;
  5583. targetObj.client.y = 0;
  5584. }
  5585. function isNativePointer(pointer) {
  5586. return pointer instanceof utils_domObjects.Event || pointer instanceof utils_domObjects.Touch;
  5587. } // Get specified X/Y coords for mouse or event.touches[0]
  5588. function getXY(type, pointer, xy) {
  5589. xy = xy || {};
  5590. type = type || 'page';
  5591. xy.x = pointer[type + 'X'];
  5592. xy.y = pointer[type + 'Y'];
  5593. return xy;
  5594. }
  5595. function getPageXY(pointer, page) {
  5596. page = page || {
  5597. x: 0,
  5598. y: 0
  5599. }; // Opera Mobile handles the viewport and scrolling oddly
  5600. if (utils_browser.isOperaMobile && isNativePointer(pointer)) {
  5601. getXY('screen', pointer, page);
  5602. page.x += window.scrollX;
  5603. page.y += window.scrollY;
  5604. } else {
  5605. getXY('page', pointer, page);
  5606. }
  5607. return page;
  5608. }
  5609. function getClientXY(pointer, client) {
  5610. client = client || {};
  5611. if (utils_browser.isOperaMobile && isNativePointer(pointer)) {
  5612. // Opera Mobile handles the viewport and scrolling oddly
  5613. getXY('screen', pointer, client);
  5614. } else {
  5615. getXY('client', pointer, client);
  5616. }
  5617. return client;
  5618. }
  5619. function getPointerId(pointer) {
  5620. return is.number(pointer.pointerId) ? pointer.pointerId : pointer.identifier;
  5621. }
  5622. function setCoords(dest, pointers, timeStamp) {
  5623. const pointer = pointers.length > 1 ? pointerAverage(pointers) : pointers[0];
  5624. getPageXY(pointer, dest.page);
  5625. getClientXY(pointer, dest.client);
  5626. dest.timeStamp = timeStamp;
  5627. }
  5628. function getTouchPair(event) {
  5629. const touches = []; // array of touches is supplied
  5630. if (is.array(event)) {
  5631. touches[0] = event[0];
  5632. touches[1] = event[1];
  5633. } // an event
  5634. else {
  5635. if (event.type === 'touchend') {
  5636. if (event.touches.length === 1) {
  5637. touches[0] = event.touches[0];
  5638. touches[1] = event.changedTouches[0];
  5639. } else if (event.touches.length === 0) {
  5640. touches[0] = event.changedTouches[0];
  5641. touches[1] = event.changedTouches[1];
  5642. }
  5643. } else {
  5644. touches[0] = event.touches[0];
  5645. touches[1] = event.touches[1];
  5646. }
  5647. }
  5648. return touches;
  5649. }
  5650. function pointerAverage(pointers) {
  5651. const average = {
  5652. pageX: 0,
  5653. pageY: 0,
  5654. clientX: 0,
  5655. clientY: 0,
  5656. screenX: 0,
  5657. screenY: 0
  5658. };
  5659. for (const pointer of pointers) {
  5660. for (const prop in average) {
  5661. average[prop] += pointer[prop];
  5662. }
  5663. }
  5664. for (const prop in average) {
  5665. average[prop] /= pointers.length;
  5666. }
  5667. return average;
  5668. }
  5669. function touchBBox(event) {
  5670. if (!event.length) {
  5671. return null;
  5672. }
  5673. const touches = getTouchPair(event);
  5674. const minX = Math.min(touches[0].pageX, touches[1].pageX);
  5675. const minY = Math.min(touches[0].pageY, touches[1].pageY);
  5676. const maxX = Math.max(touches[0].pageX, touches[1].pageX);
  5677. const maxY = Math.max(touches[0].pageY, touches[1].pageY);
  5678. return {
  5679. x: minX,
  5680. y: minY,
  5681. left: minX,
  5682. top: minY,
  5683. right: maxX,
  5684. bottom: maxY,
  5685. width: maxX - minX,
  5686. height: maxY - minY
  5687. };
  5688. }
  5689. function touchDistance(event, deltaSource) {
  5690. const sourceX = deltaSource + 'X';
  5691. const sourceY = deltaSource + 'Y';
  5692. const touches = getTouchPair(event);
  5693. const dx = touches[0][sourceX] - touches[1][sourceX];
  5694. const dy = touches[0][sourceY] - touches[1][sourceY];
  5695. return hypot(dx, dy);
  5696. }
  5697. function touchAngle(event, deltaSource) {
  5698. const sourceX = deltaSource + 'X';
  5699. const sourceY = deltaSource + 'Y';
  5700. const touches = getTouchPair(event);
  5701. const dx = touches[1][sourceX] - touches[0][sourceX];
  5702. const dy = touches[1][sourceY] - touches[0][sourceY];
  5703. const angle = 180 * Math.atan2(dy, dx) / Math.PI;
  5704. return angle;
  5705. }
  5706. function getPointerType(pointer) {
  5707. 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
  5708. // be either a MouseEvent, TouchEvent, or Touch object
  5709. : /touch/.test(pointer.type) || pointer instanceof utils_domObjects.Touch ? 'touch' : 'mouse';
  5710. } // [ event.target, event.currentTarget ]
  5711. function getEventTargets(event) {
  5712. const path = is.func(event.composedPath) ? event.composedPath() : event.path;
  5713. return [getActualElement(path ? path[0] : event.target), getActualElement(event.currentTarget)];
  5714. }
  5715. function newCoords() {
  5716. return {
  5717. page: {
  5718. x: 0,
  5719. y: 0
  5720. },
  5721. client: {
  5722. x: 0,
  5723. y: 0
  5724. },
  5725. timeStamp: 0
  5726. };
  5727. }
  5728. function coordsToEvent(coords) {
  5729. const event = {
  5730. coords,
  5731. get page() {
  5732. return this.coords.page;
  5733. },
  5734. get client() {
  5735. return this.coords.client;
  5736. },
  5737. get timeStamp() {
  5738. return this.coords.timeStamp;
  5739. },
  5740. get pageX() {
  5741. return this.coords.page.x;
  5742. },
  5743. get pageY() {
  5744. return this.coords.page.y;
  5745. },
  5746. get clientX() {
  5747. return this.coords.client.x;
  5748. },
  5749. get clientY() {
  5750. return this.coords.client.y;
  5751. },
  5752. get pointerId() {
  5753. return this.coords.pointerId;
  5754. },
  5755. get target() {
  5756. return this.coords.target;
  5757. },
  5758. get type() {
  5759. return this.coords.type;
  5760. },
  5761. get pointerType() {
  5762. return this.coords.pointerType;
  5763. },
  5764. get buttons() {
  5765. return this.coords.buttons;
  5766. },
  5767. preventDefault() {}
  5768. };
  5769. return event;
  5770. }
  5771. //# sourceMappingURL=pointerUtils.js.map
  5772. // CONCATENATED MODULE: ./node_modules/@interactjs/core/events.js
  5773. function events_install(scope) {
  5774. const targets = [];
  5775. const delegatedEvents = {};
  5776. const documents = [];
  5777. const eventsMethods = {
  5778. add,
  5779. remove,
  5780. addDelegate,
  5781. removeDelegate,
  5782. delegateListener,
  5783. delegateUseCapture,
  5784. delegatedEvents,
  5785. documents,
  5786. targets,
  5787. supportsOptions: false,
  5788. supportsPassive: false
  5789. }; // check if browser supports passive events and options arg
  5790. scope.document.createElement('div').addEventListener('test', null, {
  5791. get capture() {
  5792. return eventsMethods.supportsOptions = true;
  5793. },
  5794. get passive() {
  5795. return eventsMethods.supportsPassive = true;
  5796. }
  5797. });
  5798. scope.events = eventsMethods;
  5799. function add(eventTarget, type, listener, optionalArg) {
  5800. const options = getOptions(optionalArg);
  5801. let target = find(targets, t => t.eventTarget === eventTarget);
  5802. if (!target) {
  5803. target = {
  5804. eventTarget,
  5805. events: {}
  5806. };
  5807. targets.push(target);
  5808. }
  5809. if (!target.events[type]) {
  5810. target.events[type] = [];
  5811. }
  5812. if (eventTarget.addEventListener && !contains(target.events[type], listener)) {
  5813. eventTarget.addEventListener(type, listener, eventsMethods.supportsOptions ? options : options.capture);
  5814. target.events[type].push(listener);
  5815. }
  5816. }
  5817. function remove(eventTarget, type, listener, optionalArg) {
  5818. const options = getOptions(optionalArg);
  5819. const targetIndex = findIndex(targets, t => t.eventTarget === eventTarget);
  5820. const target = targets[targetIndex];
  5821. if (!target || !target.events) {
  5822. return;
  5823. }
  5824. if (type === 'all') {
  5825. for (type in target.events) {
  5826. if (target.events.hasOwnProperty(type)) {
  5827. remove(eventTarget, type, 'all');
  5828. }
  5829. }
  5830. return;
  5831. }
  5832. let typeIsEmpty = false;
  5833. const typeListeners = target.events[type];
  5834. if (typeListeners) {
  5835. if (listener === 'all') {
  5836. for (let i = typeListeners.length - 1; i >= 0; i--) {
  5837. remove(eventTarget, type, typeListeners[i], options);
  5838. }
  5839. return;
  5840. } else {
  5841. for (let i = 0; i < typeListeners.length; i++) {
  5842. if (typeListeners[i] === listener) {
  5843. eventTarget.removeEventListener(type, listener, eventsMethods.supportsOptions ? options : options.capture);
  5844. typeListeners.splice(i, 1);
  5845. if (typeListeners.length === 0) {
  5846. delete target.events[type];
  5847. typeIsEmpty = true;
  5848. }
  5849. break;
  5850. }
  5851. }
  5852. }
  5853. }
  5854. if (typeIsEmpty && !Object.keys(target.events).length) {
  5855. targets.splice(targetIndex, 1);
  5856. }
  5857. }
  5858. function addDelegate(selector, context, type, listener, optionalArg) {
  5859. const options = getOptions(optionalArg);
  5860. if (!delegatedEvents[type]) {
  5861. delegatedEvents[type] = []; // add delegate listener functions
  5862. for (const doc of documents) {
  5863. add(doc, type, delegateListener);
  5864. add(doc, type, delegateUseCapture, true);
  5865. }
  5866. }
  5867. const delegates = delegatedEvents[type];
  5868. let delegate = find(delegates, d => d.selector === selector && d.context === context);
  5869. if (!delegate) {
  5870. delegate = {
  5871. selector,
  5872. context,
  5873. listeners: []
  5874. };
  5875. delegates.push(delegate);
  5876. }
  5877. delegate.listeners.push([listener, options]);
  5878. }
  5879. function removeDelegate(selector, context, type, listener, optionalArg) {
  5880. const options = getOptions(optionalArg);
  5881. const delegates = delegatedEvents[type];
  5882. let matchFound = false;
  5883. let index;
  5884. if (!delegates) {
  5885. return;
  5886. } // count from last index of delegated to 0
  5887. for (index = delegates.length - 1; index >= 0; index--) {
  5888. const cur = delegates[index]; // look for matching selector and context Node
  5889. if (cur.selector === selector && cur.context === context) {
  5890. const {
  5891. listeners
  5892. } = cur; // each item of the listeners array is an array: [function, capture, passive]
  5893. for (let i = listeners.length - 1; i >= 0; i--) {
  5894. const [fn, {
  5895. capture,
  5896. passive
  5897. }] = listeners[i]; // check if the listener functions and capture and passive flags match
  5898. if (fn === listener && capture === options.capture && passive === options.passive) {
  5899. // remove the listener from the array of listeners
  5900. listeners.splice(i, 1); // if all listeners for this target have been removed
  5901. // remove the target from the delegates array
  5902. if (!listeners.length) {
  5903. delegates.splice(index, 1); // remove delegate function from context
  5904. remove(context, type, delegateListener);
  5905. remove(context, type, delegateUseCapture, true);
  5906. } // only remove one listener
  5907. matchFound = true;
  5908. break;
  5909. }
  5910. }
  5911. if (matchFound) {
  5912. break;
  5913. }
  5914. }
  5915. }
  5916. } // bound to the interactable context when a DOM event
  5917. // listener is added to a selector interactable
  5918. function delegateListener(event, optionalArg) {
  5919. const options = getOptions(optionalArg);
  5920. const fakeEvent = new events_FakeEvent(event);
  5921. const delegates = delegatedEvents[event.type];
  5922. const [eventTarget] = getEventTargets(event);
  5923. let element = eventTarget; // climb up document tree looking for selector matches
  5924. while (is.element(element)) {
  5925. for (let i = 0; i < delegates.length; i++) {
  5926. const cur = delegates[i];
  5927. const {
  5928. selector,
  5929. context
  5930. } = cur;
  5931. if (matchesSelector(element, selector) && nodeContains(context, eventTarget) && nodeContains(context, element)) {
  5932. const {
  5933. listeners
  5934. } = cur;
  5935. fakeEvent.currentTarget = element;
  5936. for (const [fn, {
  5937. capture,
  5938. passive
  5939. }] of listeners) {
  5940. if (capture === options.capture && passive === options.passive) {
  5941. fn(fakeEvent);
  5942. }
  5943. }
  5944. }
  5945. }
  5946. element = parentNode(element);
  5947. }
  5948. }
  5949. function delegateUseCapture(event) {
  5950. return delegateListener.call(this, event, true);
  5951. } // for type inferrence
  5952. return eventsMethods;
  5953. }
  5954. class events_FakeEvent {
  5955. constructor(originalEvent) {
  5956. this.currentTarget = void 0;
  5957. this.originalEvent = void 0;
  5958. this.type = void 0;
  5959. this.originalEvent = originalEvent; // duplicate the event so that currentTarget can be changed
  5960. utils_pointerExtend(this, originalEvent);
  5961. }
  5962. preventOriginalDefault() {
  5963. this.originalEvent.preventDefault();
  5964. }
  5965. stopPropagation() {
  5966. this.originalEvent.stopPropagation();
  5967. }
  5968. stopImmediatePropagation() {
  5969. this.originalEvent.stopImmediatePropagation();
  5970. }
  5971. }
  5972. function getOptions(param) {
  5973. if (!is.object(param)) {
  5974. return {
  5975. capture: !!param,
  5976. passive: false
  5977. };
  5978. }
  5979. const options = extend({}, param);
  5980. options.capture = !!param.capture;
  5981. options.passive = !!param.passive;
  5982. return options;
  5983. }
  5984. /* harmony default export */ var events = ({
  5985. id: 'events',
  5986. install: events_install
  5987. });
  5988. //# sourceMappingURL=events.js.map
  5989. // CONCATENATED MODULE: ./node_modules/@interactjs/utils/misc.js
  5990. function warnOnce(method, message) {
  5991. let warned = false;
  5992. return function () {
  5993. if (!warned) {
  5994. win.console.warn(message);
  5995. warned = true;
  5996. }
  5997. return method.apply(this, arguments);
  5998. };
  5999. }
  6000. function copyAction(dest, src) {
  6001. dest.name = src.name;
  6002. dest.axis = src.axis;
  6003. dest.edges = src.edges;
  6004. return dest;
  6005. }
  6006. //# sourceMappingURL=misc.js.map
  6007. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactStatic.js
  6008. /** @module interact */
  6009. function createInteractStatic(scope) {
  6010. /**
  6011. * ```js
  6012. * interact('#draggable').draggable(true)
  6013. *
  6014. * var rectables = interact('rect')
  6015. * rectables
  6016. * .gesturable(true)
  6017. * .on('gesturemove', function (event) {
  6018. * // ...
  6019. * })
  6020. * ```
  6021. *
  6022. * The methods of this variable can be used to set elements as interactables
  6023. * and also to change various default settings.
  6024. *
  6025. * Calling it as a function and passing an element or a valid CSS selector
  6026. * string returns an Interactable object which has various methods to configure
  6027. * it.
  6028. *
  6029. * @global
  6030. *
  6031. * @param {Element | string} target The HTML or SVG Element to interact with
  6032. * or CSS selector
  6033. * @return {Interactable}
  6034. */
  6035. const interact = (target, options) => {
  6036. let interactable = scope.interactables.get(target, options);
  6037. if (!interactable) {
  6038. interactable = scope.interactables.new(target, options);
  6039. interactable.events.global = interact.globalEvents;
  6040. }
  6041. return interactable;
  6042. }; // expose the functions used to calculate multi-touch properties
  6043. interact.getPointerAverage = pointerAverage;
  6044. interact.getTouchBBox = touchBBox;
  6045. interact.getTouchDistance = touchDistance;
  6046. interact.getTouchAngle = touchAngle;
  6047. interact.getElementRect = getElementRect;
  6048. interact.getElementClientRect = getElementClientRect;
  6049. interact.matchesSelector = matchesSelector;
  6050. interact.closest = domUtils_closest;
  6051. interact.globalEvents = {}; // eslint-disable-next-line no-undef
  6052. interact.version = "1.10.2";
  6053. interact.scope = scope;
  6054. /**
  6055. * Use a plugin
  6056. *
  6057. * @alias module:interact.use
  6058. *
  6059. */
  6060. interact.use = function (plugin, options) {
  6061. this.scope.usePlugin(plugin, options);
  6062. return this;
  6063. };
  6064. /**
  6065. * Check if an element or selector has been set with the {@link interact}
  6066. * function
  6067. *
  6068. * @alias module:interact.isSet
  6069. *
  6070. * @param {Target} target The Element or string being searched for
  6071. * @param {object} options
  6072. * @return {boolean} Indicates if the element or CSS selector was previously
  6073. * passed to interact
  6074. */
  6075. interact.isSet = function (target, options) {
  6076. return !!this.scope.interactables.get(target, options && options.context);
  6077. };
  6078. /**
  6079. * @deprecated
  6080. * Add a global listener for an InteractEvent or adds a DOM event to `document`
  6081. *
  6082. * @alias module:interact.on
  6083. *
  6084. * @param {string | array | object} type The types of events to listen for
  6085. * @param {function} listener The function event (s)
  6086. * @param {object | boolean} [options] object or useCapture flag for
  6087. * addEventListener
  6088. * @return {object} interact
  6089. */
  6090. interact.on = warnOnce(function on(type, listener, options) {
  6091. if (is.string(type) && type.search(' ') !== -1) {
  6092. type = type.trim().split(/ +/);
  6093. }
  6094. if (is.array(type)) {
  6095. for (const eventType of type) {
  6096. this.on(eventType, listener, options);
  6097. }
  6098. return this;
  6099. }
  6100. if (is.object(type)) {
  6101. for (const prop in type) {
  6102. this.on(prop, type[prop], listener);
  6103. }
  6104. return this;
  6105. } // if it is an InteractEvent type, add listener to globalEvents
  6106. if (isNonNativeEvent(type, this.scope.actions)) {
  6107. // if this type of event was never bound
  6108. if (!this.globalEvents[type]) {
  6109. this.globalEvents[type] = [listener];
  6110. } else {
  6111. this.globalEvents[type].push(listener);
  6112. }
  6113. } // If non InteractEvent type, addEventListener to document
  6114. else {
  6115. this.scope.events.add(this.scope.document, type, listener, {
  6116. options
  6117. });
  6118. }
  6119. return this;
  6120. }, 'The interact.on() method is being deprecated');
  6121. /**
  6122. * @deprecated
  6123. * Removes a global InteractEvent listener or DOM event from `document`
  6124. *
  6125. * @alias module:interact.off
  6126. *
  6127. * @param {string | array | object} type The types of events that were listened
  6128. * for
  6129. * @param {function} listener The listener function to be removed
  6130. * @param {object | boolean} options [options] object or useCapture flag for
  6131. * removeEventListener
  6132. * @return {object} interact
  6133. */
  6134. interact.off = warnOnce(function off(type, listener, options) {
  6135. if (is.string(type) && type.search(' ') !== -1) {
  6136. type = type.trim().split(/ +/);
  6137. }
  6138. if (is.array(type)) {
  6139. for (const eventType of type) {
  6140. this.off(eventType, listener, options);
  6141. }
  6142. return this;
  6143. }
  6144. if (is.object(type)) {
  6145. for (const prop in type) {
  6146. this.off(prop, type[prop], listener);
  6147. }
  6148. return this;
  6149. }
  6150. if (isNonNativeEvent(type, this.scope.actions)) {
  6151. let index;
  6152. if (type in this.globalEvents && (index = this.globalEvents[type].indexOf(listener)) !== -1) {
  6153. this.globalEvents[type].splice(index, 1);
  6154. }
  6155. } else {
  6156. this.scope.events.remove(this.scope.document, type, listener, options);
  6157. }
  6158. return this;
  6159. }, 'The interact.off() method is being deprecated');
  6160. interact.debug = function () {
  6161. return this.scope;
  6162. };
  6163. /**
  6164. * @alias module:interact.supportsTouch
  6165. *
  6166. * @return {boolean} Whether or not the browser supports touch input
  6167. */
  6168. interact.supportsTouch = function () {
  6169. return utils_browser.supportsTouch;
  6170. };
  6171. /**
  6172. * @alias module:interact.supportsPointerEvent
  6173. *
  6174. * @return {boolean} Whether or not the browser supports PointerEvents
  6175. */
  6176. interact.supportsPointerEvent = function () {
  6177. return utils_browser.supportsPointerEvent;
  6178. };
  6179. /**
  6180. * Cancels all interactions (end events are not fired)
  6181. *
  6182. * @alias module:interact.stop
  6183. *
  6184. * @return {object} interact
  6185. */
  6186. interact.stop = function () {
  6187. for (const interaction of this.scope.interactions.list) {
  6188. interaction.stop();
  6189. }
  6190. return this;
  6191. };
  6192. /**
  6193. * Returns or sets the distance the pointer must be moved before an action
  6194. * sequence occurs. This also affects tolerance for tap events.
  6195. *
  6196. * @alias module:interact.pointerMoveTolerance
  6197. *
  6198. * @param {number} [newValue] The movement from the start position must be greater than this value
  6199. * @return {interact | number}
  6200. */
  6201. interact.pointerMoveTolerance = function (newValue) {
  6202. if (is.number(newValue)) {
  6203. this.scope.interactions.pointerMoveTolerance = newValue;
  6204. return this;
  6205. }
  6206. return this.scope.interactions.pointerMoveTolerance;
  6207. };
  6208. interact.addDocument = function (doc, options) {
  6209. this.scope.addDocument(doc, options);
  6210. };
  6211. interact.removeDocument = function (doc) {
  6212. this.scope.removeDocument(doc);
  6213. };
  6214. return interact;
  6215. }
  6216. //# sourceMappingURL=interactStatic.js.map
  6217. // CONCATENATED MODULE: ./node_modules/@interactjs/core/PointerInfo.js
  6218. class PointerInfo {
  6219. constructor(id, pointer, event, downTime, downTarget) {
  6220. this.id = void 0;
  6221. this.pointer = void 0;
  6222. this.event = void 0;
  6223. this.downTime = void 0;
  6224. this.downTarget = void 0;
  6225. this.id = id;
  6226. this.pointer = pointer;
  6227. this.event = event;
  6228. this.downTime = downTime;
  6229. this.downTarget = downTarget;
  6230. }
  6231. }
  6232. //# sourceMappingURL=PointerInfo.js.map
  6233. // CONCATENATED MODULE: ./node_modules/@interactjs/core/Interaction.js
  6234. let _ProxyValues;
  6235. (function (_ProxyValues) {
  6236. _ProxyValues["interactable"] = "";
  6237. _ProxyValues["element"] = "";
  6238. _ProxyValues["prepared"] = "";
  6239. _ProxyValues["pointerIsDown"] = "";
  6240. _ProxyValues["pointerWasMoved"] = "";
  6241. _ProxyValues["_proxy"] = "";
  6242. })(_ProxyValues || (_ProxyValues = {}));
  6243. let _ProxyMethods;
  6244. (function (_ProxyMethods) {
  6245. _ProxyMethods["start"] = "";
  6246. _ProxyMethods["move"] = "";
  6247. _ProxyMethods["end"] = "";
  6248. _ProxyMethods["stop"] = "";
  6249. _ProxyMethods["interacting"] = "";
  6250. })(_ProxyMethods || (_ProxyMethods = {}));
  6251. let idCounter = 0;
  6252. class Interaction_Interaction {
  6253. // current interactable being interacted with
  6254. // the target element of the interactable
  6255. // action that's ready to be fired on next move event
  6256. // keep track of added pointers
  6257. // pointerdown/mousedown/touchstart event
  6258. // previous action event
  6259. /** @internal */
  6260. get pointerMoveTolerance() {
  6261. return 1;
  6262. }
  6263. /**
  6264. * @alias Interaction.prototype.move
  6265. */
  6266. /** */
  6267. constructor({
  6268. pointerType,
  6269. scopeFire
  6270. }) {
  6271. this.interactable = null;
  6272. this.element = null;
  6273. this.rect = void 0;
  6274. this._rects = void 0;
  6275. this.edges = void 0;
  6276. this._scopeFire = void 0;
  6277. this.prepared = {
  6278. name: null,
  6279. axis: null,
  6280. edges: null
  6281. };
  6282. this.pointerType = void 0;
  6283. this.pointers = [];
  6284. this.downEvent = null;
  6285. this.downPointer = {};
  6286. this._latestPointer = {
  6287. pointer: null,
  6288. event: null,
  6289. eventTarget: null
  6290. };
  6291. this.prevEvent = null;
  6292. this.pointerIsDown = false;
  6293. this.pointerWasMoved = false;
  6294. this._interacting = false;
  6295. this._ending = false;
  6296. this._stopped = true;
  6297. this._proxy = null;
  6298. this.simulation = null;
  6299. this.doMove = warnOnce(function (signalArg) {
  6300. this.move(signalArg);
  6301. }, 'The interaction.doMove() method has been renamed to interaction.move()');
  6302. this.coords = {
  6303. // Starting InteractEvent pointer coordinates
  6304. start: newCoords(),
  6305. // Previous native pointer move event coordinates
  6306. prev: newCoords(),
  6307. // current native pointer move event coordinates
  6308. cur: newCoords(),
  6309. // Change in coordinates and time of the pointer
  6310. delta: newCoords(),
  6311. // pointer velocity
  6312. velocity: newCoords()
  6313. };
  6314. this._id = idCounter++;
  6315. this._scopeFire = scopeFire;
  6316. this.pointerType = pointerType;
  6317. const that = this;
  6318. this._proxy = {};
  6319. for (const key in _ProxyValues) {
  6320. Object.defineProperty(this._proxy, key, {
  6321. get() {
  6322. return that[key];
  6323. }
  6324. });
  6325. }
  6326. for (const key in _ProxyMethods) {
  6327. Object.defineProperty(this._proxy, key, {
  6328. value: (...args) => that[key](...args)
  6329. });
  6330. }
  6331. this._scopeFire('interactions:new', {
  6332. interaction: this
  6333. });
  6334. }
  6335. pointerDown(pointer, event, eventTarget) {
  6336. const pointerIndex = this.updatePointer(pointer, event, eventTarget, true);
  6337. const pointerInfo = this.pointers[pointerIndex];
  6338. this._scopeFire('interactions:down', {
  6339. pointer,
  6340. event,
  6341. eventTarget,
  6342. pointerIndex,
  6343. pointerInfo,
  6344. type: 'down',
  6345. interaction: this
  6346. });
  6347. }
  6348. /**
  6349. * ```js
  6350. * interact(target)
  6351. * .draggable({
  6352. * // disable the default drag start by down->move
  6353. * manualStart: true
  6354. * })
  6355. * // start dragging after the user holds the pointer down
  6356. * .on('hold', function (event) {
  6357. * var interaction = event.interaction
  6358. *
  6359. * if (!interaction.interacting()) {
  6360. * interaction.start({ name: 'drag' },
  6361. * event.interactable,
  6362. * event.currentTarget)
  6363. * }
  6364. * })
  6365. * ```
  6366. *
  6367. * Start an action with the given Interactable and Element as tartgets. The
  6368. * action must be enabled for the target Interactable and an appropriate
  6369. * number of pointers must be held down - 1 for drag/resize, 2 for gesture.
  6370. *
  6371. * Use it with `interactable.<action>able({ manualStart: false })` to always
  6372. * [start actions manually](https://github.com/taye/interact.js/issues/114)
  6373. *
  6374. * @param {object} action The action to be performed - drag, resize, etc.
  6375. * @param {Interactable} target The Interactable to target
  6376. * @param {Element} element The DOM Element to target
  6377. * @return {Boolean} Whether the interaction was successfully started
  6378. */
  6379. start(action, interactable, element) {
  6380. if (this.interacting() || !this.pointerIsDown || this.pointers.length < (action.name === 'gesture' ? 2 : 1) || !interactable.options[action.name].enabled) {
  6381. return false;
  6382. }
  6383. copyAction(this.prepared, action);
  6384. this.interactable = interactable;
  6385. this.element = element;
  6386. this.rect = interactable.getRect(element);
  6387. this.edges = this.prepared.edges ? extend({}, this.prepared.edges) : {
  6388. left: true,
  6389. right: true,
  6390. top: true,
  6391. bottom: true
  6392. };
  6393. this._stopped = false;
  6394. this._interacting = this._doPhase({
  6395. interaction: this,
  6396. event: this.downEvent,
  6397. phase: 'start'
  6398. }) && !this._stopped;
  6399. return this._interacting;
  6400. }
  6401. pointerMove(pointer, event, eventTarget) {
  6402. if (!this.simulation && !(this.modification && this.modification.endResult)) {
  6403. this.updatePointer(pointer, event, eventTarget, false);
  6404. }
  6405. 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;
  6406. let dx;
  6407. let dy; // register movement greater than pointerMoveTolerance
  6408. if (this.pointerIsDown && !this.pointerWasMoved) {
  6409. dx = this.coords.cur.client.x - this.coords.start.client.x;
  6410. dy = this.coords.cur.client.y - this.coords.start.client.y;
  6411. this.pointerWasMoved = hypot(dx, dy) > this.pointerMoveTolerance;
  6412. }
  6413. const pointerIndex = this.getPointerIndex(pointer);
  6414. const signalArg = {
  6415. pointer,
  6416. pointerIndex,
  6417. pointerInfo: this.pointers[pointerIndex],
  6418. event,
  6419. type: 'move',
  6420. eventTarget,
  6421. dx,
  6422. dy,
  6423. duplicate: duplicateMove,
  6424. interaction: this
  6425. };
  6426. if (!duplicateMove) {
  6427. // set pointer coordinate, time changes and velocity
  6428. setCoordVelocity(this.coords.velocity, this.coords.delta);
  6429. }
  6430. this._scopeFire('interactions:move', signalArg);
  6431. if (!duplicateMove && !this.simulation) {
  6432. // if interacting, fire an 'action-move' signal etc
  6433. if (this.interacting()) {
  6434. signalArg.type = null;
  6435. this.move(signalArg);
  6436. }
  6437. if (this.pointerWasMoved) {
  6438. copyCoords(this.coords.prev, this.coords.cur);
  6439. }
  6440. }
  6441. }
  6442. /**
  6443. * ```js
  6444. * interact(target)
  6445. * .draggable(true)
  6446. * .on('dragmove', function (event) {
  6447. * if (someCondition) {
  6448. * // change the snap settings
  6449. * event.interactable.draggable({ snap: { targets: [] }})
  6450. * // fire another move event with re-calculated snap
  6451. * event.interaction.move()
  6452. * }
  6453. * })
  6454. * ```
  6455. *
  6456. * Force a move of the current action at the same coordinates. Useful if
  6457. * snap/restrict has been changed and you want a movement with the new
  6458. * settings.
  6459. */
  6460. move(signalArg) {
  6461. if (!signalArg || !signalArg.event) {
  6462. setZeroCoords(this.coords.delta);
  6463. }
  6464. signalArg = extend({
  6465. pointer: this._latestPointer.pointer,
  6466. event: this._latestPointer.event,
  6467. eventTarget: this._latestPointer.eventTarget,
  6468. interaction: this
  6469. }, signalArg || {});
  6470. signalArg.phase = 'move';
  6471. this._doPhase(signalArg);
  6472. } // End interact move events and stop auto-scroll unless simulation is running
  6473. pointerUp(pointer, event, eventTarget, curEventTarget) {
  6474. let pointerIndex = this.getPointerIndex(pointer);
  6475. if (pointerIndex === -1) {
  6476. pointerIndex = this.updatePointer(pointer, event, eventTarget, false);
  6477. }
  6478. const type = /cancel$/i.test(event.type) ? 'cancel' : 'up';
  6479. this._scopeFire(`interactions:${type}`, {
  6480. pointer,
  6481. pointerIndex,
  6482. pointerInfo: this.pointers[pointerIndex],
  6483. event,
  6484. eventTarget,
  6485. type: type,
  6486. curEventTarget,
  6487. interaction: this
  6488. });
  6489. if (!this.simulation) {
  6490. this.end(event);
  6491. }
  6492. this.removePointer(pointer, event);
  6493. }
  6494. documentBlur(event) {
  6495. this.end(event);
  6496. this._scopeFire('interactions:blur', {
  6497. event,
  6498. type: 'blur',
  6499. interaction: this
  6500. });
  6501. }
  6502. /**
  6503. * ```js
  6504. * interact(target)
  6505. * .draggable(true)
  6506. * .on('move', function (event) {
  6507. * if (event.pageX > 1000) {
  6508. * // end the current action
  6509. * event.interaction.end()
  6510. * // stop all further listeners from being called
  6511. * event.stopImmediatePropagation()
  6512. * }
  6513. * })
  6514. * ```
  6515. *
  6516. * @param {PointerEvent} [event]
  6517. */
  6518. end(event) {
  6519. this._ending = true;
  6520. event = event || this._latestPointer.event;
  6521. let endPhaseResult;
  6522. if (this.interacting()) {
  6523. endPhaseResult = this._doPhase({
  6524. event,
  6525. interaction: this,
  6526. phase: 'end'
  6527. });
  6528. }
  6529. this._ending = false;
  6530. if (endPhaseResult === true) {
  6531. this.stop();
  6532. }
  6533. }
  6534. currentAction() {
  6535. return this._interacting ? this.prepared.name : null;
  6536. }
  6537. interacting() {
  6538. return this._interacting;
  6539. }
  6540. /** */
  6541. stop() {
  6542. this._scopeFire('interactions:stop', {
  6543. interaction: this
  6544. });
  6545. this.interactable = this.element = null;
  6546. this._interacting = false;
  6547. this._stopped = true;
  6548. this.prepared.name = this.prevEvent = null;
  6549. }
  6550. getPointerIndex(pointer) {
  6551. const pointerId = getPointerId(pointer); // mouse and pen interactions may have only one pointer
  6552. return this.pointerType === 'mouse' || this.pointerType === 'pen' ? this.pointers.length - 1 : findIndex(this.pointers, curPointer => curPointer.id === pointerId);
  6553. }
  6554. getPointerInfo(pointer) {
  6555. return this.pointers[this.getPointerIndex(pointer)];
  6556. }
  6557. updatePointer(pointer, event, eventTarget, down) {
  6558. const id = getPointerId(pointer);
  6559. let pointerIndex = this.getPointerIndex(pointer);
  6560. let pointerInfo = this.pointers[pointerIndex];
  6561. down = down === false ? false : down || /(down|start)$/i.test(event.type);
  6562. if (!pointerInfo) {
  6563. pointerInfo = new PointerInfo(id, pointer, event, null, null);
  6564. pointerIndex = this.pointers.length;
  6565. this.pointers.push(pointerInfo);
  6566. } else {
  6567. pointerInfo.pointer = pointer;
  6568. }
  6569. setCoords(this.coords.cur, this.pointers.map(p => p.pointer), this._now());
  6570. setCoordDeltas(this.coords.delta, this.coords.prev, this.coords.cur);
  6571. if (down) {
  6572. this.pointerIsDown = true;
  6573. pointerInfo.downTime = this.coords.cur.timeStamp;
  6574. pointerInfo.downTarget = eventTarget;
  6575. utils_pointerExtend(this.downPointer, pointer);
  6576. if (!this.interacting()) {
  6577. copyCoords(this.coords.start, this.coords.cur);
  6578. copyCoords(this.coords.prev, this.coords.cur);
  6579. this.downEvent = event;
  6580. this.pointerWasMoved = false;
  6581. }
  6582. }
  6583. this._updateLatestPointer(pointer, event, eventTarget);
  6584. this._scopeFire('interactions:update-pointer', {
  6585. pointer,
  6586. event,
  6587. eventTarget,
  6588. down,
  6589. pointerInfo,
  6590. pointerIndex,
  6591. interaction: this
  6592. });
  6593. return pointerIndex;
  6594. }
  6595. removePointer(pointer, event) {
  6596. const pointerIndex = this.getPointerIndex(pointer);
  6597. if (pointerIndex === -1) {
  6598. return;
  6599. }
  6600. const pointerInfo = this.pointers[pointerIndex];
  6601. this._scopeFire('interactions:remove-pointer', {
  6602. pointer,
  6603. event,
  6604. eventTarget: null,
  6605. pointerIndex,
  6606. pointerInfo,
  6607. interaction: this
  6608. });
  6609. this.pointers.splice(pointerIndex, 1);
  6610. this.pointerIsDown = false;
  6611. }
  6612. _updateLatestPointer(pointer, event, eventTarget) {
  6613. this._latestPointer.pointer = pointer;
  6614. this._latestPointer.event = event;
  6615. this._latestPointer.eventTarget = eventTarget;
  6616. }
  6617. destroy() {
  6618. this._latestPointer.pointer = null;
  6619. this._latestPointer.event = null;
  6620. this._latestPointer.eventTarget = null;
  6621. }
  6622. _createPreparedEvent(event, phase, preEnd, type) {
  6623. return new InteractEvent_InteractEvent(this, event, this.prepared.name, phase, this.element, preEnd, type);
  6624. }
  6625. _fireEvent(iEvent) {
  6626. this.interactable.fire(iEvent);
  6627. if (!this.prevEvent || iEvent.timeStamp >= this.prevEvent.timeStamp) {
  6628. this.prevEvent = iEvent;
  6629. }
  6630. }
  6631. _doPhase(signalArg) {
  6632. const {
  6633. event,
  6634. phase,
  6635. preEnd,
  6636. type
  6637. } = signalArg;
  6638. const {
  6639. rect
  6640. } = this;
  6641. if (rect && phase === 'move') {
  6642. // update the rect changes due to pointer move
  6643. addEdges(this.edges, rect, this.coords.delta[this.interactable.options.deltaSource]);
  6644. rect.width = rect.right - rect.left;
  6645. rect.height = rect.bottom - rect.top;
  6646. }
  6647. const beforeResult = this._scopeFire(`interactions:before-action-${phase}`, signalArg);
  6648. if (beforeResult === false) {
  6649. return false;
  6650. }
  6651. const iEvent = signalArg.iEvent = this._createPreparedEvent(event, phase, preEnd, type);
  6652. this._scopeFire(`interactions:action-${phase}`, signalArg);
  6653. if (phase === 'start') {
  6654. this.prevEvent = iEvent;
  6655. }
  6656. this._fireEvent(iEvent);
  6657. this._scopeFire(`interactions:after-action-${phase}`, signalArg);
  6658. return true;
  6659. }
  6660. _now() {
  6661. return Date.now();
  6662. }
  6663. }
  6664. /* harmony default export */ var core_Interaction = (Interaction_Interaction);
  6665. //# sourceMappingURL=Interaction.js.map
  6666. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactablePreventDefault.js
  6667. function preventDefault(newValue) {
  6668. if (/^(always|never|auto)$/.test(newValue)) {
  6669. this.options.preventDefault = newValue;
  6670. return this;
  6671. }
  6672. if (is.bool(newValue)) {
  6673. this.options.preventDefault = newValue ? 'always' : 'never';
  6674. return this;
  6675. }
  6676. return this.options.preventDefault;
  6677. }
  6678. function checkAndPreventDefault(interactable, scope, event) {
  6679. const setting = interactable.options.preventDefault;
  6680. if (setting === 'never') {
  6681. return;
  6682. }
  6683. if (setting === 'always') {
  6684. event.preventDefault();
  6685. return;
  6686. } // setting === 'auto'
  6687. // if the browser supports passive event listeners and isn't running on iOS,
  6688. // don't preventDefault of touch{start,move} events. CSS touch-action and
  6689. // user-select should be used instead of calling event.preventDefault().
  6690. if (scope.events.supportsPassive && /^touch(start|move)$/.test(event.type)) {
  6691. const doc = getWindow(event.target).document;
  6692. const docOptions = scope.getDocOptions(doc);
  6693. if (!(docOptions && docOptions.events) || docOptions.events.passive !== false) {
  6694. return;
  6695. }
  6696. } // don't preventDefault of pointerdown events
  6697. if (/^(mouse|pointer|touch)*(down|start)/i.test(event.type)) {
  6698. return;
  6699. } // don't preventDefault on editable elements
  6700. if (is.element(event.target) && matchesSelector(event.target, 'input,select,textarea,[contenteditable=true],[contenteditable=true] *')) {
  6701. return;
  6702. }
  6703. event.preventDefault();
  6704. }
  6705. function onInteractionEvent({
  6706. interaction,
  6707. event
  6708. }) {
  6709. if (interaction.interactable) {
  6710. interaction.interactable.checkAndPreventDefault(event);
  6711. }
  6712. }
  6713. function interactablePreventDefault_install(scope) {
  6714. /** @lends Interactable */
  6715. const {
  6716. Interactable
  6717. } = scope;
  6718. /**
  6719. * Returns or sets whether to prevent the browser's default behaviour in
  6720. * response to pointer events. Can be set to:
  6721. * - `'always'` to always prevent
  6722. * - `'never'` to never prevent
  6723. * - `'auto'` to let interact.js try to determine what would be best
  6724. *
  6725. * @param {string} [newValue] `'always'`, `'never'` or `'auto'`
  6726. * @return {string | Interactable} The current setting or this Interactable
  6727. */
  6728. Interactable.prototype.preventDefault = preventDefault;
  6729. Interactable.prototype.checkAndPreventDefault = function (event) {
  6730. return checkAndPreventDefault(this, scope, event);
  6731. }; // prevent native HTML5 drag on interact.js target elements
  6732. scope.interactions.docEvents.push({
  6733. type: 'dragstart',
  6734. listener(event) {
  6735. for (const interaction of scope.interactions.list) {
  6736. if (interaction.element && (interaction.element === event.target || nodeContains(interaction.element, event.target))) {
  6737. interaction.interactable.checkAndPreventDefault(event);
  6738. return;
  6739. }
  6740. }
  6741. }
  6742. });
  6743. }
  6744. /* harmony default export */ var interactablePreventDefault = ({
  6745. id: 'core/interactablePreventDefault',
  6746. install: interactablePreventDefault_install,
  6747. listeners: ['down', 'move', 'up', 'cancel'].reduce((acc, eventType) => {
  6748. acc[`interactions:${eventType}`] = onInteractionEvent;
  6749. return acc;
  6750. }, {})
  6751. });
  6752. //# sourceMappingURL=interactablePreventDefault.js.map
  6753. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactionFinder.js
  6754. const finder = {
  6755. methodOrder: ['simulationResume', 'mouseOrPen', 'hasPointer', 'idle'],
  6756. search(details) {
  6757. for (const method of finder.methodOrder) {
  6758. const interaction = finder[method](details);
  6759. if (interaction) {
  6760. return interaction;
  6761. }
  6762. }
  6763. return null;
  6764. },
  6765. // try to resume simulation with a new pointer
  6766. simulationResume({
  6767. pointerType,
  6768. eventType,
  6769. eventTarget,
  6770. scope
  6771. }) {
  6772. if (!/down|start/i.test(eventType)) {
  6773. return null;
  6774. }
  6775. for (const interaction of scope.interactions.list) {
  6776. let element = eventTarget;
  6777. if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) {
  6778. while (element) {
  6779. // if the element is the interaction element
  6780. if (element === interaction.element) {
  6781. return interaction;
  6782. }
  6783. element = parentNode(element);
  6784. }
  6785. }
  6786. }
  6787. return null;
  6788. },
  6789. // if it's a mouse or pen interaction
  6790. mouseOrPen({
  6791. pointerId,
  6792. pointerType,
  6793. eventType,
  6794. scope
  6795. }) {
  6796. if (pointerType !== 'mouse' && pointerType !== 'pen') {
  6797. return null;
  6798. }
  6799. let firstNonActive;
  6800. for (const interaction of scope.interactions.list) {
  6801. if (interaction.pointerType === pointerType) {
  6802. // if it's a down event, skip interactions with running simulations
  6803. if (interaction.simulation && !hasPointerId(interaction, pointerId)) {
  6804. continue;
  6805. } // if the interaction is active, return it immediately
  6806. if (interaction.interacting()) {
  6807. return interaction;
  6808. } // otherwise save it and look for another active interaction
  6809. else if (!firstNonActive) {
  6810. firstNonActive = interaction;
  6811. }
  6812. }
  6813. } // if no active mouse interaction was found use the first inactive mouse
  6814. // interaction
  6815. if (firstNonActive) {
  6816. return firstNonActive;
  6817. } // find any mouse or pen interaction.
  6818. // ignore the interaction if the eventType is a *down, and a simulation
  6819. // is active
  6820. for (const interaction of scope.interactions.list) {
  6821. if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {
  6822. return interaction;
  6823. }
  6824. }
  6825. return null;
  6826. },
  6827. // get interaction that has this pointer
  6828. hasPointer({
  6829. pointerId,
  6830. scope
  6831. }) {
  6832. for (const interaction of scope.interactions.list) {
  6833. if (hasPointerId(interaction, pointerId)) {
  6834. return interaction;
  6835. }
  6836. }
  6837. return null;
  6838. },
  6839. // get first idle interaction with a matching pointerType
  6840. idle({
  6841. pointerType,
  6842. scope
  6843. }) {
  6844. for (const interaction of scope.interactions.list) {
  6845. // if there's already a pointer held down
  6846. if (interaction.pointers.length === 1) {
  6847. const target = interaction.interactable; // don't add this pointer if there is a target interactable and it
  6848. // isn't gesturable
  6849. if (target && !(target.options.gesture && target.options.gesture.enabled)) {
  6850. continue;
  6851. }
  6852. } // maximum of 2 pointers per interaction
  6853. else if (interaction.pointers.length >= 2) {
  6854. continue;
  6855. }
  6856. if (!interaction.interacting() && pointerType === interaction.pointerType) {
  6857. return interaction;
  6858. }
  6859. }
  6860. return null;
  6861. }
  6862. };
  6863. function hasPointerId(interaction, pointerId) {
  6864. return interaction.pointers.some(({
  6865. id
  6866. }) => id === pointerId);
  6867. }
  6868. /* harmony default export */ var interactionFinder = (finder);
  6869. //# sourceMappingURL=interactionFinder.js.map
  6870. // CONCATENATED MODULE: ./node_modules/@interactjs/core/interactions.js
  6871. const methodNames = ['pointerDown', 'pointerMove', 'pointerUp', 'updatePointer', 'removePointer', 'windowBlur'];
  6872. function interactions_install(scope) {
  6873. const listeners = {};
  6874. for (const method of methodNames) {
  6875. listeners[method] = doOnInteractions(method, scope);
  6876. }
  6877. const pEventTypes = utils_browser.pEventTypes;
  6878. let docEvents;
  6879. if (utils_domObjects.PointerEvent) {
  6880. docEvents = [{
  6881. type: pEventTypes.down,
  6882. listener: releasePointersOnRemovedEls
  6883. }, {
  6884. type: pEventTypes.down,
  6885. listener: listeners.pointerDown
  6886. }, {
  6887. type: pEventTypes.move,
  6888. listener: listeners.pointerMove
  6889. }, {
  6890. type: pEventTypes.up,
  6891. listener: listeners.pointerUp
  6892. }, {
  6893. type: pEventTypes.cancel,
  6894. listener: listeners.pointerUp
  6895. }];
  6896. } else {
  6897. docEvents = [{
  6898. type: 'mousedown',
  6899. listener: listeners.pointerDown
  6900. }, {
  6901. type: 'mousemove',
  6902. listener: listeners.pointerMove
  6903. }, {
  6904. type: 'mouseup',
  6905. listener: listeners.pointerUp
  6906. }, {
  6907. type: 'touchstart',
  6908. listener: releasePointersOnRemovedEls
  6909. }, {
  6910. type: 'touchstart',
  6911. listener: listeners.pointerDown
  6912. }, {
  6913. type: 'touchmove',
  6914. listener: listeners.pointerMove
  6915. }, {
  6916. type: 'touchend',
  6917. listener: listeners.pointerUp
  6918. }, {
  6919. type: 'touchcancel',
  6920. listener: listeners.pointerUp
  6921. }];
  6922. }
  6923. docEvents.push({
  6924. type: 'blur',
  6925. listener(event) {
  6926. for (const interaction of scope.interactions.list) {
  6927. interaction.documentBlur(event);
  6928. }
  6929. }
  6930. }); // for ignoring browser's simulated mouse events
  6931. scope.prevTouchTime = 0;
  6932. scope.Interaction = class extends core_Interaction {
  6933. get pointerMoveTolerance() {
  6934. return scope.interactions.pointerMoveTolerance;
  6935. }
  6936. set pointerMoveTolerance(value) {
  6937. scope.interactions.pointerMoveTolerance = value;
  6938. }
  6939. _now() {
  6940. return scope.now();
  6941. }
  6942. };
  6943. scope.interactions = {
  6944. // all active and idle interactions
  6945. list: [],
  6946. new(options) {
  6947. options.scopeFire = (name, arg) => scope.fire(name, arg);
  6948. const interaction = new scope.Interaction(options);
  6949. scope.interactions.list.push(interaction);
  6950. return interaction;
  6951. },
  6952. listeners,
  6953. docEvents,
  6954. pointerMoveTolerance: 1
  6955. };
  6956. function releasePointersOnRemovedEls() {
  6957. // for all inactive touch interactions with pointers down
  6958. for (const interaction of scope.interactions.list) {
  6959. if (!interaction.pointerIsDown || interaction.pointerType !== 'touch' || interaction._interacting) {
  6960. continue;
  6961. } // if a pointer is down on an element that is no longer in the DOM tree
  6962. for (const pointer of interaction.pointers) {
  6963. if (!scope.documents.some(({
  6964. doc
  6965. }) => nodeContains(doc, pointer.downTarget))) {
  6966. // remove the pointer from the interaction
  6967. interaction.removePointer(pointer.pointer, pointer.event);
  6968. }
  6969. }
  6970. }
  6971. }
  6972. scope.usePlugin(interactablePreventDefault);
  6973. }
  6974. function doOnInteractions(method, scope) {
  6975. return function (event) {
  6976. const interactions = scope.interactions.list;
  6977. const pointerType = getPointerType(event);
  6978. const [eventTarget, curEventTarget] = getEventTargets(event);
  6979. const matches = []; // [ [pointer, interaction], ...]
  6980. if (/^touch/.test(event.type)) {
  6981. scope.prevTouchTime = scope.now(); // @ts-expect-error
  6982. for (const changedTouch of event.changedTouches) {
  6983. const pointer = changedTouch;
  6984. const pointerId = getPointerId(pointer);
  6985. const searchDetails = {
  6986. pointer,
  6987. pointerId,
  6988. pointerType,
  6989. eventType: event.type,
  6990. eventTarget,
  6991. curEventTarget,
  6992. scope
  6993. };
  6994. const interaction = getInteraction(searchDetails);
  6995. matches.push([searchDetails.pointer, searchDetails.eventTarget, searchDetails.curEventTarget, interaction]);
  6996. }
  6997. } else {
  6998. let invalidPointer = false;
  6999. if (!utils_browser.supportsPointerEvent && /mouse/.test(event.type)) {
  7000. // ignore mouse events while touch interactions are active
  7001. for (let i = 0; i < interactions.length && !invalidPointer; i++) {
  7002. invalidPointer = interactions[i].pointerType !== 'mouse' && interactions[i].pointerIsDown;
  7003. } // try to ignore mouse events that are simulated by the browser
  7004. // after a touch event
  7005. invalidPointer = invalidPointer || scope.now() - scope.prevTouchTime < 500 || // on iOS and Firefox Mobile, MouseEvent.timeStamp is zero if simulated
  7006. event.timeStamp === 0;
  7007. }
  7008. if (!invalidPointer) {
  7009. const searchDetails = {
  7010. pointer: event,
  7011. pointerId: getPointerId(event),
  7012. pointerType,
  7013. eventType: event.type,
  7014. curEventTarget,
  7015. eventTarget,
  7016. scope
  7017. };
  7018. const interaction = getInteraction(searchDetails);
  7019. matches.push([searchDetails.pointer, searchDetails.eventTarget, searchDetails.curEventTarget, interaction]);
  7020. }
  7021. } // eslint-disable-next-line no-shadow
  7022. for (const [pointer, eventTarget, curEventTarget, interaction] of matches) {
  7023. interaction[method](pointer, event, eventTarget, curEventTarget);
  7024. }
  7025. };
  7026. }
  7027. function getInteraction(searchDetails) {
  7028. const {
  7029. pointerType,
  7030. scope
  7031. } = searchDetails;
  7032. const foundInteraction = interactionFinder.search(searchDetails);
  7033. const signalArg = {
  7034. interaction: foundInteraction,
  7035. searchDetails
  7036. };
  7037. scope.fire('interactions:find', signalArg);
  7038. return signalArg.interaction || scope.interactions.new({
  7039. pointerType
  7040. });
  7041. }
  7042. function onDocSignal({
  7043. doc,
  7044. scope,
  7045. options
  7046. }, eventMethodName) {
  7047. const {
  7048. interactions: {
  7049. docEvents
  7050. },
  7051. events
  7052. } = scope;
  7053. const eventMethod = events[eventMethodName];
  7054. if (scope.browser.isIOS && !options.events) {
  7055. options.events = {
  7056. passive: false
  7057. };
  7058. } // delegate event listener
  7059. for (const eventType in events.delegatedEvents) {
  7060. eventMethod(doc, eventType, events.delegateListener);
  7061. eventMethod(doc, eventType, events.delegateUseCapture, true);
  7062. }
  7063. const eventOptions = options && options.events;
  7064. for (const {
  7065. type,
  7066. listener
  7067. } of docEvents) {
  7068. eventMethod(doc, type, listener, eventOptions);
  7069. }
  7070. }
  7071. const interactions_interactions = {
  7072. id: 'core/interactions',
  7073. install: interactions_install,
  7074. listeners: {
  7075. 'scope:add-document': arg => onDocSignal(arg, 'add'),
  7076. 'scope:remove-document': arg => onDocSignal(arg, 'remove'),
  7077. 'interactable:unset': ({
  7078. interactable
  7079. }, scope) => {
  7080. // Stop and destroy related interactions when an Interactable is unset
  7081. for (let i = scope.interactions.list.length - 1; i >= 0; i--) {
  7082. const interaction = scope.interactions.list[i];
  7083. if (interaction.interactable !== interactable) {
  7084. continue;
  7085. }
  7086. interaction.stop();
  7087. scope.fire('interactions:destroy', {
  7088. interaction
  7089. });
  7090. interaction.destroy();
  7091. if (scope.interactions.list.length > 2) {
  7092. scope.interactions.list.splice(i, 1);
  7093. }
  7094. }
  7095. }
  7096. },
  7097. onDocSignal,
  7098. doOnInteractions,
  7099. methodNames
  7100. };
  7101. /* harmony default export */ var core_interactions = (interactions_interactions);
  7102. //# sourceMappingURL=interactions.js.map
  7103. // CONCATENATED MODULE: ./node_modules/@interactjs/core/scope.js
  7104. class scope_Scope {
  7105. // main window
  7106. // main document
  7107. // main window
  7108. // all documents being listened to
  7109. constructor() {
  7110. this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`;
  7111. this.isInitialized = false;
  7112. this.listenerMaps = [];
  7113. this.browser = utils_browser;
  7114. this.defaults = clone(defaultOptions_defaults);
  7115. this.Eventable = Eventable_Eventable;
  7116. this.actions = {
  7117. map: {},
  7118. phases: {
  7119. start: true,
  7120. move: true,
  7121. end: true
  7122. },
  7123. methodDict: {},
  7124. phaselessTypes: {}
  7125. };
  7126. this.interactStatic = createInteractStatic(this);
  7127. this.InteractEvent = InteractEvent_InteractEvent;
  7128. this.Interactable = void 0;
  7129. this.interactables = new InteractableSet_InteractableSet(this);
  7130. this._win = void 0;
  7131. this.document = void 0;
  7132. this.window = void 0;
  7133. this.documents = [];
  7134. this._plugins = {
  7135. list: [],
  7136. map: {}
  7137. };
  7138. this.onWindowUnload = event => this.removeDocument(event.target);
  7139. const scope = this;
  7140. this.Interactable = class extends Interactable_Interactable {
  7141. get _defaults() {
  7142. return scope.defaults;
  7143. }
  7144. set(options) {
  7145. super.set(options);
  7146. scope.fire('interactable:set', {
  7147. options,
  7148. interactable: this
  7149. });
  7150. return this;
  7151. }
  7152. unset() {
  7153. super.unset();
  7154. scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1);
  7155. scope.fire('interactable:unset', {
  7156. interactable: this
  7157. });
  7158. }
  7159. };
  7160. }
  7161. addListeners(map, id) {
  7162. this.listenerMaps.push({
  7163. id,
  7164. map
  7165. });
  7166. }
  7167. fire(name, arg) {
  7168. for (const {
  7169. map: {
  7170. [name]: listener
  7171. }
  7172. } of this.listenerMaps) {
  7173. if (!!listener && listener(arg, this, name) === false) {
  7174. return false;
  7175. }
  7176. }
  7177. }
  7178. init(window) {
  7179. return this.isInitialized ? this : initScope(this, window);
  7180. }
  7181. pluginIsInstalled(plugin) {
  7182. return this._plugins.map[plugin.id] || this._plugins.list.indexOf(plugin) !== -1;
  7183. }
  7184. usePlugin(plugin, options) {
  7185. if (!this.isInitialized) {
  7186. return this;
  7187. }
  7188. if (this.pluginIsInstalled(plugin)) {
  7189. return this;
  7190. }
  7191. if (plugin.id) {
  7192. this._plugins.map[plugin.id] = plugin;
  7193. }
  7194. this._plugins.list.push(plugin);
  7195. if (plugin.install) {
  7196. plugin.install(this, options);
  7197. }
  7198. if (plugin.listeners && plugin.before) {
  7199. let index = 0;
  7200. const len = this.listenerMaps.length;
  7201. const before = plugin.before.reduce((acc, id) => {
  7202. acc[id] = true;
  7203. acc[pluginIdRoot(id)] = true;
  7204. return acc;
  7205. }, {});
  7206. for (; index < len; index++) {
  7207. const otherId = this.listenerMaps[index].id;
  7208. if (before[otherId] || before[pluginIdRoot(otherId)]) {
  7209. break;
  7210. }
  7211. }
  7212. this.listenerMaps.splice(index, 0, {
  7213. id: plugin.id,
  7214. map: plugin.listeners
  7215. });
  7216. } else if (plugin.listeners) {
  7217. this.listenerMaps.push({
  7218. id: plugin.id,
  7219. map: plugin.listeners
  7220. });
  7221. }
  7222. return this;
  7223. }
  7224. addDocument(doc, options) {
  7225. // do nothing if document is already known
  7226. if (this.getDocIndex(doc) !== -1) {
  7227. return false;
  7228. }
  7229. const window = getWindow(doc);
  7230. options = options ? extend({}, options) : {};
  7231. this.documents.push({
  7232. doc,
  7233. options
  7234. });
  7235. this.events.documents.push(doc); // don't add an unload event for the main document
  7236. // so that the page may be cached in browser history
  7237. if (doc !== this.document) {
  7238. this.events.add(window, 'unload', this.onWindowUnload);
  7239. }
  7240. this.fire('scope:add-document', {
  7241. doc,
  7242. window,
  7243. scope: this,
  7244. options
  7245. });
  7246. }
  7247. removeDocument(doc) {
  7248. const index = this.getDocIndex(doc);
  7249. const window = getWindow(doc);
  7250. const options = this.documents[index].options;
  7251. this.events.remove(window, 'unload', this.onWindowUnload);
  7252. this.documents.splice(index, 1);
  7253. this.events.documents.splice(index, 1);
  7254. this.fire('scope:remove-document', {
  7255. doc,
  7256. window,
  7257. scope: this,
  7258. options
  7259. });
  7260. }
  7261. getDocIndex(doc) {
  7262. for (let i = 0; i < this.documents.length; i++) {
  7263. if (this.documents[i].doc === doc) {
  7264. return i;
  7265. }
  7266. }
  7267. return -1;
  7268. }
  7269. getDocOptions(doc) {
  7270. const docIndex = this.getDocIndex(doc);
  7271. return docIndex === -1 ? null : this.documents[docIndex].options;
  7272. }
  7273. now() {
  7274. return (this.window.Date || Date).now();
  7275. }
  7276. }
  7277. function initScope(scope, window) {
  7278. scope.isInitialized = true;
  7279. window_init(window);
  7280. utils_domObjects.init(window);
  7281. utils_browser.init(window);
  7282. raf.init(window);
  7283. scope.window = window;
  7284. scope.document = window.document;
  7285. scope.usePlugin(core_interactions);
  7286. scope.usePlugin(events);
  7287. return scope;
  7288. }
  7289. function pluginIdRoot(id) {
  7290. return id && id.replace(/\/.*$/, '');
  7291. }
  7292. //# sourceMappingURL=scope.js.map
  7293. // CONCATENATED MODULE: ./node_modules/@interactjs/interact/index.js
  7294. const interact_scope = new scope_Scope();
  7295. const interact_interact = interact_scope.interactStatic;
  7296. /* harmony default export */ var _interactjs_interact = (interact_interact);
  7297. const interact_init = win => interact_scope.init(win);
  7298. if (typeof window === 'object' && !!window) {
  7299. interact_init(window);
  7300. }
  7301. //# sourceMappingURL=index.js.map
  7302. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/InteractableMethods.js
  7303. function InteractableMethods_install(scope) {
  7304. const {
  7305. /** @lends Interactable */
  7306. Interactable // tslint:disable-line no-shadowed-variable
  7307. } = scope;
  7308. Interactable.prototype.getAction = function getAction(pointer, event, interaction, element) {
  7309. const action = defaultActionChecker(this, event, interaction, element, scope);
  7310. if (this.options.actionChecker) {
  7311. return this.options.actionChecker(pointer, event, action, this, element, interaction);
  7312. }
  7313. return action;
  7314. };
  7315. /**
  7316. * If the target of the `mousedown`, `pointerdown` or `touchstart` event or any
  7317. * of it's parents match the given CSS selector or Element, no
  7318. * drag/resize/gesture is started.
  7319. *
  7320. * @deprecated
  7321. * Don't use this method. Instead set the `ignoreFrom` option for each action
  7322. * or for `pointerEvents`
  7323. *
  7324. * ```js
  7325. * interact(targett)
  7326. * .draggable({
  7327. * ignoreFrom: 'input, textarea, a[href]'',
  7328. * })
  7329. * .pointerEvents({
  7330. * ignoreFrom: '[no-pointer]',
  7331. * })
  7332. * ```
  7333. *
  7334. * @param {string | Element | null} [newValue] a CSS selector string, an
  7335. * Element or `null` to not ignore any elements
  7336. * @return {string | Element | object} The current ignoreFrom value or this
  7337. * Interactable
  7338. */
  7339. Interactable.prototype.ignoreFrom = warnOnce(function (newValue) {
  7340. return this._backCompatOption('ignoreFrom', newValue);
  7341. }, 'Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).');
  7342. /**
  7343. *
  7344. * A drag/resize/gesture is started only If the target of the `mousedown`,
  7345. * `pointerdown` or `touchstart` event or any of it's parents match the given
  7346. * CSS selector or Element.
  7347. *
  7348. * @deprecated
  7349. * Don't use this method. Instead set the `allowFrom` option for each action
  7350. * or for `pointerEvents`
  7351. *
  7352. * ```js
  7353. * interact(targett)
  7354. * .resizable({
  7355. * allowFrom: '.resize-handle',
  7356. * .pointerEvents({
  7357. * allowFrom: '.handle',,
  7358. * })
  7359. * ```
  7360. *
  7361. * @param {string | Element | null} [newValue] a CSS selector string, an
  7362. * Element or `null` to allow from any element
  7363. * @return {string | Element | object} The current allowFrom value or this
  7364. * Interactable
  7365. */
  7366. Interactable.prototype.allowFrom = warnOnce(function (newValue) {
  7367. return this._backCompatOption('allowFrom', newValue);
  7368. }, 'Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).');
  7369. /**
  7370. * ```js
  7371. * interact('.resize-drag')
  7372. * .resizable(true)
  7373. * .draggable(true)
  7374. * .actionChecker(function (pointer, event, action, interactable, element, interaction) {
  7375. *
  7376. * if (interact.matchesSelector(event.target, '.drag-handle')) {
  7377. * // force drag with handle target
  7378. * action.name = drag
  7379. * }
  7380. * else {
  7381. * // resize from the top and right edges
  7382. * action.name = 'resize'
  7383. * action.edges = { top: true, right: true }
  7384. * }
  7385. *
  7386. * return action
  7387. * })
  7388. * ```
  7389. *
  7390. * Returns or sets the function used to check action to be performed on
  7391. * pointerDown
  7392. *
  7393. * @param {function | null} [checker] A function which takes a pointer event,
  7394. * defaultAction string, interactable, element and interaction as parameters
  7395. * and returns an object with name property 'drag' 'resize' or 'gesture' and
  7396. * optionally an `edges` object with boolean 'top', 'left', 'bottom' and right
  7397. * props.
  7398. * @return {Function | Interactable} The checker function or this Interactable
  7399. */
  7400. Interactable.prototype.actionChecker = actionChecker;
  7401. /**
  7402. * Returns or sets whether the the cursor should be changed depending on the
  7403. * action that would be performed if the mouse were pressed and dragged.
  7404. *
  7405. * @param {boolean} [newValue]
  7406. * @return {boolean | Interactable} The current setting or this Interactable
  7407. */
  7408. Interactable.prototype.styleCursor = styleCursor;
  7409. }
  7410. function defaultActionChecker(interactable, event, interaction, element, scope) {
  7411. const rect = interactable.getRect(element);
  7412. const buttons = event.buttons || {
  7413. 0: 1,
  7414. 1: 4,
  7415. 3: 8,
  7416. 4: 16
  7417. }[event.button];
  7418. const arg = {
  7419. action: null,
  7420. interactable,
  7421. interaction,
  7422. element,
  7423. rect,
  7424. buttons
  7425. };
  7426. scope.fire('auto-start:check', arg);
  7427. return arg.action;
  7428. }
  7429. function styleCursor(newValue) {
  7430. if (is.bool(newValue)) {
  7431. this.options.styleCursor = newValue;
  7432. return this;
  7433. }
  7434. if (newValue === null) {
  7435. delete this.options.styleCursor;
  7436. return this;
  7437. }
  7438. return this.options.styleCursor;
  7439. }
  7440. function actionChecker(checker) {
  7441. if (is.func(checker)) {
  7442. this.options.actionChecker = checker;
  7443. return this;
  7444. }
  7445. if (checker === null) {
  7446. delete this.options.actionChecker;
  7447. return this;
  7448. }
  7449. return this.options.actionChecker;
  7450. }
  7451. /* harmony default export */ var InteractableMethods = ({
  7452. id: 'auto-start/interactableMethods',
  7453. install: InteractableMethods_install
  7454. });
  7455. //# sourceMappingURL=InteractableMethods.js.map
  7456. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/base.js
  7457. function base_install(scope) {
  7458. const {
  7459. interactStatic: interact,
  7460. defaults
  7461. } = scope;
  7462. scope.usePlugin(InteractableMethods);
  7463. defaults.base.actionChecker = null;
  7464. defaults.base.styleCursor = true;
  7465. extend(defaults.perAction, {
  7466. manualStart: false,
  7467. max: Infinity,
  7468. maxPerElement: 1,
  7469. allowFrom: null,
  7470. ignoreFrom: null,
  7471. // only allow left button by default
  7472. // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#Return_value
  7473. mouseButtons: 1
  7474. });
  7475. /**
  7476. * Returns or sets the maximum number of concurrent interactions allowed. By
  7477. * default only 1 interaction is allowed at a time (for backwards
  7478. * compatibility). To allow multiple interactions on the same Interactables and
  7479. * elements, you need to enable it in the draggable, resizable and gesturable
  7480. * `'max'` and `'maxPerElement'` options.
  7481. *
  7482. * @alias module:interact.maxInteractions
  7483. *
  7484. * @param {number} [newValue] Any number. newValue <= 0 means no interactions.
  7485. */
  7486. interact.maxInteractions = newValue => maxInteractions(newValue, scope);
  7487. scope.autoStart = {
  7488. // Allow this many interactions to happen simultaneously
  7489. maxInteractions: Infinity,
  7490. withinInteractionLimit,
  7491. cursorElement: null
  7492. };
  7493. }
  7494. function prepareOnDown({
  7495. interaction,
  7496. pointer,
  7497. event,
  7498. eventTarget
  7499. }, scope) {
  7500. if (interaction.interacting()) {
  7501. return;
  7502. }
  7503. const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope);
  7504. prepare(interaction, actionInfo, scope);
  7505. }
  7506. function prepareOnMove({
  7507. interaction,
  7508. pointer,
  7509. event,
  7510. eventTarget
  7511. }, scope) {
  7512. if (interaction.pointerType !== 'mouse' || interaction.pointerIsDown || interaction.interacting()) {
  7513. return;
  7514. }
  7515. const actionInfo = getActionInfo(interaction, pointer, event, eventTarget, scope);
  7516. prepare(interaction, actionInfo, scope);
  7517. }
  7518. function startOnMove(arg, scope) {
  7519. const {
  7520. interaction
  7521. } = arg;
  7522. if (!interaction.pointerIsDown || interaction.interacting() || !interaction.pointerWasMoved || !interaction.prepared.name) {
  7523. return;
  7524. }
  7525. scope.fire('autoStart:before-start', arg);
  7526. const {
  7527. interactable
  7528. } = interaction;
  7529. const actionName = interaction.prepared.name;
  7530. if (actionName && interactable) {
  7531. // check manualStart and interaction limit
  7532. if (interactable.options[actionName].manualStart || !withinInteractionLimit(interactable, interaction.element, interaction.prepared, scope)) {
  7533. interaction.stop();
  7534. } else {
  7535. interaction.start(interaction.prepared, interactable, interaction.element);
  7536. setInteractionCursor(interaction, scope);
  7537. }
  7538. }
  7539. }
  7540. function clearCursorOnStop({
  7541. interaction
  7542. }, scope) {
  7543. const {
  7544. interactable
  7545. } = interaction;
  7546. if (interactable && interactable.options.styleCursor) {
  7547. setCursor(interaction.element, '', scope);
  7548. }
  7549. } // Check if the current interactable supports the action.
  7550. // If so, return the validated action. Otherwise, return null
  7551. function validateAction(action, interactable, element, eventTarget, scope) {
  7552. if (interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) && interactable.options[action.name].enabled && withinInteractionLimit(interactable, element, action, scope)) {
  7553. return action;
  7554. }
  7555. return null;
  7556. }
  7557. function validateMatches(interaction, pointer, event, matches, matchElements, eventTarget, scope) {
  7558. for (let i = 0, len = matches.length; i < len; i++) {
  7559. const match = matches[i];
  7560. const matchElement = matchElements[i];
  7561. const matchAction = match.getAction(pointer, event, interaction, matchElement);
  7562. if (!matchAction) {
  7563. continue;
  7564. }
  7565. const action = validateAction(matchAction, match, matchElement, eventTarget, scope);
  7566. if (action) {
  7567. return {
  7568. action,
  7569. interactable: match,
  7570. element: matchElement
  7571. };
  7572. }
  7573. }
  7574. return {
  7575. action: null,
  7576. interactable: null,
  7577. element: null
  7578. };
  7579. }
  7580. function getActionInfo(interaction, pointer, event, eventTarget, scope) {
  7581. let matches = [];
  7582. let matchElements = [];
  7583. let element = eventTarget;
  7584. function pushMatches(interactable) {
  7585. matches.push(interactable);
  7586. matchElements.push(element);
  7587. }
  7588. while (is.element(element)) {
  7589. matches = [];
  7590. matchElements = [];
  7591. scope.interactables.forEachMatch(element, pushMatches);
  7592. const actionInfo = validateMatches(interaction, pointer, event, matches, matchElements, eventTarget, scope);
  7593. if (actionInfo.action && !actionInfo.interactable.options[actionInfo.action.name].manualStart) {
  7594. return actionInfo;
  7595. }
  7596. element = parentNode(element);
  7597. }
  7598. return {
  7599. action: null,
  7600. interactable: null,
  7601. element: null
  7602. };
  7603. }
  7604. function prepare(interaction, {
  7605. action,
  7606. interactable,
  7607. element
  7608. }, scope) {
  7609. action = action || {
  7610. name: null
  7611. };
  7612. interaction.interactable = interactable;
  7613. interaction.element = element;
  7614. copyAction(interaction.prepared, action);
  7615. interaction.rect = interactable && action.name ? interactable.getRect(element) : null;
  7616. setInteractionCursor(interaction, scope);
  7617. scope.fire('autoStart:prepared', {
  7618. interaction
  7619. });
  7620. }
  7621. function withinInteractionLimit(interactable, element, action, scope) {
  7622. const options = interactable.options;
  7623. const maxActions = options[action.name].max;
  7624. const maxPerElement = options[action.name].maxPerElement;
  7625. const autoStartMax = scope.autoStart.maxInteractions;
  7626. let activeInteractions = 0;
  7627. let interactableCount = 0;
  7628. let elementCount = 0; // no actions if any of these values == 0
  7629. if (!(maxActions && maxPerElement && autoStartMax)) {
  7630. return false;
  7631. }
  7632. for (const interaction of scope.interactions.list) {
  7633. const otherAction = interaction.prepared.name;
  7634. if (!interaction.interacting()) {
  7635. continue;
  7636. }
  7637. activeInteractions++;
  7638. if (activeInteractions >= autoStartMax) {
  7639. return false;
  7640. }
  7641. if (interaction.interactable !== interactable) {
  7642. continue;
  7643. }
  7644. interactableCount += otherAction === action.name ? 1 : 0;
  7645. if (interactableCount >= maxActions) {
  7646. return false;
  7647. }
  7648. if (interaction.element === element) {
  7649. elementCount++;
  7650. if (otherAction === action.name && elementCount >= maxPerElement) {
  7651. return false;
  7652. }
  7653. }
  7654. }
  7655. return autoStartMax > 0;
  7656. }
  7657. function maxInteractions(newValue, scope) {
  7658. if (is.number(newValue)) {
  7659. scope.autoStart.maxInteractions = newValue;
  7660. return this;
  7661. }
  7662. return scope.autoStart.maxInteractions;
  7663. }
  7664. function setCursor(element, cursor, scope) {
  7665. const {
  7666. cursorElement: prevCursorElement
  7667. } = scope.autoStart;
  7668. if (prevCursorElement && prevCursorElement !== element) {
  7669. prevCursorElement.style.cursor = '';
  7670. }
  7671. element.ownerDocument.documentElement.style.cursor = cursor;
  7672. element.style.cursor = cursor;
  7673. scope.autoStart.cursorElement = cursor ? element : null;
  7674. }
  7675. function setInteractionCursor(interaction, scope) {
  7676. const {
  7677. interactable,
  7678. element,
  7679. prepared
  7680. } = interaction;
  7681. if (!(interaction.pointerType === 'mouse' && interactable && interactable.options.styleCursor)) {
  7682. // clear previous target element cursor
  7683. if (scope.autoStart.cursorElement) {
  7684. setCursor(scope.autoStart.cursorElement, '', scope);
  7685. }
  7686. return;
  7687. }
  7688. let cursor = '';
  7689. if (prepared.name) {
  7690. const cursorChecker = interactable.options[prepared.name].cursorChecker;
  7691. if (is.func(cursorChecker)) {
  7692. cursor = cursorChecker(prepared, interactable, element, interaction._interacting);
  7693. } else {
  7694. cursor = scope.actions.map[prepared.name].getCursor(prepared);
  7695. }
  7696. }
  7697. setCursor(interaction.element, cursor || '', scope);
  7698. }
  7699. const autoStart = {
  7700. id: 'auto-start/base',
  7701. before: ['actions'],
  7702. install: base_install,
  7703. listeners: {
  7704. 'interactions:down': prepareOnDown,
  7705. 'interactions:move': (arg, scope) => {
  7706. prepareOnMove(arg, scope);
  7707. startOnMove(arg, scope);
  7708. },
  7709. 'interactions:stop': clearCursorOnStop
  7710. },
  7711. maxInteractions,
  7712. withinInteractionLimit,
  7713. validateAction
  7714. };
  7715. /* harmony default export */ var base = (autoStart);
  7716. //# sourceMappingURL=base.js.map
  7717. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/dragAxis.js
  7718. function beforeStart({
  7719. interaction,
  7720. eventTarget,
  7721. dx,
  7722. dy
  7723. }, scope) {
  7724. if (interaction.prepared.name !== 'drag') {
  7725. return;
  7726. } // check if a drag is in the correct axis
  7727. const absX = Math.abs(dx);
  7728. const absY = Math.abs(dy);
  7729. const targetOptions = interaction.interactable.options.drag;
  7730. const startAxis = targetOptions.startAxis;
  7731. const currentAxis = absX > absY ? 'x' : absX < absY ? 'y' : 'xy';
  7732. interaction.prepared.axis = targetOptions.lockAxis === 'start' ? currentAxis[0] // always lock to one axis even if currentAxis === 'xy'
  7733. : targetOptions.lockAxis; // if the movement isn't in the startAxis of the interactable
  7734. if (currentAxis !== 'xy' && startAxis !== 'xy' && startAxis !== currentAxis) {
  7735. // cancel the prepared action
  7736. interaction.prepared.name = null; // then try to get a drag from another ineractable
  7737. let element = eventTarget;
  7738. const getDraggable = function (interactable) {
  7739. if (interactable === interaction.interactable) {
  7740. return;
  7741. }
  7742. const options = interaction.interactable.options.drag;
  7743. if (!options.manualStart && interactable.testIgnoreAllow(options, element, eventTarget)) {
  7744. const action = interactable.getAction(interaction.downPointer, interaction.downEvent, interaction, element);
  7745. if (action && action.name === 'drag' && checkStartAxis(currentAxis, interactable) && base.validateAction(action, interactable, element, eventTarget, scope)) {
  7746. return interactable;
  7747. }
  7748. }
  7749. }; // check all interactables
  7750. while (is.element(element)) {
  7751. const interactable = scope.interactables.forEachMatch(element, getDraggable);
  7752. if (interactable) {
  7753. interaction.prepared.name = 'drag';
  7754. interaction.interactable = interactable;
  7755. interaction.element = element;
  7756. break;
  7757. }
  7758. element = parentNode(element);
  7759. }
  7760. }
  7761. }
  7762. function checkStartAxis(startAxis, interactable) {
  7763. if (!interactable) {
  7764. return false;
  7765. }
  7766. const thisAxis = interactable.options.drag.startAxis;
  7767. return startAxis === 'xy' || thisAxis === 'xy' || thisAxis === startAxis;
  7768. }
  7769. /* harmony default export */ var dragAxis = ({
  7770. id: 'auto-start/dragAxis',
  7771. listeners: {
  7772. 'autoStart:before-start': beforeStart
  7773. }
  7774. });
  7775. //# sourceMappingURL=dragAxis.js.map
  7776. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/hold.js
  7777. function hold_install(scope) {
  7778. const {
  7779. defaults
  7780. } = scope;
  7781. scope.usePlugin(base);
  7782. defaults.perAction.hold = 0;
  7783. defaults.perAction.delay = 0;
  7784. }
  7785. function getHoldDuration(interaction) {
  7786. const actionName = interaction.prepared && interaction.prepared.name;
  7787. if (!actionName) {
  7788. return null;
  7789. }
  7790. const options = interaction.interactable.options;
  7791. return options[actionName].hold || options[actionName].delay;
  7792. }
  7793. const hold = {
  7794. id: 'auto-start/hold',
  7795. install: hold_install,
  7796. listeners: {
  7797. 'interactions:new': ({
  7798. interaction
  7799. }) => {
  7800. interaction.autoStartHoldTimer = null;
  7801. },
  7802. 'autoStart:prepared': ({
  7803. interaction
  7804. }) => {
  7805. const hold = getHoldDuration(interaction);
  7806. if (hold > 0) {
  7807. interaction.autoStartHoldTimer = setTimeout(() => {
  7808. interaction.start(interaction.prepared, interaction.interactable, interaction.element);
  7809. }, hold);
  7810. }
  7811. },
  7812. 'interactions:move': ({
  7813. interaction,
  7814. duplicate
  7815. }) => {
  7816. if (interaction.autoStartHoldTimer && interaction.pointerWasMoved && !duplicate) {
  7817. clearTimeout(interaction.autoStartHoldTimer);
  7818. interaction.autoStartHoldTimer = null;
  7819. }
  7820. },
  7821. // prevent regular down->move autoStart
  7822. 'autoStart:before-start': ({
  7823. interaction
  7824. }) => {
  7825. const holdDuration = getHoldDuration(interaction);
  7826. if (holdDuration > 0) {
  7827. interaction.prepared.name = null;
  7828. }
  7829. }
  7830. },
  7831. getHoldDuration
  7832. };
  7833. /* harmony default export */ var auto_start_hold = (hold);
  7834. //# sourceMappingURL=hold.js.map
  7835. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/plugin.js
  7836. /* harmony default export */ var auto_start_plugin = ({
  7837. id: 'auto-start',
  7838. install(scope) {
  7839. scope.usePlugin(base);
  7840. scope.usePlugin(auto_start_hold);
  7841. scope.usePlugin(dragAxis);
  7842. }
  7843. });
  7844. //# sourceMappingURL=plugin.js.map
  7845. // CONCATENATED MODULE: ./node_modules/@interactjs/auto-start/index.js
  7846. /* eslint-disable import/order, no-console, eol-last */
  7847. if (typeof window === 'object' && !!window) {
  7848. interact_init(window);
  7849. }
  7850. _interactjs_interact.use(auto_start_plugin);
  7851. //# sourceMappingURL=index.js.map
  7852. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/drag/plugin.js
  7853. function plugin_install(scope) {
  7854. const {
  7855. actions,
  7856. Interactable,
  7857. defaults
  7858. } = scope;
  7859. Interactable.prototype.draggable = drag.draggable;
  7860. actions.map.drag = drag;
  7861. actions.methodDict.drag = 'draggable';
  7862. defaults.actions.drag = drag.defaults;
  7863. }
  7864. function beforeMove({
  7865. interaction
  7866. }) {
  7867. if (interaction.prepared.name !== 'drag') {
  7868. return;
  7869. }
  7870. const axis = interaction.prepared.axis;
  7871. if (axis === 'x') {
  7872. interaction.coords.cur.page.y = interaction.coords.start.page.y;
  7873. interaction.coords.cur.client.y = interaction.coords.start.client.y;
  7874. interaction.coords.velocity.client.y = 0;
  7875. interaction.coords.velocity.page.y = 0;
  7876. } else if (axis === 'y') {
  7877. interaction.coords.cur.page.x = interaction.coords.start.page.x;
  7878. interaction.coords.cur.client.x = interaction.coords.start.client.x;
  7879. interaction.coords.velocity.client.x = 0;
  7880. interaction.coords.velocity.page.x = 0;
  7881. }
  7882. }
  7883. function move({
  7884. iEvent,
  7885. interaction
  7886. }) {
  7887. if (interaction.prepared.name !== 'drag') {
  7888. return;
  7889. }
  7890. const axis = interaction.prepared.axis;
  7891. if (axis === 'x' || axis === 'y') {
  7892. const opposite = axis === 'x' ? 'y' : 'x';
  7893. iEvent.page[opposite] = interaction.coords.start.page[opposite];
  7894. iEvent.client[opposite] = interaction.coords.start.client[opposite];
  7895. iEvent.delta[opposite] = 0;
  7896. }
  7897. }
  7898. /**
  7899. * ```js
  7900. * interact(element).draggable({
  7901. * onstart: function (event) {},
  7902. * onmove : function (event) {},
  7903. * onend : function (event) {},
  7904. *
  7905. * // the axis in which the first movement must be
  7906. * // for the drag sequence to start
  7907. * // 'xy' by default - any direction
  7908. * startAxis: 'x' || 'y' || 'xy',
  7909. *
  7910. * // 'xy' by default - don't restrict to one axis (move in any direction)
  7911. * // 'x' or 'y' to restrict movement to either axis
  7912. * // 'start' to restrict movement to the axis the drag started in
  7913. * lockAxis: 'x' || 'y' || 'xy' || 'start',
  7914. *
  7915. * // max number of drags that can happen concurrently
  7916. * // with elements of this Interactable. Infinity by default
  7917. * max: Infinity,
  7918. *
  7919. * // max number of drags that can target the same element+Interactable
  7920. * // 1 by default
  7921. * maxPerElement: 2
  7922. * })
  7923. *
  7924. * var isDraggable = interact('element').draggable(); // true
  7925. * ```
  7926. *
  7927. * Get or set whether drag actions can be performed on the target
  7928. *
  7929. * @alias Interactable.prototype.draggable
  7930. *
  7931. * @param {boolean | object} [options] true/false or An object with event
  7932. * listeners to be fired on drag events (object makes the Interactable
  7933. * draggable)
  7934. * @return {boolean | Interactable} boolean indicating if this can be the
  7935. * target of drag events, or this Interctable
  7936. */
  7937. const plugin_draggable = function draggable(options) {
  7938. if (is.object(options)) {
  7939. this.options.drag.enabled = options.enabled !== false;
  7940. this.setPerAction('drag', options);
  7941. this.setOnEvents('drag', options);
  7942. if (/^(xy|x|y|start)$/.test(options.lockAxis)) {
  7943. this.options.drag.lockAxis = options.lockAxis;
  7944. }
  7945. if (/^(xy|x|y)$/.test(options.startAxis)) {
  7946. this.options.drag.startAxis = options.startAxis;
  7947. }
  7948. return this;
  7949. }
  7950. if (is.bool(options)) {
  7951. this.options.drag.enabled = options;
  7952. return this;
  7953. }
  7954. return this.options.drag;
  7955. };
  7956. const drag = {
  7957. id: 'actions/drag',
  7958. install: plugin_install,
  7959. listeners: {
  7960. 'interactions:before-action-move': beforeMove,
  7961. 'interactions:action-resume': beforeMove,
  7962. // dragmove
  7963. 'interactions:action-move': move,
  7964. 'auto-start:check': arg => {
  7965. const {
  7966. interaction,
  7967. interactable,
  7968. buttons
  7969. } = arg;
  7970. const dragOptions = interactable.options.drag;
  7971. if (!(dragOptions && dragOptions.enabled) || // check mouseButton setting if the pointer is down
  7972. interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & interactable.options.drag.mouseButtons) === 0) {
  7973. return undefined;
  7974. }
  7975. arg.action = {
  7976. name: 'drag',
  7977. axis: dragOptions.lockAxis === 'start' ? dragOptions.startAxis : dragOptions.lockAxis
  7978. };
  7979. return false;
  7980. }
  7981. },
  7982. draggable: plugin_draggable,
  7983. beforeMove,
  7984. move,
  7985. defaults: {
  7986. startAxis: 'xy',
  7987. lockAxis: 'xy'
  7988. },
  7989. getCursor() {
  7990. return 'move';
  7991. }
  7992. };
  7993. /* harmony default export */ var drag_plugin = (drag);
  7994. //# sourceMappingURL=plugin.js.map
  7995. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/drag/index.js
  7996. /* eslint-disable import/order, no-console, eol-last */
  7997. if (typeof window === 'object' && !!window) {
  7998. interact_init(window);
  7999. }
  8000. _interactjs_interact.use(drag_plugin);
  8001. //# sourceMappingURL=index.js.map
  8002. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/resize/plugin.js
  8003. function resize_plugin_install(scope) {
  8004. const {
  8005. actions,
  8006. browser,
  8007. /** @lends Interactable */
  8008. Interactable,
  8009. // tslint:disable-line no-shadowed-variable
  8010. defaults
  8011. } = scope; // Less Precision with touch input
  8012. resize.cursors = initCursors(browser);
  8013. resize.defaultMargin = browser.supportsTouch || browser.supportsPointerEvent ? 20 : 10;
  8014. /**
  8015. * ```js
  8016. * interact(element).resizable({
  8017. * onstart: function (event) {},
  8018. * onmove : function (event) {},
  8019. * onend : function (event) {},
  8020. *
  8021. * edges: {
  8022. * top : true, // Use pointer coords to check for resize.
  8023. * left : false, // Disable resizing from left edge.
  8024. * bottom: '.resize-s',// Resize if pointer target matches selector
  8025. * right : handleEl // Resize if pointer target is the given Element
  8026. * },
  8027. *
  8028. * // Width and height can be adjusted independently. When `true`, width and
  8029. * // height are adjusted at a 1:1 ratio.
  8030. * square: false,
  8031. *
  8032. * // Width and height can be adjusted independently. When `true`, width and
  8033. * // height maintain the aspect ratio they had when resizing started.
  8034. * preserveAspectRatio: false,
  8035. *
  8036. * // a value of 'none' will limit the resize rect to a minimum of 0x0
  8037. * // 'negate' will allow the rect to have negative width/height
  8038. * // 'reposition' will keep the width/height positive by swapping
  8039. * // the top and bottom edges and/or swapping the left and right edges
  8040. * invert: 'none' || 'negate' || 'reposition'
  8041. *
  8042. * // limit multiple resizes.
  8043. * // See the explanation in the {@link Interactable.draggable} example
  8044. * max: Infinity,
  8045. * maxPerElement: 1,
  8046. * })
  8047. *
  8048. * var isResizeable = interact(element).resizable()
  8049. * ```
  8050. *
  8051. * Gets or sets whether resize actions can be performed on the target
  8052. *
  8053. * @param {boolean | object} [options] true/false or An object with event
  8054. * listeners to be fired on resize events (object makes the Interactable
  8055. * resizable)
  8056. * @return {boolean | Interactable} A boolean indicating if this can be the
  8057. * target of resize elements, or this Interactable
  8058. */
  8059. Interactable.prototype.resizable = function (options) {
  8060. return resizable(this, options, scope);
  8061. };
  8062. actions.map.resize = resize;
  8063. actions.methodDict.resize = 'resizable';
  8064. defaults.actions.resize = resize.defaults;
  8065. }
  8066. function resizeChecker(arg) {
  8067. const {
  8068. interaction,
  8069. interactable,
  8070. element,
  8071. rect,
  8072. buttons
  8073. } = arg;
  8074. if (!rect) {
  8075. return undefined;
  8076. }
  8077. const page = extend({}, interaction.coords.cur.page);
  8078. const resizeOptions = interactable.options.resize;
  8079. if (!(resizeOptions && resizeOptions.enabled) || // check mouseButton setting if the pointer is down
  8080. interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & resizeOptions.mouseButtons) === 0) {
  8081. return undefined;
  8082. } // if using resize.edges
  8083. if (is.object(resizeOptions.edges)) {
  8084. const resizeEdges = {
  8085. left: false,
  8086. right: false,
  8087. top: false,
  8088. bottom: false
  8089. };
  8090. for (const edge in resizeEdges) {
  8091. resizeEdges[edge] = checkResizeEdge(edge, resizeOptions.edges[edge], page, interaction._latestPointer.eventTarget, element, rect, resizeOptions.margin || resize.defaultMargin);
  8092. }
  8093. resizeEdges.left = resizeEdges.left && !resizeEdges.right;
  8094. resizeEdges.top = resizeEdges.top && !resizeEdges.bottom;
  8095. if (resizeEdges.left || resizeEdges.right || resizeEdges.top || resizeEdges.bottom) {
  8096. arg.action = {
  8097. name: 'resize',
  8098. edges: resizeEdges
  8099. };
  8100. }
  8101. } else {
  8102. const right = resizeOptions.axis !== 'y' && page.x > rect.right - resize.defaultMargin;
  8103. const bottom = resizeOptions.axis !== 'x' && page.y > rect.bottom - resize.defaultMargin;
  8104. if (right || bottom) {
  8105. arg.action = {
  8106. name: 'resize',
  8107. axes: (right ? 'x' : '') + (bottom ? 'y' : '')
  8108. };
  8109. }
  8110. }
  8111. return arg.action ? false : undefined;
  8112. }
  8113. function resizable(interactable, options, scope) {
  8114. if (is.object(options)) {
  8115. interactable.options.resize.enabled = options.enabled !== false;
  8116. interactable.setPerAction('resize', options);
  8117. interactable.setOnEvents('resize', options);
  8118. if (is.string(options.axis) && /^x$|^y$|^xy$/.test(options.axis)) {
  8119. interactable.options.resize.axis = options.axis;
  8120. } else if (options.axis === null) {
  8121. interactable.options.resize.axis = scope.defaults.actions.resize.axis;
  8122. }
  8123. if (is.bool(options.preserveAspectRatio)) {
  8124. interactable.options.resize.preserveAspectRatio = options.preserveAspectRatio;
  8125. } else if (is.bool(options.square)) {
  8126. interactable.options.resize.square = options.square;
  8127. }
  8128. return interactable;
  8129. }
  8130. if (is.bool(options)) {
  8131. interactable.options.resize.enabled = options;
  8132. return interactable;
  8133. }
  8134. return interactable.options.resize;
  8135. }
  8136. function checkResizeEdge(name, value, page, element, interactableElement, rect, margin) {
  8137. // false, '', undefined, null
  8138. if (!value) {
  8139. return false;
  8140. } // true value, use pointer coords and element rect
  8141. if (value === true) {
  8142. // if dimensions are negative, "switch" edges
  8143. const width = is.number(rect.width) ? rect.width : rect.right - rect.left;
  8144. const height = is.number(rect.height) ? rect.height : rect.bottom - rect.top; // don't use margin greater than half the relevent dimension
  8145. margin = Math.min(margin, Math.abs((name === 'left' || name === 'right' ? width : height) / 2));
  8146. if (width < 0) {
  8147. if (name === 'left') {
  8148. name = 'right';
  8149. } else if (name === 'right') {
  8150. name = 'left';
  8151. }
  8152. }
  8153. if (height < 0) {
  8154. if (name === 'top') {
  8155. name = 'bottom';
  8156. } else if (name === 'bottom') {
  8157. name = 'top';
  8158. }
  8159. }
  8160. if (name === 'left') {
  8161. return page.x < (width >= 0 ? rect.left : rect.right) + margin;
  8162. }
  8163. if (name === 'top') {
  8164. return page.y < (height >= 0 ? rect.top : rect.bottom) + margin;
  8165. }
  8166. if (name === 'right') {
  8167. return page.x > (width >= 0 ? rect.right : rect.left) - margin;
  8168. }
  8169. if (name === 'bottom') {
  8170. return page.y > (height >= 0 ? rect.bottom : rect.top) - margin;
  8171. }
  8172. } // the remaining checks require an element
  8173. if (!is.element(element)) {
  8174. return false;
  8175. }
  8176. return is.element(value) // the value is an element to use as a resize handle
  8177. ? value === element // otherwise check if element matches value as selector
  8178. : matchesUpTo(element, value, interactableElement);
  8179. }
  8180. /* eslint-disable multiline-ternary */
  8181. function initCursors(browser) {
  8182. return browser.isIe9 ? {
  8183. x: 'e-resize',
  8184. y: 's-resize',
  8185. xy: 'se-resize',
  8186. top: 'n-resize',
  8187. left: 'w-resize',
  8188. bottom: 's-resize',
  8189. right: 'e-resize',
  8190. topleft: 'se-resize',
  8191. bottomright: 'se-resize',
  8192. topright: 'ne-resize',
  8193. bottomleft: 'ne-resize'
  8194. } : {
  8195. x: 'ew-resize',
  8196. y: 'ns-resize',
  8197. xy: 'nwse-resize',
  8198. top: 'ns-resize',
  8199. left: 'ew-resize',
  8200. bottom: 'ns-resize',
  8201. right: 'ew-resize',
  8202. topleft: 'nwse-resize',
  8203. bottomright: 'nwse-resize',
  8204. topright: 'nesw-resize',
  8205. bottomleft: 'nesw-resize'
  8206. };
  8207. }
  8208. /* eslint-enable multiline-ternary */
  8209. function start({
  8210. iEvent,
  8211. interaction
  8212. }) {
  8213. if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
  8214. return;
  8215. }
  8216. const resizeEvent = iEvent;
  8217. const rect = interaction.rect;
  8218. interaction._rects = {
  8219. start: extend({}, rect),
  8220. corrected: extend({}, rect),
  8221. previous: extend({}, rect),
  8222. delta: {
  8223. left: 0,
  8224. right: 0,
  8225. width: 0,
  8226. top: 0,
  8227. bottom: 0,
  8228. height: 0
  8229. }
  8230. };
  8231. resizeEvent.edges = interaction.prepared.edges;
  8232. resizeEvent.rect = interaction._rects.corrected;
  8233. resizeEvent.deltaRect = interaction._rects.delta;
  8234. }
  8235. function plugin_move({
  8236. iEvent,
  8237. interaction
  8238. }) {
  8239. if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
  8240. return;
  8241. }
  8242. const resizeEvent = iEvent;
  8243. const resizeOptions = interaction.interactable.options.resize;
  8244. const invert = resizeOptions.invert;
  8245. const invertible = invert === 'reposition' || invert === 'negate';
  8246. const current = interaction.rect;
  8247. const {
  8248. start: startRect,
  8249. corrected,
  8250. delta: deltaRect,
  8251. previous
  8252. } = interaction._rects;
  8253. extend(previous, corrected);
  8254. if (invertible) {
  8255. // if invertible, copy the current rect
  8256. extend(corrected, current);
  8257. if (invert === 'reposition') {
  8258. // swap edge values if necessary to keep width/height positive
  8259. if (corrected.top > corrected.bottom) {
  8260. const swap = corrected.top;
  8261. corrected.top = corrected.bottom;
  8262. corrected.bottom = swap;
  8263. }
  8264. if (corrected.left > corrected.right) {
  8265. const swap = corrected.left;
  8266. corrected.left = corrected.right;
  8267. corrected.right = swap;
  8268. }
  8269. }
  8270. } else {
  8271. // if not invertible, restrict to minimum of 0x0 rect
  8272. corrected.top = Math.min(current.top, startRect.bottom);
  8273. corrected.bottom = Math.max(current.bottom, startRect.top);
  8274. corrected.left = Math.min(current.left, startRect.right);
  8275. corrected.right = Math.max(current.right, startRect.left);
  8276. }
  8277. corrected.width = corrected.right - corrected.left;
  8278. corrected.height = corrected.bottom - corrected.top;
  8279. for (const edge in corrected) {
  8280. deltaRect[edge] = corrected[edge] - previous[edge];
  8281. }
  8282. resizeEvent.edges = interaction.prepared.edges;
  8283. resizeEvent.rect = corrected;
  8284. resizeEvent.deltaRect = deltaRect;
  8285. }
  8286. function end({
  8287. iEvent,
  8288. interaction
  8289. }) {
  8290. if (interaction.prepared.name !== 'resize' || !interaction.prepared.edges) {
  8291. return;
  8292. }
  8293. const resizeEvent = iEvent;
  8294. resizeEvent.edges = interaction.prepared.edges;
  8295. resizeEvent.rect = interaction._rects.corrected;
  8296. resizeEvent.deltaRect = interaction._rects.delta;
  8297. }
  8298. function updateEventAxes({
  8299. iEvent,
  8300. interaction
  8301. }) {
  8302. if (interaction.prepared.name !== 'resize' || !interaction.resizeAxes) {
  8303. return;
  8304. }
  8305. const options = interaction.interactable.options;
  8306. const resizeEvent = iEvent;
  8307. if (options.resize.square) {
  8308. if (interaction.resizeAxes === 'y') {
  8309. resizeEvent.delta.x = resizeEvent.delta.y;
  8310. } else {
  8311. resizeEvent.delta.y = resizeEvent.delta.x;
  8312. }
  8313. resizeEvent.axes = 'xy';
  8314. } else {
  8315. resizeEvent.axes = interaction.resizeAxes;
  8316. if (interaction.resizeAxes === 'x') {
  8317. resizeEvent.delta.y = 0;
  8318. } else if (interaction.resizeAxes === 'y') {
  8319. resizeEvent.delta.x = 0;
  8320. }
  8321. }
  8322. }
  8323. const resize = {
  8324. id: 'actions/resize',
  8325. before: ['actions/drag'],
  8326. install: resize_plugin_install,
  8327. listeners: {
  8328. 'interactions:new': ({
  8329. interaction
  8330. }) => {
  8331. interaction.resizeAxes = 'xy';
  8332. },
  8333. 'interactions:action-start': arg => {
  8334. start(arg);
  8335. updateEventAxes(arg);
  8336. },
  8337. 'interactions:action-move': arg => {
  8338. plugin_move(arg);
  8339. updateEventAxes(arg);
  8340. },
  8341. 'interactions:action-end': end,
  8342. 'auto-start:check': resizeChecker
  8343. },
  8344. defaults: {
  8345. square: false,
  8346. preserveAspectRatio: false,
  8347. axis: 'xy',
  8348. // use default margin
  8349. margin: NaN,
  8350. // object with props left, right, top, bottom which are
  8351. // true/false values to resize when the pointer is over that edge,
  8352. // CSS selectors to match the handles for each direction
  8353. // or the Elements for each handle
  8354. edges: null,
  8355. // a value of 'none' will limit the resize rect to a minimum of 0x0
  8356. // 'negate' will alow the rect to have negative width/height
  8357. // 'reposition' will keep the width/height positive by swapping
  8358. // the top and bottom edges and/or swapping the left and right edges
  8359. invert: 'none'
  8360. },
  8361. cursors: null,
  8362. getCursor({
  8363. edges,
  8364. axis,
  8365. name
  8366. }) {
  8367. const cursors = resize.cursors;
  8368. let result = null;
  8369. if (axis) {
  8370. result = cursors[name + axis];
  8371. } else if (edges) {
  8372. let cursorKey = '';
  8373. for (const edge of ['top', 'bottom', 'left', 'right']) {
  8374. if (edges[edge]) {
  8375. cursorKey += edge;
  8376. }
  8377. }
  8378. result = cursors[cursorKey];
  8379. }
  8380. return result;
  8381. },
  8382. defaultMargin: null
  8383. };
  8384. /* harmony default export */ var resize_plugin = (resize);
  8385. //# sourceMappingURL=plugin.js.map
  8386. // CONCATENATED MODULE: ./node_modules/@interactjs/actions/resize/index.js
  8387. /* eslint-disable import/order, no-console, eol-last */
  8388. if (typeof window === 'object' && !!window) {
  8389. interact_init(window);
  8390. }
  8391. _interactjs_interact.use(resize_plugin);
  8392. //# sourceMappingURL=index.js.map
  8393. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/edgeTarget.js
  8394. /* harmony default export */ var edgeTarget = (() => {});
  8395. //# sourceMappingURL=edgeTarget.js.map
  8396. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/elements.js
  8397. /* harmony default export */ var snappers_elements = (() => {});
  8398. //# sourceMappingURL=elements.js.map
  8399. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/grid.js
  8400. /* harmony default export */ var grid = (grid => {
  8401. const coordFields = [['x', 'y'], ['left', 'top'], ['right', 'bottom'], ['width', 'height']].filter(([xField, yField]) => xField in grid || yField in grid);
  8402. const gridFunc = (x, y) => {
  8403. const {
  8404. range,
  8405. limits = {
  8406. left: -Infinity,
  8407. right: Infinity,
  8408. top: -Infinity,
  8409. bottom: Infinity
  8410. },
  8411. offset = {
  8412. x: 0,
  8413. y: 0
  8414. }
  8415. } = grid;
  8416. const result = {
  8417. range,
  8418. grid,
  8419. x: null,
  8420. y: null
  8421. };
  8422. for (const [xField, yField] of coordFields) {
  8423. const gridx = Math.round((x - offset.x) / grid[xField]);
  8424. const gridy = Math.round((y - offset.y) / grid[yField]);
  8425. result[xField] = Math.max(limits.left, Math.min(limits.right, gridx * grid[xField] + offset.x));
  8426. result[yField] = Math.max(limits.top, Math.min(limits.bottom, gridy * grid[yField] + offset.y));
  8427. }
  8428. return result;
  8429. };
  8430. gridFunc.grid = grid;
  8431. gridFunc.coordFields = coordFields;
  8432. return gridFunc;
  8433. });
  8434. //# sourceMappingURL=grid.js.map
  8435. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/all.js
  8436. //# sourceMappingURL=all.js.map
  8437. // CONCATENATED MODULE: ./node_modules/@interactjs/snappers/plugin.js
  8438. const snappersPlugin = {
  8439. id: 'snappers',
  8440. install(scope) {
  8441. const {
  8442. interactStatic: interact
  8443. } = scope;
  8444. interact.snappers = extend(interact.snappers || {}, all_namespaceObject);
  8445. interact.createSnapGrid = interact.snappers.grid;
  8446. }
  8447. };
  8448. /* harmony default export */ var snappers_plugin = (snappersPlugin);
  8449. //# sourceMappingURL=plugin.js.map
  8450. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/Modification.js
  8451. class Modification_Modification {
  8452. constructor(interaction) {
  8453. this.states = [];
  8454. this.startOffset = {
  8455. left: 0,
  8456. right: 0,
  8457. top: 0,
  8458. bottom: 0
  8459. };
  8460. this.startDelta = null;
  8461. this.result = null;
  8462. this.endResult = null;
  8463. this.edges = void 0;
  8464. this.interaction = void 0;
  8465. this.interaction = interaction;
  8466. this.result = createResult();
  8467. }
  8468. start({
  8469. phase
  8470. }, pageCoords) {
  8471. const {
  8472. interaction
  8473. } = this;
  8474. const modifierList = getModifierList(interaction);
  8475. this.prepareStates(modifierList);
  8476. this.edges = extend({}, interaction.edges);
  8477. this.startOffset = getRectOffset(interaction.rect, pageCoords);
  8478. this.startDelta = {
  8479. x: 0,
  8480. y: 0
  8481. };
  8482. const arg = {
  8483. phase,
  8484. pageCoords,
  8485. preEnd: false
  8486. };
  8487. this.result = createResult();
  8488. this.startAll(arg);
  8489. const result = this.result = this.setAll(arg);
  8490. return result;
  8491. }
  8492. fillArg(arg) {
  8493. const {
  8494. interaction
  8495. } = this;
  8496. arg.interaction = interaction;
  8497. arg.interactable = interaction.interactable;
  8498. arg.element = interaction.element;
  8499. arg.rect = arg.rect || interaction.rect;
  8500. arg.edges = this.edges;
  8501. arg.startOffset = this.startOffset;
  8502. }
  8503. startAll(arg) {
  8504. this.fillArg(arg);
  8505. for (const state of this.states) {
  8506. if (state.methods.start) {
  8507. arg.state = state;
  8508. state.methods.start(arg);
  8509. }
  8510. }
  8511. }
  8512. setAll(arg) {
  8513. this.fillArg(arg);
  8514. const {
  8515. phase,
  8516. preEnd,
  8517. skipModifiers,
  8518. rect: unmodifiedRect
  8519. } = arg;
  8520. arg.coords = extend({}, arg.pageCoords);
  8521. arg.rect = extend({}, unmodifiedRect);
  8522. const states = skipModifiers ? this.states.slice(skipModifiers) : this.states;
  8523. const newResult = createResult(arg.coords, arg.rect);
  8524. for (const state of states) {
  8525. const {
  8526. options
  8527. } = state;
  8528. const lastModifierCoords = extend({}, arg.coords);
  8529. let returnValue = null;
  8530. if (state.methods.set && this.shouldDo(options, preEnd, phase)) {
  8531. arg.state = state;
  8532. returnValue = state.methods.set(arg);
  8533. addEdges(this.interaction.edges, arg.rect, {
  8534. x: arg.coords.x - lastModifierCoords.x,
  8535. y: arg.coords.y - lastModifierCoords.y
  8536. });
  8537. }
  8538. newResult.eventProps.push(returnValue);
  8539. }
  8540. newResult.delta.x = arg.coords.x - arg.pageCoords.x;
  8541. newResult.delta.y = arg.coords.y - arg.pageCoords.y;
  8542. newResult.rectDelta.left = arg.rect.left - unmodifiedRect.left;
  8543. newResult.rectDelta.right = arg.rect.right - unmodifiedRect.right;
  8544. newResult.rectDelta.top = arg.rect.top - unmodifiedRect.top;
  8545. newResult.rectDelta.bottom = arg.rect.bottom - unmodifiedRect.bottom;
  8546. const prevCoords = this.result.coords;
  8547. const prevRect = this.result.rect;
  8548. if (prevCoords && prevRect) {
  8549. const rectChanged = newResult.rect.left !== prevRect.left || newResult.rect.right !== prevRect.right || newResult.rect.top !== prevRect.top || newResult.rect.bottom !== prevRect.bottom;
  8550. newResult.changed = rectChanged || prevCoords.x !== newResult.coords.x || prevCoords.y !== newResult.coords.y;
  8551. }
  8552. return newResult;
  8553. }
  8554. applyToInteraction(arg) {
  8555. const {
  8556. interaction
  8557. } = this;
  8558. const {
  8559. phase
  8560. } = arg;
  8561. const curCoords = interaction.coords.cur;
  8562. const startCoords = interaction.coords.start;
  8563. const {
  8564. result,
  8565. startDelta
  8566. } = this;
  8567. const curDelta = result.delta;
  8568. if (phase === 'start') {
  8569. extend(this.startDelta, result.delta);
  8570. }
  8571. for (const [coordsSet, delta] of [[startCoords, startDelta], [curCoords, curDelta]]) {
  8572. coordsSet.page.x += delta.x;
  8573. coordsSet.page.y += delta.y;
  8574. coordsSet.client.x += delta.x;
  8575. coordsSet.client.y += delta.y;
  8576. }
  8577. const {
  8578. rectDelta
  8579. } = this.result;
  8580. const rect = arg.rect || interaction.rect;
  8581. rect.left += rectDelta.left;
  8582. rect.right += rectDelta.right;
  8583. rect.top += rectDelta.top;
  8584. rect.bottom += rectDelta.bottom;
  8585. rect.width = rect.right - rect.left;
  8586. rect.height = rect.bottom - rect.top;
  8587. }
  8588. setAndApply(arg) {
  8589. const {
  8590. interaction
  8591. } = this;
  8592. const {
  8593. phase,
  8594. preEnd,
  8595. skipModifiers
  8596. } = arg;
  8597. const result = this.setAll({
  8598. preEnd,
  8599. phase,
  8600. pageCoords: arg.modifiedCoords || interaction.coords.cur.page
  8601. });
  8602. this.result = result; // don't fire an action move if a modifier would keep the event in the same
  8603. // cordinates as before
  8604. if (!result.changed && (!skipModifiers || skipModifiers < this.states.length) && interaction.interacting()) {
  8605. return false;
  8606. }
  8607. if (arg.modifiedCoords) {
  8608. const {
  8609. page
  8610. } = interaction.coords.cur;
  8611. const adjustment = {
  8612. x: arg.modifiedCoords.x - page.x,
  8613. y: arg.modifiedCoords.y - page.y
  8614. };
  8615. result.coords.x += adjustment.x;
  8616. result.coords.y += adjustment.y;
  8617. result.delta.x += adjustment.x;
  8618. result.delta.y += adjustment.y;
  8619. }
  8620. this.applyToInteraction(arg);
  8621. }
  8622. beforeEnd(arg) {
  8623. const {
  8624. interaction,
  8625. event
  8626. } = arg;
  8627. const states = this.states;
  8628. if (!states || !states.length) {
  8629. return;
  8630. }
  8631. let doPreend = false;
  8632. for (const state of states) {
  8633. arg.state = state;
  8634. const {
  8635. options,
  8636. methods
  8637. } = state;
  8638. const endPosition = methods.beforeEnd && methods.beforeEnd(arg);
  8639. if (endPosition) {
  8640. this.endResult = endPosition;
  8641. return false;
  8642. }
  8643. doPreend = doPreend || !doPreend && this.shouldDo(options, true, arg.phase, true);
  8644. }
  8645. if (doPreend) {
  8646. // trigger a final modified move before ending
  8647. interaction.move({
  8648. event,
  8649. preEnd: true
  8650. });
  8651. }
  8652. }
  8653. stop(arg) {
  8654. const {
  8655. interaction
  8656. } = arg;
  8657. if (!this.states || !this.states.length) {
  8658. return;
  8659. }
  8660. const modifierArg = extend({
  8661. states: this.states,
  8662. interactable: interaction.interactable,
  8663. element: interaction.element,
  8664. rect: null
  8665. }, arg);
  8666. this.fillArg(modifierArg);
  8667. for (const state of this.states) {
  8668. modifierArg.state = state;
  8669. if (state.methods.stop) {
  8670. state.methods.stop(modifierArg);
  8671. }
  8672. }
  8673. this.states = null;
  8674. this.endResult = null;
  8675. }
  8676. prepareStates(modifierList) {
  8677. this.states = [];
  8678. for (let index = 0; index < modifierList.length; index++) {
  8679. const {
  8680. options,
  8681. methods,
  8682. name
  8683. } = modifierList[index];
  8684. this.states.push({
  8685. options,
  8686. methods,
  8687. index,
  8688. name
  8689. });
  8690. }
  8691. return this.states;
  8692. }
  8693. restoreInteractionCoords({
  8694. interaction: {
  8695. coords,
  8696. rect,
  8697. modification
  8698. }
  8699. }) {
  8700. if (!modification.result) {
  8701. return;
  8702. }
  8703. const {
  8704. startDelta
  8705. } = modification;
  8706. const {
  8707. delta: curDelta,
  8708. rectDelta
  8709. } = modification.result;
  8710. const coordsAndDeltas = [[coords.start, startDelta], [coords.cur, curDelta]];
  8711. for (const [coordsSet, delta] of coordsAndDeltas) {
  8712. coordsSet.page.x -= delta.x;
  8713. coordsSet.page.y -= delta.y;
  8714. coordsSet.client.x -= delta.x;
  8715. coordsSet.client.y -= delta.y;
  8716. }
  8717. rect.left -= rectDelta.left;
  8718. rect.right -= rectDelta.right;
  8719. rect.top -= rectDelta.top;
  8720. rect.bottom -= rectDelta.bottom;
  8721. }
  8722. shouldDo(options, preEnd, phase, requireEndOnly) {
  8723. if ( // ignore disabled modifiers
  8724. !options || options.enabled === false || // check if we require endOnly option to fire move before end
  8725. requireEndOnly && !options.endOnly || // don't apply endOnly modifiers when not ending
  8726. options.endOnly && !preEnd || // check if modifier should run be applied on start
  8727. phase === 'start' && !options.setStart) {
  8728. return false;
  8729. }
  8730. return true;
  8731. }
  8732. copyFrom(other) {
  8733. this.startOffset = other.startOffset;
  8734. this.startDelta = other.startDelta;
  8735. this.edges = other.edges;
  8736. this.states = other.states.map(s => clone(s));
  8737. this.result = createResult(extend({}, other.result.coords), extend({}, other.result.rect));
  8738. }
  8739. destroy() {
  8740. for (const prop in this) {
  8741. this[prop] = null;
  8742. }
  8743. }
  8744. }
  8745. function createResult(coords, rect) {
  8746. return {
  8747. rect,
  8748. coords,
  8749. delta: {
  8750. x: 0,
  8751. y: 0
  8752. },
  8753. rectDelta: {
  8754. left: 0,
  8755. right: 0,
  8756. top: 0,
  8757. bottom: 0
  8758. },
  8759. eventProps: [],
  8760. changed: true
  8761. };
  8762. }
  8763. function getModifierList(interaction) {
  8764. const actionOptions = interaction.interactable.options[interaction.prepared.name];
  8765. const actionModifiers = actionOptions.modifiers;
  8766. if (actionModifiers && actionModifiers.length) {
  8767. return actionModifiers;
  8768. }
  8769. return ['snap', 'snapSize', 'snapEdges', 'restrict', 'restrictEdges', 'restrictSize'].map(type => {
  8770. const options = actionOptions[type];
  8771. return options && options.enabled && {
  8772. options,
  8773. methods: options._methods
  8774. };
  8775. }).filter(m => !!m);
  8776. }
  8777. function getRectOffset(rect, coords) {
  8778. return rect ? {
  8779. left: coords.x - rect.left,
  8780. top: coords.y - rect.top,
  8781. right: rect.right - coords.x,
  8782. bottom: rect.bottom - coords.y
  8783. } : {
  8784. left: 0,
  8785. top: 0,
  8786. right: 0,
  8787. bottom: 0
  8788. };
  8789. }
  8790. //# sourceMappingURL=Modification.js.map
  8791. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/base.js
  8792. function makeModifier(module, name) {
  8793. const {
  8794. defaults
  8795. } = module;
  8796. const methods = {
  8797. start: module.start,
  8798. set: module.set,
  8799. beforeEnd: module.beforeEnd,
  8800. stop: module.stop
  8801. };
  8802. const modifier = _options => {
  8803. const options = _options || {};
  8804. options.enabled = options.enabled !== false; // add missing defaults to options
  8805. for (const prop in defaults) {
  8806. if (!(prop in options)) {
  8807. options[prop] = defaults[prop];
  8808. }
  8809. }
  8810. const m = {
  8811. options,
  8812. methods,
  8813. name,
  8814. enable: () => {
  8815. options.enabled = true;
  8816. return m;
  8817. },
  8818. disable: () => {
  8819. options.enabled = false;
  8820. return m;
  8821. }
  8822. };
  8823. return m;
  8824. };
  8825. if (name && typeof name === 'string') {
  8826. // for backwrads compatibility
  8827. modifier._defaults = defaults;
  8828. modifier._methods = methods;
  8829. }
  8830. return modifier;
  8831. }
  8832. function addEventModifiers({
  8833. iEvent,
  8834. interaction: {
  8835. modification: {
  8836. result
  8837. }
  8838. }
  8839. }) {
  8840. if (result) {
  8841. iEvent.modifiers = result.eventProps;
  8842. }
  8843. }
  8844. const modifiersBase = {
  8845. id: 'modifiers/base',
  8846. before: ['actions'],
  8847. install: scope => {
  8848. scope.defaults.perAction.modifiers = [];
  8849. },
  8850. listeners: {
  8851. 'interactions:new': ({
  8852. interaction
  8853. }) => {
  8854. interaction.modification = new Modification_Modification(interaction);
  8855. },
  8856. 'interactions:before-action-start': arg => {
  8857. const {
  8858. modification
  8859. } = arg.interaction;
  8860. modification.start(arg, arg.interaction.coords.start.page);
  8861. arg.interaction.edges = modification.edges;
  8862. modification.applyToInteraction(arg);
  8863. },
  8864. 'interactions:before-action-move': arg => arg.interaction.modification.setAndApply(arg),
  8865. 'interactions:before-action-end': arg => arg.interaction.modification.beforeEnd(arg),
  8866. 'interactions:action-start': addEventModifiers,
  8867. 'interactions:action-move': addEventModifiers,
  8868. 'interactions:action-end': addEventModifiers,
  8869. 'interactions:after-action-start': arg => arg.interaction.modification.restoreInteractionCoords(arg),
  8870. 'interactions:after-action-move': arg => arg.interaction.modification.restoreInteractionCoords(arg),
  8871. 'interactions:stop': arg => arg.interaction.modification.stop(arg)
  8872. }
  8873. };
  8874. /* harmony default export */ var modifiers_base = (modifiersBase);
  8875. //# sourceMappingURL=base.js.map
  8876. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/aspectRatio.js
  8877. /**
  8878. * @module modifiers/aspectRatio
  8879. *
  8880. * @description
  8881. * This module forces elements to be resized with a specified dx/dy ratio.
  8882. *
  8883. * ```js
  8884. * interact(target).resizable({
  8885. * modifiers: [
  8886. * interact.modifiers.snapSize({
  8887. * targets: [ interact.snappers.grid({ x: 20, y: 20 }) ],
  8888. * }),
  8889. * interact.aspectRatio({ ratio: 'preserve' }),
  8890. * ],
  8891. * });
  8892. * ```
  8893. */
  8894. const aspectRatio = {
  8895. start(arg) {
  8896. const {
  8897. state,
  8898. rect,
  8899. edges: originalEdges,
  8900. pageCoords: coords
  8901. } = arg;
  8902. let {
  8903. ratio
  8904. } = state.options;
  8905. const {
  8906. equalDelta,
  8907. modifiers
  8908. } = state.options;
  8909. if (ratio === 'preserve') {
  8910. ratio = rect.width / rect.height;
  8911. }
  8912. state.startCoords = extend({}, coords);
  8913. state.startRect = extend({}, rect);
  8914. state.ratio = ratio;
  8915. state.equalDelta = equalDelta;
  8916. const linkedEdges = state.linkedEdges = {
  8917. top: originalEdges.top || originalEdges.left && !originalEdges.bottom,
  8918. left: originalEdges.left || originalEdges.top && !originalEdges.right,
  8919. bottom: originalEdges.bottom || originalEdges.right && !originalEdges.top,
  8920. right: originalEdges.right || originalEdges.bottom && !originalEdges.left
  8921. };
  8922. state.xIsPrimaryAxis = !!(originalEdges.left || originalEdges.right);
  8923. if (state.equalDelta) {
  8924. state.edgeSign = (linkedEdges.left ? 1 : -1) * (linkedEdges.top ? 1 : -1);
  8925. } else {
  8926. const negativeSecondaryEdge = state.xIsPrimaryAxis ? linkedEdges.top : linkedEdges.left;
  8927. state.edgeSign = negativeSecondaryEdge ? -1 : 1;
  8928. }
  8929. extend(arg.edges, linkedEdges);
  8930. if (!modifiers || !modifiers.length) {
  8931. return;
  8932. }
  8933. const subModification = new Modification_Modification(arg.interaction);
  8934. subModification.copyFrom(arg.interaction.modification);
  8935. subModification.prepareStates(modifiers);
  8936. state.subModification = subModification;
  8937. subModification.startAll({ ...arg
  8938. });
  8939. },
  8940. set(arg) {
  8941. const {
  8942. state,
  8943. rect,
  8944. coords
  8945. } = arg;
  8946. const initialCoords = extend({}, coords);
  8947. const aspectMethod = state.equalDelta ? setEqualDelta : setRatio;
  8948. aspectMethod(state, state.xIsPrimaryAxis, coords, rect);
  8949. if (!state.subModification) {
  8950. return null;
  8951. }
  8952. const correctedRect = extend({}, rect);
  8953. addEdges(state.linkedEdges, correctedRect, {
  8954. x: coords.x - initialCoords.x,
  8955. y: coords.y - initialCoords.y
  8956. });
  8957. const result = state.subModification.setAll({ ...arg,
  8958. rect: correctedRect,
  8959. edges: state.linkedEdges,
  8960. pageCoords: coords,
  8961. prevCoords: coords,
  8962. prevRect: correctedRect
  8963. });
  8964. const {
  8965. delta
  8966. } = result;
  8967. if (result.changed) {
  8968. const xIsCriticalAxis = Math.abs(delta.x) > Math.abs(delta.y); // do aspect modification again with critical edge axis as primary
  8969. aspectMethod(state, xIsCriticalAxis, result.coords, result.rect);
  8970. extend(coords, result.coords);
  8971. }
  8972. return result.eventProps;
  8973. },
  8974. defaults: {
  8975. ratio: 'preserve',
  8976. equalDelta: false,
  8977. modifiers: [],
  8978. enabled: false
  8979. }
  8980. };
  8981. function setEqualDelta({
  8982. startCoords,
  8983. edgeSign
  8984. }, xIsPrimaryAxis, coords) {
  8985. if (xIsPrimaryAxis) {
  8986. coords.y = startCoords.y + (coords.x - startCoords.x) * edgeSign;
  8987. } else {
  8988. coords.x = startCoords.x + (coords.y - startCoords.y) * edgeSign;
  8989. }
  8990. }
  8991. function setRatio({
  8992. startRect,
  8993. startCoords,
  8994. ratio,
  8995. edgeSign
  8996. }, xIsPrimaryAxis, coords, rect) {
  8997. if (xIsPrimaryAxis) {
  8998. const newHeight = rect.width / ratio;
  8999. coords.y = startCoords.y + (newHeight - startRect.height) * edgeSign;
  9000. } else {
  9001. const newWidth = rect.height * ratio;
  9002. coords.x = startCoords.x + (newWidth - startRect.width) * edgeSign;
  9003. }
  9004. }
  9005. /* harmony default export */ var modifiers_aspectRatio = (makeModifier(aspectRatio, 'aspectRatio'));
  9006. //# sourceMappingURL=aspectRatio.js.map
  9007. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/noop.js
  9008. const noop = () => {};
  9009. noop._defaults = {};
  9010. /* harmony default export */ var modifiers_noop = (noop);
  9011. //# sourceMappingURL=noop.js.map
  9012. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/pointer.js
  9013. function pointer_start({
  9014. rect,
  9015. startOffset,
  9016. state,
  9017. interaction,
  9018. pageCoords
  9019. }) {
  9020. const {
  9021. options
  9022. } = state;
  9023. const {
  9024. elementRect
  9025. } = options;
  9026. const offset = extend({
  9027. left: 0,
  9028. top: 0,
  9029. right: 0,
  9030. bottom: 0
  9031. }, options.offset || {});
  9032. if (rect && elementRect) {
  9033. const restriction = getRestrictionRect(options.restriction, interaction, pageCoords);
  9034. if (restriction) {
  9035. const widthDiff = restriction.right - restriction.left - rect.width;
  9036. const heightDiff = restriction.bottom - restriction.top - rect.height;
  9037. if (widthDiff < 0) {
  9038. offset.left += widthDiff;
  9039. offset.right += widthDiff;
  9040. }
  9041. if (heightDiff < 0) {
  9042. offset.top += heightDiff;
  9043. offset.bottom += heightDiff;
  9044. }
  9045. }
  9046. offset.left += startOffset.left - rect.width * elementRect.left;
  9047. offset.top += startOffset.top - rect.height * elementRect.top;
  9048. offset.right += startOffset.right - rect.width * (1 - elementRect.right);
  9049. offset.bottom += startOffset.bottom - rect.height * (1 - elementRect.bottom);
  9050. }
  9051. state.offset = offset;
  9052. }
  9053. function set({
  9054. coords,
  9055. interaction,
  9056. state
  9057. }) {
  9058. const {
  9059. options,
  9060. offset
  9061. } = state;
  9062. const restriction = getRestrictionRect(options.restriction, interaction, coords);
  9063. if (!restriction) {
  9064. return;
  9065. }
  9066. const rect = xywhToTlbr(restriction);
  9067. coords.x = Math.max(Math.min(rect.right - offset.right, coords.x), rect.left + offset.left);
  9068. coords.y = Math.max(Math.min(rect.bottom - offset.bottom, coords.y), rect.top + offset.top);
  9069. }
  9070. function getRestrictionRect(value, interaction, coords) {
  9071. if (is.func(value)) {
  9072. return resolveRectLike(value, interaction.interactable, interaction.element, [coords.x, coords.y, interaction]);
  9073. } else {
  9074. return resolveRectLike(value, interaction.interactable, interaction.element);
  9075. }
  9076. }
  9077. const pointer_defaults = {
  9078. restriction: null,
  9079. elementRect: null,
  9080. offset: null,
  9081. endOnly: false,
  9082. enabled: false
  9083. };
  9084. const restrict = {
  9085. start: pointer_start,
  9086. set,
  9087. defaults: pointer_defaults
  9088. };
  9089. /* harmony default export */ var restrict_pointer = (makeModifier(restrict, 'restrict'));
  9090. //# sourceMappingURL=pointer.js.map
  9091. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/edges.js
  9092. // This module adds the options.resize.restrictEdges setting which sets min and
  9093. // max for the top, left, bottom and right edges of the target being resized.
  9094. //
  9095. // interact(target).resize({
  9096. // edges: { top: true, left: true },
  9097. // restrictEdges: {
  9098. // inner: { top: 200, left: 200, right: 400, bottom: 400 },
  9099. // outer: { top: 0, left: 0, right: 600, bottom: 600 },
  9100. // },
  9101. // })
  9102. const noInner = {
  9103. top: +Infinity,
  9104. left: +Infinity,
  9105. bottom: -Infinity,
  9106. right: -Infinity
  9107. };
  9108. const noOuter = {
  9109. top: -Infinity,
  9110. left: -Infinity,
  9111. bottom: +Infinity,
  9112. right: +Infinity
  9113. };
  9114. function edges_start({
  9115. interaction,
  9116. startOffset,
  9117. state
  9118. }) {
  9119. const {
  9120. options
  9121. } = state;
  9122. let offset;
  9123. if (options) {
  9124. const offsetRect = getRestrictionRect(options.offset, interaction, interaction.coords.start.page);
  9125. offset = rectToXY(offsetRect);
  9126. }
  9127. offset = offset || {
  9128. x: 0,
  9129. y: 0
  9130. };
  9131. state.offset = {
  9132. top: offset.y + startOffset.top,
  9133. left: offset.x + startOffset.left,
  9134. bottom: offset.y - startOffset.bottom,
  9135. right: offset.x - startOffset.right
  9136. };
  9137. }
  9138. function edges_set({
  9139. coords,
  9140. edges,
  9141. interaction,
  9142. state
  9143. }) {
  9144. const {
  9145. offset,
  9146. options
  9147. } = state;
  9148. if (!edges) {
  9149. return;
  9150. }
  9151. const page = extend({}, coords);
  9152. const inner = getRestrictionRect(options.inner, interaction, page) || {};
  9153. const outer = getRestrictionRect(options.outer, interaction, page) || {};
  9154. fixRect(inner, noInner);
  9155. fixRect(outer, noOuter);
  9156. if (edges.top) {
  9157. coords.y = Math.min(Math.max(outer.top + offset.top, page.y), inner.top + offset.top);
  9158. } else if (edges.bottom) {
  9159. coords.y = Math.max(Math.min(outer.bottom + offset.bottom, page.y), inner.bottom + offset.bottom);
  9160. }
  9161. if (edges.left) {
  9162. coords.x = Math.min(Math.max(outer.left + offset.left, page.x), inner.left + offset.left);
  9163. } else if (edges.right) {
  9164. coords.x = Math.max(Math.min(outer.right + offset.right, page.x), inner.right + offset.right);
  9165. }
  9166. }
  9167. function fixRect(rect, defaults) {
  9168. for (const edge of ['top', 'left', 'bottom', 'right']) {
  9169. if (!(edge in rect)) {
  9170. rect[edge] = defaults[edge];
  9171. }
  9172. }
  9173. return rect;
  9174. }
  9175. const edges_defaults = {
  9176. inner: null,
  9177. outer: null,
  9178. offset: null,
  9179. endOnly: false,
  9180. enabled: false
  9181. };
  9182. const restrictEdges = {
  9183. noInner,
  9184. noOuter,
  9185. start: edges_start,
  9186. set: edges_set,
  9187. defaults: edges_defaults
  9188. };
  9189. /* harmony default export */ var restrict_edges = (makeModifier(restrictEdges, 'restrictEdges'));
  9190. //# sourceMappingURL=edges.js.map
  9191. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/rect.js
  9192. const rect_defaults = extend({
  9193. get elementRect() {
  9194. return {
  9195. top: 0,
  9196. left: 0,
  9197. bottom: 1,
  9198. right: 1
  9199. };
  9200. },
  9201. set elementRect(_) {}
  9202. }, restrict.defaults);
  9203. const restrictRect = {
  9204. start: restrict.start,
  9205. set: restrict.set,
  9206. defaults: rect_defaults
  9207. };
  9208. /* harmony default export */ var restrict_rect = (makeModifier(restrictRect, 'restrictRect'));
  9209. //# sourceMappingURL=rect.js.map
  9210. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/restrict/size.js
  9211. const noMin = {
  9212. width: -Infinity,
  9213. height: -Infinity
  9214. };
  9215. const noMax = {
  9216. width: +Infinity,
  9217. height: +Infinity
  9218. };
  9219. function size_start(arg) {
  9220. return restrictEdges.start(arg);
  9221. }
  9222. function size_set(arg) {
  9223. const {
  9224. interaction,
  9225. state,
  9226. rect,
  9227. edges
  9228. } = arg;
  9229. const {
  9230. options
  9231. } = state;
  9232. if (!edges) {
  9233. return;
  9234. }
  9235. const minSize = tlbrToXywh(getRestrictionRect(options.min, interaction, arg.coords)) || noMin;
  9236. const maxSize = tlbrToXywh(getRestrictionRect(options.max, interaction, arg.coords)) || noMax;
  9237. state.options = {
  9238. endOnly: options.endOnly,
  9239. inner: extend({}, restrictEdges.noInner),
  9240. outer: extend({}, restrictEdges.noOuter)
  9241. };
  9242. if (edges.top) {
  9243. state.options.inner.top = rect.bottom - minSize.height;
  9244. state.options.outer.top = rect.bottom - maxSize.height;
  9245. } else if (edges.bottom) {
  9246. state.options.inner.bottom = rect.top + minSize.height;
  9247. state.options.outer.bottom = rect.top + maxSize.height;
  9248. }
  9249. if (edges.left) {
  9250. state.options.inner.left = rect.right - minSize.width;
  9251. state.options.outer.left = rect.right - maxSize.width;
  9252. } else if (edges.right) {
  9253. state.options.inner.right = rect.left + minSize.width;
  9254. state.options.outer.right = rect.left + maxSize.width;
  9255. }
  9256. restrictEdges.set(arg);
  9257. state.options = options;
  9258. }
  9259. const size_defaults = {
  9260. min: null,
  9261. max: null,
  9262. endOnly: false,
  9263. enabled: false
  9264. };
  9265. const restrictSize = {
  9266. start: size_start,
  9267. set: size_set,
  9268. defaults: size_defaults
  9269. };
  9270. /* harmony default export */ var size = (makeModifier(restrictSize, 'restrictSize'));
  9271. //# sourceMappingURL=size.js.map
  9272. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/pointer.js
  9273. function snap_pointer_start(arg) {
  9274. const {
  9275. interaction,
  9276. interactable,
  9277. element,
  9278. rect,
  9279. state,
  9280. startOffset
  9281. } = arg;
  9282. const {
  9283. options
  9284. } = state;
  9285. const origin = options.offsetWithOrigin ? getOrigin(arg) : {
  9286. x: 0,
  9287. y: 0
  9288. };
  9289. let snapOffset;
  9290. if (options.offset === 'startCoords') {
  9291. snapOffset = {
  9292. x: interaction.coords.start.page.x,
  9293. y: interaction.coords.start.page.y
  9294. };
  9295. } else {
  9296. const offsetRect = resolveRectLike(options.offset, interactable, element, [interaction]);
  9297. snapOffset = rectToXY(offsetRect) || {
  9298. x: 0,
  9299. y: 0
  9300. };
  9301. snapOffset.x += origin.x;
  9302. snapOffset.y += origin.y;
  9303. }
  9304. const {
  9305. relativePoints
  9306. } = options;
  9307. state.offsets = rect && relativePoints && relativePoints.length ? relativePoints.map((relativePoint, index) => ({
  9308. index,
  9309. relativePoint,
  9310. x: startOffset.left - rect.width * relativePoint.x + snapOffset.x,
  9311. y: startOffset.top - rect.height * relativePoint.y + snapOffset.y
  9312. })) : [extend({
  9313. index: 0,
  9314. relativePoint: null
  9315. }, snapOffset)];
  9316. }
  9317. function pointer_set(arg) {
  9318. const {
  9319. interaction,
  9320. coords,
  9321. state
  9322. } = arg;
  9323. const {
  9324. options,
  9325. offsets
  9326. } = state;
  9327. const origin = getOriginXY(interaction.interactable, interaction.element, interaction.prepared.name);
  9328. const page = extend({}, coords);
  9329. const targets = [];
  9330. if (!options.offsetWithOrigin) {
  9331. page.x -= origin.x;
  9332. page.y -= origin.y;
  9333. }
  9334. for (const offset of offsets) {
  9335. const relativeX = page.x - offset.x;
  9336. const relativeY = page.y - offset.y;
  9337. for (let index = 0, len = options.targets.length; index < len; index++) {
  9338. const snapTarget = options.targets[index];
  9339. let target;
  9340. if (is.func(snapTarget)) {
  9341. target = snapTarget(relativeX, relativeY, interaction._proxy, offset, index);
  9342. } else {
  9343. target = snapTarget;
  9344. }
  9345. if (!target) {
  9346. continue;
  9347. }
  9348. targets.push({
  9349. x: (is.number(target.x) ? target.x : relativeX) + offset.x,
  9350. y: (is.number(target.y) ? target.y : relativeY) + offset.y,
  9351. range: is.number(target.range) ? target.range : options.range,
  9352. source: snapTarget,
  9353. index,
  9354. offset
  9355. });
  9356. }
  9357. }
  9358. const closest = {
  9359. target: null,
  9360. inRange: false,
  9361. distance: 0,
  9362. range: 0,
  9363. delta: {
  9364. x: 0,
  9365. y: 0
  9366. }
  9367. };
  9368. for (const target of targets) {
  9369. const range = target.range;
  9370. const dx = target.x - page.x;
  9371. const dy = target.y - page.y;
  9372. const distance = hypot(dx, dy);
  9373. let inRange = distance <= range; // Infinite targets count as being out of range
  9374. // compared to non infinite ones that are in range
  9375. if (range === Infinity && closest.inRange && closest.range !== Infinity) {
  9376. inRange = false;
  9377. }
  9378. if (!closest.target || (inRange // is the closest target in range?
  9379. ? closest.inRange && range !== Infinity // the pointer is relatively deeper in this target
  9380. ? distance / range < closest.distance / closest.range // this target has Infinite range and the closest doesn't
  9381. : range === Infinity && closest.range !== Infinity || // OR this target is closer that the previous closest
  9382. distance < closest.distance : // The other is not in range and the pointer is closer to this target
  9383. !closest.inRange && distance < closest.distance)) {
  9384. closest.target = target;
  9385. closest.distance = distance;
  9386. closest.range = range;
  9387. closest.inRange = inRange;
  9388. closest.delta.x = dx;
  9389. closest.delta.y = dy;
  9390. }
  9391. }
  9392. if (closest.inRange) {
  9393. coords.x = closest.target.x;
  9394. coords.y = closest.target.y;
  9395. }
  9396. state.closest = closest;
  9397. return closest;
  9398. }
  9399. function getOrigin(arg) {
  9400. const {
  9401. element
  9402. } = arg.interaction;
  9403. const optionsOrigin = rectToXY(resolveRectLike(arg.state.options.origin, null, null, [element]));
  9404. const origin = optionsOrigin || getOriginXY(arg.interactable, element, arg.interaction.prepared.name);
  9405. return origin;
  9406. }
  9407. const snap_pointer_defaults = {
  9408. range: Infinity,
  9409. targets: null,
  9410. offset: null,
  9411. offsetWithOrigin: true,
  9412. origin: null,
  9413. relativePoints: null,
  9414. endOnly: false,
  9415. enabled: false
  9416. };
  9417. const snap = {
  9418. start: snap_pointer_start,
  9419. set: pointer_set,
  9420. defaults: snap_pointer_defaults
  9421. };
  9422. /* harmony default export */ var snap_pointer = (makeModifier(snap, 'snap'));
  9423. //# sourceMappingURL=pointer.js.map
  9424. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/size.js
  9425. // This module allows snapping of the size of targets during resize
  9426. // interactions.
  9427. function snap_size_start(arg) {
  9428. const {
  9429. state,
  9430. edges
  9431. } = arg;
  9432. const {
  9433. options
  9434. } = state;
  9435. if (!edges) {
  9436. return null;
  9437. }
  9438. arg.state = {
  9439. options: {
  9440. targets: null,
  9441. relativePoints: [{
  9442. x: edges.left ? 0 : 1,
  9443. y: edges.top ? 0 : 1
  9444. }],
  9445. offset: options.offset || 'self',
  9446. origin: {
  9447. x: 0,
  9448. y: 0
  9449. },
  9450. range: options.range
  9451. }
  9452. };
  9453. state.targetFields = state.targetFields || [['width', 'height'], ['x', 'y']];
  9454. snap.start(arg);
  9455. state.offsets = arg.state.offsets;
  9456. arg.state = state;
  9457. }
  9458. function snap_size_set(arg) {
  9459. const {
  9460. interaction,
  9461. state,
  9462. coords
  9463. } = arg;
  9464. const {
  9465. options,
  9466. offsets
  9467. } = state;
  9468. const relative = {
  9469. x: coords.x - offsets[0].x,
  9470. y: coords.y - offsets[0].y
  9471. };
  9472. state.options = extend({}, options);
  9473. state.options.targets = [];
  9474. for (const snapTarget of options.targets || []) {
  9475. let target;
  9476. if (is.func(snapTarget)) {
  9477. target = snapTarget(relative.x, relative.y, interaction);
  9478. } else {
  9479. target = snapTarget;
  9480. }
  9481. if (!target) {
  9482. continue;
  9483. }
  9484. for (const [xField, yField] of state.targetFields) {
  9485. if (xField in target || yField in target) {
  9486. target.x = target[xField];
  9487. target.y = target[yField];
  9488. break;
  9489. }
  9490. }
  9491. state.options.targets.push(target);
  9492. }
  9493. const returnValue = snap.set(arg);
  9494. state.options = options;
  9495. return returnValue;
  9496. }
  9497. const snap_size_defaults = {
  9498. range: Infinity,
  9499. targets: null,
  9500. offset: null,
  9501. endOnly: false,
  9502. enabled: false
  9503. };
  9504. const snapSize = {
  9505. start: snap_size_start,
  9506. set: snap_size_set,
  9507. defaults: snap_size_defaults
  9508. };
  9509. /* harmony default export */ var snap_size = (makeModifier(snapSize, 'snapSize'));
  9510. //# sourceMappingURL=size.js.map
  9511. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/snap/edges.js
  9512. /**
  9513. * @module modifiers/snapEdges
  9514. *
  9515. * @description
  9516. * WOW> This module allows snapping of the edges of targets during resize
  9517. * interactions.
  9518. *
  9519. * ```js
  9520. * interact(target).resizable({
  9521. * snapEdges: {
  9522. * targets: [interact.snappers.grid({ x: 100, y: 50 })],
  9523. * },
  9524. * })
  9525. *
  9526. * interact(target).resizable({
  9527. * snapEdges: {
  9528. * targets: [
  9529. * interact.snappers.grid({
  9530. * top: 50,
  9531. * left: 50,
  9532. * bottom: 100,
  9533. * right: 100,
  9534. * }),
  9535. * ],
  9536. * },
  9537. * })
  9538. * ```
  9539. */
  9540. function snap_edges_start(arg) {
  9541. const {
  9542. edges
  9543. } = arg;
  9544. if (!edges) {
  9545. return null;
  9546. }
  9547. arg.state.targetFields = arg.state.targetFields || [[edges.left ? 'left' : 'right', edges.top ? 'top' : 'bottom']];
  9548. return snapSize.start(arg);
  9549. }
  9550. const snapEdges = {
  9551. start: snap_edges_start,
  9552. set: snapSize.set,
  9553. defaults: extend(clone(snapSize.defaults), {
  9554. targets: null,
  9555. range: null,
  9556. offset: {
  9557. x: 0,
  9558. y: 0
  9559. }
  9560. })
  9561. };
  9562. /* harmony default export */ var snap_edges = (makeModifier(snapEdges, 'snapEdges'));
  9563. //# sourceMappingURL=edges.js.map
  9564. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/all.js
  9565. /* eslint-disable node/no-extraneous-import */
  9566. /* harmony default export */ var modifiers_all = ({
  9567. aspectRatio: modifiers_aspectRatio,
  9568. restrictEdges: restrict_edges,
  9569. restrict: restrict_pointer,
  9570. restrictRect: restrict_rect,
  9571. restrictSize: size,
  9572. snapEdges: snap_edges,
  9573. snap: snap_pointer,
  9574. snapSize: snap_size,
  9575. spring: modifiers_noop,
  9576. avoid: modifiers_noop,
  9577. transform: modifiers_noop,
  9578. rubberband: modifiers_noop
  9579. });
  9580. //# sourceMappingURL=all.js.map
  9581. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/plugin.js
  9582. const plugin_modifiers = {
  9583. id: 'modifiers',
  9584. install(scope) {
  9585. const {
  9586. interactStatic: interact
  9587. } = scope;
  9588. scope.usePlugin(modifiers_base);
  9589. scope.usePlugin(snappers_plugin);
  9590. interact.modifiers = modifiers_all; // for backwrads compatibility
  9591. for (const type in modifiers_all) {
  9592. const {
  9593. _defaults,
  9594. _methods
  9595. } = modifiers_all[type];
  9596. _defaults._methods = _methods;
  9597. scope.defaults.perAction[type] = _defaults;
  9598. }
  9599. }
  9600. };
  9601. /* harmony default export */ var modifiers_plugin = (plugin_modifiers);
  9602. //# sourceMappingURL=plugin.js.map
  9603. // CONCATENATED MODULE: ./node_modules/@interactjs/modifiers/index.js
  9604. /* eslint-disable import/order, no-console, eol-last */
  9605. if (typeof window === 'object' && !!window) {
  9606. interact_init(window);
  9607. }
  9608. _interactjs_interact.use(modifiers_plugin);
  9609. //# sourceMappingURL=index.js.map
  9610. // CONCATENATED MODULE: ./node_modules/@interactjs/dev-tools/plugin.js
  9611. /* eslint-disable no-console */
  9612. var CheckName;
  9613. (function (CheckName) {
  9614. CheckName["touchAction"] = "touchAction";
  9615. CheckName["boxSizing"] = "boxSizing";
  9616. CheckName["noListeners"] = "noListeners";
  9617. })(CheckName || (CheckName = {}));
  9618. const prefix = '[interact.js] ';
  9619. const links = {
  9620. touchAction: 'https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action',
  9621. boxSizing: 'https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing'
  9622. }; // eslint-disable-next-line no-undef
  9623. const isProduction = "development" === 'production'; // eslint-disable-next-line no-restricted-syntax
  9624. function dev_tools_plugin_install(scope, {
  9625. logger
  9626. } = {}) {
  9627. const {
  9628. Interactable,
  9629. defaults
  9630. } = scope;
  9631. scope.logger = logger || console;
  9632. defaults.base.devTools = {
  9633. ignore: {}
  9634. };
  9635. Interactable.prototype.devTools = function (options) {
  9636. if (options) {
  9637. extend(this.options.devTools, options);
  9638. return this;
  9639. }
  9640. return this.options.devTools;
  9641. };
  9642. }
  9643. const checks = [{
  9644. name: CheckName.touchAction,
  9645. perform({
  9646. element
  9647. }) {
  9648. return !parentHasStyle(element, 'touchAction', /pan-|pinch|none/);
  9649. },
  9650. getInfo({
  9651. element
  9652. }) {
  9653. return [element, links.touchAction];
  9654. },
  9655. text: 'Consider adding CSS "touch-action: none" to this element\n'
  9656. }, {
  9657. name: CheckName.boxSizing,
  9658. perform(interaction) {
  9659. const {
  9660. element
  9661. } = interaction;
  9662. return interaction.prepared.name === 'resize' && element instanceof utils_domObjects.HTMLElement && !hasStyle(element, 'boxSizing', /border-box/);
  9663. },
  9664. text: 'Consider adding CSS "box-sizing: border-box" to this resizable element',
  9665. getInfo({
  9666. element
  9667. }) {
  9668. return [element, links.boxSizing];
  9669. }
  9670. }, {
  9671. name: CheckName.noListeners,
  9672. perform(interaction) {
  9673. const actionName = interaction.prepared.name;
  9674. const moveListeners = interaction.interactable.events.types[`${actionName}move`] || [];
  9675. return !moveListeners.length;
  9676. },
  9677. getInfo(interaction) {
  9678. return [interaction.prepared.name, interaction.interactable];
  9679. },
  9680. text: 'There are no listeners set for this action'
  9681. }];
  9682. function hasStyle(element, prop, styleRe) {
  9683. const value = element.style[prop] || win.getComputedStyle(element)[prop];
  9684. return styleRe.test((value || '').toString());
  9685. }
  9686. function parentHasStyle(element, prop, styleRe) {
  9687. let parent = element;
  9688. while (is.element(parent)) {
  9689. if (hasStyle(parent, prop, styleRe)) {
  9690. return true;
  9691. }
  9692. parent = parentNode(parent);
  9693. }
  9694. return false;
  9695. }
  9696. const plugin_id = 'dev-tools';
  9697. const defaultExport = isProduction ? {
  9698. id: plugin_id,
  9699. install: () => {}
  9700. } : {
  9701. id: plugin_id,
  9702. install: dev_tools_plugin_install,
  9703. listeners: {
  9704. 'interactions:action-start': ({
  9705. interaction
  9706. }, scope) => {
  9707. for (const check of checks) {
  9708. const options = interaction.interactable && interaction.interactable.options;
  9709. if (!(options && options.devTools && options.devTools.ignore[check.name]) && check.perform(interaction)) {
  9710. scope.logger.warn(prefix + check.text, ...check.getInfo(interaction));
  9711. }
  9712. }
  9713. }
  9714. },
  9715. checks,
  9716. CheckName,
  9717. links,
  9718. prefix
  9719. };
  9720. /* harmony default export */ var dev_tools_plugin = (defaultExport);
  9721. //# sourceMappingURL=plugin.js.map
  9722. // CONCATENATED MODULE: ./node_modules/@interactjs/dev-tools/index.js
  9723. /* eslint-disable import/order, no-console, eol-last */
  9724. if (typeof window === 'object' && !!window) {
  9725. interact_init(window);
  9726. }
  9727. _interactjs_interact.use(dev_tools_plugin);
  9728. //# sourceMappingURL=index.js.map
  9729. // 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
  9730. // var eventBus = require('./eventBus');
  9731. /* harmony default export */ var GridItemvue_type_script_lang_js = ({
  9732. name: "GridItem",
  9733. props: {
  9734. /*cols: {
  9735. type: Number,
  9736. required: true
  9737. },*/
  9738. /*containerWidth: {
  9739. type: Number,
  9740. required: true
  9741. },
  9742. rowHeight: {
  9743. type: Number,
  9744. required: true
  9745. },
  9746. margin: {
  9747. type: Array,
  9748. required: true
  9749. },
  9750. maxRows: {
  9751. type: Number,
  9752. required: true
  9753. },*/
  9754. isDraggable: {
  9755. type: Boolean,
  9756. required: false,
  9757. default: null
  9758. },
  9759. isResizable: {
  9760. type: Boolean,
  9761. required: false,
  9762. default: null
  9763. },
  9764. /*useCssTransforms: {
  9765. type: Boolean,
  9766. required: true
  9767. },
  9768. */
  9769. static: {
  9770. type: Boolean,
  9771. required: false,
  9772. default: false
  9773. },
  9774. minH: {
  9775. type: Number,
  9776. required: false,
  9777. default: 1
  9778. },
  9779. minW: {
  9780. type: Number,
  9781. required: false,
  9782. default: 1
  9783. },
  9784. maxH: {
  9785. type: Number,
  9786. required: false,
  9787. default: Infinity
  9788. },
  9789. maxW: {
  9790. type: Number,
  9791. required: false,
  9792. default: Infinity
  9793. },
  9794. x: {
  9795. type: Number,
  9796. required: true
  9797. },
  9798. y: {
  9799. type: Number,
  9800. required: true
  9801. },
  9802. w: {
  9803. type: Number,
  9804. required: true
  9805. },
  9806. h: {
  9807. type: Number,
  9808. required: true
  9809. },
  9810. i: {
  9811. required: true
  9812. },
  9813. dragIgnoreFrom: {
  9814. type: String,
  9815. required: false,
  9816. default: 'a, button'
  9817. },
  9818. dragAllowFrom: {
  9819. type: String,
  9820. required: false,
  9821. default: null
  9822. },
  9823. resizeIgnoreFrom: {
  9824. type: String,
  9825. required: false,
  9826. default: 'a, button'
  9827. },
  9828. preserveAspectRatio: {
  9829. type: Boolean,
  9830. required: false,
  9831. default: false
  9832. }
  9833. },
  9834. inject: ["eventBus", "layout"],
  9835. data: function data() {
  9836. return {
  9837. cols: 1,
  9838. containerWidth: 100,
  9839. rowHeight: 30,
  9840. margin: [10, 10],
  9841. maxRows: Infinity,
  9842. draggable: null,
  9843. resizable: null,
  9844. useCssTransforms: true,
  9845. useStyleCursor: true,
  9846. isDragging: false,
  9847. dragging: null,
  9848. isResizing: false,
  9849. resizing: null,
  9850. lastX: NaN,
  9851. lastY: NaN,
  9852. lastW: NaN,
  9853. lastH: NaN,
  9854. style: {},
  9855. rtl: false,
  9856. dragEventSet: false,
  9857. resizeEventSet: false,
  9858. previousW: null,
  9859. previousH: null,
  9860. previousX: null,
  9861. previousY: null,
  9862. innerX: this.x,
  9863. innerY: this.y,
  9864. innerW: this.w,
  9865. innerH: this.h
  9866. };
  9867. },
  9868. created: function created() {
  9869. var _this = this;
  9870. var self = this; // Accessible refernces of functions for removing in beforeUnmount
  9871. self.updateWidthHandler = function (width) {
  9872. self.updateWidth(width);
  9873. };
  9874. self.compactHandler = function (layout) {
  9875. self.compact(layout);
  9876. };
  9877. self.setDraggableHandler = function (isDraggable) {
  9878. if (self.isDraggable === null) {
  9879. self.draggable = isDraggable;
  9880. }
  9881. };
  9882. self.setResizableHandler = function (isResizable) {
  9883. if (self.isResizable === null) {
  9884. self.resizable = isResizable;
  9885. }
  9886. };
  9887. self.setRowHeightHandler = function (rowHeight) {
  9888. self.rowHeight = rowHeight;
  9889. };
  9890. self.setMaxRowsHandler = function (maxRows) {
  9891. self.maxRows = maxRows;
  9892. };
  9893. self.directionchangeHandler = function () {
  9894. _this.rtl = getDocumentDir() === 'rtl';
  9895. _this.compact();
  9896. };
  9897. self.setColNum = function (colNum) {
  9898. self.cols = parseInt(colNum);
  9899. };
  9900. this.eventBus.on('updateWidth', self.updateWidthHandler);
  9901. this.eventBus.on('compact', self.compactHandler);
  9902. this.eventBus.on('setDraggable', self.setDraggableHandler);
  9903. this.eventBus.on('setResizable', self.setResizableHandler);
  9904. this.eventBus.on('setRowHeight', self.setRowHeightHandler);
  9905. this.eventBus.on('setMaxRows', self.setMaxRowsHandler);
  9906. this.eventBus.on('directionchange', self.directionchangeHandler);
  9907. this.eventBus.on('setColNum', self.setColNum);
  9908. this.rtl = getDocumentDir() === 'rtl';
  9909. },
  9910. beforeUnmount: function beforeUnmount() {
  9911. var self = this; //Remove listeners
  9912. this.eventBus.off('updateWidth', self.updateWidthHandler);
  9913. this.eventBus.off('compact', self.compactHandler);
  9914. this.eventBus.off('setDraggable', self.setDraggableHandler);
  9915. this.eventBus.off('setResizable', self.setResizableHandler);
  9916. this.eventBus.off('setRowHeight', self.setRowHeightHandler);
  9917. this.eventBus.off('setMaxRows', self.setMaxRowsHandler);
  9918. this.eventBus.off('directionchange', self.directionchangeHandler);
  9919. this.eventBus.off('setColNum', self.setColNum);
  9920. if (this.interactObj) {
  9921. this.interactObj.unset(); // destroy interact intance
  9922. }
  9923. },
  9924. mounted: function mounted() {
  9925. if (this.layout.responsive && this.layout.lastBreakpoint) {
  9926. this.cols = getColsFromBreakpoint(this.layout.lastBreakpoint, this.layout.cols);
  9927. } else {
  9928. this.cols = this.layout.colNum;
  9929. }
  9930. this.rowHeight = this.layout.rowHeight;
  9931. this.containerWidth = this.layout.width !== null ? this.layout.width : 100;
  9932. this.margin = this.layout.margin !== undefined ? this.layout.margin : [10, 10];
  9933. this.maxRows = this.layout.maxRows;
  9934. if (this.isDraggable === null) {
  9935. this.draggable = this.layout.isDraggable;
  9936. } else {
  9937. this.draggable = this.isDraggable;
  9938. }
  9939. if (this.isResizable === null) {
  9940. this.resizable = this.layout.isResizable;
  9941. } else {
  9942. this.resizable = this.isResizable;
  9943. }
  9944. this.useCssTransforms = this.layout.useCssTransforms;
  9945. this.useStyleCursor = this.layout.useStyleCursor;
  9946. this.createStyle();
  9947. },
  9948. watch: {
  9949. isDraggable: function isDraggable() {
  9950. this.draggable = this.isDraggable;
  9951. },
  9952. static: function _static() {
  9953. this.tryMakeDraggable();
  9954. this.tryMakeResizable();
  9955. },
  9956. draggable: function draggable() {
  9957. this.tryMakeDraggable();
  9958. },
  9959. isResizable: function isResizable() {
  9960. this.resizable = this.isResizable;
  9961. },
  9962. resizable: function resizable() {
  9963. this.tryMakeResizable();
  9964. },
  9965. rowHeight: function rowHeight() {
  9966. this.createStyle();
  9967. this.emitContainerResized();
  9968. },
  9969. cols: function cols() {
  9970. this.tryMakeResizable();
  9971. this.createStyle();
  9972. this.emitContainerResized();
  9973. },
  9974. containerWidth: function containerWidth() {
  9975. this.tryMakeResizable();
  9976. this.createStyle();
  9977. this.emitContainerResized();
  9978. },
  9979. x: function x(newVal) {
  9980. this.innerX = newVal;
  9981. this.createStyle();
  9982. },
  9983. y: function y(newVal) {
  9984. this.innerY = newVal;
  9985. this.createStyle();
  9986. },
  9987. h: function h(newVal) {
  9988. this.innerH = newVal;
  9989. this.createStyle(); // this.emitContainerResized();
  9990. },
  9991. w: function w(newVal) {
  9992. this.innerW = newVal;
  9993. this.createStyle(); // this.emitContainerResized();
  9994. },
  9995. renderRtl: function renderRtl() {
  9996. // console.log("### renderRtl");
  9997. this.tryMakeResizable();
  9998. this.createStyle();
  9999. },
  10000. minH: function minH() {
  10001. this.tryMakeResizable();
  10002. },
  10003. maxH: function maxH() {
  10004. this.tryMakeResizable();
  10005. },
  10006. minW: function minW() {
  10007. this.tryMakeResizable();
  10008. },
  10009. maxW: function maxW() {
  10010. this.tryMakeResizable();
  10011. },
  10012. "$parent.margin": function $parentMargin(margin) {
  10013. if (!margin || margin[0] == this.margin[0] && margin[1] == this.margin[1]) {
  10014. return;
  10015. }
  10016. this.margin = margin.map(function (m) {
  10017. return Number(m);
  10018. });
  10019. this.createStyle();
  10020. this.emitContainerResized();
  10021. }
  10022. },
  10023. computed: {
  10024. classObj: function classObj() {
  10025. return {
  10026. 'vue-resizable': this.resizableAndNotStatic,
  10027. 'static': this.static,
  10028. 'resizing': this.isResizing,
  10029. 'vue-draggable-dragging': this.isDragging,
  10030. 'cssTransforms': this.useCssTransforms,
  10031. 'render-rtl': this.renderRtl,
  10032. 'disable-userselect': this.isDragging,
  10033. 'no-touch': this.isAndroid && this.draggableOrResizableAndNotStatic
  10034. };
  10035. },
  10036. resizableAndNotStatic: function resizableAndNotStatic() {
  10037. return this.resizable && !this.static;
  10038. },
  10039. draggableOrResizableAndNotStatic: function draggableOrResizableAndNotStatic() {
  10040. return (this.draggable || this.resizable) && !this.static;
  10041. },
  10042. isAndroid: function isAndroid() {
  10043. return navigator.userAgent.toLowerCase().indexOf("android") !== -1;
  10044. },
  10045. renderRtl: function renderRtl() {
  10046. return this.layout.isMirrored ? !this.rtl : this.rtl;
  10047. },
  10048. resizableHandleClass: function resizableHandleClass() {
  10049. if (this.renderRtl) {
  10050. return 'vue-resizable-handle vue-rtl-resizable-handle';
  10051. } else {
  10052. return 'vue-resizable-handle';
  10053. }
  10054. }
  10055. },
  10056. methods: {
  10057. createStyle: function createStyle() {
  10058. if (this.x + this.w > this.cols) {
  10059. this.innerX = 0;
  10060. this.innerW = this.w > this.cols ? this.cols : this.w;
  10061. } else {
  10062. this.innerX = this.x;
  10063. this.innerW = this.w;
  10064. }
  10065. var pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  10066. if (this.isDragging) {
  10067. pos.top = this.dragging.top; // Add rtl support
  10068. if (this.renderRtl) {
  10069. pos.right = this.dragging.left;
  10070. } else {
  10071. pos.left = this.dragging.left;
  10072. }
  10073. }
  10074. if (this.isResizing) {
  10075. pos.width = this.resizing.width;
  10076. pos.height = this.resizing.height;
  10077. }
  10078. var style; // CSS Transforms support (default)
  10079. if (this.useCssTransforms) {
  10080. // Add rtl support
  10081. if (this.renderRtl) {
  10082. style = setTransformRtl(pos.top, pos.right, pos.width, pos.height);
  10083. } else {
  10084. style = setTransform(pos.top, pos.left, pos.width, pos.height);
  10085. }
  10086. } else {
  10087. // top,left (slow)
  10088. // Add rtl support
  10089. if (this.renderRtl) {
  10090. style = setTopRight(pos.top, pos.right, pos.width, pos.height);
  10091. } else {
  10092. style = setTopLeft(pos.top, pos.left, pos.width, pos.height);
  10093. }
  10094. }
  10095. this.style = style;
  10096. },
  10097. emitContainerResized: function emitContainerResized() {
  10098. // this.style has width and height with trailing 'px'. The
  10099. // resized event is without them
  10100. var styleProps = {};
  10101. for (var _i = 0, _arr = ['width', 'height']; _i < _arr.length; _i++) {
  10102. var prop = _arr[_i];
  10103. var val = this.style[prop];
  10104. var matches = val.match(/^(\d+)px$/);
  10105. if (!matches) return;
  10106. styleProps[prop] = matches[1];
  10107. }
  10108. this.$emit("container-resized", this.i, this.h, this.w, styleProps.height, styleProps.width);
  10109. },
  10110. handleResize: function handleResize(event) {
  10111. if (this.static) return;
  10112. var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
  10113. if (position == null) return; // not possible but satisfies flow
  10114. var x = position.x,
  10115. y = position.y;
  10116. var newSize = {
  10117. width: 0,
  10118. height: 0
  10119. };
  10120. var pos;
  10121. switch (event.type) {
  10122. case "resizestart":
  10123. {
  10124. this.previousW = this.innerW;
  10125. this.previousH = this.innerH;
  10126. pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  10127. newSize.width = pos.width;
  10128. newSize.height = pos.height;
  10129. this.resizing = newSize;
  10130. this.isResizing = true;
  10131. break;
  10132. }
  10133. case "resizemove":
  10134. {
  10135. // console.log("### resize => " + event.type + ", lastW=" + this.lastW + ", lastH=" + this.lastH);
  10136. var coreEvent = createCoreData(this.lastW, this.lastH, x, y);
  10137. if (this.renderRtl) {
  10138. newSize.width = this.resizing.width - coreEvent.deltaX;
  10139. } else {
  10140. newSize.width = this.resizing.width + coreEvent.deltaX;
  10141. }
  10142. newSize.height = this.resizing.height + coreEvent.deltaY; ///console.log("### resize => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
  10143. this.resizing = newSize;
  10144. break;
  10145. }
  10146. case "resizeend":
  10147. {
  10148. //console.log("### resize end => x=" +this.innerX + " y=" + this.innerY + " w=" + this.innerW + " h=" + this.innerH);
  10149. pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  10150. newSize.width = pos.width;
  10151. newSize.height = pos.height; // console.log("### resize end => " + JSON.stringify(newSize));
  10152. this.resizing = null;
  10153. this.isResizing = false;
  10154. break;
  10155. }
  10156. } // Get new WH
  10157. pos = this.calcWH(newSize.height, newSize.width);
  10158. if (pos.w < this.minW) {
  10159. pos.w = this.minW;
  10160. }
  10161. if (pos.w > this.maxW) {
  10162. pos.w = this.maxW;
  10163. }
  10164. if (pos.h < this.minH) {
  10165. pos.h = this.minH;
  10166. }
  10167. if (pos.h > this.maxH) {
  10168. pos.h = this.maxH;
  10169. }
  10170. if (pos.h < 1) {
  10171. pos.h = 1;
  10172. }
  10173. if (pos.w < 1) {
  10174. pos.w = 1;
  10175. }
  10176. this.lastW = x;
  10177. this.lastH = y;
  10178. if (this.innerW !== pos.w || this.innerH !== pos.h) {
  10179. this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10180. }
  10181. if (event.type === "resizeend" && (this.previousW !== this.innerW || this.previousH !== this.innerH)) {
  10182. this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10183. }
  10184. this.eventBus.emit("resizeEvent", {
  10185. eventType: event.type,
  10186. i: this.i,
  10187. x: this.innerX,
  10188. y: this.innerY,
  10189. h: pos.h,
  10190. w: pos.w
  10191. });
  10192. },
  10193. handleDrag: function handleDrag(event) {
  10194. if (this.static) return;
  10195. if (this.isResizing) return;
  10196. var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
  10197. if (position === null) return; // not possible but satisfies flow
  10198. var x = position.x,
  10199. y = position.y; // let shouldUpdate = false;
  10200. var newPosition = {
  10201. top: 0,
  10202. left: 0
  10203. };
  10204. switch (event.type) {
  10205. case "dragstart":
  10206. {
  10207. this.previousX = this.innerX;
  10208. this.previousY = this.innerY;
  10209. var parentRect = event.target.offsetParent.getBoundingClientRect();
  10210. var clientRect = event.target.getBoundingClientRect();
  10211. if (this.renderRtl) {
  10212. newPosition.left = (clientRect.right - parentRect.right) * -1;
  10213. } else {
  10214. newPosition.left = clientRect.left - parentRect.left;
  10215. }
  10216. newPosition.top = clientRect.top - parentRect.top;
  10217. this.dragging = newPosition;
  10218. this.isDragging = true;
  10219. break;
  10220. }
  10221. case "dragend":
  10222. {
  10223. if (!this.isDragging) return;
  10224. var _parentRect = event.target.offsetParent.getBoundingClientRect();
  10225. var _clientRect = event.target.getBoundingClientRect(); // Add rtl support
  10226. if (this.renderRtl) {
  10227. newPosition.left = (_clientRect.right - _parentRect.right) * -1;
  10228. } else {
  10229. newPosition.left = _clientRect.left - _parentRect.left;
  10230. }
  10231. newPosition.top = _clientRect.top - _parentRect.top; // console.log("### drag end => " + JSON.stringify(newPosition));
  10232. // console.log("### DROP: " + JSON.stringify(newPosition));
  10233. this.dragging = null;
  10234. this.isDragging = false; // shouldUpdate = true;
  10235. break;
  10236. }
  10237. case "dragmove":
  10238. {
  10239. var coreEvent = createCoreData(this.lastX, this.lastY, x, y); // Add rtl support
  10240. if (this.renderRtl) {
  10241. newPosition.left = this.dragging.left - coreEvent.deltaX;
  10242. } else {
  10243. newPosition.left = this.dragging.left + coreEvent.deltaX;
  10244. }
  10245. newPosition.top = this.dragging.top + coreEvent.deltaY; // console.log("### drag => " + event.type + ", x=" + x + ", y=" + y);
  10246. // console.log("### drag => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
  10247. // console.log("### drag end => " + JSON.stringify(newPosition));
  10248. this.dragging = newPosition;
  10249. break;
  10250. }
  10251. } // Get new XY
  10252. var pos;
  10253. if (this.renderRtl) {
  10254. pos = this.calcXY(newPosition.top, newPosition.left);
  10255. } else {
  10256. pos = this.calcXY(newPosition.top, newPosition.left);
  10257. }
  10258. this.lastX = x;
  10259. this.lastY = y;
  10260. if (this.innerX !== pos.x || this.innerY !== pos.y) {
  10261. this.$emit("move", this.i, pos.x, pos.y);
  10262. }
  10263. if (event.type === "dragend" && (this.previousX !== this.innerX || this.previousY !== this.innerY)) {
  10264. this.$emit("moved", this.i, pos.x, pos.y);
  10265. }
  10266. this.eventBus.emit("dragEvent", {
  10267. eventType: event.type,
  10268. i: this.i,
  10269. x: pos.x,
  10270. y: pos.y,
  10271. h: this.innerH,
  10272. w: this.innerW
  10273. });
  10274. },
  10275. calcPosition: function calcPosition(x, y, w, h) {
  10276. var colWidth = this.calcColWidth(); // add rtl support
  10277. var out;
  10278. if (this.renderRtl) {
  10279. out = {
  10280. right: Math.round(colWidth * x + (x + 1) * this.margin[0]),
  10281. top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
  10282. // 0 * Infinity === NaN, which causes problems with resize constriants;
  10283. // Fix this if it occurs.
  10284. // Note we do it here rather than later because Math.round(Infinity) causes deopt
  10285. width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
  10286. height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
  10287. };
  10288. } else {
  10289. out = {
  10290. left: Math.round(colWidth * x + (x + 1) * this.margin[0]),
  10291. top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
  10292. // 0 * Infinity === NaN, which causes problems with resize constriants;
  10293. // Fix this if it occurs.
  10294. // Note we do it here rather than later because Math.round(Infinity) causes deopt
  10295. width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
  10296. height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
  10297. };
  10298. }
  10299. return out;
  10300. },
  10301. /**
  10302. * Translate x and y coordinates from pixels to grid units.
  10303. * @param {Number} top Top position (relative to parent) in pixels.
  10304. * @param {Number} left Left position (relative to parent) in pixels.
  10305. * @return {Object} x and y in grid units.
  10306. */
  10307. // TODO check if this function needs change in order to support rtl.
  10308. calcXY: function calcXY(top, left) {
  10309. var colWidth = this.calcColWidth(); // left = colWidth * x + margin * (x + 1)
  10310. // l = cx + m(x+1)
  10311. // l = cx + mx + m
  10312. // l - m = cx + mx
  10313. // l - m = x(c + m)
  10314. // (l - m) / (c + m) = x
  10315. // x = (left - margin) / (coldWidth + margin)
  10316. var x = Math.round((left - this.margin[0]) / (colWidth + this.margin[0]));
  10317. var y = Math.round((top - this.margin[1]) / (this.rowHeight + this.margin[1])); // Capping
  10318. x = Math.max(Math.min(x, this.cols - this.innerW), 0);
  10319. y = Math.max(Math.min(y, this.maxRows - this.innerH), 0);
  10320. return {
  10321. x: x,
  10322. y: y
  10323. };
  10324. },
  10325. // Helper for generating column width
  10326. calcColWidth: function calcColWidth() {
  10327. var colWidth = (this.containerWidth - this.margin[0] * (this.cols + 1)) / this.cols; // console.log("### COLS=" + this.cols + " COL WIDTH=" + colWidth + " MARGIN " + this.margin[0]);
  10328. return colWidth;
  10329. },
  10330. /**
  10331. * Given a height and width in pixel values, calculate grid units.
  10332. * @param {Number} height Height in pixels.
  10333. * @param {Number} width Width in pixels.
  10334. * @param {Boolean} autoSizeFlag function autoSize identifier.
  10335. * @return {Object} w, h as grid units.
  10336. */
  10337. calcWH: function calcWH(height, width) {
  10338. var autoSizeFlag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  10339. var colWidth = this.calcColWidth(); // width = colWidth * w - (margin * (w - 1))
  10340. // ...
  10341. // w = (width + margin) / (colWidth + margin)
  10342. var w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
  10343. var h = 0;
  10344. if (!autoSizeFlag) {
  10345. h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
  10346. } else {
  10347. h = Math.ceil((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
  10348. } // Capping
  10349. w = Math.max(Math.min(w, this.cols - this.innerX), 0);
  10350. h = Math.max(Math.min(h, this.maxRows - this.innerY), 0);
  10351. return {
  10352. w: w,
  10353. h: h
  10354. };
  10355. },
  10356. updateWidth: function updateWidth(width, colNum) {
  10357. this.containerWidth = width;
  10358. if (colNum !== undefined && colNum !== null) {
  10359. this.cols = colNum;
  10360. }
  10361. },
  10362. compact: function compact() {
  10363. this.createStyle();
  10364. },
  10365. tryMakeDraggable: function tryMakeDraggable() {
  10366. var self = this;
  10367. if (this.interactObj === null || this.interactObj === undefined) {
  10368. this.interactObj = _interactjs_interact(this.$refs.item);
  10369. if (!this.useStyleCursor) {
  10370. this.interactObj.styleCursor(false);
  10371. }
  10372. }
  10373. if (this.draggable && !this.static) {
  10374. var opts = {
  10375. ignoreFrom: this.dragIgnoreFrom,
  10376. allowFrom: this.dragAllowFrom
  10377. };
  10378. this.interactObj.draggable(opts);
  10379. /*this.interactObj.draggable({allowFrom: '.vue-draggable-handle'});*/
  10380. if (!this.dragEventSet) {
  10381. this.dragEventSet = true;
  10382. this.interactObj.on('dragstart dragmove dragend', function (event) {
  10383. self.handleDrag(event);
  10384. });
  10385. }
  10386. } else {
  10387. this.interactObj.draggable({
  10388. enabled: false
  10389. });
  10390. }
  10391. },
  10392. tryMakeResizable: function tryMakeResizable() {
  10393. var self = this;
  10394. if (this.interactObj === null || this.interactObj === undefined) {
  10395. this.interactObj = _interactjs_interact(this.$refs.item);
  10396. if (!this.useStyleCursor) {
  10397. this.interactObj.styleCursor(false);
  10398. }
  10399. }
  10400. if (this.resizable && !this.static) {
  10401. var maximum = this.calcPosition(0, 0, this.maxW, this.maxH);
  10402. var minimum = this.calcPosition(0, 0, this.minW, this.minH); // console.log("### MAX " + JSON.stringify(maximum));
  10403. // console.log("### MIN " + JSON.stringify(minimum));
  10404. var opts = {
  10405. // allowFrom: "." + this.resizableHandleClass.trim().replace(" ", "."),
  10406. edges: {
  10407. left: false,
  10408. right: "." + this.resizableHandleClass.trim().replace(" ", "."),
  10409. bottom: "." + this.resizableHandleClass.trim().replace(" ", "."),
  10410. top: false
  10411. },
  10412. ignoreFrom: this.resizeIgnoreFrom,
  10413. restrictSize: {
  10414. min: {
  10415. height: minimum.height,
  10416. width: minimum.width
  10417. },
  10418. max: {
  10419. height: maximum.height,
  10420. width: maximum.width
  10421. }
  10422. }
  10423. };
  10424. if (this.preserveAspectRatio) {
  10425. opts.modifiers = [_interactjs_interact.modifiers.aspectRatio({
  10426. ratio: 'preserve'
  10427. })];
  10428. }
  10429. this.interactObj.resizable(opts);
  10430. if (!this.resizeEventSet) {
  10431. this.resizeEventSet = true;
  10432. this.interactObj.on('resizestart resizemove resizeend', function (event) {
  10433. self.handleResize(event);
  10434. });
  10435. }
  10436. } else {
  10437. this.interactObj.resizable({
  10438. enabled: false
  10439. });
  10440. }
  10441. },
  10442. autoSize: function autoSize() {
  10443. // ok here we want to calculate if a resize is needed
  10444. this.previousW = this.innerW;
  10445. this.previousH = this.innerH;
  10446. var newSize = this.$slots().default[0].elm.getBoundingClientRect();
  10447. var pos = this.calcWH(newSize.height, newSize.width, true);
  10448. if (pos.w < this.minW) {
  10449. pos.w = this.minW;
  10450. }
  10451. if (pos.w > this.maxW) {
  10452. pos.w = this.maxW;
  10453. }
  10454. if (pos.h < this.minH) {
  10455. pos.h = this.minH;
  10456. }
  10457. if (pos.h > this.maxH) {
  10458. pos.h = this.maxH;
  10459. }
  10460. if (pos.h < 1) {
  10461. pos.h = 1;
  10462. }
  10463. if (pos.w < 1) {
  10464. pos.w = 1;
  10465. } // this.lastW = x; // basically, this is copied from resizehandler, but shouldn't be needed
  10466. // this.lastH = y;
  10467. if (this.innerW !== pos.w || this.innerH !== pos.h) {
  10468. this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10469. }
  10470. if (this.previousW !== pos.w || this.previousH !== pos.h) {
  10471. this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
  10472. this.eventBus.emit("resizeEvent", {
  10473. eventType: "resizeend",
  10474. i: this.i,
  10475. x: this.innerX,
  10476. y: this.innerY,
  10477. h: pos.h,
  10478. w: pos.w
  10479. });
  10480. }
  10481. }
  10482. }
  10483. });
  10484. // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=script&lang=js
  10485. // EXTERNAL MODULE: ./src/components/GridItem.vue?vue&type=style&index=0&id=46ff2fc8&lang=css
  10486. var GridItemvue_type_style_index_0_id_46ff2fc8_lang_css = __webpack_require__("083e");
  10487. // CONCATENATED MODULE: ./src/components/GridItem.vue
  10488. GridItemvue_type_script_lang_js.render = render
  10489. /* harmony default export */ var GridItem = (GridItemvue_type_script_lang_js);
  10490. // 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
  10491. function GridLayoutvue_type_template_id_fc5948f6_render(_ctx, _cache, $props, $setup, $data, $options) {
  10492. var _component_grid_item = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("grid-item");
  10493. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
  10494. ref: "item",
  10495. class: "vue-grid-layout",
  10496. style: _ctx.mergedStyle
  10497. }, [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, {
  10498. class: "vue-grid-placeholder",
  10499. x: _ctx.placeholder.x,
  10500. y: _ctx.placeholder.y,
  10501. w: _ctx.placeholder.w,
  10502. h: _ctx.placeholder.h,
  10503. i: _ctx.placeholder.i
  10504. }, null, 8, ["x", "y", "w", "h", "i"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isDragging]])], 4);
  10505. }
  10506. // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=template&id=fc5948f6
  10507. // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js
  10508. var es7_object_get_own_property_descriptors = __webpack_require__("8e6e");
  10509. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
  10510. var es6_object_assign = __webpack_require__("f751");
  10511. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.is-finite.js
  10512. var es6_number_is_finite = __webpack_require__("fca0");
  10513. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  10514. function _defineProperty(obj, key, value) {
  10515. if (key in obj) {
  10516. Object.defineProperty(obj, key, {
  10517. value: value,
  10518. enumerable: true,
  10519. configurable: true,
  10520. writable: true
  10521. });
  10522. } else {
  10523. obj[key] = value;
  10524. }
  10525. return obj;
  10526. }
  10527. // CONCATENATED MODULE: ./node_modules/mitt/dist/mitt.es.js
  10528. /* 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)})}}});
  10529. //# sourceMappingURL=mitt.es.js.map
  10530. // 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
  10531. 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; }
  10532. 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; }
  10533. var elementResizeDetectorMaker = __webpack_require__("eec4");
  10534. //var eventBus = require('./eventBus');
  10535. /* harmony default export */ var GridLayoutvue_type_script_lang_js = ({
  10536. name: "GridLayout",
  10537. provide: function provide() {
  10538. return {
  10539. eventBus: this.eventBus,
  10540. layout: this
  10541. };
  10542. },
  10543. components: {
  10544. GridItem: GridItem
  10545. },
  10546. props: {
  10547. // If true, the container height swells and contracts to fit contents
  10548. autoSize: {
  10549. type: Boolean,
  10550. default: true
  10551. },
  10552. colNum: {
  10553. type: Number,
  10554. default: 12
  10555. },
  10556. rowHeight: {
  10557. type: Number,
  10558. default: 150
  10559. },
  10560. maxRows: {
  10561. type: Number,
  10562. default: Infinity
  10563. },
  10564. margin: {
  10565. type: Array,
  10566. default: function _default() {
  10567. return [10, 10];
  10568. }
  10569. },
  10570. isDraggable: {
  10571. type: Boolean,
  10572. default: true
  10573. },
  10574. isResizable: {
  10575. type: Boolean,
  10576. default: true
  10577. },
  10578. isMirrored: {
  10579. type: Boolean,
  10580. default: false
  10581. },
  10582. useCssTransforms: {
  10583. type: Boolean,
  10584. default: true
  10585. },
  10586. verticalCompact: {
  10587. type: Boolean,
  10588. default: true
  10589. },
  10590. layout: {
  10591. type: Array,
  10592. required: true
  10593. },
  10594. responsive: {
  10595. type: Boolean,
  10596. default: false
  10597. },
  10598. responsiveLayouts: {
  10599. type: Object,
  10600. default: function _default() {
  10601. return {};
  10602. }
  10603. },
  10604. breakpoints: {
  10605. type: Object,
  10606. default: function _default() {
  10607. return {
  10608. lg: 1200,
  10609. md: 996,
  10610. sm: 768,
  10611. xs: 480,
  10612. xxs: 0
  10613. };
  10614. }
  10615. },
  10616. cols: {
  10617. type: Object,
  10618. default: function _default() {
  10619. return {
  10620. lg: 12,
  10621. md: 10,
  10622. sm: 6,
  10623. xs: 4,
  10624. xxs: 2
  10625. };
  10626. }
  10627. },
  10628. preventCollision: {
  10629. type: Boolean,
  10630. default: false
  10631. },
  10632. useStyleCursor: {
  10633. type: Boolean,
  10634. default: true
  10635. }
  10636. },
  10637. data: function data() {
  10638. return {
  10639. eventBus: mitt_es(),
  10640. width: null,
  10641. mergedStyle: {},
  10642. lastLayoutLength: 0,
  10643. isDragging: false,
  10644. placeholder: {
  10645. x: 0,
  10646. y: 0,
  10647. w: 0,
  10648. h: 0,
  10649. i: -1
  10650. },
  10651. layouts: {},
  10652. // array to store all layouts from different breakpoints
  10653. lastBreakpoint: null,
  10654. // store last active breakpoint
  10655. originalLayout: null // store original Layout
  10656. // layout: JSON.parse(JSON.stringify(this.value)),
  10657. };
  10658. },
  10659. created: function created() {
  10660. var self = this; // Accessible refernces of functions for removing in beforeUnmount
  10661. self.resizeEventHandler = function (_ref) {
  10662. var eventType = _ref.eventType,
  10663. i = _ref.i,
  10664. x = _ref.x,
  10665. y = _ref.y,
  10666. h = _ref.h,
  10667. w = _ref.w;
  10668. self.resizeEvent(eventType, i, x, y, h, w);
  10669. };
  10670. self.dragEventHandler = function (_ref2) {
  10671. var eventType = _ref2.eventType,
  10672. i = _ref2.i,
  10673. x = _ref2.x,
  10674. y = _ref2.y,
  10675. h = _ref2.h,
  10676. w = _ref2.w;
  10677. self.dragEvent(eventType, i, x, y, h, w);
  10678. };
  10679. self.eventBus.on('resizeEvent', self.resizeEventHandler);
  10680. self.eventBus.on('dragEvent', self.dragEventHandler);
  10681. self.$emit('layout-created', self.layout);
  10682. },
  10683. beforeUnmount: function beforeUnmount() {
  10684. //Remove listeners
  10685. this.eventBus.off('resizeEvent', this.resizeEventHandler);
  10686. this.eventBus.off('dragEvent', this.dragEventHandler);
  10687. removeWindowEventListener("resize", this.onWindowResize);
  10688. if (this.erd) {
  10689. this.erd.uninstall(this.$refs.item);
  10690. }
  10691. },
  10692. beforeMount: function beforeMount() {
  10693. this.$emit('layout-before-mount', this.layout);
  10694. },
  10695. mounted: function mounted() {
  10696. this.$emit('layout-mounted', this.layout);
  10697. this.$nextTick(function () {
  10698. validateLayout(this.layout);
  10699. this.originalLayout = this.layout;
  10700. var self = this;
  10701. this.$nextTick(function () {
  10702. self.onWindowResize();
  10703. self.initResponsiveFeatures(); //self.width = self.$el.offsetWidth;
  10704. addWindowEventListener('resize', self.onWindowResize);
  10705. compact(self.layout, self.verticalCompact);
  10706. self.$emit('layout-updated', self.layout);
  10707. self.updateHeight();
  10708. self.$nextTick(function () {
  10709. this.erd = elementResizeDetectorMaker({
  10710. strategy: "scroll",
  10711. //<- For ultra performance.
  10712. // See https://github.com/wnr/element-resize-detector/issues/110 about callOnAdd.
  10713. callOnAdd: false
  10714. });
  10715. this.erd.listenTo(self.$refs.item, function () {
  10716. self.onWindowResize();
  10717. });
  10718. });
  10719. });
  10720. });
  10721. },
  10722. watch: {
  10723. width: function width(newval, oldval) {
  10724. var self = this;
  10725. this.$nextTick(function () {
  10726. var _this = this;
  10727. //this.$broadcast("updateWidth", this.width);
  10728. this.eventBus.emit("updateWidth", this.width);
  10729. if (oldval === null) {
  10730. /*
  10731. If oldval == null is when the width has never been
  10732. set before. That only occurs when mouting is
  10733. finished, and onWindowResize has been called and
  10734. this.width has been changed the first time after it
  10735. got set to null in the constructor. It is now time
  10736. to issue layout-ready events as the GridItems have
  10737. their sizes configured properly.
  10738. The reason for emitting the layout-ready events on
  10739. the next tick is to allow for the newly-emitted
  10740. updateWidth event (above) to have reached the
  10741. children GridItem-s and had their effect, so we're
  10742. sure that they have the final size before we emit
  10743. layout-ready (for this GridLayout) and
  10744. item-layout-ready (for the GridItem-s).
  10745. This way any client event handlers can reliably
  10746. invistigate stable sizes of GridItem-s.
  10747. */
  10748. this.$nextTick(function () {
  10749. _this.$emit('layout-ready', self.layout);
  10750. });
  10751. }
  10752. this.updateHeight();
  10753. });
  10754. },
  10755. layout: function layout() {
  10756. this.layoutUpdate();
  10757. },
  10758. colNum: function colNum(val) {
  10759. this.eventBus.emit("setColNum", val);
  10760. },
  10761. rowHeight: function rowHeight() {
  10762. this.eventBus.emit("setRowHeight", this.rowHeight);
  10763. },
  10764. isDraggable: function isDraggable() {
  10765. this.eventBus.emit("setDraggable", this.isDraggable);
  10766. },
  10767. isResizable: function isResizable() {
  10768. this.eventBus.emit("setResizable", this.isResizable);
  10769. },
  10770. responsive: function responsive() {
  10771. if (!this.responsive) {
  10772. this.$emit('update:layout', this.originalLayout);
  10773. this.eventBus.emit("setColNum", this.colNum);
  10774. }
  10775. this.onWindowResize();
  10776. },
  10777. maxRows: function maxRows() {
  10778. this.eventBus.emit("setMaxRows", this.maxRows);
  10779. },
  10780. margin: function margin() {
  10781. this.updateHeight();
  10782. }
  10783. },
  10784. methods: {
  10785. layoutUpdate: function layoutUpdate() {
  10786. if (this.layout !== undefined && this.originalLayout !== null) {
  10787. if (this.layout.length !== this.originalLayout.length) {
  10788. // console.log("### LAYOUT UPDATE!", this.layout.length, this.originalLayout.length);
  10789. var diff = this.findDifference(this.layout, this.originalLayout);
  10790. if (diff.length > 0) {
  10791. // console.log(diff);
  10792. if (this.layout.length > this.originalLayout.length) {
  10793. this.originalLayout = this.originalLayout.concat(diff);
  10794. } else {
  10795. this.originalLayout = this.originalLayout.filter(function (obj) {
  10796. return !diff.some(function (obj2) {
  10797. return obj.i === obj2.i;
  10798. });
  10799. });
  10800. }
  10801. }
  10802. this.lastLayoutLength = this.layout.length;
  10803. this.initResponsiveFeatures();
  10804. }
  10805. compact(this.layout, this.verticalCompact);
  10806. this.eventBus.emit("updateWidth", this.width);
  10807. this.updateHeight();
  10808. this.$emit('layout-updated', this.layout);
  10809. }
  10810. },
  10811. updateHeight: function updateHeight() {
  10812. this.mergedStyle = {
  10813. height: this.containerHeight()
  10814. };
  10815. },
  10816. onWindowResize: function onWindowResize() {
  10817. if (this.$refs !== null && this.$refs.item !== null && this.$refs.item !== undefined) {
  10818. this.width = this.$refs.item.offsetWidth;
  10819. }
  10820. this.eventBus.emit("resizeEvent", {});
  10821. },
  10822. containerHeight: function containerHeight() {
  10823. if (!this.autoSize) return; // console.log("bottom: " + bottom(this.layout))
  10824. // console.log("rowHeight + margins: " + (this.rowHeight + this.margin[1]) + this.margin[1])
  10825. var containerHeight = bottom(this.layout) * (this.rowHeight + this.margin[1]) + this.margin[1] + 'px';
  10826. return containerHeight;
  10827. },
  10828. dragEvent: function dragEvent(eventName, id, x, y, h, w) {
  10829. //console.log(eventName + " id=" + id + ", x=" + x + ", y=" + y);
  10830. var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes returns null object
  10831. if (l === undefined || l === null) {
  10832. l = {
  10833. x: 0,
  10834. y: 0
  10835. };
  10836. }
  10837. if (eventName === "dragmove" || eventName === "dragstart") {
  10838. this.placeholder.i = id;
  10839. this.placeholder.x = l.x;
  10840. this.placeholder.y = l.y;
  10841. this.placeholder.w = w;
  10842. this.placeholder.h = h;
  10843. this.$nextTick(function () {
  10844. this.isDragging = true;
  10845. }); //this.$broadcast("updateWidth", this.width);
  10846. this.eventBus.emit("updateWidth", this.width);
  10847. } else {
  10848. this.$nextTick(function () {
  10849. this.isDragging = false;
  10850. });
  10851. } // Move the element to the dragged location.
  10852. this.$emit("update:layout", moveElement(this.layout, l, x, y, true, this.preventCollision));
  10853. compact(this.layout, this.verticalCompact); // needed because vue can't detect changes on array element properties
  10854. this.eventBus.emit("compact");
  10855. this.updateHeight();
  10856. if (eventName === 'dragend') this.$emit('layout-updated', this.layout);
  10857. },
  10858. resizeEvent: function resizeEvent(eventName, id, x, y, h, w) {
  10859. var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes return null object
  10860. if (l === undefined || l === null) {
  10861. l = {
  10862. h: 0,
  10863. w: 0
  10864. };
  10865. }
  10866. var hasCollisions;
  10867. if (this.preventCollision) {
  10868. var collisions = getAllCollisions(this.layout, _objectSpread(_objectSpread({}, l), {}, {
  10869. w: w,
  10870. h: h
  10871. })).filter(function (layoutItem) {
  10872. return layoutItem.i !== l.i;
  10873. });
  10874. hasCollisions = collisions.length > 0; // If we're colliding, we need adjust the placeholder.
  10875. if (hasCollisions) {
  10876. // adjust w && h to maximum allowed space
  10877. var leastX = Infinity,
  10878. leastY = Infinity;
  10879. collisions.forEach(function (layoutItem) {
  10880. if (layoutItem.x > l.x) leastX = Math.min(leastX, layoutItem.x);
  10881. if (layoutItem.y > l.y) leastY = Math.min(leastY, layoutItem.y);
  10882. });
  10883. if (Number.isFinite(leastX)) l.w = leastX - l.x;
  10884. if (Number.isFinite(leastY)) l.h = leastY - l.y;
  10885. }
  10886. }
  10887. if (!hasCollisions) {
  10888. // Set new width and height.
  10889. l.w = w;
  10890. l.h = h;
  10891. }
  10892. if (eventName === "resizestart" || eventName === "resizemove") {
  10893. this.placeholder.i = id;
  10894. this.placeholder.x = x;
  10895. this.placeholder.y = y;
  10896. this.placeholder.w = l.w;
  10897. this.placeholder.h = l.h;
  10898. this.$nextTick(function () {
  10899. this.isDragging = true;
  10900. }); //this.$broadcast("updateWidth", this.width);
  10901. this.eventBus.emit("updateWidth", this.width);
  10902. } else {
  10903. this.$nextTick(function () {
  10904. this.isDragging = false;
  10905. });
  10906. }
  10907. if (this.responsive) this.responsiveGridLayout();
  10908. compact(this.layout, this.verticalCompact);
  10909. this.eventBus.emit("compact");
  10910. this.updateHeight();
  10911. if (eventName === 'resizeend') this.$emit('layout-updated', this.layout);
  10912. },
  10913. // finds or generates new layouts for set breakpoints
  10914. responsiveGridLayout: function responsiveGridLayout() {
  10915. var newBreakpoint = getBreakpointFromWidth(this.breakpoints, this.width);
  10916. var newCols = getColsFromBreakpoint(newBreakpoint, this.cols); // save actual layout in layouts
  10917. if (this.lastBreakpoint != null && !this.layouts[this.lastBreakpoint]) this.layouts[this.lastBreakpoint] = cloneLayout(this.layout); // Find or generate a new layout.
  10918. var layout = findOrGenerateResponsiveLayout(this.originalLayout, this.layouts, this.breakpoints, newBreakpoint, this.lastBreakpoint, newCols, this.verticalCompact); // Store the new layout.
  10919. this.layouts[newBreakpoint] = layout;
  10920. if (this.lastBreakpoint !== newBreakpoint) {
  10921. this.$emit('breakpoint-changed', newBreakpoint, layout);
  10922. } // new prop sync
  10923. this.$emit('update:layout', layout);
  10924. this.lastBreakpoint = newBreakpoint;
  10925. this.eventBus.emit("setColNum", getColsFromBreakpoint(newBreakpoint, this.cols));
  10926. },
  10927. // clear all responsive layouts
  10928. initResponsiveFeatures: function initResponsiveFeatures() {
  10929. // clear layouts
  10930. this.layouts = Object.assign({}, this.responsiveLayouts);
  10931. },
  10932. // find difference in layouts
  10933. findDifference: function findDifference(layout, originalLayout) {
  10934. //Find values that are in result1 but not in result2
  10935. var uniqueResultOne = layout.filter(function (obj) {
  10936. return !originalLayout.some(function (obj2) {
  10937. return obj.i === obj2.i;
  10938. });
  10939. }); //Find values that are in result2 but not in result1
  10940. var uniqueResultTwo = originalLayout.filter(function (obj) {
  10941. return !layout.some(function (obj2) {
  10942. return obj.i === obj2.i;
  10943. });
  10944. }); //Combine the two arrays of unique entries#
  10945. return uniqueResultOne.concat(uniqueResultTwo);
  10946. }
  10947. }
  10948. });
  10949. // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=script&lang=js
  10950. // EXTERNAL MODULE: ./src/components/GridLayout.vue?vue&type=style&index=0&id=fc5948f6&lang=css
  10951. var GridLayoutvue_type_style_index_0_id_fc5948f6_lang_css = __webpack_require__("6521");
  10952. // CONCATENATED MODULE: ./src/components/GridLayout.vue
  10953. GridLayoutvue_type_script_lang_js.render = GridLayoutvue_type_template_id_fc5948f6_render
  10954. /* harmony default export */ var GridLayout = (GridLayoutvue_type_script_lang_js);
  10955. // CONCATENATED MODULE: ./src/components/index.js
  10956. var components_install = function install(app
  10957. /*: App*/
  10958. ) {
  10959. app.component('grid-layout', GridLayout);
  10960. app.component('grid-item', GridItem);
  10961. };
  10962. /* harmony default export */ var components = (components_install);
  10963. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  10964. /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components);
  10965. /***/ }),
  10966. /***/ "fca0":
  10967. /***/ (function(module, exports, __webpack_require__) {
  10968. // 20.1.2.2 Number.isFinite(number)
  10969. var $export = __webpack_require__("5ca1");
  10970. var _isFinite = __webpack_require__("7726").isFinite;
  10971. $export($export.S, 'Number', {
  10972. isFinite: function isFinite(it) {
  10973. return typeof it == 'number' && _isFinite(it);
  10974. }
  10975. });
  10976. /***/ }),
  10977. /***/ "fdef":
  10978. /***/ (function(module, exports) {
  10979. module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  10980. '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  10981. /***/ })
  10982. /******/ })["default"];
  10983. //# sourceMappingURL=vue-grid-layout.common.js.map