NRuby

Форк
0
11841 строка · 432.3 Кб
1
/*!
2
 * Vue.js v2.7.8
3
 * (c) 2014-2022 Evan You
4
 * Released under the MIT License.
5
 */
6
(function (global, factory) {
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8
  typeof define === 'function' && define.amd ? define(factory) :
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vue = factory());
10
})(this, (function () { 'use strict';
11

12
  var emptyObject = Object.freeze({});
13
  var isArray = Array.isArray;
14
  // These helpers produce better VM code in JS engines due to their
15
  // explicitness and function inlining.
16
  function isUndef(v) {
17
      return v === undefined || v === null;
18
  }
19
  function isDef(v) {
20
      return v !== undefined && v !== null;
21
  }
22
  function isTrue(v) {
23
      return v === true;
24
  }
25
  function isFalse(v) {
26
      return v === false;
27
  }
28
  /**
29
   * Check if value is primitive.
30
   */
31
  function isPrimitive(value) {
32
      return (typeof value === 'string' ||
33
          typeof value === 'number' ||
34
          // $flow-disable-line
35
          typeof value === 'symbol' ||
36
          typeof value === 'boolean');
37
  }
38
  function isFunction(value) {
39
      return typeof value === 'function';
40
  }
41
  /**
42
   * Quick object check - this is primarily used to tell
43
   * objects from primitive values when we know the value
44
   * is a JSON-compliant type.
45
   */
46
  function isObject(obj) {
47
      return obj !== null && typeof obj === 'object';
48
  }
49
  /**
50
   * Get the raw type string of a value, e.g., [object Object].
51
   */
52
  var _toString = Object.prototype.toString;
53
  function toRawType(value) {
54
      return _toString.call(value).slice(8, -1);
55
  }
56
  /**
57
   * Strict object type check. Only returns true
58
   * for plain JavaScript objects.
59
   */
60
  function isPlainObject(obj) {
61
      return _toString.call(obj) === '[object Object]';
62
  }
63
  function isRegExp(v) {
64
      return _toString.call(v) === '[object RegExp]';
65
  }
66
  /**
67
   * Check if val is a valid array index.
68
   */
69
  function isValidArrayIndex(val) {
70
      var n = parseFloat(String(val));
71
      return n >= 0 && Math.floor(n) === n && isFinite(val);
72
  }
73
  function isPromise(val) {
74
      return (isDef(val) &&
75
          typeof val.then === 'function' &&
76
          typeof val.catch === 'function');
77
  }
78
  /**
79
   * Convert a value to a string that is actually rendered.
80
   */
81
  function toString(val) {
82
      return val == null
83
          ? ''
84
          : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
85
              ? JSON.stringify(val, null, 2)
86
              : String(val);
87
  }
88
  /**
89
   * Convert an input value to a number for persistence.
90
   * If the conversion fails, return original string.
91
   */
92
  function toNumber(val) {
93
      var n = parseFloat(val);
94
      return isNaN(n) ? val : n;
95
  }
96
  /**
97
   * Make a map and return a function for checking if a key
98
   * is in that map.
99
   */
100
  function makeMap(str, expectsLowerCase) {
101
      var map = Object.create(null);
102
      var list = str.split(',');
103
      for (var i = 0; i < list.length; i++) {
104
          map[list[i]] = true;
105
      }
106
      return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };
107
  }
108
  /**
109
   * Check if a tag is a built-in tag.
110
   */
111
  var isBuiltInTag = makeMap('slot,component', true);
112
  /**
113
   * Check if an attribute is a reserved attribute.
114
   */
115
  var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
116
  /**
117
   * Remove an item from an array.
118
   */
119
  function remove$2(arr, item) {
120
      if (arr.length) {
121
          var index = arr.indexOf(item);
122
          if (index > -1) {
123
              return arr.splice(index, 1);
124
          }
125
      }
126
  }
127
  /**
128
   * Check whether an object has the property.
129
   */
130
  var hasOwnProperty = Object.prototype.hasOwnProperty;
131
  function hasOwn(obj, key) {
132
      return hasOwnProperty.call(obj, key);
133
  }
134
  /**
135
   * Create a cached version of a pure function.
136
   */
137
  function cached(fn) {
138
      var cache = Object.create(null);
139
      return function cachedFn(str) {
140
          var hit = cache[str];
141
          return hit || (cache[str] = fn(str));
142
      };
143
  }
144
  /**
145
   * Camelize a hyphen-delimited string.
146
   */
147
  var camelizeRE = /-(\w)/g;
148
  var camelize = cached(function (str) {
149
      return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });
150
  });
151
  /**
152
   * Capitalize a string.
153
   */
154
  var capitalize = cached(function (str) {
155
      return str.charAt(0).toUpperCase() + str.slice(1);
156
  });
157
  /**
158
   * Hyphenate a camelCase string.
159
   */
160
  var hyphenateRE = /\B([A-Z])/g;
161
  var hyphenate = cached(function (str) {
162
      return str.replace(hyphenateRE, '-$1').toLowerCase();
163
  });
164
  /**
165
   * Simple bind polyfill for environments that do not support it,
166
   * e.g., PhantomJS 1.x. Technically, we don't need this anymore
167
   * since native bind is now performant enough in most browsers.
168
   * But removing it would mean breaking code that was able to run in
169
   * PhantomJS 1.x, so this must be kept for backward compatibility.
170
   */
171
  /* istanbul ignore next */
172
  function polyfillBind(fn, ctx) {
173
      function boundFn(a) {
174
          var l = arguments.length;
175
          return l
176
              ? l > 1
177
                  ? fn.apply(ctx, arguments)
178
                  : fn.call(ctx, a)
179
              : fn.call(ctx);
180
      }
181
      boundFn._length = fn.length;
182
      return boundFn;
183
  }
184
  function nativeBind(fn, ctx) {
185
      return fn.bind(ctx);
186
  }
187
  // @ts-expect-error bind cannot be `undefined`
188
  var bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;
189
  /**
190
   * Convert an Array-like object to a real Array.
191
   */
192
  function toArray(list, start) {
193
      start = start || 0;
194
      var i = list.length - start;
195
      var ret = new Array(i);
196
      while (i--) {
197
          ret[i] = list[i + start];
198
      }
199
      return ret;
200
  }
201
  /**
202
   * Mix properties into target object.
203
   */
204
  function extend(to, _from) {
205
      for (var key in _from) {
206
          to[key] = _from[key];
207
      }
208
      return to;
209
  }
210
  /**
211
   * Merge an Array of Objects into a single Object.
212
   */
213
  function toObject(arr) {
214
      var res = {};
215
      for (var i = 0; i < arr.length; i++) {
216
          if (arr[i]) {
217
              extend(res, arr[i]);
218
          }
219
      }
220
      return res;
221
  }
222
  /* eslint-disable no-unused-vars */
223
  /**
224
   * Perform no operation.
225
   * Stubbing args to make Flow happy without leaving useless transpiled code
226
   * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
227
   */
228
  function noop(a, b, c) { }
229
  /**
230
   * Always return false.
231
   */
232
  var no = function (a, b, c) { return false; };
233
  /* eslint-enable no-unused-vars */
234
  /**
235
   * Return the same value.
236
   */
237
  var identity = function (_) { return _; };
238
  /**
239
   * Generate a string containing static keys from compiler modules.
240
   */
241
  function genStaticKeys$1(modules) {
242
      return modules
243
          .reduce(function (keys, m) {
244
          return keys.concat(m.staticKeys || []);
245
      }, [])
246
          .join(',');
247
  }
248
  /**
249
   * Check if two values are loosely equal - that is,
250
   * if they are plain objects, do they have the same shape?
251
   */
252
  function looseEqual(a, b) {
253
      if (a === b)
254
          return true;
255
      var isObjectA = isObject(a);
256
      var isObjectB = isObject(b);
257
      if (isObjectA && isObjectB) {
258
          try {
259
              var isArrayA = Array.isArray(a);
260
              var isArrayB = Array.isArray(b);
261
              if (isArrayA && isArrayB) {
262
                  return (a.length === b.length &&
263
                      a.every(function (e, i) {
264
                          return looseEqual(e, b[i]);
265
                      }));
266
              }
267
              else if (a instanceof Date && b instanceof Date) {
268
                  return a.getTime() === b.getTime();
269
              }
270
              else if (!isArrayA && !isArrayB) {
271
                  var keysA = Object.keys(a);
272
                  var keysB = Object.keys(b);
273
                  return (keysA.length === keysB.length &&
274
                      keysA.every(function (key) {
275
                          return looseEqual(a[key], b[key]);
276
                      }));
277
              }
278
              else {
279
                  /* istanbul ignore next */
280
                  return false;
281
              }
282
          }
283
          catch (e) {
284
              /* istanbul ignore next */
285
              return false;
286
          }
287
      }
288
      else if (!isObjectA && !isObjectB) {
289
          return String(a) === String(b);
290
      }
291
      else {
292
          return false;
293
      }
294
  }
295
  /**
296
   * Return the first index at which a loosely equal value can be
297
   * found in the array (if value is a plain object, the array must
298
   * contain an object of the same shape), or -1 if it is not present.
299
   */
300
  function looseIndexOf(arr, val) {
301
      for (var i = 0; i < arr.length; i++) {
302
          if (looseEqual(arr[i], val))
303
              return i;
304
      }
305
      return -1;
306
  }
307
  /**
308
   * Ensure a function is called only once.
309
   */
310
  function once(fn) {
311
      var called = false;
312
      return function () {
313
          if (!called) {
314
              called = true;
315
              fn.apply(this, arguments);
316
          }
317
      };
318
  }
319
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill
320
  function hasChanged(x, y) {
321
      if (x === y) {
322
          return x === 0 && 1 / x !== 1 / y;
323
      }
324
      else {
325
          return x === x || y === y;
326
      }
327
  }
328

329
  var SSR_ATTR = 'data-server-rendered';
330
  var ASSET_TYPES = ['component', 'directive', 'filter'];
331
  var LIFECYCLE_HOOKS = [
332
      'beforeCreate',
333
      'created',
334
      'beforeMount',
335
      'mounted',
336
      'beforeUpdate',
337
      'updated',
338
      'beforeDestroy',
339
      'destroyed',
340
      'activated',
341
      'deactivated',
342
      'errorCaptured',
343
      'serverPrefetch',
344
      'renderTracked',
345
      'renderTriggered'
346
  ];
347

348
  var config = {
349
      /**
350
       * Option merge strategies (used in core/util/options)
351
       */
352
      // $flow-disable-line
353
      optionMergeStrategies: Object.create(null),
354
      /**
355
       * Whether to suppress warnings.
356
       */
357
      silent: false,
358
      /**
359
       * Show production mode tip message on boot?
360
       */
361
      productionTip: true,
362
      /**
363
       * Whether to enable devtools
364
       */
365
      devtools: true,
366
      /**
367
       * Whether to record perf
368
       */
369
      performance: false,
370
      /**
371
       * Error handler for watcher errors
372
       */
373
      errorHandler: null,
374
      /**
375
       * Warn handler for watcher warns
376
       */
377
      warnHandler: null,
378
      /**
379
       * Ignore certain custom elements
380
       */
381
      ignoredElements: [],
382
      /**
383
       * Custom user key aliases for v-on
384
       */
385
      // $flow-disable-line
386
      keyCodes: Object.create(null),
387
      /**
388
       * Check if a tag is reserved so that it cannot be registered as a
389
       * component. This is platform-dependent and may be overwritten.
390
       */
391
      isReservedTag: no,
392
      /**
393
       * Check if an attribute is reserved so that it cannot be used as a component
394
       * prop. This is platform-dependent and may be overwritten.
395
       */
396
      isReservedAttr: no,
397
      /**
398
       * Check if a tag is an unknown element.
399
       * Platform-dependent.
400
       */
401
      isUnknownElement: no,
402
      /**
403
       * Get the namespace of an element
404
       */
405
      getTagNamespace: noop,
406
      /**
407
       * Parse the real tag name for the specific platform.
408
       */
409
      parsePlatformTagName: identity,
410
      /**
411
       * Check if an attribute must be bound using property, e.g. value
412
       * Platform-dependent.
413
       */
414
      mustUseProp: no,
415
      /**
416
       * Perform updates asynchronously. Intended to be used by Vue Test Utils
417
       * This will significantly reduce performance if set to false.
418
       */
419
      async: true,
420
      /**
421
       * Exposed for legacy reasons
422
       */
423
      _lifecycleHooks: LIFECYCLE_HOOKS
424
  };
425

426
  /**
427
   * unicode letters used for parsing html tags, component names and property paths.
428
   * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
429
   * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
430
   */
431
  var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
432
  /**
433
   * Check if a string starts with $ or _
434
   */
435
  function isReserved(str) {
436
      var c = (str + '').charCodeAt(0);
437
      return c === 0x24 || c === 0x5f;
438
  }
439
  /**
440
   * Define a property.
441
   */
442
  function def(obj, key, val, enumerable) {
443
      Object.defineProperty(obj, key, {
444
          value: val,
445
          enumerable: !!enumerable,
446
          writable: true,
447
          configurable: true
448
      });
449
  }
450
  /**
451
   * Parse simple path.
452
   */
453
  var bailRE = new RegExp("[^".concat(unicodeRegExp.source, ".$_\\d]"));
454
  function parsePath(path) {
455
      if (bailRE.test(path)) {
456
          return;
457
      }
458
      var segments = path.split('.');
459
      return function (obj) {
460
          for (var i = 0; i < segments.length; i++) {
461
              if (!obj)
462
                  return;
463
              obj = obj[segments[i]];
464
          }
465
          return obj;
466
      };
467
  }
468

469
  // can we use __proto__?
470
  var hasProto = '__proto__' in {};
471
  // Browser environment sniffing
472
  var inBrowser = typeof window !== 'undefined';
473
  var UA = inBrowser && window.navigator.userAgent.toLowerCase();
474
  var isIE = UA && /msie|trident/.test(UA);
475
  var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
476
  var isEdge = UA && UA.indexOf('edge/') > 0;
477
  UA && UA.indexOf('android') > 0;
478
  var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
479
  UA && /chrome\/\d+/.test(UA) && !isEdge;
480
  UA && /phantomjs/.test(UA);
481
  var isFF = UA && UA.match(/firefox\/(\d+)/);
482
  // Firefox has a "watch" function on Object.prototype...
483
  // @ts-expect-error firebox support
484
  var nativeWatch = {}.watch;
485
  var supportsPassive = false;
486
  if (inBrowser) {
487
      try {
488
          var opts = {};
489
          Object.defineProperty(opts, 'passive', {
490
              get: function () {
491
                  /* istanbul ignore next */
492
                  supportsPassive = true;
493
              }
494
          }); // https://github.com/facebook/flow/issues/285
495
          window.addEventListener('test-passive', null, opts);
496
      }
497
      catch (e) { }
498
  }
499
  // this needs to be lazy-evaled because vue may be required before
500
  // vue-server-renderer can set VUE_ENV
501
  var _isServer;
502
  var isServerRendering = function () {
503
      if (_isServer === undefined) {
504
          /* istanbul ignore if */
505
          if (!inBrowser && typeof global !== 'undefined') {
506
              // detect presence of vue-server-renderer and avoid
507
              // Webpack shimming the process
508
              _isServer =
509
                  global['process'] && global['process'].env.VUE_ENV === 'server';
510
          }
511
          else {
512
              _isServer = false;
513
          }
514
      }
515
      return _isServer;
516
  };
517
  // detect devtools
518
  var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
519
  /* istanbul ignore next */
520
  function isNative(Ctor) {
521
      return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
522
  }
523
  var hasSymbol = typeof Symbol !== 'undefined' &&
524
      isNative(Symbol) &&
525
      typeof Reflect !== 'undefined' &&
526
      isNative(Reflect.ownKeys);
527
  var _Set; // $flow-disable-line
528
  /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {
529
      // use native Set when available.
530
      _Set = Set;
531
  }
532
  else {
533
      // a non-standard Set polyfill that only works with primitive keys.
534
      _Set = /** @class */ (function () {
535
          function Set() {
536
              this.set = Object.create(null);
537
          }
538
          Set.prototype.has = function (key) {
539
              return this.set[key] === true;
540
          };
541
          Set.prototype.add = function (key) {
542
              this.set[key] = true;
543
          };
544
          Set.prototype.clear = function () {
545
              this.set = Object.create(null);
546
          };
547
          return Set;
548
      }());
549
  }
550

551
  var currentInstance = null;
552
  /**
553
   * This is exposed for compatibility with v3 (e.g. some functions in VueUse
554
   * relies on it). Do not use this internally, just use `currentInstance`.
555
   *
556
   * @internal this function needs manual type declaration because it relies
557
   * on previously manually authored types from Vue 2
558
   */
559
  function getCurrentInstance() {
560
      return currentInstance && { proxy: currentInstance };
561
  }
562
  /**
563
   * @internal
564
   */
565
  function setCurrentInstance(vm) {
566
      if (vm === void 0) { vm = null; }
567
      if (!vm)
568
          currentInstance && currentInstance._scope.off();
569
      currentInstance = vm;
570
      vm && vm._scope.on();
571
  }
572

573
  /**
574
   * @internal
575
   */
576
  var VNode = /** @class */ (function () {
577
      function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
578
          this.tag = tag;
579
          this.data = data;
580
          this.children = children;
581
          this.text = text;
582
          this.elm = elm;
583
          this.ns = undefined;
584
          this.context = context;
585
          this.fnContext = undefined;
586
          this.fnOptions = undefined;
587
          this.fnScopeId = undefined;
588
          this.key = data && data.key;
589
          this.componentOptions = componentOptions;
590
          this.componentInstance = undefined;
591
          this.parent = undefined;
592
          this.raw = false;
593
          this.isStatic = false;
594
          this.isRootInsert = true;
595
          this.isComment = false;
596
          this.isCloned = false;
597
          this.isOnce = false;
598
          this.asyncFactory = asyncFactory;
599
          this.asyncMeta = undefined;
600
          this.isAsyncPlaceholder = false;
601
      }
602
      Object.defineProperty(VNode.prototype, "child", {
603
          // DEPRECATED: alias for componentInstance for backwards compat.
604
          /* istanbul ignore next */
605
          get: function () {
606
              return this.componentInstance;
607
          },
608
          enumerable: false,
609
          configurable: true
610
      });
611
      return VNode;
612
  }());
613
  var createEmptyVNode = function (text) {
614
      if (text === void 0) { text = ''; }
615
      var node = new VNode();
616
      node.text = text;
617
      node.isComment = true;
618
      return node;
619
  };
620
  function createTextVNode(val) {
621
      return new VNode(undefined, undefined, undefined, String(val));
622
  }
623
  // optimized shallow clone
624
  // used for static nodes and slot nodes because they may be reused across
625
  // multiple renders, cloning them avoids errors when DOM manipulations rely
626
  // on their elm reference.
627
  function cloneVNode(vnode) {
628
      var cloned = new VNode(vnode.tag, vnode.data, 
629
      // #7975
630
      // clone children array to avoid mutating original in case of cloning
631
      // a child.
632
      vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
633
      cloned.ns = vnode.ns;
634
      cloned.isStatic = vnode.isStatic;
635
      cloned.key = vnode.key;
636
      cloned.isComment = vnode.isComment;
637
      cloned.fnContext = vnode.fnContext;
638
      cloned.fnOptions = vnode.fnOptions;
639
      cloned.fnScopeId = vnode.fnScopeId;
640
      cloned.asyncMeta = vnode.asyncMeta;
641
      cloned.isCloned = true;
642
      return cloned;
643
  }
644

645
  /* not type checking this file because flow doesn't play well with Proxy */
646
  var initProxy;
647
  {
648
      var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +
649
          'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
650
          'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
651
          'require' // for Webpack/Browserify
652
      );
653
      var warnNonPresent_1 = function (target, key) {
654
          warn$2("Property or method \"".concat(key, "\" is not defined on the instance but ") +
655
              'referenced during render. Make sure that this property is reactive, ' +
656
              'either in the data option, or for class-based components, by ' +
657
              'initializing the property. ' +
658
              'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);
659
      };
660
      var warnReservedPrefix_1 = function (target, key) {
661
          warn$2("Property \"".concat(key, "\" must be accessed with \"$data.").concat(key, "\" because ") +
662
              'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
663
              'prevent conflicts with Vue internals. ' +
664
              'See: https://vuejs.org/v2/api/#data', target);
665
      };
666
      var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);
667
      if (hasProxy_1) {
668
          var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
669
          config.keyCodes = new Proxy(config.keyCodes, {
670
              set: function (target, key, value) {
671
                  if (isBuiltInModifier_1(key)) {
672
                      warn$2("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key));
673
                      return false;
674
                  }
675
                  else {
676
                      target[key] = value;
677
                      return true;
678
                  }
679
              }
680
          });
681
      }
682
      var hasHandler_1 = {
683
          has: function (target, key) {
684
              var has = key in target;
685
              var isAllowed = allowedGlobals_1(key) ||
686
                  (typeof key === 'string' &&
687
                      key.charAt(0) === '_' &&
688
                      !(key in target.$data));
689
              if (!has && !isAllowed) {
690
                  if (key in target.$data)
691
                      warnReservedPrefix_1(target, key);
692
                  else
693
                      warnNonPresent_1(target, key);
694
              }
695
              return has || !isAllowed;
696
          }
697
      };
698
      var getHandler_1 = {
699
          get: function (target, key) {
700
              if (typeof key === 'string' && !(key in target)) {
701
                  if (key in target.$data)
702
                      warnReservedPrefix_1(target, key);
703
                  else
704
                      warnNonPresent_1(target, key);
705
              }
706
              return target[key];
707
          }
708
      };
709
      initProxy = function initProxy(vm) {
710
          if (hasProxy_1) {
711
              // determine which proxy handler to use
712
              var options = vm.$options;
713
              var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;
714
              vm._renderProxy = new Proxy(vm, handlers);
715
          }
716
          else {
717
              vm._renderProxy = vm;
718
          }
719
      };
720
  }
721

722
  /******************************************************************************
723
  Copyright (c) Microsoft Corporation.
724

725
  Permission to use, copy, modify, and/or distribute this software for any
726
  purpose with or without fee is hereby granted.
727

728
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
729
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
730
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
731
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
732
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
733
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
734
  PERFORMANCE OF THIS SOFTWARE.
735
  ***************************************************************************** */
736

737
  var __assign = function() {
738
      __assign = Object.assign || function __assign(t) {
739
          for (var s, i = 1, n = arguments.length; i < n; i++) {
740
              s = arguments[i];
741
              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
742
          }
743
          return t;
744
      };
745
      return __assign.apply(this, arguments);
746
  };
747

748
  var uid$2 = 0;
749
  /**
750
   * A dep is an observable that can have multiple
751
   * directives subscribing to it.
752
   * @internal
753
   */
754
  var Dep = /** @class */ (function () {
755
      function Dep() {
756
          this.id = uid$2++;
757
          this.subs = [];
758
      }
759
      Dep.prototype.addSub = function (sub) {
760
          this.subs.push(sub);
761
      };
762
      Dep.prototype.removeSub = function (sub) {
763
          remove$2(this.subs, sub);
764
      };
765
      Dep.prototype.depend = function (info) {
766
          if (Dep.target) {
767
              Dep.target.addDep(this);
768
              if (info && Dep.target.onTrack) {
769
                  Dep.target.onTrack(__assign({ effect: Dep.target }, info));
770
              }
771
          }
772
      };
773
      Dep.prototype.notify = function (info) {
774
          // stabilize the subscriber list first
775
          var subs = this.subs.slice();
776
          if (!config.async) {
777
              // subs aren't sorted in scheduler if not running async
778
              // we need to sort them now to make sure they fire in correct
779
              // order
780
              subs.sort(function (a, b) { return a.id - b.id; });
781
          }
782
          for (var i = 0, l = subs.length; i < l; i++) {
783
              if (info) {
784
                  var sub = subs[i];
785
                  sub.onTrigger &&
786
                      sub.onTrigger(__assign({ effect: subs[i] }, info));
787
              }
788
              subs[i].update();
789
          }
790
      };
791
      return Dep;
792
  }());
793
  // The current target watcher being evaluated.
794
  // This is globally unique because only one watcher
795
  // can be evaluated at a time.
796
  Dep.target = null;
797
  var targetStack = [];
798
  function pushTarget(target) {
799
      targetStack.push(target);
800
      Dep.target = target;
801
  }
802
  function popTarget() {
803
      targetStack.pop();
804
      Dep.target = targetStack[targetStack.length - 1];
805
  }
806

807
  /*
808
   * not type checking this file because flow doesn't play well with
809
   * dynamically accessing methods on Array prototype
810
   */
811
  var arrayProto = Array.prototype;
812
  var arrayMethods = Object.create(arrayProto);
813
  var methodsToPatch = [
814
      'push',
815
      'pop',
816
      'shift',
817
      'unshift',
818
      'splice',
819
      'sort',
820
      'reverse'
821
  ];
822
  /**
823
   * Intercept mutating methods and emit events
824
   */
825
  methodsToPatch.forEach(function (method) {
826
      // cache original method
827
      var original = arrayProto[method];
828
      def(arrayMethods, method, function mutator() {
829
          var args = [];
830
          for (var _i = 0; _i < arguments.length; _i++) {
831
              args[_i] = arguments[_i];
832
          }
833
          var result = original.apply(this, args);
834
          var ob = this.__ob__;
835
          var inserted;
836
          switch (method) {
837
              case 'push':
838
              case 'unshift':
839
                  inserted = args;
840
                  break;
841
              case 'splice':
842
                  inserted = args.slice(2);
843
                  break;
844
          }
845
          if (inserted)
846
              ob.observeArray(inserted);
847
          // notify change
848
          {
849
              ob.dep.notify({
850
                  type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */,
851
                  target: this,
852
                  key: method
853
              });
854
          }
855
          return result;
856
      });
857
  });
858

859
  var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
860
  var NO_INIITIAL_VALUE = {};
861
  /**
862
   * In some cases we may want to disable observation inside a component's
863
   * update computation.
864
   */
865
  var shouldObserve = true;
866
  function toggleObserving(value) {
867
      shouldObserve = value;
868
  }
869
  // ssr mock dep
870
  var mockDep = {
871
      notify: noop,
872
      depend: noop,
873
      addSub: noop,
874
      removeSub: noop
875
  };
876
  /**
877
   * Observer class that is attached to each observed
878
   * object. Once attached, the observer converts the target
879
   * object's property keys into getter/setters that
880
   * collect dependencies and dispatch updates.
881
   */
882
  var Observer = /** @class */ (function () {
883
      function Observer(value, shallow, mock) {
884
          if (shallow === void 0) { shallow = false; }
885
          if (mock === void 0) { mock = false; }
886
          this.value = value;
887
          this.shallow = shallow;
888
          this.mock = mock;
889
          // this.value = value
890
          this.dep = mock ? mockDep : new Dep();
891
          this.vmCount = 0;
892
          def(value, '__ob__', this);
893
          if (isArray(value)) {
894
              if (!mock) {
895
                  if (hasProto) {
896
                      value.__proto__ = arrayMethods;
897
                      /* eslint-enable no-proto */
898
                  }
899
                  else {
900
                      for (var i = 0, l = arrayKeys.length; i < l; i++) {
901
                          var key = arrayKeys[i];
902
                          def(value, key, arrayMethods[key]);
903
                      }
904
                  }
905
              }
906
              if (!shallow) {
907
                  this.observeArray(value);
908
              }
909
          }
910
          else {
911
              /**
912
               * Walk through all properties and convert them into
913
               * getter/setters. This method should only be called when
914
               * value type is Object.
915
               */
916
              var keys = Object.keys(value);
917
              for (var i = 0; i < keys.length; i++) {
918
                  var key = keys[i];
919
                  defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);
920
              }
921
          }
922
      }
923
      /**
924
       * Observe a list of Array items.
925
       */
926
      Observer.prototype.observeArray = function (value) {
927
          for (var i = 0, l = value.length; i < l; i++) {
928
              observe(value[i], false, this.mock);
929
          }
930
      };
931
      return Observer;
932
  }());
933
  // helpers
934
  /**
935
   * Attempt to create an observer instance for a value,
936
   * returns the new observer if successfully observed,
937
   * or the existing observer if the value already has one.
938
   */
939
  function observe(value, shallow, ssrMockReactivity) {
940
      if (!isObject(value) || isRef(value) || value instanceof VNode) {
941
          return;
942
      }
943
      var ob;
944
      if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
945
          ob = value.__ob__;
946
      }
947
      else if (shouldObserve &&
948
          (ssrMockReactivity || !isServerRendering()) &&
949
          (isArray(value) || isPlainObject(value)) &&
950
          Object.isExtensible(value) &&
951
          !value.__v_skip /* ReactiveFlags.SKIP */) {
952
          ob = new Observer(value, shallow, ssrMockReactivity);
953
      }
954
      return ob;
955
  }
956
  /**
957
   * Define a reactive property on an Object.
958
   */
959
  function defineReactive(obj, key, val, customSetter, shallow, mock) {
960
      var dep = new Dep();
961
      var property = Object.getOwnPropertyDescriptor(obj, key);
962
      if (property && property.configurable === false) {
963
          return;
964
      }
965
      // cater for pre-defined getter/setters
966
      var getter = property && property.get;
967
      var setter = property && property.set;
968
      if ((!getter || setter) &&
969
          (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
970
          val = obj[key];
971
      }
972
      var childOb = !shallow && observe(val, false, mock);
973
      Object.defineProperty(obj, key, {
974
          enumerable: true,
975
          configurable: true,
976
          get: function reactiveGetter() {
977
              var value = getter ? getter.call(obj) : val;
978
              if (Dep.target) {
979
                  {
980
                      dep.depend({
981
                          target: obj,
982
                          type: "get" /* TrackOpTypes.GET */,
983
                          key: key
984
                      });
985
                  }
986
                  if (childOb) {
987
                      childOb.dep.depend();
988
                      if (isArray(value)) {
989
                          dependArray(value);
990
                      }
991
                  }
992
              }
993
              return isRef(value) && !shallow ? value.value : value;
994
          },
995
          set: function reactiveSetter(newVal) {
996
              var value = getter ? getter.call(obj) : val;
997
              if (!hasChanged(value, newVal)) {
998
                  return;
999
              }
1000
              if (customSetter) {
1001
                  customSetter();
1002
              }
1003
              if (setter) {
1004
                  setter.call(obj, newVal);
1005
              }
1006
              else if (getter) {
1007
                  // #7981: for accessor properties without setter
1008
                  return;
1009
              }
1010
              else if (!shallow && isRef(value) && !isRef(newVal)) {
1011
                  value.value = newVal;
1012
                  return;
1013
              }
1014
              else {
1015
                  val = newVal;
1016
              }
1017
              childOb = !shallow && observe(newVal, false, mock);
1018
              {
1019
                  dep.notify({
1020
                      type: "set" /* TriggerOpTypes.SET */,
1021
                      target: obj,
1022
                      key: key,
1023
                      newValue: newVal,
1024
                      oldValue: value
1025
                  });
1026
              }
1027
          }
1028
      });
1029
      return dep;
1030
  }
1031
  function set(target, key, val) {
1032
      if ((isUndef(target) || isPrimitive(target))) {
1033
          warn$2("Cannot set reactive property on undefined, null, or primitive value: ".concat(target));
1034
      }
1035
      if (isReadonly(target)) {
1036
          warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
1037
          return;
1038
      }
1039
      var ob = target.__ob__;
1040
      if (isArray(target) && isValidArrayIndex(key)) {
1041
          target.length = Math.max(target.length, key);
1042
          target.splice(key, 1, val);
1043
          // when mocking for SSR, array methods are not hijacked
1044
          if (ob && !ob.shallow && ob.mock) {
1045
              observe(val, false, true);
1046
          }
1047
          return val;
1048
      }
1049
      if (key in target && !(key in Object.prototype)) {
1050
          target[key] = val;
1051
          return val;
1052
      }
1053
      if (target._isVue || (ob && ob.vmCount)) {
1054
          warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +
1055
                  'at runtime - declare it upfront in the data option.');
1056
          return val;
1057
      }
1058
      if (!ob) {
1059
          target[key] = val;
1060
          return val;
1061
      }
1062
      defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);
1063
      {
1064
          ob.dep.notify({
1065
              type: "add" /* TriggerOpTypes.ADD */,
1066
              target: target,
1067
              key: key,
1068
              newValue: val,
1069
              oldValue: undefined
1070
          });
1071
      }
1072
      return val;
1073
  }
1074
  function del(target, key) {
1075
      if ((isUndef(target) || isPrimitive(target))) {
1076
          warn$2("Cannot delete reactive property on undefined, null, or primitive value: ".concat(target));
1077
      }
1078
      if (isArray(target) && isValidArrayIndex(key)) {
1079
          target.splice(key, 1);
1080
          return;
1081
      }
1082
      var ob = target.__ob__;
1083
      if (target._isVue || (ob && ob.vmCount)) {
1084
          warn$2('Avoid deleting properties on a Vue instance or its root $data ' +
1085
                  '- just set it to null.');
1086
          return;
1087
      }
1088
      if (isReadonly(target)) {
1089
          warn$2("Delete operation on key \"".concat(key, "\" failed: target is readonly."));
1090
          return;
1091
      }
1092
      if (!hasOwn(target, key)) {
1093
          return;
1094
      }
1095
      delete target[key];
1096
      if (!ob) {
1097
          return;
1098
      }
1099
      {
1100
          ob.dep.notify({
1101
              type: "delete" /* TriggerOpTypes.DELETE */,
1102
              target: target,
1103
              key: key
1104
          });
1105
      }
1106
  }
1107
  /**
1108
   * Collect dependencies on array elements when the array is touched, since
1109
   * we cannot intercept array element access like property getters.
1110
   */
1111
  function dependArray(value) {
1112
      for (var e = void 0, i = 0, l = value.length; i < l; i++) {
1113
          e = value[i];
1114
          if (e && e.__ob__) {
1115
              e.__ob__.dep.depend();
1116
          }
1117
          if (isArray(e)) {
1118
              dependArray(e);
1119
          }
1120
      }
1121
  }
1122

1123
  function reactive(target) {
1124
      makeReactive(target, false);
1125
      return target;
1126
  }
1127
  /**
1128
   * Return a shallowly-reactive copy of the original object, where only the root
1129
   * level properties are reactive. It also does not auto-unwrap refs (even at the
1130
   * root level).
1131
   */
1132
  function shallowReactive(target) {
1133
      makeReactive(target, true);
1134
      def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
1135
      return target;
1136
  }
1137
  function makeReactive(target, shallow) {
1138
      // if trying to observe a readonly proxy, return the readonly version.
1139
      if (!isReadonly(target)) {
1140
          {
1141
              if (isArray(target)) {
1142
                  warn$2("Avoid using Array as root value for ".concat(shallow ? "shallowReactive()" : "reactive()", " as it cannot be tracked in watch() or watchEffect(). Use ").concat(shallow ? "shallowRef()" : "ref()", " instead. This is a Vue-2-only limitation."));
1143
              }
1144
              var existingOb = target && target.__ob__;
1145
              if (existingOb && existingOb.shallow !== shallow) {
1146
                  warn$2("Target is already a ".concat(existingOb.shallow ? "" : "non-", "shallow reactive object, and cannot be converted to ").concat(shallow ? "" : "non-", "shallow."));
1147
              }
1148
          }
1149
          var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
1150
          if (!ob) {
1151
              if (target == null || isPrimitive(target)) {
1152
                  warn$2("value cannot be made reactive: ".concat(String(target)));
1153
              }
1154
              if (isCollectionType(target)) {
1155
                  warn$2("Vue 2 does not support reactive collection types such as Map or Set.");
1156
              }
1157
          }
1158
      }
1159
  }
1160
  function isReactive(value) {
1161
      if (isReadonly(value)) {
1162
          return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
1163
      }
1164
      return !!(value && value.__ob__);
1165
  }
1166
  function isShallow(value) {
1167
      return !!(value && value.__v_isShallow);
1168
  }
1169
  function isReadonly(value) {
1170
      return !!(value && value.__v_isReadonly);
1171
  }
1172
  function isProxy(value) {
1173
      return isReactive(value) || isReadonly(value);
1174
  }
1175
  function toRaw(observed) {
1176
      var raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
1177
      return raw ? toRaw(raw) : observed;
1178
  }
1179
  function markRaw(value) {
1180
      def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
1181
      return value;
1182
  }
1183
  /**
1184
   * @internal
1185
   */
1186
  function isCollectionType(value) {
1187
      var type = toRawType(value);
1188
      return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
1189
  }
1190

1191
  /**
1192
   * @internal
1193
   */
1194
  var RefFlag = "__v_isRef";
1195
  function isRef(r) {
1196
      return !!(r && r.__v_isRef === true);
1197
  }
1198
  function ref$1(value) {
1199
      return createRef(value, false);
1200
  }
1201
  function shallowRef(value) {
1202
      return createRef(value, true);
1203
  }
1204
  function createRef(rawValue, shallow) {
1205
      if (isRef(rawValue)) {
1206
          return rawValue;
1207
      }
1208
      var ref = {};
1209
      def(ref, RefFlag, true);
1210
      def(ref, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, shallow);
1211
      def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));
1212
      return ref;
1213
  }
1214
  function triggerRef(ref) {
1215
      if (!ref.dep) {
1216
          warn$2("received object is not a triggerable ref.");
1217
      }
1218
      {
1219
          ref.dep &&
1220
              ref.dep.notify({
1221
                  type: "set" /* TriggerOpTypes.SET */,
1222
                  target: ref,
1223
                  key: 'value'
1224
              });
1225
      }
1226
  }
1227
  function unref(ref) {
1228
      return isRef(ref) ? ref.value : ref;
1229
  }
1230
  function proxyRefs(objectWithRefs) {
1231
      if (isReactive(objectWithRefs)) {
1232
          return objectWithRefs;
1233
      }
1234
      var proxy = {};
1235
      var keys = Object.keys(objectWithRefs);
1236
      for (var i = 0; i < keys.length; i++) {
1237
          proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);
1238
      }
1239
      return proxy;
1240
  }
1241
  function proxyWithRefUnwrap(target, source, key) {
1242
      Object.defineProperty(target, key, {
1243
          enumerable: true,
1244
          configurable: true,
1245
          get: function () {
1246
              var val = source[key];
1247
              if (isRef(val)) {
1248
                  return val.value;
1249
              }
1250
              else {
1251
                  var ob = val && val.__ob__;
1252
                  if (ob)
1253
                      ob.dep.depend();
1254
                  return val;
1255
              }
1256
          },
1257
          set: function (value) {
1258
              var oldValue = source[key];
1259
              if (isRef(oldValue) && !isRef(value)) {
1260
                  oldValue.value = value;
1261
              }
1262
              else {
1263
                  source[key] = value;
1264
              }
1265
          }
1266
      });
1267
  }
1268
  function customRef(factory) {
1269
      var dep = new Dep();
1270
      var _a = factory(function () {
1271
          {
1272
              dep.depend({
1273
                  target: ref,
1274
                  type: "get" /* TrackOpTypes.GET */,
1275
                  key: 'value'
1276
              });
1277
          }
1278
      }, function () {
1279
          {
1280
              dep.notify({
1281
                  target: ref,
1282
                  type: "set" /* TriggerOpTypes.SET */,
1283
                  key: 'value'
1284
              });
1285
          }
1286
      }), get = _a.get, set = _a.set;
1287
      var ref = {
1288
          get value() {
1289
              return get();
1290
          },
1291
          set value(newVal) {
1292
              set(newVal);
1293
          }
1294
      };
1295
      def(ref, RefFlag, true);
1296
      return ref;
1297
  }
1298
  function toRefs(object) {
1299
      if (!isReactive(object)) {
1300
          warn$2("toRefs() expects a reactive object but received a plain one.");
1301
      }
1302
      var ret = isArray(object) ? new Array(object.length) : {};
1303
      for (var key in object) {
1304
          ret[key] = toRef(object, key);
1305
      }
1306
      return ret;
1307
  }
1308
  function toRef(object, key, defaultValue) {
1309
      var val = object[key];
1310
      if (isRef(val)) {
1311
          return val;
1312
      }
1313
      var ref = {
1314
          get value() {
1315
              var val = object[key];
1316
              return val === undefined ? defaultValue : val;
1317
          },
1318
          set value(newVal) {
1319
              object[key] = newVal;
1320
          }
1321
      };
1322
      def(ref, RefFlag, true);
1323
      return ref;
1324
  }
1325

1326
  var rawToReadonlyFlag = "__v_rawToReadonly";
1327
  var rawToShallowReadonlyFlag = "__v_rawToShallowReadonly";
1328
  function readonly(target) {
1329
      return createReadonly(target, false);
1330
  }
1331
  function createReadonly(target, shallow) {
1332
      if (!isPlainObject(target)) {
1333
          {
1334
              if (isArray(target)) {
1335
                  warn$2("Vue 2 does not support readonly arrays.");
1336
              }
1337
              else if (isCollectionType(target)) {
1338
                  warn$2("Vue 2 does not support readonly collection types such as Map or Set.");
1339
              }
1340
              else {
1341
                  warn$2("value cannot be made readonly: ".concat(typeof target));
1342
              }
1343
          }
1344
          return target;
1345
      }
1346
      // already a readonly object
1347
      if (isReadonly(target)) {
1348
          return target;
1349
      }
1350
      // already has a readonly proxy
1351
      var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;
1352
      var existingProxy = target[existingFlag];
1353
      if (existingProxy) {
1354
          return existingProxy;
1355
      }
1356
      var proxy = Object.create(Object.getPrototypeOf(target));
1357
      def(target, existingFlag, proxy);
1358
      def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);
1359
      def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);
1360
      if (isRef(target)) {
1361
          def(proxy, RefFlag, true);
1362
      }
1363
      if (shallow || isShallow(target)) {
1364
          def(proxy, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
1365
      }
1366
      var keys = Object.keys(target);
1367
      for (var i = 0; i < keys.length; i++) {
1368
          defineReadonlyProperty(proxy, target, keys[i], shallow);
1369
      }
1370
      return proxy;
1371
  }
1372
  function defineReadonlyProperty(proxy, target, key, shallow) {
1373
      Object.defineProperty(proxy, key, {
1374
          enumerable: true,
1375
          configurable: true,
1376
          get: function () {
1377
              var val = target[key];
1378
              return shallow || !isPlainObject(val) ? val : readonly(val);
1379
          },
1380
          set: function () {
1381
              warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
1382
          }
1383
      });
1384
  }
1385
  /**
1386
   * Returns a reactive-copy of the original object, where only the root level
1387
   * properties are readonly, and does NOT unwrap refs nor recursively convert
1388
   * returned properties.
1389
   * This is used for creating the props proxy object for stateful components.
1390
   */
1391
  function shallowReadonly(target) {
1392
      return createReadonly(target, true);
1393
  }
1394

1395
  function computed(getterOrOptions, debugOptions) {
1396
      var getter;
1397
      var setter;
1398
      var onlyGetter = isFunction(getterOrOptions);
1399
      if (onlyGetter) {
1400
          getter = getterOrOptions;
1401
          setter = function () {
1402
                  warn$2('Write operation failed: computed value is readonly');
1403
              }
1404
              ;
1405
      }
1406
      else {
1407
          getter = getterOrOptions.get;
1408
          setter = getterOrOptions.set;
1409
      }
1410
      var watcher = isServerRendering()
1411
          ? null
1412
          : new Watcher(currentInstance, getter, noop, { lazy: true });
1413
      if (watcher && debugOptions) {
1414
          watcher.onTrack = debugOptions.onTrack;
1415
          watcher.onTrigger = debugOptions.onTrigger;
1416
      }
1417
      var ref = {
1418
          // some libs rely on the presence effect for checking computed refs
1419
          // from normal refs, but the implementation doesn't matter
1420
          effect: watcher,
1421
          get value() {
1422
              if (watcher) {
1423
                  if (watcher.dirty) {
1424
                      watcher.evaluate();
1425
                  }
1426
                  if (Dep.target) {
1427
                      if (Dep.target.onTrack) {
1428
                          Dep.target.onTrack({
1429
                              effect: Dep.target,
1430
                              target: ref,
1431
                              type: "get" /* TrackOpTypes.GET */,
1432
                              key: 'value'
1433
                          });
1434
                      }
1435
                      watcher.depend();
1436
                  }
1437
                  return watcher.value;
1438
              }
1439
              else {
1440
                  return getter();
1441
              }
1442
          },
1443
          set value(newVal) {
1444
              setter(newVal);
1445
          }
1446
      };
1447
      def(ref, RefFlag, true);
1448
      def(ref, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, onlyGetter);
1449
      return ref;
1450
  }
1451

1452
  var mark;
1453
  var measure;
1454
  {
1455
      var perf_1 = inBrowser && window.performance;
1456
      /* istanbul ignore if */
1457
      if (perf_1 &&
1458
          // @ts-ignore
1459
          perf_1.mark &&
1460
          // @ts-ignore
1461
          perf_1.measure &&
1462
          // @ts-ignore
1463
          perf_1.clearMarks &&
1464
          // @ts-ignore
1465
          perf_1.clearMeasures) {
1466
          mark = function (tag) { return perf_1.mark(tag); };
1467
          measure = function (name, startTag, endTag) {
1468
              perf_1.measure(name, startTag, endTag);
1469
              perf_1.clearMarks(startTag);
1470
              perf_1.clearMarks(endTag);
1471
              // perf.clearMeasures(name)
1472
          };
1473
      }
1474
  }
1475

1476
  var normalizeEvent = cached(function (name) {
1477
      var passive = name.charAt(0) === '&';
1478
      name = passive ? name.slice(1) : name;
1479
      var once = name.charAt(0) === '~'; // Prefixed last, checked first
1480
      name = once ? name.slice(1) : name;
1481
      var capture = name.charAt(0) === '!';
1482
      name = capture ? name.slice(1) : name;
1483
      return {
1484
          name: name,
1485
          once: once,
1486
          capture: capture,
1487
          passive: passive
1488
      };
1489
  });
1490
  function createFnInvoker(fns, vm) {
1491
      function invoker() {
1492
          var fns = invoker.fns;
1493
          if (isArray(fns)) {
1494
              var cloned = fns.slice();
1495
              for (var i = 0; i < cloned.length; i++) {
1496
                  invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");
1497
              }
1498
          }
1499
          else {
1500
              // return handler return value for single handlers
1501
              return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
1502
          }
1503
      }
1504
      invoker.fns = fns;
1505
      return invoker;
1506
  }
1507
  function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {
1508
      var name, cur, old, event;
1509
      for (name in on) {
1510
          cur = on[name];
1511
          old = oldOn[name];
1512
          event = normalizeEvent(name);
1513
          if (isUndef(cur)) {
1514
              warn$2("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm);
1515
          }
1516
          else if (isUndef(old)) {
1517
              if (isUndef(cur.fns)) {
1518
                  cur = on[name] = createFnInvoker(cur, vm);
1519
              }
1520
              if (isTrue(event.once)) {
1521
                  cur = on[name] = createOnceHandler(event.name, cur, event.capture);
1522
              }
1523
              add(event.name, cur, event.capture, event.passive, event.params);
1524
          }
1525
          else if (cur !== old) {
1526
              old.fns = cur;
1527
              on[name] = old;
1528
          }
1529
      }
1530
      for (name in oldOn) {
1531
          if (isUndef(on[name])) {
1532
              event = normalizeEvent(name);
1533
              remove(event.name, oldOn[name], event.capture);
1534
          }
1535
      }
1536
  }
1537

1538
  function mergeVNodeHook(def, hookKey, hook) {
1539
      if (def instanceof VNode) {
1540
          def = def.data.hook || (def.data.hook = {});
1541
      }
1542
      var invoker;
1543
      var oldHook = def[hookKey];
1544
      function wrappedHook() {
1545
          hook.apply(this, arguments);
1546
          // important: remove merged hook to ensure it's called only once
1547
          // and prevent memory leak
1548
          remove$2(invoker.fns, wrappedHook);
1549
      }
1550
      if (isUndef(oldHook)) {
1551
          // no existing hook
1552
          invoker = createFnInvoker([wrappedHook]);
1553
      }
1554
      else {
1555
          /* istanbul ignore if */
1556
          if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
1557
              // already a merged invoker
1558
              invoker = oldHook;
1559
              invoker.fns.push(wrappedHook);
1560
          }
1561
          else {
1562
              // existing plain hook
1563
              invoker = createFnInvoker([oldHook, wrappedHook]);
1564
          }
1565
      }
1566
      invoker.merged = true;
1567
      def[hookKey] = invoker;
1568
  }
1569

1570
  function extractPropsFromVNodeData(data, Ctor, tag) {
1571
      // we are only extracting raw values here.
1572
      // validation and default values are handled in the child
1573
      // component itself.
1574
      var propOptions = Ctor.options.props;
1575
      if (isUndef(propOptions)) {
1576
          return;
1577
      }
1578
      var res = {};
1579
      var attrs = data.attrs, props = data.props;
1580
      if (isDef(attrs) || isDef(props)) {
1581
          for (var key in propOptions) {
1582
              var altKey = hyphenate(key);
1583
              {
1584
                  var keyInLowerCase = key.toLowerCase();
1585
                  if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
1586
                      tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") +
1587
                          "".concat(formatComponentName(
1588
                          // @ts-expect-error tag is string
1589
                          tag || Ctor), ", but the declared prop name is") +
1590
                          " \"".concat(key, "\". ") +
1591
                          "Note that HTML attributes are case-insensitive and camelCased " +
1592
                          "props need to use their kebab-case equivalents when using in-DOM " +
1593
                          "templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\"."));
1594
                  }
1595
              }
1596
              checkProp(res, props, key, altKey, true) ||
1597
                  checkProp(res, attrs, key, altKey, false);
1598
          }
1599
      }
1600
      return res;
1601
  }
1602
  function checkProp(res, hash, key, altKey, preserve) {
1603
      if (isDef(hash)) {
1604
          if (hasOwn(hash, key)) {
1605
              res[key] = hash[key];
1606
              if (!preserve) {
1607
                  delete hash[key];
1608
              }
1609
              return true;
1610
          }
1611
          else if (hasOwn(hash, altKey)) {
1612
              res[key] = hash[altKey];
1613
              if (!preserve) {
1614
                  delete hash[altKey];
1615
              }
1616
              return true;
1617
          }
1618
      }
1619
      return false;
1620
  }
1621

1622
  // The template compiler attempts to minimize the need for normalization by
1623
  // statically analyzing the template at compile time.
1624
  //
1625
  // For plain HTML markup, normalization can be completely skipped because the
1626
  // generated render function is guaranteed to return Array<VNode>. There are
1627
  // two cases where extra normalization is needed:
1628
  // 1. When the children contains components - because a functional component
1629
  // may return an Array instead of a single root. In this case, just a simple
1630
  // normalization is needed - if any child is an Array, we flatten the whole
1631
  // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
1632
  // because functional components already normalize their own children.
1633
  function simpleNormalizeChildren(children) {
1634
      for (var i = 0; i < children.length; i++) {
1635
          if (isArray(children[i])) {
1636
              return Array.prototype.concat.apply([], children);
1637
          }
1638
      }
1639
      return children;
1640
  }
1641
  // 2. When the children contains constructs that always generated nested Arrays,
1642
  // e.g. <template>, <slot>, v-for, or when the children is provided by user
1643
  // with hand-written render functions / JSX. In such cases a full normalization
1644
  // is needed to cater to all possible types of children values.
1645
  function normalizeChildren(children) {
1646
      return isPrimitive(children)
1647
          ? [createTextVNode(children)]
1648
          : isArray(children)
1649
              ? normalizeArrayChildren(children)
1650
              : undefined;
1651
  }
1652
  function isTextNode(node) {
1653
      return isDef(node) && isDef(node.text) && isFalse(node.isComment);
1654
  }
1655
  function normalizeArrayChildren(children, nestedIndex) {
1656
      var res = [];
1657
      var i, c, lastIndex, last;
1658
      for (i = 0; i < children.length; i++) {
1659
          c = children[i];
1660
          if (isUndef(c) || typeof c === 'boolean')
1661
              continue;
1662
          lastIndex = res.length - 1;
1663
          last = res[lastIndex];
1664
          //  nested
1665
          if (isArray(c)) {
1666
              if (c.length > 0) {
1667
                  c = normalizeArrayChildren(c, "".concat(nestedIndex || '', "_").concat(i));
1668
                  // merge adjacent text nodes
1669
                  if (isTextNode(c[0]) && isTextNode(last)) {
1670
                      res[lastIndex] = createTextVNode(last.text + c[0].text);
1671
                      c.shift();
1672
                  }
1673
                  res.push.apply(res, c);
1674
              }
1675
          }
1676
          else if (isPrimitive(c)) {
1677
              if (isTextNode(last)) {
1678
                  // merge adjacent text nodes
1679
                  // this is necessary for SSR hydration because text nodes are
1680
                  // essentially merged when rendered to HTML strings
1681
                  res[lastIndex] = createTextVNode(last.text + c);
1682
              }
1683
              else if (c !== '') {
1684
                  // convert primitive to vnode
1685
                  res.push(createTextVNode(c));
1686
              }
1687
          }
1688
          else {
1689
              if (isTextNode(c) && isTextNode(last)) {
1690
                  // merge adjacent text nodes
1691
                  res[lastIndex] = createTextVNode(last.text + c.text);
1692
              }
1693
              else {
1694
                  // default key for nested array children (likely generated by v-for)
1695
                  if (isTrue(children._isVList) &&
1696
                      isDef(c.tag) &&
1697
                      isUndef(c.key) &&
1698
                      isDef(nestedIndex)) {
1699
                      c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");
1700
                  }
1701
                  res.push(c);
1702
              }
1703
          }
1704
      }
1705
      return res;
1706
  }
1707

1708
  var SIMPLE_NORMALIZE = 1;
1709
  var ALWAYS_NORMALIZE = 2;
1710
  // wrapper function for providing a more flexible interface
1711
  // without getting yelled at by flow
1712
  function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {
1713
      if (isArray(data) || isPrimitive(data)) {
1714
          normalizationType = children;
1715
          children = data;
1716
          data = undefined;
1717
      }
1718
      if (isTrue(alwaysNormalize)) {
1719
          normalizationType = ALWAYS_NORMALIZE;
1720
      }
1721
      return _createElement(context, tag, data, children, normalizationType);
1722
  }
1723
  function _createElement(context, tag, data, children, normalizationType) {
1724
      if (isDef(data) && isDef(data.__ob__)) {
1725
          warn$2("Avoid using observed data object as vnode data: ".concat(JSON.stringify(data), "\n") + 'Always create fresh vnode data objects in each render!', context);
1726
          return createEmptyVNode();
1727
      }
1728
      // object syntax in v-bind
1729
      if (isDef(data) && isDef(data.is)) {
1730
          tag = data.is;
1731
      }
1732
      if (!tag) {
1733
          // in case of component :is set to falsy value
1734
          return createEmptyVNode();
1735
      }
1736
      // warn against non-primitive key
1737
      if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {
1738
          warn$2('Avoid using non-primitive value as key, ' +
1739
              'use string/number value instead.', context);
1740
      }
1741
      // support single function children as default scoped slot
1742
      if (isArray(children) && isFunction(children[0])) {
1743
          data = data || {};
1744
          data.scopedSlots = { default: children[0] };
1745
          children.length = 0;
1746
      }
1747
      if (normalizationType === ALWAYS_NORMALIZE) {
1748
          children = normalizeChildren(children);
1749
      }
1750
      else if (normalizationType === SIMPLE_NORMALIZE) {
1751
          children = simpleNormalizeChildren(children);
1752
      }
1753
      var vnode, ns;
1754
      if (typeof tag === 'string') {
1755
          var Ctor = void 0;
1756
          ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
1757
          if (config.isReservedTag(tag)) {
1758
              // platform built-in elements
1759
              if (isDef(data) &&
1760
                  isDef(data.nativeOn) &&
1761
                  data.tag !== 'component') {
1762
                  warn$2("The .native modifier for v-on is only valid on components but it was used on <".concat(tag, ">."), context);
1763
              }
1764
              vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);
1765
          }
1766
          else if ((!data || !data.pre) &&
1767
              isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {
1768
              // component
1769
              vnode = createComponent(Ctor, data, context, children, tag);
1770
          }
1771
          else {
1772
              // unknown or unlisted namespaced elements
1773
              // check at runtime because it may get assigned a namespace when its
1774
              // parent normalizes children
1775
              vnode = new VNode(tag, data, children, undefined, undefined, context);
1776
          }
1777
      }
1778
      else {
1779
          // direct component options / constructor
1780
          vnode = createComponent(tag, data, context, children);
1781
      }
1782
      if (isArray(vnode)) {
1783
          return vnode;
1784
      }
1785
      else if (isDef(vnode)) {
1786
          if (isDef(ns))
1787
              applyNS(vnode, ns);
1788
          if (isDef(data))
1789
              registerDeepBindings(data);
1790
          return vnode;
1791
      }
1792
      else {
1793
          return createEmptyVNode();
1794
      }
1795
  }
1796
  function applyNS(vnode, ns, force) {
1797
      vnode.ns = ns;
1798
      if (vnode.tag === 'foreignObject') {
1799
          // use default namespace inside foreignObject
1800
          ns = undefined;
1801
          force = true;
1802
      }
1803
      if (isDef(vnode.children)) {
1804
          for (var i = 0, l = vnode.children.length; i < l; i++) {
1805
              var child = vnode.children[i];
1806
              if (isDef(child.tag) &&
1807
                  (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
1808
                  applyNS(child, ns, force);
1809
              }
1810
          }
1811
      }
1812
  }
1813
  // ref #5318
1814
  // necessary to ensure parent re-render when deep bindings like :style and
1815
  // :class are used on slot nodes
1816
  function registerDeepBindings(data) {
1817
      if (isObject(data.style)) {
1818
          traverse(data.style);
1819
      }
1820
      if (isObject(data.class)) {
1821
          traverse(data.class);
1822
      }
1823
  }
1824

1825
  /**
1826
   * Runtime helper for rendering v-for lists.
1827
   */
1828
  function renderList(val, render) {
1829
      var ret = null, i, l, keys, key;
1830
      if (isArray(val) || typeof val === 'string') {
1831
          ret = new Array(val.length);
1832
          for (i = 0, l = val.length; i < l; i++) {
1833
              ret[i] = render(val[i], i);
1834
          }
1835
      }
1836
      else if (typeof val === 'number') {
1837
          ret = new Array(val);
1838
          for (i = 0; i < val; i++) {
1839
              ret[i] = render(i + 1, i);
1840
          }
1841
      }
1842
      else if (isObject(val)) {
1843
          if (hasSymbol && val[Symbol.iterator]) {
1844
              ret = [];
1845
              var iterator = val[Symbol.iterator]();
1846
              var result = iterator.next();
1847
              while (!result.done) {
1848
                  ret.push(render(result.value, ret.length));
1849
                  result = iterator.next();
1850
              }
1851
          }
1852
          else {
1853
              keys = Object.keys(val);
1854
              ret = new Array(keys.length);
1855
              for (i = 0, l = keys.length; i < l; i++) {
1856
                  key = keys[i];
1857
                  ret[i] = render(val[key], key, i);
1858
              }
1859
          }
1860
      }
1861
      if (!isDef(ret)) {
1862
          ret = [];
1863
      }
1864
      ret._isVList = true;
1865
      return ret;
1866
  }
1867

1868
  /**
1869
   * Runtime helper for rendering <slot>
1870
   */
1871
  function renderSlot(name, fallbackRender, props, bindObject) {
1872
      var scopedSlotFn = this.$scopedSlots[name];
1873
      var nodes;
1874
      if (scopedSlotFn) {
1875
          // scoped slot
1876
          props = props || {};
1877
          if (bindObject) {
1878
              if (!isObject(bindObject)) {
1879
                  warn$2('slot v-bind without argument expects an Object', this);
1880
              }
1881
              props = extend(extend({}, bindObject), props);
1882
          }
1883
          nodes =
1884
              scopedSlotFn(props) ||
1885
                  (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
1886
      }
1887
      else {
1888
          nodes =
1889
              this.$slots[name] ||
1890
                  (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
1891
      }
1892
      var target = props && props.slot;
1893
      if (target) {
1894
          return this.$createElement('template', { slot: target }, nodes);
1895
      }
1896
      else {
1897
          return nodes;
1898
      }
1899
  }
1900

1901
  /**
1902
   * Runtime helper for resolving filters
1903
   */
1904
  function resolveFilter(id) {
1905
      return resolveAsset(this.$options, 'filters', id, true) || identity;
1906
  }
1907

1908
  function isKeyNotMatch(expect, actual) {
1909
      if (isArray(expect)) {
1910
          return expect.indexOf(actual) === -1;
1911
      }
1912
      else {
1913
          return expect !== actual;
1914
      }
1915
  }
1916
  /**
1917
   * Runtime helper for checking keyCodes from config.
1918
   * exposed as Vue.prototype._k
1919
   * passing in eventKeyName as last argument separately for backwards compat
1920
   */
1921
  function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
1922
      var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
1923
      if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
1924
          return isKeyNotMatch(builtInKeyName, eventKeyName);
1925
      }
1926
      else if (mappedKeyCode) {
1927
          return isKeyNotMatch(mappedKeyCode, eventKeyCode);
1928
      }
1929
      else if (eventKeyName) {
1930
          return hyphenate(eventKeyName) !== key;
1931
      }
1932
      return eventKeyCode === undefined;
1933
  }
1934

1935
  /**
1936
   * Runtime helper for merging v-bind="object" into a VNode's data.
1937
   */
1938
  function bindObjectProps(data, tag, value, asProp, isSync) {
1939
      if (value) {
1940
          if (!isObject(value)) {
1941
              warn$2('v-bind without argument expects an Object or Array value', this);
1942
          }
1943
          else {
1944
              if (isArray(value)) {
1945
                  value = toObject(value);
1946
              }
1947
              var hash = void 0;
1948
              var _loop_1 = function (key) {
1949
                  if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
1950
                      hash = data;
1951
                  }
1952
                  else {
1953
                      var type = data.attrs && data.attrs.type;
1954
                      hash =
1955
                          asProp || config.mustUseProp(tag, type, key)
1956
                              ? data.domProps || (data.domProps = {})
1957
                              : data.attrs || (data.attrs = {});
1958
                  }
1959
                  var camelizedKey = camelize(key);
1960
                  var hyphenatedKey = hyphenate(key);
1961
                  if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
1962
                      hash[key] = value[key];
1963
                      if (isSync) {
1964
                          var on = data.on || (data.on = {});
1965
                          on["update:".concat(key)] = function ($event) {
1966
                              value[key] = $event;
1967
                          };
1968
                      }
1969
                  }
1970
              };
1971
              for (var key in value) {
1972
                  _loop_1(key);
1973
              }
1974
          }
1975
      }
1976
      return data;
1977
  }
1978

1979
  /**
1980
   * Runtime helper for rendering static trees.
1981
   */
1982
  function renderStatic(index, isInFor) {
1983
      var cached = this._staticTrees || (this._staticTrees = []);
1984
      var tree = cached[index];
1985
      // if has already-rendered static tree and not inside v-for,
1986
      // we can reuse the same tree.
1987
      if (tree && !isInFor) {
1988
          return tree;
1989
      }
1990
      // otherwise, render a fresh tree.
1991
      tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates
1992
      );
1993
      markStatic$1(tree, "__static__".concat(index), false);
1994
      return tree;
1995
  }
1996
  /**
1997
   * Runtime helper for v-once.
1998
   * Effectively it means marking the node as static with a unique key.
1999
   */
2000
  function markOnce(tree, index, key) {
2001
      markStatic$1(tree, "__once__".concat(index).concat(key ? "_".concat(key) : ""), true);
2002
      return tree;
2003
  }
2004
  function markStatic$1(tree, key, isOnce) {
2005
      if (isArray(tree)) {
2006
          for (var i = 0; i < tree.length; i++) {
2007
              if (tree[i] && typeof tree[i] !== 'string') {
2008
                  markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);
2009
              }
2010
          }
2011
      }
2012
      else {
2013
          markStaticNode(tree, key, isOnce);
2014
      }
2015
  }
2016
  function markStaticNode(node, key, isOnce) {
2017
      node.isStatic = true;
2018
      node.key = key;
2019
      node.isOnce = isOnce;
2020
  }
2021

2022
  function bindObjectListeners(data, value) {
2023
      if (value) {
2024
          if (!isPlainObject(value)) {
2025
              warn$2('v-on without argument expects an Object value', this);
2026
          }
2027
          else {
2028
              var on = (data.on = data.on ? extend({}, data.on) : {});
2029
              for (var key in value) {
2030
                  var existing = on[key];
2031
                  var ours = value[key];
2032
                  on[key] = existing ? [].concat(existing, ours) : ours;
2033
              }
2034
          }
2035
      }
2036
      return data;
2037
  }
2038

2039
  function resolveScopedSlots(fns, res, 
2040
  // the following are added in 2.6
2041
  hasDynamicKeys, contentHashKey) {
2042
      res = res || { $stable: !hasDynamicKeys };
2043
      for (var i = 0; i < fns.length; i++) {
2044
          var slot = fns[i];
2045
          if (isArray(slot)) {
2046
              resolveScopedSlots(slot, res, hasDynamicKeys);
2047
          }
2048
          else if (slot) {
2049
              // marker for reverse proxying v-slot without scope on this.$slots
2050
              // @ts-expect-error
2051
              if (slot.proxy) {
2052
                  // @ts-expect-error
2053
                  slot.fn.proxy = true;
2054
              }
2055
              res[slot.key] = slot.fn;
2056
          }
2057
      }
2058
      if (contentHashKey) {
2059
          res.$key = contentHashKey;
2060
      }
2061
      return res;
2062
  }
2063

2064
  // helper to process dynamic keys for dynamic arguments in v-bind and v-on.
2065
  function bindDynamicKeys(baseObj, values) {
2066
      for (var i = 0; i < values.length; i += 2) {
2067
          var key = values[i];
2068
          if (typeof key === 'string' && key) {
2069
              baseObj[values[i]] = values[i + 1];
2070
          }
2071
          else if (key !== '' && key !== null) {
2072
              // null is a special value for explicitly removing a binding
2073
              warn$2("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);
2074
          }
2075
      }
2076
      return baseObj;
2077
  }
2078
  // helper to dynamically append modifier runtime markers to event names.
2079
  // ensure only append when value is already string, otherwise it will be cast
2080
  // to string and cause the type check to miss.
2081
  function prependModifier(value, symbol) {
2082
      return typeof value === 'string' ? symbol + value : value;
2083
  }
2084

2085
  function installRenderHelpers(target) {
2086
      target._o = markOnce;
2087
      target._n = toNumber;
2088
      target._s = toString;
2089
      target._l = renderList;
2090
      target._t = renderSlot;
2091
      target._q = looseEqual;
2092
      target._i = looseIndexOf;
2093
      target._m = renderStatic;
2094
      target._f = resolveFilter;
2095
      target._k = checkKeyCodes;
2096
      target._b = bindObjectProps;
2097
      target._v = createTextVNode;
2098
      target._e = createEmptyVNode;
2099
      target._u = resolveScopedSlots;
2100
      target._g = bindObjectListeners;
2101
      target._d = bindDynamicKeys;
2102
      target._p = prependModifier;
2103
  }
2104

2105
  /**
2106
   * Runtime helper for resolving raw children VNodes into a slot object.
2107
   */
2108
  function resolveSlots(children, context) {
2109
      if (!children || !children.length) {
2110
          return {};
2111
      }
2112
      var slots = {};
2113
      for (var i = 0, l = children.length; i < l; i++) {
2114
          var child = children[i];
2115
          var data = child.data;
2116
          // remove slot attribute if the node is resolved as a Vue slot node
2117
          if (data && data.attrs && data.attrs.slot) {
2118
              delete data.attrs.slot;
2119
          }
2120
          // named slots should only be respected if the vnode was rendered in the
2121
          // same context.
2122
          if ((child.context === context || child.fnContext === context) &&
2123
              data &&
2124
              data.slot != null) {
2125
              var name_1 = data.slot;
2126
              var slot = slots[name_1] || (slots[name_1] = []);
2127
              if (child.tag === 'template') {
2128
                  slot.push.apply(slot, child.children || []);
2129
              }
2130
              else {
2131
                  slot.push(child);
2132
              }
2133
          }
2134
          else {
2135
              (slots.default || (slots.default = [])).push(child);
2136
          }
2137
      }
2138
      // ignore slots that contains only whitespace
2139
      for (var name_2 in slots) {
2140
          if (slots[name_2].every(isWhitespace)) {
2141
              delete slots[name_2];
2142
          }
2143
      }
2144
      return slots;
2145
  }
2146
  function isWhitespace(node) {
2147
      return (node.isComment && !node.asyncFactory) || node.text === ' ';
2148
  }
2149

2150
  function isAsyncPlaceholder(node) {
2151
      // @ts-expect-error not really boolean type
2152
      return node.isComment && node.asyncFactory;
2153
  }
2154

2155
  function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
2156
      var res;
2157
      var hasNormalSlots = Object.keys(normalSlots).length > 0;
2158
      var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
2159
      var key = scopedSlots && scopedSlots.$key;
2160
      if (!scopedSlots) {
2161
          res = {};
2162
      }
2163
      else if (scopedSlots._normalized) {
2164
          // fast path 1: child component re-render only, parent did not change
2165
          return scopedSlots._normalized;
2166
      }
2167
      else if (isStable &&
2168
          prevScopedSlots &&
2169
          prevScopedSlots !== emptyObject &&
2170
          key === prevScopedSlots.$key &&
2171
          !hasNormalSlots &&
2172
          !prevScopedSlots.$hasNormal) {
2173
          // fast path 2: stable scoped slots w/ no normal slots to proxy,
2174
          // only need to normalize once
2175
          return prevScopedSlots;
2176
      }
2177
      else {
2178
          res = {};
2179
          for (var key_1 in scopedSlots) {
2180
              if (scopedSlots[key_1] && key_1[0] !== '$') {
2181
                  res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
2182
              }
2183
          }
2184
      }
2185
      // expose normal slots on scopedSlots
2186
      for (var key_2 in normalSlots) {
2187
          if (!(key_2 in res)) {
2188
              res[key_2] = proxyNormalSlot(normalSlots, key_2);
2189
          }
2190
      }
2191
      // avoriaz seems to mock a non-extensible $scopedSlots object
2192
      // and when that is passed down this would cause an error
2193
      if (scopedSlots && Object.isExtensible(scopedSlots)) {
2194
          scopedSlots._normalized = res;
2195
      }
2196
      def(res, '$stable', isStable);
2197
      def(res, '$key', key);
2198
      def(res, '$hasNormal', hasNormalSlots);
2199
      return res;
2200
  }
2201
  function normalizeScopedSlot(vm, normalSlots, key, fn) {
2202
      var normalized = function () {
2203
          var cur = currentInstance;
2204
          setCurrentInstance(vm);
2205
          var res = arguments.length ? fn.apply(null, arguments) : fn({});
2206
          res =
2207
              res && typeof res === 'object' && !isArray(res)
2208
                  ? [res] // single vnode
2209
                  : normalizeChildren(res);
2210
          var vnode = res && res[0];
2211
          setCurrentInstance(cur);
2212
          return res &&
2213
              (!vnode ||
2214
                  (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391
2215
              ? undefined
2216
              : res;
2217
      };
2218
      // this is a slot using the new v-slot syntax without scope. although it is
2219
      // compiled as a scoped slot, render fn users would expect it to be present
2220
      // on this.$slots because the usage is semantically a normal slot.
2221
      if (fn.proxy) {
2222
          Object.defineProperty(normalSlots, key, {
2223
              get: normalized,
2224
              enumerable: true,
2225
              configurable: true
2226
          });
2227
      }
2228
      return normalized;
2229
  }
2230
  function proxyNormalSlot(slots, key) {
2231
      return function () { return slots[key]; };
2232
  }
2233

2234
  function initSetup(vm) {
2235
      var options = vm.$options;
2236
      var setup = options.setup;
2237
      if (setup) {
2238
          var ctx = (vm._setupContext = createSetupContext(vm));
2239
          setCurrentInstance(vm);
2240
          pushTarget();
2241
          var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, "setup");
2242
          popTarget();
2243
          setCurrentInstance();
2244
          if (isFunction(setupResult)) {
2245
              // render function
2246
              // @ts-ignore
2247
              options.render = setupResult;
2248
          }
2249
          else if (isObject(setupResult)) {
2250
              // bindings
2251
              if (setupResult instanceof VNode) {
2252
                  warn$2("setup() should not return VNodes directly - " +
2253
                      "return a render function instead.");
2254
              }
2255
              vm._setupState = setupResult;
2256
              // __sfc indicates compiled bindings from <script setup>
2257
              if (!setupResult.__sfc) {
2258
                  for (var key in setupResult) {
2259
                      if (!isReserved(key)) {
2260
                          proxyWithRefUnwrap(vm, setupResult, key);
2261
                      }
2262
                      else {
2263
                          warn$2("Avoid using variables that start with _ or $ in setup().");
2264
                      }
2265
                  }
2266
              }
2267
              else {
2268
                  // exposed for compiled render fn
2269
                  var proxy = (vm._setupProxy = {});
2270
                  for (var key in setupResult) {
2271
                      if (key !== '__sfc') {
2272
                          proxyWithRefUnwrap(proxy, setupResult, key);
2273
                      }
2274
                  }
2275
              }
2276
          }
2277
          else if (setupResult !== undefined) {
2278
              warn$2("setup() should return an object. Received: ".concat(setupResult === null ? 'null' : typeof setupResult));
2279
          }
2280
      }
2281
  }
2282
  function createSetupContext(vm) {
2283
      var exposeCalled = false;
2284
      return {
2285
          get attrs() {
2286
              if (!vm._attrsProxy) {
2287
                  var proxy = (vm._attrsProxy = {});
2288
                  def(proxy, '_v_attr_proxy', true);
2289
                  syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');
2290
              }
2291
              return vm._attrsProxy;
2292
          },
2293
          get listeners() {
2294
              if (!vm._listenersProxy) {
2295
                  var proxy = (vm._listenersProxy = {});
2296
                  syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');
2297
              }
2298
              return vm._listenersProxy;
2299
          },
2300
          get slots() {
2301
              return initSlotsProxy(vm);
2302
          },
2303
          emit: bind$1(vm.$emit, vm),
2304
          expose: function (exposed) {
2305
              {
2306
                  if (exposeCalled) {
2307
                      warn$2("expose() should be called only once per setup().", vm);
2308
                  }
2309
                  exposeCalled = true;
2310
              }
2311
              if (exposed) {
2312
                  Object.keys(exposed).forEach(function (key) {
2313
                      return proxyWithRefUnwrap(vm, exposed, key);
2314
                  });
2315
              }
2316
          }
2317
      };
2318
  }
2319
  function syncSetupProxy(to, from, prev, instance, type) {
2320
      var changed = false;
2321
      for (var key in from) {
2322
          if (!(key in to)) {
2323
              changed = true;
2324
              defineProxyAttr(to, key, instance, type);
2325
          }
2326
          else if (from[key] !== prev[key]) {
2327
              changed = true;
2328
          }
2329
      }
2330
      for (var key in to) {
2331
          if (!(key in from)) {
2332
              changed = true;
2333
              delete to[key];
2334
          }
2335
      }
2336
      return changed;
2337
  }
2338
  function defineProxyAttr(proxy, key, instance, type) {
2339
      Object.defineProperty(proxy, key, {
2340
          enumerable: true,
2341
          configurable: true,
2342
          get: function () {
2343
              return instance[type][key];
2344
          }
2345
      });
2346
  }
2347
  function initSlotsProxy(vm) {
2348
      if (!vm._slotsProxy) {
2349
          syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);
2350
      }
2351
      return vm._slotsProxy;
2352
  }
2353
  function syncSetupSlots(to, from) {
2354
      for (var key in from) {
2355
          to[key] = from[key];
2356
      }
2357
      for (var key in to) {
2358
          if (!(key in from)) {
2359
              delete to[key];
2360
          }
2361
      }
2362
  }
2363
  /**
2364
   * @internal use manual type def because public setup context type relies on
2365
   * legacy VNode types
2366
   */
2367
  function useSlots() {
2368
      return getContext().slots;
2369
  }
2370
  /**
2371
   * @internal use manual type def because public setup context type relies on
2372
   * legacy VNode types
2373
   */
2374
  function useAttrs() {
2375
      return getContext().attrs;
2376
  }
2377
  /**
2378
   * Vue 2 only
2379
   * @internal use manual type def because public setup context type relies on
2380
   * legacy VNode types
2381
   */
2382
  function useListeners() {
2383
      return getContext().listeners;
2384
  }
2385
  function getContext() {
2386
      if (!currentInstance) {
2387
          warn$2("useContext() called without active instance.");
2388
      }
2389
      var vm = currentInstance;
2390
      return vm._setupContext || (vm._setupContext = createSetupContext(vm));
2391
  }
2392
  /**
2393
   * Runtime helper for merging default declarations. Imported by compiled code
2394
   * only.
2395
   * @internal
2396
   */
2397
  function mergeDefaults(raw, defaults) {
2398
      var props = isArray(raw)
2399
          ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})
2400
          : raw;
2401
      for (var key in defaults) {
2402
          var opt = props[key];
2403
          if (opt) {
2404
              if (isArray(opt) || isFunction(opt)) {
2405
                  props[key] = { type: opt, default: defaults[key] };
2406
              }
2407
              else {
2408
                  opt.default = defaults[key];
2409
              }
2410
          }
2411
          else if (opt === null) {
2412
              props[key] = { default: defaults[key] };
2413
          }
2414
          else {
2415
              warn$2("props default key \"".concat(key, "\" has no corresponding declaration."));
2416
          }
2417
      }
2418
      return props;
2419
  }
2420

2421
  function initRender(vm) {
2422
      vm._vnode = null; // the root of the child tree
2423
      vm._staticTrees = null; // v-once cached trees
2424
      var options = vm.$options;
2425
      var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree
2426
      var renderContext = parentVnode && parentVnode.context;
2427
      vm.$slots = resolveSlots(options._renderChildren, renderContext);
2428
      vm.$scopedSlots = parentVnode
2429
          ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)
2430
          : emptyObject;
2431
      // bind the createElement fn to this instance
2432
      // so that we get proper render context inside it.
2433
      // args order: tag, data, children, normalizationType, alwaysNormalize
2434
      // internal version is used by render functions compiled from templates
2435
      // @ts-expect-error
2436
      vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };
2437
      // normalization is always applied for the public version, used in
2438
      // user-written render functions.
2439
      // @ts-expect-error
2440
      vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };
2441
      // $attrs & $listeners are exposed for easier HOC creation.
2442
      // they need to be reactive so that HOCs using them are always updated
2443
      var parentData = parentVnode && parentVnode.data;
2444
      /* istanbul ignore else */
2445
      {
2446
          defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {
2447
              !isUpdatingChildComponent && warn$2("$attrs is readonly.", vm);
2448
          }, true);
2449
          defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
2450
              !isUpdatingChildComponent && warn$2("$listeners is readonly.", vm);
2451
          }, true);
2452
      }
2453
  }
2454
  var currentRenderingInstance = null;
2455
  function renderMixin(Vue) {
2456
      // install runtime convenience helpers
2457
      installRenderHelpers(Vue.prototype);
2458
      Vue.prototype.$nextTick = function (fn) {
2459
          return nextTick(fn, this);
2460
      };
2461
      Vue.prototype._render = function () {
2462
          var vm = this;
2463
          var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;
2464
          if (_parentVnode && vm._isMounted) {
2465
              vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);
2466
              if (vm._slotsProxy) {
2467
                  syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);
2468
              }
2469
          }
2470
          // set parent vnode. this allows render functions to have access
2471
          // to the data on the placeholder node.
2472
          vm.$vnode = _parentVnode;
2473
          // render self
2474
          var vnode;
2475
          try {
2476
              // There's no need to maintain a stack because all render fns are called
2477
              // separately from one another. Nested component's render fns are called
2478
              // when parent component is patched.
2479
              setCurrentInstance(vm);
2480
              currentRenderingInstance = vm;
2481
              vnode = render.call(vm._renderProxy, vm.$createElement);
2482
          }
2483
          catch (e) {
2484
              handleError(e, vm, "render");
2485
              // return error render result,
2486
              // or previous vnode to prevent render error causing blank component
2487
              /* istanbul ignore else */
2488
              if (vm.$options.renderError) {
2489
                  try {
2490
                      vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
2491
                  }
2492
                  catch (e) {
2493
                      handleError(e, vm, "renderError");
2494
                      vnode = vm._vnode;
2495
                  }
2496
              }
2497
              else {
2498
                  vnode = vm._vnode;
2499
              }
2500
          }
2501
          finally {
2502
              currentRenderingInstance = null;
2503
              setCurrentInstance();
2504
          }
2505
          // if the returned array contains only a single node, allow it
2506
          if (isArray(vnode) && vnode.length === 1) {
2507
              vnode = vnode[0];
2508
          }
2509
          // return empty vnode in case the render function errored out
2510
          if (!(vnode instanceof VNode)) {
2511
              if (isArray(vnode)) {
2512
                  warn$2('Multiple root nodes returned from render function. Render function ' +
2513
                      'should return a single root node.', vm);
2514
              }
2515
              vnode = createEmptyVNode();
2516
          }
2517
          // set parent
2518
          vnode.parent = _parentVnode;
2519
          return vnode;
2520
      };
2521
  }
2522

2523
  function ensureCtor(comp, base) {
2524
      if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {
2525
          comp = comp.default;
2526
      }
2527
      return isObject(comp) ? base.extend(comp) : comp;
2528
  }
2529
  function createAsyncPlaceholder(factory, data, context, children, tag) {
2530
      var node = createEmptyVNode();
2531
      node.asyncFactory = factory;
2532
      node.asyncMeta = { data: data, context: context, children: children, tag: tag };
2533
      return node;
2534
  }
2535
  function resolveAsyncComponent(factory, baseCtor) {
2536
      if (isTrue(factory.error) && isDef(factory.errorComp)) {
2537
          return factory.errorComp;
2538
      }
2539
      if (isDef(factory.resolved)) {
2540
          return factory.resolved;
2541
      }
2542
      var owner = currentRenderingInstance;
2543
      if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
2544
          // already pending
2545
          factory.owners.push(owner);
2546
      }
2547
      if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
2548
          return factory.loadingComp;
2549
      }
2550
      if (owner && !isDef(factory.owners)) {
2551
          var owners_1 = (factory.owners = [owner]);
2552
          var sync_1 = true;
2553
          var timerLoading_1 = null;
2554
          var timerTimeout_1 = null;
2555
          owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });
2556
          var forceRender_1 = function (renderCompleted) {
2557
              for (var i = 0, l = owners_1.length; i < l; i++) {
2558
                  owners_1[i].$forceUpdate();
2559
              }
2560
              if (renderCompleted) {
2561
                  owners_1.length = 0;
2562
                  if (timerLoading_1 !== null) {
2563
                      clearTimeout(timerLoading_1);
2564
                      timerLoading_1 = null;
2565
                  }
2566
                  if (timerTimeout_1 !== null) {
2567
                      clearTimeout(timerTimeout_1);
2568
                      timerTimeout_1 = null;
2569
                  }
2570
              }
2571
          };
2572
          var resolve = once(function (res) {
2573
              // cache resolved
2574
              factory.resolved = ensureCtor(res, baseCtor);
2575
              // invoke callbacks only if this is not a synchronous resolve
2576
              // (async resolves are shimmed as synchronous during SSR)
2577
              if (!sync_1) {
2578
                  forceRender_1(true);
2579
              }
2580
              else {
2581
                  owners_1.length = 0;
2582
              }
2583
          });
2584
          var reject_1 = once(function (reason) {
2585
              warn$2("Failed to resolve async component: ".concat(String(factory)) +
2586
                      (reason ? "\nReason: ".concat(reason) : ''));
2587
              if (isDef(factory.errorComp)) {
2588
                  factory.error = true;
2589
                  forceRender_1(true);
2590
              }
2591
          });
2592
          var res_1 = factory(resolve, reject_1);
2593
          if (isObject(res_1)) {
2594
              if (isPromise(res_1)) {
2595
                  // () => Promise
2596
                  if (isUndef(factory.resolved)) {
2597
                      res_1.then(resolve, reject_1);
2598
                  }
2599
              }
2600
              else if (isPromise(res_1.component)) {
2601
                  res_1.component.then(resolve, reject_1);
2602
                  if (isDef(res_1.error)) {
2603
                      factory.errorComp = ensureCtor(res_1.error, baseCtor);
2604
                  }
2605
                  if (isDef(res_1.loading)) {
2606
                      factory.loadingComp = ensureCtor(res_1.loading, baseCtor);
2607
                      if (res_1.delay === 0) {
2608
                          factory.loading = true;
2609
                      }
2610
                      else {
2611
                          // @ts-expect-error NodeJS timeout type
2612
                          timerLoading_1 = setTimeout(function () {
2613
                              timerLoading_1 = null;
2614
                              if (isUndef(factory.resolved) && isUndef(factory.error)) {
2615
                                  factory.loading = true;
2616
                                  forceRender_1(false);
2617
                              }
2618
                          }, res_1.delay || 200);
2619
                      }
2620
                  }
2621
                  if (isDef(res_1.timeout)) {
2622
                      // @ts-expect-error NodeJS timeout type
2623
                      timerTimeout_1 = setTimeout(function () {
2624
                          timerTimeout_1 = null;
2625
                          if (isUndef(factory.resolved)) {
2626
                              reject_1("timeout (".concat(res_1.timeout, "ms)") );
2627
                          }
2628
                      }, res_1.timeout);
2629
                  }
2630
              }
2631
          }
2632
          sync_1 = false;
2633
          // return in case resolved synchronously
2634
          return factory.loading ? factory.loadingComp : factory.resolved;
2635
      }
2636
  }
2637

2638
  function getFirstComponentChild(children) {
2639
      if (isArray(children)) {
2640
          for (var i = 0; i < children.length; i++) {
2641
              var c = children[i];
2642
              if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
2643
                  return c;
2644
              }
2645
          }
2646
      }
2647
  }
2648

2649
  function initEvents(vm) {
2650
      vm._events = Object.create(null);
2651
      vm._hasHookEvent = false;
2652
      // init parent attached events
2653
      var listeners = vm.$options._parentListeners;
2654
      if (listeners) {
2655
          updateComponentListeners(vm, listeners);
2656
      }
2657
  }
2658
  var target$1;
2659
  function add$1(event, fn) {
2660
      target$1.$on(event, fn);
2661
  }
2662
  function remove$1(event, fn) {
2663
      target$1.$off(event, fn);
2664
  }
2665
  function createOnceHandler$1(event, fn) {
2666
      var _target = target$1;
2667
      return function onceHandler() {
2668
          var res = fn.apply(null, arguments);
2669
          if (res !== null) {
2670
              _target.$off(event, onceHandler);
2671
          }
2672
      };
2673
  }
2674
  function updateComponentListeners(vm, listeners, oldListeners) {
2675
      target$1 = vm;
2676
      updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);
2677
      target$1 = undefined;
2678
  }
2679
  function eventsMixin(Vue) {
2680
      var hookRE = /^hook:/;
2681
      Vue.prototype.$on = function (event, fn) {
2682
          var vm = this;
2683
          if (isArray(event)) {
2684
              for (var i = 0, l = event.length; i < l; i++) {
2685
                  vm.$on(event[i], fn);
2686
              }
2687
          }
2688
          else {
2689
              (vm._events[event] || (vm._events[event] = [])).push(fn);
2690
              // optimize hook:event cost by using a boolean flag marked at registration
2691
              // instead of a hash lookup
2692
              if (hookRE.test(event)) {
2693
                  vm._hasHookEvent = true;
2694
              }
2695
          }
2696
          return vm;
2697
      };
2698
      Vue.prototype.$once = function (event, fn) {
2699
          var vm = this;
2700
          function on() {
2701
              vm.$off(event, on);
2702
              fn.apply(vm, arguments);
2703
          }
2704
          on.fn = fn;
2705
          vm.$on(event, on);
2706
          return vm;
2707
      };
2708
      Vue.prototype.$off = function (event, fn) {
2709
          var vm = this;
2710
          // all
2711
          if (!arguments.length) {
2712
              vm._events = Object.create(null);
2713
              return vm;
2714
          }
2715
          // array of events
2716
          if (isArray(event)) {
2717
              for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {
2718
                  vm.$off(event[i_1], fn);
2719
              }
2720
              return vm;
2721
          }
2722
          // specific event
2723
          var cbs = vm._events[event];
2724
          if (!cbs) {
2725
              return vm;
2726
          }
2727
          if (!fn) {
2728
              vm._events[event] = null;
2729
              return vm;
2730
          }
2731
          // specific handler
2732
          var cb;
2733
          var i = cbs.length;
2734
          while (i--) {
2735
              cb = cbs[i];
2736
              if (cb === fn || cb.fn === fn) {
2737
                  cbs.splice(i, 1);
2738
                  break;
2739
              }
2740
          }
2741
          return vm;
2742
      };
2743
      Vue.prototype.$emit = function (event) {
2744
          var vm = this;
2745
          {
2746
              var lowerCaseEvent = event.toLowerCase();
2747
              if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
2748
                  tip("Event \"".concat(lowerCaseEvent, "\" is emitted in component ") +
2749
                      "".concat(formatComponentName(vm), " but the handler is registered for \"").concat(event, "\". ") +
2750
                      "Note that HTML attributes are case-insensitive and you cannot use " +
2751
                      "v-on to listen to camelCase events when using in-DOM templates. " +
2752
                      "You should probably use \"".concat(hyphenate(event), "\" instead of \"").concat(event, "\"."));
2753
              }
2754
          }
2755
          var cbs = vm._events[event];
2756
          if (cbs) {
2757
              cbs = cbs.length > 1 ? toArray(cbs) : cbs;
2758
              var args = toArray(arguments, 1);
2759
              var info = "event handler for \"".concat(event, "\"");
2760
              for (var i = 0, l = cbs.length; i < l; i++) {
2761
                  invokeWithErrorHandling(cbs[i], vm, args, vm, info);
2762
              }
2763
          }
2764
          return vm;
2765
      };
2766
  }
2767

2768
  var activeInstance = null;
2769
  var isUpdatingChildComponent = false;
2770
  function setActiveInstance(vm) {
2771
      var prevActiveInstance = activeInstance;
2772
      activeInstance = vm;
2773
      return function () {
2774
          activeInstance = prevActiveInstance;
2775
      };
2776
  }
2777
  function initLifecycle(vm) {
2778
      var options = vm.$options;
2779
      // locate first non-abstract parent
2780
      var parent = options.parent;
2781
      if (parent && !options.abstract) {
2782
          while (parent.$options.abstract && parent.$parent) {
2783
              parent = parent.$parent;
2784
          }
2785
          parent.$children.push(vm);
2786
      }
2787
      vm.$parent = parent;
2788
      vm.$root = parent ? parent.$root : vm;
2789
      vm.$children = [];
2790
      vm.$refs = {};
2791
      vm._provided = parent ? parent._provided : Object.create(null);
2792
      vm._watcher = null;
2793
      vm._inactive = null;
2794
      vm._directInactive = false;
2795
      vm._isMounted = false;
2796
      vm._isDestroyed = false;
2797
      vm._isBeingDestroyed = false;
2798
  }
2799
  function lifecycleMixin(Vue) {
2800
      Vue.prototype._update = function (vnode, hydrating) {
2801
          var vm = this;
2802
          var prevEl = vm.$el;
2803
          var prevVnode = vm._vnode;
2804
          var restoreActiveInstance = setActiveInstance(vm);
2805
          vm._vnode = vnode;
2806
          // Vue.prototype.__patch__ is injected in entry points
2807
          // based on the rendering backend used.
2808
          if (!prevVnode) {
2809
              // initial render
2810
              vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
2811
          }
2812
          else {
2813
              // updates
2814
              vm.$el = vm.__patch__(prevVnode, vnode);
2815
          }
2816
          restoreActiveInstance();
2817
          // update __vue__ reference
2818
          if (prevEl) {
2819
              prevEl.__vue__ = null;
2820
          }
2821
          if (vm.$el) {
2822
              vm.$el.__vue__ = vm;
2823
          }
2824
          // if parent is an HOC, update its $el as well
2825
          if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
2826
              vm.$parent.$el = vm.$el;
2827
          }
2828
          // updated hook is called by the scheduler to ensure that children are
2829
          // updated in a parent's updated hook.
2830
      };
2831
      Vue.prototype.$forceUpdate = function () {
2832
          var vm = this;
2833
          if (vm._watcher) {
2834
              vm._watcher.update();
2835
          }
2836
      };
2837
      Vue.prototype.$destroy = function () {
2838
          var vm = this;
2839
          if (vm._isBeingDestroyed) {
2840
              return;
2841
          }
2842
          callHook$1(vm, 'beforeDestroy');
2843
          vm._isBeingDestroyed = true;
2844
          // remove self from parent
2845
          var parent = vm.$parent;
2846
          if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
2847
              remove$2(parent.$children, vm);
2848
          }
2849
          // teardown scope. this includes both the render watcher and other
2850
          // watchers created
2851
          vm._scope.stop();
2852
          // remove reference from data ob
2853
          // frozen object may not have observer.
2854
          if (vm._data.__ob__) {
2855
              vm._data.__ob__.vmCount--;
2856
          }
2857
          // call the last hook...
2858
          vm._isDestroyed = true;
2859
          // invoke destroy hooks on current rendered tree
2860
          vm.__patch__(vm._vnode, null);
2861
          // fire destroyed hook
2862
          callHook$1(vm, 'destroyed');
2863
          // turn off all instance listeners.
2864
          vm.$off();
2865
          // remove __vue__ reference
2866
          if (vm.$el) {
2867
              vm.$el.__vue__ = null;
2868
          }
2869
          // release circular reference (#6759)
2870
          if (vm.$vnode) {
2871
              vm.$vnode.parent = null;
2872
          }
2873
      };
2874
  }
2875
  function mountComponent(vm, el, hydrating) {
2876
      vm.$el = el;
2877
      if (!vm.$options.render) {
2878
          // @ts-expect-error invalid type
2879
          vm.$options.render = createEmptyVNode;
2880
          {
2881
              /* istanbul ignore if */
2882
              if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
2883
                  vm.$options.el ||
2884
                  el) {
2885
                  warn$2('You are using the runtime-only build of Vue where the template ' +
2886
                      'compiler is not available. Either pre-compile the templates into ' +
2887
                      'render functions, or use the compiler-included build.', vm);
2888
              }
2889
              else {
2890
                  warn$2('Failed to mount component: template or render function not defined.', vm);
2891
              }
2892
          }
2893
      }
2894
      callHook$1(vm, 'beforeMount');
2895
      var updateComponent;
2896
      /* istanbul ignore if */
2897
      if (config.performance && mark) {
2898
          updateComponent = function () {
2899
              var name = vm._name;
2900
              var id = vm._uid;
2901
              var startTag = "vue-perf-start:".concat(id);
2902
              var endTag = "vue-perf-end:".concat(id);
2903
              mark(startTag);
2904
              var vnode = vm._render();
2905
              mark(endTag);
2906
              measure("vue ".concat(name, " render"), startTag, endTag);
2907
              mark(startTag);
2908
              vm._update(vnode, hydrating);
2909
              mark(endTag);
2910
              measure("vue ".concat(name, " patch"), startTag, endTag);
2911
          };
2912
      }
2913
      else {
2914
          updateComponent = function () {
2915
              vm._update(vm._render(), hydrating);
2916
          };
2917
      }
2918
      var watcherOptions = {
2919
          before: function () {
2920
              if (vm._isMounted && !vm._isDestroyed) {
2921
                  callHook$1(vm, 'beforeUpdate');
2922
              }
2923
          }
2924
      };
2925
      {
2926
          watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };
2927
          watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };
2928
      }
2929
      // we set this to vm._watcher inside the watcher's constructor
2930
      // since the watcher's initial patch may call $forceUpdate (e.g. inside child
2931
      // component's mounted hook), which relies on vm._watcher being already defined
2932
      new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);
2933
      hydrating = false;
2934
      // flush buffer for flush: "pre" watchers queued in setup()
2935
      var preWatchers = vm._preWatchers;
2936
      if (preWatchers) {
2937
          for (var i = 0; i < preWatchers.length; i++) {
2938
              preWatchers[i].run();
2939
          }
2940
      }
2941
      // manually mounted instance, call mounted on self
2942
      // mounted is called for render-created child components in its inserted hook
2943
      if (vm.$vnode == null) {
2944
          vm._isMounted = true;
2945
          callHook$1(vm, 'mounted');
2946
      }
2947
      return vm;
2948
  }
2949
  function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {
2950
      {
2951
          isUpdatingChildComponent = true;
2952
      }
2953
      // determine whether component has slot children
2954
      // we need to do this before overwriting $options._renderChildren.
2955
      // check if there are dynamic scopedSlots (hand-written or compiled but with
2956
      // dynamic slot names). Static scoped slots compiled from template has the
2957
      // "$stable" marker.
2958
      var newScopedSlots = parentVnode.data.scopedSlots;
2959
      var oldScopedSlots = vm.$scopedSlots;
2960
      var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||
2961
          (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
2962
          (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
2963
          (!newScopedSlots && vm.$scopedSlots.$key));
2964
      // Any static slot children from the parent may have changed during parent's
2965
      // update. Dynamic scoped slots may also have changed. In such cases, a forced
2966
      // update is necessary to ensure correctness.
2967
      var needsForceUpdate = !!(renderChildren || // has new static slots
2968
          vm.$options._renderChildren || // has old static slots
2969
          hasDynamicScopedSlot);
2970
      var prevVNode = vm.$vnode;
2971
      vm.$options._parentVnode = parentVnode;
2972
      vm.$vnode = parentVnode; // update vm's placeholder node without re-render
2973
      if (vm._vnode) {
2974
          // update child tree's parent
2975
          vm._vnode.parent = parentVnode;
2976
      }
2977
      vm.$options._renderChildren = renderChildren;
2978
      // update $attrs and $listeners hash
2979
      // these are also reactive so they may trigger child update if the child
2980
      // used them during render
2981
      var attrs = parentVnode.data.attrs || emptyObject;
2982
      if (vm._attrsProxy) {
2983
          // force update if attrs are accessed and has changed since it may be
2984
          // passed to a child component.
2985
          if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {
2986
              needsForceUpdate = true;
2987
          }
2988
      }
2989
      vm.$attrs = attrs;
2990
      // update listeners
2991
      listeners = listeners || emptyObject;
2992
      var prevListeners = vm.$options._parentListeners;
2993
      if (vm._listenersProxy) {
2994
          syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');
2995
      }
2996
      vm.$listeners = vm.$options._parentListeners = listeners;
2997
      updateComponentListeners(vm, listeners, prevListeners);
2998
      // update props
2999
      if (propsData && vm.$options.props) {
3000
          toggleObserving(false);
3001
          var props = vm._props;
3002
          var propKeys = vm.$options._propKeys || [];
3003
          for (var i = 0; i < propKeys.length; i++) {
3004
              var key = propKeys[i];
3005
              var propOptions = vm.$options.props; // wtf flow?
3006
              props[key] = validateProp(key, propOptions, propsData, vm);
3007
          }
3008
          toggleObserving(true);
3009
          // keep a copy of raw propsData
3010
          vm.$options.propsData = propsData;
3011
      }
3012
      // resolve slots + force update if has children
3013
      if (needsForceUpdate) {
3014
          vm.$slots = resolveSlots(renderChildren, parentVnode.context);
3015
          vm.$forceUpdate();
3016
      }
3017
      {
3018
          isUpdatingChildComponent = false;
3019
      }
3020
  }
3021
  function isInInactiveTree(vm) {
3022
      while (vm && (vm = vm.$parent)) {
3023
          if (vm._inactive)
3024
              return true;
3025
      }
3026
      return false;
3027
  }
3028
  function activateChildComponent(vm, direct) {
3029
      if (direct) {
3030
          vm._directInactive = false;
3031
          if (isInInactiveTree(vm)) {
3032
              return;
3033
          }
3034
      }
3035
      else if (vm._directInactive) {
3036
          return;
3037
      }
3038
      if (vm._inactive || vm._inactive === null) {
3039
          vm._inactive = false;
3040
          for (var i = 0; i < vm.$children.length; i++) {
3041
              activateChildComponent(vm.$children[i]);
3042
          }
3043
          callHook$1(vm, 'activated');
3044
      }
3045
  }
3046
  function deactivateChildComponent(vm, direct) {
3047
      if (direct) {
3048
          vm._directInactive = true;
3049
          if (isInInactiveTree(vm)) {
3050
              return;
3051
          }
3052
      }
3053
      if (!vm._inactive) {
3054
          vm._inactive = true;
3055
          for (var i = 0; i < vm.$children.length; i++) {
3056
              deactivateChildComponent(vm.$children[i]);
3057
          }
3058
          callHook$1(vm, 'deactivated');
3059
      }
3060
  }
3061
  function callHook$1(vm, hook, args, setContext) {
3062
      if (setContext === void 0) { setContext = true; }
3063
      // #7573 disable dep collection when invoking lifecycle hooks
3064
      pushTarget();
3065
      var prev = currentInstance;
3066
      setContext && setCurrentInstance(vm);
3067
      var handlers = vm.$options[hook];
3068
      var info = "".concat(hook, " hook");
3069
      if (handlers) {
3070
          for (var i = 0, j = handlers.length; i < j; i++) {
3071
              invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);
3072
          }
3073
      }
3074
      if (vm._hasHookEvent) {
3075
          vm.$emit('hook:' + hook);
3076
      }
3077
      setContext && setCurrentInstance(prev);
3078
      popTarget();
3079
  }
3080

3081
  var MAX_UPDATE_COUNT = 100;
3082
  var queue = [];
3083
  var activatedChildren = [];
3084
  var has = {};
3085
  var circular = {};
3086
  var waiting = false;
3087
  var flushing = false;
3088
  var index$1 = 0;
3089
  /**
3090
   * Reset the scheduler's state.
3091
   */
3092
  function resetSchedulerState() {
3093
      index$1 = queue.length = activatedChildren.length = 0;
3094
      has = {};
3095
      {
3096
          circular = {};
3097
      }
3098
      waiting = flushing = false;
3099
  }
3100
  // Async edge case #6566 requires saving the timestamp when event listeners are
3101
  // attached. However, calling performance.now() has a perf overhead especially
3102
  // if the page has thousands of event listeners. Instead, we take a timestamp
3103
  // every time the scheduler flushes and use that for all event listeners
3104
  // attached during that flush.
3105
  var currentFlushTimestamp = 0;
3106
  // Async edge case fix requires storing an event listener's attach timestamp.
3107
  var getNow = Date.now;
3108
  // Determine what event timestamp the browser is using. Annoyingly, the
3109
  // timestamp can either be hi-res (relative to page load) or low-res
3110
  // (relative to UNIX epoch), so in order to compare time we have to use the
3111
  // same timestamp type when saving the flush timestamp.
3112
  // All IE versions use low-res event timestamps, and have problematic clock
3113
  // implementations (#9632)
3114
  if (inBrowser && !isIE) {
3115
      var performance_1 = window.performance;
3116
      if (performance_1 &&
3117
          typeof performance_1.now === 'function' &&
3118
          getNow() > document.createEvent('Event').timeStamp) {
3119
          // if the event timestamp, although evaluated AFTER the Date.now(), is
3120
          // smaller than it, it means the event is using a hi-res timestamp,
3121
          // and we need to use the hi-res version for event listener timestamps as
3122
          // well.
3123
          getNow = function () { return performance_1.now(); };
3124
      }
3125
  }
3126
  var sortCompareFn = function (a, b) {
3127
      if (a.post) {
3128
          if (!b.post)
3129
              return 1;
3130
      }
3131
      else if (b.post) {
3132
          return -1;
3133
      }
3134
      return a.id - b.id;
3135
  };
3136
  /**
3137
   * Flush both queues and run the watchers.
3138
   */
3139
  function flushSchedulerQueue() {
3140
      currentFlushTimestamp = getNow();
3141
      flushing = true;
3142
      var watcher, id;
3143
      // Sort queue before flush.
3144
      // This ensures that:
3145
      // 1. Components are updated from parent to child. (because parent is always
3146
      //    created before the child)
3147
      // 2. A component's user watchers are run before its render watcher (because
3148
      //    user watchers are created before the render watcher)
3149
      // 3. If a component is destroyed during a parent component's watcher run,
3150
      //    its watchers can be skipped.
3151
      queue.sort(sortCompareFn);
3152
      // do not cache length because more watchers might be pushed
3153
      // as we run existing watchers
3154
      for (index$1 = 0; index$1 < queue.length; index$1++) {
3155
          watcher = queue[index$1];
3156
          if (watcher.before) {
3157
              watcher.before();
3158
          }
3159
          id = watcher.id;
3160
          has[id] = null;
3161
          watcher.run();
3162
          // in dev build, check and stop circular updates.
3163
          if (has[id] != null) {
3164
              circular[id] = (circular[id] || 0) + 1;
3165
              if (circular[id] > MAX_UPDATE_COUNT) {
3166
                  warn$2('You may have an infinite update loop ' +
3167
                      (watcher.user
3168
                          ? "in watcher with expression \"".concat(watcher.expression, "\"")
3169
                          : "in a component render function."), watcher.vm);
3170
                  break;
3171
              }
3172
          }
3173
      }
3174
      // keep copies of post queues before resetting state
3175
      var activatedQueue = activatedChildren.slice();
3176
      var updatedQueue = queue.slice();
3177
      resetSchedulerState();
3178
      // call component updated and activated hooks
3179
      callActivatedHooks(activatedQueue);
3180
      callUpdatedHooks(updatedQueue);
3181
      // devtool hook
3182
      /* istanbul ignore if */
3183
      if (devtools && config.devtools) {
3184
          devtools.emit('flush');
3185
      }
3186
  }
3187
  function callUpdatedHooks(queue) {
3188
      var i = queue.length;
3189
      while (i--) {
3190
          var watcher = queue[i];
3191
          var vm = watcher.vm;
3192
          if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
3193
              callHook$1(vm, 'updated');
3194
          }
3195
      }
3196
  }
3197
  /**
3198
   * Queue a kept-alive component that was activated during patch.
3199
   * The queue will be processed after the entire tree has been patched.
3200
   */
3201
  function queueActivatedComponent(vm) {
3202
      // setting _inactive to false here so that a render function can
3203
      // rely on checking whether it's in an inactive tree (e.g. router-view)
3204
      vm._inactive = false;
3205
      activatedChildren.push(vm);
3206
  }
3207
  function callActivatedHooks(queue) {
3208
      for (var i = 0; i < queue.length; i++) {
3209
          queue[i]._inactive = true;
3210
          activateChildComponent(queue[i], true /* true */);
3211
      }
3212
  }
3213
  /**
3214
   * Push a watcher into the watcher queue.
3215
   * Jobs with duplicate IDs will be skipped unless it's
3216
   * pushed when the queue is being flushed.
3217
   */
3218
  function queueWatcher(watcher) {
3219
      var id = watcher.id;
3220
      if (has[id] != null) {
3221
          return;
3222
      }
3223
      if (watcher === Dep.target && watcher.noRecurse) {
3224
          return;
3225
      }
3226
      has[id] = true;
3227
      if (!flushing) {
3228
          queue.push(watcher);
3229
      }
3230
      else {
3231
          // if already flushing, splice the watcher based on its id
3232
          // if already past its id, it will be run next immediately.
3233
          var i = queue.length - 1;
3234
          while (i > index$1 && queue[i].id > watcher.id) {
3235
              i--;
3236
          }
3237
          queue.splice(i + 1, 0, watcher);
3238
      }
3239
      // queue the flush
3240
      if (!waiting) {
3241
          waiting = true;
3242
          if (!config.async) {
3243
              flushSchedulerQueue();
3244
              return;
3245
          }
3246
          nextTick(flushSchedulerQueue);
3247
      }
3248
  }
3249

3250
  var WATCHER = "watcher";
3251
  var WATCHER_CB = "".concat(WATCHER, " callback");
3252
  var WATCHER_GETTER = "".concat(WATCHER, " getter");
3253
  var WATCHER_CLEANUP = "".concat(WATCHER, " cleanup");
3254
  // Simple effect.
3255
  function watchEffect(effect, options) {
3256
      return doWatch(effect, null, options);
3257
  }
3258
  function watchPostEffect(effect, options) {
3259
      return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'post' }) ));
3260
  }
3261
  function watchSyncEffect(effect, options) {
3262
      return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'sync' }) ));
3263
  }
3264
  // initial value for watchers to trigger on undefined initial values
3265
  var INITIAL_WATCHER_VALUE = {};
3266
  // implementation
3267
  function watch(source, cb, options) {
3268
      if (typeof cb !== 'function') {
3269
          warn$2("`watch(fn, options?)` signature has been moved to a separate API. " +
3270
              "Use `watchEffect(fn, options?)` instead. `watch` now only " +
3271
              "supports `watch(source, cb, options?) signature.");
3272
      }
3273
      return doWatch(source, cb, options);
3274
  }
3275
  function doWatch(source, cb, _a) {
3276
      var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;
3277
      if (!cb) {
3278
          if (immediate !== undefined) {
3279
              warn$2("watch() \"immediate\" option is only respected when using the " +
3280
                  "watch(source, callback, options?) signature.");
3281
          }
3282
          if (deep !== undefined) {
3283
              warn$2("watch() \"deep\" option is only respected when using the " +
3284
                  "watch(source, callback, options?) signature.");
3285
          }
3286
      }
3287
      var warnInvalidSource = function (s) {
3288
          warn$2("Invalid watch source: ".concat(s, ". A watch source can only be a getter/effect ") +
3289
              "function, a ref, a reactive object, or an array of these types.");
3290
      };
3291
      var instance = currentInstance;
3292
      var call = function (fn, type, args) {
3293
          if (args === void 0) { args = null; }
3294
          return invokeWithErrorHandling(fn, null, args, instance, type);
3295
      };
3296
      var getter;
3297
      var forceTrigger = false;
3298
      var isMultiSource = false;
3299
      if (isRef(source)) {
3300
          getter = function () { return source.value; };
3301
          forceTrigger = isShallow(source);
3302
      }
3303
      else if (isReactive(source)) {
3304
          getter = function () {
3305
              source.__ob__.dep.depend();
3306
              return source;
3307
          };
3308
          deep = true;
3309
      }
3310
      else if (isArray(source)) {
3311
          isMultiSource = true;
3312
          forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });
3313
          getter = function () {
3314
              return source.map(function (s) {
3315
                  if (isRef(s)) {
3316
                      return s.value;
3317
                  }
3318
                  else if (isReactive(s)) {
3319
                      return traverse(s);
3320
                  }
3321
                  else if (isFunction(s)) {
3322
                      return call(s, WATCHER_GETTER);
3323
                  }
3324
                  else {
3325
                      warnInvalidSource(s);
3326
                  }
3327
              });
3328
          };
3329
      }
3330
      else if (isFunction(source)) {
3331
          if (cb) {
3332
              // getter with cb
3333
              getter = function () { return call(source, WATCHER_GETTER); };
3334
          }
3335
          else {
3336
              // no cb -> simple effect
3337
              getter = function () {
3338
                  if (instance && instance._isDestroyed) {
3339
                      return;
3340
                  }
3341
                  if (cleanup) {
3342
                      cleanup();
3343
                  }
3344
                  return call(source, WATCHER, [onCleanup]);
3345
              };
3346
          }
3347
      }
3348
      else {
3349
          getter = noop;
3350
          warnInvalidSource(source);
3351
      }
3352
      if (cb && deep) {
3353
          var baseGetter_1 = getter;
3354
          getter = function () { return traverse(baseGetter_1()); };
3355
      }
3356
      var cleanup;
3357
      var onCleanup = function (fn) {
3358
          cleanup = watcher.onStop = function () {
3359
              call(fn, WATCHER_CLEANUP);
3360
          };
3361
      };
3362
      // in SSR there is no need to setup an actual effect, and it should be noop
3363
      // unless it's eager
3364
      if (isServerRendering()) {
3365
          // we will also not call the invalidate callback (+ runner is not set up)
3366
          onCleanup = noop;
3367
          if (!cb) {
3368
              getter();
3369
          }
3370
          else if (immediate) {
3371
              call(cb, WATCHER_CB, [
3372
                  getter(),
3373
                  isMultiSource ? [] : undefined,
3374
                  onCleanup
3375
              ]);
3376
          }
3377
          return noop;
3378
      }
3379
      var watcher = new Watcher(currentInstance, getter, noop, {
3380
          lazy: true
3381
      });
3382
      watcher.noRecurse = !cb;
3383
      var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
3384
      // overwrite default run
3385
      watcher.run = function () {
3386
          if (!watcher.active &&
3387
              !(flush === 'pre' && instance && instance._isBeingDestroyed)) {
3388
              return;
3389
          }
3390
          if (cb) {
3391
              // watch(source, cb)
3392
              var newValue = watcher.get();
3393
              if (deep ||
3394
                  forceTrigger ||
3395
                  (isMultiSource
3396
                      ? newValue.some(function (v, i) {
3397
                          return hasChanged(v, oldValue[i]);
3398
                      })
3399
                      : hasChanged(newValue, oldValue))) {
3400
                  // cleanup before running cb again
3401
                  if (cleanup) {
3402
                      cleanup();
3403
                  }
3404
                  call(cb, WATCHER_CB, [
3405
                      newValue,
3406
                      // pass undefined as the old value when it's changed for the first time
3407
                      oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
3408
                      onCleanup
3409
                  ]);
3410
                  oldValue = newValue;
3411
              }
3412
          }
3413
          else {
3414
              // watchEffect
3415
              watcher.get();
3416
          }
3417
      };
3418
      if (flush === 'sync') {
3419
          watcher.update = watcher.run;
3420
      }
3421
      else if (flush === 'post') {
3422
          watcher.post = true;
3423
          watcher.update = function () { return queueWatcher(watcher); };
3424
      }
3425
      else {
3426
          // pre
3427
          watcher.update = function () {
3428
              if (instance && instance === currentInstance && !instance._isMounted) {
3429
                  // pre-watcher triggered before
3430
                  var buffer = instance._preWatchers || (instance._preWatchers = []);
3431
                  if (buffer.indexOf(watcher) < 0)
3432
                      buffer.push(watcher);
3433
              }
3434
              else {
3435
                  queueWatcher(watcher);
3436
              }
3437
          };
3438
      }
3439
      {
3440
          watcher.onTrack = onTrack;
3441
          watcher.onTrigger = onTrigger;
3442
      }
3443
      // initial run
3444
      if (cb) {
3445
          if (immediate) {
3446
              watcher.run();
3447
          }
3448
          else {
3449
              oldValue = watcher.get();
3450
          }
3451
      }
3452
      else if (flush === 'post' && instance) {
3453
          instance.$once('hook:mounted', function () { return watcher.get(); });
3454
      }
3455
      else {
3456
          watcher.get();
3457
      }
3458
      return function () {
3459
          watcher.teardown();
3460
      };
3461
  }
3462

3463
  var activeEffectScope;
3464
  var EffectScope = /** @class */ (function () {
3465
      function EffectScope(detached) {
3466
          if (detached === void 0) { detached = false; }
3467
          /**
3468
           * @internal
3469
           */
3470
          this.active = true;
3471
          /**
3472
           * @internal
3473
           */
3474
          this.effects = [];
3475
          /**
3476
           * @internal
3477
           */
3478
          this.cleanups = [];
3479
          if (!detached && activeEffectScope) {
3480
              this.parent = activeEffectScope;
3481
              this.index =
3482
                  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
3483
          }
3484
      }
3485
      EffectScope.prototype.run = function (fn) {
3486
          if (this.active) {
3487
              var currentEffectScope = activeEffectScope;
3488
              try {
3489
                  activeEffectScope = this;
3490
                  return fn();
3491
              }
3492
              finally {
3493
                  activeEffectScope = currentEffectScope;
3494
              }
3495
          }
3496
          else {
3497
              warn$2("cannot run an inactive effect scope.");
3498
          }
3499
      };
3500
      /**
3501
       * This should only be called on non-detached scopes
3502
       * @internal
3503
       */
3504
      EffectScope.prototype.on = function () {
3505
          activeEffectScope = this;
3506
      };
3507
      /**
3508
       * This should only be called on non-detached scopes
3509
       * @internal
3510
       */
3511
      EffectScope.prototype.off = function () {
3512
          activeEffectScope = this.parent;
3513
      };
3514
      EffectScope.prototype.stop = function (fromParent) {
3515
          if (this.active) {
3516
              var i = void 0, l = void 0;
3517
              for (i = 0, l = this.effects.length; i < l; i++) {
3518
                  this.effects[i].teardown();
3519
              }
3520
              for (i = 0, l = this.cleanups.length; i < l; i++) {
3521
                  this.cleanups[i]();
3522
              }
3523
              if (this.scopes) {
3524
                  for (i = 0, l = this.scopes.length; i < l; i++) {
3525
                      this.scopes[i].stop(true);
3526
                  }
3527
              }
3528
              // nested scope, dereference from parent to avoid memory leaks
3529
              if (this.parent && !fromParent) {
3530
                  // optimized O(1) removal
3531
                  var last = this.parent.scopes.pop();
3532
                  if (last && last !== this) {
3533
                      this.parent.scopes[this.index] = last;
3534
                      last.index = this.index;
3535
                  }
3536
              }
3537
              this.active = false;
3538
          }
3539
      };
3540
      return EffectScope;
3541
  }());
3542
  function effectScope(detached) {
3543
      return new EffectScope(detached);
3544
  }
3545
  /**
3546
   * @internal
3547
   */
3548
  function recordEffectScope(effect, scope) {
3549
      if (scope === void 0) { scope = activeEffectScope; }
3550
      if (scope && scope.active) {
3551
          scope.effects.push(effect);
3552
      }
3553
  }
3554
  function getCurrentScope() {
3555
      return activeEffectScope;
3556
  }
3557
  function onScopeDispose(fn) {
3558
      if (activeEffectScope) {
3559
          activeEffectScope.cleanups.push(fn);
3560
      }
3561
      else {
3562
          warn$2("onScopeDispose() is called when there is no active effect scope" +
3563
              " to be associated with.");
3564
      }
3565
  }
3566

3567
  function provide(key, value) {
3568
      if (!currentInstance) {
3569
          {
3570
              warn$2("provide() can only be used inside setup().");
3571
          }
3572
      }
3573
      else {
3574
          // TS doesn't allow symbol as index type
3575
          resolveProvided(currentInstance)[key] = value;
3576
      }
3577
  }
3578
  function resolveProvided(vm) {
3579
      // by default an instance inherits its parent's provides object
3580
      // but when it needs to provide values of its own, it creates its
3581
      // own provides object using parent provides object as prototype.
3582
      // this way in `inject` we can simply look up injections from direct
3583
      // parent and let the prototype chain do the work.
3584
      var existing = vm._provided;
3585
      var parentProvides = vm.$parent && vm.$parent._provided;
3586
      if (parentProvides === existing) {
3587
          return (vm._provided = Object.create(parentProvides));
3588
      }
3589
      else {
3590
          return existing;
3591
      }
3592
  }
3593
  function inject(key, defaultValue, treatDefaultAsFactory) {
3594
      if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }
3595
      // fallback to `currentRenderingInstance` so that this can be called in
3596
      // a functional component
3597
      var instance = currentInstance;
3598
      if (instance) {
3599
          // #2400
3600
          // to support `app.use` plugins,
3601
          // fallback to appContext's `provides` if the instance is at root
3602
          var provides = instance.$parent && instance.$parent._provided;
3603
          if (provides && key in provides) {
3604
              // TS doesn't allow symbol as index type
3605
              return provides[key];
3606
          }
3607
          else if (arguments.length > 1) {
3608
              return treatDefaultAsFactory && isFunction(defaultValue)
3609
                  ? defaultValue.call(instance)
3610
                  : defaultValue;
3611
          }
3612
          else {
3613
              warn$2("injection \"".concat(String(key), "\" not found."));
3614
          }
3615
      }
3616
      else {
3617
          warn$2("inject() can only be used inside setup() or functional components.");
3618
      }
3619
  }
3620

3621
  /**
3622
   * @internal this function needs manual public type declaration because it relies
3623
   * on previously manually authored types from Vue 2
3624
   */
3625
  function h(type, props, children) {
3626
      if (!currentInstance) {
3627
          warn$2("globally imported h() can only be invoked when there is an active " +
3628
                  "component instance, e.g. synchronously in a component's render or setup function.");
3629
      }
3630
      return createElement$1(currentInstance, type, props, children, 2, true);
3631
  }
3632

3633
  function handleError(err, vm, info) {
3634
      // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
3635
      // See: https://github.com/vuejs/vuex/issues/1505
3636
      pushTarget();
3637
      try {
3638
          if (vm) {
3639
              var cur = vm;
3640
              while ((cur = cur.$parent)) {
3641
                  var hooks = cur.$options.errorCaptured;
3642
                  if (hooks) {
3643
                      for (var i = 0; i < hooks.length; i++) {
3644
                          try {
3645
                              var capture = hooks[i].call(cur, err, vm, info) === false;
3646
                              if (capture)
3647
                                  return;
3648
                          }
3649
                          catch (e) {
3650
                              globalHandleError(e, cur, 'errorCaptured hook');
3651
                          }
3652
                      }
3653
                  }
3654
              }
3655
          }
3656
          globalHandleError(err, vm, info);
3657
      }
3658
      finally {
3659
          popTarget();
3660
      }
3661
  }
3662
  function invokeWithErrorHandling(handler, context, args, vm, info) {
3663
      var res;
3664
      try {
3665
          res = args ? handler.apply(context, args) : handler.call(context);
3666
          if (res && !res._isVue && isPromise(res) && !res._handled) {
3667
              res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
3668
              res._handled = true;
3669
          }
3670
      }
3671
      catch (e) {
3672
          handleError(e, vm, info);
3673
      }
3674
      return res;
3675
  }
3676
  function globalHandleError(err, vm, info) {
3677
      if (config.errorHandler) {
3678
          try {
3679
              return config.errorHandler.call(null, err, vm, info);
3680
          }
3681
          catch (e) {
3682
              // if the user intentionally throws the original error in the handler,
3683
              // do not log it twice
3684
              if (e !== err) {
3685
                  logError(e, null, 'config.errorHandler');
3686
              }
3687
          }
3688
      }
3689
      logError(err, vm, info);
3690
  }
3691
  function logError(err, vm, info) {
3692
      {
3693
          warn$2("Error in ".concat(info, ": \"").concat(err.toString(), "\""), vm);
3694
      }
3695
      /* istanbul ignore else */
3696
      if (inBrowser && typeof console !== 'undefined') {
3697
          console.error(err);
3698
      }
3699
      else {
3700
          throw err;
3701
      }
3702
  }
3703

3704
  /* globals MutationObserver */
3705
  var isUsingMicroTask = false;
3706
  var callbacks = [];
3707
  var pending = false;
3708
  function flushCallbacks() {
3709
      pending = false;
3710
      var copies = callbacks.slice(0);
3711
      callbacks.length = 0;
3712
      for (var i = 0; i < copies.length; i++) {
3713
          copies[i]();
3714
      }
3715
  }
3716
  // Here we have async deferring wrappers using microtasks.
3717
  // In 2.5 we used (macro) tasks (in combination with microtasks).
3718
  // However, it has subtle problems when state is changed right before repaint
3719
  // (e.g. #6813, out-in transitions).
3720
  // Also, using (macro) tasks in event handler would cause some weird behaviors
3721
  // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
3722
  // So we now use microtasks everywhere, again.
3723
  // A major drawback of this tradeoff is that there are some scenarios
3724
  // where microtasks have too high a priority and fire in between supposedly
3725
  // sequential events (e.g. #4521, #6690, which have workarounds)
3726
  // or even between bubbling of the same event (#6566).
3727
  var timerFunc;
3728
  // The nextTick behavior leverages the microtask queue, which can be accessed
3729
  // via either native Promise.then or MutationObserver.
3730
  // MutationObserver has wider support, however it is seriously bugged in
3731
  // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
3732
  // completely stops working after triggering a few times... so, if native
3733
  // Promise is available, we will use it:
3734
  /* istanbul ignore next, $flow-disable-line */
3735
  if (typeof Promise !== 'undefined' && isNative(Promise)) {
3736
      var p_1 = Promise.resolve();
3737
      timerFunc = function () {
3738
          p_1.then(flushCallbacks);
3739
          // In problematic UIWebViews, Promise.then doesn't completely break, but
3740
          // it can get stuck in a weird state where callbacks are pushed into the
3741
          // microtask queue but the queue isn't being flushed, until the browser
3742
          // needs to do some other work, e.g. handle a timer. Therefore we can
3743
          // "force" the microtask queue to be flushed by adding an empty timer.
3744
          if (isIOS)
3745
              setTimeout(noop);
3746
      };
3747
      isUsingMicroTask = true;
3748
  }
3749
  else if (!isIE &&
3750
      typeof MutationObserver !== 'undefined' &&
3751
      (isNative(MutationObserver) ||
3752
          // PhantomJS and iOS 7.x
3753
          MutationObserver.toString() === '[object MutationObserverConstructor]')) {
3754
      // Use MutationObserver where native Promise is not available,
3755
      // e.g. PhantomJS, iOS7, Android 4.4
3756
      // (#6466 MutationObserver is unreliable in IE11)
3757
      var counter_1 = 1;
3758
      var observer = new MutationObserver(flushCallbacks);
3759
      var textNode_1 = document.createTextNode(String(counter_1));
3760
      observer.observe(textNode_1, {
3761
          characterData: true
3762
      });
3763
      timerFunc = function () {
3764
          counter_1 = (counter_1 + 1) % 2;
3765
          textNode_1.data = String(counter_1);
3766
      };
3767
      isUsingMicroTask = true;
3768
  }
3769
  else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
3770
      // Fallback to setImmediate.
3771
      // Technically it leverages the (macro) task queue,
3772
      // but it is still a better choice than setTimeout.
3773
      timerFunc = function () {
3774
          setImmediate(flushCallbacks);
3775
      };
3776
  }
3777
  else {
3778
      // Fallback to setTimeout.
3779
      timerFunc = function () {
3780
          setTimeout(flushCallbacks, 0);
3781
      };
3782
  }
3783
  /**
3784
   * @internal
3785
   */
3786
  function nextTick(cb, ctx) {
3787
      var _resolve;
3788
      callbacks.push(function () {
3789
          if (cb) {
3790
              try {
3791
                  cb.call(ctx);
3792
              }
3793
              catch (e) {
3794
                  handleError(e, ctx, 'nextTick');
3795
              }
3796
          }
3797
          else if (_resolve) {
3798
              _resolve(ctx);
3799
          }
3800
      });
3801
      if (!pending) {
3802
          pending = true;
3803
          timerFunc();
3804
      }
3805
      // $flow-disable-line
3806
      if (!cb && typeof Promise !== 'undefined') {
3807
          return new Promise(function (resolve) {
3808
              _resolve = resolve;
3809
          });
3810
      }
3811
  }
3812

3813
  function useCssModule(name) {
3814
      /* istanbul ignore else */
3815
      {
3816
          {
3817
              warn$2("useCssModule() is not supported in the global build.");
3818
          }
3819
          return emptyObject;
3820
      }
3821
  }
3822

3823
  /**
3824
   * Runtime helper for SFC's CSS variable injection feature.
3825
   * @private
3826
   */
3827
  function useCssVars(getter) {
3828
      if (!inBrowser && !false)
3829
          return;
3830
      var instance = currentInstance;
3831
      if (!instance) {
3832
          warn$2("useCssVars is called without current active component instance.");
3833
          return;
3834
      }
3835
      watchPostEffect(function () {
3836
          var el = instance.$el;
3837
          var vars = getter(instance, instance._setupProxy);
3838
          if (el && el.nodeType === 1) {
3839
              var style = el.style;
3840
              for (var key in vars) {
3841
                  style.setProperty("--".concat(key), vars[key]);
3842
              }
3843
          }
3844
      });
3845
  }
3846

3847
  /**
3848
   * v3-compatible async component API.
3849
   * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts
3850
   * because it relies on existing manual types
3851
   */
3852
  function defineAsyncComponent(source) {
3853
      if (isFunction(source)) {
3854
          source = { loader: source };
3855
      }
3856
      var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out
3857
      _b = source.suspensible, // undefined = never times out
3858
      suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true
3859
      userOnError = source.onError;
3860
      if (suspensible) {
3861
          warn$2("The suspensiblbe option for async components is not supported in Vue2. It is ignored.");
3862
      }
3863
      var pendingRequest = null;
3864
      var retries = 0;
3865
      var retry = function () {
3866
          retries++;
3867
          pendingRequest = null;
3868
          return load();
3869
      };
3870
      var load = function () {
3871
          var thisRequest;
3872
          return (pendingRequest ||
3873
              (thisRequest = pendingRequest =
3874
                  loader()
3875
                      .catch(function (err) {
3876
                      err = err instanceof Error ? err : new Error(String(err));
3877
                      if (userOnError) {
3878
                          return new Promise(function (resolve, reject) {
3879
                              var userRetry = function () { return resolve(retry()); };
3880
                              var userFail = function () { return reject(err); };
3881
                              userOnError(err, userRetry, userFail, retries + 1);
3882
                          });
3883
                      }
3884
                      else {
3885
                          throw err;
3886
                      }
3887
                  })
3888
                      .then(function (comp) {
3889
                      if (thisRequest !== pendingRequest && pendingRequest) {
3890
                          return pendingRequest;
3891
                      }
3892
                      if (!comp) {
3893
                          warn$2("Async component loader resolved to undefined. " +
3894
                              "If you are using retry(), make sure to return its return value.");
3895
                      }
3896
                      // interop module default
3897
                      if (comp &&
3898
                          (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {
3899
                          comp = comp.default;
3900
                      }
3901
                      if (comp && !isObject(comp) && !isFunction(comp)) {
3902
                          throw new Error("Invalid async component load result: ".concat(comp));
3903
                      }
3904
                      return comp;
3905
                  })));
3906
      };
3907
      return function () {
3908
          var component = load();
3909
          return {
3910
              component: component,
3911
              delay: delay,
3912
              timeout: timeout,
3913
              error: errorComponent,
3914
              loading: loadingComponent
3915
          };
3916
      };
3917
  }
3918

3919
  function createLifeCycle(hookName) {
3920
      return function (fn, target) {
3921
          if (target === void 0) { target = currentInstance; }
3922
          if (!target) {
3923
              warn$2("".concat(formatName(hookName), " is called when there is no active component instance to be ") +
3924
                      "associated with. " +
3925
                      "Lifecycle injection APIs can only be used during execution of setup().");
3926
              return;
3927
          }
3928
          return injectHook(target, hookName, fn);
3929
      };
3930
  }
3931
  function formatName(name) {
3932
      if (name === 'beforeDestroy') {
3933
          name = 'beforeUnmount';
3934
      }
3935
      else if (name === 'destroyed') {
3936
          name = 'unmounted';
3937
      }
3938
      return "on".concat(name[0].toUpperCase() + name.slice(1));
3939
  }
3940
  function injectHook(instance, hookName, fn) {
3941
      var options = instance.$options;
3942
      options[hookName] = mergeLifecycleHook(options[hookName], fn);
3943
  }
3944
  var onBeforeMount = createLifeCycle('beforeMount');
3945
  var onMounted = createLifeCycle('mounted');
3946
  var onBeforeUpdate = createLifeCycle('beforeUpdate');
3947
  var onUpdated = createLifeCycle('updated');
3948
  var onBeforeUnmount = createLifeCycle('beforeDestroy');
3949
  var onUnmounted = createLifeCycle('destroyed');
3950
  var onErrorCaptured = createLifeCycle('errorCaptured');
3951
  var onActivated = createLifeCycle('activated');
3952
  var onDeactivated = createLifeCycle('deactivated');
3953
  var onServerPrefetch = createLifeCycle('serverPrefetch');
3954
  var onRenderTracked = createLifeCycle('renderTracked');
3955
  var onRenderTriggered = createLifeCycle('renderTriggered');
3956

3957
  /**
3958
   * Note: also update dist/vue.runtime.mjs when adding new exports to this file.
3959
   */
3960
  var version = '2.7.8';
3961
  /**
3962
   * @internal type is manually declared in <root>/types/v3-define-component.d.ts
3963
   */
3964
  function defineComponent(options) {
3965
      return options;
3966
  }
3967

3968
  var vca = /*#__PURE__*/Object.freeze({
3969
    __proto__: null,
3970
    version: version,
3971
    defineComponent: defineComponent,
3972
    ref: ref$1,
3973
    shallowRef: shallowRef,
3974
    isRef: isRef,
3975
    toRef: toRef,
3976
    toRefs: toRefs,
3977
    unref: unref,
3978
    proxyRefs: proxyRefs,
3979
    customRef: customRef,
3980
    triggerRef: triggerRef,
3981
    reactive: reactive,
3982
    isReactive: isReactive,
3983
    isReadonly: isReadonly,
3984
    isShallow: isShallow,
3985
    isProxy: isProxy,
3986
    shallowReactive: shallowReactive,
3987
    markRaw: markRaw,
3988
    toRaw: toRaw,
3989
    readonly: readonly,
3990
    shallowReadonly: shallowReadonly,
3991
    computed: computed,
3992
    watch: watch,
3993
    watchEffect: watchEffect,
3994
    watchPostEffect: watchPostEffect,
3995
    watchSyncEffect: watchSyncEffect,
3996
    EffectScope: EffectScope,
3997
    effectScope: effectScope,
3998
    onScopeDispose: onScopeDispose,
3999
    getCurrentScope: getCurrentScope,
4000
    provide: provide,
4001
    inject: inject,
4002
    h: h,
4003
    getCurrentInstance: getCurrentInstance,
4004
    useSlots: useSlots,
4005
    useAttrs: useAttrs,
4006
    useListeners: useListeners,
4007
    mergeDefaults: mergeDefaults,
4008
    nextTick: nextTick,
4009
    set: set,
4010
    del: del,
4011
    useCssModule: useCssModule,
4012
    useCssVars: useCssVars,
4013
    defineAsyncComponent: defineAsyncComponent,
4014
    onBeforeMount: onBeforeMount,
4015
    onMounted: onMounted,
4016
    onBeforeUpdate: onBeforeUpdate,
4017
    onUpdated: onUpdated,
4018
    onBeforeUnmount: onBeforeUnmount,
4019
    onUnmounted: onUnmounted,
4020
    onErrorCaptured: onErrorCaptured,
4021
    onActivated: onActivated,
4022
    onDeactivated: onDeactivated,
4023
    onServerPrefetch: onServerPrefetch,
4024
    onRenderTracked: onRenderTracked,
4025
    onRenderTriggered: onRenderTriggered
4026
  });
4027

4028
  var seenObjects = new _Set();
4029
  /**
4030
   * Recursively traverse an object to evoke all converted
4031
   * getters, so that every nested property inside the object
4032
   * is collected as a "deep" dependency.
4033
   */
4034
  function traverse(val) {
4035
      _traverse(val, seenObjects);
4036
      seenObjects.clear();
4037
      return val;
4038
  }
4039
  function _traverse(val, seen) {
4040
      var i, keys;
4041
      var isA = isArray(val);
4042
      if ((!isA && !isObject(val)) ||
4043
          Object.isFrozen(val) ||
4044
          val instanceof VNode) {
4045
          return;
4046
      }
4047
      if (val.__ob__) {
4048
          var depId = val.__ob__.dep.id;
4049
          if (seen.has(depId)) {
4050
              return;
4051
          }
4052
          seen.add(depId);
4053
      }
4054
      if (isA) {
4055
          i = val.length;
4056
          while (i--)
4057
              _traverse(val[i], seen);
4058
      }
4059
      else if (isRef(val)) {
4060
          _traverse(val.value, seen);
4061
      }
4062
      else {
4063
          keys = Object.keys(val);
4064
          i = keys.length;
4065
          while (i--)
4066
              _traverse(val[keys[i]], seen);
4067
      }
4068
  }
4069

4070
  var uid$1 = 0;
4071
  /**
4072
   * A watcher parses an expression, collects dependencies,
4073
   * and fires callback when the expression value changes.
4074
   * This is used for both the $watch() api and directives.
4075
   * @internal
4076
   */
4077
  var Watcher = /** @class */ (function () {
4078
      function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {
4079
          recordEffectScope(this, activeEffectScope || (vm ? vm._scope : undefined));
4080
          if ((this.vm = vm)) {
4081
              if (isRenderWatcher) {
4082
                  vm._watcher = this;
4083
              }
4084
          }
4085
          // options
4086
          if (options) {
4087
              this.deep = !!options.deep;
4088
              this.user = !!options.user;
4089
              this.lazy = !!options.lazy;
4090
              this.sync = !!options.sync;
4091
              this.before = options.before;
4092
              {
4093
                  this.onTrack = options.onTrack;
4094
                  this.onTrigger = options.onTrigger;
4095
              }
4096
          }
4097
          else {
4098
              this.deep = this.user = this.lazy = this.sync = false;
4099
          }
4100
          this.cb = cb;
4101
          this.id = ++uid$1; // uid for batching
4102
          this.active = true;
4103
          this.post = false;
4104
          this.dirty = this.lazy; // for lazy watchers
4105
          this.deps = [];
4106
          this.newDeps = [];
4107
          this.depIds = new _Set();
4108
          this.newDepIds = new _Set();
4109
          this.expression = expOrFn.toString() ;
4110
          // parse expression for getter
4111
          if (isFunction(expOrFn)) {
4112
              this.getter = expOrFn;
4113
          }
4114
          else {
4115
              this.getter = parsePath(expOrFn);
4116
              if (!this.getter) {
4117
                  this.getter = noop;
4118
                  warn$2("Failed watching path: \"".concat(expOrFn, "\" ") +
4119
                          'Watcher only accepts simple dot-delimited paths. ' +
4120
                          'For full control, use a function instead.', vm);
4121
              }
4122
          }
4123
          this.value = this.lazy ? undefined : this.get();
4124
      }
4125
      /**
4126
       * Evaluate the getter, and re-collect dependencies.
4127
       */
4128
      Watcher.prototype.get = function () {
4129
          pushTarget(this);
4130
          var value;
4131
          var vm = this.vm;
4132
          try {
4133
              value = this.getter.call(vm, vm);
4134
          }
4135
          catch (e) {
4136
              if (this.user) {
4137
                  handleError(e, vm, "getter for watcher \"".concat(this.expression, "\""));
4138
              }
4139
              else {
4140
                  throw e;
4141
              }
4142
          }
4143
          finally {
4144
              // "touch" every property so they are all tracked as
4145
              // dependencies for deep watching
4146
              if (this.deep) {
4147
                  traverse(value);
4148
              }
4149
              popTarget();
4150
              this.cleanupDeps();
4151
          }
4152
          return value;
4153
      };
4154
      /**
4155
       * Add a dependency to this directive.
4156
       */
4157
      Watcher.prototype.addDep = function (dep) {
4158
          var id = dep.id;
4159
          if (!this.newDepIds.has(id)) {
4160
              this.newDepIds.add(id);
4161
              this.newDeps.push(dep);
4162
              if (!this.depIds.has(id)) {
4163
                  dep.addSub(this);
4164
              }
4165
          }
4166
      };
4167
      /**
4168
       * Clean up for dependency collection.
4169
       */
4170
      Watcher.prototype.cleanupDeps = function () {
4171
          var i = this.deps.length;
4172
          while (i--) {
4173
              var dep = this.deps[i];
4174
              if (!this.newDepIds.has(dep.id)) {
4175
                  dep.removeSub(this);
4176
              }
4177
          }
4178
          var tmp = this.depIds;
4179
          this.depIds = this.newDepIds;
4180
          this.newDepIds = tmp;
4181
          this.newDepIds.clear();
4182
          tmp = this.deps;
4183
          this.deps = this.newDeps;
4184
          this.newDeps = tmp;
4185
          this.newDeps.length = 0;
4186
      };
4187
      /**
4188
       * Subscriber interface.
4189
       * Will be called when a dependency changes.
4190
       */
4191
      Watcher.prototype.update = function () {
4192
          /* istanbul ignore else */
4193
          if (this.lazy) {
4194
              this.dirty = true;
4195
          }
4196
          else if (this.sync) {
4197
              this.run();
4198
          }
4199
          else {
4200
              queueWatcher(this);
4201
          }
4202
      };
4203
      /**
4204
       * Scheduler job interface.
4205
       * Will be called by the scheduler.
4206
       */
4207
      Watcher.prototype.run = function () {
4208
          if (this.active) {
4209
              var value = this.get();
4210
              if (value !== this.value ||
4211
                  // Deep watchers and watchers on Object/Arrays should fire even
4212
                  // when the value is the same, because the value may
4213
                  // have mutated.
4214
                  isObject(value) ||
4215
                  this.deep) {
4216
                  // set new value
4217
                  var oldValue = this.value;
4218
                  this.value = value;
4219
                  if (this.user) {
4220
                      var info = "callback for watcher \"".concat(this.expression, "\"");
4221
                      invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
4222
                  }
4223
                  else {
4224
                      this.cb.call(this.vm, value, oldValue);
4225
                  }
4226
              }
4227
          }
4228
      };
4229
      /**
4230
       * Evaluate the value of the watcher.
4231
       * This only gets called for lazy watchers.
4232
       */
4233
      Watcher.prototype.evaluate = function () {
4234
          this.value = this.get();
4235
          this.dirty = false;
4236
      };
4237
      /**
4238
       * Depend on all deps collected by this watcher.
4239
       */
4240
      Watcher.prototype.depend = function () {
4241
          var i = this.deps.length;
4242
          while (i--) {
4243
              this.deps[i].depend();
4244
          }
4245
      };
4246
      /**
4247
       * Remove self from all dependencies' subscriber list.
4248
       */
4249
      Watcher.prototype.teardown = function () {
4250
          if (this.vm && !this.vm._isBeingDestroyed) {
4251
              remove$2(this.vm._scope.effects, this);
4252
          }
4253
          if (this.active) {
4254
              var i = this.deps.length;
4255
              while (i--) {
4256
                  this.deps[i].removeSub(this);
4257
              }
4258
              this.active = false;
4259
              if (this.onStop) {
4260
                  this.onStop();
4261
              }
4262
          }
4263
      };
4264
      return Watcher;
4265
  }());
4266

4267
  var sharedPropertyDefinition = {
4268
      enumerable: true,
4269
      configurable: true,
4270
      get: noop,
4271
      set: noop
4272
  };
4273
  function proxy(target, sourceKey, key) {
4274
      sharedPropertyDefinition.get = function proxyGetter() {
4275
          return this[sourceKey][key];
4276
      };
4277
      sharedPropertyDefinition.set = function proxySetter(val) {
4278
          this[sourceKey][key] = val;
4279
      };
4280
      Object.defineProperty(target, key, sharedPropertyDefinition);
4281
  }
4282
  function initState(vm) {
4283
      var opts = vm.$options;
4284
      if (opts.props)
4285
          initProps$1(vm, opts.props);
4286
      // Composition API
4287
      initSetup(vm);
4288
      if (opts.methods)
4289
          initMethods(vm, opts.methods);
4290
      if (opts.data) {
4291
          initData(vm);
4292
      }
4293
      else {
4294
          var ob = observe((vm._data = {}));
4295
          ob && ob.vmCount++;
4296
      }
4297
      if (opts.computed)
4298
          initComputed$1(vm, opts.computed);
4299
      if (opts.watch && opts.watch !== nativeWatch) {
4300
          initWatch(vm, opts.watch);
4301
      }
4302
  }
4303
  function initProps$1(vm, propsOptions) {
4304
      var propsData = vm.$options.propsData || {};
4305
      var props = (vm._props = shallowReactive({}));
4306
      // cache prop keys so that future props updates can iterate using Array
4307
      // instead of dynamic object key enumeration.
4308
      var keys = (vm.$options._propKeys = []);
4309
      var isRoot = !vm.$parent;
4310
      // root instance props should be converted
4311
      if (!isRoot) {
4312
          toggleObserving(false);
4313
      }
4314
      var _loop_1 = function (key) {
4315
          keys.push(key);
4316
          var value = validateProp(key, propsOptions, propsData, vm);
4317
          /* istanbul ignore else */
4318
          {
4319
              var hyphenatedKey = hyphenate(key);
4320
              if (isReservedAttribute(hyphenatedKey) ||
4321
                  config.isReservedAttr(hyphenatedKey)) {
4322
                  warn$2("\"".concat(hyphenatedKey, "\" is a reserved attribute and cannot be used as component prop."), vm);
4323
              }
4324
              defineReactive(props, key, value, function () {
4325
                  if (!isRoot && !isUpdatingChildComponent) {
4326
                      warn$2("Avoid mutating a prop directly since the value will be " +
4327
                          "overwritten whenever the parent component re-renders. " +
4328
                          "Instead, use a data or computed property based on the prop's " +
4329
                          "value. Prop being mutated: \"".concat(key, "\""), vm);
4330
                  }
4331
              });
4332
          }
4333
          // static props are already proxied on the component's prototype
4334
          // during Vue.extend(). We only need to proxy props defined at
4335
          // instantiation here.
4336
          if (!(key in vm)) {
4337
              proxy(vm, "_props", key);
4338
          }
4339
      };
4340
      for (var key in propsOptions) {
4341
          _loop_1(key);
4342
      }
4343
      toggleObserving(true);
4344
  }
4345
  function initData(vm) {
4346
      var data = vm.$options.data;
4347
      data = vm._data = isFunction(data) ? getData(data, vm) : data || {};
4348
      if (!isPlainObject(data)) {
4349
          data = {};
4350
          warn$2('data functions should return an object:\n' +
4351
                  'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);
4352
      }
4353
      // proxy data on instance
4354
      var keys = Object.keys(data);
4355
      var props = vm.$options.props;
4356
      var methods = vm.$options.methods;
4357
      var i = keys.length;
4358
      while (i--) {
4359
          var key = keys[i];
4360
          {
4361
              if (methods && hasOwn(methods, key)) {
4362
                  warn$2("Method \"".concat(key, "\" has already been defined as a data property."), vm);
4363
              }
4364
          }
4365
          if (props && hasOwn(props, key)) {
4366
              warn$2("The data property \"".concat(key, "\" is already declared as a prop. ") +
4367
                      "Use prop default value instead.", vm);
4368
          }
4369
          else if (!isReserved(key)) {
4370
              proxy(vm, "_data", key);
4371
          }
4372
      }
4373
      // observe data
4374
      var ob = observe(data);
4375
      ob && ob.vmCount++;
4376
  }
4377
  function getData(data, vm) {
4378
      // #7573 disable dep collection when invoking data getters
4379
      pushTarget();
4380
      try {
4381
          return data.call(vm, vm);
4382
      }
4383
      catch (e) {
4384
          handleError(e, vm, "data()");
4385
          return {};
4386
      }
4387
      finally {
4388
          popTarget();
4389
      }
4390
  }
4391
  var computedWatcherOptions = { lazy: true };
4392
  function initComputed$1(vm, computed) {
4393
      // $flow-disable-line
4394
      var watchers = (vm._computedWatchers = Object.create(null));
4395
      // computed properties are just getters during SSR
4396
      var isSSR = isServerRendering();
4397
      for (var key in computed) {
4398
          var userDef = computed[key];
4399
          var getter = isFunction(userDef) ? userDef : userDef.get;
4400
          if (getter == null) {
4401
              warn$2("Getter is missing for computed property \"".concat(key, "\"."), vm);
4402
          }
4403
          if (!isSSR) {
4404
              // create internal watcher for the computed property.
4405
              watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);
4406
          }
4407
          // component-defined computed properties are already defined on the
4408
          // component prototype. We only need to define computed properties defined
4409
          // at instantiation here.
4410
          if (!(key in vm)) {
4411
              defineComputed(vm, key, userDef);
4412
          }
4413
          else {
4414
              if (key in vm.$data) {
4415
                  warn$2("The computed property \"".concat(key, "\" is already defined in data."), vm);
4416
              }
4417
              else if (vm.$options.props && key in vm.$options.props) {
4418
                  warn$2("The computed property \"".concat(key, "\" is already defined as a prop."), vm);
4419
              }
4420
              else if (vm.$options.methods && key in vm.$options.methods) {
4421
                  warn$2("The computed property \"".concat(key, "\" is already defined as a method."), vm);
4422
              }
4423
          }
4424
      }
4425
  }
4426
  function defineComputed(target, key, userDef) {
4427
      var shouldCache = !isServerRendering();
4428
      if (isFunction(userDef)) {
4429
          sharedPropertyDefinition.get = shouldCache
4430
              ? createComputedGetter(key)
4431
              : createGetterInvoker(userDef);
4432
          sharedPropertyDefinition.set = noop;
4433
      }
4434
      else {
4435
          sharedPropertyDefinition.get = userDef.get
4436
              ? shouldCache && userDef.cache !== false
4437
                  ? createComputedGetter(key)
4438
                  : createGetterInvoker(userDef.get)
4439
              : noop;
4440
          sharedPropertyDefinition.set = userDef.set || noop;
4441
      }
4442
      if (sharedPropertyDefinition.set === noop) {
4443
          sharedPropertyDefinition.set = function () {
4444
              warn$2("Computed property \"".concat(key, "\" was assigned to but it has no setter."), this);
4445
          };
4446
      }
4447
      Object.defineProperty(target, key, sharedPropertyDefinition);
4448
  }
4449
  function createComputedGetter(key) {
4450
      return function computedGetter() {
4451
          var watcher = this._computedWatchers && this._computedWatchers[key];
4452
          if (watcher) {
4453
              if (watcher.dirty) {
4454
                  watcher.evaluate();
4455
              }
4456
              if (Dep.target) {
4457
                  if (Dep.target.onTrack) {
4458
                      Dep.target.onTrack({
4459
                          effect: Dep.target,
4460
                          target: this,
4461
                          type: "get" /* TrackOpTypes.GET */,
4462
                          key: key
4463
                      });
4464
                  }
4465
                  watcher.depend();
4466
              }
4467
              return watcher.value;
4468
          }
4469
      };
4470
  }
4471
  function createGetterInvoker(fn) {
4472
      return function computedGetter() {
4473
          return fn.call(this, this);
4474
      };
4475
  }
4476
  function initMethods(vm, methods) {
4477
      var props = vm.$options.props;
4478
      for (var key in methods) {
4479
          {
4480
              if (typeof methods[key] !== 'function') {
4481
                  warn$2("Method \"".concat(key, "\" has type \"").concat(typeof methods[key], "\" in the component definition. ") +
4482
                      "Did you reference the function correctly?", vm);
4483
              }
4484
              if (props && hasOwn(props, key)) {
4485
                  warn$2("Method \"".concat(key, "\" has already been defined as a prop."), vm);
4486
              }
4487
              if (key in vm && isReserved(key)) {
4488
                  warn$2("Method \"".concat(key, "\" conflicts with an existing Vue instance method. ") +
4489
                      "Avoid defining component methods that start with _ or $.");
4490
              }
4491
          }
4492
          vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);
4493
      }
4494
  }
4495
  function initWatch(vm, watch) {
4496
      for (var key in watch) {
4497
          var handler = watch[key];
4498
          if (isArray(handler)) {
4499
              for (var i = 0; i < handler.length; i++) {
4500
                  createWatcher(vm, key, handler[i]);
4501
              }
4502
          }
4503
          else {
4504
              createWatcher(vm, key, handler);
4505
          }
4506
      }
4507
  }
4508
  function createWatcher(vm, expOrFn, handler, options) {
4509
      if (isPlainObject(handler)) {
4510
          options = handler;
4511
          handler = handler.handler;
4512
      }
4513
      if (typeof handler === 'string') {
4514
          handler = vm[handler];
4515
      }
4516
      return vm.$watch(expOrFn, handler, options);
4517
  }
4518
  function stateMixin(Vue) {
4519
      // flow somehow has problems with directly declared definition object
4520
      // when using Object.defineProperty, so we have to procedurally build up
4521
      // the object here.
4522
      var dataDef = {};
4523
      dataDef.get = function () {
4524
          return this._data;
4525
      };
4526
      var propsDef = {};
4527
      propsDef.get = function () {
4528
          return this._props;
4529
      };
4530
      {
4531
          dataDef.set = function () {
4532
              warn$2('Avoid replacing instance root $data. ' +
4533
                  'Use nested data properties instead.', this);
4534
          };
4535
          propsDef.set = function () {
4536
              warn$2("$props is readonly.", this);
4537
          };
4538
      }
4539
      Object.defineProperty(Vue.prototype, '$data', dataDef);
4540
      Object.defineProperty(Vue.prototype, '$props', propsDef);
4541
      Vue.prototype.$set = set;
4542
      Vue.prototype.$delete = del;
4543
      Vue.prototype.$watch = function (expOrFn, cb, options) {
4544
          var vm = this;
4545
          if (isPlainObject(cb)) {
4546
              return createWatcher(vm, expOrFn, cb, options);
4547
          }
4548
          options = options || {};
4549
          options.user = true;
4550
          var watcher = new Watcher(vm, expOrFn, cb, options);
4551
          if (options.immediate) {
4552
              var info = "callback for immediate watcher \"".concat(watcher.expression, "\"");
4553
              pushTarget();
4554
              invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
4555
              popTarget();
4556
          }
4557
          return function unwatchFn() {
4558
              watcher.teardown();
4559
          };
4560
      };
4561
  }
4562

4563
  function initProvide(vm) {
4564
      var provideOption = vm.$options.provide;
4565
      if (provideOption) {
4566
          var provided = isFunction(provideOption)
4567
              ? provideOption.call(vm)
4568
              : provideOption;
4569
          if (!isObject(provided)) {
4570
              return;
4571
          }
4572
          var source = resolveProvided(vm);
4573
          // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to
4574
          // iterate the keys ourselves.
4575
          var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);
4576
          for (var i = 0; i < keys.length; i++) {
4577
              var key = keys[i];
4578
              Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));
4579
          }
4580
      }
4581
  }
4582
  function initInjections(vm) {
4583
      var result = resolveInject(vm.$options.inject, vm);
4584
      if (result) {
4585
          toggleObserving(false);
4586
          Object.keys(result).forEach(function (key) {
4587
              /* istanbul ignore else */
4588
              {
4589
                  defineReactive(vm, key, result[key], function () {
4590
                      warn$2("Avoid mutating an injected value directly since the changes will be " +
4591
                          "overwritten whenever the provided component re-renders. " +
4592
                          "injection being mutated: \"".concat(key, "\""), vm);
4593
                  });
4594
              }
4595
          });
4596
          toggleObserving(true);
4597
      }
4598
  }
4599
  function resolveInject(inject, vm) {
4600
      if (inject) {
4601
          // inject is :any because flow is not smart enough to figure out cached
4602
          var result = Object.create(null);
4603
          var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);
4604
          for (var i = 0; i < keys.length; i++) {
4605
              var key = keys[i];
4606
              // #6574 in case the inject object is observed...
4607
              if (key === '__ob__')
4608
                  continue;
4609
              var provideKey = inject[key].from;
4610
              if (provideKey in vm._provided) {
4611
                  result[key] = vm._provided[provideKey];
4612
              }
4613
              else if ('default' in inject[key]) {
4614
                  var provideDefault = inject[key].default;
4615
                  result[key] = isFunction(provideDefault)
4616
                      ? provideDefault.call(vm)
4617
                      : provideDefault;
4618
              }
4619
              else {
4620
                  warn$2("Injection \"".concat(key, "\" not found"), vm);
4621
              }
4622
          }
4623
          return result;
4624
      }
4625
  }
4626

4627
  var uid = 0;
4628
  function initMixin$1(Vue) {
4629
      Vue.prototype._init = function (options) {
4630
          var vm = this;
4631
          // a uid
4632
          vm._uid = uid++;
4633
          var startTag, endTag;
4634
          /* istanbul ignore if */
4635
          if (config.performance && mark) {
4636
              startTag = "vue-perf-start:".concat(vm._uid);
4637
              endTag = "vue-perf-end:".concat(vm._uid);
4638
              mark(startTag);
4639
          }
4640
          // a flag to mark this as a Vue instance without having to do instanceof
4641
          // check
4642
          vm._isVue = true;
4643
          // avoid instances from being observed
4644
          vm.__v_skip = true;
4645
          // effect scope
4646
          vm._scope = new EffectScope(true /* detached */);
4647
          // merge options
4648
          if (options && options._isComponent) {
4649
              // optimize internal component instantiation
4650
              // since dynamic options merging is pretty slow, and none of the
4651
              // internal component options needs special treatment.
4652
              initInternalComponent(vm, options);
4653
          }
4654
          else {
4655
              vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);
4656
          }
4657
          /* istanbul ignore else */
4658
          {
4659
              initProxy(vm);
4660
          }
4661
          // expose real self
4662
          vm._self = vm;
4663
          initLifecycle(vm);
4664
          initEvents(vm);
4665
          initRender(vm);
4666
          callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);
4667
          initInjections(vm); // resolve injections before data/props
4668
          initState(vm);
4669
          initProvide(vm); // resolve provide after data/props
4670
          callHook$1(vm, 'created');
4671
          /* istanbul ignore if */
4672
          if (config.performance && mark) {
4673
              vm._name = formatComponentName(vm, false);
4674
              mark(endTag);
4675
              measure("vue ".concat(vm._name, " init"), startTag, endTag);
4676
          }
4677
          if (vm.$options.el) {
4678
              vm.$mount(vm.$options.el);
4679
          }
4680
      };
4681
  }
4682
  function initInternalComponent(vm, options) {
4683
      var opts = (vm.$options = Object.create(vm.constructor.options));
4684
      // doing this because it's faster than dynamic enumeration.
4685
      var parentVnode = options._parentVnode;
4686
      opts.parent = options.parent;
4687
      opts._parentVnode = parentVnode;
4688
      var vnodeComponentOptions = parentVnode.componentOptions;
4689
      opts.propsData = vnodeComponentOptions.propsData;
4690
      opts._parentListeners = vnodeComponentOptions.listeners;
4691
      opts._renderChildren = vnodeComponentOptions.children;
4692
      opts._componentTag = vnodeComponentOptions.tag;
4693
      if (options.render) {
4694
          opts.render = options.render;
4695
          opts.staticRenderFns = options.staticRenderFns;
4696
      }
4697
  }
4698
  function resolveConstructorOptions(Ctor) {
4699
      var options = Ctor.options;
4700
      if (Ctor.super) {
4701
          var superOptions = resolveConstructorOptions(Ctor.super);
4702
          var cachedSuperOptions = Ctor.superOptions;
4703
          if (superOptions !== cachedSuperOptions) {
4704
              // super option changed,
4705
              // need to resolve new options.
4706
              Ctor.superOptions = superOptions;
4707
              // check if there are any late-modified/attached options (#4976)
4708
              var modifiedOptions = resolveModifiedOptions(Ctor);
4709
              // update base extend options
4710
              if (modifiedOptions) {
4711
                  extend(Ctor.extendOptions, modifiedOptions);
4712
              }
4713
              options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
4714
              if (options.name) {
4715
                  options.components[options.name] = Ctor;
4716
              }
4717
          }
4718
      }
4719
      return options;
4720
  }
4721
  function resolveModifiedOptions(Ctor) {
4722
      var modified;
4723
      var latest = Ctor.options;
4724
      var sealed = Ctor.sealedOptions;
4725
      for (var key in latest) {
4726
          if (latest[key] !== sealed[key]) {
4727
              if (!modified)
4728
                  modified = {};
4729
              modified[key] = latest[key];
4730
          }
4731
      }
4732
      return modified;
4733
  }
4734

4735
  function FunctionalRenderContext(data, props, children, parent, Ctor) {
4736
      var _this = this;
4737
      var options = Ctor.options;
4738
      // ensure the createElement function in functional components
4739
      // gets a unique context - this is necessary for correct named slot check
4740
      var contextVm;
4741
      if (hasOwn(parent, '_uid')) {
4742
          contextVm = Object.create(parent);
4743
          contextVm._original = parent;
4744
      }
4745
      else {
4746
          // the context vm passed in is a functional context as well.
4747
          // in this case we want to make sure we are able to get a hold to the
4748
          // real context instance.
4749
          contextVm = parent;
4750
          // @ts-ignore
4751
          parent = parent._original;
4752
      }
4753
      var isCompiled = isTrue(options._compiled);
4754
      var needNormalization = !isCompiled;
4755
      this.data = data;
4756
      this.props = props;
4757
      this.children = children;
4758
      this.parent = parent;
4759
      this.listeners = data.on || emptyObject;
4760
      this.injections = resolveInject(options.inject, parent);
4761
      this.slots = function () {
4762
          if (!_this.$slots) {
4763
              normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));
4764
          }
4765
          return _this.$slots;
4766
      };
4767
      Object.defineProperty(this, 'scopedSlots', {
4768
          enumerable: true,
4769
          get: function () {
4770
              return normalizeScopedSlots(parent, data.scopedSlots, this.slots());
4771
          }
4772
      });
4773
      // support for compiled functional template
4774
      if (isCompiled) {
4775
          // exposing $options for renderStatic()
4776
          this.$options = options;
4777
          // pre-resolve slots for renderSlot()
4778
          this.$slots = this.slots();
4779
          this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);
4780
      }
4781
      if (options._scopeId) {
4782
          this._c = function (a, b, c, d) {
4783
              var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);
4784
              if (vnode && !isArray(vnode)) {
4785
                  vnode.fnScopeId = options._scopeId;
4786
                  vnode.fnContext = parent;
4787
              }
4788
              return vnode;
4789
          };
4790
      }
4791
      else {
4792
          this._c = function (a, b, c, d) {
4793
              return createElement$1(contextVm, a, b, c, d, needNormalization);
4794
          };
4795
      }
4796
  }
4797
  installRenderHelpers(FunctionalRenderContext.prototype);
4798
  function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {
4799
      var options = Ctor.options;
4800
      var props = {};
4801
      var propOptions = options.props;
4802
      if (isDef(propOptions)) {
4803
          for (var key in propOptions) {
4804
              props[key] = validateProp(key, propOptions, propsData || emptyObject);
4805
          }
4806
      }
4807
      else {
4808
          if (isDef(data.attrs))
4809
              mergeProps(props, data.attrs);
4810
          if (isDef(data.props))
4811
              mergeProps(props, data.props);
4812
      }
4813
      var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);
4814
      var vnode = options.render.call(null, renderContext._c, renderContext);
4815
      if (vnode instanceof VNode) {
4816
          return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);
4817
      }
4818
      else if (isArray(vnode)) {
4819
          var vnodes = normalizeChildren(vnode) || [];
4820
          var res = new Array(vnodes.length);
4821
          for (var i = 0; i < vnodes.length; i++) {
4822
              res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
4823
          }
4824
          return res;
4825
      }
4826
  }
4827
  function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {
4828
      // #7817 clone node before setting fnContext, otherwise if the node is reused
4829
      // (e.g. it was from a cached normal slot) the fnContext causes named slots
4830
      // that should not be matched to match.
4831
      var clone = cloneVNode(vnode);
4832
      clone.fnContext = contextVm;
4833
      clone.fnOptions = options;
4834
      {
4835
          (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =
4836
              renderContext;
4837
      }
4838
      if (data.slot) {
4839
          (clone.data || (clone.data = {})).slot = data.slot;
4840
      }
4841
      return clone;
4842
  }
4843
  function mergeProps(to, from) {
4844
      for (var key in from) {
4845
          to[camelize(key)] = from[key];
4846
      }
4847
  }
4848

4849
  function getComponentName(options) {
4850
      return options.name || options.__name || options._componentTag;
4851
  }
4852
  // inline hooks to be invoked on component VNodes during patch
4853
  var componentVNodeHooks = {
4854
      init: function (vnode, hydrating) {
4855
          if (vnode.componentInstance &&
4856
              !vnode.componentInstance._isDestroyed &&
4857
              vnode.data.keepAlive) {
4858
              // kept-alive components, treat as a patch
4859
              var mountedNode = vnode; // work around flow
4860
              componentVNodeHooks.prepatch(mountedNode, mountedNode);
4861
          }
4862
          else {
4863
              var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));
4864
              child.$mount(hydrating ? vnode.elm : undefined, hydrating);
4865
          }
4866
      },
4867
      prepatch: function (oldVnode, vnode) {
4868
          var options = vnode.componentOptions;
4869
          var child = (vnode.componentInstance = oldVnode.componentInstance);
4870
          updateChildComponent(child, options.propsData, // updated props
4871
          options.listeners, // updated listeners
4872
          vnode, // new parent vnode
4873
          options.children // new children
4874
          );
4875
      },
4876
      insert: function (vnode) {
4877
          var context = vnode.context, componentInstance = vnode.componentInstance;
4878
          if (!componentInstance._isMounted) {
4879
              componentInstance._isMounted = true;
4880
              callHook$1(componentInstance, 'mounted');
4881
          }
4882
          if (vnode.data.keepAlive) {
4883
              if (context._isMounted) {
4884
                  // vue-router#1212
4885
                  // During updates, a kept-alive component's child components may
4886
                  // change, so directly walking the tree here may call activated hooks
4887
                  // on incorrect children. Instead we push them into a queue which will
4888
                  // be processed after the whole patch process ended.
4889
                  queueActivatedComponent(componentInstance);
4890
              }
4891
              else {
4892
                  activateChildComponent(componentInstance, true /* direct */);
4893
              }
4894
          }
4895
      },
4896
      destroy: function (vnode) {
4897
          var componentInstance = vnode.componentInstance;
4898
          if (!componentInstance._isDestroyed) {
4899
              if (!vnode.data.keepAlive) {
4900
                  componentInstance.$destroy();
4901
              }
4902
              else {
4903
                  deactivateChildComponent(componentInstance, true /* direct */);
4904
              }
4905
          }
4906
      }
4907
  };
4908
  var hooksToMerge = Object.keys(componentVNodeHooks);
4909
  function createComponent(Ctor, data, context, children, tag) {
4910
      if (isUndef(Ctor)) {
4911
          return;
4912
      }
4913
      var baseCtor = context.$options._base;
4914
      // plain options object: turn it into a constructor
4915
      if (isObject(Ctor)) {
4916
          Ctor = baseCtor.extend(Ctor);
4917
      }
4918
      // if at this stage it's not a constructor or an async component factory,
4919
      // reject.
4920
      if (typeof Ctor !== 'function') {
4921
          {
4922
              warn$2("Invalid Component definition: ".concat(String(Ctor)), context);
4923
          }
4924
          return;
4925
      }
4926
      // async component
4927
      var asyncFactory;
4928
      // @ts-expect-error
4929
      if (isUndef(Ctor.cid)) {
4930
          asyncFactory = Ctor;
4931
          Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
4932
          if (Ctor === undefined) {
4933
              // return a placeholder node for async component, which is rendered
4934
              // as a comment node but preserves all the raw information for the node.
4935
              // the information will be used for async server-rendering and hydration.
4936
              return createAsyncPlaceholder(asyncFactory, data, context, children, tag);
4937
          }
4938
      }
4939
      data = data || {};
4940
      // resolve constructor options in case global mixins are applied after
4941
      // component constructor creation
4942
      resolveConstructorOptions(Ctor);
4943
      // transform component v-model data into props & events
4944
      if (isDef(data.model)) {
4945
          // @ts-expect-error
4946
          transformModel(Ctor.options, data);
4947
      }
4948
      // extract props
4949
      // @ts-expect-error
4950
      var propsData = extractPropsFromVNodeData(data, Ctor, tag);
4951
      // functional component
4952
      // @ts-expect-error
4953
      if (isTrue(Ctor.options.functional)) {
4954
          return createFunctionalComponent(Ctor, propsData, data, context, children);
4955
      }
4956
      // extract listeners, since these needs to be treated as
4957
      // child component listeners instead of DOM listeners
4958
      var listeners = data.on;
4959
      // replace with listeners with .native modifier
4960
      // so it gets processed during parent component patch.
4961
      data.on = data.nativeOn;
4962
      // @ts-expect-error
4963
      if (isTrue(Ctor.options.abstract)) {
4964
          // abstract components do not keep anything
4965
          // other than props & listeners & slot
4966
          // work around flow
4967
          var slot = data.slot;
4968
          data = {};
4969
          if (slot) {
4970
              data.slot = slot;
4971
          }
4972
      }
4973
      // install component management hooks onto the placeholder node
4974
      installComponentHooks(data);
4975
      // return a placeholder vnode
4976
      // @ts-expect-error
4977
      var name = getComponentName(Ctor.options) || tag;
4978
      var vnode = new VNode(
4979
      // @ts-expect-error
4980
      "vue-component-".concat(Ctor.cid).concat(name ? "-".concat(name) : ''), data, undefined, undefined, undefined, context, 
4981
      // @ts-expect-error
4982
      { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);
4983
      return vnode;
4984
  }
4985
  function createComponentInstanceForVnode(
4986
  // we know it's MountedComponentVNode but flow doesn't
4987
  vnode, 
4988
  // activeInstance in lifecycle state
4989
  parent) {
4990
      var options = {
4991
          _isComponent: true,
4992
          _parentVnode: vnode,
4993
          parent: parent
4994
      };
4995
      // check inline-template render functions
4996
      var inlineTemplate = vnode.data.inlineTemplate;
4997
      if (isDef(inlineTemplate)) {
4998
          options.render = inlineTemplate.render;
4999
          options.staticRenderFns = inlineTemplate.staticRenderFns;
5000
      }
5001
      return new vnode.componentOptions.Ctor(options);
5002
  }
5003
  function installComponentHooks(data) {
5004
      var hooks = data.hook || (data.hook = {});
5005
      for (var i = 0; i < hooksToMerge.length; i++) {
5006
          var key = hooksToMerge[i];
5007
          var existing = hooks[key];
5008
          var toMerge = componentVNodeHooks[key];
5009
          // @ts-expect-error
5010
          if (existing !== toMerge && !(existing && existing._merged)) {
5011
              hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;
5012
          }
5013
      }
5014
  }
5015
  function mergeHook(f1, f2) {
5016
      var merged = function (a, b) {
5017
          // flow complains about extra args which is why we use any
5018
          f1(a, b);
5019
          f2(a, b);
5020
      };
5021
      merged._merged = true;
5022
      return merged;
5023
  }
5024
  // transform component v-model info (value and callback) into
5025
  // prop and event handler respectively.
5026
  function transformModel(options, data) {
5027
      var prop = (options.model && options.model.prop) || 'value';
5028
      var event = (options.model && options.model.event) || 'input';
5029
      (data.attrs || (data.attrs = {}))[prop] = data.model.value;
5030
      var on = data.on || (data.on = {});
5031
      var existing = on[event];
5032
      var callback = data.model.callback;
5033
      if (isDef(existing)) {
5034
          if (isArray(existing)
5035
              ? existing.indexOf(callback) === -1
5036
              : existing !== callback) {
5037
              on[event] = [callback].concat(existing);
5038
          }
5039
      }
5040
      else {
5041
          on[event] = callback;
5042
      }
5043
  }
5044

5045
  var warn$2 = noop;
5046
  var tip = noop;
5047
  var generateComponentTrace; // work around flow check
5048
  var formatComponentName;
5049
  {
5050
      var hasConsole_1 = typeof console !== 'undefined';
5051
      var classifyRE_1 = /(?:^|[-_])(\w)/g;
5052
      var classify_1 = function (str) {
5053
          return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');
5054
      };
5055
      warn$2 = function (msg, vm) {
5056
          if (vm === void 0) { vm = currentInstance; }
5057
          var trace = vm ? generateComponentTrace(vm) : '';
5058
          if (config.warnHandler) {
5059
              config.warnHandler.call(null, msg, vm, trace);
5060
          }
5061
          else if (hasConsole_1 && !config.silent) {
5062
              console.error("[Vue warn]: ".concat(msg).concat(trace));
5063
          }
5064
      };
5065
      tip = function (msg, vm) {
5066
          if (hasConsole_1 && !config.silent) {
5067
              console.warn("[Vue tip]: ".concat(msg) + (vm ? generateComponentTrace(vm) : ''));
5068
          }
5069
      };
5070
      formatComponentName = function (vm, includeFile) {
5071
          if (vm.$root === vm) {
5072
              return '<Root>';
5073
          }
5074
          var options = isFunction(vm) && vm.cid != null
5075
              ? vm.options
5076
              : vm._isVue
5077
                  ? vm.$options || vm.constructor.options
5078
                  : vm;
5079
          var name = getComponentName(options);
5080
          var file = options.__file;
5081
          if (!name && file) {
5082
              var match = file.match(/([^/\\]+)\.vue$/);
5083
              name = match && match[1];
5084
          }
5085
          return ((name ? "<".concat(classify_1(name), ">") : "<Anonymous>") +
5086
              (file && includeFile !== false ? " at ".concat(file) : ''));
5087
      };
5088
      var repeat_1 = function (str, n) {
5089
          var res = '';
5090
          while (n) {
5091
              if (n % 2 === 1)
5092
                  res += str;
5093
              if (n > 1)
5094
                  str += str;
5095
              n >>= 1;
5096
          }
5097
          return res;
5098
      };
5099
      generateComponentTrace = function (vm) {
5100
          if (vm._isVue && vm.$parent) {
5101
              var tree = [];
5102
              var currentRecursiveSequence = 0;
5103
              while (vm) {
5104
                  if (tree.length > 0) {
5105
                      var last = tree[tree.length - 1];
5106
                      if (last.constructor === vm.constructor) {
5107
                          currentRecursiveSequence++;
5108
                          vm = vm.$parent;
5109
                          continue;
5110
                      }
5111
                      else if (currentRecursiveSequence > 0) {
5112
                          tree[tree.length - 1] = [last, currentRecursiveSequence];
5113
                          currentRecursiveSequence = 0;
5114
                      }
5115
                  }
5116
                  tree.push(vm);
5117
                  vm = vm.$parent;
5118
              }
5119
              return ('\n\nfound in\n\n' +
5120
                  tree
5121
                      .map(function (vm, i) {
5122
                      return "".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)
5123
                          ? "".concat(formatComponentName(vm[0]), "... (").concat(vm[1], " recursive calls)")
5124
                          : formatComponentName(vm));
5125
                  })
5126
                      .join('\n'));
5127
          }
5128
          else {
5129
              return "\n\n(found in ".concat(formatComponentName(vm), ")");
5130
          }
5131
      };
5132
  }
5133

5134
  /**
5135
   * Option overwriting strategies are functions that handle
5136
   * how to merge a parent option value and a child option
5137
   * value into the final value.
5138
   */
5139
  var strats = config.optionMergeStrategies;
5140
  /**
5141
   * Options with restrictions
5142
   */
5143
  {
5144
      strats.el = strats.propsData = function (parent, child, vm, key) {
5145
          if (!vm) {
5146
              warn$2("option \"".concat(key, "\" can only be used during instance ") +
5147
                  'creation with the `new` keyword.');
5148
          }
5149
          return defaultStrat(parent, child);
5150
      };
5151
  }
5152
  /**
5153
   * Helper that recursively merges two data objects together.
5154
   */
5155
  function mergeData(to, from) {
5156
      if (!from)
5157
          return to;
5158
      var key, toVal, fromVal;
5159
      var keys = hasSymbol
5160
          ? Reflect.ownKeys(from)
5161
          : Object.keys(from);
5162
      for (var i = 0; i < keys.length; i++) {
5163
          key = keys[i];
5164
          // in case the object is already observed...
5165
          if (key === '__ob__')
5166
              continue;
5167
          toVal = to[key];
5168
          fromVal = from[key];
5169
          if (!hasOwn(to, key)) {
5170
              set(to, key, fromVal);
5171
          }
5172
          else if (toVal !== fromVal &&
5173
              isPlainObject(toVal) &&
5174
              isPlainObject(fromVal)) {
5175
              mergeData(toVal, fromVal);
5176
          }
5177
      }
5178
      return to;
5179
  }
5180
  /**
5181
   * Data
5182
   */
5183
  function mergeDataOrFn(parentVal, childVal, vm) {
5184
      if (!vm) {
5185
          // in a Vue.extend merge, both should be functions
5186
          if (!childVal) {
5187
              return parentVal;
5188
          }
5189
          if (!parentVal) {
5190
              return childVal;
5191
          }
5192
          // when parentVal & childVal are both present,
5193
          // we need to return a function that returns the
5194
          // merged result of both functions... no need to
5195
          // check if parentVal is a function here because
5196
          // it has to be a function to pass previous merges.
5197
          return function mergedDataFn() {
5198
              return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);
5199
          };
5200
      }
5201
      else {
5202
          return function mergedInstanceDataFn() {
5203
              // instance merge
5204
              var instanceData = isFunction(childVal)
5205
                  ? childVal.call(vm, vm)
5206
                  : childVal;
5207
              var defaultData = isFunction(parentVal)
5208
                  ? parentVal.call(vm, vm)
5209
                  : parentVal;
5210
              if (instanceData) {
5211
                  return mergeData(instanceData, defaultData);
5212
              }
5213
              else {
5214
                  return defaultData;
5215
              }
5216
          };
5217
      }
5218
  }
5219
  strats.data = function (parentVal, childVal, vm) {
5220
      if (!vm) {
5221
          if (childVal && typeof childVal !== 'function') {
5222
              warn$2('The "data" option should be a function ' +
5223
                      'that returns a per-instance value in component ' +
5224
                      'definitions.', vm);
5225
              return parentVal;
5226
          }
5227
          return mergeDataOrFn(parentVal, childVal);
5228
      }
5229
      return mergeDataOrFn(parentVal, childVal, vm);
5230
  };
5231
  /**
5232
   * Hooks and props are merged as arrays.
5233
   */
5234
  function mergeLifecycleHook(parentVal, childVal) {
5235
      var res = childVal
5236
          ? parentVal
5237
              ? parentVal.concat(childVal)
5238
              : isArray(childVal)
5239
                  ? childVal
5240
                  : [childVal]
5241
          : parentVal;
5242
      return res ? dedupeHooks(res) : res;
5243
  }
5244
  function dedupeHooks(hooks) {
5245
      var res = [];
5246
      for (var i = 0; i < hooks.length; i++) {
5247
          if (res.indexOf(hooks[i]) === -1) {
5248
              res.push(hooks[i]);
5249
          }
5250
      }
5251
      return res;
5252
  }
5253
  LIFECYCLE_HOOKS.forEach(function (hook) {
5254
      strats[hook] = mergeLifecycleHook;
5255
  });
5256
  /**
5257
   * Assets
5258
   *
5259
   * When a vm is present (instance creation), we need to do
5260
   * a three-way merge between constructor options, instance
5261
   * options and parent options.
5262
   */
5263
  function mergeAssets(parentVal, childVal, vm, key) {
5264
      var res = Object.create(parentVal || null);
5265
      if (childVal) {
5266
          assertObjectType(key, childVal, vm);
5267
          return extend(res, childVal);
5268
      }
5269
      else {
5270
          return res;
5271
      }
5272
  }
5273
  ASSET_TYPES.forEach(function (type) {
5274
      strats[type + 's'] = mergeAssets;
5275
  });
5276
  /**
5277
   * Watchers.
5278
   *
5279
   * Watchers hashes should not overwrite one
5280
   * another, so we merge them as arrays.
5281
   */
5282
  strats.watch = function (parentVal, childVal, vm, key) {
5283
      // work around Firefox's Object.prototype.watch...
5284
      //@ts-expect-error work around
5285
      if (parentVal === nativeWatch)
5286
          parentVal = undefined;
5287
      //@ts-expect-error work around
5288
      if (childVal === nativeWatch)
5289
          childVal = undefined;
5290
      /* istanbul ignore if */
5291
      if (!childVal)
5292
          return Object.create(parentVal || null);
5293
      {
5294
          assertObjectType(key, childVal, vm);
5295
      }
5296
      if (!parentVal)
5297
          return childVal;
5298
      var ret = {};
5299
      extend(ret, parentVal);
5300
      for (var key_1 in childVal) {
5301
          var parent_1 = ret[key_1];
5302
          var child = childVal[key_1];
5303
          if (parent_1 && !isArray(parent_1)) {
5304
              parent_1 = [parent_1];
5305
          }
5306
          ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];
5307
      }
5308
      return ret;
5309
  };
5310
  /**
5311
   * Other object hashes.
5312
   */
5313
  strats.props =
5314
      strats.methods =
5315
          strats.inject =
5316
              strats.computed =
5317
                  function (parentVal, childVal, vm, key) {
5318
                      if (childVal && true) {
5319
                          assertObjectType(key, childVal, vm);
5320
                      }
5321
                      if (!parentVal)
5322
                          return childVal;
5323
                      var ret = Object.create(null);
5324
                      extend(ret, parentVal);
5325
                      if (childVal)
5326
                          extend(ret, childVal);
5327
                      return ret;
5328
                  };
5329
  strats.provide = mergeDataOrFn;
5330
  /**
5331
   * Default strategy.
5332
   */
5333
  var defaultStrat = function (parentVal, childVal) {
5334
      return childVal === undefined ? parentVal : childVal;
5335
  };
5336
  /**
5337
   * Validate component names
5338
   */
5339
  function checkComponents(options) {
5340
      for (var key in options.components) {
5341
          validateComponentName(key);
5342
      }
5343
  }
5344
  function validateComponentName(name) {
5345
      if (!new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(unicodeRegExp.source, "]*$")).test(name)) {
5346
          warn$2('Invalid component name: "' +
5347
              name +
5348
              '". Component names ' +
5349
              'should conform to valid custom element name in html5 specification.');
5350
      }
5351
      if (isBuiltInTag(name) || config.isReservedTag(name)) {
5352
          warn$2('Do not use built-in or reserved HTML elements as component ' +
5353
              'id: ' +
5354
              name);
5355
      }
5356
  }
5357
  /**
5358
   * Ensure all props option syntax are normalized into the
5359
   * Object-based format.
5360
   */
5361
  function normalizeProps(options, vm) {
5362
      var props = options.props;
5363
      if (!props)
5364
          return;
5365
      var res = {};
5366
      var i, val, name;
5367
      if (isArray(props)) {
5368
          i = props.length;
5369
          while (i--) {
5370
              val = props[i];
5371
              if (typeof val === 'string') {
5372
                  name = camelize(val);
5373
                  res[name] = { type: null };
5374
              }
5375
              else {
5376
                  warn$2('props must be strings when using array syntax.');
5377
              }
5378
          }
5379
      }
5380
      else if (isPlainObject(props)) {
5381
          for (var key in props) {
5382
              val = props[key];
5383
              name = camelize(key);
5384
              res[name] = isPlainObject(val) ? val : { type: val };
5385
          }
5386
      }
5387
      else {
5388
          warn$2("Invalid value for option \"props\": expected an Array or an Object, " +
5389
              "but got ".concat(toRawType(props), "."), vm);
5390
      }
5391
      options.props = res;
5392
  }
5393
  /**
5394
   * Normalize all injections into Object-based format
5395
   */
5396
  function normalizeInject(options, vm) {
5397
      var inject = options.inject;
5398
      if (!inject)
5399
          return;
5400
      var normalized = (options.inject = {});
5401
      if (isArray(inject)) {
5402
          for (var i = 0; i < inject.length; i++) {
5403
              normalized[inject[i]] = { from: inject[i] };
5404
          }
5405
      }
5406
      else if (isPlainObject(inject)) {
5407
          for (var key in inject) {
5408
              var val = inject[key];
5409
              normalized[key] = isPlainObject(val)
5410
                  ? extend({ from: key }, val)
5411
                  : { from: val };
5412
          }
5413
      }
5414
      else {
5415
          warn$2("Invalid value for option \"inject\": expected an Array or an Object, " +
5416
              "but got ".concat(toRawType(inject), "."), vm);
5417
      }
5418
  }
5419
  /**
5420
   * Normalize raw function directives into object format.
5421
   */
5422
  function normalizeDirectives$1(options) {
5423
      var dirs = options.directives;
5424
      if (dirs) {
5425
          for (var key in dirs) {
5426
              var def = dirs[key];
5427
              if (isFunction(def)) {
5428
                  dirs[key] = { bind: def, update: def };
5429
              }
5430
          }
5431
      }
5432
  }
5433
  function assertObjectType(name, value, vm) {
5434
      if (!isPlainObject(value)) {
5435
          warn$2("Invalid value for option \"".concat(name, "\": expected an Object, ") +
5436
              "but got ".concat(toRawType(value), "."), vm);
5437
      }
5438
  }
5439
  /**
5440
   * Merge two option objects into a new one.
5441
   * Core utility used in both instantiation and inheritance.
5442
   */
5443
  function mergeOptions(parent, child, vm) {
5444
      {
5445
          checkComponents(child);
5446
      }
5447
      if (isFunction(child)) {
5448
          // @ts-expect-error
5449
          child = child.options;
5450
      }
5451
      normalizeProps(child, vm);
5452
      normalizeInject(child, vm);
5453
      normalizeDirectives$1(child);
5454
      // Apply extends and mixins on the child options,
5455
      // but only if it is a raw options object that isn't
5456
      // the result of another mergeOptions call.
5457
      // Only merged options has the _base property.
5458
      if (!child._base) {
5459
          if (child.extends) {
5460
              parent = mergeOptions(parent, child.extends, vm);
5461
          }
5462
          if (child.mixins) {
5463
              for (var i = 0, l = child.mixins.length; i < l; i++) {
5464
                  parent = mergeOptions(parent, child.mixins[i], vm);
5465
              }
5466
          }
5467
      }
5468
      var options = {};
5469
      var key;
5470
      for (key in parent) {
5471
          mergeField(key);
5472
      }
5473
      for (key in child) {
5474
          if (!hasOwn(parent, key)) {
5475
              mergeField(key);
5476
          }
5477
      }
5478
      function mergeField(key) {
5479
          var strat = strats[key] || defaultStrat;
5480
          options[key] = strat(parent[key], child[key], vm, key);
5481
      }
5482
      return options;
5483
  }
5484
  /**
5485
   * Resolve an asset.
5486
   * This function is used because child instances need access
5487
   * to assets defined in its ancestor chain.
5488
   */
5489
  function resolveAsset(options, type, id, warnMissing) {
5490
      /* istanbul ignore if */
5491
      if (typeof id !== 'string') {
5492
          return;
5493
      }
5494
      var assets = options[type];
5495
      // check local registration variations first
5496
      if (hasOwn(assets, id))
5497
          return assets[id];
5498
      var camelizedId = camelize(id);
5499
      if (hasOwn(assets, camelizedId))
5500
          return assets[camelizedId];
5501
      var PascalCaseId = capitalize(camelizedId);
5502
      if (hasOwn(assets, PascalCaseId))
5503
          return assets[PascalCaseId];
5504
      // fallback to prototype chain
5505
      var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
5506
      if (warnMissing && !res) {
5507
          warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);
5508
      }
5509
      return res;
5510
  }
5511

5512
  function validateProp(key, propOptions, propsData, vm) {
5513
      var prop = propOptions[key];
5514
      var absent = !hasOwn(propsData, key);
5515
      var value = propsData[key];
5516
      // boolean casting
5517
      var booleanIndex = getTypeIndex(Boolean, prop.type);
5518
      if (booleanIndex > -1) {
5519
          if (absent && !hasOwn(prop, 'default')) {
5520
              value = false;
5521
          }
5522
          else if (value === '' || value === hyphenate(key)) {
5523
              // only cast empty string / same name to boolean if
5524
              // boolean has higher priority
5525
              var stringIndex = getTypeIndex(String, prop.type);
5526
              if (stringIndex < 0 || booleanIndex < stringIndex) {
5527
                  value = true;
5528
              }
5529
          }
5530
      }
5531
      // check default value
5532
      if (value === undefined) {
5533
          value = getPropDefaultValue(vm, prop, key);
5534
          // since the default value is a fresh copy,
5535
          // make sure to observe it.
5536
          var prevShouldObserve = shouldObserve;
5537
          toggleObserving(true);
5538
          observe(value);
5539
          toggleObserving(prevShouldObserve);
5540
      }
5541
      {
5542
          assertProp(prop, key, value, vm, absent);
5543
      }
5544
      return value;
5545
  }
5546
  /**
5547
   * Get the default value of a prop.
5548
   */
5549
  function getPropDefaultValue(vm, prop, key) {
5550
      // no default, return undefined
5551
      if (!hasOwn(prop, 'default')) {
5552
          return undefined;
5553
      }
5554
      var def = prop.default;
5555
      // warn against non-factory defaults for Object & Array
5556
      if (isObject(def)) {
5557
          warn$2('Invalid default value for prop "' +
5558
              key +
5559
              '": ' +
5560
              'Props with type Object/Array must use a factory function ' +
5561
              'to return the default value.', vm);
5562
      }
5563
      // the raw prop value was also undefined from previous render,
5564
      // return previous default value to avoid unnecessary watcher trigger
5565
      if (vm &&
5566
          vm.$options.propsData &&
5567
          vm.$options.propsData[key] === undefined &&
5568
          vm._props[key] !== undefined) {
5569
          return vm._props[key];
5570
      }
5571
      // call factory function for non-Function types
5572
      // a value is Function if its prototype is function even across different execution context
5573
      return isFunction(def) && getType(prop.type) !== 'Function'
5574
          ? def.call(vm)
5575
          : def;
5576
  }
5577
  /**
5578
   * Assert whether a prop is valid.
5579
   */
5580
  function assertProp(prop, name, value, vm, absent) {
5581
      if (prop.required && absent) {
5582
          warn$2('Missing required prop: "' + name + '"', vm);
5583
          return;
5584
      }
5585
      if (value == null && !prop.required) {
5586
          return;
5587
      }
5588
      var type = prop.type;
5589
      var valid = !type || type === true;
5590
      var expectedTypes = [];
5591
      if (type) {
5592
          if (!isArray(type)) {
5593
              type = [type];
5594
          }
5595
          for (var i = 0; i < type.length && !valid; i++) {
5596
              var assertedType = assertType(value, type[i], vm);
5597
              expectedTypes.push(assertedType.expectedType || '');
5598
              valid = assertedType.valid;
5599
          }
5600
      }
5601
      var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
5602
      if (!valid && haveExpectedTypes) {
5603
          warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);
5604
          return;
5605
      }
5606
      var validator = prop.validator;
5607
      if (validator) {
5608
          if (!validator(value)) {
5609
              warn$2('Invalid prop: custom validator check failed for prop "' + name + '".', vm);
5610
          }
5611
      }
5612
  }
5613
  var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
5614
  function assertType(value, type, vm) {
5615
      var valid;
5616
      var expectedType = getType(type);
5617
      if (simpleCheckRE.test(expectedType)) {
5618
          var t = typeof value;
5619
          valid = t === expectedType.toLowerCase();
5620
          // for primitive wrapper objects
5621
          if (!valid && t === 'object') {
5622
              valid = value instanceof type;
5623
          }
5624
      }
5625
      else if (expectedType === 'Object') {
5626
          valid = isPlainObject(value);
5627
      }
5628
      else if (expectedType === 'Array') {
5629
          valid = isArray(value);
5630
      }
5631
      else {
5632
          try {
5633
              valid = value instanceof type;
5634
          }
5635
          catch (e) {
5636
              warn$2('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
5637
              valid = false;
5638
          }
5639
      }
5640
      return {
5641
          valid: valid,
5642
          expectedType: expectedType
5643
      };
5644
  }
5645
  var functionTypeCheckRE = /^\s*function (\w+)/;
5646
  /**
5647
   * Use function string name to check built-in types,
5648
   * because a simple equality check will fail when running
5649
   * across different vms / iframes.
5650
   */
5651
  function getType(fn) {
5652
      var match = fn && fn.toString().match(functionTypeCheckRE);
5653
      return match ? match[1] : '';
5654
  }
5655
  function isSameType(a, b) {
5656
      return getType(a) === getType(b);
5657
  }
5658
  function getTypeIndex(type, expectedTypes) {
5659
      if (!isArray(expectedTypes)) {
5660
          return isSameType(expectedTypes, type) ? 0 : -1;
5661
      }
5662
      for (var i = 0, len = expectedTypes.length; i < len; i++) {
5663
          if (isSameType(expectedTypes[i], type)) {
5664
              return i;
5665
          }
5666
      }
5667
      return -1;
5668
  }
5669
  function getInvalidTypeMessage(name, value, expectedTypes) {
5670
      var message = "Invalid prop: type check failed for prop \"".concat(name, "\".") +
5671
          " Expected ".concat(expectedTypes.map(capitalize).join(', '));
5672
      var expectedType = expectedTypes[0];
5673
      var receivedType = toRawType(value);
5674
      // check if we need to specify expected value
5675
      if (expectedTypes.length === 1 &&
5676
          isExplicable(expectedType) &&
5677
          isExplicable(typeof value) &&
5678
          !isBoolean(expectedType, receivedType)) {
5679
          message += " with value ".concat(styleValue(value, expectedType));
5680
      }
5681
      message += ", got ".concat(receivedType, " ");
5682
      // check if we need to specify received value
5683
      if (isExplicable(receivedType)) {
5684
          message += "with value ".concat(styleValue(value, receivedType), ".");
5685
      }
5686
      return message;
5687
  }
5688
  function styleValue(value, type) {
5689
      if (type === 'String') {
5690
          return "\"".concat(value, "\"");
5691
      }
5692
      else if (type === 'Number') {
5693
          return "".concat(Number(value));
5694
      }
5695
      else {
5696
          return "".concat(value);
5697
      }
5698
  }
5699
  var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
5700
  function isExplicable(value) {
5701
      return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });
5702
  }
5703
  function isBoolean() {
5704
      var args = [];
5705
      for (var _i = 0; _i < arguments.length; _i++) {
5706
          args[_i] = arguments[_i];
5707
      }
5708
      return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });
5709
  }
5710

5711
  function Vue(options) {
5712
      if (!(this instanceof Vue)) {
5713
          warn$2('Vue is a constructor and should be called with the `new` keyword');
5714
      }
5715
      this._init(options);
5716
  }
5717
  //@ts-expect-error Vue has function type
5718
  initMixin$1(Vue);
5719
  //@ts-expect-error Vue has function type
5720
  stateMixin(Vue);
5721
  //@ts-expect-error Vue has function type
5722
  eventsMixin(Vue);
5723
  //@ts-expect-error Vue has function type
5724
  lifecycleMixin(Vue);
5725
  //@ts-expect-error Vue has function type
5726
  renderMixin(Vue);
5727

5728
  function initUse(Vue) {
5729
      Vue.use = function (plugin) {
5730
          var installedPlugins = this._installedPlugins || (this._installedPlugins = []);
5731
          if (installedPlugins.indexOf(plugin) > -1) {
5732
              return this;
5733
          }
5734
          // additional parameters
5735
          var args = toArray(arguments, 1);
5736
          args.unshift(this);
5737
          if (isFunction(plugin.install)) {
5738
              plugin.install.apply(plugin, args);
5739
          }
5740
          else if (isFunction(plugin)) {
5741
              plugin.apply(null, args);
5742
          }
5743
          installedPlugins.push(plugin);
5744
          return this;
5745
      };
5746
  }
5747

5748
  function initMixin(Vue) {
5749
      Vue.mixin = function (mixin) {
5750
          this.options = mergeOptions(this.options, mixin);
5751
          return this;
5752
      };
5753
  }
5754

5755
  function initExtend(Vue) {
5756
      /**
5757
       * Each instance constructor, including Vue, has a unique
5758
       * cid. This enables us to create wrapped "child
5759
       * constructors" for prototypal inheritance and cache them.
5760
       */
5761
      Vue.cid = 0;
5762
      var cid = 1;
5763
      /**
5764
       * Class inheritance
5765
       */
5766
      Vue.extend = function (extendOptions) {
5767
          extendOptions = extendOptions || {};
5768
          var Super = this;
5769
          var SuperId = Super.cid;
5770
          var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
5771
          if (cachedCtors[SuperId]) {
5772
              return cachedCtors[SuperId];
5773
          }
5774
          var name = getComponentName(extendOptions) || getComponentName(Super.options);
5775
          if (name) {
5776
              validateComponentName(name);
5777
          }
5778
          var Sub = function VueComponent(options) {
5779
              this._init(options);
5780
          };
5781
          Sub.prototype = Object.create(Super.prototype);
5782
          Sub.prototype.constructor = Sub;
5783
          Sub.cid = cid++;
5784
          Sub.options = mergeOptions(Super.options, extendOptions);
5785
          Sub['super'] = Super;
5786
          // For props and computed properties, we define the proxy getters on
5787
          // the Vue instances at extension time, on the extended prototype. This
5788
          // avoids Object.defineProperty calls for each instance created.
5789
          if (Sub.options.props) {
5790
              initProps(Sub);
5791
          }
5792
          if (Sub.options.computed) {
5793
              initComputed(Sub);
5794
          }
5795
          // allow further extension/mixin/plugin usage
5796
          Sub.extend = Super.extend;
5797
          Sub.mixin = Super.mixin;
5798
          Sub.use = Super.use;
5799
          // create asset registers, so extended classes
5800
          // can have their private assets too.
5801
          ASSET_TYPES.forEach(function (type) {
5802
              Sub[type] = Super[type];
5803
          });
5804
          // enable recursive self-lookup
5805
          if (name) {
5806
              Sub.options.components[name] = Sub;
5807
          }
5808
          // keep a reference to the super options at extension time.
5809
          // later at instantiation we can check if Super's options have
5810
          // been updated.
5811
          Sub.superOptions = Super.options;
5812
          Sub.extendOptions = extendOptions;
5813
          Sub.sealedOptions = extend({}, Sub.options);
5814
          // cache constructor
5815
          cachedCtors[SuperId] = Sub;
5816
          return Sub;
5817
      };
5818
  }
5819
  function initProps(Comp) {
5820
      var props = Comp.options.props;
5821
      for (var key in props) {
5822
          proxy(Comp.prototype, "_props", key);
5823
      }
5824
  }
5825
  function initComputed(Comp) {
5826
      var computed = Comp.options.computed;
5827
      for (var key in computed) {
5828
          defineComputed(Comp.prototype, key, computed[key]);
5829
      }
5830
  }
5831

5832
  function initAssetRegisters(Vue) {
5833
      /**
5834
       * Create asset registration methods.
5835
       */
5836
      ASSET_TYPES.forEach(function (type) {
5837
          // @ts-expect-error function is not exact same type
5838
          Vue[type] = function (id, definition) {
5839
              if (!definition) {
5840
                  return this.options[type + 's'][id];
5841
              }
5842
              else {
5843
                  /* istanbul ignore if */
5844
                  if (type === 'component') {
5845
                      validateComponentName(id);
5846
                  }
5847
                  if (type === 'component' && isPlainObject(definition)) {
5848
                      // @ts-expect-error
5849
                      definition.name = definition.name || id;
5850
                      definition = this.options._base.extend(definition);
5851
                  }
5852
                  if (type === 'directive' && isFunction(definition)) {
5853
                      definition = { bind: definition, update: definition };
5854
                  }
5855
                  this.options[type + 's'][id] = definition;
5856
                  return definition;
5857
              }
5858
          };
5859
      });
5860
  }
5861

5862
  function _getComponentName(opts) {
5863
      return opts && (getComponentName(opts.Ctor.options) || opts.tag);
5864
  }
5865
  function matches(pattern, name) {
5866
      if (isArray(pattern)) {
5867
          return pattern.indexOf(name) > -1;
5868
      }
5869
      else if (typeof pattern === 'string') {
5870
          return pattern.split(',').indexOf(name) > -1;
5871
      }
5872
      else if (isRegExp(pattern)) {
5873
          return pattern.test(name);
5874
      }
5875
      /* istanbul ignore next */
5876
      return false;
5877
  }
5878
  function pruneCache(keepAliveInstance, filter) {
5879
      var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode;
5880
      for (var key in cache) {
5881
          var entry = cache[key];
5882
          if (entry) {
5883
              var name_1 = entry.name;
5884
              if (name_1 && !filter(name_1)) {
5885
                  pruneCacheEntry(cache, key, keys, _vnode);
5886
              }
5887
          }
5888
      }
5889
  }
5890
  function pruneCacheEntry(cache, key, keys, current) {
5891
      var entry = cache[key];
5892
      if (entry && (!current || entry.tag !== current.tag)) {
5893
          // @ts-expect-error can be undefined
5894
          entry.componentInstance.$destroy();
5895
      }
5896
      cache[key] = null;
5897
      remove$2(keys, key);
5898
  }
5899
  var patternTypes = [String, RegExp, Array];
5900
  // TODO defineComponent
5901
  var KeepAlive = {
5902
      name: 'keep-alive',
5903
      abstract: true,
5904
      props: {
5905
          include: patternTypes,
5906
          exclude: patternTypes,
5907
          max: [String, Number]
5908
      },
5909
      methods: {
5910
          cacheVNode: function () {
5911
              var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;
5912
              if (vnodeToCache) {
5913
                  var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;
5914
                  cache[keyToCache] = {
5915
                      name: _getComponentName(componentOptions),
5916
                      tag: tag,
5917
                      componentInstance: componentInstance
5918
                  };
5919
                  keys.push(keyToCache);
5920
                  // prune oldest entry
5921
                  if (this.max && keys.length > parseInt(this.max)) {
5922
                      pruneCacheEntry(cache, keys[0], keys, this._vnode);
5923
                  }
5924
                  this.vnodeToCache = null;
5925
              }
5926
          }
5927
      },
5928
      created: function () {
5929
          this.cache = Object.create(null);
5930
          this.keys = [];
5931
      },
5932
      destroyed: function () {
5933
          for (var key in this.cache) {
5934
              pruneCacheEntry(this.cache, key, this.keys);
5935
          }
5936
      },
5937
      mounted: function () {
5938
          var _this = this;
5939
          this.cacheVNode();
5940
          this.$watch('include', function (val) {
5941
              pruneCache(_this, function (name) { return matches(val, name); });
5942
          });
5943
          this.$watch('exclude', function (val) {
5944
              pruneCache(_this, function (name) { return !matches(val, name); });
5945
          });
5946
      },
5947
      updated: function () {
5948
          this.cacheVNode();
5949
      },
5950
      render: function () {
5951
          var slot = this.$slots.default;
5952
          var vnode = getFirstComponentChild(slot);
5953
          var componentOptions = vnode && vnode.componentOptions;
5954
          if (componentOptions) {
5955
              // check pattern
5956
              var name_2 = _getComponentName(componentOptions);
5957
              var _a = this, include = _a.include, exclude = _a.exclude;
5958
              if (
5959
              // not included
5960
              (include && (!name_2 || !matches(include, name_2))) ||
5961
                  // excluded
5962
                  (exclude && name_2 && matches(exclude, name_2))) {
5963
                  return vnode;
5964
              }
5965
              var _b = this, cache = _b.cache, keys = _b.keys;
5966
              var key = vnode.key == null
5967
                  ? // same constructor may get registered as different local components
5968
                      // so cid alone is not enough (#3269)
5969
                      componentOptions.Ctor.cid +
5970
                          (componentOptions.tag ? "::".concat(componentOptions.tag) : '')
5971
                  : vnode.key;
5972
              if (cache[key]) {
5973
                  vnode.componentInstance = cache[key].componentInstance;
5974
                  // make current key freshest
5975
                  remove$2(keys, key);
5976
                  keys.push(key);
5977
              }
5978
              else {
5979
                  // delay setting the cache until update
5980
                  this.vnodeToCache = vnode;
5981
                  this.keyToCache = key;
5982
              }
5983
              // @ts-expect-error can vnode.data can be undefined
5984
              vnode.data.keepAlive = true;
5985
          }
5986
          return vnode || (slot && slot[0]);
5987
      }
5988
  };
5989

5990
  var builtInComponents = {
5991
      KeepAlive: KeepAlive
5992
  };
5993

5994
  function initGlobalAPI(Vue) {
5995
      // config
5996
      var configDef = {};
5997
      configDef.get = function () { return config; };
5998
      {
5999
          configDef.set = function () {
6000
              warn$2('Do not replace the Vue.config object, set individual fields instead.');
6001
          };
6002
      }
6003
      Object.defineProperty(Vue, 'config', configDef);
6004
      // exposed util methods.
6005
      // NOTE: these are not considered part of the public API - avoid relying on
6006
      // them unless you are aware of the risk.
6007
      Vue.util = {
6008
          warn: warn$2,
6009
          extend: extend,
6010
          mergeOptions: mergeOptions,
6011
          defineReactive: defineReactive
6012
      };
6013
      Vue.set = set;
6014
      Vue.delete = del;
6015
      Vue.nextTick = nextTick;
6016
      // 2.6 explicit observable API
6017
      Vue.observable = function (obj) {
6018
          observe(obj);
6019
          return obj;
6020
      };
6021
      Vue.options = Object.create(null);
6022
      ASSET_TYPES.forEach(function (type) {
6023
          Vue.options[type + 's'] = Object.create(null);
6024
      });
6025
      // this is used to identify the "base" constructor to extend all plain-object
6026
      // components with in Weex's multi-instance scenarios.
6027
      Vue.options._base = Vue;
6028
      extend(Vue.options.components, builtInComponents);
6029
      initUse(Vue);
6030
      initMixin(Vue);
6031
      initExtend(Vue);
6032
      initAssetRegisters(Vue);
6033
  }
6034

6035
  initGlobalAPI(Vue);
6036
  Object.defineProperty(Vue.prototype, '$isServer', {
6037
      get: isServerRendering
6038
  });
6039
  Object.defineProperty(Vue.prototype, '$ssrContext', {
6040
      get: function () {
6041
          /* istanbul ignore next */
6042
          return this.$vnode && this.$vnode.ssrContext;
6043
      }
6044
  });
6045
  // expose FunctionalRenderContext for ssr runtime helper installation
6046
  Object.defineProperty(Vue, 'FunctionalRenderContext', {
6047
      value: FunctionalRenderContext
6048
  });
6049
  Vue.version = version;
6050

6051
  // these are reserved for web because they are directly compiled away
6052
  // during template compilation
6053
  var isReservedAttr = makeMap('style,class');
6054
  // attributes that should be using props for binding
6055
  var acceptValue = makeMap('input,textarea,option,select,progress');
6056
  var mustUseProp = function (tag, type, attr) {
6057
      return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||
6058
          (attr === 'selected' && tag === 'option') ||
6059
          (attr === 'checked' && tag === 'input') ||
6060
          (attr === 'muted' && tag === 'video'));
6061
  };
6062
  var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
6063
  var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
6064
  var convertEnumeratedValue = function (key, value) {
6065
      return isFalsyAttrValue(value) || value === 'false'
6066
          ? 'false'
6067
          : // allow arbitrary string value for contenteditable
6068
              key === 'contenteditable' && isValidContentEditableValue(value)
6069
                  ? value
6070
                  : 'true';
6071
  };
6072
  var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
6073
      'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
6074
      'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
6075
      'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
6076
      'required,reversed,scoped,seamless,selected,sortable,' +
6077
      'truespeed,typemustmatch,visible');
6078
  var xlinkNS = 'http://www.w3.org/1999/xlink';
6079
  var isXlink = function (name) {
6080
      return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';
6081
  };
6082
  var getXlinkProp = function (name) {
6083
      return isXlink(name) ? name.slice(6, name.length) : '';
6084
  };
6085
  var isFalsyAttrValue = function (val) {
6086
      return val == null || val === false;
6087
  };
6088

6089
  function genClassForVnode(vnode) {
6090
      var data = vnode.data;
6091
      var parentNode = vnode;
6092
      var childNode = vnode;
6093
      while (isDef(childNode.componentInstance)) {
6094
          childNode = childNode.componentInstance._vnode;
6095
          if (childNode && childNode.data) {
6096
              data = mergeClassData(childNode.data, data);
6097
          }
6098
      }
6099
      // @ts-expect-error parentNode.parent not VNodeWithData
6100
      while (isDef((parentNode = parentNode.parent))) {
6101
          if (parentNode && parentNode.data) {
6102
              data = mergeClassData(data, parentNode.data);
6103
          }
6104
      }
6105
      return renderClass(data.staticClass, data.class);
6106
  }
6107
  function mergeClassData(child, parent) {
6108
      return {
6109
          staticClass: concat(child.staticClass, parent.staticClass),
6110
          class: isDef(child.class) ? [child.class, parent.class] : parent.class
6111
      };
6112
  }
6113
  function renderClass(staticClass, dynamicClass) {
6114
      if (isDef(staticClass) || isDef(dynamicClass)) {
6115
          return concat(staticClass, stringifyClass(dynamicClass));
6116
      }
6117
      /* istanbul ignore next */
6118
      return '';
6119
  }
6120
  function concat(a, b) {
6121
      return a ? (b ? a + ' ' + b : a) : b || '';
6122
  }
6123
  function stringifyClass(value) {
6124
      if (Array.isArray(value)) {
6125
          return stringifyArray(value);
6126
      }
6127
      if (isObject(value)) {
6128
          return stringifyObject(value);
6129
      }
6130
      if (typeof value === 'string') {
6131
          return value;
6132
      }
6133
      /* istanbul ignore next */
6134
      return '';
6135
  }
6136
  function stringifyArray(value) {
6137
      var res = '';
6138
      var stringified;
6139
      for (var i = 0, l = value.length; i < l; i++) {
6140
          if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {
6141
              if (res)
6142
                  res += ' ';
6143
              res += stringified;
6144
          }
6145
      }
6146
      return res;
6147
  }
6148
  function stringifyObject(value) {
6149
      var res = '';
6150
      for (var key in value) {
6151
          if (value[key]) {
6152
              if (res)
6153
                  res += ' ';
6154
              res += key;
6155
          }
6156
      }
6157
      return res;
6158
  }
6159

6160
  var namespaceMap = {
6161
      svg: 'http://www.w3.org/2000/svg',
6162
      math: 'http://www.w3.org/1998/Math/MathML'
6163
  };
6164
  var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +
6165
      'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
6166
      'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
6167
      'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
6168
      's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
6169
      'embed,object,param,source,canvas,script,noscript,del,ins,' +
6170
      'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
6171
      'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
6172
      'output,progress,select,textarea,' +
6173
      'details,dialog,menu,menuitem,summary,' +
6174
      'content,element,shadow,template,blockquote,iframe,tfoot');
6175
  // this map is intentionally selective, only covering SVG elements that may
6176
  // contain child elements.
6177
  var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
6178
      'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
6179
      'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);
6180
  var isPreTag = function (tag) { return tag === 'pre'; };
6181
  var isReservedTag = function (tag) {
6182
      return isHTMLTag(tag) || isSVG(tag);
6183
  };
6184
  function getTagNamespace(tag) {
6185
      if (isSVG(tag)) {
6186
          return 'svg';
6187
      }
6188
      // basic support for MathML
6189
      // note it doesn't support other MathML elements being component roots
6190
      if (tag === 'math') {
6191
          return 'math';
6192
      }
6193
  }
6194
  var unknownElementCache = Object.create(null);
6195
  function isUnknownElement(tag) {
6196
      /* istanbul ignore if */
6197
      if (!inBrowser) {
6198
          return true;
6199
      }
6200
      if (isReservedTag(tag)) {
6201
          return false;
6202
      }
6203
      tag = tag.toLowerCase();
6204
      /* istanbul ignore if */
6205
      if (unknownElementCache[tag] != null) {
6206
          return unknownElementCache[tag];
6207
      }
6208
      var el = document.createElement(tag);
6209
      if (tag.indexOf('-') > -1) {
6210
          // http://stackoverflow.com/a/28210364/1070244
6211
          return (unknownElementCache[tag] =
6212
              el.constructor === window.HTMLUnknownElement ||
6213
                  el.constructor === window.HTMLElement);
6214
      }
6215
      else {
6216
          return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));
6217
      }
6218
  }
6219
  var isTextInputType = makeMap('text,number,password,search,email,tel,url');
6220

6221
  /**
6222
   * Query an element selector if it's not an element already.
6223
   */
6224
  function query(el) {
6225
      if (typeof el === 'string') {
6226
          var selected = document.querySelector(el);
6227
          if (!selected) {
6228
              warn$2('Cannot find element: ' + el);
6229
              return document.createElement('div');
6230
          }
6231
          return selected;
6232
      }
6233
      else {
6234
          return el;
6235
      }
6236
  }
6237

6238
  function createElement(tagName, vnode) {
6239
      var elm = document.createElement(tagName);
6240
      if (tagName !== 'select') {
6241
          return elm;
6242
      }
6243
      // false or null will remove the attribute but undefined will not
6244
      if (vnode.data &&
6245
          vnode.data.attrs &&
6246
          vnode.data.attrs.multiple !== undefined) {
6247
          elm.setAttribute('multiple', 'multiple');
6248
      }
6249
      return elm;
6250
  }
6251
  function createElementNS(namespace, tagName) {
6252
      return document.createElementNS(namespaceMap[namespace], tagName);
6253
  }
6254
  function createTextNode(text) {
6255
      return document.createTextNode(text);
6256
  }
6257
  function createComment(text) {
6258
      return document.createComment(text);
6259
  }
6260
  function insertBefore(parentNode, newNode, referenceNode) {
6261
      parentNode.insertBefore(newNode, referenceNode);
6262
  }
6263
  function removeChild(node, child) {
6264
      node.removeChild(child);
6265
  }
6266
  function appendChild(node, child) {
6267
      node.appendChild(child);
6268
  }
6269
  function parentNode(node) {
6270
      return node.parentNode;
6271
  }
6272
  function nextSibling(node) {
6273
      return node.nextSibling;
6274
  }
6275
  function tagName(node) {
6276
      return node.tagName;
6277
  }
6278
  function setTextContent(node, text) {
6279
      node.textContent = text;
6280
  }
6281
  function setStyleScope(node, scopeId) {
6282
      node.setAttribute(scopeId, '');
6283
  }
6284

6285
  var nodeOps = /*#__PURE__*/Object.freeze({
6286
    __proto__: null,
6287
    createElement: createElement,
6288
    createElementNS: createElementNS,
6289
    createTextNode: createTextNode,
6290
    createComment: createComment,
6291
    insertBefore: insertBefore,
6292
    removeChild: removeChild,
6293
    appendChild: appendChild,
6294
    parentNode: parentNode,
6295
    nextSibling: nextSibling,
6296
    tagName: tagName,
6297
    setTextContent: setTextContent,
6298
    setStyleScope: setStyleScope
6299
  });
6300

6301
  var ref = {
6302
      create: function (_, vnode) {
6303
          registerRef(vnode);
6304
      },
6305
      update: function (oldVnode, vnode) {
6306
          if (oldVnode.data.ref !== vnode.data.ref) {
6307
              registerRef(oldVnode, true);
6308
              registerRef(vnode);
6309
          }
6310
      },
6311
      destroy: function (vnode) {
6312
          registerRef(vnode, true);
6313
      }
6314
  };
6315
  function registerRef(vnode, isRemoval) {
6316
      var ref = vnode.data.ref;
6317
      if (!isDef(ref))
6318
          return;
6319
      var vm = vnode.context;
6320
      var refValue = vnode.componentInstance || vnode.elm;
6321
      var value = isRemoval ? null : refValue;
6322
      var $refsValue = isRemoval ? undefined : refValue;
6323
      if (isFunction(ref)) {
6324
          invokeWithErrorHandling(ref, vm, [value], vm, "template ref function");
6325
          return;
6326
      }
6327
      var isFor = vnode.data.refInFor;
6328
      var _isString = typeof ref === 'string' || typeof ref === 'number';
6329
      var _isRef = isRef(ref);
6330
      var refs = vm.$refs;
6331
      if (_isString || _isRef) {
6332
          if (isFor) {
6333
              var existing = _isString ? refs[ref] : ref.value;
6334
              if (isRemoval) {
6335
                  isArray(existing) && remove$2(existing, refValue);
6336
              }
6337
              else {
6338
                  if (!isArray(existing)) {
6339
                      if (_isString) {
6340
                          refs[ref] = [refValue];
6341
                          setSetupRef(vm, ref, refs[ref]);
6342
                      }
6343
                      else {
6344
                          ref.value = [refValue];
6345
                      }
6346
                  }
6347
                  else if (!existing.includes(refValue)) {
6348
                      existing.push(refValue);
6349
                  }
6350
              }
6351
          }
6352
          else if (_isString) {
6353
              if (isRemoval && refs[ref] !== refValue) {
6354
                  return;
6355
              }
6356
              refs[ref] = $refsValue;
6357
              setSetupRef(vm, ref, value);
6358
          }
6359
          else if (_isRef) {
6360
              if (isRemoval && ref.value !== refValue) {
6361
                  return;
6362
              }
6363
              ref.value = value;
6364
          }
6365
          else {
6366
              warn$2("Invalid template ref type: ".concat(typeof ref));
6367
          }
6368
      }
6369
  }
6370
  function setSetupRef(_a, key, val) {
6371
      var _setupState = _a._setupState;
6372
      if (_setupState && hasOwn(_setupState, key)) {
6373
          if (isRef(_setupState[key])) {
6374
              _setupState[key].value = val;
6375
          }
6376
          else {
6377
              _setupState[key] = val;
6378
          }
6379
      }
6380
  }
6381

6382
  /**
6383
   * Virtual DOM patching algorithm based on Snabbdom by
6384
   * Simon Friis Vindum (@paldepind)
6385
   * Licensed under the MIT License
6386
   * https://github.com/paldepind/snabbdom/blob/master/LICENSE
6387
   *
6388
   * modified by Evan You (@yyx990803)
6389
   *
6390
   * Not type-checking this because this file is perf-critical and the cost
6391
   * of making flow understand it is not worth it.
6392
   */
6393
  var emptyNode = new VNode('', {}, []);
6394
  var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
6395
  function sameVnode(a, b) {
6396
      return (a.key === b.key &&
6397
          a.asyncFactory === b.asyncFactory &&
6398
          ((a.tag === b.tag &&
6399
              a.isComment === b.isComment &&
6400
              isDef(a.data) === isDef(b.data) &&
6401
              sameInputType(a, b)) ||
6402
              (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));
6403
  }
6404
  function sameInputType(a, b) {
6405
      if (a.tag !== 'input')
6406
          return true;
6407
      var i;
6408
      var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;
6409
      var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;
6410
      return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));
6411
  }
6412
  function createKeyToOldIdx(children, beginIdx, endIdx) {
6413
      var i, key;
6414
      var map = {};
6415
      for (i = beginIdx; i <= endIdx; ++i) {
6416
          key = children[i].key;
6417
          if (isDef(key))
6418
              map[key] = i;
6419
      }
6420
      return map;
6421
  }
6422
  function createPatchFunction(backend) {
6423
      var i, j;
6424
      var cbs = {};
6425
      var modules = backend.modules, nodeOps = backend.nodeOps;
6426
      for (i = 0; i < hooks.length; ++i) {
6427
          cbs[hooks[i]] = [];
6428
          for (j = 0; j < modules.length; ++j) {
6429
              if (isDef(modules[j][hooks[i]])) {
6430
                  cbs[hooks[i]].push(modules[j][hooks[i]]);
6431
              }
6432
          }
6433
      }
6434
      function emptyNodeAt(elm) {
6435
          return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);
6436
      }
6437
      function createRmCb(childElm, listeners) {
6438
          function remove() {
6439
              if (--remove.listeners === 0) {
6440
                  removeNode(childElm);
6441
              }
6442
          }
6443
          remove.listeners = listeners;
6444
          return remove;
6445
      }
6446
      function removeNode(el) {
6447
          var parent = nodeOps.parentNode(el);
6448
          // element may have already been removed due to v-html / v-text
6449
          if (isDef(parent)) {
6450
              nodeOps.removeChild(parent, el);
6451
          }
6452
      }
6453
      function isUnknownElement(vnode, inVPre) {
6454
          return (!inVPre &&
6455
              !vnode.ns &&
6456
              !(config.ignoredElements.length &&
6457
                  config.ignoredElements.some(function (ignore) {
6458
                      return isRegExp(ignore)
6459
                          ? ignore.test(vnode.tag)
6460
                          : ignore === vnode.tag;
6461
                  })) &&
6462
              config.isUnknownElement(vnode.tag));
6463
      }
6464
      var creatingElmInVPre = 0;
6465
      function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {
6466
          if (isDef(vnode.elm) && isDef(ownerArray)) {
6467
              // This vnode was used in a previous render!
6468
              // now it's used as a new node, overwriting its elm would cause
6469
              // potential patch errors down the road when it's used as an insertion
6470
              // reference node. Instead, we clone the node on-demand before creating
6471
              // associated DOM element for it.
6472
              vnode = ownerArray[index] = cloneVNode(vnode);
6473
          }
6474
          vnode.isRootInsert = !nested; // for transition enter check
6475
          if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
6476
              return;
6477
          }
6478
          var data = vnode.data;
6479
          var children = vnode.children;
6480
          var tag = vnode.tag;
6481
          if (isDef(tag)) {
6482
              {
6483
                  if (data && data.pre) {
6484
                      creatingElmInVPre++;
6485
                  }
6486
                  if (isUnknownElement(vnode, creatingElmInVPre)) {
6487
                      warn$2('Unknown custom element: <' +
6488
                          tag +
6489
                          '> - did you ' +
6490
                          'register the component correctly? For recursive components, ' +
6491
                          'make sure to provide the "name" option.', vnode.context);
6492
                  }
6493
              }
6494
              vnode.elm = vnode.ns
6495
                  ? nodeOps.createElementNS(vnode.ns, tag)
6496
                  : nodeOps.createElement(tag, vnode);
6497
              setScope(vnode);
6498
              createChildren(vnode, children, insertedVnodeQueue);
6499
              if (isDef(data)) {
6500
                  invokeCreateHooks(vnode, insertedVnodeQueue);
6501
              }
6502
              insert(parentElm, vnode.elm, refElm);
6503
              if (data && data.pre) {
6504
                  creatingElmInVPre--;
6505
              }
6506
          }
6507
          else if (isTrue(vnode.isComment)) {
6508
              vnode.elm = nodeOps.createComment(vnode.text);
6509
              insert(parentElm, vnode.elm, refElm);
6510
          }
6511
          else {
6512
              vnode.elm = nodeOps.createTextNode(vnode.text);
6513
              insert(parentElm, vnode.elm, refElm);
6514
          }
6515
      }
6516
      function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
6517
          var i = vnode.data;
6518
          if (isDef(i)) {
6519
              var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
6520
              if (isDef((i = i.hook)) && isDef((i = i.init))) {
6521
                  i(vnode, false /* hydrating */);
6522
              }
6523
              // after calling the init hook, if the vnode is a child component
6524
              // it should've created a child instance and mounted it. the child
6525
              // component also has set the placeholder vnode's elm.
6526
              // in that case we can just return the element and be done.
6527
              if (isDef(vnode.componentInstance)) {
6528
                  initComponent(vnode, insertedVnodeQueue);
6529
                  insert(parentElm, vnode.elm, refElm);
6530
                  if (isTrue(isReactivated)) {
6531
                      reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
6532
                  }
6533
                  return true;
6534
              }
6535
          }
6536
      }
6537
      function initComponent(vnode, insertedVnodeQueue) {
6538
          if (isDef(vnode.data.pendingInsert)) {
6539
              insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
6540
              vnode.data.pendingInsert = null;
6541
          }
6542
          vnode.elm = vnode.componentInstance.$el;
6543
          if (isPatchable(vnode)) {
6544
              invokeCreateHooks(vnode, insertedVnodeQueue);
6545
              setScope(vnode);
6546
          }
6547
          else {
6548
              // empty component root.
6549
              // skip all element-related modules except for ref (#3455)
6550
              registerRef(vnode);
6551
              // make sure to invoke the insert hook
6552
              insertedVnodeQueue.push(vnode);
6553
          }
6554
      }
6555
      function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
6556
          var i;
6557
          // hack for #4339: a reactivated component with inner transition
6558
          // does not trigger because the inner node's created hooks are not called
6559
          // again. It's not ideal to involve module-specific logic in here but
6560
          // there doesn't seem to be a better way to do it.
6561
          var innerNode = vnode;
6562
          while (innerNode.componentInstance) {
6563
              innerNode = innerNode.componentInstance._vnode;
6564
              if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {
6565
                  for (i = 0; i < cbs.activate.length; ++i) {
6566
                      cbs.activate[i](emptyNode, innerNode);
6567
                  }
6568
                  insertedVnodeQueue.push(innerNode);
6569
                  break;
6570
              }
6571
          }
6572
          // unlike a newly created component,
6573
          // a reactivated keep-alive component doesn't insert itself
6574
          insert(parentElm, vnode.elm, refElm);
6575
      }
6576
      function insert(parent, elm, ref) {
6577
          if (isDef(parent)) {
6578
              if (isDef(ref)) {
6579
                  if (nodeOps.parentNode(ref) === parent) {
6580
                      nodeOps.insertBefore(parent, elm, ref);
6581
                  }
6582
              }
6583
              else {
6584
                  nodeOps.appendChild(parent, elm);
6585
              }
6586
          }
6587
      }
6588
      function createChildren(vnode, children, insertedVnodeQueue) {
6589
          if (isArray(children)) {
6590
              {
6591
                  checkDuplicateKeys(children);
6592
              }
6593
              for (var i_1 = 0; i_1 < children.length; ++i_1) {
6594
                  createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);
6595
              }
6596
          }
6597
          else if (isPrimitive(vnode.text)) {
6598
              nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
6599
          }
6600
      }
6601
      function isPatchable(vnode) {
6602
          while (vnode.componentInstance) {
6603
              vnode = vnode.componentInstance._vnode;
6604
          }
6605
          return isDef(vnode.tag);
6606
      }
6607
      function invokeCreateHooks(vnode, insertedVnodeQueue) {
6608
          for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {
6609
              cbs.create[i_2](emptyNode, vnode);
6610
          }
6611
          i = vnode.data.hook; // Reuse variable
6612
          if (isDef(i)) {
6613
              if (isDef(i.create))
6614
                  i.create(emptyNode, vnode);
6615
              if (isDef(i.insert))
6616
                  insertedVnodeQueue.push(vnode);
6617
          }
6618
      }
6619
      // set scope id attribute for scoped CSS.
6620
      // this is implemented as a special case to avoid the overhead
6621
      // of going through the normal attribute patching process.
6622
      function setScope(vnode) {
6623
          var i;
6624
          if (isDef((i = vnode.fnScopeId))) {
6625
              nodeOps.setStyleScope(vnode.elm, i);
6626
          }
6627
          else {
6628
              var ancestor = vnode;
6629
              while (ancestor) {
6630
                  if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {
6631
                      nodeOps.setStyleScope(vnode.elm, i);
6632
                  }
6633
                  ancestor = ancestor.parent;
6634
              }
6635
          }
6636
          // for slot content they should also get the scopeId from the host instance.
6637
          if (isDef((i = activeInstance)) &&
6638
              i !== vnode.context &&
6639
              i !== vnode.fnContext &&
6640
              isDef((i = i.$options._scopeId))) {
6641
              nodeOps.setStyleScope(vnode.elm, i);
6642
          }
6643
      }
6644
      function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
6645
          for (; startIdx <= endIdx; ++startIdx) {
6646
              createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
6647
          }
6648
      }
6649
      function invokeDestroyHook(vnode) {
6650
          var i, j;
6651
          var data = vnode.data;
6652
          if (isDef(data)) {
6653
              if (isDef((i = data.hook)) && isDef((i = i.destroy)))
6654
                  i(vnode);
6655
              for (i = 0; i < cbs.destroy.length; ++i)
6656
                  cbs.destroy[i](vnode);
6657
          }
6658
          if (isDef((i = vnode.children))) {
6659
              for (j = 0; j < vnode.children.length; ++j) {
6660
                  invokeDestroyHook(vnode.children[j]);
6661
              }
6662
          }
6663
      }
6664
      function removeVnodes(vnodes, startIdx, endIdx) {
6665
          for (; startIdx <= endIdx; ++startIdx) {
6666
              var ch = vnodes[startIdx];
6667
              if (isDef(ch)) {
6668
                  if (isDef(ch.tag)) {
6669
                      removeAndInvokeRemoveHook(ch);
6670
                      invokeDestroyHook(ch);
6671
                  }
6672
                  else {
6673
                      // Text node
6674
                      removeNode(ch.elm);
6675
                  }
6676
              }
6677
          }
6678
      }
6679
      function removeAndInvokeRemoveHook(vnode, rm) {
6680
          if (isDef(rm) || isDef(vnode.data)) {
6681
              var i_3;
6682
              var listeners = cbs.remove.length + 1;
6683
              if (isDef(rm)) {
6684
                  // we have a recursively passed down rm callback
6685
                  // increase the listeners count
6686
                  rm.listeners += listeners;
6687
              }
6688
              else {
6689
                  // directly removing
6690
                  rm = createRmCb(vnode.elm, listeners);
6691
              }
6692
              // recursively invoke hooks on child component root node
6693
              if (isDef((i_3 = vnode.componentInstance)) &&
6694
                  isDef((i_3 = i_3._vnode)) &&
6695
                  isDef(i_3.data)) {
6696
                  removeAndInvokeRemoveHook(i_3, rm);
6697
              }
6698
              for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {
6699
                  cbs.remove[i_3](vnode, rm);
6700
              }
6701
              if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {
6702
                  i_3(vnode, rm);
6703
              }
6704
              else {
6705
                  rm();
6706
              }
6707
          }
6708
          else {
6709
              removeNode(vnode.elm);
6710
          }
6711
      }
6712
      function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
6713
          var oldStartIdx = 0;
6714
          var newStartIdx = 0;
6715
          var oldEndIdx = oldCh.length - 1;
6716
          var oldStartVnode = oldCh[0];
6717
          var oldEndVnode = oldCh[oldEndIdx];
6718
          var newEndIdx = newCh.length - 1;
6719
          var newStartVnode = newCh[0];
6720
          var newEndVnode = newCh[newEndIdx];
6721
          var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
6722
          // removeOnly is a special flag used only by <transition-group>
6723
          // to ensure removed elements stay in correct relative positions
6724
          // during leaving transitions
6725
          var canMove = !removeOnly;
6726
          {
6727
              checkDuplicateKeys(newCh);
6728
          }
6729
          while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
6730
              if (isUndef(oldStartVnode)) {
6731
                  oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
6732
              }
6733
              else if (isUndef(oldEndVnode)) {
6734
                  oldEndVnode = oldCh[--oldEndIdx];
6735
              }
6736
              else if (sameVnode(oldStartVnode, newStartVnode)) {
6737
                  patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
6738
                  oldStartVnode = oldCh[++oldStartIdx];
6739
                  newStartVnode = newCh[++newStartIdx];
6740
              }
6741
              else if (sameVnode(oldEndVnode, newEndVnode)) {
6742
                  patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
6743
                  oldEndVnode = oldCh[--oldEndIdx];
6744
                  newEndVnode = newCh[--newEndIdx];
6745
              }
6746
              else if (sameVnode(oldStartVnode, newEndVnode)) {
6747
                  // Vnode moved right
6748
                  patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
6749
                  canMove &&
6750
                      nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
6751
                  oldStartVnode = oldCh[++oldStartIdx];
6752
                  newEndVnode = newCh[--newEndIdx];
6753
              }
6754
              else if (sameVnode(oldEndVnode, newStartVnode)) {
6755
                  // Vnode moved left
6756
                  patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
6757
                  canMove &&
6758
                      nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
6759
                  oldEndVnode = oldCh[--oldEndIdx];
6760
                  newStartVnode = newCh[++newStartIdx];
6761
              }
6762
              else {
6763
                  if (isUndef(oldKeyToIdx))
6764
                      oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
6765
                  idxInOld = isDef(newStartVnode.key)
6766
                      ? oldKeyToIdx[newStartVnode.key]
6767
                      : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
6768
                  if (isUndef(idxInOld)) {
6769
                      // New element
6770
                      createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
6771
                  }
6772
                  else {
6773
                      vnodeToMove = oldCh[idxInOld];
6774
                      if (sameVnode(vnodeToMove, newStartVnode)) {
6775
                          patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
6776
                          oldCh[idxInOld] = undefined;
6777
                          canMove &&
6778
                              nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
6779
                      }
6780
                      else {
6781
                          // same key but different element. treat as new element
6782
                          createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
6783
                      }
6784
                  }
6785
                  newStartVnode = newCh[++newStartIdx];
6786
              }
6787
          }
6788
          if (oldStartIdx > oldEndIdx) {
6789
              refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
6790
              addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
6791
          }
6792
          else if (newStartIdx > newEndIdx) {
6793
              removeVnodes(oldCh, oldStartIdx, oldEndIdx);
6794
          }
6795
      }
6796
      function checkDuplicateKeys(children) {
6797
          var seenKeys = {};
6798
          for (var i_4 = 0; i_4 < children.length; i_4++) {
6799
              var vnode = children[i_4];
6800
              var key = vnode.key;
6801
              if (isDef(key)) {
6802
                  if (seenKeys[key]) {
6803
                      warn$2("Duplicate keys detected: '".concat(key, "'. This may cause an update error."), vnode.context);
6804
                  }
6805
                  else {
6806
                      seenKeys[key] = true;
6807
                  }
6808
              }
6809
          }
6810
      }
6811
      function findIdxInOld(node, oldCh, start, end) {
6812
          for (var i_5 = start; i_5 < end; i_5++) {
6813
              var c = oldCh[i_5];
6814
              if (isDef(c) && sameVnode(node, c))
6815
                  return i_5;
6816
          }
6817
      }
6818
      function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {
6819
          if (oldVnode === vnode) {
6820
              return;
6821
          }
6822
          if (isDef(vnode.elm) && isDef(ownerArray)) {
6823
              // clone reused vnode
6824
              vnode = ownerArray[index] = cloneVNode(vnode);
6825
          }
6826
          var elm = (vnode.elm = oldVnode.elm);
6827
          if (isTrue(oldVnode.isAsyncPlaceholder)) {
6828
              if (isDef(vnode.asyncFactory.resolved)) {
6829
                  hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
6830
              }
6831
              else {
6832
                  vnode.isAsyncPlaceholder = true;
6833
              }
6834
              return;
6835
          }
6836
          // reuse element for static trees.
6837
          // note we only do this if the vnode is cloned -
6838
          // if the new node is not cloned it means the render functions have been
6839
          // reset by the hot-reload-api and we need to do a proper re-render.
6840
          if (isTrue(vnode.isStatic) &&
6841
              isTrue(oldVnode.isStatic) &&
6842
              vnode.key === oldVnode.key &&
6843
              (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {
6844
              vnode.componentInstance = oldVnode.componentInstance;
6845
              return;
6846
          }
6847
          var i;
6848
          var data = vnode.data;
6849
          if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {
6850
              i(oldVnode, vnode);
6851
          }
6852
          var oldCh = oldVnode.children;
6853
          var ch = vnode.children;
6854
          if (isDef(data) && isPatchable(vnode)) {
6855
              for (i = 0; i < cbs.update.length; ++i)
6856
                  cbs.update[i](oldVnode, vnode);
6857
              if (isDef((i = data.hook)) && isDef((i = i.update)))
6858
                  i(oldVnode, vnode);
6859
          }
6860
          if (isUndef(vnode.text)) {
6861
              if (isDef(oldCh) && isDef(ch)) {
6862
                  if (oldCh !== ch)
6863
                      updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);
6864
              }
6865
              else if (isDef(ch)) {
6866
                  {
6867
                      checkDuplicateKeys(ch);
6868
                  }
6869
                  if (isDef(oldVnode.text))
6870
                      nodeOps.setTextContent(elm, '');
6871
                  addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
6872
              }
6873
              else if (isDef(oldCh)) {
6874
                  removeVnodes(oldCh, 0, oldCh.length - 1);
6875
              }
6876
              else if (isDef(oldVnode.text)) {
6877
                  nodeOps.setTextContent(elm, '');
6878
              }
6879
          }
6880
          else if (oldVnode.text !== vnode.text) {
6881
              nodeOps.setTextContent(elm, vnode.text);
6882
          }
6883
          if (isDef(data)) {
6884
              if (isDef((i = data.hook)) && isDef((i = i.postpatch)))
6885
                  i(oldVnode, vnode);
6886
          }
6887
      }
6888
      function invokeInsertHook(vnode, queue, initial) {
6889
          // delay insert hooks for component root nodes, invoke them after the
6890
          // element is really inserted
6891
          if (isTrue(initial) && isDef(vnode.parent)) {
6892
              vnode.parent.data.pendingInsert = queue;
6893
          }
6894
          else {
6895
              for (var i_6 = 0; i_6 < queue.length; ++i_6) {
6896
                  queue[i_6].data.hook.insert(queue[i_6]);
6897
              }
6898
          }
6899
      }
6900
      var hydrationBailed = false;
6901
      // list of modules that can skip create hook during hydration because they
6902
      // are already rendered on the client or has no need for initialization
6903
      // Note: style is excluded because it relies on initial clone for future
6904
      // deep updates (#7063).
6905
      var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
6906
      // Note: this is a browser-only function so we can assume elms are DOM nodes.
6907
      function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {
6908
          var i;
6909
          var tag = vnode.tag, data = vnode.data, children = vnode.children;
6910
          inVPre = inVPre || (data && data.pre);
6911
          vnode.elm = elm;
6912
          if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
6913
              vnode.isAsyncPlaceholder = true;
6914
              return true;
6915
          }
6916
          // assert node match
6917
          {
6918
              if (!assertNodeMatch(elm, vnode, inVPre)) {
6919
                  return false;
6920
              }
6921
          }
6922
          if (isDef(data)) {
6923
              if (isDef((i = data.hook)) && isDef((i = i.init)))
6924
                  i(vnode, true /* hydrating */);
6925
              if (isDef((i = vnode.componentInstance))) {
6926
                  // child component. it should have hydrated its own tree.
6927
                  initComponent(vnode, insertedVnodeQueue);
6928
                  return true;
6929
              }
6930
          }
6931
          if (isDef(tag)) {
6932
              if (isDef(children)) {
6933
                  // empty element, allow client to pick up and populate children
6934
                  if (!elm.hasChildNodes()) {
6935
                      createChildren(vnode, children, insertedVnodeQueue);
6936
                  }
6937
                  else {
6938
                      // v-html and domProps: innerHTML
6939
                      if (isDef((i = data)) &&
6940
                          isDef((i = i.domProps)) &&
6941
                          isDef((i = i.innerHTML))) {
6942
                          if (i !== elm.innerHTML) {
6943
                              /* istanbul ignore if */
6944
                              if (typeof console !== 'undefined' &&
6945
                                  !hydrationBailed) {
6946
                                  hydrationBailed = true;
6947
                                  console.warn('Parent: ', elm);
6948
                                  console.warn('server innerHTML: ', i);
6949
                                  console.warn('client innerHTML: ', elm.innerHTML);
6950
                              }
6951
                              return false;
6952
                          }
6953
                      }
6954
                      else {
6955
                          // iterate and compare children lists
6956
                          var childrenMatch = true;
6957
                          var childNode = elm.firstChild;
6958
                          for (var i_7 = 0; i_7 < children.length; i_7++) {
6959
                              if (!childNode ||
6960
                                  !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {
6961
                                  childrenMatch = false;
6962
                                  break;
6963
                              }
6964
                              childNode = childNode.nextSibling;
6965
                          }
6966
                          // if childNode is not null, it means the actual childNodes list is
6967
                          // longer than the virtual children list.
6968
                          if (!childrenMatch || childNode) {
6969
                              /* istanbul ignore if */
6970
                              if (typeof console !== 'undefined' &&
6971
                                  !hydrationBailed) {
6972
                                  hydrationBailed = true;
6973
                                  console.warn('Parent: ', elm);
6974
                                  console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
6975
                              }
6976
                              return false;
6977
                          }
6978
                      }
6979
                  }
6980
              }
6981
              if (isDef(data)) {
6982
                  var fullInvoke = false;
6983
                  for (var key in data) {
6984
                      if (!isRenderedModule(key)) {
6985
                          fullInvoke = true;
6986
                          invokeCreateHooks(vnode, insertedVnodeQueue);
6987
                          break;
6988
                      }
6989
                  }
6990
                  if (!fullInvoke && data['class']) {
6991
                      // ensure collecting deps for deep class bindings for future updates
6992
                      traverse(data['class']);
6993
                  }
6994
              }
6995
          }
6996
          else if (elm.data !== vnode.text) {
6997
              elm.data = vnode.text;
6998
          }
6999
          return true;
7000
      }
7001
      function assertNodeMatch(node, vnode, inVPre) {
7002
          if (isDef(vnode.tag)) {
7003
              return (vnode.tag.indexOf('vue-component') === 0 ||
7004
                  (!isUnknownElement(vnode, inVPre) &&
7005
                      vnode.tag.toLowerCase() ===
7006
                          (node.tagName && node.tagName.toLowerCase())));
7007
          }
7008
          else {
7009
              return node.nodeType === (vnode.isComment ? 8 : 3);
7010
          }
7011
      }
7012
      return function patch(oldVnode, vnode, hydrating, removeOnly) {
7013
          if (isUndef(vnode)) {
7014
              if (isDef(oldVnode))
7015
                  invokeDestroyHook(oldVnode);
7016
              return;
7017
          }
7018
          var isInitialPatch = false;
7019
          var insertedVnodeQueue = [];
7020
          if (isUndef(oldVnode)) {
7021
              // empty mount (likely as component), create new root element
7022
              isInitialPatch = true;
7023
              createElm(vnode, insertedVnodeQueue);
7024
          }
7025
          else {
7026
              var isRealElement = isDef(oldVnode.nodeType);
7027
              if (!isRealElement && sameVnode(oldVnode, vnode)) {
7028
                  // patch existing root node
7029
                  patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
7030
              }
7031
              else {
7032
                  if (isRealElement) {
7033
                      // mounting to a real element
7034
                      // check if this is server-rendered content and if we can perform
7035
                      // a successful hydration.
7036
                      if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
7037
                          oldVnode.removeAttribute(SSR_ATTR);
7038
                          hydrating = true;
7039
                      }
7040
                      if (isTrue(hydrating)) {
7041
                          if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
7042
                              invokeInsertHook(vnode, insertedVnodeQueue, true);
7043
                              return oldVnode;
7044
                          }
7045
                          else {
7046
                              warn$2('The client-side rendered virtual DOM tree is not matching ' +
7047
                                  'server-rendered content. This is likely caused by incorrect ' +
7048
                                  'HTML markup, for example nesting block-level elements inside ' +
7049
                                  '<p>, or missing <tbody>. Bailing hydration and performing ' +
7050
                                  'full client-side render.');
7051
                          }
7052
                      }
7053
                      // either not server-rendered, or hydration failed.
7054
                      // create an empty node and replace it
7055
                      oldVnode = emptyNodeAt(oldVnode);
7056
                  }
7057
                  // replacing existing element
7058
                  var oldElm = oldVnode.elm;
7059
                  var parentElm = nodeOps.parentNode(oldElm);
7060
                  // create new node
7061
                  createElm(vnode, insertedVnodeQueue, 
7062
                  // extremely rare edge case: do not insert if old element is in a
7063
                  // leaving transition. Only happens when combining transition +
7064
                  // keep-alive + HOCs. (#4590)
7065
                  oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));
7066
                  // update parent placeholder node element, recursively
7067
                  if (isDef(vnode.parent)) {
7068
                      var ancestor = vnode.parent;
7069
                      var patchable = isPatchable(vnode);
7070
                      while (ancestor) {
7071
                          for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {
7072
                              cbs.destroy[i_8](ancestor);
7073
                          }
7074
                          ancestor.elm = vnode.elm;
7075
                          if (patchable) {
7076
                              for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {
7077
                                  cbs.create[i_9](emptyNode, ancestor);
7078
                              }
7079
                              // #6513
7080
                              // invoke insert hooks that may have been merged by create hooks.
7081
                              // e.g. for directives that uses the "inserted" hook.
7082
                              var insert_1 = ancestor.data.hook.insert;
7083
                              if (insert_1.merged) {
7084
                                  // start at index 1 to avoid re-invoking component mounted hook
7085
                                  for (var i_10 = 1; i_10 < insert_1.fns.length; i_10++) {
7086
                                      insert_1.fns[i_10]();
7087
                                  }
7088
                              }
7089
                          }
7090
                          else {
7091
                              registerRef(ancestor);
7092
                          }
7093
                          ancestor = ancestor.parent;
7094
                      }
7095
                  }
7096
                  // destroy old node
7097
                  if (isDef(parentElm)) {
7098
                      removeVnodes([oldVnode], 0, 0);
7099
                  }
7100
                  else if (isDef(oldVnode.tag)) {
7101
                      invokeDestroyHook(oldVnode);
7102
                  }
7103
              }
7104
          }
7105
          invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
7106
          return vnode.elm;
7107
      };
7108
  }
7109

7110
  var directives$1 = {
7111
      create: updateDirectives,
7112
      update: updateDirectives,
7113
      destroy: function unbindDirectives(vnode) {
7114
          // @ts-expect-error emptyNode is not VNodeWithData
7115
          updateDirectives(vnode, emptyNode);
7116
      }
7117
  };
7118
  function updateDirectives(oldVnode, vnode) {
7119
      if (oldVnode.data.directives || vnode.data.directives) {
7120
          _update(oldVnode, vnode);
7121
      }
7122
  }
7123
  function _update(oldVnode, vnode) {
7124
      var isCreate = oldVnode === emptyNode;
7125
      var isDestroy = vnode === emptyNode;
7126
      var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);
7127
      var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);
7128
      var dirsWithInsert = [];
7129
      var dirsWithPostpatch = [];
7130
      var key, oldDir, dir;
7131
      for (key in newDirs) {
7132
          oldDir = oldDirs[key];
7133
          dir = newDirs[key];
7134
          if (!oldDir) {
7135
              // new directive, bind
7136
              callHook(dir, 'bind', vnode, oldVnode);
7137
              if (dir.def && dir.def.inserted) {
7138
                  dirsWithInsert.push(dir);
7139
              }
7140
          }
7141
          else {
7142
              // existing directive, update
7143
              dir.oldValue = oldDir.value;
7144
              dir.oldArg = oldDir.arg;
7145
              callHook(dir, 'update', vnode, oldVnode);
7146
              if (dir.def && dir.def.componentUpdated) {
7147
                  dirsWithPostpatch.push(dir);
7148
              }
7149
          }
7150
      }
7151
      if (dirsWithInsert.length) {
7152
          var callInsert = function () {
7153
              for (var i = 0; i < dirsWithInsert.length; i++) {
7154
                  callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);
7155
              }
7156
          };
7157
          if (isCreate) {
7158
              mergeVNodeHook(vnode, 'insert', callInsert);
7159
          }
7160
          else {
7161
              callInsert();
7162
          }
7163
      }
7164
      if (dirsWithPostpatch.length) {
7165
          mergeVNodeHook(vnode, 'postpatch', function () {
7166
              for (var i = 0; i < dirsWithPostpatch.length; i++) {
7167
                  callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
7168
              }
7169
          });
7170
      }
7171
      if (!isCreate) {
7172
          for (key in oldDirs) {
7173
              if (!newDirs[key]) {
7174
                  // no longer present, unbind
7175
                  callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
7176
              }
7177
          }
7178
      }
7179
  }
7180
  var emptyModifiers = Object.create(null);
7181
  function normalizeDirectives(dirs, vm) {
7182
      var res = Object.create(null);
7183
      if (!dirs) {
7184
          // $flow-disable-line
7185
          return res;
7186
      }
7187
      var i, dir;
7188
      for (i = 0; i < dirs.length; i++) {
7189
          dir = dirs[i];
7190
          if (!dir.modifiers) {
7191
              // $flow-disable-line
7192
              dir.modifiers = emptyModifiers;
7193
          }
7194
          res[getRawDirName(dir)] = dir;
7195
          if (vm._setupState && vm._setupState.__sfc) {
7196
              dir.def = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);
7197
          }
7198
          dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);
7199
      }
7200
      // $flow-disable-line
7201
      return res;
7202
  }
7203
  function getRawDirName(dir) {
7204
      return (dir.rawName || "".concat(dir.name, ".").concat(Object.keys(dir.modifiers || {}).join('.')));
7205
  }
7206
  function callHook(dir, hook, vnode, oldVnode, isDestroy) {
7207
      var fn = dir.def && dir.def[hook];
7208
      if (fn) {
7209
          try {
7210
              fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
7211
          }
7212
          catch (e) {
7213
              handleError(e, vnode.context, "directive ".concat(dir.name, " ").concat(hook, " hook"));
7214
          }
7215
      }
7216
  }
7217

7218
  var baseModules = [ref, directives$1];
7219

7220
  function updateAttrs(oldVnode, vnode) {
7221
      var opts = vnode.componentOptions;
7222
      if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
7223
          return;
7224
      }
7225
      if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
7226
          return;
7227
      }
7228
      var key, cur, old;
7229
      var elm = vnode.elm;
7230
      var oldAttrs = oldVnode.data.attrs || {};
7231
      var attrs = vnode.data.attrs || {};
7232
      // clone observed objects, as the user probably wants to mutate it
7233
      if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {
7234
          attrs = vnode.data.attrs = extend({}, attrs);
7235
      }
7236
      for (key in attrs) {
7237
          cur = attrs[key];
7238
          old = oldAttrs[key];
7239
          if (old !== cur) {
7240
              setAttr(elm, key, cur, vnode.data.pre);
7241
          }
7242
      }
7243
      // #4391: in IE9, setting type can reset value for input[type=radio]
7244
      // #6666: IE/Edge forces progress value down to 1 before setting a max
7245
      /* istanbul ignore if */
7246
      if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
7247
          setAttr(elm, 'value', attrs.value);
7248
      }
7249
      for (key in oldAttrs) {
7250
          if (isUndef(attrs[key])) {
7251
              if (isXlink(key)) {
7252
                  elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
7253
              }
7254
              else if (!isEnumeratedAttr(key)) {
7255
                  elm.removeAttribute(key);
7256
              }
7257
          }
7258
      }
7259
  }
7260
  function setAttr(el, key, value, isInPre) {
7261
      if (isInPre || el.tagName.indexOf('-') > -1) {
7262
          baseSetAttr(el, key, value);
7263
      }
7264
      else if (isBooleanAttr(key)) {
7265
          // set attribute for blank value
7266
          // e.g. <option disabled>Select one</option>
7267
          if (isFalsyAttrValue(value)) {
7268
              el.removeAttribute(key);
7269
          }
7270
          else {
7271
              // technically allowfullscreen is a boolean attribute for <iframe>,
7272
              // but Flash expects a value of "true" when used on <embed> tag
7273
              value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;
7274
              el.setAttribute(key, value);
7275
          }
7276
      }
7277
      else if (isEnumeratedAttr(key)) {
7278
          el.setAttribute(key, convertEnumeratedValue(key, value));
7279
      }
7280
      else if (isXlink(key)) {
7281
          if (isFalsyAttrValue(value)) {
7282
              el.removeAttributeNS(xlinkNS, getXlinkProp(key));
7283
          }
7284
          else {
7285
              el.setAttributeNS(xlinkNS, key, value);
7286
          }
7287
      }
7288
      else {
7289
          baseSetAttr(el, key, value);
7290
      }
7291
  }
7292
  function baseSetAttr(el, key, value) {
7293
      if (isFalsyAttrValue(value)) {
7294
          el.removeAttribute(key);
7295
      }
7296
      else {
7297
          // #7138: IE10 & 11 fires input event when setting placeholder on
7298
          // <textarea>... block the first input event and remove the blocker
7299
          // immediately.
7300
          /* istanbul ignore if */
7301
          if (isIE &&
7302
              !isIE9 &&
7303
              el.tagName === 'TEXTAREA' &&
7304
              key === 'placeholder' &&
7305
              value !== '' &&
7306
              !el.__ieph) {
7307
              var blocker_1 = function (e) {
7308
                  e.stopImmediatePropagation();
7309
                  el.removeEventListener('input', blocker_1);
7310
              };
7311
              el.addEventListener('input', blocker_1);
7312
              // $flow-disable-line
7313
              el.__ieph = true; /* IE placeholder patched */
7314
          }
7315
          el.setAttribute(key, value);
7316
      }
7317
  }
7318
  var attrs = {
7319
      create: updateAttrs,
7320
      update: updateAttrs
7321
  };
7322

7323
  function updateClass(oldVnode, vnode) {
7324
      var el = vnode.elm;
7325
      var data = vnode.data;
7326
      var oldData = oldVnode.data;
7327
      if (isUndef(data.staticClass) &&
7328
          isUndef(data.class) &&
7329
          (isUndef(oldData) ||
7330
              (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {
7331
          return;
7332
      }
7333
      var cls = genClassForVnode(vnode);
7334
      // handle transition classes
7335
      var transitionClass = el._transitionClasses;
7336
      if (isDef(transitionClass)) {
7337
          cls = concat(cls, stringifyClass(transitionClass));
7338
      }
7339
      // set the class
7340
      if (cls !== el._prevClass) {
7341
          el.setAttribute('class', cls);
7342
          el._prevClass = cls;
7343
      }
7344
  }
7345
  var klass$1 = {
7346
      create: updateClass,
7347
      update: updateClass
7348
  };
7349

7350
  var validDivisionCharRE = /[\w).+\-_$\]]/;
7351
  function parseFilters(exp) {
7352
      var inSingle = false;
7353
      var inDouble = false;
7354
      var inTemplateString = false;
7355
      var inRegex = false;
7356
      var curly = 0;
7357
      var square = 0;
7358
      var paren = 0;
7359
      var lastFilterIndex = 0;
7360
      var c, prev, i, expression, filters;
7361
      for (i = 0; i < exp.length; i++) {
7362
          prev = c;
7363
          c = exp.charCodeAt(i);
7364
          if (inSingle) {
7365
              if (c === 0x27 && prev !== 0x5c)
7366
                  inSingle = false;
7367
          }
7368
          else if (inDouble) {
7369
              if (c === 0x22 && prev !== 0x5c)
7370
                  inDouble = false;
7371
          }
7372
          else if (inTemplateString) {
7373
              if (c === 0x60 && prev !== 0x5c)
7374
                  inTemplateString = false;
7375
          }
7376
          else if (inRegex) {
7377
              if (c === 0x2f && prev !== 0x5c)
7378
                  inRegex = false;
7379
          }
7380
          else if (c === 0x7c && // pipe
7381
              exp.charCodeAt(i + 1) !== 0x7c &&
7382
              exp.charCodeAt(i - 1) !== 0x7c &&
7383
              !curly &&
7384
              !square &&
7385
              !paren) {
7386
              if (expression === undefined) {
7387
                  // first filter, end of expression
7388
                  lastFilterIndex = i + 1;
7389
                  expression = exp.slice(0, i).trim();
7390
              }
7391
              else {
7392
                  pushFilter();
7393
              }
7394
          }
7395
          else {
7396
              switch (c) {
7397
                  case 0x22:
7398
                      inDouble = true;
7399
                      break; // "
7400
                  case 0x27:
7401
                      inSingle = true;
7402
                      break; // '
7403
                  case 0x60:
7404
                      inTemplateString = true;
7405
                      break; // `
7406
                  case 0x28:
7407
                      paren++;
7408
                      break; // (
7409
                  case 0x29:
7410
                      paren--;
7411
                      break; // )
7412
                  case 0x5b:
7413
                      square++;
7414
                      break; // [
7415
                  case 0x5d:
7416
                      square--;
7417
                      break; // ]
7418
                  case 0x7b:
7419
                      curly++;
7420
                      break; // {
7421
                  case 0x7d:
7422
                      curly--;
7423
                      break; // }
7424
              }
7425
              if (c === 0x2f) {
7426
                  // /
7427
                  var j = i - 1;
7428
                  var p 
7429
                  // find first non-whitespace prev char
7430
                  = void 0;
7431
                  // find first non-whitespace prev char
7432
                  for (; j >= 0; j--) {
7433
                      p = exp.charAt(j);
7434
                      if (p !== ' ')
7435
                          break;
7436
                  }
7437
                  if (!p || !validDivisionCharRE.test(p)) {
7438
                      inRegex = true;
7439
                  }
7440
              }
7441
          }
7442
      }
7443
      if (expression === undefined) {
7444
          expression = exp.slice(0, i).trim();
7445
      }
7446
      else if (lastFilterIndex !== 0) {
7447
          pushFilter();
7448
      }
7449
      function pushFilter() {
7450
          (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
7451
          lastFilterIndex = i + 1;
7452
      }
7453
      if (filters) {
7454
          for (i = 0; i < filters.length; i++) {
7455
              expression = wrapFilter(expression, filters[i]);
7456
          }
7457
      }
7458
      return expression;
7459
  }
7460
  function wrapFilter(exp, filter) {
7461
      var i = filter.indexOf('(');
7462
      if (i < 0) {
7463
          // _f: resolveFilter
7464
          return "_f(\"".concat(filter, "\")(").concat(exp, ")");
7465
      }
7466
      else {
7467
          var name_1 = filter.slice(0, i);
7468
          var args = filter.slice(i + 1);
7469
          return "_f(\"".concat(name_1, "\")(").concat(exp).concat(args !== ')' ? ',' + args : args);
7470
      }
7471
  }
7472

7473
  /* eslint-disable no-unused-vars */
7474
  function baseWarn(msg, range) {
7475
      console.error("[Vue compiler]: ".concat(msg));
7476
  }
7477
  /* eslint-enable no-unused-vars */
7478
  function pluckModuleFunction(modules, key) {
7479
      return modules ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) : [];
7480
  }
7481
  function addProp(el, name, value, range, dynamic) {
7482
      (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
7483
      el.plain = false;
7484
  }
7485
  function addAttr(el, name, value, range, dynamic) {
7486
      var attrs = dynamic
7487
          ? el.dynamicAttrs || (el.dynamicAttrs = [])
7488
          : el.attrs || (el.attrs = []);
7489
      attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
7490
      el.plain = false;
7491
  }
7492
  // add a raw attr (use this in preTransforms)
7493
  function addRawAttr(el, name, value, range) {
7494
      el.attrsMap[name] = value;
7495
      el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
7496
  }
7497
  function addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {
7498
      (el.directives || (el.directives = [])).push(rangeSetItem({
7499
          name: name,
7500
          rawName: rawName,
7501
          value: value,
7502
          arg: arg,
7503
          isDynamicArg: isDynamicArg,
7504
          modifiers: modifiers
7505
      }, range));
7506
      el.plain = false;
7507
  }
7508
  function prependModifierMarker(symbol, name, dynamic) {
7509
      return dynamic ? "_p(".concat(name, ",\"").concat(symbol, "\")") : symbol + name; // mark the event as captured
7510
  }
7511
  function addHandler(el, name, value, modifiers, important, warn, range, dynamic) {
7512
      modifiers = modifiers || emptyObject;
7513
      // warn prevent and passive modifier
7514
      /* istanbul ignore if */
7515
      if (warn && modifiers.prevent && modifiers.passive) {
7516
          warn("passive and prevent can't be used together. " +
7517
              "Passive handler can't prevent default event.", range);
7518
      }
7519
      // normalize click.right and click.middle since they don't actually fire
7520
      // this is technically browser-specific, but at least for now browsers are
7521
      // the only target envs that have right/middle clicks.
7522
      if (modifiers.right) {
7523
          if (dynamic) {
7524
              name = "(".concat(name, ")==='click'?'contextmenu':(").concat(name, ")");
7525
          }
7526
          else if (name === 'click') {
7527
              name = 'contextmenu';
7528
              delete modifiers.right;
7529
          }
7530
      }
7531
      else if (modifiers.middle) {
7532
          if (dynamic) {
7533
              name = "(".concat(name, ")==='click'?'mouseup':(").concat(name, ")");
7534
          }
7535
          else if (name === 'click') {
7536
              name = 'mouseup';
7537
          }
7538
      }
7539
      // check capture modifier
7540
      if (modifiers.capture) {
7541
          delete modifiers.capture;
7542
          name = prependModifierMarker('!', name, dynamic);
7543
      }
7544
      if (modifiers.once) {
7545
          delete modifiers.once;
7546
          name = prependModifierMarker('~', name, dynamic);
7547
      }
7548
      /* istanbul ignore if */
7549
      if (modifiers.passive) {
7550
          delete modifiers.passive;
7551
          name = prependModifierMarker('&', name, dynamic);
7552
      }
7553
      var events;
7554
      if (modifiers.native) {
7555
          delete modifiers.native;
7556
          events = el.nativeEvents || (el.nativeEvents = {});
7557
      }
7558
      else {
7559
          events = el.events || (el.events = {});
7560
      }
7561
      var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
7562
      if (modifiers !== emptyObject) {
7563
          newHandler.modifiers = modifiers;
7564
      }
7565
      var handlers = events[name];
7566
      /* istanbul ignore if */
7567
      if (Array.isArray(handlers)) {
7568
          important ? handlers.unshift(newHandler) : handlers.push(newHandler);
7569
      }
7570
      else if (handlers) {
7571
          events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
7572
      }
7573
      else {
7574
          events[name] = newHandler;
7575
      }
7576
      el.plain = false;
7577
  }
7578
  function getRawBindingAttr(el, name) {
7579
      return (el.rawAttrsMap[':' + name] ||
7580
          el.rawAttrsMap['v-bind:' + name] ||
7581
          el.rawAttrsMap[name]);
7582
  }
7583
  function getBindingAttr(el, name, getStatic) {
7584
      var dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);
7585
      if (dynamicValue != null) {
7586
          return parseFilters(dynamicValue);
7587
      }
7588
      else if (getStatic !== false) {
7589
          var staticValue = getAndRemoveAttr(el, name);
7590
          if (staticValue != null) {
7591
              return JSON.stringify(staticValue);
7592
          }
7593
      }
7594
  }
7595
  // note: this only removes the attr from the Array (attrsList) so that it
7596
  // doesn't get processed by processAttrs.
7597
  // By default it does NOT remove it from the map (attrsMap) because the map is
7598
  // needed during codegen.
7599
  function getAndRemoveAttr(el, name, removeFromMap) {
7600
      var val;
7601
      if ((val = el.attrsMap[name]) != null) {
7602
          var list = el.attrsList;
7603
          for (var i = 0, l = list.length; i < l; i++) {
7604
              if (list[i].name === name) {
7605
                  list.splice(i, 1);
7606
                  break;
7607
              }
7608
          }
7609
      }
7610
      if (removeFromMap) {
7611
          delete el.attrsMap[name];
7612
      }
7613
      return val;
7614
  }
7615
  function getAndRemoveAttrByRegex(el, name) {
7616
      var list = el.attrsList;
7617
      for (var i = 0, l = list.length; i < l; i++) {
7618
          var attr = list[i];
7619
          if (name.test(attr.name)) {
7620
              list.splice(i, 1);
7621
              return attr;
7622
          }
7623
      }
7624
  }
7625
  function rangeSetItem(item, range) {
7626
      if (range) {
7627
          if (range.start != null) {
7628
              item.start = range.start;
7629
          }
7630
          if (range.end != null) {
7631
              item.end = range.end;
7632
          }
7633
      }
7634
      return item;
7635
  }
7636

7637
  /**
7638
   * Cross-platform code generation for component v-model
7639
   */
7640
  function genComponentModel(el, value, modifiers) {
7641
      var _a = modifiers || {}, number = _a.number, trim = _a.trim;
7642
      var baseValueExpression = '$$v';
7643
      var valueExpression = baseValueExpression;
7644
      if (trim) {
7645
          valueExpression =
7646
              "(typeof ".concat(baseValueExpression, " === 'string'") +
7647
                  "? ".concat(baseValueExpression, ".trim()") +
7648
                  ": ".concat(baseValueExpression, ")");
7649
      }
7650
      if (number) {
7651
          valueExpression = "_n(".concat(valueExpression, ")");
7652
      }
7653
      var assignment = genAssignmentCode(value, valueExpression);
7654
      el.model = {
7655
          value: "(".concat(value, ")"),
7656
          expression: JSON.stringify(value),
7657
          callback: "function (".concat(baseValueExpression, ") {").concat(assignment, "}")
7658
      };
7659
  }
7660
  /**
7661
   * Cross-platform codegen helper for generating v-model value assignment code.
7662
   */
7663
  function genAssignmentCode(value, assignment) {
7664
      var res = parseModel(value);
7665
      if (res.key === null) {
7666
          return "".concat(value, "=").concat(assignment);
7667
      }
7668
      else {
7669
          return "$set(".concat(res.exp, ", ").concat(res.key, ", ").concat(assignment, ")");
7670
      }
7671
  }
7672
  /**
7673
   * Parse a v-model expression into a base path and a final key segment.
7674
   * Handles both dot-path and possible square brackets.
7675
   *
7676
   * Possible cases:
7677
   *
7678
   * - test
7679
   * - test[key]
7680
   * - test[test1[key]]
7681
   * - test["a"][key]
7682
   * - xxx.test[a[a].test1[key]]
7683
   * - test.xxx.a["asa"][test1[key]]
7684
   *
7685
   */
7686
  var len, str, chr, index, expressionPos, expressionEndPos;
7687
  function parseModel(val) {
7688
      // Fix https://github.com/vuejs/vue/pull/7730
7689
      // allow v-model="obj.val " (trailing whitespace)
7690
      val = val.trim();
7691
      len = val.length;
7692
      if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
7693
          index = val.lastIndexOf('.');
7694
          if (index > -1) {
7695
              return {
7696
                  exp: val.slice(0, index),
7697
                  key: '"' + val.slice(index + 1) + '"'
7698
              };
7699
          }
7700
          else {
7701
              return {
7702
                  exp: val,
7703
                  key: null
7704
              };
7705
          }
7706
      }
7707
      str = val;
7708
      index = expressionPos = expressionEndPos = 0;
7709
      while (!eof()) {
7710
          chr = next();
7711
          /* istanbul ignore if */
7712
          if (isStringStart(chr)) {
7713
              parseString(chr);
7714
          }
7715
          else if (chr === 0x5b) {
7716
              parseBracket(chr);
7717
          }
7718
      }
7719
      return {
7720
          exp: val.slice(0, expressionPos),
7721
          key: val.slice(expressionPos + 1, expressionEndPos)
7722
      };
7723
  }
7724
  function next() {
7725
      return str.charCodeAt(++index);
7726
  }
7727
  function eof() {
7728
      return index >= len;
7729
  }
7730
  function isStringStart(chr) {
7731
      return chr === 0x22 || chr === 0x27;
7732
  }
7733
  function parseBracket(chr) {
7734
      var inBracket = 1;
7735
      expressionPos = index;
7736
      while (!eof()) {
7737
          chr = next();
7738
          if (isStringStart(chr)) {
7739
              parseString(chr);
7740
              continue;
7741
          }
7742
          if (chr === 0x5b)
7743
              inBracket++;
7744
          if (chr === 0x5d)
7745
              inBracket--;
7746
          if (inBracket === 0) {
7747
              expressionEndPos = index;
7748
              break;
7749
          }
7750
      }
7751
  }
7752
  function parseString(chr) {
7753
      var stringQuote = chr;
7754
      while (!eof()) {
7755
          chr = next();
7756
          if (chr === stringQuote) {
7757
              break;
7758
          }
7759
      }
7760
  }
7761

7762
  var warn$1;
7763
  // in some cases, the event used has to be determined at runtime
7764
  // so we used some reserved tokens during compile.
7765
  var RANGE_TOKEN = '__r';
7766
  var CHECKBOX_RADIO_TOKEN = '__c';
7767
  function model$1(el, dir, _warn) {
7768
      warn$1 = _warn;
7769
      var value = dir.value;
7770
      var modifiers = dir.modifiers;
7771
      var tag = el.tag;
7772
      var type = el.attrsMap.type;
7773
      {
7774
          // inputs with type="file" are read only and setting the input's
7775
          // value will throw an error.
7776
          if (tag === 'input' && type === 'file') {
7777
              warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\" type=\"file\">:\n") +
7778
                  "File inputs are read only. Use a v-on:change listener instead.", el.rawAttrsMap['v-model']);
7779
          }
7780
      }
7781
      if (el.component) {
7782
          genComponentModel(el, value, modifiers);
7783
          // component v-model doesn't need extra runtime
7784
          return false;
7785
      }
7786
      else if (tag === 'select') {
7787
          genSelect(el, value, modifiers);
7788
      }
7789
      else if (tag === 'input' && type === 'checkbox') {
7790
          genCheckboxModel(el, value, modifiers);
7791
      }
7792
      else if (tag === 'input' && type === 'radio') {
7793
          genRadioModel(el, value, modifiers);
7794
      }
7795
      else if (tag === 'input' || tag === 'textarea') {
7796
          genDefaultModel(el, value, modifiers);
7797
      }
7798
      else if (!config.isReservedTag(tag)) {
7799
          genComponentModel(el, value, modifiers);
7800
          // component v-model doesn't need extra runtime
7801
          return false;
7802
      }
7803
      else {
7804
          warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +
7805
              "v-model is not supported on this element type. " +
7806
              "If you are working with contenteditable, it's recommended to " +
7807
              'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);
7808
      }
7809
      // ensure runtime directive metadata
7810
      return true;
7811
  }
7812
  function genCheckboxModel(el, value, modifiers) {
7813
      var number = modifiers && modifiers.number;
7814
      var valueBinding = getBindingAttr(el, 'value') || 'null';
7815
      var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
7816
      var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
7817
      addProp(el, 'checked', "Array.isArray(".concat(value, ")") +
7818
          "?_i(".concat(value, ",").concat(valueBinding, ")>-1") +
7819
          (trueValueBinding === 'true'
7820
              ? ":(".concat(value, ")")
7821
              : ":_q(".concat(value, ",").concat(trueValueBinding, ")")));
7822
      addHandler(el, 'change', "var $$a=".concat(value, ",") +
7823
          '$$el=$event.target,' +
7824
          "$$c=$$el.checked?(".concat(trueValueBinding, "):(").concat(falseValueBinding, ");") +
7825
          'if(Array.isArray($$a)){' +
7826
          "var $$v=".concat(number ? '_n(' + valueBinding + ')' : valueBinding, ",") +
7827
          '$$i=_i($$a,$$v);' +
7828
          "if($$el.checked){$$i<0&&(".concat(genAssignmentCode(value, '$$a.concat([$$v])'), ")}") +
7829
          "else{$$i>-1&&(".concat(genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))'), ")}") +
7830
          "}else{".concat(genAssignmentCode(value, '$$c'), "}"), null, true);
7831
  }
7832
  function genRadioModel(el, value, modifiers) {
7833
      var number = modifiers && modifiers.number;
7834
      var valueBinding = getBindingAttr(el, 'value') || 'null';
7835
      valueBinding = number ? "_n(".concat(valueBinding, ")") : valueBinding;
7836
      addProp(el, 'checked', "_q(".concat(value, ",").concat(valueBinding, ")"));
7837
      addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
7838
  }
7839
  function genSelect(el, value, modifiers) {
7840
      var number = modifiers && modifiers.number;
7841
      var selectedVal = "Array.prototype.filter" +
7842
          ".call($event.target.options,function(o){return o.selected})" +
7843
          ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
7844
          "return ".concat(number ? '_n(val)' : 'val', "})");
7845
      var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
7846
      var code = "var $$selectedVal = ".concat(selectedVal, ";");
7847
      code = "".concat(code, " ").concat(genAssignmentCode(value, assignment));
7848
      addHandler(el, 'change', code, null, true);
7849
  }
7850
  function genDefaultModel(el, value, modifiers) {
7851
      var type = el.attrsMap.type;
7852
      // warn if v-bind:value conflicts with v-model
7853
      // except for inputs with v-bind:type
7854
      {
7855
          var value_1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
7856
          var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
7857
          if (value_1 && !typeBinding) {
7858
              var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
7859
              warn$1("".concat(binding, "=\"").concat(value_1, "\" conflicts with v-model on the same element ") +
7860
                  'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);
7861
          }
7862
      }
7863
      var _a = modifiers || {}, lazy = _a.lazy, number = _a.number, trim = _a.trim;
7864
      var needCompositionGuard = !lazy && type !== 'range';
7865
      var event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';
7866
      var valueExpression = '$event.target.value';
7867
      if (trim) {
7868
          valueExpression = "$event.target.value.trim()";
7869
      }
7870
      if (number) {
7871
          valueExpression = "_n(".concat(valueExpression, ")");
7872
      }
7873
      var code = genAssignmentCode(value, valueExpression);
7874
      if (needCompositionGuard) {
7875
          code = "if($event.target.composing)return;".concat(code);
7876
      }
7877
      addProp(el, 'value', "(".concat(value, ")"));
7878
      addHandler(el, event, code, null, true);
7879
      if (trim || number) {
7880
          addHandler(el, 'blur', '$forceUpdate()');
7881
      }
7882
  }
7883

7884
  // normalize v-model event tokens that can only be determined at runtime.
7885
  // it's important to place the event as the first in the array because
7886
  // the whole point is ensuring the v-model callback gets called before
7887
  // user-attached handlers.
7888
  function normalizeEvents(on) {
7889
      /* istanbul ignore if */
7890
      if (isDef(on[RANGE_TOKEN])) {
7891
          // IE input[type=range] only supports `change` event
7892
          var event_1 = isIE ? 'change' : 'input';
7893
          on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);
7894
          delete on[RANGE_TOKEN];
7895
      }
7896
      // This was originally intended to fix #4521 but no longer necessary
7897
      // after 2.5. Keeping it for backwards compat with generated code from < 2.4
7898
      /* istanbul ignore if */
7899
      if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
7900
          on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
7901
          delete on[CHECKBOX_RADIO_TOKEN];
7902
      }
7903
  }
7904
  var target;
7905
  function createOnceHandler(event, handler, capture) {
7906
      var _target = target; // save current target element in closure
7907
      return function onceHandler() {
7908
          var res = handler.apply(null, arguments);
7909
          if (res !== null) {
7910
              remove(event, onceHandler, capture, _target);
7911
          }
7912
      };
7913
  }
7914
  // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
7915
  // implementation and does not fire microtasks in between event propagation, so
7916
  // safe to exclude.
7917
  var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
7918
  function add(name, handler, capture, passive) {
7919
      // async edge case #6566: inner click event triggers patch, event handler
7920
      // attached to outer element during patch, and triggered again. This
7921
      // happens because browsers fire microtask ticks between event propagation.
7922
      // the solution is simple: we save the timestamp when a handler is attached,
7923
      // and the handler would only fire if the event passed to it was fired
7924
      // AFTER it was attached.
7925
      if (useMicrotaskFix) {
7926
          var attachedTimestamp_1 = currentFlushTimestamp;
7927
          var original_1 = handler;
7928
          //@ts-expect-error
7929
          handler = original_1._wrapper = function (e) {
7930
              if (
7931
              // no bubbling, should always fire.
7932
              // this is just a safety net in case event.timeStamp is unreliable in
7933
              // certain weird environments...
7934
              e.target === e.currentTarget ||
7935
                  // event is fired after handler attachment
7936
                  e.timeStamp >= attachedTimestamp_1 ||
7937
                  // bail for environments that have buggy event.timeStamp implementations
7938
                  // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
7939
                  // #9681 QtWebEngine event.timeStamp is negative value
7940
                  e.timeStamp <= 0 ||
7941
                  // #9448 bail if event is fired in another document in a multi-page
7942
                  // electron/nw.js app, since event.timeStamp will be using a different
7943
                  // starting reference
7944
                  e.target.ownerDocument !== document) {
7945
                  return original_1.apply(this, arguments);
7946
              }
7947
          };
7948
      }
7949
      target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);
7950
  }
7951
  function remove(name, handler, capture, _target) {
7952
      (_target || target).removeEventListener(name, 
7953
      //@ts-expect-error
7954
      handler._wrapper || handler, capture);
7955
  }
7956
  function updateDOMListeners(oldVnode, vnode) {
7957
      if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
7958
          return;
7959
      }
7960
      var on = vnode.data.on || {};
7961
      var oldOn = oldVnode.data.on || {};
7962
      // vnode is empty when removing all listeners,
7963
      // and use old vnode dom element
7964
      target = vnode.elm || oldVnode.elm;
7965
      normalizeEvents(on);
7966
      updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);
7967
      target = undefined;
7968
  }
7969
  var events = {
7970
      create: updateDOMListeners,
7971
      update: updateDOMListeners,
7972
      // @ts-expect-error emptyNode has actually data
7973
      destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }
7974
  };
7975

7976
  var svgContainer;
7977
  function updateDOMProps(oldVnode, vnode) {
7978
      if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
7979
          return;
7980
      }
7981
      var key, cur;
7982
      var elm = vnode.elm;
7983
      var oldProps = oldVnode.data.domProps || {};
7984
      var props = vnode.data.domProps || {};
7985
      // clone observed objects, as the user probably wants to mutate it
7986
      if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {
7987
          props = vnode.data.domProps = extend({}, props);
7988
      }
7989
      for (key in oldProps) {
7990
          if (!(key in props)) {
7991
              elm[key] = '';
7992
          }
7993
      }
7994
      for (key in props) {
7995
          cur = props[key];
7996
          // ignore children if the node has textContent or innerHTML,
7997
          // as these will throw away existing DOM nodes and cause removal errors
7998
          // on subsequent patches (#3360)
7999
          if (key === 'textContent' || key === 'innerHTML') {
8000
              if (vnode.children)
8001
                  vnode.children.length = 0;
8002
              if (cur === oldProps[key])
8003
                  continue;
8004
              // #6601 work around Chrome version <= 55 bug where single textNode
8005
              // replaced by innerHTML/textContent retains its parentNode property
8006
              if (elm.childNodes.length === 1) {
8007
                  elm.removeChild(elm.childNodes[0]);
8008
              }
8009
          }
8010
          if (key === 'value' && elm.tagName !== 'PROGRESS') {
8011
              // store value as _value as well since
8012
              // non-string values will be stringified
8013
              elm._value = cur;
8014
              // avoid resetting cursor position when value is the same
8015
              var strCur = isUndef(cur) ? '' : String(cur);
8016
              if (shouldUpdateValue(elm, strCur)) {
8017
                  elm.value = strCur;
8018
              }
8019
          }
8020
          else if (key === 'innerHTML' &&
8021
              isSVG(elm.tagName) &&
8022
              isUndef(elm.innerHTML)) {
8023
              // IE doesn't support innerHTML for SVG elements
8024
              svgContainer = svgContainer || document.createElement('div');
8025
              svgContainer.innerHTML = "<svg>".concat(cur, "</svg>");
8026
              var svg = svgContainer.firstChild;
8027
              while (elm.firstChild) {
8028
                  elm.removeChild(elm.firstChild);
8029
              }
8030
              while (svg.firstChild) {
8031
                  elm.appendChild(svg.firstChild);
8032
              }
8033
          }
8034
          else if (
8035
          // skip the update if old and new VDOM state is the same.
8036
          // `value` is handled separately because the DOM value may be temporarily
8037
          // out of sync with VDOM state due to focus, composition and modifiers.
8038
          // This  #4521 by skipping the unnecessary `checked` update.
8039
          cur !== oldProps[key]) {
8040
              // some property updates can throw
8041
              // e.g. `value` on <progress> w/ non-finite value
8042
              try {
8043
                  elm[key] = cur;
8044
              }
8045
              catch (e) { }
8046
          }
8047
      }
8048
  }
8049
  function shouldUpdateValue(elm, checkVal) {
8050
      return (
8051
      //@ts-expect-error
8052
      !elm.composing &&
8053
          (elm.tagName === 'OPTION' ||
8054
              isNotInFocusAndDirty(elm, checkVal) ||
8055
              isDirtyWithModifiers(elm, checkVal)));
8056
  }
8057
  function isNotInFocusAndDirty(elm, checkVal) {
8058
      // return true when textbox (.number and .trim) loses focus and its value is
8059
      // not equal to the updated value
8060
      var notInFocus = true;
8061
      // #6157
8062
      // work around IE bug when accessing document.activeElement in an iframe
8063
      try {
8064
          notInFocus = document.activeElement !== elm;
8065
      }
8066
      catch (e) { }
8067
      return notInFocus && elm.value !== checkVal;
8068
  }
8069
  function isDirtyWithModifiers(elm, newVal) {
8070
      var value = elm.value;
8071
      var modifiers = elm._vModifiers; // injected by v-model runtime
8072
      if (isDef(modifiers)) {
8073
          if (modifiers.number) {
8074
              return toNumber(value) !== toNumber(newVal);
8075
          }
8076
          if (modifiers.trim) {
8077
              return value.trim() !== newVal.trim();
8078
          }
8079
      }
8080
      return value !== newVal;
8081
  }
8082
  var domProps = {
8083
      create: updateDOMProps,
8084
      update: updateDOMProps
8085
  };
8086

8087
  var parseStyleText = cached(function (cssText) {
8088
      var res = {};
8089
      var listDelimiter = /;(?![^(]*\))/g;
8090
      var propertyDelimiter = /:(.+)/;
8091
      cssText.split(listDelimiter).forEach(function (item) {
8092
          if (item) {
8093
              var tmp = item.split(propertyDelimiter);
8094
              tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
8095
          }
8096
      });
8097
      return res;
8098
  });
8099
  // merge static and dynamic style data on the same vnode
8100
  function normalizeStyleData(data) {
8101
      var style = normalizeStyleBinding(data.style);
8102
      // static style is pre-processed into an object during compilation
8103
      // and is always a fresh object, so it's safe to merge into it
8104
      return data.staticStyle ? extend(data.staticStyle, style) : style;
8105
  }
8106
  // normalize possible array / string values into Object
8107
  function normalizeStyleBinding(bindingStyle) {
8108
      if (Array.isArray(bindingStyle)) {
8109
          return toObject(bindingStyle);
8110
      }
8111
      if (typeof bindingStyle === 'string') {
8112
          return parseStyleText(bindingStyle);
8113
      }
8114
      return bindingStyle;
8115
  }
8116
  /**
8117
   * parent component style should be after child's
8118
   * so that parent component's style could override it
8119
   */
8120
  function getStyle(vnode, checkChild) {
8121
      var res = {};
8122
      var styleData;
8123
      if (checkChild) {
8124
          var childNode = vnode;
8125
          while (childNode.componentInstance) {
8126
              childNode = childNode.componentInstance._vnode;
8127
              if (childNode &&
8128
                  childNode.data &&
8129
                  (styleData = normalizeStyleData(childNode.data))) {
8130
                  extend(res, styleData);
8131
              }
8132
          }
8133
      }
8134
      if ((styleData = normalizeStyleData(vnode.data))) {
8135
          extend(res, styleData);
8136
      }
8137
      var parentNode = vnode;
8138
      // @ts-expect-error parentNode.parent not VNodeWithData
8139
      while ((parentNode = parentNode.parent)) {
8140
          if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
8141
              extend(res, styleData);
8142
          }
8143
      }
8144
      return res;
8145
  }
8146

8147
  var cssVarRE = /^--/;
8148
  var importantRE = /\s*!important$/;
8149
  var setProp = function (el, name, val) {
8150
      /* istanbul ignore if */
8151
      if (cssVarRE.test(name)) {
8152
          el.style.setProperty(name, val);
8153
      }
8154
      else if (importantRE.test(val)) {
8155
          el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
8156
      }
8157
      else {
8158
          var normalizedName = normalize(name);
8159
          if (Array.isArray(val)) {
8160
              // Support values array created by autoprefixer, e.g.
8161
              // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
8162
              // Set them one by one, and the browser will only set those it can recognize
8163
              for (var i = 0, len = val.length; i < len; i++) {
8164
                  el.style[normalizedName] = val[i];
8165
              }
8166
          }
8167
          else {
8168
              el.style[normalizedName] = val;
8169
          }
8170
      }
8171
  };
8172
  var vendorNames = ['Webkit', 'Moz', 'ms'];
8173
  var emptyStyle;
8174
  var normalize = cached(function (prop) {
8175
      emptyStyle = emptyStyle || document.createElement('div').style;
8176
      prop = camelize(prop);
8177
      if (prop !== 'filter' && prop in emptyStyle) {
8178
          return prop;
8179
      }
8180
      var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
8181
      for (var i = 0; i < vendorNames.length; i++) {
8182
          var name_1 = vendorNames[i] + capName;
8183
          if (name_1 in emptyStyle) {
8184
              return name_1;
8185
          }
8186
      }
8187
  });
8188
  function updateStyle(oldVnode, vnode) {
8189
      var data = vnode.data;
8190
      var oldData = oldVnode.data;
8191
      if (isUndef(data.staticStyle) &&
8192
          isUndef(data.style) &&
8193
          isUndef(oldData.staticStyle) &&
8194
          isUndef(oldData.style)) {
8195
          return;
8196
      }
8197
      var cur, name;
8198
      var el = vnode.elm;
8199
      var oldStaticStyle = oldData.staticStyle;
8200
      var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
8201
      // if static style exists, stylebinding already merged into it when doing normalizeStyleData
8202
      var oldStyle = oldStaticStyle || oldStyleBinding;
8203
      var style = normalizeStyleBinding(vnode.data.style) || {};
8204
      // store normalized style under a different key for next diff
8205
      // make sure to clone it if it's reactive, since the user likely wants
8206
      // to mutate it.
8207
      vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;
8208
      var newStyle = getStyle(vnode, true);
8209
      for (name in oldStyle) {
8210
          if (isUndef(newStyle[name])) {
8211
              setProp(el, name, '');
8212
          }
8213
      }
8214
      for (name in newStyle) {
8215
          cur = newStyle[name];
8216
          if (cur !== oldStyle[name]) {
8217
              // ie9 setting to null has no effect, must use empty string
8218
              setProp(el, name, cur == null ? '' : cur);
8219
          }
8220
      }
8221
  }
8222
  var style$1 = {
8223
      create: updateStyle,
8224
      update: updateStyle
8225
  };
8226

8227
  var whitespaceRE$1 = /\s+/;
8228
  /**
8229
   * Add class with compatibility for SVG since classList is not supported on
8230
   * SVG elements in IE
8231
   */
8232
  function addClass(el, cls) {
8233
      /* istanbul ignore if */
8234
      if (!cls || !(cls = cls.trim())) {
8235
          return;
8236
      }
8237
      /* istanbul ignore else */
8238
      if (el.classList) {
8239
          if (cls.indexOf(' ') > -1) {
8240
              cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });
8241
          }
8242
          else {
8243
              el.classList.add(cls);
8244
          }
8245
      }
8246
      else {
8247
          var cur = " ".concat(el.getAttribute('class') || '', " ");
8248
          if (cur.indexOf(' ' + cls + ' ') < 0) {
8249
              el.setAttribute('class', (cur + cls).trim());
8250
          }
8251
      }
8252
  }
8253
  /**
8254
   * Remove class with compatibility for SVG since classList is not supported on
8255
   * SVG elements in IE
8256
   */
8257
  function removeClass(el, cls) {
8258
      /* istanbul ignore if */
8259
      if (!cls || !(cls = cls.trim())) {
8260
          return;
8261
      }
8262
      /* istanbul ignore else */
8263
      if (el.classList) {
8264
          if (cls.indexOf(' ') > -1) {
8265
              cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });
8266
          }
8267
          else {
8268
              el.classList.remove(cls);
8269
          }
8270
          if (!el.classList.length) {
8271
              el.removeAttribute('class');
8272
          }
8273
      }
8274
      else {
8275
          var cur = " ".concat(el.getAttribute('class') || '', " ");
8276
          var tar = ' ' + cls + ' ';
8277
          while (cur.indexOf(tar) >= 0) {
8278
              cur = cur.replace(tar, ' ');
8279
          }
8280
          cur = cur.trim();
8281
          if (cur) {
8282
              el.setAttribute('class', cur);
8283
          }
8284
          else {
8285
              el.removeAttribute('class');
8286
          }
8287
      }
8288
  }
8289

8290
  function resolveTransition(def) {
8291
      if (!def) {
8292
          return;
8293
      }
8294
      /* istanbul ignore else */
8295
      if (typeof def === 'object') {
8296
          var res = {};
8297
          if (def.css !== false) {
8298
              extend(res, autoCssTransition(def.name || 'v'));
8299
          }
8300
          extend(res, def);
8301
          return res;
8302
      }
8303
      else if (typeof def === 'string') {
8304
          return autoCssTransition(def);
8305
      }
8306
  }
8307
  var autoCssTransition = cached(function (name) {
8308
      return {
8309
          enterClass: "".concat(name, "-enter"),
8310
          enterToClass: "".concat(name, "-enter-to"),
8311
          enterActiveClass: "".concat(name, "-enter-active"),
8312
          leaveClass: "".concat(name, "-leave"),
8313
          leaveToClass: "".concat(name, "-leave-to"),
8314
          leaveActiveClass: "".concat(name, "-leave-active")
8315
      };
8316
  });
8317
  var hasTransition = inBrowser && !isIE9;
8318
  var TRANSITION = 'transition';
8319
  var ANIMATION = 'animation';
8320
  // Transition property/event sniffing
8321
  var transitionProp = 'transition';
8322
  var transitionEndEvent = 'transitionend';
8323
  var animationProp = 'animation';
8324
  var animationEndEvent = 'animationend';
8325
  if (hasTransition) {
8326
      /* istanbul ignore if */
8327
      if (window.ontransitionend === undefined &&
8328
          window.onwebkittransitionend !== undefined) {
8329
          transitionProp = 'WebkitTransition';
8330
          transitionEndEvent = 'webkitTransitionEnd';
8331
      }
8332
      if (window.onanimationend === undefined &&
8333
          window.onwebkitanimationend !== undefined) {
8334
          animationProp = 'WebkitAnimation';
8335
          animationEndEvent = 'webkitAnimationEnd';
8336
      }
8337
  }
8338
  // binding to window is necessary to make hot reload work in IE in strict mode
8339
  var raf = inBrowser
8340
      ? window.requestAnimationFrame
8341
          ? window.requestAnimationFrame.bind(window)
8342
          : setTimeout
8343
      : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };
8344
  function nextFrame(fn) {
8345
      raf(function () {
8346
          // @ts-expect-error
8347
          raf(fn);
8348
      });
8349
  }
8350
  function addTransitionClass(el, cls) {
8351
      var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
8352
      if (transitionClasses.indexOf(cls) < 0) {
8353
          transitionClasses.push(cls);
8354
          addClass(el, cls);
8355
      }
8356
  }
8357
  function removeTransitionClass(el, cls) {
8358
      if (el._transitionClasses) {
8359
          remove$2(el._transitionClasses, cls);
8360
      }
8361
      removeClass(el, cls);
8362
  }
8363
  function whenTransitionEnds(el, expectedType, cb) {
8364
      var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;
8365
      if (!type)
8366
          return cb();
8367
      var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
8368
      var ended = 0;
8369
      var end = function () {
8370
          el.removeEventListener(event, onEnd);
8371
          cb();
8372
      };
8373
      var onEnd = function (e) {
8374
          if (e.target === el) {
8375
              if (++ended >= propCount) {
8376
                  end();
8377
              }
8378
          }
8379
      };
8380
      setTimeout(function () {
8381
          if (ended < propCount) {
8382
              end();
8383
          }
8384
      }, timeout + 1);
8385
      el.addEventListener(event, onEnd);
8386
  }
8387
  var transformRE = /\b(transform|all)(,|$)/;
8388
  function getTransitionInfo(el, expectedType) {
8389
      var styles = window.getComputedStyle(el);
8390
      // JSDOM may return undefined for transition properties
8391
      var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
8392
      var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
8393
      var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
8394
      var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
8395
      var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
8396
      var animationTimeout = getTimeout(animationDelays, animationDurations);
8397
      var type;
8398
      var timeout = 0;
8399
      var propCount = 0;
8400
      /* istanbul ignore if */
8401
      if (expectedType === TRANSITION) {
8402
          if (transitionTimeout > 0) {
8403
              type = TRANSITION;
8404
              timeout = transitionTimeout;
8405
              propCount = transitionDurations.length;
8406
          }
8407
      }
8408
      else if (expectedType === ANIMATION) {
8409
          if (animationTimeout > 0) {
8410
              type = ANIMATION;
8411
              timeout = animationTimeout;
8412
              propCount = animationDurations.length;
8413
          }
8414
      }
8415
      else {
8416
          timeout = Math.max(transitionTimeout, animationTimeout);
8417
          type =
8418
              timeout > 0
8419
                  ? transitionTimeout > animationTimeout
8420
                      ? TRANSITION
8421
                      : ANIMATION
8422
                  : null;
8423
          propCount = type
8424
              ? type === TRANSITION
8425
                  ? transitionDurations.length
8426
                  : animationDurations.length
8427
              : 0;
8428
      }
8429
      var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);
8430
      return {
8431
          type: type,
8432
          timeout: timeout,
8433
          propCount: propCount,
8434
          hasTransform: hasTransform
8435
      };
8436
  }
8437
  function getTimeout(delays, durations) {
8438
      /* istanbul ignore next */
8439
      while (delays.length < durations.length) {
8440
          delays = delays.concat(delays);
8441
      }
8442
      return Math.max.apply(null, durations.map(function (d, i) {
8443
          return toMs(d) + toMs(delays[i]);
8444
      }));
8445
  }
8446
  // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
8447
  // in a locale-dependent way, using a comma instead of a dot.
8448
  // If comma is not replaced with a dot, the input will be rounded down (i.e. acting
8449
  // as a floor function) causing unexpected behaviors
8450
  function toMs(s) {
8451
      return Number(s.slice(0, -1).replace(',', '.')) * 1000;
8452
  }
8453

8454
  function enter(vnode, toggleDisplay) {
8455
      var el = vnode.elm;
8456
      // call leave callback now
8457
      if (isDef(el._leaveCb)) {
8458
          el._leaveCb.cancelled = true;
8459
          el._leaveCb();
8460
      }
8461
      var data = resolveTransition(vnode.data.transition);
8462
      if (isUndef(data)) {
8463
          return;
8464
      }
8465
      /* istanbul ignore if */
8466
      if (isDef(el._enterCb) || el.nodeType !== 1) {
8467
          return;
8468
      }
8469
      var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;
8470
      // activeInstance will always be the <transition> component managing this
8471
      // transition. One edge case to check is when the <transition> is placed
8472
      // as the root node of a child component. In that case we need to check
8473
      // <transition>'s parent for appear check.
8474
      var context = activeInstance;
8475
      var transitionNode = activeInstance.$vnode;
8476
      while (transitionNode && transitionNode.parent) {
8477
          context = transitionNode.context;
8478
          transitionNode = transitionNode.parent;
8479
      }
8480
      var isAppear = !context._isMounted || !vnode.isRootInsert;
8481
      if (isAppear && !appear && appear !== '') {
8482
          return;
8483
      }
8484
      var startClass = isAppear && appearClass ? appearClass : enterClass;
8485
      var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
8486
      var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
8487
      var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
8488
      var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;
8489
      var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
8490
      var enterCancelledHook = isAppear
8491
          ? appearCancelled || enterCancelled
8492
          : enterCancelled;
8493
      var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
8494
      if (explicitEnterDuration != null) {
8495
          checkDuration(explicitEnterDuration, 'enter', vnode);
8496
      }
8497
      var expectsCSS = css !== false && !isIE9;
8498
      var userWantsControl = getHookArgumentsLength(enterHook);
8499
      var cb = (el._enterCb = once(function () {
8500
          if (expectsCSS) {
8501
              removeTransitionClass(el, toClass);
8502
              removeTransitionClass(el, activeClass);
8503
          }
8504
          // @ts-expect-error
8505
          if (cb.cancelled) {
8506
              if (expectsCSS) {
8507
                  removeTransitionClass(el, startClass);
8508
              }
8509
              enterCancelledHook && enterCancelledHook(el);
8510
          }
8511
          else {
8512
              afterEnterHook && afterEnterHook(el);
8513
          }
8514
          el._enterCb = null;
8515
      }));
8516
      if (!vnode.data.show) {
8517
          // remove pending leave element on enter by injecting an insert hook
8518
          mergeVNodeHook(vnode, 'insert', function () {
8519
              var parent = el.parentNode;
8520
              var pendingNode = parent && parent._pending && parent._pending[vnode.key];
8521
              if (pendingNode &&
8522
                  pendingNode.tag === vnode.tag &&
8523
                  pendingNode.elm._leaveCb) {
8524
                  pendingNode.elm._leaveCb();
8525
              }
8526
              enterHook && enterHook(el, cb);
8527
          });
8528
      }
8529
      // start enter transition
8530
      beforeEnterHook && beforeEnterHook(el);
8531
      if (expectsCSS) {
8532
          addTransitionClass(el, startClass);
8533
          addTransitionClass(el, activeClass);
8534
          nextFrame(function () {
8535
              removeTransitionClass(el, startClass);
8536
              // @ts-expect-error
8537
              if (!cb.cancelled) {
8538
                  addTransitionClass(el, toClass);
8539
                  if (!userWantsControl) {
8540
                      if (isValidDuration(explicitEnterDuration)) {
8541
                          setTimeout(cb, explicitEnterDuration);
8542
                      }
8543
                      else {
8544
                          whenTransitionEnds(el, type, cb);
8545
                      }
8546
                  }
8547
              }
8548
          });
8549
      }
8550
      if (vnode.data.show) {
8551
          toggleDisplay && toggleDisplay();
8552
          enterHook && enterHook(el, cb);
8553
      }
8554
      if (!expectsCSS && !userWantsControl) {
8555
          cb();
8556
      }
8557
  }
8558
  function leave(vnode, rm) {
8559
      var el = vnode.elm;
8560
      // call enter callback now
8561
      if (isDef(el._enterCb)) {
8562
          el._enterCb.cancelled = true;
8563
          el._enterCb();
8564
      }
8565
      var data = resolveTransition(vnode.data.transition);
8566
      if (isUndef(data) || el.nodeType !== 1) {
8567
          return rm();
8568
      }
8569
      /* istanbul ignore if */
8570
      if (isDef(el._leaveCb)) {
8571
          return;
8572
      }
8573
      var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;
8574
      var expectsCSS = css !== false && !isIE9;
8575
      var userWantsControl = getHookArgumentsLength(leave);
8576
      var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
8577
      if (isDef(explicitLeaveDuration)) {
8578
          checkDuration(explicitLeaveDuration, 'leave', vnode);
8579
      }
8580
      var cb = (el._leaveCb = once(function () {
8581
          if (el.parentNode && el.parentNode._pending) {
8582
              el.parentNode._pending[vnode.key] = null;
8583
          }
8584
          if (expectsCSS) {
8585
              removeTransitionClass(el, leaveToClass);
8586
              removeTransitionClass(el, leaveActiveClass);
8587
          }
8588
          // @ts-expect-error
8589
          if (cb.cancelled) {
8590
              if (expectsCSS) {
8591
                  removeTransitionClass(el, leaveClass);
8592
              }
8593
              leaveCancelled && leaveCancelled(el);
8594
          }
8595
          else {
8596
              rm();
8597
              afterLeave && afterLeave(el);
8598
          }
8599
          el._leaveCb = null;
8600
      }));
8601
      if (delayLeave) {
8602
          delayLeave(performLeave);
8603
      }
8604
      else {
8605
          performLeave();
8606
      }
8607
      function performLeave() {
8608
          // the delayed leave may have already been cancelled
8609
          // @ts-expect-error
8610
          if (cb.cancelled) {
8611
              return;
8612
          }
8613
          // record leaving element
8614
          if (!vnode.data.show && el.parentNode) {
8615
              (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =
8616
                  vnode;
8617
          }
8618
          beforeLeave && beforeLeave(el);
8619
          if (expectsCSS) {
8620
              addTransitionClass(el, leaveClass);
8621
              addTransitionClass(el, leaveActiveClass);
8622
              nextFrame(function () {
8623
                  removeTransitionClass(el, leaveClass);
8624
                  // @ts-expect-error
8625
                  if (!cb.cancelled) {
8626
                      addTransitionClass(el, leaveToClass);
8627
                      if (!userWantsControl) {
8628
                          if (isValidDuration(explicitLeaveDuration)) {
8629
                              setTimeout(cb, explicitLeaveDuration);
8630
                          }
8631
                          else {
8632
                              whenTransitionEnds(el, type, cb);
8633
                          }
8634
                      }
8635
                  }
8636
              });
8637
          }
8638
          leave && leave(el, cb);
8639
          if (!expectsCSS && !userWantsControl) {
8640
              cb();
8641
          }
8642
      }
8643
  }
8644
  // only used in dev mode
8645
  function checkDuration(val, name, vnode) {
8646
      if (typeof val !== 'number') {
8647
          warn$2("<transition> explicit ".concat(name, " duration is not a valid number - ") +
8648
              "got ".concat(JSON.stringify(val), "."), vnode.context);
8649
      }
8650
      else if (isNaN(val)) {
8651
          warn$2("<transition> explicit ".concat(name, " duration is NaN - ") +
8652
              'the duration expression might be incorrect.', vnode.context);
8653
      }
8654
  }
8655
  function isValidDuration(val) {
8656
      return typeof val === 'number' && !isNaN(val);
8657
  }
8658
  /**
8659
   * Normalize a transition hook's argument length. The hook may be:
8660
   * - a merged hook (invoker) with the original in .fns
8661
   * - a wrapped component method (check ._length)
8662
   * - a plain function (.length)
8663
   */
8664
  function getHookArgumentsLength(fn) {
8665
      if (isUndef(fn)) {
8666
          return false;
8667
      }
8668
      // @ts-expect-error
8669
      var invokerFns = fn.fns;
8670
      if (isDef(invokerFns)) {
8671
          // invoker
8672
          return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
8673
      }
8674
      else {
8675
          // @ts-expect-error
8676
          return (fn._length || fn.length) > 1;
8677
      }
8678
  }
8679
  function _enter(_, vnode) {
8680
      if (vnode.data.show !== true) {
8681
          enter(vnode);
8682
      }
8683
  }
8684
  var transition = inBrowser
8685
      ? {
8686
          create: _enter,
8687
          activate: _enter,
8688
          remove: function (vnode, rm) {
8689
              /* istanbul ignore else */
8690
              if (vnode.data.show !== true) {
8691
                  // @ts-expect-error
8692
                  leave(vnode, rm);
8693
              }
8694
              else {
8695
                  rm();
8696
              }
8697
          }
8698
      }
8699
      : {};
8700

8701
  var platformModules = [attrs, klass$1, events, domProps, style$1, transition];
8702

8703
  // the directive module should be applied last, after all
8704
  // built-in modules have been applied.
8705
  var modules$1 = platformModules.concat(baseModules);
8706
  var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules$1 });
8707

8708
  /**
8709
   * Not type checking this file because flow doesn't like attaching
8710
   * properties to Elements.
8711
   */
8712
  /* istanbul ignore if */
8713
  if (isIE9) {
8714
      // http://www.matts411.com/post/internet-explorer-9-oninput/
8715
      document.addEventListener('selectionchange', function () {
8716
          var el = document.activeElement;
8717
          // @ts-expect-error
8718
          if (el && el.vmodel) {
8719
              trigger(el, 'input');
8720
          }
8721
      });
8722
  }
8723
  var directive = {
8724
      inserted: function (el, binding, vnode, oldVnode) {
8725
          if (vnode.tag === 'select') {
8726
              // #6903
8727
              if (oldVnode.elm && !oldVnode.elm._vOptions) {
8728
                  mergeVNodeHook(vnode, 'postpatch', function () {
8729
                      directive.componentUpdated(el, binding, vnode);
8730
                  });
8731
              }
8732
              else {
8733
                  setSelected(el, binding, vnode.context);
8734
              }
8735
              el._vOptions = [].map.call(el.options, getValue);
8736
          }
8737
          else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
8738
              el._vModifiers = binding.modifiers;
8739
              if (!binding.modifiers.lazy) {
8740
                  el.addEventListener('compositionstart', onCompositionStart);
8741
                  el.addEventListener('compositionend', onCompositionEnd);
8742
                  // Safari < 10.2 & UIWebView doesn't fire compositionend when
8743
                  // switching focus before confirming composition choice
8744
                  // this also fixes the issue where some browsers e.g. iOS Chrome
8745
                  // fires "change" instead of "input" on autocomplete.
8746
                  el.addEventListener('change', onCompositionEnd);
8747
                  /* istanbul ignore if */
8748
                  if (isIE9) {
8749
                      el.vmodel = true;
8750
                  }
8751
              }
8752
          }
8753
      },
8754
      componentUpdated: function (el, binding, vnode) {
8755
          if (vnode.tag === 'select') {
8756
              setSelected(el, binding, vnode.context);
8757
              // in case the options rendered by v-for have changed,
8758
              // it's possible that the value is out-of-sync with the rendered options.
8759
              // detect such cases and filter out values that no longer has a matching
8760
              // option in the DOM.
8761
              var prevOptions_1 = el._vOptions;
8762
              var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
8763
              if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
8764
                  // trigger change event if
8765
                  // no matching option found for at least one value
8766
                  var needReset = el.multiple
8767
                      ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
8768
                      : binding.value !== binding.oldValue &&
8769
                          hasNoMatchingOption(binding.value, curOptions_1);
8770
                  if (needReset) {
8771
                      trigger(el, 'change');
8772
                  }
8773
              }
8774
          }
8775
      }
8776
  };
8777
  function setSelected(el, binding, vm) {
8778
      actuallySetSelected(el, binding, vm);
8779
      /* istanbul ignore if */
8780
      if (isIE || isEdge) {
8781
          setTimeout(function () {
8782
              actuallySetSelected(el, binding, vm);
8783
          }, 0);
8784
      }
8785
  }
8786
  function actuallySetSelected(el, binding, vm) {
8787
      var value = binding.value;
8788
      var isMultiple = el.multiple;
8789
      if (isMultiple && !Array.isArray(value)) {
8790
          warn$2("<select multiple v-model=\"".concat(binding.expression, "\"> ") +
8791
                  "expects an Array value for its binding, but got ".concat(Object.prototype.toString
8792
                      .call(value)
8793
                      .slice(8, -1)), vm);
8794
          return;
8795
      }
8796
      var selected, option;
8797
      for (var i = 0, l = el.options.length; i < l; i++) {
8798
          option = el.options[i];
8799
          if (isMultiple) {
8800
              selected = looseIndexOf(value, getValue(option)) > -1;
8801
              if (option.selected !== selected) {
8802
                  option.selected = selected;
8803
              }
8804
          }
8805
          else {
8806
              if (looseEqual(getValue(option), value)) {
8807
                  if (el.selectedIndex !== i) {
8808
                      el.selectedIndex = i;
8809
                  }
8810
                  return;
8811
              }
8812
          }
8813
      }
8814
      if (!isMultiple) {
8815
          el.selectedIndex = -1;
8816
      }
8817
  }
8818
  function hasNoMatchingOption(value, options) {
8819
      return options.every(function (o) { return !looseEqual(o, value); });
8820
  }
8821
  function getValue(option) {
8822
      return '_value' in option ? option._value : option.value;
8823
  }
8824
  function onCompositionStart(e) {
8825
      e.target.composing = true;
8826
  }
8827
  function onCompositionEnd(e) {
8828
      // prevent triggering an input event for no reason
8829
      if (!e.target.composing)
8830
          return;
8831
      e.target.composing = false;
8832
      trigger(e.target, 'input');
8833
  }
8834
  function trigger(el, type) {
8835
      var e = document.createEvent('HTMLEvents');
8836
      e.initEvent(type, true, true);
8837
      el.dispatchEvent(e);
8838
  }
8839

8840
  // recursively search for possible transition defined inside the component root
8841
  function locateNode(vnode) {
8842
      // @ts-expect-error
8843
      return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
8844
          ? locateNode(vnode.componentInstance._vnode)
8845
          : vnode;
8846
  }
8847
  var show = {
8848
      bind: function (el, _a, vnode) {
8849
          var value = _a.value;
8850
          vnode = locateNode(vnode);
8851
          var transition = vnode.data && vnode.data.transition;
8852
          var originalDisplay = (el.__vOriginalDisplay =
8853
              el.style.display === 'none' ? '' : el.style.display);
8854
          if (value && transition) {
8855
              vnode.data.show = true;
8856
              enter(vnode, function () {
8857
                  el.style.display = originalDisplay;
8858
              });
8859
          }
8860
          else {
8861
              el.style.display = value ? originalDisplay : 'none';
8862
          }
8863
      },
8864
      update: function (el, _a, vnode) {
8865
          var value = _a.value, oldValue = _a.oldValue;
8866
          /* istanbul ignore if */
8867
          if (!value === !oldValue)
8868
              return;
8869
          vnode = locateNode(vnode);
8870
          var transition = vnode.data && vnode.data.transition;
8871
          if (transition) {
8872
              vnode.data.show = true;
8873
              if (value) {
8874
                  enter(vnode, function () {
8875
                      el.style.display = el.__vOriginalDisplay;
8876
                  });
8877
              }
8878
              else {
8879
                  leave(vnode, function () {
8880
                      el.style.display = 'none';
8881
                  });
8882
              }
8883
          }
8884
          else {
8885
              el.style.display = value ? el.__vOriginalDisplay : 'none';
8886
          }
8887
      },
8888
      unbind: function (el, binding, vnode, oldVnode, isDestroy) {
8889
          if (!isDestroy) {
8890
              el.style.display = el.__vOriginalDisplay;
8891
          }
8892
      }
8893
  };
8894

8895
  var platformDirectives = {
8896
      model: directive,
8897
      show: show
8898
  };
8899

8900
  // Provides transition support for a single element/component.
8901
  var transitionProps = {
8902
      name: String,
8903
      appear: Boolean,
8904
      css: Boolean,
8905
      mode: String,
8906
      type: String,
8907
      enterClass: String,
8908
      leaveClass: String,
8909
      enterToClass: String,
8910
      leaveToClass: String,
8911
      enterActiveClass: String,
8912
      leaveActiveClass: String,
8913
      appearClass: String,
8914
      appearActiveClass: String,
8915
      appearToClass: String,
8916
      duration: [Number, String, Object]
8917
  };
8918
  // in case the child is also an abstract component, e.g. <keep-alive>
8919
  // we want to recursively retrieve the real component to be rendered
8920
  function getRealChild(vnode) {
8921
      var compOptions = vnode && vnode.componentOptions;
8922
      if (compOptions && compOptions.Ctor.options.abstract) {
8923
          return getRealChild(getFirstComponentChild(compOptions.children));
8924
      }
8925
      else {
8926
          return vnode;
8927
      }
8928
  }
8929
  function extractTransitionData(comp) {
8930
      var data = {};
8931
      var options = comp.$options;
8932
      // props
8933
      for (var key in options.propsData) {
8934
          data[key] = comp[key];
8935
      }
8936
      // events.
8937
      // extract listeners and pass them directly to the transition methods
8938
      var listeners = options._parentListeners;
8939
      for (var key in listeners) {
8940
          data[camelize(key)] = listeners[key];
8941
      }
8942
      return data;
8943
  }
8944
  function placeholder(h, rawChild) {
8945
      // @ts-expect-error
8946
      if (/\d-keep-alive$/.test(rawChild.tag)) {
8947
          return h('keep-alive', {
8948
              props: rawChild.componentOptions.propsData
8949
          });
8950
      }
8951
  }
8952
  function hasParentTransition(vnode) {
8953
      while ((vnode = vnode.parent)) {
8954
          if (vnode.data.transition) {
8955
              return true;
8956
          }
8957
      }
8958
  }
8959
  function isSameChild(child, oldChild) {
8960
      return oldChild.key === child.key && oldChild.tag === child.tag;
8961
  }
8962
  var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
8963
  var isVShowDirective = function (d) { return d.name === 'show'; };
8964
  var Transition = {
8965
      name: 'transition',
8966
      props: transitionProps,
8967
      abstract: true,
8968
      render: function (h) {
8969
          var _this = this;
8970
          var children = this.$slots.default;
8971
          if (!children) {
8972
              return;
8973
          }
8974
          // filter out text nodes (possible whitespaces)
8975
          children = children.filter(isNotTextNode);
8976
          /* istanbul ignore if */
8977
          if (!children.length) {
8978
              return;
8979
          }
8980
          // warn multiple elements
8981
          if (children.length > 1) {
8982
              warn$2('<transition> can only be used on a single element. Use ' +
8983
                  '<transition-group> for lists.', this.$parent);
8984
          }
8985
          var mode = this.mode;
8986
          // warn invalid mode
8987
          if (mode && mode !== 'in-out' && mode !== 'out-in') {
8988
              warn$2('invalid <transition> mode: ' + mode, this.$parent);
8989
          }
8990
          var rawChild = children[0];
8991
          // if this is a component root node and the component's
8992
          // parent container node also has transition, skip.
8993
          if (hasParentTransition(this.$vnode)) {
8994
              return rawChild;
8995
          }
8996
          // apply transition data to child
8997
          // use getRealChild() to ignore abstract components e.g. keep-alive
8998
          var child = getRealChild(rawChild);
8999
          /* istanbul ignore if */
9000
          if (!child) {
9001
              return rawChild;
9002
          }
9003
          if (this._leaving) {
9004
              return placeholder(h, rawChild);
9005
          }
9006
          // ensure a key that is unique to the vnode type and to this transition
9007
          // component instance. This key will be used to remove pending leaving nodes
9008
          // during entering.
9009
          var id = "__transition-".concat(this._uid, "-");
9010
          child.key =
9011
              child.key == null
9012
                  ? child.isComment
9013
                      ? id + 'comment'
9014
                      : id + child.tag
9015
                  : isPrimitive(child.key)
9016
                      ? String(child.key).indexOf(id) === 0
9017
                          ? child.key
9018
                          : id + child.key
9019
                      : child.key;
9020
          var data = ((child.data || (child.data = {})).transition =
9021
              extractTransitionData(this));
9022
          var oldRawChild = this._vnode;
9023
          var oldChild = getRealChild(oldRawChild);
9024
          // mark v-show
9025
          // so that the transition module can hand over the control to the directive
9026
          if (child.data.directives && child.data.directives.some(isVShowDirective)) {
9027
              child.data.show = true;
9028
          }
9029
          if (oldChild &&
9030
              oldChild.data &&
9031
              !isSameChild(child, oldChild) &&
9032
              !isAsyncPlaceholder(oldChild) &&
9033
              // #6687 component root is a comment node
9034
              !(oldChild.componentInstance &&
9035
                  oldChild.componentInstance._vnode.isComment)) {
9036
              // replace old child transition data with fresh one
9037
              // important for dynamic transitions!
9038
              var oldData = (oldChild.data.transition = extend({}, data));
9039
              // handle transition mode
9040
              if (mode === 'out-in') {
9041
                  // return placeholder node and queue update when leave finishes
9042
                  this._leaving = true;
9043
                  mergeVNodeHook(oldData, 'afterLeave', function () {
9044
                      _this._leaving = false;
9045
                      _this.$forceUpdate();
9046
                  });
9047
                  return placeholder(h, rawChild);
9048
              }
9049
              else if (mode === 'in-out') {
9050
                  if (isAsyncPlaceholder(child)) {
9051
                      return oldRawChild;
9052
                  }
9053
                  var delayedLeave_1;
9054
                  var performLeave = function () {
9055
                      delayedLeave_1();
9056
                  };
9057
                  mergeVNodeHook(data, 'afterEnter', performLeave);
9058
                  mergeVNodeHook(data, 'enterCancelled', performLeave);
9059
                  mergeVNodeHook(oldData, 'delayLeave', function (leave) {
9060
                      delayedLeave_1 = leave;
9061
                  });
9062
              }
9063
          }
9064
          return rawChild;
9065
      }
9066
  };
9067

9068
  // Provides transition support for list items.
9069
  var props = extend({
9070
      tag: String,
9071
      moveClass: String
9072
  }, transitionProps);
9073
  delete props.mode;
9074
  var TransitionGroup = {
9075
      props: props,
9076
      beforeMount: function () {
9077
          var _this = this;
9078
          var update = this._update;
9079
          this._update = function (vnode, hydrating) {
9080
              var restoreActiveInstance = setActiveInstance(_this);
9081
              // force removing pass
9082
              _this.__patch__(_this._vnode, _this.kept, false, // hydrating
9083
              true // removeOnly (!important, avoids unnecessary moves)
9084
              );
9085
              _this._vnode = _this.kept;
9086
              restoreActiveInstance();
9087
              update.call(_this, vnode, hydrating);
9088
          };
9089
      },
9090
      render: function (h) {
9091
          var tag = this.tag || this.$vnode.data.tag || 'span';
9092
          var map = Object.create(null);
9093
          var prevChildren = (this.prevChildren = this.children);
9094
          var rawChildren = this.$slots.default || [];
9095
          var children = (this.children = []);
9096
          var transitionData = extractTransitionData(this);
9097
          for (var i = 0; i < rawChildren.length; i++) {
9098
              var c = rawChildren[i];
9099
              if (c.tag) {
9100
                  if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
9101
                      children.push(c);
9102
                      map[c.key] = c;
9103
                      (c.data || (c.data = {})).transition = transitionData;
9104
                  }
9105
                  else {
9106
                      var opts = c.componentOptions;
9107
                      var name_1 = opts
9108
                          ? getComponentName(opts.Ctor.options) || opts.tag || ''
9109
                          : c.tag;
9110
                      warn$2("<transition-group> children must be keyed: <".concat(name_1, ">"));
9111
                  }
9112
              }
9113
          }
9114
          if (prevChildren) {
9115
              var kept = [];
9116
              var removed = [];
9117
              for (var i = 0; i < prevChildren.length; i++) {
9118
                  var c = prevChildren[i];
9119
                  c.data.transition = transitionData;
9120
                  // @ts-expect-error .getBoundingClientRect is not typed in Node
9121
                  c.data.pos = c.elm.getBoundingClientRect();
9122
                  if (map[c.key]) {
9123
                      kept.push(c);
9124
                  }
9125
                  else {
9126
                      removed.push(c);
9127
                  }
9128
              }
9129
              this.kept = h(tag, null, kept);
9130
              this.removed = removed;
9131
          }
9132
          return h(tag, null, children);
9133
      },
9134
      updated: function () {
9135
          var children = this.prevChildren;
9136
          var moveClass = this.moveClass || (this.name || 'v') + '-move';
9137
          if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
9138
              return;
9139
          }
9140
          // we divide the work into three loops to avoid mixing DOM reads and writes
9141
          // in each iteration - which helps prevent layout thrashing.
9142
          children.forEach(callPendingCbs);
9143
          children.forEach(recordPosition);
9144
          children.forEach(applyTranslation);
9145
          // force reflow to put everything in position
9146
          // assign to this to avoid being removed in tree-shaking
9147
          // $flow-disable-line
9148
          this._reflow = document.body.offsetHeight;
9149
          children.forEach(function (c) {
9150
              if (c.data.moved) {
9151
                  var el_1 = c.elm;
9152
                  var s = el_1.style;
9153
                  addTransitionClass(el_1, moveClass);
9154
                  s.transform = s.WebkitTransform = s.transitionDuration = '';
9155
                  el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {
9156
                      if (e && e.target !== el_1) {
9157
                          return;
9158
                      }
9159
                      if (!e || /transform$/.test(e.propertyName)) {
9160
                          el_1.removeEventListener(transitionEndEvent, cb);
9161
                          el_1._moveCb = null;
9162
                          removeTransitionClass(el_1, moveClass);
9163
                      }
9164
                  }));
9165
              }
9166
          });
9167
      },
9168
      methods: {
9169
          hasMove: function (el, moveClass) {
9170
              /* istanbul ignore if */
9171
              if (!hasTransition) {
9172
                  return false;
9173
              }
9174
              /* istanbul ignore if */
9175
              if (this._hasMove) {
9176
                  return this._hasMove;
9177
              }
9178
              // Detect whether an element with the move class applied has
9179
              // CSS transitions. Since the element may be inside an entering
9180
              // transition at this very moment, we make a clone of it and remove
9181
              // all other transition classes applied to ensure only the move class
9182
              // is applied.
9183
              var clone = el.cloneNode();
9184
              if (el._transitionClasses) {
9185
                  el._transitionClasses.forEach(function (cls) {
9186
                      removeClass(clone, cls);
9187
                  });
9188
              }
9189
              addClass(clone, moveClass);
9190
              clone.style.display = 'none';
9191
              this.$el.appendChild(clone);
9192
              var info = getTransitionInfo(clone);
9193
              this.$el.removeChild(clone);
9194
              return (this._hasMove = info.hasTransform);
9195
          }
9196
      }
9197
  };
9198
  function callPendingCbs(c) {
9199
      /* istanbul ignore if */
9200
      if (c.elm._moveCb) {
9201
          c.elm._moveCb();
9202
      }
9203
      /* istanbul ignore if */
9204
      if (c.elm._enterCb) {
9205
          c.elm._enterCb();
9206
      }
9207
  }
9208
  function recordPosition(c) {
9209
      c.data.newPos = c.elm.getBoundingClientRect();
9210
  }
9211
  function applyTranslation(c) {
9212
      var oldPos = c.data.pos;
9213
      var newPos = c.data.newPos;
9214
      var dx = oldPos.left - newPos.left;
9215
      var dy = oldPos.top - newPos.top;
9216
      if (dx || dy) {
9217
          c.data.moved = true;
9218
          var s = c.elm.style;
9219
          s.transform = s.WebkitTransform = "translate(".concat(dx, "px,").concat(dy, "px)");
9220
          s.transitionDuration = '0s';
9221
      }
9222
  }
9223

9224
  var platformComponents = {
9225
      Transition: Transition,
9226
      TransitionGroup: TransitionGroup
9227
  };
9228

9229
  // install platform specific utils
9230
  Vue.config.mustUseProp = mustUseProp;
9231
  Vue.config.isReservedTag = isReservedTag;
9232
  Vue.config.isReservedAttr = isReservedAttr;
9233
  Vue.config.getTagNamespace = getTagNamespace;
9234
  Vue.config.isUnknownElement = isUnknownElement;
9235
  // install platform runtime directives & components
9236
  extend(Vue.options.directives, platformDirectives);
9237
  extend(Vue.options.components, platformComponents);
9238
  // install platform patch function
9239
  Vue.prototype.__patch__ = inBrowser ? patch : noop;
9240
  // public mount method
9241
  Vue.prototype.$mount = function (el, hydrating) {
9242
      el = el && inBrowser ? query(el) : undefined;
9243
      return mountComponent(this, el, hydrating);
9244
  };
9245
  // devtools global hook
9246
  /* istanbul ignore next */
9247
  if (inBrowser) {
9248
      setTimeout(function () {
9249
          if (config.devtools) {
9250
              if (devtools) {
9251
                  devtools.emit('init', Vue);
9252
              }
9253
              else {
9254
                  // @ts-expect-error
9255
                  console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\n' +
9256
                      'https://github.com/vuejs/vue-devtools');
9257
              }
9258
          }
9259
          if (config.productionTip !== false &&
9260
              typeof console !== 'undefined') {
9261
              // @ts-expect-error
9262
              console[console.info ? 'info' : 'log']("You are running Vue in development mode.\n" +
9263
                  "Make sure to turn on production mode when deploying for production.\n" +
9264
                  "See more tips at https://vuejs.org/guide/deployment.html");
9265
          }
9266
      }, 0);
9267
  }
9268

9269
  var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
9270
  var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
9271
  var buildRegex = cached(function (delimiters) {
9272
      var open = delimiters[0].replace(regexEscapeRE, '\\$&');
9273
      var close = delimiters[1].replace(regexEscapeRE, '\\$&');
9274
      return new RegExp(open + '((?:.|\\n)+?)' + close, 'g');
9275
  });
9276
  function parseText(text, delimiters) {
9277
      //@ts-expect-error
9278
      var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
9279
      if (!tagRE.test(text)) {
9280
          return;
9281
      }
9282
      var tokens = [];
9283
      var rawTokens = [];
9284
      var lastIndex = (tagRE.lastIndex = 0);
9285
      var match, index, tokenValue;
9286
      while ((match = tagRE.exec(text))) {
9287
          index = match.index;
9288
          // push text token
9289
          if (index > lastIndex) {
9290
              rawTokens.push((tokenValue = text.slice(lastIndex, index)));
9291
              tokens.push(JSON.stringify(tokenValue));
9292
          }
9293
          // tag token
9294
          var exp = parseFilters(match[1].trim());
9295
          tokens.push("_s(".concat(exp, ")"));
9296
          rawTokens.push({ '@binding': exp });
9297
          lastIndex = index + match[0].length;
9298
      }
9299
      if (lastIndex < text.length) {
9300
          rawTokens.push((tokenValue = text.slice(lastIndex)));
9301
          tokens.push(JSON.stringify(tokenValue));
9302
      }
9303
      return {
9304
          expression: tokens.join('+'),
9305
          tokens: rawTokens
9306
      };
9307
  }
9308

9309
  function transformNode$1(el, options) {
9310
      var warn = options.warn || baseWarn;
9311
      var staticClass = getAndRemoveAttr(el, 'class');
9312
      if (staticClass) {
9313
          var res = parseText(staticClass, options.delimiters);
9314
          if (res) {
9315
              warn("class=\"".concat(staticClass, "\": ") +
9316
                  'Interpolation inside attributes has been removed. ' +
9317
                  'Use v-bind or the colon shorthand instead. For example, ' +
9318
                  'instead of <div class="{{ val }}">, use <div :class="val">.', el.rawAttrsMap['class']);
9319
          }
9320
      }
9321
      if (staticClass) {
9322
          el.staticClass = JSON.stringify(staticClass.replace(/\s+/g, ' ').trim());
9323
      }
9324
      var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
9325
      if (classBinding) {
9326
          el.classBinding = classBinding;
9327
      }
9328
  }
9329
  function genData$2(el) {
9330
      var data = '';
9331
      if (el.staticClass) {
9332
          data += "staticClass:".concat(el.staticClass, ",");
9333
      }
9334
      if (el.classBinding) {
9335
          data += "class:".concat(el.classBinding, ",");
9336
      }
9337
      return data;
9338
  }
9339
  var klass = {
9340
      staticKeys: ['staticClass'],
9341
      transformNode: transformNode$1,
9342
      genData: genData$2
9343
  };
9344

9345
  function transformNode(el, options) {
9346
      var warn = options.warn || baseWarn;
9347
      var staticStyle = getAndRemoveAttr(el, 'style');
9348
      if (staticStyle) {
9349
          /* istanbul ignore if */
9350
          {
9351
              var res = parseText(staticStyle, options.delimiters);
9352
              if (res) {
9353
                  warn("style=\"".concat(staticStyle, "\": ") +
9354
                      'Interpolation inside attributes has been removed. ' +
9355
                      'Use v-bind or the colon shorthand instead. For example, ' +
9356
                      'instead of <div style="{{ val }}">, use <div :style="val">.', el.rawAttrsMap['style']);
9357
              }
9358
          }
9359
          el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
9360
      }
9361
      var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
9362
      if (styleBinding) {
9363
          el.styleBinding = styleBinding;
9364
      }
9365
  }
9366
  function genData$1(el) {
9367
      var data = '';
9368
      if (el.staticStyle) {
9369
          data += "staticStyle:".concat(el.staticStyle, ",");
9370
      }
9371
      if (el.styleBinding) {
9372
          data += "style:(".concat(el.styleBinding, "),");
9373
      }
9374
      return data;
9375
  }
9376
  var style = {
9377
      staticKeys: ['staticStyle'],
9378
      transformNode: transformNode,
9379
      genData: genData$1
9380
  };
9381

9382
  var decoder;
9383
  var he = {
9384
      decode: function (html) {
9385
          decoder = decoder || document.createElement('div');
9386
          decoder.innerHTML = html;
9387
          return decoder.textContent;
9388
      }
9389
  };
9390

9391
  var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
9392
      'link,meta,param,source,track,wbr');
9393
  // Elements that you can, intentionally, leave open
9394
  // (and which close themselves)
9395
  var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
9396
  // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
9397
  // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
9398
  var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
9399
      'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
9400
      'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
9401
      'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
9402
      'title,tr,track');
9403

9404
  /**
9405
   * Not type-checking this file because it's mostly vendor code.
9406
   */
9407
  // Regular Expressions for parsing tags and attributes
9408
  var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
9409
  var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
9410
  var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(unicodeRegExp.source, "]*");
9411
  var qnameCapture = "((?:".concat(ncname, "\\:)?").concat(ncname, ")");
9412
  var startTagOpen = new RegExp("^<".concat(qnameCapture));
9413
  var startTagClose = /^\s*(\/?)>/;
9414
  var endTag = new RegExp("^<\\/".concat(qnameCapture, "[^>]*>"));
9415
  var doctype = /^<!DOCTYPE [^>]+>/i;
9416
  // #7298: escape - to avoid being passed as HTML comment when inlined in page
9417
  var comment = /^<!\--/;
9418
  var conditionalComment = /^<!\[/;
9419
  // Special Elements (can contain anything)
9420
  var isPlainTextElement = makeMap('script,style,textarea', true);
9421
  var reCache = {};
9422
  var decodingMap = {
9423
      '&lt;': '<',
9424
      '&gt;': '>',
9425
      '&quot;': '"',
9426
      '&amp;': '&',
9427
      '&#10;': '\n',
9428
      '&#9;': '\t',
9429
      '&#39;': "'"
9430
  };
9431
  var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
9432
  var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
9433
  // #5992
9434
  var isIgnoreNewlineTag = makeMap('pre,textarea', true);
9435
  var shouldIgnoreFirstNewline = function (tag, html) {
9436
      return tag && isIgnoreNewlineTag(tag) && html[0] === '\n';
9437
  };
9438
  function decodeAttr(value, shouldDecodeNewlines) {
9439
      var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
9440
      return value.replace(re, function (match) { return decodingMap[match]; });
9441
  }
9442
  function parseHTML(html, options) {
9443
      var stack = [];
9444
      var expectHTML = options.expectHTML;
9445
      var isUnaryTag = options.isUnaryTag || no;
9446
      var canBeLeftOpenTag = options.canBeLeftOpenTag || no;
9447
      var index = 0;
9448
      var last, lastTag;
9449
      var _loop_1 = function () {
9450
          last = html;
9451
          // Make sure we're not in a plaintext content element like script/style
9452
          if (!lastTag || !isPlainTextElement(lastTag)) {
9453
              var textEnd = html.indexOf('<');
9454
              if (textEnd === 0) {
9455
                  // Comment:
9456
                  if (comment.test(html)) {
9457
                      var commentEnd = html.indexOf('-->');
9458
                      if (commentEnd >= 0) {
9459
                          if (options.shouldKeepComment && options.comment) {
9460
                              options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
9461
                          }
9462
                          advance(commentEnd + 3);
9463
                          return "continue";
9464
                      }
9465
                  }
9466
                  // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
9467
                  if (conditionalComment.test(html)) {
9468
                      var conditionalEnd = html.indexOf(']>');
9469
                      if (conditionalEnd >= 0) {
9470
                          advance(conditionalEnd + 2);
9471
                          return "continue";
9472
                      }
9473
                  }
9474
                  // Doctype:
9475
                  var doctypeMatch = html.match(doctype);
9476
                  if (doctypeMatch) {
9477
                      advance(doctypeMatch[0].length);
9478
                      return "continue";
9479
                  }
9480
                  // End tag:
9481
                  var endTagMatch = html.match(endTag);
9482
                  if (endTagMatch) {
9483
                      var curIndex = index;
9484
                      advance(endTagMatch[0].length);
9485
                      parseEndTag(endTagMatch[1], curIndex, index);
9486
                      return "continue";
9487
                  }
9488
                  // Start tag:
9489
                  var startTagMatch = parseStartTag();
9490
                  if (startTagMatch) {
9491
                      handleStartTag(startTagMatch);
9492
                      if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
9493
                          advance(1);
9494
                      }
9495
                      return "continue";
9496
                  }
9497
              }
9498
              var text = void 0, rest = void 0, next = void 0;
9499
              if (textEnd >= 0) {
9500
                  rest = html.slice(textEnd);
9501
                  while (!endTag.test(rest) &&
9502
                      !startTagOpen.test(rest) &&
9503
                      !comment.test(rest) &&
9504
                      !conditionalComment.test(rest)) {
9505
                      // < in plain text, be forgiving and treat it as text
9506
                      next = rest.indexOf('<', 1);
9507
                      if (next < 0)
9508
                          break;
9509
                      textEnd += next;
9510
                      rest = html.slice(textEnd);
9511
                  }
9512
                  text = html.substring(0, textEnd);
9513
              }
9514
              if (textEnd < 0) {
9515
                  text = html;
9516
              }
9517
              if (text) {
9518
                  advance(text.length);
9519
              }
9520
              if (options.chars && text) {
9521
                  options.chars(text, index - text.length, index);
9522
              }
9523
          }
9524
          else {
9525
              var endTagLength_1 = 0;
9526
              var stackedTag_1 = lastTag.toLowerCase();
9527
              var reStackedTag = reCache[stackedTag_1] ||
9528
                  (reCache[stackedTag_1] = new RegExp('([\\s\\S]*?)(</' + stackedTag_1 + '[^>]*>)', 'i'));
9529
              var rest = html.replace(reStackedTag, function (all, text, endTag) {
9530
                  endTagLength_1 = endTag.length;
9531
                  if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') {
9532
                      text = text
9533
                          .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
9534
                          .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
9535
                  }
9536
                  if (shouldIgnoreFirstNewline(stackedTag_1, text)) {
9537
                      text = text.slice(1);
9538
                  }
9539
                  if (options.chars) {
9540
                      options.chars(text);
9541
                  }
9542
                  return '';
9543
              });
9544
              index += html.length - rest.length;
9545
              html = rest;
9546
              parseEndTag(stackedTag_1, index - endTagLength_1, index);
9547
          }
9548
          if (html === last) {
9549
              options.chars && options.chars(html);
9550
              if (!stack.length && options.warn) {
9551
                  options.warn("Mal-formatted tag at end of template: \"".concat(html, "\""), {
9552
                      start: index + html.length
9553
                  });
9554
              }
9555
              return "break";
9556
          }
9557
      };
9558
      while (html) {
9559
          var state_1 = _loop_1();
9560
          if (state_1 === "break")
9561
              break;
9562
      }
9563
      // Clean up any remaining tags
9564
      parseEndTag();
9565
      function advance(n) {
9566
          index += n;
9567
          html = html.substring(n);
9568
      }
9569
      function parseStartTag() {
9570
          var start = html.match(startTagOpen);
9571
          if (start) {
9572
              var match = {
9573
                  tagName: start[1],
9574
                  attrs: [],
9575
                  start: index
9576
              };
9577
              advance(start[0].length);
9578
              var end = void 0, attr = void 0;
9579
              while (!(end = html.match(startTagClose)) &&
9580
                  (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
9581
                  attr.start = index;
9582
                  advance(attr[0].length);
9583
                  attr.end = index;
9584
                  match.attrs.push(attr);
9585
              }
9586
              if (end) {
9587
                  match.unarySlash = end[1];
9588
                  advance(end[0].length);
9589
                  match.end = index;
9590
                  return match;
9591
              }
9592
          }
9593
      }
9594
      function handleStartTag(match) {
9595
          var tagName = match.tagName;
9596
          var unarySlash = match.unarySlash;
9597
          if (expectHTML) {
9598
              if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
9599
                  parseEndTag(lastTag);
9600
              }
9601
              if (canBeLeftOpenTag(tagName) && lastTag === tagName) {
9602
                  parseEndTag(tagName);
9603
              }
9604
          }
9605
          var unary = isUnaryTag(tagName) || !!unarySlash;
9606
          var l = match.attrs.length;
9607
          var attrs = new Array(l);
9608
          for (var i = 0; i < l; i++) {
9609
              var args = match.attrs[i];
9610
              var value = args[3] || args[4] || args[5] || '';
9611
              var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
9612
                  ? options.shouldDecodeNewlinesForHref
9613
                  : options.shouldDecodeNewlines;
9614
              attrs[i] = {
9615
                  name: args[1],
9616
                  value: decodeAttr(value, shouldDecodeNewlines)
9617
              };
9618
              if (options.outputSourceRange) {
9619
                  attrs[i].start = args.start + args[0].match(/^\s*/).length;
9620
                  attrs[i].end = args.end;
9621
              }
9622
          }
9623
          if (!unary) {
9624
              stack.push({
9625
                  tag: tagName,
9626
                  lowerCasedTag: tagName.toLowerCase(),
9627
                  attrs: attrs,
9628
                  start: match.start,
9629
                  end: match.end
9630
              });
9631
              lastTag = tagName;
9632
          }
9633
          if (options.start) {
9634
              options.start(tagName, attrs, unary, match.start, match.end);
9635
          }
9636
      }
9637
      function parseEndTag(tagName, start, end) {
9638
          var pos, lowerCasedTagName;
9639
          if (start == null)
9640
              start = index;
9641
          if (end == null)
9642
              end = index;
9643
          // Find the closest opened tag of the same type
9644
          if (tagName) {
9645
              lowerCasedTagName = tagName.toLowerCase();
9646
              for (pos = stack.length - 1; pos >= 0; pos--) {
9647
                  if (stack[pos].lowerCasedTag === lowerCasedTagName) {
9648
                      break;
9649
                  }
9650
              }
9651
          }
9652
          else {
9653
              // If no tag name is provided, clean shop
9654
              pos = 0;
9655
          }
9656
          if (pos >= 0) {
9657
              // Close all the open elements, up the stack
9658
              for (var i = stack.length - 1; i >= pos; i--) {
9659
                  if ((i > pos || !tagName) && options.warn) {
9660
                      options.warn("tag <".concat(stack[i].tag, "> has no matching end tag."), {
9661
                          start: stack[i].start,
9662
                          end: stack[i].end
9663
                      });
9664
                  }
9665
                  if (options.end) {
9666
                      options.end(stack[i].tag, start, end);
9667
                  }
9668
              }
9669
              // Remove the open elements from the stack
9670
              stack.length = pos;
9671
              lastTag = pos && stack[pos - 1].tag;
9672
          }
9673
          else if (lowerCasedTagName === 'br') {
9674
              if (options.start) {
9675
                  options.start(tagName, [], true, start, end);
9676
              }
9677
          }
9678
          else if (lowerCasedTagName === 'p') {
9679
              if (options.start) {
9680
                  options.start(tagName, [], false, start, end);
9681
              }
9682
              if (options.end) {
9683
                  options.end(tagName, start, end);
9684
              }
9685
          }
9686
      }
9687
  }
9688

9689
  var onRE = /^@|^v-on:/;
9690
  var dirRE = /^v-|^@|^:|^#/;
9691
  var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
9692
  var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
9693
  var stripParensRE = /^\(|\)$/g;
9694
  var dynamicArgRE = /^\[.*\]$/;
9695
  var argRE = /:(.*)$/;
9696
  var bindRE = /^:|^\.|^v-bind:/;
9697
  var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
9698
  var slotRE = /^v-slot(:|$)|^#/;
9699
  var lineBreakRE = /[\r\n]/;
9700
  var whitespaceRE = /[ \f\t\r\n]+/g;
9701
  var invalidAttributeRE = /[\s"'<>\/=]/;
9702
  var decodeHTMLCached = cached(he.decode);
9703
  var emptySlotScopeToken = "_empty_";
9704
  // configurable state
9705
  var warn;
9706
  var delimiters;
9707
  var transforms;
9708
  var preTransforms;
9709
  var postTransforms;
9710
  var platformIsPreTag;
9711
  var platformMustUseProp;
9712
  var platformGetTagNamespace;
9713
  var maybeComponent;
9714
  function createASTElement(tag, attrs, parent) {
9715
      return {
9716
          type: 1,
9717
          tag: tag,
9718
          attrsList: attrs,
9719
          attrsMap: makeAttrsMap(attrs),
9720
          rawAttrsMap: {},
9721
          parent: parent,
9722
          children: []
9723
      };
9724
  }
9725
  /**
9726
   * Convert HTML string to AST.
9727
   */
9728
  function parse(template, options) {
9729
      warn = options.warn || baseWarn;
9730
      platformIsPreTag = options.isPreTag || no;
9731
      platformMustUseProp = options.mustUseProp || no;
9732
      platformGetTagNamespace = options.getTagNamespace || no;
9733
      var isReservedTag = options.isReservedTag || no;
9734
      maybeComponent = function (el) {
9735
          return !!(el.component ||
9736
              el.attrsMap[':is'] ||
9737
              el.attrsMap['v-bind:is'] ||
9738
              !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));
9739
      };
9740
      transforms = pluckModuleFunction(options.modules, 'transformNode');
9741
      preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
9742
      postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
9743
      delimiters = options.delimiters;
9744
      var stack = [];
9745
      var preserveWhitespace = options.preserveWhitespace !== false;
9746
      var whitespaceOption = options.whitespace;
9747
      var root;
9748
      var currentParent;
9749
      var inVPre = false;
9750
      var inPre = false;
9751
      var warned = false;
9752
      function warnOnce(msg, range) {
9753
          if (!warned) {
9754
              warned = true;
9755
              warn(msg, range);
9756
          }
9757
      }
9758
      function closeElement(element) {
9759
          trimEndingWhitespace(element);
9760
          if (!inVPre && !element.processed) {
9761
              element = processElement(element, options);
9762
          }
9763
          // tree management
9764
          if (!stack.length && element !== root) {
9765
              // allow root elements with v-if, v-else-if and v-else
9766
              if (root.if && (element.elseif || element.else)) {
9767
                  {
9768
                      checkRootConstraints(element);
9769
                  }
9770
                  addIfCondition(root, {
9771
                      exp: element.elseif,
9772
                      block: element
9773
                  });
9774
              }
9775
              else {
9776
                  warnOnce("Component template should contain exactly one root element. " +
9777
                      "If you are using v-if on multiple elements, " +
9778
                      "use v-else-if to chain them instead.", { start: element.start });
9779
              }
9780
          }
9781
          if (currentParent && !element.forbidden) {
9782
              if (element.elseif || element.else) {
9783
                  processIfConditions(element, currentParent);
9784
              }
9785
              else {
9786
                  if (element.slotScope) {
9787
                      // scoped slot
9788
                      // keep it in the children list so that v-else(-if) conditions can
9789
                      // find it as the prev node.
9790
                      var name_1 = element.slotTarget || '"default"';
9791
                      (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name_1] = element;
9792
                  }
9793
                  currentParent.children.push(element);
9794
                  element.parent = currentParent;
9795
              }
9796
          }
9797
          // final children cleanup
9798
          // filter out scoped slots
9799
          element.children = element.children.filter(function (c) { return !c.slotScope; });
9800
          // remove trailing whitespace node again
9801
          trimEndingWhitespace(element);
9802
          // check pre state
9803
          if (element.pre) {
9804
              inVPre = false;
9805
          }
9806
          if (platformIsPreTag(element.tag)) {
9807
              inPre = false;
9808
          }
9809
          // apply post-transforms
9810
          for (var i = 0; i < postTransforms.length; i++) {
9811
              postTransforms[i](element, options);
9812
          }
9813
      }
9814
      function trimEndingWhitespace(el) {
9815
          // remove trailing whitespace node
9816
          if (!inPre) {
9817
              var lastNode = void 0;
9818
              while ((lastNode = el.children[el.children.length - 1]) &&
9819
                  lastNode.type === 3 &&
9820
                  lastNode.text === ' ') {
9821
                  el.children.pop();
9822
              }
9823
          }
9824
      }
9825
      function checkRootConstraints(el) {
9826
          if (el.tag === 'slot' || el.tag === 'template') {
9827
              warnOnce("Cannot use <".concat(el.tag, "> as component root element because it may ") +
9828
                  'contain multiple nodes.', { start: el.start });
9829
          }
9830
          if (el.attrsMap.hasOwnProperty('v-for')) {
9831
              warnOnce('Cannot use v-for on stateful component root element because ' +
9832
                  'it renders multiple elements.', el.rawAttrsMap['v-for']);
9833
          }
9834
      }
9835
      parseHTML(template, {
9836
          warn: warn,
9837
          expectHTML: options.expectHTML,
9838
          isUnaryTag: options.isUnaryTag,
9839
          canBeLeftOpenTag: options.canBeLeftOpenTag,
9840
          shouldDecodeNewlines: options.shouldDecodeNewlines,
9841
          shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
9842
          shouldKeepComment: options.comments,
9843
          outputSourceRange: options.outputSourceRange,
9844
          start: function (tag, attrs, unary, start, end) {
9845
              // check namespace.
9846
              // inherit parent ns if there is one
9847
              var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
9848
              // handle IE svg bug
9849
              /* istanbul ignore if */
9850
              if (isIE && ns === 'svg') {
9851
                  attrs = guardIESVGBug(attrs);
9852
              }
9853
              var element = createASTElement(tag, attrs, currentParent);
9854
              if (ns) {
9855
                  element.ns = ns;
9856
              }
9857
              {
9858
                  if (options.outputSourceRange) {
9859
                      element.start = start;
9860
                      element.end = end;
9861
                      element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
9862
                          cumulated[attr.name] = attr;
9863
                          return cumulated;
9864
                      }, {});
9865
                  }
9866
                  attrs.forEach(function (attr) {
9867
                      if (invalidAttributeRE.test(attr.name)) {
9868
                          warn("Invalid dynamic argument expression: attribute names cannot contain " +
9869
                              "spaces, quotes, <, >, / or =.", options.outputSourceRange
9870
                              ? {
9871
                                  start: attr.start + attr.name.indexOf("["),
9872
                                  end: attr.start + attr.name.length
9873
                              }
9874
                              : undefined);
9875
                      }
9876
                  });
9877
              }
9878
              if (isForbiddenTag(element) && !isServerRendering()) {
9879
                  element.forbidden = true;
9880
                  warn('Templates should only be responsible for mapping the state to the ' +
9881
                          'UI. Avoid placing tags with side-effects in your templates, such as ' +
9882
                          "<".concat(tag, ">") +
9883
                          ', as they will not be parsed.', { start: element.start });
9884
              }
9885
              // apply pre-transforms
9886
              for (var i = 0; i < preTransforms.length; i++) {
9887
                  element = preTransforms[i](element, options) || element;
9888
              }
9889
              if (!inVPre) {
9890
                  processPre(element);
9891
                  if (element.pre) {
9892
                      inVPre = true;
9893
                  }
9894
              }
9895
              if (platformIsPreTag(element.tag)) {
9896
                  inPre = true;
9897
              }
9898
              if (inVPre) {
9899
                  processRawAttrs(element);
9900
              }
9901
              else if (!element.processed) {
9902
                  // structural directives
9903
                  processFor(element);
9904
                  processIf(element);
9905
                  processOnce(element);
9906
              }
9907
              if (!root) {
9908
                  root = element;
9909
                  {
9910
                      checkRootConstraints(root);
9911
                  }
9912
              }
9913
              if (!unary) {
9914
                  currentParent = element;
9915
                  stack.push(element);
9916
              }
9917
              else {
9918
                  closeElement(element);
9919
              }
9920
          },
9921
          end: function (tag, start, end) {
9922
              var element = stack[stack.length - 1];
9923
              // pop stack
9924
              stack.length -= 1;
9925
              currentParent = stack[stack.length - 1];
9926
              if (options.outputSourceRange) {
9927
                  element.end = end;
9928
              }
9929
              closeElement(element);
9930
          },
9931
          chars: function (text, start, end) {
9932
              if (!currentParent) {
9933
                  {
9934
                      if (text === template) {
9935
                          warnOnce('Component template requires a root element, rather than just text.', { start: start });
9936
                      }
9937
                      else if ((text = text.trim())) {
9938
                          warnOnce("text \"".concat(text, "\" outside root element will be ignored."), {
9939
                              start: start
9940
                          });
9941
                      }
9942
                  }
9943
                  return;
9944
              }
9945
              // IE textarea placeholder bug
9946
              /* istanbul ignore if */
9947
              if (isIE &&
9948
                  currentParent.tag === 'textarea' &&
9949
                  currentParent.attrsMap.placeholder === text) {
9950
                  return;
9951
              }
9952
              var children = currentParent.children;
9953
              if (inPre || text.trim()) {
9954
                  text = isTextTag(currentParent)
9955
                      ? text
9956
                      : decodeHTMLCached(text);
9957
              }
9958
              else if (!children.length) {
9959
                  // remove the whitespace-only node right after an opening tag
9960
                  text = '';
9961
              }
9962
              else if (whitespaceOption) {
9963
                  if (whitespaceOption === 'condense') {
9964
                      // in condense mode, remove the whitespace node if it contains
9965
                      // line break, otherwise condense to a single space
9966
                      text = lineBreakRE.test(text) ? '' : ' ';
9967
                  }
9968
                  else {
9969
                      text = ' ';
9970
                  }
9971
              }
9972
              else {
9973
                  text = preserveWhitespace ? ' ' : '';
9974
              }
9975
              if (text) {
9976
                  if (!inPre && whitespaceOption === 'condense') {
9977
                      // condense consecutive whitespaces into single space
9978
                      text = text.replace(whitespaceRE, ' ');
9979
                  }
9980
                  var res = void 0;
9981
                  var child = void 0;
9982
                  if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
9983
                      child = {
9984
                          type: 2,
9985
                          expression: res.expression,
9986
                          tokens: res.tokens,
9987
                          text: text
9988
                      };
9989
                  }
9990
                  else if (text !== ' ' ||
9991
                      !children.length ||
9992
                      children[children.length - 1].text !== ' ') {
9993
                      child = {
9994
                          type: 3,
9995
                          text: text
9996
                      };
9997
                  }
9998
                  if (child) {
9999
                      if (options.outputSourceRange) {
10000
                          child.start = start;
10001
                          child.end = end;
10002
                      }
10003
                      children.push(child);
10004
                  }
10005
              }
10006
          },
10007
          comment: function (text, start, end) {
10008
              // adding anything as a sibling to the root node is forbidden
10009
              // comments should still be allowed, but ignored
10010
              if (currentParent) {
10011
                  var child = {
10012
                      type: 3,
10013
                      text: text,
10014
                      isComment: true
10015
                  };
10016
                  if (options.outputSourceRange) {
10017
                      child.start = start;
10018
                      child.end = end;
10019
                  }
10020
                  currentParent.children.push(child);
10021
              }
10022
          }
10023
      });
10024
      return root;
10025
  }
10026
  function processPre(el) {
10027
      if (getAndRemoveAttr(el, 'v-pre') != null) {
10028
          el.pre = true;
10029
      }
10030
  }
10031
  function processRawAttrs(el) {
10032
      var list = el.attrsList;
10033
      var len = list.length;
10034
      if (len) {
10035
          var attrs = (el.attrs = new Array(len));
10036
          for (var i = 0; i < len; i++) {
10037
              attrs[i] = {
10038
                  name: list[i].name,
10039
                  value: JSON.stringify(list[i].value)
10040
              };
10041
              if (list[i].start != null) {
10042
                  attrs[i].start = list[i].start;
10043
                  attrs[i].end = list[i].end;
10044
              }
10045
          }
10046
      }
10047
      else if (!el.pre) {
10048
          // non root node in pre blocks with no attributes
10049
          el.plain = true;
10050
      }
10051
  }
10052
  function processElement(element, options) {
10053
      processKey(element);
10054
      // determine whether this is a plain element after
10055
      // removing structural attributes
10056
      element.plain =
10057
          !element.key && !element.scopedSlots && !element.attrsList.length;
10058
      processRef(element);
10059
      processSlotContent(element);
10060
      processSlotOutlet(element);
10061
      processComponent(element);
10062
      for (var i = 0; i < transforms.length; i++) {
10063
          element = transforms[i](element, options) || element;
10064
      }
10065
      processAttrs(element);
10066
      return element;
10067
  }
10068
  function processKey(el) {
10069
      var exp = getBindingAttr(el, 'key');
10070
      if (exp) {
10071
          {
10072
              if (el.tag === 'template') {
10073
                  warn("<template> cannot be keyed. Place the key on real elements instead.", getRawBindingAttr(el, 'key'));
10074
              }
10075
              if (el.for) {
10076
                  var iterator = el.iterator2 || el.iterator1;
10077
                  var parent_1 = el.parent;
10078
                  if (iterator &&
10079
                      iterator === exp &&
10080
                      parent_1 &&
10081
                      parent_1.tag === 'transition-group') {
10082
                      warn("Do not use v-for index as key on <transition-group> children, " +
10083
                          "this is the same as not using keys.", getRawBindingAttr(el, 'key'), true /* tip */);
10084
                  }
10085
              }
10086
          }
10087
          el.key = exp;
10088
      }
10089
  }
10090
  function processRef(el) {
10091
      var ref = getBindingAttr(el, 'ref');
10092
      if (ref) {
10093
          el.ref = ref;
10094
          el.refInFor = checkInFor(el);
10095
      }
10096
  }
10097
  function processFor(el) {
10098
      var exp;
10099
      if ((exp = getAndRemoveAttr(el, 'v-for'))) {
10100
          var res = parseFor(exp);
10101
          if (res) {
10102
              extend(el, res);
10103
          }
10104
          else {
10105
              warn("Invalid v-for expression: ".concat(exp), el.rawAttrsMap['v-for']);
10106
          }
10107
      }
10108
  }
10109
  function parseFor(exp) {
10110
      var inMatch = exp.match(forAliasRE);
10111
      if (!inMatch)
10112
          return;
10113
      var res = {};
10114
      res.for = inMatch[2].trim();
10115
      var alias = inMatch[1].trim().replace(stripParensRE, '');
10116
      var iteratorMatch = alias.match(forIteratorRE);
10117
      if (iteratorMatch) {
10118
          res.alias = alias.replace(forIteratorRE, '').trim();
10119
          res.iterator1 = iteratorMatch[1].trim();
10120
          if (iteratorMatch[2]) {
10121
              res.iterator2 = iteratorMatch[2].trim();
10122
          }
10123
      }
10124
      else {
10125
          res.alias = alias;
10126
      }
10127
      return res;
10128
  }
10129
  function processIf(el) {
10130
      var exp = getAndRemoveAttr(el, 'v-if');
10131
      if (exp) {
10132
          el.if = exp;
10133
          addIfCondition(el, {
10134
              exp: exp,
10135
              block: el
10136
          });
10137
      }
10138
      else {
10139
          if (getAndRemoveAttr(el, 'v-else') != null) {
10140
              el.else = true;
10141
          }
10142
          var elseif = getAndRemoveAttr(el, 'v-else-if');
10143
          if (elseif) {
10144
              el.elseif = elseif;
10145
          }
10146
      }
10147
  }
10148
  function processIfConditions(el, parent) {
10149
      var prev = findPrevElement(parent.children);
10150
      if (prev && prev.if) {
10151
          addIfCondition(prev, {
10152
              exp: el.elseif,
10153
              block: el
10154
          });
10155
      }
10156
      else {
10157
          warn("v-".concat(el.elseif ? 'else-if="' + el.elseif + '"' : 'else', " ") +
10158
              "used on element <".concat(el.tag, "> without corresponding v-if."), el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);
10159
      }
10160
  }
10161
  function findPrevElement(children) {
10162
      var i = children.length;
10163
      while (i--) {
10164
          if (children[i].type === 1) {
10165
              return children[i];
10166
          }
10167
          else {
10168
              if (children[i].text !== ' ') {
10169
                  warn("text \"".concat(children[i].text.trim(), "\" between v-if and v-else(-if) ") +
10170
                      "will be ignored.", children[i]);
10171
              }
10172
              children.pop();
10173
          }
10174
      }
10175
  }
10176
  function addIfCondition(el, condition) {
10177
      if (!el.ifConditions) {
10178
          el.ifConditions = [];
10179
      }
10180
      el.ifConditions.push(condition);
10181
  }
10182
  function processOnce(el) {
10183
      var once = getAndRemoveAttr(el, 'v-once');
10184
      if (once != null) {
10185
          el.once = true;
10186
      }
10187
  }
10188
  // handle content being passed to a component as slot,
10189
  // e.g. <template slot="xxx">, <div slot-scope="xxx">
10190
  function processSlotContent(el) {
10191
      var slotScope;
10192
      if (el.tag === 'template') {
10193
          slotScope = getAndRemoveAttr(el, 'scope');
10194
          /* istanbul ignore if */
10195
          if (slotScope) {
10196
              warn("the \"scope\" attribute for scoped slots have been deprecated and " +
10197
                  "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
10198
                  "can also be used on plain elements in addition to <template> to " +
10199
                  "denote scoped slots.", el.rawAttrsMap['scope'], true);
10200
          }
10201
          el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
10202
      }
10203
      else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
10204
          /* istanbul ignore if */
10205
          if (el.attrsMap['v-for']) {
10206
              warn("Ambiguous combined usage of slot-scope and v-for on <".concat(el.tag, "> ") +
10207
                  "(v-for takes higher priority). Use a wrapper <template> for the " +
10208
                  "scoped slot to make it clearer.", el.rawAttrsMap['slot-scope'], true);
10209
          }
10210
          el.slotScope = slotScope;
10211
      }
10212
      // slot="xxx"
10213
      var slotTarget = getBindingAttr(el, 'slot');
10214
      if (slotTarget) {
10215
          el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
10216
          el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
10217
          // preserve slot as an attribute for native shadow DOM compat
10218
          // only for non-scoped slots.
10219
          if (el.tag !== 'template' && !el.slotScope) {
10220
              addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
10221
          }
10222
      }
10223
      // 2.6 v-slot syntax
10224
      {
10225
          if (el.tag === 'template') {
10226
              // v-slot on <template>
10227
              var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
10228
              if (slotBinding) {
10229
                  {
10230
                      if (el.slotTarget || el.slotScope) {
10231
                          warn("Unexpected mixed usage of different slot syntaxes.", el);
10232
                      }
10233
                      if (el.parent && !maybeComponent(el.parent)) {
10234
                          warn("<template v-slot> can only appear at the root level inside " +
10235
                              "the receiving component", el);
10236
                      }
10237
                  }
10238
                  var _a = getSlotName(slotBinding), name_2 = _a.name, dynamic = _a.dynamic;
10239
                  el.slotTarget = name_2;
10240
                  el.slotTargetDynamic = dynamic;
10241
                  el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
10242
              }
10243
          }
10244
          else {
10245
              // v-slot on component, denotes default slot
10246
              var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
10247
              if (slotBinding) {
10248
                  {
10249
                      if (!maybeComponent(el)) {
10250
                          warn("v-slot can only be used on components or <template>.", slotBinding);
10251
                      }
10252
                      if (el.slotScope || el.slotTarget) {
10253
                          warn("Unexpected mixed usage of different slot syntaxes.", el);
10254
                      }
10255
                      if (el.scopedSlots) {
10256
                          warn("To avoid scope ambiguity, the default slot should also use " +
10257
                              "<template> syntax when there are other named slots.", slotBinding);
10258
                      }
10259
                  }
10260
                  // add the component's children to its default slot
10261
                  var slots = el.scopedSlots || (el.scopedSlots = {});
10262
                  var _b = getSlotName(slotBinding), name_3 = _b.name, dynamic = _b.dynamic;
10263
                  var slotContainer_1 = (slots[name_3] = createASTElement('template', [], el));
10264
                  slotContainer_1.slotTarget = name_3;
10265
                  slotContainer_1.slotTargetDynamic = dynamic;
10266
                  slotContainer_1.children = el.children.filter(function (c) {
10267
                      if (!c.slotScope) {
10268
                          c.parent = slotContainer_1;
10269
                          return true;
10270
                      }
10271
                  });
10272
                  slotContainer_1.slotScope = slotBinding.value || emptySlotScopeToken;
10273
                  // remove children as they are returned from scopedSlots now
10274
                  el.children = [];
10275
                  // mark el non-plain so data gets generated
10276
                  el.plain = false;
10277
              }
10278
          }
10279
      }
10280
  }
10281
  function getSlotName(binding) {
10282
      var name = binding.name.replace(slotRE, '');
10283
      if (!name) {
10284
          if (binding.name[0] !== '#') {
10285
              name = 'default';
10286
          }
10287
          else {
10288
              warn("v-slot shorthand syntax requires a slot name.", binding);
10289
          }
10290
      }
10291
      return dynamicArgRE.test(name)
10292
          ? // dynamic [name]
10293
              { name: name.slice(1, -1), dynamic: true }
10294
          : // static name
10295
              { name: "\"".concat(name, "\""), dynamic: false };
10296
  }
10297
  // handle <slot/> outlets
10298
  function processSlotOutlet(el) {
10299
      if (el.tag === 'slot') {
10300
          el.slotName = getBindingAttr(el, 'name');
10301
          if (el.key) {
10302
              warn("`key` does not work on <slot> because slots are abstract outlets " +
10303
                  "and can possibly expand into multiple elements. " +
10304
                  "Use the key on a wrapping element instead.", getRawBindingAttr(el, 'key'));
10305
          }
10306
      }
10307
  }
10308
  function processComponent(el) {
10309
      var binding;
10310
      if ((binding = getBindingAttr(el, 'is'))) {
10311
          el.component = binding;
10312
      }
10313
      if (getAndRemoveAttr(el, 'inline-template') != null) {
10314
          el.inlineTemplate = true;
10315
      }
10316
  }
10317
  function processAttrs(el) {
10318
      var list = el.attrsList;
10319
      var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
10320
      for (i = 0, l = list.length; i < l; i++) {
10321
          name = rawName = list[i].name;
10322
          value = list[i].value;
10323
          if (dirRE.test(name)) {
10324
              // mark element as dynamic
10325
              el.hasBindings = true;
10326
              // modifiers
10327
              modifiers = parseModifiers(name.replace(dirRE, ''));
10328
              // support .foo shorthand syntax for the .prop modifier
10329
              if (modifiers) {
10330
                  name = name.replace(modifierRE, '');
10331
              }
10332
              if (bindRE.test(name)) {
10333
                  // v-bind
10334
                  name = name.replace(bindRE, '');
10335
                  value = parseFilters(value);
10336
                  isDynamic = dynamicArgRE.test(name);
10337
                  if (isDynamic) {
10338
                      name = name.slice(1, -1);
10339
                  }
10340
                  if (value.trim().length === 0) {
10341
                      warn("The value for a v-bind expression cannot be empty. Found in \"v-bind:".concat(name, "\""));
10342
                  }
10343
                  if (modifiers) {
10344
                      if (modifiers.prop && !isDynamic) {
10345
                          name = camelize(name);
10346
                          if (name === 'innerHtml')
10347
                              name = 'innerHTML';
10348
                      }
10349
                      if (modifiers.camel && !isDynamic) {
10350
                          name = camelize(name);
10351
                      }
10352
                      if (modifiers.sync) {
10353
                          syncGen = genAssignmentCode(value, "$event");
10354
                          if (!isDynamic) {
10355
                              addHandler(el, "update:".concat(camelize(name)), syncGen, null, false, warn, list[i]);
10356
                              if (hyphenate(name) !== camelize(name)) {
10357
                                  addHandler(el, "update:".concat(hyphenate(name)), syncGen, null, false, warn, list[i]);
10358
                              }
10359
                          }
10360
                          else {
10361
                              // handler w/ dynamic event name
10362
                              addHandler(el, "\"update:\"+(".concat(name, ")"), syncGen, null, false, warn, list[i], true // dynamic
10363
                              );
10364
                          }
10365
                      }
10366
                  }
10367
                  if ((modifiers && modifiers.prop) ||
10368
                      (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {
10369
                      addProp(el, name, value, list[i], isDynamic);
10370
                  }
10371
                  else {
10372
                      addAttr(el, name, value, list[i], isDynamic);
10373
                  }
10374
              }
10375
              else if (onRE.test(name)) {
10376
                  // v-on
10377
                  name = name.replace(onRE, '');
10378
                  isDynamic = dynamicArgRE.test(name);
10379
                  if (isDynamic) {
10380
                      name = name.slice(1, -1);
10381
                  }
10382
                  addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);
10383
              }
10384
              else {
10385
                  // normal directives
10386
                  name = name.replace(dirRE, '');
10387
                  // parse arg
10388
                  var argMatch = name.match(argRE);
10389
                  var arg = argMatch && argMatch[1];
10390
                  isDynamic = false;
10391
                  if (arg) {
10392
                      name = name.slice(0, -(arg.length + 1));
10393
                      if (dynamicArgRE.test(arg)) {
10394
                          arg = arg.slice(1, -1);
10395
                          isDynamic = true;
10396
                      }
10397
                  }
10398
                  addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
10399
                  if (name === 'model') {
10400
                      checkForAliasModel(el, value);
10401
                  }
10402
              }
10403
          }
10404
          else {
10405
              // literal attribute
10406
              {
10407
                  var res = parseText(value, delimiters);
10408
                  if (res) {
10409
                      warn("".concat(name, "=\"").concat(value, "\": ") +
10410
                          'Interpolation inside attributes has been removed. ' +
10411
                          'Use v-bind or the colon shorthand instead. For example, ' +
10412
                          'instead of <div id="{{ val }}">, use <div :id="val">.', list[i]);
10413
                  }
10414
              }
10415
              addAttr(el, name, JSON.stringify(value), list[i]);
10416
              // #6887 firefox doesn't update muted state if set via attribute
10417
              // even immediately after element creation
10418
              if (!el.component &&
10419
                  name === 'muted' &&
10420
                  platformMustUseProp(el.tag, el.attrsMap.type, name)) {
10421
                  addProp(el, name, 'true', list[i]);
10422
              }
10423
          }
10424
      }
10425
  }
10426
  function checkInFor(el) {
10427
      var parent = el;
10428
      while (parent) {
10429
          if (parent.for !== undefined) {
10430
              return true;
10431
          }
10432
          parent = parent.parent;
10433
      }
10434
      return false;
10435
  }
10436
  function parseModifiers(name) {
10437
      var match = name.match(modifierRE);
10438
      if (match) {
10439
          var ret_1 = {};
10440
          match.forEach(function (m) {
10441
              ret_1[m.slice(1)] = true;
10442
          });
10443
          return ret_1;
10444
      }
10445
  }
10446
  function makeAttrsMap(attrs) {
10447
      var map = {};
10448
      for (var i = 0, l = attrs.length; i < l; i++) {
10449
          if (map[attrs[i].name] && !isIE && !isEdge) {
10450
              warn('duplicate attribute: ' + attrs[i].name, attrs[i]);
10451
          }
10452
          map[attrs[i].name] = attrs[i].value;
10453
      }
10454
      return map;
10455
  }
10456
  // for script (e.g. type="x/template") or style, do not decode content
10457
  function isTextTag(el) {
10458
      return el.tag === 'script' || el.tag === 'style';
10459
  }
10460
  function isForbiddenTag(el) {
10461
      return (el.tag === 'style' ||
10462
          (el.tag === 'script' &&
10463
              (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));
10464
  }
10465
  var ieNSBug = /^xmlns:NS\d+/;
10466
  var ieNSPrefix = /^NS\d+:/;
10467
  /* istanbul ignore next */
10468
  function guardIESVGBug(attrs) {
10469
      var res = [];
10470
      for (var i = 0; i < attrs.length; i++) {
10471
          var attr = attrs[i];
10472
          if (!ieNSBug.test(attr.name)) {
10473
              attr.name = attr.name.replace(ieNSPrefix, '');
10474
              res.push(attr);
10475
          }
10476
      }
10477
      return res;
10478
  }
10479
  function checkForAliasModel(el, value) {
10480
      var _el = el;
10481
      while (_el) {
10482
          if (_el.for && _el.alias === value) {
10483
              warn("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +
10484
                  "You are binding v-model directly to a v-for iteration alias. " +
10485
                  "This will not be able to modify the v-for source array because " +
10486
                  "writing to the alias is like modifying a function local variable. " +
10487
                  "Consider using an array of objects and use v-model on an object property instead.", el.rawAttrsMap['v-model']);
10488
          }
10489
          _el = _el.parent;
10490
      }
10491
  }
10492

10493
  /**
10494
   * Expand input[v-model] with dynamic type bindings into v-if-else chains
10495
   * Turn this:
10496
   *   <input v-model="data[type]" :type="type">
10497
   * into this:
10498
   *   <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
10499
   *   <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
10500
   *   <input v-else :type="type" v-model="data[type]">
10501
   */
10502
  function preTransformNode(el, options) {
10503
      if (el.tag === 'input') {
10504
          var map = el.attrsMap;
10505
          if (!map['v-model']) {
10506
              return;
10507
          }
10508
          var typeBinding = void 0;
10509
          if (map[':type'] || map['v-bind:type']) {
10510
              typeBinding = getBindingAttr(el, 'type');
10511
          }
10512
          if (!map.type && !typeBinding && map['v-bind']) {
10513
              typeBinding = "(".concat(map['v-bind'], ").type");
10514
          }
10515
          if (typeBinding) {
10516
              var ifCondition = getAndRemoveAttr(el, 'v-if', true);
10517
              var ifConditionExtra = ifCondition ? "&&(".concat(ifCondition, ")") : "";
10518
              var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
10519
              var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
10520
              // 1. checkbox
10521
              var branch0 = cloneASTElement(el);
10522
              // process for on the main node
10523
              processFor(branch0);
10524
              addRawAttr(branch0, 'type', 'checkbox');
10525
              processElement(branch0, options);
10526
              branch0.processed = true; // prevent it from double-processed
10527
              branch0.if = "(".concat(typeBinding, ")==='checkbox'") + ifConditionExtra;
10528
              addIfCondition(branch0, {
10529
                  exp: branch0.if,
10530
                  block: branch0
10531
              });
10532
              // 2. add radio else-if condition
10533
              var branch1 = cloneASTElement(el);
10534
              getAndRemoveAttr(branch1, 'v-for', true);
10535
              addRawAttr(branch1, 'type', 'radio');
10536
              processElement(branch1, options);
10537
              addIfCondition(branch0, {
10538
                  exp: "(".concat(typeBinding, ")==='radio'") + ifConditionExtra,
10539
                  block: branch1
10540
              });
10541
              // 3. other
10542
              var branch2 = cloneASTElement(el);
10543
              getAndRemoveAttr(branch2, 'v-for', true);
10544
              addRawAttr(branch2, ':type', typeBinding);
10545
              processElement(branch2, options);
10546
              addIfCondition(branch0, {
10547
                  exp: ifCondition,
10548
                  block: branch2
10549
              });
10550
              if (hasElse) {
10551
                  branch0.else = true;
10552
              }
10553
              else if (elseIfCondition) {
10554
                  branch0.elseif = elseIfCondition;
10555
              }
10556
              return branch0;
10557
          }
10558
      }
10559
  }
10560
  function cloneASTElement(el) {
10561
      return createASTElement(el.tag, el.attrsList.slice(), el.parent);
10562
  }
10563
  var model = {
10564
      preTransformNode: preTransformNode
10565
  };
10566

10567
  var modules = [klass, style, model];
10568

10569
  function text(el, dir) {
10570
      if (dir.value) {
10571
          addProp(el, 'textContent', "_s(".concat(dir.value, ")"), dir);
10572
      }
10573
  }
10574

10575
  function html(el, dir) {
10576
      if (dir.value) {
10577
          addProp(el, 'innerHTML', "_s(".concat(dir.value, ")"), dir);
10578
      }
10579
  }
10580

10581
  var directives = {
10582
      model: model$1,
10583
      text: text,
10584
      html: html
10585
  };
10586

10587
  var baseOptions = {
10588
      expectHTML: true,
10589
      modules: modules,
10590
      directives: directives,
10591
      isPreTag: isPreTag,
10592
      isUnaryTag: isUnaryTag,
10593
      mustUseProp: mustUseProp,
10594
      canBeLeftOpenTag: canBeLeftOpenTag,
10595
      isReservedTag: isReservedTag,
10596
      getTagNamespace: getTagNamespace,
10597
      staticKeys: genStaticKeys$1(modules)
10598
  };
10599

10600
  var isStaticKey;
10601
  var isPlatformReservedTag;
10602
  var genStaticKeysCached = cached(genStaticKeys);
10603
  /**
10604
   * Goal of the optimizer: walk the generated template AST tree
10605
   * and detect sub-trees that are purely static, i.e. parts of
10606
   * the DOM that never needs to change.
10607
   *
10608
   * Once we detect these sub-trees, we can:
10609
   *
10610
   * 1. Hoist them into constants, so that we no longer need to
10611
   *    create fresh nodes for them on each re-render;
10612
   * 2. Completely skip them in the patching process.
10613
   */
10614
  function optimize(root, options) {
10615
      if (!root)
10616
          return;
10617
      isStaticKey = genStaticKeysCached(options.staticKeys || '');
10618
      isPlatformReservedTag = options.isReservedTag || no;
10619
      // first pass: mark all non-static nodes.
10620
      markStatic(root);
10621
      // second pass: mark static roots.
10622
      markStaticRoots(root, false);
10623
  }
10624
  function genStaticKeys(keys) {
10625
      return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
10626
          (keys ? ',' + keys : ''));
10627
  }
10628
  function markStatic(node) {
10629
      node.static = isStatic(node);
10630
      if (node.type === 1) {
10631
          // do not make component slot content static. this avoids
10632
          // 1. components not able to mutate slot nodes
10633
          // 2. static slot content fails for hot-reloading
10634
          if (!isPlatformReservedTag(node.tag) &&
10635
              node.tag !== 'slot' &&
10636
              node.attrsMap['inline-template'] == null) {
10637
              return;
10638
          }
10639
          for (var i = 0, l = node.children.length; i < l; i++) {
10640
              var child = node.children[i];
10641
              markStatic(child);
10642
              if (!child.static) {
10643
                  node.static = false;
10644
              }
10645
          }
10646
          if (node.ifConditions) {
10647
              for (var i = 1, l = node.ifConditions.length; i < l; i++) {
10648
                  var block = node.ifConditions[i].block;
10649
                  markStatic(block);
10650
                  if (!block.static) {
10651
                      node.static = false;
10652
                  }
10653
              }
10654
          }
10655
      }
10656
  }
10657
  function markStaticRoots(node, isInFor) {
10658
      if (node.type === 1) {
10659
          if (node.static || node.once) {
10660
              node.staticInFor = isInFor;
10661
          }
10662
          // For a node to qualify as a static root, it should have children that
10663
          // are not just static text. Otherwise the cost of hoisting out will
10664
          // outweigh the benefits and it's better off to just always render it fresh.
10665
          if (node.static &&
10666
              node.children.length &&
10667
              !(node.children.length === 1 && node.children[0].type === 3)) {
10668
              node.staticRoot = true;
10669
              return;
10670
          }
10671
          else {
10672
              node.staticRoot = false;
10673
          }
10674
          if (node.children) {
10675
              for (var i = 0, l = node.children.length; i < l; i++) {
10676
                  markStaticRoots(node.children[i], isInFor || !!node.for);
10677
              }
10678
          }
10679
          if (node.ifConditions) {
10680
              for (var i = 1, l = node.ifConditions.length; i < l; i++) {
10681
                  markStaticRoots(node.ifConditions[i].block, isInFor);
10682
              }
10683
          }
10684
      }
10685
  }
10686
  function isStatic(node) {
10687
      if (node.type === 2) {
10688
          // expression
10689
          return false;
10690
      }
10691
      if (node.type === 3) {
10692
          // text
10693
          return true;
10694
      }
10695
      return !!(node.pre ||
10696
          (!node.hasBindings && // no dynamic bindings
10697
              !node.if &&
10698
              !node.for && // not v-if or v-for or v-else
10699
              !isBuiltInTag(node.tag) && // not a built-in
10700
              isPlatformReservedTag(node.tag) && // not a component
10701
              !isDirectChildOfTemplateFor(node) &&
10702
              Object.keys(node).every(isStaticKey)));
10703
  }
10704
  function isDirectChildOfTemplateFor(node) {
10705
      while (node.parent) {
10706
          node = node.parent;
10707
          if (node.tag !== 'template') {
10708
              return false;
10709
          }
10710
          if (node.for) {
10711
              return true;
10712
          }
10713
      }
10714
      return false;
10715
  }
10716

10717
  var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
10718
  var fnInvokeRE = /\([^)]*?\);*$/;
10719
  var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
10720
  // KeyboardEvent.keyCode aliases
10721
  var keyCodes = {
10722
      esc: 27,
10723
      tab: 9,
10724
      enter: 13,
10725
      space: 32,
10726
      up: 38,
10727
      left: 37,
10728
      right: 39,
10729
      down: 40,
10730
      delete: [8, 46]
10731
  };
10732
  // KeyboardEvent.key aliases
10733
  var keyNames = {
10734
      // #7880: IE11 and Edge use `Esc` for Escape key name.
10735
      esc: ['Esc', 'Escape'],
10736
      tab: 'Tab',
10737
      enter: 'Enter',
10738
      // #9112: IE11 uses `Spacebar` for Space key name.
10739
      space: [' ', 'Spacebar'],
10740
      // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
10741
      up: ['Up', 'ArrowUp'],
10742
      left: ['Left', 'ArrowLeft'],
10743
      right: ['Right', 'ArrowRight'],
10744
      down: ['Down', 'ArrowDown'],
10745
      // #9112: IE11 uses `Del` for Delete key name.
10746
      delete: ['Backspace', 'Delete', 'Del']
10747
  };
10748
  // #4868: modifiers that prevent the execution of the listener
10749
  // need to explicitly return null so that we can determine whether to remove
10750
  // the listener for .once
10751
  var genGuard = function (condition) { return "if(".concat(condition, ")return null;"); };
10752
  var modifierCode = {
10753
      stop: '$event.stopPropagation();',
10754
      prevent: '$event.preventDefault();',
10755
      self: genGuard("$event.target !== $event.currentTarget"),
10756
      ctrl: genGuard("!$event.ctrlKey"),
10757
      shift: genGuard("!$event.shiftKey"),
10758
      alt: genGuard("!$event.altKey"),
10759
      meta: genGuard("!$event.metaKey"),
10760
      left: genGuard("'button' in $event && $event.button !== 0"),
10761
      middle: genGuard("'button' in $event && $event.button !== 1"),
10762
      right: genGuard("'button' in $event && $event.button !== 2")
10763
  };
10764
  function genHandlers(events, isNative) {
10765
      var prefix = isNative ? 'nativeOn:' : 'on:';
10766
      var staticHandlers = "";
10767
      var dynamicHandlers = "";
10768
      for (var name_1 in events) {
10769
          var handlerCode = genHandler(events[name_1]);
10770
          //@ts-expect-error
10771
          if (events[name_1] && events[name_1].dynamic) {
10772
              dynamicHandlers += "".concat(name_1, ",").concat(handlerCode, ",");
10773
          }
10774
          else {
10775
              staticHandlers += "\"".concat(name_1, "\":").concat(handlerCode, ",");
10776
          }
10777
      }
10778
      staticHandlers = "{".concat(staticHandlers.slice(0, -1), "}");
10779
      if (dynamicHandlers) {
10780
          return prefix + "_d(".concat(staticHandlers, ",[").concat(dynamicHandlers.slice(0, -1), "])");
10781
      }
10782
      else {
10783
          return prefix + staticHandlers;
10784
      }
10785
  }
10786
  function genHandler(handler) {
10787
      if (!handler) {
10788
          return 'function(){}';
10789
      }
10790
      if (Array.isArray(handler)) {
10791
          return "[".concat(handler.map(function (handler) { return genHandler(handler); }).join(','), "]");
10792
      }
10793
      var isMethodPath = simplePathRE.test(handler.value);
10794
      var isFunctionExpression = fnExpRE.test(handler.value);
10795
      var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
10796
      if (!handler.modifiers) {
10797
          if (isMethodPath || isFunctionExpression) {
10798
              return handler.value;
10799
          }
10800
          return "function($event){".concat(isFunctionInvocation ? "return ".concat(handler.value) : handler.value, "}"); // inline statement
10801
      }
10802
      else {
10803
          var code = '';
10804
          var genModifierCode = '';
10805
          var keys = [];
10806
          var _loop_1 = function (key) {
10807
              if (modifierCode[key]) {
10808
                  genModifierCode += modifierCode[key];
10809
                  // left/right
10810
                  if (keyCodes[key]) {
10811
                      keys.push(key);
10812
                  }
10813
              }
10814
              else if (key === 'exact') {
10815
                  var modifiers_1 = handler.modifiers;
10816
                  genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']
10817
                      .filter(function (keyModifier) { return !modifiers_1[keyModifier]; })
10818
                      .map(function (keyModifier) { return "$event.".concat(keyModifier, "Key"); })
10819
                      .join('||'));
10820
              }
10821
              else {
10822
                  keys.push(key);
10823
              }
10824
          };
10825
          for (var key in handler.modifiers) {
10826
              _loop_1(key);
10827
          }
10828
          if (keys.length) {
10829
              code += genKeyFilter(keys);
10830
          }
10831
          // Make sure modifiers like prevent and stop get executed after key filtering
10832
          if (genModifierCode) {
10833
              code += genModifierCode;
10834
          }
10835
          var handlerCode = isMethodPath
10836
              ? "return ".concat(handler.value, ".apply(null, arguments)")
10837
              : isFunctionExpression
10838
                  ? "return (".concat(handler.value, ").apply(null, arguments)")
10839
                  : isFunctionInvocation
10840
                      ? "return ".concat(handler.value)
10841
                      : handler.value;
10842
          return "function($event){".concat(code).concat(handlerCode, "}");
10843
      }
10844
  }
10845
  function genKeyFilter(keys) {
10846
      return (
10847
      // make sure the key filters only apply to KeyboardEvents
10848
      // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
10849
      // key events that do not have keyCode property...
10850
      "if(!$event.type.indexOf('key')&&" +
10851
          "".concat(keys.map(genFilterCode).join('&&'), ")return null;"));
10852
  }
10853
  function genFilterCode(key) {
10854
      var keyVal = parseInt(key, 10);
10855
      if (keyVal) {
10856
          return "$event.keyCode!==".concat(keyVal);
10857
      }
10858
      var keyCode = keyCodes[key];
10859
      var keyName = keyNames[key];
10860
      return ("_k($event.keyCode," +
10861
          "".concat(JSON.stringify(key), ",") +
10862
          "".concat(JSON.stringify(keyCode), ",") +
10863
          "$event.key," +
10864
          "".concat(JSON.stringify(keyName)) +
10865
          ")");
10866
  }
10867

10868
  function on(el, dir) {
10869
      if (dir.modifiers) {
10870
          warn$2("v-on without argument does not support modifiers.");
10871
      }
10872
      el.wrapListeners = function (code) { return "_g(".concat(code, ",").concat(dir.value, ")"); };
10873
  }
10874

10875
  function bind(el, dir) {
10876
      el.wrapData = function (code) {
10877
          return "_b(".concat(code, ",'").concat(el.tag, "',").concat(dir.value, ",").concat(dir.modifiers && dir.modifiers.prop ? 'true' : 'false').concat(dir.modifiers && dir.modifiers.sync ? ',true' : '', ")");
10878
      };
10879
  }
10880

10881
  var baseDirectives = {
10882
      on: on,
10883
      bind: bind,
10884
      cloak: noop
10885
  };
10886

10887
  var CodegenState = /** @class */ (function () {
10888
      function CodegenState(options) {
10889
          this.options = options;
10890
          this.warn = options.warn || baseWarn;
10891
          this.transforms = pluckModuleFunction(options.modules, 'transformCode');
10892
          this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
10893
          this.directives = extend(extend({}, baseDirectives), options.directives);
10894
          var isReservedTag = options.isReservedTag || no;
10895
          this.maybeComponent = function (el) {
10896
              return !!el.component || !isReservedTag(el.tag);
10897
          };
10898
          this.onceId = 0;
10899
          this.staticRenderFns = [];
10900
          this.pre = false;
10901
      }
10902
      return CodegenState;
10903
  }());
10904
  function generate(ast, options) {
10905
      var state = new CodegenState(options);
10906
      // fix #11483, Root level <script> tags should not be rendered.
10907
      var code = ast
10908
          ? ast.tag === 'script'
10909
              ? 'null'
10910
              : genElement(ast, state)
10911
          : '_c("div")';
10912
      return {
10913
          render: "with(this){return ".concat(code, "}"),
10914
          staticRenderFns: state.staticRenderFns
10915
      };
10916
  }
10917
  function genElement(el, state) {
10918
      if (el.parent) {
10919
          el.pre = el.pre || el.parent.pre;
10920
      }
10921
      if (el.staticRoot && !el.staticProcessed) {
10922
          return genStatic(el, state);
10923
      }
10924
      else if (el.once && !el.onceProcessed) {
10925
          return genOnce(el, state);
10926
      }
10927
      else if (el.for && !el.forProcessed) {
10928
          return genFor(el, state);
10929
      }
10930
      else if (el.if && !el.ifProcessed) {
10931
          return genIf(el, state);
10932
      }
10933
      else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
10934
          return genChildren(el, state) || 'void 0';
10935
      }
10936
      else if (el.tag === 'slot') {
10937
          return genSlot(el, state);
10938
      }
10939
      else {
10940
          // component or element
10941
          var code = void 0;
10942
          if (el.component) {
10943
              code = genComponent(el.component, el, state);
10944
          }
10945
          else {
10946
              var data = void 0;
10947
              var maybeComponent = state.maybeComponent(el);
10948
              if (!el.plain || (el.pre && maybeComponent)) {
10949
                  data = genData(el, state);
10950
              }
10951
              var tag 
10952
              // check if this is a component in <script setup>
10953
              = void 0;
10954
              // check if this is a component in <script setup>
10955
              var bindings = state.options.bindings;
10956
              if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {
10957
                  tag = checkBindingType(bindings, el.tag);
10958
              }
10959
              if (!tag)
10960
                  tag = "'".concat(el.tag, "'");
10961
              var children = el.inlineTemplate ? null : genChildren(el, state, true);
10962
              code = "_c(".concat(tag).concat(data ? ",".concat(data) : '' // data
10963
              ).concat(children ? ",".concat(children) : '' // children
10964
              , ")");
10965
          }
10966
          // module transforms
10967
          for (var i = 0; i < state.transforms.length; i++) {
10968
              code = state.transforms[i](el, code);
10969
          }
10970
          return code;
10971
      }
10972
  }
10973
  function checkBindingType(bindings, key) {
10974
      var camelName = camelize(key);
10975
      var PascalName = capitalize(camelName);
10976
      var checkType = function (type) {
10977
          if (bindings[key] === type) {
10978
              return key;
10979
          }
10980
          if (bindings[camelName] === type) {
10981
              return camelName;
10982
          }
10983
          if (bindings[PascalName] === type) {
10984
              return PascalName;
10985
          }
10986
      };
10987
      var fromConst = checkType("setup-const" /* BindingTypes.SETUP_CONST */) ||
10988
          checkType("setup-reactive-const" /* BindingTypes.SETUP_REACTIVE_CONST */);
10989
      if (fromConst) {
10990
          return fromConst;
10991
      }
10992
      var fromMaybeRef = checkType("setup-let" /* BindingTypes.SETUP_LET */) ||
10993
          checkType("setup-ref" /* BindingTypes.SETUP_REF */) ||
10994
          checkType("setup-maybe-ref" /* BindingTypes.SETUP_MAYBE_REF */);
10995
      if (fromMaybeRef) {
10996
          return fromMaybeRef;
10997
      }
10998
  }
10999
  // hoist static sub-trees out
11000
  function genStatic(el, state) {
11001
      el.staticProcessed = true;
11002
      // Some elements (templates) need to behave differently inside of a v-pre
11003
      // node.  All pre nodes are static roots, so we can use this as a location to
11004
      // wrap a state change and reset it upon exiting the pre node.
11005
      var originalPreState = state.pre;
11006
      if (el.pre) {
11007
          state.pre = el.pre;
11008
      }
11009
      state.staticRenderFns.push("with(this){return ".concat(genElement(el, state), "}"));
11010
      state.pre = originalPreState;
11011
      return "_m(".concat(state.staticRenderFns.length - 1).concat(el.staticInFor ? ',true' : '', ")");
11012
  }
11013
  // v-once
11014
  function genOnce(el, state) {
11015
      el.onceProcessed = true;
11016
      if (el.if && !el.ifProcessed) {
11017
          return genIf(el, state);
11018
      }
11019
      else if (el.staticInFor) {
11020
          var key = '';
11021
          var parent_1 = el.parent;
11022
          while (parent_1) {
11023
              if (parent_1.for) {
11024
                  key = parent_1.key;
11025
                  break;
11026
              }
11027
              parent_1 = parent_1.parent;
11028
          }
11029
          if (!key) {
11030
              state.warn("v-once can only be used inside v-for that is keyed. ", el.rawAttrsMap['v-once']);
11031
              return genElement(el, state);
11032
          }
11033
          return "_o(".concat(genElement(el, state), ",").concat(state.onceId++, ",").concat(key, ")");
11034
      }
11035
      else {
11036
          return genStatic(el, state);
11037
      }
11038
  }
11039
  function genIf(el, state, altGen, altEmpty) {
11040
      el.ifProcessed = true; // avoid recursion
11041
      return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);
11042
  }
11043
  function genIfConditions(conditions, state, altGen, altEmpty) {
11044
      if (!conditions.length) {
11045
          return altEmpty || '_e()';
11046
      }
11047
      var condition = conditions.shift();
11048
      if (condition.exp) {
11049
          return "(".concat(condition.exp, ")?").concat(genTernaryExp(condition.block), ":").concat(genIfConditions(conditions, state, altGen, altEmpty));
11050
      }
11051
      else {
11052
          return "".concat(genTernaryExp(condition.block));
11053
      }
11054
      // v-if with v-once should generate code like (a)?_m(0):_m(1)
11055
      function genTernaryExp(el) {
11056
          return altGen
11057
              ? altGen(el, state)
11058
              : el.once
11059
                  ? genOnce(el, state)
11060
                  : genElement(el, state);
11061
      }
11062
  }
11063
  function genFor(el, state, altGen, altHelper) {
11064
      var exp = el.for;
11065
      var alias = el.alias;
11066
      var iterator1 = el.iterator1 ? ",".concat(el.iterator1) : '';
11067
      var iterator2 = el.iterator2 ? ",".concat(el.iterator2) : '';
11068
      if (state.maybeComponent(el) &&
11069
          el.tag !== 'slot' &&
11070
          el.tag !== 'template' &&
11071
          !el.key) {
11072
          state.warn("<".concat(el.tag, " v-for=\"").concat(alias, " in ").concat(exp, "\">: component lists rendered with ") +
11073
              "v-for should have explicit keys. " +
11074
              "See https://vuejs.org/guide/list.html#key for more info.", el.rawAttrsMap['v-for'], true /* tip */);
11075
      }
11076
      el.forProcessed = true; // avoid recursion
11077
      return ("".concat(altHelper || '_l', "((").concat(exp, "),") +
11078
          "function(".concat(alias).concat(iterator1).concat(iterator2, "){") +
11079
          "return ".concat((altGen || genElement)(el, state)) +
11080
          '})');
11081
  }
11082
  function genData(el, state) {
11083
      var data = '{';
11084
      // directives first.
11085
      // directives may mutate the el's other properties before they are generated.
11086
      var dirs = genDirectives(el, state);
11087
      if (dirs)
11088
          data += dirs + ',';
11089
      // key
11090
      if (el.key) {
11091
          data += "key:".concat(el.key, ",");
11092
      }
11093
      // ref
11094
      if (el.ref) {
11095
          data += "ref:".concat(el.ref, ",");
11096
      }
11097
      if (el.refInFor) {
11098
          data += "refInFor:true,";
11099
      }
11100
      // pre
11101
      if (el.pre) {
11102
          data += "pre:true,";
11103
      }
11104
      // record original tag name for components using "is" attribute
11105
      if (el.component) {
11106
          data += "tag:\"".concat(el.tag, "\",");
11107
      }
11108
      // module data generation functions
11109
      for (var i = 0; i < state.dataGenFns.length; i++) {
11110
          data += state.dataGenFns[i](el);
11111
      }
11112
      // attributes
11113
      if (el.attrs) {
11114
          data += "attrs:".concat(genProps(el.attrs), ",");
11115
      }
11116
      // DOM props
11117
      if (el.props) {
11118
          data += "domProps:".concat(genProps(el.props), ",");
11119
      }
11120
      // event handlers
11121
      if (el.events) {
11122
          data += "".concat(genHandlers(el.events, false), ",");
11123
      }
11124
      if (el.nativeEvents) {
11125
          data += "".concat(genHandlers(el.nativeEvents, true), ",");
11126
      }
11127
      // slot target
11128
      // only for non-scoped slots
11129
      if (el.slotTarget && !el.slotScope) {
11130
          data += "slot:".concat(el.slotTarget, ",");
11131
      }
11132
      // scoped slots
11133
      if (el.scopedSlots) {
11134
          data += "".concat(genScopedSlots(el, el.scopedSlots, state), ",");
11135
      }
11136
      // component v-model
11137
      if (el.model) {
11138
          data += "model:{value:".concat(el.model.value, ",callback:").concat(el.model.callback, ",expression:").concat(el.model.expression, "},");
11139
      }
11140
      // inline-template
11141
      if (el.inlineTemplate) {
11142
          var inlineTemplate = genInlineTemplate(el, state);
11143
          if (inlineTemplate) {
11144
              data += "".concat(inlineTemplate, ",");
11145
          }
11146
      }
11147
      data = data.replace(/,$/, '') + '}';
11148
      // v-bind dynamic argument wrap
11149
      // v-bind with dynamic arguments must be applied using the same v-bind object
11150
      // merge helper so that class/style/mustUseProp attrs are handled correctly.
11151
      if (el.dynamicAttrs) {
11152
          data = "_b(".concat(data, ",\"").concat(el.tag, "\",").concat(genProps(el.dynamicAttrs), ")");
11153
      }
11154
      // v-bind data wrap
11155
      if (el.wrapData) {
11156
          data = el.wrapData(data);
11157
      }
11158
      // v-on data wrap
11159
      if (el.wrapListeners) {
11160
          data = el.wrapListeners(data);
11161
      }
11162
      return data;
11163
  }
11164
  function genDirectives(el, state) {
11165
      var dirs = el.directives;
11166
      if (!dirs)
11167
          return;
11168
      var res = 'directives:[';
11169
      var hasRuntime = false;
11170
      var i, l, dir, needRuntime;
11171
      for (i = 0, l = dirs.length; i < l; i++) {
11172
          dir = dirs[i];
11173
          needRuntime = true;
11174
          var gen = state.directives[dir.name];
11175
          if (gen) {
11176
              // compile-time directive that manipulates AST.
11177
              // returns true if it also needs a runtime counterpart.
11178
              needRuntime = !!gen(el, dir, state.warn);
11179
          }
11180
          if (needRuntime) {
11181
              hasRuntime = true;
11182
              res += "{name:\"".concat(dir.name, "\",rawName:\"").concat(dir.rawName, "\"").concat(dir.value
11183
                  ? ",value:(".concat(dir.value, "),expression:").concat(JSON.stringify(dir.value))
11184
                  : '').concat(dir.arg ? ",arg:".concat(dir.isDynamicArg ? dir.arg : "\"".concat(dir.arg, "\"")) : '').concat(dir.modifiers ? ",modifiers:".concat(JSON.stringify(dir.modifiers)) : '', "},");
11185
          }
11186
      }
11187
      if (hasRuntime) {
11188
          return res.slice(0, -1) + ']';
11189
      }
11190
  }
11191
  function genInlineTemplate(el, state) {
11192
      var ast = el.children[0];
11193
      if ((el.children.length !== 1 || ast.type !== 1)) {
11194
          state.warn('Inline-template components must have exactly one child element.', { start: el.start });
11195
      }
11196
      if (ast && ast.type === 1) {
11197
          var inlineRenderFns = generate(ast, state.options);
11198
          return "inlineTemplate:{render:function(){".concat(inlineRenderFns.render, "},staticRenderFns:[").concat(inlineRenderFns.staticRenderFns
11199
              .map(function (code) { return "function(){".concat(code, "}"); })
11200
              .join(','), "]}");
11201
      }
11202
  }
11203
  function genScopedSlots(el, slots, state) {
11204
      // by default scoped slots are considered "stable", this allows child
11205
      // components with only scoped slots to skip forced updates from parent.
11206
      // but in some cases we have to bail-out of this optimization
11207
      // for example if the slot contains dynamic names, has v-if or v-for on them...
11208
      var needsForceUpdate = el.for ||
11209
          Object.keys(slots).some(function (key) {
11210
              var slot = slots[key];
11211
              return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic
11212
              );
11213
          });
11214
      // #9534: if a component with scoped slots is inside a conditional branch,
11215
      // it's possible for the same component to be reused but with different
11216
      // compiled slot content. To avoid that, we generate a unique key based on
11217
      // the generated code of all the slot contents.
11218
      var needsKey = !!el.if;
11219
      // OR when it is inside another scoped slot or v-for (the reactivity may be
11220
      // disconnected due to the intermediate scope variable)
11221
      // #9438, #9506
11222
      // TODO: this can be further optimized by properly analyzing in-scope bindings
11223
      // and skip force updating ones that do not actually use scope variables.
11224
      if (!needsForceUpdate) {
11225
          var parent_2 = el.parent;
11226
          while (parent_2) {
11227
              if ((parent_2.slotScope && parent_2.slotScope !== emptySlotScopeToken) ||
11228
                  parent_2.for) {
11229
                  needsForceUpdate = true;
11230
                  break;
11231
              }
11232
              if (parent_2.if) {
11233
                  needsKey = true;
11234
              }
11235
              parent_2 = parent_2.parent;
11236
          }
11237
      }
11238
      var generatedSlots = Object.keys(slots)
11239
          .map(function (key) { return genScopedSlot(slots[key], state); })
11240
          .join(',');
11241
      return "scopedSlots:_u([".concat(generatedSlots, "]").concat(needsForceUpdate ? ",null,true" : "").concat(!needsForceUpdate && needsKey ? ",null,false,".concat(hash(generatedSlots)) : "", ")");
11242
  }
11243
  function hash(str) {
11244
      var hash = 5381;
11245
      var i = str.length;
11246
      while (i) {
11247
          hash = (hash * 33) ^ str.charCodeAt(--i);
11248
      }
11249
      return hash >>> 0;
11250
  }
11251
  function containsSlotChild(el) {
11252
      if (el.type === 1) {
11253
          if (el.tag === 'slot') {
11254
              return true;
11255
          }
11256
          return el.children.some(containsSlotChild);
11257
      }
11258
      return false;
11259
  }
11260
  function genScopedSlot(el, state) {
11261
      var isLegacySyntax = el.attrsMap['slot-scope'];
11262
      if (el.if && !el.ifProcessed && !isLegacySyntax) {
11263
          return genIf(el, state, genScopedSlot, "null");
11264
      }
11265
      if (el.for && !el.forProcessed) {
11266
          return genFor(el, state, genScopedSlot);
11267
      }
11268
      var slotScope = el.slotScope === emptySlotScopeToken ? "" : String(el.slotScope);
11269
      var fn = "function(".concat(slotScope, "){") +
11270
          "return ".concat(el.tag === 'template'
11271
              ? el.if && isLegacySyntax
11272
                  ? "(".concat(el.if, ")?").concat(genChildren(el, state) || 'undefined', ":undefined")
11273
                  : genChildren(el, state) || 'undefined'
11274
              : genElement(el, state), "}");
11275
      // reverse proxy v-slot without scope on this.$slots
11276
      var reverseProxy = slotScope ? "" : ",proxy:true";
11277
      return "{key:".concat(el.slotTarget || "\"default\"", ",fn:").concat(fn).concat(reverseProxy, "}");
11278
  }
11279
  function genChildren(el, state, checkSkip, altGenElement, altGenNode) {
11280
      var children = el.children;
11281
      if (children.length) {
11282
          var el_1 = children[0];
11283
          // optimize single v-for
11284
          if (children.length === 1 &&
11285
              el_1.for &&
11286
              el_1.tag !== 'template' &&
11287
              el_1.tag !== 'slot') {
11288
              var normalizationType_1 = checkSkip
11289
                  ? state.maybeComponent(el_1)
11290
                      ? ",1"
11291
                      : ",0"
11292
                  : "";
11293
              return "".concat((altGenElement || genElement)(el_1, state)).concat(normalizationType_1);
11294
          }
11295
          var normalizationType = checkSkip
11296
              ? getNormalizationType(children, state.maybeComponent)
11297
              : 0;
11298
          var gen_1 = altGenNode || genNode;
11299
          return "[".concat(children.map(function (c) { return gen_1(c, state); }).join(','), "]").concat(normalizationType ? ",".concat(normalizationType) : '');
11300
      }
11301
  }
11302
  // determine the normalization needed for the children array.
11303
  // 0: no normalization needed
11304
  // 1: simple normalization needed (possible 1-level deep nested array)
11305
  // 2: full normalization needed
11306
  function getNormalizationType(children, maybeComponent) {
11307
      var res = 0;
11308
      for (var i = 0; i < children.length; i++) {
11309
          var el = children[i];
11310
          if (el.type !== 1) {
11311
              continue;
11312
          }
11313
          if (needsNormalization(el) ||
11314
              (el.ifConditions &&
11315
                  el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
11316
              res = 2;
11317
              break;
11318
          }
11319
          if (maybeComponent(el) ||
11320
              (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
11321
              res = 1;
11322
          }
11323
      }
11324
      return res;
11325
  }
11326
  function needsNormalization(el) {
11327
      return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';
11328
  }
11329
  function genNode(node, state) {
11330
      if (node.type === 1) {
11331
          return genElement(node, state);
11332
      }
11333
      else if (node.type === 3 && node.isComment) {
11334
          return genComment(node);
11335
      }
11336
      else {
11337
          return genText(node);
11338
      }
11339
  }
11340
  function genText(text) {
11341
      return "_v(".concat(text.type === 2
11342
          ? text.expression // no need for () because already wrapped in _s()
11343
          : transformSpecialNewlines(JSON.stringify(text.text)), ")");
11344
  }
11345
  function genComment(comment) {
11346
      return "_e(".concat(JSON.stringify(comment.text), ")");
11347
  }
11348
  function genSlot(el, state) {
11349
      var slotName = el.slotName || '"default"';
11350
      var children = genChildren(el, state);
11351
      var res = "_t(".concat(slotName).concat(children ? ",function(){return ".concat(children, "}") : '');
11352
      var attrs = el.attrs || el.dynamicAttrs
11353
          ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
11354
              // slot props are camelized
11355
              name: camelize(attr.name),
11356
              value: attr.value,
11357
              dynamic: attr.dynamic
11358
          }); }))
11359
          : null;
11360
      var bind = el.attrsMap['v-bind'];
11361
      if ((attrs || bind) && !children) {
11362
          res += ",null";
11363
      }
11364
      if (attrs) {
11365
          res += ",".concat(attrs);
11366
      }
11367
      if (bind) {
11368
          res += "".concat(attrs ? '' : ',null', ",").concat(bind);
11369
      }
11370
      return res + ')';
11371
  }
11372
  // componentName is el.component, take it as argument to shun flow's pessimistic refinement
11373
  function genComponent(componentName, el, state) {
11374
      var children = el.inlineTemplate ? null : genChildren(el, state, true);
11375
      return "_c(".concat(componentName, ",").concat(genData(el, state)).concat(children ? ",".concat(children) : '', ")");
11376
  }
11377
  function genProps(props) {
11378
      var staticProps = "";
11379
      var dynamicProps = "";
11380
      for (var i = 0; i < props.length; i++) {
11381
          var prop = props[i];
11382
          var value = transformSpecialNewlines(prop.value);
11383
          if (prop.dynamic) {
11384
              dynamicProps += "".concat(prop.name, ",").concat(value, ",");
11385
          }
11386
          else {
11387
              staticProps += "\"".concat(prop.name, "\":").concat(value, ",");
11388
          }
11389
      }
11390
      staticProps = "{".concat(staticProps.slice(0, -1), "}");
11391
      if (dynamicProps) {
11392
          return "_d(".concat(staticProps, ",[").concat(dynamicProps.slice(0, -1), "])");
11393
      }
11394
      else {
11395
          return staticProps;
11396
      }
11397
  }
11398
  // #3895, #4268
11399
  function transformSpecialNewlines(text) {
11400
      return text.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
11401
  }
11402

11403
  // these keywords should not appear inside expressions, but operators like
11404
  // typeof, instanceof and in are allowed
11405
  var prohibitedKeywordRE = new RegExp('\\b' +
11406
      ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
11407
          'super,throw,while,yield,delete,export,import,return,switch,default,' +
11408
          'extends,finally,continue,debugger,function,arguments')
11409
          .split(',')
11410
          .join('\\b|\\b') +
11411
      '\\b');
11412
  // these unary operators should not be used as property/method names
11413
  var unaryOperatorsRE = new RegExp('\\b' +
11414
      'delete,typeof,void'.split(',').join('\\s*\\([^\\)]*\\)|\\b') +
11415
      '\\s*\\([^\\)]*\\)');
11416
  // strip strings in expressions
11417
  var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
11418
  // detect problematic expressions in a template
11419
  function detectErrors(ast, warn) {
11420
      if (ast) {
11421
          checkNode(ast, warn);
11422
      }
11423
  }
11424
  function checkNode(node, warn) {
11425
      if (node.type === 1) {
11426
          for (var name_1 in node.attrsMap) {
11427
              if (dirRE.test(name_1)) {
11428
                  var value = node.attrsMap[name_1];
11429
                  if (value) {
11430
                      var range = node.rawAttrsMap[name_1];
11431
                      if (name_1 === 'v-for') {
11432
                          checkFor(node, "v-for=\"".concat(value, "\""), warn, range);
11433
                      }
11434
                      else if (name_1 === 'v-slot' || name_1[0] === '#') {
11435
                          checkFunctionParameterExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
11436
                      }
11437
                      else if (onRE.test(name_1)) {
11438
                          checkEvent(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
11439
                      }
11440
                      else {
11441
                          checkExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
11442
                      }
11443
                  }
11444
              }
11445
          }
11446
          if (node.children) {
11447
              for (var i = 0; i < node.children.length; i++) {
11448
                  checkNode(node.children[i], warn);
11449
              }
11450
          }
11451
      }
11452
      else if (node.type === 2) {
11453
          checkExpression(node.expression, node.text, warn, node);
11454
      }
11455
  }
11456
  function checkEvent(exp, text, warn, range) {
11457
      var stripped = exp.replace(stripStringRE, '');
11458
      var keywordMatch = stripped.match(unaryOperatorsRE);
11459
      if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
11460
          warn("avoid using JavaScript unary operator as property name: " +
11461
              "\"".concat(keywordMatch[0], "\" in expression ").concat(text.trim()), range);
11462
      }
11463
      checkExpression(exp, text, warn, range);
11464
  }
11465
  function checkFor(node, text, warn, range) {
11466
      checkExpression(node.for || '', text, warn, range);
11467
      checkIdentifier(node.alias, 'v-for alias', text, warn, range);
11468
      checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
11469
      checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
11470
  }
11471
  function checkIdentifier(ident, type, text, warn, range) {
11472
      if (typeof ident === 'string') {
11473
          try {
11474
              new Function("var ".concat(ident, "=_"));
11475
          }
11476
          catch (e) {
11477
              warn("invalid ".concat(type, " \"").concat(ident, "\" in expression: ").concat(text.trim()), range);
11478
          }
11479
      }
11480
  }
11481
  function checkExpression(exp, text, warn, range) {
11482
      try {
11483
          new Function("return ".concat(exp));
11484
      }
11485
      catch (e) {
11486
          var keywordMatch = exp
11487
              .replace(stripStringRE, '')
11488
              .match(prohibitedKeywordRE);
11489
          if (keywordMatch) {
11490
              warn("avoid using JavaScript keyword as property name: " +
11491
                  "\"".concat(keywordMatch[0], "\"\n  Raw expression: ").concat(text.trim()), range);
11492
          }
11493
          else {
11494
              warn("invalid expression: ".concat(e.message, " in\n\n") +
11495
                  "    ".concat(exp, "\n\n") +
11496
                  "  Raw expression: ".concat(text.trim(), "\n"), range);
11497
          }
11498
      }
11499
  }
11500
  function checkFunctionParameterExpression(exp, text, warn, range) {
11501
      try {
11502
          new Function(exp, '');
11503
      }
11504
      catch (e) {
11505
          warn("invalid function parameter expression: ".concat(e.message, " in\n\n") +
11506
              "    ".concat(exp, "\n\n") +
11507
              "  Raw expression: ".concat(text.trim(), "\n"), range);
11508
      }
11509
  }
11510

11511
  var range = 2;
11512
  function generateCodeFrame(source, start, end) {
11513
      if (start === void 0) { start = 0; }
11514
      if (end === void 0) { end = source.length; }
11515
      var lines = source.split(/\r?\n/);
11516
      var count = 0;
11517
      var res = [];
11518
      for (var i = 0; i < lines.length; i++) {
11519
          count += lines[i].length + 1;
11520
          if (count >= start) {
11521
              for (var j = i - range; j <= i + range || end > count; j++) {
11522
                  if (j < 0 || j >= lines.length)
11523
                      continue;
11524
                  res.push("".concat(j + 1).concat(repeat(" ", 3 - String(j + 1).length), "|  ").concat(lines[j]));
11525
                  var lineLength = lines[j].length;
11526
                  if (j === i) {
11527
                      // push underline
11528
                      var pad = start - (count - lineLength) + 1;
11529
                      var length_1 = end > count ? lineLength - pad : end - start;
11530
                      res.push("   |  " + repeat(" ", pad) + repeat("^", length_1));
11531
                  }
11532
                  else if (j > i) {
11533
                      if (end > count) {
11534
                          var length_2 = Math.min(end - count, lineLength);
11535
                          res.push("   |  " + repeat("^", length_2));
11536
                      }
11537
                      count += lineLength + 1;
11538
                  }
11539
              }
11540
              break;
11541
          }
11542
      }
11543
      return res.join('\n');
11544
  }
11545
  function repeat(str, n) {
11546
      var result = '';
11547
      if (n > 0) {
11548
          // eslint-disable-next-line no-constant-condition
11549
          while (true) {
11550
              // eslint-disable-line
11551
              if (n & 1)
11552
                  result += str;
11553
              n >>>= 1;
11554
              if (n <= 0)
11555
                  break;
11556
              str += str;
11557
          }
11558
      }
11559
      return result;
11560
  }
11561

11562
  function createFunction(code, errors) {
11563
      try {
11564
          return new Function(code);
11565
      }
11566
      catch (err) {
11567
          errors.push({ err: err, code: code });
11568
          return noop;
11569
      }
11570
  }
11571
  function createCompileToFunctionFn(compile) {
11572
      var cache = Object.create(null);
11573
      return function compileToFunctions(template, options, vm) {
11574
          options = extend({}, options);
11575
          var warn = options.warn || warn$2;
11576
          delete options.warn;
11577
          /* istanbul ignore if */
11578
          {
11579
              // detect possible CSP restriction
11580
              try {
11581
                  new Function('return 1');
11582
              }
11583
              catch (e) {
11584
                  if (e.toString().match(/unsafe-eval|CSP/)) {
11585
                      warn('It seems you are using the standalone build of Vue.js in an ' +
11586
                          'environment with Content Security Policy that prohibits unsafe-eval. ' +
11587
                          'The template compiler cannot work in this environment. Consider ' +
11588
                          'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
11589
                          'templates into render functions.');
11590
                  }
11591
              }
11592
          }
11593
          // check cache
11594
          var key = options.delimiters
11595
              ? String(options.delimiters) + template
11596
              : template;
11597
          if (cache[key]) {
11598
              return cache[key];
11599
          }
11600
          // compile
11601
          var compiled = compile(template, options);
11602
          // check compilation errors/tips
11603
          {
11604
              if (compiled.errors && compiled.errors.length) {
11605
                  if (options.outputSourceRange) {
11606
                      compiled.errors.forEach(function (e) {
11607
                          warn("Error compiling template:\n\n".concat(e.msg, "\n\n") +
11608
                              generateCodeFrame(template, e.start, e.end), vm);
11609
                      });
11610
                  }
11611
                  else {
11612
                      warn("Error compiling template:\n\n".concat(template, "\n\n") +
11613
                          compiled.errors.map(function (e) { return "- ".concat(e); }).join('\n') +
11614
                          '\n', vm);
11615
                  }
11616
              }
11617
              if (compiled.tips && compiled.tips.length) {
11618
                  if (options.outputSourceRange) {
11619
                      compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
11620
                  }
11621
                  else {
11622
                      compiled.tips.forEach(function (msg) { return tip(msg, vm); });
11623
                  }
11624
              }
11625
          }
11626
          // turn code into functions
11627
          var res = {};
11628
          var fnGenErrors = [];
11629
          res.render = createFunction(compiled.render, fnGenErrors);
11630
          res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
11631
              return createFunction(code, fnGenErrors);
11632
          });
11633
          // check function generation errors.
11634
          // this should only happen if there is a bug in the compiler itself.
11635
          // mostly for codegen development use
11636
          /* istanbul ignore if */
11637
          {
11638
              if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
11639
                  warn("Failed to generate render function:\n\n" +
11640
                      fnGenErrors
11641
                          .map(function (_a) {
11642
                          var err = _a.err, code = _a.code;
11643
                          return "".concat(err.toString(), " in\n\n").concat(code, "\n");
11644
                      })
11645
                          .join('\n'), vm);
11646
              }
11647
          }
11648
          return (cache[key] = res);
11649
      };
11650
  }
11651

11652
  function createCompilerCreator(baseCompile) {
11653
      return function createCompiler(baseOptions) {
11654
          function compile(template, options) {
11655
              var finalOptions = Object.create(baseOptions);
11656
              var errors = [];
11657
              var tips = [];
11658
              var warn = function (msg, range, tip) {
11659
                  (tip ? tips : errors).push(msg);
11660
              };
11661
              if (options) {
11662
                  if (options.outputSourceRange) {
11663
                      // $flow-disable-line
11664
                      var leadingSpaceLength_1 = template.match(/^\s*/)[0].length;
11665
                      warn = function (msg, range, tip) {
11666
                          var data = typeof msg === 'string' ? { msg: msg } : msg;
11667
                          if (range) {
11668
                              if (range.start != null) {
11669
                                  data.start = range.start + leadingSpaceLength_1;
11670
                              }
11671
                              if (range.end != null) {
11672
                                  data.end = range.end + leadingSpaceLength_1;
11673
                              }
11674
                          }
11675
                          (tip ? tips : errors).push(data);
11676
                      };
11677
                  }
11678
                  // merge custom modules
11679
                  if (options.modules) {
11680
                      finalOptions.modules = (baseOptions.modules || []).concat(options.modules);
11681
                  }
11682
                  // merge custom directives
11683
                  if (options.directives) {
11684
                      finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);
11685
                  }
11686
                  // copy other options
11687
                  for (var key in options) {
11688
                      if (key !== 'modules' && key !== 'directives') {
11689
                          finalOptions[key] = options[key];
11690
                      }
11691
                  }
11692
              }
11693
              finalOptions.warn = warn;
11694
              var compiled = baseCompile(template.trim(), finalOptions);
11695
              {
11696
                  detectErrors(compiled.ast, warn);
11697
              }
11698
              compiled.errors = errors;
11699
              compiled.tips = tips;
11700
              return compiled;
11701
          }
11702
          return {
11703
              compile: compile,
11704
              compileToFunctions: createCompileToFunctionFn(compile)
11705
          };
11706
      };
11707
  }
11708

11709
  // `createCompilerCreator` allows creating compilers that use alternative
11710
  // parser/optimizer/codegen, e.g the SSR optimizing compiler.
11711
  // Here we just export a default compiler using the default parts.
11712
  var createCompiler = createCompilerCreator(function baseCompile(template, options) {
11713
      var ast = parse(template.trim(), options);
11714
      if (options.optimize !== false) {
11715
          optimize(ast, options);
11716
      }
11717
      var code = generate(ast, options);
11718
      return {
11719
          ast: ast,
11720
          render: code.render,
11721
          staticRenderFns: code.staticRenderFns
11722
      };
11723
  });
11724

11725
  var _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;
11726

11727
  // check whether current browser encodes a char inside attribute values
11728
  var div;
11729
  function getShouldDecode(href) {
11730
      div = div || document.createElement('div');
11731
      div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
11732
      return div.innerHTML.indexOf('&#10;') > 0;
11733
  }
11734
  // #3663: IE encodes newlines inside attribute values while other browsers don't
11735
  var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
11736
  // #6828: chrome encodes content in a[href]
11737
  var shouldDecodeNewlinesForHref = inBrowser
11738
      ? getShouldDecode(true)
11739
      : false;
11740

11741
  var idToTemplate = cached(function (id) {
11742
      var el = query(id);
11743
      return el && el.innerHTML;
11744
  });
11745
  var mount = Vue.prototype.$mount;
11746
  Vue.prototype.$mount = function (el, hydrating) {
11747
      el = el && query(el);
11748
      /* istanbul ignore if */
11749
      if (el === document.body || el === document.documentElement) {
11750
          warn$2("Do not mount Vue to <html> or <body> - mount to normal elements instead.");
11751
          return this;
11752
      }
11753
      var options = this.$options;
11754
      // resolve template/el and convert to render function
11755
      if (!options.render) {
11756
          var template = options.template;
11757
          if (template) {
11758
              if (typeof template === 'string') {
11759
                  if (template.charAt(0) === '#') {
11760
                      template = idToTemplate(template);
11761
                      /* istanbul ignore if */
11762
                      if (!template) {
11763
                          warn$2("Template element not found or is empty: ".concat(options.template), this);
11764
                      }
11765
                  }
11766
              }
11767
              else if (template.nodeType) {
11768
                  template = template.innerHTML;
11769
              }
11770
              else {
11771
                  {
11772
                      warn$2('invalid template option:' + template, this);
11773
                  }
11774
                  return this;
11775
              }
11776
          }
11777
          else if (el) {
11778
              // @ts-expect-error
11779
              template = getOuterHTML(el);
11780
          }
11781
          if (template) {
11782
              /* istanbul ignore if */
11783
              if (config.performance && mark) {
11784
                  mark('compile');
11785
              }
11786
              var _a = compileToFunctions(template, {
11787
                  outputSourceRange: true,
11788
                  shouldDecodeNewlines: shouldDecodeNewlines,
11789
                  shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
11790
                  delimiters: options.delimiters,
11791
                  comments: options.comments
11792
              }, this), render = _a.render, staticRenderFns = _a.staticRenderFns;
11793
              options.render = render;
11794
              options.staticRenderFns = staticRenderFns;
11795
              /* istanbul ignore if */
11796
              if (config.performance && mark) {
11797
                  mark('compile end');
11798
                  measure("vue ".concat(this._name, " compile"), 'compile', 'compile end');
11799
              }
11800
          }
11801
      }
11802
      return mount.call(this, el, hydrating);
11803
  };
11804
  /**
11805
   * Get outerHTML of elements, taking care
11806
   * of SVG elements in IE as well.
11807
   */
11808
  function getOuterHTML(el) {
11809
      if (el.outerHTML) {
11810
          return el.outerHTML;
11811
      }
11812
      else {
11813
          var container = document.createElement('div');
11814
          container.appendChild(el.cloneNode(true));
11815
          return container.innerHTML;
11816
      }
11817
  }
11818
  Vue.compile = compileToFunctions;
11819

11820
  // export type EffectScheduler = (...args: any[]) => any
11821
  /**
11822
   * @internal since we are not exposing this in Vue 2, it's used only for
11823
   * internal testing.
11824
   */
11825
  function effect(fn, scheduler) {
11826
      var watcher = new Watcher(currentInstance, fn, noop, {
11827
          sync: true
11828
      });
11829
      if (scheduler) {
11830
          watcher.update = function () {
11831
              scheduler(function () { return watcher.run(); });
11832
          };
11833
      }
11834
  }
11835

11836
  extend(Vue, vca);
11837
  Vue.effect = effect;
11838

11839
  return Vue;
11840

11841
}));
11842

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.