runtime-dom.esm-bundler.js 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850
  1. /**
  2. * @vue/runtime-dom v3.5.12
  3. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  4. * @license MIT
  5. **/
  6. import { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeMount, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, Text, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
  7. export * from '@vue/runtime-core';
  8. import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, NOOP, isOn, isModelListener, camelize as camelize$1, isPlainObject, hasOwn, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';
  9. let policy = void 0;
  10. const tt = typeof window !== "undefined" && window.trustedTypes;
  11. if (tt) {
  12. try {
  13. policy = /* @__PURE__ */ tt.createPolicy("vue", {
  14. createHTML: (val) => val
  15. });
  16. } catch (e) {
  17. !!(process.env.NODE_ENV !== "production") && warn(`Error creating trusted types policy: ${e}`);
  18. }
  19. }
  20. const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  21. const svgNS = "http://www.w3.org/2000/svg";
  22. const mathmlNS = "http://www.w3.org/1998/Math/MathML";
  23. const doc = typeof document !== "undefined" ? document : null;
  24. const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
  25. const nodeOps = {
  26. insert: (child, parent, anchor) => {
  27. parent.insertBefore(child, anchor || null);
  28. },
  29. remove: (child) => {
  30. const parent = child.parentNode;
  31. if (parent) {
  32. parent.removeChild(child);
  33. }
  34. },
  35. createElement: (tag, namespace, is, props) => {
  36. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  37. if (tag === "select" && props && props.multiple != null) {
  38. el.setAttribute("multiple", props.multiple);
  39. }
  40. return el;
  41. },
  42. createText: (text) => doc.createTextNode(text),
  43. createComment: (text) => doc.createComment(text),
  44. setText: (node, text) => {
  45. node.nodeValue = text;
  46. },
  47. setElementText: (el, text) => {
  48. el.textContent = text;
  49. },
  50. parentNode: (node) => node.parentNode,
  51. nextSibling: (node) => node.nextSibling,
  52. querySelector: (selector) => doc.querySelector(selector),
  53. setScopeId(el, id) {
  54. el.setAttribute(id, "");
  55. },
  56. // __UNSAFE__
  57. // Reason: innerHTML.
  58. // Static content here can only come from compiled templates.
  59. // As long as the user only uses trusted templates, this is safe.
  60. insertStaticContent(content, parent, anchor, namespace, start, end) {
  61. const before = anchor ? anchor.previousSibling : parent.lastChild;
  62. if (start && (start === end || start.nextSibling)) {
  63. while (true) {
  64. parent.insertBefore(start.cloneNode(true), anchor);
  65. if (start === end || !(start = start.nextSibling)) break;
  66. }
  67. } else {
  68. templateContainer.innerHTML = unsafeToTrustedHTML(
  69. namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
  70. );
  71. const template = templateContainer.content;
  72. if (namespace === "svg" || namespace === "mathml") {
  73. const wrapper = template.firstChild;
  74. while (wrapper.firstChild) {
  75. template.appendChild(wrapper.firstChild);
  76. }
  77. template.removeChild(wrapper);
  78. }
  79. parent.insertBefore(template, anchor);
  80. }
  81. return [
  82. // first
  83. before ? before.nextSibling : parent.firstChild,
  84. // last
  85. anchor ? anchor.previousSibling : parent.lastChild
  86. ];
  87. }
  88. };
  89. const TRANSITION = "transition";
  90. const ANIMATION = "animation";
  91. const vtcKey = Symbol("_vtc");
  92. const DOMTransitionPropsValidators = {
  93. name: String,
  94. type: String,
  95. css: {
  96. type: Boolean,
  97. default: true
  98. },
  99. duration: [String, Number, Object],
  100. enterFromClass: String,
  101. enterActiveClass: String,
  102. enterToClass: String,
  103. appearFromClass: String,
  104. appearActiveClass: String,
  105. appearToClass: String,
  106. leaveFromClass: String,
  107. leaveActiveClass: String,
  108. leaveToClass: String
  109. };
  110. const TransitionPropsValidators = /* @__PURE__ */ extend(
  111. {},
  112. BaseTransitionPropsValidators,
  113. DOMTransitionPropsValidators
  114. );
  115. const decorate$1 = (t) => {
  116. t.displayName = "Transition";
  117. t.props = TransitionPropsValidators;
  118. return t;
  119. };
  120. const Transition = /* @__PURE__ */ decorate$1(
  121. (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
  122. );
  123. const callHook = (hook, args = []) => {
  124. if (isArray(hook)) {
  125. hook.forEach((h2) => h2(...args));
  126. } else if (hook) {
  127. hook(...args);
  128. }
  129. };
  130. const hasExplicitCallback = (hook) => {
  131. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  132. };
  133. function resolveTransitionProps(rawProps) {
  134. const baseProps = {};
  135. for (const key in rawProps) {
  136. if (!(key in DOMTransitionPropsValidators)) {
  137. baseProps[key] = rawProps[key];
  138. }
  139. }
  140. if (rawProps.css === false) {
  141. return baseProps;
  142. }
  143. const {
  144. name = "v",
  145. type,
  146. duration,
  147. enterFromClass = `${name}-enter-from`,
  148. enterActiveClass = `${name}-enter-active`,
  149. enterToClass = `${name}-enter-to`,
  150. appearFromClass = enterFromClass,
  151. appearActiveClass = enterActiveClass,
  152. appearToClass = enterToClass,
  153. leaveFromClass = `${name}-leave-from`,
  154. leaveActiveClass = `${name}-leave-active`,
  155. leaveToClass = `${name}-leave-to`
  156. } = rawProps;
  157. const durations = normalizeDuration(duration);
  158. const enterDuration = durations && durations[0];
  159. const leaveDuration = durations && durations[1];
  160. const {
  161. onBeforeEnter,
  162. onEnter,
  163. onEnterCancelled,
  164. onLeave,
  165. onLeaveCancelled,
  166. onBeforeAppear = onBeforeEnter,
  167. onAppear = onEnter,
  168. onAppearCancelled = onEnterCancelled
  169. } = baseProps;
  170. const finishEnter = (el, isAppear, done) => {
  171. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  172. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  173. done && done();
  174. };
  175. const finishLeave = (el, done) => {
  176. el._isLeaving = false;
  177. removeTransitionClass(el, leaveFromClass);
  178. removeTransitionClass(el, leaveToClass);
  179. removeTransitionClass(el, leaveActiveClass);
  180. done && done();
  181. };
  182. const makeEnterHook = (isAppear) => {
  183. return (el, done) => {
  184. const hook = isAppear ? onAppear : onEnter;
  185. const resolve = () => finishEnter(el, isAppear, done);
  186. callHook(hook, [el, resolve]);
  187. nextFrame(() => {
  188. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  189. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  190. if (!hasExplicitCallback(hook)) {
  191. whenTransitionEnds(el, type, enterDuration, resolve);
  192. }
  193. });
  194. };
  195. };
  196. return extend(baseProps, {
  197. onBeforeEnter(el) {
  198. callHook(onBeforeEnter, [el]);
  199. addTransitionClass(el, enterFromClass);
  200. addTransitionClass(el, enterActiveClass);
  201. },
  202. onBeforeAppear(el) {
  203. callHook(onBeforeAppear, [el]);
  204. addTransitionClass(el, appearFromClass);
  205. addTransitionClass(el, appearActiveClass);
  206. },
  207. onEnter: makeEnterHook(false),
  208. onAppear: makeEnterHook(true),
  209. onLeave(el, done) {
  210. el._isLeaving = true;
  211. const resolve = () => finishLeave(el, done);
  212. addTransitionClass(el, leaveFromClass);
  213. addTransitionClass(el, leaveActiveClass);
  214. forceReflow();
  215. nextFrame(() => {
  216. if (!el._isLeaving) {
  217. return;
  218. }
  219. removeTransitionClass(el, leaveFromClass);
  220. addTransitionClass(el, leaveToClass);
  221. if (!hasExplicitCallback(onLeave)) {
  222. whenTransitionEnds(el, type, leaveDuration, resolve);
  223. }
  224. });
  225. callHook(onLeave, [el, resolve]);
  226. },
  227. onEnterCancelled(el) {
  228. finishEnter(el, false);
  229. callHook(onEnterCancelled, [el]);
  230. },
  231. onAppearCancelled(el) {
  232. finishEnter(el, true);
  233. callHook(onAppearCancelled, [el]);
  234. },
  235. onLeaveCancelled(el) {
  236. finishLeave(el);
  237. callHook(onLeaveCancelled, [el]);
  238. }
  239. });
  240. }
  241. function normalizeDuration(duration) {
  242. if (duration == null) {
  243. return null;
  244. } else if (isObject(duration)) {
  245. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  246. } else {
  247. const n = NumberOf(duration);
  248. return [n, n];
  249. }
  250. }
  251. function NumberOf(val) {
  252. const res = toNumber(val);
  253. if (!!(process.env.NODE_ENV !== "production")) {
  254. assertNumber(res, "<transition> explicit duration");
  255. }
  256. return res;
  257. }
  258. function addTransitionClass(el, cls) {
  259. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  260. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  261. }
  262. function removeTransitionClass(el, cls) {
  263. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  264. const _vtc = el[vtcKey];
  265. if (_vtc) {
  266. _vtc.delete(cls);
  267. if (!_vtc.size) {
  268. el[vtcKey] = void 0;
  269. }
  270. }
  271. }
  272. function nextFrame(cb) {
  273. requestAnimationFrame(() => {
  274. requestAnimationFrame(cb);
  275. });
  276. }
  277. let endId = 0;
  278. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
  279. const id = el._endId = ++endId;
  280. const resolveIfNotStale = () => {
  281. if (id === el._endId) {
  282. resolve();
  283. }
  284. };
  285. if (explicitTimeout != null) {
  286. return setTimeout(resolveIfNotStale, explicitTimeout);
  287. }
  288. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  289. if (!type) {
  290. return resolve();
  291. }
  292. const endEvent = type + "end";
  293. let ended = 0;
  294. const end = () => {
  295. el.removeEventListener(endEvent, onEnd);
  296. resolveIfNotStale();
  297. };
  298. const onEnd = (e) => {
  299. if (e.target === el && ++ended >= propCount) {
  300. end();
  301. }
  302. };
  303. setTimeout(() => {
  304. if (ended < propCount) {
  305. end();
  306. }
  307. }, timeout + 1);
  308. el.addEventListener(endEvent, onEnd);
  309. }
  310. function getTransitionInfo(el, expectedType) {
  311. const styles = window.getComputedStyle(el);
  312. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  313. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  314. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  315. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  316. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  317. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  318. const animationTimeout = getTimeout(animationDelays, animationDurations);
  319. let type = null;
  320. let timeout = 0;
  321. let propCount = 0;
  322. if (expectedType === TRANSITION) {
  323. if (transitionTimeout > 0) {
  324. type = TRANSITION;
  325. timeout = transitionTimeout;
  326. propCount = transitionDurations.length;
  327. }
  328. } else if (expectedType === ANIMATION) {
  329. if (animationTimeout > 0) {
  330. type = ANIMATION;
  331. timeout = animationTimeout;
  332. propCount = animationDurations.length;
  333. }
  334. } else {
  335. timeout = Math.max(transitionTimeout, animationTimeout);
  336. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  337. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  338. }
  339. const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
  340. getStyleProperties(`${TRANSITION}Property`).toString()
  341. );
  342. return {
  343. type,
  344. timeout,
  345. propCount,
  346. hasTransform
  347. };
  348. }
  349. function getTimeout(delays, durations) {
  350. while (delays.length < durations.length) {
  351. delays = delays.concat(delays);
  352. }
  353. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  354. }
  355. function toMs(s) {
  356. if (s === "auto") return 0;
  357. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  358. }
  359. function forceReflow() {
  360. return document.body.offsetHeight;
  361. }
  362. function patchClass(el, value, isSVG) {
  363. const transitionClasses = el[vtcKey];
  364. if (transitionClasses) {
  365. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  366. }
  367. if (value == null) {
  368. el.removeAttribute("class");
  369. } else if (isSVG) {
  370. el.setAttribute("class", value);
  371. } else {
  372. el.className = value;
  373. }
  374. }
  375. const vShowOriginalDisplay = Symbol("_vod");
  376. const vShowHidden = Symbol("_vsh");
  377. const vShow = {
  378. beforeMount(el, { value }, { transition }) {
  379. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  380. if (transition && value) {
  381. transition.beforeEnter(el);
  382. } else {
  383. setDisplay(el, value);
  384. }
  385. },
  386. mounted(el, { value }, { transition }) {
  387. if (transition && value) {
  388. transition.enter(el);
  389. }
  390. },
  391. updated(el, { value, oldValue }, { transition }) {
  392. if (!value === !oldValue) return;
  393. if (transition) {
  394. if (value) {
  395. transition.beforeEnter(el);
  396. setDisplay(el, true);
  397. transition.enter(el);
  398. } else {
  399. transition.leave(el, () => {
  400. setDisplay(el, false);
  401. });
  402. }
  403. } else {
  404. setDisplay(el, value);
  405. }
  406. },
  407. beforeUnmount(el, { value }) {
  408. setDisplay(el, value);
  409. }
  410. };
  411. if (!!(process.env.NODE_ENV !== "production")) {
  412. vShow.name = "show";
  413. }
  414. function setDisplay(el, value) {
  415. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  416. el[vShowHidden] = !value;
  417. }
  418. function initVShowForSSR() {
  419. vShow.getSSRProps = ({ value }) => {
  420. if (!value) {
  421. return { style: { display: "none" } };
  422. }
  423. };
  424. }
  425. const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
  426. function useCssVars(getter) {
  427. const instance = getCurrentInstance();
  428. if (!instance) {
  429. !!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
  430. return;
  431. }
  432. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  433. Array.from(
  434. document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
  435. ).forEach((node) => setVarsOnNode(node, vars));
  436. };
  437. if (!!(process.env.NODE_ENV !== "production")) {
  438. instance.getCssVars = () => getter(instance.proxy);
  439. }
  440. const setVars = () => {
  441. const vars = getter(instance.proxy);
  442. if (instance.ce) {
  443. setVarsOnNode(instance.ce, vars);
  444. } else {
  445. setVarsOnVNode(instance.subTree, vars);
  446. }
  447. updateTeleports(vars);
  448. };
  449. onBeforeMount(() => {
  450. watchPostEffect(setVars);
  451. });
  452. onMounted(() => {
  453. const ob = new MutationObserver(setVars);
  454. ob.observe(instance.subTree.el.parentNode, { childList: true });
  455. onUnmounted(() => ob.disconnect());
  456. });
  457. }
  458. function setVarsOnVNode(vnode, vars) {
  459. if (vnode.shapeFlag & 128) {
  460. const suspense = vnode.suspense;
  461. vnode = suspense.activeBranch;
  462. if (suspense.pendingBranch && !suspense.isHydrating) {
  463. suspense.effects.push(() => {
  464. setVarsOnVNode(suspense.activeBranch, vars);
  465. });
  466. }
  467. }
  468. while (vnode.component) {
  469. vnode = vnode.component.subTree;
  470. }
  471. if (vnode.shapeFlag & 1 && vnode.el) {
  472. setVarsOnNode(vnode.el, vars);
  473. } else if (vnode.type === Fragment) {
  474. vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  475. } else if (vnode.type === Static) {
  476. let { el, anchor } = vnode;
  477. while (el) {
  478. setVarsOnNode(el, vars);
  479. if (el === anchor) break;
  480. el = el.nextSibling;
  481. }
  482. }
  483. }
  484. function setVarsOnNode(el, vars) {
  485. if (el.nodeType === 1) {
  486. const style = el.style;
  487. let cssText = "";
  488. for (const key in vars) {
  489. style.setProperty(`--${key}`, vars[key]);
  490. cssText += `--${key}: ${vars[key]};`;
  491. }
  492. style[CSS_VAR_TEXT] = cssText;
  493. }
  494. }
  495. const displayRE = /(^|;)\s*display\s*:/;
  496. function patchStyle(el, prev, next) {
  497. const style = el.style;
  498. const isCssString = isString(next);
  499. let hasControlledDisplay = false;
  500. if (next && !isCssString) {
  501. if (prev) {
  502. if (!isString(prev)) {
  503. for (const key in prev) {
  504. if (next[key] == null) {
  505. setStyle(style, key, "");
  506. }
  507. }
  508. } else {
  509. for (const prevStyle of prev.split(";")) {
  510. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  511. if (next[key] == null) {
  512. setStyle(style, key, "");
  513. }
  514. }
  515. }
  516. }
  517. for (const key in next) {
  518. if (key === "display") {
  519. hasControlledDisplay = true;
  520. }
  521. setStyle(style, key, next[key]);
  522. }
  523. } else {
  524. if (isCssString) {
  525. if (prev !== next) {
  526. const cssVarText = style[CSS_VAR_TEXT];
  527. if (cssVarText) {
  528. next += ";" + cssVarText;
  529. }
  530. style.cssText = next;
  531. hasControlledDisplay = displayRE.test(next);
  532. }
  533. } else if (prev) {
  534. el.removeAttribute("style");
  535. }
  536. }
  537. if (vShowOriginalDisplay in el) {
  538. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  539. if (el[vShowHidden]) {
  540. style.display = "none";
  541. }
  542. }
  543. }
  544. const semicolonRE = /[^\\];\s*$/;
  545. const importantRE = /\s*!important$/;
  546. function setStyle(style, name, val) {
  547. if (isArray(val)) {
  548. val.forEach((v) => setStyle(style, name, v));
  549. } else {
  550. if (val == null) val = "";
  551. if (!!(process.env.NODE_ENV !== "production")) {
  552. if (semicolonRE.test(val)) {
  553. warn(
  554. `Unexpected semicolon at the end of '${name}' style value: '${val}'`
  555. );
  556. }
  557. }
  558. if (name.startsWith("--")) {
  559. style.setProperty(name, val);
  560. } else {
  561. const prefixed = autoPrefix(style, name);
  562. if (importantRE.test(val)) {
  563. style.setProperty(
  564. hyphenate(prefixed),
  565. val.replace(importantRE, ""),
  566. "important"
  567. );
  568. } else {
  569. style[prefixed] = val;
  570. }
  571. }
  572. }
  573. }
  574. const prefixes = ["Webkit", "Moz", "ms"];
  575. const prefixCache = {};
  576. function autoPrefix(style, rawName) {
  577. const cached = prefixCache[rawName];
  578. if (cached) {
  579. return cached;
  580. }
  581. let name = camelize(rawName);
  582. if (name !== "filter" && name in style) {
  583. return prefixCache[rawName] = name;
  584. }
  585. name = capitalize(name);
  586. for (let i = 0; i < prefixes.length; i++) {
  587. const prefixed = prefixes[i] + name;
  588. if (prefixed in style) {
  589. return prefixCache[rawName] = prefixed;
  590. }
  591. }
  592. return rawName;
  593. }
  594. const xlinkNS = "http://www.w3.org/1999/xlink";
  595. function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
  596. if (isSVG && key.startsWith("xlink:")) {
  597. if (value == null) {
  598. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  599. } else {
  600. el.setAttributeNS(xlinkNS, key, value);
  601. }
  602. } else {
  603. if (value == null || isBoolean && !includeBooleanAttr(value)) {
  604. el.removeAttribute(key);
  605. } else {
  606. el.setAttribute(
  607. key,
  608. isBoolean ? "" : isSymbol(value) ? String(value) : value
  609. );
  610. }
  611. }
  612. }
  613. function patchDOMProp(el, key, value, parentComponent, attrName) {
  614. if (key === "innerHTML" || key === "textContent") {
  615. if (value != null) {
  616. el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  617. }
  618. return;
  619. }
  620. const tag = el.tagName;
  621. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  622. !tag.includes("-")) {
  623. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  624. const newValue = value == null ? (
  625. // #11647: value should be set as empty string for null and undefined,
  626. // but <input type="checkbox"> should be set as 'on'.
  627. el.type === "checkbox" ? "on" : ""
  628. ) : String(value);
  629. if (oldValue !== newValue || !("_value" in el)) {
  630. el.value = newValue;
  631. }
  632. if (value == null) {
  633. el.removeAttribute(key);
  634. }
  635. el._value = value;
  636. return;
  637. }
  638. let needRemove = false;
  639. if (value === "" || value == null) {
  640. const type = typeof el[key];
  641. if (type === "boolean") {
  642. value = includeBooleanAttr(value);
  643. } else if (value == null && type === "string") {
  644. value = "";
  645. needRemove = true;
  646. } else if (type === "number") {
  647. value = 0;
  648. needRemove = true;
  649. }
  650. }
  651. try {
  652. el[key] = value;
  653. } catch (e) {
  654. if (!!(process.env.NODE_ENV !== "production") && !needRemove) {
  655. warn(
  656. `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
  657. e
  658. );
  659. }
  660. }
  661. needRemove && el.removeAttribute(attrName || key);
  662. }
  663. function addEventListener(el, event, handler, options) {
  664. el.addEventListener(event, handler, options);
  665. }
  666. function removeEventListener(el, event, handler, options) {
  667. el.removeEventListener(event, handler, options);
  668. }
  669. const veiKey = Symbol("_vei");
  670. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  671. const invokers = el[veiKey] || (el[veiKey] = {});
  672. const existingInvoker = invokers[rawName];
  673. if (nextValue && existingInvoker) {
  674. existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue;
  675. } else {
  676. const [name, options] = parseName(rawName);
  677. if (nextValue) {
  678. const invoker = invokers[rawName] = createInvoker(
  679. !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue,
  680. instance
  681. );
  682. addEventListener(el, name, invoker, options);
  683. } else if (existingInvoker) {
  684. removeEventListener(el, name, existingInvoker, options);
  685. invokers[rawName] = void 0;
  686. }
  687. }
  688. }
  689. const optionsModifierRE = /(?:Once|Passive|Capture)$/;
  690. function parseName(name) {
  691. let options;
  692. if (optionsModifierRE.test(name)) {
  693. options = {};
  694. let m;
  695. while (m = name.match(optionsModifierRE)) {
  696. name = name.slice(0, name.length - m[0].length);
  697. options[m[0].toLowerCase()] = true;
  698. }
  699. }
  700. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  701. return [event, options];
  702. }
  703. let cachedNow = 0;
  704. const p = /* @__PURE__ */ Promise.resolve();
  705. const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  706. function createInvoker(initialValue, instance) {
  707. const invoker = (e) => {
  708. if (!e._vts) {
  709. e._vts = Date.now();
  710. } else if (e._vts <= invoker.attached) {
  711. return;
  712. }
  713. callWithAsyncErrorHandling(
  714. patchStopImmediatePropagation(e, invoker.value),
  715. instance,
  716. 5,
  717. [e]
  718. );
  719. };
  720. invoker.value = initialValue;
  721. invoker.attached = getNow();
  722. return invoker;
  723. }
  724. function sanitizeEventValue(value, propName) {
  725. if (isFunction(value) || isArray(value)) {
  726. return value;
  727. }
  728. warn(
  729. `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
  730. Expected function or array of functions, received type ${typeof value}.`
  731. );
  732. return NOOP;
  733. }
  734. function patchStopImmediatePropagation(e, value) {
  735. if (isArray(value)) {
  736. const originalStop = e.stopImmediatePropagation;
  737. e.stopImmediatePropagation = () => {
  738. originalStop.call(e);
  739. e._stopped = true;
  740. };
  741. return value.map(
  742. (fn) => (e2) => !e2._stopped && fn && fn(e2)
  743. );
  744. } else {
  745. return value;
  746. }
  747. }
  748. const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  749. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  750. const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  751. const isSVG = namespace === "svg";
  752. if (key === "class") {
  753. patchClass(el, nextValue, isSVG);
  754. } else if (key === "style") {
  755. patchStyle(el, prevValue, nextValue);
  756. } else if (isOn(key)) {
  757. if (!isModelListener(key)) {
  758. patchEvent(el, key, prevValue, nextValue, parentComponent);
  759. }
  760. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  761. patchDOMProp(el, key, nextValue);
  762. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
  763. patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  764. }
  765. } else if (
  766. // #11081 force set props for possible async custom element
  767. el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
  768. ) {
  769. patchDOMProp(el, camelize$1(key), nextValue, parentComponent, key);
  770. } else {
  771. if (key === "true-value") {
  772. el._trueValue = nextValue;
  773. } else if (key === "false-value") {
  774. el._falseValue = nextValue;
  775. }
  776. patchAttr(el, key, nextValue, isSVG);
  777. }
  778. };
  779. function shouldSetAsProp(el, key, value, isSVG) {
  780. if (isSVG) {
  781. if (key === "innerHTML" || key === "textContent") {
  782. return true;
  783. }
  784. if (key in el && isNativeOn(key) && isFunction(value)) {
  785. return true;
  786. }
  787. return false;
  788. }
  789. if (key === "spellcheck" || key === "draggable" || key === "translate") {
  790. return false;
  791. }
  792. if (key === "form") {
  793. return false;
  794. }
  795. if (key === "list" && el.tagName === "INPUT") {
  796. return false;
  797. }
  798. if (key === "type" && el.tagName === "TEXTAREA") {
  799. return false;
  800. }
  801. if (key === "width" || key === "height") {
  802. const tag = el.tagName;
  803. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  804. return false;
  805. }
  806. }
  807. if (isNativeOn(key) && isString(value)) {
  808. return false;
  809. }
  810. return key in el;
  811. }
  812. const REMOVAL = {};
  813. /*! #__NO_SIDE_EFFECTS__ */
  814. // @__NO_SIDE_EFFECTS__
  815. function defineCustomElement(options, extraOptions, _createApp) {
  816. const Comp = defineComponent(options, extraOptions);
  817. if (isPlainObject(Comp)) extend(Comp, extraOptions);
  818. class VueCustomElement extends VueElement {
  819. constructor(initialProps) {
  820. super(Comp, initialProps, _createApp);
  821. }
  822. }
  823. VueCustomElement.def = Comp;
  824. return VueCustomElement;
  825. }
  826. /*! #__NO_SIDE_EFFECTS__ */
  827. const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
  828. return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
  829. };
  830. const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  831. };
  832. class VueElement extends BaseClass {
  833. constructor(_def, _props = {}, _createApp = createApp) {
  834. super();
  835. this._def = _def;
  836. this._props = _props;
  837. this._createApp = _createApp;
  838. this._isVueCE = true;
  839. /**
  840. * @internal
  841. */
  842. this._instance = null;
  843. /**
  844. * @internal
  845. */
  846. this._app = null;
  847. /**
  848. * @internal
  849. */
  850. this._nonce = this._def.nonce;
  851. this._connected = false;
  852. this._resolved = false;
  853. this._numberProps = null;
  854. this._styleChildren = /* @__PURE__ */ new WeakSet();
  855. this._ob = null;
  856. if (this.shadowRoot && _createApp !== createApp) {
  857. this._root = this.shadowRoot;
  858. } else {
  859. if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) {
  860. warn(
  861. `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
  862. );
  863. }
  864. if (_def.shadowRoot !== false) {
  865. this.attachShadow({ mode: "open" });
  866. this._root = this.shadowRoot;
  867. } else {
  868. this._root = this;
  869. }
  870. }
  871. if (!this._def.__asyncLoader) {
  872. this._resolveProps(this._def);
  873. }
  874. }
  875. connectedCallback() {
  876. if (!this.isConnected) return;
  877. if (!this.shadowRoot) {
  878. this._parseSlots();
  879. }
  880. this._connected = true;
  881. let parent = this;
  882. while (parent = parent && (parent.parentNode || parent.host)) {
  883. if (parent instanceof VueElement) {
  884. this._parent = parent;
  885. break;
  886. }
  887. }
  888. if (!this._instance) {
  889. if (this._resolved) {
  890. this._setParent();
  891. this._update();
  892. } else {
  893. if (parent && parent._pendingResolve) {
  894. this._pendingResolve = parent._pendingResolve.then(() => {
  895. this._pendingResolve = void 0;
  896. this._resolveDef();
  897. });
  898. } else {
  899. this._resolveDef();
  900. }
  901. }
  902. }
  903. }
  904. _setParent(parent = this._parent) {
  905. if (parent) {
  906. this._instance.parent = parent._instance;
  907. this._instance.provides = parent._instance.provides;
  908. }
  909. }
  910. disconnectedCallback() {
  911. this._connected = false;
  912. nextTick(() => {
  913. if (!this._connected) {
  914. if (this._ob) {
  915. this._ob.disconnect();
  916. this._ob = null;
  917. }
  918. this._app && this._app.unmount();
  919. if (this._instance) this._instance.ce = void 0;
  920. this._app = this._instance = null;
  921. }
  922. });
  923. }
  924. /**
  925. * resolve inner component definition (handle possible async component)
  926. */
  927. _resolveDef() {
  928. if (this._pendingResolve) {
  929. return;
  930. }
  931. for (let i = 0; i < this.attributes.length; i++) {
  932. this._setAttr(this.attributes[i].name);
  933. }
  934. this._ob = new MutationObserver((mutations) => {
  935. for (const m of mutations) {
  936. this._setAttr(m.attributeName);
  937. }
  938. });
  939. this._ob.observe(this, { attributes: true });
  940. const resolve = (def, isAsync = false) => {
  941. this._resolved = true;
  942. this._pendingResolve = void 0;
  943. const { props, styles } = def;
  944. let numberProps;
  945. if (props && !isArray(props)) {
  946. for (const key in props) {
  947. const opt = props[key];
  948. if (opt === Number || opt && opt.type === Number) {
  949. if (key in this._props) {
  950. this._props[key] = toNumber(this._props[key]);
  951. }
  952. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true;
  953. }
  954. }
  955. }
  956. this._numberProps = numberProps;
  957. if (isAsync) {
  958. this._resolveProps(def);
  959. }
  960. if (this.shadowRoot) {
  961. this._applyStyles(styles);
  962. } else if (!!(process.env.NODE_ENV !== "production") && styles) {
  963. warn(
  964. "Custom element style injection is not supported when using shadowRoot: false"
  965. );
  966. }
  967. this._mount(def);
  968. };
  969. const asyncDef = this._def.__asyncLoader;
  970. if (asyncDef) {
  971. this._pendingResolve = asyncDef().then(
  972. (def) => resolve(this._def = def, true)
  973. );
  974. } else {
  975. resolve(this._def);
  976. }
  977. }
  978. _mount(def) {
  979. if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) && !def.name) {
  980. def.name = "VueElement";
  981. }
  982. this._app = this._createApp(def);
  983. if (def.configureApp) {
  984. def.configureApp(this._app);
  985. }
  986. this._app._ceVNode = this._createVNode();
  987. this._app.mount(this._root);
  988. const exposed = this._instance && this._instance.exposed;
  989. if (!exposed) return;
  990. for (const key in exposed) {
  991. if (!hasOwn(this, key)) {
  992. Object.defineProperty(this, key, {
  993. // unwrap ref to be consistent with public instance behavior
  994. get: () => unref(exposed[key])
  995. });
  996. } else if (!!(process.env.NODE_ENV !== "production")) {
  997. warn(`Exposed property "${key}" already exists on custom element.`);
  998. }
  999. }
  1000. }
  1001. _resolveProps(def) {
  1002. const { props } = def;
  1003. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  1004. for (const key of Object.keys(this)) {
  1005. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  1006. this._setProp(key, this[key]);
  1007. }
  1008. }
  1009. for (const key of declaredPropKeys.map(camelize$1)) {
  1010. Object.defineProperty(this, key, {
  1011. get() {
  1012. return this._getProp(key);
  1013. },
  1014. set(val) {
  1015. this._setProp(key, val, true, true);
  1016. }
  1017. });
  1018. }
  1019. }
  1020. _setAttr(key) {
  1021. if (key.startsWith("data-v-")) return;
  1022. const has = this.hasAttribute(key);
  1023. let value = has ? this.getAttribute(key) : REMOVAL;
  1024. const camelKey = camelize$1(key);
  1025. if (has && this._numberProps && this._numberProps[camelKey]) {
  1026. value = toNumber(value);
  1027. }
  1028. this._setProp(camelKey, value, false, true);
  1029. }
  1030. /**
  1031. * @internal
  1032. */
  1033. _getProp(key) {
  1034. return this._props[key];
  1035. }
  1036. /**
  1037. * @internal
  1038. */
  1039. _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
  1040. if (val !== this._props[key]) {
  1041. if (val === REMOVAL) {
  1042. delete this._props[key];
  1043. } else {
  1044. this._props[key] = val;
  1045. if (key === "key" && this._app) {
  1046. this._app._ceVNode.key = val;
  1047. }
  1048. }
  1049. if (shouldUpdate && this._instance) {
  1050. this._update();
  1051. }
  1052. if (shouldReflect) {
  1053. if (val === true) {
  1054. this.setAttribute(hyphenate(key), "");
  1055. } else if (typeof val === "string" || typeof val === "number") {
  1056. this.setAttribute(hyphenate(key), val + "");
  1057. } else if (!val) {
  1058. this.removeAttribute(hyphenate(key));
  1059. }
  1060. }
  1061. }
  1062. }
  1063. _update() {
  1064. render(this._createVNode(), this._root);
  1065. }
  1066. _createVNode() {
  1067. const baseProps = {};
  1068. if (!this.shadowRoot) {
  1069. baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
  1070. }
  1071. const vnode = createVNode(this._def, extend(baseProps, this._props));
  1072. if (!this._instance) {
  1073. vnode.ce = (instance) => {
  1074. this._instance = instance;
  1075. instance.ce = this;
  1076. instance.isCE = true;
  1077. if (!!(process.env.NODE_ENV !== "production")) {
  1078. instance.ceReload = (newStyles) => {
  1079. if (this._styles) {
  1080. this._styles.forEach((s) => this._root.removeChild(s));
  1081. this._styles.length = 0;
  1082. }
  1083. this._applyStyles(newStyles);
  1084. this._instance = null;
  1085. this._update();
  1086. };
  1087. }
  1088. const dispatch = (event, args) => {
  1089. this.dispatchEvent(
  1090. new CustomEvent(
  1091. event,
  1092. isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
  1093. )
  1094. );
  1095. };
  1096. instance.emit = (event, ...args) => {
  1097. dispatch(event, args);
  1098. if (hyphenate(event) !== event) {
  1099. dispatch(hyphenate(event), args);
  1100. }
  1101. };
  1102. this._setParent();
  1103. };
  1104. }
  1105. return vnode;
  1106. }
  1107. _applyStyles(styles, owner) {
  1108. if (!styles) return;
  1109. if (owner) {
  1110. if (owner === this._def || this._styleChildren.has(owner)) {
  1111. return;
  1112. }
  1113. this._styleChildren.add(owner);
  1114. }
  1115. const nonce = this._nonce;
  1116. for (let i = styles.length - 1; i >= 0; i--) {
  1117. const s = document.createElement("style");
  1118. if (nonce) s.setAttribute("nonce", nonce);
  1119. s.textContent = styles[i];
  1120. this.shadowRoot.prepend(s);
  1121. if (!!(process.env.NODE_ENV !== "production")) {
  1122. if (owner) {
  1123. if (owner.__hmrId) {
  1124. if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
  1125. let entry = this._childStyles.get(owner.__hmrId);
  1126. if (!entry) {
  1127. this._childStyles.set(owner.__hmrId, entry = []);
  1128. }
  1129. entry.push(s);
  1130. }
  1131. } else {
  1132. (this._styles || (this._styles = [])).push(s);
  1133. }
  1134. }
  1135. }
  1136. }
  1137. /**
  1138. * Only called when shadowRoot is false
  1139. */
  1140. _parseSlots() {
  1141. const slots = this._slots = {};
  1142. let n;
  1143. while (n = this.firstChild) {
  1144. const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
  1145. (slots[slotName] || (slots[slotName] = [])).push(n);
  1146. this.removeChild(n);
  1147. }
  1148. }
  1149. /**
  1150. * Only called when shadowRoot is false
  1151. */
  1152. _renderSlots() {
  1153. const outlets = (this._teleportTarget || this).querySelectorAll("slot");
  1154. const scopeId = this._instance.type.__scopeId;
  1155. for (let i = 0; i < outlets.length; i++) {
  1156. const o = outlets[i];
  1157. const slotName = o.getAttribute("name") || "default";
  1158. const content = this._slots[slotName];
  1159. const parent = o.parentNode;
  1160. if (content) {
  1161. for (const n of content) {
  1162. if (scopeId && n.nodeType === 1) {
  1163. const id = scopeId + "-s";
  1164. const walker = document.createTreeWalker(n, 1);
  1165. n.setAttribute(id, "");
  1166. let child;
  1167. while (child = walker.nextNode()) {
  1168. child.setAttribute(id, "");
  1169. }
  1170. }
  1171. parent.insertBefore(n, o);
  1172. }
  1173. } else {
  1174. while (o.firstChild) parent.insertBefore(o.firstChild, o);
  1175. }
  1176. parent.removeChild(o);
  1177. }
  1178. }
  1179. /**
  1180. * @internal
  1181. */
  1182. _injectChildStyle(comp) {
  1183. this._applyStyles(comp.styles, comp);
  1184. }
  1185. /**
  1186. * @internal
  1187. */
  1188. _removeChildStyle(comp) {
  1189. if (!!(process.env.NODE_ENV !== "production")) {
  1190. this._styleChildren.delete(comp);
  1191. if (this._childStyles && comp.__hmrId) {
  1192. const oldStyles = this._childStyles.get(comp.__hmrId);
  1193. if (oldStyles) {
  1194. oldStyles.forEach((s) => this._root.removeChild(s));
  1195. oldStyles.length = 0;
  1196. }
  1197. }
  1198. }
  1199. }
  1200. }
  1201. function useHost(caller) {
  1202. const instance = getCurrentInstance();
  1203. const el = instance && instance.ce;
  1204. if (el) {
  1205. return el;
  1206. } else if (!!(process.env.NODE_ENV !== "production")) {
  1207. if (!instance) {
  1208. warn(
  1209. `${caller || "useHost"} called without an active component instance.`
  1210. );
  1211. } else {
  1212. warn(
  1213. `${caller || "useHost"} can only be used in components defined via defineCustomElement.`
  1214. );
  1215. }
  1216. }
  1217. return null;
  1218. }
  1219. function useShadowRoot() {
  1220. const el = !!(process.env.NODE_ENV !== "production") ? useHost("useShadowRoot") : useHost();
  1221. return el && el.shadowRoot;
  1222. }
  1223. function useCssModule(name = "$style") {
  1224. {
  1225. const instance = getCurrentInstance();
  1226. if (!instance) {
  1227. !!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`);
  1228. return EMPTY_OBJ;
  1229. }
  1230. const modules = instance.type.__cssModules;
  1231. if (!modules) {
  1232. !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`);
  1233. return EMPTY_OBJ;
  1234. }
  1235. const mod = modules[name];
  1236. if (!mod) {
  1237. !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`);
  1238. return EMPTY_OBJ;
  1239. }
  1240. return mod;
  1241. }
  1242. }
  1243. const positionMap = /* @__PURE__ */ new WeakMap();
  1244. const newPositionMap = /* @__PURE__ */ new WeakMap();
  1245. const moveCbKey = Symbol("_moveCb");
  1246. const enterCbKey = Symbol("_enterCb");
  1247. const decorate = (t) => {
  1248. delete t.props.mode;
  1249. return t;
  1250. };
  1251. const TransitionGroupImpl = /* @__PURE__ */ decorate({
  1252. name: "TransitionGroup",
  1253. props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
  1254. tag: String,
  1255. moveClass: String
  1256. }),
  1257. setup(props, { slots }) {
  1258. const instance = getCurrentInstance();
  1259. const state = useTransitionState();
  1260. let prevChildren;
  1261. let children;
  1262. onUpdated(() => {
  1263. if (!prevChildren.length) {
  1264. return;
  1265. }
  1266. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  1267. if (!hasCSSTransform(
  1268. prevChildren[0].el,
  1269. instance.vnode.el,
  1270. moveClass
  1271. )) {
  1272. return;
  1273. }
  1274. prevChildren.forEach(callPendingCbs);
  1275. prevChildren.forEach(recordPosition);
  1276. const movedChildren = prevChildren.filter(applyTranslation);
  1277. forceReflow();
  1278. movedChildren.forEach((c) => {
  1279. const el = c.el;
  1280. const style = el.style;
  1281. addTransitionClass(el, moveClass);
  1282. style.transform = style.webkitTransform = style.transitionDuration = "";
  1283. const cb = el[moveCbKey] = (e) => {
  1284. if (e && e.target !== el) {
  1285. return;
  1286. }
  1287. if (!e || /transform$/.test(e.propertyName)) {
  1288. el.removeEventListener("transitionend", cb);
  1289. el[moveCbKey] = null;
  1290. removeTransitionClass(el, moveClass);
  1291. }
  1292. };
  1293. el.addEventListener("transitionend", cb);
  1294. });
  1295. });
  1296. return () => {
  1297. const rawProps = toRaw(props);
  1298. const cssTransitionProps = resolveTransitionProps(rawProps);
  1299. let tag = rawProps.tag || Fragment;
  1300. prevChildren = [];
  1301. if (children) {
  1302. for (let i = 0; i < children.length; i++) {
  1303. const child = children[i];
  1304. if (child.el && child.el instanceof Element) {
  1305. prevChildren.push(child);
  1306. setTransitionHooks(
  1307. child,
  1308. resolveTransitionHooks(
  1309. child,
  1310. cssTransitionProps,
  1311. state,
  1312. instance
  1313. )
  1314. );
  1315. positionMap.set(
  1316. child,
  1317. child.el.getBoundingClientRect()
  1318. );
  1319. }
  1320. }
  1321. }
  1322. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  1323. for (let i = 0; i < children.length; i++) {
  1324. const child = children[i];
  1325. if (child.key != null) {
  1326. setTransitionHooks(
  1327. child,
  1328. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  1329. );
  1330. } else if (!!(process.env.NODE_ENV !== "production") && child.type !== Text) {
  1331. warn(`<TransitionGroup> children must be keyed.`);
  1332. }
  1333. }
  1334. return createVNode(tag, null, children);
  1335. };
  1336. }
  1337. });
  1338. const TransitionGroup = TransitionGroupImpl;
  1339. function callPendingCbs(c) {
  1340. const el = c.el;
  1341. if (el[moveCbKey]) {
  1342. el[moveCbKey]();
  1343. }
  1344. if (el[enterCbKey]) {
  1345. el[enterCbKey]();
  1346. }
  1347. }
  1348. function recordPosition(c) {
  1349. newPositionMap.set(c, c.el.getBoundingClientRect());
  1350. }
  1351. function applyTranslation(c) {
  1352. const oldPos = positionMap.get(c);
  1353. const newPos = newPositionMap.get(c);
  1354. const dx = oldPos.left - newPos.left;
  1355. const dy = oldPos.top - newPos.top;
  1356. if (dx || dy) {
  1357. const s = c.el.style;
  1358. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  1359. s.transitionDuration = "0s";
  1360. return c;
  1361. }
  1362. }
  1363. function hasCSSTransform(el, root, moveClass) {
  1364. const clone = el.cloneNode();
  1365. const _vtc = el[vtcKey];
  1366. if (_vtc) {
  1367. _vtc.forEach((cls) => {
  1368. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  1369. });
  1370. }
  1371. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  1372. clone.style.display = "none";
  1373. const container = root.nodeType === 1 ? root : root.parentNode;
  1374. container.appendChild(clone);
  1375. const { hasTransform } = getTransitionInfo(clone);
  1376. container.removeChild(clone);
  1377. return hasTransform;
  1378. }
  1379. const getModelAssigner = (vnode) => {
  1380. const fn = vnode.props["onUpdate:modelValue"] || false;
  1381. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  1382. };
  1383. function onCompositionStart(e) {
  1384. e.target.composing = true;
  1385. }
  1386. function onCompositionEnd(e) {
  1387. const target = e.target;
  1388. if (target.composing) {
  1389. target.composing = false;
  1390. target.dispatchEvent(new Event("input"));
  1391. }
  1392. }
  1393. const assignKey = Symbol("_assign");
  1394. const vModelText = {
  1395. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  1396. el[assignKey] = getModelAssigner(vnode);
  1397. const castToNumber = number || vnode.props && vnode.props.type === "number";
  1398. addEventListener(el, lazy ? "change" : "input", (e) => {
  1399. if (e.target.composing) return;
  1400. let domValue = el.value;
  1401. if (trim) {
  1402. domValue = domValue.trim();
  1403. }
  1404. if (castToNumber) {
  1405. domValue = looseToNumber(domValue);
  1406. }
  1407. el[assignKey](domValue);
  1408. });
  1409. if (trim) {
  1410. addEventListener(el, "change", () => {
  1411. el.value = el.value.trim();
  1412. });
  1413. }
  1414. if (!lazy) {
  1415. addEventListener(el, "compositionstart", onCompositionStart);
  1416. addEventListener(el, "compositionend", onCompositionEnd);
  1417. addEventListener(el, "change", onCompositionEnd);
  1418. }
  1419. },
  1420. // set value on mounted so it's after min/max for type="range"
  1421. mounted(el, { value }) {
  1422. el.value = value == null ? "" : value;
  1423. },
  1424. beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
  1425. el[assignKey] = getModelAssigner(vnode);
  1426. if (el.composing) return;
  1427. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
  1428. const newValue = value == null ? "" : value;
  1429. if (elValue === newValue) {
  1430. return;
  1431. }
  1432. if (document.activeElement === el && el.type !== "range") {
  1433. if (lazy && value === oldValue) {
  1434. return;
  1435. }
  1436. if (trim && el.value.trim() === newValue) {
  1437. return;
  1438. }
  1439. }
  1440. el.value = newValue;
  1441. }
  1442. };
  1443. const vModelCheckbox = {
  1444. // #4096 array checkboxes need to be deep traversed
  1445. deep: true,
  1446. created(el, _, vnode) {
  1447. el[assignKey] = getModelAssigner(vnode);
  1448. addEventListener(el, "change", () => {
  1449. const modelValue = el._modelValue;
  1450. const elementValue = getValue(el);
  1451. const checked = el.checked;
  1452. const assign = el[assignKey];
  1453. if (isArray(modelValue)) {
  1454. const index = looseIndexOf(modelValue, elementValue);
  1455. const found = index !== -1;
  1456. if (checked && !found) {
  1457. assign(modelValue.concat(elementValue));
  1458. } else if (!checked && found) {
  1459. const filtered = [...modelValue];
  1460. filtered.splice(index, 1);
  1461. assign(filtered);
  1462. }
  1463. } else if (isSet(modelValue)) {
  1464. const cloned = new Set(modelValue);
  1465. if (checked) {
  1466. cloned.add(elementValue);
  1467. } else {
  1468. cloned.delete(elementValue);
  1469. }
  1470. assign(cloned);
  1471. } else {
  1472. assign(getCheckboxValue(el, checked));
  1473. }
  1474. });
  1475. },
  1476. // set initial checked on mount to wait for true-value/false-value
  1477. mounted: setChecked,
  1478. beforeUpdate(el, binding, vnode) {
  1479. el[assignKey] = getModelAssigner(vnode);
  1480. setChecked(el, binding, vnode);
  1481. }
  1482. };
  1483. function setChecked(el, { value, oldValue }, vnode) {
  1484. el._modelValue = value;
  1485. let checked;
  1486. if (isArray(value)) {
  1487. checked = looseIndexOf(value, vnode.props.value) > -1;
  1488. } else if (isSet(value)) {
  1489. checked = value.has(vnode.props.value);
  1490. } else {
  1491. if (value === oldValue) return;
  1492. checked = looseEqual(value, getCheckboxValue(el, true));
  1493. }
  1494. if (el.checked !== checked) {
  1495. el.checked = checked;
  1496. }
  1497. }
  1498. const vModelRadio = {
  1499. created(el, { value }, vnode) {
  1500. el.checked = looseEqual(value, vnode.props.value);
  1501. el[assignKey] = getModelAssigner(vnode);
  1502. addEventListener(el, "change", () => {
  1503. el[assignKey](getValue(el));
  1504. });
  1505. },
  1506. beforeUpdate(el, { value, oldValue }, vnode) {
  1507. el[assignKey] = getModelAssigner(vnode);
  1508. if (value !== oldValue) {
  1509. el.checked = looseEqual(value, vnode.props.value);
  1510. }
  1511. }
  1512. };
  1513. const vModelSelect = {
  1514. // <select multiple> value need to be deep traversed
  1515. deep: true,
  1516. created(el, { value, modifiers: { number } }, vnode) {
  1517. const isSetModel = isSet(value);
  1518. addEventListener(el, "change", () => {
  1519. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  1520. (o) => number ? looseToNumber(getValue(o)) : getValue(o)
  1521. );
  1522. el[assignKey](
  1523. el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
  1524. );
  1525. el._assigning = true;
  1526. nextTick(() => {
  1527. el._assigning = false;
  1528. });
  1529. });
  1530. el[assignKey] = getModelAssigner(vnode);
  1531. },
  1532. // set value in mounted & updated because <select> relies on its children
  1533. // <option>s.
  1534. mounted(el, { value }) {
  1535. setSelected(el, value);
  1536. },
  1537. beforeUpdate(el, _binding, vnode) {
  1538. el[assignKey] = getModelAssigner(vnode);
  1539. },
  1540. updated(el, { value }) {
  1541. if (!el._assigning) {
  1542. setSelected(el, value);
  1543. }
  1544. }
  1545. };
  1546. function setSelected(el, value) {
  1547. const isMultiple = el.multiple;
  1548. const isArrayValue = isArray(value);
  1549. if (isMultiple && !isArrayValue && !isSet(value)) {
  1550. !!(process.env.NODE_ENV !== "production") && warn(
  1551. `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
  1552. );
  1553. return;
  1554. }
  1555. for (let i = 0, l = el.options.length; i < l; i++) {
  1556. const option = el.options[i];
  1557. const optionValue = getValue(option);
  1558. if (isMultiple) {
  1559. if (isArrayValue) {
  1560. const optionType = typeof optionValue;
  1561. if (optionType === "string" || optionType === "number") {
  1562. option.selected = value.some((v) => String(v) === String(optionValue));
  1563. } else {
  1564. option.selected = looseIndexOf(value, optionValue) > -1;
  1565. }
  1566. } else {
  1567. option.selected = value.has(optionValue);
  1568. }
  1569. } else if (looseEqual(getValue(option), value)) {
  1570. if (el.selectedIndex !== i) el.selectedIndex = i;
  1571. return;
  1572. }
  1573. }
  1574. if (!isMultiple && el.selectedIndex !== -1) {
  1575. el.selectedIndex = -1;
  1576. }
  1577. }
  1578. function getValue(el) {
  1579. return "_value" in el ? el._value : el.value;
  1580. }
  1581. function getCheckboxValue(el, checked) {
  1582. const key = checked ? "_trueValue" : "_falseValue";
  1583. return key in el ? el[key] : checked;
  1584. }
  1585. const vModelDynamic = {
  1586. created(el, binding, vnode) {
  1587. callModelHook(el, binding, vnode, null, "created");
  1588. },
  1589. mounted(el, binding, vnode) {
  1590. callModelHook(el, binding, vnode, null, "mounted");
  1591. },
  1592. beforeUpdate(el, binding, vnode, prevVNode) {
  1593. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  1594. },
  1595. updated(el, binding, vnode, prevVNode) {
  1596. callModelHook(el, binding, vnode, prevVNode, "updated");
  1597. }
  1598. };
  1599. function resolveDynamicModel(tagName, type) {
  1600. switch (tagName) {
  1601. case "SELECT":
  1602. return vModelSelect;
  1603. case "TEXTAREA":
  1604. return vModelText;
  1605. default:
  1606. switch (type) {
  1607. case "checkbox":
  1608. return vModelCheckbox;
  1609. case "radio":
  1610. return vModelRadio;
  1611. default:
  1612. return vModelText;
  1613. }
  1614. }
  1615. }
  1616. function callModelHook(el, binding, vnode, prevVNode, hook) {
  1617. const modelToUse = resolveDynamicModel(
  1618. el.tagName,
  1619. vnode.props && vnode.props.type
  1620. );
  1621. const fn = modelToUse[hook];
  1622. fn && fn(el, binding, vnode, prevVNode);
  1623. }
  1624. function initVModelForSSR() {
  1625. vModelText.getSSRProps = ({ value }) => ({ value });
  1626. vModelRadio.getSSRProps = ({ value }, vnode) => {
  1627. if (vnode.props && looseEqual(vnode.props.value, value)) {
  1628. return { checked: true };
  1629. }
  1630. };
  1631. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  1632. if (isArray(value)) {
  1633. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
  1634. return { checked: true };
  1635. }
  1636. } else if (isSet(value)) {
  1637. if (vnode.props && value.has(vnode.props.value)) {
  1638. return { checked: true };
  1639. }
  1640. } else if (value) {
  1641. return { checked: true };
  1642. }
  1643. };
  1644. vModelDynamic.getSSRProps = (binding, vnode) => {
  1645. if (typeof vnode.type !== "string") {
  1646. return;
  1647. }
  1648. const modelToUse = resolveDynamicModel(
  1649. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  1650. vnode.type.toUpperCase(),
  1651. vnode.props && vnode.props.type
  1652. );
  1653. if (modelToUse.getSSRProps) {
  1654. return modelToUse.getSSRProps(binding, vnode);
  1655. }
  1656. };
  1657. }
  1658. const systemModifiers = ["ctrl", "shift", "alt", "meta"];
  1659. const modifierGuards = {
  1660. stop: (e) => e.stopPropagation(),
  1661. prevent: (e) => e.preventDefault(),
  1662. self: (e) => e.target !== e.currentTarget,
  1663. ctrl: (e) => !e.ctrlKey,
  1664. shift: (e) => !e.shiftKey,
  1665. alt: (e) => !e.altKey,
  1666. meta: (e) => !e.metaKey,
  1667. left: (e) => "button" in e && e.button !== 0,
  1668. middle: (e) => "button" in e && e.button !== 1,
  1669. right: (e) => "button" in e && e.button !== 2,
  1670. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  1671. };
  1672. const withModifiers = (fn, modifiers) => {
  1673. const cache = fn._withMods || (fn._withMods = {});
  1674. const cacheKey = modifiers.join(".");
  1675. return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
  1676. for (let i = 0; i < modifiers.length; i++) {
  1677. const guard = modifierGuards[modifiers[i]];
  1678. if (guard && guard(event, modifiers)) return;
  1679. }
  1680. return fn(event, ...args);
  1681. });
  1682. };
  1683. const keyNames = {
  1684. esc: "escape",
  1685. space: " ",
  1686. up: "arrow-up",
  1687. left: "arrow-left",
  1688. right: "arrow-right",
  1689. down: "arrow-down",
  1690. delete: "backspace"
  1691. };
  1692. const withKeys = (fn, modifiers) => {
  1693. const cache = fn._withKeys || (fn._withKeys = {});
  1694. const cacheKey = modifiers.join(".");
  1695. return cache[cacheKey] || (cache[cacheKey] = (event) => {
  1696. if (!("key" in event)) {
  1697. return;
  1698. }
  1699. const eventKey = hyphenate(event.key);
  1700. if (modifiers.some(
  1701. (k) => k === eventKey || keyNames[k] === eventKey
  1702. )) {
  1703. return fn(event);
  1704. }
  1705. });
  1706. };
  1707. const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
  1708. let renderer;
  1709. let enabledHydration = false;
  1710. function ensureRenderer() {
  1711. return renderer || (renderer = createRenderer(rendererOptions));
  1712. }
  1713. function ensureHydrationRenderer() {
  1714. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  1715. enabledHydration = true;
  1716. return renderer;
  1717. }
  1718. const render = (...args) => {
  1719. ensureRenderer().render(...args);
  1720. };
  1721. const hydrate = (...args) => {
  1722. ensureHydrationRenderer().hydrate(...args);
  1723. };
  1724. const createApp = (...args) => {
  1725. const app = ensureRenderer().createApp(...args);
  1726. if (!!(process.env.NODE_ENV !== "production")) {
  1727. injectNativeTagCheck(app);
  1728. injectCompilerOptionsCheck(app);
  1729. }
  1730. const { mount } = app;
  1731. app.mount = (containerOrSelector) => {
  1732. const container = normalizeContainer(containerOrSelector);
  1733. if (!container) return;
  1734. const component = app._component;
  1735. if (!isFunction(component) && !component.render && !component.template) {
  1736. component.template = container.innerHTML;
  1737. }
  1738. if (container.nodeType === 1) {
  1739. container.textContent = "";
  1740. }
  1741. const proxy = mount(container, false, resolveRootNamespace(container));
  1742. if (container instanceof Element) {
  1743. container.removeAttribute("v-cloak");
  1744. container.setAttribute("data-v-app", "");
  1745. }
  1746. return proxy;
  1747. };
  1748. return app;
  1749. };
  1750. const createSSRApp = (...args) => {
  1751. const app = ensureHydrationRenderer().createApp(...args);
  1752. if (!!(process.env.NODE_ENV !== "production")) {
  1753. injectNativeTagCheck(app);
  1754. injectCompilerOptionsCheck(app);
  1755. }
  1756. const { mount } = app;
  1757. app.mount = (containerOrSelector) => {
  1758. const container = normalizeContainer(containerOrSelector);
  1759. if (container) {
  1760. return mount(container, true, resolveRootNamespace(container));
  1761. }
  1762. };
  1763. return app;
  1764. };
  1765. function resolveRootNamespace(container) {
  1766. if (container instanceof SVGElement) {
  1767. return "svg";
  1768. }
  1769. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  1770. return "mathml";
  1771. }
  1772. }
  1773. function injectNativeTagCheck(app) {
  1774. Object.defineProperty(app.config, "isNativeTag", {
  1775. value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
  1776. writable: false
  1777. });
  1778. }
  1779. function injectCompilerOptionsCheck(app) {
  1780. if (isRuntimeOnly()) {
  1781. const isCustomElement = app.config.isCustomElement;
  1782. Object.defineProperty(app.config, "isCustomElement", {
  1783. get() {
  1784. return isCustomElement;
  1785. },
  1786. set() {
  1787. warn(
  1788. `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
  1789. );
  1790. }
  1791. });
  1792. const compilerOptions = app.config.compilerOptions;
  1793. const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
  1794. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  1795. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  1796. - For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
  1797. Object.defineProperty(app.config, "compilerOptions", {
  1798. get() {
  1799. warn(msg);
  1800. return compilerOptions;
  1801. },
  1802. set() {
  1803. warn(msg);
  1804. }
  1805. });
  1806. }
  1807. }
  1808. function normalizeContainer(container) {
  1809. if (isString(container)) {
  1810. const res = document.querySelector(container);
  1811. if (!!(process.env.NODE_ENV !== "production") && !res) {
  1812. warn(
  1813. `Failed to mount app: mount target selector "${container}" returned null.`
  1814. );
  1815. }
  1816. return res;
  1817. }
  1818. if (!!(process.env.NODE_ENV !== "production") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
  1819. warn(
  1820. `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
  1821. );
  1822. }
  1823. return container;
  1824. }
  1825. let ssrDirectiveInitialized = false;
  1826. const initDirectivesForSSR = () => {
  1827. if (!ssrDirectiveInitialized) {
  1828. ssrDirectiveInitialized = true;
  1829. initVModelForSSR();
  1830. initVShowForSSR();
  1831. }
  1832. } ;
  1833. export { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, useHost, useShadowRoot, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers };