diff --git a/.wordpress-org/screenshot-1.png b/.wordpress-org/screenshot-1.png index c8e40a8..9d48ff7 100644 Binary files a/.wordpress-org/screenshot-1.png and b/.wordpress-org/screenshot-1.png differ diff --git a/.wordpress-org/screenshot-2.png b/.wordpress-org/screenshot-2.png index 1aad48a..c8a4153 100644 Binary files a/.wordpress-org/screenshot-2.png and b/.wordpress-org/screenshot-2.png differ diff --git a/.wordpress-org/screenshot-3.png b/.wordpress-org/screenshot-3.png new file mode 100644 index 0000000..905d294 Binary files /dev/null and b/.wordpress-org/screenshot-3.png differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 432c511..4219c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. ## Changelog -### v3.4.0 - 2021-12-06 +### v4.0.0 - 2022-04-21 + +- New: Mass upgrade with VueJS and a brand-new layout. + +### v4.0.0 - 2021-12-06 - Changed: Refactor HTML, CSS, JS - New: Search icons inside popup diff --git a/README.md b/README.md index aba9e4d..cb11f5f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@
- + Icomoon for Advanced Custom Fields - +

IcoMoon for Advanced Custom Fields

- +

A new ACF field that allows to select icon from IcoMoon json.

- + + + @@ -17,28 +19,27 @@

- -
+ ## Getting started ### Download -Search this plugin from your _CMS Admin > Plugins_ page - -or +Search for "**Support For Icomoon with Advanced Custom Fields**" from your _CMS Admin > Plugins_ page -Download the zip file from [WordPress > Plugin](https://wordpress.org/plugins/acf-icomoon/) +or download the zip file from [WordPress > Plugin](https://wordpress.org/plugins/acf-icomoon/) or +from [releases](https://github.com/viivue/acf-icomoon/releases) ### Create field Go to Field Groups > Create new Field and choose Icomoon Type in Content Group. -![Screenshot 1](https://ps.w.org/acf-icomoon/assets/screenshot-1.png) +![Screenshot 3](https://ps.w.org/acf-icomoon/assets/screenshot-3.png) How it looks in the page +![Screenshot 1](https://ps.w.org/acf-icomoon/assets/screenshot-1.png) ![Screenshot 2](https://ps.w.org/acf-icomoon/assets/screenshot-2.png) ## Compatibility diff --git a/acf-icomoon.php b/acf-icomoon.php index 908c8f9..fee1ef0 100644 --- a/acf-icomoon.php +++ b/acf-icomoon.php @@ -3,7 +3,7 @@ * Plugin Name: Support For Icomoon with Advanced Custom Fields * Plugin URI: https://wordpress.org/plugins/acf-icomoon/ * Description: 🔩 Add a field to select icons from a selection.json file generated by IcoMoon - * Version: 3.4.0 + * Version: 4.0.0 * Requires at least: 5.2 * Requires PHP: 7.2 * Author: ViiVue @@ -25,7 +25,7 @@ * Definitions */ -define('ACFICOMOON_VERSION', '3.4.0'); +const ACFICOMOON_VERSION = '4.0.0'; define("ACFICOMOON_DIR", plugin_dir_path(__FILE__)); define("ACFICOMOON_ASSETS_URL", plugin_dir_url(__FILE__) . 'assets/'); define("ACFICOMOON_STYLESHEET_DIR", get_stylesheet_directory()); @@ -41,15 +41,12 @@ include_once(ACFICOMOON_DIR . 'includes/acf-icomoon.php'); /** - * Init Functions + * WPBakery Page Builder */ -add_action('init', 'viivue_icomoon_init'); -function viivue_icomoon_init(){ - // WPBakery Page Builder Param - if(defined('WPB_VC_VERSION')){ - include_once(ACFICOMOON_DIR . 'includes/js_composer.php'); - } +add_action('vc_before_init', 'viivue_icomoon_vc_param'); +function viivue_icomoon_vc_param(){ + include_once(ACFICOMOON_DIR . 'compatibility/js_composer.php'); } /** diff --git a/assets/css/acf-icomoon.css b/assets/css/acf-icomoon.css index 723a877..53e9e7b 100644 --- a/assets/css/acf-icomoon.css +++ b/assets/css/acf-icomoon.css @@ -3,8 +3,6 @@ ****************************/ .vii-icomoon { position:relative; z-index:9; - --vico-right:110px; - --vico-left:calc(100% - var(--vico-right)); --vico-field-height:30px; --vico-field-svg-size:20px; } @@ -14,34 +12,31 @@ /**************************** * Icomoon Select - Custom Field ****************************/ -.vii-icomoon__custom-field, .vii-icomoon__custom-field-result { - display:flex; align-items:center; -} -.vii-icomoon__custom-field-col.left {width:var(--vico-left); position:relative;} -.vii-icomoon__custom-field-col.right {width:var(--vico-right); padding-left:5px;} +.vii-icomoon__custom-field, .vii-icomoon__custom-field-result {display:flex; align-items:center;} +.vii-icomoon__custom-field-inner {width:100%; position:relative;} /* result */ .vii-icomoon__custom-field-result { justify-content:flex-start; padding-left:10px; - border-radius:4px; border:1px solid #7e8993; height:var(--vico-field-height); line-height:1; + border-radius:4px; box-shadow:0 0 0 1px #7e8993; + height:var(--vico-field-height); line-height:1; transition:all .3s ease; cursor:pointer; background-color:#fff; } .vii-icomoon__custom-field-result .icon-svg svg {width:var(--vico-field-svg-size); height:var(--vico-field-svg-size); display:block;} .vii-icomoon__custom-field-result .icon-name {padding-left:10px;} -.vii-icomoon__custom-field-result:hover {box-shadow:0 0 0 1px #6c75df;} +.vii-icomoon__custom-field-result:hover {box-shadow:0 0 0 2px #6c75df;} /* button remove */ .vii-icomoon:not(.empty) .vii-icomoon__custom-field-remove {display:block;} .vii-icomoon__custom-field-remove { position:absolute; top:50%; right:0; - transform:translateY(-50%); display:none; - background-color:red; color:#fff !important; + transform:translateY(-50%); + background-color:red; color:#fff !important; border:none; border-radius:0 4px 4px 0; height:100%; width:var(--vico-field-height); - line-height:var(--vico-field-height); text-align:center; text-decoration:none; font-size:14px; font-weight:700; transition:all .3s ease; - cursor:pointer; + cursor:pointer; display:flex; align-items:center; justify-content:center; } .vii-icomoon__custom-field-remove:not(:hover) {background-color:transparent; color:red !important;} @@ -54,10 +49,10 @@ /**************************** * Icomoon Select - Popup ****************************/ -.vii-icomoon.popup-open {z-index:9000;} +body.wp-admin .easy-popup-master {z-index:9999999;} /* custom scrollbar */ -.vii-icomoon *::-webkit-scrollbar {width:4px;} +.vii-icomoon *::-webkit-scrollbar {width:3px;} .vii-icomoon *::-webkit-scrollbar-track {background:rgb(255 255 255);} .vii-icomoon *::-webkit-scrollbar-thumb {background-color:#007cba;} @@ -68,61 +63,74 @@ .vii-icomoon.popup-right .vii-icomoon__popup {left:auto; right:0;} .vii-icomoon__popup { - position:absolute; left:0; z-index:20; - margin:3px 0 0; width:300px; max-height:300px; - border-radius:4px; border:1px solid #7e8993; - background-color:rgb(235, 235, 240); box-shadow:0 0 10px 0 rgba(0, 0, 0, .15); - overflow:auto; + padding:0; + border-radius:10px; border:1px solid #7e8993; + background-color:#fff; box-shadow:0 0 10px 0 rgba(0, 0, 0, .15); } +.vii-icomoon__popup * {box-sizing:border-box;} +.vii-icomoon__popup-inner {position:relative; padding-top:57px;} /* popup head */ .vii-icomoon__popup-head { - position:sticky; top:0; - margin-bottom:5px; padding:5px; - border-bottom:1px solid #ccc; background-color:rgb(255 255 255 / 50%); - -webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px); + position:absolute; top:0; left:0; z-index:2; width:100%; + padding:10px 45px 10px 10px; + border-bottom:1px solid #ccc; + display:flex; align-items:center; justify-content:space-between; } /* popup head search */ .vii-icomoon__search {width:100%;} -.vii-icomoon__search input[type=search] {padding:4px 70px 4px 8px; min-height:30px;} +.vii-icomoon__search input[type=search] {padding:4px 8px; min-height:30px; width:100%; border:none;} +.vii-icomoon__search input[type=search]:focus { + box-shadow:0 0 0 2px #6c75df; +} /* popup head count */ -.vii-icomoon__count-text {position:absolute; top:50%; right:15px; transform:translateY(-50%);} +.vii-icomoon__count-text {white-space:nowrap; display:none;} + +/* body */ +.vii-icomoon__popup-body {max-height:400px; min-height:400px; overflow:auto; padding:10px;} + +/* close button */ +.vii-icomoon-easy-popup .easy-popup-close-button {height:60px; cursor:pointer;} /* icon list */ ul.vii-icomoon__icons { - list-style:none; margin:0; padding:7px; - display:flex; flex-wrap:wrap; -} - -ul.vii-icomoon__icons li { - padding:7px; margin:0; width:20%; aspect-ratio:1/1; + list-style:none; margin:0; + display:flex; flex-wrap:wrap; justify-content:center; } -ul.vii-icomoon__icons li a { - width:100%; aspect-ratio:1/1; padding:5px; +ul.vii-icomoon__icons li.search-hidden {display:none;} +ul.vii-icomoon__icons li {margin:0; width:84px; aspect-ratio:1/1;} +ul.vii-icomoon__icons li button { + width:100%; aspect-ratio:1/1; padding:5px; cursor:pointer; border-radius:4px; transition:all .3s ease; - display:flex; align-items:center; justify-content:center; + display:flex; align-items:center; justify-content:center; flex-direction:column; + background:transparent; border:none; } -ul.vii-icomoon__icons li a svg {width:85%;} +ul.vii-icomoon__icons li button i {display:block; margin-bottom:5px; height:25px;} +ul.vii-icomoon__icons li button i svg {width:100%; height:100%;} -ul.vii-icomoon__icons li a:hover {background-color:#fff;} +ul.vii-icomoon__icons li button.active {box-shadow:inset 0 0 0 2px #6c75df;} +ul.vii-icomoon__icons li button.active path {fill:#6c75df;} +ul.vii-icomoon__icons li button:hover {box-shadow:0 0 0 2px #6c75df;} -ul.vii-icomoon__icons li a.active, -ul.vii-icomoon__icons li a:focus { - box-shadow:0 0 0 1px #6c75df; - background-color:#fff; +ul.vii-icomoon__icons li label { + display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%; + font-size:11px; color:#909090; } +.label-search-highlight {background:#6c75df52; color:#000;} +/* icon list empty */ +.vii-icomoon__icons-empty {display:block; text-align:center; padding:20px;} /**************************** * Icomoon Select - VC Param ****************************/ .vii-icomoon.vc-element { --vico-right:130px; - --vico-field-height:45px; + --vico-field-height:44px; --vico-field-svg-size:25px; } @@ -130,4 +138,27 @@ ul.vii-icomoon__icons li a:focus { .vii-icomoon.vc-element .vii-icomoon__popup { position:relative; top:auto; bottom:auto; left:auto; width:100%; max-width:300px; max-height:250px; +} + + +/* Loading */ +.unmounted {position:relative; border-radius:5px; overflow:hidden;} +.unmounted:before { + content:""; position:absolute; top:0; left:0; right:0; bottom:0; z-index:999; + background-color:rgba(255, 255, 255, 0.5); + backdrop-filter:blur(5px); +} +.unmounted:after { + --loading-size:20px; + content:""; position:absolute; top:50%; left:50%; z-index:9999; + width:var(--loading-size); height:var(--loading-size); + margin:calc(-0.5 * var(--loading-size)) 0 0 calc(-0.5 * var(--loading-size)); + border-radius:50%; border:1px dashed transparent; + border-bottom-color:#6c75df; + border-right-color:#6c75df; + animation:spinner .6s linear infinite; + box-sizing:border-box; +} +@keyframes spinner { + to {transform:rotate(360deg);} } \ No newline at end of file diff --git a/assets/css/easy-popup.min.css b/assets/css/easy-popup.min.css new file mode 100644 index 0000000..9b1a32a --- /dev/null +++ b/assets/css/easy-popup.min.css @@ -0,0 +1,4 @@ +/*! + * Easy Popup v0.0.2 + * https://github.com/viivue/easy-popup + */html.easy-popup-open{overflow:hidden}html:not(.easy-popup-open) .easy-popup-master{opacity:0;visibility:hidden}.easy-popup-master{--easy-popup-mobile-breakpoint:1023px;--easy-popup-heading-height:45px;--easy-popup-top-empty-space:100px;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background:rgba(0,0,0,.3);backdrop-filter:blur(2px);transition:opacity .4s ease,visibility .4s ease}.easy-popup:not(.open){opacity:0;visibility:hidden;transform:scale(1.05);pointer-events:none}.easy-popup{position:absolute;top:0;left:0;height:100%;width:100%;transition:opacity .4s ease,visibility .4s ease,transform .4s ease;display:flex;align-items:center;justify-content:center}.easy-popup-overflow{position:relative;z-index:2;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden}.easy-popup-overflow ::-webkit-scrollbar{width:7px}.easy-popup-overflow ::-webkit-scrollbar-track{background:#eee}.easy-popup-overflow ::-webkit-scrollbar-thumb{background-color:#000}.easy-popup-mobile-heading{display:none;position:absolute;top:0;left:0;width:100%;background:#eee;border-radius:10px 10px 0 0}.easy-popup-heading-inner{display:flex;align-items:center;justify-content:space-between;min-height:var(--easy-popup-heading-height);padding:5px 20px}.easy-popup-container{position:relative;padding:40px 20px;box-sizing:border-box;width:100%;max-width:915px;margin:0 auto}.easy-popup-inner{position:relative}[data-easy-popup]:not(.easy-popup-enabled){display:none}.easy-popup-content{background:#fff;padding:40px;position:relative;border-radius:10px;overflow:hidden}.easy-popup-close-button{position:absolute;top:0;right:0;z-index:2;padding:10px;background:0 0;border:none}.easy-popup-close-button svg{transition:all .3s ease}.easy-popup-close-button:hover svg{fill:#ef1616}@media only screen and (max-width:1023px){.easy-popup-content{padding:25px 20px}.easy-popup.easy-popup-has-mobile-layout{align-items:flex-end}.easy-popup.easy-popup-has-mobile-layout .easy-popup-overflow{padding-top:var(--easy-popup-heading-height);overflow:hidden;display:flex}.easy-popup.easy-popup-has-mobile-layout .easy-popup-container{padding:0;overflow:auto;max-width:100%;min-height:calc(80vh - var(--easy-popup-top-empty-space));background:#fff}.easy-popup.easy-popup-has-mobile-layout .easy-popup-close-button:not(.mobile){display:none}.easy-popup.easy-popup-has-mobile-layout:not(.open) .easy-popup-overflow{transform:translateY(20%)}.easy-popup.easy-popup-has-mobile-layout .easy-popup-overflow{transition:transform .3s ease}.easy-popup.easy-popup-has-mobile-layout .easy-popup-mobile-heading{display:block}} \ No newline at end of file diff --git a/assets/js/acf-icomoon-app.js b/assets/js/acf-icomoon-app.js new file mode 100644 index 0000000..060f70c --- /dev/null +++ b/assets/js/acf-icomoon-app.js @@ -0,0 +1,68 @@ +const dev = false; +const appSelector = '[data-icomoon-app]:not([data-v-app])'; + +const initIcomoonSelect = e => { + const app = e.$el.find(appSelector).get()[0]; + if(app){ + app.setAttribute('data-icomoon-init-html', app.outerHTML); + new AcfIcomoonDom(app, 'acf'); + } +} + +/** + * ACF events + */ +// on load +acf.addAction('load_field/type=viivue_acf_icomoon', e => initIcomoonSelect(e)); + +// watch for new fields via ACF +acf.addAction('append_field/type=viivue_acf_icomoon', e => initIcomoonSelect(e)); + +/** + * VC After Element Render + * @param panel + */ +const jsComposerAfterElementRender = panel => { + panel.querySelectorAll(appSelector).forEach(app => new AcfIcomoonDom(app, 'vc-field')); +} + +/** + * VC Param Group After Add + * @param fields + */ +function vcAfterIcomoonFieldAdd(fields){ + const app = fields[0].querySelector(appSelector); + if(app) new AcfIcomoonDom(app, 'vc-param-field') +} + + +/** + * Watch for ACF repeater duplicate + */ +document.addEventListener('click', function(e){ + if(e.target.classList.contains('-duplicate')){ + const oldRow = e.target.closest('.acf-row'); + const app = oldRow.querySelector('[data-icomoon-app]'); + const oldRowId = oldRow.getAttribute('data-id'); + if(app){ + const newRow = oldRow.nextSibling; + + // load app html + newRow.querySelector('[data-icomoon-app]').parentElement.innerHTML = app.getAttribute('data-icomoon-init-html'); + + // clone value + const newId = newRow.getAttribute('data-id'); + const newVal = app.getAttribute('data-icomoon-selected'); + const newRowApp = newRow.querySelector('[data-icomoon-app]'); + const newInput = newRowApp.querySelector('input[data-icomoon-input]'); + const newInputName = newInput.getAttribute('name').replace(oldRowId, newId); + newRowApp.setAttribute('data-icomoon-selected', newVal); + newInput.setAttribute('name', newInputName); + newInput.value = newVal; + + // init app + newRowApp.setAttribute('data-icomoon-init-html', newRowApp.outerHTML); + new AcfIcomoonDom(newRowApp, 'acf-repeater-duplicate'); + } + } +}); \ No newline at end of file diff --git a/assets/js/acf-icomoon.js b/assets/js/acf-icomoon.js deleted file mode 100644 index 87fb205..0000000 --- a/assets/js/acf-icomoon.js +++ /dev/null @@ -1,161 +0,0 @@ -(function($){ - /** - * Icomoon Select - */ - function viivue_icomoon_select(){ - const dev = false; - if(dev) console.log('init viivue_icomoon_select') - - // update value for the given field - function update($field, value = null){ - const $input = $field.find('.vii-icomoon__hidden-input input'); - const $resultSvg = $field.find(".vii-icomoon__custom-field-result .icon-svg"); - const $resultName = $field.find(".vii-icomoon__custom-field-result .icon-name"); - value = value === null ? $input.val() : value; - - let svg = ''; - if(value.length){ - // has value - let $icon = $field.find('a[data-icomoon-value="' + value + '"]'); - $field.removeClass('empty'); - svg = $icon.html(); - $field.find('[data-icomoon-value].active').removeClass('active'); - $icon.addClass("active"); - }else{ - // empty - $field.addClass('empty'); - svg = '--'; - } - - // save value - if(dev) console.log('update value:', value) - $resultName.html(value); - $resultSvg.html(svg); - $input.val(value); - } - - // update on load - $('.vii-icomoon').each(function(){ - update($(this)); - }); - - // show/hide popup - $(document).on('click', '[data-icomoon="popup-trigger"]', function(e){ - const $field = $(e.target).closest('.vii-icomoon'); - const $popup = $field.find('.vii-icomoon__popup'); - - e.preventDefault(); - $field.toggleClass("popup-open"); - if(dev) console.log('show/hide popup') - - // check popup position top/bottom - let offsetTop = $field.offset().top - $(window).scrollTop(), - popupTop = offsetTop > ($popup.outerHeight() + 40); - if(popupTop){ - $field.addClass("popup-top"); - $field.removeClass("popup-bottom"); - }else{ - $field.removeClass("popup-top"); - $field.addClass("popup-bottom"); - } - - // check popup position left/right - let offsetRight = $(window).width() - ($field.offset().left + $field.width()), - popupLeft = offsetRight > ($popup.width() + 40); - if(popupLeft){ - $field.addClass("popup-left"); - $field.removeClass("popup-right"); - }else{ - $field.removeClass("popup-left"); - $field.addClass("popup-right"); - } - - // focus to search field - $popup.find('[data-icomoon="search"]').focus(); - }); - - // select icon - $(document).on('click', '[data-icomoon="select"]', function(e){ - const $field = $(e.target).closest('.vii-icomoon'); - const $this = $(e.target).closest('[data-icomoon="select"]'); - - e.preventDefault(); - if(dev) console.log('select icon:', $this.attr("data-icomoon-value")) - - $field.removeClass("popup-open"); - update($field, $this.attr("data-icomoon-value")); - }); - - // remove value - $(document).on('click', '[data-icomoon="remove-value"]', function(e){ - const $field = $(e.target).closest('.vii-icomoon'); - - e.preventDefault(); - if(dev) console.log('remove icon') - - update($field, ''); - }); - - - // click outside - $(document).click(function(e){ - const $field = $(e.target).closest('.vii-icomoon'); - if(!$field.length){ - $('.vii-icomoon').removeClass("popup-open"); - } - }); - } - - - /** - * Search icon - * @param $wrapper - * @param query - */ - const search = ($wrapper, query) => { - const array = []; - const $icons = $wrapper.find('[data-icomoon-value]'); - $icons.each(function(){ - array.push({ - title: $(this).attr('data-icomoon-value'), - parent: $(this).parent() - }); - }); - - const results = array.filter(item => item.title.indexOf(query) !== -1); - - // hide - $icons.parent().hide(); - - // show - for(const icon of results){ - icon.parent.show(); - } - - // update result count - $wrapper.find('[data-icomoon="count"]').text(results.length); - } - - - /** - * Init search - */ - const initSearch = () => { - // search on keyup - let debounce, debounceTime = 400; - $(document).on('keyup', '[data-icomoon="search"]', function(){ - clearTimeout(debounce); - debounce = setTimeout(() => { - search($(this).closest('.vii-icomoon'), $(this).val()); - }, debounceTime); - }); - } - - - // init select - acf.add_action('ready', viivue_icomoon_select); - - // init search - initSearch(); - -})(jQuery); diff --git a/assets/js/class-acf-icomoon-dom.js b/assets/js/class-acf-icomoon-dom.js new file mode 100644 index 0000000..db201a9 --- /dev/null +++ b/assets/js/class-acf-icomoon-dom.js @@ -0,0 +1,195 @@ +class AcfIcomoonDom{ + constructor(app, type = 'acf'){ + this.app = app; + this.type = type; + this.id = uniqueId('icomoon-'); + this.app.setAttribute('data-icomoon-app', this.id); + + // get icons from json + const iconsEl = this.app.querySelector('[data-icomoon-icons]'); + this.icons = JSON.parse(iconsEl.getAttribute('data-icomoon-icons')); + iconsEl.remove(); + + // input + this.input = this.app.querySelector('input[data-icomoon-input]'); + + // create app + this.createApp({ + _this: this, + callback: ({id, selected}) => { + // init popup + EasyPopup.init(`[data-icomoon-popup="${id}"]`, { + id: id, + outerClass: 'vii-icomoon-easy-popup', + }); + + this.popup = EasyPopup.get(id); + this.triggers = this.app.querySelectorAll('[data-icomoon-popup-trigger]'); + this.triggers.forEach(el => { + el.addEventListener('click', () => { + // open popup + this.popup.toggle(); + + // set focus on search field + const searchInput = document.querySelector(`[data-easy-popup-id="${id}"] input[data-icomoon-search]`); + setTimeout(() => searchInput.focus(), 100) + }); + }); + + this.app.classList.remove('unmounted'); + + if(dev) console.log(`[ACF-Icomoon] (${this.type}) Vue app created => ${id}`, selected); + } + }); + } + + getIconObject(icon_class){ + const iconObject = this.icons.filter(i => i.icon_class === icon_class)[0]; + return typeof iconObject !== 'undefined' ? iconObject : {}; + } + + createApp({_this, callback}){ + Vue.createApp({ + data(){ + return { + id: _this.id, + icons: [..._this.icons], + selected: _this.getIconObject(_this.app.getAttribute('data-icomoon-selected')), + isMounted: true, + } + }, + methods: { + selectIcon(val){ + const lastSelected = this.selected; + this.selected = _this.getIconObject(val); + _this.app.setAttribute('data-icomoon-selected', val); + + EasyPopup.get(this.id).close(); + + // param group > update group label + if(_this.type === 'vc-field' || _this.type === 'vc-param-field'){ + const groupItem = _this.app.closest('.vc_param'); + if(groupItem){ + const label = groupItem.querySelector('.vc_param-group-admin-labels'); + if(label){ + const labelTitle = groupItem.querySelector('[data-param_type="icomoon_class"] .wpb_element_label').textContent; + const oldLabel = `: ${lastSelected.icon_class}`; + + if(label.innerHTML){ + if(label.innerHTML.includes(oldLabel)){ + // replace + label.innerHTML = label.innerHTML.replace(lastSelected.icon_class, val); + }else{ + // prepend + label.innerHTML = `: ${val}, ` + label.innerHTML; + } + }else{ + // create + label.innerHTML = `: ${val}`; + label.classList.remove('vc_hidden-label'); + } + } + } + } + }, + clearSelection(){ + const lastSelected = this.selected; + this.selected = {}; + _this.app.setAttribute('data-icomoon-selected', ''); + + // param group > remove group label + if(_this.type === 'vc-field' || _this.type === 'vc-param-field'){ + const groupItem = _this.app.closest('.vc_param'); + if(groupItem){ + const label = groupItem.querySelector('.vc_param-group-admin-labels'); + if(label && label.innerHTML.length){ + const labelTitle = groupItem.querySelector('[data-param_type="icomoon_class"] .wpb_element_label').textContent; + const oldLabel = `: ${lastSelected.icon_class}`; + + // replace + label.innerHTML = label.innerHTML.replace(oldLabel, ''); + + if(!label.innerHTML.length) label.classList.add('vc_hidden-label'); + } + } + } + } + }, + created(){ + setTimeout(() => { + callback({id: this.id, selected: this.selected}); + }, 10); + } + }).component('vii-icomoon-popup', { + props: { + id: { + type: String, + required: true + }, + icons: { + type: Array, + required: true + }, + selected: { + type: Object, + required: false + } + }, + data(){ + return { + searchQuery: '' + } + }, + methods: { + isShow(name){ + if(this.searchQuery === '') return true; + return name.includes(this.searchQuery); + }, + searchLabel(name){ + if(this.searchQuery === '') return name; + return name.replace(this.searchQuery, `${this.searchQuery}`); + }, + isHasMatchedSearch(){ + if(this.searchQuery === '') return true; + + const matchedIcons = this.icons.filter(icon => icon.icon_class.includes(this.searchQuery)); + return matchedIcons.length > 0; + } + }, + template: ` +
+
+ +
+ + count text +
+ +
+ +
    +
  • + +
  • +
+ + Oops! No icons matched your search. + +
+ +
+
+ ` + } + ).mount(this.app); + } +} \ No newline at end of file diff --git a/assets/js/easy-popup.min.js b/assets/js/easy-popup.min.js new file mode 100644 index 0000000..1534d99 --- /dev/null +++ b/assets/js/easy-popup.min.js @@ -0,0 +1,5 @@ +/*! + * Easy Popup v0.0.2 + * https://github.com/viivue/easy-popup + */ +!function(t){class e{constructor(t,e){if(!t)return void console.warn("Init popup fail due to empty input!");this.root=document.querySelector(":root"),this.el=t,this.selector="data-easy-popup",this.attributes={id:`${this.selector}-id`,title:`${this.selector}-title`,toggle:`${this.selector}-toggle`,mobileLayout:`${this.selector}-mobile`},this.classes={master:"easy-popup-master",processed:"easy-popup-enabled",triggerEnabled:"easy-popup-trigger-enabled",content:"easy-popup-content",outer:"easy-popup",inner:"easy-popup-inner",center:"easy-popup-center",overflow:"easy-popup-overflow",container:"easy-popup-container",open:"open",closeButton:"easy-popup-close-button",mobileHeading:"easy-popup-mobile-heading",hasMobileLayout:"easy-popup-has-mobile-layout"},this.innerHTML=this.el.innerHTML,this.isOpen=!1,this.options={id:this.uniqueId("easy-popup-"),outerClass:"",title:"",closeButtonHTML:'',triggerSelector:"",hasMobileLayout:!1,...e},this.id=this.el.getAttribute(this.selector)||this.options.id,this.title=this.el.getAttribute(this.attributes.title)||this.options.title;const s=this.el.getAttribute(this.attributes.mobileLayout);this.hasMobileLayout=s?"false"!==s:this.options.hasMobileLayout,this.closeButtonHTML=this.options.closeButtonHTML,this.masterContainer=document.querySelector(`.${this.classes.master}`),this.generateHTML();let i=`a[href="#${this.id}"], [${this.attributes.toggle}="${this.id}"]`;i=this.options.triggerSelector?`${this.options.triggerSelector}, ${i}`:i,document.querySelectorAll(i).forEach((t=>{t.classList.add(this.classes.triggerEnabled),t.addEventListener("click",(t=>{t.preventDefault(),this.toggle()}))}))}generateHTML(){this.el.classList.contains(this.classes.processed)||(this.masterContainer||(this.masterContainer=document.createElement("div"),this.masterContainer.classList.add(this.classes.master)),document.querySelector("body").appendChild(this.masterContainer),this.masterContainer.appendChild(this.el),this.inner=this.wrap(this.el),this.inner.classList.add(this.classes.inner),this.closeButton=document.createElement("button"),this.closeButton.classList.add(this.classes.closeButton),this.closeButton.innerHTML=this.closeButtonHTML,this.closeButton.setAttribute(this.attributes.toggle,""),this.closeButton.addEventListener("click",(()=>this.close())),this.inner.appendChild(this.closeButton),this.container=this.wrap(this.inner),this.container.classList.add(this.classes.container),this.overflow=this.wrap(this.container),this.overflow.classList.add(this.classes.overflow),this.mobileHeading=document.createElement("div"),this.mobileHeading.classList.add(this.classes.mobileHeading),this.mobileHeading.innerHTML=`
\n
${this.title}
\n \n
`,this.overflow.appendChild(this.mobileHeading),this.outer=this.wrap(this.overflow),this.outer.classList.add(this.classes.outer),this.options.outerClass&&this.outer.classList.add(this.options.outerClass),this.hasMobileLayout&&this.outer.classList.add(this.classes.hasMobileLayout),this.outer.setAttribute(this.attributes.id,this.id),this.outer.addEventListener("click",(t=>{this.isClickOutsideContent(t)&&this.close()})),this.outer.querySelectorAll("[data-easy-popup-toggle]").forEach((t=>{t.addEventListener("click",(()=>this.close()))})),this.el.classList.add(this.classes.processed,this.classes.content))}isClickOutsideContent(t){return!this.inner.contains(t.target)&&!this.mobileHeading.contains(t.target)}open(){window.EasyPopupData.active&&t.get(window.EasyPopupData.active).close(),window.EasyPopupData.active=this.id,this.outer.classList.add(this.classes.open),this.isOpen=!0,this.root.classList.add("easy-popup-open"),this.root.style.paddingRight=`${this.getScrollbarWidth()}px`,this.root.style.overflow="hidden"}close(){window.EasyPopupData.active="",this.outer.classList.remove(this.classes.open),this.isOpen=!1,this.root.classList.remove("easy-popup-open"),setTimeout((()=>{window.EasyPopupData.active||(this.root.style.paddingRight="",this.root.style.overflow="")}),300)}toggle(){this.isOpen?this.close():this.open()}wrap(t,e=document.createElement("div")){return t.parentNode.insertBefore(e,t),e.appendChild(t),e}getScrollbarWidth(){const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);const e=document.createElement("div");t.appendChild(e);const s=t.offsetWidth-e.offsetWidth;return t.parentNode.removeChild(t),s}uniqueId(t=""){return t+(+new Date).toString(16)+(1e8*Math.random()|0).toString(16)}}window.EasyPopupData=new class{constructor(){this.active="",this.popups=[]}add(t){this.popups.push(t)}get(t){return this.popups.filter((e=>e.id===t))[0]}},t.init=(t="[data-easy-popup]",s={})=>{document.querySelectorAll(t).forEach((t=>window.EasyPopupData.add(new e(t,s))))},t.init(),t.get=t=>window.EasyPopupData.get(t)}(window.EasyPopup=window.EasyPopup||{}); \ No newline at end of file diff --git a/assets/js/helper.js b/assets/js/helper.js new file mode 100644 index 0000000..1f06055 --- /dev/null +++ b/assets/js/helper.js @@ -0,0 +1,7 @@ +/** + * Generate unique ID + */ +function uniqueId(prefix = ''){ + return prefix + (+new Date()).toString(16) + + (Math.random() * 100000000 | 0).toString(16); +} \ No newline at end of file diff --git a/assets/js/vue.global.min.js b/assets/js/vue.global.min.js new file mode 100644 index 0000000..3536486 --- /dev/null +++ b/assets/js/vue.global.min.js @@ -0,0 +1,8 @@ +/** + * Minified by jsDelivr using Terser v5.10.0. + * Original file: /npm/vue@3.2.31/dist/vue.global.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +var Vue=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}const n={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},o={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},r=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");const s=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function i(e){return!!e||""===e}function c(e){if(N(e)){const t={};for(let n=0;n{if(e){const n=e.split(a);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function p(e){let t="";if(A(e))t=e;else if(N(e))for(let n=0;nm(e,t)))}const v=(e,t)=>t&&t.__v_isRef?v(e,t.value):O(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:R(t)?{[`Set(${t.size})`]:[...t.values()]}:!F(t)||N(t)||U(t)?t:String(t),y=Object.freeze({}),b=Object.freeze([]),_=()=>{},w=()=>!1,x=/^on[^a-z]/,S=e=>x.test(e),C=e=>e.startsWith("onUpdate:"),k=Object.assign,T=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},$=Object.prototype.hasOwnProperty,E=(e,t)=>$.call(e,t),N=Array.isArray,O=e=>"[object Map]"===L(e),R=e=>"[object Set]"===L(e),I=e=>e instanceof Date,M=e=>"function"==typeof e,A=e=>"string"==typeof e,P=e=>"symbol"==typeof e,F=e=>null!==e&&"object"==typeof e,V=e=>F(e)&&M(e.then)&&M(e.catch),j=Object.prototype.toString,L=e=>j.call(e),B=e=>L(e).slice(8,-1),U=e=>"[object Object]"===L(e),D=e=>A(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,H=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),z=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),W=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},K=/-(\w)/g,G=W((e=>e.replace(K,((e,t)=>t?t.toUpperCase():"")))),J=/\B([A-Z])/g,q=W((e=>e.replace(J,"-$1").toLowerCase())),Y=W((e=>e.charAt(0).toUpperCase()+e.slice(1))),X=W((e=>e?`on${Y(e)}`:"")),Z=(e,t)=>!Object.is(e,t),Q=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},te=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ne;const oe=()=>ne||(ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function re(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let se;class ie{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&se&&(this.parent=se,this.index=(se.scopes||(se.scopes=[])).push(this)-1)}run(e){if(this.active)try{return se=this,e()}finally{se=this.parent}else re("cannot run an inactive effect scope.")}on(){se=this}off(){se=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},ae=e=>(e.w&fe)>0,ue=e=>(e.n&fe)>0,pe=new WeakMap;let de=0,fe=1;let he;const me=Symbol("iterate"),ge=Symbol("Map key iterate");class ve{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ce(this,n)}run(){if(!this.active)return this.fn();let e=he,t=be;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=he,he=this,be=!0,fe=1<<++de,de<=30?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o{("length"===t||t>=o)&&c.push(e)}));else switch(void 0!==n&&c.push(i.get(n)),t){case"add":N(e)?D(n)&&c.push(i.get("length")):(c.push(i.get(me)),O(e)&&c.push(i.get(ge)));break;case"delete":N(e)||(c.push(i.get(me)),O(e)&&c.push(i.get(ge)));break;case"set":O(e)&&c.push(i.get(me))}const l={target:e,type:t,key:n,newValue:o,oldValue:r,oldTarget:s};if(1===c.length)c[0]&&Te(c[0],l);else{const e=[];for(const t of c)t&&e.push(...t);Te(le(e),l)}}function Te(e,t){for(const n of N(e)?e:[...e])(n!==he||n.allowRecurse)&&(n.onTrigger&&n.onTrigger(k({effect:n},t)),n.scheduler?n.scheduler():n.run())}const $e=t("__proto__,__v_isRef,__isVue"),Ee=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(P)),Ne=Pe(),Oe=Pe(!1,!0),Re=Pe(!0),Ie=Pe(!0,!0),Me=Ae();function Ae(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=St(this);for(let e=0,t=this.length;e{e[t]=function(...e){we();const n=St(this)[t].apply(this,e);return xe(),n}})),e}function Pe(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?ft:dt:t?pt:ut).get(n))return n;const s=N(n);if(!e&&s&&E(Me,o))return Reflect.get(Me,o,r);const i=Reflect.get(n,o,r);if(P(o)?Ee.has(o):$e(o))return i;if(e||Se(n,"get",o),t)return i;if(Nt(i)){return!s||!D(o)?i.value:i}return F(i)?e?gt(i):ht(i):i}}function Fe(e=!1){return function(t,n,o,r){let s=t[n];if(_t(s)&&Nt(s)&&!Nt(o))return!1;if(!e&&!_t(o)&&(wt(o)||(o=St(o),s=St(s)),!N(t)&&Nt(s)&&!Nt(o)))return s.value=o,!0;const i=N(t)&&D(n)?Number(n)(console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0),deleteProperty:(e,t)=>(console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0)},Le=k({},Ve,{get:Oe,set:Fe(!0)}),Be=k({},je,{get:Ie}),Ue=e=>e,De=e=>Reflect.getPrototypeOf(e);function He(e,t,n=!1,o=!1){const r=St(e=e.__v_raw),s=St(t);t!==s&&!n&&Se(r,"get",t),!n&&Se(r,"get",s);const{has:i}=De(r),c=o?Ue:n?Tt:kt;return i.call(r,t)?c(e.get(t)):i.call(r,s)?c(e.get(s)):void(e!==r&&e.get(t))}function ze(e,t=!1){const n=this.__v_raw,o=St(n),r=St(e);return e!==r&&!t&&Se(o,"has",e),!t&&Se(o,"has",r),e===r?n.has(e):n.has(e)||n.has(r)}function We(e,t=!1){return e=e.__v_raw,!t&&Se(St(e),"iterate",me),Reflect.get(e,"size",e)}function Ke(e){e=St(e);const t=St(this);return De(t).has.call(t,e)||(t.add(e),ke(t,"add",e,e)),this}function Ge(e,t){t=St(t);const n=St(this),{has:o,get:r}=De(n);let s=o.call(n,e);s?at(n,o,e):(e=St(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?Z(t,i)&&ke(n,"set",e,t,i):ke(n,"add",e,t),this}function Je(e){const t=St(this),{has:n,get:o}=De(t);let r=n.call(t,e);r?at(t,n,e):(e=St(e),r=n.call(t,e));const s=o?o.call(t,e):void 0,i=t.delete(e);return r&&ke(t,"delete",e,void 0,s),i}function qe(){const e=St(this),t=0!==e.size,n=O(e)?new Map(e):new Set(e),o=e.clear();return t&&ke(e,"clear",void 0,void 0,n),o}function Ye(e,t){return function(n,o){const r=this,s=r.__v_raw,i=St(s),c=t?Ue:e?Tt:kt;return!e&&Se(i,"iterate",me),s.forEach(((e,t)=>n.call(o,c(e),c(t),r)))}}function Xe(e,t,n){return function(...o){const r=this.__v_raw,s=St(r),i=O(s),c="entries"===e||e===Symbol.iterator&&i,l="keys"===e&&i,a=r[e](...o),u=n?Ue:t?Tt:kt;return!t&&Se(s,"iterate",l?ge:me),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:c?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ze(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${Y(e)} operation ${n}failed: target is readonly.`,St(this))}return"delete"!==e&&this}}function Qe(){const e={get(e){return He(this,e)},get size(){return We(this)},has:ze,add:Ke,set:Ge,delete:Je,clear:qe,forEach:Ye(!1,!1)},t={get(e){return He(this,e,!1,!0)},get size(){return We(this)},has:ze,add:Ke,set:Ge,delete:Je,clear:qe,forEach:Ye(!1,!0)},n={get(e){return He(this,e,!0)},get size(){return We(this,!0)},has(e){return ze.call(this,e,!0)},add:Ze("add"),set:Ze("set"),delete:Ze("delete"),clear:Ze("clear"),forEach:Ye(!0,!1)},o={get(e){return He(this,e,!0,!0)},get size(){return We(this,!0)},has(e){return ze.call(this,e,!0)},add:Ze("add"),set:Ze("set"),delete:Ze("delete"),clear:Ze("clear"),forEach:Ye(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Xe(r,!1,!1),n[r]=Xe(r,!0,!1),t[r]=Xe(r,!1,!0),o[r]=Xe(r,!0,!0)})),[e,n,t,o]}const[et,tt,nt,ot]=Qe();function rt(e,t){const n=t?e?ot:nt:e?tt:et;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(E(n,o)&&o in t?n:t,o,r)}const st={get:rt(!1,!1)},it={get:rt(!1,!0)},ct={get:rt(!0,!1)},lt={get:rt(!0,!0)};function at(e,t,n){const o=St(n);if(o!==n&&t.call(e,o)){const t=B(e);console.warn(`Reactive ${t} contains both the raw and reactive versions of the same object${"Map"===t?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ut=new WeakMap,pt=new WeakMap,dt=new WeakMap,ft=new WeakMap;function ht(e){return _t(e)?e:yt(e,!1,Ve,st,ut)}function mt(e){return yt(e,!1,Le,it,pt)}function gt(e){return yt(e,!0,je,ct,dt)}function vt(e){return yt(e,!0,Be,lt,ft)}function yt(e,t,n,o,r){if(!F(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(c=e).__v_skip||!Object.isExtensible(c)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(B(c));var c;if(0===i)return e;const l=new Proxy(e,2===i?o:n);return r.set(e,l),l}function bt(e){return _t(e)?bt(e.__v_raw):!(!e||!e.__v_isReactive)}function _t(e){return!(!e||!e.__v_isReadonly)}function wt(e){return!(!e||!e.__v_isShallow)}function xt(e){return bt(e)||_t(e)}function St(e){const t=e&&e.__v_raw;return t?St(t):e}function Ct(e){return ee(e,"__v_skip",!0),e}const kt=e=>F(e)?ht(e):e,Tt=e=>F(e)?gt(e):e;function $t(e){be&&he&&Ce((e=St(e)).dep||(e.dep=le()),{target:e,type:"get",key:"value"})}function Et(e,t){(e=St(e)).dep&&Te(e.dep,{target:e,type:"set",key:"value",newValue:t})}function Nt(e){return!(!e||!0!==e.__v_isRef)}function Ot(e){return Rt(e,!1)}function Rt(e,t){return Nt(e)?e:new It(e,t)}class It{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:St(e),this._value=t?e:kt(e)}get value(){return $t(this),this._value}set value(e){e=this.__v_isShallow?e:St(e),Z(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:kt(e),Et(this,e))}}function Mt(e){return Nt(e)?e.value:e}const At={get:(e,t,n)=>Mt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Nt(r)&&!Nt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Pt(e){return bt(e)?e:new Proxy(e,At)}class Ft{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>$t(this)),(()=>Et(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class Vt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function jt(e,t,n){const o=e[t];return Nt(o)?o:new Vt(e,t,n)}class Lt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ve(e,(()=>{this._dirty||(this._dirty=!0,Et(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=St(this);return $t(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Bt=[];function Ut(e){Bt.push(e)}function Dt(){Bt.pop()}function Ht(e,...t){we();const n=Bt.length?Bt[Bt.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Bt[Bt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Gt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${ni(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=!!e.component&&null==e.component.parent,r=` at <${ni(e.component,e.type,o)}`,s=">"+n;return e.props?[r,...zt(e.props),s]:[r+s]}(e))})),t}(r)),console.warn(...n)}xe()}function zt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...Wt(n,e[n]))})),n.length>3&&t.push(" ..."),t}function Wt(e,t,n){return A(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:Nt(t)?(t=Wt(e,St(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):M(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=St(t),n?t:[`${e}=`,t])}const Kt={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function Gt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(e){qt(e,t,n)}return r}function Jt(e,t,n,o){if(M(e)){const r=Gt(e,t,n,o);return r&&V(r)&&r.catch((e=>{qt(e,t,n)})),r}const r=[];for(let s=0;s>>1;vn(Zt[o])vn(e)-vn(t))),sn=0;snnull==e.id?1/0:e.id;function yn(e){Xt=!1,Yt=!0,mn(e=e||new Map),Zt.sort(((e,t)=>vn(e)-vn(t)));const t=t=>bn(e,t);try{for(Qt=0;Qt100){const e=t.ownerInstance,n=e&&ti(e.type);return Ht(`Maximum recursive updates exceeded${n?` in component <${n}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}e.set(t,n+1)}else e.set(t,1)}let _n=!1;const wn=new Set;oe().__VUE_HMR_RUNTIME__={createRecord:Tn(Sn),rerender:Tn((function(e,t){const n=xn.get(e);if(!n)return;n.initialDef.render=t,[...n.instances].forEach((e=>{t&&(e.render=t,Cn(e.type).render=t),e.renderCache=[],_n=!0,e.update(),_n=!1}))})),reload:Tn((function(e,t){const n=xn.get(e);if(!n)return;t=Cn(t),kn(n.initialDef,t);const o=[...n.instances];for(const e of o){const o=Cn(e.type);wn.has(o)||(o!==n.initialDef&&kn(o,t),wn.add(o)),e.appContext.optionsCache.delete(e.type),e.ceReload?(wn.add(o),e.ceReload(t.styles),wn.delete(o)):e.parent?(pn(e.parent.update),e.parent.type.__asyncLoader&&e.parent.ceReload&&e.parent.ceReload(t.styles)):e.appContext.reload?e.appContext.reload():"undefined"!=typeof window?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}hn((()=>{for(const e of o)wn.delete(Cn(e.type))}))}))};const xn=new Map;function Sn(e,t){return!xn.has(e)&&(xn.set(e,{initialDef:Cn(t),instances:new Set}),!0)}function Cn(e){return oi(e)?e.__vccOpts:e}function kn(e,t){k(e,t);for(const n in e)"__file"===n||n in t||delete e[n]}function Tn(e){return(t,n)=>{try{return e(t,n)}catch(e){console.error(e),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let $n=[],En=!1;function Nn(t,...n){e.devtools?e.devtools.emit(t,...n):En||$n.push({event:t,args:n})}function On(t,n){var o,r;if(e.devtools=t,e.devtools)e.devtools.enabled=!0,$n.forEach((({event:t,args:n})=>e.devtools.emit(t,...n))),$n=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(r=null===(o=window.navigator)||void 0===o?void 0:o.userAgent)||void 0===r?void 0:r.includes("jsdom"))){(n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{On(e,n)})),setTimeout((()=>{e.devtools||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,En=!0,$n=[])}),3e3)}else En=!0,$n=[]}const Rn=An("component:added"),In=An("component:updated"),Mn=An("component:removed");function An(e){return t=>{Nn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Pn=Vn("perf:start"),Fn=Vn("perf:end");function Vn(e){return(t,n,o)=>{Nn(e,t.appContext.app,t.uid,t,n,o)}}function jn(e,t,...n){const o=e.vnode.props||y;{const{emitsOptions:o,propsOptions:[r]}=e;if(o)if(t in o){const e=o[t];if(M(e)){e(...n)||Ht(`Invalid event arguments: event validation failed for event "${t}".`)}}else r&&X(t)in r||Ht(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${X(t)}" prop.`)}let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=o[e]||y;s?r=n.map((e=>e.trim())):t&&(r=n.map(te))}!function(e,t,n){Nn("component:emit",e.appContext.app,e,t,n)}(e,t,r);{const n=t.toLowerCase();n!==t&&o[X(n)]&&Ht(`Event "${n}" is emitted in component ${ni(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${q(t)}" instead of "${t}".`)}let c,l=o[c=X(t)]||o[c=X(G(t))];!l&&s&&(l=o[c=X(q(t))]),l&&Jt(l,e,6,r);const a=o[c+"Once"];if(a){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Jt(a,e,6,r)}}function Ln(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},c=!1;if(!M(e)){const o=e=>{const n=Ln(e,t,!0);n&&(c=!0,k(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||c?(N(s)?s.forEach((e=>i[e]=null)):k(i,s),o.set(e,i),i):(o.set(e,null),null)}function Bn(e,t){return!(!e||!S(t))&&(t=t.slice(2).replace(/Once$/,""),E(e,t[0].toLowerCase()+t.slice(1))||E(e,q(t))||E(e,t))}let Un=null,Dn=null;function Hn(e){const t=Un;return Un=e,Dn=e&&e.type.__scopeId||null,t}function zn(e,t=Un,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&ds(-1);const r=Hn(t),s=e(...n);return Hn(r),o._d&&ds(1),In(t),s};return o._n=!0,o._c=!0,o._d=!0,o}let Wn=!1;function Kn(){Wn=!0}function Gn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:c,attrs:l,emit:a,render:u,renderCache:p,data:d,setupState:f,ctx:h,inheritAttrs:m}=e;let g,v;const y=Hn(e);Wn=!1;try{if(4&n.shapeFlag){const e=r||o;g=Ts(u.call(e,e,p,s,f,d,h)),v=l}else{const e=t;l===s&&Kn(),g=Ts(e.length>1?e(s,{get attrs(){return Kn(),l},slots:c,emit:a}):e(s,null)),v=t.props?l:Yn(l)}}catch(t){is.length=0,qt(t,e,1),g=ws(rs)}let b,_=g;if(g.patchFlag>0&&2048&g.patchFlag&&([_,b]=Jn(g)),v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=_;if(e.length)if(7&t)i&&e.some(C)&&(v=Xn(v,i)),_=Ss(_,v);else if(!Wn&&_.type!==rs){const e=Object.keys(l),t=[],n=[];for(let o=0,r=e.length;o renders non-element root node that cannot be animated."),_.transition=n.transition),b?b(_):g=_,Hn(y),g}const Jn=e=>{const t=e.children,n=e.dynamicChildren,o=qn(t);if(!o)return[e,void 0];const r=t.indexOf(o),s=n?n.indexOf(o):-1;return[Ts(o),o=>{t[r]=o,n&&(s>-1?n[s]=o:o.patchFlag>0&&(e.dynamicChildren=[...n,o]))}]};function qn(e){let t;for(let n=0;n{let t;for(const n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},Xn=(e,t)=>{const n={};for(const o in e)C(o)&&o.slice(9)in t||(n[o]=e[o]);return n},Zn=e=>7&e.shapeFlag||e.type===rs;function Qn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r0?(no(e,"onPending"),no(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),co(d,e.ssFallback)):d.resolve()}(t,n,o,r,s,i,c,l,a):function(e,t,n,o,r,s,i,c,{p:l,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const d=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=p;if(m)p.pendingBranch=d,gs(d,m)?(l(m,d,p.hiddenContainer,null,r,p,s,i,c),p.deps<=0?p.resolve():g&&(l(h,f,n,o,r,null,s,i,c),co(p,f))):(p.pendingId++,v?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),g?(l(null,d,p.hiddenContainer,null,r,p,s,i,c),p.deps<=0?p.resolve():(l(h,f,n,o,r,null,s,i,c),co(p,f))):h&&gs(d,h)?(l(h,d,n,o,r,p,s,i,c),p.resolve(!0)):(l(null,d,p.hiddenContainer,null,r,p,s,i,c),p.deps<=0&&p.resolve()));else if(h&&gs(d,h))l(h,d,n,o,r,p,s,i,c),co(p,d);else if(no(t,"onPending"),p.pendingBranch=d,p.pendingId++,l(null,d,p.hiddenContainer,null,r,p,s,i,c),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(f)}),e):0===e&&p.fallback(f)}}(e,t,n,o,r,i,c,l,a)},hydrate:function(e,t,n,o,r,s,i,c,l){const a=t.suspense=ro(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,c,!0),u=l(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve();return u},create:ro,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=so(o?n.default:n),e.ssFallback=o?so(n.fallback):ws(rs)}};function no(e,t){const n=e.props&&e.props[t];M(n)&&n()}let oo=!1;function ro(e,t,n,o,r,s,i,c,l,a,u=!1){oo||(oo=!0,console[console.info?"info":"log"](" is an experimental feature and its API will likely change."));const{p:p,m:d,um:f,n:h,o:{parentNode:m,remove:g}}=a,v=te(e.props&&e.props.timeout),y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){if(!e&&!y.pendingBranch)throw new Error("suspense.resolve() is called without a pending branch.");if(y.isUnmounted)throw new Error("suspense.resolve() is called on an already unmounted suspense boundary.");const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:i,container:c}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===y.pendingId&&d(o,c,t,0)});let{anchor:t}=y;n&&(t=h(n),f(n,i,y,!0)),e||d(o,c,t,0)}co(y,o),y.pendingBranch=null,y.isInFallback=!1;let l=y.parent,a=!1;for(;l;){if(l.pendingBranch){l.effects.push(...s),a=!0;break}l=l.parent}a||hn(s),y.effects=[],no(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=y;no(t,"onFallback");const i=h(n),a=()=>{y.isInFallback&&(p(null,e,r,i,o,null,s,c,l),co(y,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),y.isInFallback=!0,f(n,o,null,!0),u||a()},move(e,t,n){y.activeBranch&&d(y.activeBranch,e,t,n),y.container=e},next:()=>y.activeBranch&&h(y.activeBranch),registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{qt(t,e,0)})).then((r=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Ut(s),Js(e,r,!1),o&&(s.el=o);const c=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),y,i,l),c&&g(c),eo(e,s.el),Dt(),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&f(y.activeBranch,n,e,t),y.pendingBranch&&f(y.pendingBranch,n,e,t)}};return y}function so(e){let t;if(M(e)){const n=ps&&e._c;n&&(e._d=!1,ls()),e=e(),n&&(e._d=!0,t=cs,as())}if(N(e)){const t=qn(e);t||Ht(" slots expect a single root node."),e=t}return e=Ts(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function io(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):hn(e)}function co(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,eo(o,r))}function lo(e,t){if(js){let n=js.provides;const o=js.parent&&js.parent.provides;o===n&&(n=js.provides=Object.create(o)),n[e]=t}else Ht("provide() can only be used inside setup().")}function ao(e,t,n=!1){const o=js||Un;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&M(t)?t.call(o.proxy):t;Ht(`injection "${String(e)}" not found.`)}else Ht("inject() can only be used inside setup() or functional components.")}function uo(e,t){return ho(e,null,Object.assign(t||{},{flush:"post"}))}const po={};function fo(e,t,n){return M(t)||Ht("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),ho(e,t,n)}function ho(e,t,{immediate:n,deep:o,flush:r,onTrack:s,onTrigger:i}=y){t||(void 0!==n&&Ht('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),void 0!==o&&Ht('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const c=e=>{Ht("Invalid watch source: ",e,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=js;let a,u,p=!1,d=!1;if(Nt(e)?(a=()=>e.value,p=wt(e)):bt(e)?(a=()=>e,o=!0):N(e)?(d=!0,p=e.some(bt),a=()=>e.map((e=>Nt(e)?e.value:bt(e)?vo(e):M(e)?Gt(e,l,2):void c(e)))):M(e)?a=t?()=>Gt(e,l,2):()=>{if(!l||!l.isUnmounted)return u&&u(),Jt(e,l,3,[f])}:(a=_,c(e)),t&&o){const e=a;a=()=>vo(e())}let f=e=>{u=v.onStop=()=>{Gt(e,l,4)}},h=d?[]:po;const m=()=>{if(v.active)if(t){const e=v.run();(o||p||(d?e.some(((e,t)=>Z(e,h[t]))):Z(e,h)))&&(u&&u(),Jt(t,l,3,[e,h===po?void 0:h,f]),h=e)}else v.run()};let g;m.allowRecurse=!!t,g="sync"===r?m:"post"===r?()=>Ur(m,l&&l.suspense):()=>{!l||l.isMounted?function(e){fn(e,tn,en,nn)}(m):m()};const v=new ve(a,g);return v.onTrack=s,v.onTrigger=i,t?n?m():h=v.run():"post"===r?Ur(v.run.bind(v),l&&l.suspense):v.run(),()=>{v.stop(),l&&l.scope&&T(l.scope.effects,v)}}function mo(e,t,n){const o=this.proxy,r=A(e)?e.includes(".")?go(o,e):()=>o[e]:e.bind(o,o);let s;M(t)?s=t:(s=t.handler,n=t);const i=js;Bs(this);const c=ho(r,s.bind(o),n);return i?Bs(i):Us(),c}function go(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{vo(e,t)}));else if(U(e))for(const n in e)vo(e[n],t);return e}function yo(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Do((()=>{e.isMounted=!0})),Wo((()=>{e.isUnmounting=!0})),e}const bo=[Function,Array],_o={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:bo,onEnter:bo,onAfterEnter:bo,onEnterCancelled:bo,onBeforeLeave:bo,onLeave:bo,onAfterLeave:bo,onLeaveCancelled:bo,onBeforeAppear:bo,onAppear:bo,onAfterAppear:bo,onAppearCancelled:bo},setup(e,{slots:t}){const n=Ls(),o=yo();let r;return()=>{const s=t.default&&To(t.default(),!0);if(!s||!s.length)return;s.length>1&&Ht(" can only be used on a single element or component. Use for lists.");const i=St(e),{mode:c}=i;c&&"in-out"!==c&&"out-in"!==c&&"default"!==c&&Ht(`invalid mode: ${c}`);const l=s[0];if(o.isLeaving)return So(l);const a=Co(l);if(!a)return So(l);const u=xo(a,i,o,n);ko(a,u);const p=n.subTree,d=p&&Co(p);let f=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,f=!0)}if(d&&d.type!==rs&&(!gs(a,d)||f)){const e=xo(d,i,o,n);if(ko(d,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},So(l);"in-out"===c&&a.type!==rs&&(e.delayLeave=(e,t,n)=>{wo(o,d)[String(d.key)]=d,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return l}}};function wo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function xo(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:d,onAfterLeave:f,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),_=wo(n,e),w=(e,t)=>{e&&Jt(e,o,9,t)},x={mode:s,persisted:i,beforeEnter(t){let o=c;if(!n.isMounted){if(!r)return;o=m||c}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&gs(e,s)&&s.el._leaveCb&&s.el._leaveCb(),w(o,[t])},enter(e){let t=l,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||l,o=v||a,s=y||u}let i=!1;const c=e._enterCb=t=>{i||(i=!0,w(t?s:o,[e]),x.delayedLeave&&x.delayedLeave(),e._enterCb=void 0)};t?(t(e,c),t.length<=1&&c()):c()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();w(p,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),w(n?h:f,[t]),t._leaveCb=void 0,_[r]===e&&delete _[r])};_[r]=e,d?(d(t,i),d.length<=1&&i()):i()},clone:e=>xo(e,t,n,o)};return x}function So(e){if(Oo(e))return(e=Ss(e)).children=null,e}function Co(e){return Oo(e)?e.children?e.children[0]:void 0:e}function ko(e,t){6&e.shapeFlag&&e.component?ko(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function To(e,t=!1){let n=[],o=0;for(let r=0;r1)for(let e=0;e!!e.type.__asyncLoader;function No(e,{vnode:{ref:t,props:n,children:o}}){const r=ws(e,n,o);return r.ref=t,r}const Oo=e=>e.type.__isKeepAlive,Ro={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ls(),o=n.ctx;if(!o.renderer)return t.default;const r=new Map,s=new Set;let i=null;n.__v_cache=r;const c=n.suspense,{renderer:{p:l,m:a,um:u,o:{createElement:p}}}=o,d=p("div");function f(e){Vo(e),u(e,n,c,!0)}function h(e){r.forEach(((t,n)=>{const o=ti(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&t.type===i.type?i&&Vo(i):f(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,c),l(s.vnode,e,t,n,s,c,o,e.slotScopeIds,r),Ur((()=>{s.isDeactivated=!1,s.a&&Q(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Os(t,s.parent,e)}),c),Rn(s)},o.deactivate=e=>{const t=e.component;a(e,d,null,1,c),Ur((()=>{t.da&&Q(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Os(n,t.parent,e),t.isDeactivated=!0}),c),Rn(t)},fo((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Io(e,t))),t&&h((e=>!Io(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,jo(n.subTree))};return Do(v),zo(v),Wo((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=jo(t);if(e.type!==r.type)f(e);else{Vo(r);const e=r.component.da;e&&Ur(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return Ht("KeepAlive should contain exactly one component child."),i=null,n;if(!(ms(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let c=jo(o);const l=c.type,a=ti(Eo(c)?c.type.__asyncResolved||{}:l),{include:u,exclude:p,max:d}=e;if(u&&(!a||!Io(u,a))||p&&a&&Io(p,a))return i=c,o;const f=null==c.key?l:c.key,h=r.get(f);return c.el&&(c=Ss(c),128&o.shapeFlag&&(o.ssContent=c)),g=f,h?(c.el=h.el,c.component=h.component,c.transition&&ko(c,c.transition),c.shapeFlag|=512,s.delete(f),s.add(f)):(s.add(f),d&&s.size>parseInt(d,10)&&m(s.values().next().value)),c.shapeFlag|=256,i=c,o}}};function Io(e,t){return N(e)?e.some((e=>Io(e,t))):A(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function Mo(e,t){Po(e,"a",t)}function Ao(e,t){Po(e,"da",t)}function Po(e,t,n=js){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Lo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Oo(e.parent.vnode)&&Fo(o,t,n,e),e=e.parent}}function Fo(e,t,n,o){const r=Lo(t,e,o,!0);Ko((()=>{T(o[t],r)}),n)}function Vo(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function jo(e){return 128&e.shapeFlag?e.ssContent:e}function Lo(e,t,n=js,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;we(),Bs(n);const r=Jt(t,n,e,o);return Us(),xe(),r});return o?r.unshift(s):r.push(s),s}Ht(`${X(Kt[e].replace(/ hook$/,""))} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}const Bo=e=>(t,n=js)=>(!Gs||"sp"===e)&&Lo(e,t,n),Uo=Bo("bm"),Do=Bo("m"),Ho=Bo("bu"),zo=Bo("u"),Wo=Bo("bum"),Ko=Bo("um"),Go=Bo("sp"),Jo=Bo("rtg"),qo=Bo("rtc");function Yo(e,t=js){Lo("ec",e,t)}let Xo=!0;function Zo(e){const t=tr(e),n=e.proxy,o=e.ctx;Xo=!1,t.beforeCreate&&Qo(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:c,provide:l,inject:a,created:u,beforeMount:p,mounted:d,beforeUpdate:f,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:w,render:x,renderTracked:S,renderTriggered:C,errorCaptured:k,serverPrefetch:T,expose:$,inheritAttrs:E,components:O,directives:R,filters:I}=t,A=function(){const e=Object.create(null);return(t,n)=>{e[n]?Ht(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}();{const[t]=e.propsOptions;if(t)for(const e in t)A("Props",e)}if(a&&function(e,t,n=_,o=!1){N(e)&&(e=sr(e));for(const r in e){const s=e[r];let i;i=F(s)?"default"in s?ao(s.from||r,s.default,!0):ao(s.from||r):ao(s),Nt(i)?o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):(Ht(`injected property "${r}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`),t[r]=i):t[r]=i,n("Inject",r)}}(a,o,A,e.appContext.config.unwrapInjectedRef),i)for(const e in i){const t=i[e];M(t)?(Object.defineProperty(o,e,{value:t.bind(n),configurable:!0,enumerable:!0,writable:!0}),A("Methods",e)):Ht(`Method "${e}" has type "${typeof t}" in the component definition. Did you reference the function correctly?`)}if(r){M(r)||Ht("The data option must be a function. Plain object usage is no longer supported.");const t=r.call(n,n);if(V(t)&&Ht("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + ."),F(t)){e.data=ht(t);for(const e in t)A("Data",e),"$"!==e[0]&&"_"!==e[0]&&Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:()=>t[e],set:_})}else Ht("data() should return an object.")}if(Xo=!0,s)for(const e in s){const t=s[e],r=M(t)?t.bind(n,n):M(t.get)?t.get.bind(n,n):_;r===_&&Ht(`Computed property "${e}" has no getter.`);const i=!M(t)&&M(t.set)?t.set.bind(n):()=>{Ht(`Write operation failed: computed property "${e}" is readonly.`)},c=ri({get:r,set:i});Object.defineProperty(o,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e}),A("Computed",e)}if(c)for(const e in c)er(c[e],o,n,e);if(l){const e=M(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{lo(t,e[t])}))}function P(e,t){N(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Qo(u,e,"c"),P(Uo,p),P(Do,d),P(Ho,f),P(zo,h),P(Mo,m),P(Ao,g),P(Yo,k),P(qo,S),P(Jo,C),P(Wo,y),P(Ko,w),P(Go,T),N($))if($.length){const t=e.exposed||(e.exposed={});$.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});x&&e.render===_&&(e.render=x),null!=E&&(e.inheritAttrs=E),O&&(e.components=O),R&&(e.directives=R)}function Qo(e,t,n){Jt(N(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function er(e,t,n,o){const r=o.includes(".")?go(n,o):()=>n[o];if(A(e)){const n=t[e];M(n)?fo(r,n):Ht(`Invalid watch handler specified by key "${e}"`,n)}else if(M(e))fo(r,e.bind(n));else if(F(e))if(N(e))e.forEach((e=>er(e,t,n,o)));else{const o=M(e.handler)?e.handler.bind(n):t[e.handler];M(o)?fo(r,o,e):Ht(`Invalid watch handler specified by key "${e.handler}"`,o)}else Ht(`Invalid watch option: "${o}"`,e)}function tr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,c=s.get(t);let l;return c?l=c:r.length||n||o?(l={},r.length&&r.forEach((e=>nr(l,e,i,!0))),nr(l,t,i)):l=t,s.set(t,l),l}function nr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&nr(e,s,n,!0),r&&r.forEach((t=>nr(e,t,n,!0)));for(const r in t)if(o&&"expose"===r)Ht('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const o=or[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const or={data:rr,props:cr,emits:cr,methods:cr,computed:cr,beforeCreate:ir,created:ir,beforeMount:ir,mounted:ir,beforeUpdate:ir,updated:ir,beforeDestroy:ir,beforeUnmount:ir,destroyed:ir,unmounted:ir,activated:ir,deactivated:ir,errorCaptured:ir,serverPrefetch:ir,components:cr,directives:cr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=k(Object.create(null),e);for(const o in t)n[o]=ir(e[o],t[o]);return n},provide:rr,inject:function(e,t){return cr(sr(e),sr(t))}};function rr(e,t){return t?e?function(){return k(M(e)?e.call(this,this):e,M(t)?t.call(this,this):t)}:t:e}function sr(e){if(N(e)){const t={};for(let n=0;n{l=!0;const[n,o]=ur(e,t,!0);k(i,n),o&&c.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!l)return o.set(e,b),b;if(N(s))for(let e=0;e-1,o[1]=n<0||e-1||E(o,"default"))&&c.push(t)}}}}const a=[i,c];return o.set(e,a),a}function pr(e){return"$"!==e[0]||(Ht(`Invalid prop name: "${e}" is a reserved property.`),!1)}function dr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function fr(e,t){return dr(e)===dr(t)}function hr(e,t){return N(t)?t.findIndex((t=>fr(t,e))):M(t)&&fr(t,e)?0:-1}function mr(e,t,n){const o=St(t),r=n.propsOptions[0];for(const t in r){let n=r[t];null!=n&&gr(t,o[t],n,!E(e,t)&&!E(e,q(t)))}}function gr(e,t,n,o){const{type:r,required:s,validator:i}=n;if(s&&o)Ht('Missing required prop: "'+e+'"');else if(null!=t||n.required){if(null!=r&&!0!==r){let n=!1;const o=N(r)?r:[r],s=[];for(let e=0;e"boolean"===e.toLowerCase()))}(r,s)&&(o+=` with value ${i}`);o+=`, got ${s} `,_r(s)&&(o+=`with value ${c}.`);return o}(e,t,s))}i&&!i(t)&&Ht('Invalid prop: custom validator check failed for prop "'+e+'".')}}const vr=t("String,Number,Boolean,Function,Symbol,BigInt");function yr(e,t){let n;const o=dr(t);if(vr(o)){const r=typeof e;n=r===o.toLowerCase(),n||"object"!==r||(n=e instanceof t)}else n="Object"===o?F(e):"Array"===o?N(e):"null"===o?null===e:e instanceof t;return{valid:n,expectedType:o}}function br(e,t){return"String"===t?`"${e}"`:"Number"===t?`${Number(e)}`:`${e}`}function _r(e){return["string","number","boolean"].some((t=>e.toLowerCase()===t))}const wr=e=>"_"===e[0]||"$stable"===e,xr=e=>N(e)?e.map(Ts):[Ts(e)],Sr=(e,t,n)=>{const o=zn(((...n)=>(js&&Ht(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),xr(t(...n)))),n);return o._c=!1,o},Cr=(e,t,n)=>{const o=e._ctx;for(const n in e){if(wr(n))continue;const r=e[n];if(M(r))t[n]=Sr(n,r,o);else if(null!=r){Ht(`Non-function value encountered for slot "${n}". Prefer function slots for better performance.`);const e=xr(r);t[n]=()=>e}}},kr=(e,t)=>{Oo(e.vnode)||Ht("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=xr(t);e.slots.default=()=>n};function Tr(e){z(e)&&Ht("Do not use built-in directive ids as custom directive id: "+e)}function $r(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i(s.has(e)?Ht("Plugin has already been applied to target app."):e&&M(e.install)?(s.add(e),e.install(c,...t)):M(e)?(s.add(e),e(c,...t)):Ht('A plugin must either be a function or an object with an "install" function.'),c),mixin:e=>(r.mixins.includes(e)?Ht("Mixin has already been applied to target app"+(e.name?`: ${e.name}`:"")):r.mixins.push(e),c),component:(e,t)=>(Hs(e,r.config),t?(r.components[e]&&Ht(`Component "${e}" has already been registered in target app.`),r.components[e]=t,c):r.components[e]),directive:(e,t)=>(Tr(e),t?(r.directives[e]&&Ht(`Directive "${e}" has already been registered in target app.`),r.directives[e]=t,c):r.directives[e]),mount(s,l,a){if(!i){const u=ws(n,o);return u.appContext=r,r.reload=()=>{e(Ss(u),s,a)},l&&t?t(u,s):e(u,s,a),i=!0,c._container=s,s.__vue_app__=c,c._instance=u.component,function(e,t){Nn("app:init",e,t,{Fragment:ns,Text:os,Comment:rs,Static:ss})}(c,pi),Qs(u.component)||u.component.proxy}Ht("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`")},unmount(){i?(e(null,c._container),c._instance=null,function(e){Nn("app:unmount",e)}(c),delete c._container.__vue_app__):Ht("Cannot unmount an app that is not mounted.")},provide:(e,t)=>(e in r.provides&&Ht(`App already provides property with key "${String(e)}". It will be overwritten with the new value.`),r.provides[e]=t,c)};return c}}function Rr(e,t,n,o,r=!1){if(N(e))return void e.forEach(((e,s)=>Rr(e,t&&(N(t)?t[s]:t),n,o,r)));if(Eo(o)&&!r)return;const s=4&o.shapeFlag?Qs(o.component)||o.component.proxy:o.el,i=r?null:s,{i:c,r:l}=e;if(!c)return void Ht("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");const a=t&&t.r,u=c.refs===y?c.refs={}:c.refs,p=c.setupState;if(null!=a&&a!==l&&(A(a)?(u[a]=null,E(p,a)&&(p[a]=null)):Nt(a)&&(a.value=null)),M(l))Gt(l,c,12,[i,u]);else{const t=A(l),o=Nt(l);if(t||o){const o=()=>{if(e.f){const n=t?u[l]:l.value;r?N(n)&&T(n,s):N(n)?n.includes(s)||n.push(s):t?u[l]=[s]:(l.value=[s],e.k&&(u[e.k]=l.value))}else t?(u[l]=i,E(p,l)&&(p[l]=i)):Nt(l)?(l.value=i,e.k&&(u[e.k]=i)):Ht("Invalid template ref type:",l,`(${typeof l})`)};i?(o.id=-1,Ur(o,n)):o()}else Ht("Invalid template ref type:",l,`(${typeof l})`)}}let Ir=!1;const Mr=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Ar=e=>8===e.nodeType;function Pr(e){const{mt:t,p:n,o:{patchProp:o,nextSibling:r,parentNode:s,remove:i,insert:c,createComment:l}}=e,a=(n,o,i,c,l,m=!1)=>{const g=Ar(n)&&"["===n.data,v=()=>f(n,o,i,c,l,g),{type:y,ref:b,shapeFlag:_}=o,w=n.nodeType;o.el=n;let x=null;switch(y){case os:3!==w?x=v():(n.data!==o.children&&(Ir=!0,Ht(`Hydration text mismatch:\n- Client: ${JSON.stringify(n.data)}\n- Server: ${JSON.stringify(o.children)}`),n.data=o.children),x=r(n));break;case rs:x=8!==w||g?v():r(n);break;case ss:if(1===w){x=n;const e=!o.children.length;for(let t=0;t{c=c||!!t.dynamicChildren;const{type:l,props:a,patchFlag:u,shapeFlag:d,dirs:f}=t,h="input"===l&&f||"option"===l;{if(f&&$r(t,null,n,"created"),a)if(h||!c||48&u)for(const t in a)(h&&t.endsWith("value")||S(t)&&!H(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let l;if((l=a&&a.onVnodeBeforeMount)&&Os(l,n,t),f&&$r(t,null,n,"beforeMount"),((l=a&&a.onVnodeMounted)||f)&&io((()=>{l&&Os(l,n,t),f&&$r(t,null,n,"mounted")}),r),16&d&&(!a||!a.innerHTML&&!a.textContent)){let o=p(e.firstChild,t,e,n,r,s,c),l=!1;for(;o;){Ir=!0,l||(Ht(`Hydration children mismatch in <${t.type}>: server rendered element contains more child nodes than client vdom.`),l=!0);const e=o;o=o.nextSibling,i(e)}}else 8&d&&e.textContent!==t.children&&(Ir=!0,Ht(`Hydration text content mismatch in <${t.type}>:\n- Client: ${e.textContent}\n- Server: ${t.children}`),e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,i,c)=>{c=c||!!t.dynamicChildren;const l=t.children,u=l.length;let p=!1;for(let t=0;t: server rendered element contains fewer child nodes than client vdom.`),p=!0),n(null,u,o,null,r,s,Mr(o),i)}}return e},d=(e,t,n,o,i,a)=>{const{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);const d=s(e),f=p(r(e),t,d,n,o,i,a);return f&&Ar(f)&&"]"===f.data?r(t.anchor=f):(Ir=!0,c(t.anchor=l("]"),d,f),f)},f=(e,t,o,c,l,a)=>{if(Ir=!0,Ht("Hydration node mismatch:\n- Client vnode:",t.type,"\n- Server rendered DOM:",e,3===e.nodeType?"(text)":Ar(e)&&"["===e.data?"(start of fragment)":""),t.el=null,a){const t=h(e);for(;;){const n=r(e);if(!n||n===t)break;i(n)}}const u=r(e),p=s(e);return i(e),n(null,t,p,u,o,c,Mr(p),l),u},h=e=>{let t=0;for(;e;)if((e=r(e))&&Ar(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return r(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return Ht("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),n(null,e,t),void gn();Ir=!1,a(t.firstChild,e,null,null,null),gn(),Ir&&console.error("Hydration completed but contains mismatches.")},a]}let Fr,Vr;function jr(e,t){e.appContext.config.performance&&Br()&&Vr.mark(`vue-${t}-${e.uid}`),Pn(e,t,Fr?Vr.now():Date.now())}function Lr(e,t){if(e.appContext.config.performance&&Br()){const n=`vue-${t}-${e.uid}`,o=n+":end";Vr.mark(o),Vr.measure(`<${ni(e,e.type)}> ${t}`,n,o),Vr.clearMarks(n),Vr.clearMarks(o)}Fn(e,t,Fr?Vr.now():Date.now())}function Br(){return void 0!==Fr||("undefined"!=typeof window&&window.performance?(Fr=!0,Vr=window.performance):Fr=!1),Fr}const Ur=io;function Dr(e){return zr(e)}function Hr(e){return zr(e,Pr)}function zr(e,t){const n=oe();n.__VUE__=!0,On(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:o,remove:r,patchProp:s,createElement:i,createText:c,createComment:l,setText:a,setElementText:u,parentNode:p,nextSibling:d,setScopeId:f=_,cloneNode:h,insertStaticContent:m}=e,g=(e,t,n,o=null,r=null,s=null,i=!1,c=null,l=!_n&&!!t.dynamicChildren)=>{if(e===t)return;e&&!gs(e,t)&&(o=te(e),K(e,r,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case os:v(e,t,n,o);break;case rs:w(e,t,n,o);break;case ss:null==e?x(t,n,o,i):S(e,t,n,i);break;case ns:A(e,t,n,o,r,s,i,c,l);break;default:1&p?T(e,t,n,o,r,s,i,c,l):6&p?P(e,t,n,o,r,s,i,c,l):64&p||128&p?a.process(e,t,n,o,r,s,i,c,l,re):Ht("Invalid VNode type:",a,`(${typeof a})`)}null!=u&&r&&Rr(u,e&&e.ref,s,t||e,!t)},v=(e,t,n,r)=>{if(null==e)o(t.el=c(t.children),n,r);else{const n=t.el=e.el;t.children!==e.children&&a(n,t.children)}},w=(e,t,n,r)=>{null==e?o(t.el=l(t.children||""),n,r):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=m(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o)=>{if(t.children!==e.children){const r=d(e.anchor);C(e),[t.el,t.anchor]=m(t.children,n,r,o)}else t.el=e.el,t.anchor=e.anchor},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=d(e),r(e),e=n;r(t)},T=(e,t,n,o,r,s,i,c,l)=>{i=i||"svg"===t.type,null==e?$(t,n,o,r,s,i,c,l):R(e,t,r,s,i,c,l)},$=(e,t,n,r,c,l,a,p)=>{let d,f;const{type:h,props:m,shapeFlag:g,transition:v,patchFlag:y,dirs:b}=e;if(d=e.el=i(e.type,l,m&&m.is,m),8&g?u(d,e.children):16&g&&O(e.children,d,null,r,c,l&&"foreignObject"!==h,a,p),b&&$r(e,null,r,"created"),m){for(const t in m)"value"===t||H(t)||s(d,t,null,m[t],l,e.children,r,c,Z);"value"in m&&s(d,"value",null,m.value),(f=m.onVnodeBeforeMount)&&Os(f,r,e)}N(d,e,e.scopeId,a,r),Object.defineProperty(d,"__vnode",{value:e,enumerable:!1}),Object.defineProperty(d,"__vueParentComponent",{value:r,enumerable:!1}),b&&$r(e,null,r,"beforeMount");const _=(!c||c&&!c.pendingBranch)&&v&&!v.persisted;_&&v.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||_||b)&&Ur((()=>{f&&Os(f,r,e),_&&v.enter(d),b&&$r(e,null,r,"mounted")}),c)},N=(e,t,n,o,r)=>{if(n&&f(e,n),o)for(let t=0;t0&&2048&n.patchFlag&&(n=qn(n.children)||n),t===n){const t=r.vnode;N(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},O=(e,t,n,o,r,s,i,c,l=0)=>{for(let a=l;a{const l=t.el=e.el;let{patchFlag:a,dynamicChildren:p,dirs:d}=t;a|=16&e.patchFlag;const f=e.props||y,h=t.props||y;let m;n&&Wr(n,!1),(m=h.onVnodeBeforeUpdate)&&Os(m,n,t,e),d&&$r(t,e,n,"beforeUpdate"),n&&Wr(n,!0),_n&&(a=0,c=!1,p=null);const g=r&&"foreignObject"!==t.type;if(p?(I(e.dynamicChildren,p,l,n,o,g,i),n&&n.type.__hmrId&&Kr(e,t)):c||U(e,t,l,null,n,o,g,i,!1),a>0){if(16&a)M(l,t,f,h,n,o,r);else if(2&a&&f.class!==h.class&&s(l,"class",null,h.class,r),4&a&&s(l,"style",f.style,h.style,r),8&a){const i=t.dynamicProps;for(let t=0;t{m&&Os(m,n,t,e),d&&$r(t,e,n,"updated")}),o)},I=(e,t,n,o,r,s,i)=>{for(let c=0;c{if(n!==o){for(const l in o){if(H(l))continue;const a=o[l],u=n[l];a!==u&&"value"!==l&&s(e,l,u,a,c,t.children,r,i,Z)}if(n!==y)for(const l in n)H(l)||l in o||s(e,l,n[l],null,c,t.children,r,i,Z);"value"in o&&s(e,"value",n.value,o.value)}},A=(e,t,n,r,s,i,l,a,u)=>{const p=t.el=e?e.el:c(""),d=t.anchor=e?e.anchor:c("");let{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;_n&&(f=0,u=!1,h=null),m&&(a=a?a.concat(m):m),null==e?(o(p,n,r),o(d,n,r),O(t.children,n,d,s,i,l,a,u)):f>0&&64&f&&h&&e.dynamicChildren?(I(e.dynamicChildren,h,n,s,i,l,a),s&&s.type.__hmrId?Kr(e,t):(null!=t.key||s&&t===s.subTree)&&Kr(e,t,!0)):U(e,t,n,d,s,i,l,a,u)},P=(e,t,n,o,r,s,i,c,l)=>{t.slotScopeIds=c,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,l):F(t,n,o,r,s,i,l):j(e,t,l)},F=(e,t,n,o,r,s,i)=>{const c=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Fs,s={uid:Vs++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new ie(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ur(o,r),emitsOptions:Ln(o,r),emit:null,emitted:null,propsDefaults:y,inheritAttrs:o.inheritAttrs,ctx:y,data:y,props:y,attrs:y,slots:y,refs:y,setupState:y,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx=function(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Ms).forEach((n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>Ms[n](e),set:_})})),t}(s),s.root=t?t.root:s,s.emit=jn.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(c.type.__hmrId&&function(e){const t=e.type.__hmrId;let n=xn.get(t);n||(Sn(t,e.type),n=xn.get(t)),n.instances.add(e)}(c),Ut(e),jr(c,"mount"),Oo(e)&&(c.ctx.renderer=re),jr(c,"init"),function(e,t=!1){Gs=t;const{props:n,children:o}=e.vnode,r=zs(e);(function(e,t,n,o=!1){const r={},s={};ee(s,vs,1),e.propsDefaults=Object.create(null),lr(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);mr(t||{},r,e),n?e.props=o?r:mt(r):e.type.props?e.props=r:e.props=s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=St(t),ee(t,"_",n)):Cr(t,e.slots={})}else e.slots={},t&&kr(e,t);ee(e.slots,vs,1)})(e,o);const s=r?function(e,t){const n=e.type;n.name&&Hs(n.name,e.appContext.config);if(n.components){const t=Object.keys(n.components);for(let n=0;n{Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>e.props[n],set:_})}))}(e);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Zs(e):null;Bs(e),we();const r=Gt(o,e,0,[vt(e.props),n]);if(xe(),Us(),V(r)){if(r.then(Us,Us),t)return r.then((n=>{Js(e,n,t)})).catch((t=>{qt(t,e,0)}));e.asyncDep=r}else Js(e,r,t)}else Xs(e,t)}(e,t):void 0;Gs=!1}(c),Lr(c,"init"),c.asyncDep){if(r&&r.registerDep(c,L),!e.el){const e=c.subTree=ws(rs);w(null,e,t,n)}}else L(c,e,t,n,r,s,i),Dt(),Lr(c,"mount")},j=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:c,patchFlag:l}=t,a=s.emitsOptions;if((r||c)&&_n)return!0;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!r&&!c||c&&c.$stable)||o!==i&&(o?!i||Qn(o,i,a):!!i);if(1024&l)return!0;if(16&l)return o?Qn(o,i,a):!!i;if(8&l){const e=t.dynamicProps;for(let t=0;tQt&&Zt.splice(t,1)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},L=(e,t,n,o,r,s,i)=>{const c=e.effect=new ve((()=>{if(e.isMounted){let t,{next:n,bu:o,u:c,parent:l,vnode:a}=e,u=n;Ut(n||e.vnode),Wr(e,!1),n?(n.el=a.el,B(e,n,i)):n=a,o&&Q(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Os(t,l,n,a),Wr(e,!0),jr(e,"render");const d=Gn(e);Lr(e,"render");const f=e.subTree;e.subTree=d,jr(e,"patch"),g(f,d,p(f.el),te(f),e,r,s),Lr(e,"patch"),n.el=d.el,null===u&&eo(e,d.el),c&&Ur(c,r),(t=n.props&&n.props.onVnodeUpdated)&&Ur((()=>Os(t,l,n,a)),r),In(e),Dt()}else{let i;const{el:c,props:l}=t,{bm:a,m:u,parent:p}=e,d=Eo(t);if(Wr(e,!1),a&&Q(a),!d&&(i=l&&l.onVnodeBeforeMount)&&Os(i,p,t),Wr(e,!0),c&&ce){const n=()=>{jr(e,"render"),e.subTree=Gn(e),Lr(e,"render"),jr(e,"hydrate"),ce(c,e.subTree,e,r,null),Lr(e,"hydrate")};d?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{jr(e,"render");const i=e.subTree=Gn(e);Lr(e,"render"),jr(e,"patch"),g(null,i,n,o,e,r,s),Lr(e,"patch"),t.el=i.el}if(u&&Ur(u,r),!d&&(i=l&&l.onVnodeMounted)){const e=t;Ur((()=>Os(i,p,e)),r)}256&t.shapeFlag&&e.a&&Ur(e.a,r),e.isMounted=!0,Rn(e),t=n=o=null}}),(()=>pn(e.update)),e.scope),l=e.update=c.run.bind(c);l.id=e.uid,Wr(e,!0),c.onTrack=e.rtc?t=>Q(e.rtc,t):void 0,c.onTrigger=e.rtg?t=>Q(e.rtg,t):void 0,l.ownerInstance=e,l()},B=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,c=St(r),[l]=e.propsOptions;let a=!1;if(e.type.__hmrId||e.parent&&e.parent.type.__hmrId||!(o||i>0)||16&i){let o;lr(e,t,r,s)&&(a=!0);for(const s in c)t&&(E(t,s)||(o=q(s))!==s&&E(t,o))||(l?!n||void 0===n[s]&&void 0===n[o]||(r[s]=ar(l,c,s,void 0,e,!0)):delete r[s]);if(s!==c)for(const e in s)t&&E(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:o,slots:r}=e;let s=!0,i=y;if(32&o.shapeFlag){const e=t._;e?_n?k(r,t):n&&1===e?s=!1:(k(r,t),n||1!==e||delete r._):(s=!t.$stable,Cr(t,r)),i=t}else t&&(kr(e,t),i={default:1});if(s)for(const e in r)wr(e)||e in i||delete r[e]})(e,t.children,n),we(),mn(void 0,e.update),xe()},U=(e,t,n,o,r,s,i,c,l=!1)=>{const a=e&&e.children,p=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f)return void z(a,d,n,o,r,s,i,c,l);if(256&f)return void D(a,d,n,o,r,s,i,c,l)}8&h?(16&p&&Z(a,r,s),d!==a&&u(n,d)):16&p?16&h?z(a,d,n,o,r,s,i,c,l):Z(a,r,s,!0):(8&p&&u(n,""),16&h&&O(d,n,o,r,s,i,c,l))},D=(e,t,n,o,r,s,i,c,l)=>{t=t||b;const a=(e=e||b).length,u=t.length,p=Math.min(a,u);let d;for(d=0;du?Z(e,r,s,!0,!1,p):O(t,n,o,r,s,i,c,l,p)},z=(e,t,n,o,r,s,i,c,l)=>{let a=0;const u=t.length;let p=e.length-1,d=u-1;for(;a<=p&&a<=d;){const o=e[a],u=t[a]=l?$s(t[a]):Ts(t[a]);if(!gs(o,u))break;g(o,u,n,null,r,s,i,c,l),a++}for(;a<=p&&a<=d;){const o=e[p],a=t[d]=l?$s(t[d]):Ts(t[d]);if(!gs(o,a))break;g(o,a,n,null,r,s,i,c,l),p--,d--}if(a>p){if(a<=d){const e=d+1,p=ed)for(;a<=p;)K(e[a],r,s,!0),a++;else{const f=a,h=a,m=new Map;for(a=h;a<=d;a++){const e=t[a]=l?$s(t[a]):Ts(t[a]);null!=e.key&&(m.has(e.key)&&Ht("Duplicate keys found during update:",JSON.stringify(e.key),"Make sure keys are unique."),m.set(e.key,a))}let v,y=0;const _=d-h+1;let w=!1,x=0;const S=new Array(_);for(a=0;a<_;a++)S[a]=0;for(a=f;a<=p;a++){const o=e[a];if(y>=_){K(o,r,s,!0);continue}let u;if(null!=o.key)u=m.get(o.key);else for(v=h;v<=d;v++)if(0===S[v-h]&&gs(o,t[v])){u=v;break}void 0===u?K(o,r,s,!0):(S[u-h]=a+1,u>=x?x=u:w=!0,g(o,t[u],n,null,r,s,i,c,l),y++)}const C=w?function(e){const t=e.slice(),n=[0];let o,r,s,i,c;const l=e.length;for(o=0;o>1,e[n[c]]0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(S):b;for(v=C.length-1,a=_-1;a>=0;a--){const e=h+a,p=t[e],d=e+1{const{el:i,type:c,transition:l,children:a,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,n,r);if(128&u)return void e.suspense.move(t,n,r);if(64&u)return void c.move(e,t,n,re);if(c===ns){o(i,t,n);for(let e=0;e{let s;for(;e&&e!==t;)s=d(e),o(e,n,r),e=s;o(t,n,r)})(e,t,n);if(2!==r&&1&u&&l)if(0===r)l.beforeEnter(i),o(i,t,n),Ur((()=>l.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=l,c=()=>o(i,t,n),a=()=>{e(i,(()=>{c(),s&&s()}))};r?r(i,c,a):a()}else o(i,t,n)},K=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:c,children:l,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:d}=e;if(null!=c&&Rr(c,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const f=1&u&&d,h=!Eo(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Os(m,t,e),6&u)X(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);f&&$r(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,re,o):a&&(s!==ns||p>0&&64&p)?Z(a,t,n,!1,!0):(s===ns&&384&p||!r&&16&u)&&Z(l,t,n),o&&J(e)}(h&&(m=i&&i.onVnodeUnmounted)||f)&&Ur((()=>{m&&Os(m,t,e),f&&$r(e,null,t,"unmounted")}),n)},J=e=>{const{type:t,el:n,anchor:o,transition:s}=e;if(t===ns)return void Y(n,o);if(t===ss)return void C(e);const i=()=>{r(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},Y=(e,t)=>{let n;for(;e!==t;)n=d(e),r(e),e=n;r(t)},X=(e,t,n)=>{e.type.__hmrId&&function(e){xn.get(e.type.__hmrId).instances.delete(e)}(e);const{bum:o,scope:r,update:s,subTree:i,um:c}=e;o&&Q(o),r.stop(),s&&(s.active=!1,K(i,e,t,n)),c&&Ur(c,t),Ur((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve()),Mn(e)},Z=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i6&e.shapeFlag?te(e.component.subTree):128&e.shapeFlag?e.suspense.next():d(e.anchor||e.el),ne=(e,t,n)=>{null==e?t._vnode&&K(t._vnode,null,null,!0):g(t._vnode||null,e,t,null,null,null,n),gn(),t._vnode=e},re={p:g,um:K,m:W,r:J,mt:F,mc:O,pc:U,pbc:I,n:te,o:e};let se,ce;return t&&([se,ce]=t(re)),{render:ne,hydrate:se,createApp:Or(ne,se)}}function Wr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Kr(e,t,n=!1){const o=e.children,r=t.children;if(N(o)&&N(r))for(let e=0;ee&&(e.disabled||""===e.disabled),Jr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,qr=(e,t)=>{const n=e&&e.to;if(A(n)){if(t){const e=t(n);return e||Ht(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),e}return Ht("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null}return n||Gr(e)||Ht(`Invalid Teleport target: ${n}`),n};function Yr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:c,shapeFlag:l,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||Gr(u))&&16&l)for(let e=0;e{16&y&&u(b,e,t,r,s,i,c,l)};v?_(n,a):p&&_(p,d)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=Gr(e.props),g=m?n:u,y=m?o:f;if(i=i||Jr(u),_?(d(e.dynamicChildren,_,g,r,s,i,c),Kr(e,t,!0)):l||p(e,t,g,y,r,s,i,c,!1),v)m||Yr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=qr(t.props,h);e?Yr(t,e,null,a,0):Ht("Invalid Teleport target on update:",u,`(${typeof u})`)}else m&&Yr(t,u,f,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:c,children:l,anchor:a,targetAnchor:u,target:p,props:d}=e;if(p&&s(u),(i||!Gr(d))&&(s(a),16&c))for(let e=0;e0?cs||b:null,as(),ps>0&&cs&&cs.push(e),e}function hs(e,t,n,o,r){return fs(ws(e,t,n,o,r,!0))}function ms(e){return!!e&&!0===e.__v_isVNode}function gs(e,t){return!(6&t.shapeFlag&&wn.has(t.type))&&(e.type===t.type&&e.key===t.key)}const vs="__vInternal",ys=({key:e})=>null!=e?e:null,bs=({ref:e,ref_key:t,ref_for:n})=>null!=e?A(e)||Nt(e)||M(e)?{i:Un,r:e,k:t,f:!!n}:e:null;function _s(e,t=null,n=null,o=0,r=null,s=(e===ns?0:1),i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ys(t),ref:t&&bs(t),scopeId:Dn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return c?(Es(l,n),128&s&&e.normalize(l)):n&&(l.shapeFlag|=A(n)?8:16),l.key!=l.key&&Ht("VNode created with invalid key (NaN). VNode type:",l.type),ps>0&&!i&&cs&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&cs.push(l),l}const ws=(...e)=>function(e,t=null,n=null,o=0,r=null,s=!1){e&&e!==Qr||(e||Ht(`Invalid vnode type when creating vnode: ${e}.`),e=rs);if(ms(e)){const o=Ss(e,t,!0);return n&&Es(o,n),o}oi(e)&&(e=e.__vccOpts);if(t){t=xs(t);let{class:e,style:n}=t;e&&!A(e)&&(t.class=p(e)),F(n)&&(xt(n)&&!N(n)&&(n=k({},n)),t.style=c(n))}const i=A(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:F(e)?4:M(e)?2:0;4&i&&xt(e)&&Ht("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.","\nComponent that was made reactive: ",e=St(e));return _s(e,t,n,o,r,i,s,!0)}(...us?us(e,Un):e);function xs(e){return e?xt(e)||vs in e?k({},e):e:null}function Ss(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,c=t?Ns(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ys(c),ref:t&&t.ref?n&&r?N(r)?r.concat(bs(t)):[r,bs(t)]:bs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:-1===s&&N(i)?i.map(Cs):i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ns?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ss(e.ssContent),ssFallback:e.ssFallback&&Ss(e.ssFallback),el:e.el,anchor:e.anchor}}function Cs(e){const t=Ss(e);return N(e.children)&&(t.children=e.children.map(Cs)),t}function ks(e=" ",t=0){return ws(os,null,e,t)}function Ts(e){return null==e||"boolean"==typeof e?ws(rs):N(e)?ws(ns,null,e.slice()):"object"==typeof e?$s(e):ws(os,null,String(e))}function $s(e){return null===e.el||e.memo?e:Ss(e)}function Es(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(N(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Es(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||vs in t?3===o&&Un&&(1===Un.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Un}}else M(t)?(t={default:t,_ctx:Un},n=32):(t=String(t),64&o?(n=16,t=[ks(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ns(...e){const t={};for(let n=0;n!ms(e)||e.type!==rs&&!(e.type===ns&&!Rs(e.children))))?e:null}const Is=e=>e?zs(e)?Qs(e)||e.proxy:Is(e.parent):null,Ms=k(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>vt(e.props),$attrs:e=>vt(e.attrs),$slots:e=>vt(e.slots),$refs:e=>vt(e.refs),$parent:e=>Is(e.parent),$root:e=>Is(e.root),$emit:e=>e.emit,$options:e=>tr(e),$forceUpdate:e=>()=>pn(e.update),$nextTick:e=>un.bind(e.proxy),$watch:e=>mo.bind(e)}),As={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:c,appContext:l}=e;if("__isVue"===t)return!0;if(o!==y&&o.__isScriptSetup&&E(o,t))return o[t];let a;if("$"!==t[0]){const c=i[t];if(void 0!==c)switch(c){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==y&&E(o,t))return i[t]=1,o[t];if(r!==y&&E(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&E(a,t))return i[t]=3,s[t];if(n!==y&&E(n,t))return i[t]=4,n[t];Xo&&(i[t]=0)}}const u=Ms[t];let p,d;return u?("$attrs"===t&&(Se(e,"get",t),Kn()),u(e)):(p=c.__cssModules)&&(p=p[t])?p:n!==y&&E(n,t)?(i[t]=4,n[t]):(d=l.config.globalProperties,E(d,t)?d[t]:void(!Un||A(t)&&0===t.indexOf("__v")||(r===y||"$"!==t[0]&&"_"!==t[0]||!E(r,t)?e===Un&&Ht(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`):Ht(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`))))},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==y&&E(r,t)?(r[t]=n,!0):o!==y&&E(o,t)?(o[t]=n,!0):E(e.props,t)?(Ht(`Attempting to mutate prop "${t}". Props are readonly.`,e),!1):"$"===t[0]&&t.slice(1)in e?(Ht(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`,e),!1):(t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let c;return!!n[i]||e!==y&&E(e,i)||t!==y&&E(t,i)||(c=s[0])&&E(c,i)||E(o,i)||E(Ms,i)||E(r.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?this.set(e,t,n.get(),null):null!=n.value&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)},ownKeys:e=>(Ht("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e))},Ps=k({},As,{get(e,t){if(t!==Symbol.unscopables)return As.get(e,t,e)},has(e,t){const n="_"!==t[0]&&!r(t);return!n&&As.has(e,t)&&Ht(`Property ${JSON.stringify(t)} should not start with _ which is a reserved prefix for Vue internals.`),n}});const Fs=Er();let Vs=0;let js=null;const Ls=()=>js||Un,Bs=e=>{js=e,e.scope.on()},Us=()=>{js&&js.scope.off(),js=null},Ds=t("slot,component");function Hs(e,t){const n=t.isNativeTag||w;(Ds(e)||n(e))&&Ht("Do not use built-in or reserved HTML elements as component id: "+e)}function zs(e){return 4&e.vnode.shapeFlag}let Ws,Ks,Gs=!1;function Js(e,t,n){M(t)?e.render=t:F(t)?(ms(t)&&Ht("setup() should not return VNodes directly - return a render function instead."),e.devtoolsRawSetupState=t,e.setupState=Pt(t),function(e){const{ctx:t,setupState:n}=e;Object.keys(St(n)).forEach((e=>{if(!n.__isScriptSetup){if("$"===e[0]||"_"===e[0])return void Ht(`setup() return property ${JSON.stringify(e)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:()=>n[e],set:_})}}))}(e)):void 0!==t&&Ht("setup() should return an object. Received: "+(null===t?"null":typeof t)),Xs(e,n)}function qs(e){Ws=e,Ks=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Ps))}}const Ys=()=>!Ws;function Xs(e,t,n){const o=e.type;if(!e.render){if(!t&&Ws&&!o.render){const t=o.template;if(t){jr(e,"compile");const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,c=k(k({isCustomElement:n,delimiters:s},r),i);o.render=Ws(t,c),Lr(e,"compile")}}e.render=o.render||_,Ks&&Ks(e)}Bs(e),we(),Zo(e),xe(),Us(),o.render||e.render!==_||t||(!Ws&&o.template?Ht('Component provided template option but runtime compilation is not supported in this build of Vue. Use "vue.global.js" instead.'):Ht("Component is missing template or render function."))}function Zs(e){const t=t=>{e.exposed&&Ht("expose() should be called only once per setup()."),e.exposed=t||{}};let n;return Object.freeze({get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(Kn(),Se(e,"get","$attrs"),t[n]),set:()=>(Ht("setupContext.attrs is readonly."),!1),deleteProperty:()=>(Ht("setupContext.attrs is readonly."),!1)})}(e))},get slots(){return vt(e.slots)},get emit(){return(t,...n)=>e.emit(t,...n)},expose:t})}function Qs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Pt(Ct(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Ms?Ms[n](e):void 0}))}const ei=/(?:^|[-_])(\w)/g;function ti(e){return M(e)&&e.displayName||e.name}function ni(e,t,n=!1){let o=ti(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(ei,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}function oi(e){return M(e)&&"__vccOpts"in e}const ri=(e,t)=>function(e,t,n=!1){let o,r;const s=M(e);s?(o=e,r=()=>{console.warn("Write operation failed: computed value is readonly")}):(o=e.get,r=e.set);const i=new Lt(o,r,s||!r,n);return t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}(e,t,Gs),si=e=>Ht(`${e}() is a compiler-hint helper that is only usable inside '; + + return $html; } \ No newline at end of file diff --git a/includes/fields/acf-field-icomoon.php b/includes/fields/acf-field-icomoon.php index 84d81ca..e06e393 100644 --- a/includes/fields/acf-field-icomoon.php +++ b/includes/fields/acf-field-icomoon.php @@ -16,6 +16,7 @@ function __construct(){ $this->defaults = array( 'selection_json_path' => ACFICOMOON_STYLESHEET_DIR . '/assets/fonts/selection.json', ); + $this->prefix = 'icon-'; parent::__construct(); } @@ -52,17 +53,16 @@ function render_field_settings($field){ */ function render_field($field){ // list of icons - $choices = $this->viivue_get_icomoon_json(viivue_array_key_exists('selection_json_path', $field)); + $icon_array = $this->viivue_get_icomoon_json(viivue_array_key_exists('selection_json_path', $field)); // selected value $value = esc_attr(viivue_array_key_exists('value', $field)); $name = esc_attr(viivue_array_key_exists('name', $field)); - // ACF input field display in backend interface - $input_html = ''; + $input_html = ''; // output HTML - echo $this->viivue_icomoon_select_html($choices, $value, $input_html); + echo $this->viivue_icomoon_select_html($icon_array, $value, $input_html); } @@ -70,51 +70,42 @@ function render_field($field){ * HTML for ACF and VC */ function viivue_icomoon_select_html($icon_array, $value, $input_html, $vc_element = false): string{ - $id = uniqid(); $class = $vc_element ? 'vc-element' : 'acf'; + $html = ''; - // find active icon - $active_icon = array(); - foreach($icon_array as $icon){ - $return_value = $vc_element ? "icon_class" : "name"; - $is_selected = $icon[$return_value] == $value; - if($is_selected){ - $active_icon = $icon; - } + // value must begin with prefix (support legacy version) + if(substr($value, 0, strlen($this->prefix)) !== $this->prefix){ + $value = $this->prefix . $value; } - $active_icon_svg = viivue_array_key_exists('icon_svg', $active_icon); - $active_icon_name = viivue_array_key_exists('name', $active_icon); // wrapper - $html = '