vitepress___@vue_devtools-api.js 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694
  1. import { isReactive, isRef, toRaw } from './chunk-Z6W6QRLO.js';
  2. // ../node_modules/.pnpm/@vue+devtools-shared@7.2.1/node_modules/@vue/devtools-shared/dist/index.js
  3. var __create = Object.create;
  4. var __defProp = Object.defineProperty;
  5. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  6. var __getOwnPropNames = Object.getOwnPropertyNames;
  7. var __getProtoOf = Object.getPrototypeOf;
  8. var __hasOwnProp = Object.prototype.hasOwnProperty;
  9. var __esm = (fn, res) =>
  10. function __init() {
  11. return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])((fn = 0))), res;
  12. };
  13. var __commonJS = (cb, mod) =>
  14. function __require() {
  15. return (
  16. mod ||
  17. (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod),
  18. mod.exports
  19. );
  20. };
  21. var __copyProps = (to, from, except, desc) => {
  22. if ((from && typeof from === 'object') || typeof from === 'function') {
  23. for (let key of __getOwnPropNames(from))
  24. if (!__hasOwnProp.call(to, key) && key !== except)
  25. __defProp(to, key, {
  26. get: () => from[key],
  27. enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
  28. });
  29. }
  30. return to;
  31. };
  32. var __toESM = (mod, isNodeMode, target2) => (
  33. (target2 = mod != null ? __create(__getProtoOf(mod)) : {}),
  34. __copyProps(
  35. // If the importer is in node compatibility mode or this is not an ESM
  36. // file that has been converted to a CommonJS file using a Babel-
  37. // compatible transform (i.e. "__esModule" has not been set), then set
  38. // "default" to the CommonJS "module.exports" for node compatibility.
  39. isNodeMode || !mod || !mod.__esModule
  40. ? __defProp(target2, 'default', { value: mod, enumerable: true })
  41. : target2,
  42. mod,
  43. )
  44. );
  45. var init_esm_shims = __esm({
  46. '../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.43.0_@types+node@20.12.12__postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js'() {
  47. 'use strict';
  48. },
  49. });
  50. var require_rfdc = __commonJS({
  51. '../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js'(
  52. exports,
  53. module,
  54. ) {
  55. 'use strict';
  56. init_esm_shims();
  57. module.exports = rfdc2;
  58. function copyBuffer(cur) {
  59. if (cur instanceof Buffer) {
  60. return Buffer.from(cur);
  61. }
  62. return new cur.constructor(
  63. cur.buffer.slice(),
  64. cur.byteOffset,
  65. cur.length,
  66. );
  67. }
  68. function rfdc2(opts) {
  69. opts = opts || {};
  70. if (opts.circles) return rfdcCircles(opts);
  71. return opts.proto ? cloneProto : clone;
  72. function cloneArray(a, fn) {
  73. var keys = Object.keys(a);
  74. var a2 = new Array(keys.length);
  75. for (var i = 0; i < keys.length; i++) {
  76. var k = keys[i];
  77. var cur = a[k];
  78. if (typeof cur !== 'object' || cur === null) {
  79. a2[k] = cur;
  80. } else if (cur instanceof Date) {
  81. a2[k] = new Date(cur);
  82. } else if (ArrayBuffer.isView(cur)) {
  83. a2[k] = copyBuffer(cur);
  84. } else {
  85. a2[k] = fn(cur);
  86. }
  87. }
  88. return a2;
  89. }
  90. function clone(o) {
  91. if (typeof o !== 'object' || o === null) return o;
  92. if (o instanceof Date) return new Date(o);
  93. if (Array.isArray(o)) return cloneArray(o, clone);
  94. if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone));
  95. if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone));
  96. var o2 = {};
  97. for (var k in o) {
  98. if (Object.hasOwnProperty.call(o, k) === false) continue;
  99. var cur = o[k];
  100. if (typeof cur !== 'object' || cur === null) {
  101. o2[k] = cur;
  102. } else if (cur instanceof Date) {
  103. o2[k] = new Date(cur);
  104. } else if (cur instanceof Map) {
  105. o2[k] = new Map(cloneArray(Array.from(cur), clone));
  106. } else if (cur instanceof Set) {
  107. o2[k] = new Set(cloneArray(Array.from(cur), clone));
  108. } else if (ArrayBuffer.isView(cur)) {
  109. o2[k] = copyBuffer(cur);
  110. } else {
  111. o2[k] = clone(cur);
  112. }
  113. }
  114. return o2;
  115. }
  116. function cloneProto(o) {
  117. if (typeof o !== 'object' || o === null) return o;
  118. if (o instanceof Date) return new Date(o);
  119. if (Array.isArray(o)) return cloneArray(o, cloneProto);
  120. if (o instanceof Map)
  121. return new Map(cloneArray(Array.from(o), cloneProto));
  122. if (o instanceof Set)
  123. return new Set(cloneArray(Array.from(o), cloneProto));
  124. var o2 = {};
  125. for (var k in o) {
  126. var cur = o[k];
  127. if (typeof cur !== 'object' || cur === null) {
  128. o2[k] = cur;
  129. } else if (cur instanceof Date) {
  130. o2[k] = new Date(cur);
  131. } else if (cur instanceof Map) {
  132. o2[k] = new Map(cloneArray(Array.from(cur), cloneProto));
  133. } else if (cur instanceof Set) {
  134. o2[k] = new Set(cloneArray(Array.from(cur), cloneProto));
  135. } else if (ArrayBuffer.isView(cur)) {
  136. o2[k] = copyBuffer(cur);
  137. } else {
  138. o2[k] = cloneProto(cur);
  139. }
  140. }
  141. return o2;
  142. }
  143. }
  144. function rfdcCircles(opts) {
  145. var refs = [];
  146. var refsNew = [];
  147. return opts.proto ? cloneProto : clone;
  148. function cloneArray(a, fn) {
  149. var keys = Object.keys(a);
  150. var a2 = new Array(keys.length);
  151. for (var i = 0; i < keys.length; i++) {
  152. var k = keys[i];
  153. var cur = a[k];
  154. if (typeof cur !== 'object' || cur === null) {
  155. a2[k] = cur;
  156. } else if (cur instanceof Date) {
  157. a2[k] = new Date(cur);
  158. } else if (ArrayBuffer.isView(cur)) {
  159. a2[k] = copyBuffer(cur);
  160. } else {
  161. var index = refs.indexOf(cur);
  162. if (index !== -1) {
  163. a2[k] = refsNew[index];
  164. } else {
  165. a2[k] = fn(cur);
  166. }
  167. }
  168. }
  169. return a2;
  170. }
  171. function clone(o) {
  172. if (typeof o !== 'object' || o === null) return o;
  173. if (o instanceof Date) return new Date(o);
  174. if (Array.isArray(o)) return cloneArray(o, clone);
  175. if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone));
  176. if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone));
  177. var o2 = {};
  178. refs.push(o);
  179. refsNew.push(o2);
  180. for (var k in o) {
  181. if (Object.hasOwnProperty.call(o, k) === false) continue;
  182. var cur = o[k];
  183. if (typeof cur !== 'object' || cur === null) {
  184. o2[k] = cur;
  185. } else if (cur instanceof Date) {
  186. o2[k] = new Date(cur);
  187. } else if (cur instanceof Map) {
  188. o2[k] = new Map(cloneArray(Array.from(cur), clone));
  189. } else if (cur instanceof Set) {
  190. o2[k] = new Set(cloneArray(Array.from(cur), clone));
  191. } else if (ArrayBuffer.isView(cur)) {
  192. o2[k] = copyBuffer(cur);
  193. } else {
  194. var i = refs.indexOf(cur);
  195. if (i !== -1) {
  196. o2[k] = refsNew[i];
  197. } else {
  198. o2[k] = clone(cur);
  199. }
  200. }
  201. }
  202. refs.pop();
  203. refsNew.pop();
  204. return o2;
  205. }
  206. function cloneProto(o) {
  207. if (typeof o !== 'object' || o === null) return o;
  208. if (o instanceof Date) return new Date(o);
  209. if (Array.isArray(o)) return cloneArray(o, cloneProto);
  210. if (o instanceof Map)
  211. return new Map(cloneArray(Array.from(o), cloneProto));
  212. if (o instanceof Set)
  213. return new Set(cloneArray(Array.from(o), cloneProto));
  214. var o2 = {};
  215. refs.push(o);
  216. refsNew.push(o2);
  217. for (var k in o) {
  218. var cur = o[k];
  219. if (typeof cur !== 'object' || cur === null) {
  220. o2[k] = cur;
  221. } else if (cur instanceof Date) {
  222. o2[k] = new Date(cur);
  223. } else if (cur instanceof Map) {
  224. o2[k] = new Map(cloneArray(Array.from(cur), cloneProto));
  225. } else if (cur instanceof Set) {
  226. o2[k] = new Set(cloneArray(Array.from(cur), cloneProto));
  227. } else if (ArrayBuffer.isView(cur)) {
  228. o2[k] = copyBuffer(cur);
  229. } else {
  230. var i = refs.indexOf(cur);
  231. if (i !== -1) {
  232. o2[k] = refsNew[i];
  233. } else {
  234. o2[k] = cloneProto(cur);
  235. }
  236. }
  237. }
  238. refs.pop();
  239. refsNew.pop();
  240. return o2;
  241. }
  242. }
  243. },
  244. });
  245. init_esm_shims();
  246. init_esm_shims();
  247. var isBrowser = typeof navigator !== 'undefined';
  248. var target =
  249. typeof globalThis !== 'undefined'
  250. ? globalThis
  251. : typeof window !== 'undefined'
  252. ? window
  253. : typeof global !== 'undefined'
  254. ? global
  255. : {};
  256. var isInChromePanel =
  257. typeof target.chrome !== 'undefined' && !!target.chrome.devtools;
  258. var isInIframe = isBrowser && target.self !== target.top;
  259. var isInElectron =
  260. typeof navigator !== 'undefined' &&
  261. navigator.userAgent.toLowerCase().includes('electron');
  262. var isNuxtApp = typeof window !== 'undefined' && !!window.__NUXT__;
  263. init_esm_shims();
  264. var import_rfdc = __toESM(require_rfdc(), 1);
  265. var deepClone = (0, import_rfdc.default)({ circles: true });
  266. init_esm_shims();
  267. // ../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs
  268. function flatHooks(configHooks, hooks = {}, parentName) {
  269. for (const key in configHooks) {
  270. const subHook = configHooks[key];
  271. const name = parentName ? `${parentName}:${key}` : key;
  272. if (typeof subHook === 'object' && subHook !== null) {
  273. flatHooks(subHook, hooks, name);
  274. } else if (typeof subHook === 'function') {
  275. hooks[name] = subHook;
  276. }
  277. }
  278. return hooks;
  279. }
  280. var defaultTask = { run: (function_) => function_() };
  281. var _createTask = () => defaultTask;
  282. var createTask =
  283. typeof console.createTask !== 'undefined' ? console.createTask : _createTask;
  284. function serialTaskCaller(hooks, args) {
  285. const name = args.shift();
  286. const task = createTask(name);
  287. return hooks.reduce(
  288. (promise, hookFunction) =>
  289. promise.then(() => task.run(() => hookFunction(...args))),
  290. Promise.resolve(),
  291. );
  292. }
  293. function parallelTaskCaller(hooks, args) {
  294. const name = args.shift();
  295. const task = createTask(name);
  296. return Promise.all(hooks.map((hook2) => task.run(() => hook2(...args))));
  297. }
  298. function callEachWith(callbacks, arg0) {
  299. for (const callback of [...callbacks]) {
  300. callback(arg0);
  301. }
  302. }
  303. var Hookable = class {
  304. constructor() {
  305. this._hooks = {};
  306. this._before = void 0;
  307. this._after = void 0;
  308. this._deprecatedMessages = void 0;
  309. this._deprecatedHooks = {};
  310. this.hook = this.hook.bind(this);
  311. this.callHook = this.callHook.bind(this);
  312. this.callHookWith = this.callHookWith.bind(this);
  313. }
  314. hook(name, function_, options = {}) {
  315. if (!name || typeof function_ !== 'function') {
  316. return () => {};
  317. }
  318. const originalName = name;
  319. let dep;
  320. while (this._deprecatedHooks[name]) {
  321. dep = this._deprecatedHooks[name];
  322. name = dep.to;
  323. }
  324. if (dep && !options.allowDeprecated) {
  325. let message = dep.message;
  326. if (!message) {
  327. message =
  328. `${originalName} hook has been deprecated` +
  329. (dep.to ? `, please use ${dep.to}` : '');
  330. }
  331. if (!this._deprecatedMessages) {
  332. this._deprecatedMessages = /* @__PURE__ */ new Set();
  333. }
  334. if (!this._deprecatedMessages.has(message)) {
  335. console.warn(message);
  336. this._deprecatedMessages.add(message);
  337. }
  338. }
  339. if (!function_.name) {
  340. try {
  341. Object.defineProperty(function_, 'name', {
  342. get: () => '_' + name.replace(/\W+/g, '_') + '_hook_cb',
  343. configurable: true,
  344. });
  345. } catch {}
  346. }
  347. this._hooks[name] = this._hooks[name] || [];
  348. this._hooks[name].push(function_);
  349. return () => {
  350. if (function_) {
  351. this.removeHook(name, function_);
  352. function_ = void 0;
  353. }
  354. };
  355. }
  356. hookOnce(name, function_) {
  357. let _unreg;
  358. let _function = (...arguments_) => {
  359. if (typeof _unreg === 'function') {
  360. _unreg();
  361. }
  362. _unreg = void 0;
  363. _function = void 0;
  364. return function_(...arguments_);
  365. };
  366. _unreg = this.hook(name, _function);
  367. return _unreg;
  368. }
  369. removeHook(name, function_) {
  370. if (this._hooks[name]) {
  371. const index = this._hooks[name].indexOf(function_);
  372. if (index !== -1) {
  373. this._hooks[name].splice(index, 1);
  374. }
  375. if (this._hooks[name].length === 0) {
  376. delete this._hooks[name];
  377. }
  378. }
  379. }
  380. deprecateHook(name, deprecated) {
  381. this._deprecatedHooks[name] =
  382. typeof deprecated === 'string' ? { to: deprecated } : deprecated;
  383. const _hooks = this._hooks[name] || [];
  384. delete this._hooks[name];
  385. for (const hook2 of _hooks) {
  386. this.hook(name, hook2);
  387. }
  388. }
  389. deprecateHooks(deprecatedHooks) {
  390. Object.assign(this._deprecatedHooks, deprecatedHooks);
  391. for (const name in deprecatedHooks) {
  392. this.deprecateHook(name, deprecatedHooks[name]);
  393. }
  394. }
  395. addHooks(configHooks) {
  396. const hooks = flatHooks(configHooks);
  397. const removeFns = Object.keys(hooks).map((key) =>
  398. this.hook(key, hooks[key]),
  399. );
  400. return () => {
  401. for (const unreg of removeFns.splice(0, removeFns.length)) {
  402. unreg();
  403. }
  404. };
  405. }
  406. removeHooks(configHooks) {
  407. const hooks = flatHooks(configHooks);
  408. for (const key in hooks) {
  409. this.removeHook(key, hooks[key]);
  410. }
  411. }
  412. removeAllHooks() {
  413. for (const key in this._hooks) {
  414. delete this._hooks[key];
  415. }
  416. }
  417. callHook(name, ...arguments_) {
  418. arguments_.unshift(name);
  419. return this.callHookWith(serialTaskCaller, name, ...arguments_);
  420. }
  421. callHookParallel(name, ...arguments_) {
  422. arguments_.unshift(name);
  423. return this.callHookWith(parallelTaskCaller, name, ...arguments_);
  424. }
  425. callHookWith(caller, name, ...arguments_) {
  426. const event =
  427. this._before || this._after
  428. ? { name, args: arguments_, context: {} }
  429. : void 0;
  430. if (this._before) {
  431. callEachWith(this._before, event);
  432. }
  433. const result = caller(
  434. name in this._hooks ? [...this._hooks[name]] : [],
  435. arguments_,
  436. );
  437. if (result instanceof Promise) {
  438. return result.finally(() => {
  439. if (this._after && event) {
  440. callEachWith(this._after, event);
  441. }
  442. });
  443. }
  444. if (this._after && event) {
  445. callEachWith(this._after, event);
  446. }
  447. return result;
  448. }
  449. beforeEach(function_) {
  450. this._before = this._before || [];
  451. this._before.push(function_);
  452. return () => {
  453. if (this._before !== void 0) {
  454. const index = this._before.indexOf(function_);
  455. if (index !== -1) {
  456. this._before.splice(index, 1);
  457. }
  458. }
  459. };
  460. }
  461. afterEach(function_) {
  462. this._after = this._after || [];
  463. this._after.push(function_);
  464. return () => {
  465. if (this._after !== void 0) {
  466. const index = this._after.indexOf(function_);
  467. if (index !== -1) {
  468. this._after.splice(index, 1);
  469. }
  470. }
  471. };
  472. }
  473. };
  474. function createHooks() {
  475. return new Hookable();
  476. }
  477. // ../node_modules/.pnpm/perfect-debounce@1.0.0/node_modules/perfect-debounce/dist/index.mjs
  478. var DEBOUNCE_DEFAULTS = {
  479. trailing: true,
  480. };
  481. function debounce(fn, wait = 25, options = {}) {
  482. options = { ...DEBOUNCE_DEFAULTS, ...options };
  483. if (!Number.isFinite(wait)) {
  484. throw new TypeError('Expected `wait` to be a finite number');
  485. }
  486. let leadingValue;
  487. let timeout;
  488. let resolveList = [];
  489. let currentPromise;
  490. let trailingArgs;
  491. const applyFn = (_this, args) => {
  492. currentPromise = _applyPromised(fn, _this, args);
  493. currentPromise.finally(() => {
  494. currentPromise = null;
  495. if (options.trailing && trailingArgs && !timeout) {
  496. const promise = applyFn(_this, trailingArgs);
  497. trailingArgs = null;
  498. return promise;
  499. }
  500. });
  501. return currentPromise;
  502. };
  503. return function (...args) {
  504. if (currentPromise) {
  505. if (options.trailing) {
  506. trailingArgs = args;
  507. }
  508. return currentPromise;
  509. }
  510. return new Promise((resolve) => {
  511. const shouldCallNow = !timeout && options.leading;
  512. clearTimeout(timeout);
  513. timeout = setTimeout(() => {
  514. timeout = null;
  515. const promise = options.leading ? leadingValue : applyFn(this, args);
  516. for (const _resolve of resolveList) {
  517. _resolve(promise);
  518. }
  519. resolveList = [];
  520. }, wait);
  521. if (shouldCallNow) {
  522. leadingValue = applyFn(this, args);
  523. resolve(leadingValue);
  524. } else {
  525. resolveList.push(resolve);
  526. }
  527. });
  528. };
  529. }
  530. async function _applyPromised(fn, _this, args) {
  531. return await fn.apply(_this, args);
  532. }
  533. // ../node_modules/.pnpm/@vue+devtools-kit@7.2.1_vue@3.4.27_typescript@5.4.5_/node_modules/@vue/devtools-kit/dist/index.js
  534. var __create2 = Object.create;
  535. var __defProp2 = Object.defineProperty;
  536. var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
  537. var __getOwnPropNames2 = Object.getOwnPropertyNames;
  538. var __getProtoOf2 = Object.getPrototypeOf;
  539. var __hasOwnProp2 = Object.prototype.hasOwnProperty;
  540. var __esm2 = (fn, res) =>
  541. function __init() {
  542. return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])((fn = 0))), res;
  543. };
  544. var __commonJS2 = (cb, mod) =>
  545. function __require() {
  546. return (
  547. mod ||
  548. (0, cb[__getOwnPropNames2(cb)[0]])(
  549. (mod = { exports: {} }).exports,
  550. mod,
  551. ),
  552. mod.exports
  553. );
  554. };
  555. var __copyProps2 = (to, from, except, desc) => {
  556. if ((from && typeof from === 'object') || typeof from === 'function') {
  557. for (let key of __getOwnPropNames2(from))
  558. if (!__hasOwnProp2.call(to, key) && key !== except)
  559. __defProp2(to, key, {
  560. get: () => from[key],
  561. enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable,
  562. });
  563. }
  564. return to;
  565. };
  566. var __toESM2 = (mod, isNodeMode, target10) => (
  567. (target10 = mod != null ? __create2(__getProtoOf2(mod)) : {}),
  568. __copyProps2(
  569. // If the importer is in node compatibility mode or this is not an ESM
  570. // file that has been converted to a CommonJS file using a Babel-
  571. // compatible transform (i.e. "__esModule" has not been set), then set
  572. // "default" to the CommonJS "module.exports" for node compatibility.
  573. isNodeMode || !mod || !mod.__esModule
  574. ? __defProp2(target10, 'default', { value: mod, enumerable: true })
  575. : target10,
  576. mod,
  577. )
  578. );
  579. var init_esm_shims2 = __esm2({
  580. '../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.43.0_@types+node@20.12.12__postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js'() {
  581. 'use strict';
  582. },
  583. });
  584. var require_speakingurl = __commonJS2({
  585. '../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js'(
  586. exports,
  587. module,
  588. ) {
  589. 'use strict';
  590. init_esm_shims2();
  591. (function (root) {
  592. 'use strict';
  593. var charMap = {
  594. // latin
  595. À: 'A',
  596. Á: 'A',
  597. Â: 'A',
  598. Ã: 'A',
  599. Ä: 'Ae',
  600. Å: 'A',
  601. Æ: 'AE',
  602. Ç: 'C',
  603. È: 'E',
  604. É: 'E',
  605. Ê: 'E',
  606. Ë: 'E',
  607. Ì: 'I',
  608. Í: 'I',
  609. Î: 'I',
  610. Ï: 'I',
  611. Ð: 'D',
  612. Ñ: 'N',
  613. Ò: 'O',
  614. Ó: 'O',
  615. Ô: 'O',
  616. Õ: 'O',
  617. Ö: 'Oe',
  618. Ő: 'O',
  619. Ø: 'O',
  620. Ù: 'U',
  621. Ú: 'U',
  622. Û: 'U',
  623. Ü: 'Ue',
  624. Ű: 'U',
  625. Ý: 'Y',
  626. Þ: 'TH',
  627. ß: 'ss',
  628. à: 'a',
  629. á: 'a',
  630. â: 'a',
  631. ã: 'a',
  632. ä: 'ae',
  633. å: 'a',
  634. æ: 'ae',
  635. ç: 'c',
  636. è: 'e',
  637. é: 'e',
  638. ê: 'e',
  639. ë: 'e',
  640. ì: 'i',
  641. í: 'i',
  642. î: 'i',
  643. ï: 'i',
  644. ð: 'd',
  645. ñ: 'n',
  646. ò: 'o',
  647. ó: 'o',
  648. ô: 'o',
  649. õ: 'o',
  650. ö: 'oe',
  651. ő: 'o',
  652. ø: 'o',
  653. ù: 'u',
  654. ú: 'u',
  655. û: 'u',
  656. ü: 'ue',
  657. ű: 'u',
  658. ý: 'y',
  659. þ: 'th',
  660. ÿ: 'y',
  661. ẞ: 'SS',
  662. // language specific
  663. // Arabic
  664. ا: 'a',
  665. أ: 'a',
  666. إ: 'i',
  667. آ: 'aa',
  668. ؤ: 'u',
  669. ئ: 'e',
  670. ء: 'a',
  671. ب: 'b',
  672. ت: 't',
  673. ث: 'th',
  674. ج: 'j',
  675. ح: 'h',
  676. خ: 'kh',
  677. د: 'd',
  678. ذ: 'th',
  679. ر: 'r',
  680. ز: 'z',
  681. س: 's',
  682. ش: 'sh',
  683. ص: 's',
  684. ض: 'dh',
  685. ط: 't',
  686. ظ: 'z',
  687. ع: 'a',
  688. غ: 'gh',
  689. ف: 'f',
  690. ق: 'q',
  691. ك: 'k',
  692. ل: 'l',
  693. م: 'm',
  694. ن: 'n',
  695. ه: 'h',
  696. و: 'w',
  697. ي: 'y',
  698. ى: 'a',
  699. ة: 'h',
  700. ﻻ: 'la',
  701. ﻷ: 'laa',
  702. ﻹ: 'lai',
  703. ﻵ: 'laa',
  704. // Persian additional characters than Arabic
  705. گ: 'g',
  706. چ: 'ch',
  707. پ: 'p',
  708. ژ: 'zh',
  709. ک: 'k',
  710. ی: 'y',
  711. // Arabic diactrics
  712. 'َ': 'a',
  713. 'ً': 'an',
  714. 'ِ': 'e',
  715. 'ٍ': 'en',
  716. 'ُ': 'u',
  717. 'ٌ': 'on',
  718. 'ْ': '',
  719. // Arabic numbers
  720. '٠': '0',
  721. '١': '1',
  722. '٢': '2',
  723. '٣': '3',
  724. '٤': '4',
  725. '٥': '5',
  726. '٦': '6',
  727. '٧': '7',
  728. '٨': '8',
  729. '٩': '9',
  730. // Persian numbers
  731. '۰': '0',
  732. '۱': '1',
  733. '۲': '2',
  734. '۳': '3',
  735. '۴': '4',
  736. '۵': '5',
  737. '۶': '6',
  738. '۷': '7',
  739. '۸': '8',
  740. '۹': '9',
  741. // Burmese consonants
  742. က: 'k',
  743. ခ: 'kh',
  744. ဂ: 'g',
  745. ဃ: 'ga',
  746. င: 'ng',
  747. စ: 's',
  748. ဆ: 'sa',
  749. ဇ: 'z',
  750. စျ: 'za',
  751. ည: 'ny',
  752. ဋ: 't',
  753. ဌ: 'ta',
  754. ဍ: 'd',
  755. ဎ: 'da',
  756. ဏ: 'na',
  757. တ: 't',
  758. ထ: 'ta',
  759. ဒ: 'd',
  760. ဓ: 'da',
  761. န: 'n',
  762. ပ: 'p',
  763. ဖ: 'pa',
  764. ဗ: 'b',
  765. ဘ: 'ba',
  766. မ: 'm',
  767. ယ: 'y',
  768. ရ: 'ya',
  769. လ: 'l',
  770. ဝ: 'w',
  771. သ: 'th',
  772. ဟ: 'h',
  773. ဠ: 'la',
  774. အ: 'a',
  775. // consonant character combos
  776. 'ြ': 'y',
  777. 'ျ': 'ya',
  778. 'ွ': 'w',
  779. 'ြွ': 'yw',
  780. 'ျွ': 'ywa',
  781. 'ှ': 'h',
  782. // independent vowels
  783. ဧ: 'e',
  784. '၏': '-e',
  785. ဣ: 'i',
  786. ဤ: '-i',
  787. ဉ: 'u',
  788. ဦ: '-u',
  789. ဩ: 'aw',
  790. သြော: 'aw',
  791. ဪ: 'aw',
  792. // numbers
  793. '၀': '0',
  794. '၁': '1',
  795. '၂': '2',
  796. '၃': '3',
  797. '၄': '4',
  798. '၅': '5',
  799. '၆': '6',
  800. '၇': '7',
  801. '၈': '8',
  802. '၉': '9',
  803. // virama and tone marks which are silent in transliteration
  804. '္': '',
  805. '့': '',
  806. 'း': '',
  807. // Czech
  808. č: 'c',
  809. ď: 'd',
  810. ě: 'e',
  811. ň: 'n',
  812. ř: 'r',
  813. š: 's',
  814. ť: 't',
  815. ů: 'u',
  816. ž: 'z',
  817. Č: 'C',
  818. Ď: 'D',
  819. Ě: 'E',
  820. Ň: 'N',
  821. Ř: 'R',
  822. Š: 'S',
  823. Ť: 'T',
  824. Ů: 'U',
  825. Ž: 'Z',
  826. // Dhivehi
  827. ހ: 'h',
  828. ށ: 'sh',
  829. ނ: 'n',
  830. ރ: 'r',
  831. ބ: 'b',
  832. ޅ: 'lh',
  833. ކ: 'k',
  834. އ: 'a',
  835. ވ: 'v',
  836. މ: 'm',
  837. ފ: 'f',
  838. ދ: 'dh',
  839. ތ: 'th',
  840. ލ: 'l',
  841. ގ: 'g',
  842. ޏ: 'gn',
  843. ސ: 's',
  844. ޑ: 'd',
  845. ޒ: 'z',
  846. ޓ: 't',
  847. ޔ: 'y',
  848. ޕ: 'p',
  849. ޖ: 'j',
  850. ޗ: 'ch',
  851. ޘ: 'tt',
  852. ޙ: 'hh',
  853. ޚ: 'kh',
  854. ޛ: 'th',
  855. ޜ: 'z',
  856. ޝ: 'sh',
  857. ޞ: 's',
  858. ޟ: 'd',
  859. ޠ: 't',
  860. ޡ: 'z',
  861. ޢ: 'a',
  862. ޣ: 'gh',
  863. ޤ: 'q',
  864. ޥ: 'w',
  865. 'ަ': 'a',
  866. 'ާ': 'aa',
  867. 'ި': 'i',
  868. 'ީ': 'ee',
  869. 'ު': 'u',
  870. 'ޫ': 'oo',
  871. 'ެ': 'e',
  872. 'ޭ': 'ey',
  873. 'ޮ': 'o',
  874. 'ޯ': 'oa',
  875. 'ް': '',
  876. // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
  877. // National system (2002)
  878. ა: 'a',
  879. ბ: 'b',
  880. გ: 'g',
  881. დ: 'd',
  882. ე: 'e',
  883. ვ: 'v',
  884. ზ: 'z',
  885. თ: 't',
  886. ი: 'i',
  887. კ: 'k',
  888. ლ: 'l',
  889. მ: 'm',
  890. ნ: 'n',
  891. ო: 'o',
  892. პ: 'p',
  893. ჟ: 'zh',
  894. რ: 'r',
  895. ს: 's',
  896. ტ: 't',
  897. უ: 'u',
  898. ფ: 'p',
  899. ქ: 'k',
  900. ღ: 'gh',
  901. ყ: 'q',
  902. შ: 'sh',
  903. ჩ: 'ch',
  904. ც: 'ts',
  905. ძ: 'dz',
  906. წ: 'ts',
  907. ჭ: 'ch',
  908. ხ: 'kh',
  909. ჯ: 'j',
  910. ჰ: 'h',
  911. // Greek
  912. α: 'a',
  913. β: 'v',
  914. γ: 'g',
  915. δ: 'd',
  916. ε: 'e',
  917. ζ: 'z',
  918. η: 'i',
  919. θ: 'th',
  920. ι: 'i',
  921. κ: 'k',
  922. λ: 'l',
  923. μ: 'm',
  924. ν: 'n',
  925. ξ: 'ks',
  926. ο: 'o',
  927. π: 'p',
  928. ρ: 'r',
  929. σ: 's',
  930. τ: 't',
  931. υ: 'y',
  932. φ: 'f',
  933. χ: 'x',
  934. ψ: 'ps',
  935. ω: 'o',
  936. ά: 'a',
  937. έ: 'e',
  938. ί: 'i',
  939. ό: 'o',
  940. ύ: 'y',
  941. ή: 'i',
  942. ώ: 'o',
  943. ς: 's',
  944. ϊ: 'i',
  945. ΰ: 'y',
  946. ϋ: 'y',
  947. ΐ: 'i',
  948. Α: 'A',
  949. Β: 'B',
  950. Γ: 'G',
  951. Δ: 'D',
  952. Ε: 'E',
  953. Ζ: 'Z',
  954. Η: 'I',
  955. Θ: 'TH',
  956. Ι: 'I',
  957. Κ: 'K',
  958. Λ: 'L',
  959. Μ: 'M',
  960. Ν: 'N',
  961. Ξ: 'KS',
  962. Ο: 'O',
  963. Π: 'P',
  964. Ρ: 'R',
  965. Σ: 'S',
  966. Τ: 'T',
  967. Υ: 'Y',
  968. Φ: 'F',
  969. Χ: 'X',
  970. Ψ: 'PS',
  971. Ω: 'O',
  972. Ά: 'A',
  973. Έ: 'E',
  974. Ί: 'I',
  975. Ό: 'O',
  976. Ύ: 'Y',
  977. Ή: 'I',
  978. Ώ: 'O',
  979. Ϊ: 'I',
  980. Ϋ: 'Y',
  981. // Latvian
  982. ā: 'a',
  983. // 'č': 'c', // duplicate
  984. ē: 'e',
  985. ģ: 'g',
  986. ī: 'i',
  987. ķ: 'k',
  988. ļ: 'l',
  989. ņ: 'n',
  990. // 'š': 's', // duplicate
  991. ū: 'u',
  992. // 'ž': 'z', // duplicate
  993. Ā: 'A',
  994. // 'Č': 'C', // duplicate
  995. Ē: 'E',
  996. Ģ: 'G',
  997. Ī: 'I',
  998. Ķ: 'k',
  999. Ļ: 'L',
  1000. Ņ: 'N',
  1001. // 'Š': 'S', // duplicate
  1002. Ū: 'U',
  1003. // 'Ž': 'Z', // duplicate
  1004. // Macedonian
  1005. Ќ: 'Kj',
  1006. ќ: 'kj',
  1007. Љ: 'Lj',
  1008. љ: 'lj',
  1009. Њ: 'Nj',
  1010. њ: 'nj',
  1011. Тс: 'Ts',
  1012. тс: 'ts',
  1013. // Polish
  1014. ą: 'a',
  1015. ć: 'c',
  1016. ę: 'e',
  1017. ł: 'l',
  1018. ń: 'n',
  1019. // 'ó': 'o', // duplicate
  1020. ś: 's',
  1021. ź: 'z',
  1022. ż: 'z',
  1023. Ą: 'A',
  1024. Ć: 'C',
  1025. Ę: 'E',
  1026. Ł: 'L',
  1027. Ń: 'N',
  1028. Ś: 'S',
  1029. Ź: 'Z',
  1030. Ż: 'Z',
  1031. // Ukranian
  1032. Є: 'Ye',
  1033. І: 'I',
  1034. Ї: 'Yi',
  1035. Ґ: 'G',
  1036. є: 'ye',
  1037. і: 'i',
  1038. ї: 'yi',
  1039. ґ: 'g',
  1040. // Romanian
  1041. ă: 'a',
  1042. Ă: 'A',
  1043. ș: 's',
  1044. Ș: 'S',
  1045. // 'ş': 's', // duplicate
  1046. // 'Ş': 'S', // duplicate
  1047. ț: 't',
  1048. Ț: 'T',
  1049. ţ: 't',
  1050. Ţ: 'T',
  1051. // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
  1052. // ICAO
  1053. а: 'a',
  1054. б: 'b',
  1055. в: 'v',
  1056. г: 'g',
  1057. д: 'd',
  1058. е: 'e',
  1059. ё: 'yo',
  1060. ж: 'zh',
  1061. з: 'z',
  1062. и: 'i',
  1063. й: 'i',
  1064. к: 'k',
  1065. л: 'l',
  1066. м: 'm',
  1067. н: 'n',
  1068. о: 'o',
  1069. п: 'p',
  1070. р: 'r',
  1071. с: 's',
  1072. т: 't',
  1073. у: 'u',
  1074. ф: 'f',
  1075. х: 'kh',
  1076. ц: 'c',
  1077. ч: 'ch',
  1078. ш: 'sh',
  1079. щ: 'sh',
  1080. ъ: '',
  1081. ы: 'y',
  1082. ь: '',
  1083. э: 'e',
  1084. ю: 'yu',
  1085. я: 'ya',
  1086. А: 'A',
  1087. Б: 'B',
  1088. В: 'V',
  1089. Г: 'G',
  1090. Д: 'D',
  1091. Е: 'E',
  1092. Ё: 'Yo',
  1093. Ж: 'Zh',
  1094. З: 'Z',
  1095. И: 'I',
  1096. Й: 'I',
  1097. К: 'K',
  1098. Л: 'L',
  1099. М: 'M',
  1100. Н: 'N',
  1101. О: 'O',
  1102. П: 'P',
  1103. Р: 'R',
  1104. С: 'S',
  1105. Т: 'T',
  1106. У: 'U',
  1107. Ф: 'F',
  1108. Х: 'Kh',
  1109. Ц: 'C',
  1110. Ч: 'Ch',
  1111. Ш: 'Sh',
  1112. Щ: 'Sh',
  1113. Ъ: '',
  1114. Ы: 'Y',
  1115. Ь: '',
  1116. Э: 'E',
  1117. Ю: 'Yu',
  1118. Я: 'Ya',
  1119. // Serbian
  1120. ђ: 'dj',
  1121. ј: 'j',
  1122. // 'љ': 'lj', // duplicate
  1123. // 'њ': 'nj', // duplicate
  1124. ћ: 'c',
  1125. џ: 'dz',
  1126. Ђ: 'Dj',
  1127. Ј: 'j',
  1128. // 'Љ': 'Lj', // duplicate
  1129. // 'Њ': 'Nj', // duplicate
  1130. Ћ: 'C',
  1131. Џ: 'Dz',
  1132. // Slovak
  1133. ľ: 'l',
  1134. ĺ: 'l',
  1135. ŕ: 'r',
  1136. Ľ: 'L',
  1137. Ĺ: 'L',
  1138. Ŕ: 'R',
  1139. // Turkish
  1140. ş: 's',
  1141. Ş: 'S',
  1142. ı: 'i',
  1143. İ: 'I',
  1144. // 'ç': 'c', // duplicate
  1145. // 'Ç': 'C', // duplicate
  1146. // 'ü': 'u', // duplicate, see langCharMap
  1147. // 'Ü': 'U', // duplicate, see langCharMap
  1148. // 'ö': 'o', // duplicate, see langCharMap
  1149. // 'Ö': 'O', // duplicate, see langCharMap
  1150. ğ: 'g',
  1151. Ğ: 'G',
  1152. // Vietnamese
  1153. ả: 'a',
  1154. Ả: 'A',
  1155. ẳ: 'a',
  1156. Ẳ: 'A',
  1157. ẩ: 'a',
  1158. Ẩ: 'A',
  1159. đ: 'd',
  1160. Đ: 'D',
  1161. ẹ: 'e',
  1162. Ẹ: 'E',
  1163. ẽ: 'e',
  1164. Ẽ: 'E',
  1165. ẻ: 'e',
  1166. Ẻ: 'E',
  1167. ế: 'e',
  1168. Ế: 'E',
  1169. ề: 'e',
  1170. Ề: 'E',
  1171. ệ: 'e',
  1172. Ệ: 'E',
  1173. ễ: 'e',
  1174. Ễ: 'E',
  1175. ể: 'e',
  1176. Ể: 'E',
  1177. ỏ: 'o',
  1178. ọ: 'o',
  1179. Ọ: 'o',
  1180. ố: 'o',
  1181. Ố: 'O',
  1182. ồ: 'o',
  1183. Ồ: 'O',
  1184. ổ: 'o',
  1185. Ổ: 'O',
  1186. ộ: 'o',
  1187. Ộ: 'O',
  1188. ỗ: 'o',
  1189. Ỗ: 'O',
  1190. ơ: 'o',
  1191. Ơ: 'O',
  1192. ớ: 'o',
  1193. Ớ: 'O',
  1194. ờ: 'o',
  1195. Ờ: 'O',
  1196. ợ: 'o',
  1197. Ợ: 'O',
  1198. ỡ: 'o',
  1199. Ỡ: 'O',
  1200. Ở: 'o',
  1201. ở: 'o',
  1202. ị: 'i',
  1203. Ị: 'I',
  1204. ĩ: 'i',
  1205. Ĩ: 'I',
  1206. ỉ: 'i',
  1207. Ỉ: 'i',
  1208. ủ: 'u',
  1209. Ủ: 'U',
  1210. ụ: 'u',
  1211. Ụ: 'U',
  1212. ũ: 'u',
  1213. Ũ: 'U',
  1214. ư: 'u',
  1215. Ư: 'U',
  1216. ứ: 'u',
  1217. Ứ: 'U',
  1218. ừ: 'u',
  1219. Ừ: 'U',
  1220. ự: 'u',
  1221. Ự: 'U',
  1222. ữ: 'u',
  1223. Ữ: 'U',
  1224. ử: 'u',
  1225. Ử: 'ư',
  1226. ỷ: 'y',
  1227. Ỷ: 'y',
  1228. ỳ: 'y',
  1229. Ỳ: 'Y',
  1230. ỵ: 'y',
  1231. Ỵ: 'Y',
  1232. ỹ: 'y',
  1233. Ỹ: 'Y',
  1234. ạ: 'a',
  1235. Ạ: 'A',
  1236. ấ: 'a',
  1237. Ấ: 'A',
  1238. ầ: 'a',
  1239. Ầ: 'A',
  1240. ậ: 'a',
  1241. Ậ: 'A',
  1242. ẫ: 'a',
  1243. Ẫ: 'A',
  1244. // 'ă': 'a', // duplicate
  1245. // 'Ă': 'A', // duplicate
  1246. ắ: 'a',
  1247. Ắ: 'A',
  1248. ằ: 'a',
  1249. Ằ: 'A',
  1250. ặ: 'a',
  1251. Ặ: 'A',
  1252. ẵ: 'a',
  1253. Ẵ: 'A',
  1254. '⓪': '0',
  1255. '①': '1',
  1256. '②': '2',
  1257. '③': '3',
  1258. '④': '4',
  1259. '⑤': '5',
  1260. '⑥': '6',
  1261. '⑦': '7',
  1262. '⑧': '8',
  1263. '⑨': '9',
  1264. '⑩': '10',
  1265. '⑪': '11',
  1266. '⑫': '12',
  1267. '⑬': '13',
  1268. '⑭': '14',
  1269. '⑮': '15',
  1270. '⑯': '16',
  1271. '⑰': '17',
  1272. '⑱': '18',
  1273. '⑲': '18',
  1274. '⑳': '18',
  1275. '⓵': '1',
  1276. '⓶': '2',
  1277. '⓷': '3',
  1278. '⓸': '4',
  1279. '⓹': '5',
  1280. '⓺': '6',
  1281. '⓻': '7',
  1282. '⓼': '8',
  1283. '⓽': '9',
  1284. '⓾': '10',
  1285. '⓿': '0',
  1286. '⓫': '11',
  1287. '⓬': '12',
  1288. '⓭': '13',
  1289. '⓮': '14',
  1290. '⓯': '15',
  1291. '⓰': '16',
  1292. '⓱': '17',
  1293. '⓲': '18',
  1294. '⓳': '19',
  1295. '⓴': '20',
  1296. 'Ⓐ': 'A',
  1297. 'Ⓑ': 'B',
  1298. 'Ⓒ': 'C',
  1299. 'Ⓓ': 'D',
  1300. 'Ⓔ': 'E',
  1301. 'Ⓕ': 'F',
  1302. 'Ⓖ': 'G',
  1303. 'Ⓗ': 'H',
  1304. 'Ⓘ': 'I',
  1305. 'Ⓙ': 'J',
  1306. 'Ⓚ': 'K',
  1307. 'Ⓛ': 'L',
  1308. 'Ⓜ': 'M',
  1309. 'Ⓝ': 'N',
  1310. 'Ⓞ': 'O',
  1311. 'Ⓟ': 'P',
  1312. 'Ⓠ': 'Q',
  1313. 'Ⓡ': 'R',
  1314. 'Ⓢ': 'S',
  1315. 'Ⓣ': 'T',
  1316. 'Ⓤ': 'U',
  1317. 'Ⓥ': 'V',
  1318. 'Ⓦ': 'W',
  1319. 'Ⓧ': 'X',
  1320. 'Ⓨ': 'Y',
  1321. 'Ⓩ': 'Z',
  1322. 'ⓐ': 'a',
  1323. 'ⓑ': 'b',
  1324. 'ⓒ': 'c',
  1325. 'ⓓ': 'd',
  1326. 'ⓔ': 'e',
  1327. 'ⓕ': 'f',
  1328. 'ⓖ': 'g',
  1329. 'ⓗ': 'h',
  1330. 'ⓘ': 'i',
  1331. 'ⓙ': 'j',
  1332. 'ⓚ': 'k',
  1333. 'ⓛ': 'l',
  1334. 'ⓜ': 'm',
  1335. 'ⓝ': 'n',
  1336. 'ⓞ': 'o',
  1337. 'ⓟ': 'p',
  1338. 'ⓠ': 'q',
  1339. 'ⓡ': 'r',
  1340. 'ⓢ': 's',
  1341. 'ⓣ': 't',
  1342. 'ⓤ': 'u',
  1343. 'ⓦ': 'v',
  1344. 'ⓥ': 'w',
  1345. 'ⓧ': 'x',
  1346. 'ⓨ': 'y',
  1347. 'ⓩ': 'z',
  1348. // symbols
  1349. '“': '"',
  1350. '”': '"',
  1351. '‘': "'",
  1352. '’': "'",
  1353. '∂': 'd',
  1354. ƒ: 'f',
  1355. '™': '(TM)',
  1356. '©': '(C)',
  1357. œ: 'oe',
  1358. Œ: 'OE',
  1359. '®': '(R)',
  1360. '†': '+',
  1361. '℠': '(SM)',
  1362. '…': '...',
  1363. '˚': 'o',
  1364. º: 'o',
  1365. ª: 'a',
  1366. '•': '*',
  1367. '၊': ',',
  1368. '။': '.',
  1369. // currency
  1370. $: 'USD',
  1371. '€': 'EUR',
  1372. '₢': 'BRN',
  1373. '₣': 'FRF',
  1374. '£': 'GBP',
  1375. '₤': 'ITL',
  1376. '₦': 'NGN',
  1377. '₧': 'ESP',
  1378. '₩': 'KRW',
  1379. '₪': 'ILS',
  1380. '₫': 'VND',
  1381. '₭': 'LAK',
  1382. '₮': 'MNT',
  1383. '₯': 'GRD',
  1384. '₱': 'ARS',
  1385. '₲': 'PYG',
  1386. '₳': 'ARA',
  1387. '₴': 'UAH',
  1388. '₵': 'GHS',
  1389. '¢': 'cent',
  1390. '¥': 'CNY',
  1391. 元: 'CNY',
  1392. 円: 'YEN',
  1393. '﷼': 'IRR',
  1394. '₠': 'EWE',
  1395. '฿': 'THB',
  1396. '₨': 'INR',
  1397. '₹': 'INR',
  1398. '₰': 'PF',
  1399. '₺': 'TRY',
  1400. '؋': 'AFN',
  1401. '₼': 'AZN',
  1402. лв: 'BGN',
  1403. '៛': 'KHR',
  1404. '₡': 'CRC',
  1405. '₸': 'KZT',
  1406. ден: 'MKD',
  1407. zł: 'PLN',
  1408. '₽': 'RUB',
  1409. '₾': 'GEL',
  1410. };
  1411. var lookAheadCharArray = [
  1412. // burmese
  1413. '်',
  1414. // Dhivehi
  1415. 'ް',
  1416. ];
  1417. var diatricMap = {
  1418. // Burmese
  1419. // dependent vowels
  1420. 'ာ': 'a',
  1421. 'ါ': 'a',
  1422. 'ေ': 'e',
  1423. 'ဲ': 'e',
  1424. 'ိ': 'i',
  1425. 'ီ': 'i',
  1426. 'ို': 'o',
  1427. 'ု': 'u',
  1428. 'ူ': 'u',
  1429. 'ေါင်': 'aung',
  1430. 'ော': 'aw',
  1431. 'ော်': 'aw',
  1432. 'ေါ': 'aw',
  1433. 'ေါ်': 'aw',
  1434. '်': '်',
  1435. // this is special case but the character will be converted to latin in the code
  1436. က်: 'et',
  1437. 'ိုက်': 'aik',
  1438. 'ောက်': 'auk',
  1439. င်: 'in',
  1440. 'ိုင်': 'aing',
  1441. 'ောင်': 'aung',
  1442. စ်: 'it',
  1443. ည်: 'i',
  1444. တ်: 'at',
  1445. 'ိတ်': 'eik',
  1446. 'ုတ်': 'ok',
  1447. 'ွတ်': 'ut',
  1448. 'ေတ်': 'it',
  1449. ဒ်: 'd',
  1450. 'ိုဒ်': 'ok',
  1451. 'ုဒ်': 'ait',
  1452. န်: 'an',
  1453. 'ာန်': 'an',
  1454. 'ိန်': 'ein',
  1455. 'ုန်': 'on',
  1456. 'ွန်': 'un',
  1457. ပ်: 'at',
  1458. 'ိပ်': 'eik',
  1459. 'ုပ်': 'ok',
  1460. 'ွပ်': 'ut',
  1461. န်ုပ်: 'nub',
  1462. မ်: 'an',
  1463. 'ိမ်': 'ein',
  1464. 'ုမ်': 'on',
  1465. 'ွမ်': 'un',
  1466. ယ်: 'e',
  1467. 'ိုလ်': 'ol',
  1468. ဉ်: 'in',
  1469. 'ံ': 'an',
  1470. 'ိံ': 'ein',
  1471. 'ုံ': 'on',
  1472. // Dhivehi
  1473. 'ައް': 'ah',
  1474. 'ަށް': 'ah',
  1475. };
  1476. var langCharMap = {
  1477. en: {},
  1478. // default language
  1479. az: {
  1480. // Azerbaijani
  1481. ç: 'c',
  1482. ə: 'e',
  1483. ğ: 'g',
  1484. ı: 'i',
  1485. ö: 'o',
  1486. ş: 's',
  1487. ü: 'u',
  1488. Ç: 'C',
  1489. Ə: 'E',
  1490. Ğ: 'G',
  1491. İ: 'I',
  1492. Ö: 'O',
  1493. Ş: 'S',
  1494. Ü: 'U',
  1495. },
  1496. cs: {
  1497. // Czech
  1498. č: 'c',
  1499. ď: 'd',
  1500. ě: 'e',
  1501. ň: 'n',
  1502. ř: 'r',
  1503. š: 's',
  1504. ť: 't',
  1505. ů: 'u',
  1506. ž: 'z',
  1507. Č: 'C',
  1508. Ď: 'D',
  1509. Ě: 'E',
  1510. Ň: 'N',
  1511. Ř: 'R',
  1512. Š: 'S',
  1513. Ť: 'T',
  1514. Ů: 'U',
  1515. Ž: 'Z',
  1516. },
  1517. fi: {
  1518. // Finnish
  1519. // 'å': 'a', duplicate see charMap/latin
  1520. // 'Å': 'A', duplicate see charMap/latin
  1521. ä: 'a',
  1522. // ok
  1523. Ä: 'A',
  1524. // ok
  1525. ö: 'o',
  1526. // ok
  1527. Ö: 'O',
  1528. // ok
  1529. },
  1530. hu: {
  1531. // Hungarian
  1532. ä: 'a',
  1533. // ok
  1534. Ä: 'A',
  1535. // ok
  1536. // 'á': 'a', duplicate see charMap/latin
  1537. // 'Á': 'A', duplicate see charMap/latin
  1538. ö: 'o',
  1539. // ok
  1540. Ö: 'O',
  1541. // ok
  1542. // 'ő': 'o', duplicate see charMap/latin
  1543. // 'Ő': 'O', duplicate see charMap/latin
  1544. ü: 'u',
  1545. Ü: 'U',
  1546. ű: 'u',
  1547. Ű: 'U',
  1548. },
  1549. lt: {
  1550. // Lithuanian
  1551. ą: 'a',
  1552. č: 'c',
  1553. ę: 'e',
  1554. ė: 'e',
  1555. į: 'i',
  1556. š: 's',
  1557. ų: 'u',
  1558. ū: 'u',
  1559. ž: 'z',
  1560. Ą: 'A',
  1561. Č: 'C',
  1562. Ę: 'E',
  1563. Ė: 'E',
  1564. Į: 'I',
  1565. Š: 'S',
  1566. Ų: 'U',
  1567. Ū: 'U',
  1568. },
  1569. lv: {
  1570. // Latvian
  1571. ā: 'a',
  1572. č: 'c',
  1573. ē: 'e',
  1574. ģ: 'g',
  1575. ī: 'i',
  1576. ķ: 'k',
  1577. ļ: 'l',
  1578. ņ: 'n',
  1579. š: 's',
  1580. ū: 'u',
  1581. ž: 'z',
  1582. Ā: 'A',
  1583. Č: 'C',
  1584. Ē: 'E',
  1585. Ģ: 'G',
  1586. Ī: 'i',
  1587. Ķ: 'k',
  1588. Ļ: 'L',
  1589. Ņ: 'N',
  1590. Š: 'S',
  1591. Ū: 'u',
  1592. Ž: 'Z',
  1593. },
  1594. pl: {
  1595. // Polish
  1596. ą: 'a',
  1597. ć: 'c',
  1598. ę: 'e',
  1599. ł: 'l',
  1600. ń: 'n',
  1601. ó: 'o',
  1602. ś: 's',
  1603. ź: 'z',
  1604. ż: 'z',
  1605. Ą: 'A',
  1606. Ć: 'C',
  1607. Ę: 'e',
  1608. Ł: 'L',
  1609. Ń: 'N',
  1610. Ó: 'O',
  1611. Ś: 'S',
  1612. Ź: 'Z',
  1613. Ż: 'Z',
  1614. },
  1615. sv: {
  1616. // Swedish
  1617. // 'å': 'a', duplicate see charMap/latin
  1618. // 'Å': 'A', duplicate see charMap/latin
  1619. ä: 'a',
  1620. // ok
  1621. Ä: 'A',
  1622. // ok
  1623. ö: 'o',
  1624. // ok
  1625. Ö: 'O',
  1626. // ok
  1627. },
  1628. sk: {
  1629. // Slovak
  1630. ä: 'a',
  1631. Ä: 'A',
  1632. },
  1633. sr: {
  1634. // Serbian
  1635. љ: 'lj',
  1636. њ: 'nj',
  1637. Љ: 'Lj',
  1638. Њ: 'Nj',
  1639. đ: 'dj',
  1640. Đ: 'Dj',
  1641. },
  1642. tr: {
  1643. // Turkish
  1644. Ü: 'U',
  1645. Ö: 'O',
  1646. ü: 'u',
  1647. ö: 'o',
  1648. },
  1649. };
  1650. var symbolMap = {
  1651. ar: {
  1652. '∆': 'delta',
  1653. '∞': 'la-nihaya',
  1654. '♥': 'hob',
  1655. '&': 'wa',
  1656. '|': 'aw',
  1657. '<': 'aqal-men',
  1658. '>': 'akbar-men',
  1659. '∑': 'majmou',
  1660. '¤': 'omla',
  1661. },
  1662. az: {},
  1663. ca: {
  1664. '∆': 'delta',
  1665. '∞': 'infinit',
  1666. '♥': 'amor',
  1667. '&': 'i',
  1668. '|': 'o',
  1669. '<': 'menys que',
  1670. '>': 'mes que',
  1671. '∑': 'suma dels',
  1672. '¤': 'moneda',
  1673. },
  1674. cs: {
  1675. '∆': 'delta',
  1676. '∞': 'nekonecno',
  1677. '♥': 'laska',
  1678. '&': 'a',
  1679. '|': 'nebo',
  1680. '<': 'mensi nez',
  1681. '>': 'vetsi nez',
  1682. '∑': 'soucet',
  1683. '¤': 'mena',
  1684. },
  1685. de: {
  1686. '∆': 'delta',
  1687. '∞': 'unendlich',
  1688. '♥': 'Liebe',
  1689. '&': 'und',
  1690. '|': 'oder',
  1691. '<': 'kleiner als',
  1692. '>': 'groesser als',
  1693. '∑': 'Summe von',
  1694. '¤': 'Waehrung',
  1695. },
  1696. dv: {
  1697. '∆': 'delta',
  1698. '∞': 'kolunulaa',
  1699. '♥': 'loabi',
  1700. '&': 'aai',
  1701. '|': 'noonee',
  1702. '<': 'ah vure kuda',
  1703. '>': 'ah vure bodu',
  1704. '∑': 'jumula',
  1705. '¤': 'faisaa',
  1706. },
  1707. en: {
  1708. '∆': 'delta',
  1709. '∞': 'infinity',
  1710. '♥': 'love',
  1711. '&': 'and',
  1712. '|': 'or',
  1713. '<': 'less than',
  1714. '>': 'greater than',
  1715. '∑': 'sum',
  1716. '¤': 'currency',
  1717. },
  1718. es: {
  1719. '∆': 'delta',
  1720. '∞': 'infinito',
  1721. '♥': 'amor',
  1722. '&': 'y',
  1723. '|': 'u',
  1724. '<': 'menos que',
  1725. '>': 'mas que',
  1726. '∑': 'suma de los',
  1727. '¤': 'moneda',
  1728. },
  1729. fa: {
  1730. '∆': 'delta',
  1731. '∞': 'bi-nahayat',
  1732. '♥': 'eshgh',
  1733. '&': 'va',
  1734. '|': 'ya',
  1735. '<': 'kamtar-az',
  1736. '>': 'bishtar-az',
  1737. '∑': 'majmooe',
  1738. '¤': 'vahed',
  1739. },
  1740. fi: {
  1741. '∆': 'delta',
  1742. '∞': 'aarettomyys',
  1743. '♥': 'rakkaus',
  1744. '&': 'ja',
  1745. '|': 'tai',
  1746. '<': 'pienempi kuin',
  1747. '>': 'suurempi kuin',
  1748. '∑': 'summa',
  1749. '¤': 'valuutta',
  1750. },
  1751. fr: {
  1752. '∆': 'delta',
  1753. '∞': 'infiniment',
  1754. '♥': 'Amour',
  1755. '&': 'et',
  1756. '|': 'ou',
  1757. '<': 'moins que',
  1758. '>': 'superieure a',
  1759. '∑': 'somme des',
  1760. '¤': 'monnaie',
  1761. },
  1762. ge: {
  1763. '∆': 'delta',
  1764. '∞': 'usasruloba',
  1765. '♥': 'siqvaruli',
  1766. '&': 'da',
  1767. '|': 'an',
  1768. '<': 'naklebi',
  1769. '>': 'meti',
  1770. '∑': 'jami',
  1771. '¤': 'valuta',
  1772. },
  1773. gr: {},
  1774. hu: {
  1775. '∆': 'delta',
  1776. '∞': 'vegtelen',
  1777. '♥': 'szerelem',
  1778. '&': 'es',
  1779. '|': 'vagy',
  1780. '<': 'kisebb mint',
  1781. '>': 'nagyobb mint',
  1782. '∑': 'szumma',
  1783. '¤': 'penznem',
  1784. },
  1785. it: {
  1786. '∆': 'delta',
  1787. '∞': 'infinito',
  1788. '♥': 'amore',
  1789. '&': 'e',
  1790. '|': 'o',
  1791. '<': 'minore di',
  1792. '>': 'maggiore di',
  1793. '∑': 'somma',
  1794. '¤': 'moneta',
  1795. },
  1796. lt: {
  1797. '∆': 'delta',
  1798. '∞': 'begalybe',
  1799. '♥': 'meile',
  1800. '&': 'ir',
  1801. '|': 'ar',
  1802. '<': 'maziau nei',
  1803. '>': 'daugiau nei',
  1804. '∑': 'suma',
  1805. '¤': 'valiuta',
  1806. },
  1807. lv: {
  1808. '∆': 'delta',
  1809. '∞': 'bezgaliba',
  1810. '♥': 'milestiba',
  1811. '&': 'un',
  1812. '|': 'vai',
  1813. '<': 'mazak neka',
  1814. '>': 'lielaks neka',
  1815. '∑': 'summa',
  1816. '¤': 'valuta',
  1817. },
  1818. my: {
  1819. '∆': 'kwahkhyaet',
  1820. '∞': 'asaonasme',
  1821. '♥': 'akhyait',
  1822. '&': 'nhin',
  1823. '|': 'tho',
  1824. '<': 'ngethaw',
  1825. '>': 'kyithaw',
  1826. '∑': 'paungld',
  1827. '¤': 'ngwekye',
  1828. },
  1829. mk: {},
  1830. nl: {
  1831. '∆': 'delta',
  1832. '∞': 'oneindig',
  1833. '♥': 'liefde',
  1834. '&': 'en',
  1835. '|': 'of',
  1836. '<': 'kleiner dan',
  1837. '>': 'groter dan',
  1838. '∑': 'som',
  1839. '¤': 'valuta',
  1840. },
  1841. pl: {
  1842. '∆': 'delta',
  1843. '∞': 'nieskonczonosc',
  1844. '♥': 'milosc',
  1845. '&': 'i',
  1846. '|': 'lub',
  1847. '<': 'mniejsze niz',
  1848. '>': 'wieksze niz',
  1849. '∑': 'suma',
  1850. '¤': 'waluta',
  1851. },
  1852. pt: {
  1853. '∆': 'delta',
  1854. '∞': 'infinito',
  1855. '♥': 'amor',
  1856. '&': 'e',
  1857. '|': 'ou',
  1858. '<': 'menor que',
  1859. '>': 'maior que',
  1860. '∑': 'soma',
  1861. '¤': 'moeda',
  1862. },
  1863. ro: {
  1864. '∆': 'delta',
  1865. '∞': 'infinit',
  1866. '♥': 'dragoste',
  1867. '&': 'si',
  1868. '|': 'sau',
  1869. '<': 'mai mic ca',
  1870. '>': 'mai mare ca',
  1871. '∑': 'suma',
  1872. '¤': 'valuta',
  1873. },
  1874. ru: {
  1875. '∆': 'delta',
  1876. '∞': 'beskonechno',
  1877. '♥': 'lubov',
  1878. '&': 'i',
  1879. '|': 'ili',
  1880. '<': 'menshe',
  1881. '>': 'bolshe',
  1882. '∑': 'summa',
  1883. '¤': 'valjuta',
  1884. },
  1885. sk: {
  1886. '∆': 'delta',
  1887. '∞': 'nekonecno',
  1888. '♥': 'laska',
  1889. '&': 'a',
  1890. '|': 'alebo',
  1891. '<': 'menej ako',
  1892. '>': 'viac ako',
  1893. '∑': 'sucet',
  1894. '¤': 'mena',
  1895. },
  1896. sr: {},
  1897. tr: {
  1898. '∆': 'delta',
  1899. '∞': 'sonsuzluk',
  1900. '♥': 'ask',
  1901. '&': 've',
  1902. '|': 'veya',
  1903. '<': 'kucuktur',
  1904. '>': 'buyuktur',
  1905. '∑': 'toplam',
  1906. '¤': 'para birimi',
  1907. },
  1908. uk: {
  1909. '∆': 'delta',
  1910. '∞': 'bezkinechnist',
  1911. '♥': 'lubov',
  1912. '&': 'i',
  1913. '|': 'abo',
  1914. '<': 'menshe',
  1915. '>': 'bilshe',
  1916. '∑': 'suma',
  1917. '¤': 'valjuta',
  1918. },
  1919. vn: {
  1920. '∆': 'delta',
  1921. '∞': 'vo cuc',
  1922. '♥': 'yeu',
  1923. '&': 'va',
  1924. '|': 'hoac',
  1925. '<': 'nho hon',
  1926. '>': 'lon hon',
  1927. '∑': 'tong',
  1928. '¤': 'tien te',
  1929. },
  1930. };
  1931. var uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'].join(
  1932. '',
  1933. );
  1934. var uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','].join(
  1935. '',
  1936. );
  1937. var markChars = ['.', '!', '~', '*', "'", '(', ')'].join('');
  1938. var getSlug = function getSlug2(input, opts) {
  1939. var separator = '-';
  1940. var result = '';
  1941. var diatricString = '';
  1942. var convertSymbols = true;
  1943. var customReplacements = {};
  1944. var maintainCase;
  1945. var titleCase;
  1946. var truncate;
  1947. var uricFlag;
  1948. var uricNoSlashFlag;
  1949. var markFlag;
  1950. var symbol;
  1951. var langChar;
  1952. var lucky;
  1953. var i;
  1954. var ch;
  1955. var l;
  1956. var lastCharWasSymbol;
  1957. var lastCharWasDiatric;
  1958. var allowedChars = '';
  1959. if (typeof input !== 'string') {
  1960. return '';
  1961. }
  1962. if (typeof opts === 'string') {
  1963. separator = opts;
  1964. }
  1965. symbol = symbolMap.en;
  1966. langChar = langCharMap.en;
  1967. if (typeof opts === 'object') {
  1968. maintainCase = opts.maintainCase || false;
  1969. customReplacements =
  1970. opts.custom && typeof opts.custom === 'object'
  1971. ? opts.custom
  1972. : customReplacements;
  1973. truncate = (+opts.truncate > 1 && opts.truncate) || false;
  1974. uricFlag = opts.uric || false;
  1975. uricNoSlashFlag = opts.uricNoSlash || false;
  1976. markFlag = opts.mark || false;
  1977. convertSymbols =
  1978. opts.symbols === false || opts.lang === false ? false : true;
  1979. separator = opts.separator || separator;
  1980. if (uricFlag) {
  1981. allowedChars += uricChars;
  1982. }
  1983. if (uricNoSlashFlag) {
  1984. allowedChars += uricNoSlashChars;
  1985. }
  1986. if (markFlag) {
  1987. allowedChars += markChars;
  1988. }
  1989. symbol =
  1990. opts.lang && symbolMap[opts.lang] && convertSymbols
  1991. ? symbolMap[opts.lang]
  1992. : convertSymbols
  1993. ? symbolMap.en
  1994. : {};
  1995. langChar =
  1996. opts.lang && langCharMap[opts.lang]
  1997. ? langCharMap[opts.lang]
  1998. : opts.lang === false || opts.lang === true
  1999. ? {}
  2000. : langCharMap.en;
  2001. if (
  2002. opts.titleCase &&
  2003. typeof opts.titleCase.length === 'number' &&
  2004. Array.prototype.toString.call(opts.titleCase)
  2005. ) {
  2006. opts.titleCase.forEach(function (v) {
  2007. customReplacements[v + ''] = v + '';
  2008. });
  2009. titleCase = true;
  2010. } else {
  2011. titleCase = !!opts.titleCase;
  2012. }
  2013. if (
  2014. opts.custom &&
  2015. typeof opts.custom.length === 'number' &&
  2016. Array.prototype.toString.call(opts.custom)
  2017. ) {
  2018. opts.custom.forEach(function (v) {
  2019. customReplacements[v + ''] = v + '';
  2020. });
  2021. }
  2022. Object.keys(customReplacements).forEach(function (v) {
  2023. var r;
  2024. if (v.length > 1) {
  2025. r = new RegExp('\\b' + escapeChars(v) + '\\b', 'gi');
  2026. } else {
  2027. r = new RegExp(escapeChars(v), 'gi');
  2028. }
  2029. input = input.replace(r, customReplacements[v]);
  2030. });
  2031. for (ch in customReplacements) {
  2032. allowedChars += ch;
  2033. }
  2034. }
  2035. allowedChars += separator;
  2036. allowedChars = escapeChars(allowedChars);
  2037. input = input.replace(/(^\s+|\s+$)/g, '');
  2038. lastCharWasSymbol = false;
  2039. lastCharWasDiatric = false;
  2040. for (i = 0, l = input.length; i < l; i++) {
  2041. ch = input[i];
  2042. if (isReplacedCustomChar(ch, customReplacements)) {
  2043. lastCharWasSymbol = false;
  2044. } else if (langChar[ch]) {
  2045. ch =
  2046. lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/)
  2047. ? ' ' + langChar[ch]
  2048. : langChar[ch];
  2049. lastCharWasSymbol = false;
  2050. } else if (ch in charMap) {
  2051. if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
  2052. diatricString += ch;
  2053. ch = '';
  2054. } else if (lastCharWasDiatric === true) {
  2055. ch = diatricMap[diatricString] + charMap[ch];
  2056. diatricString = '';
  2057. } else {
  2058. ch =
  2059. lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/)
  2060. ? ' ' + charMap[ch]
  2061. : charMap[ch];
  2062. }
  2063. lastCharWasSymbol = false;
  2064. lastCharWasDiatric = false;
  2065. } else if (ch in diatricMap) {
  2066. diatricString += ch;
  2067. ch = '';
  2068. if (i === l - 1) {
  2069. ch = diatricMap[diatricString];
  2070. }
  2071. lastCharWasDiatric = true;
  2072. } else if (
  2073. // process symbol chars
  2074. symbol[ch] &&
  2075. !(uricFlag && uricChars.indexOf(ch) !== -1) &&
  2076. !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)
  2077. ) {
  2078. ch =
  2079. lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/)
  2080. ? separator + symbol[ch]
  2081. : symbol[ch];
  2082. ch +=
  2083. input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/)
  2084. ? separator
  2085. : '';
  2086. lastCharWasSymbol = true;
  2087. } else {
  2088. if (lastCharWasDiatric === true) {
  2089. ch = diatricMap[diatricString] + ch;
  2090. diatricString = '';
  2091. lastCharWasDiatric = false;
  2092. } else if (
  2093. lastCharWasSymbol &&
  2094. (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))
  2095. ) {
  2096. ch = ' ' + ch;
  2097. }
  2098. lastCharWasSymbol = false;
  2099. }
  2100. result += ch.replace(
  2101. new RegExp('[^\\w\\s' + allowedChars + '_-]', 'g'),
  2102. separator,
  2103. );
  2104. }
  2105. if (titleCase) {
  2106. result = result.replace(/(\w)(\S*)/g, function (_, i2, r) {
  2107. var j = i2.toUpperCase() + (r !== null ? r : '');
  2108. return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0
  2109. ? j
  2110. : j.toLowerCase();
  2111. });
  2112. }
  2113. result = result
  2114. .replace(/\s+/g, separator)
  2115. .replace(new RegExp('\\' + separator + '+', 'g'), separator)
  2116. .replace(
  2117. new RegExp('(^\\' + separator + '+|\\' + separator + '+$)', 'g'),
  2118. '',
  2119. );
  2120. if (truncate && result.length > truncate) {
  2121. lucky = result.charAt(truncate) === separator;
  2122. result = result.slice(0, truncate);
  2123. if (!lucky) {
  2124. result = result.slice(0, result.lastIndexOf(separator));
  2125. }
  2126. }
  2127. if (!maintainCase && !titleCase) {
  2128. result = result.toLowerCase();
  2129. }
  2130. return result;
  2131. };
  2132. var createSlug = function createSlug2(opts) {
  2133. return function getSlugWithConfig(input) {
  2134. return getSlug(input, opts);
  2135. };
  2136. };
  2137. var escapeChars = function escapeChars2(input) {
  2138. return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, '\\$&');
  2139. };
  2140. var isReplacedCustomChar = function (ch, customReplacements) {
  2141. for (var c in customReplacements) {
  2142. if (customReplacements[c] === ch) {
  2143. return true;
  2144. }
  2145. }
  2146. };
  2147. if (typeof module !== 'undefined' && module.exports) {
  2148. module.exports = getSlug;
  2149. module.exports.createSlug = createSlug;
  2150. } else if (typeof define !== 'undefined' && define.amd) {
  2151. define([], function () {
  2152. return getSlug;
  2153. });
  2154. } else {
  2155. try {
  2156. if (root.getSlug || root.createSlug) {
  2157. throw 'speakingurl: globals exists /(getSlug|createSlug)/';
  2158. } else {
  2159. root.getSlug = getSlug;
  2160. root.createSlug = createSlug;
  2161. }
  2162. } catch (e) {}
  2163. }
  2164. })(exports);
  2165. },
  2166. });
  2167. var require_speakingurl2 = __commonJS2({
  2168. '../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js'(
  2169. exports,
  2170. module,
  2171. ) {
  2172. 'use strict';
  2173. init_esm_shims2();
  2174. module.exports = require_speakingurl();
  2175. },
  2176. });
  2177. init_esm_shims2();
  2178. init_esm_shims2();
  2179. init_esm_shims2();
  2180. init_esm_shims2();
  2181. init_esm_shims2();
  2182. init_esm_shims2();
  2183. init_esm_shims2();
  2184. init_esm_shims2();
  2185. init_esm_shims2();
  2186. init_esm_shims2();
  2187. var _a;
  2188. var _b;
  2189. var devtoolsHooks =
  2190. (_b = (_a = target).__VUE_DEVTOOLS_HOOK) != null
  2191. ? _b
  2192. : (_a.__VUE_DEVTOOLS_HOOK = createHooks());
  2193. var on = {
  2194. vueAppInit(fn) {
  2195. devtoolsHooks.hook('app:init', fn);
  2196. },
  2197. vueAppUnmount(fn) {
  2198. devtoolsHooks.hook('app:unmount', fn);
  2199. },
  2200. vueAppConnected(fn) {
  2201. devtoolsHooks.hook('app:connected', fn);
  2202. },
  2203. componentAdded(fn) {
  2204. return devtoolsHooks.hook('component:added', fn);
  2205. },
  2206. componentUpdated(fn) {
  2207. return devtoolsHooks.hook('component:updated', fn);
  2208. },
  2209. componentRemoved(fn) {
  2210. return devtoolsHooks.hook('component:removed', fn);
  2211. },
  2212. setupDevtoolsPlugin(fn) {
  2213. devtoolsHooks.hook('devtools-plugin:setup', fn);
  2214. },
  2215. };
  2216. var hook = {
  2217. on,
  2218. setupDevToolsPlugin(pluginDescriptor, setupFn) {
  2219. return devtoolsHooks.callHook(
  2220. 'devtools-plugin:setup',
  2221. pluginDescriptor,
  2222. setupFn,
  2223. );
  2224. },
  2225. };
  2226. init_esm_shims2();
  2227. init_esm_shims2();
  2228. init_esm_shims2();
  2229. init_esm_shims2();
  2230. init_esm_shims2();
  2231. init_esm_shims2();
  2232. init_esm_shims2();
  2233. var import_speakingurl = __toESM2(require_speakingurl2(), 1);
  2234. init_esm_shims2();
  2235. init_esm_shims2();
  2236. init_esm_shims2();
  2237. var _a2;
  2238. var _b2;
  2239. var apiHooks =
  2240. (_b2 = (_a2 = target).__VUE_DEVTOOLS_API_HOOK) != null
  2241. ? _b2
  2242. : (_a2.__VUE_DEVTOOLS_API_HOOK = createHooks());
  2243. function getRoutes(router) {
  2244. const routesMap = /* @__PURE__ */ new Map();
  2245. return ((router == null ? void 0 : router.getRoutes()) || []).filter(
  2246. (i) => !routesMap.has(i.path) && routesMap.set(i.path, 1),
  2247. );
  2248. }
  2249. function filterRoutes(routes) {
  2250. return routes.map((item) => {
  2251. let { path, name, children } = item;
  2252. if (children == null ? void 0 : children.length)
  2253. children = filterRoutes(children);
  2254. return {
  2255. path,
  2256. name,
  2257. children,
  2258. };
  2259. });
  2260. }
  2261. function filterCurrentRoute(route) {
  2262. if (route) {
  2263. const { fullPath, hash, href, path, name, matched, params, query } = route;
  2264. return {
  2265. fullPath,
  2266. hash,
  2267. href,
  2268. path,
  2269. name,
  2270. params,
  2271. query,
  2272. matched: filterRoutes(matched),
  2273. };
  2274. }
  2275. return route;
  2276. }
  2277. function normalizeRouterInfo(appRecord, state) {
  2278. function init() {
  2279. var _a10;
  2280. const router =
  2281. (_a10 = appRecord.app) == null
  2282. ? void 0
  2283. : _a10.config.globalProperties.$router;
  2284. const currentRoute = filterCurrentRoute(
  2285. router == null ? void 0 : router.currentRoute.value,
  2286. );
  2287. const routes = filterRoutes(getRoutes(router));
  2288. const c = console.warn;
  2289. console.warn = () => {};
  2290. target[ROUTER_INFO_KEY] = {
  2291. currentRoute: currentRoute ? deepClone(currentRoute) : {},
  2292. routes: deepClone(routes),
  2293. };
  2294. target[ROUTER_KEY] = router;
  2295. console.warn = c;
  2296. }
  2297. init();
  2298. hook.on.componentUpdated(
  2299. debounce(() => {
  2300. var _a10;
  2301. if (
  2302. ((_a10 = state.activeAppRecord) == null ? void 0 : _a10.app) !==
  2303. appRecord.app
  2304. )
  2305. return;
  2306. init();
  2307. apiHooks.callHook('router-info:updated', target[ROUTER_INFO_KEY]);
  2308. }, 200),
  2309. );
  2310. }
  2311. function setupDevToolsPlugin(pluginDescriptor, setupFn) {
  2312. return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
  2313. }
  2314. init_esm_shims2();
  2315. init_esm_shims2();
  2316. init_esm_shims2();
  2317. init_esm_shims2();
  2318. init_esm_shims2();
  2319. init_esm_shims2();
  2320. init_esm_shims2();
  2321. init_esm_shims2();
  2322. var StateEditor = class {
  2323. constructor() {
  2324. this.refEditor = new RefStateEditor();
  2325. }
  2326. set(object, path, value, cb) {
  2327. const sections = Array.isArray(path) ? path : path.split('.');
  2328. const markRef = false;
  2329. while (sections.length > 1) {
  2330. const section = sections.shift();
  2331. if (object instanceof Map) object = object.get(section);
  2332. if (object instanceof Set) object = Array.from(object.values())[section];
  2333. else object = object[section];
  2334. if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
  2335. }
  2336. const field = sections[0];
  2337. const item = this.refEditor.get(object)[field];
  2338. if (cb) {
  2339. cb(object, field, value);
  2340. } else {
  2341. if (this.refEditor.isRef(item)) this.refEditor.set(item, value);
  2342. else if (markRef) object[field] = value;
  2343. else object[field] = value;
  2344. }
  2345. }
  2346. get(object, path) {
  2347. const sections = Array.isArray(path) ? path : path.split('.');
  2348. for (let i = 0; i < sections.length; i++) {
  2349. if (object instanceof Map) object = object.get(sections[i]);
  2350. else object = object[sections[i]];
  2351. if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
  2352. if (!object) return void 0;
  2353. }
  2354. return object;
  2355. }
  2356. has(object, path, parent = false) {
  2357. if (typeof object === 'undefined') return false;
  2358. const sections = Array.isArray(path) ? path.slice() : path.split('.');
  2359. const size = !parent ? 1 : 2;
  2360. while (object && sections.length > size) {
  2361. const section = sections.shift();
  2362. object = object[section];
  2363. if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
  2364. }
  2365. return (
  2366. object != null &&
  2367. Object.prototype.hasOwnProperty.call(object, sections[0])
  2368. );
  2369. }
  2370. createDefaultSetCallback(state) {
  2371. return (object, field, value) => {
  2372. if (state.remove || state.newKey) {
  2373. if (Array.isArray(object)) object.splice(field, 1);
  2374. else if (toRaw(object) instanceof Map) object.delete(field);
  2375. else if (toRaw(object) instanceof Set)
  2376. object.delete(Array.from(object.values())[field]);
  2377. else Reflect.deleteProperty(object, field);
  2378. }
  2379. if (!state.remove) {
  2380. const target10 = object[state.newKey || field];
  2381. if (this.refEditor.isRef(target10)) this.refEditor.set(target10, value);
  2382. else if (toRaw(object) instanceof Map)
  2383. object.set(state.newKey || field, value);
  2384. else if (toRaw(object) instanceof Set) object.add(value);
  2385. else object[state.newKey || field] = value;
  2386. }
  2387. };
  2388. }
  2389. };
  2390. var RefStateEditor = class {
  2391. set(ref, value) {
  2392. if (isRef(ref)) {
  2393. ref.value = value;
  2394. } else {
  2395. if (ref instanceof Set && Array.isArray(value)) {
  2396. ref.clear();
  2397. value.forEach((v) => ref.add(v));
  2398. return;
  2399. }
  2400. const currentKeys = Object.keys(value);
  2401. if (ref instanceof Map) {
  2402. const previousKeysSet2 = new Set(ref.keys());
  2403. currentKeys.forEach((key) => {
  2404. ref.set(key, Reflect.get(value, key));
  2405. previousKeysSet2.delete(key);
  2406. });
  2407. previousKeysSet2.forEach((key) => ref.delete(key));
  2408. return;
  2409. }
  2410. const previousKeysSet = new Set(Object.keys(ref));
  2411. currentKeys.forEach((key) => {
  2412. Reflect.set(ref, key, Reflect.get(value, key));
  2413. previousKeysSet.delete(key);
  2414. });
  2415. previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
  2416. }
  2417. }
  2418. get(ref) {
  2419. return isRef(ref) ? ref.value : ref;
  2420. }
  2421. isRef(ref) {
  2422. return isRef(ref) || isReactive(ref);
  2423. }
  2424. };
  2425. var stateEditor = new StateEditor();
  2426. init_esm_shims2();
  2427. init_esm_shims2();
  2428. init_esm_shims2();
  2429. var UNDEFINED = '__vue_devtool_undefined__';
  2430. var INFINITY = '__vue_devtool_infinity__';
  2431. var NEGATIVE_INFINITY = '__vue_devtool_negative_infinity__';
  2432. var NAN = '__vue_devtool_nan__';
  2433. init_esm_shims2();
  2434. init_esm_shims2();
  2435. var tokenMap = {
  2436. [UNDEFINED]: 'undefined',
  2437. [NAN]: 'NaN',
  2438. [INFINITY]: 'Infinity',
  2439. [NEGATIVE_INFINITY]: '-Infinity',
  2440. };
  2441. var reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
  2442. acc[value] = key;
  2443. return acc;
  2444. }, {});
  2445. init_esm_shims2();
  2446. init_esm_shims2();
  2447. init_esm_shims2();
  2448. init_esm_shims2();
  2449. init_esm_shims2();
  2450. init_esm_shims2();
  2451. init_esm_shims2();
  2452. var MAX_SERIALIZED_SIZE = 512 * 1024;
  2453. init_esm_shims2();
  2454. init_esm_shims2();
  2455. init_esm_shims2();
  2456. init_esm_shims2();
  2457. function addCustomTab(tab) {
  2458. if (devtoolsState.tabs.some((t) => t.name === tab.name)) return;
  2459. devtoolsState.tabs.push(tab);
  2460. }
  2461. init_esm_shims2();
  2462. function addCustomCommand(action) {
  2463. if (devtoolsState.commands.some((t) => t.id === action.id)) return;
  2464. devtoolsState.commands.push(action);
  2465. }
  2466. function removeCustomCommand(actionId) {
  2467. const index = devtoolsState.commands.findIndex((t) => t.id === actionId);
  2468. if (index === -1) return;
  2469. devtoolsState.commands.splice(index, 1);
  2470. }
  2471. init_esm_shims2();
  2472. var _a3;
  2473. var _b3;
  2474. (_b3 = (_a3 = target).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null
  2475. ? _b3
  2476. : (_a3.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true);
  2477. init_esm_shims2();
  2478. init_esm_shims2();
  2479. init_esm_shims2();
  2480. var STATE_KEY = '__VUE_DEVTOOLS_GLOBAL_STATE__';
  2481. function initStateFactory() {
  2482. return {
  2483. connected: false,
  2484. clientConnected: false,
  2485. appRecords: [],
  2486. activeAppRecord: null,
  2487. selectedComponentId: null,
  2488. pluginBuffer: [],
  2489. tabs: [],
  2490. commands: [],
  2491. vitePluginDetected: false,
  2492. activeAppRecordId: null,
  2493. highPerfModeEnabled: false,
  2494. };
  2495. }
  2496. var _a4;
  2497. var _b4;
  2498. (_b4 = (_a4 = target)[STATE_KEY]) != null
  2499. ? _b4
  2500. : (_a4[STATE_KEY] = initStateFactory());
  2501. var callStateUpdatedHook = debounce((state, oldState) => {
  2502. apiHooks.callHook('devtools:state-updated', state, oldState);
  2503. }, 80);
  2504. var callConnectedUpdatedHook = debounce((state, oldState) => {
  2505. apiHooks.callHook('devtools:connected-updated', state, oldState);
  2506. }, 80);
  2507. var devtoolsState = new Proxy(target[STATE_KEY], {
  2508. get(target10, property) {
  2509. return target[STATE_KEY][property];
  2510. },
  2511. deleteProperty(target10, property) {
  2512. delete target10[property];
  2513. return true;
  2514. },
  2515. set(target10, property, value) {
  2516. const oldState = { ...target[STATE_KEY] };
  2517. target10[property] = value;
  2518. target[STATE_KEY][property] = value;
  2519. callStateUpdatedHook(target[STATE_KEY], oldState);
  2520. if (
  2521. ['connected', 'clientConnected'].includes(property.toString()) &&
  2522. oldState[property] !== value
  2523. )
  2524. callConnectedUpdatedHook(target[STATE_KEY], oldState);
  2525. return true;
  2526. },
  2527. });
  2528. Object.defineProperty(devtoolsState.tabs, 'push', {
  2529. configurable: true,
  2530. value(...items) {
  2531. const result = Array.prototype.push.apply(this, items);
  2532. devtoolsState.tabs = this;
  2533. apiHooks.callHook('custom-tabs:updated', this);
  2534. return result;
  2535. },
  2536. });
  2537. ['push', 'splice'].forEach((method) => {
  2538. Object.defineProperty(devtoolsState.commands, method, {
  2539. configurable: true,
  2540. value(...args) {
  2541. const result = Array.prototype[method].apply(this, args);
  2542. devtoolsState.commands = this;
  2543. apiHooks.callHook('custom-commands:updated', this);
  2544. return result;
  2545. },
  2546. });
  2547. });
  2548. init_esm_shims2();
  2549. init_esm_shims2();
  2550. var ROUTER_KEY = '__VUE_DEVTOOLS_ROUTER__';
  2551. var ROUTER_INFO_KEY = '__VUE_DEVTOOLS_ROUTER_INFO__';
  2552. var _a5;
  2553. var _b5;
  2554. (_b5 = (_a5 = target)[ROUTER_INFO_KEY]) != null
  2555. ? _b5
  2556. : (_a5[ROUTER_INFO_KEY] = {
  2557. currentRoute: null,
  2558. routes: [],
  2559. });
  2560. var _a6;
  2561. var _b6;
  2562. (_b6 = (_a6 = target)[ROUTER_KEY]) != null ? _b6 : (_a6[ROUTER_KEY] = null);
  2563. var devtoolsRouterInfo = new Proxy(target[ROUTER_INFO_KEY], {
  2564. get(target10, property) {
  2565. return target[ROUTER_INFO_KEY][property];
  2566. },
  2567. });
  2568. init_esm_shims2();
  2569. var CONTEXT_KEY = '__VUE_DEVTOOLS_CONTEXT__';
  2570. function initContextFactory() {
  2571. return {
  2572. appRecord: null,
  2573. api: null,
  2574. inspector: [],
  2575. timelineLayer: [],
  2576. routerInfo: {},
  2577. router: null,
  2578. activeInspectorTreeId: '',
  2579. componentPluginHookBuffer: [],
  2580. };
  2581. }
  2582. var _a7;
  2583. var _b7;
  2584. (_b7 = (_a7 = target)[CONTEXT_KEY]) != null
  2585. ? _b7
  2586. : (_a7[CONTEXT_KEY] = initContextFactory());
  2587. function resetDevToolsContext() {
  2588. target[CONTEXT_KEY] = initContextFactory();
  2589. }
  2590. var devtoolsContext = new Proxy(target[CONTEXT_KEY], {
  2591. get(target10, property) {
  2592. if (property === 'router') return target[ROUTER_KEY];
  2593. else if (property === 'clear') return resetDevToolsContext;
  2594. return target[CONTEXT_KEY][property];
  2595. },
  2596. set(target10, property, value) {
  2597. target[CONTEXT_KEY][property] = value;
  2598. return true;
  2599. },
  2600. });
  2601. var devtoolsAppRecords = new Proxy(devtoolsState.appRecords, {
  2602. get(_, property) {
  2603. if (property === 'value') return devtoolsState.appRecords;
  2604. else if (property === 'active') return devtoolsState.activeAppRecord;
  2605. else if (property === 'activeId') return devtoolsState.activeAppRecordId;
  2606. },
  2607. set(target10, property, value) {
  2608. var _a10;
  2609. const oldState = { ...devtoolsState };
  2610. if (property === 'value') {
  2611. devtoolsState.appRecords = value;
  2612. } else if (property === 'active') {
  2613. const _value = value;
  2614. devtoolsState.activeAppRecord = _value;
  2615. devtoolsContext.appRecord = _value;
  2616. devtoolsContext.api = _value.api;
  2617. devtoolsContext.inspector = (_a10 = _value.inspector) != null ? _a10 : [];
  2618. normalizeRouterInfo(value, devtoolsState);
  2619. devtoolsContext.routerInfo = devtoolsRouterInfo;
  2620. } else if (property === 'activeId') {
  2621. devtoolsState.activeAppRecordId = value;
  2622. }
  2623. callStateUpdatedHook(devtoolsState, oldState);
  2624. if (
  2625. ['connected', 'clientConnected'].includes(property.toString()) &&
  2626. oldState[property] !== value
  2627. )
  2628. callConnectedUpdatedHook(devtoolsState, oldState);
  2629. return true;
  2630. },
  2631. });
  2632. var _a8;
  2633. var _b8;
  2634. var appRecordInfo =
  2635. (_b8 = (_a8 = target).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null
  2636. ? _b8
  2637. : (_a8.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
  2638. id: 0,
  2639. appIds: /* @__PURE__ */ new Set(),
  2640. });
  2641. init_esm_shims2();
  2642. var _a9;
  2643. var _b9;
  2644. (_b9 = (_a9 = target).__VUE_DEVTOOLS_ENV__) != null
  2645. ? _b9
  2646. : (_a9.__VUE_DEVTOOLS_ENV__ = {
  2647. vitePluginDetected: false,
  2648. });
  2649. init_esm_shims2();
  2650. function onDevToolsConnected(fn) {
  2651. return new Promise((resolve) => {
  2652. if (devtoolsState.connected) {
  2653. fn();
  2654. resolve();
  2655. return;
  2656. }
  2657. apiHooks.hook('devtools:connected-updated', (state) => {
  2658. if (state.connected) {
  2659. fn();
  2660. resolve();
  2661. }
  2662. });
  2663. });
  2664. }
  2665. function onDevToolsClientConnected(fn) {
  2666. return new Promise((resolve) => {
  2667. if (devtoolsState.connected && devtoolsState.clientConnected) {
  2668. fn();
  2669. resolve();
  2670. return;
  2671. }
  2672. apiHooks.hook('devtools:connected-updated', (state) => {
  2673. if (state.connected && state.clientConnected) {
  2674. fn();
  2675. resolve();
  2676. }
  2677. });
  2678. });
  2679. }
  2680. init_esm_shims2();
  2681. export {
  2682. addCustomCommand,
  2683. addCustomTab,
  2684. onDevToolsClientConnected,
  2685. onDevToolsConnected,
  2686. removeCustomCommand,
  2687. setupDevToolsPlugin,
  2688. setupDevToolsPlugin as setupDevtoolsPlugin,
  2689. };
  2690. //# sourceMappingURL=vitepress___@vue_devtools-api.js.map