vue3-tree-org.umd.js 170 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory(require("vue"));
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["vue3-tree-org"] = factory(require("vue"));
  8. else
  9. root["vue3-tree-org"] = factory(root["Vue"]);
  10. })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId]) {
  20. /******/ return installedModules[moduleId].exports;
  21. /******/ }
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ i: moduleId,
  25. /******/ l: false,
  26. /******/ exports: {}
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.l = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // define getter function for harmony exports
  47. /******/ __webpack_require__.d = function(exports, name, getter) {
  48. /******/ if(!__webpack_require__.o(exports, name)) {
  49. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  50. /******/ }
  51. /******/ };
  52. /******/
  53. /******/ // define __esModule on exports
  54. /******/ __webpack_require__.r = function(exports) {
  55. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  56. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  57. /******/ }
  58. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  59. /******/ };
  60. /******/
  61. /******/ // create a fake namespace object
  62. /******/ // mode & 1: value is a module id, require it
  63. /******/ // mode & 2: merge all properties of value into the ns
  64. /******/ // mode & 4: return value when already ns object
  65. /******/ // mode & 8|1: behave like require
  66. /******/ __webpack_require__.t = function(value, mode) {
  67. /******/ if(mode & 1) value = __webpack_require__(value);
  68. /******/ if(mode & 8) return value;
  69. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  70. /******/ var ns = Object.create(null);
  71. /******/ __webpack_require__.r(ns);
  72. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  73. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  74. /******/ return ns;
  75. /******/ };
  76. /******/
  77. /******/ // getDefaultExport function for compatibility with non-harmony modules
  78. /******/ __webpack_require__.n = function(module) {
  79. /******/ var getter = module && module.__esModule ?
  80. /******/ function getDefault() { return module['default']; } :
  81. /******/ function getModuleExports() { return module; };
  82. /******/ __webpack_require__.d(getter, 'a', getter);
  83. /******/ return getter;
  84. /******/ };
  85. /******/
  86. /******/ // Object.prototype.hasOwnProperty.call
  87. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  88. /******/
  89. /******/ // __webpack_public_path__
  90. /******/ __webpack_require__.p = "";
  91. /******/
  92. /******/
  93. /******/ // Load entry module and return exports
  94. /******/ return __webpack_require__(__webpack_require__.s = "fb15");
  95. /******/ })
  96. /************************************************************************/
  97. /******/ ({
  98. /***/ "00ee":
  99. /***/ (function(module, exports, __webpack_require__) {
  100. var wellKnownSymbol = __webpack_require__("b622");
  101. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  102. var test = {};
  103. test[TO_STRING_TAG] = 'z';
  104. module.exports = String(test) === '[object z]';
  105. /***/ }),
  106. /***/ "06cf":
  107. /***/ (function(module, exports, __webpack_require__) {
  108. var DESCRIPTORS = __webpack_require__("83ab");
  109. var call = __webpack_require__("c65b");
  110. var propertyIsEnumerableModule = __webpack_require__("d1e7");
  111. var createPropertyDescriptor = __webpack_require__("5c6c");
  112. var toIndexedObject = __webpack_require__("fc6a");
  113. var toPropertyKey = __webpack_require__("a04b");
  114. var hasOwn = __webpack_require__("1a2d");
  115. var IE8_DOM_DEFINE = __webpack_require__("0cfb");
  116. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  117. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  118. // `Object.getOwnPropertyDescriptor` method
  119. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  120. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  121. O = toIndexedObject(O);
  122. P = toPropertyKey(P);
  123. if (IE8_DOM_DEFINE) try {
  124. return $getOwnPropertyDescriptor(O, P);
  125. } catch (error) { /* empty */ }
  126. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  127. };
  128. /***/ }),
  129. /***/ "07fa":
  130. /***/ (function(module, exports, __webpack_require__) {
  131. var toLength = __webpack_require__("50c4");
  132. // `LengthOfArrayLike` abstract operation
  133. // https://tc39.es/ecma262/#sec-lengthofarraylike
  134. module.exports = function (obj) {
  135. return toLength(obj.length);
  136. };
  137. /***/ }),
  138. /***/ "0cfb":
  139. /***/ (function(module, exports, __webpack_require__) {
  140. var DESCRIPTORS = __webpack_require__("83ab");
  141. var fails = __webpack_require__("d039");
  142. var createElement = __webpack_require__("cc12");
  143. // Thanks to IE8 for its funny defineProperty
  144. module.exports = !DESCRIPTORS && !fails(function () {
  145. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  146. return Object.defineProperty(createElement('div'), 'a', {
  147. get: function () { return 7; }
  148. }).a != 7;
  149. });
  150. /***/ }),
  151. /***/ "0d51":
  152. /***/ (function(module, exports) {
  153. var $String = String;
  154. module.exports = function (argument) {
  155. try {
  156. return $String(argument);
  157. } catch (error) {
  158. return 'Object';
  159. }
  160. };
  161. /***/ }),
  162. /***/ "13d2":
  163. /***/ (function(module, exports, __webpack_require__) {
  164. var fails = __webpack_require__("d039");
  165. var isCallable = __webpack_require__("1626");
  166. var hasOwn = __webpack_require__("1a2d");
  167. var DESCRIPTORS = __webpack_require__("83ab");
  168. var CONFIGURABLE_FUNCTION_NAME = __webpack_require__("5e77").CONFIGURABLE;
  169. var inspectSource = __webpack_require__("8925");
  170. var InternalStateModule = __webpack_require__("69f3");
  171. var enforceInternalState = InternalStateModule.enforce;
  172. var getInternalState = InternalStateModule.get;
  173. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  174. var defineProperty = Object.defineProperty;
  175. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  176. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  177. });
  178. var TEMPLATE = String(String).split('String');
  179. var makeBuiltIn = module.exports = function (value, name, options) {
  180. if (String(name).slice(0, 7) === 'Symbol(') {
  181. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  182. }
  183. if (options && options.getter) name = 'get ' + name;
  184. if (options && options.setter) name = 'set ' + name;
  185. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  186. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  187. else value.name = name;
  188. }
  189. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  190. defineProperty(value, 'length', { value: options.arity });
  191. }
  192. try {
  193. if (options && hasOwn(options, 'constructor') && options.constructor) {
  194. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  195. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  196. } else if (value.prototype) value.prototype = undefined;
  197. } catch (error) { /* empty */ }
  198. var state = enforceInternalState(value);
  199. if (!hasOwn(state, 'source')) {
  200. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  201. } return value;
  202. };
  203. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  204. // eslint-disable-next-line no-extend-native -- required
  205. Function.prototype.toString = makeBuiltIn(function toString() {
  206. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  207. }, 'toString');
  208. /***/ }),
  209. /***/ "1626":
  210. /***/ (function(module, exports) {
  211. // `IsCallable` abstract operation
  212. // https://tc39.es/ecma262/#sec-iscallable
  213. module.exports = function (argument) {
  214. return typeof argument == 'function';
  215. };
  216. /***/ }),
  217. /***/ "1a2d":
  218. /***/ (function(module, exports, __webpack_require__) {
  219. var uncurryThis = __webpack_require__("e330");
  220. var toObject = __webpack_require__("7b0b");
  221. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  222. // `HasOwnProperty` abstract operation
  223. // https://tc39.es/ecma262/#sec-hasownproperty
  224. // eslint-disable-next-line es-x/no-object-hasown -- safe
  225. module.exports = Object.hasOwn || function hasOwn(it, key) {
  226. return hasOwnProperty(toObject(it), key);
  227. };
  228. /***/ }),
  229. /***/ "1d80":
  230. /***/ (function(module, exports) {
  231. var $TypeError = TypeError;
  232. // `RequireObjectCoercible` abstract operation
  233. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  234. module.exports = function (it) {
  235. if (it == undefined) throw $TypeError("Can't call method on " + it);
  236. return it;
  237. };
  238. /***/ }),
  239. /***/ "23cb":
  240. /***/ (function(module, exports, __webpack_require__) {
  241. var toIntegerOrInfinity = __webpack_require__("5926");
  242. var max = Math.max;
  243. var min = Math.min;
  244. // Helper for a popular repeating case of the spec:
  245. // Let integer be ? ToInteger(index).
  246. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  247. module.exports = function (index, length) {
  248. var integer = toIntegerOrInfinity(index);
  249. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  250. };
  251. /***/ }),
  252. /***/ "23e7":
  253. /***/ (function(module, exports, __webpack_require__) {
  254. var global = __webpack_require__("da84");
  255. var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
  256. var createNonEnumerableProperty = __webpack_require__("9112");
  257. var defineBuiltIn = __webpack_require__("cb2d");
  258. var defineGlobalProperty = __webpack_require__("6374");
  259. var copyConstructorProperties = __webpack_require__("e893");
  260. var isForced = __webpack_require__("94ca");
  261. /*
  262. options.target - name of the target object
  263. options.global - target is the global object
  264. options.stat - export as static methods of target
  265. options.proto - export as prototype methods of target
  266. options.real - real prototype method for the `pure` version
  267. options.forced - export even if the native feature is available
  268. options.bind - bind methods to the target, required for the `pure` version
  269. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  270. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  271. options.sham - add a flag to not completely full polyfills
  272. options.enumerable - export as enumerable property
  273. options.dontCallGetSet - prevent calling a getter on target
  274. options.name - the .name of the function if it does not match the key
  275. */
  276. module.exports = function (options, source) {
  277. var TARGET = options.target;
  278. var GLOBAL = options.global;
  279. var STATIC = options.stat;
  280. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  281. if (GLOBAL) {
  282. target = global;
  283. } else if (STATIC) {
  284. target = global[TARGET] || defineGlobalProperty(TARGET, {});
  285. } else {
  286. target = (global[TARGET] || {}).prototype;
  287. }
  288. if (target) for (key in source) {
  289. sourceProperty = source[key];
  290. if (options.dontCallGetSet) {
  291. descriptor = getOwnPropertyDescriptor(target, key);
  292. targetProperty = descriptor && descriptor.value;
  293. } else targetProperty = target[key];
  294. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  295. // contained in target
  296. if (!FORCED && targetProperty !== undefined) {
  297. if (typeof sourceProperty == typeof targetProperty) continue;
  298. copyConstructorProperties(sourceProperty, targetProperty);
  299. }
  300. // add a flag to not completely full polyfills
  301. if (options.sham || (targetProperty && targetProperty.sham)) {
  302. createNonEnumerableProperty(sourceProperty, 'sham', true);
  303. }
  304. defineBuiltIn(target, key, sourceProperty, options);
  305. }
  306. };
  307. /***/ }),
  308. /***/ "241c":
  309. /***/ (function(module, exports, __webpack_require__) {
  310. var internalObjectKeys = __webpack_require__("ca84");
  311. var enumBugKeys = __webpack_require__("7839");
  312. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  313. // `Object.getOwnPropertyNames` method
  314. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  315. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  316. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  317. return internalObjectKeys(O, hiddenKeys);
  318. };
  319. /***/ }),
  320. /***/ "2ba4":
  321. /***/ (function(module, exports, __webpack_require__) {
  322. var NATIVE_BIND = __webpack_require__("40d5");
  323. var FunctionPrototype = Function.prototype;
  324. var apply = FunctionPrototype.apply;
  325. var call = FunctionPrototype.call;
  326. // eslint-disable-next-line es-x/no-reflect -- safe
  327. module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  328. return call.apply(apply, arguments);
  329. });
  330. /***/ }),
  331. /***/ "2d00":
  332. /***/ (function(module, exports, __webpack_require__) {
  333. var global = __webpack_require__("da84");
  334. var userAgent = __webpack_require__("342f");
  335. var process = global.process;
  336. var Deno = global.Deno;
  337. var versions = process && process.versions || Deno && Deno.version;
  338. var v8 = versions && versions.v8;
  339. var match, version;
  340. if (v8) {
  341. match = v8.split('.');
  342. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  343. // but their correct versions are not interesting for us
  344. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  345. }
  346. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  347. // so check `userAgent` even if `.v8` exists, but 0
  348. if (!version && userAgent) {
  349. match = userAgent.match(/Edge\/(\d+)/);
  350. if (!match || match[1] >= 74) {
  351. match = userAgent.match(/Chrome\/(\d+)/);
  352. if (match) version = +match[1];
  353. }
  354. }
  355. module.exports = version;
  356. /***/ }),
  357. /***/ "342f":
  358. /***/ (function(module, exports, __webpack_require__) {
  359. var getBuiltIn = __webpack_require__("d066");
  360. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  361. /***/ }),
  362. /***/ "3a9b":
  363. /***/ (function(module, exports, __webpack_require__) {
  364. var uncurryThis = __webpack_require__("e330");
  365. module.exports = uncurryThis({}.isPrototypeOf);
  366. /***/ }),
  367. /***/ "3bbe":
  368. /***/ (function(module, exports, __webpack_require__) {
  369. var isCallable = __webpack_require__("1626");
  370. var $String = String;
  371. var $TypeError = TypeError;
  372. module.exports = function (argument) {
  373. if (typeof argument == 'object' || isCallable(argument)) return argument;
  374. throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
  375. };
  376. /***/ }),
  377. /***/ "40d5":
  378. /***/ (function(module, exports, __webpack_require__) {
  379. var fails = __webpack_require__("d039");
  380. module.exports = !fails(function () {
  381. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  382. var test = (function () { /* empty */ }).bind();
  383. // eslint-disable-next-line no-prototype-builtins -- safe
  384. return typeof test != 'function' || test.hasOwnProperty('prototype');
  385. });
  386. /***/ }),
  387. /***/ "44ad":
  388. /***/ (function(module, exports, __webpack_require__) {
  389. var uncurryThis = __webpack_require__("e330");
  390. var fails = __webpack_require__("d039");
  391. var classof = __webpack_require__("c6b6");
  392. var $Object = Object;
  393. var split = uncurryThis(''.split);
  394. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  395. module.exports = fails(function () {
  396. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  397. // eslint-disable-next-line no-prototype-builtins -- safe
  398. return !$Object('z').propertyIsEnumerable(0);
  399. }) ? function (it) {
  400. return classof(it) == 'String' ? split(it, '') : $Object(it);
  401. } : $Object;
  402. /***/ }),
  403. /***/ "485a":
  404. /***/ (function(module, exports, __webpack_require__) {
  405. var call = __webpack_require__("c65b");
  406. var isCallable = __webpack_require__("1626");
  407. var isObject = __webpack_require__("861d");
  408. var $TypeError = TypeError;
  409. // `OrdinaryToPrimitive` abstract operation
  410. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  411. module.exports = function (input, pref) {
  412. var fn, val;
  413. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  414. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  415. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  416. throw $TypeError("Can't convert object to primitive value");
  417. };
  418. /***/ }),
  419. /***/ "4930":
  420. /***/ (function(module, exports, __webpack_require__) {
  421. /* eslint-disable es-x/no-symbol -- required for testing */
  422. var V8_VERSION = __webpack_require__("2d00");
  423. var fails = __webpack_require__("d039");
  424. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  425. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  426. var symbol = Symbol();
  427. // Chrome 38 Symbol has incorrect toString conversion
  428. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  429. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  430. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  431. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  432. });
  433. /***/ }),
  434. /***/ "4d64":
  435. /***/ (function(module, exports, __webpack_require__) {
  436. var toIndexedObject = __webpack_require__("fc6a");
  437. var toAbsoluteIndex = __webpack_require__("23cb");
  438. var lengthOfArrayLike = __webpack_require__("07fa");
  439. // `Array.prototype.{ indexOf, includes }` methods implementation
  440. var createMethod = function (IS_INCLUDES) {
  441. return function ($this, el, fromIndex) {
  442. var O = toIndexedObject($this);
  443. var length = lengthOfArrayLike(O);
  444. var index = toAbsoluteIndex(fromIndex, length);
  445. var value;
  446. // Array#includes uses SameValueZero equality algorithm
  447. // eslint-disable-next-line no-self-compare -- NaN check
  448. if (IS_INCLUDES && el != el) while (length > index) {
  449. value = O[index++];
  450. // eslint-disable-next-line no-self-compare -- NaN check
  451. if (value != value) return true;
  452. // Array#indexOf ignores holes, Array#includes - not
  453. } else for (;length > index; index++) {
  454. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  455. } return !IS_INCLUDES && -1;
  456. };
  457. };
  458. module.exports = {
  459. // `Array.prototype.includes` method
  460. // https://tc39.es/ecma262/#sec-array.prototype.includes
  461. includes: createMethod(true),
  462. // `Array.prototype.indexOf` method
  463. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  464. indexOf: createMethod(false)
  465. };
  466. /***/ }),
  467. /***/ "50c4":
  468. /***/ (function(module, exports, __webpack_require__) {
  469. var toIntegerOrInfinity = __webpack_require__("5926");
  470. var min = Math.min;
  471. // `ToLength` abstract operation
  472. // https://tc39.es/ecma262/#sec-tolength
  473. module.exports = function (argument) {
  474. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  475. };
  476. /***/ }),
  477. /***/ "5692":
  478. /***/ (function(module, exports, __webpack_require__) {
  479. var IS_PURE = __webpack_require__("c430");
  480. var store = __webpack_require__("c6cd");
  481. (module.exports = function (key, value) {
  482. return store[key] || (store[key] = value !== undefined ? value : {});
  483. })('versions', []).push({
  484. version: '3.24.1',
  485. mode: IS_PURE ? 'pure' : 'global',
  486. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  487. license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
  488. source: 'https://github.com/zloirock/core-js'
  489. });
  490. /***/ }),
  491. /***/ "56ef":
  492. /***/ (function(module, exports, __webpack_require__) {
  493. var getBuiltIn = __webpack_require__("d066");
  494. var uncurryThis = __webpack_require__("e330");
  495. var getOwnPropertyNamesModule = __webpack_require__("241c");
  496. var getOwnPropertySymbolsModule = __webpack_require__("7418");
  497. var anObject = __webpack_require__("825a");
  498. var concat = uncurryThis([].concat);
  499. // all object keys, includes non-enumerable and symbols
  500. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  501. var keys = getOwnPropertyNamesModule.f(anObject(it));
  502. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  503. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  504. };
  505. /***/ }),
  506. /***/ "577e":
  507. /***/ (function(module, exports, __webpack_require__) {
  508. var classof = __webpack_require__("f5df");
  509. var $String = String;
  510. module.exports = function (argument) {
  511. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  512. return $String(argument);
  513. };
  514. /***/ }),
  515. /***/ "5926":
  516. /***/ (function(module, exports, __webpack_require__) {
  517. var trunc = __webpack_require__("b42e");
  518. // `ToIntegerOrInfinity` abstract operation
  519. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  520. module.exports = function (argument) {
  521. var number = +argument;
  522. // eslint-disable-next-line no-self-compare -- NaN check
  523. return number !== number || number === 0 ? 0 : trunc(number);
  524. };
  525. /***/ }),
  526. /***/ "59ed":
  527. /***/ (function(module, exports, __webpack_require__) {
  528. var isCallable = __webpack_require__("1626");
  529. var tryToString = __webpack_require__("0d51");
  530. var $TypeError = TypeError;
  531. // `Assert: IsCallable(argument) is true`
  532. module.exports = function (argument) {
  533. if (isCallable(argument)) return argument;
  534. throw $TypeError(tryToString(argument) + ' is not a function');
  535. };
  536. /***/ }),
  537. /***/ "5c6c":
  538. /***/ (function(module, exports) {
  539. module.exports = function (bitmap, value) {
  540. return {
  541. enumerable: !(bitmap & 1),
  542. configurable: !(bitmap & 2),
  543. writable: !(bitmap & 4),
  544. value: value
  545. };
  546. };
  547. /***/ }),
  548. /***/ "5e77":
  549. /***/ (function(module, exports, __webpack_require__) {
  550. var DESCRIPTORS = __webpack_require__("83ab");
  551. var hasOwn = __webpack_require__("1a2d");
  552. var FunctionPrototype = Function.prototype;
  553. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  554. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  555. var EXISTS = hasOwn(FunctionPrototype, 'name');
  556. // additional protection from minified / mangled / dropped function names
  557. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  558. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  559. module.exports = {
  560. EXISTS: EXISTS,
  561. PROPER: PROPER,
  562. CONFIGURABLE: CONFIGURABLE
  563. };
  564. /***/ }),
  565. /***/ "6374":
  566. /***/ (function(module, exports, __webpack_require__) {
  567. var global = __webpack_require__("da84");
  568. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  569. var defineProperty = Object.defineProperty;
  570. module.exports = function (key, value) {
  571. try {
  572. defineProperty(global, key, { value: value, configurable: true, writable: true });
  573. } catch (error) {
  574. global[key] = value;
  575. } return value;
  576. };
  577. /***/ }),
  578. /***/ "69f3":
  579. /***/ (function(module, exports, __webpack_require__) {
  580. var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
  581. var global = __webpack_require__("da84");
  582. var uncurryThis = __webpack_require__("e330");
  583. var isObject = __webpack_require__("861d");
  584. var createNonEnumerableProperty = __webpack_require__("9112");
  585. var hasOwn = __webpack_require__("1a2d");
  586. var shared = __webpack_require__("c6cd");
  587. var sharedKey = __webpack_require__("f772");
  588. var hiddenKeys = __webpack_require__("d012");
  589. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  590. var TypeError = global.TypeError;
  591. var WeakMap = global.WeakMap;
  592. var set, get, has;
  593. var enforce = function (it) {
  594. return has(it) ? get(it) : set(it, {});
  595. };
  596. var getterFor = function (TYPE) {
  597. return function (it) {
  598. var state;
  599. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  600. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  601. } return state;
  602. };
  603. };
  604. if (NATIVE_WEAK_MAP || shared.state) {
  605. var store = shared.state || (shared.state = new WeakMap());
  606. var wmget = uncurryThis(store.get);
  607. var wmhas = uncurryThis(store.has);
  608. var wmset = uncurryThis(store.set);
  609. set = function (it, metadata) {
  610. if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  611. metadata.facade = it;
  612. wmset(store, it, metadata);
  613. return metadata;
  614. };
  615. get = function (it) {
  616. return wmget(store, it) || {};
  617. };
  618. has = function (it) {
  619. return wmhas(store, it);
  620. };
  621. } else {
  622. var STATE = sharedKey('state');
  623. hiddenKeys[STATE] = true;
  624. set = function (it, metadata) {
  625. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  626. metadata.facade = it;
  627. createNonEnumerableProperty(it, STATE, metadata);
  628. return metadata;
  629. };
  630. get = function (it) {
  631. return hasOwn(it, STATE) ? it[STATE] : {};
  632. };
  633. has = function (it) {
  634. return hasOwn(it, STATE);
  635. };
  636. }
  637. module.exports = {
  638. set: set,
  639. get: get,
  640. has: has,
  641. enforce: enforce,
  642. getterFor: getterFor
  643. };
  644. /***/ }),
  645. /***/ "6b0d":
  646. /***/ (function(module, exports, __webpack_require__) {
  647. "use strict";
  648. Object.defineProperty(exports, "__esModule", { value: true });
  649. // runtime helper for setting properties on components
  650. // in a tree-shakable way
  651. exports.default = (sfc, props) => {
  652. const target = sfc.__vccOpts || sfc;
  653. for (const [key, val] of props) {
  654. target[key] = val;
  655. }
  656. return target;
  657. };
  658. /***/ }),
  659. /***/ "7156":
  660. /***/ (function(module, exports, __webpack_require__) {
  661. var isCallable = __webpack_require__("1626");
  662. var isObject = __webpack_require__("861d");
  663. var setPrototypeOf = __webpack_require__("d2bb");
  664. // makes subclassing work correct for wrapped built-ins
  665. module.exports = function ($this, dummy, Wrapper) {
  666. var NewTarget, NewTargetPrototype;
  667. if (
  668. // it can work only with native `setPrototypeOf`
  669. setPrototypeOf &&
  670. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  671. isCallable(NewTarget = dummy.constructor) &&
  672. NewTarget !== Wrapper &&
  673. isObject(NewTargetPrototype = NewTarget.prototype) &&
  674. NewTargetPrototype !== Wrapper.prototype
  675. ) setPrototypeOf($this, NewTargetPrototype);
  676. return $this;
  677. };
  678. /***/ }),
  679. /***/ "7418":
  680. /***/ (function(module, exports) {
  681. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  682. exports.f = Object.getOwnPropertySymbols;
  683. /***/ }),
  684. /***/ "7839":
  685. /***/ (function(module, exports) {
  686. // IE8- don't enum bug keys
  687. module.exports = [
  688. 'constructor',
  689. 'hasOwnProperty',
  690. 'isPrototypeOf',
  691. 'propertyIsEnumerable',
  692. 'toLocaleString',
  693. 'toString',
  694. 'valueOf'
  695. ];
  696. /***/ }),
  697. /***/ "7b0b":
  698. /***/ (function(module, exports, __webpack_require__) {
  699. var requireObjectCoercible = __webpack_require__("1d80");
  700. var $Object = Object;
  701. // `ToObject` abstract operation
  702. // https://tc39.es/ecma262/#sec-toobject
  703. module.exports = function (argument) {
  704. return $Object(requireObjectCoercible(argument));
  705. };
  706. /***/ }),
  707. /***/ "7f9a":
  708. /***/ (function(module, exports, __webpack_require__) {
  709. var global = __webpack_require__("da84");
  710. var isCallable = __webpack_require__("1626");
  711. var inspectSource = __webpack_require__("8925");
  712. var WeakMap = global.WeakMap;
  713. module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
  714. /***/ }),
  715. /***/ "825a":
  716. /***/ (function(module, exports, __webpack_require__) {
  717. var isObject = __webpack_require__("861d");
  718. var $String = String;
  719. var $TypeError = TypeError;
  720. // `Assert: Type(argument) is Object`
  721. module.exports = function (argument) {
  722. if (isObject(argument)) return argument;
  723. throw $TypeError($String(argument) + ' is not an object');
  724. };
  725. /***/ }),
  726. /***/ "83ab":
  727. /***/ (function(module, exports, __webpack_require__) {
  728. var fails = __webpack_require__("d039");
  729. // Detect IE8's incomplete defineProperty implementation
  730. module.exports = !fails(function () {
  731. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  732. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  733. });
  734. /***/ }),
  735. /***/ "861d":
  736. /***/ (function(module, exports, __webpack_require__) {
  737. var isCallable = __webpack_require__("1626");
  738. module.exports = function (it) {
  739. return typeof it == 'object' ? it !== null : isCallable(it);
  740. };
  741. /***/ }),
  742. /***/ "8925":
  743. /***/ (function(module, exports, __webpack_require__) {
  744. var uncurryThis = __webpack_require__("e330");
  745. var isCallable = __webpack_require__("1626");
  746. var store = __webpack_require__("c6cd");
  747. var functionToString = uncurryThis(Function.toString);
  748. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  749. if (!isCallable(store.inspectSource)) {
  750. store.inspectSource = function (it) {
  751. return functionToString(it);
  752. };
  753. }
  754. module.exports = store.inspectSource;
  755. /***/ }),
  756. /***/ "8bbf":
  757. /***/ (function(module, exports) {
  758. module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
  759. /***/ }),
  760. /***/ "90e3":
  761. /***/ (function(module, exports, __webpack_require__) {
  762. var uncurryThis = __webpack_require__("e330");
  763. var id = 0;
  764. var postfix = Math.random();
  765. var toString = uncurryThis(1.0.toString);
  766. module.exports = function (key) {
  767. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  768. };
  769. /***/ }),
  770. /***/ "9112":
  771. /***/ (function(module, exports, __webpack_require__) {
  772. var DESCRIPTORS = __webpack_require__("83ab");
  773. var definePropertyModule = __webpack_require__("9bf2");
  774. var createPropertyDescriptor = __webpack_require__("5c6c");
  775. module.exports = DESCRIPTORS ? function (object, key, value) {
  776. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  777. } : function (object, key, value) {
  778. object[key] = value;
  779. return object;
  780. };
  781. /***/ }),
  782. /***/ "9224":
  783. /***/ (function(module) {
  784. module.exports = JSON.parse("{\"name\":\"vue3-tree-org\",\"version\":\"4.2.2\",\"author\":\"sangtian152\",\"private\":false,\"main\":\"lib/vue3-tree-org.common.js\",\"module\":\"lib/index.esm.js\",\"typings\":\"lib/index.d.ts\",\"license\":\"MIT\",\"homepage\":\"https://sangtian152.github.io/vue3-tree-org\",\"files\":[\"lib\"],\"repository\":{\"type\":\"git\",\"url\":\"https://gitee.com/sangtian152/vue3-tree-org.git\"},\"keywords\":[\"vue3-tree-org\",\"orgchart\",\"vue\",\"tree-org\",\"组织架构图\"],\"scripts\":{\"dev\":\"vuepress dev docs\",\"serve\":\"vue-cli-service serve\",\"lint\":\"vue-cli-service lint\",\"clean:dist\":\"rimraf dist\",\"build\":\"npm run build:docs && npm run build:lib && npm run build:esm\",\"build:docs\":\"vuepress build docs\",\"build:lib\":\"vue-cli-service build --target lib --name vue3-tree-org --dest lib src/index.ts\",\"build:esm\":\"npm run clean:dist && gulp --require sucrase/register/ts -f build/gulpfile.ts\"},\"peerDependencies\":{\"vue\":\"^3.0.0\"},\"dependencies\":{\"core-js\":\"^3.6.5\"},\"devDependencies\":{\"@rollup/plugin-json\":\"^4.1.0\",\"@rollup/plugin-node-resolve\":\"^13.0.5\",\"@types/gulp\":\"^4.0.9\",\"@types/gulp-rename\":\"^2.0.1\",\"@types/gulp-sass\":\"^5.0.0\",\"@types/sass\":\"^1.43.1\",\"@typescript-eslint/eslint-plugin\":\"^4.18.0\",\"@typescript-eslint/parser\":\"^4.18.0\",\"@vue/cli-plugin-babel\":\"~4.5.0\",\"@vue/cli-plugin-eslint\":\"~4.5.0\",\"@vue/cli-plugin-router\":\"~4.5.0\",\"@vue/cli-plugin-typescript\":\"~4.5.0\",\"@vue/cli-service\":\"~4.5.0\",\"@vue/compiler-sfc\":\"^3.0.0\",\"@vue/eslint-config-standard\":\"^5.1.2\",\"@vue/eslint-config-typescript\":\"^7.0.0\",\"element-plus\":\"^1.3.0-beta.9\",\"escape-html\":\"^1.0.3\",\"eslint\":\"^6.7.2\",\"eslint-plugin-import\":\"^2.20.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"eslint-plugin-vue\":\"^7.0.0\",\"gulp\":\"^4.0.2\",\"gulp-rename\":\"^2.0.0\",\"gulp-sass\":\"^5.1.0\",\"markdown-it\":\"^12.3.2\",\"markdown-it-container\":\"^3.0.0\",\"node-sass\":\"^4.14.1\",\"rollup\":\"^2.58.0\",\"rollup-plugin-terser\":\"^7.0.2\",\"rollup-plugin-typescript2\":\"^0.30.0\",\"rollup-plugin-vue\":\"^6.0.0\",\"sass\":\"^1.49.9\",\"sass-loader\":\"^10.2.1\",\"sucrase\":\"^3.20.3\",\"typescript\":\"~4.1.5\",\"unplugin-element-plus\":\"^0.2.0\",\"vue-router\":\"^4.0.0-0\",\"vuepress\":\"^2.0.0-beta.49\"}}");
  785. /***/ }),
  786. /***/ "94ca":
  787. /***/ (function(module, exports, __webpack_require__) {
  788. var fails = __webpack_require__("d039");
  789. var isCallable = __webpack_require__("1626");
  790. var replacement = /#|\.prototype\./;
  791. var isForced = function (feature, detection) {
  792. var value = data[normalize(feature)];
  793. return value == POLYFILL ? true
  794. : value == NATIVE ? false
  795. : isCallable(detection) ? fails(detection)
  796. : !!detection;
  797. };
  798. var normalize = isForced.normalize = function (string) {
  799. return String(string).replace(replacement, '.').toLowerCase();
  800. };
  801. var data = isForced.data = {};
  802. var NATIVE = isForced.NATIVE = 'N';
  803. var POLYFILL = isForced.POLYFILL = 'P';
  804. module.exports = isForced;
  805. /***/ }),
  806. /***/ "9bf2":
  807. /***/ (function(module, exports, __webpack_require__) {
  808. var DESCRIPTORS = __webpack_require__("83ab");
  809. var IE8_DOM_DEFINE = __webpack_require__("0cfb");
  810. var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__("aed9");
  811. var anObject = __webpack_require__("825a");
  812. var toPropertyKey = __webpack_require__("a04b");
  813. var $TypeError = TypeError;
  814. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  815. var $defineProperty = Object.defineProperty;
  816. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  817. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  818. var ENUMERABLE = 'enumerable';
  819. var CONFIGURABLE = 'configurable';
  820. var WRITABLE = 'writable';
  821. // `Object.defineProperty` method
  822. // https://tc39.es/ecma262/#sec-object.defineproperty
  823. exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  824. anObject(O);
  825. P = toPropertyKey(P);
  826. anObject(Attributes);
  827. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  828. var current = $getOwnPropertyDescriptor(O, P);
  829. if (current && current[WRITABLE]) {
  830. O[P] = Attributes.value;
  831. Attributes = {
  832. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  833. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  834. writable: false
  835. };
  836. }
  837. } return $defineProperty(O, P, Attributes);
  838. } : $defineProperty : function defineProperty(O, P, Attributes) {
  839. anObject(O);
  840. P = toPropertyKey(P);
  841. anObject(Attributes);
  842. if (IE8_DOM_DEFINE) try {
  843. return $defineProperty(O, P, Attributes);
  844. } catch (error) { /* empty */ }
  845. if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
  846. if ('value' in Attributes) O[P] = Attributes.value;
  847. return O;
  848. };
  849. /***/ }),
  850. /***/ "9ff4":
  851. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  852. "use strict";
  853. /* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export EMPTY_ARR */
  854. /* unused harmony export EMPTY_OBJ */
  855. /* unused harmony export NO */
  856. /* unused harmony export NOOP */
  857. /* unused harmony export PatchFlagNames */
  858. /* unused harmony export camelize */
  859. /* unused harmony export capitalize */
  860. /* unused harmony export def */
  861. /* unused harmony export escapeHtml */
  862. /* unused harmony export escapeHtmlComment */
  863. /* unused harmony export extend */
  864. /* unused harmony export genPropsAccessExp */
  865. /* unused harmony export generateCodeFrame */
  866. /* unused harmony export getGlobalThis */
  867. /* unused harmony export hasChanged */
  868. /* unused harmony export hasOwn */
  869. /* unused harmony export hyphenate */
  870. /* unused harmony export includeBooleanAttr */
  871. /* unused harmony export invokeArrayFns */
  872. /* unused harmony export isArray */
  873. /* unused harmony export isBooleanAttr */
  874. /* unused harmony export isBuiltInDirective */
  875. /* unused harmony export isDate */
  876. /* unused harmony export isFunction */
  877. /* unused harmony export isGloballyWhitelisted */
  878. /* unused harmony export isHTMLTag */
  879. /* unused harmony export isIntegerKey */
  880. /* unused harmony export isKnownHtmlAttr */
  881. /* unused harmony export isKnownSvgAttr */
  882. /* unused harmony export isMap */
  883. /* unused harmony export isModelListener */
  884. /* unused harmony export isNoUnitNumericStyleProp */
  885. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isObject; });
  886. /* unused harmony export isOn */
  887. /* unused harmony export isPlainObject */
  888. /* unused harmony export isPromise */
  889. /* unused harmony export isReservedProp */
  890. /* unused harmony export isSSRSafeAttrName */
  891. /* unused harmony export isSVGTag */
  892. /* unused harmony export isSet */
  893. /* unused harmony export isSpecialBooleanAttr */
  894. /* unused harmony export isString */
  895. /* unused harmony export isSymbol */
  896. /* unused harmony export isVoidTag */
  897. /* unused harmony export looseEqual */
  898. /* unused harmony export looseIndexOf */
  899. /* unused harmony export makeMap */
  900. /* unused harmony export normalizeClass */
  901. /* unused harmony export normalizeProps */
  902. /* unused harmony export normalizeStyle */
  903. /* unused harmony export objectToString */
  904. /* unused harmony export parseStringStyle */
  905. /* unused harmony export propsToAttrMap */
  906. /* unused harmony export remove */
  907. /* unused harmony export slotFlagsText */
  908. /* unused harmony export stringifyStyle */
  909. /* unused harmony export toDisplayString */
  910. /* unused harmony export toHandlerKey */
  911. /* unused harmony export toNumber */
  912. /* unused harmony export toRawType */
  913. /* unused harmony export toTypeString */
  914. /**
  915. * Make a map and return a function for checking if a key
  916. * is in that map.
  917. * IMPORTANT: all calls of this function must be prefixed with
  918. * \/\*#\_\_PURE\_\_\*\/
  919. * So that rollup can tree-shake them if necessary.
  920. */
  921. function makeMap(str, expectsLowerCase) {
  922. const map = Object.create(null);
  923. const list = str.split(',');
  924. for (let i = 0; i < list.length; i++) {
  925. map[list[i]] = true;
  926. }
  927. return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
  928. }
  929. /**
  930. * dev only flag -> name mapping
  931. */
  932. const PatchFlagNames = {
  933. [1 /* TEXT */]: `TEXT`,
  934. [2 /* CLASS */]: `CLASS`,
  935. [4 /* STYLE */]: `STYLE`,
  936. [8 /* PROPS */]: `PROPS`,
  937. [16 /* FULL_PROPS */]: `FULL_PROPS`,
  938. [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,
  939. [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,
  940. [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,
  941. [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,
  942. [512 /* NEED_PATCH */]: `NEED_PATCH`,
  943. [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,
  944. [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,
  945. [-1 /* HOISTED */]: `HOISTED`,
  946. [-2 /* BAIL */]: `BAIL`
  947. };
  948. /**
  949. * Dev only
  950. */
  951. const slotFlagsText = {
  952. [1 /* STABLE */]: 'STABLE',
  953. [2 /* DYNAMIC */]: 'DYNAMIC',
  954. [3 /* FORWARDED */]: 'FORWARDED'
  955. };
  956. const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
  957. 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
  958. 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';
  959. const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);
  960. const range = 2;
  961. function generateCodeFrame(source, start = 0, end = source.length) {
  962. // Split the content into individual lines but capture the newline sequence
  963. // that separated each line. This is important because the actual sequence is
  964. // needed to properly take into account the full line length for offset
  965. // comparison
  966. let lines = source.split(/(\r?\n)/);
  967. // Separate the lines and newline sequences into separate arrays for easier referencing
  968. const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
  969. lines = lines.filter((_, idx) => idx % 2 === 0);
  970. let count = 0;
  971. const res = [];
  972. for (let i = 0; i < lines.length; i++) {
  973. count +=
  974. lines[i].length +
  975. ((newlineSequences[i] && newlineSequences[i].length) || 0);
  976. if (count >= start) {
  977. for (let j = i - range; j <= i + range || end > count; j++) {
  978. if (j < 0 || j >= lines.length)
  979. continue;
  980. const line = j + 1;
  981. res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);
  982. const lineLength = lines[j].length;
  983. const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0;
  984. if (j === i) {
  985. // push underline
  986. const pad = start - (count - (lineLength + newLineSeqLength));
  987. const length = Math.max(1, end > count ? lineLength - pad : end - start);
  988. res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
  989. }
  990. else if (j > i) {
  991. if (end > count) {
  992. const length = Math.max(Math.min(end - count, lineLength), 1);
  993. res.push(` | ` + '^'.repeat(length));
  994. }
  995. count += lineLength + newLineSeqLength;
  996. }
  997. }
  998. break;
  999. }
  1000. }
  1001. return res.join('\n');
  1002. }
  1003. /**
  1004. * On the client we only need to offer special cases for boolean attributes that
  1005. * have different names from their corresponding dom properties:
  1006. * - itemscope -> N/A
  1007. * - allowfullscreen -> allowFullscreen
  1008. * - formnovalidate -> formNoValidate
  1009. * - ismap -> isMap
  1010. * - nomodule -> noModule
  1011. * - novalidate -> noValidate
  1012. * - readonly -> readOnly
  1013. */
  1014. const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  1015. const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
  1016. /**
  1017. * The full list is needed during SSR to produce the correct initial markup.
  1018. */
  1019. const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +
  1020. `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +
  1021. `loop,open,required,reversed,scoped,seamless,` +
  1022. `checked,muted,multiple,selected`);
  1023. /**
  1024. * Boolean attributes should be included if the value is truthy or ''.
  1025. * e.g. `<select multiple>` compiles to `{ multiple: '' }`
  1026. */
  1027. function includeBooleanAttr(value) {
  1028. return !!value || value === '';
  1029. }
  1030. const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
  1031. const attrValidationCache = {};
  1032. function isSSRSafeAttrName(name) {
  1033. if (attrValidationCache.hasOwnProperty(name)) {
  1034. return attrValidationCache[name];
  1035. }
  1036. const isUnsafe = unsafeAttrCharRE.test(name);
  1037. if (isUnsafe) {
  1038. console.error(`unsafe attribute name: ${name}`);
  1039. }
  1040. return (attrValidationCache[name] = !isUnsafe);
  1041. }
  1042. const propsToAttrMap = {
  1043. acceptCharset: 'accept-charset',
  1044. className: 'class',
  1045. htmlFor: 'for',
  1046. httpEquiv: 'http-equiv'
  1047. };
  1048. /**
  1049. * CSS properties that accept plain numbers
  1050. */
  1051. const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` +
  1052. `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` +
  1053. `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` +
  1054. `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` +
  1055. `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` +
  1056. `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` +
  1057. // SVG
  1058. `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` +
  1059. `stroke-miterlimit,stroke-opacity,stroke-width`);
  1060. /**
  1061. * Known attributes, this is used for stringification of runtime static nodes
  1062. * so that we don't stringify bindings that cannot be set from HTML.
  1063. * Don't also forget to allow `data-*` and `aria-*`!
  1064. * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
  1065. */
  1066. const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` +
  1067. `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` +
  1068. `border,buffered,capture,challenge,charset,checked,cite,class,code,` +
  1069. `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` +
  1070. `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` +
  1071. `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` +
  1072. `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` +
  1073. `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` +
  1074. `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` +
  1075. `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` +
  1076. `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` +
  1077. `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` +
  1078. `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` +
  1079. `start,step,style,summary,tabindex,target,title,translate,type,usemap,` +
  1080. `value,width,wrap`);
  1081. /**
  1082. * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
  1083. */
  1084. const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` +
  1085. `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` +
  1086. `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` +
  1087. `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` +
  1088. `color-interpolation-filters,color-profile,color-rendering,` +
  1089. `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` +
  1090. `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` +
  1091. `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` +
  1092. `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` +
  1093. `font-family,font-size,font-size-adjust,font-stretch,font-style,` +
  1094. `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` +
  1095. `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` +
  1096. `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` +
  1097. `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` +
  1098. `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` +
  1099. `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` +
  1100. `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` +
  1101. `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` +
  1102. `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` +
  1103. `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` +
  1104. `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` +
  1105. `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` +
  1106. `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` +
  1107. `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` +
  1108. `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` +
  1109. `specularConstant,specularExponent,speed,spreadMethod,startOffset,` +
  1110. `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` +
  1111. `strikethrough-position,strikethrough-thickness,string,stroke,` +
  1112. `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` +
  1113. `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` +
  1114. `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` +
  1115. `text-decoration,text-rendering,textLength,to,transform,transform-origin,` +
  1116. `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` +
  1117. `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` +
  1118. `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` +
  1119. `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` +
  1120. `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` +
  1121. `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` +
  1122. `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`);
  1123. function normalizeStyle(value) {
  1124. if (isArray(value)) {
  1125. const res = {};
  1126. for (let i = 0; i < value.length; i++) {
  1127. const item = value[i];
  1128. const normalized = isString(item)
  1129. ? parseStringStyle(item)
  1130. : normalizeStyle(item);
  1131. if (normalized) {
  1132. for (const key in normalized) {
  1133. res[key] = normalized[key];
  1134. }
  1135. }
  1136. }
  1137. return res;
  1138. }
  1139. else if (isString(value)) {
  1140. return value;
  1141. }
  1142. else if (isObject(value)) {
  1143. return value;
  1144. }
  1145. }
  1146. const listDelimiterRE = /;(?![^(]*\))/g;
  1147. const propertyDelimiterRE = /:(.+)/;
  1148. function parseStringStyle(cssText) {
  1149. const ret = {};
  1150. cssText.split(listDelimiterRE).forEach(item => {
  1151. if (item) {
  1152. const tmp = item.split(propertyDelimiterRE);
  1153. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  1154. }
  1155. });
  1156. return ret;
  1157. }
  1158. function stringifyStyle(styles) {
  1159. let ret = '';
  1160. if (!styles || isString(styles)) {
  1161. return ret;
  1162. }
  1163. for (const key in styles) {
  1164. const value = styles[key];
  1165. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  1166. if (isString(value) ||
  1167. (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
  1168. // only render valid values
  1169. ret += `${normalizedKey}:${value};`;
  1170. }
  1171. }
  1172. return ret;
  1173. }
  1174. function normalizeClass(value) {
  1175. let res = '';
  1176. if (isString(value)) {
  1177. res = value;
  1178. }
  1179. else if (isArray(value)) {
  1180. for (let i = 0; i < value.length; i++) {
  1181. const normalized = normalizeClass(value[i]);
  1182. if (normalized) {
  1183. res += normalized + ' ';
  1184. }
  1185. }
  1186. }
  1187. else if (isObject(value)) {
  1188. for (const name in value) {
  1189. if (value[name]) {
  1190. res += name + ' ';
  1191. }
  1192. }
  1193. }
  1194. return res.trim();
  1195. }
  1196. function normalizeProps(props) {
  1197. if (!props)
  1198. return null;
  1199. let { class: klass, style } = props;
  1200. if (klass && !isString(klass)) {
  1201. props.class = normalizeClass(klass);
  1202. }
  1203. if (style) {
  1204. props.style = normalizeStyle(style);
  1205. }
  1206. return props;
  1207. }
  1208. // These tag configs are shared between compiler-dom and runtime-dom, so they
  1209. // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
  1210. const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
  1211. 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
  1212. 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
  1213. 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
  1214. 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
  1215. 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +
  1216. 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +
  1217. 'option,output,progress,select,textarea,details,dialog,menu,' +
  1218. 'summary,template,blockquote,iframe,tfoot';
  1219. // https://developer.mozilla.org/en-US/docs/Web/SVG/Element
  1220. const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
  1221. 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
  1222. 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
  1223. 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
  1224. 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
  1225. 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
  1226. 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
  1227. 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
  1228. 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
  1229. 'text,textPath,title,tspan,unknown,use,view';
  1230. const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
  1231. /**
  1232. * Compiler only.
  1233. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  1234. */
  1235. const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
  1236. /**
  1237. * Compiler only.
  1238. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  1239. */
  1240. const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
  1241. /**
  1242. * Compiler only.
  1243. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  1244. */
  1245. const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
  1246. const escapeRE = /["'&<>]/;
  1247. function escapeHtml(string) {
  1248. const str = '' + string;
  1249. const match = escapeRE.exec(str);
  1250. if (!match) {
  1251. return str;
  1252. }
  1253. let html = '';
  1254. let escaped;
  1255. let index;
  1256. let lastIndex = 0;
  1257. for (index = match.index; index < str.length; index++) {
  1258. switch (str.charCodeAt(index)) {
  1259. case 34: // "
  1260. escaped = '&quot;';
  1261. break;
  1262. case 38: // &
  1263. escaped = '&amp;';
  1264. break;
  1265. case 39: // '
  1266. escaped = '&#39;';
  1267. break;
  1268. case 60: // <
  1269. escaped = '&lt;';
  1270. break;
  1271. case 62: // >
  1272. escaped = '&gt;';
  1273. break;
  1274. default:
  1275. continue;
  1276. }
  1277. if (lastIndex !== index) {
  1278. html += str.slice(lastIndex, index);
  1279. }
  1280. lastIndex = index + 1;
  1281. html += escaped;
  1282. }
  1283. return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
  1284. }
  1285. // https://www.w3.org/TR/html52/syntax.html#comments
  1286. const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
  1287. function escapeHtmlComment(src) {
  1288. return src.replace(commentStripRE, '');
  1289. }
  1290. function looseCompareArrays(a, b) {
  1291. if (a.length !== b.length)
  1292. return false;
  1293. let equal = true;
  1294. for (let i = 0; equal && i < a.length; i++) {
  1295. equal = looseEqual(a[i], b[i]);
  1296. }
  1297. return equal;
  1298. }
  1299. function looseEqual(a, b) {
  1300. if (a === b)
  1301. return true;
  1302. let aValidType = isDate(a);
  1303. let bValidType = isDate(b);
  1304. if (aValidType || bValidType) {
  1305. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  1306. }
  1307. aValidType = isSymbol(a);
  1308. bValidType = isSymbol(b);
  1309. if (aValidType || bValidType) {
  1310. return a === b;
  1311. }
  1312. aValidType = isArray(a);
  1313. bValidType = isArray(b);
  1314. if (aValidType || bValidType) {
  1315. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  1316. }
  1317. aValidType = isObject(a);
  1318. bValidType = isObject(b);
  1319. if (aValidType || bValidType) {
  1320. /* istanbul ignore if: this if will probably never be called */
  1321. if (!aValidType || !bValidType) {
  1322. return false;
  1323. }
  1324. const aKeysCount = Object.keys(a).length;
  1325. const bKeysCount = Object.keys(b).length;
  1326. if (aKeysCount !== bKeysCount) {
  1327. return false;
  1328. }
  1329. for (const key in a) {
  1330. const aHasKey = a.hasOwnProperty(key);
  1331. const bHasKey = b.hasOwnProperty(key);
  1332. if ((aHasKey && !bHasKey) ||
  1333. (!aHasKey && bHasKey) ||
  1334. !looseEqual(a[key], b[key])) {
  1335. return false;
  1336. }
  1337. }
  1338. }
  1339. return String(a) === String(b);
  1340. }
  1341. function looseIndexOf(arr, val) {
  1342. return arr.findIndex(item => looseEqual(item, val));
  1343. }
  1344. /**
  1345. * For converting {{ interpolation }} values to displayed strings.
  1346. * @private
  1347. */
  1348. const toDisplayString = (val) => {
  1349. return isString(val)
  1350. ? val
  1351. : val == null
  1352. ? ''
  1353. : isArray(val) ||
  1354. (isObject(val) &&
  1355. (val.toString === objectToString || !isFunction(val.toString)))
  1356. ? JSON.stringify(val, replacer, 2)
  1357. : String(val);
  1358. };
  1359. const replacer = (_key, val) => {
  1360. // can't use isRef here since @vue/shared has no deps
  1361. if (val && val.__v_isRef) {
  1362. return replacer(_key, val.value);
  1363. }
  1364. else if (isMap(val)) {
  1365. return {
  1366. [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => {
  1367. entries[`${key} =>`] = val;
  1368. return entries;
  1369. }, {})
  1370. };
  1371. }
  1372. else if (isSet(val)) {
  1373. return {
  1374. [`Set(${val.size})`]: [...val.values()]
  1375. };
  1376. }
  1377. else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  1378. return String(val);
  1379. }
  1380. return val;
  1381. };
  1382. const EMPTY_OBJ = ( false)
  1383. ? undefined
  1384. : {};
  1385. const EMPTY_ARR = ( false) ? undefined : [];
  1386. const NOOP = () => { };
  1387. /**
  1388. * Always return false.
  1389. */
  1390. const NO = () => false;
  1391. const onRE = /^on[^a-z]/;
  1392. const isOn = (key) => onRE.test(key);
  1393. const isModelListener = (key) => key.startsWith('onUpdate:');
  1394. const extend = Object.assign;
  1395. const remove = (arr, el) => {
  1396. const i = arr.indexOf(el);
  1397. if (i > -1) {
  1398. arr.splice(i, 1);
  1399. }
  1400. };
  1401. const hasOwnProperty = Object.prototype.hasOwnProperty;
  1402. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  1403. const isArray = Array.isArray;
  1404. const isMap = (val) => toTypeString(val) === '[object Map]';
  1405. const isSet = (val) => toTypeString(val) === '[object Set]';
  1406. const isDate = (val) => toTypeString(val) === '[object Date]';
  1407. const isFunction = (val) => typeof val === 'function';
  1408. const isString = (val) => typeof val === 'string';
  1409. const isSymbol = (val) => typeof val === 'symbol';
  1410. const isObject = (val) => val !== null && typeof val === 'object';
  1411. const isPromise = (val) => {
  1412. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  1413. };
  1414. const objectToString = Object.prototype.toString;
  1415. const toTypeString = (value) => objectToString.call(value);
  1416. const toRawType = (value) => {
  1417. // extract "RawType" from strings like "[object RawType]"
  1418. return toTypeString(value).slice(8, -1);
  1419. };
  1420. const isPlainObject = (val) => toTypeString(val) === '[object Object]';
  1421. const isIntegerKey = (key) => isString(key) &&
  1422. key !== 'NaN' &&
  1423. key[0] !== '-' &&
  1424. '' + parseInt(key, 10) === key;
  1425. const isReservedProp = /*#__PURE__*/ makeMap(
  1426. // the leading comma is intentional so empty string "" is also included
  1427. ',key,ref,ref_for,ref_key,' +
  1428. 'onVnodeBeforeMount,onVnodeMounted,' +
  1429. 'onVnodeBeforeUpdate,onVnodeUpdated,' +
  1430. 'onVnodeBeforeUnmount,onVnodeUnmounted');
  1431. const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
  1432. const cacheStringFunction = (fn) => {
  1433. const cache = Object.create(null);
  1434. return ((str) => {
  1435. const hit = cache[str];
  1436. return hit || (cache[str] = fn(str));
  1437. });
  1438. };
  1439. const camelizeRE = /-(\w)/g;
  1440. /**
  1441. * @private
  1442. */
  1443. const camelize = cacheStringFunction((str) => {
  1444. return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));
  1445. });
  1446. const hyphenateRE = /\B([A-Z])/g;
  1447. /**
  1448. * @private
  1449. */
  1450. const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase());
  1451. /**
  1452. * @private
  1453. */
  1454. const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
  1455. /**
  1456. * @private
  1457. */
  1458. const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
  1459. // compare whether a value has changed, accounting for NaN.
  1460. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  1461. const invokeArrayFns = (fns, arg) => {
  1462. for (let i = 0; i < fns.length; i++) {
  1463. fns[i](arg);
  1464. }
  1465. };
  1466. const def = (obj, key, value) => {
  1467. Object.defineProperty(obj, key, {
  1468. configurable: true,
  1469. enumerable: false,
  1470. value
  1471. });
  1472. };
  1473. const toNumber = (val) => {
  1474. const n = parseFloat(val);
  1475. return isNaN(n) ? val : n;
  1476. };
  1477. let _globalThis;
  1478. const getGlobalThis = () => {
  1479. return (_globalThis ||
  1480. (_globalThis =
  1481. typeof globalThis !== 'undefined'
  1482. ? globalThis
  1483. : typeof self !== 'undefined'
  1484. ? self
  1485. : typeof window !== 'undefined'
  1486. ? window
  1487. : typeof global !== 'undefined'
  1488. ? global
  1489. : {}));
  1490. };
  1491. const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
  1492. function genPropsAccessExp(name) {
  1493. return identRE.test(name)
  1494. ? `__props.${name}`
  1495. : `__props[${JSON.stringify(name)}]`;
  1496. }
  1497. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
  1498. /***/ }),
  1499. /***/ "a04b":
  1500. /***/ (function(module, exports, __webpack_require__) {
  1501. var toPrimitive = __webpack_require__("c04e");
  1502. var isSymbol = __webpack_require__("d9b5");
  1503. // `ToPropertyKey` abstract operation
  1504. // https://tc39.es/ecma262/#sec-topropertykey
  1505. module.exports = function (argument) {
  1506. var key = toPrimitive(argument, 'string');
  1507. return isSymbol(key) ? key : key + '';
  1508. };
  1509. /***/ }),
  1510. /***/ "ab36":
  1511. /***/ (function(module, exports, __webpack_require__) {
  1512. var isObject = __webpack_require__("861d");
  1513. var createNonEnumerableProperty = __webpack_require__("9112");
  1514. // `InstallErrorCause` abstract operation
  1515. // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
  1516. module.exports = function (O, options) {
  1517. if (isObject(options) && 'cause' in options) {
  1518. createNonEnumerableProperty(O, 'cause', options.cause);
  1519. }
  1520. };
  1521. /***/ }),
  1522. /***/ "aeb0":
  1523. /***/ (function(module, exports, __webpack_require__) {
  1524. var defineProperty = __webpack_require__("9bf2").f;
  1525. module.exports = function (Target, Source, key) {
  1526. key in Target || defineProperty(Target, key, {
  1527. configurable: true,
  1528. get: function () { return Source[key]; },
  1529. set: function (it) { Source[key] = it; }
  1530. });
  1531. };
  1532. /***/ }),
  1533. /***/ "aed9":
  1534. /***/ (function(module, exports, __webpack_require__) {
  1535. var DESCRIPTORS = __webpack_require__("83ab");
  1536. var fails = __webpack_require__("d039");
  1537. // V8 ~ Chrome 36-
  1538. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  1539. module.exports = DESCRIPTORS && fails(function () {
  1540. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  1541. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  1542. value: 42,
  1543. writable: false
  1544. }).prototype != 42;
  1545. });
  1546. /***/ }),
  1547. /***/ "b42e":
  1548. /***/ (function(module, exports) {
  1549. var ceil = Math.ceil;
  1550. var floor = Math.floor;
  1551. // `Math.trunc` method
  1552. // https://tc39.es/ecma262/#sec-math.trunc
  1553. // eslint-disable-next-line es-x/no-math-trunc -- safe
  1554. module.exports = Math.trunc || function trunc(x) {
  1555. var n = +x;
  1556. return (n > 0 ? floor : ceil)(n);
  1557. };
  1558. /***/ }),
  1559. /***/ "b622":
  1560. /***/ (function(module, exports, __webpack_require__) {
  1561. var global = __webpack_require__("da84");
  1562. var shared = __webpack_require__("5692");
  1563. var hasOwn = __webpack_require__("1a2d");
  1564. var uid = __webpack_require__("90e3");
  1565. var NATIVE_SYMBOL = __webpack_require__("4930");
  1566. var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
  1567. var WellKnownSymbolsStore = shared('wks');
  1568. var Symbol = global.Symbol;
  1569. var symbolFor = Symbol && Symbol['for'];
  1570. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  1571. module.exports = function (name) {
  1572. if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  1573. var description = 'Symbol.' + name;
  1574. if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
  1575. WellKnownSymbolsStore[name] = Symbol[name];
  1576. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  1577. WellKnownSymbolsStore[name] = symbolFor(description);
  1578. } else {
  1579. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  1580. }
  1581. } return WellKnownSymbolsStore[name];
  1582. };
  1583. /***/ }),
  1584. /***/ "b980":
  1585. /***/ (function(module, exports, __webpack_require__) {
  1586. var fails = __webpack_require__("d039");
  1587. var createPropertyDescriptor = __webpack_require__("5c6c");
  1588. module.exports = !fails(function () {
  1589. var error = Error('a');
  1590. if (!('stack' in error)) return true;
  1591. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  1592. Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  1593. return error.stack !== 7;
  1594. });
  1595. /***/ }),
  1596. /***/ "c04e":
  1597. /***/ (function(module, exports, __webpack_require__) {
  1598. var call = __webpack_require__("c65b");
  1599. var isObject = __webpack_require__("861d");
  1600. var isSymbol = __webpack_require__("d9b5");
  1601. var getMethod = __webpack_require__("dc4a");
  1602. var ordinaryToPrimitive = __webpack_require__("485a");
  1603. var wellKnownSymbol = __webpack_require__("b622");
  1604. var $TypeError = TypeError;
  1605. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  1606. // `ToPrimitive` abstract operation
  1607. // https://tc39.es/ecma262/#sec-toprimitive
  1608. module.exports = function (input, pref) {
  1609. if (!isObject(input) || isSymbol(input)) return input;
  1610. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  1611. var result;
  1612. if (exoticToPrim) {
  1613. if (pref === undefined) pref = 'default';
  1614. result = call(exoticToPrim, input, pref);
  1615. if (!isObject(result) || isSymbol(result)) return result;
  1616. throw $TypeError("Can't convert object to primitive value");
  1617. }
  1618. if (pref === undefined) pref = 'number';
  1619. return ordinaryToPrimitive(input, pref);
  1620. };
  1621. /***/ }),
  1622. /***/ "c430":
  1623. /***/ (function(module, exports) {
  1624. module.exports = false;
  1625. /***/ }),
  1626. /***/ "c65b":
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. var NATIVE_BIND = __webpack_require__("40d5");
  1629. var call = Function.prototype.call;
  1630. module.exports = NATIVE_BIND ? call.bind(call) : function () {
  1631. return call.apply(call, arguments);
  1632. };
  1633. /***/ }),
  1634. /***/ "c6b6":
  1635. /***/ (function(module, exports, __webpack_require__) {
  1636. var uncurryThis = __webpack_require__("e330");
  1637. var toString = uncurryThis({}.toString);
  1638. var stringSlice = uncurryThis(''.slice);
  1639. module.exports = function (it) {
  1640. return stringSlice(toString(it), 8, -1);
  1641. };
  1642. /***/ }),
  1643. /***/ "c6cd":
  1644. /***/ (function(module, exports, __webpack_require__) {
  1645. var global = __webpack_require__("da84");
  1646. var defineGlobalProperty = __webpack_require__("6374");
  1647. var SHARED = '__core-js_shared__';
  1648. var store = global[SHARED] || defineGlobalProperty(SHARED, {});
  1649. module.exports = store;
  1650. /***/ }),
  1651. /***/ "c770":
  1652. /***/ (function(module, exports, __webpack_require__) {
  1653. var uncurryThis = __webpack_require__("e330");
  1654. var $Error = Error;
  1655. var replace = uncurryThis(''.replace);
  1656. var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
  1657. var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
  1658. var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
  1659. module.exports = function (stack, dropEntries) {
  1660. if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
  1661. while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  1662. } return stack;
  1663. };
  1664. /***/ }),
  1665. /***/ "c8ba":
  1666. /***/ (function(module, exports) {
  1667. var g;
  1668. // This works in non-strict mode
  1669. g = (function() {
  1670. return this;
  1671. })();
  1672. try {
  1673. // This works if eval is allowed (see CSP)
  1674. g = g || new Function("return this")();
  1675. } catch (e) {
  1676. // This works if the window reference is available
  1677. if (typeof window === "object") g = window;
  1678. }
  1679. // g can still be undefined, but nothing to do about it...
  1680. // We return undefined, instead of nothing here, so it's
  1681. // easier to handle this case. if(!global) { ...}
  1682. module.exports = g;
  1683. /***/ }),
  1684. /***/ "ca84":
  1685. /***/ (function(module, exports, __webpack_require__) {
  1686. var uncurryThis = __webpack_require__("e330");
  1687. var hasOwn = __webpack_require__("1a2d");
  1688. var toIndexedObject = __webpack_require__("fc6a");
  1689. var indexOf = __webpack_require__("4d64").indexOf;
  1690. var hiddenKeys = __webpack_require__("d012");
  1691. var push = uncurryThis([].push);
  1692. module.exports = function (object, names) {
  1693. var O = toIndexedObject(object);
  1694. var i = 0;
  1695. var result = [];
  1696. var key;
  1697. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  1698. // Don't enum bug & hidden keys
  1699. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  1700. ~indexOf(result, key) || push(result, key);
  1701. }
  1702. return result;
  1703. };
  1704. /***/ }),
  1705. /***/ "cb2d":
  1706. /***/ (function(module, exports, __webpack_require__) {
  1707. var isCallable = __webpack_require__("1626");
  1708. var definePropertyModule = __webpack_require__("9bf2");
  1709. var makeBuiltIn = __webpack_require__("13d2");
  1710. var defineGlobalProperty = __webpack_require__("6374");
  1711. module.exports = function (O, key, value, options) {
  1712. if (!options) options = {};
  1713. var simple = options.enumerable;
  1714. var name = options.name !== undefined ? options.name : key;
  1715. if (isCallable(value)) makeBuiltIn(value, name, options);
  1716. if (options.global) {
  1717. if (simple) O[key] = value;
  1718. else defineGlobalProperty(key, value);
  1719. } else {
  1720. try {
  1721. if (!options.unsafe) delete O[key];
  1722. else if (O[key]) simple = true;
  1723. } catch (error) { /* empty */ }
  1724. if (simple) O[key] = value;
  1725. else definePropertyModule.f(O, key, {
  1726. value: value,
  1727. enumerable: false,
  1728. configurable: !options.nonConfigurable,
  1729. writable: !options.nonWritable
  1730. });
  1731. } return O;
  1732. };
  1733. /***/ }),
  1734. /***/ "cc12":
  1735. /***/ (function(module, exports, __webpack_require__) {
  1736. var global = __webpack_require__("da84");
  1737. var isObject = __webpack_require__("861d");
  1738. var document = global.document;
  1739. // typeof document.createElement is 'object' in old IE
  1740. var EXISTS = isObject(document) && isObject(document.createElement);
  1741. module.exports = function (it) {
  1742. return EXISTS ? document.createElement(it) : {};
  1743. };
  1744. /***/ }),
  1745. /***/ "d012":
  1746. /***/ (function(module, exports) {
  1747. module.exports = {};
  1748. /***/ }),
  1749. /***/ "d039":
  1750. /***/ (function(module, exports) {
  1751. module.exports = function (exec) {
  1752. try {
  1753. return !!exec();
  1754. } catch (error) {
  1755. return true;
  1756. }
  1757. };
  1758. /***/ }),
  1759. /***/ "d066":
  1760. /***/ (function(module, exports, __webpack_require__) {
  1761. var global = __webpack_require__("da84");
  1762. var isCallable = __webpack_require__("1626");
  1763. var aFunction = function (argument) {
  1764. return isCallable(argument) ? argument : undefined;
  1765. };
  1766. module.exports = function (namespace, method) {
  1767. return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
  1768. };
  1769. /***/ }),
  1770. /***/ "d1e7":
  1771. /***/ (function(module, exports, __webpack_require__) {
  1772. "use strict";
  1773. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  1774. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1775. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1776. // Nashorn ~ JDK8 bug
  1777. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  1778. // `Object.prototype.propertyIsEnumerable` method implementation
  1779. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  1780. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  1781. var descriptor = getOwnPropertyDescriptor(this, V);
  1782. return !!descriptor && descriptor.enumerable;
  1783. } : $propertyIsEnumerable;
  1784. /***/ }),
  1785. /***/ "d2bb":
  1786. /***/ (function(module, exports, __webpack_require__) {
  1787. /* eslint-disable no-proto -- safe */
  1788. var uncurryThis = __webpack_require__("e330");
  1789. var anObject = __webpack_require__("825a");
  1790. var aPossiblePrototype = __webpack_require__("3bbe");
  1791. // `Object.setPrototypeOf` method
  1792. // https://tc39.es/ecma262/#sec-object.setprototypeof
  1793. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1794. // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
  1795. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  1796. var CORRECT_SETTER = false;
  1797. var test = {};
  1798. var setter;
  1799. try {
  1800. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1801. setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  1802. setter(test, []);
  1803. CORRECT_SETTER = test instanceof Array;
  1804. } catch (error) { /* empty */ }
  1805. return function setPrototypeOf(O, proto) {
  1806. anObject(O);
  1807. aPossiblePrototype(proto);
  1808. if (CORRECT_SETTER) setter(O, proto);
  1809. else O.__proto__ = proto;
  1810. return O;
  1811. };
  1812. }() : undefined);
  1813. /***/ }),
  1814. /***/ "d9b5":
  1815. /***/ (function(module, exports, __webpack_require__) {
  1816. var getBuiltIn = __webpack_require__("d066");
  1817. var isCallable = __webpack_require__("1626");
  1818. var isPrototypeOf = __webpack_require__("3a9b");
  1819. var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
  1820. var $Object = Object;
  1821. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  1822. return typeof it == 'symbol';
  1823. } : function (it) {
  1824. var $Symbol = getBuiltIn('Symbol');
  1825. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  1826. };
  1827. /***/ }),
  1828. /***/ "d9e2":
  1829. /***/ (function(module, exports, __webpack_require__) {
  1830. /* eslint-disable no-unused-vars -- required for functions `.length` */
  1831. var $ = __webpack_require__("23e7");
  1832. var global = __webpack_require__("da84");
  1833. var apply = __webpack_require__("2ba4");
  1834. var wrapErrorConstructorWithCause = __webpack_require__("e5cb");
  1835. var WEB_ASSEMBLY = 'WebAssembly';
  1836. var WebAssembly = global[WEB_ASSEMBLY];
  1837. var FORCED = Error('e', { cause: 7 }).cause !== 7;
  1838. var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  1839. var O = {};
  1840. O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
  1841. $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
  1842. };
  1843. var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  1844. if (WebAssembly && WebAssembly[ERROR_NAME]) {
  1845. var O = {};
  1846. O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
  1847. $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
  1848. }
  1849. };
  1850. // https://github.com/tc39/proposal-error-cause
  1851. exportGlobalErrorCauseWrapper('Error', function (init) {
  1852. return function Error(message) { return apply(init, this, arguments); };
  1853. });
  1854. exportGlobalErrorCauseWrapper('EvalError', function (init) {
  1855. return function EvalError(message) { return apply(init, this, arguments); };
  1856. });
  1857. exportGlobalErrorCauseWrapper('RangeError', function (init) {
  1858. return function RangeError(message) { return apply(init, this, arguments); };
  1859. });
  1860. exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
  1861. return function ReferenceError(message) { return apply(init, this, arguments); };
  1862. });
  1863. exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
  1864. return function SyntaxError(message) { return apply(init, this, arguments); };
  1865. });
  1866. exportGlobalErrorCauseWrapper('TypeError', function (init) {
  1867. return function TypeError(message) { return apply(init, this, arguments); };
  1868. });
  1869. exportGlobalErrorCauseWrapper('URIError', function (init) {
  1870. return function URIError(message) { return apply(init, this, arguments); };
  1871. });
  1872. exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
  1873. return function CompileError(message) { return apply(init, this, arguments); };
  1874. });
  1875. exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
  1876. return function LinkError(message) { return apply(init, this, arguments); };
  1877. });
  1878. exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
  1879. return function RuntimeError(message) { return apply(init, this, arguments); };
  1880. });
  1881. /***/ }),
  1882. /***/ "da84":
  1883. /***/ (function(module, exports, __webpack_require__) {
  1884. /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  1885. return it && it.Math == Math && it;
  1886. };
  1887. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1888. module.exports =
  1889. // eslint-disable-next-line es-x/no-global-this -- safe
  1890. check(typeof globalThis == 'object' && globalThis) ||
  1891. check(typeof window == 'object' && window) ||
  1892. // eslint-disable-next-line no-restricted-globals -- safe
  1893. check(typeof self == 'object' && self) ||
  1894. check(typeof global == 'object' && global) ||
  1895. // eslint-disable-next-line no-new-func -- fallback
  1896. (function () { return this; })() || Function('return this')();
  1897. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
  1898. /***/ }),
  1899. /***/ "dc4a":
  1900. /***/ (function(module, exports, __webpack_require__) {
  1901. var aCallable = __webpack_require__("59ed");
  1902. // `GetMethod` abstract operation
  1903. // https://tc39.es/ecma262/#sec-getmethod
  1904. module.exports = function (V, P) {
  1905. var func = V[P];
  1906. return func == null ? undefined : aCallable(func);
  1907. };
  1908. /***/ }),
  1909. /***/ "e330":
  1910. /***/ (function(module, exports, __webpack_require__) {
  1911. var NATIVE_BIND = __webpack_require__("40d5");
  1912. var FunctionPrototype = Function.prototype;
  1913. var bind = FunctionPrototype.bind;
  1914. var call = FunctionPrototype.call;
  1915. var uncurryThis = NATIVE_BIND && bind.bind(call, call);
  1916. module.exports = NATIVE_BIND ? function (fn) {
  1917. return fn && uncurryThis(fn);
  1918. } : function (fn) {
  1919. return fn && function () {
  1920. return call.apply(fn, arguments);
  1921. };
  1922. };
  1923. /***/ }),
  1924. /***/ "e391":
  1925. /***/ (function(module, exports, __webpack_require__) {
  1926. var toString = __webpack_require__("577e");
  1927. module.exports = function (argument, $default) {
  1928. return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
  1929. };
  1930. /***/ }),
  1931. /***/ "e5cb":
  1932. /***/ (function(module, exports, __webpack_require__) {
  1933. "use strict";
  1934. var getBuiltIn = __webpack_require__("d066");
  1935. var hasOwn = __webpack_require__("1a2d");
  1936. var createNonEnumerableProperty = __webpack_require__("9112");
  1937. var isPrototypeOf = __webpack_require__("3a9b");
  1938. var setPrototypeOf = __webpack_require__("d2bb");
  1939. var copyConstructorProperties = __webpack_require__("e893");
  1940. var proxyAccessor = __webpack_require__("aeb0");
  1941. var inheritIfRequired = __webpack_require__("7156");
  1942. var normalizeStringArgument = __webpack_require__("e391");
  1943. var installErrorCause = __webpack_require__("ab36");
  1944. var clearErrorStack = __webpack_require__("c770");
  1945. var ERROR_STACK_INSTALLABLE = __webpack_require__("b980");
  1946. var DESCRIPTORS = __webpack_require__("83ab");
  1947. var IS_PURE = __webpack_require__("c430");
  1948. module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
  1949. var STACK_TRACE_LIMIT = 'stackTraceLimit';
  1950. var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
  1951. var path = FULL_NAME.split('.');
  1952. var ERROR_NAME = path[path.length - 1];
  1953. var OriginalError = getBuiltIn.apply(null, path);
  1954. if (!OriginalError) return;
  1955. var OriginalErrorPrototype = OriginalError.prototype;
  1956. // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
  1957. if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
  1958. if (!FORCED) return OriginalError;
  1959. var BaseError = getBuiltIn('Error');
  1960. var WrappedError = wrapper(function (a, b) {
  1961. var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
  1962. var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
  1963. if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
  1964. if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(result, 'stack', clearErrorStack(result.stack, 2));
  1965. if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
  1966. if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
  1967. return result;
  1968. });
  1969. WrappedError.prototype = OriginalErrorPrototype;
  1970. if (ERROR_NAME !== 'Error') {
  1971. if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
  1972. else copyConstructorProperties(WrappedError, BaseError, { name: true });
  1973. } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
  1974. proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
  1975. proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
  1976. }
  1977. copyConstructorProperties(WrappedError, OriginalError);
  1978. if (!IS_PURE) try {
  1979. // Safari 13- bug: WebAssembly errors does not have a proper `.name`
  1980. if (OriginalErrorPrototype.name !== ERROR_NAME) {
  1981. createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
  1982. }
  1983. OriginalErrorPrototype.constructor = WrappedError;
  1984. } catch (error) { /* empty */ }
  1985. return WrappedError;
  1986. };
  1987. /***/ }),
  1988. /***/ "e893":
  1989. /***/ (function(module, exports, __webpack_require__) {
  1990. var hasOwn = __webpack_require__("1a2d");
  1991. var ownKeys = __webpack_require__("56ef");
  1992. var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
  1993. var definePropertyModule = __webpack_require__("9bf2");
  1994. module.exports = function (target, source, exceptions) {
  1995. var keys = ownKeys(source);
  1996. var defineProperty = definePropertyModule.f;
  1997. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  1998. for (var i = 0; i < keys.length; i++) {
  1999. var key = keys[i];
  2000. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  2001. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  2002. }
  2003. }
  2004. };
  2005. /***/ }),
  2006. /***/ "f5df":
  2007. /***/ (function(module, exports, __webpack_require__) {
  2008. var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
  2009. var isCallable = __webpack_require__("1626");
  2010. var classofRaw = __webpack_require__("c6b6");
  2011. var wellKnownSymbol = __webpack_require__("b622");
  2012. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  2013. var $Object = Object;
  2014. // ES3 wrong here
  2015. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  2016. // fallback for IE11 Script Access Denied error
  2017. var tryGet = function (it, key) {
  2018. try {
  2019. return it[key];
  2020. } catch (error) { /* empty */ }
  2021. };
  2022. // getting tag from ES6+ `Object.prototype.toString`
  2023. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  2024. var O, tag, result;
  2025. return it === undefined ? 'Undefined' : it === null ? 'Null'
  2026. // @@toStringTag case
  2027. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  2028. // builtinTag case
  2029. : CORRECT_ARGUMENTS ? classofRaw(O)
  2030. // ES3 arguments fallback
  2031. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  2032. };
  2033. /***/ }),
  2034. /***/ "f772":
  2035. /***/ (function(module, exports, __webpack_require__) {
  2036. var shared = __webpack_require__("5692");
  2037. var uid = __webpack_require__("90e3");
  2038. var keys = shared('keys');
  2039. module.exports = function (key) {
  2040. return keys[key] || (keys[key] = uid(key));
  2041. };
  2042. /***/ }),
  2043. /***/ "fb15":
  2044. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2045. "use strict";
  2046. // ESM COMPAT FLAG
  2047. __webpack_require__.r(__webpack_exports__);
  2048. // EXPORTS
  2049. __webpack_require__.d(__webpack_exports__, "Vue3TreeOrg", function() { return /* reexport */ tree_org; });
  2050. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  2051. // This file is imported into lib/wc client bundles.
  2052. if (typeof window !== 'undefined') {
  2053. var currentScript = window.document.currentScript
  2054. if (false) { var getCurrentScript; }
  2055. var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  2056. if (src) {
  2057. __webpack_require__.p = src[1] // eslint-disable-line
  2058. }
  2059. }
  2060. // Indicate to webpack that this file can be concatenated
  2061. /* harmony default export */ var setPublicPath = (null);
  2062. // EXTERNAL MODULE: ./package.json
  2063. var package_0 = __webpack_require__("9224");
  2064. // CONCATENATED MODULE: ./src/utils/utils.ts
  2065. const isObject = function (arg) {
  2066. return Object.prototype.toString.call(arg) === '[object Object]';
  2067. };
  2068. const isString = function (str) {
  2069. return typeof str === 'string';
  2070. };
  2071. const isNumber = function (num) {
  2072. return typeof num === 'number';
  2073. };
  2074. const fromPairs = function (pairs) {
  2075. let index = -1;
  2076. const // 循环索引
  2077. length = pairs ? pairs.length : 0;
  2078. const // 键值对数组的长度
  2079. result = {}; // 结果对象
  2080. while (++index < length) {
  2081. // 循环并给结果对象加入属性
  2082. const pair = pairs[index];
  2083. result[pair[0]] = pair[1];
  2084. }
  2085. return result;
  2086. };
  2087. // CONCATENATED MODULE: ./src/utils/log.ts
  2088. /* eslint-disable no-console */
  2089. const log = {
  2090. print: (text, type, back) => isString(type) || typeof back === 'boolean',
  2091. pretty: (title, text, type) => isString(text) && isString(title) || typeof type === 'string',
  2092. primary: (text, back) => isString(text) || typeof back === 'boolean',
  2093. success: (text, back) => isString(text) || typeof back === 'boolean',
  2094. info: (text, back) => isString(text) || typeof back === 'boolean',
  2095. warning: (text, back) => isString(text) || typeof back === 'boolean',
  2096. danger: (text, back) => isString(text) || typeof back === 'boolean'
  2097. };
  2098. /**
  2099. * @description 返回这个样式的颜色值
  2100. * @param {String} type 样式名称 [ primary | success | warning | danger | text ]
  2101. */
  2102. function typeColor(type = 'default') {
  2103. let color = '';
  2104. switch (type) {
  2105. case 'primary':
  2106. color = '#2d8cf0';
  2107. break;
  2108. case 'success':
  2109. color = '#19be6b';
  2110. break;
  2111. case 'info':
  2112. color = '#909399';
  2113. break;
  2114. case 'warning':
  2115. color = '#ff9900';
  2116. break;
  2117. case 'danger':
  2118. color = '#ff4d4f';
  2119. break;
  2120. case 'default':
  2121. color = '#35495E';
  2122. break;
  2123. default:
  2124. color = type;
  2125. break;
  2126. }
  2127. return color;
  2128. }
  2129. log.print = function (text, type = 'default', back = false) {
  2130. if (typeof text === 'object') {
  2131. // 如果是对象则调用打印对象方式
  2132. console.dir(text);
  2133. return true;
  2134. }
  2135. if (back) {
  2136. // 如果是打印带背景图的
  2137. console.log(`%c ${text} `, `background:${typeColor(type)}; padding: 2px; border-radius: 4px;color: #fff;`);
  2138. } else {
  2139. console.log(`%c ${text} `, `color: ${typeColor(type)};`);
  2140. }
  2141. return true;
  2142. }; // 漂亮的
  2143. log.pretty = function (title, text, type = 'primary') {
  2144. console.log(`%c ${title} %c ${text} %c`, `background:${typeColor(type)};border:1px solid ${typeColor(type)}; padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`, `border:1px solid ${typeColor(type)}; padding: 1px; border-radius: 0 4px 4px 0; color: ${typeColor(type)};`, 'background:transparent');
  2145. return true;
  2146. };
  2147. log.primary = function (text, back = false) {
  2148. this.print && this.print(text, 'primary', back);
  2149. return true;
  2150. };
  2151. log.success = function (text, back = false) {
  2152. this.print && this.print(text, 'success', back);
  2153. return true;
  2154. };
  2155. log.info = function (text, back = false) {
  2156. this.print && this.print(text, 'info', back);
  2157. return true;
  2158. };
  2159. log.warning = function (text, back = false) {
  2160. this.print && this.print(text, 'warning', back);
  2161. return true;
  2162. };
  2163. log.danger = function (text, back = false) {
  2164. this.print && this.print(text, 'danger', back);
  2165. return true;
  2166. };
  2167. /* harmony default export */ var utils_log = (log);
  2168. // CONCATENATED MODULE: ./src/plugin/core/index.ts
  2169. // 功能插件
  2170. /* harmony default export */ var core = ({
  2171. async install(app) {
  2172. // 设置为 false 以阻止 vue 在启动时生成生产提示
  2173. // app.config.productionTip = false
  2174. app.config.globalProperties.$log = utils_log; // 打印UI官网
  2175. utils_log.pretty('[' + package_0.name + '] ' + package_0.version, 'success');
  2176. }
  2177. });
  2178. // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
  2179. var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
  2180. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tree-org/src/tree.vue?vue&type=template&id=f08413b6&ts=true
  2181. const _hoisted_1 = {
  2182. ref: "eleRef",
  2183. class: "zm-tree-org"
  2184. };
  2185. const _hoisted_2 = {
  2186. class: "tree-org-node__text"
  2187. };
  2188. const _hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2189. class: "tree-org-node__expand-btn"
  2190. }, null, -1);
  2191. const _hoisted_4 = {
  2192. class: "tree-org-node__text"
  2193. };
  2194. const _hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2195. class: "tree-org-node__expand-btn"
  2196. }, null, -1);
  2197. function render(_ctx, _cache, $props, $setup, $data, $options) {
  2198. const _component_tree_org_node = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("tree-org-node");
  2199. const _component_Draggable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Draggable");
  2200. const _component_Tools = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Tools");
  2201. const _component_clone_org = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("clone-org");
  2202. const _component_Contextmenu = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Contextmenu");
  2203. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  2204. ref: "zoomRef",
  2205. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["zoom-container", {
  2206. 'is-center': _ctx.center && !_ctx.horizontal
  2207. }]),
  2208. style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.zoomStyle),
  2209. onWheel: _cache[0] || (_cache[0] = //@ts-ignore
  2210. (...args) => _ctx.zoomWheel && _ctx.zoomWheel(...args))
  2211. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Draggable, {
  2212. x: _ctx.left,
  2213. y: _ctx.top,
  2214. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({
  2215. dragging: _ctx.autoDragging
  2216. }),
  2217. onDragging: _ctx.onDrag,
  2218. onDragstop: _ctx.onDragStop,
  2219. draggable: _ctx.draggable,
  2220. "drag-cancel": _ctx.dragCancel
  2221. }, {
  2222. default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  2223. ref: "treeRef",
  2224. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["tree-org", {
  2225. horizontal: _ctx.horizontal,
  2226. collapsable: _ctx.collapsable
  2227. }])
  2228. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_tree_org_node, {
  2229. data: _ctx.treeData,
  2230. props: _ctx.keys,
  2231. lazy: _ctx.lazy,
  2232. suffix: _ctx.suffix,
  2233. horizontal: _ctx.horizontal,
  2234. labelStyle: _ctx.labelStyle,
  2235. collapsable: _ctx.collapsable,
  2236. renderContent: _ctx.renderContent,
  2237. selectedKey: _ctx.selectedKey,
  2238. defaultExpandLevel: _ctx.defaultExpandLevel,
  2239. selectedClassName: _ctx.selectedClassName,
  2240. labelClassName: _ctx.labelClassName,
  2241. vNodedrag: _ctx.nodeargs,
  2242. onOnExpand: _ctx.handleExpand,
  2243. onNodeClick: _ctx.handleClick,
  2244. onNodeDblclick: _ctx.handleDblclick,
  2245. onNodeMouseenter: _ctx.nodeMouseenter,
  2246. onNodeMouseleave: _ctx.nodeMouseleave,
  2247. onNodeContextmenu: _ctx.nodeContextmenu,
  2248. onNodeFocus: _ctx.handleFocus,
  2249. onNodeBlur: _ctx.handleBlur
  2250. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createSlots"])({
  2251. _: 2
  2252. }, [_ctx.defaultSlot ? {
  2253. name: "default",
  2254. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2255. node
  2256. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {
  2257. node: node
  2258. }, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(node.label), 1)])])])
  2259. } : undefined, _ctx.expandSlot ? {
  2260. name: "expand",
  2261. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2262. node
  2263. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "expand", {
  2264. node: node
  2265. }, () => [_hoisted_3])])
  2266. } : undefined]), 1032, ["data", "props", "lazy", "suffix", "horizontal", "labelStyle", "collapsable", "renderContent", "selectedKey", "defaultExpandLevel", "selectedClassName", "labelClassName", "vNodedrag", "onOnExpand", "onNodeClick", "onNodeDblclick", "onNodeMouseenter", "onNodeMouseleave", "onNodeContextmenu", "onNodeFocus", "onNodeBlur"])], 2)]),
  2267. _: 3
  2268. }, 8, ["x", "y", "class", "onDragging", "onDragstop", "draggable", "drag-cancel"])], 38), _ctx.tools.visible ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Tools, {
  2269. key: 0,
  2270. tools: _ctx.tools.data,
  2271. scale: _ctx.zoomPercent,
  2272. onOnExpand: _ctx.expandChange,
  2273. onOnScale: _ctx.zoomOrgchart,
  2274. onOnRestore: _ctx.restoreOrgchart,
  2275. onOnFullscreen: _ctx.handleFullscreen
  2276. }, null, 8, ["tools", "scale", "onOnExpand", "onOnScale", "onOnRestore", "onOnFullscreen"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.nodeDraggable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_clone_org, {
  2277. key: 1,
  2278. modelValue: _ctx.nodeMoving,
  2279. "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.nodeMoving = $event),
  2280. props: _ctx.keys,
  2281. data: _ctx.cloneData,
  2282. horizontal: _ctx.horizontal,
  2283. "label-style": _ctx.labelStyle,
  2284. collapsable: _ctx.collapsable,
  2285. "render-content": _ctx.renderContent,
  2286. "label-class-name": _ctx.labelClassName
  2287. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createSlots"])({
  2288. _: 2
  2289. }, [_ctx.defaultSlot ? {
  2290. name: "default",
  2291. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2292. node
  2293. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {
  2294. node: node
  2295. }, () => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(node[_ctx.keys.label]), 1)])])])
  2296. } : undefined, _ctx.expandSlot ? {
  2297. name: "expand",
  2298. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  2299. node
  2300. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "expand", {
  2301. node: node
  2302. }, () => [_hoisted_5])])
  2303. } : undefined]), 1032, ["modelValue", "props", "data", "horizontal", "label-style", "collapsable", "render-content", "label-class-name"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.nodeMenus.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Contextmenu, {
  2304. key: 2,
  2305. modelValue: _ctx.contextmenu,
  2306. "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.contextmenu = $event),
  2307. x: _ctx.menuX,
  2308. y: _ctx.menuY,
  2309. node: _ctx.menuData,
  2310. data: _ctx.data,
  2311. props: _ctx.keys,
  2312. menus: _ctx.nodeMenus,
  2313. disabled: _ctx.disabled,
  2314. "node-add": _ctx.nodeAdd,
  2315. "node-delete": _ctx.nodeDelete,
  2316. "node-edit": _ctx.nodeEdit,
  2317. "node-copy": _ctx.nodeCopy,
  2318. onContextmenu: _cache[3] || (_cache[3] = arg => {
  2319. _ctx.$emit('on-contextmenu', arg);
  2320. }),
  2321. onOnNodeCopy: _cache[4] || (_cache[4] = txt => {
  2322. _ctx.$emit('on-node-copy', txt);
  2323. }),
  2324. onOnNodeDelete: _cache[5] || (_cache[5] = txt => {
  2325. _ctx.$emit('on-node-delete', txt);
  2326. })
  2327. }, null, 8, ["modelValue", "x", "y", "node", "data", "props", "menus", "disabled", "node-add", "node-delete", "node-edit", "node-copy"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512);
  2328. }
  2329. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.vue?vue&type=template&id=f08413b6&ts=true
  2330. // CONCATENATED MODULE: ./src/store/index.ts
  2331. const stopClick = function () {
  2332. let stop = false;
  2333. return {
  2334. get: () => stop,
  2335. set: val => {
  2336. stop = val;
  2337. }
  2338. };
  2339. }();
  2340. // CONCATENATED MODULE: ./src/directives/drag/index.ts
  2341. // 递归遍历处理数据
  2342. const recurseData = function (data, keys, cb) {
  2343. const {
  2344. children
  2345. } = keys;
  2346. if (isObject(data)) {
  2347. fn(data);
  2348. } else if (Array.isArray(data)) {
  2349. for (let i = 0, len = data.length; i < len; i++) {
  2350. fn(data[i]);
  2351. }
  2352. }
  2353. function fn(obj) {
  2354. cb(obj);
  2355. if (Array.isArray(obj[children])) {
  2356. const list = obj[children];
  2357. for (let i = 0, len = list.length; i < len; i++) {
  2358. fn(list[i]);
  2359. }
  2360. }
  2361. }
  2362. }; // 获取父级节点
  2363. const drag_getNodeById = function (node, keys, value) {
  2364. const {
  2365. id,
  2366. children
  2367. } = keys;
  2368. if (node[id] === value) {
  2369. return node;
  2370. } else if (Array.isArray(node[children])) {
  2371. const list = node[children];
  2372. for (let i = 0, len = list.length; i < len; i++) {
  2373. const row = list[i];
  2374. const pNode = drag_getNodeById(row, keys, value);
  2375. if (pNode) {
  2376. return pNode;
  2377. }
  2378. }
  2379. }
  2380. }; // 移除节点
  2381. const removeNode = function (node, context) {
  2382. const {
  2383. keys,
  2384. data,
  2385. onlyOneNode
  2386. } = context;
  2387. const {
  2388. id,
  2389. pid,
  2390. children
  2391. } = keys;
  2392. const oldPaNode = drag_getNodeById(data, keys, node[pid]);
  2393. const list = oldPaNode[children];
  2394. let index;
  2395. for (let i = 0, len = list.length; i < len; i++) {
  2396. if (list[i][id] === node[id]) {
  2397. list.splice(i, 1);
  2398. index = i;
  2399. break;
  2400. }
  2401. } // 如果仅移动当前节点,把当前节点的子节点添加到当前节点的父节点,并把当前节点子节点移除
  2402. const childNodes = node[children];
  2403. if (onlyOneNode && index !== undefined && childNodes) {
  2404. node[children] = [];
  2405. childNodes.forEach(it => {
  2406. it[pid] = oldPaNode[id];
  2407. });
  2408. oldPaNode[children].splice(index, 0, ...childNodes);
  2409. }
  2410. }; // 新增子节点节点
  2411. const addChildNode = function (node, context) {
  2412. const {
  2413. parenNode,
  2414. onlyOneNode,
  2415. cloneNodeDrag
  2416. } = context;
  2417. if (parenNode.value) {
  2418. const {
  2419. keys
  2420. } = context;
  2421. const {
  2422. id,
  2423. pid,
  2424. children
  2425. } = keys;
  2426. const parentData = parenNode.value.$$data;
  2427. const nodeClone = JSON.parse(JSON.stringify(node.$$data));
  2428. if (!cloneNodeDrag) {
  2429. // 如果拖拽节点
  2430. removeNode(nodeClone, context);
  2431. nodeClone[pid] = parentData[id];
  2432. parentData[children] ? parentData[children].push(nodeClone) : parentData[children] = [].concat(nodeClone);
  2433. } else {
  2434. // 如果拷贝并拖拽节点
  2435. recurseData(nodeClone, keys, function (item) {
  2436. if (typeof item[id] === 'string' && item[id].indexOf('clone-node') !== -1) {
  2437. item[id] = `clone-node-${item[id]}`;
  2438. }
  2439. });
  2440. if (onlyOneNode && Array.isArray(nodeClone[children])) {
  2441. nodeClone[children] = [];
  2442. }
  2443. nodeClone[keys.pid] = parentData[keys.id];
  2444. parentData[children] ? parentData[children].push(nodeClone) : parentData[children] = [nodeClone];
  2445. }
  2446. }
  2447. };
  2448. const drag_drag = {
  2449. beforeMount(el, binding) {
  2450. const {
  2451. l,
  2452. t
  2453. } = binding.modifiers;
  2454. const {
  2455. drag,
  2456. dragData,
  2457. node,
  2458. emit,
  2459. beforeDragEnd,
  2460. initNodes
  2461. } = binding.value;
  2462. const {
  2463. value
  2464. } = binding;
  2465. const instance = { ...dragData
  2466. };
  2467. el.addEventListener('mousedown', handleDownCb);
  2468. let offsetLeft = 0;
  2469. let hasRender = false;
  2470. let cloneTree;
  2471. let screenX = 0;
  2472. let screenY = 0;
  2473. function initData(e) {
  2474. e.stopPropagation();
  2475. screenX = e.screenX;
  2476. screenY = e.screenY;
  2477. offsetLeft = 0;
  2478. instance.contextmenu.value = false; // 隐藏右键菜单
  2479. const {
  2480. keys,
  2481. onlyOneNode
  2482. } = instance;
  2483. if (onlyOneNode) {
  2484. // 如果是仅移动当前节点
  2485. const {
  2486. children
  2487. } = keys;
  2488. const cloneNode = { ...node.$$data
  2489. };
  2490. cloneNode[children] = [];
  2491. instance.cloneData.value = initNodes(cloneNode);
  2492. } else {
  2493. instance.cloneData.value = initNodes(node.$$data);
  2494. }
  2495. }
  2496. function handleDownCb(e) {
  2497. const target = e.target;
  2498. if (drag === false || e.button !== 0 || node.focused || node.$$data.noDragging || target.className.indexOf('tree-org-node-btn') > -1) {
  2499. return false;
  2500. }
  2501. initData(e);
  2502. document.addEventListener('mousemove', handleMoveCb);
  2503. document.addEventListener('mouseup', handleUpCb);
  2504. handleEmit('start');
  2505. }
  2506. function moveStart(e) {
  2507. stopClick.set(true);
  2508. instance.nodeMoving.value = true;
  2509. node.moving = true;
  2510. let ndom = el;
  2511. while (!ndom.classList.contains('tree-org-node')) {
  2512. offsetLeft += ndom.offsetLeft;
  2513. ndom = ndom.offsetParent;
  2514. } // 拖动节点副本
  2515. offsetLeft = offsetLeft + 2;
  2516. cloneTree = document.querySelector('#clone-tree-org');
  2517. if (cloneTree) {
  2518. cloneTree.style.width = `${ndom.clientWidth}px`;
  2519. cloneTree.style.opacity = '0.8';
  2520. cloneTree.style.left = e.clientX - offsetLeft + 'px';
  2521. cloneTree.style.top = e.clientY + 2 + 'px';
  2522. }
  2523. }
  2524. function handleMoveCb(e) {
  2525. e.preventDefault();
  2526. if (Math.abs(e.screenX - screenX) < 5 && Math.abs(e.screenY - screenY) < 5) {
  2527. return false;
  2528. }
  2529. if (!hasRender) {
  2530. hasRender = true;
  2531. moveStart(e);
  2532. }
  2533. if (l && t && value) {
  2534. if (cloneTree) {
  2535. cloneTree.style.left = e.clientX - offsetLeft + 'px';
  2536. cloneTree.style.top = e.clientY + 2 + 'px';
  2537. }
  2538. handleEmit('move');
  2539. return;
  2540. }
  2541. if (l && value) {
  2542. el.style.left = e.clientX - offsetLeft + 'px';
  2543. handleEmit('move');
  2544. return;
  2545. }
  2546. if (t && value) {
  2547. el.style.top = e.clientY + 'px';
  2548. handleEmit('move');
  2549. }
  2550. }
  2551. function handleUpCb(e) {
  2552. document.removeEventListener('mousemove', handleMoveCb);
  2553. document.removeEventListener('mouseup', handleUpCb);
  2554. if (!hasRender) {
  2555. return;
  2556. }
  2557. if (typeof beforeDragEnd === 'function') {
  2558. const before = beforeDragEnd(node, instance.parenNode.value);
  2559. if (before && before.then) {
  2560. before.then(() => {
  2561. doDragEnd(e); // eslint-disable-next-line @typescript-eslint/no-empty-function
  2562. }, () => {});
  2563. } else if (before !== false) {
  2564. doDragEnd(e);
  2565. }
  2566. } else {
  2567. doDragEnd(e);
  2568. }
  2569. resetDrag();
  2570. }
  2571. function resetDrag() {
  2572. hasRender = false;
  2573. cloneTree = null;
  2574. node.moving = false;
  2575. instance.nodeMoving.value = false;
  2576. setTimeout(() => {
  2577. stopClick.set(false);
  2578. }, 200);
  2579. }
  2580. function doDragEnd(e) {
  2581. const movingNode = document.querySelector('.tree-org-node__moving');
  2582. if (movingNode && movingNode.contains(e.target)) {
  2583. handleEmit('end');
  2584. return false;
  2585. }
  2586. addChildNode(node, instance);
  2587. handleEmit('end');
  2588. }
  2589. function handleEmit(type) {
  2590. if (type === 'start') {
  2591. emit('on-node-drag-start', node);
  2592. return;
  2593. }
  2594. if (type === 'move') {
  2595. emit('on-node-drag', node);
  2596. return;
  2597. }
  2598. if (type === 'end') {
  2599. emit('on-node-drag-end', node, instance.parenNode.value);
  2600. }
  2601. }
  2602. }
  2603. };
  2604. /* harmony default export */ var directives_drag = (drag_drag);
  2605. // CONCATENATED MODULE: ./src/directives/focus/index.ts
  2606. /* harmony default export */ var directives_focus = ({
  2607. mounted(el, {
  2608. value
  2609. }) {
  2610. if (value) {
  2611. el.focus();
  2612. }
  2613. },
  2614. updated(el, {
  2615. value
  2616. }) {
  2617. if (value) {
  2618. el.focus();
  2619. }
  2620. }
  2621. });
  2622. // CONCATENATED MODULE: ./src/components/node/index.ts
  2623. // 功能插件
  2624. const EVENTS = {
  2625. onClick: 'onNodeClick',
  2626. onDblclick: 'onNodeDblclick',
  2627. onContextmenu: 'onNodeContextmenu',
  2628. onMouseenter: 'onNodeMouseenter',
  2629. onMouseleave: 'onNodeMouseleave'
  2630. };
  2631. function createListener(handler, node) {
  2632. if (typeof handler === 'function') {
  2633. return function (e) {
  2634. const target = e.target;
  2635. if (target.className.indexOf('org-tree-node-btn') > -1) return;
  2636. handler(e, node);
  2637. };
  2638. }
  2639. } // 判断是否叶子节点
  2640. const isLeaf = (data, prop, lazy) => {
  2641. const hasChild = Array.isArray(data[prop]) && data[prop].length > 0;
  2642. return !hasChild && !lazy || data.isLeaf;
  2643. }; // 创建 node 节点
  2644. const renderNode = (h, data, context) => {
  2645. const {
  2646. attrs
  2647. } = context;
  2648. const cls = ['tree-org-node'];
  2649. const childNodes = [];
  2650. const {
  2651. expand,
  2652. children,
  2653. id
  2654. } = data; // 如果是叶子节点则追加leaf事件
  2655. if (isLeaf(data, 'children', attrs.lazy)) {
  2656. cls.push('is-leaf');
  2657. } else if (attrs.collapsable && !expand) {
  2658. // 追加是否展开class
  2659. cls.push('collapsed');
  2660. }
  2661. if (data.moving) {
  2662. cls.push('tree-org-node__moving');
  2663. } // 渲染label块
  2664. childNodes.push(renderLabel(h, data, context));
  2665. if (!attrs.collapsable || expand) {
  2666. childNodes.push(renderChildren(h, children, context));
  2667. }
  2668. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(h('div', {
  2669. class: cls,
  2670. key: id
  2671. }, childNodes), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !data.hidden]]);
  2672. }; // 创建展开折叠按钮
  2673. const renderBtn = (h, node, context) => {
  2674. const {
  2675. attrs
  2676. } = context;
  2677. const expandHandler = attrs.onOnExpand;
  2678. const cls = ['tree-org-node__expand'];
  2679. if (node.expand) {
  2680. cls.push('expanded');
  2681. }
  2682. const children = [];
  2683. if (context.slots.expand) {
  2684. children.push(context.slots.expand({
  2685. node
  2686. }));
  2687. } else {
  2688. children.push(h('span', {
  2689. class: 'tree-org-node__expand-btn'
  2690. }));
  2691. }
  2692. return h('span', {
  2693. class: cls,
  2694. onMousedown: e => {
  2695. e.stopPropagation();
  2696. },
  2697. onDblclick: e => {
  2698. e.stopPropagation();
  2699. },
  2700. onClick: e => {
  2701. e.stopPropagation();
  2702. expandHandler && expandHandler(e, node);
  2703. }
  2704. }, children);
  2705. }; // 创建 label 节点
  2706. const renderLabel = (h, node, context) => {
  2707. const {
  2708. attrs
  2709. } = context;
  2710. const defaultProps = attrs.props;
  2711. const renderContent = attrs.renderContent; // const { directives } = context.data
  2712. const {
  2713. label
  2714. } = node;
  2715. const childNodes = [];
  2716. if (context.slots.default) {
  2717. childNodes.push(context.slots.default({
  2718. node
  2719. }));
  2720. } else if (typeof renderContent === 'function') {
  2721. utils_log.warning('scoped-slot header is easier to use. We recommend users to use scoped-slot header.');
  2722. const vnode = renderContent(h, node);
  2723. vnode && childNodes.push(vnode);
  2724. } else {
  2725. childNodes.push(h('div', {
  2726. class: 'tree-org-node__text'
  2727. }, label));
  2728. }
  2729. if (attrs.collapsable && !isLeaf(node, 'children', attrs.lazy)) {
  2730. childNodes.push(renderBtn(h, node, context));
  2731. }
  2732. const cls = ['tree-org-node__inner'];
  2733. let {
  2734. labelStyle,
  2735. labelClassName,
  2736. selectedClassName,
  2737. selectedKey
  2738. } = attrs;
  2739. if (typeof labelClassName === 'function') {
  2740. labelClassName = labelClassName(node);
  2741. }
  2742. labelClassName && cls.push(labelClassName);
  2743. node.className && cls.push(node.className); // add selected class and key from props
  2744. if (typeof selectedClassName === 'function') {
  2745. selectedClassName = selectedClassName(node);
  2746. }
  2747. if (selectedKey !== undefined) {
  2748. selectedKey = Array.isArray(selectedKey) ? selectedKey : [selectedKey];
  2749. }
  2750. selectedClassName && selectedKey && selectedKey.includes(node.id) && cls.push(selectedClassName);
  2751. const nodeLabelClass = ['tree-org-node__content'];
  2752. if (node.$$root) {
  2753. nodeLabelClass.push(`is-root_${attrs.suffix}`);
  2754. }
  2755. if (!node.label) {
  2756. nodeLabelClass.push('is-empty');
  2757. }
  2758. if (node.$$focused) {
  2759. nodeLabelClass.push('is-edit');
  2760. }
  2761. const vNodedrag = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])('nodedrag');
  2762. const cloneDirs = [];
  2763. if (attrs.vNodedrag && vNodedrag && !node.$$root) {
  2764. cloneDirs.push([vNodedrag, Object.assign({
  2765. node: node
  2766. }, attrs.vNodedrag), '', {
  2767. l: true,
  2768. t: true
  2769. }]);
  2770. } // event handlers
  2771. const NODEEVENTS = {};
  2772. for (const EKEY in EVENTS) {
  2773. if (Object.prototype.hasOwnProperty.call(EVENTS, EKEY)) {
  2774. const EVENT = EVENTS[EKEY];
  2775. const handler = attrs[EVENT];
  2776. if (handler) {
  2777. NODEEVENTS[EKEY] = createListener(handler, node);
  2778. }
  2779. }
  2780. } // texterea event handles
  2781. const focusHandler = attrs.onNodeFocus;
  2782. const blurHandler = attrs.onNodeBlur;
  2783. const vFocus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])('focus');
  2784. const directives = [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], node.$$focused]];
  2785. if (vFocus) {
  2786. directives.push([vFocus, node.$$focused]);
  2787. }
  2788. return h('div', {
  2789. class: nodeLabelClass
  2790. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(h('div', {
  2791. class: cls,
  2792. style: node.style ? node.style : labelStyle,
  2793. ...NODEEVENTS
  2794. }, childNodes), cloneDirs), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(h('textarea', {
  2795. class: 'tree-org-node__textarea',
  2796. placeholder: '请输入节点名称',
  2797. value: node.label,
  2798. onFocus: e => {
  2799. focusHandler && focusHandler(e, node.$$data, node);
  2800. },
  2801. onInput: event => {
  2802. node.label = event.target.value;
  2803. },
  2804. onBlur: e => {
  2805. if (node.$$data.focused !== undefined) node.$$data.focused = false;
  2806. node.$$data[defaultProps.label] = e.target.value;
  2807. node.$$focused = false;
  2808. blurHandler && blurHandler(e, node.$$data, node);
  2809. },
  2810. onClick: e => e.stopPropagation()
  2811. }), directives)]);
  2812. }; // 创建 node 子节点
  2813. const renderChildren = (h, list, context) => {
  2814. if (Array.isArray(list) && list.length) {
  2815. const children = list.filter(item => !item.$$hidden).map(item => {
  2816. return renderNode(h, item, context);
  2817. });
  2818. return h('div', {
  2819. class: 'tree-org-node__children'
  2820. }, children);
  2821. }
  2822. return '';
  2823. };
  2824. const TreeOrgNode = (props, context) => {
  2825. if (!props.data || Object.keys(props.data).length === 0) return '';
  2826. props.data.$$root = !props.isClone;
  2827. return renderNode(external_commonjs_vue_commonjs2_vue_root_Vue_["h"], props.data, context);
  2828. };
  2829. TreeOrgNode.directives = {
  2830. // 自定义指令
  2831. focus: directives_focus,
  2832. nodedrag: directives_drag
  2833. };
  2834. /* harmony default export */ var components_node = (TreeOrgNode);
  2835. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tools/tools.vue?vue&type=template&id=1aca9713
  2836. const toolsvue_type_template_id_1aca9713_hoisted_1 = {
  2837. class: "zm-tree-handle"
  2838. };
  2839. const toolsvue_type_template_id_1aca9713_hoisted_2 = {
  2840. key: 0,
  2841. class: "zm-tree-percent"
  2842. };
  2843. const toolsvue_type_template_id_1aca9713_hoisted_3 = ["title"];
  2844. const toolsvue_type_template_id_1aca9713_hoisted_4 = {
  2845. class: "zm-tree-svg"
  2846. };
  2847. const toolsvue_type_template_id_1aca9713_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2848. class: "zm-tree-icon"
  2849. }, "+", -1);
  2850. const _hoisted_6 = [toolsvue_type_template_id_1aca9713_hoisted_5];
  2851. const _hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2852. class: "zm-tree-icon"
  2853. }, "-", -1);
  2854. const _hoisted_8 = [_hoisted_7];
  2855. const _hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
  2856. class: "zm-tree-restore"
  2857. }, null, -1);
  2858. const _hoisted_10 = [_hoisted_9];
  2859. const _hoisted_11 = ["title"];
  2860. const _hoisted_12 = {
  2861. class: "zm-tree-svg"
  2862. };
  2863. function toolsvue_type_template_id_1aca9713_render(_ctx, _cache, $props, $setup, $data, $options) {
  2864. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", toolsvue_type_template_id_1aca9713_hoisted_1, [_ctx.tools.scale ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", toolsvue_type_template_id_1aca9713_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.scale), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.expand ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2865. key: 1,
  2866. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleExpand && _ctx.handleExpand(...args)),
  2867. title: _ctx.expandTitle,
  2868. class: "zm-tree-handle-item"
  2869. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", toolsvue_type_template_id_1aca9713_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", {
  2870. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(['treefont', _ctx.expanded ? 'icon-collapse' : 'icon-expand'])
  2871. }, null, 2)])], 8, toolsvue_type_template_id_1aca9713_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.zoom ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2872. key: 2,
  2873. onClick: _cache[1] || (_cache[1] = $event => _ctx.handleScale('out')),
  2874. title: "放大",
  2875. class: "zm-tree-handle-item zoom-out"
  2876. }, _hoisted_6)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.zoom ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2877. key: 3,
  2878. onClick: _cache[2] || (_cache[2] = $event => _ctx.handleScale('in')),
  2879. title: "缩小",
  2880. class: "zm-tree-handle-item zoom-in"
  2881. }, _hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.restore ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2882. key: 4,
  2883. onClick: _cache[3] || (_cache[3] = $event => _ctx.handleScale('restore')),
  2884. title: "还原",
  2885. class: "zm-tree-handle-item"
  2886. }, _hoisted_10)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.tools.fullscreen ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2887. key: 5,
  2888. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleFullscreen && _ctx.handleFullscreen(...args)),
  2889. title: _ctx.fullTiltle,
  2890. class: "zm-tree-handle-item"
  2891. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", _hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", {
  2892. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(['treefont', _ctx.fullscreen ? 'icon-unfullscreen' : 'icon-fullscreen'])
  2893. }, null, 2)])], 8, _hoisted_11)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]);
  2894. }
  2895. // CONCATENATED MODULE: ./src/components/tools/tools.vue?vue&type=template&id=1aca9713
  2896. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tools/tools.vue?vue&type=script&lang=js
  2897. /* harmony default export */ var toolsvue_type_script_lang_js = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  2898. props: {
  2899. scale: String,
  2900. tools: Object
  2901. },
  2902. setup(props, {
  2903. emit
  2904. }) {
  2905. const expanded = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  2906. const fullscreen = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  2907. function handleExpand() {
  2908. expanded.value = !expanded.value;
  2909. emit('onExpand');
  2910. }
  2911. function handleScale(scale) {
  2912. if (scale === 'out') {
  2913. emit('onScale', 0.1);
  2914. } else if (scale === 'in') {
  2915. emit('onScale', -0.1);
  2916. } else {
  2917. emit('onRestore');
  2918. }
  2919. }
  2920. function handleFullscreen(e) {
  2921. fullscreen.value = !fullscreen.value;
  2922. emit('onFullscreen', e);
  2923. }
  2924. function isFullScreen() {
  2925. return document.isFullScreen || document.mozIsFullScreen || document.webkitIsFullScreen;
  2926. }
  2927. function onResize() {
  2928. // 如果当前非全屏,但是 fullscreen 为true,说明是esc退出全屏
  2929. if (!isFullScreen() && fullscreen.value) {
  2930. // 全屏下按键esc后要执行的动作
  2931. handleFullscreen('esc');
  2932. }
  2933. }
  2934. const expandTitle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  2935. return expanded.value ? '全部收起' : '全部展开';
  2936. });
  2937. const fullTiltle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  2938. return fullscreen.value ? '退出全屏' : '全屏';
  2939. });
  2940. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => {
  2941. window.addEventListener('resize', onResize);
  2942. });
  2943. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(() => {
  2944. window.removeEventListener('resize', onResize);
  2945. });
  2946. return {
  2947. expanded,
  2948. fullscreen,
  2949. expandTitle,
  2950. fullTiltle,
  2951. handleExpand,
  2952. handleScale,
  2953. handleFullscreen
  2954. };
  2955. }
  2956. }));
  2957. // CONCATENATED MODULE: ./src/components/tools/tools.vue?vue&type=script&lang=js
  2958. // EXTERNAL MODULE: ./node_modules/vue-loader-v16/dist/exportHelper.js
  2959. var exportHelper = __webpack_require__("6b0d");
  2960. var exportHelper_default = /*#__PURE__*/__webpack_require__.n(exportHelper);
  2961. // CONCATENATED MODULE: ./src/components/tools/tools.vue
  2962. const __exports__ = /*#__PURE__*/exportHelper_default()(toolsvue_type_script_lang_js, [['render',toolsvue_type_template_id_1aca9713_render]])
  2963. /* harmony default export */ var tools_tools = (__exports__);
  2964. // CONCATENATED MODULE: ./src/components/tools/index.ts
  2965. /* harmony default export */ var components_tools = (tools_tools);
  2966. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/draggable/src/draggable.vue?vue&type=template&id=79ff2fba&ts=true
  2967. function draggablevue_type_template_id_79ff2fba_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  2968. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
  2969. style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.style),
  2970. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{
  2971. [_ctx.classNameActive]: _ctx.enabled,
  2972. [_ctx.classNameDragging]: _ctx.dragging,
  2973. [_ctx.classNameDraggable]: _ctx.draggable
  2974. }, _ctx.className]),
  2975. ref: "eleRef",
  2976. onMousedown: _cache[0] || (_cache[0] = //@ts-ignore
  2977. (...args) => _ctx.elementMouseDown && _ctx.elementMouseDown(...args)),
  2978. onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
  2979. (...args) => _ctx.elementTouchDown && _ctx.elementTouchDown(...args))
  2980. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 38);
  2981. }
  2982. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.vue?vue&type=template&id=79ff2fba&ts=true
  2983. // CONCATENATED MODULE: ./src/utils/fns.ts
  2984. function isFunction(func) {
  2985. return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
  2986. } // 生成随机字符串, e表示长度
  2987. function randomString(e) {
  2988. e = e || 32;
  2989. const t = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
  2990. const a = t.length;
  2991. let n = '';
  2992. for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
  2993. return n;
  2994. }
  2995. function snapToGrid(grid, pendingX, pendingY, scale = 1) {
  2996. const deltaX = Math.round(pendingX / scale / grid[0]) * grid[0];
  2997. const deltaY = Math.round(pendingY / scale / grid[1]) * grid[1];
  2998. return {
  2999. deltaX,
  3000. deltaY
  3001. };
  3002. }
  3003. function getSize(el) {
  3004. const rect = el.getBoundingClientRect();
  3005. return [rect.width, rect.height];
  3006. }
  3007. function restrictToBounds(value, min, max) {
  3008. if (value < min) {
  3009. return min;
  3010. }
  3011. if (max < value) {
  3012. return max;
  3013. }
  3014. return value;
  3015. }
  3016. // CONCATENATED MODULE: ./src/utils/dom.ts
  3017. function matchesSelectorToParentElements(el, selector, baseNode) {
  3018. let node = el;
  3019. const matchesSelectorFunc = ['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].find(func => node && isFunction(node[func])) || '';
  3020. if (!isFunction(node[matchesSelectorFunc])) return false;
  3021. do {
  3022. if (node[matchesSelectorFunc](selector)) return true;
  3023. if (node === baseNode) return false;
  3024. node = node.parentNode;
  3025. } while (node);
  3026. return false;
  3027. }
  3028. function getComputedSize($el) {
  3029. const style = window.getComputedStyle($el);
  3030. return [parseFloat(style.getPropertyValue('width')), parseFloat(style.getPropertyValue('height'))];
  3031. }
  3032. const addEvent = function (element, event, handler, useCapture = false) {
  3033. if (element && event && handler) {
  3034. element.addEventListener(event, handler, useCapture);
  3035. }
  3036. };
  3037. /* istanbul ignore next */
  3038. const removeEvent = function (element, event, handler, useCapture = false) {
  3039. if (element && event && handler) {
  3040. element.removeEventListener(event, handler, useCapture);
  3041. }
  3042. };
  3043. // CONCATENATED MODULE: ./src/components/draggable/src/use-draggable.ts
  3044. const useDraggable = (props, {
  3045. emit
  3046. }, refs) => {
  3047. const events = {
  3048. mouse: {
  3049. start: 'mousedown',
  3050. move: 'mousemove',
  3051. stop: 'mouseup'
  3052. },
  3053. touch: {
  3054. start: 'touchstart',
  3055. move: 'touchmove',
  3056. stop: 'touchend'
  3057. }
  3058. };
  3059. const userSelectNone = {
  3060. userSelect: 'none',
  3061. MozUserSelect: 'none',
  3062. WebkitUserSelect: 'none',
  3063. MsUserSelect: 'none'
  3064. };
  3065. const userSelectAuto = {
  3066. userSelect: 'auto',
  3067. MozUserSelect: 'auto',
  3068. WebkitUserSelect: 'auto',
  3069. MsUserSelect: 'auto'
  3070. };
  3071. let eventsFor = events.mouse;
  3072. const left = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.x);
  3073. const top = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.y);
  3074. const zIndex = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.z);
  3075. const enabled = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(props.active);
  3076. const dragging = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  3077. const right = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3078. const bottom = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3079. const width = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3080. const height = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3081. const parentWidth = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3082. const parentHeight = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3083. let mouseClickPosition = {};
  3084. let bounds = {};
  3085. function resetBoundsAndMouseState() {
  3086. mouseClickPosition = {
  3087. mouseX: 0,
  3088. mouseY: 0,
  3089. x: 0,
  3090. y: 0,
  3091. w: 0,
  3092. h: 0
  3093. };
  3094. bounds = {
  3095. minLeft: -Infinity,
  3096. maxLeft: Infinity,
  3097. minRight: -Infinity,
  3098. maxRight: Infinity,
  3099. minTop: -Infinity,
  3100. maxTop: Infinity,
  3101. minBottom: -Infinity,
  3102. maxBottom: Infinity
  3103. };
  3104. }
  3105. function checkParentSize() {
  3106. if (props.parent) {
  3107. const [newParentWidth, newParentHeight] = getParentSize();
  3108. parentWidth.value = newParentWidth || 0;
  3109. parentHeight.value = newParentHeight || 0;
  3110. }
  3111. }
  3112. function getParentSize() {
  3113. if (props.parent && refs.eleRef.value) {
  3114. const style = window.getComputedStyle(refs.eleRef.value.parentNode, null);
  3115. return [parseInt(style.getPropertyValue('width'), 10), parseInt(style.getPropertyValue('height'), 10)];
  3116. }
  3117. return [0, 0];
  3118. }
  3119. function elementTouchDown(e) {
  3120. // e.stopPropagation()
  3121. eventsFor = events.touch;
  3122. elementDown(e);
  3123. }
  3124. function elementMouseDown(e) {
  3125. // e.stopPropagation()
  3126. eventsFor = events.mouse;
  3127. elementDown(e);
  3128. }
  3129. function elementDown(e) {
  3130. if (e instanceof MouseEvent && e.which !== 1) {
  3131. return;
  3132. }
  3133. const target = e.target || e.srcElement;
  3134. if (target && refs.eleRef.value && refs.eleRef.value.contains(target)) {
  3135. if (props.dragCancel && matchesSelectorToParentElements(target, props.dragCancel, refs.eleRef.value)) {
  3136. dragging.value = false;
  3137. return;
  3138. }
  3139. if (!enabled.value) {
  3140. enabled.value = true;
  3141. emit('activated');
  3142. emit('update:active', true);
  3143. }
  3144. if (props.draggable) {
  3145. dragging.value = true;
  3146. }
  3147. if (e instanceof MouseEvent) {
  3148. mouseClickPosition.mouseX = e.pageX;
  3149. mouseClickPosition.mouseY = e.pageY;
  3150. } else {
  3151. mouseClickPosition.mouseX = e.touches[0].pageX;
  3152. mouseClickPosition.mouseY = e.touches[0].pageY;
  3153. }
  3154. mouseClickPosition.left = left.value;
  3155. mouseClickPosition.right = right.value;
  3156. mouseClickPosition.top = top.value;
  3157. mouseClickPosition.bottom = bottom.value;
  3158. if (props.parent) {
  3159. bounds = calcDragLimits();
  3160. }
  3161. addEvent(document.documentElement, eventsFor.move, move);
  3162. addEvent(document.documentElement, eventsFor.stop, handleUp);
  3163. }
  3164. }
  3165. function calcDragLimits() {
  3166. const grid = props.grid;
  3167. return {
  3168. minLeft: left.value % grid[0],
  3169. maxLeft: Math.floor((parentWidth.value - width.value - left.value) / grid[0]) * grid[0] + left.value,
  3170. minRight: right.value % grid[0],
  3171. maxRight: Math.floor((parentWidth.value - width.value - right.value) / grid[0]) * grid[0] + right.value,
  3172. minTop: top.value % grid[1],
  3173. maxTop: Math.floor((parentHeight.value - height.value - top.value) / grid[1]) * grid[1] + top.value,
  3174. minBottom: bottom.value % grid[1],
  3175. maxBottom: Math.floor((parentHeight.value - height.value - bottom.value) / grid[1]) * grid[1] + bottom.value
  3176. };
  3177. }
  3178. function deselect(e) {
  3179. const target = e.target || e.srcElement;
  3180. if (refs.eleRef.value && !refs.eleRef.value.contains(target)) {
  3181. if (enabled.value && !props.preventDeactivation) {
  3182. enabled.value = false;
  3183. emit('deactivated');
  3184. emit('update:active', false);
  3185. }
  3186. } // resetBoundsAndMouseState()
  3187. }
  3188. function move(e) {
  3189. if (dragging.value) {
  3190. handleDrag(e);
  3191. }
  3192. }
  3193. function handleDrag(e) {
  3194. const axis = props.axis;
  3195. const grid = props.grid;
  3196. let pageX = 0;
  3197. let pageY = 0;
  3198. if (e instanceof MouseEvent) {
  3199. pageX = e.pageX;
  3200. pageY = e.pageY;
  3201. } else {
  3202. pageX = e.touches[0].pageX;
  3203. pageY = e.touches[0].pageY;
  3204. }
  3205. const tmpDeltaX = axis && axis !== 'y' ? mouseClickPosition.mouseX - pageX : 0;
  3206. const tmpDeltaY = axis && axis !== 'x' ? mouseClickPosition.mouseY - pageY : 0;
  3207. const {
  3208. deltaX,
  3209. deltaY
  3210. } = snapToGrid(grid, tmpDeltaX, tmpDeltaY, props.scale);
  3211. const lf = restrictToBounds(mouseClickPosition.left - deltaX, bounds.minLeft, bounds.maxLeft);
  3212. const tp = restrictToBounds(mouseClickPosition.top - deltaY, bounds.minTop, bounds.maxTop);
  3213. const rt = restrictToBounds(mouseClickPosition.right + deltaX, bounds.minRight, bounds.maxRight);
  3214. const bt = restrictToBounds(mouseClickPosition.bottom + deltaY, bounds.minBottom, bounds.maxBottom);
  3215. left.value = lf;
  3216. top.value = tp;
  3217. right.value = rt;
  3218. bottom.value = bt;
  3219. emit('dragging', left.value, top.value);
  3220. }
  3221. function moveHorizontally(val) {
  3222. const {
  3223. deltaX
  3224. } = snapToGrid(props.grid, val, top.value, props.scale);
  3225. const lf = restrictToBounds(deltaX, bounds.minLeft, bounds.maxLeft);
  3226. left.value = lf;
  3227. right.value = parentWidth.value - width.value - lf;
  3228. }
  3229. function moveVertically(val) {
  3230. const {
  3231. deltaY
  3232. } = snapToGrid(props.grid, left.value, val, props.scale);
  3233. const tp = restrictToBounds(deltaY, bounds.minTop, bounds.maxTop);
  3234. top.value = tp;
  3235. bottom.value = parentHeight.value - height.value - tp;
  3236. }
  3237. function handleUp() {
  3238. resetBoundsAndMouseState();
  3239. if (dragging.value) {
  3240. dragging.value = false;
  3241. emit('dragstop', left.value, top.value);
  3242. }
  3243. }
  3244. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeMount"])(() => {
  3245. resetBoundsAndMouseState();
  3246. });
  3247. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => {
  3248. if (!props.enableNativeDrag && refs.eleRef.value) {
  3249. refs.eleRef.value.ondragstart = () => false;
  3250. }
  3251. const [pw, ph] = getParentSize();
  3252. parentWidth.value = pw;
  3253. parentHeight.value = ph;
  3254. if (refs.eleRef.value) {
  3255. const [elWidth, elHeight] = getComputedSize(refs.eleRef.value);
  3256. width.value = elWidth;
  3257. height.value = elHeight;
  3258. right.value = parentWidth.value - width.value - left.value;
  3259. bottom.value = parentHeight.value - height.value - top.value;
  3260. }
  3261. addEvent(document.documentElement, 'mousedown', deselect);
  3262. addEvent(document.documentElement, 'touchend touchcancel', deselect);
  3263. addEvent(window, 'resize', checkParentSize);
  3264. });
  3265. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(() => {
  3266. removeEvent(document.documentElement, 'mousedown', deselect);
  3267. removeEvent(document.documentElement, 'touchstart', handleUp);
  3268. removeEvent(document.documentElement, 'mousemove', move);
  3269. removeEvent(document.documentElement, 'touchmove', move);
  3270. removeEvent(document.documentElement, 'mouseup', handleUp);
  3271. removeEvent(document.documentElement, 'touchend touchcancel', deselect);
  3272. removeEvent(window, 'resize', checkParentSize);
  3273. });
  3274. const style = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  3275. return {
  3276. transform: `translate(${left.value}px, ${top.value}px)`,
  3277. zIndex: zIndex.value,
  3278. ...(dragging.value && props.disableUserSelect ? userSelectNone : userSelectAuto)
  3279. };
  3280. });
  3281. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.active, active => {
  3282. enabled.value = active;
  3283. if (active) {
  3284. emit('activated');
  3285. } else {
  3286. emit('deactivated');
  3287. }
  3288. });
  3289. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.z, value => {
  3290. if (value >= 0 || value === 'auto') {
  3291. zIndex.value = value;
  3292. }
  3293. });
  3294. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.x, value => {
  3295. if (dragging.value) {
  3296. return;
  3297. }
  3298. if (props.parent) {
  3299. bounds = calcDragLimits();
  3300. }
  3301. moveHorizontally(value);
  3302. });
  3303. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.y, value => {
  3304. if (dragging.value) {
  3305. return;
  3306. }
  3307. if (props.parent) {
  3308. bounds = calcDragLimits();
  3309. }
  3310. moveVertically(value);
  3311. });
  3312. return {
  3313. enabled,
  3314. dragging,
  3315. style,
  3316. resetBoundsAndMouseState,
  3317. elementTouchDown,
  3318. elementMouseDown
  3319. };
  3320. };
  3321. // EXTERNAL MODULE: ./node_modules/@vue/shared/dist/shared.esm-bundler.js
  3322. var shared_esm_bundler = __webpack_require__("9ff4");
  3323. // CONCATENATED MODULE: ./src/utils/props.ts
  3324. const wrapperKey = Symbol('wrapper');
  3325. const propKey = '__elPropsReservedKey';
  3326. /**
  3327. * @description Build prop. It can better optimize prop types
  3328. * @description 生成 prop,能更好地优化类型
  3329. * @example
  3330. // limited options
  3331. // the type will be PropType<'light' | 'dark'>
  3332. buildProp({
  3333. type: String,
  3334. values: ['light', 'dark'],
  3335. } as const)
  3336. * @example
  3337. // limited options and other types
  3338. // the type will be PropType<'small' | 'large' | number>
  3339. buildProp({
  3340. type: [String, Number],
  3341. values: ['small', 'large'],
  3342. validator: (val: unknown): val is number => typeof val === 'number',
  3343. } as const)
  3344. @link see more: https://github.com/element-plus/element-plus/pull/3341
  3345. */
  3346. function buildProp(option, key) {
  3347. // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)
  3348. if (!Object(shared_esm_bundler["a" /* isObject */])(option) || !!option[propKey]) return option;
  3349. const {
  3350. values,
  3351. required,
  3352. default: defaultValue,
  3353. type,
  3354. validator
  3355. } = option;
  3356. const _validator = values || validator ? val => {
  3357. let valid = false;
  3358. let allowedValues = [];
  3359. if (values) {
  3360. allowedValues = [...values, defaultValue];
  3361. valid = valid || allowedValues.includes(val);
  3362. }
  3363. if (validator) valid = valid || validator(val);
  3364. if (!valid && allowedValues.length > 0) {
  3365. const allowValuesText = [...new Set(allowedValues)].map(value => JSON.stringify(value)).join(', ');
  3366. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["warn"])(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ''}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
  3367. }
  3368. return valid;
  3369. } : undefined;
  3370. return {
  3371. type: typeof type === 'object' && Object.getOwnPropertySymbols(type).includes(wrapperKey) ? type[wrapperKey] : type,
  3372. validator: _validator,
  3373. [propKey]: true,
  3374. default: defaultValue,
  3375. required: !!required
  3376. };
  3377. }
  3378. const buildProps = props => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
  3379. const definePropType = val => ({
  3380. [wrapperKey]: val
  3381. });
  3382. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.ts
  3383. const draggableProps = buildProps({
  3384. className: {
  3385. type: String,
  3386. default: 'zm-draggable'
  3387. },
  3388. classNameDraggable: {
  3389. type: String,
  3390. default: 'draggable'
  3391. },
  3392. classNameDragging: {
  3393. type: String,
  3394. default: 'dragging'
  3395. },
  3396. classNameActive: {
  3397. type: String,
  3398. default: 'active'
  3399. },
  3400. disableUserSelect: {
  3401. type: Boolean,
  3402. default: true
  3403. },
  3404. enableNativeDrag: {
  3405. type: Boolean,
  3406. default: false
  3407. },
  3408. preventDeactivation: {
  3409. type: Boolean,
  3410. default: false
  3411. },
  3412. active: {
  3413. type: Boolean,
  3414. default: false
  3415. },
  3416. draggable: {
  3417. type: Boolean,
  3418. default: true
  3419. },
  3420. x: {
  3421. type: Number,
  3422. default: 0
  3423. },
  3424. y: {
  3425. type: Number,
  3426. default: 0
  3427. },
  3428. z: {
  3429. type: [String, Number],
  3430. default: 'auto',
  3431. validator: val => typeof val === 'string' ? val === 'auto' : val >= 0
  3432. },
  3433. dragCancel: String,
  3434. axis: {
  3435. type: String,
  3436. default: 'both',
  3437. validator: val => ['x', 'y', 'both'].includes(val)
  3438. },
  3439. grid: {
  3440. type: Array,
  3441. default: () => [1, 1]
  3442. },
  3443. parent: {
  3444. type: Boolean,
  3445. default: false
  3446. },
  3447. scale: {
  3448. type: Number,
  3449. default: 1,
  3450. validator: val => val > 0
  3451. }
  3452. });
  3453. const draggableEmits = {
  3454. activated: () => true,
  3455. deactivated: () => true,
  3456. dragging: (x, y) => isNumber(x) && isNumber(y),
  3457. dragstop: (x, y) => isNumber(x) && isNumber(y),
  3458. 'update:active': value => typeof value === 'boolean'
  3459. };
  3460. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/draggable/src/draggable.vue?vue&type=script&lang=ts
  3461. /* harmony default export */ var draggablevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  3462. replace: true,
  3463. name: 'Draggable',
  3464. props: draggableProps,
  3465. emits: draggableEmits,
  3466. setup(props, ctx) {
  3467. const eleRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  3468. const draggable = useDraggable(props, ctx, {
  3469. eleRef
  3470. });
  3471. return {
  3472. top,
  3473. eleRef,
  3474. ...draggable
  3475. };
  3476. }
  3477. }));
  3478. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.vue?vue&type=script&lang=ts
  3479. // CONCATENATED MODULE: ./src/components/draggable/src/draggable.vue
  3480. const draggable_exports_ = /*#__PURE__*/exportHelper_default()(draggablevue_type_script_lang_ts, [['render',draggablevue_type_template_id_79ff2fba_ts_true_render]])
  3481. /* harmony default export */ var src_draggable = (draggable_exports_);
  3482. // CONCATENATED MODULE: ./src/components/draggable/index.ts
  3483. /* harmony default export */ var components_draggable = (src_draggable);
  3484. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/clone-org/clone-org.vue?vue&type=template&id=61bebde9&ts=true
  3485. function clone_orgvue_type_template_id_61bebde9_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  3486. const _component_tree_org_node = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("tree-org-node");
  3487. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
  3488. to: "body"
  3489. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  3490. id: "clone-tree-org",
  3491. class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["clone-tree-org tree-org", {
  3492. horizontal: _ctx.horizontal,
  3493. collapsable: _ctx.collapsable
  3494. }])
  3495. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_tree_org_node, {
  3496. data: _ctx.data,
  3497. props: _ctx.props,
  3498. isClone: false,
  3499. horizontal: _ctx.horizontal,
  3500. labelStyle: _ctx.labelStyle,
  3501. collapsable: _ctx.collapsable,
  3502. renderContent: _ctx.renderContent,
  3503. labelClassName: _ctx.labelClassName
  3504. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createSlots"])({
  3505. _: 2
  3506. }, [_ctx.defaultSlot ? {
  3507. name: "default",
  3508. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  3509. node
  3510. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {
  3511. node: node
  3512. })])
  3513. } : undefined, _ctx.expandSlot ? {
  3514. name: "expand",
  3515. fn: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(({
  3516. node
  3517. }) => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "expand", {
  3518. node: node
  3519. })])
  3520. } : undefined]), 1032, ["data", "props", "horizontal", "labelStyle", "collapsable", "renderContent", "labelClassName"])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]])]);
  3521. }
  3522. // CONCATENATED MODULE: ./src/components/clone-org/clone-org.vue?vue&type=template&id=61bebde9&ts=true
  3523. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/clone-org/clone-org.vue?vue&type=script&lang=ts
  3524. const cloneorgProps = buildProps({
  3525. data: {
  3526. type: Object,
  3527. required: true
  3528. },
  3529. props: {
  3530. type: definePropType(Object)
  3531. },
  3532. modelValue: Boolean,
  3533. horizontal: Boolean,
  3534. selectedKey: String,
  3535. collapsable: Boolean,
  3536. renderContent: Function,
  3537. labelStyle: Object,
  3538. labelClassName: {
  3539. type: [Function, String]
  3540. }
  3541. });
  3542. /* harmony default export */ var clone_orgvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  3543. components: {
  3544. TreeOrgNode: components_node
  3545. },
  3546. props: cloneorgProps,
  3547. setup(props, ctx) {
  3548. const defaultSlot = !!ctx.slots.default;
  3549. const expandSlot = !!ctx.slots.expand;
  3550. return {
  3551. defaultSlot,
  3552. expandSlot
  3553. };
  3554. }
  3555. }));
  3556. // CONCATENATED MODULE: ./src/components/clone-org/clone-org.vue?vue&type=script&lang=ts
  3557. // CONCATENATED MODULE: ./src/components/clone-org/clone-org.vue
  3558. const clone_org_exports_ = /*#__PURE__*/exportHelper_default()(clone_orgvue_type_script_lang_ts, [['render',clone_orgvue_type_template_id_61bebde9_ts_true_render]])
  3559. /* harmony default export */ var clone_org = (clone_org_exports_);
  3560. // CONCATENATED MODULE: ./src/components/clone-org/index.ts
  3561. /* harmony default export */ var components_clone_org = (clone_org);
  3562. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/contextmenu/src/contextmenu.vue?vue&type=template&id=c9139626&ts=true
  3563. const contextmenuvue_type_template_id_c9139626_ts_true_hoisted_1 = ["action"];
  3564. function contextmenuvue_type_template_id_c9139626_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  3565. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Teleport"], {
  3566. to: "body"
  3567. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], {
  3568. name: "dialog-fade",
  3569. onAfterEnter: _ctx.afterEnter,
  3570. onAfterLeave: _ctx.afterLeave
  3571. }, {
  3572. default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
  3573. style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.position),
  3574. onClick: _cache[1] || (_cache[1] = //@ts-ignore
  3575. (...args) => _ctx.handleMenu && _ctx.handleMenu(...args)),
  3576. ref: "eleRef",
  3577. class: "zm-tree-contextmenu"
  3578. }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.menus, item => {
  3579. return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [_ctx.editable || !['add', 'edit', 'delete'].includes(item.command) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", {
  3580. class: "zm-tree-menu-item",
  3581. action: item.command,
  3582. key: item.command
  3583. }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(item.name), 9, contextmenuvue_type_template_id_c9139626_ts_true_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64);
  3584. }), 256))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", {
  3585. class: "copy-textarea",
  3586. ref: "inputRef",
  3587. "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.copyText = $event)
  3588. }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.copyText]])], 4), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]])]),
  3589. _: 1
  3590. }, 8, ["onAfterEnter", "onAfterLeave"])]);
  3591. }
  3592. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenu.vue?vue&type=template&id=c9139626&ts=true
  3593. // CONCATENATED MODULE: ./src/utils/constants.ts
  3594. const UPDATE_MODEL_EVENT = 'update:modelValue';
  3595. // CONCATENATED MODULE: ./src/components/contextmenu/src/use-contextmenu.ts
  3596. const useContextmenu = (defaultProps, {
  3597. emit
  3598. }, refs) => {
  3599. const copyText = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(''); // 递归遍历实现
  3600. function getNodeById(data, props, value) {
  3601. if (data[props.id] === value) {
  3602. return data;
  3603. } else if (Array.isArray(data[props.children])) {
  3604. const list = data[props.children];
  3605. for (let i = 0, len = list.length; i < len; i++) {
  3606. const row = list[i];
  3607. const pNode = getNodeById(row, props, value);
  3608. if (pNode) {
  3609. return pNode;
  3610. }
  3611. }
  3612. }
  3613. } // 移除节点
  3614. function handleDelete() {
  3615. const {
  3616. props,
  3617. data,
  3618. node
  3619. } = defaultProps;
  3620. if (defaultProps.nodeDelete) {
  3621. defaultProps.nodeDelete(node.$$data);
  3622. return;
  3623. }
  3624. if (node.$$root) {
  3625. utils_log.pretty('[提示] ', '根节点不允许删除', 'danger');
  3626. return;
  3627. }
  3628. const {
  3629. id,
  3630. children
  3631. } = props;
  3632. const oldPaNode = getNodeById(data, props, node.pid);
  3633. if (oldPaNode) {
  3634. const list = oldPaNode[children];
  3635. for (let i = 0, len = list.length; i < len; i++) {
  3636. if (list[i][id] === node.id) {
  3637. list.splice(i, 1);
  3638. emit('onNodeDelete', node.$$data, node);
  3639. break;
  3640. }
  3641. }
  3642. }
  3643. }
  3644. function handleMenu(e) {
  3645. const el = e.target;
  3646. if (el.className === 'zm-tree-menu-item') {
  3647. const command = el.getAttribute('action');
  3648. switch (command) {
  3649. case 'copy':
  3650. handleCopy();
  3651. break;
  3652. case 'add':
  3653. handleAdd();
  3654. break;
  3655. case 'edit':
  3656. handleEdit();
  3657. break;
  3658. case 'delete':
  3659. handleDelete();
  3660. break;
  3661. }
  3662. emit('contextmenu', {
  3663. command,
  3664. node: defaultProps.node,
  3665. data: defaultProps.node.$$data
  3666. });
  3667. emit(UPDATE_MODEL_EVENT, false);
  3668. }
  3669. }
  3670. function handleCopy() {
  3671. if (defaultProps.nodeCopy) {
  3672. defaultProps.nodeCopy(defaultProps.node.$$data);
  3673. return;
  3674. }
  3675. copyText.value = defaultProps.node.label;
  3676. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  3677. if (refs.inputRef && refs.inputRef.value) {
  3678. refs.inputRef && refs.inputRef.value.select(); // 选中文本
  3679. navigator.clipboard.writeText(copyText.value).then(function () {
  3680. /* clipboard successfully set */
  3681. utils_log.pretty('[提示] ', '文本复制成功', 'success');
  3682. }, function () {
  3683. /* clipboard write failed */
  3684. utils_log.pretty('[错误] ', '浏览器不支持', 'danger');
  3685. });
  3686. emit('onNodeCopy', copyText.value);
  3687. }
  3688. });
  3689. }
  3690. function handleAdd() {
  3691. if (defaultProps.nodeAdd) {
  3692. defaultProps.nodeAdd(defaultProps.node.$$data);
  3693. return;
  3694. }
  3695. const {
  3696. id,
  3697. pid,
  3698. label,
  3699. expand,
  3700. children
  3701. } = defaultProps.props;
  3702. const {
  3703. node
  3704. } = defaultProps;
  3705. const json = {
  3706. [id]: String(new Date().getTime()),
  3707. [pid]: node.id,
  3708. [label]: '',
  3709. [expand]: false,
  3710. [children]: [],
  3711. newNode: true,
  3712. focused: true
  3713. };
  3714. if (Array.isArray(node.children)) {
  3715. node.$$data[children].push(json);
  3716. } else {
  3717. node.$$data[children] = [json];
  3718. }
  3719. emit('onNodeFocus', json);
  3720. }
  3721. function handleEdit() {
  3722. const {
  3723. nodeEdit,
  3724. node
  3725. } = defaultProps;
  3726. if (nodeEdit) {
  3727. nodeEdit(node.$$data);
  3728. return;
  3729. }
  3730. node.$$focused = true;
  3731. emit('onNodeFocus', node.$$data);
  3732. }
  3733. function handleClose(e) {
  3734. if (defaultProps.modelValue) {
  3735. if (refs.eleRef.value && refs.eleRef.value.contains(e.target)) {
  3736. return false;
  3737. }
  3738. emit('update:modelValue', false);
  3739. }
  3740. }
  3741. function afterEnter() {
  3742. emit('opened');
  3743. }
  3744. function afterLeave() {
  3745. emit('closed');
  3746. }
  3747. const position = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  3748. return {
  3749. left: `${defaultProps.x}px`,
  3750. top: `${defaultProps.y}px`
  3751. };
  3752. });
  3753. const editable = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  3754. return !defaultProps.disabled && !defaultProps.node.disabled;
  3755. }); // mounted
  3756. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(() => {
  3757. document.addEventListener('mousedown', handleClose);
  3758. });
  3759. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUnmounted"])(() => {
  3760. document.removeEventListener('mousedown', handleClose);
  3761. });
  3762. return {
  3763. position,
  3764. editable,
  3765. handleMenu,
  3766. handleEdit,
  3767. handleClose,
  3768. afterEnter,
  3769. afterLeave
  3770. };
  3771. };
  3772. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenus.ts
  3773. const contextmenuProps = buildProps({
  3774. modelValue: {
  3775. type: Boolean,
  3776. required: true
  3777. },
  3778. data: {
  3779. type: Object,
  3780. required: true
  3781. },
  3782. node: {
  3783. type: definePropType(Object),
  3784. required: true
  3785. },
  3786. props: {
  3787. type: definePropType(Object)
  3788. },
  3789. x: Number,
  3790. y: Number,
  3791. menus: {
  3792. type: definePropType(Array)
  3793. },
  3794. nodeAdd: Function,
  3795. nodeDelete: Function,
  3796. nodeEdit: Function,
  3797. nodeCopy: Function,
  3798. disabled: Boolean
  3799. });
  3800. const contextmenuEmits = {
  3801. onNodeDelete: (data, node) => isObject(data) && isObject(node),
  3802. onNodeCopy: str => isString(str),
  3803. contextmenu: arg => isObject(arg),
  3804. onNodeFocus: data => isObject(data),
  3805. opened: () => true,
  3806. closed: () => true,
  3807. 'update:modelValue': value => typeof value === 'boolean'
  3808. };
  3809. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/contextmenu/src/contextmenu.vue?vue&type=script&lang=ts
  3810. /* harmony default export */ var contextmenuvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  3811. name: 'Contextmenu',
  3812. props: contextmenuProps,
  3813. emits: contextmenuEmits,
  3814. setup(props, ctx) {
  3815. const inputRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  3816. const eleRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  3817. const copyText = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])('');
  3818. const oldData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({});
  3819. const contextmenu = useContextmenu(props, ctx, {
  3820. inputRef,
  3821. eleRef
  3822. });
  3823. return {
  3824. eleRef,
  3825. inputRef,
  3826. copyText,
  3827. oldData,
  3828. ...contextmenu
  3829. };
  3830. }
  3831. }));
  3832. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenu.vue?vue&type=script&lang=ts
  3833. // CONCATENATED MODULE: ./src/components/contextmenu/src/contextmenu.vue
  3834. const contextmenu_exports_ = /*#__PURE__*/exportHelper_default()(contextmenuvue_type_script_lang_ts, [['render',contextmenuvue_type_template_id_c9139626_ts_true_render]])
  3835. /* harmony default export */ var src_contextmenu = (contextmenu_exports_);
  3836. // CONCATENATED MODULE: ./src/components/contextmenu/index.ts
  3837. /* harmony default export */ var components_contextmenu = (src_contextmenu);
  3838. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.ts
  3839. const menus = [{
  3840. name: '复制文本',
  3841. command: 'copy'
  3842. }, {
  3843. name: '新增节点',
  3844. command: 'add'
  3845. }, {
  3846. name: '编辑节点',
  3847. command: 'edit'
  3848. }, {
  3849. name: '删除节点',
  3850. command: 'delete'
  3851. }];
  3852. const treeProps = buildProps({
  3853. data: {
  3854. type: Object,
  3855. required: true
  3856. },
  3857. center: Boolean,
  3858. props: {
  3859. type: definePropType(Object),
  3860. default: () => ({
  3861. id: 'id',
  3862. pid: 'pid',
  3863. label: 'label',
  3864. expand: 'expand',
  3865. children: 'children'
  3866. })
  3867. },
  3868. toolBar: {
  3869. type: [Object, Boolean],
  3870. default: () => ({
  3871. expand: true,
  3872. scale: true,
  3873. zoom: true,
  3874. restore: true,
  3875. fullscreen: true
  3876. })
  3877. },
  3878. disabled: {
  3879. // 是否禁用编辑
  3880. type: Boolean,
  3881. default: false
  3882. },
  3883. scalable: {
  3884. // 是否可缩放
  3885. type: Boolean,
  3886. default: true
  3887. },
  3888. draggable: {
  3889. // 是否可拖拽移动位置
  3890. type: Boolean,
  3891. default: true
  3892. },
  3893. draggableOnNode: {
  3894. // 是否可拖拽节点移动位置
  3895. type: Boolean,
  3896. default: false
  3897. },
  3898. nodeDraggable: {
  3899. // 节点是否可拖拽
  3900. type: Boolean,
  3901. default: true
  3902. },
  3903. cloneNodeDrag: {
  3904. // 拷贝并拖拽节点
  3905. type: Boolean,
  3906. default: true
  3907. },
  3908. onlyOneNode: {
  3909. // 是否仅拖动当前节点
  3910. type: Boolean,
  3911. default: true
  3912. },
  3913. clickDelay: {
  3914. // 是否仅拖动当前节点
  3915. type: Number,
  3916. default: 260
  3917. },
  3918. lazy: Boolean,
  3919. load: {
  3920. type: definePropType(Function)
  3921. },
  3922. defaultExpandLevel: Number,
  3923. defaultExpandKeys: {
  3924. type: Array,
  3925. default() {
  3926. return [];
  3927. }
  3928. },
  3929. beforeDragEnd: Function,
  3930. horizontal: Boolean,
  3931. selectedKey: {
  3932. type: [Array, String, Number]
  3933. },
  3934. collapsable: Boolean,
  3935. renderContent: Function,
  3936. labelStyle: Object,
  3937. labelClassName: {
  3938. type: [Function, String]
  3939. },
  3940. selectedClassName: {
  3941. type: [Function, String]
  3942. },
  3943. defineMenus: {
  3944. type: definePropType([Array, Function]),
  3945. default() {
  3946. return menus;
  3947. }
  3948. },
  3949. nodeAdd: Function,
  3950. nodeDelete: Function,
  3951. nodeEdit: Function,
  3952. nodeCopy: Function,
  3953. filterNodeMethod: Function
  3954. });
  3955. const treeEmits = {
  3956. 'on-drag': ({
  3957. x,
  3958. y
  3959. }) => isNumber(x) && isNumber(y),
  3960. 'on-drag-stop': ({
  3961. x,
  3962. y
  3963. }) => isNumber(x) && isNumber(y),
  3964. 'on-restore': () => true,
  3965. 'on-zoom': val => isNumber(val),
  3966. 'on-expand': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3967. 'on-expand-all': bool => typeof bool === 'boolean',
  3968. 'on-node-blur': (e, data, node) => e instanceof FocusEvent && isObject(node) && isObject(data),
  3969. 'on-node-click': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3970. 'on-node-dblclick': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3971. 'on-node-mouseenter': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3972. 'on-node-mouseleave': (e, data, node) => e instanceof MouseEvent && isObject(node) && isObject(data),
  3973. 'on-contextmenu': data => isObject(data),
  3974. 'on-node-copy': str => isString(str),
  3975. 'on-node-delete': node => isObject(node),
  3976. 'on-node-drag-start': node => isObject(node),
  3977. 'on-node-drag': node => isObject(node),
  3978. 'on-node-drag-end': (node, targetNode) => isObject(node) && isObject(targetNode),
  3979. 'on-node-focus': (e, data, node) => e instanceof FocusEvent && isObject(node) && isObject(data)
  3980. };
  3981. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
  3982. var es_error_cause = __webpack_require__("d9e2");
  3983. // CONCATENATED MODULE: ./src/components/tree-org/src/use-tree.ts
  3984. const useTree = (props, {
  3985. emit
  3986. }, refs) => {
  3987. const left = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3988. const top = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  3989. const autoDragging = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  3990. function onDrag(x, y) {
  3991. stopClick.set(true);
  3992. autoDragging.value = false;
  3993. left.value = x;
  3994. top.value = y;
  3995. emit('on-drag', {
  3996. x,
  3997. y
  3998. });
  3999. }
  4000. function preventOutOfBounds(x, y) {
  4001. const zoom = refs.zoomRef.value;
  4002. const orgchart = refs.treeRef.value;
  4003. let maxX = zoom.clientWidth / 2;
  4004. const maxY = zoom.clientHeight / 2;
  4005. let minY = zoom.clientHeight - orgchart.clientHeight;
  4006. let minX = zoom.clientWidth - orgchart.clientWidth;
  4007. if (minY > 0) {
  4008. minY = 0;
  4009. }
  4010. if (minX > 0) {
  4011. minX = 0;
  4012. }
  4013. if (props.center) {
  4014. const deviation = (zoom.clientWidth - orgchart.clientWidth) / 2;
  4015. minX = minX - deviation;
  4016. maxX = maxX - deviation; // console.log(props.center, minX, 38)
  4017. }
  4018. if (x > maxX) {
  4019. left.value = maxX;
  4020. } else if (x < minX) {
  4021. left.value = minX;
  4022. } else {
  4023. left.value = x;
  4024. }
  4025. if (y < minY) {
  4026. top.value = minY;
  4027. } else if (y > maxY) {
  4028. top.value = maxY;
  4029. } else {
  4030. top.value = y;
  4031. }
  4032. }
  4033. function onDragStop(x, y) {
  4034. preventOutOfBounds(x, y);
  4035. setTimeout(() => {
  4036. stopClick.set(false);
  4037. }, 200);
  4038. emit('on-drag-stop', {
  4039. x,
  4040. y
  4041. });
  4042. }
  4043. const nodeMoving = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4044. const parenNode = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
  4045. value: {}
  4046. });
  4047. function nodeMouseenter(e, node) {
  4048. if (nodeMoving.value) {
  4049. parenNode.value = node;
  4050. }
  4051. emit('on-node-mouseenter', e, node.$$data, node);
  4052. return true;
  4053. }
  4054. function nodeMouseleave(e, node) {
  4055. if (nodeMoving.value) {
  4056. parenNode.value = null;
  4057. }
  4058. emit('on-node-mouseleave', e, node.$$data, node);
  4059. return true;
  4060. }
  4061. const contextmenu = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4062. const menuX = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  4063. const menuY = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(0);
  4064. const menuData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])({});
  4065. const nodeMenus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
  4066. function nodeContextmenu(e, node) {
  4067. e.stopPropagation();
  4068. e.preventDefault();
  4069. const {
  4070. defineMenus
  4071. } = props;
  4072. if (Array.isArray(defineMenus)) {
  4073. nodeMenus.value = defineMenus;
  4074. } else if (typeof defineMenus === 'function') {
  4075. nodeMenus.value = defineMenus(e, node) || [];
  4076. }
  4077. contextmenu.value = true;
  4078. menuX.value = e.clientX;
  4079. menuY.value = e.clientY;
  4080. menuData.value = node;
  4081. }
  4082. const scale = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(1);
  4083. function zoomWheel(e) {
  4084. if (!props.scalable) return;
  4085. e.preventDefault(); // 鼠标滚轮缩放
  4086. if (e.deltaY < 0) {
  4087. zoomOrgchart(0.1);
  4088. } else {
  4089. zoomOrgchart(-0.1);
  4090. }
  4091. emit('on-zoom', scale.value);
  4092. }
  4093. function zoomOrgchart(zoom) {
  4094. if (!props.scalable) return;
  4095. const value = Number((Number(scale.value) + zoom).toFixed(1));
  4096. if (zoom > 0) {
  4097. scale.value = Math.min(3, value);
  4098. } else {
  4099. scale.value = Math.max(0.3, value);
  4100. }
  4101. }
  4102. function restoreOrgchart() {
  4103. scale.value = 1;
  4104. left.value = 0;
  4105. top.value = 0;
  4106. emit('on-restore');
  4107. }
  4108. function autoDrag(el, lf, tp) {
  4109. // 计算偏移量,保持根节点相对页面位置不变
  4110. autoDragging.value = true;
  4111. console.log(props.center, props.horizontal, el.offsetLeft, lf);
  4112. if (!props.center || props.horizontal) {
  4113. const x = el.offsetLeft - lf;
  4114. left.value -= x;
  4115. }
  4116. const y = el.offsetTop - tp;
  4117. top.value -= y;
  4118. preventOutOfBounds(left.value, top.value);
  4119. }
  4120. let timer;
  4121. function handleClick(e, node) {
  4122. // 由于鼠标事件执行顺序
  4123. // mouseover--> mousedown-->mouseup-->click -->mouseout
  4124. // 拖拽时会触发node-click
  4125. // 通过 stopClick 判断,如果执行了拖拽,则不再执行node-click
  4126. if (stopClick.get()) return; // 取消上次延时未执行的方法
  4127. clearTimeout(timer); // 执行延时
  4128. timer = setTimeout(() => {
  4129. // 此处为单击事件要执行的代码
  4130. emit('on-node-click', e, node.$$data, node);
  4131. }, props.clickDelay);
  4132. }
  4133. function handleDblclick(e, node) {
  4134. // 取消上次延时未执行的方法
  4135. clearTimeout(timer); // 此处为单击事件要执行的代码
  4136. emit('on-node-dblclick', e, node.$$data, node);
  4137. }
  4138. function handleExpand(e, node) {
  4139. e.stopPropagation();
  4140. const el = document.querySelector(`.is-root_${suffix}`);
  4141. if (el) {
  4142. const left = el.offsetLeft;
  4143. const top = el.offsetTop;
  4144. node.expand = !node.expand;
  4145. let needMove = true;
  4146. if (node.expand) {
  4147. expandedKeys.add(node.id);
  4148. if (props.lazy && props.load) {
  4149. needMove = false;
  4150. loadData(node, props.load, () => {
  4151. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4152. autoDrag(el, left, top);
  4153. });
  4154. });
  4155. }
  4156. } else if (!node.expand && node.children) {
  4157. expandedKeys.delete(node.id);
  4158. collapse(node.children);
  4159. }
  4160. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4161. needMove && autoDrag(el, left, top);
  4162. });
  4163. emit('on-expand', e, node.$$data, node);
  4164. }
  4165. }
  4166. function loadData(node, load, cb) {
  4167. load(node, (data, auto) => {
  4168. const {
  4169. children
  4170. } = keys;
  4171. node.isLeaf = !data.length;
  4172. if (data.length) {
  4173. node.$$data[children] = data;
  4174. auto && cb();
  4175. }
  4176. });
  4177. }
  4178. function filter(value) {
  4179. const filterNodeMethod = props.filterNodeMethod;
  4180. if (!filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
  4181. const traverse = function (node) {
  4182. const childNodes = node.children || [];
  4183. childNodes.forEach(child => {
  4184. child.$$hidden = !filterNodeMethod.call(child, value, child);
  4185. traverse(child);
  4186. });
  4187. if (node.$$hidden && childNodes.length) {
  4188. let unHidden = true;
  4189. unHidden = childNodes.some(child => !child.$$hidden);
  4190. node.$$hidden = !unHidden;
  4191. }
  4192. if (!value) return;
  4193. if (!node.$$hidden && node.children) node.expand = true;
  4194. };
  4195. traverse(treeData.value);
  4196. }
  4197. const keys = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])(Object.assign({
  4198. id: 'id',
  4199. pid: 'pid',
  4200. label: 'label',
  4201. expand: 'expand',
  4202. children: 'children',
  4203. isLeaf: 'isLeaf'
  4204. }, props.props));
  4205. function handleFocus(e, data, node) {
  4206. emit('on-node-focus', e, data, node);
  4207. }
  4208. function handleBlur(e, data, node) {
  4209. const {
  4210. id,
  4211. label
  4212. } = keys;
  4213. const childNodes = menuData.value.children || [];
  4214. for (let i = childNodes.length; i > 0; i--) {
  4215. const item = childNodes[i - 1];
  4216. if (item[id] === '' && item[label] === '') {
  4217. childNodes.splice(i - 1, 1);
  4218. break;
  4219. }
  4220. }
  4221. emit('on-node-blur', e, data, node);
  4222. }
  4223. const fullscreen = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4224. function handleFullscreen(e) {
  4225. fullscreen.value = !fullscreen.value;
  4226. if (e === 'esc') {
  4227. return;
  4228. }
  4229. if (fullscreen.value) {
  4230. launchIntoFullscreen();
  4231. } else {
  4232. exitFullscreen();
  4233. }
  4234. }
  4235. function launchIntoFullscreen() {
  4236. // 全屏
  4237. const element = refs.eleRef.value;
  4238. if (element.requestFullscreen) {
  4239. element.requestFullscreen();
  4240. }
  4241. }
  4242. function exitFullscreen() {
  4243. // 退出全屏
  4244. if (document.exitFullscreen) {
  4245. document.exitFullscreen();
  4246. }
  4247. }
  4248. function collapse(list) {
  4249. list.forEach(child => {
  4250. if (child.expand) {
  4251. child.expand = false;
  4252. expandedKeys.delete(child.id);
  4253. }
  4254. child.children && collapse(child.children);
  4255. });
  4256. }
  4257. const expanded = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
  4258. function expandChange() {
  4259. expanded.value = !expanded.value;
  4260. if (!expanded.value) {
  4261. expandedKeys.clear();
  4262. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4263. onDragStop(left.value, top.value);
  4264. });
  4265. }
  4266. toggleExpand(treeData.value, expanded.value);
  4267. emit('on-expand-all', expanded.value);
  4268. }
  4269. function toggleExpand(data, val) {
  4270. if (Array.isArray(data)) {
  4271. data.forEach(item => {
  4272. if (val) {
  4273. expandedKeys.add(item.id);
  4274. }
  4275. item.expand = val;
  4276. if (val) {
  4277. expandedKeys.add(item.id);
  4278. }
  4279. if (item.children) {
  4280. toggleExpand(item.children, val);
  4281. }
  4282. });
  4283. } else {
  4284. if (val) {
  4285. expandedKeys.add(data.id);
  4286. }
  4287. data.expand = val;
  4288. if (val) {
  4289. expandedKeys.add(data.id);
  4290. }
  4291. if (data.children) {
  4292. toggleExpand(data.children, val);
  4293. }
  4294. }
  4295. }
  4296. function setData(data) {
  4297. treeData.value = initNodes(data);
  4298. }
  4299. const zoomStyle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4300. return {
  4301. width: `${100 / scale.value}%`,
  4302. height: `${100 / scale.value}%`,
  4303. transform: `scale(${scale.value})`
  4304. };
  4305. });
  4306. const zoomPercent = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4307. return `${Math.round(scale.value * 100)}%`;
  4308. });
  4309. const dragCancel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4310. return props.draggableOnNode && !props.nodeDraggable ? '' : `.tree-org-node__content:not(.is-root_${suffix})>.tree-org-node__inner`;
  4311. });
  4312. const expandTitle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4313. return expanded.value ? '收起全部节点' : '展开全部节点';
  4314. });
  4315. const fullTiltle = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4316. return expanded.value ? '收起全部节点' : '展开全部节点';
  4317. });
  4318. const cloneData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])({});
  4319. const nodeargs = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(() => {
  4320. const {
  4321. cloneNodeDrag,
  4322. onlyOneNode,
  4323. data
  4324. } = props;
  4325. return {
  4326. drag: props.nodeDraggable,
  4327. dragData: {
  4328. keys,
  4329. nodeMoving,
  4330. stopClick: stopClick,
  4331. parenNode,
  4332. cloneNodeDrag,
  4333. onlyOneNode,
  4334. contextmenu,
  4335. cloneData,
  4336. data
  4337. },
  4338. beforeDragEnd: props.beforeDragEnd,
  4339. initNodes: initNodes,
  4340. emit: emit
  4341. };
  4342. });
  4343. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.horizontal, () => {
  4344. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(() => {
  4345. onDragStop(left.value, top.value);
  4346. });
  4347. });
  4348. let expandedKeys = new Set(props.defaultExpandKeys);
  4349. function getExpandKeys() {
  4350. return [...expandedKeys];
  4351. }
  4352. function setExpandKeys(keys) {
  4353. expandedKeys = new Set(keys);
  4354. setData(props.data);
  4355. }
  4356. function initNodes(nodeData) {
  4357. const {
  4358. defaultExpandLevel = 0
  4359. } = props;
  4360. const data2node = (data, level) => {
  4361. const {
  4362. id,
  4363. label,
  4364. pid,
  4365. expand,
  4366. children,
  4367. isLeaf
  4368. } = keys;
  4369. const cloneData = {};
  4370. Object.keys(data).map(key => {
  4371. if (['hidden', 'disabled', 'className', 'style'].includes(key)) {
  4372. cloneData[key] = data[key];
  4373. }
  4374. });
  4375. const childNodes = data[children];
  4376. const childLevel = level + 1;
  4377. const _expand = data[expand];
  4378. const _id = data[id];
  4379. if (_expand) {
  4380. expandedKeys.add(_id);
  4381. } else if (_expand === undefined && level < defaultExpandLevel) {
  4382. expandedKeys.add(_id);
  4383. }
  4384. return { ...cloneData,
  4385. id: _id,
  4386. label: data[label],
  4387. pid: data[pid],
  4388. expand: expandedKeys.has(_id),
  4389. children: childNodes ? childNodes.map(child => {
  4390. return data2node(child, childLevel);
  4391. }) : undefined,
  4392. isLeaf: data[isLeaf],
  4393. $$level: level,
  4394. $$data: data,
  4395. $$focused: data.focused || false
  4396. };
  4397. };
  4398. return data2node(nodeData, 0);
  4399. }
  4400. const treeData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(initNodes(props.data));
  4401. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(() => props.data, (newVal, oldVal) => {
  4402. if (newVal !== oldVal) {
  4403. expandedKeys = new Set(props.defaultExpandKeys);
  4404. }
  4405. setData(props.data);
  4406. }, {
  4407. deep: true
  4408. });
  4409. const tools = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
  4410. visible: true,
  4411. data: {
  4412. expand: true,
  4413. scale: true,
  4414. zoom: true,
  4415. restore: true,
  4416. fullscreen: true
  4417. }
  4418. });
  4419. Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeMount"])(() => {
  4420. if (typeof props.toolBar === 'object') {
  4421. Object.assign(tools.data, props.toolBar);
  4422. } else if (!props.toolBar) {
  4423. tools.visible = false;
  4424. }
  4425. });
  4426. const suffix = randomString(6);
  4427. return {
  4428. keys,
  4429. left,
  4430. top,
  4431. menuX,
  4432. menuY,
  4433. suffix,
  4434. nodeMoving,
  4435. zoomStyle,
  4436. tools,
  4437. zoomPercent,
  4438. dragCancel,
  4439. expandTitle,
  4440. fullTiltle,
  4441. nodeargs,
  4442. expanded,
  4443. fullscreen,
  4444. treeData,
  4445. autoDragging,
  4446. contextmenu,
  4447. nodeMenus,
  4448. menuData,
  4449. cloneData,
  4450. filter,
  4451. setData,
  4452. zoomWheel,
  4453. onDrag,
  4454. onDragStop,
  4455. expandChange,
  4456. handleFullscreen,
  4457. zoomOrgchart,
  4458. restoreOrgchart,
  4459. handleExpand,
  4460. getExpandKeys,
  4461. setExpandKeys,
  4462. nodeMouseenter,
  4463. nodeMouseleave,
  4464. nodeContextmenu,
  4465. handleFocus,
  4466. handleBlur,
  4467. handleClick,
  4468. handleDblclick
  4469. };
  4470. };
  4471. // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/tree-org/src/tree.vue?vue&type=script&lang=ts
  4472. /* harmony default export */ var treevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
  4473. name: 'vue3TreeOrg',
  4474. components: {
  4475. Tools: components_tools,
  4476. CloneOrg: components_clone_org,
  4477. Draggable: components_draggable,
  4478. Contextmenu: components_contextmenu,
  4479. TreeOrgNode: components_node
  4480. },
  4481. directives: {
  4482. nodedrag: directives_drag
  4483. },
  4484. props: treeProps,
  4485. emits: treeEmits,
  4486. setup(props, ctx) {
  4487. const defaultSlot = !!ctx.slots.default;
  4488. const expandSlot = !!ctx.slots.expand;
  4489. const eleRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  4490. const treeRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  4491. const zoomRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
  4492. const treeOrg = useTree(props, ctx, {
  4493. eleRef,
  4494. treeRef,
  4495. zoomRef
  4496. });
  4497. return {
  4498. eleRef,
  4499. treeRef,
  4500. zoomRef,
  4501. defaultSlot,
  4502. expandSlot,
  4503. ...treeOrg
  4504. };
  4505. }
  4506. }));
  4507. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.vue?vue&type=script&lang=ts
  4508. // CONCATENATED MODULE: ./src/components/tree-org/src/tree.vue
  4509. const tree_exports_ = /*#__PURE__*/exportHelper_default()(treevue_type_script_lang_ts, [['render',render]])
  4510. /* harmony default export */ var tree = (tree_exports_);
  4511. // CONCATENATED MODULE: ./src/components/tree-org/index.ts
  4512. /* istanbul ignore next */
  4513. tree.install = function (app) {
  4514. app.component(tree.name, tree);
  4515. };
  4516. /* harmony default export */ var tree_org = (tree);
  4517. // CONCATENATED MODULE: ./src/index.ts
  4518. // 核心插件
  4519. // 组件
  4520. // import '@/styles/index.scss'
  4521. const components = [tree_org];
  4522. const install = function (app) {
  4523. components.forEach(component => {
  4524. app.component(component.name, component);
  4525. });
  4526. app.use(core);
  4527. };
  4528. /* harmony default export */ var src_0 = ({
  4529. install,
  4530. Vue3TreeOrg: tree_org
  4531. });
  4532. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  4533. /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (src_0);
  4534. /***/ }),
  4535. /***/ "fc6a":
  4536. /***/ (function(module, exports, __webpack_require__) {
  4537. // toObject with fallback for non-array-like ES3 strings
  4538. var IndexedObject = __webpack_require__("44ad");
  4539. var requireObjectCoercible = __webpack_require__("1d80");
  4540. module.exports = function (it) {
  4541. return IndexedObject(requireObjectCoercible(it));
  4542. };
  4543. /***/ }),
  4544. /***/ "fdbf":
  4545. /***/ (function(module, exports, __webpack_require__) {
  4546. /* eslint-disable es-x/no-symbol -- required for testing */
  4547. var NATIVE_SYMBOL = __webpack_require__("4930");
  4548. module.exports = NATIVE_SYMBOL
  4549. && !Symbol.sham
  4550. && typeof Symbol.iterator == 'symbol';
  4551. /***/ })
  4552. /******/ });
  4553. });
  4554. //# sourceMappingURL=vue3-tree-org.umd.js.map