vconsole.min.js 149 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746
  1. /*!
  2. * vConsole v3.2.0 (https://github.com/Tencent/vConsole)
  3. *
  4. * Tencent is pleased to support the open source community by making vConsole available.
  5. * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
  6. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
  7. * http://opensource.org/licenses/MIT
  8. * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  9. */
  10. !(function(e, t) {
  11. "object" == typeof exports && "object" == typeof module
  12. ? (module.exports = t())
  13. : "function" == typeof define && define.amd
  14. ? define([], t)
  15. : "object" == typeof exports
  16. ? (exports.VConsole = t())
  17. : (e.VConsole = t());
  18. })(this, function() {
  19. return (function(e) {
  20. function t(n) {
  21. if (o[n]) return o[n].exports;
  22. var i = (o[n] = { exports: {}, id: n, loaded: !1 });
  23. return e[n].call(i.exports, i, i.exports, t), (i.loaded = !0), i.exports;
  24. }
  25. var o = {};
  26. return (t.m = e), (t.c = o), (t.p = ""), t(0);
  27. })([
  28. function(e, t, o) {
  29. "use strict";
  30. function n(e) {
  31. return e && e.__esModule ? e : { default: e };
  32. }
  33. Object.defineProperty(t, "__esModule", { value: !0 }), o(1);
  34. var i = o(2),
  35. a = n(i),
  36. r = o(18),
  37. l = n(r);
  38. (a["default"].VConsolePlugin = l["default"]),
  39. (t["default"] = a["default"]),
  40. (e.exports = t["default"]);
  41. },
  42. function(e, t) {
  43. "use strict";
  44. if ("undefined" == typeof Symbol) {
  45. window.Symbol = function() {};
  46. var o = "__symbol_iterator_key";
  47. (window.Symbol.iterator = o),
  48. (Array.prototype[o] = function() {
  49. var e = this,
  50. t = 0;
  51. return {
  52. next: function() {
  53. return {
  54. done: e.length === t,
  55. value: e.length === t ? void 0 : e[t++]
  56. };
  57. }
  58. };
  59. });
  60. }
  61. },
  62. function(e, t, o) {
  63. "use strict";
  64. function n(e) {
  65. if (e && e.__esModule) return e;
  66. var t = {};
  67. if (null != e)
  68. for (var o in e)
  69. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  70. return (t["default"] = e), t;
  71. }
  72. function i(e) {
  73. return e && e.__esModule ? e : { default: e };
  74. }
  75. function a(e, t) {
  76. if (!(e instanceof t))
  77. throw new TypeError("Cannot call a class as a function");
  78. }
  79. Object.defineProperty(t, "__esModule", { value: !0 });
  80. var r = (function() {
  81. function e(e, t) {
  82. for (var o = 0; o < t.length; o++) {
  83. var n = t[o];
  84. (n.enumerable = n.enumerable || !1),
  85. (n.configurable = !0),
  86. "value" in n && (n.writable = !0),
  87. Object.defineProperty(e, n.key, n);
  88. }
  89. }
  90. return function(t, o, n) {
  91. return o && e(t.prototype, o), n && e(t, n), t;
  92. };
  93. })(),
  94. l = o(3),
  95. c = i(l),
  96. s = o(4),
  97. d = n(s),
  98. u = o(5),
  99. v = i(u);
  100. o(7);
  101. var f = o(11),
  102. p = i(f),
  103. h = o(12),
  104. g = i(h),
  105. b = o(13),
  106. m = i(b),
  107. y = o(14),
  108. _ = i(y),
  109. w = o(15),
  110. x = i(w),
  111. k = o(16),
  112. C = i(k),
  113. T = o(24),
  114. O = i(T),
  115. E = o(26),
  116. S = i(E),
  117. L = o(30),
  118. j = i(L),
  119. N = o(37),
  120. P = i(N),
  121. M = "#__vconsole",
  122. A = (function() {
  123. function e(t) {
  124. if ((a(this, e), v["default"].one(M)))
  125. return void console.debug("vConsole is already exists.");
  126. var o = this;
  127. if (
  128. ((this.version = c["default"].version),
  129. (this.$dom = null),
  130. (this.isInited = !1),
  131. (this.option = {
  132. defaultPlugins: ["system", "network", "element", "storage"]
  133. }),
  134. (this.activedTab = ""),
  135. (this.tabList = []),
  136. (this.pluginList = {}),
  137. (this.switchPos = {
  138. x: 10,
  139. y: 10,
  140. startX: 0,
  141. startY: 0,
  142. endX: 0,
  143. endY: 0
  144. }),
  145. (this.tool = d),
  146. (this.$ = v["default"]),
  147. d.isObject(t))
  148. )
  149. for (var n in t) this.option[n] = t[n];
  150. this._addBuiltInPlugins();
  151. var i = function() {
  152. o.isInited ||
  153. (o._render(), o._mockTap(), o._bindEvent(), o._autoRun());
  154. };
  155. void 0 !== document
  156. ? "complete" == document.readyState
  157. ? i()
  158. : v["default"].bind(window, "load", i)
  159. : !(function() {
  160. var e = void 0,
  161. t = function o() {
  162. document && "complete" == document.readyState
  163. ? (e && clearTimeout(e), i())
  164. : (e = setTimeout(o, 1));
  165. };
  166. e = setTimeout(t, 1);
  167. })();
  168. }
  169. return (
  170. r(e, [
  171. {
  172. key: "_addBuiltInPlugins",
  173. value: function() {
  174. this.addPlugin(new C["default"]("default", "Log"));
  175. var e = this.option.defaultPlugins,
  176. t = {
  177. system: { proto: O["default"], name: "System" },
  178. network: { proto: S["default"], name: "Network" },
  179. element: { proto: j["default"], name: "Element" },
  180. storage: { proto: P["default"], name: "Storage" }
  181. };
  182. if (e && d.isArray(e))
  183. for (var o = 0; o < e.length; o++) {
  184. var n = t[e[o]];
  185. n
  186. ? this.addPlugin(new n.proto(e[o], n.name))
  187. : console.debug(
  188. "Unrecognized default plugin ID:",
  189. e[o]
  190. );
  191. }
  192. }
  193. },
  194. {
  195. key: "_render",
  196. value: function() {
  197. if (!v["default"].one(M)) {
  198. var e = document.createElement("div");
  199. (e.innerHTML = p["default"]),
  200. document.documentElement.insertAdjacentElement(
  201. "beforeend",
  202. e.children[0]
  203. );
  204. }
  205. this.$dom = v["default"].one(M);
  206. var t = v["default"].one(".vc-switch", this.$dom),
  207. o = 1 * d.getStorage("switch_x"),
  208. n = 1 * d.getStorage("switch_y");
  209. (o || n) &&
  210. (o + t.offsetWidth > document.documentElement.offsetWidth &&
  211. (o =
  212. document.documentElement.offsetWidth - t.offsetWidth),
  213. n + t.offsetHeight >
  214. document.documentElement.offsetHeight &&
  215. (n =
  216. document.documentElement.offsetHeight - t.offsetHeight),
  217. 0 > o && (o = 0),
  218. 0 > n && (n = 0),
  219. (this.switchPos.x = o),
  220. (this.switchPos.y = n),
  221. (v["default"].one(".vc-switch").style.right = o + "px"),
  222. (v["default"].one(".vc-switch").style.bottom = n + "px"));
  223. var i = window.devicePixelRatio || 1,
  224. a = document.querySelector('[name="viewport"]');
  225. if (a && a.content) {
  226. var r = a.content.match(/initial\-scale\=\d+(\.\d+)?/),
  227. l = r ? parseFloat(r[0].split("=")[1]) : 1;
  228. 1 > l && (this.$dom.style.fontSize = 13 * i + "px");
  229. }
  230. v["default"].one(".vc-mask", this.$dom).style.display =
  231. "none";
  232. }
  233. },
  234. {
  235. key: "_mockTap",
  236. value: function() {
  237. var e = 700,
  238. t = 10,
  239. o = void 0,
  240. n = void 0,
  241. i = void 0,
  242. a = !1,
  243. r = null;
  244. this.$dom.addEventListener(
  245. "touchstart",
  246. function(e) {
  247. if (void 0 === o) {
  248. var t = e.targetTouches[0];
  249. (n = t.pageX),
  250. (i = t.pageY),
  251. (o = e.timeStamp),
  252. (r =
  253. e.target.nodeType === Node.TEXT_NODE
  254. ? e.target.parentNode
  255. : e.target);
  256. }
  257. },
  258. !1
  259. ),
  260. this.$dom.addEventListener("touchmove", function(e) {
  261. var o = e.changedTouches[0];
  262. (Math.abs(o.pageX - n) > t ||
  263. Math.abs(o.pageY - i) > t) &&
  264. (a = !0);
  265. }),
  266. this.$dom.addEventListener(
  267. "touchend",
  268. function(t) {
  269. if (a === !1 && t.timeStamp - o < e && null != r) {
  270. var n = r.tagName.toLowerCase(),
  271. i = !1;
  272. switch (n) {
  273. case "textarea":
  274. i = !0;
  275. break;
  276. case "input":
  277. switch (r.type) {
  278. case "button":
  279. case "checkbox":
  280. case "file":
  281. case "image":
  282. case "radio":
  283. case "submit":
  284. i = !1;
  285. break;
  286. default:
  287. i = !r.disabled && !r.readOnly;
  288. }
  289. }
  290. i ? r.focus() : t.preventDefault();
  291. var l = t.changedTouches[0],
  292. c = document.createEvent("MouseEvents");
  293. c.initMouseEvent(
  294. "click",
  295. !0,
  296. !0,
  297. window,
  298. 1,
  299. l.screenX,
  300. l.screenY,
  301. l.clientX,
  302. l.clientY,
  303. !1,
  304. !1,
  305. !1,
  306. !1,
  307. 0,
  308. null
  309. ),
  310. (c.forwardedTouchEvent = !0),
  311. c.initEvent("click", !0, !0),
  312. r.dispatchEvent(c);
  313. }
  314. (o = void 0), (a = !1), (r = null);
  315. },
  316. !1
  317. );
  318. }
  319. },
  320. {
  321. key: "_bindEvent",
  322. value: function() {
  323. var e = this,
  324. t = v["default"].one(".vc-switch", e.$dom);
  325. v["default"].bind(t, "touchstart", function(t) {
  326. (e.switchPos.startX = t.touches[0].pageX),
  327. (e.switchPos.startY = t.touches[0].pageY);
  328. }),
  329. v["default"].bind(t, "touchend", function(t) {
  330. (e.switchPos.x = e.switchPos.endX),
  331. (e.switchPos.y = e.switchPos.endY),
  332. (e.switchPos.startX = 0),
  333. (e.switchPos.startY = 0),
  334. (e.switchPos.endX = 0),
  335. (e.switchPos.endY = 0),
  336. d.setStorage("switch_x", e.switchPos.x),
  337. d.setStorage("switch_y", e.switchPos.y);
  338. }),
  339. v["default"].bind(t, "touchmove", function(o) {
  340. if (o.touches.length > 0) {
  341. var n = o.touches[0].pageX - e.switchPos.startX,
  342. i = o.touches[0].pageY - e.switchPos.startY,
  343. a = e.switchPos.x - n,
  344. r = e.switchPos.y - i;
  345. a + t.offsetWidth >
  346. document.documentElement.offsetWidth &&
  347. (a =
  348. document.documentElement.offsetWidth -
  349. t.offsetWidth),
  350. r + t.offsetHeight >
  351. document.documentElement.offsetHeight &&
  352. (r =
  353. document.documentElement.offsetHeight -
  354. t.offsetHeight),
  355. 0 > a && (a = 0),
  356. 0 > r && (r = 0),
  357. (t.style.right = a + "px"),
  358. (t.style.bottom = r + "px"),
  359. (e.switchPos.endX = a),
  360. (e.switchPos.endY = r),
  361. o.preventDefault();
  362. }
  363. }),
  364. v["default"].bind(
  365. v["default"].one(".vc-switch", e.$dom),
  366. "click",
  367. function() {
  368. e.show();
  369. }
  370. ),
  371. v["default"].bind(
  372. v["default"].one(".vc-hide", e.$dom),
  373. "click",
  374. function() {
  375. e.hide();
  376. }
  377. ),
  378. v["default"].bind(
  379. v["default"].one(".vc-mask", e.$dom),
  380. "click",
  381. function(t) {
  382. return t.target != v["default"].one(".vc-mask")
  383. ? !1
  384. : void e.hide();
  385. }
  386. ),
  387. v["default"].delegate(
  388. v["default"].one(".vc-tabbar", e.$dom),
  389. "click",
  390. ".vc-tab",
  391. function(t) {
  392. var o = this.dataset.tab;
  393. o != e.activedTab && e.showTab(o);
  394. }
  395. ),
  396. v["default"].bind(
  397. v["default"].one(".vc-panel", e.$dom),
  398. "transitionend webkitTransitionEnd oTransitionEnd otransitionend",
  399. function(t) {
  400. return t.target != v["default"].one(".vc-panel")
  401. ? !1
  402. : void (
  403. v["default"].hasClass(e.$dom, "vc-toggle") ||
  404. (t.target.style.display = "none")
  405. );
  406. }
  407. );
  408. var o = v["default"].one(".vc-content", e.$dom),
  409. n = !1;
  410. v["default"].bind(o, "touchstart", function(e) {
  411. var t = o.scrollTop,
  412. i = o.scrollHeight,
  413. a = t + o.offsetHeight;
  414. 0 === t
  415. ? ((o.scrollTop = 1),
  416. 0 === o.scrollTop &&
  417. (v["default"].hasClass(e.target, "vc-cmd-input") ||
  418. (n = !0)))
  419. : a === i &&
  420. ((o.scrollTop = t - 1),
  421. o.scrollTop === t &&
  422. (v["default"].hasClass(e.target, "vc-cmd-input") ||
  423. (n = !0)));
  424. }),
  425. v["default"].bind(o, "touchmove", function(e) {
  426. n && e.preventDefault();
  427. }),
  428. v["default"].bind(o, "touchend", function(e) {
  429. n = !1;
  430. });
  431. }
  432. },
  433. {
  434. key: "_autoRun",
  435. value: function() {
  436. this.isInited = !0;
  437. for (var e in this.pluginList)
  438. this._initPlugin(this.pluginList[e]);
  439. this.tabList.length > 0 && this.showTab(this.tabList[0]),
  440. this.triggerEvent("ready");
  441. }
  442. },
  443. {
  444. key: "triggerEvent",
  445. value: function(e, t) {
  446. (e = "on" + e.charAt(0).toUpperCase() + e.slice(1)),
  447. d.isFunction(this.option[e]) &&
  448. this.option[e].apply(this, t);
  449. }
  450. },
  451. {
  452. key: "_initPlugin",
  453. value: function(e) {
  454. var t = this;
  455. (e.vConsole = this),
  456. e.trigger("init"),
  457. e.trigger("renderTab", function(o) {
  458. t.tabList.push(e.id);
  459. var n = v["default"].render(g["default"], {
  460. id: e.id,
  461. name: e.name
  462. });
  463. v["default"]
  464. .one(".vc-tabbar", t.$dom)
  465. .insertAdjacentElement("beforeend", n);
  466. var i = v["default"].render(m["default"], { id: e.id });
  467. o &&
  468. (d.isString(o)
  469. ? (i.innerHTML += o)
  470. : d.isFunction(o.appendTo)
  471. ? o.appendTo(i)
  472. : d.isElement(o) &&
  473. i.insertAdjacentElement("beforeend", o)),
  474. v["default"]
  475. .one(".vc-content", t.$dom)
  476. .insertAdjacentElement("beforeend", i);
  477. }),
  478. e.trigger("addTopBar", function(o) {
  479. if (o)
  480. for (
  481. var n = v["default"].one(".vc-topbar", t.$dom),
  482. i = function(t) {
  483. var i = o[t],
  484. a = v["default"].render(_["default"], {
  485. name: i.name || "Undefined",
  486. className: i.className || "",
  487. pluginID: e.id
  488. });
  489. if (i.data)
  490. for (var r in i.data) a.dataset[r] = i.data[r];
  491. d.isFunction(i.onClick) &&
  492. v["default"].bind(a, "click", function(t) {
  493. var o = i.onClick.call(a);
  494. o === !1 ||
  495. (v["default"].removeClass(
  496. v["default"].all(".vc-topbar-" + e.id),
  497. "vc-actived"
  498. ),
  499. v["default"].addClass(a, "vc-actived"));
  500. }),
  501. n.insertAdjacentElement("beforeend", a);
  502. },
  503. a = 0;
  504. a < o.length;
  505. a++
  506. )
  507. i(a);
  508. }),
  509. e.trigger("addTool", function(o) {
  510. if (o)
  511. for (
  512. var n = v["default"].one(".vc-tool-last", t.$dom),
  513. i = function(t) {
  514. var i = o[t],
  515. a = v["default"].render(x["default"], {
  516. name: i.name || "Undefined",
  517. pluginID: e.id
  518. });
  519. 1 == i.global &&
  520. v["default"].addClass(a, "vc-global-tool"),
  521. d.isFunction(i.onClick) &&
  522. v["default"].bind(a, "click", function(e) {
  523. i.onClick.call(a);
  524. }),
  525. n.parentNode.insertBefore(a, n);
  526. },
  527. a = 0;
  528. a < o.length;
  529. a++
  530. )
  531. i(a);
  532. }),
  533. (e.isReady = !0),
  534. e.trigger("ready");
  535. }
  536. },
  537. {
  538. key: "_triggerPluginsEvent",
  539. value: function(e) {
  540. for (var t in this.pluginList)
  541. this.pluginList[t].isReady && this.pluginList[t].trigger(e);
  542. }
  543. },
  544. {
  545. key: "_triggerPluginEvent",
  546. value: function(e, t) {
  547. var o = this.pluginList[e];
  548. o && o.isReady && o.trigger(t);
  549. }
  550. },
  551. {
  552. key: "addPlugin",
  553. value: function(e) {
  554. return void 0 !== this.pluginList[e.id]
  555. ? (console.debug(
  556. "Plugin " + e.id + " has already been added."
  557. ),
  558. !1)
  559. : ((this.pluginList[e.id] = e),
  560. this.isInited &&
  561. (this._initPlugin(e),
  562. 1 == this.tabList.length &&
  563. this.showTab(this.tabList[0])),
  564. !0);
  565. }
  566. },
  567. {
  568. key: "removePlugin",
  569. value: function(e) {
  570. e = (e + "").toLowerCase();
  571. var t = this.pluginList[e];
  572. if (void 0 === t)
  573. return (
  574. console.debug("Plugin " + e + " does not exist."), !1
  575. );
  576. if ((t.trigger("remove"), this.isInited)) {
  577. var o = v["default"].one("#__vc_tab_" + e);
  578. o && o.parentNode.removeChild(o);
  579. for (
  580. var n = v["default"].all(".vc-topbar-" + e, this.$dom),
  581. i = 0;
  582. i < n.length;
  583. i++
  584. )
  585. n[i].parentNode.removeChild(n[i]);
  586. var a = v["default"].one("#__vc_log_" + e);
  587. a && a.parentNode.removeChild(a);
  588. for (
  589. var r = v["default"].all(".vc-tool-" + e, this.$dom),
  590. l = 0;
  591. l < r.length;
  592. l++
  593. )
  594. r[l].parentNode.removeChild(r[l]);
  595. }
  596. var c = this.tabList.indexOf(e);
  597. c > -1 && this.tabList.splice(c, 1);
  598. try {
  599. delete this.pluginList[e];
  600. } catch (s) {
  601. this.pluginList[e] = void 0;
  602. }
  603. return (
  604. this.activedTab == e &&
  605. this.tabList.length > 0 &&
  606. this.showTab(this.tabList[0]),
  607. !0
  608. );
  609. }
  610. },
  611. {
  612. key: "show",
  613. value: function() {
  614. if (this.isInited) {
  615. var e = this,
  616. t = v["default"].one(".vc-panel", this.$dom);
  617. (t.style.display = "block"),
  618. setTimeout(function() {
  619. v["default"].addClass(e.$dom, "vc-toggle"),
  620. e._triggerPluginsEvent("showConsole");
  621. var t = v["default"].one(".vc-mask", e.$dom);
  622. t.style.display = "block";
  623. }, 10);
  624. }
  625. }
  626. },
  627. {
  628. key: "hide",
  629. value: function() {
  630. if (this.isInited) {
  631. v["default"].removeClass(this.$dom, "vc-toggle"),
  632. this._triggerPluginsEvent("hideConsole");
  633. var e = v["default"].one(".vc-mask", this.$dom),
  634. t = v["default"].one(".vc-panel", this.$dom);
  635. v["default"].bind(e, "transitionend", function(o) {
  636. (e.style.display = "none"), (t.style.display = "none");
  637. });
  638. }
  639. }
  640. },
  641. {
  642. key: "showSwitch",
  643. value: function() {
  644. if (this.isInited) {
  645. var e = v["default"].one(".vc-switch", this.$dom);
  646. e.style.display = "block";
  647. }
  648. }
  649. },
  650. {
  651. key: "hideSwitch",
  652. value: function() {
  653. if (this.isInited) {
  654. var e = v["default"].one(".vc-switch", this.$dom);
  655. e.style.display = "none";
  656. }
  657. }
  658. },
  659. {
  660. key: "showTab",
  661. value: function(e) {
  662. if (this.isInited) {
  663. var t = v["default"].one("#__vc_log_" + e);
  664. v["default"].removeClass(
  665. v["default"].all(".vc-tab", this.$dom),
  666. "vc-actived"
  667. ),
  668. v["default"].addClass(
  669. v["default"].one("#__vc_tab_" + e),
  670. "vc-actived"
  671. ),
  672. v["default"].removeClass(
  673. v["default"].all(".vc-logbox", this.$dom),
  674. "vc-actived"
  675. ),
  676. v["default"].addClass(t, "vc-actived");
  677. var o = v["default"].all(".vc-topbar-" + e, this.$dom);
  678. v["default"].removeClass(
  679. v["default"].all(".vc-toptab", this.$dom),
  680. "vc-toggle"
  681. ),
  682. v["default"].addClass(o, "vc-toggle"),
  683. o.length > 0
  684. ? v["default"].addClass(
  685. v["default"].one(".vc-content", this.$dom),
  686. "vc-has-topbar"
  687. )
  688. : v["default"].removeClass(
  689. v["default"].one(".vc-content", this.$dom),
  690. "vc-has-topbar"
  691. ),
  692. v["default"].removeClass(
  693. v["default"].all(".vc-tool", this.$dom),
  694. "vc-toggle"
  695. ),
  696. v["default"].addClass(
  697. v["default"].all(".vc-tool-" + e, this.$dom),
  698. "vc-toggle"
  699. ),
  700. this.activedTab &&
  701. this._triggerPluginEvent(this.activedTab, "hide"),
  702. (this.activedTab = e),
  703. this._triggerPluginEvent(this.activedTab, "show");
  704. }
  705. }
  706. },
  707. {
  708. key: "setOption",
  709. value: function(e, t) {
  710. if (d.isString(e))
  711. (this.option[e] = t),
  712. this._triggerPluginsEvent("updateOption");
  713. else if (d.isObject(e)) {
  714. for (var o in e) this.option[o] = e[o];
  715. this._triggerPluginsEvent("updateOption");
  716. } else
  717. console.debug(
  718. "The first parameter of vConsole.setOption() must be a string or an object."
  719. );
  720. }
  721. },
  722. {
  723. key: "destroy",
  724. value: function() {
  725. if (this.isInited) {
  726. for (
  727. var e = Object.keys(this.pluginList), t = e.length - 1;
  728. t >= 0;
  729. t--
  730. )
  731. this.removePlugin(e[t]);
  732. this.$dom.parentNode.removeChild(this.$dom);
  733. }
  734. }
  735. }
  736. ]),
  737. e
  738. );
  739. })();
  740. (t["default"] = A), (e.exports = t["default"]);
  741. },
  742. function(e, t) {
  743. e.exports = {
  744. name: "vconsole",
  745. version: "3.2.0",
  746. description:
  747. "A lightweight, extendable front-end developer tool for mobile web page.",
  748. homepage: "https://github.com/Tencent/vConsole",
  749. main: "dist/vconsole.min.js",
  750. scripts: { test: "mocha", dist: "webpack" },
  751. keywords: ["console", "debug", "mobile"],
  752. repository: {
  753. type: "git",
  754. url: "git+https://github.com/Tencent/vConsole.git"
  755. },
  756. dependencies: {},
  757. devDependencies: {
  758. "babel-core": "^6.7.7",
  759. "babel-loader": "^6.2.4",
  760. "babel-plugin-add-module-exports": "^0.1.4",
  761. "babel-preset-es2015": "^6.6.0",
  762. "babel-preset-stage-3": "^6.5.0",
  763. chai: "^3.5.0",
  764. "css-loader": "^0.23.1",
  765. "extract-text-webpack-plugin": "^1.0.1",
  766. "html-loader": "^0.4.3",
  767. jsdom: "^9.2.1",
  768. "json-loader": "^0.5.4",
  769. less: "^2.5.3",
  770. "less-loader": "^2.2.3",
  771. mocha: "^2.5.3",
  772. "style-loader": "^0.13.1",
  773. webpack: "~1.12.11"
  774. },
  775. author: "Tencent",
  776. license: "MIT"
  777. };
  778. },
  779. function(e, t) {
  780. "use strict";
  781. function o(e) {
  782. var t = e > 0 ? new Date(e) : new Date(),
  783. o = t.getDate() < 10 ? "0" + t.getDate() : t.getDate(),
  784. n = t.getMonth() < 9 ? "0" + (t.getMonth() + 1) : t.getMonth() + 1,
  785. i = t.getFullYear(),
  786. a = t.getHours() < 10 ? "0" + t.getHours() : t.getHours(),
  787. r = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes(),
  788. l = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds(),
  789. c =
  790. t.getMilliseconds() < 10
  791. ? "0" + t.getMilliseconds()
  792. : t.getMilliseconds();
  793. return (
  794. 100 > c && (c = "0" + c),
  795. {
  796. time: +t,
  797. year: i,
  798. month: n,
  799. day: o,
  800. hour: a,
  801. minute: r,
  802. second: l,
  803. millisecond: c
  804. }
  805. );
  806. }
  807. function n(e) {
  808. return "[object Number]" == Object.prototype.toString.call(e);
  809. }
  810. function i(e) {
  811. return "[object String]" == Object.prototype.toString.call(e);
  812. }
  813. function a(e) {
  814. return "[object Array]" == Object.prototype.toString.call(e);
  815. }
  816. function r(e) {
  817. return "[object Boolean]" == Object.prototype.toString.call(e);
  818. }
  819. function l(e) {
  820. return "[object Undefined]" == Object.prototype.toString.call(e);
  821. }
  822. function c(e) {
  823. return "[object Null]" == Object.prototype.toString.call(e);
  824. }
  825. function s(e) {
  826. return "[object Symbol]" == Object.prototype.toString.call(e);
  827. }
  828. function d(e) {
  829. return !(
  830. "[object Object]" != Object.prototype.toString.call(e) &&
  831. (n(e) || i(e) || r(e) || a(e) || c(e) || u(e) || l(e) || s(e))
  832. );
  833. }
  834. function u(e) {
  835. return "[object Function]" == Object.prototype.toString.call(e);
  836. }
  837. function v(e) {
  838. return "object" ===
  839. ("undefined" == typeof HTMLElement ? "undefined" : w(HTMLElement))
  840. ? e instanceof HTMLElement
  841. : e &&
  842. "object" === ("undefined" == typeof e ? "undefined" : w(e)) &&
  843. null !== e &&
  844. 1 === e.nodeType &&
  845. "string" == typeof e.nodeName;
  846. }
  847. function f(e) {
  848. var t = Object.prototype.toString.call(e);
  849. return (
  850. "[object global]" == t ||
  851. "[object Window]" == t ||
  852. "[object DOMWindow]" == t
  853. );
  854. }
  855. function p(e) {
  856. var t = Object.prototype.hasOwnProperty;
  857. if (
  858. !e ||
  859. "object" !== ("undefined" == typeof e ? "undefined" : w(e)) ||
  860. e.nodeType ||
  861. f(e)
  862. )
  863. return !1;
  864. try {
  865. if (
  866. e.constructor &&
  867. !t.call(e, "constructor") &&
  868. !t.call(e.constructor.prototype, "isPrototypeOf")
  869. )
  870. return !1;
  871. } catch (o) {
  872. return !1;
  873. }
  874. var n = void 0;
  875. for (n in e);
  876. return void 0 === n || t.call(e, n);
  877. }
  878. function h(e) {
  879. return document
  880. .createElement("a")
  881. .appendChild(document.createTextNode(e)).parentNode.innerHTML;
  882. }
  883. function g(e) {
  884. var t =
  885. arguments.length <= 1 || void 0 === arguments[1]
  886. ? " "
  887. : arguments[1],
  888. o =
  889. arguments.length <= 2 || void 0 === arguments[2]
  890. ? "CIRCULAR_DEPENDECY_OBJECT"
  891. : arguments[2],
  892. n = [],
  893. i = JSON.stringify(
  894. e,
  895. function(e, t) {
  896. if (
  897. "object" === ("undefined" == typeof t ? "undefined" : w(t)) &&
  898. null !== t
  899. ) {
  900. if (~n.indexOf(t)) return o;
  901. n.push(t);
  902. }
  903. return t;
  904. },
  905. t
  906. );
  907. return (n = null), i;
  908. }
  909. function b(e) {
  910. if (!d(e) && !a(e)) return [];
  911. var t = [
  912. "toString",
  913. "toLocaleString",
  914. "valueOf",
  915. "hasOwnProperty",
  916. "isPrototypeOf",
  917. "propertyIsEnumerable",
  918. "constructor"
  919. ],
  920. o = [];
  921. for (var n in e) t.indexOf(n) < 0 && o.push(n);
  922. return (o = o.sort());
  923. }
  924. function m(e) {
  925. return Object.prototype.toString
  926. .call(e)
  927. .replace("[object ", "")
  928. .replace("]", "");
  929. }
  930. function y(e, t) {
  931. window.localStorage &&
  932. ((e = "vConsole_" + e), localStorage.setItem(e, t));
  933. }
  934. function _(e) {
  935. return window.localStorage
  936. ? ((e = "vConsole_" + e), localStorage.getItem(e))
  937. : void 0;
  938. }
  939. Object.defineProperty(t, "__esModule", { value: !0 });
  940. var w =
  941. "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
  942. ? function(e) {
  943. return typeof e;
  944. }
  945. : function(e) {
  946. return e &&
  947. "function" == typeof Symbol &&
  948. e.constructor === Symbol
  949. ? "symbol"
  950. : typeof e;
  951. };
  952. (t.getDate = o),
  953. (t.isNumber = n),
  954. (t.isString = i),
  955. (t.isArray = a),
  956. (t.isBoolean = r),
  957. (t.isUndefined = l),
  958. (t.isNull = c),
  959. (t.isSymbol = s),
  960. (t.isObject = d),
  961. (t.isFunction = u),
  962. (t.isElement = v),
  963. (t.isWindow = f),
  964. (t.isPlainObject = p),
  965. (t.htmlEncode = h),
  966. (t.JSONStringify = g),
  967. (t.getObjAllKeys = b),
  968. (t.getObjName = m),
  969. (t.setStorage = y),
  970. (t.getStorage = _);
  971. },
  972. function(e, t, o) {
  973. "use strict";
  974. function n(e) {
  975. return e && e.__esModule ? e : { default: e };
  976. }
  977. Object.defineProperty(t, "__esModule", { value: !0 });
  978. var i = o(4),
  979. a = o(6),
  980. r = n(a),
  981. l = {};
  982. (l.one = function(e, t) {
  983. return t ? t.querySelector(e) : document.querySelector(e);
  984. }),
  985. (l.all = function(e, t) {
  986. var o = void 0,
  987. n = [];
  988. return (
  989. (o = t ? t.querySelectorAll(e) : document.querySelectorAll(e)),
  990. o && o.length > 0 && (n = Array.prototype.slice.call(o)),
  991. n
  992. );
  993. }),
  994. (l.addClass = function(e, t) {
  995. if (e) {
  996. (0, i.isArray)(e) || (e = [e]);
  997. for (var o = 0; o < e.length; o++) {
  998. var n = e[o].className || "",
  999. a = n.split(" ");
  1000. a.indexOf(t) > -1 || (a.push(t), (e[o].className = a.join(" ")));
  1001. }
  1002. }
  1003. }),
  1004. (l.removeClass = function(e, t) {
  1005. if (e) {
  1006. (0, i.isArray)(e) || (e = [e]);
  1007. for (var o = 0; o < e.length; o++) {
  1008. for (var n = e[o].className.split(" "), a = 0; a < n.length; a++)
  1009. n[a] == t && (n[a] = "");
  1010. e[o].className = n.join(" ").trim();
  1011. }
  1012. }
  1013. }),
  1014. (l.hasClass = function(e, t) {
  1015. if (!e) return !1;
  1016. for (var o = e.className.split(" "), n = 0; n < o.length; n++)
  1017. if (o[n] == t) return !0;
  1018. return !1;
  1019. }),
  1020. (l.bind = function(e, t, o, n) {
  1021. if (e) {
  1022. void 0 === n && (n = !1), (0, i.isArray)(e) || (e = [e]);
  1023. for (var a = 0; a < e.length; a++) e[a].addEventListener(t, o, n);
  1024. }
  1025. }),
  1026. (l.delegate = function(e, t, o, n) {
  1027. e &&
  1028. e.addEventListener(
  1029. t,
  1030. function(t) {
  1031. var i = l.all(o, e);
  1032. if (i)
  1033. e: for (var a = 0; a < i.length; a++)
  1034. for (var r = t.target; r; ) {
  1035. if (r == i[a]) {
  1036. n.call(r, t);
  1037. break e;
  1038. }
  1039. if (((r = r.parentNode), r == e)) break;
  1040. }
  1041. },
  1042. !1
  1043. );
  1044. }),
  1045. (l.render = r["default"]),
  1046. (t["default"] = l),
  1047. (e.exports = t["default"]);
  1048. },
  1049. function(e, t) {
  1050. "use strict";
  1051. function o(e, t, o) {
  1052. var n = /\{\{([^\}]+)\}\}/g,
  1053. i = "",
  1054. a = "",
  1055. r = 0,
  1056. l = [],
  1057. c = function(e, t) {
  1058. "" !== e &&
  1059. (i += t
  1060. ? e.match(/^ ?else/g)
  1061. ? "} " + e + " {\n"
  1062. : e.match(/\/(if|for|switch)/g)
  1063. ? "}\n"
  1064. : e.match(/^ ?if|for|switch/g)
  1065. ? e + " {\n"
  1066. : e.match(/^ ?(break|continue) ?$/g)
  1067. ? e + ";\n"
  1068. : e.match(/^ ?(case|default)/g)
  1069. ? e + ":\n"
  1070. : "arr.push(" + e + ");\n"
  1071. : 'arr.push("' + e.replace(/"/g, '\\"') + '");\n');
  1072. };
  1073. for (
  1074. window.__mito_data = t,
  1075. window.__mito_code = "",
  1076. window.__mito_result = "",
  1077. e = e.replace(/(\{\{ ?switch(.+?)\}\})[\r\n\t ]+\{\{/g, "$1{{"),
  1078. e = e
  1079. .replace(/^[\r\n]/, "")
  1080. .replace(/\n/g, "\\\n")
  1081. .replace(/\r/g, "\\\r"),
  1082. a = "(function(){\n",
  1083. i = "var arr = [];\n";
  1084. (l = n.exec(e));
  1085. )
  1086. c(e.slice(r, l.index), !1), c(l[1], !0), (r = l.index + l[0].length);
  1087. c(e.substr(r, e.length - r), !1),
  1088. (i += '__mito_result = arr.join("");'),
  1089. (i = "with (__mito_data) {\n" + i + "\n}"),
  1090. (a += i),
  1091. (a += "})();");
  1092. var s = document.getElementsByTagName("script"),
  1093. d = "";
  1094. s.length > 0 && (d = s[0].getAttribute("nonce") || "");
  1095. var u = document.createElement("SCRIPT");
  1096. (u.innerHTML = a),
  1097. u.setAttribute("nonce", d),
  1098. document.documentElement.appendChild(u);
  1099. var v = __mito_result;
  1100. if ((document.documentElement.removeChild(u), !o)) {
  1101. var f = document.createElement("DIV");
  1102. (f.innerHTML = v), (v = f.children[0]);
  1103. }
  1104. return v;
  1105. }
  1106. Object.defineProperty(t, "__esModule", { value: !0 }),
  1107. (t["default"] = o),
  1108. (e.exports = t["default"]);
  1109. },
  1110. function(e, t, o) {
  1111. var n = o(8);
  1112. "string" == typeof n && (n = [[e.id, n, ""]]);
  1113. o(10)(n, {});
  1114. n.locals && (e.exports = n.locals);
  1115. },
  1116. function(e, t, o) {
  1117. (t = e.exports = o(9)()),
  1118. t.push([
  1119. e.id,
  1120. '#__vconsole{color:#000;font-size:13px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}#__vconsole .vc-max-height{max-height:19.23076923em}#__vconsole .vc-max-height-line{max-height:3.38461538em}#__vconsole .vc-min-height{min-height:3.07692308em}#__vconsole dd,#__vconsole dl,#__vconsole pre{margin:0}#__vconsole .vc-switch{display:block;position:fixed;right:.76923077em;bottom:.76923077em;color:#fff;background-color:#04be02;line-height:1;font-size:1.07692308em;padding:.61538462em 1.23076923em;z-index:10000;border-radius:.30769231em;box-shadow:0 0 .61538462em rgba(0,0,0,.4)}#__vconsole .vc-mask{top:0;background:transparent;z-index:10001;transition:background .3s;-webkit-tap-highlight-color:transparent;overflow-y:scroll}#__vconsole .vc-mask,#__vconsole .vc-panel{display:none;position:fixed;left:0;right:0;bottom:0}#__vconsole .vc-panel{min-height:85%;z-index:10002;background-color:#efeff4;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-transform:translateY(100%);transform:translateY(100%)}#__vconsole .vc-tabbar{border-bottom:1px solid #d9d9d9;overflow-x:auto;height:3em;width:auto;white-space:nowrap}#__vconsole .vc-tabbar .vc-tab{display:inline-block;line-height:3em;padding:0 1.15384615em;border-right:1px solid #d9d9d9;text-decoration:none;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-tabbar .vc-tab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-tabbar .vc-tab.vc-actived{background-color:#fff}#__vconsole .vc-content{background-color:#fff;overflow-x:hidden;overflow-y:auto;position:absolute;top:3.07692308em;left:0;right:0;bottom:3.07692308em;-webkit-overflow-scrolling:touch}#__vconsole .vc-content.vc-has-topbar{top:5.46153846em}#__vconsole .vc-topbar{background-color:#fbf9fe;display:flex;display:-webkit-box;flex-direction:row;flex-wrap:wrap;-webkit-box-direction:row;-webkit-flex-wrap:wrap;width:100%}#__vconsole .vc-topbar .vc-toptab{display:none;flex:1;-webkit-box-flex:1;line-height:2.30769231em;padding:0 1.15384615em;border-bottom:1px solid #d9d9d9;text-decoration:none;text-align:center;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-topbar .vc-toptab.vc-toggle{display:block}#__vconsole .vc-topbar .vc-toptab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-topbar .vc-toptab.vc-actived{border-bottom:1px solid #3e82f7}#__vconsole .vc-logbox{display:none;position:relative;min-height:100%}#__vconsole .vc-logbox i{font-style:normal}#__vconsole .vc-logbox .vc-log{padding-bottom:3em;-webkit-tap-highlight-color:transparent}#__vconsole .vc-logbox .vc-log:empty:before{content:"Empty";color:#999;position:absolute;top:45%;left:0;right:0;bottom:0;font-size:1.15384615em;text-align:center}#__vconsole .vc-logbox .vc-item{margin:0;padding:.46153846em .61538462em;overflow:hidden;line-height:1.3;border-bottom:1px solid #eee;word-break:break-word}#__vconsole .vc-logbox .vc-item-info{color:#6a5acd}#__vconsole .vc-logbox .vc-item-debug{color:#daa520}#__vconsole .vc-logbox .vc-item-warn{color:orange;border-color:#ffb930;background-color:#fffacd}#__vconsole .vc-logbox .vc-item-error{color:#dc143c;border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-log.vc-log-partly .vc-item{display:none}#__vconsole .vc-logbox .vc-log.vc-log-partly-error .vc-item-error,#__vconsole .vc-logbox .vc-log.vc-log-partly-info .vc-item-info,#__vconsole .vc-logbox .vc-log.vc-log-partly-log .vc-item-log,#__vconsole .vc-logbox .vc-log.vc-log-partly-warn .vc-item-warn{display:block}#__vconsole .vc-logbox .vc-item .vc-item-content{margin-right:4.61538462em;display:block}#__vconsole .vc-logbox .vc-item .vc-item-meta{color:#888;float:right;width:4.61538462em;text-align:right}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-content{margin-right:0}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-meta{display:none}#__vconsole .vc-logbox .vc-item .vc-item-code{display:block;white-space:pre-wrap;overflow:auto;position:relative}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output{padding-left:.92307692em}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input:before,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\203A";position:absolute;top:-.23076923em;left:0;font-size:1.23076923em;color:#6a5acd}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\2039"}#__vconsole .vc-logbox .vc-item .vc-fold{display:block;overflow:auto;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer{display:block;font-style:italic;padding-left:.76923077em;position:relative}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:before{content:"";position:absolute;top:.30769231em;left:.15384615em;width:0;height:0;border:.30769231em solid transparent;border-left-color:#000}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer.vc-toggle:before{top:.46153846em;left:0;border-top-color:#000;border-left-color:transparent}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner{display:none;margin-left:.76923077em}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner.vc-toggle{display:block}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner .vc-code-key{margin-left:.76923077em}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer .vc-code-key{margin-left:0}#__vconsole .vc-logbox .vc-code-key{color:#905}#__vconsole .vc-logbox .vc-code-private-key{color:#d391b5}#__vconsole .vc-logbox .vc-code-function{color:#905;font-style:italic}#__vconsole .vc-logbox .vc-code-boolean,#__vconsole .vc-logbox .vc-code-number{color:#0086b3}#__vconsole .vc-logbox .vc-code-string{color:#183691}#__vconsole .vc-logbox .vc-code-null,#__vconsole .vc-logbox .vc-code-undefined{color:#666}#__vconsole .vc-logbox .vc-cmd{position:absolute;height:3.07692308em;left:0;right:0;bottom:0;border-top:1px solid #d9d9d9;display:block!important}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input-wrap{display:block;height:2.15384615em;margin-right:3.07692308em;padding:.46153846em .61538462em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input{width:100%;border:none;resize:none;outline:none;padding:0;font-size:.92307692em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input::-webkit-input-placeholder{line-height:2.15384615em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn{position:absolute;top:0;right:0;bottom:0;width:3.07692308em;border:none;background-color:#efeff4;outline:none;-webkit-touch-callout:none;font-size:1em}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-logbox .vc-group .vc-group-preview{-webkit-touch-callout:none}#__vconsole .vc-logbox .vc-group .vc-group-preview:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-group .vc-group-detail{display:none;padding:0 0 .76923077em 1.53846154em;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-group.vc-actived .vc-group-detail{display:block;background-color:#fbf9fe}#__vconsole .vc-logbox .vc-group.vc-actived .vc-table-row{background-color:#fff}#__vconsole .vc-logbox .vc-group.vc-actived .vc-group-preview{background-color:#fbf9fe}#__vconsole .vc-logbox .vc-table .vc-table-row{display:flex;display:-webkit-flex;flex-direction:row;flex-wrap:wrap;-webkit-box-direction:row;-webkit-flex-wrap:wrap;overflow:hidden;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-row.vc-left-border{border-left:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-col{flex:1;-webkit-box-flex:1;padding:.23076923em .30769231em;border-left:1px solid #eee;overflow:auto;white-space:pre-wrap;word-break:break-word;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-table .vc-table-col:first-child{border:none}#__vconsole .vc-logbox .vc-table .vc-small .vc-table-col{padding:0 .30769231em;font-size:.92307692em}#__vconsole .vc-logbox .vc-table .vc-table-col-2{flex:2;-webkit-box-flex:2}#__vconsole .vc-logbox .vc-table .vc-table-col-3{flex:3;-webkit-box-flex:3}#__vconsole .vc-logbox .vc-table .vc-table-col-4{flex:4;-webkit-box-flex:4}#__vconsole .vc-logbox .vc-table .vc-table-col-5{flex:5;-webkit-box-flex:5}#__vconsole .vc-logbox .vc-table .vc-table-col-6{flex:6;-webkit-box-flex:6}#__vconsole .vc-logbox .vc-table .vc-table-row-error{border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-table .vc-table-row-error .vc-table-col{color:#dc143c;border-color:#f4a0ab}#__vconsole .vc-logbox .vc-table .vc-table-col-title{font-weight:700}#__vconsole .vc-logbox.vc-actived{display:block}#__vconsole .vc-toolbar{border-top:1px solid #d9d9d9;line-height:3em;position:absolute;left:0;right:0;bottom:0;display:flex;display:-webkit-box;flex-direction:row;-webkit-box-direction:row}#__vconsole .vc-toolbar .vc-tool{display:none;text-decoration:none;color:#000;width:50%;flex:1;-webkit-box-flex:1;text-align:center;position:relative;-webkit-touch-callout:none}#__vconsole .vc-toolbar .vc-tool.vc-global-tool,#__vconsole .vc-toolbar .vc-tool.vc-toggle{display:block}#__vconsole .vc-toolbar .vc-tool:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-toolbar .vc-tool:after{content:" ";position:absolute;top:.53846154em;bottom:.53846154em;right:0;border-left:1px solid #d9d9d9}#__vconsole .vc-toolbar .vc-tool-last:after{border:none}#__vconsole.vc-toggle .vc-switch{display:none}#__vconsole.vc-toggle .vc-mask{background:rgba(0,0,0,.6);display:block}#__vconsole.vc-toggle .vc-panel{-webkit-transform:translate(0);transform:translate(0)}',
  1121. ""
  1122. ]);
  1123. },
  1124. function(e, t) {
  1125. "use strict";
  1126. e.exports = function() {
  1127. var e = [];
  1128. return (
  1129. (e.toString = function() {
  1130. for (var e = [], t = 0; t < this.length; t++) {
  1131. var o = this[t];
  1132. o[2] ? e.push("@media " + o[2] + "{" + o[1] + "}") : e.push(o[1]);
  1133. }
  1134. return e.join("");
  1135. }),
  1136. (e.i = function(t, o) {
  1137. "string" == typeof t && (t = [[null, t, ""]]);
  1138. for (var n = {}, i = 0; i < this.length; i++) {
  1139. var a = this[i][0];
  1140. "number" == typeof a && (n[a] = !0);
  1141. }
  1142. for (i = 0; i < t.length; i++) {
  1143. var r = t[i];
  1144. ("number" == typeof r[0] && n[r[0]]) ||
  1145. (o && !r[2]
  1146. ? (r[2] = o)
  1147. : o && (r[2] = "(" + r[2] + ") and (" + o + ")"),
  1148. e.push(r));
  1149. }
  1150. }),
  1151. e
  1152. );
  1153. };
  1154. },
  1155. function(e, t, o) {
  1156. function n(e, t) {
  1157. for (var o = 0; o < e.length; o++) {
  1158. var n = e[o],
  1159. i = f[n.id];
  1160. if (i) {
  1161. i.refs++;
  1162. for (var a = 0; a < i.parts.length; a++) i.parts[a](n.parts[a]);
  1163. for (; a < n.parts.length; a++) i.parts.push(s(n.parts[a], t));
  1164. } else {
  1165. for (var r = [], a = 0; a < n.parts.length; a++)
  1166. r.push(s(n.parts[a], t));
  1167. f[n.id] = { id: n.id, refs: 1, parts: r };
  1168. }
  1169. }
  1170. }
  1171. function i(e) {
  1172. for (var t = [], o = {}, n = 0; n < e.length; n++) {
  1173. var i = e[n],
  1174. a = i[0],
  1175. r = i[1],
  1176. l = i[2],
  1177. c = i[3],
  1178. s = { css: r, media: l, sourceMap: c };
  1179. o[a] ? o[a].parts.push(s) : t.push((o[a] = { id: a, parts: [s] }));
  1180. }
  1181. return t;
  1182. }
  1183. function a(e, t) {
  1184. var o = g(),
  1185. n = y[y.length - 1];
  1186. if ("top" === e.insertAt)
  1187. n
  1188. ? n.nextSibling
  1189. ? o.insertBefore(t, n.nextSibling)
  1190. : o.appendChild(t)
  1191. : o.insertBefore(t, o.firstChild),
  1192. y.push(t);
  1193. else {
  1194. if ("bottom" !== e.insertAt)
  1195. throw new Error(
  1196. "Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."
  1197. );
  1198. o.appendChild(t);
  1199. }
  1200. }
  1201. function r(e) {
  1202. e.parentNode.removeChild(e);
  1203. var t = y.indexOf(e);
  1204. t >= 0 && y.splice(t, 1);
  1205. }
  1206. function l(e) {
  1207. var t = document.createElement("style");
  1208. return (t.type = "text/css"), a(e, t), t;
  1209. }
  1210. function c(e) {
  1211. var t = document.createElement("link");
  1212. return (t.rel = "stylesheet"), a(e, t), t;
  1213. }
  1214. function s(e, t) {
  1215. var o, n, i;
  1216. if (t.singleton) {
  1217. var a = m++;
  1218. (o = b || (b = l(t))),
  1219. (n = d.bind(null, o, a, !1)),
  1220. (i = d.bind(null, o, a, !0));
  1221. } else
  1222. e.sourceMap &&
  1223. "function" == typeof URL &&
  1224. "function" == typeof URL.createObjectURL &&
  1225. "function" == typeof URL.revokeObjectURL &&
  1226. "function" == typeof Blob &&
  1227. "function" == typeof btoa
  1228. ? ((o = c(t)),
  1229. (n = v.bind(null, o)),
  1230. (i = function() {
  1231. r(o), o.href && URL.revokeObjectURL(o.href);
  1232. }))
  1233. : ((o = l(t)),
  1234. (n = u.bind(null, o)),
  1235. (i = function() {
  1236. r(o);
  1237. }));
  1238. return (
  1239. n(e),
  1240. function(t) {
  1241. if (t) {
  1242. if (
  1243. t.css === e.css &&
  1244. t.media === e.media &&
  1245. t.sourceMap === e.sourceMap
  1246. )
  1247. return;
  1248. n((e = t));
  1249. } else i();
  1250. }
  1251. );
  1252. }
  1253. function d(e, t, o, n) {
  1254. var i = o ? "" : n.css;
  1255. if (e.styleSheet) e.styleSheet.cssText = _(t, i);
  1256. else {
  1257. var a = document.createTextNode(i),
  1258. r = e.childNodes;
  1259. r[t] && e.removeChild(r[t]),
  1260. r.length ? e.insertBefore(a, r[t]) : e.appendChild(a);
  1261. }
  1262. }
  1263. function u(e, t) {
  1264. var o = t.css,
  1265. n = t.media;
  1266. if ((n && e.setAttribute("media", n), e.styleSheet))
  1267. e.styleSheet.cssText = o;
  1268. else {
  1269. for (; e.firstChild; ) e.removeChild(e.firstChild);
  1270. e.appendChild(document.createTextNode(o));
  1271. }
  1272. }
  1273. function v(e, t) {
  1274. var o = t.css,
  1275. n = t.sourceMap;
  1276. n &&
  1277. (o +=
  1278. "\n/*# sourceMappingURL=data:application/json;base64," +
  1279. btoa(unescape(encodeURIComponent(JSON.stringify(n)))) +
  1280. " */");
  1281. var i = new Blob([o], {
  1282. type: "text/css"
  1283. }),
  1284. a = e.href;
  1285. (e.href = URL.createObjectURL(i)), a && URL.revokeObjectURL(a);
  1286. }
  1287. var f = {},
  1288. p = function(e) {
  1289. var t;
  1290. return function() {
  1291. return "undefined" == typeof t && (t = e.apply(this, arguments)), t;
  1292. };
  1293. },
  1294. h = p(function() {
  1295. return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
  1296. }),
  1297. g = p(function() {
  1298. return document.head || document.getElementsByTagName("head")[0];
  1299. }),
  1300. b = null,
  1301. m = 0,
  1302. y = [];
  1303. e.exports = function(e, t) {
  1304. (t = t || {}),
  1305. "undefined" == typeof t.singleton && (t.singleton = h()),
  1306. "undefined" == typeof t.insertAt && (t.insertAt = "bottom");
  1307. var o = i(e);
  1308. return (
  1309. n(o, t),
  1310. function(e) {
  1311. for (var a = [], r = 0; r < o.length; r++) {
  1312. var l = o[r],
  1313. c = f[l.id];
  1314. c.refs--, a.push(c);
  1315. }
  1316. if (e) {
  1317. var s = i(e);
  1318. n(s, t);
  1319. }
  1320. for (var r = 0; r < a.length; r++) {
  1321. var c = a[r];
  1322. if (0 === c.refs) {
  1323. for (var d = 0; d < c.parts.length; d++) c.parts[d]();
  1324. delete f[c.id];
  1325. }
  1326. }
  1327. }
  1328. );
  1329. };
  1330. var _ = (function() {
  1331. var e = [];
  1332. return function(t, o) {
  1333. return (e[t] = o), e.filter(Boolean).join("\n");
  1334. };
  1335. })();
  1336. },
  1337. function(e, t) {
  1338. e.exports =
  1339. '<div id="__vconsole" class="">\n <div class="vc-switch">vConsole</div>\n <div class="vc-mask">\n </div>\n <div class="vc-panel">\n <div class="vc-tabbar">\n </div>\n <div class="vc-topbar">\n </div>\n <div class="vc-content">\n </div>\n <div class="vc-toolbar">\n <a class="vc-tool vc-global-tool vc-tool-last vc-hide">Hide</a>\n </div>\n </div>\n</div>';
  1340. },
  1341. function(e, t) {
  1342. e.exports =
  1343. '<a class="vc-tab" data-tab="{{id}}" id="__vc_tab_{{id}}">{{name}}</a>';
  1344. },
  1345. function(e, t) {
  1346. e.exports = '<div class="vc-logbox" id="__vc_log_{{id}}">\n \n</div>';
  1347. },
  1348. function(e, t) {
  1349. e.exports =
  1350. '<a class="vc-toptab vc-topbar-{{pluginID}}{{if (className)}} {{className}}{{/if}}">{{name}}</a>';
  1351. },
  1352. function(e, t) {
  1353. e.exports = '<a class="vc-tool vc-tool-{{pluginID}}">{{name}}</a>';
  1354. },
  1355. function(e, t, o) {
  1356. "use strict";
  1357. function n(e) {
  1358. if (e && e.__esModule) return e;
  1359. var t = {};
  1360. if (null != e)
  1361. for (var o in e)
  1362. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  1363. return (t["default"] = e), t;
  1364. }
  1365. function i(e) {
  1366. return e && e.__esModule ? e : { default: e };
  1367. }
  1368. function a(e, t) {
  1369. if (!(e instanceof t))
  1370. throw new TypeError("Cannot call a class as a function");
  1371. }
  1372. function r(e, t) {
  1373. if (!e)
  1374. throw new ReferenceError(
  1375. "this hasn't been initialised - super() hasn't been called"
  1376. );
  1377. return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  1378. }
  1379. function l(e, t) {
  1380. if ("function" != typeof t && null !== t)
  1381. throw new TypeError(
  1382. "Super expression must either be null or a function, not " +
  1383. typeof t
  1384. );
  1385. (e.prototype = Object.create(t && t.prototype, {
  1386. constructor: {
  1387. value: e,
  1388. enumerable: !1,
  1389. writable: !0,
  1390. configurable: !0
  1391. }
  1392. })),
  1393. t &&
  1394. (Object.setPrototypeOf
  1395. ? Object.setPrototypeOf(e, t)
  1396. : (e.__proto__ = t));
  1397. }
  1398. Object.defineProperty(t, "__esModule", { value: !0 });
  1399. var c = (function() {
  1400. function e(e, t) {
  1401. for (var o = 0; o < t.length; o++) {
  1402. var n = t[o];
  1403. (n.enumerable = n.enumerable || !1),
  1404. (n.configurable = !0),
  1405. "value" in n && (n.writable = !0),
  1406. Object.defineProperty(e, n.key, n);
  1407. }
  1408. }
  1409. return function(t, o, n) {
  1410. return o && e(t.prototype, o), n && e(t, n), t;
  1411. };
  1412. })(),
  1413. s = function w(e, t, o) {
  1414. null === e && (e = Function.prototype);
  1415. var n = Object.getOwnPropertyDescriptor(e, t);
  1416. if (void 0 === n) {
  1417. var i = Object.getPrototypeOf(e);
  1418. return null === i ? void 0 : w(i, t, o);
  1419. }
  1420. if ("value" in n) return n.value;
  1421. var a = n.get;
  1422. if (void 0 !== a) return a.call(o);
  1423. },
  1424. d = o(5),
  1425. u = i(d),
  1426. v = o(4),
  1427. f = n(v),
  1428. p = o(17),
  1429. h = i(p),
  1430. g = o(22),
  1431. b = i(g),
  1432. m = o(23),
  1433. y = i(m),
  1434. _ = (function(e) {
  1435. function t() {
  1436. var e;
  1437. a(this, t);
  1438. for (var o = arguments.length, n = Array(o), i = 0; o > i; i++)
  1439. n[i] = arguments[i];
  1440. var l = r(
  1441. this,
  1442. (e = Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))
  1443. );
  1444. return (l.tplTabbox = b["default"]), (l.windowOnError = null), l;
  1445. }
  1446. return (
  1447. l(t, e),
  1448. c(t, [
  1449. {
  1450. key: "onReady",
  1451. value: function() {
  1452. var e = this;
  1453. s(Object.getPrototypeOf(t.prototype), "onReady", this).call(
  1454. this
  1455. ),
  1456. u["default"].bind(
  1457. u["default"].one(".vc-cmd", this.$tabbox),
  1458. "submit",
  1459. function(t) {
  1460. t.preventDefault();
  1461. var o = u["default"].one(".vc-cmd-input", t.target),
  1462. n = o.value;
  1463. (o.value = ""), "" !== n && e.evalCommand(n);
  1464. }
  1465. );
  1466. var o = "";
  1467. (o += "if (!!window) {"),
  1468. (o += "window.__vConsole_cmd_result = undefined;"),
  1469. (o += "window.__vConsole_cmd_error = false;"),
  1470. (o += "}");
  1471. var n = document.getElementsByTagName("script"),
  1472. i = "";
  1473. n.length > 0 && (i = n[0].getAttribute("nonce") || "");
  1474. var a = document.createElement("SCRIPT");
  1475. (a.innerHTML = o),
  1476. a.setAttribute("nonce", i),
  1477. document.documentElement.appendChild(a),
  1478. document.documentElement.removeChild(a);
  1479. }
  1480. },
  1481. {
  1482. key: "mockConsole",
  1483. value: function() {
  1484. s(
  1485. Object.getPrototypeOf(t.prototype),
  1486. "mockConsole",
  1487. this
  1488. ).call(this);
  1489. var e = this;
  1490. f.isFunction(window.onerror) &&
  1491. (this.windowOnError = window.onerror),
  1492. (window.onerror = function(t, o, n, i, a) {
  1493. var r = t;
  1494. o && (r += "\n" + o.replace(location.origin, "")),
  1495. (n || i) && (r += ":" + n + ":" + i);
  1496. var l = !!a && !!a.stack,
  1497. c = (l && a.stack.toString()) || "";
  1498. e.printLog({
  1499. logType: "error",
  1500. logs: [r, c],
  1501. noOrigin: !0
  1502. }),
  1503. f.isFunction(e.windowOnError) &&
  1504. e.windowOnError.call(window, t, o, n, i, a);
  1505. });
  1506. }
  1507. },
  1508. {
  1509. key: "evalCommand",
  1510. value: function(e) {
  1511. this.printLog({
  1512. logType: "log",
  1513. content: u["default"].render(y["default"], {
  1514. content: e,
  1515. type: "input"
  1516. }),
  1517. noMeta: !0,
  1518. style: ""
  1519. });
  1520. var t = "";
  1521. (t += "try {\n"),
  1522. (t += "window.__vConsole_cmd_result = (function() {\n"),
  1523. (t += "return " + e + ";\n"),
  1524. (t += "})();\n"),
  1525. (t += "window.__vConsole_cmd_error = false;\n"),
  1526. (t += "} catch (e) {\n"),
  1527. (t += "window.__vConsole_cmd_result = e.message;\n"),
  1528. (t += "window.__vConsole_cmd_error = true;\n"),
  1529. (t += "}");
  1530. var o = document.getElementsByTagName("script"),
  1531. n = "";
  1532. o.length > 0 && (n = o[0].getAttribute("nonce") || "");
  1533. var i = document.createElement("SCRIPT");
  1534. (i.innerHTML = t),
  1535. i.setAttribute("nonce", n),
  1536. document.documentElement.appendChild(i);
  1537. var a = window.__vConsole_cmd_result,
  1538. r = window.__vConsole_cmd_error;
  1539. if ((document.documentElement.removeChild(i), 0 == r)) {
  1540. var l = void 0;
  1541. f.isArray(a) || f.isObject(a)
  1542. ? (l = this.getFoldedLine(a))
  1543. : (f.isNull(a)
  1544. ? (a = "null")
  1545. : f.isUndefined(a)
  1546. ? (a = "undefined")
  1547. : f.isFunction(a)
  1548. ? (a = "function()")
  1549. : f.isString(a) && (a = '"' + a + '"'),
  1550. (l = u["default"].render(y["default"], {
  1551. content: a,
  1552. type: "output"
  1553. }))),
  1554. this.printLog({
  1555. logType: "log",
  1556. content: l,
  1557. noMeta: !0,
  1558. style: ""
  1559. });
  1560. } else
  1561. this.printLog({
  1562. logType: "error",
  1563. logs: [a],
  1564. noMeta: !0,
  1565. style: ""
  1566. });
  1567. }
  1568. }
  1569. ]),
  1570. t
  1571. );
  1572. })(h["default"]);
  1573. (t["default"] = _), (e.exports = t["default"]);
  1574. },
  1575. function(e, t, o) {
  1576. "use strict";
  1577. function n(e) {
  1578. return e && e.__esModule ? e : { default: e };
  1579. }
  1580. function i(e) {
  1581. if (e && e.__esModule) return e;
  1582. var t = {};
  1583. if (null != e)
  1584. for (var o in e)
  1585. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  1586. return (t["default"] = e), t;
  1587. }
  1588. function a(e, t) {
  1589. if (!(e instanceof t))
  1590. throw new TypeError("Cannot call a class as a function");
  1591. }
  1592. function r(e, t) {
  1593. if (!e)
  1594. throw new ReferenceError(
  1595. "this hasn't been initialised - super() hasn't been called"
  1596. );
  1597. return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  1598. }
  1599. function l(e, t) {
  1600. if ("function" != typeof t && null !== t)
  1601. throw new TypeError(
  1602. "Super expression must either be null or a function, not " +
  1603. typeof t
  1604. );
  1605. (e.prototype = Object.create(t && t.prototype, {
  1606. constructor: {
  1607. value: e,
  1608. enumerable: !1,
  1609. writable: !0,
  1610. configurable: !0
  1611. }
  1612. })),
  1613. t &&
  1614. (Object.setPrototypeOf
  1615. ? Object.setPrototypeOf(e, t)
  1616. : (e.__proto__ = t));
  1617. }
  1618. Object.defineProperty(t, "__esModule", { value: !0 });
  1619. var c =
  1620. "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
  1621. ? function(e) {
  1622. return typeof e;
  1623. }
  1624. : function(e) {
  1625. return e &&
  1626. "function" == typeof Symbol &&
  1627. e.constructor === Symbol
  1628. ? "symbol"
  1629. : typeof e;
  1630. },
  1631. s = (function() {
  1632. function e(e, t) {
  1633. for (var o = 0; o < t.length; o++) {
  1634. var n = t[o];
  1635. (n.enumerable = n.enumerable || !1),
  1636. (n.configurable = !0),
  1637. "value" in n && (n.writable = !0),
  1638. Object.defineProperty(e, n.key, n);
  1639. }
  1640. }
  1641. return function(t, o, n) {
  1642. return o && e(t.prototype, o), n && e(t, n), t;
  1643. };
  1644. })(),
  1645. d = o(4),
  1646. u = i(d),
  1647. v = o(5),
  1648. f = n(v),
  1649. p = o(18),
  1650. h = n(p),
  1651. g = o(19),
  1652. b = n(g),
  1653. m = o(20),
  1654. y = n(m),
  1655. _ = o(21),
  1656. w = n(_),
  1657. x = 1e3,
  1658. k = (function(e) {
  1659. function t() {
  1660. var e;
  1661. a(this, t);
  1662. for (var o = arguments.length, n = Array(o), i = 0; o > i; i++)
  1663. n[i] = arguments[i];
  1664. var l = r(
  1665. this,
  1666. (e = Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))
  1667. );
  1668. return (
  1669. (l.tplTabbox = ""),
  1670. (l.allowUnformattedLog = !0),
  1671. (l.isReady = !1),
  1672. (l.isShow = !1),
  1673. (l.$tabbox = null),
  1674. (l.console = {}),
  1675. (l.logList = []),
  1676. (l.isInBottom = !0),
  1677. (l.maxLogNumber = x),
  1678. (l.logNumber = 0),
  1679. l.mockConsole(),
  1680. l
  1681. );
  1682. }
  1683. return (
  1684. l(t, e),
  1685. s(t, [
  1686. {
  1687. key: "onInit",
  1688. value: function() {
  1689. (this.$tabbox = f["default"].render(this.tplTabbox, {})),
  1690. this.updateMaxLogNumber();
  1691. }
  1692. },
  1693. {
  1694. key: "onRenderTab",
  1695. value: function(e) {
  1696. e(this.$tabbox);
  1697. }
  1698. },
  1699. {
  1700. key: "onAddTopBar",
  1701. value: function(e) {
  1702. for (
  1703. var t = this,
  1704. o = ["All", "Log", "Info", "Warn", "Error"],
  1705. n = [],
  1706. i = 0;
  1707. i < o.length;
  1708. i++
  1709. )
  1710. n.push({
  1711. name: o[i],
  1712. data: { type: o[i].toLowerCase() },
  1713. className: "",
  1714. onClick: function() {
  1715. return f["default"].hasClass(this, "vc-actived")
  1716. ? !1
  1717. : void t.showLogType(this.dataset.type || "all");
  1718. }
  1719. });
  1720. (n[0].className = "vc-actived"), e(n);
  1721. }
  1722. },
  1723. {
  1724. key: "onAddTool",
  1725. value: function(e) {
  1726. var t = this,
  1727. o = [
  1728. {
  1729. name: "Clear",
  1730. global: !1,
  1731. onClick: function() {
  1732. t.clearLog(), t.vConsole.triggerEvent("clearLog");
  1733. }
  1734. }
  1735. ];
  1736. e(o);
  1737. }
  1738. },
  1739. {
  1740. key: "onReady",
  1741. value: function() {
  1742. var e = this;
  1743. e.isReady = !0;
  1744. var t = f["default"].all(".vc-subtab", e.$tabbox);
  1745. f["default"].bind(t, "click", function(o) {
  1746. if (
  1747. (o.preventDefault(),
  1748. f["default"].hasClass(this, "vc-actived"))
  1749. )
  1750. return !1;
  1751. f["default"].removeClass(t, "vc-actived"),
  1752. f["default"].addClass(this, "vc-actived");
  1753. var n = this.dataset.type,
  1754. i = f["default"].one(".vc-log", e.$tabbox);
  1755. f["default"].removeClass(i, "vc-log-partly-log"),
  1756. f["default"].removeClass(i, "vc-log-partly-info"),
  1757. f["default"].removeClass(i, "vc-log-partly-warn"),
  1758. f["default"].removeClass(i, "vc-log-partly-error"),
  1759. "all" == n
  1760. ? f["default"].removeClass(i, "vc-log-partly")
  1761. : (f["default"].addClass(i, "vc-log-partly"),
  1762. f["default"].addClass(i, "vc-log-partly-" + n));
  1763. });
  1764. var o = f["default"].one(".vc-content");
  1765. f["default"].bind(o, "scroll", function(t) {
  1766. e.isShow &&
  1767. (o.scrollTop + o.offsetHeight >= o.scrollHeight
  1768. ? (e.isInBottom = !0)
  1769. : (e.isInBottom = !1));
  1770. });
  1771. for (var n = 0; n < e.logList.length; n++)
  1772. e.printLog(e.logList[n]);
  1773. e.logList = [];
  1774. }
  1775. },
  1776. {
  1777. key: "onRemove",
  1778. value: function() {
  1779. (window.console.log = this.console.log),
  1780. (window.console.info = this.console.info),
  1781. (window.console.warn = this.console.warn),
  1782. (window.console.debug = this.console.debug),
  1783. (window.console.error = this.console.error),
  1784. (window.console.time = this.console.time),
  1785. (window.console.timeEnd = this.console.timeEnd),
  1786. (window.console.clear = this.console.clear),
  1787. (this.console = {});
  1788. }
  1789. },
  1790. {
  1791. key: "onShow",
  1792. value: function() {
  1793. (this.isShow = !0),
  1794. 1 == this.isInBottom && this.autoScrollToBottom();
  1795. }
  1796. },
  1797. {
  1798. key: "onHide",
  1799. value: function() {
  1800. this.isShow = !1;
  1801. }
  1802. },
  1803. {
  1804. key: "onShowConsole",
  1805. value: function() {
  1806. 1 == this.isInBottom && this.autoScrollToBottom();
  1807. }
  1808. },
  1809. {
  1810. key: "onUpdateOption",
  1811. value: function() {
  1812. this.vConsole.option.maxLogNumber != this.maxLogNumber &&
  1813. (this.updateMaxLogNumber(), this.limitMaxLogs());
  1814. }
  1815. },
  1816. {
  1817. key: "updateMaxLogNumber",
  1818. value: function() {
  1819. (this.maxLogNumber = this.vConsole.option.maxLogNumber || x),
  1820. (this.maxLogNumber = Math.max(1, this.maxLogNumber));
  1821. }
  1822. },
  1823. {
  1824. key: "limitMaxLogs",
  1825. value: function() {
  1826. if (this.isReady)
  1827. for (; this.logNumber > this.maxLogNumber; ) {
  1828. var e = f["default"].one(".vc-item", this.$tabbox);
  1829. if (!e) break;
  1830. e.parentNode.removeChild(e), this.logNumber--;
  1831. }
  1832. }
  1833. },
  1834. {
  1835. key: "showLogType",
  1836. value: function(e) {
  1837. var t = f["default"].one(".vc-log", this.$tabbox);
  1838. f["default"].removeClass(t, "vc-log-partly-log"),
  1839. f["default"].removeClass(t, "vc-log-partly-info"),
  1840. f["default"].removeClass(t, "vc-log-partly-warn"),
  1841. f["default"].removeClass(t, "vc-log-partly-error"),
  1842. "all" == e
  1843. ? f["default"].removeClass(t, "vc-log-partly")
  1844. : (f["default"].addClass(t, "vc-log-partly"),
  1845. f["default"].addClass(t, "vc-log-partly-" + e));
  1846. }
  1847. },
  1848. {
  1849. key: "autoScrollToBottom",
  1850. value: function() {
  1851. this.vConsole.option.disableLogScrolling ||
  1852. this.scrollToBottom();
  1853. }
  1854. },
  1855. {
  1856. key: "scrollToBottom",
  1857. value: function() {
  1858. var e = f["default"].one(".vc-content");
  1859. e && (e.scrollTop = e.scrollHeight - e.offsetHeight);
  1860. }
  1861. },
  1862. {
  1863. key: "mockConsole",
  1864. value: function() {
  1865. var e = this,
  1866. t = this,
  1867. o = ["log", "info", "warn", "debug", "error"];
  1868. window.console
  1869. ? (o.map(function(e) {
  1870. t.console[e] = window.console[e];
  1871. }),
  1872. (t.console.time = window.console.time),
  1873. (t.console.timeEnd = window.console.timeEnd),
  1874. (t.console.clear = window.console.clear))
  1875. : (window.console = {}),
  1876. o.map(function(t) {
  1877. window.console[t] = function() {
  1878. for (
  1879. var o = arguments.length, n = Array(o), i = 0;
  1880. o > i;
  1881. i++
  1882. )
  1883. n[i] = arguments[i];
  1884. e.printLog({ logType: t, logs: n });
  1885. };
  1886. });
  1887. var n = {};
  1888. (window.console.time = function(e) {
  1889. n[e] = Date.now();
  1890. }),
  1891. (window.console.timeEnd = function(e) {
  1892. var t = n[e];
  1893. t
  1894. ? (console.log(e + ":", Date.now() - t + "ms"),
  1895. delete n[e])
  1896. : console.log(e + ": 0ms");
  1897. }),
  1898. (window.console.clear = function() {
  1899. for (
  1900. var e = arguments.length, o = Array(e), n = 0;
  1901. e > n;
  1902. n++
  1903. )
  1904. o[n] = arguments[n];
  1905. t.clearLog(), t.console.clear.apply(window.console, o);
  1906. });
  1907. }
  1908. },
  1909. {
  1910. key: "clearLog",
  1911. value: function() {
  1912. f["default"].one(".vc-log", this.$tabbox).innerHTML = "";
  1913. }
  1914. },
  1915. {
  1916. key: "printOriginLog",
  1917. value: function(e) {
  1918. "function" == typeof this.console[e.logType] &&
  1919. this.console[e.logType].apply(window.console, e.logs);
  1920. }
  1921. },
  1922. {
  1923. key: "printLog",
  1924. value: function(e) {
  1925. var t = e.logs || [];
  1926. if (t.length || e.content) {
  1927. t = [].slice.call(t || []);
  1928. var o = !0,
  1929. n = /^\[(\w+)\]$/i,
  1930. i = "";
  1931. if (u.isString(t[0])) {
  1932. var a = t[0].match(n);
  1933. null !== a && a.length > 0 && (i = a[1].toLowerCase());
  1934. }
  1935. if (
  1936. (i
  1937. ? (o = i == this.id)
  1938. : 0 == this.allowUnformattedLog && (o = !1),
  1939. !o)
  1940. )
  1941. return void (e.noOrigin || this.printOriginLog(e));
  1942. if ((e.date || (e.date = +new Date()), !this.isReady))
  1943. return void this.logList.push(e);
  1944. if (
  1945. (u.isString(t[0]) &&
  1946. ((t[0] = t[0].replace(n, "")),
  1947. "" === t[0] && t.shift()),
  1948. !e.meta)
  1949. ) {
  1950. var r = u.getDate(e.date);
  1951. e.meta = r.hour + ":" + r.minute + ":" + r.second;
  1952. }
  1953. for (
  1954. var l = f["default"].render(b["default"], {
  1955. logType: e.logType,
  1956. noMeta: !!e.noMeta,
  1957. meta: e.meta,
  1958. style: e.style || ""
  1959. }),
  1960. s = f["default"].one(".vc-item-content", l),
  1961. d = 0;
  1962. d < t.length;
  1963. d++
  1964. ) {
  1965. var v = void 0;
  1966. try {
  1967. if ("" === t[d]) continue;
  1968. v = u.isFunction(t[d])
  1969. ? "<span> " + t[d].toString() + "</span>"
  1970. : u.isObject(t[d]) || u.isArray(t[d])
  1971. ? this.getFoldedLine(t[d])
  1972. : "<span> " +
  1973. u.htmlEncode(t[d]).replace(/\n/g, "<br/>") +
  1974. "</span>";
  1975. } catch (p) {
  1976. v = "<span> [" + c(t[d]) + "]</span>";
  1977. }
  1978. v &&
  1979. ("string" == typeof v
  1980. ? s.insertAdjacentHTML("beforeend", v)
  1981. : s.insertAdjacentElement("beforeend", v));
  1982. }
  1983. u.isObject(e.content) &&
  1984. s.insertAdjacentElement("beforeend", e.content),
  1985. f["default"]
  1986. .one(".vc-log", this.$tabbox)
  1987. .insertAdjacentElement("beforeend", l),
  1988. this.logNumber++,
  1989. this.limitMaxLogs(),
  1990. this.isInBottom && this.autoScrollToBottom(),
  1991. e.noOrigin || this.printOriginLog(e);
  1992. }
  1993. }
  1994. },
  1995. {
  1996. key: "getFoldedLine",
  1997. value: function(e, t) {
  1998. var o = this;
  1999. if (!t) {
  2000. var n = u.JSONStringify(e),
  2001. i = n.substr(0, 26);
  2002. (t = u.getObjName(e)),
  2003. n.length > 26 && (i += "..."),
  2004. (t += " " + i);
  2005. }
  2006. var a = f["default"].render(y["default"], {
  2007. outer: t,
  2008. lineType: "obj"
  2009. });
  2010. return (
  2011. f["default"].bind(
  2012. f["default"].one(".vc-fold-outer", a),
  2013. "click",
  2014. function(t) {
  2015. t.preventDefault(),
  2016. t.stopPropagation(),
  2017. f["default"].hasClass(a, "vc-toggle")
  2018. ? (f["default"].removeClass(a, "vc-toggle"),
  2019. f["default"].removeClass(
  2020. f["default"].one(".vc-fold-inner", a),
  2021. "vc-toggle"
  2022. ),
  2023. f["default"].removeClass(
  2024. f["default"].one(".vc-fold-outer", a),
  2025. "vc-toggle"
  2026. ))
  2027. : (f["default"].addClass(a, "vc-toggle"),
  2028. f["default"].addClass(
  2029. f["default"].one(".vc-fold-inner", a),
  2030. "vc-toggle"
  2031. ),
  2032. f["default"].addClass(
  2033. f["default"].one(".vc-fold-outer", a),
  2034. "vc-toggle"
  2035. ));
  2036. var n = f["default"].one(".vc-fold-inner", a);
  2037. if (0 == n.children.length && e) {
  2038. for (
  2039. var i = u.getObjAllKeys(e), r = 0;
  2040. r < i.length;
  2041. r++
  2042. ) {
  2043. var l = e[i[r]],
  2044. c = "undefined",
  2045. s = "";
  2046. u.isString(l)
  2047. ? ((c = "string"), (l = '"' + l + '"'))
  2048. : u.isNumber(l)
  2049. ? (c = "number")
  2050. : u.isBoolean(l)
  2051. ? (c = "boolean")
  2052. : u.isNull(l)
  2053. ? ((c = "null"), (l = "null"))
  2054. : u.isUndefined(l)
  2055. ? ((c = "undefined"), (l = "undefined"))
  2056. : u.isFunction(l)
  2057. ? ((c = "function"), (l = "function()"))
  2058. : u.isSymbol(l) && (c = "symbol");
  2059. var d = void 0;
  2060. if (u.isArray(l)) {
  2061. var v = u.getObjName(l) + "[" + l.length + "]";
  2062. d = o.getFoldedLine(
  2063. l,
  2064. f["default"].render(
  2065. w["default"],
  2066. {
  2067. key: i[r],
  2068. keyType: s,
  2069. value: v,
  2070. valueType: "array"
  2071. },
  2072. !0
  2073. )
  2074. );
  2075. } else if (u.isObject(l)) {
  2076. var p = u.getObjName(l);
  2077. d = o.getFoldedLine(
  2078. l,
  2079. f["default"].render(
  2080. w["default"],
  2081. {
  2082. key: u.htmlEncode(i[r]),
  2083. keyType: s,
  2084. value: p,
  2085. valueType: "object"
  2086. },
  2087. !0
  2088. )
  2089. );
  2090. } else {
  2091. e.hasOwnProperty &&
  2092. !e.hasOwnProperty(i[r]) &&
  2093. (s = "private");
  2094. var h = {
  2095. lineType: "kv",
  2096. key: u.htmlEncode(i[r]),
  2097. keyType: s,
  2098. value: u.htmlEncode(l),
  2099. valueType: c
  2100. };
  2101. d = f["default"].render(y["default"], h);
  2102. }
  2103. n.insertAdjacentElement("beforeend", d);
  2104. }
  2105. if (u.isObject(e)) {
  2106. var g = e.__proto__,
  2107. b = void 0;
  2108. (b = u.isObject(g)
  2109. ? o.getFoldedLine(
  2110. g,
  2111. f["default"].render(
  2112. w["default"],
  2113. {
  2114. key: "__proto__",
  2115. keyType: "private",
  2116. value: u.getObjName(g),
  2117. valueType: "object"
  2118. },
  2119. !0
  2120. )
  2121. )
  2122. : f["default"].render(w["default"], {
  2123. key: "__proto__",
  2124. keyType: "private",
  2125. value: "null",
  2126. valueType: "null"
  2127. })),
  2128. n.insertAdjacentElement("beforeend", b);
  2129. }
  2130. }
  2131. return !1;
  2132. }
  2133. ),
  2134. a
  2135. );
  2136. }
  2137. }
  2138. ]),
  2139. t
  2140. );
  2141. })(h["default"]);
  2142. (t["default"] = k), (e.exports = t["default"]);
  2143. },
  2144. function(e, t) {
  2145. "use strict";
  2146. function o(e, t) {
  2147. if (!(e instanceof t))
  2148. throw new TypeError("Cannot call a class as a function");
  2149. }
  2150. Object.defineProperty(t, "__esModule", { value: !0 });
  2151. var n = (function() {
  2152. function e(e, t) {
  2153. for (var o = 0; o < t.length; o++) {
  2154. var n = t[o];
  2155. (n.enumerable = n.enumerable || !1),
  2156. (n.configurable = !0),
  2157. "value" in n && (n.writable = !0),
  2158. Object.defineProperty(e, n.key, n);
  2159. }
  2160. }
  2161. return function(t, o, n) {
  2162. return o && e(t.prototype, o), n && e(t, n), t;
  2163. };
  2164. })(),
  2165. i = (function() {
  2166. function e(t) {
  2167. var n =
  2168. arguments.length <= 1 || void 0 === arguments[1]
  2169. ? "newPlugin"
  2170. : arguments[1];
  2171. o(this, e),
  2172. (this.id = t),
  2173. (this.name = n),
  2174. (this.isReady = !1),
  2175. (this.eventList = {});
  2176. }
  2177. return (
  2178. n(e, [
  2179. {
  2180. key: "on",
  2181. value: function(e, t) {
  2182. return (this.eventList[e] = t), this;
  2183. }
  2184. },
  2185. {
  2186. key: "trigger",
  2187. value: function(e, t) {
  2188. if ("function" == typeof this.eventList[e])
  2189. this.eventList[e].call(this, t);
  2190. else {
  2191. var o = "on" + e.charAt(0).toUpperCase() + e.slice(1);
  2192. "function" == typeof this[o] && this[o].call(this, t);
  2193. }
  2194. return this;
  2195. }
  2196. },
  2197. {
  2198. key: "id",
  2199. get: function() {
  2200. return this._id;
  2201. },
  2202. set: function(e) {
  2203. if (!e) throw "Plugin ID cannot be empty";
  2204. this._id = e.toLowerCase();
  2205. }
  2206. },
  2207. {
  2208. key: "name",
  2209. get: function() {
  2210. return this._name;
  2211. },
  2212. set: function(e) {
  2213. if (!e) throw "Plugin name cannot be empty";
  2214. this._name = e;
  2215. }
  2216. },
  2217. {
  2218. key: "vConsole",
  2219. get: function() {
  2220. return this._vConsole || void 0;
  2221. },
  2222. set: function(e) {
  2223. if (!e) throw "vConsole cannot be empty";
  2224. this._vConsole = e;
  2225. }
  2226. }
  2227. ]),
  2228. e
  2229. );
  2230. })();
  2231. (t["default"] = i), (e.exports = t["default"]);
  2232. },
  2233. function(e, t) {
  2234. e.exports =
  2235. '<div class="vc-item vc-item-{{logType}} {{if (!noMeta)}}vc-item-nometa{{/if}} {{style}}">\n <span class="vc-item-meta">{{if (!noMeta)}}{{meta}}{{/if}}</span>\n <div class="vc-item-content"></div>\n</div>';
  2236. },
  2237. function(e, t) {
  2238. e.exports =
  2239. '<div class="vc-fold">\n {{if (lineType == \'obj\')}}\n <i class="vc-fold-outer">{{outer}}</i>\n <div class="vc-fold-inner"></div>\n {{else if (lineType == \'value\')}}\n <i class="vc-code-{{valueType}}">{{value}}</i>\n {{else if (lineType == \'kv\')}}\n <i class="vc-code-key{{if (keyType)}} vc-code-{{keyType}}-key{{/if}}">{{key}}</i>: <i class="vc-code-{{valueType}}">{{value}}</i>\n {{/if}}\n</div>';
  2240. },
  2241. function(e, t) {
  2242. e.exports =
  2243. '<span>\n <i class="vc-code-key{{if (keyType)}} vc-code-{{keyType}}-key{{/if}}">{{key}}</i>: <i class="vc-code-{{valueType}}">{{value}}</i>\n</span>';
  2244. },
  2245. function(e, t) {
  2246. e.exports =
  2247. '<div>\n <div class="vc-log"></div>\n <form class="vc-cmd">\n <button class="vc-cmd-btn" type="submit">OK</button>\n <div class="vc-cmd-input-wrap">\n <textarea class="vc-cmd-input" placeholder="command..."></textarea>\n </div>\n </form>\n</div>';
  2248. },
  2249. function(e, t) {
  2250. e.exports =
  2251. '<pre class="vc-item-code vc-item-code-{{type}}">{{content}}</pre>';
  2252. },
  2253. function(e, t, o) {
  2254. "use strict";
  2255. function n(e) {
  2256. return e && e.__esModule ? e : { default: e };
  2257. }
  2258. function i(e) {
  2259. if (e && e.__esModule) return e;
  2260. var t = {};
  2261. if (null != e)
  2262. for (var o in e)
  2263. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  2264. return (t["default"] = e), t;
  2265. }
  2266. function a(e, t) {
  2267. if (!(e instanceof t))
  2268. throw new TypeError("Cannot call a class as a function");
  2269. }
  2270. function r(e, t) {
  2271. if (!e)
  2272. throw new ReferenceError(
  2273. "this hasn't been initialised - super() hasn't been called"
  2274. );
  2275. return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  2276. }
  2277. function l(e, t) {
  2278. if ("function" != typeof t && null !== t)
  2279. throw new TypeError(
  2280. "Super expression must either be null or a function, not " +
  2281. typeof t
  2282. );
  2283. (e.prototype = Object.create(t && t.prototype, {
  2284. constructor: {
  2285. value: e,
  2286. enumerable: !1,
  2287. writable: !0,
  2288. configurable: !0
  2289. }
  2290. })),
  2291. t &&
  2292. (Object.setPrototypeOf
  2293. ? Object.setPrototypeOf(e, t)
  2294. : (e.__proto__ = t));
  2295. }
  2296. Object.defineProperty(t, "__esModule", { value: !0 });
  2297. var c = (function() {
  2298. function e(e, t) {
  2299. for (var o = 0; o < t.length; o++) {
  2300. var n = t[o];
  2301. (n.enumerable = n.enumerable || !1),
  2302. (n.configurable = !0),
  2303. "value" in n && (n.writable = !0),
  2304. Object.defineProperty(e, n.key, n);
  2305. }
  2306. }
  2307. return function(t, o, n) {
  2308. return o && e(t.prototype, o), n && e(t, n), t;
  2309. };
  2310. })(),
  2311. s = function g(e, t, o) {
  2312. null === e && (e = Function.prototype);
  2313. var n = Object.getOwnPropertyDescriptor(e, t);
  2314. if (void 0 === n) {
  2315. var i = Object.getPrototypeOf(e);
  2316. return null === i ? void 0 : g(i, t, o);
  2317. }
  2318. if ("value" in n) return n.value;
  2319. var a = n.get;
  2320. if (void 0 !== a) return a.call(o);
  2321. },
  2322. d = o(4),
  2323. u = (i(d), o(17)),
  2324. v = n(u),
  2325. f = o(25),
  2326. p = n(f),
  2327. h = (function(e) {
  2328. function t() {
  2329. var e;
  2330. a(this, t);
  2331. for (var o = arguments.length, n = Array(o), i = 0; o > i; i++)
  2332. n[i] = arguments[i];
  2333. var l = r(
  2334. this,
  2335. (e = Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))
  2336. );
  2337. return (
  2338. (l.tplTabbox = p["default"]), (l.allowUnformattedLog = !1), l
  2339. );
  2340. }
  2341. return (
  2342. l(t, e),
  2343. c(t, [
  2344. {
  2345. key: "onInit",
  2346. value: function() {
  2347. s(Object.getPrototypeOf(t.prototype), "onInit", this).call(
  2348. this
  2349. ),
  2350. this.printSystemInfo();
  2351. }
  2352. },
  2353. {
  2354. key: "printSystemInfo",
  2355. value: function() {
  2356. var e = navigator.userAgent,
  2357. t = "",
  2358. o = e.match(/(ipod).*\s([\d_]+)/i),
  2359. n = e.match(/(ipad).*\s([\d_]+)/i),
  2360. i = e.match(/(iphone)\sos\s([\d_]+)/i),
  2361. a = e.match(/(android)\s([\d\.]+)/i);
  2362. (t = "Unknown"),
  2363. a
  2364. ? (t = "Android " + a[2])
  2365. : i
  2366. ? (t = "iPhone, iOS " + i[2].replace(/_/g, "."))
  2367. : n
  2368. ? (t = "iPad, iOS " + n[2].replace(/_/g, "."))
  2369. : o && (t = "iPod, iOS " + o[2].replace(/_/g, "."));
  2370. var r = t,
  2371. l = e.match(/MicroMessenger\/([\d\.]+)/i);
  2372. (t = "Unknown"),
  2373. l && l[1]
  2374. ? ((t = l[1]),
  2375. (r += ", WeChat " + t),
  2376. console.info("[system]", "System:", r))
  2377. : console.info("[system]", "System:", r),
  2378. (t = "Unknown"),
  2379. (t =
  2380. "https:" == location.protocol
  2381. ? "HTTPS"
  2382. : "http:" == location.protocol
  2383. ? "HTTP"
  2384. : location.protocol.replace(":", "")),
  2385. (r = t);
  2386. var c = e.toLowerCase().match(/ nettype\/([^ ]+)/g);
  2387. (t = "Unknown"),
  2388. c && c[0]
  2389. ? ((c = c[0].split("/")),
  2390. (t = c[1]),
  2391. (r += ", " + t),
  2392. console.info("[system]", "Network:", r))
  2393. : console.info("[system]", "Protocol:", r),
  2394. console.info("[system]", "UA:", e),
  2395. setTimeout(function() {
  2396. var e =
  2397. window.performance ||
  2398. window.msPerformance ||
  2399. window.webkitPerformance;
  2400. if (e && e.timing) {
  2401. var t = e.timing;
  2402. t.navigationStart &&
  2403. console.info(
  2404. "[system]",
  2405. "navigationStart:",
  2406. t.navigationStart
  2407. ),
  2408. t.navigationStart &&
  2409. t.domainLookupStart &&
  2410. console.info(
  2411. "[system]",
  2412. "navigation:",
  2413. t.domainLookupStart - t.navigationStart + "ms"
  2414. ),
  2415. t.domainLookupEnd &&
  2416. t.domainLookupStart &&
  2417. console.info(
  2418. "[system]",
  2419. "dns:",
  2420. t.domainLookupEnd - t.domainLookupStart + "ms"
  2421. ),
  2422. t.connectEnd &&
  2423. t.connectStart &&
  2424. (t.connectEnd && t.secureConnectionStart
  2425. ? console.info(
  2426. "[system]",
  2427. "tcp (ssl):",
  2428. t.connectEnd -
  2429. t.connectStart +
  2430. "ms (" +
  2431. (t.connectEnd - t.secureConnectionStart) +
  2432. "ms)"
  2433. )
  2434. : console.info(
  2435. "[system]",
  2436. "tcp:",
  2437. t.connectEnd - t.connectStart + "ms"
  2438. )),
  2439. t.responseStart &&
  2440. t.requestStart &&
  2441. console.info(
  2442. "[system]",
  2443. "request:",
  2444. t.responseStart - t.requestStart + "ms"
  2445. ),
  2446. t.responseEnd &&
  2447. t.responseStart &&
  2448. console.info(
  2449. "[system]",
  2450. "response:",
  2451. t.responseEnd - t.responseStart + "ms"
  2452. ),
  2453. t.domComplete &&
  2454. t.domLoading &&
  2455. (t.domContentLoadedEventStart && t.domLoading
  2456. ? console.info(
  2457. "[system]",
  2458. "domComplete (domLoaded):",
  2459. t.domComplete -
  2460. t.domLoading +
  2461. "ms (" +
  2462. (t.domContentLoadedEventStart -
  2463. t.domLoading) +
  2464. "ms)"
  2465. )
  2466. : console.info(
  2467. "[system]",
  2468. "domComplete:",
  2469. t.domComplete - t.domLoading + "ms"
  2470. )),
  2471. t.loadEventEnd &&
  2472. t.loadEventStart &&
  2473. console.info(
  2474. "[system]",
  2475. "loadEvent:",
  2476. t.loadEventEnd - t.loadEventStart + "ms"
  2477. ),
  2478. t.navigationStart &&
  2479. t.loadEventEnd &&
  2480. console.info(
  2481. "[system]",
  2482. "total (DOM):",
  2483. t.loadEventEnd -
  2484. t.navigationStart +
  2485. "ms (" +
  2486. (t.domComplete - t.navigationStart) +
  2487. "ms)"
  2488. );
  2489. }
  2490. }, 0);
  2491. }
  2492. }
  2493. ]),
  2494. t
  2495. );
  2496. })(v["default"]);
  2497. (t["default"] = h), (e.exports = t["default"]);
  2498. },
  2499. function(e, t) {
  2500. e.exports = '<div>\n <div class="vc-log"></div>\n</div>';
  2501. },
  2502. function(e, t, o) {
  2503. "use strict";
  2504. function n(e) {
  2505. if (e && e.__esModule) return e;
  2506. var t = {};
  2507. if (null != e)
  2508. for (var o in e)
  2509. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  2510. return (t["default"] = e), t;
  2511. }
  2512. function i(e) {
  2513. return e && e.__esModule ? e : { default: e };
  2514. }
  2515. function a(e, t) {
  2516. if (!(e instanceof t))
  2517. throw new TypeError("Cannot call a class as a function");
  2518. }
  2519. function r(e, t) {
  2520. if (!e)
  2521. throw new ReferenceError(
  2522. "this hasn't been initialised - super() hasn't been called"
  2523. );
  2524. return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  2525. }
  2526. function l(e, t) {
  2527. if ("function" != typeof t && null !== t)
  2528. throw new TypeError(
  2529. "Super expression must either be null or a function, not " +
  2530. typeof t
  2531. );
  2532. (e.prototype = Object.create(t && t.prototype, {
  2533. constructor: {
  2534. value: e,
  2535. enumerable: !1,
  2536. writable: !0,
  2537. configurable: !0
  2538. }
  2539. })),
  2540. t &&
  2541. (Object.setPrototypeOf
  2542. ? Object.setPrototypeOf(e, t)
  2543. : (e.__proto__ = t));
  2544. }
  2545. Object.defineProperty(t, "__esModule", { value: !0 });
  2546. var c = (function() {
  2547. function e(e, t) {
  2548. for (var o = 0; o < t.length; o++) {
  2549. var n = t[o];
  2550. (n.enumerable = n.enumerable || !1),
  2551. (n.configurable = !0),
  2552. "value" in n && (n.writable = !0),
  2553. Object.defineProperty(e, n.key, n);
  2554. }
  2555. }
  2556. return function(t, o, n) {
  2557. return o && e(t.prototype, o), n && e(t, n), t;
  2558. };
  2559. })(),
  2560. s = o(5),
  2561. d = i(s),
  2562. u = o(4),
  2563. v = n(u),
  2564. f = o(18),
  2565. p = i(f),
  2566. h = o(27),
  2567. g = i(h),
  2568. b = o(28),
  2569. m = i(b),
  2570. y = o(29),
  2571. _ = i(y),
  2572. w = (function(e) {
  2573. function t() {
  2574. var e;
  2575. a(this, t);
  2576. for (var o = arguments.length, n = Array(o), i = 0; o > i; i++)
  2577. n[i] = arguments[i];
  2578. var l = r(
  2579. this,
  2580. (e = Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))
  2581. );
  2582. return (
  2583. (l.$tabbox = d["default"].render(g["default"], {})),
  2584. (l.$header = null),
  2585. (l.reqList = {}),
  2586. (l.domList = {}),
  2587. (l.isReady = !1),
  2588. (l.isShow = !1),
  2589. (l.isInBottom = !0),
  2590. (l._open = void 0),
  2591. (l._send = void 0),
  2592. l.mockAjax(),
  2593. l
  2594. );
  2595. }
  2596. return (
  2597. l(t, e),
  2598. c(t, [
  2599. {
  2600. key: "onRenderTab",
  2601. value: function(e) {
  2602. e(this.$tabbox);
  2603. }
  2604. },
  2605. {
  2606. key: "onAddTool",
  2607. value: function(e) {
  2608. var t = this,
  2609. o = [
  2610. {
  2611. name: "Clear",
  2612. global: !1,
  2613. onClick: function(e) {
  2614. t.clearLog();
  2615. }
  2616. }
  2617. ];
  2618. e(o);
  2619. }
  2620. },
  2621. {
  2622. key: "onReady",
  2623. value: function() {
  2624. var e = this;
  2625. (e.isReady = !0),
  2626. this.renderHeader(),
  2627. d["default"].delegate(
  2628. d["default"].one(".vc-log", this.$tabbox),
  2629. "click",
  2630. ".vc-group-preview",
  2631. function(t) {
  2632. var o = this.dataset.reqid,
  2633. n = this.parentNode;
  2634. d["default"].hasClass(n, "vc-actived")
  2635. ? (d["default"].removeClass(n, "vc-actived"),
  2636. e.updateRequest(o, { actived: !1 }))
  2637. : (d["default"].addClass(n, "vc-actived"),
  2638. e.updateRequest(o, { actived: !0 })),
  2639. t.preventDefault();
  2640. }
  2641. );
  2642. var t = d["default"].one(".vc-content");
  2643. d["default"].bind(t, "scroll", function(o) {
  2644. e.isShow &&
  2645. (t.scrollTop + t.offsetHeight >= t.scrollHeight
  2646. ? (e.isInBottom = !0)
  2647. : (e.isInBottom = !1));
  2648. });
  2649. for (var o in e.reqList) e.updateRequest(o, {});
  2650. }
  2651. },
  2652. {
  2653. key: "onRemove",
  2654. value: function() {
  2655. window.XMLHttpRequest &&
  2656. ((window.XMLHttpRequest.prototype.open = this._open),
  2657. (window.XMLHttpRequest.prototype.send = this._send),
  2658. (this._open = void 0),
  2659. (this._send = void 0));
  2660. }
  2661. },
  2662. {
  2663. key: "onShow",
  2664. value: function() {
  2665. (this.isShow = !0),
  2666. 1 == this.isInBottom && this.scrollToBottom();
  2667. }
  2668. },
  2669. {
  2670. key: "onHide",
  2671. value: function() {
  2672. this.isShow = !1;
  2673. }
  2674. },
  2675. {
  2676. key: "onShowConsole",
  2677. value: function() {
  2678. 1 == this.isInBottom && this.scrollToBottom();
  2679. }
  2680. },
  2681. {
  2682. key: "scrollToBottom",
  2683. value: function() {
  2684. var e = d["default"].one(".vc-content");
  2685. e.scrollTop = e.scrollHeight - e.offsetHeight;
  2686. }
  2687. },
  2688. {
  2689. key: "clearLog",
  2690. value: function() {
  2691. this.reqList = {};
  2692. for (var e in this.domList)
  2693. this.domList[e].remove(), (this.domList[e] = void 0);
  2694. (this.domList = {}), this.renderHeader();
  2695. }
  2696. },
  2697. {
  2698. key: "renderHeader",
  2699. value: function() {
  2700. var e = Object.keys(this.reqList).length,
  2701. t = d["default"].render(m["default"], { count: e }),
  2702. o = d["default"].one(".vc-log", this.$tabbox);
  2703. this.$header
  2704. ? this.$header.parentNode.replaceChild(t, this.$header)
  2705. : o.parentNode.insertBefore(t, o),
  2706. (this.$header = t);
  2707. }
  2708. },
  2709. {
  2710. key: "updateRequest",
  2711. value: function(e, t) {
  2712. var o = Object.keys(this.reqList).length,
  2713. n = this.reqList[e] || {};
  2714. for (var i in t) n[i] = t[i];
  2715. if (((this.reqList[e] = n), this.isReady)) {
  2716. var a = {
  2717. id: e,
  2718. url: n.url,
  2719. status: n.status,
  2720. method: n.method || "-",
  2721. costTime: n.costTime > 0 ? n.costTime + "ms" : "-",
  2722. header: n.header || null,
  2723. getData: n.getData || null,
  2724. postData: n.postData || null,
  2725. response: null,
  2726. actived: !!n.actived
  2727. };
  2728. switch (n.responseType) {
  2729. case "":
  2730. case "text":
  2731. if (v.isString(n.response))
  2732. try {
  2733. (a.response = JSON.parse(n.response)),
  2734. (a.response = JSON.stringify(
  2735. a.response,
  2736. null,
  2737. 1
  2738. )),
  2739. (a.response = v.htmlEncode(a.response));
  2740. } catch (r) {
  2741. a.response = v.htmlEncode(n.response);
  2742. }
  2743. else
  2744. "undefined" != typeof n.response &&
  2745. (a.response = Object.prototype.toString.call(
  2746. n.response
  2747. ));
  2748. break;
  2749. case "json":
  2750. "undefined" != typeof n.response &&
  2751. (a.response = JSON.stringify(n.response, null, 1));
  2752. break;
  2753. case "blob":
  2754. case "document":
  2755. case "arraybuffer":
  2756. default:
  2757. "undefined" != typeof n.response &&
  2758. (a.response = Object.prototype.toString.call(
  2759. n.response
  2760. ));
  2761. }
  2762. 0 == n.readyState || 1 == n.readyState
  2763. ? (a.status = "Pending")
  2764. : 2 == n.readyState || 3 == n.readyState
  2765. ? (a.status = "Loading")
  2766. : 4 == n.readyState || (a.status = "Unknown");
  2767. var l = d["default"].render(_["default"], a),
  2768. c = this.domList[e];
  2769. n.status >= 400 &&
  2770. d["default"].addClass(
  2771. d["default"].one(".vc-group-preview", l),
  2772. "vc-table-row-error"
  2773. ),
  2774. c
  2775. ? c.parentNode.replaceChild(l, c)
  2776. : d["default"]
  2777. .one(".vc-log", this.$tabbox)
  2778. .insertAdjacentElement("beforeend", l),
  2779. (this.domList[e] = l);
  2780. var s = Object.keys(this.reqList).length;
  2781. s != o && this.renderHeader(),
  2782. this.isInBottom && this.scrollToBottom();
  2783. }
  2784. }
  2785. },
  2786. {
  2787. key: "mockAjax",
  2788. value: function() {
  2789. var e = window.XMLHttpRequest;
  2790. if (e) {
  2791. var t = this,
  2792. o = window.XMLHttpRequest.prototype.open,
  2793. n = window.XMLHttpRequest.prototype.send;
  2794. (t._open = o),
  2795. (t._send = n),
  2796. (window.XMLHttpRequest.prototype.open = function() {
  2797. var e = this,
  2798. n = [].slice.call(arguments),
  2799. i = n[0],
  2800. a = n[1],
  2801. r = t.getUniqueID(),
  2802. l = null;
  2803. (e._requestID = r), (e._method = i), (e._url = a);
  2804. var c = e.onreadystatechange || function() {},
  2805. s = function() {
  2806. var o = t.reqList[r] || {};
  2807. if (
  2808. ((o.readyState = e.readyState),
  2809. (o.status = 0),
  2810. e.readyState > 1 && (o.status = e.status),
  2811. (o.responseType = e.responseType),
  2812. 0 == e.readyState)
  2813. )
  2814. o.startTime || (o.startTime = +new Date());
  2815. else if (1 == e.readyState)
  2816. o.startTime || (o.startTime = +new Date());
  2817. else if (2 == e.readyState) {
  2818. o.header = {};
  2819. for (
  2820. var n = e.getAllResponseHeaders() || "",
  2821. i = n.split("\n"),
  2822. a = 0;
  2823. a < i.length;
  2824. a++
  2825. ) {
  2826. var s = i[a];
  2827. if (s) {
  2828. var d = s.split(": "),
  2829. u = d[0],
  2830. v = d.slice(1).join(": ");
  2831. o.header[u] = v;
  2832. }
  2833. }
  2834. } else
  2835. 3 == e.readyState ||
  2836. (4 == e.readyState
  2837. ? (clearInterval(l),
  2838. (o.endTime = +new Date()),
  2839. (o.costTime =
  2840. o.endTime - (o.startTime || o.endTime)),
  2841. (o.response = e.response))
  2842. : clearInterval(l));
  2843. return (
  2844. e._noVConsole || t.updateRequest(r, o),
  2845. c.apply(e, arguments)
  2846. );
  2847. };
  2848. e.onreadystatechange = s;
  2849. var d = -1;
  2850. return (
  2851. (l = setInterval(function() {
  2852. d != e.readyState &&
  2853. ((d = e.readyState), s.call(e));
  2854. }, 10)),
  2855. o.apply(e, n)
  2856. );
  2857. }),
  2858. (window.XMLHttpRequest.prototype.send = function() {
  2859. var e = this,
  2860. o = [].slice.call(arguments),
  2861. i = o[0],
  2862. a = t.reqList[e._requestID] || {};
  2863. a.method = e._method.toUpperCase();
  2864. var r = e._url.split("?");
  2865. if (((a.url = r.shift()), r.length > 0)) {
  2866. (a.getData = {}),
  2867. (r = r.join("?")),
  2868. (r = r.split("&"));
  2869. var l = !0,
  2870. c = !1,
  2871. s = void 0;
  2872. try {
  2873. for (
  2874. var d, u = r[Symbol.iterator]();
  2875. !(l = (d = u.next()).done);
  2876. l = !0
  2877. ) {
  2878. var f = d.value;
  2879. (f = f.split("=")), (a.getData[f[0]] = f[1]);
  2880. }
  2881. } catch (p) {
  2882. (c = !0), (s = p);
  2883. } finally {
  2884. try {
  2885. !l && u["return"] && u["return"]();
  2886. } finally {
  2887. if (c) throw s;
  2888. }
  2889. }
  2890. }
  2891. if ("POST" == a.method)
  2892. if (v.isString(i)) {
  2893. var h = i.split("&");
  2894. a.postData = {};
  2895. var g = !0,
  2896. b = !1,
  2897. m = void 0;
  2898. try {
  2899. for (
  2900. var y, _ = h[Symbol.iterator]();
  2901. !(g = (y = _.next()).done);
  2902. g = !0
  2903. ) {
  2904. var w = y.value;
  2905. (w = w.split("=")), (a.postData[w[0]] = w[1]);
  2906. }
  2907. } catch (p) {
  2908. (b = !0), (m = p);
  2909. } finally {
  2910. try {
  2911. !g && _["return"] && _["return"]();
  2912. } finally {
  2913. if (b) throw m;
  2914. }
  2915. }
  2916. } else v.isPlainObject(i) && (a.postData = i);
  2917. return (
  2918. e._noVConsole || t.updateRequest(e._requestID, a),
  2919. n.apply(e, o)
  2920. );
  2921. });
  2922. }
  2923. }
  2924. },
  2925. {
  2926. key: "getUniqueID",
  2927. value: function() {
  2928. var e = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
  2929. /[xy]/g,
  2930. function(e) {
  2931. var t = (16 * Math.random()) | 0,
  2932. o = "x" == e ? t : (3 & t) | 8;
  2933. return o.toString(16);
  2934. }
  2935. );
  2936. return e;
  2937. }
  2938. }
  2939. ]),
  2940. t
  2941. );
  2942. })(p["default"]);
  2943. (t["default"] = w), (e.exports = t["default"]);
  2944. },
  2945. function(e, t) {
  2946. e.exports =
  2947. '<div class="vc-table">\n <div class="vc-log"></div>\n</div>';
  2948. },
  2949. function(e, t) {
  2950. e.exports =
  2951. '<dl class="vc-table-row">\n <dd class="vc-table-col vc-table-col-4">Name {{if (count > 0)}}({{count}}){{/if}}</dd>\n <dd class="vc-table-col">Method</dd>\n <dd class="vc-table-col">Status</dd>\n <dd class="vc-table-col">Time</dd>\n</dl>';
  2952. },
  2953. function(e, t) {
  2954. e.exports =
  2955. '<div class="vc-group {{actived ? \'vc-actived\' : \'\'}}">\n <dl class="vc-table-row vc-group-preview" data-reqid="{{id}}">\n <dd class="vc-table-col vc-table-col-4">{{url}}</dd>\n <dd class="vc-table-col">{{method}}</dd>\n <dd class="vc-table-col">{{status}}</dd>\n <dd class="vc-table-col">{{costTime}}</dd>\n </dl>\n <div class="vc-group-detail">\n {{if (header !== null)}}\n <div>\n <dl class="vc-table-row vc-left-border">\n <dt class="vc-table-col vc-table-col-title">Headers</dt>\n </dl>\n {{for (var key in header)}}\n <div class="vc-table-row vc-left-border vc-small">\n <div class="vc-table-col vc-table-col-2">{{key}}</div>\n <div class="vc-table-col vc-table-col-4 vc-max-height-line">{{header[key]}}</div>\n </div>\n {{/for}}\n </div>\n {{/if}}\n {{if (getData !== null)}}\n <div>\n <dl class="vc-table-row vc-left-border">\n <dt class="vc-table-col vc-table-col-title">Query String Parameters</dt>\n </dl>\n {{for (var key in getData)}}\n <div class="vc-table-row vc-left-border vc-small">\n <div class="vc-table-col vc-table-col-2">{{key}}</div>\n <div class="vc-table-col vc-table-col-4 vc-max-height-line">{{getData[key]}}</div>\n </div>\n {{/for}}\n </div>\n {{/if}}\n {{if (postData !== null)}}\n <div>\n <dl class="vc-table-row vc-left-border">\n <dt class="vc-table-col vc-table-col-title">Form Data</dt>\n </dl>\n {{for (var key in postData)}}\n <div class="vc-table-row vc-left-border vc-small">\n <div class="vc-table-col vc-table-col-2">{{key}}</div>\n <div class="vc-table-col vc-table-col-4 vc-max-height-line">{{postData[key]}}</div>\n </div>\n {{/for}}\n </div>\n {{/if}}\n <div>\n <dl class="vc-table-row vc-left-border">\n <dt class="vc-table-col vc-table-col-title">Response</dt>\n </dl>\n <div class="vc-table-row vc-left-border vc-small">\n <pre class="vc-table-col vc-max-height vc-min-height">{{response || \'\'}}</pre>\n </div>\n </div>\n </div>\n</div>';
  2956. },
  2957. function(e, t, o) {
  2958. "use strict";
  2959. function n(e) {
  2960. if (e && e.__esModule) return e;
  2961. var t = {};
  2962. if (null != e)
  2963. for (var o in e)
  2964. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  2965. return (t["default"] = e), t;
  2966. }
  2967. function i(e) {
  2968. return e && e.__esModule ? e : { default: e };
  2969. }
  2970. function a(e, t) {
  2971. if (!(e instanceof t))
  2972. throw new TypeError("Cannot call a class as a function");
  2973. }
  2974. function r(e, t) {
  2975. if (!e)
  2976. throw new ReferenceError(
  2977. "this hasn't been initialised - super() hasn't been called"
  2978. );
  2979. return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  2980. }
  2981. function l(e, t) {
  2982. if ("function" != typeof t && null !== t)
  2983. throw new TypeError(
  2984. "Super expression must either be null or a function, not " +
  2985. typeof t
  2986. );
  2987. (e.prototype = Object.create(t && t.prototype, {
  2988. constructor: {
  2989. value: e,
  2990. enumerable: !1,
  2991. writable: !0,
  2992. configurable: !0
  2993. }
  2994. })),
  2995. t &&
  2996. (Object.setPrototypeOf
  2997. ? Object.setPrototypeOf(e, t)
  2998. : (e.__proto__ = t));
  2999. }
  3000. Object.defineProperty(t, "__esModule", { value: !0 });
  3001. var c = (function() {
  3002. function e(e, t) {
  3003. for (var o = 0; o < t.length; o++) {
  3004. var n = t[o];
  3005. (n.enumerable = n.enumerable || !1),
  3006. (n.configurable = !0),
  3007. "value" in n && (n.writable = !0),
  3008. Object.defineProperty(e, n.key, n);
  3009. }
  3010. }
  3011. return function(t, o, n) {
  3012. return o && e(t.prototype, o), n && e(t, n), t;
  3013. };
  3014. })();
  3015. o(31);
  3016. var s = o(18),
  3017. d = i(s),
  3018. u = o(33),
  3019. v = i(u),
  3020. f = o(34),
  3021. p = i(f),
  3022. h = o(4),
  3023. g = (n(h), o(5)),
  3024. b = i(g),
  3025. m = (function(e) {
  3026. function t() {
  3027. var e;
  3028. a(this, t);
  3029. for (var o = arguments.length, n = Array(o), i = 0; o > i; i++)
  3030. n[i] = arguments[i];
  3031. var l = r(
  3032. this,
  3033. (e = Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))
  3034. ),
  3035. c = l;
  3036. (c.isInited = !1),
  3037. (c.node = {}),
  3038. (c.$tabbox = b["default"].render(v["default"], {})),
  3039. (c.nodes = []),
  3040. (c.activedElem = {});
  3041. var s =
  3042. window.MutationObserver ||
  3043. window.WebKitMutationObserver ||
  3044. window.MozMutationObserver;
  3045. return (
  3046. (c.observer = new s(function(e) {
  3047. for (var t = 0; t < e.length; t++) {
  3048. var o = e[t];
  3049. c._isInVConsole(o.target) || c.onMutation(o);
  3050. }
  3051. })),
  3052. l
  3053. );
  3054. }
  3055. return (
  3056. l(t, e),
  3057. c(t, [
  3058. {
  3059. key: "onRenderTab",
  3060. value: function(e) {
  3061. e(this.$tabbox);
  3062. }
  3063. },
  3064. {
  3065. key: "onAddTool",
  3066. value: function(e) {
  3067. var t = this,
  3068. o = [
  3069. {
  3070. name: "Expend",
  3071. global: !1,
  3072. onClick: function(e) {
  3073. if (t.activedElem)
  3074. if (
  3075. b["default"].hasClass(t.activedElem, "vc-toggle")
  3076. )
  3077. for (
  3078. var o = 0;
  3079. o < t.activedElem.childNodes.length;
  3080. o++
  3081. ) {
  3082. var n = t.activedElem.childNodes[o];
  3083. if (
  3084. b["default"].hasClass(n, "vcelm-l") &&
  3085. !b["default"].hasClass(n, "vcelm-noc") &&
  3086. !b["default"].hasClass(n, "vc-toggle")
  3087. ) {
  3088. b["default"].one(".vcelm-node", n).click();
  3089. break;
  3090. }
  3091. }
  3092. else
  3093. b["default"]
  3094. .one(".vcelm-node", t.activedElem)
  3095. .click();
  3096. }
  3097. },
  3098. {
  3099. name: "Collapse",
  3100. global: !1,
  3101. onClick: function(e) {
  3102. t.activedElem &&
  3103. (b["default"].hasClass(t.activedElem, "vc-toggle")
  3104. ? b["default"]
  3105. .one(".vcelm-node", t.activedElem)
  3106. .click()
  3107. : t.activedElem.parentNode &&
  3108. b["default"].hasClass(
  3109. t.activedElem.parentNode,
  3110. "vcelm-l"
  3111. ) &&
  3112. b["default"]
  3113. .one(".vcelm-node", t.activedElem.parentNode)
  3114. .click());
  3115. }
  3116. }
  3117. ];
  3118. e(o);
  3119. }
  3120. },
  3121. {
  3122. key: "onShow",
  3123. value: function() {
  3124. if (!this.isInited) {
  3125. (this.isInited = !0),
  3126. (this.node = this.getNode(document.documentElement));
  3127. var e = this.renderView(
  3128. this.node,
  3129. b["default"].one(".vc-log", this.$tabbox)
  3130. ),
  3131. t = b["default"].one(".vcelm-node", e);
  3132. t && t.click();
  3133. var o = {
  3134. attributes: !0,
  3135. childList: !0,
  3136. characterData: !0,
  3137. subtree: !0
  3138. };
  3139. this.observer.observe(document.documentElement, o);
  3140. }
  3141. }
  3142. },
  3143. {
  3144. key: "onRemove",
  3145. value: function() {
  3146. this.observer.disconnect();
  3147. }
  3148. },
  3149. {
  3150. key: "onMutation",
  3151. value: function(e) {
  3152. switch (e.type) {
  3153. case "childList":
  3154. e.removedNodes.length > 0 && this.onChildRemove(e),
  3155. e.addedNodes.length > 0 && this.onChildAdd(e);
  3156. break;
  3157. case "attributes":
  3158. this.onAttributesChange(e);
  3159. break;
  3160. case "characterData":
  3161. this.onCharacterDataChange(e);
  3162. }
  3163. }
  3164. },
  3165. {
  3166. key: "onChildRemove",
  3167. value: function(e) {
  3168. var t = e.target,
  3169. o = t.__vconsole_node;
  3170. if (o) {
  3171. for (var n = 0; n < e.removedNodes.length; n++) {
  3172. var i = e.removedNodes[n],
  3173. a = i.__vconsole_node;
  3174. a && a.view && a.view.parentNode.removeChild(a.view);
  3175. }
  3176. this.getNode(t);
  3177. }
  3178. }
  3179. },
  3180. {
  3181. key: "onChildAdd",
  3182. value: function(e) {
  3183. var t = e.target,
  3184. o = t.__vconsole_node;
  3185. if (o) {
  3186. this.getNode(t),
  3187. o.view && b["default"].removeClass(o.view, "vcelm-noc");
  3188. for (var n = 0; n < e.addedNodes.length; n++) {
  3189. var i = e.addedNodes[n],
  3190. a = i.__vconsole_node;
  3191. if (a)
  3192. if (null !== e.nextSibling) {
  3193. var r = e.nextSibling.__vconsole_node;
  3194. r.view && this.renderView(a, r.view, "insertBefore");
  3195. } else
  3196. o.view &&
  3197. (o.view.lastChild
  3198. ? this.renderView(
  3199. a,
  3200. o.view.lastChild,
  3201. "insertBefore"
  3202. )
  3203. : this.renderView(a, o.view));
  3204. }
  3205. }
  3206. }
  3207. },
  3208. {
  3209. key: "onAttributesChange",
  3210. value: function(e) {
  3211. var t = e.target.__vconsole_node;
  3212. t &&
  3213. ((t = this.getNode(e.target)),
  3214. t.view && this.renderView(t, t.view, !0));
  3215. }
  3216. },
  3217. {
  3218. key: "onCharacterDataChange",
  3219. value: function(e) {
  3220. var t = e.target.__vconsole_node;
  3221. t &&
  3222. ((t = this.getNode(e.target)),
  3223. t.view && this.renderView(t, t.view, !0));
  3224. }
  3225. },
  3226. {
  3227. key: "renderView",
  3228. value: function(e, t, o) {
  3229. var n = this,
  3230. i = new p["default"](e).get();
  3231. switch (
  3232. ((e.view = i),
  3233. b["default"].delegate(i, "click", ".vcelm-node", function(
  3234. t
  3235. ) {
  3236. t.stopPropagation();
  3237. var o = this.parentNode;
  3238. if (!b["default"].hasClass(o, "vcelm-noc")) {
  3239. (n.activedElem = o),
  3240. b["default"].hasClass(o, "vc-toggle")
  3241. ? b["default"].removeClass(o, "vc-toggle")
  3242. : b["default"].addClass(o, "vc-toggle");
  3243. for (var i = -1, a = 0; a < o.children.length; a++) {
  3244. var r = o.children[a];
  3245. b["default"].hasClass(r, "vcelm-l") &&
  3246. (i++,
  3247. r.children.length > 0 ||
  3248. (e.childNodes[i]
  3249. ? n.renderView(e.childNodes[i], r, "replace")
  3250. : (r.style.display = "none")));
  3251. }
  3252. }
  3253. }),
  3254. o)
  3255. ) {
  3256. case "replace":
  3257. t.parentNode.replaceChild(i, t);
  3258. break;
  3259. case "insertBefore":
  3260. t.parentNode.insertBefore(i, t);
  3261. break;
  3262. default:
  3263. t.appendChild(i);
  3264. }
  3265. return i;
  3266. }
  3267. },
  3268. {
  3269. key: "getNode",
  3270. value: function(e) {
  3271. if (!this._isIgnoredElement(e)) {
  3272. var t = e.__vconsole_node || {};
  3273. if (
  3274. ((t.nodeType = e.nodeType),
  3275. (t.nodeName = e.nodeName),
  3276. (t.tagName = e.tagName || ""),
  3277. (t.textContent = ""),
  3278. (t.nodeType != e.TEXT_NODE &&
  3279. t.nodeType != e.DOCUMENT_TYPE_NODE) ||
  3280. (t.textContent = e.textContent),
  3281. (t.id = e.id || ""),
  3282. (t.className = e.className || ""),
  3283. (t.attributes = []),
  3284. e.hasAttributes && e.hasAttributes())
  3285. )
  3286. for (var o = 0; o < e.attributes.length; o++)
  3287. t.attributes.push({
  3288. name: e.attributes[o].name,
  3289. value: e.attributes[o].value || ""
  3290. });
  3291. if (((t.childNodes = []), e.childNodes.length > 0))
  3292. for (var n = 0; n < e.childNodes.length; n++) {
  3293. var i = this.getNode(e.childNodes[n]);
  3294. i && t.childNodes.push(i);
  3295. }
  3296. return (e.__vconsole_node = t), t;
  3297. }
  3298. }
  3299. },
  3300. {
  3301. key: "_isIgnoredElement",
  3302. value: function(e) {
  3303. return (
  3304. e.nodeType == e.TEXT_NODE &&
  3305. "" ==
  3306. e.textContent.replace(
  3307. /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$|\n+/g,
  3308. ""
  3309. )
  3310. );
  3311. }
  3312. },
  3313. {
  3314. key: "_isInVConsole",
  3315. value: function(e) {
  3316. for (var t = e; void 0 != t; ) {
  3317. if ("__vconsole" == t.id) return !0;
  3318. t = t.parentNode || void 0;
  3319. }
  3320. return !1;
  3321. }
  3322. }
  3323. ]),
  3324. t
  3325. );
  3326. })(d["default"]);
  3327. (t["default"] = m), (e.exports = t["default"]);
  3328. },
  3329. function(e, t, o) {
  3330. var n = o(32);
  3331. "string" == typeof n && (n = [[e.id, n, ""]]);
  3332. o(10)(n, {});
  3333. n.locals && (e.exports = n.locals);
  3334. },
  3335. function(e, t, o) {
  3336. (t = e.exports = o(9)()),
  3337. t.push([
  3338. e.id,
  3339. '.vcelm-node{color:#183691}.vcelm-k{color:#0086b3}.vcelm-v{color:#905}.vcelm-l{padding-left:8px;position:relative;word-wrap:break-word;line-height:1}.vcelm-l.vc-toggle>.vcelm-node{display:block}.vcelm-l .vcelm-node:active{background-color:rgba(0,0,0,.15)}.vcelm-l.vcelm-noc .vcelm-node:active{background-color:transparent}.vcelm-t{white-space:pre-wrap;word-wrap:break-word}.vcelm-l .vcelm-l{display:none}.vcelm-l.vc-toggle>.vcelm-l{margin-left:4px;display:block}.vcelm-l:before{content:"";display:block;position:absolute;top:6px;left:3px;width:0;height:0;border:3px solid transparent;border-left-color:#000}.vcelm-l.vc-toggle:before{display:block;top:6px;left:0;border-top-color:#000;border-left-color:transparent}.vcelm-l.vcelm-noc:before{display:none}',
  3340. ""
  3341. ]);
  3342. },
  3343. function(e, t) {
  3344. e.exports = '<div>\n <div class="vc-log"></div>\n</div>';
  3345. },
  3346. function(e, t, o) {
  3347. "use strict";
  3348. function n(e) {
  3349. if (e && e.__esModule) return e;
  3350. var t = {};
  3351. if (null != e)
  3352. for (var o in e)
  3353. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  3354. return (t["default"] = e), t;
  3355. }
  3356. function i(e) {
  3357. return e && e.__esModule ? e : { default: e };
  3358. }
  3359. function a(e, t) {
  3360. if (!(e instanceof t))
  3361. throw new TypeError("Cannot call a class as a function");
  3362. }
  3363. function r(e) {
  3364. var t = ["br", "hr", "img", "input", "link", "meta"];
  3365. return (e = e ? e.toLowerCase() : ""), t.indexOf(e) > -1;
  3366. }
  3367. function l(e) {
  3368. return document.createTextNode(e);
  3369. }
  3370. function c(e) {
  3371. return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  3372. }
  3373. Object.defineProperty(t, "__esModule", { value: !0 });
  3374. var s = (function() {
  3375. function e(e, t) {
  3376. for (var o = 0; o < t.length; o++) {
  3377. var n = t[o];
  3378. (n.enumerable = n.enumerable || !1),
  3379. (n.configurable = !0),
  3380. "value" in n && (n.writable = !0),
  3381. Object.defineProperty(e, n.key, n);
  3382. }
  3383. }
  3384. return function(t, o, n) {
  3385. return o && e(t.prototype, o), n && e(t, n), t;
  3386. };
  3387. })(),
  3388. d = o(35),
  3389. u = i(d),
  3390. v = o(36),
  3391. f = i(v),
  3392. p = o(4),
  3393. h = (n(p), o(5)),
  3394. g = i(h),
  3395. b = (function() {
  3396. function e(t) {
  3397. a(this, e), (this.node = t), (this.view = this._create(this.node));
  3398. }
  3399. return (
  3400. s(e, [
  3401. {
  3402. key: "get",
  3403. value: function() {
  3404. return this.view;
  3405. }
  3406. },
  3407. {
  3408. key: "_create",
  3409. value: function(e, t) {
  3410. var o = document.createElement("DIV");
  3411. switch ((g["default"].addClass(o, "vcelm-l"), e.nodeType)) {
  3412. case o.ELEMENT_NODE:
  3413. this._createElementNode(e, o);
  3414. break;
  3415. case o.TEXT_NODE:
  3416. this._createTextNode(e, o);
  3417. break;
  3418. case o.COMMENT_NODE:
  3419. case o.DOCUMENT_NODE:
  3420. case o.DOCUMENT_TYPE_NODE:
  3421. case o.DOCUMENT_FRAGMENT_NODE:
  3422. }
  3423. return o;
  3424. }
  3425. },
  3426. {
  3427. key: "_createTextNode",
  3428. value: function(e, t) {
  3429. g["default"].addClass(t, "vcelm-t vcelm-noc"),
  3430. e.textContent && t.appendChild(l(c(e.textContent)));
  3431. }
  3432. },
  3433. {
  3434. key: "_createElementNode",
  3435. value: function(e, t) {
  3436. var o = r(e.tagName),
  3437. n = o;
  3438. 0 == e.childNodes.length && (n = !0);
  3439. var i = g["default"].render(u["default"], { node: e }),
  3440. a = g["default"].render(f["default"], { node: e });
  3441. if (n)
  3442. g["default"].addClass(t, "vcelm-noc"),
  3443. t.appendChild(i),
  3444. o || t.appendChild(a);
  3445. else {
  3446. t.appendChild(i);
  3447. for (var l = 0; l < e.childNodes.length; l++) {
  3448. var c = document.createElement("DIV");
  3449. g["default"].addClass(c, "vcelm-l"), t.appendChild(c);
  3450. }
  3451. o || t.appendChild(a);
  3452. }
  3453. }
  3454. }
  3455. ]),
  3456. e
  3457. );
  3458. })();
  3459. (t["default"] = b), (e.exports = t["default"]);
  3460. },
  3461. function(e, t) {
  3462. e.exports =
  3463. '<span class="vcelm-node">&lt;{{node.tagName.toLowerCase()}}{{if (node.className || node.attributes.length)}}\n <i class="vcelm-k">\n {{for (var i = 0; i < node.attributes.length; i++)}}\n {{if (node.attributes[i].value !== \'\')}}\n {{node.attributes[i].name}}="<i class="vcelm-v">{{node.attributes[i].value}}</i>"{{else}}\n {{node.attributes[i].name}}{{/if}}{{/for}}</i>{{/if}}&gt;</span>';
  3464. },
  3465. function(e, t) {
  3466. e.exports =
  3467. '<span class="vcelm-node">&lt;/{{node.tagName.toLowerCase()}}&gt;</span>';
  3468. },
  3469. function(e, t, o) {
  3470. "use strict";
  3471. function n(e) {
  3472. if (e && e.__esModule) return e;
  3473. var t = {};
  3474. if (null != e)
  3475. for (var o in e)
  3476. Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
  3477. return (t["default"] = e), t;
  3478. }
  3479. function i(e) {
  3480. return e && e.__esModule ? e : { default: e };
  3481. }
  3482. function a(e, t) {
  3483. if (!(e instanceof t))
  3484. throw new TypeError("Cannot call a class as a function");
  3485. }
  3486. function r(e, t) {
  3487. if (!e)
  3488. throw new ReferenceError(
  3489. "this hasn't been initialised - super() hasn't been called"
  3490. );
  3491. return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  3492. }
  3493. function l(e, t) {
  3494. if ("function" != typeof t && null !== t)
  3495. throw new TypeError(
  3496. "Super expression must either be null or a function, not " +
  3497. typeof t
  3498. );
  3499. (e.prototype = Object.create(t && t.prototype, {
  3500. constructor: {
  3501. value: e,
  3502. enumerable: !1,
  3503. writable: !0,
  3504. configurable: !0
  3505. }
  3506. })),
  3507. t &&
  3508. (Object.setPrototypeOf
  3509. ? Object.setPrototypeOf(e, t)
  3510. : (e.__proto__ = t));
  3511. }
  3512. Object.defineProperty(t, "__esModule", { value: !0 });
  3513. var c = (function() {
  3514. function e(e, t) {
  3515. for (var o = 0; o < t.length; o++) {
  3516. var n = t[o];
  3517. (n.enumerable = n.enumerable || !1),
  3518. (n.configurable = !0),
  3519. "value" in n && (n.writable = !0),
  3520. Object.defineProperty(e, n.key, n);
  3521. }
  3522. }
  3523. return function(t, o, n) {
  3524. return o && e(t.prototype, o), n && e(t, n), t;
  3525. };
  3526. })(),
  3527. s = o(18),
  3528. d = i(s),
  3529. u = o(38),
  3530. v = i(u),
  3531. f = o(39),
  3532. p = i(f),
  3533. h = o(4),
  3534. g = n(h),
  3535. b = o(5),
  3536. m = i(b),
  3537. y = (function(e) {
  3538. function t() {
  3539. var e;
  3540. a(this, t);
  3541. for (var o = arguments.length, n = Array(o), i = 0; o > i; i++)
  3542. n[i] = arguments[i];
  3543. var l = r(
  3544. this,
  3545. (e = Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))
  3546. );
  3547. return (
  3548. (l.$tabbox = m["default"].render(v["default"], {})),
  3549. (l.currentType = ""),
  3550. (l.typeNameMap = {
  3551. cookies: "Cookies",
  3552. localstorage: "LocalStorage"
  3553. }),
  3554. l
  3555. );
  3556. }
  3557. return (
  3558. l(t, e),
  3559. c(t, [
  3560. {
  3561. key: "onRenderTab",
  3562. value: function(e) {
  3563. e(this.$tabbox);
  3564. }
  3565. },
  3566. {
  3567. key: "onAddTopBar",
  3568. value: function(e) {
  3569. for (
  3570. var t = this,
  3571. o = ["Cookies", "LocalStorage"],
  3572. n = [],
  3573. i = 0;
  3574. i < o.length;
  3575. i++
  3576. )
  3577. n.push({
  3578. name: o[i],
  3579. data: { type: o[i].toLowerCase() },
  3580. className: "",
  3581. onClick: function() {
  3582. return m["default"].hasClass(this, "vc-actived")
  3583. ? !1
  3584. : ((t.currentType = this.dataset.type),
  3585. void t.renderStorage());
  3586. }
  3587. });
  3588. (n[0].className = "vc-actived"), e(n);
  3589. }
  3590. },
  3591. {
  3592. key: "onAddTool",
  3593. value: function(e) {
  3594. var t = this,
  3595. o = [
  3596. {
  3597. name: "Refresh",
  3598. global: !1,
  3599. onClick: function(e) {
  3600. t.renderStorage();
  3601. }
  3602. },
  3603. {
  3604. name: "Clear",
  3605. global: !1,
  3606. onClick: function(e) {
  3607. t.clearLog();
  3608. }
  3609. }
  3610. ];
  3611. e(o);
  3612. }
  3613. },
  3614. { key: "onReady", value: function() {} },
  3615. {
  3616. key: "onShow",
  3617. value: function() {
  3618. "" == this.currentType &&
  3619. ((this.currentType = "cookies"), this.renderStorage());
  3620. }
  3621. },
  3622. {
  3623. key: "clearLog",
  3624. value: function() {
  3625. if (this.currentType && window.confirm) {
  3626. var e = window.confirm(
  3627. "Remove all " + this.typeNameMap[this.currentType] + "?"
  3628. );
  3629. if (!e) return !1;
  3630. }
  3631. switch (this.currentType) {
  3632. case "cookies":
  3633. this.clearCookieList();
  3634. break;
  3635. case "localstorage":
  3636. this.clearLocalStorageList();
  3637. break;
  3638. default:
  3639. return !1;
  3640. }
  3641. this.renderStorage();
  3642. }
  3643. },
  3644. {
  3645. key: "renderStorage",
  3646. value: function() {
  3647. var e = [];
  3648. switch (this.currentType) {
  3649. case "cookies":
  3650. e = this.getCookieList();
  3651. break;
  3652. case "localstorage":
  3653. e = this.getLocalStorageList();
  3654. break;
  3655. default:
  3656. return !1;
  3657. }
  3658. var t = m["default"].one(".vc-log", this.$tabbox);
  3659. if (0 == e.length) t.innerHTML = "";
  3660. else {
  3661. for (var o = 0; o < e.length; o++)
  3662. (e[o].name = g.htmlEncode(e[o].name)),
  3663. (e[o].value = g.htmlEncode(e[o].value));
  3664. t.innerHTML = m["default"].render(
  3665. p["default"],
  3666. { list: e },
  3667. !0
  3668. );
  3669. }
  3670. }
  3671. },
  3672. {
  3673. key: "getCookieList",
  3674. value: function() {
  3675. if (!document.cookie || !navigator.cookieEnabled) return [];
  3676. for (
  3677. var e = [], t = document.cookie.split(";"), o = 0;
  3678. o < t.length;
  3679. o++
  3680. ) {
  3681. var n = t[o].split("="),
  3682. i = n.shift().replace(/^ /, ""),
  3683. a = n.join("=");
  3684. e.push({
  3685. name: decodeURIComponent(i),
  3686. value: decodeURIComponent(a)
  3687. });
  3688. }
  3689. return e;
  3690. }
  3691. },
  3692. {
  3693. key: "getLocalStorageList",
  3694. value: function() {
  3695. if (!window.localStorage) return [];
  3696. try {
  3697. for (var e = [], t = 0; t < localStorage.length; t++) {
  3698. var o = localStorage.key(t),
  3699. n = localStorage.getItem(o);
  3700. e.push({ name: o, value: n });
  3701. }
  3702. return e;
  3703. } catch (i) {
  3704. return [];
  3705. }
  3706. }
  3707. },
  3708. {
  3709. key: "clearCookieList",
  3710. value: function() {
  3711. if (document.cookie && navigator.cookieEnabled) {
  3712. for (var e = this.getCookieList(), t = 0; t < e.length; t++)
  3713. document.cookie =
  3714. e[t].name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
  3715. this.renderStorage();
  3716. }
  3717. }
  3718. },
  3719. {
  3720. key: "clearLocalStorageList",
  3721. value: function() {
  3722. if (window.localStorage)
  3723. try {
  3724. localStorage.clear(), this.renderStorage();
  3725. } catch (e) {
  3726. alert("localStorage.clear() fail.");
  3727. }
  3728. }
  3729. }
  3730. ]),
  3731. t
  3732. );
  3733. })(d["default"]);
  3734. (t["default"] = y), (e.exports = t["default"]);
  3735. },
  3736. function(e, t) {
  3737. e.exports =
  3738. '<div class="vc-table">\n <div class="vc-log"></div>\n</div>';
  3739. },
  3740. function(e, t) {
  3741. e.exports =
  3742. '<div>\n <dl class="vc-table-row">\n <dd class="vc-table-col">Name</dd>\n <dd class="vc-table-col vc-table-col-2">Value</dd>\n </dl>\n {{for (var i = 0; i < list.length; i++)}}\n <dl class="vc-table-row">\n <dd class="vc-table-col">{{list[i].name}}</dd>\n <dd class="vc-table-col vc-table-col-2">{{list[i].value}}</dd>\n </dl>\n {{/for}}\n</div>';
  3743. }
  3744. ]);
  3745. });