| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["tableDragger"] = factory();
- else
- root["tableDragger"] = factory();
- })(this, function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId])
- /******/ return installedModules[moduleId].exports;
- /******/
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ exports: {},
- /******/ id: moduleId,
- /******/ loaded: false
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.loaded = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(0);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- __webpack_require__(1);
-
- var _drag = __webpack_require__(5);
-
- var _drag2 = _interopRequireDefault(_drag);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var create = function create(el, options) {
- return _drag2.default.create(el, options);
- };
- exports.default = create;
- /***/ }),
- /* 1 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
-
- // load the styles
- var content = __webpack_require__(2);
- if(typeof content === 'string') content = [[module.id, content, '']];
- // add the styles to the DOM
- var update = __webpack_require__(4)(content, {});
- if(content.locals) module.exports = content.locals;
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../node_modules/css-loader/index.js!./main.css", function() {
- var newContent = require("!!../node_modules/css-loader/index.js!./main.css");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 2 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(3)();
- // imports
-
-
- // module
- exports.push([module.id, ".sindu_dragger {\n list-style: none;\n margin: 0;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.sindu_handle {\n cursor: move;\n}\n\n.sindu_dragger li {\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: inherit;\n}\n\n.sindu_dragger li table, .sindu_dragger tr, .sindu_dragger th, .sindu_dragger td {\n box-sizing: border-box;\n}\n\n.gu-mirror {\n list-style: none;\n}\n\n.sindu_dragger.sindu_column li {\n float: left;\n}\n\n.sindu_dragging .sindu_origin_table {\n visibility: hidden;\n}\n\n.gu-mirror {\n position: fixed !important;\n margin: 0 !important;\n z-index: 9999 !important;\n opacity: 0.8;\n}\n\n.gu-mirror li {\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: inherit;\n}\n\n.gu-mirror li table, .gu-mirror tr, .gu-mirror th, .gu-mirror td {\n box-sizing: border-box;\n}\n\n.gu-hide {\n display: none !important;\n}\n\n.gu-unselectable {\n -webkit-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n}\n\n.gu-transit {\n opacity: 0.5;\n}\n", ""]);
-
- // exports
- /***/ }),
- /* 3 */
- /***/ (function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function() {
- var list = [];
-
- // return the list of modules as css string
- list.toString = function toString() {
- var result = [];
- for(var i = 0; i < this.length; i++) {
- var item = this[i];
- if(item[2]) {
- result.push("@media " + item[2] + "{" + item[1] + "}");
- } else {
- result.push(item[1]);
- }
- }
- return result.join("");
- };
-
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- /***/ }),
- /* 4 */
- /***/ (function(module, exports, __webpack_require__) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- var stylesInDom = {},
- memoize = function(fn) {
- var memo;
- return function () {
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
- return memo;
- };
- },
- isOldIE = memoize(function() {
- return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
- }),
- getHeadElement = memoize(function () {
- return document.head || document.getElementsByTagName("head")[0];
- }),
- singletonElement = null,
- singletonCounter = 0,
- styleElementsInsertedAtTop = [];
-
- module.exports = function(list, options) {
- if(false) {
- if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
- }
-
- options = options || {};
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
- // tags it will allow on a page
- if (typeof options.singleton === "undefined") options.singleton = isOldIE();
-
- // By default, add <style> tags to the bottom of <head>.
- if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
-
- var styles = listToStyles(list);
- addStylesToDom(styles, options);
-
- return function update(newList) {
- var mayRemove = [];
- for(var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- domStyle.refs--;
- mayRemove.push(domStyle);
- }
- if(newList) {
- var newStyles = listToStyles(newList);
- addStylesToDom(newStyles, options);
- }
- for(var i = 0; i < mayRemove.length; i++) {
- var domStyle = mayRemove[i];
- if(domStyle.refs === 0) {
- for(var j = 0; j < domStyle.parts.length; j++)
- domStyle.parts[j]();
- delete stylesInDom[domStyle.id];
- }
- }
- };
- }
-
- function addStylesToDom(styles, options) {
- for(var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- if(domStyle) {
- domStyle.refs++;
- for(var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j](item.parts[j]);
- }
- for(; j < item.parts.length; j++) {
- domStyle.parts.push(addStyle(item.parts[j], options));
- }
- } else {
- var parts = [];
- for(var j = 0; j < item.parts.length; j++) {
- parts.push(addStyle(item.parts[j], options));
- }
- stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
- }
- }
- }
-
- function listToStyles(list) {
- var styles = [];
- var newStyles = {};
- for(var i = 0; i < list.length; i++) {
- var item = list[i];
- var id = item[0];
- var css = item[1];
- var media = item[2];
- var sourceMap = item[3];
- var part = {css: css, media: media, sourceMap: sourceMap};
- if(!newStyles[id])
- styles.push(newStyles[id] = {id: id, parts: [part]});
- else
- newStyles[id].parts.push(part);
- }
- return styles;
- }
-
- function insertStyleElement(options, styleElement) {
- var head = getHeadElement();
- var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
- if (options.insertAt === "top") {
- if(!lastStyleElementInsertedAtTop) {
- head.insertBefore(styleElement, head.firstChild);
- } else if(lastStyleElementInsertedAtTop.nextSibling) {
- head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
- } else {
- head.appendChild(styleElement);
- }
- styleElementsInsertedAtTop.push(styleElement);
- } else if (options.insertAt === "bottom") {
- head.appendChild(styleElement);
- } else {
- throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
- }
- }
-
- function removeStyleElement(styleElement) {
- styleElement.parentNode.removeChild(styleElement);
- var idx = styleElementsInsertedAtTop.indexOf(styleElement);
- if(idx >= 0) {
- styleElementsInsertedAtTop.splice(idx, 1);
- }
- }
-
- function createStyleElement(options) {
- var styleElement = document.createElement("style");
- styleElement.type = "text/css";
- insertStyleElement(options, styleElement);
- return styleElement;
- }
-
- function createLinkElement(options) {
- var linkElement = document.createElement("link");
- linkElement.rel = "stylesheet";
- insertStyleElement(options, linkElement);
- return linkElement;
- }
-
- function addStyle(obj, options) {
- var styleElement, update, remove;
-
- if (options.singleton) {
- var styleIndex = singletonCounter++;
- styleElement = singletonElement || (singletonElement = createStyleElement(options));
- update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
- remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
- } else if(obj.sourceMap &&
- typeof URL === "function" &&
- typeof URL.createObjectURL === "function" &&
- typeof URL.revokeObjectURL === "function" &&
- typeof Blob === "function" &&
- typeof btoa === "function") {
- styleElement = createLinkElement(options);
- update = updateLink.bind(null, styleElement);
- remove = function() {
- removeStyleElement(styleElement);
- if(styleElement.href)
- URL.revokeObjectURL(styleElement.href);
- };
- } else {
- styleElement = createStyleElement(options);
- update = applyToTag.bind(null, styleElement);
- remove = function() {
- removeStyleElement(styleElement);
- };
- }
-
- update(obj);
-
- return function updateStyle(newObj) {
- if(newObj) {
- if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
- return;
- update(obj = newObj);
- } else {
- remove();
- }
- };
- }
-
- var replaceText = (function () {
- var textStore = [];
-
- return function (index, replacement) {
- textStore[index] = replacement;
- return textStore.filter(Boolean).join('\n');
- };
- })();
-
- function applyToSingletonTag(styleElement, index, remove, obj) {
- var css = remove ? "" : obj.css;
-
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = replaceText(index, css);
- } else {
- var cssNode = document.createTextNode(css);
- var childNodes = styleElement.childNodes;
- if (childNodes[index]) styleElement.removeChild(childNodes[index]);
- if (childNodes.length) {
- styleElement.insertBefore(cssNode, childNodes[index]);
- } else {
- styleElement.appendChild(cssNode);
- }
- }
- }
-
- function applyToTag(styleElement, obj) {
- var css = obj.css;
- var media = obj.media;
-
- if(media) {
- styleElement.setAttribute("media", media)
- }
-
- if(styleElement.styleSheet) {
- styleElement.styleSheet.cssText = css;
- } else {
- while(styleElement.firstChild) {
- styleElement.removeChild(styleElement.firstChild);
- }
- styleElement.appendChild(document.createTextNode(css));
- }
- }
-
- function updateLink(linkElement, obj) {
- var css = obj.css;
- var sourceMap = obj.sourceMap;
-
- if(sourceMap) {
- // http://stackoverflow.com/a/26603875
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
- }
-
- var blob = new Blob([css], { type: "text/css" });
-
- var oldSrc = linkElement.href;
-
- linkElement.href = URL.createObjectURL(blob);
-
- if(oldSrc)
- URL.revokeObjectURL(oldSrc);
- }
- /***/ }),
- /* 5 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _typeof2 = __webpack_require__(6);
-
- var _typeof3 = _interopRequireDefault(_typeof2);
-
- var _getIterator2 = __webpack_require__(73);
-
- var _getIterator3 = _interopRequireDefault(_getIterator2);
-
- var _from = __webpack_require__(78);
-
- var _from2 = _interopRequireDefault(_from);
-
- var _assign = __webpack_require__(85);
-
- var _assign2 = _interopRequireDefault(_assign);
-
- var _classCallCheck2 = __webpack_require__(89);
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = __webpack_require__(90);
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- var _draggableList = __webpack_require__(94);
-
- var _draggableList2 = _interopRequireDefault(_draggableList);
-
- var _classes = __webpack_require__(107);
-
- var _classes2 = _interopRequireDefault(_classes);
-
- var _util = __webpack_require__(108);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var Drag = function () {
- function Drag() {
- var _this = this;
-
- var table = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
- var userOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- (0, _classCallCheck3.default)(this, Drag);
-
- if (!checkIsTable(table)) {
- throw new TypeError('table-dragger: el must be TABLE HTMLElement, not ' + {}.toString.call(table));
- }
- if (!table.rows.length) {
- return;
- }
- var defaults = {
- mode: 'column',
- dragHandler: '',
- onlyBody: false,
- animation: 300
- };
- var options = this.options = (0, _assign2.default)({}, defaults, userOptions);
- var mode = options.mode;
-
- if (mode === 'free' && !options.dragHandler) {
- throw new Error('table-dragger: please specify dragHandler in free mode');
- }
-
- ['onTap', 'destroy', 'startBecauseMouseMoved', 'sortColumn', 'sortRow'].forEach(function (m) {
- _this[m] = _this[m].bind(_this);
- });
-
- var dragger = this.dragger = emitter({
- dragging: false,
- destroy: this.destroy
- });
- dragger.on('drop', function (from, to, originEl, realMode) {
- (realMode === 'column' ? _this.sortColumn : _this.sortRow)(from, to);
- });
-
- var handlers = void 0;
- if (options.dragHandler) {
- handlers = table.querySelectorAll(options.dragHandler);
- if (handlers && !handlers.length) {
- throw new Error('table-dragger: no element match dragHandler selector');
- }
- } else {
- handlers = mode === 'column' ? table.rows[0] ? table.rows[0].children : [] : (0, _from2.default)(table.rows).map(function (row) {
- return row.children[0];
- });
- }
- this.handlers = (0, _from2.default)(handlers);
- this.handlers.forEach(function (h) {
- h.classList.add(_classes2.default.handle);
- });
-
- table.classList.add(_classes2.default.originTable);
-
- this.tappedCoord = { x: 0, y: 0 };
- this.cellIndex = { x: 0, y: 0 };
- this.el = table;
- this.sortTable = null;
- this.realMode = mode;
- this.bindEvents();
- }
-
- (0, _createClass3.default)(Drag, [{
- key: 'bindEvents',
- value: function bindEvents() {
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = (0, _getIterator3.default)(this.handlers), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var e = _step.value;
-
- (0, _util.touchy)(e, 'add', 'mousedown', this.onTap);
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
- }
- }, {
- key: 'onTap',
- value: function onTap(event) {
- var _this2 = this;
-
- var target = event.target;
-
-
- while (target.nodeName !== 'TD' && target.nodeName !== 'TH') {
- target = target.parentElement;
- }
-
- var ignore = !isLeftButton(event) || event.metaKey || event.ctrlKey;
- if (ignore) {
- return;
- }
-
- this.cellIndex = { x: target.cellIndex, y: target.parentElement.rowIndex };
- this.tappedCoord = { x: event.clientX, y: event.clientY };
-
- this.eventualStart(false);
- (0, _util.touchy)(document, 'add', 'mouseup', function () {
- _this2.eventualStart(true);
- });
- }
- }, {
- key: 'startBecauseMouseMoved',
- value: function startBecauseMouseMoved(event) {
- var tappedCoord = this.tappedCoord,
- mode = this.options.mode;
-
- var gapX = Math.abs(event.clientX - tappedCoord.x);
- var gapY = Math.abs(event.clientY - tappedCoord.y);
-
- var isFree = mode === 'free';
- var realMode = mode;
-
- if (!gapX && !gapY) {
- return;
- }
- this.dragger.dragging = true;
-
- if (isFree) {
- realMode = gapX < gapY ? 'row' : 'column';
- }
- this.realMode = realMode;
-
- var sortTable = this.sortTable = new _draggableList2.default({
- mode: realMode,
- originTable: this
- });
- this.eventualStart(true);
-
- (0, _util.touchy)(document, 'add', 'mouseup', sortTable.destroy);
- }
- }, {
- key: 'eventualStart',
- value: function eventualStart(remove) {
- var op = remove ? 'remove' : 'add';
- (0, _util.touchy)(document, op, 'mousemove', this.startBecauseMouseMoved);
- }
- }, {
- key: 'destroy',
- value: function destroy() {
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- for (var _iterator2 = (0, _getIterator3.default)(this.handlers), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var h = _step2.value;
-
- (0, _util.touchy)(h, 'remove', 'mousedown', this.onTap);
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
-
- this.el.classList.remove(_classes2.default.originTable);
- }
- }, {
- key: 'sortColumn',
- value: function sortColumn(from, to) {
- if (from === to) {
- return;
- }
- var table = this.el;
- (0, _from2.default)(table.rows).forEach(function (row) {
- (0, _util.sort)({ list: row.children, from: from, to: to });
- });
-
- var cols = table.querySelectorAll('col');
- if (cols.length) {
- (0, _util.sort)({ list: cols, from: from, to: to });
- }
- }
- }, {
- key: 'sortRow',
- value: function sortRow(from, to) {
- if (from === to) {
- return;
- }
- var table = this.el;
- var list = (0, _from2.default)(table.rows);
- (0, _util.sort)({ list: list, parent: list[to].parentElement, from: from, to: to });
- }
- }], [{
- key: 'create',
- value: function create(el, options) {
- var d = new Drag(el, options);
- return d && d.dragger;
- }
- }]);
- return Drag;
- }();
-
- Drag.version = '1.0';
- exports.default = Drag;
-
-
- function checkIsTable(ele) {
- return ele && (typeof ele === 'undefined' ? 'undefined' : (0, _typeof3.default)(ele)) === 'object' && 'nodeType' in ele && ele.nodeType === 1 && ele.cloneNode && ele.nodeName === 'TABLE';
- }
-
- function isLeftButton(e) {
- if ('touches' in e) {
- return e.touches.length === 1;
- }
- if ('buttons' in e) {
- return e.buttons === 1;
- }
- if ('button' in e) {
- return e.button === 0;
- }
- return false;
- }
-
- function emitter() {
- var thing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- var evt = {};
- thing.on = function (type, fn) {
- evt[type] = evt[type] || [];
- evt[type].push(fn);
- return thing;
- };
- thing.emit = function (type) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- if (!evt[type]) {
- return;
- }
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
-
- try {
- for (var _iterator3 = (0, _getIterator3.default)(evt[type]), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var fn = _step3.value;
-
- fn.apply(undefined, args);
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion3 && _iterator3.return) {
- _iterator3.return();
- }
- } finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
- }
- }
- }
- };
- return thing;
- }
- /***/ }),
- /* 6 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
-
- exports.__esModule = true;
-
- var _iterator = __webpack_require__(7);
-
- var _iterator2 = _interopRequireDefault(_iterator);
-
- var _symbol = __webpack_require__(58);
-
- var _symbol2 = _interopRequireDefault(_symbol);
-
- var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
- return typeof obj === "undefined" ? "undefined" : _typeof(obj);
- } : function (obj) {
- return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
- };
- /***/ }),
- /* 7 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(8), __esModule: true };
- /***/ }),
- /* 8 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(9);
- __webpack_require__(53);
- module.exports = __webpack_require__(57).f('iterator');
- /***/ }),
- /* 9 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var $at = __webpack_require__(10)(true);
-
- // 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(13)(String, 'String', function (iterated) {
- this._t = String(iterated); // target
- this._i = 0; // next index
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
- }, function () {
- var O = this._t;
- var index = this._i;
- var point;
- if (index >= O.length) return { value: undefined, done: true };
- point = $at(O, index);
- this._i += point.length;
- return { value: point, done: false };
- });
- /***/ }),
- /* 10 */
- /***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(11);
- var defined = __webpack_require__(12);
- // true -> String#at
- // false -> String#codePointAt
- module.exports = function (TO_STRING) {
- return function (that, pos) {
- var s = String(defined(that));
- var i = toInteger(pos);
- var l = s.length;
- var a, b;
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
- };
- /***/ }),
- /* 11 */
- /***/ (function(module, exports) {
- // 7.1.4 ToInteger
- var ceil = Math.ceil;
- var floor = Math.floor;
- module.exports = function (it) {
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
- };
- /***/ }),
- /* 12 */
- /***/ (function(module, exports) {
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function (it) {
- if (it == undefined) throw TypeError("Can't call method on " + it);
- return it;
- };
- /***/ }),
- /* 13 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var LIBRARY = __webpack_require__(14);
- var $export = __webpack_require__(15);
- var redefine = __webpack_require__(31);
- var hide = __webpack_require__(20);
- var Iterators = __webpack_require__(32);
- var $iterCreate = __webpack_require__(33);
- var setToStringTag = __webpack_require__(49);
- var getPrototypeOf = __webpack_require__(51);
- var ITERATOR = __webpack_require__(50)('iterator');
- var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
- var FF_ITERATOR = '@@iterator';
- var KEYS = 'keys';
- var VALUES = 'values';
-
- var returnThis = function () { return this; };
-
- module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- $iterCreate(Constructor, NAME, next);
- var getMethod = function (kind) {
- if (!BUGGY && kind in proto) return proto[kind];
- switch (kind) {
- case KEYS: return function keys() { return new Constructor(this, kind); };
- case VALUES: return function values() { return new Constructor(this, kind); };
- } return function entries() { return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator';
- var DEF_VALUES = DEFAULT == VALUES;
- var VALUES_BUG = false;
- var proto = Base.prototype;
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
- var $default = $native || getMethod(DEFAULT);
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
- var methods, key, IteratorPrototype;
- // Fix native
- if ($anyNative) {
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEF_VALUES && $native && $native.name !== VALUES) {
- VALUES_BUG = true;
- $default = function values() { return $native.call(this); };
- }
- // Define iterator
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if (DEFAULT) {
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if (FORCED) for (key in methods) {
- if (!(key in proto)) redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
- };
- /***/ }),
- /* 14 */
- /***/ (function(module, exports) {
- module.exports = true;
- /***/ }),
- /* 15 */
- /***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16);
- var core = __webpack_require__(17);
- var ctx = __webpack_require__(18);
- var hide = __webpack_require__(20);
- var has = __webpack_require__(30);
- var PROTOTYPE = 'prototype';
-
- var $export = function (type, name, source) {
- var IS_FORCED = type & $export.F;
- var IS_GLOBAL = type & $export.G;
- var IS_STATIC = type & $export.S;
- var IS_PROTO = type & $export.P;
- var IS_BIND = type & $export.B;
- var IS_WRAP = type & $export.W;
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
- var expProto = exports[PROTOTYPE];
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
- var key, own, out;
- if (IS_GLOBAL) source = name;
- for (key in source) {
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if (own && has(exports, key)) continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function (C) {
- var F = function (a, b, c) {
- if (this instanceof C) {
- switch (arguments.length) {
- case 0: return new C();
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if (IS_PROTO) {
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
- }
- }
- };
- // type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
- module.exports = $export;
- /***/ }),
- /* 16 */
- /***/ (function(module, exports) {
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self
- // eslint-disable-next-line no-new-func
- : Function('return this')();
- if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
- /***/ }),
- /* 17 */
- /***/ (function(module, exports) {
- var core = module.exports = { version: '2.6.9' };
- if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
- /***/ }),
- /* 18 */
- /***/ (function(module, exports, __webpack_require__) {
- // optional / simple context binding
- var aFunction = __webpack_require__(19);
- module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
- };
- /***/ }),
- /* 19 */
- /***/ (function(module, exports) {
- module.exports = function (it) {
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
- return it;
- };
- /***/ }),
- /* 20 */
- /***/ (function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(21);
- var createDesc = __webpack_require__(29);
- module.exports = __webpack_require__(25) ? function (object, key, value) {
- return dP.f(object, key, createDesc(1, value));
- } : function (object, key, value) {
- object[key] = value;
- return object;
- };
- /***/ }),
- /* 21 */
- /***/ (function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(22);
- var IE8_DOM_DEFINE = __webpack_require__(24);
- var toPrimitive = __webpack_require__(28);
- var dP = Object.defineProperty;
-
- exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if (IE8_DOM_DEFINE) try {
- return dP(O, P, Attributes);
- } catch (e) { /* empty */ }
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
- if ('value' in Attributes) O[P] = Attributes.value;
- return O;
- };
- /***/ }),
- /* 22 */
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(23);
- module.exports = function (it) {
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
- return it;
- };
- /***/ }),
- /* 23 */
- /***/ (function(module, exports) {
- module.exports = function (it) {
- return typeof it === 'object' ? it !== null : typeof it === 'function';
- };
- /***/ }),
- /* 24 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function () {
- return Object.defineProperty(__webpack_require__(27)('div'), 'a', { get: function () { return 7; } }).a != 7;
- });
- /***/ }),
- /* 25 */
- /***/ (function(module, exports, __webpack_require__) {
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(26)(function () {
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
- });
- /***/ }),
- /* 26 */
- /***/ (function(module, exports) {
- module.exports = function (exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
- };
- /***/ }),
- /* 27 */
- /***/ (function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(23);
- var document = __webpack_require__(16).document;
- // typeof document.createElement is 'object' in old IE
- var is = isObject(document) && isObject(document.createElement);
- module.exports = function (it) {
- return is ? document.createElement(it) : {};
- };
- /***/ }),
- /* 28 */
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(23);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function (it, S) {
- if (!isObject(it)) return it;
- var fn, val;
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- throw TypeError("Can't convert object to primitive value");
- };
- /***/ }),
- /* 29 */
- /***/ (function(module, exports) {
- module.exports = function (bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
- };
- /***/ }),
- /* 30 */
- /***/ (function(module, exports) {
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function (it, key) {
- return hasOwnProperty.call(it, key);
- };
- /***/ }),
- /* 31 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(20);
- /***/ }),
- /* 32 */
- /***/ (function(module, exports) {
- module.exports = {};
- /***/ }),
- /* 33 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var create = __webpack_require__(34);
- var descriptor = __webpack_require__(29);
- var setToStringTag = __webpack_require__(49);
- var IteratorPrototype = {};
-
- // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(20)(IteratorPrototype, __webpack_require__(50)('iterator'), function () { return this; });
-
- module.exports = function (Constructor, NAME, next) {
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
- setToStringTag(Constructor, NAME + ' Iterator');
- };
- /***/ }),
- /* 34 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(22);
- var dPs = __webpack_require__(35);
- var enumBugKeys = __webpack_require__(47);
- var IE_PROTO = __webpack_require__(44)('IE_PROTO');
- var Empty = function () { /* empty */ };
- var PROTOTYPE = 'prototype';
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(27)('iframe');
- var i = enumBugKeys.length;
- var lt = '<';
- var gt = '>';
- var iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(48).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
-
- module.exports = Object.create || function create(O, Properties) {
- var result;
- if (O !== null) {
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty();
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
- };
- /***/ }),
- /* 35 */
- /***/ (function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(21);
- var anObject = __webpack_require__(22);
- var getKeys = __webpack_require__(36);
-
- module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = getKeys(Properties);
- var length = keys.length;
- var i = 0;
- var P;
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
- return O;
- };
- /***/ }),
- /* 36 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(37);
- var enumBugKeys = __webpack_require__(47);
-
- module.exports = Object.keys || function keys(O) {
- return $keys(O, enumBugKeys);
- };
- /***/ }),
- /* 37 */
- /***/ (function(module, exports, __webpack_require__) {
- var has = __webpack_require__(30);
- var toIObject = __webpack_require__(38);
- var arrayIndexOf = __webpack_require__(41)(false);
- var IE_PROTO = __webpack_require__(44)('IE_PROTO');
-
- module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
- };
- /***/ }),
- /* 38 */
- /***/ (function(module, exports, __webpack_require__) {
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(39);
- var defined = __webpack_require__(12);
- module.exports = function (it) {
- return IObject(defined(it));
- };
- /***/ }),
- /* 39 */
- /***/ (function(module, exports, __webpack_require__) {
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(40);
- // eslint-disable-next-line no-prototype-builtins
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
- /***/ }),
- /* 40 */
- /***/ (function(module, exports) {
- var toString = {}.toString;
-
- module.exports = function (it) {
- return toString.call(it).slice(8, -1);
- };
- /***/ }),
- /* 41 */
- /***/ (function(module, exports, __webpack_require__) {
- // false -> Array#indexOf
- // true -> Array#includes
- var toIObject = __webpack_require__(38);
- var toLength = __webpack_require__(42);
- var toAbsoluteIndex = __webpack_require__(43);
- module.exports = function (IS_INCLUDES) {
- return function ($this, el, fromIndex) {
- var O = toIObject($this);
- var length = toLength(O.length);
- var index = toAbsoluteIndex(fromIndex, length);
- var value;
- // Array#includes uses SameValueZero equality algorithm
- // eslint-disable-next-line no-self-compare
- if (IS_INCLUDES && el != el) while (length > index) {
- value = O[index++];
- // eslint-disable-next-line no-self-compare
- if (value != value) return true;
- // Array#indexOf ignores holes, Array#includes - not
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
- if (O[index] === el) return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
- };
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(11);
- var min = Math.min;
- module.exports = function (it) {
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
- };
- /***/ }),
- /* 43 */
- /***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(11);
- var max = Math.max;
- var min = Math.min;
- module.exports = function (index, length) {
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
- };
- /***/ }),
- /* 44 */
- /***/ (function(module, exports, __webpack_require__) {
- var shared = __webpack_require__(45)('keys');
- var uid = __webpack_require__(46);
- module.exports = function (key) {
- return shared[key] || (shared[key] = uid(key));
- };
- /***/ }),
- /* 45 */
- /***/ (function(module, exports, __webpack_require__) {
- var core = __webpack_require__(17);
- var global = __webpack_require__(16);
- var SHARED = '__core-js_shared__';
- var store = global[SHARED] || (global[SHARED] = {});
-
- (module.exports = function (key, value) {
- return store[key] || (store[key] = value !== undefined ? value : {});
- })('versions', []).push({
- version: core.version,
- mode: __webpack_require__(14) ? 'pure' : 'global',
- copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
- });
- /***/ }),
- /* 46 */
- /***/ (function(module, exports) {
- var id = 0;
- var px = Math.random();
- module.exports = function (key) {
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
- };
- /***/ }),
- /* 47 */
- /***/ (function(module, exports) {
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
- /***/ }),
- /* 48 */
- /***/ (function(module, exports, __webpack_require__) {
- var document = __webpack_require__(16).document;
- module.exports = document && document.documentElement;
- /***/ }),
- /* 49 */
- /***/ (function(module, exports, __webpack_require__) {
- var def = __webpack_require__(21).f;
- var has = __webpack_require__(30);
- var TAG = __webpack_require__(50)('toStringTag');
-
- module.exports = function (it, tag, stat) {
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
- };
- /***/ }),
- /* 50 */
- /***/ (function(module, exports, __webpack_require__) {
- var store = __webpack_require__(45)('wks');
- var uid = __webpack_require__(46);
- var Symbol = __webpack_require__(16).Symbol;
- var USE_SYMBOL = typeof Symbol == 'function';
-
- var $exports = module.exports = function (name) {
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
- };
-
- $exports.store = store;
- /***/ }),
- /* 51 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(30);
- var toObject = __webpack_require__(52);
- var IE_PROTO = __webpack_require__(44)('IE_PROTO');
- var ObjectProto = Object.prototype;
-
- module.exports = Object.getPrototypeOf || function (O) {
- O = toObject(O);
- if (has(O, IE_PROTO)) return O[IE_PROTO];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
- };
- /***/ }),
- /* 52 */
- /***/ (function(module, exports, __webpack_require__) {
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(12);
- module.exports = function (it) {
- return Object(defined(it));
- };
- /***/ }),
- /* 53 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(54);
- var global = __webpack_require__(16);
- var hide = __webpack_require__(20);
- var Iterators = __webpack_require__(32);
- var TO_STRING_TAG = __webpack_require__(50)('toStringTag');
-
- var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
- 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
- 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
- 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
- 'TextTrackList,TouchList').split(',');
-
- for (var i = 0; i < DOMIterables.length; i++) {
- var NAME = DOMIterables[i];
- var Collection = global[NAME];
- var proto = Collection && Collection.prototype;
- if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = Iterators.Array;
- }
- /***/ }),
- /* 54 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var addToUnscopables = __webpack_require__(55);
- var step = __webpack_require__(56);
- var Iterators = __webpack_require__(32);
- var toIObject = __webpack_require__(38);
-
- // 22.1.3.4 Array.prototype.entries()
- // 22.1.3.13 Array.prototype.keys()
- // 22.1.3.29 Array.prototype.values()
- // 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(13)(Array, 'Array', function (iterated, kind) {
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
- // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
- }, function () {
- var O = this._t;
- var kind = this._k;
- var index = this._i++;
- if (!O || index >= O.length) {
- this._t = undefined;
- return step(1);
- }
- if (kind == 'keys') return step(0, index);
- if (kind == 'values') return step(0, O[index]);
- return step(0, [index, O[index]]);
- }, 'values');
-
- // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
- Iterators.Arguments = Iterators.Array;
-
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries');
- /***/ }),
- /* 55 */
- /***/ (function(module, exports) {
- module.exports = function () { /* empty */ };
- /***/ }),
- /* 56 */
- /***/ (function(module, exports) {
- module.exports = function (done, value) {
- return { value: value, done: !!done };
- };
- /***/ }),
- /* 57 */
- /***/ (function(module, exports, __webpack_require__) {
- exports.f = __webpack_require__(50);
- /***/ }),
- /* 58 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(59), __esModule: true };
- /***/ }),
- /* 59 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(60);
- __webpack_require__(70);
- __webpack_require__(71);
- __webpack_require__(72);
- module.exports = __webpack_require__(17).Symbol;
- /***/ }),
- /* 60 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- // ECMAScript 6 symbols shim
- var global = __webpack_require__(16);
- var has = __webpack_require__(30);
- var DESCRIPTORS = __webpack_require__(25);
- var $export = __webpack_require__(15);
- var redefine = __webpack_require__(31);
- var META = __webpack_require__(61).KEY;
- var $fails = __webpack_require__(26);
- var shared = __webpack_require__(45);
- var setToStringTag = __webpack_require__(49);
- var uid = __webpack_require__(46);
- var wks = __webpack_require__(50);
- var wksExt = __webpack_require__(57);
- var wksDefine = __webpack_require__(62);
- var enumKeys = __webpack_require__(63);
- var isArray = __webpack_require__(66);
- var anObject = __webpack_require__(22);
- var isObject = __webpack_require__(23);
- var toObject = __webpack_require__(52);
- var toIObject = __webpack_require__(38);
- var toPrimitive = __webpack_require__(28);
- var createDesc = __webpack_require__(29);
- var _create = __webpack_require__(34);
- var gOPNExt = __webpack_require__(67);
- var $GOPD = __webpack_require__(69);
- var $GOPS = __webpack_require__(64);
- var $DP = __webpack_require__(21);
- var $keys = __webpack_require__(36);
- var gOPD = $GOPD.f;
- var dP = $DP.f;
- var gOPN = gOPNExt.f;
- var $Symbol = global.Symbol;
- var $JSON = global.JSON;
- var _stringify = $JSON && $JSON.stringify;
- var PROTOTYPE = 'prototype';
- var HIDDEN = wks('_hidden');
- var TO_PRIMITIVE = wks('toPrimitive');
- var isEnum = {}.propertyIsEnumerable;
- var SymbolRegistry = shared('symbol-registry');
- var AllSymbols = shared('symbols');
- var OPSymbols = shared('op-symbols');
- var ObjectProto = Object[PROTOTYPE];
- var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
- var QObject = global.QObject;
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
- var setSymbolDesc = DESCRIPTORS && $fails(function () {
- return _create(dP({}, 'a', {
- get: function () { return dP(this, 'a', { value: 7 }).a; }
- })).a != 7;
- }) ? function (it, key, D) {
- var protoDesc = gOPD(ObjectProto, key);
- if (protoDesc) delete ObjectProto[key];
- dP(it, key, D);
- if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
- } : dP;
-
- var wrap = function (tag) {
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
- };
-
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
- return typeof it == 'symbol';
- } : function (it) {
- return it instanceof $Symbol;
- };
-
- var $defineProperty = function defineProperty(it, key, D) {
- if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if (has(AllSymbols, key)) {
- if (!D.enumerable) {
- if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
- D = _create(D, { enumerable: createDesc(0, false) });
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
- };
- var $defineProperties = function defineProperties(it, P) {
- anObject(it);
- var keys = enumKeys(P = toIObject(P));
- var i = 0;
- var l = keys.length;
- var key;
- while (l > i) $defineProperty(it, key = keys[i++], P[key]);
- return it;
- };
- var $create = function create(it, P) {
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
- };
- var $propertyIsEnumerable = function propertyIsEnumerable(key) {
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
- };
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
- it = toIObject(it);
- key = toPrimitive(key, true);
- if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
- var D = gOPD(it, key);
- if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
- return D;
- };
- var $getOwnPropertyNames = function getOwnPropertyNames(it) {
- var names = gOPN(toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
- } return result;
- };
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
- var IS_OP = it === ObjectProto;
- var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
- } return result;
- };
-
- // 19.4.1.1 Symbol([description])
- if (!USE_NATIVE) {
- $Symbol = function Symbol() {
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function (value) {
- if (this === ObjectProto) $set.call(OPSymbols, value);
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(68).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(65).f = $propertyIsEnumerable;
- $GOPS.f = $getOwnPropertySymbols;
-
- if (DESCRIPTORS && !__webpack_require__(14)) {
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function (name) {
- return wrap(wks(name));
- };
- }
-
- $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
-
- for (var es6Symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
- ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
-
- for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
-
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function (key) {
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(sym) {
- if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
- for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
- },
- useSetter: function () { setter = true; },
- useSimple: function () { setter = false; }
- });
-
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
- });
-
- // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
- // https://bugs.chromium.org/p/v8/issues/detail?id=3443
- var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
-
- $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
- getOwnPropertySymbols: function getOwnPropertySymbols(it) {
- return $GOPS.f(toObject(it));
- }
- });
-
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
- })), 'JSON', {
- stringify: function stringify(it) {
- var args = [it];
- var i = 1;
- var replacer, $replacer;
- while (arguments.length > i) args.push(arguments[i++]);
- $replacer = replacer = args[1];
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
- if (!isArray(replacer)) replacer = function (key, value) {
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
- if (!isSymbol(value)) return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
- });
-
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
- setToStringTag($Symbol, 'Symbol');
- // 20.2.1.9 Math[@@toStringTag]
- setToStringTag(Math, 'Math', true);
- // 24.3.3 JSON[@@toStringTag]
- setToStringTag(global.JSON, 'JSON', true);
- /***/ }),
- /* 61 */
- /***/ (function(module, exports, __webpack_require__) {
- var META = __webpack_require__(46)('meta');
- var isObject = __webpack_require__(23);
- var has = __webpack_require__(30);
- var setDesc = __webpack_require__(21).f;
- var id = 0;
- var isExtensible = Object.isExtensible || function () {
- return true;
- };
- var FREEZE = !__webpack_require__(26)(function () {
- return isExtensible(Object.preventExtensions({}));
- });
- var setMeta = function (it) {
- setDesc(it, META, { value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- } });
- };
- var fastKey = function (it, create) {
- // return primitive with prefix
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if (!has(it, META)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return 'F';
- // not necessary to add metadata
- if (!create) return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
- };
- var getWeak = function (it, create) {
- if (!has(it, META)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return true;
- // not necessary to add metadata
- if (!create) return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
- };
- // add metadata on freeze-family methods calling
- var onFreeze = function (it) {
- if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
- return it;
- };
- var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
- };
- /***/ }),
- /* 62 */
- /***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(16);
- var core = __webpack_require__(17);
- var LIBRARY = __webpack_require__(14);
- var wksExt = __webpack_require__(57);
- var defineProperty = __webpack_require__(21).f;
- module.exports = function (name) {
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
- };
- /***/ }),
- /* 63 */
- /***/ (function(module, exports, __webpack_require__) {
- // all enumerable object keys, includes symbols
- var getKeys = __webpack_require__(36);
- var gOPS = __webpack_require__(64);
- var pIE = __webpack_require__(65);
- module.exports = function (it) {
- var result = getKeys(it);
- var getSymbols = gOPS.f;
- if (getSymbols) {
- var symbols = getSymbols(it);
- var isEnum = pIE.f;
- var i = 0;
- var key;
- while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
- } return result;
- };
- /***/ }),
- /* 64 */
- /***/ (function(module, exports) {
- exports.f = Object.getOwnPropertySymbols;
- /***/ }),
- /* 65 */
- /***/ (function(module, exports) {
- exports.f = {}.propertyIsEnumerable;
- /***/ }),
- /* 66 */
- /***/ (function(module, exports, __webpack_require__) {
- // 7.2.2 IsArray(argument)
- var cof = __webpack_require__(40);
- module.exports = Array.isArray || function isArray(arg) {
- return cof(arg) == 'Array';
- };
- /***/ }),
- /* 67 */
- /***/ (function(module, exports, __webpack_require__) {
- // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(38);
- var gOPN = __webpack_require__(68).f;
- var toString = {}.toString;
-
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
- var getWindowNames = function (it) {
- try {
- return gOPN(it);
- } catch (e) {
- return windowNames.slice();
- }
- };
-
- module.exports.f = function getOwnPropertyNames(it) {
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
- };
- /***/ }),
- /* 68 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(37);
- var hiddenKeys = __webpack_require__(47).concat('length', 'prototype');
-
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return $keys(O, hiddenKeys);
- };
- /***/ }),
- /* 69 */
- /***/ (function(module, exports, __webpack_require__) {
- var pIE = __webpack_require__(65);
- var createDesc = __webpack_require__(29);
- var toIObject = __webpack_require__(38);
- var toPrimitive = __webpack_require__(28);
- var has = __webpack_require__(30);
- var IE8_DOM_DEFINE = __webpack_require__(24);
- var gOPD = Object.getOwnPropertyDescriptor;
-
- exports.f = __webpack_require__(25) ? gOPD : function getOwnPropertyDescriptor(O, P) {
- O = toIObject(O);
- P = toPrimitive(P, true);
- if (IE8_DOM_DEFINE) try {
- return gOPD(O, P);
- } catch (e) { /* empty */ }
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
- };
- /***/ }),
- /* 70 */
- /***/ (function(module, exports) {
- /***/ }),
- /* 71 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(62)('asyncIterator');
- /***/ }),
- /* 72 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(62)('observable');
- /***/ }),
- /* 73 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(74), __esModule: true };
- /***/ }),
- /* 74 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(53);
- __webpack_require__(9);
- module.exports = __webpack_require__(75);
- /***/ }),
- /* 75 */
- /***/ (function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(22);
- var get = __webpack_require__(76);
- module.exports = __webpack_require__(17).getIterator = function (it) {
- var iterFn = get(it);
- if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
- return anObject(iterFn.call(it));
- };
- /***/ }),
- /* 76 */
- /***/ (function(module, exports, __webpack_require__) {
- var classof = __webpack_require__(77);
- var ITERATOR = __webpack_require__(50)('iterator');
- var Iterators = __webpack_require__(32);
- module.exports = __webpack_require__(17).getIteratorMethod = function (it) {
- if (it != undefined) return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
- };
- /***/ }),
- /* 77 */
- /***/ (function(module, exports, __webpack_require__) {
- // getting tag from 19.1.3.6 Object.prototype.toString()
- var cof = __webpack_require__(40);
- var TAG = __webpack_require__(50)('toStringTag');
- // ES3 wrong here
- var ARG = cof(function () { return arguments; }()) == 'Arguments';
-
- // fallback for IE11 Script Access Denied error
- var tryGet = function (it, key) {
- try {
- return it[key];
- } catch (e) { /* empty */ }
- };
-
- module.exports = function (it) {
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
- };
- /***/ }),
- /* 78 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(79), __esModule: true };
- /***/ }),
- /* 79 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(9);
- __webpack_require__(80);
- module.exports = __webpack_require__(17).Array.from;
- /***/ }),
- /* 80 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var ctx = __webpack_require__(18);
- var $export = __webpack_require__(15);
- var toObject = __webpack_require__(52);
- var call = __webpack_require__(81);
- var isArrayIter = __webpack_require__(82);
- var toLength = __webpack_require__(42);
- var createProperty = __webpack_require__(83);
- var getIterFn = __webpack_require__(76);
-
- $export($export.S + $export.F * !__webpack_require__(84)(function (iter) { Array.from(iter); }), 'Array', {
- // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
- from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
- var O = toObject(arrayLike);
- var C = typeof this == 'function' ? this : Array;
- var aLen = arguments.length;
- var mapfn = aLen > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var index = 0;
- var iterFn = getIterFn(O);
- var length, result, step, iterator;
- if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
- // if object isn't iterable or it's array with default iterator - use simple case
- if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
- for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
- }
- } else {
- length = toLength(O.length);
- for (result = new C(length); length > index; index++) {
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
- }
- }
- result.length = index;
- return result;
- }
- });
- /***/ }),
- /* 81 */
- /***/ (function(module, exports, __webpack_require__) {
- // call something on iterator step with safe closing on error
- var anObject = __webpack_require__(22);
- module.exports = function (iterator, fn, value, entries) {
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch (e) {
- var ret = iterator['return'];
- if (ret !== undefined) anObject(ret.call(iterator));
- throw e;
- }
- };
- /***/ }),
- /* 82 */
- /***/ (function(module, exports, __webpack_require__) {
- // check on default Array iterator
- var Iterators = __webpack_require__(32);
- var ITERATOR = __webpack_require__(50)('iterator');
- var ArrayProto = Array.prototype;
-
- module.exports = function (it) {
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
- };
- /***/ }),
- /* 83 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- var $defineProperty = __webpack_require__(21);
- var createDesc = __webpack_require__(29);
-
- module.exports = function (object, index, value) {
- if (index in object) $defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
- };
- /***/ }),
- /* 84 */
- /***/ (function(module, exports, __webpack_require__) {
- var ITERATOR = __webpack_require__(50)('iterator');
- var SAFE_CLOSING = false;
-
- try {
- var riter = [7][ITERATOR]();
- riter['return'] = function () { SAFE_CLOSING = true; };
- // eslint-disable-next-line no-throw-literal
- Array.from(riter, function () { throw 2; });
- } catch (e) { /* empty */ }
-
- module.exports = function (exec, skipClosing) {
- if (!skipClosing && !SAFE_CLOSING) return false;
- var safe = false;
- try {
- var arr = [7];
- var iter = arr[ITERATOR]();
- iter.next = function () { return { done: safe = true }; };
- arr[ITERATOR] = function () { return iter; };
- exec(arr);
- } catch (e) { /* empty */ }
- return safe;
- };
- /***/ }),
- /* 85 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(86), __esModule: true };
- /***/ }),
- /* 86 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(87);
- module.exports = __webpack_require__(17).Object.assign;
- /***/ }),
- /* 87 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__(15);
-
- $export($export.S + $export.F, 'Object', { assign: __webpack_require__(88) });
- /***/ }),
- /* 88 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
- // 19.1.2.1 Object.assign(target, source, ...)
- var DESCRIPTORS = __webpack_require__(25);
- var getKeys = __webpack_require__(36);
- var gOPS = __webpack_require__(64);
- var pIE = __webpack_require__(65);
- var toObject = __webpack_require__(52);
- var IObject = __webpack_require__(39);
- var $assign = Object.assign;
-
- // should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__(26)(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var S = Symbol();
- var K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function (k) { B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var aLen = arguments.length;
- var index = 1;
- var getSymbols = gOPS.f;
- var isEnum = pIE.f;
- while (aLen > index) {
- var S = IObject(arguments[index++]);
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) {
- key = keys[j++];
- if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
- }
- } return T;
- } : $assign;
- /***/ }),
- /* 89 */
- /***/ (function(module, exports) {
- "use strict";
-
- exports.__esModule = true;
-
- exports.default = function (instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- };
- /***/ }),
- /* 90 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
-
- exports.__esModule = true;
-
- var _defineProperty = __webpack_require__(91);
-
- var _defineProperty2 = _interopRequireDefault(_defineProperty);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.default = function () {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- (0, _defineProperty2.default)(target, descriptor.key, descriptor);
- }
- }
-
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
- /***/ }),
- /* 91 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(92), __esModule: true };
- /***/ }),
- /* 92 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(93);
- var $Object = __webpack_require__(17).Object;
- module.exports = function defineProperty(it, key, desc) {
- return $Object.defineProperty(it, key, desc);
- };
- /***/ }),
- /* 93 */
- /***/ (function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(15);
- // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
- $export($export.S + $export.F * !__webpack_require__(25), 'Object', { defineProperty: __webpack_require__(21).f });
- /***/ }),
- /* 94 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _from = __webpack_require__(78);
-
- var _from2 = _interopRequireDefault(_from);
-
- var _classCallCheck2 = __webpack_require__(89);
-
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
- var _createClass2 = __webpack_require__(90);
-
- var _createClass3 = _interopRequireDefault(_createClass2);
-
- var _dragulaWithAnimation = __webpack_require__(95);
-
- var _dragulaWithAnimation2 = _interopRequireDefault(_dragulaWithAnimation);
-
- var _classes = __webpack_require__(107);
-
- var _classes2 = _interopRequireDefault(_classes);
-
- var _util = __webpack_require__(108);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var bodyPaddingRight = void 0;
- var bodyOverflow = void 0;
-
- var Dragger = function () {
- function Dragger(_ref) {
- var _this = this;
-
- var originTable = _ref.originTable,
- mode = _ref.mode;
- (0, _classCallCheck3.default)(this, Dragger);
- var dragger = originTable.dragger,
- cellIndex = originTable.cellIndex,
- originEl = originTable.el,
- options = originTable.options;
-
- var fakeTables = this.fakeTables = buildTables(originEl, mode);
-
- bodyPaddingRight = parseInt(document.body.style.paddingRight, 0) || 0;
- bodyOverflow = document.body.style.overflow;
-
- this.options = options;
- this.mode = mode;
- this.originTable = originTable;
- this.dragger = dragger;
- this.index = mode === 'column' ? cellIndex.x : cellIndex.y;
- ['destroy', 'onDrag', 'onDragend', 'onShadow', 'onOut'].forEach(function (m) {
- _this[m] = _this[m].bind(_this);
- });
-
- this.el = fakeTables.reduce(function (previous, current) {
- var li = document.createElement('li');
- li.appendChild(current);
- return previous.appendChild(li) && previous;
- }, document.createElement('ul'));
-
- this.drake = (0, _dragulaWithAnimation2.default)([this.el], {
- animation: 300,
- staticClass: _classes2.default.static,
- direction: mode === 'column' ? 'horizontal' : 'vertical'
- }).on('drag', this.onDrag).on('dragend', this.onDragend).on('shadow', this.onShadow).on('out', this.onOut);
-
- this.renderEl();
- this.dispatchMousedown();
- }
-
- (0, _createClass3.default)(Dragger, [{
- key: 'onDrag',
- value: function onDrag() {
- (0, _util.css)(document.body, { overflow: 'hidden' });
- var barWidth = (0, _util.getScrollBarWidth)();
- console.log(barWidth, 'barWidth');
- if (barWidth) {
- (0, _util.css)(document.body, { 'padding-right': barWidth + bodyPaddingRight + 'px' });
- }
- (0, _util.touchy)(document, 'remove', 'mouseup', this.destroy);
- this.dragger.emit('drag', this.originTable.el, this.options.mode);
- }
- }, {
- key: 'onDragend',
- value: function onDragend(droppedItem) {
- var originEl = this.originTable.el,
- dragger = this.dragger,
- index = this.index,
- mode = this.mode,
- el = this.el;
-
- (0, _util.css)(document.body, { overflow: bodyOverflow, 'padding-right': bodyPaddingRight + 'px' });
- this.dragger.dragging = false;
- var from = index;
- var to = (0, _from2.default)(el.children).indexOf(droppedItem);
- this.destroy();
- dragger.emit('drop', from, to, originEl, mode);
- }
- }, {
- key: 'onShadow',
- value: function onShadow(draggingItem) {
- var originEl = this.originTable.el,
- dragger = this.dragger,
- index = this.index,
- el = this.el,
- mode = this.mode;
-
- var from = index;
- var to = (0, _from2.default)(el.children).indexOf(draggingItem);
- dragger.emit('shadowMove', from, to, originEl, mode);
- }
- }, {
- key: 'onOut',
- value: function onOut() {
- this.dragger.dragging = false;
- this.dragger.emit('out', this.originTable.el, this.mode);
- }
- }, {
- key: 'destroy',
- value: function destroy() {
- var _this2 = this;
-
- (0, _util.remove)(document, 'mouseup', this.destroy);
- this.el.parentElement.classList.remove(_classes2.default.dragging);
- this.el.parentElement.removeChild(this.el);
- setTimeout(function () {
- _this2.drake.destroy();
- }, 0);
- }
- }, {
- key: 'dispatchMousedown',
- value: function dispatchMousedown() {
- var el = this.el,
- index = this.index;
-
- el.children[index].dispatchEvent((0, _util.getTouchyEvent)());
- }
- }, {
- key: 'renderEl',
- value: function renderEl() {
- var _this3 = this;
-
- var mode = this.mode,
- el = this.el,
- originEl = this.originTable.el;
-
-
- this.sizeFakes();
- (0, _util.css)(el, {
- position: 'absolute',
- top: originEl.offsetTop + 'px',
- left: originEl.offsetLeft + 'px'
- });
- (0, _util.insertBeforeSibling)({ target: el, origin: originEl });
-
- var spacing = window.getComputedStyle(originEl).getPropertyValue('border-spacing').split(' ')[0];
- var attr = mode === 'column' ? 'margin-right' : 'margin-bottom';
- var length = el.children.length;
- (0, _from2.default)(el.children).forEach(function (li, dex) {
- var table = li && li.querySelector('table');
- if (_this3.options.onlyBody && mode === 'row' && !(0, _from2.default)(table.children).some(function (o) {
- return o.nodeName === 'TBODY';
- })) {
- li.classList.add(_classes2.default.static);
- }
-
- if (spacing && dex < length - 1) {
- li.style[attr] = '-' + spacing;
- }
- });
-
- el.parentElement.classList.add(_classes2.default.dragging);
- el.classList.add(_classes2.default.draggableTable);
- el.classList.add('sindu_' + mode);
- }
- }, {
- key: 'sizeFakes',
- value: function sizeFakes() {
- return this.mode === 'column' ? this.sizeColumnFake() : this.sizeRowFake();
- }
- }, {
- key: 'sizeColumnFake',
- value: function sizeColumnFake() {
- var fakeTables = this.fakeTables,
- originEl = this.originTable.el;
-
- (0, _from2.default)((0, _util.getLongestRow)(originEl).children).forEach(function (cell, index) {
- var w = cell.getBoundingClientRect().width;
- var t = fakeTables[index];
- (0, _util.css)(t, { width: w + 'px' });
- (0, _util.css)(t.rows[0].children[0], { width: w + 'px' });
- });
-
- var rowHeights = (0, _from2.default)(originEl.rows).map(function (row) {
- return row.children[0].getBoundingClientRect().height;
- });
- fakeTables.forEach(function (t) {
- (0, _from2.default)(t.rows).forEach(function (row, index) {
- (0, _util.css)(row, { height: rowHeights[index] + 'px' });
- });
- });
- }
- }, {
- key: 'sizeRowFake',
- value: function sizeRowFake() {
- var fakeTables = this.fakeTables,
- originEl = this.originTable.el;
-
-
- var cells = (0, _util.getLongestRow)(originEl).children;
- var w = originEl.getBoundingClientRect().width;
-
- fakeTables.forEach(function (t) {
- (0, _util.css)(t, { width: w + 'px' });
- (0, _from2.default)(t.rows[0].children).forEach(function (cell, i) {
- (0, _util.css)(cell, { width: cells[i].getBoundingClientRect().width + 'px' });
- });
- });
- }
- }]);
- return Dragger;
- }();
-
- exports.default = Dragger;
-
- function origin2DragItem(liTable) {
- (0, _util.css)(liTable, { 'table-layout': 'fixed', width: 'initial', height: 'initial', padding: 0, margin: 0 });
- ['width', 'height', 'id'].forEach(function (p) {
- liTable.removeAttribute(p);
- });
- liTable.classList.remove(_classes2.default.originTable);
- (0, _from2.default)(liTable.querySelectorAll('col')).forEach(function (col) {
- col.removeAttribute('width');
- (0, _util.css)(col, { width: 'initial' });
- });
- }
-
- function getColumnAsTableByIndex(table, index) {
- var cTable = table.cloneNode(true);
- origin2DragItem(cTable);
-
- var cols = cTable.querySelectorAll('col');
- if (cols.length) {
- (0, _from2.default)(cols).forEach(function (col, dex) {
- if (dex !== index) {
- col.parentElement.removeChild(col);
- }
- });
- }
-
- (0, _from2.default)(cTable.rows).forEach(function (row) {
- var target = row.children[index];
- (0, _util.empty)(row);
- if (target) {
- row.appendChild(target);
- }
- });
- return cTable;
- }
-
- function buildRowTables(table) {
- return (0, _from2.default)(table.rows).map(function (row) {
- var cTable = table.cloneNode(true);
-
- origin2DragItem(cTable);
-
- (0, _from2.default)(cTable.children).forEach(function (c) {
- var nodeName = c.nodeName;
-
- if (nodeName !== 'COL' && nodeName !== 'COLGROUP') {
- cTable.removeChild(c);
- }
- });
-
- var organ = row.parentNode.cloneNode();
- organ.innerHTML = '';
- organ.appendChild(row.cloneNode(true));
- cTable.appendChild(organ);
- return cTable;
- });
- }
-
- function buildColumnTables(table) {
- return (0, _from2.default)((0, _util.getLongestRow)(table).children).map(function (cell, index) {
- return getColumnAsTableByIndex(table, index);
- });
- }
-
- function buildTables(table, mode) {
- return mode === 'column' ? buildColumnTables(table) : buildRowTables(table);
- }
- /***/ }),
- /* 95 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var emitter = __webpack_require__(96);
- var crossvent = __webpack_require__(103);
- var classes = __webpack_require__(106);
- var doc = document;
- var documentElement = doc.documentElement;
- var animateDuration = 300;
-
- function dragula (initialContainers, options) {
- var len = arguments.length;
- if (len === 1 && Array.isArray(initialContainers) === false) {
- options = initialContainers;
- initialContainers = [];
- }
- var _mirror; // mirror image
- var _source; // source container
- var _item; // item being dragged
- var _offsetX; // reference x
- var _offsetY; // reference y
- var _moveX; // reference move x
- var _moveY; // reference move y
- var _initialSibling; // reference sibling when grabbed
- var _currentSibling; // reference sibling now
- var _copy; // item used for copying
- var _renderTimer; // timer for setTimeout renderMirrorImage
- var _lastDropTarget = null; // last container item was over
- var _grabbed; // holds mousedown context until first mousemove
-
- var o = options || {};
- if (o.moves === void 0) { o.moves = always; }
- if (o.accepts === void 0) { o.accepts = always; }
- if (o.invalid === void 0) { o.invalid = invalidTarget; }
- if (o.containers === void 0) { o.containers = initialContainers || []; }
- if (o.isContainer === void 0) { o.isContainer = never; }
- if (o.copy === void 0) { o.copy = false; }
- if (o.copySortSource === void 0) { o.copySortSource = false; }
- if (o.revertOnSpill === void 0) { o.revertOnSpill = false; }
- if (o.removeOnSpill === void 0) { o.removeOnSpill = false; }
- if (o.direction === void 0) { o.direction = 'vertical'; }
- if (o.ignoreInputTextSelection === void 0) { o.ignoreInputTextSelection = true; }
- if (o.mirrorContainer === void 0) { o.mirrorContainer = doc.body; }
- if (o.staticClass === void 0) { o.staticClass = ''; }
-
-
- var drake = emitter({
- containers: o.containers,
- start: manualStart,
- end: end,
- cancel: cancel,
- remove: remove,
- destroy: destroy,
- canMove: canMove,
- dragging: false
- });
-
- if (o.removeOnSpill === true) {
- drake.on('over', spillOver).on('out', spillOut);
- }
-
- events();
-
- return drake;
-
- function isContainer (el) {
- return drake.containers.indexOf(el) !== -1 || o.isContainer(el);
- }
-
- function events (remove) {
- var op = remove ? 'remove' : 'add';
- touchy(documentElement, op, 'mousedown', grab);
- touchy(documentElement, op, 'mouseup', release);
- }
-
- function eventualMovements (remove) {
- var op = remove ? 'remove' : 'add';
- touchy(documentElement, op, 'mousemove', startBecauseMouseMoved);
- }
-
- function movements (remove) {
- var op = remove ? 'remove' : 'add';
- crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8
- crossvent[op](documentElement, 'click', preventGrabbed);
- }
-
- function destroy () {
- events(true);
- release({});
- }
-
- function preventGrabbed (e) {
- if (_grabbed) {
- e.preventDefault();
- }
- }
-
- function grab (e) {
- _moveX = e.clientX;
- _moveY = e.clientY;
-
- var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey;
- if (ignore) {
- return; // we only care about honest-to-god left clicks and touch events
- }
- var item = e.target;
- var context = canStart(item);
- if (!context) {
- return;
- }
- _grabbed = context;
- eventualMovements();
- if (e.type === 'mousedown') {
- if (isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208
- item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176
- } else {
- e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155
- }
- }
- }
-
- function startBecauseMouseMoved (e) {
- if (!_grabbed) {
- return;
- }
- if (whichMouseButton(e) === 0) {
- release({});
- return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope
- }
- // truthy check fixes #239, equality fixes #207
- if (e.clientX !== void 0 && e.clientX === _moveX && e.clientY !== void 0 && e.clientY === _moveY) {
- return;
- }
- if (o.ignoreInputTextSelection) {
- var clientX = getCoord('clientX', e);
- var clientY = getCoord('clientY', e);
- var elementBehindCursor = doc.elementFromPoint(clientX, clientY);
- if (isInput(elementBehindCursor)) {
- return;
- }
- }
-
- var grabbed = _grabbed; // call to end() unsets _grabbed
- eventualMovements(true);
- movements();
- end();
- start(grabbed);
-
- var offset = getOffset(_item);
- _offsetX = getCoord('pageX', e) - offset.left;
- _offsetY = getCoord('pageY', e) - offset.top;
-
- classes.add(_copy || _item, 'gu-transit');
- renderMirrorImage();
- drag(e);
- }
-
- function canStart (item) {
- if (drake.dragging && _mirror) {
- return;
- }
- if (isContainer(item)) {
- return; // don't drag container itself
- }
- var handle = item;
- while (getParent(item) && isContainer(getParent(item)) === false) {
- if (o.invalid(item, handle)) {
- return;
- }
- item = getParent(item); // drag target should be a top element
- if (!item) {
- return;
- }
- }
- var source = getParent(item);
- if (!source) {
- return;
- }
-
- if ((o.staticClass && item.classList.contains(o.staticClass))) {
- return;
- }
-
- if (o.invalid(item, handle)) {
- return;
- }
-
- var movable = o.moves(item, source, handle, nextEl(item));
- if (!movable) {
- return;
- }
-
- return {
- item: item,
- source: source
- };
- }
-
- function canMove (item) {
- return !!canStart(item);
- }
-
- function manualStart (item) {
- var context = canStart(item);
- if (context) {
- start(context);
- }
- }
-
- function start (context) {
- if (isCopy(context.item, context.source)) {
- _copy = context.item.cloneNode(true);
- drake.emit('cloned', _copy, context.item, 'copy');
- }
-
- _source = context.source;
- _item = context.item;
- _initialSibling = _currentSibling = nextEl(context.item);
-
- drake.dragging = true;
- drake.emit('drag', _item, _source);
- }
-
- function invalidTarget () {
- return false;
- }
-
- function end () {
- if (!drake.dragging) {
- return;
- }
- var item = _copy || _item;
- drop(item, getParent(item));
- }
-
- function ungrab () {
- _grabbed = false;
- eventualMovements(true);
- movements(true);
- }
-
- function release (e) {
- ungrab();
-
- if (!drake.dragging) {
- return;
- }
- var item = _copy || _item;
- var clientX = getCoord('clientX', e);
- var clientY = getCoord('clientY', e);
- var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);
- var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);
- if (dropTarget && ((_copy && o.copySortSource) || (!_copy || dropTarget !== _source))) {
- drop(item, dropTarget);
- } else if (o.removeOnSpill) {
- remove();
- } else {
- cancel();
- }
- }
-
- function drop (item, target) {
- var parent = getParent(item);
- if (_copy && o.copySortSource && target === _source) {
- parent.removeChild(_item);
- }
- if (isInitialPlacement(target)) {
- drake.emit('cancel', item, _source, _source);
- } else {
- drake.emit('drop', item, target, _source, _currentSibling);
- }
- cleanup();
- }
-
- function remove () {
- if (!drake.dragging) {
- return;
- }
- var item = _copy || _item;
- var parent = getParent(item);
- if (parent) {
- parent.removeChild(item);
- }
- drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source);
- cleanup();
- }
-
- function cancel (revert) {
- if (!drake.dragging) {
- return;
- }
- var reverts = arguments.length > 0 ? revert : o.revertOnSpill;
- var item = _copy || _item;
- var parent = getParent(item);
- var initial = isInitialPlacement(parent);
- if (initial === false && reverts) {
- if (_copy) {
- if (parent) {
- parent.removeChild(_copy);
- }
- } else {
- _source.insertBefore(item, _initialSibling);
- }
- }
- if (initial || reverts) {
- drake.emit('cancel', item, _source, _source);
- } else {
- drake.emit('drop', item, parent, _source, _currentSibling);
- }
- cleanup();
- }
-
- function cleanup () {
- var item = _copy || _item;
- ungrab();
- removeMirrorImage();
- if (item) {
- classes.rm(item, 'gu-transit');
- }
- if (_renderTimer) {
- clearTimeout(_renderTimer);
- }
- drake.dragging = false;
- if (_lastDropTarget) {
- drake.emit('out', item, _lastDropTarget, _source);
- }
- drake.emit('dragend', item);
- _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null;
- }
-
- function isInitialPlacement (target, s) {
- var sibling;
- if (s !== void 0) {
- sibling = s;
- } else if (_mirror) {
- sibling = _currentSibling;
- } else {
- sibling = nextEl(_copy || _item);
- }
- return target === _source && sibling === _initialSibling;
- }
-
- function findDropTarget (elementBehindCursor, clientX, clientY) {
- var target = elementBehindCursor;
- while (target && !accepted()) {
- target = getParent(target);
- }
- return target;
-
- function accepted () {
- var droppable = isContainer(target);
- if (droppable === false) {
- return false;
- }
-
- var immediate = getImmediateChild(target, elementBehindCursor);
- var reference = getReference(target, immediate, clientX, clientY);
- var initial = isInitialPlacement(target, reference);
- if (initial) {
- return true; // should always be able to drop it right back where it was
- }
- return o.accepts(_item, target, _source, reference);
- }
- }
-
- function drag (e) {
- if (!_mirror) {
- return;
- }
- e.preventDefault();
-
- var clientX = getCoord('clientX', e);
- var clientY = getCoord('clientY', e);
- var x = clientX - _offsetX;
- var y = clientY - _offsetY;
-
- _mirror.style.left = x + 'px';
- _mirror.style.top = y + 'px';
-
- var item = _copy || _item;
- var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);
- var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);
- var changed = dropTarget !== null && dropTarget !== _lastDropTarget;
- if (changed || dropTarget === null) {
- out();
- _lastDropTarget = dropTarget;
- over();
- }
- var parent = getParent(item);
- if (dropTarget === _source && _copy && !o.copySortSource) {
- if (parent) {
- parent.removeChild(item);
- }
- return;
- }
- var reference;
- var immediate = getImmediateChild(dropTarget, elementBehindCursor);
- if (immediate !== null) {
- reference = getReference(dropTarget, immediate, clientX, clientY);
- } else if (o.revertOnSpill === true && !_copy) {
- reference = _initialSibling;
- dropTarget = _source;
- } else {
- if (_copy && parent) {
- parent.removeChild(item);
- }
- return;
- }
- if (
- (reference === null && changed) ||
- reference !== item &&
- reference !== nextEl(item)
- ) {
- _currentSibling = reference;
-
- var itemRect = item.getBoundingClientRect();
- var referenceRect = reference ? reference.getBoundingClientRect() : null;
- var direct = o.direction;
- // if isPositive is true, the direction is right or down
- var isPositive;
- if (referenceRect) {
- isPositive = direct === 'horizontal' ? (itemRect.x < referenceRect.x) : (itemRect.y < referenceRect.y);
- }else{
- isPositive = true;
- }
- // mover is the element to be exchange passively
- var mover;
- if (isPositive) {
- mover = reference ? (reference.previousElementSibling ? reference.previousElementSibling : reference) : dropTarget.lastElementChild;
- } else {
- mover = reference; //upward or right
- }
- if (!mover) {
- return;
- }
- if (o.staticClass && mover.classList.contains(o.staticClass)) {
- return;
- }
- var moverRect = mover && mover.getBoundingClientRect();
- dropTarget.insertBefore(item, reference);
- if (mover && moverRect) {
- animate(moverRect, mover);
- animate(itemRect, item);
- }
- drake.emit('shadow', item, dropTarget, _source);
- }
- function moved (type) { drake.emit(type, item, _lastDropTarget, _source); }
- function over () { if (changed) { moved('over'); } }
- function out () { if (_lastDropTarget) { moved('out'); } }
- }
-
- function spillOver (el) {
- classes.rm(el, 'gu-hide');
- }
-
- function spillOut (el) {
- if (drake.dragging) { classes.add(el, 'gu-hide'); }
- }
-
- function renderMirrorImage () {
- if (_mirror) {
- return;
- }
- var rect = _item.getBoundingClientRect();
- _mirror = _item.cloneNode(true);
- _mirror.style.width = getRectWidth(rect) + 'px';
- _mirror.style.height = getRectHeight(rect) + 'px';
- classes.rm(_mirror, 'gu-transit');
- classes.add(_mirror, 'gu-mirror');
- o.mirrorContainer.appendChild(_mirror);
- touchy(documentElement, 'add', 'mousemove', drag);
- classes.add(o.mirrorContainer, 'gu-unselectable');
- drake.emit('cloned', _mirror, _item, 'mirror');
- }
-
- function removeMirrorImage () {
- if (_mirror) {
- classes.rm(o.mirrorContainer, 'gu-unselectable');
- touchy(documentElement, 'remove', 'mousemove', drag);
- getParent(_mirror).removeChild(_mirror);
- _mirror = null;
- }
- }
-
- function getImmediateChild (dropTarget, target) {
- var immediate = target;
- while (immediate !== dropTarget && getParent(immediate) !== dropTarget) {
- immediate = getParent(immediate);
- }
- if (immediate === documentElement) {
- return null;
- }
- return immediate;
- }
-
- function getReference (dropTarget, target, x, y) {
- var horizontal = o.direction === 'horizontal';
- var reference = target !== dropTarget ? inside() : outside();
- return reference;
-
- function outside () { // slower, but able to figure out any position
- var len = dropTarget.children.length;
- var i;
- var el;
- var rect;
- for (i = 0; i < len; i++) {
- el = dropTarget.children[i];
- rect = el.getBoundingClientRect();
- if (horizontal && (rect.left + rect.width / 2) > x) { return el; }
- if (!horizontal && (rect.top + rect.height / 2) > y) { return el; }
- }
- return null;
- }
-
- function inside () { // faster, but only available if dropped inside a child element
- var rect = target.getBoundingClientRect();
- if (horizontal) {
- return resolve(x > rect.left + getRectWidth(rect) / 2);
- }
- return resolve(y > rect.top + getRectHeight(rect) / 2);
- }
-
- function resolve (after) {
- return after ? nextEl(target) : target;
- }
- }
-
- function isCopy (item, container) {
- return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container);
- }
- }
-
- function touchy (el, op, type, fn) {
- var touch = {
- mouseup: 'touchend',
- mousedown: 'touchstart',
- mousemove: 'touchmove'
- };
- var pointers = {
- mouseup: 'pointerup',
- mousedown: 'pointerdown',
- mousemove: 'pointermove'
- };
- var microsoft = {
- mouseup: 'MSPointerUp',
- mousedown: 'MSPointerDown',
- mousemove: 'MSPointerMove'
- };
- if (global.navigator.pointerEnabled) {
- crossvent[op](el, pointers[type], fn);
- } else if (global.navigator.msPointerEnabled) {
- crossvent[op](el, microsoft[type], fn);
- } else {
- crossvent[op](el, touch[type], fn);
- crossvent[op](el, type, fn);
- }
- }
-
- function whichMouseButton (e) {
- if (e.touches !== void 0) { return e.touches.length; }
- if (e.which !== void 0 && e.which !== 0) { return e.which; } // see https://github.com/bevacqua/dragula/issues/261
- if (e.buttons !== void 0) { return e.buttons; }
- var button = e.button;
- if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575
- return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);
- }
- }
-
- function getOffset (el) {
- var rect = el.getBoundingClientRect();
- return {
- left: rect.left + getScroll('scrollLeft', 'pageXOffset'),
- top: rect.top + getScroll('scrollTop', 'pageYOffset')
- };
- }
-
- function getScroll (scrollProp, offsetProp) {
- if (typeof global[offsetProp] !== 'undefined') {
- return global[offsetProp];
- }
- if (documentElement.clientHeight) {
- return documentElement[scrollProp];
- }
- return doc.body[scrollProp];
- }
-
- function getElementBehindPoint (point, x, y) {
- var p = point || {};
- var state = p.className;
- var el;
- p.className += ' gu-hide';
- el = doc.elementFromPoint(x, y);
- p.className = state;
- return el;
- }
-
- function never () { return false; }
- function always () { return true; }
- function getRectWidth (rect) { return rect.width || (rect.right - rect.left); }
- function getRectHeight (rect) { return rect.height || (rect.bottom - rect.top); }
- function getParent (el) { return el.parentNode === doc ? null : el.parentNode; }
- function isInput (el) { return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el); }
- function isEditable (el) {
- if (!el) { return false; } // no parents were editable
- if (el.contentEditable === 'false') { return false; } // stop the lookup
- if (el.contentEditable === 'true') { return true; } // found a contentEditable element in the chain
- return isEditable(getParent(el)); // contentEditable is set to 'inherit'
- }
-
- function nextEl (el) {
- return el.nextElementSibling || manually();
- function manually () {
- var sibling = el;
- do {
- sibling = sibling.nextSibling;
- } while (sibling && sibling.nodeType !== 1);
- return sibling;
- }
- }
-
- /**
- * Create an animation from position before sorting to present position
- * @param prevRect including element's position infomation before sorting
- * @param target element after sorting
- */
- function animate (prevRect, target) {
- if (!prevRect || !target) {
- return;
- }
- var currentRect = target.getBoundingClientRect();
- var originProps = {transition: target.style.transition, transform: target.style.transform};
- Object.assign(target.style, {
- transition: 'none',
- transform: 'translate(' + (prevRect.left - currentRect.left) + 'px,' + (prevRect.top - currentRect.top) + 'px)'
- });
- target.offsetWidth; // repaint
- Object.assign(target.style, {transition: 'all ' + animateDuration + 'ms', transform: 'translate(0,0)'});
- clearTimeout(target.animated);
- target.animated = setTimeout(function () {
- Object.assign(target.style, {originProps: originProps});
- target.animated = false;
- }, animateDuration);
- }
-
-
- function getEventHost (e) {
- // on touchend event, we have to use `e.changedTouches`
- // see http://stackoverflow.com/questions/7192563/touchend-event-properties
- // see https://github.com/bevacqua/dragula/issues/34
- if (e.targetTouches && e.targetTouches.length) {
- return e.targetTouches[0];
- }
- if (e.changedTouches && e.changedTouches.length) {
- return e.changedTouches[0];
- }
- return e;
- }
-
- function getCoord (coord, e) {
- var host = getEventHost(e);
- var missMap = {
- pageX: 'clientX', // IE8
- pageY: 'clientY' // IE8
- };
- if (coord in missMap && !(coord in host) && missMap[coord] in host) {
- coord = missMap[coord];
- }
- return host[coord];
- }
-
- module.exports = dragula;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 96 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
-
- var atoa = __webpack_require__(97);
- var debounce = __webpack_require__(98);
-
- module.exports = function emitter (thing, options) {
- var opts = options || {};
- var evt = {};
- if (thing === undefined) { thing = {}; }
- thing.on = function (type, fn) {
- if (!evt[type]) {
- evt[type] = [fn];
- } else {
- evt[type].push(fn);
- }
- return thing;
- };
- thing.once = function (type, fn) {
- fn._once = true; // thing.off(fn) still works!
- thing.on(type, fn);
- return thing;
- };
- thing.off = function (type, fn) {
- var c = arguments.length;
- if (c === 1) {
- delete evt[type];
- } else if (c === 0) {
- evt = {};
- } else {
- var et = evt[type];
- if (!et) { return thing; }
- et.splice(et.indexOf(fn), 1);
- }
- return thing;
- };
- thing.emit = function () {
- var args = atoa(arguments);
- return thing.emitterSnapshot(args.shift()).apply(this, args);
- };
- thing.emitterSnapshot = function (type) {
- var et = (evt[type] || []).slice(0);
- return function () {
- var args = atoa(arguments);
- var ctx = this || thing;
- if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
- et.forEach(function emitter (listen) {
- if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
- if (listen._once) { thing.off(type, listen); }
- });
- return thing;
- };
- };
- return thing;
- };
- /***/ }),
- /* 97 */
- /***/ (function(module, exports) {
- module.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }
- /***/ }),
- /* 98 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
-
- var ticky = __webpack_require__(99);
-
- module.exports = function debounce (fn, args, ctx) {
- if (!fn) { return; }
- ticky(function run () {
- fn.apply(ctx || null, args || []);
- });
- };
- /***/ }),
- /* 99 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(setImmediate) {var si = typeof setImmediate === 'function', tick;
- if (si) {
- tick = function (fn) { setImmediate(fn); };
- } else {
- tick = function (fn) { setTimeout(fn, 0); };
- }
-
- module.exports = tick;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(100).setImmediate))
- /***/ }),
- /* 100 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
- (typeof self !== "undefined" && self) ||
- window;
- var apply = Function.prototype.apply;
-
- // DOM APIs, for completeness
-
- exports.setTimeout = function() {
- return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
- };
- exports.setInterval = function() {
- return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
- };
- exports.clearTimeout =
- exports.clearInterval = function(timeout) {
- if (timeout) {
- timeout.close();
- }
- };
-
- function Timeout(id, clearFn) {
- this._id = id;
- this._clearFn = clearFn;
- }
- Timeout.prototype.unref = Timeout.prototype.ref = function() {};
- Timeout.prototype.close = function() {
- this._clearFn.call(scope, this._id);
- };
-
- // Does not start the time, just sets up the members needed.
- exports.enroll = function(item, msecs) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = msecs;
- };
-
- exports.unenroll = function(item) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = -1;
- };
-
- exports._unrefActive = exports.active = function(item) {
- clearTimeout(item._idleTimeoutId);
-
- var msecs = item._idleTimeout;
- if (msecs >= 0) {
- item._idleTimeoutId = setTimeout(function onTimeout() {
- if (item._onTimeout)
- item._onTimeout();
- }, msecs);
- }
- };
-
- // setimmediate attaches itself to the global object
- __webpack_require__(101);
- // On some exotic environments, it's not clear which object `setimmediate` was
- // able to install onto. Search each possibility in the same order as the
- // `setimmediate` library.
- exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
- (typeof global !== "undefined" && global.setImmediate) ||
- (this && this.setImmediate);
- exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
- (typeof global !== "undefined" && global.clearImmediate) ||
- (this && this.clearImmediate);
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 101 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
- "use strict";
-
- if (global.setImmediate) {
- return;
- }
-
- var nextHandle = 1; // Spec says greater than zero
- var tasksByHandle = {};
- var currentlyRunningATask = false;
- var doc = global.document;
- var registerImmediate;
-
- function setImmediate(callback) {
- // Callback can either be a function or a string
- if (typeof callback !== "function") {
- callback = new Function("" + callback);
- }
- // Copy function arguments
- var args = new Array(arguments.length - 1);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i + 1];
- }
- // Store and register the task
- var task = { callback: callback, args: args };
- tasksByHandle[nextHandle] = task;
- registerImmediate(nextHandle);
- return nextHandle++;
- }
-
- function clearImmediate(handle) {
- delete tasksByHandle[handle];
- }
-
- function run(task) {
- var callback = task.callback;
- var args = task.args;
- switch (args.length) {
- case 0:
- callback();
- break;
- case 1:
- callback(args[0]);
- break;
- case 2:
- callback(args[0], args[1]);
- break;
- case 3:
- callback(args[0], args[1], args[2]);
- break;
- default:
- callback.apply(undefined, args);
- break;
- }
- }
-
- function runIfPresent(handle) {
- // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
- // So if we're currently running a task, we'll need to delay this invocation.
- if (currentlyRunningATask) {
- // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
- // "too much recursion" error.
- setTimeout(runIfPresent, 0, handle);
- } else {
- var task = tasksByHandle[handle];
- if (task) {
- currentlyRunningATask = true;
- try {
- run(task);
- } finally {
- clearImmediate(handle);
- currentlyRunningATask = false;
- }
- }
- }
- }
-
- function installNextTickImplementation() {
- registerImmediate = function(handle) {
- process.nextTick(function () { runIfPresent(handle); });
- };
- }
-
- function canUsePostMessage() {
- // The test against `importScripts` prevents this implementation from being installed inside a web worker,
- // where `global.postMessage` means something completely different and can't be used for this purpose.
- if (global.postMessage && !global.importScripts) {
- var postMessageIsAsynchronous = true;
- var oldOnMessage = global.onmessage;
- global.onmessage = function() {
- postMessageIsAsynchronous = false;
- };
- global.postMessage("", "*");
- global.onmessage = oldOnMessage;
- return postMessageIsAsynchronous;
- }
- }
-
- function installPostMessageImplementation() {
- // Installs an event handler on `global` for the `message` event: see
- // * https://developer.mozilla.org/en/DOM/window.postMessage
- // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
-
- var messagePrefix = "setImmediate$" + Math.random() + "$";
- var onGlobalMessage = function(event) {
- if (event.source === global &&
- typeof event.data === "string" &&
- event.data.indexOf(messagePrefix) === 0) {
- runIfPresent(+event.data.slice(messagePrefix.length));
- }
- };
-
- if (global.addEventListener) {
- global.addEventListener("message", onGlobalMessage, false);
- } else {
- global.attachEvent("onmessage", onGlobalMessage);
- }
-
- registerImmediate = function(handle) {
- global.postMessage(messagePrefix + handle, "*");
- };
- }
-
- function installMessageChannelImplementation() {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(event) {
- var handle = event.data;
- runIfPresent(handle);
- };
-
- registerImmediate = function(handle) {
- channel.port2.postMessage(handle);
- };
- }
-
- function installReadyStateChangeImplementation() {
- var html = doc.documentElement;
- registerImmediate = function(handle) {
- // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
- // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
- var script = doc.createElement("script");
- script.onreadystatechange = function () {
- runIfPresent(handle);
- script.onreadystatechange = null;
- html.removeChild(script);
- script = null;
- };
- html.appendChild(script);
- };
- }
-
- function installSetTimeoutImplementation() {
- registerImmediate = function(handle) {
- setTimeout(runIfPresent, 0, handle);
- };
- }
-
- // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
- var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
- attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
-
- // Don't get fooled by e.g. browserify environments.
- if ({}.toString.call(global.process) === "[object process]") {
- // For Node.js before 0.9
- installNextTickImplementation();
-
- } else if (canUsePostMessage()) {
- // For non-IE10 modern browsers
- installPostMessageImplementation();
-
- } else if (global.MessageChannel) {
- // For web workers, where supported
- installMessageChannelImplementation();
-
- } else if (doc && "onreadystatechange" in doc.createElement("script")) {
- // For IE 6–8
- installReadyStateChangeImplementation();
-
- } else {
- // For older browsers
- installSetTimeoutImplementation();
- }
-
- attachTo.setImmediate = setImmediate;
- attachTo.clearImmediate = clearImmediate;
- }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(102)))
- /***/ }),
- /* 102 */
- /***/ (function(module, exports) {
- // shim for using process in browser
- var process = module.exports = {};
-
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
-
- var cachedSetTimeout;
- var cachedClearTimeout;
-
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
-
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
-
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
-
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
-
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
-
- function noop() {}
-
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
-
- process.listeners = function (name) { return [] }
-
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
-
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
- /***/ }),
- /* 103 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var customEvent = __webpack_require__(104);
- var eventmap = __webpack_require__(105);
- var doc = global.document;
- var addEvent = addEventEasy;
- var removeEvent = removeEventEasy;
- var hardCache = [];
-
- if (!global.addEventListener) {
- addEvent = addEventHard;
- removeEvent = removeEventHard;
- }
-
- module.exports = {
- add: addEvent,
- remove: removeEvent,
- fabricate: fabricateEvent
- };
-
- function addEventEasy (el, type, fn, capturing) {
- return el.addEventListener(type, fn, capturing);
- }
-
- function addEventHard (el, type, fn) {
- return el.attachEvent('on' + type, wrap(el, type, fn));
- }
-
- function removeEventEasy (el, type, fn, capturing) {
- return el.removeEventListener(type, fn, capturing);
- }
-
- function removeEventHard (el, type, fn) {
- var listener = unwrap(el, type, fn);
- if (listener) {
- return el.detachEvent('on' + type, listener);
- }
- }
-
- function fabricateEvent (el, type, model) {
- var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
- if (el.dispatchEvent) {
- el.dispatchEvent(e);
- } else {
- el.fireEvent('on' + type, e);
- }
- function makeClassicEvent () {
- var e;
- if (doc.createEvent) {
- e = doc.createEvent('Event');
- e.initEvent(type, true, true);
- } else if (doc.createEventObject) {
- e = doc.createEventObject();
- }
- return e;
- }
- function makeCustomEvent () {
- return new customEvent(type, { detail: model });
- }
- }
-
- function wrapperFactory (el, type, fn) {
- return function wrapper (originalEvent) {
- var e = originalEvent || global.event;
- e.target = e.target || e.srcElement;
- e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
- e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
- e.which = e.which || e.keyCode;
- fn.call(el, e);
- };
- }
-
- function wrap (el, type, fn) {
- var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
- hardCache.push({
- wrapper: wrapper,
- element: el,
- type: type,
- fn: fn
- });
- return wrapper;
- }
-
- function unwrap (el, type, fn) {
- var i = find(el, type, fn);
- if (i) {
- var wrapper = hardCache[i].wrapper;
- hardCache.splice(i, 1); // free up a tad of memory
- return wrapper;
- }
- }
-
- function find (el, type, fn) {
- var i, item;
- for (i = 0; i < hardCache.length; i++) {
- item = hardCache[i];
- if (item.element === el && item.type === type && item.fn === fn) {
- return i;
- }
- }
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 104 */
- /***/ (function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {
- var NativeCustomEvent = global.CustomEvent;
-
- function useNative () {
- try {
- var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
- return 'cat' === p.type && 'bar' === p.detail.foo;
- } catch (e) {
- }
- return false;
- }
-
- /**
- * Cross-browser `CustomEvent` constructor.
- *
- * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
- *
- * @public
- */
-
- module.exports = useNative() ? NativeCustomEvent :
-
- // IE >= 9
- 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
- var e = document.createEvent('CustomEvent');
- if (params) {
- e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
- } else {
- e.initCustomEvent(type, false, false, void 0);
- }
- return e;
- } :
-
- // IE <= 8
- function CustomEvent (type, params) {
- var e = document.createEventObject();
- e.type = type;
- if (params) {
- e.bubbles = Boolean(params.bubbles);
- e.cancelable = Boolean(params.cancelable);
- e.detail = params.detail;
- } else {
- e.bubbles = false;
- e.cancelable = false;
- e.detail = void 0;
- }
- return e;
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 105 */
- /***/ (function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var eventmap = [];
- var eventname = '';
- var ron = /^on/;
-
- for (eventname in global) {
- if (ron.test(eventname)) {
- eventmap.push(eventname.slice(2));
- }
- }
-
- module.exports = eventmap;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 106 */
- /***/ (function(module, exports) {
- 'use strict';
-
- var cache = {};
- var start = '(?:^|\\s)';
- var end = '(?:\\s|$)';
-
- function lookupClass (className) {
- var cached = cache[className];
- if (cached) {
- cached.lastIndex = 0;
- } else {
- cache[className] = cached = new RegExp(start + className + end, 'g');
- }
- return cached;
- }
-
- function addClass (el, className) {
- var current = el.className;
- if (!current.length) {
- el.className = className;
- } else if (!lookupClass(className).test(current)) {
- el.className += ' ' + className;
- }
- }
-
- function rmClass (el, className) {
- el.className = el.className.replace(lookupClass(className), ' ').trim();
- }
-
- module.exports = {
- add: addClass,
- rm: rmClass
- };
- /***/ }),
- /* 107 */
- /***/ (function(module, exports) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = {
- originTable: 'sindu_origin_table',
- draggableTable: 'sindu_dragger',
- dragging: 'sindu_dragging',
- static: 'sindu_static',
- handle: 'sindu_handle'
- };
- /***/ }),
- /* 108 */
- /***/ (function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.getScrollBarWidth = exports.sort = exports.insertBeforeSibling = exports.appendSibling = exports.remove = exports.on = exports.empty = exports.css = exports.getLongestRow = exports.touchy = exports.getTouchyEvent = undefined;
-
- var _keys = __webpack_require__(109);
-
- var _keys2 = _interopRequireDefault(_keys);
-
- var _from = __webpack_require__(78);
-
- var _from2 = _interopRequireDefault(_from);
-
- var _crossvent = __webpack_require__(113);
-
- var _crossvent2 = _interopRequireDefault(_crossvent);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var global = window;
- var touch = {
- mouseup: 'touchend',
- mousedown: 'touchstart',
- mousemove: 'touchmove'
- };
- var pointers = {
- mouseup: 'pointerup',
- mousedown: 'pointerdown',
- mousemove: 'pointermove'
- };
-
- var getTouchyEvent = exports.getTouchyEvent = function getTouchyEvent() {
- var event = void 0;
- if (global.navigator.pointerEnabled) {
- if (document.createEvent) {
- event = document.createEvent("PointerEvent");
- event.initMouseEvent("pointerdown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- } else {
- event = new PointerEvent('pointerdown', {
- cancelable: true,
- bubbles: true,
- view: window
- });
- }
- }
- if (document.createEvent) {
- event = document.createEvent("MouseEvent");
- event.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- } else {
- event = new MouseEvent('mousedown', {
- 'view': window,
- 'bubbles': true,
- 'cancelable': true
- });
- }
- return event;
- };
-
- var touchy = exports.touchy = function touchy(el, op, type, fn) {
- if (global.navigator.pointerEnabled) {
- _crossvent2.default[op](el, pointers[type], fn);
- } else {
- _crossvent2.default[op](el, touch[type], fn);
- _crossvent2.default[op](el, type, fn);
- }
- };
-
- var getLongestRow = exports.getLongestRow = function getLongestRow(table) {
- var result = table.rows[0];
- (0, _from2.default)(table.rows).forEach(function (row) {
- var rowL = row.children.length;
- var resultL = result.children.length;
- result = rowL > resultL ? row : result;
- });
- return result;
- };
-
- var css = exports.css = function css(el, csses) {
- (0, _keys2.default)(csses).forEach(function (k) {
- el.style[k] = csses[k];
- });
- return el;
- };
-
- var empty = exports.empty = function empty(node) {
- while (node.firstChild) {
- node.removeChild(node.firstChild);
- }
- };
- var on = exports.on = function on(el, eventName, cb) {
- el.addEventListener(eventName, cb);
- };
-
- var remove = exports.remove = function remove(el, eventName, cb) {
- el.removeEventListener(eventName, cb);
- };
-
- var appendSibling = exports.appendSibling = function appendSibling(_ref) {
- var target = _ref.target,
- origin = _ref.origin,
- parent = _ref.parent;
-
- if (!target) {
- return;
- }
-
- (parent || target.parentNode).insertBefore(target, origin ? origin.nextElementSibling : null);
- };
-
- var insertBeforeSibling = exports.insertBeforeSibling = function insertBeforeSibling(_ref2) {
- var target = _ref2.target,
- origin = _ref2.origin;
-
- if (!target) {
- return;
- }
- origin.parentNode.insertBefore(target, origin);
- };
-
- var sort = exports.sort = function sort(_ref3) {
- var list = _ref3.list,
- from = _ref3.from,
- to = _ref3.to,
- parent = _ref3.parent;
-
- if (from < to) {
- appendSibling({ target: list[from], origin: list[to], parent: parent });
- } else {
- insertBeforeSibling({ target: list[from], origin: list[to] });
- }
- };
-
- var getScrollBarWidth = exports.getScrollBarWidth = function getScrollBarWidth() {
- if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
- return 0;
- }
- var inner = document.createElement('p');
- inner.style.width = '100%';
- inner.style.height = '200px';
-
- var outer = document.createElement('div');
- outer.style.position = 'absolute';
- outer.style.top = '0px';
- outer.style.left = '0px';
- outer.style.visibility = 'hidden';
- outer.style.width = '200px';
- outer.style.height = '150px';
- outer.style.overflow = 'hidden';
- outer.appendChild(inner);
-
- document.body.appendChild(outer);
- var w1 = inner.offsetWidth;
- outer.style.overflow = 'scroll';
- var w2 = inner.offsetWidth;
- if (w1 === w2) w2 = outer.clientWidth;
-
- document.body.removeChild(outer);
-
- return w1 - w2;
- };
- /***/ }),
- /* 109 */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(110), __esModule: true };
- /***/ }),
- /* 110 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(111);
- module.exports = __webpack_require__(17).Object.keys;
- /***/ }),
- /* 111 */
- /***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(52);
- var $keys = __webpack_require__(36);
-
- __webpack_require__(112)('keys', function () {
- return function keys(it) {
- return $keys(toObject(it));
- };
- });
- /***/ }),
- /* 112 */
- /***/ (function(module, exports, __webpack_require__) {
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(15);
- var core = __webpack_require__(17);
- var fails = __webpack_require__(26);
- module.exports = function (KEY, exec) {
- var fn = (core.Object || {})[KEY] || Object[KEY];
- var exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
- };
- /***/ }),
- /* 113 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var customEvent = __webpack_require__(114);
- var eventmap = __webpack_require__(115);
- var doc = global.document;
- var addEvent = addEventEasy;
- var removeEvent = removeEventEasy;
- var hardCache = [];
-
- if (!global.addEventListener) {
- addEvent = addEventHard;
- removeEvent = removeEventHard;
- }
-
- module.exports = {
- add: addEvent,
- remove: removeEvent,
- fabricate: fabricateEvent
- };
-
- function addEventEasy (el, type, fn, capturing) {
- return el.addEventListener(type, fn, capturing);
- }
-
- function addEventHard (el, type, fn) {
- return el.attachEvent('on' + type, wrap(el, type, fn));
- }
-
- function removeEventEasy (el, type, fn, capturing) {
- return el.removeEventListener(type, fn, capturing);
- }
-
- function removeEventHard (el, type, fn) {
- var listener = unwrap(el, type, fn);
- if (listener) {
- return el.detachEvent('on' + type, listener);
- }
- }
-
- function fabricateEvent (el, type, model) {
- var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();
- if (el.dispatchEvent) {
- el.dispatchEvent(e);
- } else {
- el.fireEvent('on' + type, e);
- }
- function makeClassicEvent () {
- var e;
- if (doc.createEvent) {
- e = doc.createEvent('Event');
- e.initEvent(type, true, true);
- } else if (doc.createEventObject) {
- e = doc.createEventObject();
- }
- return e;
- }
- function makeCustomEvent () {
- return new customEvent(type, { detail: model });
- }
- }
-
- function wrapperFactory (el, type, fn) {
- return function wrapper (originalEvent) {
- var e = originalEvent || global.event;
- e.target = e.target || e.srcElement;
- e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
- e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
- e.which = e.which || e.keyCode;
- fn.call(el, e);
- };
- }
-
- function wrap (el, type, fn) {
- var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);
- hardCache.push({
- wrapper: wrapper,
- element: el,
- type: type,
- fn: fn
- });
- return wrapper;
- }
-
- function unwrap (el, type, fn) {
- var i = find(el, type, fn);
- if (i) {
- var wrapper = hardCache[i].wrapper;
- hardCache.splice(i, 1); // free up a tad of memory
- return wrapper;
- }
- }
-
- function find (el, type, fn) {
- var i, item;
- for (i = 0; i < hardCache.length; i++) {
- item = hardCache[i];
- if (item.element === el && item.type === type && item.fn === fn) {
- return i;
- }
- }
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 114 */
- /***/ (function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {
- var NativeCustomEvent = global.CustomEvent;
-
- function useNative () {
- try {
- var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
- return 'cat' === p.type && 'bar' === p.detail.foo;
- } catch (e) {
- }
- return false;
- }
-
- /**
- * Cross-browser `CustomEvent` constructor.
- *
- * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
- *
- * @public
- */
-
- module.exports = useNative() ? NativeCustomEvent :
-
- // IE >= 9
- 'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
- var e = document.createEvent('CustomEvent');
- if (params) {
- e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
- } else {
- e.initCustomEvent(type, false, false, void 0);
- }
- return e;
- } :
-
- // IE <= 8
- function CustomEvent (type, params) {
- var e = document.createEventObject();
- e.type = type;
- if (params) {
- e.bubbles = Boolean(params.bubbles);
- e.cancelable = Boolean(params.cancelable);
- e.detail = params.detail;
- } else {
- e.bubbles = false;
- e.cancelable = false;
- e.detail = void 0;
- }
- return e;
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ }),
- /* 115 */
- /***/ (function(module, exports) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- var eventmap = [];
- var eventname = '';
- var ron = /^on/;
-
- for (eventname in global) {
- if (ron.test(eventname)) {
- eventmap.push(eventname.slice(2));
- }
- }
-
- module.exports = eventmap;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
- /***/ })
- /******/ ])
- });
- ;
- //# sourceMappingURL=table-dragger.js.map
|